Browse Source

Add support for serial ports (names, routing, locks and directions).

Georgi Chorbadzhiyski 9 years ago
parent
commit
30a6246f79
20 changed files with 462 additions and 8 deletions
  1. 2
    0
      ChangeLog
  2. 43
    0
      README
  3. 68
    0
      cmd.c
  4. 8
    1
      cmd.h
  5. 15
    1
      data.h
  6. 47
    0
      display.c
  7. 1
    0
      display.h
  8. 39
    1
      test/input-00.txt
  9. 9
    1
      test/input-03.txt
  10. 19
    0
      test/run
  11. 15
    0
      test/test-01.ok
  12. 26
    0
      test/test-02.ok
  13. 43
    0
      test/test-03.ok
  14. 24
    0
      test/test-04.ok
  15. 15
    0
      test/test-05.ok
  16. 8
    0
      test/test-06.ok
  17. 1
    0
      test/test-07.ok
  18. 14
    0
      test/test-16.ok
  19. 27
    0
      videohubctrl.1
  20. 38
    4
      videohubctrl.c

+ 2
- 0
ChangeLog View File

@@ -1,6 +1,8 @@
1 1
 |-----------------------------------------------------------------------|
2 2
 xxxx-xx-xx : Version 0.5-dev
3 3
  * Add missing documentation for --list-moutputs parameter.
4
+ * Add support for serial ports (names, routing, locks and directions),
5
+    --se-name, --se-input, --se-lock, --se-unlock and --se-dir.
4 6
 
5 7
 2014-11-30 : Version 0.4
6 8
  * Add videohubctrl(1) man page.

+ 43
- 0
README View File

@@ -52,6 +52,7 @@ Commands:
52 52
  --list-vinputs             | List device video inputs.
53 53
  --list-voutputs            | List device video outputs.
54 54
  --list-moutputs            | List device monitoring outputs.
55
+ --list-serial              | List device serial ports.
55 56
 
56 57
 Video inputs configuration:
57 58
  --vi-name <in_X> <name>    | Set video input port X name.
@@ -68,6 +69,14 @@ Monitoring outputs configuration:
68 69
  --mo-lock <mout_X>         | Lock monitoring port X.
69 70
  --mo-unlock <mout_X>       | Unlock monitoring port X.
70 71
 
72
+Serial ports configuration:
73
+ --se-name <ser_X> <name>   | Set serial port X name.
74
+ --se-route <ser_X> <ser_Y> | Connect serial X to serial Y
75
+ --se-lock <ser_X>          | Lock serial port X.
76
+ --se-unlock <ser_X>        | Unlock serial port X.
77
+ --se-dir <ser_X> <dir>     | Set serial port X direction.
78
+                            . <dir> can be 'auto', 'in' or 'out'.
79
+
71 80
 Misc options:
72 81
  -T --test-input <file>     | Read commands from <file>.
73 82
  -d --debug                 | Increase logging verbosity.
@@ -156,6 +165,7 @@ Device info
156 165
   | Protocol                   | 2.4                        |
157 166
   | Video inputs               | 16                         |
158 167
   | Video outputs              | 16                         |
168
+  | Serial ports               | 8                          |
159 169
   | Video monitoring outputs   | 4                          |
160 170
   -----------------------------------------------------------
161 171
 
@@ -215,6 +225,20 @@ Monitoring outputs
215 225
   |  4 |   | Monitor 4                | Windows 4 HD             |
216 226
   ----------------------------------------------------------------
217 227
 
228
+Serial ports
229
+  ---------------------------------------------------------------
230
+  | ## | x | Dir  | Serial port        | Connected serial   | s |
231
+  ---------------------------------------------------------------
232
+  |  1 | O |   in | Serial Ctrl 1      | Deck 3             | 4 |
233
+  |  2 |   | auto | Serial Ctrl 2      | Deck 4             | 4 |
234
+  |  3 | L |  out | Deck 3             |                    | 4 |
235
+  |  4 |   | auto | Deck 4             |                    | 4 |
236
+  |  5 |   | auto | Serial 5           |                    |   |
237
+  |  6 |   | auto | Serial 6           |                    |   |
238
+  |  7 |   |   in | Serial 7           |                    | x |
239
+  |  8 |   |  out | Serial 8           |                    | x |
240
+  ---------------------------------------------------------------
241
+
218 242
 |----------------------------------------------------------------------|
219 243
 
220 244
 
@@ -247,6 +271,25 @@ Video outputs Legend
247 271
  Column 5 (s)  - Port status /type/. Same format as in input ports.
248 272
 
249 273
 
274
+Serial ports Legend
275
+===================
276
+
277
+ Column 1 (##)  - Serial port number
278
+ Column 2 (x)   - Serial port lock status
279
+ Column 3 (Dir) - Serial port direction.
280
+                   in   - Input/Control (Workstation) port
281
+                   out  - Output/Slave (Deck) port
282
+                   auto - Automatic in/out
283
+ Column 4       - Serial port name
284
+ Column 5       - Which serial port is connected here.
285
+ Column 5 (s)   - Port status /type/. Same format as in input ports.
286
+                     - Empty means that the device do not support port
287
+                       status.
288
+                   x - The port type is "None". This means that the
289
+                       port is not installed.
290
+                   4 - The port type is "RS422".
291
+
292
+
250 293
 Development
251 294
 ===========
252 295
 

+ 68
- 0
cmd.c View File

@@ -31,6 +31,11 @@ const char *videohub_commands_text[NUM_COMMANDS] = {
31 31
 	[CMD_MONITORING_OUTPUT_LABELS]  = "MONITORING OUTPUT LABELS",
32 32
 	[CMD_MONITORING_OUTPUT_LOCKS]   = "MONITORING OUTPUT LOCKS",
33 33
 	[CMD_MONITORING_OUTPUT_ROUTING] = "VIDEO MONITORING OUTPUT ROUTING",
34
+	[CMD_SERIAL_PORT_LABELS]     = "SERIAL PORT LABELS",
35
+	[CMD_SERIAL_PORT_ROUTING]    = "SERIAL PORT ROUTING",
36
+	[CMD_SERIAL_PORT_LOCKS]      = "SERIAL PORT LOCKS",
37
+	[CMD_SERIAL_PORT_STATUS]     = "SERIAL PORT STATUS",
38
+	[CMD_SERIAL_PORT_DIRECTIONS] = "SERIAL PORT DIRECTIONS",
34 39
 	[CMD_PING]                 = "PING",
35 40
 	[CMD_ACK]                  = "ACK",
36 41
 	[CMD_NAK]                  = "NAK",
@@ -90,6 +95,33 @@ struct videohub_commands videohub_commands[NUM_COMMANDS] = {
90 95
 		.port_id2 = "video input",
91 96
 		.opt_prefix = "mo",
92 97
 	},
98
+	[CMD_SERIAL_PORT_LABELS]  = { .cmd = CMD_SERIAL_PORT_LABELS, .type = PARSE_LABEL,
99
+		.ports1 = OFS(serial),
100
+		.port_id1 = "serial",
101
+		.opt_prefix = "se",
102
+	},
103
+	[CMD_SERIAL_PORT_LOCKS]   = { .cmd = CMD_SERIAL_PORT_LOCKS  , .type = PARSE_LOCK,
104
+		.ports1 = OFS(serial),
105
+		.port_id1 = "serial",
106
+		.opt_prefix = "se",
107
+	},
108
+	[CMD_SERIAL_PORT_ROUTING] = { .cmd = CMD_SERIAL_PORT_ROUTING, .type = PARSE_ROUTE,
109
+		.ports1 = OFS(serial),
110
+		.ports2 = OFS(serial),
111
+		.port_id1 = "serial",
112
+		.port_id2 = "serial",
113
+		.opt_prefix = "se",
114
+	},
115
+	[CMD_SERIAL_PORT_STATUS]  = { .cmd = CMD_SERIAL_PORT_STATUS , .type = PARSE_STATUS,
116
+		.ports1 = OFS(serial),
117
+		.port_id1 = "serial",
118
+		.opt_prefix = "se",
119
+	},
120
+	[CMD_SERIAL_PORT_DIRECTIONS] = { .cmd = CMD_SERIAL_PORT_DIRECTIONS, .type = PARSE_DIR,
121
+		.ports1 = OFS(serial),
122
+		.port_id1 = "serial",
123
+		.opt_prefix = "se",
124
+	},
93 125
 	[CMD_PING]                 = { .cmd = CMD_PING                , .type = PARSE_NONE },
94 126
 	[CMD_ACK]                  = { .cmd = CMD_ACK                 , .type = PARSE_NONE },
95 127
 	[CMD_NAK]                  = { .cmd = CMD_NAK                 , .type = PARSE_NONE },
@@ -167,6 +199,11 @@ bool parse_command(struct videohub_data *d, char *cmd) {
167 199
 		case PARSE_STATUS:
168 200
 			snprintf(s_port->port[port_num].status, sizeof(s_port->port[port_num].status), "%s", port_data);
169 201
 			break;
202
+		case PARSE_DIR:
203
+			s_port->port[port_num].direction = DIR_AUTO;
204
+			if (streq("control", port_data)) s_port->port[port_num].direction = DIR_CONTROL;
205
+			if (streq("slave", port_data))   s_port->port[port_num].direction = DIR_SLAVE;
206
+			break;
170 207
 		case PARSE_ROUTE:
171 208
 			dest_port_num = strtoul(port_data, NULL, 10);
172 209
 			if (dest_port_num + 1 > d_port->num) {
@@ -175,6 +212,7 @@ bool parse_command(struct videohub_data *d, char *cmd) {
175 212
 				continue;
176 213
 			}
177 214
 			s_port->port[port_num].routed_to = dest_port_num;
215
+			s_port->port[port_num].routed_to_set = true;
178 216
 			break;
179 217
 		case PARSE_LOCK:
180 218
 			switch (port_data[0]) {
@@ -295,6 +333,24 @@ void prepare_cmd_entry(struct videohub_data *d, struct vcmd_entry *e) {
295 333
 	}
296 334
 }
297 335
 
336
+static char *dir2cmd(enum serial_dir dir) {
337
+	switch (dir) {
338
+	case DIR_CONTROL: return "control";
339
+	case DIR_SLAVE  : return "slave";
340
+	case DIR_AUTO   : return "auto";
341
+	}
342
+	return "auto";
343
+}
344
+
345
+static char *dir2txt(enum serial_dir dir) {
346
+	switch (dir) {
347
+	case DIR_CONTROL: return "IN (Workstation)";
348
+	case DIR_SLAVE  : return "OUT (Deck)";
349
+	case DIR_AUTO   : return "AUTO";
350
+	}
351
+	return "AUTO";
352
+}
353
+
298 354
 void format_cmd_text(struct vcmd_entry *e, char *buf, unsigned int bufsz) {
299 355
 	switch (e->cmd->type) {
300 356
 	case PARSE_LABEL:
@@ -309,6 +365,10 @@ void format_cmd_text(struct vcmd_entry *e, char *buf, unsigned int bufsz) {
309 365
 		snprintf(buf, bufsz, "%s:\n%u %u\n\n", videohub_commands_text[e->cmd->cmd],
310 366
 			e->port_no1 - 1, e->port_no2 - 1);
311 367
 		break;
368
+	case PARSE_DIR:
369
+		snprintf(buf, bufsz, "%s:\n%u %s\n\n", videohub_commands_text[e->cmd->cmd],
370
+			e->port_no1 - 1, dir2cmd(e->direction));
371
+		break;
312 372
 	default: break;
313 373
 	}
314 374
 }
@@ -343,6 +403,14 @@ void show_cmd(struct videohub_data *d, struct vcmd_entry *e) {
343 403
 			e->port_no2, d_port->port [e->port_no2 - 1].name
344 404
 		);
345 405
 		break;
406
+	case PARSE_DIR:
407
+		printf("%sset %s %d \"%s\" direction to %s\n",
408
+			prefix,
409
+			e->cmd->port_id1,
410
+			e->port_no1, s_port->port[e->port_no1 - 1].name,
411
+			dir2txt(e->direction)
412
+		);
413
+		break;
346 414
 	default: break;
347 415
 	}
348 416
 }

+ 8
- 1
cmd.h View File

@@ -15,7 +15,7 @@
15 15
 
16 16
 #include <stdbool.h>
17 17
 
18
-#define NUM_COMMANDS 14
18
+#define NUM_COMMANDS 19
19 19
 
20 20
 enum vcmd {
21 21
 	CMD_PROTOCOL_PREAMBLE,
@@ -29,6 +29,11 @@ enum vcmd {
29 29
 	CMD_MONITORING_OUTPUT_LABELS,
30 30
 	CMD_MONITORING_OUTPUT_LOCKS,
31 31
 	CMD_MONITORING_OUTPUT_ROUTING,
32
+	CMD_SERIAL_PORT_LABELS,
33
+	CMD_SERIAL_PORT_LOCKS,
34
+	CMD_SERIAL_PORT_ROUTING,
35
+	CMD_SERIAL_PORT_STATUS,
36
+	CMD_SERIAL_PORT_DIRECTIONS,
32 37
 	CMD_PING,
33 38
 	CMD_ACK,
34 39
 	CMD_NAK = (NUM_COMMANDS - 1),
@@ -41,6 +46,7 @@ enum cmd_flags {
41 46
 	PARSE_STATUS, /* Parse [port_num] [port_status] */
42 47
 	PARSE_ROUTE,  /* Parse [port_num] [dest_port] */
43 48
 	PARSE_LOCK,   /* Parse [port_num] [dest_slot] */
49
+	PARSE_DIR,    /* Parse [port_num] [port_direction]  - for serial ports */
44 50
 };
45 51
 
46 52
 struct videohub_commands {
@@ -66,6 +72,7 @@ struct vcmd_entry {
66 72
 	unsigned int	port_no2;
67 73
 	bool			do_lock;
68 74
 	enum port_lock	lock;
75
+	enum serial_dir	direction;
69 76
 };
70 77
 
71 78
 void prepare_cmd_entry(struct videohub_data *d, struct vcmd_entry *e);

+ 15
- 1
data.h View File

@@ -34,13 +34,27 @@ enum port_lock {
34 34
 	PORT_LOCKED_OTHER,
35 35
 };
36 36
 
37
+enum serial_dir {
38
+	DIR_CONTROL,
39
+	DIR_SLAVE,
40
+	DIR_AUTO,
41
+};
42
+
37 43
 struct port {
38 44
 	char			name[MAX_NAME_LEN];
39 45
 	// Port statuses are supported only by Universal Videohub
40 46
 	// The statuses (actually they are connection types) are:
41
-	//    BNC, Optical or None /missing port/
47
+	//  BNC, Optical or None /missing port/ - for input/output
48
+	//  RS422, None                         - for serial ports
42 49
 	char			status[8];
50
+	// For serial ports.
51
+	// The values are:
52
+	//    control - In (Workstation)
53
+	//      slave - Out (Deck)
54
+	//       auto - Automatic
55
+	enum serial_dir	direction;
43 56
 	unsigned int	routed_to;
57
+	bool			routed_to_set; // For serial ports
44 58
 	enum port_lock	lock;
45 59
 };
46 60
 

+ 47
- 0
display.c View File

@@ -31,6 +31,7 @@ static char format_status(char *status) {
31 31
 	if (streq(status, "BNC"))     return 'B';
32 32
 	if (streq(status, "Optical")) return 'o';
33 33
 	if (streq(status, "None"))    return 'x';
34
+	if (streq(status, "RS422"))   return '4'; // For serial ports
34 35
 	return '?';
35 36
 }
36 37
 
@@ -145,6 +146,42 @@ void print_device_monitoring_outputs(struct videohub_data *d) {
145 146
 	printf("\n");
146 147
 }
147 148
 
149
+static char *dir2opt(enum serial_dir dir) {
150
+	switch (dir) {
151
+	case DIR_CONTROL: return "in";
152
+	case DIR_SLAVE  : return "out";
153
+	case DIR_AUTO   : return "auto";
154
+	}
155
+	return "auto";
156
+}
157
+
158
+void print_device_serial_ports(struct videohub_data *d) {
159
+	unsigned char port_seen[MAX_PORTS];
160
+	unsigned int i, len = 63;
161
+	if (!d->serial.num)
162
+		return;
163
+	memset(port_seen, 0, sizeof(port_seen));
164
+	printf("Serial ports\n");
165
+	printf_line(len);
166
+	printf("  | ## | x | Dir  | %-18s | %-18s | s |\n", "Serial port", "Connected serial");
167
+	printf_line(len);
168
+	for(i = 0; i < d->serial.num; i++) {
169
+		printf("  | %2d | %c | %4s | %-18s | %-18s | %c |\n",
170
+			i + 1,
171
+			port_lock_symbol(d->serial.port[i].lock),
172
+			dir2opt(d->serial.port[i].direction),
173
+			d->serial.port[i].name,
174
+			(d->serial.port[i].routed_to_set && !port_seen[d->serial.port[i].routed_to]
175
+				? d->serial.port[d->serial.port[i].routed_to].name
176
+				: ""),
177
+			format_status(d->serial.port[i].status)
178
+		);
179
+		port_seen[d->serial.port[i].routed_to]++;
180
+	}
181
+	printf_line(len);
182
+	printf("\n");
183
+}
184
+
148 185
 static void __print_opt(struct videohub_data *d, enum vcmd vcmd) {
149 186
 	unsigned int i, last = 0;
150 187
 	struct videohub_commands *v = &videohub_commands[vcmd];
@@ -156,6 +193,8 @@ static void __print_opt(struct videohub_data *d, enum vcmd vcmd) {
156 193
 			printf("  --%s-name %2d \"%s\" \\\n", p, i + 1, s_port->port[i].name);
157 194
 			break;
158 195
 		case PARSE_ROUTE:
196
+			if (v->cmd == CMD_SERIAL_PORT_ROUTING && !s_port->port[i].routed_to_set)
197
+				continue;
159 198
 			printf("  --%s-input %2d %2d \\\n", p, i + 1, s_port->port[i].routed_to + 1);
160 199
 			break;
161 200
 		case PARSE_LOCK:
@@ -166,6 +205,10 @@ static void __print_opt(struct videohub_data *d, enum vcmd vcmd) {
166 205
 			} else {
167 206
 				printf("  --%s-unlock %2d%s\n", p, i + 1, last ? " \\" : "");
168 207
 			}
208
+			break;
209
+		case PARSE_DIR:
210
+			printf("  --%s-dir %2d %s \\\n", p, i + 1, dir2opt(s_port->port[i].direction));
211
+			break;
169 212
 		default: break;
170 213
 		}
171 214
 	}
@@ -182,6 +225,10 @@ void print_device_backup(struct videohub_data *d) {
182 225
 		if (videohub_commands[i].type == PARSE_ROUTE)
183 226
 			__print_opt(d, videohub_commands[i].cmd);
184 227
 	}
228
+	for (i = 0; i < NUM_COMMANDS; i++) {
229
+		if (videohub_commands[i].type == PARSE_DIR)
230
+			__print_opt(d, videohub_commands[i].cmd);
231
+	}
185 232
 	for (i = 0; i < NUM_COMMANDS; i++) {
186 233
 		if (videohub_commands[i].type == PARSE_LOCK)
187 234
 			__print_opt(d, videohub_commands[i].cmd);

+ 1
- 0
display.h View File

@@ -17,6 +17,7 @@ void print_device_info(struct videohub_data *d);
17 17
 void print_device_video_inputs(struct videohub_data *d);
18 18
 void print_device_video_outputs(struct videohub_data *d);
19 19
 void print_device_monitoring_outputs(struct videohub_data *d);
20
+void print_device_serial_ports(struct videohub_data *d);
20 21
 
21 22
 void print_device_backup(struct videohub_data *d);
22 23
 

+ 39
- 1
test/input-00.txt View File

@@ -9,7 +9,7 @@ Video inputs: 16
9 9
 Video processing units: 0
10 10
 Video outputs: 16
11 11
 Video monitoring outputs: 4
12
-Serial ports: 0
12
+Serial ports: 8
13 13
 
14 14
 INPUT LABELS:
15 15
 0 Windows 1
@@ -125,3 +125,41 @@ MONITORING OUTPUT LOCKS:
125 125
 1 O
126 126
 2 L
127 127
 3 U
128
+
129
+SERIAL PORT LABELS:
130
+0 Serial Ctrl 1
131
+1 Serial Ctrl 2
132
+2 Deck 3
133
+3 Deck 4
134
+4 Serial 5
135
+5 Serial 6
136
+6 Serial 7
137
+7 Serial 8
138
+
139
+SERIAL PORT ROUTING:
140
+0 2
141
+1 3
142
+
143
+SERIAL PORT LOCKS:
144
+0 O
145
+1 U
146
+2 L
147
+3 U
148
+
149
+SERIAL PORT STATUS:
150
+0 RS422
151
+1 RS422
152
+2 RS422
153
+3 RS422
154
+6 None
155
+7 None
156
+
157
+SERIAL PORT DIRECTIONS:
158
+0 control
159
+1 auto
160
+2 slave
161
+3 auto
162
+4 auto
163
+5 auto
164
+6 control
165
+7 slave

+ 9
- 1
test/input-03.txt View File

@@ -9,7 +9,7 @@ Video inputs: 16
9 9
 Video processing units: 0
10 10
 Video outputs: 16
11 11
 Video monitoring outputs: 4
12
-Serial ports: 0
12
+Serial ports: 8
13 13
 
14 14
 VIDEO INPUT STATUS:
15 15
 0 BNC
@@ -35,3 +35,11 @@ VIDEO OUTPUT STATUS:
35 35
 13 Optical
36 36
 14 Optical
37 37
 15 Optical
38
+
39
+SERIAL PORT STATUS:
40
+0 RS422
41
+1 RS422
42
+2 RS422
43
+3 RS422
44
+6 None
45
+7 None

+ 19
- 0
test/run View File

@@ -50,6 +50,14 @@ videohubctrl --test-input test/input-00.txt \
50 50
 	--mo-lock 4 \
51 51
 	--mo-name 3 "Loopback" \
52 52
 	--mo-input 3 16 \
53
+	--se-name 1 "Ren Ctrl 1" \
54
+	--se-name "Deck 3" "Ren Deck 3" \
55
+	--se-unlock 1 \
56
+	--se-lock 2 \
57
+	--se-input 2 1 \
58
+	--se-dir 6 in \
59
+	--se-dir 7 out \
60
+	--se-dir 8 out --se-dir 8 auto \
53 61
 $@ &> test/test-04.out
54 62
 check test/test-04 "Test multiple configuration commands"
55 63
 
@@ -81,6 +89,14 @@ check test/test-05 "Test if --backup restored correct config."
81 89
 ./videohubctrl --test-input test/input-00.txt --mo-lock "Output 18"                  $@ &>> test/test-06.out
82 90
 ./videohubctrl --test-input test/input-00.txt --mo-unlock 18                         $@ &>> test/test-06.out
83 91
 ./videohubctrl --test-input test/input-00.txt --mo-unlock "Output 18"                $@ &>> test/test-06.out
92
+./videohubctrl --test-input test/input-00.txt --se-name 18          "Test Serial 18" $@ &>> test/test-06.out
93
+./videohubctrl --test-input test/input-00.txt --se-name "Serial 18" "Test Serial 18" $@ &>> test/test-06.out
94
+./videohubctrl --test-input test/input-00.txt --se-lock 18                           $@ &>> test/test-06.out
95
+./videohubctrl --test-input test/input-00.txt --se-lock "Serial 18"                  $@ &>> test/test-06.out
96
+./videohubctrl --test-input test/input-00.txt --se-unlock 18                         $@ &>> test/test-06.out
97
+./videohubctrl --test-input test/input-00.txt --se-unlock "Serial 18"                $@ &>> test/test-06.out
98
+./videohubctrl --test-input test/input-00.txt --se-dir 1 err-dir                     $@ &>> test/test-06.out
99
+./videohubctrl --test-input test/input-00.txt --se-dir "Serial 5" err-dir            $@ &>> test/test-06.out
84 100
 check test/test-06 "Test errors on commands with invalid ports."
85 101
 
86 102
 videohubctrl --test-input test/input-00.txt --list-device $@ &> test/test-07.out
@@ -106,3 +122,6 @@ check test/test-14 "Test buggy input"
106 122
 
107 123
 videohubctrl --test-input test/input-00.txt --list-moutputs $@ &> test/test-15.out
108 124
 check test/test-15 "Test --list-moutputs option output"
125
+
126
+videohubctrl --test-input test/input-00.txt --list-serial $@ &> test/test-16.out
127
+check test/test-16 "Test --list-serial option output"

+ 15
- 0
test/test-01.ok View File

@@ -7,6 +7,7 @@ Device info
7 7
   | Protocol                   | 2.4                        |
8 8
   | Video inputs               | 16                         |
9 9
   | Video outputs              | 16                         |
10
+  | Serial ports               | 8                          |
10 11
   | Video monitoring outputs   | 4                          |
11 12
   -----------------------------------------------------------
12 13
 
@@ -66,3 +67,17 @@ Monitoring outputs
66 67
   |  4 |   | Monitor 4                | Windows 4 HD             |
67 68
   ----------------------------------------------------------------
68 69
 
70
+Serial ports
71
+  ---------------------------------------------------------------
72
+  | ## | x | Dir  | Serial port        | Connected serial   | s |
73
+  ---------------------------------------------------------------
74
+  |  1 | O |   in | Serial Ctrl 1      | Deck 3             | 4 |
75
+  |  2 |   | auto | Serial Ctrl 2      | Deck 4             | 4 |
76
+  |  3 | L |  out | Deck 3             |                    | 4 |
77
+  |  4 |   | auto | Deck 4             |                    | 4 |
78
+  |  5 |   | auto | Serial 5           |                    |   |
79
+  |  6 |   | auto | Serial 6           |                    |   |
80
+  |  7 |   |   in | Serial 7           |                    | x |
81
+  |  8 |   |  out | Serial 8           |                    | x |
82
+  ---------------------------------------------------------------
83
+

+ 26
- 0
test/test-02.ok View File

@@ -35,6 +35,14 @@ videohubctrl \
35 35
   --mo-name  2 "Monitor 2" \
36 36
   --mo-name  3 "Monitor 3" \
37 37
   --mo-name  4 "Monitor 4" \
38
+  --se-name  1 "Serial Ctrl 1" \
39
+  --se-name  2 "Serial Ctrl 2" \
40
+  --se-name  3 "Deck 3" \
41
+  --se-name  4 "Deck 4" \
42
+  --se-name  5 "Serial 5" \
43
+  --se-name  6 "Serial 6" \
44
+  --se-name  7 "Serial 7" \
45
+  --se-name  8 "Serial 8" \
38 46
   --vo-input  1  3 \
39 47
   --vo-input  2  2 \
40 48
   --vo-input  3  1 \
@@ -55,6 +63,16 @@ videohubctrl \
55 63
   --mo-input  2  2 \
56 64
   --mo-input  3  3 \
57 65
   --mo-input  4  4 \
66
+  --se-input  1  3 \
67
+  --se-input  2  4 \
68
+  --se-dir  1 in \
69
+  --se-dir  2 auto \
70
+  --se-dir  3 out \
71
+  --se-dir  4 auto \
72
+  --se-dir  5 auto \
73
+  --se-dir  6 auto \
74
+  --se-dir  7 in \
75
+  --se-dir  8 out \
58 76
   --vo-unlock  1 --vo-lock  1 \
59 77
   --vo-unlock  2 --vo-lock  2 \
60 78
   --vo-unlock  3 --vo-lock  3 \
@@ -75,4 +93,12 @@ videohubctrl \
75 93
   --mo-unlock  2 --mo-lock  2 \
76 94
   --mo-unlock  3 --mo-lock  3 \
77 95
   --mo-unlock  4
96
+  --se-unlock  1 --se-lock  1 \
97
+  --se-unlock  2 \
98
+  --se-unlock  3 --se-lock  3 \
99
+  --se-unlock  4 \
100
+  --se-unlock  5 \
101
+  --se-unlock  6 \
102
+  --se-unlock  7 \
103
+  --se-unlock  8
78 104
 

+ 43
- 0
test/test-03.ok View File

@@ -34,6 +34,14 @@ videohub: rename monitoring output 1 "" to "Monitor 1"
34 34
 videohub: rename monitoring output 2 "" to "Monitor 2"
35 35
 videohub: rename monitoring output 3 "" to "Monitor 3"
36 36
 videohub: rename monitoring output 4 "" to "Monitor 4"
37
+videohub: rename serial 1 "" to "Serial Ctrl 1"
38
+videohub: rename serial 2 "" to "Serial Ctrl 2"
39
+videohub: rename serial 3 "" to "Deck 3"
40
+videohub: rename serial 4 "" to "Deck 4"
41
+videohub: rename serial 5 "" to "Serial 5"
42
+videohub: rename serial 6 "" to "Serial 6"
43
+videohub: rename serial 7 "" to "Serial 7"
44
+videohub: rename serial 8 "" to "Serial 8"
37 45
 videohub: set video output 1 "Enc1 1" to read from video input 3 "Windows 3"
38 46
 videohub: set video output 2 "Enc1 2" to read from video input 2 "Windows 2"
39 47
 videohub: set video output 3 "Enc1 3" to read from video input 1 "Windows 1"
@@ -54,6 +62,16 @@ videohub: set monitoring output 1 "Monitor 1" to read from video input 1 "Window
54 62
 videohub: set monitoring output 2 "Monitor 2" to read from video input 2 "Windows 2"
55 63
 videohub: set monitoring output 3 "Monitor 3" to read from video input 3 "Windows 3"
56 64
 videohub: set monitoring output 4 "Monitor 4" to read from video input 4 "Windows 4 HD"
65
+videohub: set serial 1 "Serial Ctrl 1" to read from serial 3 "Deck 3"
66
+videohub: set serial 2 "Serial Ctrl 2" to read from serial 4 "Deck 4"
67
+videohub: set serial 1 "Serial Ctrl 1" direction to IN (Workstation)
68
+videohub: set serial 2 "Serial Ctrl 2" direction to AUTO
69
+videohub: set serial 3 "Deck 3" direction to OUT (Deck)
70
+videohub: set serial 4 "Deck 4" direction to AUTO
71
+videohub: set serial 5 "Serial 5" direction to AUTO
72
+videohub: set serial 6 "Serial 6" direction to AUTO
73
+videohub: set serial 7 "Serial 7" direction to IN (Workstation)
74
+videohub: set serial 8 "Serial 8" direction to OUT (Deck)
57 75
 videohub: unlock video output 1 "Enc1 1"
58 76
 videohub: lock video output 1 "Enc1 1"
59 77
 videohub: unlock video output 2 "Enc1 2"
@@ -84,6 +102,16 @@ videohub: lock monitoring output 2 "Monitor 2"
84 102
 videohub: unlock monitoring output 3 "Monitor 3"
85 103
 videohub: lock monitoring output 3 "Monitor 3"
86 104
 videohub: unlock monitoring output 4 "Monitor 4"
105
+videohub: unlock serial 1 "Serial Ctrl 1"
106
+videohub: lock serial 1 "Serial Ctrl 1"
107
+videohub: unlock serial 2 "Serial Ctrl 2"
108
+videohub: unlock serial 3 "Deck 3"
109
+videohub: lock serial 3 "Deck 3"
110
+videohub: unlock serial 4 "Deck 4"
111
+videohub: unlock serial 5 "Serial 5"
112
+videohub: unlock serial 6 "Serial 6"
113
+videohub: unlock serial 7 "Serial 7"
114
+videohub: unlock serial 8 "Serial 8"
87 115
 Device info
88 116
   -----------------------------------------------------------
89 117
   | Device address             | sdi-matrix                 |
@@ -93,6 +121,7 @@ Device info
93 121
   | Protocol                   | 2.4                        |
94 122
   | Video inputs               | 16                         |
95 123
   | Video outputs              | 16                         |
124
+  | Serial ports               | 8                          |
96 125
   | Video monitoring outputs   | 4                          |
97 126
   -----------------------------------------------------------
98 127
 
@@ -152,3 +181,17 @@ Monitoring outputs
152 181
   |  4 |   | Monitor 4                | Windows 4 HD             |
153 182
   ----------------------------------------------------------------
154 183
 
184
+Serial ports
185
+  ---------------------------------------------------------------
186
+  | ## | x | Dir  | Serial port        | Connected serial   | s |
187
+  ---------------------------------------------------------------
188
+  |  1 | O |   in | Serial Ctrl 1      | Deck 3             | 4 |
189
+  |  2 |   | auto | Serial Ctrl 2      | Deck 4             | 4 |
190
+  |  3 | O |  out | Deck 3             |                    | 4 |
191
+  |  4 |   | auto | Deck 4             |                    | 4 |
192
+  |  5 |   | auto | Serial 5           |                    |   |
193
+  |  6 |   | auto | Serial 6           |                    |   |
194
+  |  7 |   |   in | Serial 7           |                    | x |
195
+  |  8 |   |  out | Serial 8           |                    | x |
196
+  ---------------------------------------------------------------
197
+

+ 24
- 0
test/test-04.ok View File

@@ -16,6 +16,15 @@ videohub: unlock monitoring output 2 "Monitor 2"
16 16
 videohub: lock monitoring output 4 "Decklink"
17 17
 videohub: rename monitoring output 3 "Monitor 3" to "Loopback"
18 18
 videohub: set monitoring output 3 "Loopback" to read from video input 16 "Loopback"
19
+videohub: rename serial 1 "Serial Ctrl 1" to "Ren Ctrl 1"
20
+videohub: rename serial 3 "Deck 3" to "Ren Deck 3"
21
+videohub: unlock serial 1 "Ren Ctrl 1"
22
+videohub: lock serial 2 "Serial Ctrl 2"
23
+videohub: set serial 2 "Serial Ctrl 2" to read from serial 1 "Ren Ctrl 1"
24
+videohub: set serial 6 "Serial 6" direction to IN (Workstation)
25
+videohub: set serial 7 "Serial 7" direction to OUT (Deck)
26
+videohub: set serial 8 "Serial 8" direction to OUT (Deck)
27
+videohub: set serial 8 "Serial 8" direction to AUTO
19 28
 Device info
20 29
   -----------------------------------------------------------
21 30
   | Device address             | sdi-matrix                 |
@@ -25,6 +34,7 @@ Device info
25 34
   | Protocol                   | 2.4                        |
26 35
   | Video inputs               | 16                         |
27 36
   | Video outputs              | 16                         |
37
+  | Serial ports               | 8                          |
28 38
   | Video monitoring outputs   | 4                          |
29 39
   -----------------------------------------------------------
30 40
 
@@ -85,3 +95,17 @@ Monitoring outputs
85 95
   |  4 | O | Decklink                 | Windows 4 HighDef        |
86 96
   ----------------------------------------------------------------
87 97
 
98
+Serial ports
99
+  ---------------------------------------------------------------
100
+  | ## | x | Dir  | Serial port        | Connected serial   | s |
101
+  ---------------------------------------------------------------
102
+  |  1 |   |   in | Ren Ctrl 1         | Ren Deck 3         | 4 |
103
+  |  2 | O | auto | Serial Ctrl 2      | Ren Ctrl 1         | 4 |
104
+  |  3 | L |  out | Ren Deck 3         |                    | 4 |
105
+  |  4 |   | auto | Deck 4             |                    | 4 |
106
+  |  5 |   | auto | Serial 5           |                    |   |
107
+  |  6 |   |   in | Serial 6           |                    |   |
108
+  |  7 |   |  out | Serial 7           |                    | x |
109
+  |  8 |   | auto | Serial 8           |                    | x |
110
+  ---------------------------------------------------------------
111
+

+ 15
- 0
test/test-05.ok View File

@@ -7,6 +7,7 @@ Device info
7 7
   | Protocol                   | 2.4                        |
8 8
   | Video inputs               | 16                         |
9 9
   | Video outputs              | 16                         |
10
+  | Serial ports               | 8                          |
10 11
   | Video monitoring outputs   | 4                          |
11 12
   -----------------------------------------------------------
12 13
 
@@ -66,3 +67,17 @@ Monitoring outputs
66 67
   |  4 |   | Monitor 4                | Windows 4 HD             |
67 68
   ----------------------------------------------------------------
68 69
 
70
+Serial ports
71
+  ---------------------------------------------------------------
72
+  | ## | x | Dir  | Serial port        | Connected serial   | s |
73
+  ---------------------------------------------------------------
74
+  |  1 | O |   in | Serial Ctrl 1      | Deck 3             | 4 |
75
+  |  2 |   | auto | Serial Ctrl 2      | Deck 4             | 4 |
76
+  |  3 | O |  out | Deck 3             |                    | 4 |
77
+  |  4 |   | auto | Deck 4             |                    | 4 |
78
+  |  5 |   | auto | Serial 5           |                    |   |
79
+  |  6 |   | auto | Serial 6           |                    |   |
80
+  |  7 |   |   in | Serial 7           |                    | x |
81
+  |  8 |   |  out | Serial 8           |                    | x |
82
+  ---------------------------------------------------------------
83
+

+ 8
- 0
test/test-06.ok View File

@@ -22,3 +22,11 @@ ERROR: Unknown monitoring output port number/name: 18
22 22
 ERROR: Unknown monitoring output port number/name: Output 18
23 23
 ERROR: Unknown monitoring output port number/name: 18
24 24
 ERROR: Unknown monitoring output port number/name: Output 18
25
+ERROR: Unknown serial port number/name: 18
26
+ERROR: Unknown serial port number/name: Serial 18
27
+ERROR: Unknown serial port number/name: 18
28
+ERROR: Unknown serial port number/name: Serial 18
29
+ERROR: Unknown serial port number/name: 18
30
+ERROR: Unknown serial port number/name: Serial 18
31
+ERROR: Invalid serial port direction 'err-dir'. Allowed are: in, out, auto.
32
+ERROR: Invalid serial port direction 'err-dir'. Allowed are: in, out, auto.

+ 1
- 0
test/test-07.ok View File

@@ -7,6 +7,7 @@ Device info
7 7
   | Protocol                   | 2.4                        |
8 8
   | Video inputs               | 16                         |
9 9
   | Video outputs              | 16                         |
10
+  | Serial ports               | 8                          |
10 11
   | Video monitoring outputs   | 4                          |
11 12
   -----------------------------------------------------------
12 13
 

+ 14
- 0
test/test-16.ok View File

@@ -0,0 +1,14 @@
1
+Serial ports
2
+  ---------------------------------------------------------------
3
+  | ## | x | Dir  | Serial port        | Connected serial   | s |
4
+  ---------------------------------------------------------------
5
+  |  1 | O |   in | Serial Ctrl 1      | Deck 3             | 4 |
6
+  |  2 |   | auto | Serial Ctrl 2      | Deck 4             | 4 |
7
+  |  3 | L |  out | Deck 3             |                    | 4 |
8
+  |  4 |   | auto | Deck 4             |                    | 4 |
9
+  |  5 |   | auto | Serial 5           |                    |   |
10
+  |  6 |   | auto | Serial 6           |                    |   |
11
+  |  7 |   |   in | Serial 7           |                    | x |
12
+  |  8 |   |  out | Serial 8           |                    | x |
13
+  ---------------------------------------------------------------
14
+

+ 27
- 0
videohubctrl.1 View File

@@ -76,6 +76,11 @@ in \fB\-\-list\-vinputs\fR option).
76 76
 Display device monitoring outputs. Port numbers, names, locking status and
77 77
 which input is routed to a given output. The locking statuses are the
78 78
 same as video input and output ports.
79
+.TP
80
+\fB\-\-list\-serial\fR
81
+Display device serial ports. Port numbers, names, locking status, directions
82
+and how serial ports are routed. The locking statuses are the same as video
83
+input, output ports and monitoring ports.
79 84
 .SH CONFIGURATION COMMANDS
80 85
 .PP
81 86
 Everywhere where port needs to be set, you can use the port number or the
@@ -117,6 +122,28 @@ Lock monitoring output port X.
117 122
 \fB\-\-mo\-unlock\fR <mout_X>
118 123
 Unlock monitoring output port X. If the port is locked by somebody
119 124
 else the port would be forcefully unlocked.
125
+.SH SERIAL PORTS CONFIGURATION
126
+.PP
127
+.TP
128
+\fB\-\-se\-name\fR <ser_X> <name>
129
+Set serial port X name.
130
+.TP
131
+\fB\-\-se\-input\fR <ser_X> <ser_Y>
132
+Connect serial port X to serial port Y.
133
+.TP
134
+\fB\-\-se\-lock\fR <ser_X>
135
+Lock serial port X.
136
+.TP
137
+\fB\-\-se\-unlock\fR <ser_X>
138
+Unlock serial port X. If the port is locked by somebody else the
139
+port would be forcefully unlocked.
140
+.TP
141
+\fB\-\-se\-dir\fR <set_X> <in|out|auto>
142
+Set serial port X direction. There are three possible settings for
143
+each port:
144
+ \fBin\fR   - input/control/Workstation
145
+ \fBout\fR  - output/slave/Deck
146
+ \fBauto\fR - Automatic in/out
120 147
 .SH MISC OPTIONS
121 148
 .PP
122 149
 .TP

+ 38
- 4
videohubctrl.c View File

@@ -42,6 +42,7 @@ enum list_actions {
42 42
 	action_list_vinputs		= (1 << 1),
43 43
 	action_list_voutputs	= (1 << 2),
44 44
 	action_list_moutputs	= (1 << 3),
45
+	action_list_serial		= (1 << 4),
45 46
 };
46 47
 
47 48
 static const char *program_id = PROGRAM_NAME " Version: " VERSION " Git: " GIT_VER;
@@ -63,6 +64,7 @@ static const struct option long_options[] = {
63 64
 	{ "list-vinputs",		no_argument,       NULL, 902 },
64 65
 	{ "list-voutputs",		no_argument,       NULL, 903 },
65 66
 	{ "list-moutputs",		no_argument,       NULL, 904 },
67
+	{ "list-serial",		no_argument,       NULL, 905 },
66 68
 	{ "vi-name",			required_argument, NULL, 1001 },
67 69
 	{ "vo-name",			required_argument, NULL, 2001 },
68 70
 	{ "vo-input",			required_argument, NULL, 2002 },
@@ -74,6 +76,12 @@ static const struct option long_options[] = {
74 76
 	{ "mo-route",			required_argument, NULL, 3002 }, // Alias of --mo-input
75 77
 	{ "mo-lock",			required_argument, NULL, 3003 },
76 78
 	{ "mo-unlock",			required_argument, NULL, 3004 },
79
+	{ "se-name",			required_argument, NULL, 4001 },
80
+	{ "se-input",			required_argument, NULL, 4002 },
81
+	{ "se-route",			required_argument, NULL, 4002 }, // Alias of --mo-input
82
+	{ "se-lock",			required_argument, NULL, 4003 },
83
+	{ "se-unlock",			required_argument, NULL, 4004 },
84
+	{ "se-dir",				required_argument, NULL, 4005 },
77 85
 	{ 0, 0, 0, 0 }
78 86
 };
79 87
 
@@ -98,6 +106,7 @@ static void show_help(struct videohub_data *data) {
98 106
 	printf(" --list-vinputs             | List device video inputs.\n");
99 107
 	printf(" --list-voutputs            | List device video outputs.\n");
100 108
 	printf(" --list-moutputs            | List device monitoring outputs.\n");
109
+	printf(" --list-serial              | List device serial ports.\n");
101 110
 	printf("\n");
102 111
 	printf("Video inputs configuration:\n");
103 112
 	printf(" --vi-name <in_X> <name>    | Set video input port X name.\n");
@@ -114,6 +123,14 @@ static void show_help(struct videohub_data *data) {
114 123
 	printf(" --mo-lock <mout_X>         | Lock monitoring port X.\n");
115 124
 	printf(" --mo-unlock <mout_X>       | Unlock monitoring port X.\n");
116 125
 	printf("\n");
126
+	printf("Serial ports configuration:\n");
127
+	printf(" --se-name <ser_X> <name>   | Set serial port X name.\n");
128
+	printf(" --se-route <ser_X> <ser_Y> | Connect serial X to serial Y\n");
129
+	printf(" --se-lock <ser_X>          | Lock serial port X.\n");
130
+	printf(" --se-unlock <ser_X>        | Unlock serial port X.\n");
131
+	printf(" --se-dir <ser_X> <dir>     | Set serial port X direction.\n");
132
+	printf("                            . <dir> can be 'auto', 'in' or 'out'.\n");
133
+	printf("\n");
117 134
 	printf("Misc options:\n");
118 135
 	printf(" -T --test-input <file>     | Read commands from <file>.\n");
119 136
 	printf(" -d --debug                 | Increase logging verbosity.\n");
@@ -128,10 +145,14 @@ static struct run_cmds {
128 145
 	struct vcmd_entry	entry[MAX_RUN_CMDS];
129 146
 } parsed_cmds;
130 147
 
148
+static void check_num_parsed_cmds(void) {
149
+	if (num_parsed_cmds == ARRAY_SIZE(parsed_cmds.entry))
150
+		die("No more than %u commands are supported.", num_parsed_cmds);
151
+}
152
+
131 153
 static void parse_cmd2(int argc, char **argv, enum vcmd vcmd) {
154
+	check_num_parsed_cmds();
132 155
 	struct vcmd_entry *c = &parsed_cmds.entry[num_parsed_cmds];
133
-	if (num_parsed_cmds == ARRAY_SIZE(parsed_cmds.entry))
134
-		die("No more than %u commands are supported.", num_parsed_cmds);
135 156
 	if (optind == argc || argv[optind - 1][0] == '-' || argv[optind][0] == '-') {
136 157
 		fprintf(stderr, "%s: option '%s' requires two arguments\n", argv[0], argv[optind - 2]);
137 158
 		exit(EXIT_FAILURE);
@@ -139,13 +160,18 @@ static void parse_cmd2(int argc, char **argv, enum vcmd vcmd) {
139 160
 	c->cmd = &videohub_commands[vcmd];
140 161
 	c->param1 = argv[optind - 1];
141 162
 	c->param2 = argv[optind];
163
+	if (vcmd == CMD_SERIAL_PORT_DIRECTIONS) {
164
+		if (strcasecmp("in", c->param2) == 0)        c->direction = DIR_CONTROL;
165
+		else if (strcasecmp("out", c->param2) == 0)  c->direction = DIR_SLAVE;
166
+		else if (strcasecmp("auto", c->param2) == 0) c->direction = DIR_AUTO;
167
+		else die("Invalid serial port direction '%s'. Allowed are: in, out, auto.", c->param2);
168
+	}
142 169
 	num_parsed_cmds++;
143 170
 }
144 171
 
145 172
 static void parse_cmd1(int argc, char **argv, enum vcmd vcmd, bool do_lock) {
173
+	check_num_parsed_cmds();
146 174
 	struct vcmd_entry *c = &parsed_cmds.entry[num_parsed_cmds];
147
-	if (num_parsed_cmds == ARRAY_SIZE(parsed_cmds.entry))
148
-		die("No more than %u commands are supported.", num_parsed_cmds);
149 175
 	c->cmd = &videohub_commands[vcmd];
150 176
 	c->param1 = argv[optind - 1];
151 177
 	c->do_lock = do_lock;
@@ -206,6 +232,7 @@ static void parse_options(struct videohub_data *data, int argc, char **argv) {
206 232
 			case 902: show_list |= action_list_vinputs; break; // --list-vinputs
207 233
 			case 903: show_list |= action_list_voutputs; break; // --list-voutputs
208 234
 			case 904: show_list |= action_list_moutputs; break; // --list-moutputs
235
+			case 905: show_list |= action_list_serial; break; // --list-serial
209 236
 			case 1001: parse_cmd2(argc, argv, CMD_INPUT_LABELS); break; // --vi-name
210 237
 			case 2001: parse_cmd2(argc, argv, CMD_OUTPUT_LABELS); break; // --vo-name
211 238
 			case 2002: parse_cmd2(argc, argv, CMD_VIDEO_OUTPUT_ROUTING); break; // --vo-input
@@ -215,6 +242,11 @@ static void parse_options(struct videohub_data *data, int argc, char **argv) {
215 242
 			case 3002: parse_cmd2(argc, argv, CMD_MONITORING_OUTPUT_ROUTING); break; // --mo-route
216 243
 			case 3003: parse_cmd1(argc, argv, CMD_MONITORING_OUTPUT_LOCKS, true); break; // --mo-lock
217 244
 			case 3004: parse_cmd1(argc, argv, CMD_MONITORING_OUTPUT_LOCKS, false); break; // --mo-unlock
245
+			case 4001: parse_cmd2(argc, argv, CMD_SERIAL_PORT_LABELS); break; // --se-name
246
+			case 4002: parse_cmd2(argc, argv, CMD_SERIAL_PORT_ROUTING); break; // --se-route
247
+			case 4003: parse_cmd1(argc, argv, CMD_SERIAL_PORT_LOCKS, true); break; // --se-lock
248
+			case 4004: parse_cmd1(argc, argv, CMD_SERIAL_PORT_LOCKS, false); break; // --se-unlock
249
+			case 4005: parse_cmd2(argc, argv, CMD_SERIAL_PORT_DIRECTIONS); break; // --se-dir
218 250
 			case 'H': // --help
219 251
 				show_help(data);
220 252
 				exit(EXIT_SUCCESS);
@@ -248,6 +280,7 @@ static void print_device_full(struct videohub_data *d) {
248 280
 	print_device_video_inputs(d);
249 281
 	print_device_video_outputs(d);
250 282
 	print_device_monitoring_outputs(d);
283
+	print_device_serial_ports(d);
251 284
 	fflush(stdout);
252 285
 }
253 286
 
@@ -353,6 +386,7 @@ int main(int argc, char **argv) {
353 386
 		if (show_list & action_list_vinputs)	print_device_video_inputs(data);
354 387
 		if (show_list & action_list_voutputs)	print_device_video_outputs(data);
355 388
 		if (show_list & action_list_moutputs)	print_device_monitoring_outputs(data);
389
+		if (show_list & action_list_serial)		print_device_serial_ports(data);
356 390
 		fflush(stdout);
357 391
 	} else if (show_backup) {
358 392
 		print_device_backup(data);

Loading…
Cancel
Save