|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ByteReceiver
Receives a message from the radio into a byte buffer. Its action verb
is receive
.
receive
receives bytes into a ByteBuffer or a byte array starting at a
specific offset.
getLength
returns the number of bytes in the original message.
getRssi
returns signal strength on
the received message.
getLqi
returns quality information on
the received message.
Field Summary | |
---|---|
static int |
ANY_ADDR
|
static int |
ANY_PORT
|
Fields inherited from interface com.sentilla.system.Action |
---|
DONE, ERROR, IDLE, PENDING |
Method Summary | |
---|---|
int |
getLength()
Returns the number of bytes in the original message. |
int |
getLqi()
Returns the Link Quality Indicator (LQI) of the received message. |
int |
getRssi()
Returns the Received Signal Strength Indicator (RSSI) of the received message. |
void |
receive(byte[] buf,
int offset)
Receive data into a byte array, starting at offset. |
void |
receive(com.sentilla.io.ByteBuffer buf)
Receive data into a ByteBuffer . |
ByteReceiver |
setReceive(byte[] buf,
int offset)
Set the byte array to receive data into, but do not submit to the kernel. |
ByteReceiver |
setReceive(com.sentilla.io.ByteBuffer buf)
Set the ByteBuffer to receive data into, but do not submit to the kernel. |
Methods inherited from interface com.sentilla.net.ByteMessage |
---|
getPort, getTimestamp, setPort |
Methods inherited from interface com.sentilla.system.Action |
---|
block, block, cancel, getActionState, isDone, submit |
Field Detail |
---|
static final int ANY_PORT
static final int ANY_ADDR
Method Detail |
---|
void receive(com.sentilla.io.ByteBuffer buf)
ByteBuffer
.
buf
- ByteBuffer to receive data intovoid receive(byte[] buf, int offset)
buf
- byte array to receive data intooffset
- offset in the byte array to begin placing received dataByteReceiver setReceive(com.sentilla.io.ByteBuffer buf)
buf
- ByteBuffer to receive data into
this
ByteReceiver setReceive(byte[] buf, int offset)
buf
- the byte array to receive data intooffset
- the offset in the array to begin writing the data
this
int getLength()
int getRssi()
int getLqi()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |