mirror of
https://github.com/michaelrausch/Party-Parrots-At-Sea.git
synced 2026-05-09 14:28:43 +00:00
Created separate streams for each different data type to be parsed into so the exact needed data would be able to be extracted.
#story[820]
This commit is contained in:
@@ -18,11 +18,24 @@ public class StreamPacket {
|
||||
this.timeStamp = timeStamp;
|
||||
this.payload = payload;
|
||||
// System.out.println("type = " + type);
|
||||
if (this.type == PacketType.BOAT_LOCATION){
|
||||
StreamParser.extractBoatLocation(payload);
|
||||
if (this.type == PacketType.OTHER){
|
||||
System.out.println("type = " + type);
|
||||
// StreamParser.extractBoatLocation(payload);
|
||||
}
|
||||
}
|
||||
|
||||
public PacketType getType() {
|
||||
return type;
|
||||
}
|
||||
|
||||
public long getMessageLength() {
|
||||
return messageLength;
|
||||
}
|
||||
|
||||
public byte[] getPayload() {
|
||||
return payload;
|
||||
}
|
||||
|
||||
public long getTimeStamp() {
|
||||
return timeStamp;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user