ptt_type and dcd_type options now accept keywords

git-svn-id: https://hamlib.svn.sourceforge.net/svnroot/hamlib/trunk@1136 7ae35d74-ebe9-4afe-98af-79ac388436b8
Hamlib-1.1.4
Stéphane Fillod, F8CFE 2002-08-23 19:55:53 +00:00
rodzic 8754944bf8
commit 9614a6c7e9
2 zmienionych plików z 34 dodań i 7 usunięć

Wyświetl plik

@ -2,7 +2,7 @@
.\" First parameter, NAME, should be all caps
.\" Second parameter, SECTION, should be 1-8, maybe w/ subsection
.\" other parameters are allowed: see man(7), man(1)
.TH RIGD "8" "October 07, 2001" "Hamlib"
.TH RIGD "8" "August 23, 2002" "Hamlib"
.\" Please adjust this date whenever revising the manpage.
.\"
.\" Some roff macros, for reference:
@ -50,10 +50,12 @@ to operate on.
.TP
.B \-p, --ptt-type=type
Use \fBtype\fP device as the kind of the Push-To-Talk device to operate on.
Supported types are RIG, DTR, RTS, PARALLEL, NONE.
.TP
.B \-d, --dcd-type=type
Use \fBtype\fP device as the kind of the Data Carrier Detect device
to operate on.
Supported types are RIG, DSR, CTS, PARALLEL, NONE.
.TP
.B \-s, --serial-speed=baud
Set serial speed to \fBbaud\fP rate. Uses maximal rig speed as default.
@ -84,13 +86,16 @@ Written by Stephane Fillod.
No authentication whatsoever. Could be done through domain restriction though.
Please ask if stronger security needed.
.PP
No more than one rig can be controlled on a system. rpc.rigd does not
support multi-rigs (hint: run rpc.rigd on a different port).
.PP
This almost empty section...
.SH REPORTING BUGS
Report bugs to <hamlib-developer@users.sourceforge.net>.
.br
I'm already aware of the bug in the previous section :-)
.SH COPYRIGHT
Copyright \(co 2000,2001 Stephane Fillod.
Copyright \(co 2000-2002 Stephane Fillod.
.br
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY

Wyświetl plik

@ -1,10 +1,10 @@
/*
* rpcrigd - (C) Stephane Fillod 2001
* rpcrigd - (C) Stephane Fillod 2001-2002
*
* This program let programs control a radio through
* the mean of RPC services using Hamlib.
*
* $Id: rpcrigd.c,v 1.3 2002-08-16 17:43:02 fillods Exp $
* $Id: rpcrigd.c,v 1.4 2002-08-23 19:55:53 fillods Exp $
*
*
* This program is free software; you can redistribute it and/or
@ -174,14 +174,36 @@ main (int argc, char *argv[])
usage(); /* wrong arg count */
exit(1);
}
ptt_type = atoi(optarg);
if (!strcmp(optarg, "RIG"))
ptt_type = RIG_PTT_RIG;
else if (!strcmp(optarg, "DTR"))
ptt_type = RIG_PTT_SERIAL_DTR;
else if (!strcmp(optarg, "RTS"))
ptt_type = RIG_PTT_SERIAL_RTS;
else if (!strcmp(optarg, "PARALLEL"))
ptt_type = RIG_PTT_PARALLEL;
else if (!strcmp(optarg, "NONE"))
ptt_type = RIG_PTT_NONE;
else
ptt_type = atoi(optarg);
break;
case 'D':
if (!optarg) {
usage(); /* wrong arg count */
exit(1);
}
dcd_type = atoi(optarg);
if (!strcmp(optarg, "RIG"))
dcd_type = RIG_DCD_RIG;
else if (!strcmp(optarg, "DSR"))
dcd_type = RIG_DCD_SERIAL_DSR;
else if (!strcmp(optarg, "CTS"))
dcd_type = RIG_DCD_SERIAL_CTS;
else if (!strcmp(optarg, "PARALLEL"))
dcd_type = RIG_DCD_PARALLEL;
else if (!strcmp(optarg, "NONE"))
dcd_type = RIG_DCD_NONE;
else
dcd_type = atoi(optarg);
break;
case 'c':
if (!optarg) {
@ -314,7 +336,7 @@ void rigd_exit()
void usage()
{
printf("Usage: rpc.rigd [OPTION]... [COMMAND]...\n"
printf("Usage: rpc.rigd [OPTION]...\n"
"Offer RPC services to remotely control a connected radio transceiver or receiver.\n\n");
printf(