|
SunSPOT API V4.0 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface I802_15_4_PHY
Defines the portion of the I802.15.4 PHY layer specification that this library currently supports. Note: even if you intend to use this class to implement a physical-level transmitter only, you should still call pdDataIndication in a separate thread in order to prevent the CC2420's RX FIFO from filling with radio noise.
| Field Summary | |
|---|---|
static int |
BUSY
Return code for CCA requests when channel is not clear |
static int |
IDLE
Return code for CCA requests when channel is clear |
static int |
PHY_CURRENT_CHANNEL
Attribute to set the current channel (in the range 11..26) (see plmeSet(int, int)) |
static int |
PHY_TRANSMIT_POWER
Attribute to set the transmit power (the parameter must be a six bit 2s-complement number in the range -32..31 - the easiest was to get this is to pass in "myPower & 0x3F") (see plmeSet(int, int)) |
static int |
RX_ON
Value for TRX state (see plmeSetTrxState(int)) to enable RX |
static int |
SUCCESS
Return code for success in pdDataRequest(RadioPacket) and plmeSetTrxState(int) |
static int |
TRX_OFF
Value for TRX state (see plmeSetTrxState(int)) to disable RX |
static int |
TX_ON
Return code for plmeCCARequest() if transmission is active |
| Method Summary | |
|---|---|
void |
pdDataIndication(RadioPacket rp)
Receive a packet. |
int |
pdDataRequest(RadioPacket rp)
Send a packet. |
int |
plmeCCARequest()
Check to see if channel is clear |
int |
plmeGet(int attribute)
Gets the value of a PHY attribute |
void |
plmeSet(int attribute,
int value)
Sets the value of a PHY attribute. |
int |
plmeSetTrxState(int newState)
Set the TRX state. |
| Field Detail |
|---|
static final int BUSY
static final int IDLE
static final int RX_ON
plmeSetTrxState(int)) to enable RX
static final int SUCCESS
pdDataRequest(RadioPacket) and plmeSetTrxState(int)
static final int TRX_OFF
plmeSetTrxState(int)) to disable RX
static final int TX_ON
plmeCCARequest() if transmission is active
static final int PHY_CURRENT_CHANNEL
plmeSet(int, int))
static final int PHY_TRANSMIT_POWER
plmeSet(int, int))
| Method Detail |
|---|
int pdDataRequest(RadioPacket rp)
rp - - Packet to send
void pdDataIndication(RadioPacket rp)
rp - - Packet to fill in with dataint plmeCCARequest()
TRX_OFF | BUSY | IDLE
void plmeSet(int attribute,
int value)
throws PHY_UnsupportedAttributeException,
PHY_InvalidParameterException
attribute - - key of attribute to setvalue - - value to set
PHY_UnsupportedAttributeException
PHY_InvalidParameterExceptionPHY_CURRENT_CHANNEL,
PHY_TRANSMIT_POWER
int plmeGet(int attribute)
throws PHY_UnsupportedAttributeException
attribute - - key of attribute to get
PHY_UnsupportedAttributeExceptionPHY_CURRENT_CHANNEL,
PHY_TRANSMIT_POWERint plmeSetTrxState(int newState)
newState - -- TRX_OFF | RX_ON | TX_ON
|
SunSPOT API V4.0 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||