blob: 1aa56b3f224b292e4388cf8412be1926a3caed45 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
|
package org.reprap.comms.messages;
import org.reprap.comms.OutgoingMessage;
/**
*
*/
public class OutgoingByteMessage extends OutgoingMessage {
/**
*
*/
private byte messageType;
/**
*
*/
private byte value;
/**
* @param messageType
* @param value
*/
public OutgoingByteMessage(byte messageType, byte value) {
this.messageType = messageType;
this.value = value;
}
/* (non-Javadoc)
* @see org.reprap.comms.OutgoingMessage#getBinary()
*/
public byte[] getBinary() {
byte [] payload = new byte[2];
payload[0] = messageType;
payload[1] = value;
return payload;
}
}
|