|
SunSPOT API V3.0 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.sun.spot.peripheral.radio.RadioProtocolManager
public abstract class RadioProtocolManager
Field Summary |
---|
Fields inherited from interface com.sun.spot.peripheral.radio.IRadioProtocolManager |
---|
FIRST_USER_PORT, INPUT, OUTPUT, PORT_OFFSET |
Method Summary | |
---|---|
protected ConnectionID |
addConnection(boolean canReceive,
ConnectionID cid)
|
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 cidToClose)
Deregister a handler. |
protected com.sun.spot.peripheral.radio.ConnectionState |
getConnectionState(long macAddress,
int connectionType,
byte portNumber)
|
protected abstract String |
getName()
|
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. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface com.sun.spot.peripheral.radio.IRadioProtocolManager |
---|
send |
Method Detail |
---|
public IncomingData receivePacket(ConnectionID cid)
IRadioProtocolManager
receivePacket
in interface IRadioProtocolManager
cid
- the ConnectionID over which to receive data
public IncomingData receivePacket(ConnectionID cid, long timeout)
IRadioProtocolManager
receivePacket
in interface IRadioProtocolManager
cid
- the ConnectionID over which to receive datatimeout
- the maximum time to block in milliseconds
public boolean packetsAvailable(ConnectionID connectionID)
IRadioProtocolManager
packetsAvailable
in interface IRadioProtocolManager
public void closeConnection(ConnectionID cidToClose)
IRadioProtocolManager
closeConnection
in interface IRadioProtocolManager
cidToClose
- - the ConnectionID to deregisterpublic ConnectionID addOutputConnection(long macAddress, byte portNo)
IRadioProtocolManager
addOutputConnection
in interface IRadioProtocolManager
macAddress
- - address of the other deviceportNo
- - port number to communicate over
protected ConnectionID addConnection(boolean canReceive, ConnectionID cid)
protected com.sun.spot.peripheral.radio.ConnectionState getConnectionState(long macAddress, int connectionType, byte portNumber)
protected abstract String getName()
public ConnectionID addInputConnection(long macAddress, byte portNo)
IRadioProtocolManager
addInputConnection
in interface IRadioProtocolManager
macAddress
- - address of the other deviceportNo
- - port number to communicate over
|
SunSPOT API V3.0 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |