|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sentilla.system.DriverAdapter
com.sentilla.platform.cmote.Protocol
com.sentilla.platform.cmote.CollectionProtocol
public class CollectionProtocol
Collection protocol for receiving multi-hop messages from a mote network.
This is the client application version of the collection protocol. Client applications will use this to receive messages from the mote network.
This protocol requires the presence of a host server to operate. The host server will send messages periodically, allowing the motes to build routes back to that server. These routes will then be used to send messages to the server. Note that only one host server is permitted to exist in a network. If two or more host servers are present, unpredictable routing behavior will result.
The time to receive a message from a mote will vary with the number of hops in the network. It can take up to 60 seconds per hop for a message to be successfully transmitted. Care should be taken to account for this delay when developing mote applications. In addition, the when using the CollectionProtocol, the Sender.send command can take up to 60 seconds to return. This command block until a transmission is succesful, which will include all retries and backoffs. Note that if a route is not available, this command will block indefinitely until a route is available.
The maximum payload size availabe when using the collection protocol is 58 bytes. The default number of message retries is 9, the default neighbor timeout is 5 mins, the default backoff interval is 2s, and the default ACK timeout is 1.6s.
The only valid address for the collection protocol is the BroadcastAddress.
Protocol
,
BroadcastAddress
,
Mac64Address
Field Summary | |
---|---|
protected Queue<CollectionProtocol.CollectionProtocolDataMessage> |
queue
|
static int |
QUEUE_SIZE
|
Fields inherited from class com.sentilla.system.DriverAdapter |
---|
m_nextDriver |
Constructor Summary | |
---|---|
CollectionProtocol()
|
Method Summary | |
---|---|
boolean |
doesInstanceMatch(Object obj)
Returns true if the input object should be processed by the CollectionProtocol. |
String |
getDriverName(int n)
Returns the string "collect". |
Receiver |
newReceiver()
Returns a new receiver for the CollectionProtocol. |
Sender |
newSender()
Not supported. |
void |
stackReceive(Receiver rcvr)
Receive a message with the collection protocol. |
void |
stackSend(Sender s)
Not supported. |
Methods inherited from class com.sentilla.system.DriverAdapter |
---|
getNextDriver, setNextDriver |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int QUEUE_SIZE
protected Queue<CollectionProtocol.CollectionProtocolDataMessage> queue
Constructor Detail |
---|
public CollectionProtocol()
Method Detail |
---|
public boolean doesInstanceMatch(Object obj)
doesInstanceMatch
in class Protocol
obj
- received object
Protocol
public Receiver newReceiver()
newReceiver
in class Protocol
Receiver
public Sender newSender()
newSender
in class Protocol
Sender
public void stackReceive(Receiver rcvr)
stackReceive
in class Protocol
rcvr
- Receiver object containing received objectProtocol
,
Receiver
public void stackSend(Sender s)
stackSend
in class Protocol
s
- Sender object containing the object to be sent.Dispatcher
,
Sender
public String getDriverName(int n)
getDriverName
in interface Driver
getDriverName
in class DriverAdapter
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |