|
Sun SPOT API |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.sun.spot.peripheral.radio.proxy.ProxyPBPM
public class ProxyPBPM
| Field Summary | |
|---|---|
static String |
RADIO_SERVER
|
| Fields inherited from interface com.sun.spot.peripheral.radio.IPortBasedProtocolManager |
|---|
BROADCAST, CTRL_OFFSET, DATA_OFFSET, INPUT, OUTPUT, PORT_OFFSET, SEQ_OFFSET, SERVER |
| Constructor Summary | |
|---|---|
ProxyPBPM(byte protocolNum,
String name)
|
|
| Method Summary | |
|---|---|
ConnectionID |
addBroadcastConnection(byte portNo)
Register a broadcast connection |
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 |
ConnectionID |
addServerConnection(byte portNo)
Register a server connection |
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. |
RadioPacket |
receivePacket(ConnectionID cid)
Receive a radio packet over a Connection ID. |
RadioPacket |
receivePacket(ConnectionID cid,
long timeout)
Receive a radio packet over a Connection ID. |
void |
sendPacket(ConnectionID cid,
RadioPacket rp)
Send a radio packet using a ConnectionID. |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String RADIO_SERVER
| Constructor Detail |
|---|
public ProxyPBPM(byte protocolNum,
String name)
| Method Detail |
|---|
public void closeConnection(ConnectionID cid)
IPortBasedProtocolManager
closeConnection in interface IPortBasedProtocolManagercid - - the ConnectionID to deregisterpublic ConnectionID addServerConnection(byte portNo)
IPortBasedProtocolManager
addServerConnection in interface IPortBasedProtocolManagerportNo - - port number to communicate over
public ConnectionID addBroadcastConnection(byte portNo)
IPortBasedProtocolManager
addBroadcastConnection in interface IPortBasedProtocolManagerportNo - - port number to communicate over
public ConnectionID addOutputConnection(long macAddress,
byte portNo)
IPortBasedProtocolManager
addOutputConnection in interface IPortBasedProtocolManagermacAddress - - address of the other deviceportNo - - port number to communicate over
public ConnectionID addInputConnection(long macAddress,
byte portNo)
IPortBasedProtocolManager
addInputConnection in interface IPortBasedProtocolManagermacAddress - - address of the other deviceportNo - - port number to communicate over
public void sendPacket(ConnectionID cid,
RadioPacket rp)
throws NoAckException,
ChannelBusyException
IPortBasedProtocolManager
sendPacket in interface IPortBasedProtocolManagercid - -- the ConnectionID to send the packet over.rp - -- the RadioPacket to send.
NoAckException
ChannelBusyExceptionpublic RadioPacket receivePacket(ConnectionID cid)
IPortBasedProtocolManager
receivePacket in interface IPortBasedProtocolManagercid - the ConnectionID over which to receive a packet
public RadioPacket receivePacket(ConnectionID cid,
long timeout)
IPortBasedProtocolManager
receivePacket in interface IPortBasedProtocolManagercid - the ConnectionID over which to receive a packettimeout - the maximum time to block in milliseconds
public boolean packetsAvailable(ConnectionID connectionID)
IPortBasedProtocolManager
packetsAvailable in interface IPortBasedProtocolManager
|
Sun SPOT API |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||