Set up Boat Action Message encoding

- Fixed command number for sails out

#story[1089]
This commit is contained in:
Connor Taylor-Brown
2017-07-27 00:48:19 +12:00
parent e670ded66d
commit 0352e3310d
5 changed files with 25 additions and 4 deletions
@@ -94,6 +94,15 @@ public class BinaryMessageEncoder {
this.fullMessage = tempFullMessageByteBuffer.array();
}
/**
* Construct a binary message from message type and message body.
* @param headerMessageType of message
* @param messageBody of message
*/
public BinaryMessageEncoder(MessageType headerMessageType, byte[] messageBody) {
this(headerMessageType, System.currentTimeMillis(), 69, (short)messageBody.length, messageBody);
}
/**
* Returns the full encoded message. This includes the header, body, and CRC.
* @return Full encoded message.
@@ -19,6 +19,7 @@ public enum MessageType {
MARKROUNDING(38),
COURSEWIND(44),
AVGWIND(47),
BOATACTION(100),
NOTAMESSAGE(0);
///Primitive value of the enum.