-
Notifications
You must be signed in to change notification settings - Fork 38
/
schema.json
553 lines (549 loc) · 15.9 KB
/
schema.json
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
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "redsea",
"description": "Array of RDS groups from redsea",
"definitions": {
"pi": {
"type": "string",
"pattern": "^0x[0-9A-F]{4}$"
},
"grouptype": {
"type": "string",
"pattern": "^([0-9]|1[0-5])[AB]$"
},
"di": {
"type": "object",
"properties": {
"compressed": { "type": "boolean" },
"artificial_head": { "type": "boolean" },
"stereo": { "type": "boolean" },
"dynamic_pty": { "type": "boolean" }
},
"additionalProperties": false
},
"radiotext": {
"type": "string",
"maxLength": 64
},
"ps": {
"type": "string",
"minLength": 8,
"maxLength": 8
},
"long_ps": {
"type": "string",
"maxLength": 32
},
"rtplus": {
"type": "object",
"properties": {
"tags": {
"type": "array",
"items": {
"content-type": {
"type": "string",
"enum": ["dummy_class", "item.title", "item.album",
"item.tracknumber", "item.artist", "item.composition",
"item.movement", "item.conductor", "item.composer",
"item.band", "item.comment", "item.genre", "info.news",
"info.news.local", "info.stockmarket", "info.sport",
"info.lottery", "info.horoscope", "info.daily_diversion",
"info.health", "info.event", "info.scene", "info.cinema",
"info.tv", "info.date_time", "info.weather", "info.traffic",
"info.alarm", "info.advertisement", "info.url", "info.other",
"stationname.short", "stationname.long", "programme.now",
"programme.next", "programme.part", "programme.host",
"programme.editorial_staff", "programme.frequency",
"programme.homepage", "programme.subchannel",
"phone.hotline", "phone.studio", "phone.other", "sms.studio",
"sms.other", "email.hotline", "email.studio", "email.other",
"mms.other", "chat", "chat.centre", "vote.question",
"vote.centre", "unknown", "place", "appointment",
"identifier", "purchase", "get_data"]
}
}
},
"data": {
"type": "string"
},
"item_running": {
"type": "boolean"
},
"item_toggle": {
"type": "integer",
"minimum": 0,
"maximum": 1
}
},
"additionalProperties": false
},
"pin": {
"type": "object",
"properties": {
"day": {
"type": "integer",
"minimum": 1,
"maximum": 31
},
"time": {
"type": "string",
"pattern": "^[0-2][0-9]:[0-5][0-9]$"
}
},
"additionalProperties": false
},
"alt_freq_b": {
"type": "object",
"properties": {
"tuned_frequency": {
"type": "integer",
"minimum": 153,
"maximum": 107900
},
"same_programme": {
"type": "array",
"items": {
"type": "integer",
"minimum": 153,
"maximum": 107900
}
},
"regional_variants": {
"type": "array",
"items": {
"type": "integer",
"minimum": 153,
"maximum": 107900
}
}
},
"additionalProperties": false
},
"tmc": {
"type": "object",
"oneOf": [{
"system_info": {
"type": "object",
"properties": {
"is_encrypted": { "type": "boolean" },
"is_on_alt_freq": {
"description": "Whether alternative frequencies carry TMC",
"type": "boolean"
},
"location_table": {
"description": "Location table number (LTN)",
"type": "integer",
"minimum": 0,
"maximum": 63
},
"encryption_id": {
"type": "integer",
"minimum": 0,
"maximum": 31
},
"scope": {
"type": "array",
"items": {
"type": "string",
"enum": ["inter-road", "national", "regional", "urban"]
}
},
"gap": {
"description": "Number of groups between successive 8A groups",
"type": "integer",
"enum": [3, 5, 8, 11]
},
"service_id": {
"type": "integer",
"minimum": 0,
"maximum": 63
},
"delay_time": {
"description": "Position of the start of the activity/window sequence, referenced from the minute's edge, in seconds",
"type": "integer",
"enum": [0, 1, 2, 3]
},
"activity_time": {
"description": "The time in a time slot during which 8A groups may be transmitted (seconds)",
"type": "integer",
"enum": [1, 2, 4, 8]
},
"window_time": {
"description": "The time in a time slot during which transmission of 8A groups is suspended (seconds)",
"type": "integer",
"enum": [1, 2, 4, 8]
}
},
"additionalProperties": false
},
"message": {
"type": "object",
"properties": {
"description": {
"description": "Human-readable message",
"type": "string"
},
"direction": {
"description": "Whether this event affects only one direction",
"type": "string",
"enum": ["single", "both"]
},
"extent": {
"description": "The event affects this many points from location",
"type": "string",
"pattern": "^(\\+|-)[0-9]+$"
},
"location": {
"description": "Location code (reference to a location database)",
"type": "integer",
"minimum": 0,
"maximum": 65535
},
"encrypted_location": {
"description": "Location code in its encrypted form",
"type": "integer",
"minimum": 0,
"maximum": 65535
},
"event_codes": {
"description": "Event codes (references to event code list)",
"type": "array",
"items": {
"type": "number",
"minimum": 0,
"maximum": 2047
}
},
"road_number": {
"type": "integer"
},
"span_from": {
"type": "string"
},
"span_to": {
"type": "string"
},
"coordinates": {
"description": "Affected point or route",
"type": "object",
"properties": {
"lat": {
"description": "Degrees North",
"type": "number",
"minimum": -90,
"maximum": 90
},
"lon": {
"description": "Degrees East",
"type": "number",
"minimum": -180,
"maximum": 180
}
}
},
"urgency": {
"description": "Message urgency: normal/urgent/extremely urgent",
"type": "string",
"enum": ["none", "U", "X"]
},
"update_class": {
"description": "Message replaces previous messages of this class",
"type": "integer"
}
},
"additionalProperties": false
}
}]
}
},
"type": "array",
"items": {
"type": "object",
"properties": {
"group": {
"description": "Group type",
"$ref": "#/definitions/grouptype"
},
"pi": {
"description": "Program Identification code",
"$ref": "#/definitions/pi"
},
"callsign": {
"description": "Call sign letters for a North American (RBDS) station",
"type": "string"
},
"callsign_uncertain": {
"description": "Call sign letters for a North American (RBDS) station - probably erroneous due to a TMC workaround",
"type": "string"
},
"channel": {
"description": "Which channel of a multi-channel signal this group was received on",
"type": "integer",
"minimum": 1
},
"prog_type": {
"description": "Program Type",
"type": "string"
},
"tp": {
"description": "Traffic Program flag",
"type": "boolean"
},
"is_music": {
"description": "Music/Speech flag",
"type": "boolean"
},
"ta": {
"description": "Traffic Announcement flag",
"type": "boolean"
},
"radiotext": {
"$ref": "#/definitions/radiotext"
},
"ps": {
"description": "Program Service name",
"$ref": "#/definitions/ps"
},
"long_ps": {
"description": "Long PS",
"$ref": "#/definitions/long_ps"
},
"country": {
"description": "ISO country code",
"type": "string",
"minLength": 2,
"maxLength": 2
},
"has_linkage": {
"type": "boolean"
},
"di": {
"description": "Decoder identification code",
"$ref": "#/definitions/di"
},
"language": {
"description": "Program language",
"type": "string"
},
"radiotext_plus": {
"$ref": "#/definitions/rtplus"
},
"tmc": {
"description": "Traffic Message Channel",
"$ref": "#/definitions/tmc"
},
"alt_frequencies_a": {
"description": "Alternative Frequencies (Method A)",
"type": "array",
"items": {
"type": "integer"
}
},
"alt_frequencies_b": {
"description": "Alternative Frequencies (Method B)",
"$ref": "#/definitions/alt_freq_b"
},
"prog_item_number": {
"description": "A numeric identifier for the currently running program",
"type": "integer",
"minimum": 0,
"maximum": 65535
},
"prog_item_started": {
"description": "Program Item number (start time)",
"$ref": "#/definitions/pin"
},
"bler": {
"description": "Block Error Rate (averaged percentage of erroneous blocks)",
"type": "integer",
"minimum": 0,
"maximum": 100
},
"debug": {
"description": "Debug messages from redsea",
"type": "array",
"items": {
"type": "string"
}
},
"tmc_id": {
"type": "integer",
"minimum": 0,
"maximum": 4095
},
"ews": {
"description": "Emergency Warning System channel number",
"type": "integer",
"minimum": 0,
"maximum": 4095
},
"partial_radiotext": {
"description": "Incompletely received RadioText",
"$ref": "#/definitions/radiotext"
},
"partial_ps": {
"description": "Incompletely received Program Service name",
"$ref": "#/definitions/ps"
},
"partial_alt_frequencies": {
"description": "Incomplete list of Alternative Frequencies",
"type": "array",
"items": {
"type": "integer"
}
},
"partial_long_ps": {
"description": "Incomplete Long PS message",
"$ref": "#/definitions/long_ps"
},
"open_data_app": {
"type": "object",
"properties": {
"oda_group": {
"description": "The group that carries this Open Data Application",
"$ref": "#/definitions/grouptype"
},
"app_name": { "type": "string" },
"message": {
"type": "integer",
"minimum": 0,
"maximum": 65535
}
},
"additionalProperties": false
},
"unknown_oda": {
"description": "Data for an unsupported or unknown Open Data Application",
"type": "object",
"properties": {
"app_name": {
"description": "Name of the application, if available",
"type": "string"
},
"raw_data": {
"type": "string"
}
}
},
"clock_time": {
"description": "Time and date at transmitter (formatted to RFC 3339, section 5.6)",
"type": "string",
"pattern": "^....-..-..T..:..:..((\\+|-)..:..|Z)$"
},
"rx_time": {
"description": "Time of demodulation/decoding",
"type": "string"
},
"transparent_data": {
"description": "Freeform data",
"type": "object",
"properties": {
"address": {
"description": "Address of this transparent data channel",
"type": "integer",
"minimum": 0,
"maximum": 31
},
"raw": {
"description": "Hexadecimal values of the data bytes sent in this group",
"type": "string"
},
"as_text": {
"description": "The data interpreted as RDS text",
"type": "string"
},
"full_text": {
"description": "All channels concatenated when 128 bytes are received contiguously",
"type": "string"
},
"full_raw": {
"description": "All channels concatenated when 128 bytes are received contiguously (hexadecimal)",
"type": "string"
}
}
},
"dab": {
"description": "RDS/DAB cross-referencing",
"type": "object",
"properties": {
"mode": {
"type": "string"
},
"kilohertz": {
"type": "integer"
},
"ensemble_id": {
"type": "integer"
}
}
},
"pty_name": {
"description": "Programme type name",
"type": "string"
},
"in_house_data": {
"description": "The contents of these bits are defined by the operator",
"type": "array",
"items": {
"type": "integer",
"minimum": 0,
"maximum": 65535
}
},
"other_network": {
"description": "Information about programs on other networks",
"type": "object",
"properties": {
"pi": {
"$ref": "#/definitions/pi"
},
"tp": {
"type": "boolean"
},
"ta": {
"type": "boolean"
},
"ps": {
"$ref": "#/definitions/ps"
},
"prog_type": {
"type": "string"
},
"alt_frequencies": {
"type": "array",
"items": {
"type": "integer"
}
},
"kilohertz": {
"type": "integer"
},
"has_linkage": {
"type": "boolean"
},
"linkage_set": {
"type": "integer",
"minimum": 0,
"maximum": 4095
},
"prog_item_number": {
"description": "A numeric identifier for the currently running program",
"type": "integer",
"minimum": 0,
"maximum": 65535
},
"prog_item_started": {
"$ref": "#/definitions/pin"
},
"broadcaster data": {
"type": "string"
}
},
"required": ["pi"],
"additionalProperties": false
}
},
"required": ["pi"],
"additionalProperties": false
}
}