|
36 | 36 | "properties": { |
37 | 37 | "connections": { |
38 | 38 | "items": { |
39 | | - "properties": { |
40 | | - "baudrate": { |
41 | | - "description": "Baud rate (serial only)", |
42 | | - "enum": [ |
43 | | - 1200, |
44 | | - 2400, |
45 | | - 4800, |
46 | | - 9600, |
47 | | - 19200, |
48 | | - 38400, |
49 | | - 57600, |
50 | | - 115200 |
51 | | - ], |
52 | | - "title": "Baud Rate", |
53 | | - "type": "integer", |
54 | | - "x-enumLabels": [ |
55 | | - "1200", |
56 | | - "2400", |
57 | | - "4800", |
58 | | - "9600", |
59 | | - "19200", |
60 | | - "38400", |
61 | | - "57600", |
62 | | - "115200" |
63 | | - ] |
64 | | - }, |
65 | | - "databits": { |
66 | | - "description": "Data bits (serial only)", |
67 | | - "enum": [ |
68 | | - 5, |
69 | | - 6, |
70 | | - 7, |
71 | | - 8 |
72 | | - ], |
73 | | - "title": "Data Bits", |
74 | | - "type": "integer", |
75 | | - "x-enumLabels": [ |
76 | | - "5", |
77 | | - "6", |
78 | | - "7", |
79 | | - "8" |
80 | | - ] |
| 39 | + "else": { |
| 40 | + "properties": { |
| 41 | + "baudrate": { |
| 42 | + "description": "Baud rate (serial only)", |
| 43 | + "enum": [ |
| 44 | + 1200, |
| 45 | + 2400, |
| 46 | + 4800, |
| 47 | + 9600, |
| 48 | + 19200, |
| 49 | + 38400, |
| 50 | + 57600, |
| 51 | + 115200 |
| 52 | + ], |
| 53 | + "title": "Baud Rate", |
| 54 | + "type": "integer", |
| 55 | + "x-enumLabels": [ |
| 56 | + "1200", |
| 57 | + "2400", |
| 58 | + "4800", |
| 59 | + "9600", |
| 60 | + "19200", |
| 61 | + "38400", |
| 62 | + "57600", |
| 63 | + "115200" |
| 64 | + ] |
| 65 | + }, |
| 66 | + "databits": { |
| 67 | + "description": "Data bits (serial only)", |
| 68 | + "enum": [ |
| 69 | + 5, |
| 70 | + 6, |
| 71 | + 7, |
| 72 | + 8 |
| 73 | + ], |
| 74 | + "title": "Data Bits", |
| 75 | + "type": "integer", |
| 76 | + "x-enumLabels": [ |
| 77 | + "5", |
| 78 | + "6", |
| 79 | + "7", |
| 80 | + "8" |
| 81 | + ] |
| 82 | + }, |
| 83 | + "parity": { |
| 84 | + "description": "Parity: N=none, E=even, O=odd (serial only)", |
| 85 | + "enum": [ |
| 86 | + "N", |
| 87 | + "E", |
| 88 | + "O" |
| 89 | + ], |
| 90 | + "title": "Parity", |
| 91 | + "type": "string", |
| 92 | + "x-enumLabels": [ |
| 93 | + "None", |
| 94 | + "Even", |
| 95 | + "Odd" |
| 96 | + ] |
| 97 | + }, |
| 98 | + "portName": { |
| 99 | + "description": "Serial port name (serial only)", |
| 100 | + "title": "Serial Port Name", |
| 101 | + "type": "string" |
| 102 | + }, |
| 103 | + "stopbits": { |
| 104 | + "description": "Stop bits: 1, 1.5 (=3), or 2 (serial only)", |
| 105 | + "enum": [ |
| 106 | + 1, |
| 107 | + 2, |
| 108 | + 3 |
| 109 | + ], |
| 110 | + "title": "Stop Bits", |
| 111 | + "type": "integer", |
| 112 | + "x-enumLabels": [ |
| 113 | + "1", |
| 114 | + "2", |
| 115 | + "1.5" |
| 116 | + ] |
| 117 | + } |
| 118 | + } |
| 119 | + }, |
| 120 | + "if": { |
| 121 | + "properties": { |
| 122 | + "type": { |
| 123 | + "const": "tcp" |
| 124 | + } |
81 | 125 | }, |
| 126 | + "required": [ |
| 127 | + "type" |
| 128 | + ] |
| 129 | + }, |
| 130 | + "properties": { |
82 | 131 | "id": { |
83 | 132 | "description": "Connection index (0, 1, or 2)", |
84 | 133 | "maximum": 2, |
85 | 134 | "minimum": 0, |
86 | 135 | "title": "Connection ID", |
87 | 136 | "type": "integer" |
88 | 137 | }, |
89 | | - "ip": { |
90 | | - "description": "IP address (TCP only)", |
91 | | - "title": "IP Address", |
92 | | - "type": "string" |
93 | | - }, |
94 | | - "parity": { |
95 | | - "description": "Parity: N=none, E=even, O=odd (serial only)", |
96 | | - "enum": [ |
97 | | - "N", |
98 | | - "E", |
99 | | - "O" |
100 | | - ], |
101 | | - "title": "Parity", |
102 | | - "type": "string", |
103 | | - "x-enumLabels": [ |
104 | | - "None", |
105 | | - "Even", |
106 | | - "Odd" |
107 | | - ] |
108 | | - }, |
109 | 138 | "persistent": { |
110 | 139 | "description": "Keep connection open between reads", |
111 | 140 | "title": "Keep Connection Persistent", |
112 | 141 | "type": "boolean" |
113 | 142 | }, |
114 | | - "port": { |
115 | | - "description": "TCP port (TCP only)", |
116 | | - "maximum": 65535, |
117 | | - "minimum": 1, |
118 | | - "title": "TCP Port", |
119 | | - "type": "integer" |
120 | | - }, |
121 | | - "portName": { |
122 | | - "description": "Serial port name (serial only)", |
123 | | - "title": "Serial Port Name", |
124 | | - "type": "string" |
125 | | - }, |
126 | | - "stopbits": { |
127 | | - "description": "Stop bits: 1, 1.5 (=3), or 2 (serial only)", |
128 | | - "enum": [ |
129 | | - 1, |
130 | | - 2, |
131 | | - 3 |
132 | | - ], |
133 | | - "title": "Stop Bits", |
134 | | - "type": "integer", |
135 | | - "x-enumLabels": [ |
136 | | - "1", |
137 | | - "2", |
138 | | - "1.5" |
139 | | - ] |
140 | | - }, |
141 | 143 | "timeout": { |
142 | 144 | "description": "Timeout in milliseconds", |
143 | 145 | "minimum": 0, |
|
162 | 164 | "id", |
163 | 165 | "type" |
164 | 166 | ], |
| 167 | + "then": { |
| 168 | + "properties": { |
| 169 | + "ip": { |
| 170 | + "description": "IP address (TCP only)", |
| 171 | + "title": "IP Address", |
| 172 | + "type": "string" |
| 173 | + }, |
| 174 | + "port": { |
| 175 | + "description": "TCP port (TCP only)", |
| 176 | + "maximum": 65535, |
| 177 | + "minimum": 1, |
| 178 | + "title": "TCP Port", |
| 179 | + "type": "integer" |
| 180 | + } |
| 181 | + } |
| 182 | + }, |
165 | 183 | "type": "object" |
166 | 184 | }, |
167 | 185 | "type": "array" |
|
0 commit comments