-
Notifications
You must be signed in to change notification settings - Fork 25
/
wb-mqtt-serial-rpc-port-setup-request.schema.json
103 lines (103 loc) · 2.14 KB
/
wb-mqtt-serial-rpc-port-setup-request.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
{
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"definitions": {
"cfg": {
"type": "object",
"properties": {
"baud_rate": {
"type": "integer",
"enum": [110, 300, 600, 1200, 2400, 4800, 9600, 19200, 38400, 57600, 115200]
},
"parity": {
"type": "integer",
"enum": [0, 1, 2]
},
"stop_bits": {
"type": "integer",
"enum": [1, 2]
},
"slave_id": {
"type": "integer"
}
}
},
"item": {
"type": "object",
"properties": {
"slave_id": {
"type": "integer"
},
"baud_rate": {
"type": "integer",
"enum": [110, 300, 600, 1200, 2400, 4800, 9600, 19200, 38400, 57600, 115200]
},
"parity": {
"type": "string",
"enum": ["N", "E", "O"]
},
"data_bits": {
"type": "integer",
"enum": [5, 6, 7, 8]
},
"stop_bits": {
"type": "integer",
"enum": [1, 2]
},
"cfg": {
"$ref": "#/definitions/cfg"
}
}
}
},
"properties": {
"total_timeout": {
"description": "Request execution time in seconds including queue time and thread operations, default 10",
"type": "integer",
"minimum": 0
}
},
"oneOf": [
{
"properties": {
"path": {
"type": "string"
},
"items": {
"type": "array",
"items": {
"$ref": "#/definitions/item"
}
}
},
"required": [
"path",
"items"
]
},
{
"properties": {
"ip": {
"type": "string",
"pattern": "^((25[0-5]|(2[0-4]|1\\d|[1-9]|)\\d)(\\.(?!$)|$)){4}$"
},
"port": {
"type": "integer",
"minimum": 0,
"maximum": 65535
},
"items": {
"type": "array",
"items": {
"$ref": "#/definitions/item"
}
}
},
"required": [
"ip",
"port",
"items"
]
}
]
}