josx.rcxcomm
Class F7Handler
java.lang.Object
josx.rcxcomm.PacketHandler
josx.rcxcomm.F7Handler
public class F7Handler
- extends PacketHandler
Packet handler that uses the Lego Firmware F7
(set Message) opcodes.
F7Handler
public F7Handler()
sendPacket
public boolean sendPacket(byte[] packet,
int len)
- Send a packet.
- Specified by:
sendPacket in class PacketHandler
- Parameters:
packet - the bytes to sendlen - the number of bytes to send
- Returns:
- true if the send was successful, else false
receivePacket
public int receivePacket(byte[] buffer)
- Receive a packet.
- Specified by:
receivePacket in class PacketHandler
- Parameters:
buffer - the buffer to receive the packet into
- Returns:
- the number of bytes received
isPacketAvailable
public boolean isPacketAvailable()
- Check if a packet is available
- Specified by:
isPacketAvailable in class PacketHandler
- Returns:
- true if a Packet is available, else false