|
SunSPOT API V2.0 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.sun.spot.peripheral.radio.RadioPolicyManager
public class RadioPolicyManager
| Field Summary |
|---|
| Fields inherited from interface com.sun.spot.peripheral.radio.IRadioPolicyManager |
|---|
DEFAULT_PAN_ID |
| Constructor Summary | |
|---|---|
RadioPolicyManager(I802_15_4_MAC macDevice,
int initialChannel,
short initialPanId,
int initialOutputPower)
|
|
| 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 |
isLoggingConnections()
|
boolean |
isRadioReceiverOn()
|
String |
name()
An identifying name for the driver (e.g. |
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 |
setLogConnections(boolean logConnections)
Select whether connection addition and removal is being logged |
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 |
void |
setUp()
Activate or reactivate the driver (after a deep sleep or when another driver refused to deep sleep). |
boolean |
tearDown()
Deactivate the driver (usually in preparation for deep sleep). |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public RadioPolicyManager(I802_15_4_MAC macDevice,
int initialChannel,
short initialPanId,
int initialOutputPower)
| Method Detail |
|---|
public void policyHasChanged(IConnectionID conn,
RadioPolicy selection)
IRadioPolicyManager
policyHasChanged in interface IRadioPolicyManagerconn - the connection owning the policy that has changedselection - the required radio statepublic void registerConnection(IConnectionID conn)
IRadioPolicyManager
registerConnection in interface IRadioPolicyManagerconn - the connection being registeredpublic void deregisterConnection(IConnectionID conn)
IRadioPolicyManager
deregisterConnection in interface IRadioPolicyManagerconn - the connection being deregisteredpublic boolean isRadioReceiverOn()
isRadioReceiverOn in interface IRadioPolicyManagerpublic boolean setRxOn(boolean rxState)
IRadioPolicyManager
setRxOn in interface IRadioPolicyManagerrxState - true for rx on, false for rx off
public String name()
IDriver
name in interface IDriverpublic boolean tearDown()
IDriver
tearDown in interface IDriverpublic void setUp()
IDriver
setUp in interface IDriverpublic int getChannelNumber()
IRadioPolicyManager
getChannelNumber in interface IRadioPolicyManagerpublic long getIEEEAddress()
getIEEEAddress in interface IRadioPolicyManagerpublic int getOutputPower()
IRadioPolicyManager
getOutputPower in interface IRadioPolicyManagerpublic short getPanId()
IRadioPolicyManager
getPanId in interface IRadioPolicyManagerpublic void setChannelNumber(int channel)
IRadioPolicyManager
setChannelNumber in interface IRadioPolicyManagerchannel - - the new channel numberpublic void setOutputPower(int power)
IRadioPolicyManager
setOutputPower in interface IRadioPolicyManagerpower - - new power setting in decibels.public void setPanId(short pid)
IRadioPolicyManager
setPanId in interface IRadioPolicyManagerpid - - the new pan IDpublic void closeBaseStation()
IRadioPolicyManager
closeBaseStation in interface IRadioPolicyManagerpublic boolean isLoggingConnections()
isLoggingConnections in interface IRadioPolicyManagerpublic void setLogConnections(boolean logConnections)
IRadioPolicyManager
setLogConnections in interface IRadioPolicyManagerlogConnections - true if connnections should be logged
|
SunSPOT API V2.0 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||