|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sentilla.platform.tmote.Action
com.sentilla.platform.tmote.ByteSender
public class ByteSender
Tmote implementation of ByteSender.
Field Summary | |
---|---|
boolean |
ack
|
static long |
AM_BROADCAST_ADDR
|
short |
amtype
|
long |
destAddress
|
byte |
devInterface
|
int |
timestamp
|
Fields inherited from class com.sentilla.platform.tmote.Action |
---|
actionAuto, actionId, actionState, isolateOwner |
Fields inherited from interface com.sentilla.system.Action |
---|
DONE, ERROR, IDLE, PENDING |
Constructor Summary | |
---|---|
ByteSender(int amtype)
|
Method Summary | |
---|---|
long |
getDestAddress()
Get the long destination address previously set with setDestAddress . |
int |
getPort()
Returns the currently set port. |
long |
getTimestamp()
Returns the message timestamp. |
void |
send(byte[] buf,
int offset,
int length)
Transmits length bytes from a byte array, starting at offset. |
void |
send(com.sentilla.io.ByteBuffer buf)
Transmits a ByteBuffer. |
ByteSender |
setDestAddress(long addr)
Sets the 64-bit Mac destination address. |
ByteSender |
setPort(int port)
Sets the port for message transmissions. |
ByteSender |
setSend(byte[] buf,
int offset,
int length)
Set the byte array containing the data to transmit. |
ByteSender |
setSend(com.sentilla.io.ByteBuffer buf)
Set the ByteBuffer containing data to be transmitted. |
Methods inherited from class com.sentilla.platform.tmote.Action |
---|
block, block, cancel, getActionState, initAction, isDone, lookup, submit |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface com.sentilla.system.Action |
---|
block, block, cancel, getActionState, isDone, submit |
Field Detail |
---|
public static final long AM_BROADCAST_ADDR
public short amtype
public int timestamp
public long destAddress
public byte devInterface
public boolean ack
Constructor Detail |
---|
public ByteSender(int amtype)
Method Detail |
---|
public void send(com.sentilla.io.ByteBuffer buf)
ByteSender
send
in interface ByteSender
buf
- the ByteBuffer to sendpublic void send(byte[] buf, int offset, int length)
ByteSender
length
bytes from a byte array, starting at offset.
send
in interface ByteSender
buf
- the byte array containing the data to transmitoffset
- the offset of the data in the byte arraylength
- the length in bytes of the data to transmitpublic ByteSender setSend(com.sentilla.io.ByteBuffer buf)
ByteSender
setSend
in interface ByteSender
buf
- the ByteBuffer containing the data to be transmitted
this
public ByteSender setSend(byte[] buf, int offset, int length)
ByteSender
setSend
in interface ByteSender
buf
- byte array containing the data to transmitoffset
- the offset of the data in the arraylength
- the length in bytes of data to transmit
this
public ByteSender setPort(int port)
ByteMessage
setPort
in interface ByteMessage
port
- the port bytes should be sent to
this
public int getPort()
ByteMessage
getPort
in interface ByteMessage
public ByteSender setDestAddress(long addr)
public long getDestAddress()
setDestAddress
.
public long getTimestamp()
ByteMessage
getTimestamp
in interface ByteMessage
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |