@@ -84,6 +84,7 @@ static char args_doc[] = "";
84
84
static struct argp_option options [] = {
85
85
{"verbose" , 'v' , "VERBOSITY_LEVEL" , 0 , "Verbosiity level: 0 quiet else verbose level (default : quiet)" },
86
86
{"long-help" , 'H' , 0 , 0 , "Print a long help and exit" },
87
+ {"real-time" , 'T' , 0 , 0 , "Engage so called \"real time\" scheduling (defalut 0: no)" },
87
88
{"spi-device" , 'd' , "SPI_DEVICE" , 0 , "SPI device, (default : /dev/spidev0.0)" },
88
89
{"modulation" , 'M' , "MODULATION_SCHEME" , 0 , "Radio modulation scheme, See long help (-H) option" },
89
90
{"rate" , 'R' , "DATA_RATE_INDEX" , 0 , "Data rate index, See long help (-H) option" },
@@ -186,6 +187,7 @@ static void init_args(arguments_t *arguments)
186
187
arguments -> tnc_keyup_delay = 10000 ;
187
188
arguments -> tnc_keydown_delay = 0 ;
188
189
arguments -> tnc_switchover_delay = 0 ;
190
+ arguments -> real_time = 0 ;
189
191
}
190
192
191
193
// ------------------------------------------------------------------------------------------------
@@ -214,6 +216,7 @@ static void print_args(arguments_t *arguments)
214
216
{
215
217
fprintf (stderr , "-- options --\n" );
216
218
fprintf (stderr , "Verbosity ...........: %d\n" , arguments -> verbose_level );
219
+ fprintf (stderr , "Real time ...........: %s\n" , (arguments -> real_time ? "yes" : "no" ));
217
220
fprintf (stderr , "--- radio ---\n" );
218
221
fprintf (stderr , "Modulation ..........: %s\n" , modulation_names [arguments -> modulation ]);
219
222
fprintf (stderr , "Rate nominal ........: %d Baud\n" , rate_values [arguments -> rate ]);
@@ -395,6 +398,17 @@ static error_t parse_opt (int key, char *arg, struct argp_state *state)
395
398
fprintf (stderr , "Variable length blocks are not allowed (yet?)\n" );
396
399
}
397
400
break ;
401
+ // Real time scheduling
402
+ case 'T' :
403
+ if (ALLOW_REAL_TIME )
404
+ {
405
+ arguments -> real_time = 1 ;
406
+ }
407
+ else
408
+ {
409
+ fprintf (stderr , "Real time scheduling is not allowed\n" );
410
+ }
411
+ break ;
398
412
// Repetition factor
399
413
case 'n' :
400
414
arguments -> repetition = strtol (arg , & end , 10 );
0 commit comments