SunSPOT API V3.0


com.sun.spot.peripheral.radio
Interface I802_15_4_MAC


public interface I802_15_4_MAC

Defines the portion of the I802.15.4 MAC layer specification that this library currently supports.

See Also:
http://standards.ieee.org/getieee802/index.html

Field Summary
static int A_EXTENDED_ADDRESS
          Key for mlmeSet(int, long) to control the 64-bit IEEE address for this MAC layer.
static int CHANNEL_ACCESS_FAILURE
          Returned from mcpsDataRequest if transmission fails because the channel is not clear
static int FALSE
          Some MAC PIB attributes are defined as boolean: to simplify the interface they're returned as ints.
static int MAC_RX_ON_WHEN_IDLE
          Key for mlmeSet(int, long) to control whether RX is active when not explicitly enabled through mlmeRxEnable(int).
static int NO_ACK
          Returned from mcpsDataRequest if transmission is not acknowledged by remote
static int SUCCESS
          Returned from mcpsDataRequest on successful transmission
static int TRUE
          Some MAC PIB attributes are defined as boolean: to simplify the interface they're returned as ints.
 
Method Summary
 void mcpsDataIndication(RadioPacket rp)
          Receive a packet: blocks until a packet is received.
 int mcpsDataRequest(RadioPacket rp)
          Send a packet: blocks until ACK received if ACK requested.
 long mlmeGet(int attribute)
          Answer the value of the specified attribute.
 void mlmeReset(boolean resetAttribs)
          Reset the MAC layer
 void mlmeRxEnable(int rxOnDuration)
          Enable the receiver for a fixed period
 void mlmeSet(int attribute, long value)
          Set the value of a MAC attribute
 void mlmeStart(short panId, int channel)
          Start the MAC layer on a specific channel
 

Field Detail

SUCCESS

static final int SUCCESS
Returned from mcpsDataRequest on successful transmission

See Also:
Constant Field Values

NO_ACK

static final int NO_ACK
Returned from mcpsDataRequest if transmission is not acknowledged by remote

See Also:
Constant Field Values

CHANNEL_ACCESS_FAILURE

static final int CHANNEL_ACCESS_FAILURE
Returned from mcpsDataRequest if transmission fails because the channel is not clear

See Also:
Constant Field Values

MAC_RX_ON_WHEN_IDLE

static final int MAC_RX_ON_WHEN_IDLE
Key for mlmeSet(int, long) to control whether RX is active when not explicitly enabled through mlmeRxEnable(int).

See Also:
Constant Field Values

A_EXTENDED_ADDRESS

static final int A_EXTENDED_ADDRESS
Key for mlmeSet(int, long) to control the 64-bit IEEE address for this MAC layer.

See Also:
Constant Field Values

FALSE

static final int FALSE
Some MAC PIB attributes are defined as boolean: to simplify the interface they're returned as ints. These constants allow for checking their values.

See Also:
Constant Field Values

TRUE

static final int TRUE
Some MAC PIB attributes are defined as boolean: to simplify the interface they're returned as ints. These constants allow for checking their values.

See Also:
Constant Field Values
Method Detail

mcpsDataRequest

int mcpsDataRequest(RadioPacket rp)
Send a packet: blocks until ACK received if ACK requested.

Request constraints
SrcAddr=[my addr]
SrcAddrMode=0x03
DstAddrMode=0x03
SrcPANId=DstPANId
TxOptions=binary0000000x

Parameters:
rp - - packet containing data to send
Returns:
SUCCESS | CHANNEL_ACCESS_FAILURE | NO_ACK

mcpsDataIndication

void mcpsDataIndication(RadioPacket rp)
Receive a packet: blocks until a packet is received.

Constraints
DstAddr=[my addr]
SrcAddrMode=0x03
DstAddrMode=0x03
SrcPANId=DstPANId
SecurityUse=FALSE
ACLEntry=0x08

Parameters:
rp - - the packet to fill with data

mlmeStart

void mlmeStart(short panId,
               int channel)
               throws MAC_InvalidParameterException
Start the MAC layer on a specific channel

Parameters:
panId - - panId to use
channel - - channel to use
Throws:
MAC_InvalidParameterException

mlmeReset

void mlmeReset(boolean resetAttribs)
Reset the MAC layer

Parameters:
resetAttribs - - reset PIB

mlmeGet

long mlmeGet(int attribute)
             throws MAC_InvalidParameterException
Answer the value of the specified attribute.

Parameters:
attribute - -- see Field Summary
Returns:
- the value of the attribute
Throws:
MAC_InvalidParameterException - if attribute is unknown

mlmeSet

void mlmeSet(int attribute,
             long value)
             throws MAC_InvalidParameterException
Set the value of a MAC attribute

Parameters:
attribute - -- attribute to set (see Field Summary)
value - -- value to apply
Throws:
MAC_InvalidParameterException - if attribute is unknown

mlmeRxEnable

void mlmeRxEnable(int rxOnDuration)
Enable the receiver for a fixed period

Parameters:
rxOnDuration - - the number of symbol-times for which to enable the receiver (max=0xFFFFFF, 0 = disable)

SunSPOT API V3.0


Copyright © 2006, 2007 Sun Microsystems, Inc. All Rights Reserved.