rsmp 0.43.2 → 0.45.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (177) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +11 -11
  3. data/README.md +19 -3
  4. data/Rakefile +2 -2
  5. data/config/supervisor.yaml +2 -1
  6. data/config/tlc.yaml +2 -2
  7. data/lib/rsmp/cli.rb +29 -5
  8. data/lib/rsmp/component/component.rb +0 -4
  9. data/lib/rsmp/component/component_base.rb +15 -2
  10. data/lib/rsmp/component/component_proxy.rb +1 -1
  11. data/lib/rsmp/component/components.rb +22 -1
  12. data/lib/rsmp/convert/export/json_schema/outputs.rb +1 -0
  13. data/lib/rsmp/convert/export/json_schema/values.rb +6 -4
  14. data/lib/rsmp/convert/export/json_schema.rb +7 -3
  15. data/lib/rsmp/helpers/deep_merge.rb +2 -2
  16. data/lib/rsmp/message.rb +32 -0
  17. data/lib/rsmp/node/site/site.rb +34 -10
  18. data/lib/rsmp/node/supervisor/modules/configuration.rb +32 -5
  19. data/lib/rsmp/node/supervisor/modules/connection.rb +0 -2
  20. data/lib/rsmp/node/supervisor/supervisor.rb +0 -7
  21. data/lib/rsmp/options/options.rb +55 -6
  22. data/lib/rsmp/options/schemas/site.json +6 -3
  23. data/lib/rsmp/options/schemas/supervisor.json +5 -2
  24. data/lib/rsmp/options/schemas/supervisor_site.json +5 -2
  25. data/lib/rsmp/options/site_options.rb +3 -2
  26. data/lib/rsmp/options/supervisor_options.rb +3 -1
  27. data/lib/rsmp/proxy/modules/acknowledgements.rb +2 -0
  28. data/lib/rsmp/proxy/modules/receive.rb +5 -2
  29. data/lib/rsmp/proxy/modules/state.rb +1 -0
  30. data/lib/rsmp/proxy/modules/versions.rb +90 -15
  31. data/lib/rsmp/proxy/proxy.rb +52 -3
  32. data/lib/rsmp/proxy/site/modules/status.rb +5 -3
  33. data/lib/rsmp/proxy/site/site_proxy.rb +68 -35
  34. data/lib/rsmp/proxy/site/sxl_selection.rb +54 -0
  35. data/lib/rsmp/proxy/supervisor/supervisor_proxy.rb +54 -18
  36. data/lib/rsmp/schema/message_resolution.rb +104 -0
  37. data/lib/rsmp/schema.rb +104 -22
  38. data/lib/rsmp/schema_error.rb +7 -1
  39. data/lib/rsmp/sxl/interface.rb +48 -0
  40. data/lib/rsmp/sxl/registry.rb +55 -0
  41. data/lib/rsmp/sxl/site_interface.rb +10 -0
  42. data/lib/rsmp/sxl/supervisor_interface.rb +21 -0
  43. data/lib/rsmp/tlc/detector_logic.rb +2 -2
  44. data/lib/rsmp/tlc/signal_group.rb +2 -2
  45. data/lib/rsmp/tlc/site_interface.rb +10 -0
  46. data/lib/rsmp/tlc/{traffic_controller_proxy.rb → supervisor_interface.rb} +19 -34
  47. data/lib/rsmp/tlc/traffic_controller.rb +10 -2
  48. data/lib/rsmp/tlc/traffic_controller_site.rb +4 -2
  49. data/lib/rsmp/tlc.rb +10 -0
  50. data/lib/rsmp/version.rb +1 -1
  51. data/lib/rsmp.rb +8 -1
  52. data/rsmp.gemspec +5 -5
  53. data/schemas/core/3.3.0/aggregated_status.json +25 -0
  54. data/schemas/core/3.3.0/aggregated_status_request.json +9 -0
  55. data/schemas/core/3.3.0/alarm.json +71 -0
  56. data/schemas/core/3.3.0/alarm_acknowledge.json +11 -0
  57. data/schemas/core/3.3.0/alarm_issue.json +44 -0
  58. data/schemas/core/3.3.0/alarm_request.json +3 -0
  59. data/schemas/core/3.3.0/alarm_suspend_resume.json +3 -0
  60. data/schemas/core/3.3.0/alarm_suspended_resumed.json +44 -0
  61. data/schemas/core/3.3.0/command_request.json +24 -0
  62. data/schemas/core/3.3.0/command_response.json +35 -0
  63. data/schemas/core/3.3.0/component_list.json +24 -0
  64. data/schemas/core/3.3.0/core.json +40 -0
  65. data/schemas/core/3.3.0/definitions.json +133 -0
  66. data/schemas/core/3.3.0/message_ack.json +11 -0
  67. data/schemas/core/3.3.0/message_not_ack.json +15 -0
  68. data/schemas/core/3.3.0/rsmp.json +142 -0
  69. data/schemas/core/3.3.0/status.json +21 -0
  70. data/schemas/core/3.3.0/status_request.json +5 -0
  71. data/schemas/core/3.3.0/status_response.json +41 -0
  72. data/schemas/core/3.3.0/status_subscribe.json +31 -0
  73. data/schemas/core/3.3.0/status_unsubscribe.json +5 -0
  74. data/schemas/core/3.3.0/status_update.json +41 -0
  75. data/schemas/core/3.3.0/version.json +144 -0
  76. data/schemas/core/3.3.0/watchdog.json +9 -0
  77. data/schemas/tlc/1.3.0/alarms/A0001.json +4 -0
  78. data/schemas/tlc/1.3.0/alarms/A0002.json +4 -0
  79. data/schemas/tlc/1.3.0/alarms/A0003.json +4 -0
  80. data/schemas/tlc/1.3.0/alarms/A0004.json +4 -0
  81. data/schemas/tlc/1.3.0/alarms/A0005.json +4 -0
  82. data/schemas/tlc/1.3.0/alarms/A0006.json +4 -0
  83. data/schemas/tlc/1.3.0/alarms/A0007.json +34 -0
  84. data/schemas/tlc/1.3.0/alarms/A0008.json +30 -0
  85. data/schemas/tlc/1.3.0/alarms/A0009.json +4 -0
  86. data/schemas/tlc/1.3.0/alarms/A0010.json +4 -0
  87. data/schemas/tlc/1.3.0/alarms/A0101.json +4 -0
  88. data/schemas/tlc/1.3.0/alarms/A0201.json +35 -0
  89. data/schemas/tlc/1.3.0/alarms/A0202.json +35 -0
  90. data/schemas/tlc/1.3.0/alarms/A0301.json +92 -0
  91. data/schemas/tlc/1.3.0/alarms/A0302.json +115 -0
  92. data/schemas/tlc/1.3.0/alarms/A0303.json +92 -0
  93. data/schemas/tlc/1.3.0/alarms/A0304.json +115 -0
  94. data/schemas/tlc/1.3.0/alarms/alarms.json +287 -0
  95. data/schemas/tlc/1.3.0/commands/M0001.json +92 -0
  96. data/schemas/tlc/1.3.0/commands/M0002.json +69 -0
  97. data/schemas/tlc/1.3.0/commands/M0003.json +69 -0
  98. data/schemas/tlc/1.3.0/commands/M0004.json +51 -0
  99. data/schemas/tlc/1.3.0/commands/M0005.json +69 -0
  100. data/schemas/tlc/1.3.0/commands/M0006.json +69 -0
  101. data/schemas/tlc/1.3.0/commands/M0007.json +51 -0
  102. data/schemas/tlc/1.3.0/commands/M0008.json +87 -0
  103. data/schemas/tlc/1.3.0/commands/M0010.json +51 -0
  104. data/schemas/tlc/1.3.0/commands/M0011.json +51 -0
  105. data/schemas/tlc/1.3.0/commands/M0012.json +51 -0
  106. data/schemas/tlc/1.3.0/commands/M0013.json +51 -0
  107. data/schemas/tlc/1.3.0/commands/M0014.json +69 -0
  108. data/schemas/tlc/1.3.0/commands/M0015.json +69 -0
  109. data/schemas/tlc/1.3.0/commands/M0016.json +51 -0
  110. data/schemas/tlc/1.3.0/commands/M0017.json +51 -0
  111. data/schemas/tlc/1.3.0/commands/M0018.json +69 -0
  112. data/schemas/tlc/1.3.0/commands/M0019.json +87 -0
  113. data/schemas/tlc/1.3.0/commands/M0020.json +87 -0
  114. data/schemas/tlc/1.3.0/commands/M0021.json +51 -0
  115. data/schemas/tlc/1.3.0/commands/M0022.json +249 -0
  116. data/schemas/tlc/1.3.0/commands/M0023.json +51 -0
  117. data/schemas/tlc/1.3.0/commands/M0024.json +33 -0
  118. data/schemas/tlc/1.3.0/commands/M0103.json +72 -0
  119. data/schemas/tlc/1.3.0/commands/M0104.json +141 -0
  120. data/schemas/tlc/1.3.0/commands/command_requests.json +8 -0
  121. data/schemas/tlc/1.3.0/commands/command_responses.json +8 -0
  122. data/schemas/tlc/1.3.0/commands/commands.json +415 -0
  123. data/schemas/tlc/1.3.0/defs/definitions.json +72 -0
  124. data/schemas/tlc/1.3.0/defs/guards.json +24 -0
  125. data/schemas/tlc/1.3.0/rsmp.json +74 -0
  126. data/schemas/tlc/1.3.0/statuses/S0001.json +109 -0
  127. data/schemas/tlc/1.3.0/statuses/S0002.json +36 -0
  128. data/schemas/tlc/1.3.0/statuses/S0003.json +36 -0
  129. data/schemas/tlc/1.3.0/statuses/S0004.json +36 -0
  130. data/schemas/tlc/1.3.0/statuses/S0005.json +72 -0
  131. data/schemas/tlc/1.3.0/statuses/S0006.json +54 -0
  132. data/schemas/tlc/1.3.0/statuses/S0007.json +73 -0
  133. data/schemas/tlc/1.3.0/statuses/S0008.json +73 -0
  134. data/schemas/tlc/1.3.0/statuses/S0009.json +73 -0
  135. data/schemas/tlc/1.3.0/statuses/S0010.json +73 -0
  136. data/schemas/tlc/1.3.0/statuses/S0011.json +73 -0
  137. data/schemas/tlc/1.3.0/statuses/S0012.json +73 -0
  138. data/schemas/tlc/1.3.0/statuses/S0013.json +54 -0
  139. data/schemas/tlc/1.3.0/statuses/S0014.json +55 -0
  140. data/schemas/tlc/1.3.0/statuses/S0015.json +55 -0
  141. data/schemas/tlc/1.3.0/statuses/S0016.json +36 -0
  142. data/schemas/tlc/1.3.0/statuses/S0017.json +36 -0
  143. data/schemas/tlc/1.3.0/statuses/S0018.json +61 -0
  144. data/schemas/tlc/1.3.0/statuses/S0019.json +36 -0
  145. data/schemas/tlc/1.3.0/statuses/S0020.json +54 -0
  146. data/schemas/tlc/1.3.0/statuses/S0021.json +37 -0
  147. data/schemas/tlc/1.3.0/statuses/S0022.json +36 -0
  148. data/schemas/tlc/1.3.0/statuses/S0023.json +37 -0
  149. data/schemas/tlc/1.3.0/statuses/S0024.json +36 -0
  150. data/schemas/tlc/1.3.0/statuses/S0025.json +162 -0
  151. data/schemas/tlc/1.3.0/statuses/S0026.json +36 -0
  152. data/schemas/tlc/1.3.0/statuses/S0027.json +36 -0
  153. data/schemas/tlc/1.3.0/statuses/S0028.json +36 -0
  154. data/schemas/tlc/1.3.0/statuses/S0029.json +36 -0
  155. data/schemas/tlc/1.3.0/statuses/S0030.json +36 -0
  156. data/schemas/tlc/1.3.0/statuses/S0031.json +36 -0
  157. data/schemas/tlc/1.3.0/statuses/S0032.json +73 -0
  158. data/schemas/tlc/1.3.0/statuses/S0033.json +77 -0
  159. data/schemas/tlc/1.3.0/statuses/S0034.json +36 -0
  160. data/schemas/tlc/1.3.0/statuses/S0035.json +49 -0
  161. data/schemas/tlc/1.3.0/statuses/S0091.json +40 -0
  162. data/schemas/tlc/1.3.0/statuses/S0092.json +40 -0
  163. data/schemas/tlc/1.3.0/statuses/S0095.json +36 -0
  164. data/schemas/tlc/1.3.0/statuses/S0096.json +126 -0
  165. data/schemas/tlc/1.3.0/statuses/S0097.json +54 -0
  166. data/schemas/tlc/1.3.0/statuses/S0098.json +72 -0
  167. data/schemas/tlc/1.3.0/statuses/S0201.json +54 -0
  168. data/schemas/tlc/1.3.0/statuses/S0202.json +54 -0
  169. data/schemas/tlc/1.3.0/statuses/S0203.json +54 -0
  170. data/schemas/tlc/1.3.0/statuses/S0204.json +198 -0
  171. data/schemas/tlc/1.3.0/statuses/S0205.json +54 -0
  172. data/schemas/tlc/1.3.0/statuses/S0206.json +54 -0
  173. data/schemas/tlc/1.3.0/statuses/S0207.json +54 -0
  174. data/schemas/tlc/1.3.0/statuses/S0208.json +198 -0
  175. data/schemas/tlc/1.3.0/statuses/statuses.json +787 -0
  176. data/schemas/tlc/1.3.0/sxl.yaml +2296 -0
  177. metadata +144 -12
@@ -0,0 +1,141 @@
1
+ {
2
+ "$schema" : "https://json-schema.org/draft/2020-12/schema",
3
+ "description" : "Set clock.\nThis command will be removed in an upcoming version.\nYou should instead use automatic time synchronization using e.g. using NTP or GPS.\n\nCan be used to manually set the clock of the traffic light controller in case\nautomatic time synchronization is not available, e.g. during maintenance work.\n\nIf automatic time synchronization is active, the\ncommand returns a normal response, but is otherwise ignored and does not set\nthe clock.\n\nUTC is used. Requires security code 1. ",
4
+ "properties" : {
5
+ "n" : {
6
+ "enum" : [
7
+ "day",
8
+ "hour",
9
+ "minute",
10
+ "month",
11
+ "second",
12
+ "securityCode",
13
+ "year"
14
+ ]
15
+ },
16
+ "cO" : {
17
+ "const" : "setDate"
18
+ }
19
+ },
20
+ "allOf" : [
21
+ {
22
+ "if" : {
23
+ "properties" : {
24
+ "n" : {
25
+ "const" : "securityCode"
26
+ }
27
+ }
28
+ },
29
+ "then" : {
30
+ "properties" : {
31
+ "v" : {
32
+ "description" : "Security code 1",
33
+ "type" : "string"
34
+ }
35
+ }
36
+ }
37
+ },
38
+ {
39
+ "if" : {
40
+ "properties" : {
41
+ "n" : {
42
+ "const" : "year"
43
+ }
44
+ }
45
+ },
46
+ "then" : {
47
+ "properties" : {
48
+ "v" : {
49
+ "description" : "Year",
50
+ "type" : "string"
51
+ }
52
+ }
53
+ }
54
+ },
55
+ {
56
+ "if" : {
57
+ "properties" : {
58
+ "n" : {
59
+ "const" : "month"
60
+ }
61
+ }
62
+ },
63
+ "then" : {
64
+ "properties" : {
65
+ "v" : {
66
+ "description" : "Month",
67
+ "type" : "string"
68
+ }
69
+ }
70
+ }
71
+ },
72
+ {
73
+ "if" : {
74
+ "properties" : {
75
+ "n" : {
76
+ "const" : "day"
77
+ }
78
+ }
79
+ },
80
+ "then" : {
81
+ "properties" : {
82
+ "v" : {
83
+ "description" : "Day of month",
84
+ "type" : "string"
85
+ }
86
+ }
87
+ }
88
+ },
89
+ {
90
+ "if" : {
91
+ "properties" : {
92
+ "n" : {
93
+ "const" : "hour"
94
+ }
95
+ }
96
+ },
97
+ "then" : {
98
+ "properties" : {
99
+ "v" : {
100
+ "description" : "Hour",
101
+ "type" : "string"
102
+ }
103
+ }
104
+ }
105
+ },
106
+ {
107
+ "if" : {
108
+ "properties" : {
109
+ "n" : {
110
+ "const" : "minute"
111
+ }
112
+ }
113
+ },
114
+ "then" : {
115
+ "properties" : {
116
+ "v" : {
117
+ "description" : "Minute",
118
+ "type" : "string"
119
+ }
120
+ }
121
+ }
122
+ },
123
+ {
124
+ "if" : {
125
+ "properties" : {
126
+ "n" : {
127
+ "const" : "second"
128
+ }
129
+ }
130
+ },
131
+ "then" : {
132
+ "properties" : {
133
+ "v" : {
134
+ "description" : "Second",
135
+ "type" : "string"
136
+ }
137
+ }
138
+ }
139
+ }
140
+ ]
141
+ }
@@ -0,0 +1,8 @@
1
+ {
2
+ "$schema" : "https://json-schema.org/draft/2020-12/schema",
3
+ "properties" : {
4
+ "arg" : {
5
+ "$ref" : "commands.json"
6
+ }
7
+ }
8
+ }
@@ -0,0 +1,8 @@
1
+ {
2
+ "$schema" : "https://json-schema.org/draft/2020-12/schema",
3
+ "properties" : {
4
+ "rvs" : {
5
+ "$ref" : "commands.json"
6
+ }
7
+ }
8
+ }
@@ -0,0 +1,415 @@
1
+ {
2
+ "$schema" : "https://json-schema.org/draft/2020-12/schema",
3
+ "items" : {
4
+ "allOf" : [
5
+ {
6
+ "properties" : {
7
+ "cCI" : {
8
+ "enum" : [
9
+ "M0001",
10
+ "M0002",
11
+ "M0003",
12
+ "M0004",
13
+ "M0005",
14
+ "M0006",
15
+ "M0007",
16
+ "M0008",
17
+ "M0010",
18
+ "M0011",
19
+ "M0012",
20
+ "M0013",
21
+ "M0014",
22
+ "M0015",
23
+ "M0016",
24
+ "M0017",
25
+ "M0018",
26
+ "M0019",
27
+ "M0020",
28
+ "M0021",
29
+ "M0022",
30
+ "M0023",
31
+ "M0024",
32
+ "M0103",
33
+ "M0104"
34
+ ]
35
+ }
36
+ }
37
+ },
38
+ {
39
+ "if" : {
40
+ "required" : [
41
+ "cCI"
42
+ ],
43
+ "properties" : {
44
+ "cCI" : {
45
+ "const" : "M0001"
46
+ }
47
+ }
48
+ },
49
+ "then" : {
50
+ "$ref" : "M0001.json"
51
+ }
52
+ },
53
+ {
54
+ "if" : {
55
+ "required" : [
56
+ "cCI"
57
+ ],
58
+ "properties" : {
59
+ "cCI" : {
60
+ "const" : "M0002"
61
+ }
62
+ }
63
+ },
64
+ "then" : {
65
+ "$ref" : "M0002.json"
66
+ }
67
+ },
68
+ {
69
+ "if" : {
70
+ "required" : [
71
+ "cCI"
72
+ ],
73
+ "properties" : {
74
+ "cCI" : {
75
+ "const" : "M0003"
76
+ }
77
+ }
78
+ },
79
+ "then" : {
80
+ "$ref" : "M0003.json"
81
+ }
82
+ },
83
+ {
84
+ "if" : {
85
+ "required" : [
86
+ "cCI"
87
+ ],
88
+ "properties" : {
89
+ "cCI" : {
90
+ "const" : "M0004"
91
+ }
92
+ }
93
+ },
94
+ "then" : {
95
+ "$ref" : "M0004.json"
96
+ }
97
+ },
98
+ {
99
+ "if" : {
100
+ "required" : [
101
+ "cCI"
102
+ ],
103
+ "properties" : {
104
+ "cCI" : {
105
+ "const" : "M0005"
106
+ }
107
+ }
108
+ },
109
+ "then" : {
110
+ "$ref" : "M0005.json"
111
+ }
112
+ },
113
+ {
114
+ "if" : {
115
+ "required" : [
116
+ "cCI"
117
+ ],
118
+ "properties" : {
119
+ "cCI" : {
120
+ "const" : "M0006"
121
+ }
122
+ }
123
+ },
124
+ "then" : {
125
+ "$ref" : "M0006.json"
126
+ }
127
+ },
128
+ {
129
+ "if" : {
130
+ "required" : [
131
+ "cCI"
132
+ ],
133
+ "properties" : {
134
+ "cCI" : {
135
+ "const" : "M0007"
136
+ }
137
+ }
138
+ },
139
+ "then" : {
140
+ "$ref" : "M0007.json"
141
+ }
142
+ },
143
+ {
144
+ "if" : {
145
+ "required" : [
146
+ "cCI"
147
+ ],
148
+ "properties" : {
149
+ "cCI" : {
150
+ "const" : "M0008"
151
+ }
152
+ }
153
+ },
154
+ "then" : {
155
+ "$ref" : "M0008.json"
156
+ }
157
+ },
158
+ {
159
+ "if" : {
160
+ "required" : [
161
+ "cCI"
162
+ ],
163
+ "properties" : {
164
+ "cCI" : {
165
+ "const" : "M0010"
166
+ }
167
+ }
168
+ },
169
+ "then" : {
170
+ "$ref" : "M0010.json"
171
+ }
172
+ },
173
+ {
174
+ "if" : {
175
+ "required" : [
176
+ "cCI"
177
+ ],
178
+ "properties" : {
179
+ "cCI" : {
180
+ "const" : "M0011"
181
+ }
182
+ }
183
+ },
184
+ "then" : {
185
+ "$ref" : "M0011.json"
186
+ }
187
+ },
188
+ {
189
+ "if" : {
190
+ "required" : [
191
+ "cCI"
192
+ ],
193
+ "properties" : {
194
+ "cCI" : {
195
+ "const" : "M0012"
196
+ }
197
+ }
198
+ },
199
+ "then" : {
200
+ "$ref" : "M0012.json"
201
+ }
202
+ },
203
+ {
204
+ "if" : {
205
+ "required" : [
206
+ "cCI"
207
+ ],
208
+ "properties" : {
209
+ "cCI" : {
210
+ "const" : "M0013"
211
+ }
212
+ }
213
+ },
214
+ "then" : {
215
+ "$ref" : "M0013.json"
216
+ }
217
+ },
218
+ {
219
+ "if" : {
220
+ "required" : [
221
+ "cCI"
222
+ ],
223
+ "properties" : {
224
+ "cCI" : {
225
+ "const" : "M0014"
226
+ }
227
+ }
228
+ },
229
+ "then" : {
230
+ "$ref" : "M0014.json"
231
+ }
232
+ },
233
+ {
234
+ "if" : {
235
+ "required" : [
236
+ "cCI"
237
+ ],
238
+ "properties" : {
239
+ "cCI" : {
240
+ "const" : "M0015"
241
+ }
242
+ }
243
+ },
244
+ "then" : {
245
+ "$ref" : "M0015.json"
246
+ }
247
+ },
248
+ {
249
+ "if" : {
250
+ "required" : [
251
+ "cCI"
252
+ ],
253
+ "properties" : {
254
+ "cCI" : {
255
+ "const" : "M0016"
256
+ }
257
+ }
258
+ },
259
+ "then" : {
260
+ "$ref" : "M0016.json"
261
+ }
262
+ },
263
+ {
264
+ "if" : {
265
+ "required" : [
266
+ "cCI"
267
+ ],
268
+ "properties" : {
269
+ "cCI" : {
270
+ "const" : "M0017"
271
+ }
272
+ }
273
+ },
274
+ "then" : {
275
+ "$ref" : "M0017.json"
276
+ }
277
+ },
278
+ {
279
+ "if" : {
280
+ "required" : [
281
+ "cCI"
282
+ ],
283
+ "properties" : {
284
+ "cCI" : {
285
+ "const" : "M0018"
286
+ }
287
+ }
288
+ },
289
+ "then" : {
290
+ "$ref" : "M0018.json"
291
+ }
292
+ },
293
+ {
294
+ "if" : {
295
+ "required" : [
296
+ "cCI"
297
+ ],
298
+ "properties" : {
299
+ "cCI" : {
300
+ "const" : "M0019"
301
+ }
302
+ }
303
+ },
304
+ "then" : {
305
+ "$ref" : "M0019.json"
306
+ }
307
+ },
308
+ {
309
+ "if" : {
310
+ "required" : [
311
+ "cCI"
312
+ ],
313
+ "properties" : {
314
+ "cCI" : {
315
+ "const" : "M0020"
316
+ }
317
+ }
318
+ },
319
+ "then" : {
320
+ "$ref" : "M0020.json"
321
+ }
322
+ },
323
+ {
324
+ "if" : {
325
+ "required" : [
326
+ "cCI"
327
+ ],
328
+ "properties" : {
329
+ "cCI" : {
330
+ "const" : "M0021"
331
+ }
332
+ }
333
+ },
334
+ "then" : {
335
+ "$ref" : "M0021.json"
336
+ }
337
+ },
338
+ {
339
+ "if" : {
340
+ "required" : [
341
+ "cCI"
342
+ ],
343
+ "properties" : {
344
+ "cCI" : {
345
+ "const" : "M0022"
346
+ }
347
+ }
348
+ },
349
+ "then" : {
350
+ "$ref" : "M0022.json"
351
+ }
352
+ },
353
+ {
354
+ "if" : {
355
+ "required" : [
356
+ "cCI"
357
+ ],
358
+ "properties" : {
359
+ "cCI" : {
360
+ "const" : "M0023"
361
+ }
362
+ }
363
+ },
364
+ "then" : {
365
+ "$ref" : "M0023.json"
366
+ }
367
+ },
368
+ {
369
+ "if" : {
370
+ "required" : [
371
+ "cCI"
372
+ ],
373
+ "properties" : {
374
+ "cCI" : {
375
+ "const" : "M0024"
376
+ }
377
+ }
378
+ },
379
+ "then" : {
380
+ "$ref" : "M0024.json"
381
+ }
382
+ },
383
+ {
384
+ "if" : {
385
+ "required" : [
386
+ "cCI"
387
+ ],
388
+ "properties" : {
389
+ "cCI" : {
390
+ "const" : "M0103"
391
+ }
392
+ }
393
+ },
394
+ "then" : {
395
+ "$ref" : "M0103.json"
396
+ }
397
+ },
398
+ {
399
+ "if" : {
400
+ "required" : [
401
+ "cCI"
402
+ ],
403
+ "properties" : {
404
+ "cCI" : {
405
+ "const" : "M0104"
406
+ }
407
+ }
408
+ },
409
+ "then" : {
410
+ "$ref" : "M0104.json"
411
+ }
412
+ }
413
+ ]
414
+ }
415
+ }
@@ -0,0 +1,72 @@
1
+ {
2
+ "message_id": {
3
+ "description" : "Message Id",
4
+ "type": "string",
5
+ "$comment" : "Example: 1.2.3 or 1.2",
6
+ "pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-4[a-fA-F0-9]{3}-[89abAB][a-fA-F0-9]{3}-[a-fA-F0-9]{12}$"
7
+ },
8
+ "timestamp" : {
9
+ "description" : "Timestamp",
10
+ "type": "string",
11
+ "$comment" : "Example: 2015-06-08T11:49:03.293Z",
12
+ "pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}\\.[0-9]{3}Z$"
13
+ },
14
+ "integer" : {
15
+ "description" : "Integer as string",
16
+ "type": "string",
17
+ "$comment" : "Example: 123 or -123",
18
+ "pattern": "^\\-?[0-9]+$"
19
+ },
20
+ "version": {
21
+ "description" : "Version",
22
+ "type": "string",
23
+ "$comment" : "Example: 1.2.3 or 1.2",
24
+ "pattern" : "^[0-9]{1,2}\\.[0-9]{1,2}(\\.[0-9]{1,2})?"
25
+ },
26
+ "command_code": {
27
+ "description" : "Command code id",
28
+ "type" : "string",
29
+ "pattern" : "^M"
30
+ },
31
+ "status_code": {
32
+ "description" : "Status code id",
33
+ "type" : "string",
34
+ "pattern" : "^S"
35
+ },
36
+ "alarm_code": {
37
+ "description" : "Alarm code id",
38
+ "type" : "string",
39
+ "pattern" : "^A"
40
+ },
41
+ "component_id": {
42
+ "description" : "Compoment id",
43
+ "type" : "string"
44
+ },
45
+ "boolean": {
46
+ "description" : "Boolean as string",
47
+ "type" : "string",
48
+ "enum" : [ "True", "False" ]
49
+ },
50
+ "integer_list": {
51
+ "description" : "Comma-separated list of integers as strings",
52
+ "type" : "string",
53
+ "pattern" : "^(\\-?\\d+)(?:,(\\-?\\d+))*$"
54
+ },
55
+ "number_list": {
56
+ "description" : "Comma-separated list of numbers as strings",
57
+ "type" : "string",
58
+ "pattern" : "^(\\-?\\d+(\\.\\d+)?)(?:,(\\-?\\d+(\\.\\d+)?))*$"
59
+ },
60
+ "boolean_list": {
61
+ "description" : "Comma-separated list of booleans as strings",
62
+ "type" : "string",
63
+ "pattern" : "^(True|False)(?:,(True|False))*$"
64
+ },
65
+ "string_list": {
66
+ "description" : "Comma-separated list of strings",
67
+ "type" : "string"
68
+ }
69
+ }
70
+
71
+
72
+
@@ -0,0 +1,24 @@
1
+ {
2
+ "$schema" : "https://json-schema.org/draft/2020-12/schema",
3
+ "$defs" : {
4
+ "q_unknown_or_undefined" : {
5
+ "allOf" : [
6
+ {
7
+ "required" : [
8
+ "q"
9
+ ]
10
+ },
11
+ {
12
+ "properties" : {
13
+ "q" : {
14
+ "enum" : [
15
+ "undefined",
16
+ "unknown"
17
+ ]
18
+ }
19
+ }
20
+ }
21
+ ]
22
+ }
23
+ }
24
+ }