com.sentilla.platform.tmote
Class LoopBackProtocol

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

public class LoopBackProtocol
extends Protocol

Provides Loopback protocol for sending messages to self or other applications running on the mote.

See Also:
Protocol

Nested Class Summary
static class LoopBackProtocol.LoopBackReceiver
          Provides the receiver implementation for the loop back protocol.
static class LoopBackProtocol.LoopBackSender
          Provides the sender implementation for the loop back protocol.
 
Field Summary
 
Fields inherited from class com.sentilla.system.DriverAdapter
m_nextDriver
 
Constructor Summary
LoopBackProtocol()
          Provides instantiation of the LoopBackProtocol.
 
Method Summary
 boolean doesInstanceMatch(Object obj)
          Provided for compatability with Protocol.
 String getDriverName(int n)
          Returns "loopback".
 Receiver newReceiver()
          Creates a new LoopBackProtocol receiver.
 Sender newSender()
          Creates a new LoopBackProtocol sender.
 void stackReceive(Receiver rcvr)
          Do not use.
 void stackSend(Sender sender)
          Sends a message to user applications.
 
Methods inherited from class com.sentilla.system.DriverAdapter
getNextDriver, setNextDriver
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LoopBackProtocol

public LoopBackProtocol()
Provides instantiation of the LoopBackProtocol.

Method Detail

stackReceive

public void stackReceive(Receiver rcvr)
Do not use. Provided for compatability with Protocol and should never by called.

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

stackSend

public void stackSend(Sender sender)
Sends a message to user applications. Copies a message into a Receiver object and sends it to the user applications. Allows multiple aplications to share data.

Specified by:
stackSend in class Protocol
Parameters:
sender - Sender object containing the object to send
See Also:
Dispatcher

newSender

public Sender newSender()
Creates a new LoopBackProtocol sender.

Specified by:
newSender in class Protocol
Returns:
an new instance of LoopBackSender
See Also:
LoopBackProtocol.LoopBackSender

newReceiver

public Receiver newReceiver()
Creates a new LoopBackProtocol receiver.

Specified by:
newReceiver in class Protocol
Returns:
a new instance of LoopBackReceiver
See Also:
Receiver

doesInstanceMatch

public boolean doesInstanceMatch(Object obj)
Provided for compatability with Protocol. Returns false.

Specified by:
doesInstanceMatch in class Protocol
Parameters:
obj - object to evaluate
Returns:
false.

getDriverName

public String getDriverName(int n)
Returns "loopback".

Specified by:
getDriverName in interface Driver
Specified by:
getDriverName in class DriverAdapter
Parameters:
n - index of the LoopBackProtocol string name
Returns:
"loopback"
See Also:
Driver, Drivers


Copyright © 2007 Sentilla Corporation. All Rights Reserved.