forked from usdot-jpo-ode/jpo-ode
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
36de40d
commit acf570b
Showing
3 changed files
with
50 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 11 additions & 0 deletions
11
jpo-ode-svcs/src/main/java/us/dot/its/jpo/ode/udp/generic/MessageType.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
package us.dot.its.jpo.ode.udp.generic; | ||
|
||
public enum MessageType { | ||
UNKNOWN, | ||
BSM, | ||
MAP, | ||
SPAT, | ||
SRM, | ||
SSM, | ||
TIM | ||
} |
35 changes: 35 additions & 0 deletions
35
jpo-ode-svcs/src/main/java/us/dot/its/jpo/ode/udp/generic/TypePayload.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
package us.dot.its.jpo.ode.udp.generic; | ||
|
||
public class TypePayload { | ||
|
||
private MessageType type; | ||
private byte[] payload; | ||
|
||
public TypePayload(MessageType type, byte[] payload){ | ||
this.type = type; | ||
this.payload = payload; | ||
} | ||
|
||
public MessageType getType() { | ||
return type; | ||
} | ||
|
||
public void setType(MessageType type) { | ||
this.type = type; | ||
} | ||
|
||
public byte[] getPayload() { | ||
return payload; | ||
} | ||
|
||
|
||
public void setPayload(byte[] payload) { | ||
this.payload = payload; | ||
} | ||
|
||
|
||
public String toString(){ | ||
return "{ \"type\":" + type + "\"payload\":" + payload + "}"; | ||
} | ||
|
||
} |