-
Notifications
You must be signed in to change notification settings - Fork 15
/
Copy pathprotocol.txt
57 lines (47 loc) · 1.37 KB
/
protocol.txt
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
Version Info:
byte1: length (always 4)
byte2: 0x00
byte3: protocol version major
byte4: protocol version minor
Register Command or Data:
byte1: total data length
If the dataref name is very long, it might not fit
in a single HID packet, which is limited to 64 bytes.
In this case, the first fragment fills up all the
remaining space in the first HID packet. Following
fragments are sent with byte2=0xff and complement
the name.
byte2: 0x01
byte3-4: identifier (assigned by Teensy)
byte5: type, 0=command, 1=integer, 2=float
byte6: reserved, use 0
byte7-n: name
Fragmented packet continuation for long dataref names (see above):
byte1: length of fragment
byte2: 0xff
byte3: fragment counter
byte4-n: data
Write Data:
byte1: length (always 10)
byte2: 0x02
byte3-4: identifier (assigned by Teensy)
byte5: type, 1=integer, 2=float
byte6: reserved, use 0
byte7-10: data, lsb first
Enable/Disable:
byte1: length (always 4)
byte2: 0x03
byte3: 1=enable&send IDs, 2=enable, 3=disabled
byte4: reserved
Command Begin:
byte1: length (always 4)
byte2: 0x04
byte3-4: identifier (assigned by Teensy)
Command End:
byte1: length (always 4)
byte2: 0x05
byte3-4: identifier (assigned by Teensy)
Command Once:
byte1: length (always 4)
byte2: 0x06
byte3-4: identifier (assigned by Teensy)