-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathexample_protocol.yml
95 lines (94 loc) · 2.27 KB
/
example_protocol.yml
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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
Protocol:
# Headers are a common piece of text that all commands share(at beginning of message)
Header:
'$'
# Footers are a common piece of text that all commands share(at end of message)
Footer:
'>'
# Delimiters can separate command from args/values
Delimiter:
' '
# Patterns define how an interaction between host and device takes place
Interactions:
# The name of the interaction type
GetOne:
# The Command is the signature of what kind of interaction is taking place
Command: 'G'
# Host portion indicates what the host SENDS to the device
Host:
1: Header
2: Command
3: Argument
4: Footer
# Device portion indicates what the device REPLIES to the Host
Device:
1: Header
2: Command
3: Argument
4: Delimiter
5: Value
6: Footer
SetOne:
ValueType: "Int"
Command: 'S'
Host:
1: Header
2: Command
3: Argument
4: Delimiter
5: Value
6: Footer
Device:
1: Header
2: Command
3: Argument
4: Footer
StartAsyncReport:
Command: '<'
Host:
1: Header
2: Command
3: Footer
AsyncReport:
ValueType: "Int"
Command: 'v'
Device:
1: Header
2: Command
3: Delimiter
4: Value
5: Footer
Commands:
# Here we define all of the arguments which will be placed in the above patterns
GetOne:
AnalogZero: "A0"
AnalogOne: "A1"
AnalogTwo: "A2"
AnalogThree: "A3"
AnalogFour: "A4"
AnalogFive: "A5"
AnalogSix: "A6"
AnalogSeven: "A7"
AnalogEight: "A8"
AnalogNine: "A9"
DigitalZero: "D0"
DigitalOne: "D1"
DigitalTwo: "D2"
DigitalThree: "D3"
DigitalFour: "D4"
DigitalFive: "D5"
DigitalSix: "D6"
DigitalSeven: "D7"
DigitalEight: "D8"
DigitalNine: "D9"
SetOne:
DigitalZero: "D0"
DigitalOne: "D1"
DigitalTwo: "D2"
DigitalThree: "D3"
DigitalFour: "D4"
DigitalFive: "D5"
DigitalSix: "D6"
DigitalSeven: "D7"
DigitalEight: "D8"
DigitalNine: "D9"