|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object lejos.nxt.rcxcomm.PacketHandler lejos.nxt.rcxcomm.LLCHandler
public class LLCHandler
Packet handler than implement the LLC packet protocol. Deals with packets and acks. Supports independent streams of data in both directions.
Field Summary |
---|
Fields inherited from class lejos.nxt.rcxcomm.PacketHandler |
---|
lowerHandler |
Constructor Summary | |
---|---|
LLCHandler(SensorPort port)
|
Method Summary | |
---|---|
boolean |
isAckAvailable()
Check if an Ack is available |
boolean |
isPacketAvailable()
Check if a packet is available |
int |
receiveAck(byte[] buffer)
Receive an ack. |
int |
receivePacket(byte[] buffer)
Receive a packet. |
boolean |
sendPacket(byte[] packet,
int len)
Send a packet. |
Methods inherited from class lejos.nxt.rcxcomm.PacketHandler |
---|
close, getError, open, reset, setListen |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public LLCHandler(SensorPort port)
Method Detail |
---|
public boolean sendPacket(byte[] packet, int len)
sendPacket
in class PacketHandler
packet
- the bytes to sendlen
- the number of bytes to send
public int receivePacket(byte[] buffer)
receivePacket
in class PacketHandler
buffer
- the buffer to receive the packet into
public int receiveAck(byte[] buffer)
receiveAck
in class PacketHandler
buffer
- the buffer to receive the ack into
public boolean isPacketAvailable()
isPacketAvailable
in class PacketHandler
public boolean isAckAvailable()
isAckAvailable
in class PacketHandler
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |