aboutsummaryrefslogtreecommitdiffstats
path: root/src/anetz/main.c
diff options
context:
space:
mode:
authorAndreas Eversberg <jolly@eversberg.eu>2016-03-05 08:14:36 +0100
committerAndreas Eversberg <jolly@eversberg.eu>2016-03-13 09:12:16 +0100
commitd21be383a6515760a38f403100a9d142633bf616 (patch)
tree099350c4f887644a0575c346cb8af583d1b93b35 /src/anetz/main.c
parent9b8e3592643029412b38dbe5bfae4c73f0199a66 (diff)
anetz/bnetz: Move option 'loss detection' from common code to individual code
Diffstat (limited to 'src/anetz/main.c')
-rw-r--r--src/anetz/main.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/anetz/main.c b/src/anetz/main.c
index 47e1264..643c874 100644
--- a/src/anetz/main.c
+++ b/src/anetz/main.c
@@ -35,6 +35,7 @@
/* settings */
int page_sequence = 0;
+double lossdetect = 0;
void print_help(const char *arg0)
{
@@ -43,6 +44,9 @@ void print_help(const char *arg0)
printf(" -P --page-sequence 0 | <ms>\n");
printf(" Cycle paging tones, rather than sending simultaniously.\n");
printf(" (default = '%d')\n", page_sequence);
+ printf(" -0 --loss <volume>\n");
+ printf(" Detect loss of carrier by detecting steady noise above given volume in\n");
+ printf(" percent. (disabled by default)\n");
printf("\nstation-id: Give (last) 5 digits of station-id, you don't need to enter it\n");
printf(" for every start of this program.\n");
}
@@ -53,10 +57,11 @@ static int handle_options(int argc, char **argv)
static struct option long_options_special[] = {
{"page-sequence", 1, 0, 'P'},
+ {"loss", 1, 0, '0'},
{0, 0, 0, 0}
};
- set_options_common("P:", long_options_special);
+ set_options_common("P:0:", long_options_special);
while (1) {
int option_index = 0, c;
@@ -71,6 +76,10 @@ static int handle_options(int argc, char **argv)
page_sequence = atoi(optarg);
skip_args += 2;
break;
+ case '0':
+ lossdetect = atoi(optarg);
+ skip_args += 2;
+ break;
default:
opt_switch_common(c, argv[0], &skip_args);
}