com.sentilla.platform.cmote
Class CollectionProtocol

java.lang.Object
  extended by com.sentilla.system.DriverAdapter
      extended by com.sentilla.platform.cmote.Protocol
          extended by com.sentilla.platform.cmote.CollectionProtocol
All Implemented Interfaces:
Driver

public class CollectionProtocol
extends Protocol

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.

See Also:
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

QUEUE_SIZE

public static final int QUEUE_SIZE
See Also:
Constant Field Values

queue

protected Queue<CollectionProtocol.CollectionProtocolDataMessage> queue
Constructor Detail

CollectionProtocol

public CollectionProtocol()
Method Detail

doesInstanceMatch

public boolean doesInstanceMatch(Object obj)
Returns true if the input object should be processed by the CollectionProtocol.

Specified by:
doesInstanceMatch in class Protocol
Parameters:
obj - received object
Returns:
true if this receiver is receiving for the same class as obj.
See Also:
Protocol

newReceiver

public Receiver newReceiver()
Returns a new receiver for the CollectionProtocol.

Specified by:
newReceiver in class Protocol
Returns:
the receiver for this protocol.
See Also:
Receiver

newSender

public Sender newSender()
Not supported.

Specified by:
newSender in class Protocol
Returns:
the sender for this protocol
See Also:
Sender

stackReceive

public void stackReceive(Receiver rcvr)
Receive a message with the collection protocol. This method should only be called by the Dispatcher. It will process an incoming CollectionProtocol message and dispatch the data to user applications.

Specified by:
stackReceive in class Protocol
Parameters:
rcvr - Receiver object containing received object
See Also:
Protocol, Receiver

stackSend

public void stackSend(Sender s)
Not supported. Required by Protocol, not implemented.

Specified by:
stackSend in class Protocol
Parameters:
s - Sender object containing the object to be sent.
See Also:
Dispatcher, Sender

getDriverName

public String getDriverName(int n)
Returns the string "collect".

Specified by:
getDriverName in interface Driver
Specified by:
getDriverName in class DriverAdapter


Copyright © 2007 Sentilla Corporation. All Rights Reserved.