rsmp_schema 0.4.5 → 0.5.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (109) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/rspec.yaml +1 -1
  3. data/.tool-versions +1 -0
  4. data/Gemfile.lock +23 -29
  5. data/lib/rsmp_schema/schema.rb +6 -3
  6. data/lib/rsmp_schema/version.rb +1 -1
  7. data/rsmp_schema.gemspec +5 -6
  8. data/schemas/core/3.1.5/status_subscribe.json +1 -1
  9. data/schemas/core/3.2/status_response.json +1 -1
  10. data/schemas/core/3.2.1/core.json +39 -0
  11. data/schemas/core/3.2.1/rsmp.json +133 -0
  12. data/schemas/tlc/1.2/alarms/A0001.json +3 -0
  13. data/schemas/tlc/1.2/alarms/A0002.json +3 -0
  14. data/schemas/tlc/1.2/alarms/A0003.json +3 -0
  15. data/schemas/tlc/1.2/alarms/A0004.json +3 -0
  16. data/schemas/tlc/1.2/alarms/A0005.json +3 -0
  17. data/schemas/tlc/1.2/alarms/A0006.json +3 -0
  18. data/schemas/tlc/1.2/alarms/A0007.json +59 -0
  19. data/schemas/tlc/1.2/alarms/A0008.json +61 -0
  20. data/schemas/tlc/1.2/alarms/A0009.json +3 -0
  21. data/schemas/tlc/1.2/alarms/A0010.json +3 -0
  22. data/schemas/tlc/1.2/alarms/A0101.json +3 -0
  23. data/schemas/tlc/1.2/alarms/A0201.json +60 -0
  24. data/schemas/tlc/1.2/alarms/A0202.json +60 -0
  25. data/schemas/tlc/1.2/alarms/A0301.json +132 -0
  26. data/schemas/tlc/1.2/alarms/A0302.json +158 -0
  27. data/schemas/tlc/1.2/alarms/A0303.json +132 -0
  28. data/schemas/tlc/1.2/alarms/A0304.json +158 -0
  29. data/schemas/tlc/1.2/alarms/alarms.json +286 -0
  30. data/schemas/tlc/1.2/commands/M0001.json +138 -0
  31. data/schemas/tlc/1.2/commands/M0002.json +112 -0
  32. data/schemas/tlc/1.2/commands/M0003.json +112 -0
  33. data/schemas/tlc/1.2/commands/M0004.json +85 -0
  34. data/schemas/tlc/1.2/commands/M0005.json +112 -0
  35. data/schemas/tlc/1.2/commands/M0006.json +112 -0
  36. data/schemas/tlc/1.2/commands/M0007.json +85 -0
  37. data/schemas/tlc/1.2/commands/M0008.json +112 -0
  38. data/schemas/tlc/1.2/commands/M0010.json +85 -0
  39. data/schemas/tlc/1.2/commands/M0011.json +85 -0
  40. data/schemas/tlc/1.2/commands/M0012.json +79 -0
  41. data/schemas/tlc/1.2/commands/M0013.json +79 -0
  42. data/schemas/tlc/1.2/commands/M0014.json +106 -0
  43. data/schemas/tlc/1.2/commands/M0015.json +112 -0
  44. data/schemas/tlc/1.2/commands/M0016.json +79 -0
  45. data/schemas/tlc/1.2/commands/M0017.json +79 -0
  46. data/schemas/tlc/1.2/commands/M0018.json +112 -0
  47. data/schemas/tlc/1.2/commands/M0019.json +139 -0
  48. data/schemas/tlc/1.2/commands/M0020.json +139 -0
  49. data/schemas/tlc/1.2/commands/M0021.json +79 -0
  50. data/schemas/tlc/1.2/commands/M0022.json +355 -0
  51. data/schemas/tlc/1.2/commands/M0023.json +85 -0
  52. data/schemas/tlc/1.2/commands/M0103.json +103 -0
  53. data/schemas/tlc/1.2/commands/M0104.json +220 -0
  54. data/schemas/tlc/1.2/commands/command_requests.json +7 -0
  55. data/schemas/tlc/1.2/commands/command_responses.json +7 -0
  56. data/schemas/tlc/1.2/commands/commands.json +398 -0
  57. data/schemas/tlc/1.2/rsmp.json +73 -0
  58. data/schemas/tlc/1.2/statuses/S0001.json +137 -0
  59. data/schemas/tlc/1.2/statuses/S0002.json +55 -0
  60. data/schemas/tlc/1.2/statuses/S0003.json +55 -0
  61. data/schemas/tlc/1.2/statuses/S0004.json +55 -0
  62. data/schemas/tlc/1.2/statuses/S0005.json +112 -0
  63. data/schemas/tlc/1.2/statuses/S0006.json +88 -0
  64. data/schemas/tlc/1.2/statuses/S0007.json +116 -0
  65. data/schemas/tlc/1.2/statuses/S0008.json +116 -0
  66. data/schemas/tlc/1.2/statuses/S0009.json +116 -0
  67. data/schemas/tlc/1.2/statuses/S0010.json +116 -0
  68. data/schemas/tlc/1.2/statuses/S0011.json +116 -0
  69. data/schemas/tlc/1.2/statuses/S0012.json +116 -0
  70. data/schemas/tlc/1.2/statuses/S0013.json +88 -0
  71. data/schemas/tlc/1.2/statuses/S0014.json +90 -0
  72. data/schemas/tlc/1.2/statuses/S0015.json +90 -0
  73. data/schemas/tlc/1.2/statuses/S0016.json +61 -0
  74. data/schemas/tlc/1.2/statuses/S0017.json +61 -0
  75. data/schemas/tlc/1.2/statuses/S0018.json +61 -0
  76. data/schemas/tlc/1.2/statuses/S0019.json +61 -0
  77. data/schemas/tlc/1.2/statuses/S0020.json +88 -0
  78. data/schemas/tlc/1.2/statuses/S0021.json +56 -0
  79. data/schemas/tlc/1.2/statuses/S0022.json +55 -0
  80. data/schemas/tlc/1.2/statuses/S0023.json +56 -0
  81. data/schemas/tlc/1.2/statuses/S0024.json +56 -0
  82. data/schemas/tlc/1.2/statuses/S0025.json +250 -0
  83. data/schemas/tlc/1.2/statuses/S0026.json +55 -0
  84. data/schemas/tlc/1.2/statuses/S0027.json +55 -0
  85. data/schemas/tlc/1.2/statuses/S0028.json +55 -0
  86. data/schemas/tlc/1.2/statuses/S0029.json +55 -0
  87. data/schemas/tlc/1.2/statuses/S0030.json +55 -0
  88. data/schemas/tlc/1.2/statuses/S0031.json +55 -0
  89. data/schemas/tlc/1.2/statuses/S0032.json +116 -0
  90. data/schemas/tlc/1.2/statuses/S0033.json +114 -0
  91. data/schemas/tlc/1.2/statuses/S0034.json +61 -0
  92. data/schemas/tlc/1.2/statuses/S0035.json +74 -0
  93. data/schemas/tlc/1.2/statuses/S0091.json +65 -0
  94. data/schemas/tlc/1.2/statuses/S0092.json +65 -0
  95. data/schemas/tlc/1.2/statuses/S0095.json +55 -0
  96. data/schemas/tlc/1.2/statuses/S0096.json +196 -0
  97. data/schemas/tlc/1.2/statuses/S0097.json +82 -0
  98. data/schemas/tlc/1.2/statuses/S0098.json +103 -0
  99. data/schemas/tlc/1.2/statuses/S0201.json +88 -0
  100. data/schemas/tlc/1.2/statuses/S0202.json +88 -0
  101. data/schemas/tlc/1.2/statuses/S0203.json +88 -0
  102. data/schemas/tlc/1.2/statuses/S0204.json +304 -0
  103. data/schemas/tlc/1.2/statuses/S0205.json +88 -0
  104. data/schemas/tlc/1.2/statuses/S0206.json +88 -0
  105. data/schemas/tlc/1.2/statuses/S0207.json +88 -0
  106. data/schemas/tlc/1.2/statuses/S0208.json +304 -0
  107. data/schemas/tlc/1.2/statuses/statuses.json +786 -0
  108. data/schemas/tlc/1.2/sxl.yaml +2082 -0
  109. metadata +113 -27
@@ -0,0 +1,355 @@
1
+ {
2
+ "description" : "Request Signal Priority\n\nUseful for bus priority or other type of priorities like emergency vehicles or groups of cyclists.\n\nThe benefit of using this message over activating inputs or detector logics is that you can specify a priority level, vehicle type and estimated time of arrival. You can also update or cancel the request, and use the corresponding status message to track the status of the request, including how much priority was actually given.\n\nTo understand how this command relates to ETSI/J2735, please see the [wiki](https://github.com/rsmp-nordic/rsmp_sxl_traffic_lights/wiki/Signal-priority-and-ETSI-J2735).\n\nActivating signal priority is expected to provide more green time for a particular movement through the intersection, but the exact mechanism must typically be configured in the controller.\n\nThe movement to prioritize can be referenced in a number of ways, depending on what is configured in the controller, and in the system that sends priority requests. Either:\n\n- Reference a signal group by setting ‘signalGroupId’. This method is simple, but will not allow you to have different priority mechanism for the same signal group, unless they can be distinguished by the vehicle type. For example, if you need to trigger different priorities depending on whether a bus goes straight or makes a turn for the same signal group, you need to use of the other referencing methods.\n- Reference an input by setting ‘inputId’. This can be useful if you previously used inputs to activate priority. The input will not be activated, only the priority.\n- Reference a connection by setting ‘connectionId’. A connection is a movement from a specific ingoing lane to a specific outgoing lane.\n- Reference an intersection approach by setting ‘approachId’.\n- Reference an ingoing lane by setting ‘laneInId’, and optionally also reference an outgoing lane by setting ‘laneOutId’.\n\nReferencing attributes that are not used must be left out, rather than set to null or empty strings. This includes:\n\n- signalGroupId\n- inputId\n- connectionId\n- approachId\n- laneInId\n- laneOutId\n\nReferencing attributes are only used when initiating a request. When updating or cancelling the request, the request is identified by its requestId, and no referencing attributes are allowed.\n\nYou initiate a priority request with type set to ‘new’. You must provide a request id that uniquely identifies the request on the controller. It can be a randomly generated UUID (universally unique identifier), or it can be constructed by combining e.g. a vehicle id and some other identifier. When updating or cancelling a request, you must pass the same request id again.\n\nProviding ETA (estimated time of arrival) when initiating a request is optional, but can help the controller plan ahead in cases where you’re able to send the request before the vehicle arrives at the intersection. You’re allowed to initiate the request without an ETA and provide it in a later request update. But providing the ETA when initiating the request is recommended, since it will give the controller more time to plan ahead.\n\nLike ETA, providing a vehicle type is optional, but can help the controller decide how to best handle the request.\n\nThe priority level provides a way to indicate the relative importance of the request compared to other requests. For example, emergency vehicles or delayed buses could be given a higher priority level.\n\nIf the ETA changes before the priority is cancelled, or you want to change the priority level, you can send another request message with type set to ‘update’. The vehicle type cannot be changed.\n\nWhen you send a priority request, it will be processed to decide if it’s possible to activate the requested priority.\n\nIf the request is accepted, the priority can either be activated immediately, or if another priority is currently active, it can be queued for later activation.\n\nIf the priority cannot be accepted the request is rejected. Cooldown is a specific type of rejection, which means that s similar request has just completed, and some time needs to pass before a similar request can be activated.\n\nWhen a request is queued, it is expected to become activated later, but in case too long passes without activation, the controller is expected to time out the request.\n\nOnce a priority is activated, you’re excepted to cancel it as soon as there’s no need for it anymore, typically when the vehicle has passed the intersection. You cancel a request by sending a request passing the existing request id setting the type to ‘cancel’.\n\nIf a request is never cancelled, the controller is expected to remove the priority at some point, but until then the priority might block requests in other direction which is why you should always cancel a priority when it’s not needed anymore.",
3
+ "allOf" : [
4
+ {
5
+ "properties" : {
6
+ "n" : {
7
+ "enum" : [
8
+ "approachId",
9
+ "connectionId",
10
+ "eta",
11
+ "inputId",
12
+ "laneInId",
13
+ "laneOutId",
14
+ "level",
15
+ "priorityId",
16
+ "requestId",
17
+ "signalGroupId",
18
+ "type",
19
+ "vehicleType"
20
+ ]
21
+ },
22
+ "cO" : {
23
+ "const" : "requestPriority"
24
+ }
25
+ }
26
+ },
27
+ {
28
+ "if" : {
29
+ "required" : [
30
+ "q"
31
+ ],
32
+ "properties" : {
33
+ "q" : {
34
+ "const" : "undefined"
35
+ }
36
+ }
37
+ },
38
+ "then" : {
39
+ "s" : {
40
+ "type" : "null"
41
+ }
42
+ },
43
+ "else" : {
44
+ "allOf" : [
45
+ {
46
+ "if" : {
47
+ "required" : [
48
+ "n"
49
+ ],
50
+ "properties" : {
51
+ "n" : {
52
+ "const" : "requestId"
53
+ }
54
+ }
55
+ },
56
+ "then" : {
57
+ "properties" : {
58
+ "v" : {
59
+ "description" : "A string that uniquely identifies the request on the controller",
60
+ "type" : "string"
61
+ }
62
+ }
63
+ }
64
+ },
65
+ {
66
+ "if" : {
67
+ "required" : [
68
+ "n"
69
+ ],
70
+ "properties" : {
71
+ "n" : {
72
+ "const" : "signalGroupId"
73
+ }
74
+ }
75
+ },
76
+ "then" : {
77
+ "properties" : {
78
+ "v" : {
79
+ "description" : "ID of a signal group component.",
80
+ "type" : "string"
81
+ }
82
+ }
83
+ }
84
+ },
85
+ {
86
+ "if" : {
87
+ "required" : [
88
+ "n"
89
+ ],
90
+ "properties" : {
91
+ "n" : {
92
+ "const" : "inputId"
93
+ }
94
+ }
95
+ },
96
+ "then" : {
97
+ "properties" : {
98
+ "v" : {
99
+ "allOf" : [
100
+ {
101
+ "description" : "ID of an input, using the same numbering scheme as M0006"
102
+ },
103
+ {
104
+ "$ref" : "../../../core/3.1.2/definitions.json#/integer"
105
+ }
106
+ ]
107
+ }
108
+ }
109
+ }
110
+ },
111
+ {
112
+ "if" : {
113
+ "required" : [
114
+ "n"
115
+ ],
116
+ "properties" : {
117
+ "n" : {
118
+ "const" : "connectionId"
119
+ }
120
+ }
121
+ },
122
+ "then" : {
123
+ "properties" : {
124
+ "v" : {
125
+ "allOf" : [
126
+ {
127
+ "description" : "ID of a connection, connecting an ingoing and an outgoing lane"
128
+ },
129
+ {
130
+ "$ref" : "../../../core/3.1.2/definitions.json#/integer"
131
+ }
132
+ ]
133
+ }
134
+ }
135
+ }
136
+ },
137
+ {
138
+ "if" : {
139
+ "required" : [
140
+ "n"
141
+ ],
142
+ "properties" : {
143
+ "n" : {
144
+ "const" : "approachId"
145
+ }
146
+ }
147
+ },
148
+ "then" : {
149
+ "properties" : {
150
+ "v" : {
151
+ "allOf" : [
152
+ {
153
+ "description" : "ID of an intersection approach"
154
+ },
155
+ {
156
+ "$ref" : "../../../core/3.1.2/definitions.json#/integer"
157
+ }
158
+ ]
159
+ }
160
+ }
161
+ }
162
+ },
163
+ {
164
+ "if" : {
165
+ "required" : [
166
+ "n"
167
+ ],
168
+ "properties" : {
169
+ "n" : {
170
+ "const" : "laneInId"
171
+ }
172
+ }
173
+ },
174
+ "then" : {
175
+ "properties" : {
176
+ "v" : {
177
+ "allOf" : [
178
+ {
179
+ "description" : "ID of an ingoing lane"
180
+ },
181
+ {
182
+ "$ref" : "../../../core/3.1.2/definitions.json#/integer"
183
+ }
184
+ ]
185
+ }
186
+ }
187
+ }
188
+ },
189
+ {
190
+ "if" : {
191
+ "required" : [
192
+ "n"
193
+ ],
194
+ "properties" : {
195
+ "n" : {
196
+ "const" : "laneOutId"
197
+ }
198
+ }
199
+ },
200
+ "then" : {
201
+ "properties" : {
202
+ "v" : {
203
+ "allOf" : [
204
+ {
205
+ "description" : "ID of an outgoing lane"
206
+ },
207
+ {
208
+ "$ref" : "../../../core/3.1.2/definitions.json#/integer"
209
+ }
210
+ ]
211
+ }
212
+ }
213
+ }
214
+ },
215
+ {
216
+ "if" : {
217
+ "required" : [
218
+ "n"
219
+ ],
220
+ "properties" : {
221
+ "n" : {
222
+ "const" : "priorityId"
223
+ }
224
+ }
225
+ },
226
+ "then" : {
227
+ "properties" : {
228
+ "v" : {
229
+ "allOf" : [
230
+ {
231
+ "description" : "ID of a priority"
232
+ },
233
+ {
234
+ "$ref" : "../../../core/3.1.2/definitions.json#/integer"
235
+ }
236
+ ]
237
+ }
238
+ }
239
+ }
240
+ },
241
+ {
242
+ "if" : {
243
+ "required" : [
244
+ "n"
245
+ ],
246
+ "properties" : {
247
+ "n" : {
248
+ "const" : "type"
249
+ }
250
+ }
251
+ },
252
+ "then" : {
253
+ "properties" : {
254
+ "v" : {
255
+ "type" : "string",
256
+ "enum" : [
257
+ "cancel",
258
+ "new",
259
+ "update"
260
+ ]
261
+ }
262
+ }
263
+ }
264
+ },
265
+ {
266
+ "if" : {
267
+ "required" : [
268
+ "n"
269
+ ],
270
+ "properties" : {
271
+ "n" : {
272
+ "const" : "level"
273
+ }
274
+ }
275
+ },
276
+ "then" : {
277
+ "properties" : {
278
+ "v" : {
279
+ "allOf" : [
280
+ {
281
+ "description" : "0: Lowest, 14: Highest"
282
+ },
283
+ {
284
+ "$ref" : "../../../core/3.1.2/definitions.json#/integer"
285
+ }
286
+ ]
287
+ }
288
+ }
289
+ }
290
+ },
291
+ {
292
+ "if" : {
293
+ "required" : [
294
+ "n"
295
+ ],
296
+ "properties" : {
297
+ "n" : {
298
+ "const" : "eta"
299
+ }
300
+ }
301
+ },
302
+ "then" : {
303
+ "properties" : {
304
+ "v" : {
305
+ "allOf" : [
306
+ {
307
+ "description" : "Estimated time of arrival to the intersection, in seconds"
308
+ },
309
+ {
310
+ "$ref" : "../../../core/3.1.2/definitions.json#/integer"
311
+ }
312
+ ]
313
+ }
314
+ }
315
+ }
316
+ },
317
+ {
318
+ "if" : {
319
+ "required" : [
320
+ "n"
321
+ ],
322
+ "properties" : {
323
+ "n" : {
324
+ "const" : "vehicleType"
325
+ }
326
+ }
327
+ },
328
+ "then" : {
329
+ "properties" : {
330
+ "v" : {
331
+ "description" : "Vehicle type",
332
+ "type" : "string",
333
+ "enum" : [
334
+ "bicycle",
335
+ "bus",
336
+ "car",
337
+ "emergency",
338
+ "heavyTruck",
339
+ "lightTruck",
340
+ "motorcycle",
341
+ "other",
342
+ "pedestrian",
343
+ "safetyCar",
344
+ "specialTransport",
345
+ "tram"
346
+ ]
347
+ }
348
+ }
349
+ }
350
+ }
351
+ ]
352
+ }
353
+ }
354
+ ]
355
+ }
@@ -0,0 +1,85 @@
1
+ {
2
+ "description" : "Set timeout for dynamic bands\nSwitch to a designated time plan if this timeout is reached due to lost connection with the supervisor.\nDisable by setting timeout to '0'.\nUsed in conjunction with dynamic bands, M0014\nRequires security code 2.",
3
+ "allOf" : [
4
+ {
5
+ "properties" : {
6
+ "n" : {
7
+ "enum" : [
8
+ "securityCode",
9
+ "status"
10
+ ]
11
+ },
12
+ "cO" : {
13
+ "const" : "setTimeout"
14
+ }
15
+ }
16
+ },
17
+ {
18
+ "if" : {
19
+ "required" : [
20
+ "q"
21
+ ],
22
+ "properties" : {
23
+ "q" : {
24
+ "const" : "undefined"
25
+ }
26
+ }
27
+ },
28
+ "then" : {
29
+ "s" : {
30
+ "type" : "null"
31
+ }
32
+ },
33
+ "else" : {
34
+ "allOf" : [
35
+ {
36
+ "if" : {
37
+ "required" : [
38
+ "n"
39
+ ],
40
+ "properties" : {
41
+ "n" : {
42
+ "const" : "status"
43
+ }
44
+ }
45
+ },
46
+ "then" : {
47
+ "properties" : {
48
+ "v" : {
49
+ "allOf" : [
50
+ {
51
+ "description" : "Timeout, in minutes"
52
+ },
53
+ {
54
+ "$ref" : "../../../core/3.1.2/definitions.json#/integer"
55
+ }
56
+ ]
57
+ }
58
+ }
59
+ }
60
+ },
61
+ {
62
+ "if" : {
63
+ "required" : [
64
+ "n"
65
+ ],
66
+ "properties" : {
67
+ "n" : {
68
+ "const" : "securityCode"
69
+ }
70
+ }
71
+ },
72
+ "then" : {
73
+ "properties" : {
74
+ "v" : {
75
+ "description" : "Security code 2",
76
+ "type" : "string"
77
+ }
78
+ }
79
+ }
80
+ }
81
+ ]
82
+ }
83
+ }
84
+ ]
85
+ }
@@ -0,0 +1,103 @@
1
+ {
2
+ "description" : "Set security code.\nChange the security code to use when sending commands\nSecurity codes are used as an extra layer of security in many commands. They need to match between the supervision system and the traffic light controller in order for the commands to be executed.",
3
+ "allOf" : [
4
+ {
5
+ "properties" : {
6
+ "n" : {
7
+ "enum" : [
8
+ "newSecurityCode",
9
+ "oldSecurityCode",
10
+ "status"
11
+ ]
12
+ },
13
+ "cO" : {
14
+ "const" : "setSecurityCode"
15
+ }
16
+ }
17
+ },
18
+ {
19
+ "if" : {
20
+ "required" : [
21
+ "q"
22
+ ],
23
+ "properties" : {
24
+ "q" : {
25
+ "const" : "undefined"
26
+ }
27
+ }
28
+ },
29
+ "then" : {
30
+ "s" : {
31
+ "type" : "null"
32
+ }
33
+ },
34
+ "else" : {
35
+ "allOf" : [
36
+ {
37
+ "if" : {
38
+ "required" : [
39
+ "n"
40
+ ],
41
+ "properties" : {
42
+ "n" : {
43
+ "const" : "status"
44
+ }
45
+ }
46
+ },
47
+ "then" : {
48
+ "properties" : {
49
+ "v" : {
50
+ "type" : "string",
51
+ "enum" : [
52
+ "Level1",
53
+ "Level2"
54
+ ]
55
+ }
56
+ }
57
+ }
58
+ },
59
+ {
60
+ "if" : {
61
+ "required" : [
62
+ "n"
63
+ ],
64
+ "properties" : {
65
+ "n" : {
66
+ "const" : "oldSecurityCode"
67
+ }
68
+ }
69
+ },
70
+ "then" : {
71
+ "properties" : {
72
+ "v" : {
73
+ "description" : "Previous security code",
74
+ "type" : "string"
75
+ }
76
+ }
77
+ }
78
+ },
79
+ {
80
+ "if" : {
81
+ "required" : [
82
+ "n"
83
+ ],
84
+ "properties" : {
85
+ "n" : {
86
+ "const" : "newSecurityCode"
87
+ }
88
+ }
89
+ },
90
+ "then" : {
91
+ "properties" : {
92
+ "v" : {
93
+ "description" : "New security code",
94
+ "type" : "string"
95
+ }
96
+ }
97
+ }
98
+ }
99
+ ]
100
+ }
101
+ }
102
+ ]
103
+ }