com.sentilla.net
Interface Sender

All Superinterfaces:
Action
All Known Implementing Classes:
ByteSender, ClientRadioProtocol.Sender, MimeoDisseminationProtocol.MimeoSender, Sender

public interface Sender
extends Action

Provides interfaces for sending objects with the radio and the UART.

This class is the primary method for sending messages and objects. It provides a unified interface for sending messages with any protocol, provided that protocol exists on the runtime platform. Blocking and non-blocking versions of the send command are provided. The protocol metadata is also accessible by directly modifying the class values.

see com.sentilla.platform.[tmote|cmote].DispatcherAction see com.sentilla.platform.[tmote|cmote].Dispatcher see com.sentilla.platform.[tmote|cmote].Protocol

See Also:
SenderDriver

Field Summary
 
Fields inherited from interface com.sentilla.system.Action
DONE, ERROR, IDLE, PENDING
 
Method Summary
 void send(Object obj)
          Sends the input object.
 void setAddress(Addressable addr)
          Sets the destination address.
 Sender setSend(Object obj)
          Sets the object to send.
 
Methods inherited from interface com.sentilla.system.Action
block, block, cancel, getActionState, isDone, submit
 

Method Detail

send

void send(Object obj)
Sends the input object. Blocking version of send. Blocks program execution until the send operation has completed.

Parameters:
obj - object to send

setSend

Sender setSend(Object obj)
Sets the object to send. Advanced form of send. The application sets the object to send, then performs a submit() and block(timeout) on the sender object.

Parameters:
obj - object to send
Returns:
Sender object

setAddress

void setAddress(Addressable addr)
Sets the destination address. Any valid object implementing the Addressable interface can be set as the destination address. The protocols extending this class should throw an error if the address object is not supported.

Parameters:
addr - object implementing Addressable interface to be used as address
Throws:
UnsupportedAddressException
See Also:
Addressable


Copyright © 2007 Sentilla Corporation. All Rights Reserved.