blob: bceaa971672c61c6ada926f04bb8f848d51c11d7 (
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
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
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
|
################################################################################
## Zero of One - PROTOCOL VERSION 1 ############################################
################################################################################
Communications are done through bi-directional sockets.
All communications are text based. Messages are separated by the '\n'
character.
#### SUPPORTED MESSAGES ########################################################
Messages use the "<TAG>[ <CONTENT>]\n" format. Neither <TAG> nor <CONTENT> are
allowed to contain the character '\n'.
###### Requests ################################################################
######## Request Protocol Version ##############################################
########## Syntax
"<TAG>": "?RPV"
"<CONTENT>": list of comma separated unsigned integers, in a ascending order.
########## Semantic
Upon reception of one such message, one should start using the latest
Zero of One protocol version listed in <CONTENT> that one can. If none are
supported, a Negative reply is sent. Otherwise, a Confirm Protocol Version
message should be sent.
######## Request Learn #########################################################
########## Syntax
"<TAG>": "?RL"
"<CONTENT>": Any character string (does not expect null termination).
########## Semantic
Requests the learning of <CONTENT>. Response should be either a Positive
message, or a Negative message.
######## Request Learn & Store #################################################
########## Syntax
"<TAG>": "?RLS"
"<CONTENT>": Any character string (does not expect null termination).
########## Semantic
Requests the learning of <CONTENT>, followed by the storing of <CONTENT> in
the storage file. Response should be either a Positive message, or a Negative
message.
######## Request Learn & Store & Reply #########################################
########## Syntax
"<TAG>": "?RLSR"
"<CONTENT>": Any character string (does not expect null termination).
########## Semantic
Requests the learning of <CONTENT>, followed by the storing of <CONTENT> in
the storage file, as well as the generation of a reply.
Response should be either a Positive message preceded by a Generated Reply
message, or a Negative message.
######## Request Reply #########################################################
########## Syntax
"<TAG>": "?RR"
"<CONTENT>": Any character string (does not expect null termination).
########## Semantic
Requests the generation of a reply to <CONTENT>.
Response should be either a Positive message preceded by a Generated Reply
message, or a Negative message.
###### Replies #################################################################
######## Confirm Protocol Version ##############################################
########## Syntax
"<TAG>": "!CPV"
"<CONTENT>": unsigned integer.
########## Semantic
Indicates the Zero of One protocol version that will henceforth be used.
######## Positive ##############################################################
########## Syntax
"<TAG>": "!P"
"<CONTENT>": None.
########## Semantic
Previous request should be considered as being completed (no more messages
related to it will be sent).
######## Negative ##############################################################
########## Syntax
"<TAG>": "!N"
"<CONTENT>": None.
########## Semantic
Previous request should be considered as having failed (no more messages related
to it will be sent).
######## Generated Reply #######################################################
########## Syntax
"<TAG>": "!GR"
"<CONTENT>": Any character string (without null termination).
########## Semantic
This is a string that has been generated following a request.
###### Errors ##################################################################
######## Debug Message #########################################################
########## Syntax
"<TAG>": "[D]"
"<CONTENT>": Any character string (without null termination).
########## Semantic
Debug message that has been generated during the handling of the previous
request.
######## Warning Message #######################################################
########## Syntax
"<TAG>": "[W]"
"<CONTENT>": Any character string (without null termination).
########## Semantic
Warning message that has been generated during the handling of the previous
request.
######## Error Message #########################################################
########## Syntax
"<TAG>": "[E]"
"<CONTENT>": Any character string (without null termination).
########## Semantic
Error message that has been generated during the handling of the previous
request.
######## Programming fault Message #############################################
########## Syntax
"<TAG>": "[P]"
"<CONTENT>": Any character string (without null termination).
########## Semantic
A serious programming fault occurred during the handling of the previous
request.
######## Fatal error Message #############################################
########## Syntax
"<TAG>": "[F]"
"<CONTENT>": Any character string (without null termination).
########## Semantic
A fatal error occurred during the handling of the previous request.
|