SunSPOT API V3.0


com.sun.spot.peripheral.radio.policy.proxy
Class ProxyRadioPolicyManager

java.lang.Object
  extended by com.sun.spot.peripheral.radio.policy.proxy.ProxyRadioPolicyManager
All Implemented Interfaces:
IRadioPolicyManager

public class ProxyRadioPolicyManager
extends Object
implements IRadioPolicyManager


Field Summary
static String RADIO_POLICY_SERVER
           
 
Fields inherited from interface com.sun.spot.peripheral.radio.IRadioPolicyManager
DEFAULT_PAN_ID
 
Constructor Summary
ProxyRadioPolicyManager()
           
 
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
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

RADIO_POLICY_SERVER

public static final String RADIO_POLICY_SERVER
See Also:
Constant Field Values
Constructor Detail

ProxyRadioPolicyManager

public ProxyRadioPolicyManager()
Method Detail

policyHasChanged

public void policyHasChanged(IConnectionID conn,
                             RadioPolicy selection)
Description copied from interface: IRadioPolicyManager
Notify the policy manager that a policy has changed

Specified by:
policyHasChanged in interface IRadioPolicyManager
Parameters:
conn - the connection owning the policy that has changed
selection - the required radio state

registerConnection

public void registerConnection(IConnectionID conn)
Description copied from interface: IRadioPolicyManager
Notify the policy manager of a new connection

Specified by:
registerConnection in interface IRadioPolicyManager
Parameters:
conn - the connection being registered

deregisterConnection

public void deregisterConnection(IConnectionID conn)
Description copied from interface: IRadioPolicyManager
Notify the policy manager that a connection has closed

Specified by:
deregisterConnection in interface IRadioPolicyManager
Parameters:
conn - the connection being deregistered

isRadioReceiverOn

public boolean isRadioReceiverOn()
Specified by:
isRadioReceiverOn in interface IRadioPolicyManager
Returns:
true if the radio receiver is currently enabled

setRxOn

public boolean setRxOn(boolean rxState)
Description copied from interface: IRadioPolicyManager
Attempt to set the radio receiver to on or off

Specified by:
setRxOn in interface IRadioPolicyManager
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

public int getChannelNumber()
Description copied from interface: IRadioPolicyManager
Answer the current channel number (between 11 and 26).

Specified by:
getChannelNumber in interface IRadioPolicyManager
Returns:
current channel number

getIEEEAddress

public long getIEEEAddress()
Specified by:
getIEEEAddress in interface IRadioPolicyManager
Returns:
the 64-bit IEEE address of this device

getOutputPower

public int getOutputPower()
Description copied from interface: IRadioPolicyManager
Answer the radio output power in decibels.

Specified by:
getOutputPower in interface IRadioPolicyManager
Returns:
- radio output power

getPanId

public short getPanId()
Description copied from interface: IRadioPolicyManager
Answer the current pan ID.

Specified by:
getPanId in interface IRadioPolicyManager
Returns:
current pan ID

setChannelNumber

public void setChannelNumber(int channel)
Description copied from interface: IRadioPolicyManager
Set the current channel number (between 11 and 26).

Specified by:
setChannelNumber in interface IRadioPolicyManager
Parameters:
channel - - the new channel number

setOutputPower

public void setOutputPower(int power)
Description copied from interface: IRadioPolicyManager
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.

Specified by:
setOutputPower in interface IRadioPolicyManager
Parameters:
power - - new power setting in decibels.

setPanId

public void setPanId(short pid)
Description copied from interface: IRadioPolicyManager
Set the pan ID (should not be -1 or -2, which are reserved in the I802.15.4 standard).

Specified by:
setPanId in interface IRadioPolicyManager
Parameters:
pid - - the new pan ID

closeBaseStation

public void closeBaseStation()
Description copied from interface: IRadioPolicyManager
Used in the host to close down the base station - a no-op if called on a Spot

Specified by:
closeBaseStation in interface IRadioPolicyManager

SunSPOT API V3.0


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