| 
 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectrcx.josx.rcxcomm.PacketHandler
rcx.josx.rcxcomm.LNPIntegrityHandler
public class LNPIntegrityHandler
Packet handler that implements simple checksums. The checksum is added at the end and is not part of the packet length
| Constructor Summary | |
|---|---|
| LNPIntegrityHandler(PacketHandler handler,
                    byte op)Create a packet handler for broadcast or addressing integrity packets | |
| Method Summary | |
|---|---|
|  boolean | isAddressing()Test if last packet is an adressing (or integrity) packet | 
|  boolean | isPacketAvailable()Check if a packet is available | 
|  int | receivePacket(byte[] buffer)Receive a packet. | 
|  boolean | sendPacket(byte[] packet,
           int len)Send a packet. | 
|  void | setOp(byte op)Set the opcode for the next write | 
| Methods inherited from class rcx.josx.rcxcomm.PacketHandler | 
|---|
| close, getError, isAckAvailable, open, receiveAck, reset, setListen | 
| Methods inherited from class java.lang.Object | 
|---|
| equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Constructor Detail | 
|---|
public LNPIntegrityHandler(PacketHandler handler,
                           byte op)
handler - the lower level LNP packet handlerop - the opcode to use for writes: 0xf0 for broadcasts, 0xf1 for addressing packets| Method Detail | 
|---|
public boolean isAddressing()
public void setOp(byte op)
op - oxf0 for a broadcast, oxf1 for an adressing write
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 boolean isPacketAvailable()
isPacketAvailable in class PacketHandler| 
 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||