public class Packet
extends java.lang.Object
| Constructor and Description |
|---|
Packet(byte destAddress,
Message message)
Constructor for RPi to BrickPi
|
Packet(Message message)
Constructor for BrickPi to RPi
|
| Modifier and Type | Method and Description |
|---|---|
byte |
getBytesCount()
Get the number of bytes of the packet
|
byte |
getChecksum()
Get the computed checksum of the packet
|
byte |
getDestAddress()
Get the destination address
|
Message |
getMessage()
Get the message of the packet
|
byte[] |
toBytes()
Get the byte representation of the packet
|
public Packet(Message message)
message - the message received from brick pipublic Packet(byte destAddress,
Message message)
destAddress - the destination address on the brick pimessage - the message to sendpublic byte getDestAddress()
public Message getMessage()
public byte getBytesCount()
public byte getChecksum()
public byte[] toBytes()