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:
Kusal Ekanayake
2017-04-25 15:32:04 +12:00
parent f078c34bf9
commit d51825ffb7
3 changed files with 105 additions and 41 deletions
@@ -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;
}