|
SunSPOT API V5.0 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.sun.spot.service.BasicService com.sun.spot.peripheral.radio.RadioPacketDispatcher
public class RadioPacketDispatcher
Implements IRadioPacketDispatcher
for the Spot environment.
Field Summary |
---|
Fields inherited from interface com.sun.spot.service.IService |
---|
PAUSED, PAUSING, READY, RESUMING, RUNNING, STARTING, STOPPED, STOPPING |
Method Summary | |
---|---|
void |
addPacketQualityListener(IPacketQualityListener packetListener)
Register to be notified with Link Quality information. |
void |
deregisterPacketQualityListener(IPacketQualityListener listener)
Undo a previous call of registerPacketListener() |
static IRadioPacketDispatcher |
getInstance()
Return the singleton instance of RadioPacketDispatcher. |
String |
getServiceName()
Return the name of this service. |
void |
initialize(ILowPan lowPanLayer)
Called by LowPan to initialize the dispatcher. |
void |
registerPacketQualityListener(IPacketQualityListener packetListener)
Register to be notified with Link Quality information. |
void |
removePacketQualityListener(IPacketQualityListener listener)
Undo a previous call of registerPacketListener() |
void |
sendBroadcast(RadioPacket rp)
Broadcast a packet. |
void |
sendPacket(RadioPacket rp)
Send a packet. |
Methods inherited from class com.sun.spot.service.BasicService |
---|
getEnabled, getStatus, isRunning, pause, resume, setEnabled, setServiceName, start, stop |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static IRadioPacketDispatcher getInstance()
public String getServiceName()
IService
getServiceName
in interface IService
getServiceName
in class BasicService
public void registerPacketQualityListener(IPacketQualityListener packetListener)
registerPacketQualityListener
in interface IRadioPacketDispatcher
packetListener
- the class that wants to be called backpublic void deregisterPacketQualityListener(IPacketQualityListener listener)
deregisterPacketQualityListener
in interface IRadioPacketDispatcher
listener
- the class that wants to be deregisteredpublic void addPacketQualityListener(IPacketQualityListener packetListener)
addPacketQualityListener
in interface IRadioPacketDispatcher
packetListener
- the class that wants to be called backpublic void removePacketQualityListener(IPacketQualityListener listener)
removePacketQualityListener
in interface IRadioPacketDispatcher
listener
- the class that wants to be deregisteredpublic void sendBroadcast(RadioPacket rp) throws NoAckException, ChannelBusyException
rp
-
NoAckException
ChannelBusyException
public void sendPacket(RadioPacket rp) throws NoAckException, ChannelBusyException
sendPacket
in interface IRadioPacketDispatcher
rp
-
NoAckException
ChannelBusyException
public void initialize(ILowPan lowPanLayer)
initialize
in interface IRadioPacketDispatcher
lowPanLayer
- reference to the fully started LowPan instance
|
SunSPOT API V5.0 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |