-
Notifications
You must be signed in to change notification settings - Fork 2
/
interfaces_schema.json
528 lines (528 loc) · 17.7 KB
/
interfaces_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
{
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"title": "RemotiveBroker configuration",
"description": "JSON configuration file for RemotiveBroker. The configuration file must be named `interfaces.json` and all paths in the configuration are relative paths to this file.\nConfigures all interfaces that the broker will operate on.",
"properties": {
"chains": {
"description": "List of configured interfaces available to RemotiveBroker.",
"items": {
"oneOf": [
{
"description": "Virtual signaling interface. This device doesn't use a database, any published signals will be sent to subscribers of the given signal.",
"properties": {
"namespace": {
"$ref": "#/defs/namespace"
},
"type": {
"description": "Specifies a virtual interface.",
"default": "virtual",
"enum": [
"virtual"
]
}
},
"required": [
"namespace",
"type"
],
"title": "Virtual",
"type": "object"
},
{
"title": "Scripted",
"description": "Scripted signals",
"type": "object",
"properties": {
"namespace": {
"$ref": "#/defs/namespace"
},
"type": {
"description": "Specifies a scripted interface.",
"default": "scripted",
"enum": [
"scripted"
]
},
"database": {
"$ref": "#/defs/signal_db",
"description": "Path to a scripted database"
},
"public": {
"$ref": "#/defs/public"
}
},
"required": [
"namespace",
"type"
]
},
{
"description": "CAN interface.",
"properties": {
"database": {
"$ref": "#/defs/signal_db",
"description": "Path to signal database file. Supporting .dbc and .arxml. When using an arxml database, can_physical_channel_name must be specified."
},
"can_physical_channel_name": {
"$ref": "#/defs/can_physical_channel_name"
},
"device_name": {
"description": "Name of device in OS.",
"type": "string"
},
"namespace": {
"$ref": "#/defs/namespace"
},
"short_names": {
"$ref": "#/defs/short_names"
},
"type": {
"description": "Specifies a CAN interface.",
"default": "can",
"enum": [
"can"
]
},
"baud_rate": {
"description": "baud rate to apply to CAN when starting interface.",
"type": "integer"
},
"public": {
"$ref": "#/defs/public"
},
"auto_recover": {
"$ref": "#/defs/auto_recover"
},
"extended": {
"$ref": "#/defs/extended"
}
},
"required": [
"type",
"namespace",
"device_name",
"database"
],
"title": "CAN",
"type": "object"
},
{
"description": "CAN-FD interface.",
"properties": {
"database": {
"$ref": "#/defs/signal_db",
"description": "Path to signal database file. Supporting .dbc and .arxml. When using an arxml database, can_physical_channel_name must be specified."
},
"can_physical_channel_name": {
"$ref": "#/defs/can_physical_channel_name"
},
"device_name": {
"description": "Name of device in OS.",
"type": "string"
},
"namespace": {
"$ref": "#/defs/namespace"
},
"short_names": {
"$ref": "#/defs/short_names"
},
"type": {
"description": "Specifies a CAN-FD interface.",
"default": "canfd",
"enum": [
"canfd"
]
},
"baud_rate": {
"description": "baud rate to apply to CAN when starting interface.",
"type": "integer"
},
"dbaud_rate": {
"description": "baud rate to apply to CAN-FD when starting interface.",
"type": "integer"
},
"public": {
"$ref": "#/defs/public"
},
"auto_recover": {
"$ref": "#/defs/auto_recover"
},
"extended": {
"$ref": "#/defs/extended"
}
},
"dependencies": {
"baud_rate": [
"dbaud_rate"
],
"dbaud_rate": [
"baud_rate"
]
},
"required": [
"type",
"namespace",
"device_name",
"database"
],
"title": "CAN-FD",
"type": "object"
},
{
"description": "CAN-via-UDP protocol. Can be used to communicate between RemotiveBrokers.",
"properties": {
"database": {
"$ref": "#/defs/signal_db",
"description": "Path to signal database file. Supporting .dbc and .arxml. When using an arxml database, can_physical_channel_name must be specified."
},
"can_physical_channel_name": {
"$ref": "#/defs/can_physical_channel_name"
},
"fixed_payload_size": {
"description": "If set, will use this frame size (bytes) for all packets.",
"minimum": 0,
"type": "integer"
},
"namespace": {
"$ref": "#/defs/namespace"
},
"server_port": {
"$ref": "#/defs/port",
"description": "UDP port for RemotiveBroker to listen to and receive packets on."
},
"short_names": {
"$ref": "#/defs/short_names"
},
"target_host": {
"$ref": "#/defs/host"
},
"target_port": {
"$ref": "#/defs/port",
"description": "UDP port for RemotiveBroker to send packets to."
},
"type": {
"description": "Specifies a CAN-via-UDP interface.",
"default": "udp",
"enum": [
"udp"
]
},
"public": {
"$ref": "#/defs/public"
}
},
"required": [
"type",
"namespace",
"database",
"server_port",
"target_port",
"target_host"
],
"title": "UDP",
"type": "object"
},
{
"description": "LIN master or slave node interface. Connects to a RemotiveLabs LIN ethernet device.",
"properties": {
"config": {
"description": "LIN network configuration for communicating with RemotiveLabs LIN service.",
"properties": {
"device_identifier": {
"description": "LIN node ID.",
"maximum": 16,
"minimum": 0,
"type": "integer"
},
"server_port": {
"$ref": "#/defs/port",
"description": "Port for receiving LIN connection to RemotiveBroker."
},
"target_host": {
"$ref": "#/defs/host"
},
"target_port": {
"$ref": "#/defs/port"
}
},
"required": [
"device_identifier",
"server_port",
"target_port"
],
"type": "object"
},
"database": {
"$ref": "#/defs/signal_db",
"description": "Path to LIN signal database `.ldf` file."
},
"namespace": {
"$ref": "#/defs/namespace"
},
"node_mode": {
"description": "Type of LIN node.",
"enum": [
"master",
"slave"
]
},
"schedule_autostart": {
"description": "Should LIN schedules start at boot? Or pause until user command.",
"type": "boolean"
},
"schedule_file": {
"description": "Path to `.ldf` file used for schedules.",
"type": "string"
},
"schedule_table_name": {
"description": "Path to `.ldf` file used for tables. TODO",
"type": "string"
},
"type": {
"description": "Specifies a LIN interface.",
"default": "lin",
"enum": [
"lin"
]
},
"public": {
"$ref": "#/defs/public"
}
},
"required": [
"namespace",
"type",
"config",
"node_mode",
"database"
],
"if": {
"properties": {
"node_mode": {
"const": "master"
}
}
},
"then": {
"required": [
"schedule_file",
"schedule_table_name",
"schedule_autostart"
]
},
"title": "LIN",
"type": "object"
},
{
"description": "FlexRay interface.",
"properties": {
"config": {
"oneOf": [
{
"description": "RemotiveLabs software adapter.",
"properties": {
"target_host": {
"$ref": "#/defs/host"
},
"target_port": {
"$ref": "#/defs/port"
}
},
"required": [
"target_host",
"target_port"
],
"title": "Software adapter",
"type": "object"
},
{
"description": "Technica CAN combo hardware.",
"properties": {
"hardware": {
"description": "What type of hardware.",
"default": "Technica_CM_CAN_COMBO",
"enum": [
"Technica_CM_CAN_COMBO"
]
},
"target_config": {
"properties": {
"interface": {
"description": "Network interface to use.\nFor example `eth0`.",
"type": "string"
},
"multicast": {
"description": "MAC address to use for multicast.\nFor example `01:00:5e:00:00:00`.",
"type": "string"
}
},
"required": [
"interface",
"multicast"
],
"type": "object"
},
"target_host": {
"$ref": "#/defs/host"
},
"target_port": {
"$ref": "#/defs/port"
}
},
"required": [
"target_host",
"target_port",
"hardware",
"target_config"
],
"title": "Technica",
"type": "object"
}
]
},
"database": {
"$ref": "#/defs/signal_db",
"description": "Path to FlexRay signal database `.xml` (FIBEX) file."
},
"fibex_file": {
"$ref": "#/defs/signal_db",
"description": "This property is deprecated, use database instead."
},
"namespace": {
"$ref": "#/defs/namespace"
},
"type": {
"description": "Specifies a FlexRay interface.",
"default": "flexray",
"enum": [
"flexray"
]
},
"public": {
"$ref": "#/defs/public"
}
},
"required": [
"type",
"namespace",
"config",
"database"
],
"title": "FlexRay",
"type": "object"
}
]
},
"type": "array"
},
"node_name": {
"description": "Name of the RemotiveBroker node. Required only if the configuration is used in the distributed broker mode. Example `some_node@hostname`",
"type": "string"
},
"grpc_server": {
"description": "Configuration for build in gRPC server. Documentation for available service is available on <https://docs.remotivelabs.com>.",
"properties": {
"port": {
"description": "Server port for gRPC server.",
"maximum": 65535,
"minimum": 0,
"type": "integer"
}
},
"required": [
"port"
],
"type": "object"
},
"reflectors": {
"description": "A list of reflector configurations.",
"type": "array",
"items": {
"type": "object",
"properties": {
"reflect": {
"description": "Configure reflectors to always bounce traffic.",
"type": "array",
"items": {
"description": "Bounce mechanism, with a _source_ and a _destination_.",
"type": "object",
"properties": {
"source": {
"description": "Name of source namespace.",
"type": "string"
},
"dest": {
"description": "Name of destination namespace.",
"type": "string"
},
"exclude": {
"description": "List of frames to exclude in reflector.",
"type": "array",
"items": {
"description": "Name of frame to exclude",
"type": "string"
}
}
},
"required": [
"source",
"dest"
]
}
}
},
"required": [
"reflect"
]
}
}
},
"required": [
"chains"
],
"defs": {
"auto_recover": {
"default": true,
"description": "Monitor CAN interfaces for state changes to error passive and reset upon detection. Note: Using virtual CAN devices will not support the built-in automatic recovery for CAN devices that enter passive mode. If automatic recovery mode is enabled for a virtual device, the server will issue a warning each time it attempts to retrieve the device's state.",
"type": "boolean"
},
"extended": {
"description": "Indicate that frames use an extended frame format (EFF) with a 29-bit identifier, as opposed to the standard frame format (SFF) which uses an 11-bit identifier.",
"type": "boolean",
"default": false
},
"host": {
"description": "Network address accepted by the OS. Eg. Ipv4: `127.0.0.1`.",
"type": "string"
},
"namespace": {
"description": "Name assigned to device, used in signal operations.",
"type": "string"
},
"port": {
"description": "Networking port",
"maximum": 65535,
"minimum": 0,
"type": "integer"
},
"short_names": {
"default": true,
"description": "Have signals addressable in the RemotiveBroker by their name in the database.\nIf `false`, signal names with be generated base on their respective name space.",
"type": "boolean"
},
"signal_db": {
"description": "Path to signal database.",
"type": "string"
},
"can_physical_channel_name": {
"type": "string",
"description": "This property is required when using an arxml database. Path to the physical channel that should be used. Referenced by SHORT-NAME element, e.g. /Topology/Name/ID"
},
"public": {
"description": "Configure the interface to be public or private, default is public. Private namespaces are not exposed by the broker. This is useful for example when working with for example scripted VSS signals and you don't want the designer to see the internal vehicle signals.",
"type": "boolean",
"default": true
}
}
}