cse466.packets
Class SangSongPacket

java.lang.Object
  |
  +--cse466.packets.CSE466Packet
        |
        +--cse466.packets.SangSongPacket

public class SangSongPacket
extends CSE466Packet


Field Summary
 int currentTime
           
 int maxPointSongNum
           
 int maxPointValue
           
 int minPointSongNum
           
 int minPointValue
           
 int runnerUpSongNum
           
 int runnerUpValue
           
 int sequenceNum
           
 int songNum
           
 int songPointValue
           
 int transmittingNodeNum
           
 
Fields inherited from class cse466.packets.CSE466Packet
amType, destination, groupId
 
Constructor Summary
SangSongPacket()
           
 
Method Summary
 boolean equals(cse466.packets.SangSongPacket 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

transmittingNodeNum

public int transmittingNodeNum

currentTime

public int currentTime

sequenceNum

public int sequenceNum

songNum

public int songNum

songPointValue

public int songPointValue

maxPointSongNum

public int maxPointSongNum

maxPointValue

public int maxPointValue

runnerUpSongNum

public int runnerUpSongNum

runnerUpValue

public int runnerUpValue

minPointSongNum

public int minPointSongNum

minPointValue

public int minPointValue
Constructor Detail

SangSongPacket

public SangSongPacket()
Method Detail

getProperAMType

public int getProperAMType()
Description copied from class: CSE466Packet
Returns the proper AMType for this packet, or -1 if the packet doesn't have a proper amType.

Overrides:
getProperAMType in class CSE466Packet

setFromBytes

public byte[] setFromBytes(byte[] fromArray)
Description copied from class: CSE466Packet
Sets the fields in this packet from the byte array given. It assumes that this packet's fields are at the very front of the array. It then will return its payload.

Overrides:
setFromBytes in class CSE466Packet

getByteArray

protected byte[] getByteArray(byte[] childByteArray)
Description copied from class: CSE466Packet
Gives you the byte array that corresponds to this packet. The child packet is the payload of this packet. The returned array contains this packet including the payload

Overrides:
getByteArray in class CSE466Packet
Parameters:
childByteArray - the payload. This will be put on the end of the array
Returns:
an array representing this packet

getByteArray

public byte[] getByteArray()
Description copied from class: CSE466Packet
Gives you the byte array corresponding to this packet for sending over the network.

Overrides:
getByteArray in class CSE466Packet

print

public void print()
Description copied from class: CSE466Packet
Pretty print the contents of this packet to System.out

Overrides:
print in class CSE466Packet

equals

public boolean equals(cse466.packets.SangSongPacket other)