Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use getopt to parse command line options #2

Closed
ryeng opened this issue May 1, 2013 · 2 comments
Closed

Use getopt to parse command line options #2

ryeng opened this issue May 1, 2013 · 2 comments
Assignees

Comments

@ryeng
Copy link
Contributor

ryeng commented May 1, 2013

Replace the current command line option parsing with getopt and provide long names for options. A review of all command line options should be conducted as part of this work.

It should be possible to specify options both as command line options and config file options. Coordinate work on this with #1.

@bjorgan
Copy link
Member

bjorgan commented Jan 1, 2016

Trying to get some overview over the command line arguments as an excuse for doing actual work.

Features removed in libpredictbranch:
-f (quickfind)
-p (quickpredict)
-s (enable socket operation)
-n (socket port)
-o (enable file output)

Features removed for now, but will probably reenable:

Old argument New argument
-north --latitude north/south
-south
-west --longitude east/west
-east

Kept features:

Old argument (try to keep as short option) New argument Comment
-u (updatefile) --update-tle-db file
-t (tle-file) --tle-file file Union of this and the rest of the TLE-files, or override completely? (Additional option?)
-q (qth-file) --qth-file file
-a (rotctl_host) --rotctl host Let 'host' be optional argument, default to localhost?
-a1 (rotctl_host) --rotctl-update-interval update interval This was a "once per second"-option, but there is a TODO in SingleTrack about enabling also other update intervals.
-ap (rotctl_port) --rotctl-port port
-h (horizon) --horizon horizon
-U (uplink host) --uplink host
-UP (uplink port) --uplink-port port
-UV (uplink VFO) --uplink-vfo vfo
-D (downlink host) --downlink host
-DP (downlink port) --downlink-port port
-DV (downlink VFO) --downlink-vfo vfo

getopt_long doesn't support multiple arguments to each option. Should find a way to enable multiple files for tle-update and for supplying additional tle files (probably by doing e.g. --tle-file file1 --tle-file file2).

Not sure whether option --rotctl explains itself enough, and whether uplink and downlink should be rigctl-uplink/-downlink for consistency's sake. --enable-rotctl? --enable-rigctl-downlink?

@bjorgan
Copy link
Member

bjorgan commented Feb 13, 2016

Fixed in d6f9f8b

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants