com.sun.spot.peripheral.radio
Class RadiostreamProtocolManager
java.lang.Object
com.sun.spot.peripheral.radio.RadioProtocolManager
com.sun.spot.peripheral.radio.RadiostreamProtocolManager
- All Implemented Interfaces:
- IProtocolManager, IRadioProtocolManager, IRadiostreamProtocolManager
public class RadiostreamProtocolManager
- extends RadioProtocolManager
- implements IProtocolManager, IRadiostreamProtocolManager
PROTOCOL_NUMBER
public static final byte PROTOCOL_NUMBER
- See Also:
- Constant Field Values
PROTOCOL_NAME
public static final String PROTOCOL_NAME
- See Also:
- Constant Field Values
RadiostreamProtocolManager
public RadiostreamProtocolManager()
- Construct an instance to manage the given protocol number.
main
public static void main(String[] args)
getInstance
public static IRadiostreamProtocolManager getInstance()
send
public long send(ConnectionID cid,
long toAddress,
byte[] payload,
int length)
throws NoAckException,
ChannelBusyException,
NoRouteException,
NoMeshLayerAckException
- Description copied from interface:
IRadioProtocolManager
- Send a byte array using a ConnectionID. The client code should leave
IPortBasedProtocolManager.DATA_OFFSET bytes free at the front of their
payload as these will be overwritten.
- Specified by:
send
in interface IRadioProtocolManager
- Parameters:
cid
- the ConnectionID to send the packet over.payload
- the datalength
- number of bytes to send, starting with index 0
- Returns:
- the time at which the data was sent
- Throws:
NoAckException
ChannelBusyException
NoRouteException
NoMeshLayerAckException
waitForAllAcks
public void waitForAllAcks(ConnectionID outConnectionId)
throws NoAckException,
ChannelBusyException,
NoMeshLayerAckException,
NoRouteException
- Specified by:
waitForAllAcks
in interface IRadiostreamProtocolManager
- Throws:
NoAckException
ChannelBusyException
NoMeshLayerAckException
NoRouteException
processIncomingData
public void processIncomingData(byte[] payload,
LowPanHeaderInfo headerInfo)
- Description copied from interface:
IProtocolManager
- Called whenever data is received that is addressed to this
IProtocolManager
.
IProtocolManagers should do as little processing as possible inside
this method, to avoid blocking other INewProtocolManagers from receiving
their packets. Typically an IProtocolManager will queue received
packets for later dispatch to applications.
- Specified by:
processIncomingData
in interface IProtocolManager
getName
public String getName()
- Specified by:
getName
in class RadioProtocolManager
Copyright © 2006, 2007 Sun Microsystems, Inc. All Rights Reserved.