|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sentilla.platform.cmote.DispatcherAction
com.sentilla.platform.cmote.Sender
public abstract class Sender
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.
DispatcherAction
,
Dispatcher
,
SenderDriver
,
Protocol
Field Summary | |
---|---|
Addressable |
address
This field is NOT automatically nulled when this object is done sending. |
Object |
data
Sender.setDone automatically nulls out this field when this object is done sending. |
protected Sender |
nextData
Dispatcher.sendServiceQueue automatically nulls out this field when this object is done sending. |
protected Protocol |
protocol
This field is NOT automatically nulled when this object is done sending. |
Fields inherited from class com.sentilla.platform.cmote.DispatcherAction |
---|
actionState |
Fields inherited from interface com.sentilla.system.Action |
---|
DONE, ERROR, IDLE, PENDING |
Constructor Summary | |
---|---|
Sender()
Creates a Sender object. |
Method Summary | |
---|---|
void |
send(Object obj)
Sends the input object. |
abstract void |
setAddress(Addressable addr)
Sets the destination address. |
void |
setDone(byte a)
Sets actionState to input byte value and notifies all waiting threads. |
Sender |
setSend(Object obj)
Sets the object to send. |
protected boolean |
subsubmit()
Queues this for transmission by the Dispatcher. |
Methods inherited from class com.sentilla.platform.cmote.DispatcherAction |
---|
block, block, cancel, getActionState, isDone, subcancel, submit |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface com.sentilla.system.Action |
---|
block, block, cancel, getActionState, isDone, submit |
Field Detail |
---|
protected Sender nextData
protected Protocol protocol
public Addressable address
public Object data
Constructor Detail |
---|
public Sender()
DispatcherAction
Method Detail |
---|
public void send(Object obj)
send
. Blocks
program execution until the send operation has
completed.
send
in interface Sender
obj
- object to sendpublic Sender setSend(Object obj)
send
. The application sets
the object to send, then performs a submit()
and
block(timeout)
on the sender object.
setSend
in interface Sender
obj
- object to send
public abstract void setAddress(Addressable addr)
setAddress
in interface Sender
addr
- object implementing Addressable interface to be used as address
UnsupportedAddressException
Addressable
public void setDone(byte a)
setDone( byte a )
to specify that the send is done transmitting.
The input byte a should be Action.DONE or Action.ERROR. All other values are invalid.
protected boolean subsubmit()
this
for transmission by the Dispatcher.
Returns true if send request is accepted by the Dispatcher;
should never be called by a user application.
subsubmit
in class DispatcherAction
DispatcherAction
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |