Browse Source

Change output formatting to better show port locks and numbers.

Show port numbers next to inputs and outputs and locks next to
outputs to better reflect the logic for their manipulation.
Georgi Chorbadzhiyski 9 years ago
parent
commit
79ae59d671
3 changed files with 35 additions and 32 deletions
  1. 1
    0
      ChangeLog
  2. 27
    26
      README
  3. 7
    6
      videohubctrl.c

+ 1
- 0
ChangeLog View File

3
  * Rename -v / --verbose parameter to -d / --debug.
3
  * Rename -v / --verbose parameter to -d / --debug.
4
  * Rename -h parameter (help) to -H.
4
  * Rename -h parameter (help) to -H.
5
  * Rename -s parameter (host) to -h.
5
  * Rename -s parameter (host) to -h.
6
+ * Change output formatting to better show port locks and numbers.
6
 
7
 
7
 2014-11-27 : Version 0.2
8
 2014-11-27 : Version 0.2
8
  * Fix port routing. Previously it was reversed and incorrect.
9
  * Fix port routing. Previously it was reversed and incorrect.

+ 27
- 26
README View File

115
 Video monitoring outputs: 0
115
 Video monitoring outputs: 0
116
 Serial ports: 0
116
 Serial ports: 0
117
 
117
 
118
-----------------------------------------------------------------------
119
-|  # | x | Input name                  | Output name                 |
120
-----------------------------------------------------------------------
121
-|  1 | L | Windows 3                   | Enc1 1                      |
122
-|  2 | L | Windows 2                   | Enc1 2                      |
123
-|  3 | L | Windows 1                   | Enc1 3                      |
124
-|  4 | L | Windows 1                   | Enc1 4                      |
125
-|  5 |   | Input 5                     | Output 5                    |
126
-|  6 | O | Input 6                     | Output 6                    |
127
-|  7 |   | Input 7                     | Output 7                    |
128
-|  8 |   | Input 8                     | Output 8                    |
129
-|  9 | L | Windows 4 HD                | Enc2 1                      |
130
-| 10 |   | Windows 4 HD                | Output 10                   |
131
-| 11 |   | Input 11                    | Output 11                   |
132
-| 12 | L | DPlay2                      | Denc                        |
133
-| 13 | L | DPlay1                      | Output 13                   |
134
-| 14 |   | Input 14                    | Output 14                   |
135
-| 15 | O | Input 15                    | Output 15                   |
136
-| 16 |   | Loopback                    | Loopback                    |
137
-----------------------------------------------------------------------
118
+-----------------------------------------------------------------------
119
+| i# | Input name                | o# | x | Output name               |
120
+-----------------------------------------------------------------------
121
+|  1 | Windows 3                 |  1 | L | Enc1 1                    |
122
+|  2 | Windows 2                 |  2 | L | Enc1 2                    |
123
+|  3 | Windows 1                 |  3 | L | Enc1 3                    |
124
+|  4 | Windows 1                 |  4 | L | Enc1 4                    |
125
+|  5 | Input 5                   |  5 |   | Output 5                  |
126
+|  6 | Input 6                   |  6 |   | Output 6                  |
127
+|  7 | Input 7                   |  7 |   | Output 7                  |
128
+|  8 | Input 8                   |  8 |   | Output 8                  |
129
+|  9 | Windows 4 HD              |  9 | L | Enc2 1                    |
130
+| 10 | Input 10                  | 10 |   | Output 10                 |
131
+| 11 | Input 11                  | 11 |   | Output 11                 |
132
+| 12 | DPlay2                    | 12 | L | Denc                      |
133
+| 13 | DPlay1                    | 13 | O | Output 13                 |
134
+| 14 | Input 14                  | 14 |   | Output 14                 |
135
+| 15 | Input 15                  | 15 |   | Output 15                 |
136
+| 16 | Loopback                  | 16 |   | Loopback                  |
137
+-----------------------------------------------------------------------
138
 
138
 
139
 gf@gf:~/git/videohubctrl$
139
 gf@gf:~/git/videohubctrl$
140
 |----------------------------------------------------------------------|
140
 |----------------------------------------------------------------------|
142
 Output Legend
142
 Output Legend
143
 =============
143
 =============
144
 
144
 
145
- Column 1 (#) - Port number
146
- Column 2 (x) - Output lock status
147
-                  L - The port is locked by another user (IP address)
148
-                  O - The port is locked by my me (my IP address)
149
- Column 3     - List of the inputs and their names
150
- Column 4     - List of the outputs and their names
145
+ Column 1 (i#) - Input port number
146
+ Column 2 (..) - Input port names
147
+ Column 3 (o#) - Output port number
148
+ Column 4 (x)  - Output port lock status
149
+                  L - The port is locked by another IP address (user)
150
+                  O - The port is locked by me (from my IP address)
151
+ Column 5      - Output port names
151
 
152
 
152
 
153
 
153
 Reporting bugs
154
 Reporting bugs

+ 7
- 6
videohubctrl.c View File

137
 static void print_device_settings(struct videohub_data *d) {
137
 static void print_device_settings(struct videohub_data *d) {
138
 	unsigned int i;
138
 	unsigned int i;
139
 	printf("\n");
139
 	printf("\n");
140
-	printf_line(70);
141
-	printf("|  # | x | %-27s | %-27s |\n", "Input name", "Output name");
142
-	printf_line(70);
140
+	printf_line(71);
141
+	printf("| i# | %-25s | o# | x | %-25s |\n", "Input name", "Output name");
142
+	printf_line(71);
143
 	for(i = 0; i < MIN(d->device.num_video_outputs, ARRAY_SIZE(d->outputs)); i++) {
143
 	for(i = 0; i < MIN(d->device.num_video_outputs, ARRAY_SIZE(d->outputs)); i++) {
144
-		printf("| %2d | %c | %-27s | %-27s |\n",
144
+		printf("| %2d | %-25s | %2d | %c | %-25s |\n",
145
 			i + 1,
145
 			i + 1,
146
-			d->outputs[i].locked ? (d->outputs[i].locked_other ? 'L' : 'O') : ' ',
147
 			d->inputs[d->outputs[i].routed_to].name,
146
 			d->inputs[d->outputs[i].routed_to].name,
147
+			i + 1,
148
+			d->outputs[i].locked ? (d->outputs[i].locked_other ? 'L' : 'O') : ' ',
148
 			d->outputs[i].name
149
 			d->outputs[i].name
149
 		);
150
 		);
150
 	}
151
 	}
151
-	printf_line(70);
152
+	printf_line(71);
152
 }
153
 }
153
 
154
 
154
 static int read_device_command_stream(struct videohub_data *d) {
155
 static int read_device_command_stream(struct videohub_data *d) {

Loading…
Cancel
Save