|
SunSPOT API V4.0 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.sun.spot.peripheral.radio.proxy.ProxyRadioProtocolManager
public class ProxyRadioProtocolManager
| Field Summary | |
|---|---|
protected RequestSender |
requestSender
|
| Fields inherited from interface com.sun.spot.peripheral.radio.IRadioProtocolManager |
|---|
FIRST_USER_PORT, INPUT, OUTPUT, PORT_OFFSET |
| Constructor Summary | |
|---|---|
protected |
ProxyRadioProtocolManager(byte protocolNum,
String name,
String channelIdentifier)
|
| Method Summary | |
|---|---|
ConnectionID |
addInputConnection(long macAddress,
byte portNo)
Register a point-to-point connection on which packets can be received |
ConnectionID |
addOutputConnection(long macAddress,
byte portNo)
Register a point-to-point connection on which packets can be sent |
void |
closeConnection(ConnectionID cid)
Deregister a handler. |
boolean |
packetsAvailable(ConnectionID connectionID)
Answer whether one or more radio packets have been received and are queued for the given ConnectionID. |
IncomingData |
receivePacket(ConnectionID cid)
Receive incoming data over a Connection ID. |
IncomingData |
receivePacket(ConnectionID cid,
long timeout)
Receive incoming data over a Connection ID. |
long |
send(ConnectionID cid,
long toAddress,
byte[] payload,
int length)
Send a byte array using a ConnectionID. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected RequestSender requestSender
| Constructor Detail |
|---|
protected ProxyRadioProtocolManager(byte protocolNum,
String name,
String channelIdentifier)
| Method Detail |
|---|
public void closeConnection(ConnectionID cid)
IRadioProtocolManager
closeConnection in interface IRadioProtocolManagercid - - the ConnectionID to deregister
public ConnectionID addOutputConnection(long macAddress,
byte portNo)
IRadioProtocolManager
addOutputConnection in interface IRadioProtocolManagermacAddress - - address of the other deviceportNo - - port number to communicate over
public ConnectionID addInputConnection(long macAddress,
byte portNo)
IRadioProtocolManager
addInputConnection in interface IRadioProtocolManagermacAddress - - address of the other deviceportNo - - port number to communicate over
public long send(ConnectionID cid,
long toAddress,
byte[] payload,
int length)
throws NoAckException,
ChannelBusyException,
NoRouteException
IRadioProtocolManager
send in interface IRadioProtocolManagercid - the ConnectionID to send the packet over.payload - the datalength - number of bytes to send, starting with index 0
NoAckException
ChannelBusyException
NoRouteExceptionpublic IncomingData receivePacket(ConnectionID cid)
IRadioProtocolManager
receivePacket in interface IRadioProtocolManagercid - the ConnectionID over which to receive data
public IncomingData receivePacket(ConnectionID cid,
long timeout)
IRadioProtocolManager
receivePacket in interface IRadioProtocolManagercid - the ConnectionID over which to receive datatimeout - the maximum time to block in milliseconds
public boolean packetsAvailable(ConnectionID connectionID)
IRadioProtocolManager
packetsAvailable in interface IRadioProtocolManager
|
SunSPOT API V4.0 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||