summaryrefslogtreecommitdiff
path: root/branches/sm-unittesting/src/org/reprap/comms/messages/OutgoingByteMessage.java
blob: 29ea8ec86d2c6e7bcc8fbc5c0e12a5b63f507def (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
package org.reprap.comms.messages;

import org.reprap.comms.OutgoingMessage;

public class OutgoingByteMessage extends OutgoingMessage  {
	private byte messageType;
	private byte value;
	
	public OutgoingByteMessage(byte messageType, byte value) {
		this.messageType = messageType;
		this.value = value;
	}
	
	public byte[] getBinary() {
		byte [] payload = new byte[2];
		payload[0] = messageType;
		payload[1] = value;
		return payload;
	}

}