|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--cse466.packets.CSE466Packet | +--cse466.packets.CommandPacket
Field Summary | |
int |
currentTime
|
int |
endAddr
|
int |
LED
|
int |
node0
|
int |
playtime
|
int |
song
|
int |
startAddr
|
Fields inherited from class cse466.packets.CSE466Packet |
amType, destination, groupId |
Constructor Summary | |
CommandPacket()
|
Method Summary | |
boolean |
equals(cse466.packets.CommandPacket other)
|
byte[] |
getByteArray()
Gives you the byte array corresponding to this packet for sending over the network. |
protected byte[] |
getByteArray(byte[] childByteArray)
Gives you the byte array that corresponds to this packet. |
int |
getProperAMType()
Returns the proper AMType for this packet, or -1 if the packet doesn't have a proper amType. |
void |
print()
Pretty print the contents of this packet to System.out |
byte[] |
setFromBytes(byte[] fromArray)
Sets the fields in this packet from the byte array given. |
Methods inherited from class cse466.packets.CSE466Packet |
bytesToInt, bytesToInt32, byteToInt, copyIntoArray, equals, intToByte, intToLSB, intToLSBHigh, intToMSB, intToMSBHigh, subArray |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public int node0
public int currentTime
public int startAddr
public int endAddr
public int LED
public int song
public int playtime
Constructor Detail |
public CommandPacket()
Method Detail |
public int getProperAMType()
CSE466Packet
getProperAMType
in class CSE466Packet
public byte[] setFromBytes(byte[] fromArray)
CSE466Packet
setFromBytes
in class CSE466Packet
protected byte[] getByteArray(byte[] childByteArray)
CSE466Packet
getByteArray
in class CSE466Packet
childByteArray
- the payload. This will be put on the end of the
array
public byte[] getByteArray()
CSE466Packet
getByteArray
in class CSE466Packet
public void print()
CSE466Packet
print
in class CSE466Packet
public boolean equals(cse466.packets.CommandPacket other)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |