|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectlejos.rcxcomm.PacketHandler
lejos.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.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.rcxcomm.PacketHandler |
|---|
close, getError, open, reset, setListen |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait |
| Constructor Detail |
|---|
public LLCHandler(SensorPort port)
| Method Detail |
|---|
public boolean sendPacket(byte[] packet,
int len)
sendPacket in class PacketHandlerpacket - the bytes to sendlen - the number of bytes to send
public int receivePacket(byte[] buffer)
receivePacket in class PacketHandlerbuffer - the buffer to receive the packet into
public int receiveAck(byte[] buffer)
receiveAck in class PacketHandlerbuffer - the buffer to receive the ack into
public boolean isPacketAvailable()
isPacketAvailable in class PacketHandlerpublic boolean isAckAvailable()
isAckAvailable in class PacketHandler
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||