SunSPOT API V3.0


com.sun.spot.peripheral.radio
Interface IRadioPolicyManager

All Known Implementing Classes:
ProxyRadioPolicyManager, RadioPolicyManager

public interface IRadioPolicyManager


Field Summary
static short DEFAULT_PAN_ID
          Default PAN id to use.
 
Method Summary
 void closeBaseStation()
          Used in the host to close down the base station - a no-op if called on a Spot
 void deregisterConnection(IConnectionID conn)
          Notify the policy manager that a connection has closed
 int getChannelNumber()
          Answer the current channel number (between 11 and 26).
 long getIEEEAddress()
           
 int getOutputPower()
          Answer the radio output power in decibels.
 short getPanId()
          Answer the current pan ID.
 boolean isRadioReceiverOn()
           
 void policyHasChanged(IConnectionID conn, RadioPolicy selection)
          Notify the policy manager that a policy has changed
 void registerConnection(IConnectionID conn)
          Notify the policy manager of a new connection
 void setChannelNumber(int channel)
          Set the current channel number (between 11 and 26).
 void setOutputPower(int power)
          Set the radio output power in decibels (between -32 and +31).
 void setPanId(short pid)
          Set the pan ID (should not be -1 or -2, which are reserved in the I802.15.4 standard).
 boolean setRxOn(boolean rxState)
          Attempt to set the radio receiver to on or off
 

Field Detail

DEFAULT_PAN_ID

static final short DEFAULT_PAN_ID
Default PAN id to use.

See Also:
Constant Field Values
Method Detail

policyHasChanged

void policyHasChanged(IConnectionID conn,
                      RadioPolicy selection)
Notify the policy manager that a policy has changed

Parameters:
conn - the connection owning the policy that has changed
selection - the required radio state

registerConnection

void registerConnection(IConnectionID conn)
Notify the policy manager of a new connection

Parameters:
conn - the connection being registered

deregisterConnection

void deregisterConnection(IConnectionID conn)
Notify the policy manager that a connection has closed

Parameters:
conn - the connection being deregistered

isRadioReceiverOn

boolean isRadioReceiverOn()
Returns:
true if the radio receiver is currently enabled

setRxOn

boolean setRxOn(boolean rxState)
Attempt to set the radio receiver to on or off

Parameters:
rxState - true for rx on, false for rx off
Returns:
true if the radio receiver is in the requested state after this call

getChannelNumber

int getChannelNumber()
Answer the current channel number (between 11 and 26).

Returns:
current channel number

getIEEEAddress

long getIEEEAddress()
Returns:
the 64-bit IEEE address of this device

getOutputPower

int getOutputPower()
Answer the radio output power in decibels.

Returns:
- radio output power

getPanId

short getPanId()
Answer the current pan ID.

Returns:
current pan ID

setChannelNumber

void setChannelNumber(int channel)
Set the current channel number (between 11 and 26).

Parameters:
channel - - the new channel number

setOutputPower

void setOutputPower(int power)
Set the radio output power in decibels (between -32 and +31). NB. The range given is the I802.15.4 standard range. In practice, for the CC2420 radio, this will mean maximum power for all values from 0 to 31 db.

Parameters:
power - - new power setting in decibels.

setPanId

void setPanId(short pid)
Set the pan ID (should not be -1 or -2, which are reserved in the I802.15.4 standard).

Parameters:
pid - - the new pan ID

closeBaseStation

void closeBaseStation()
Used in the host to close down the base station - a no-op if called on a Spot


SunSPOT API V3.0


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