rcxport
Class RCXPacket
java.lang.Object
|
+--rcxport.RCXPacket
- class RCXPacket
- extends Object
- implements Serializable
Packet for communication with RCX. This class encodes a byte array
provided upon construction as an RCX packet according to the
RCX Internals web page.
- Author:
- Scott B. Lewis, slewis@teleport.com
- See Also:
- Serialized Form
|
Constructor Summary |
protected |
RCXPacket(byte[] data)
Constructor. |
| Methods inherited from class java.lang.Object |
,
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
PACKETHEADER1
public static final byte PACKETHEADER1
PACKETHEADER2
public static final byte PACKETHEADER2
PACKETHEADER3
public static final byte PACKETHEADER3
myData
protected byte[] myData
mySendData
protected byte[] mySendData
RCXPacket
protected RCXPacket(byte[] data)
- Constructor. Data provided should be a byte array of length >= 1.
writePacket
protected void writePacket(OutputStream os)
throws IOException
- Writes this packet to the given output stream.
- Parameters:
os - the OutputStream to write to- Throws:
- IOException - thrown if there is no data to write, or the write fails for
some reason
toString
public String toString()
- Overrides:
- toString in class Object