for supporting us and providing documentation
Icom PCR backend
----------------
* Ghetto's team, PCR-1000 ICOM receiver
URL: http://www.philtered.net/icomlib.phtml
Other Assistance
----------------
* Special thanks to Ed Hare, W1RFI, and the American Radio Relay League for technical support.
================================================
FILE: software/hamlib-w64-4.5~git/doc/ampctl.1.html
================================================
AMPCTL
AMPCTL
NAME
SYNOPSIS
DESCRIPTION
OPTIONS
COMMANDS
READLINE
DIAGNOSTICS
EXIT STATUS
EXAMPLES
BUGS
COPYING
SEE ALSO
COLOPHON
NAME
ampctl -
control radio amplifiers
SYNOPSIS
|
ampctl |
|
[-hiIlLuV]
[-m id] [-r device]
[-s baud] [-t char]
[-C parm=val] [-v[-Z]]
[command|-] |
DESCRIPTION
Control radio
amplifiers. ampctl accepts commands from the
command line as well as in interactive mode if none are
provided on the command line.
Keep in mind
that Hamlib is BETA level software. While a lot of backend
libraries lack complete amplifier support, the basic
functions are usually well supported.
Please report
bugs and provide feedback at the e-mail address given in the
BUGS section below. Patches and code enhancements
sent to the same address are welcome.
OPTIONS
This program
follows the usual GNU command line syntax. Short options
that take an argument may have the value follow immediately
or be separated by a space. Long options starting with two
dashes (’-’) require an ’=’ between
the option and any argument.
Here is a
summary of the supported options:
-m, --model=id
Select amplifier model
number.
See model list
(use “ampctl -l”).
Note:
ampctl (or third party software using the C API) will
use amplifier model 2 for NET ampctl (communicating
with ampctld).
-r,
--amp-file=device
Use device as the file
name of the port connected to the amplifier.
Often a serial
port, but could be a USB to serial adapter. Typically
/dev/ttyS0, /dev/ttyS1, /dev/ttyUSB0,
etc. on Linux, COM1, COM2, etc. on MS Windows.
The BSD flavors and Mac OS/X have their own designations.
See your system’s documentation.
-s,
--serial-speed=baud
Set serial speed to baud
rate.
Uses maximum
serial speed from amplifier backend capabilities (set by
-m above) as the default.
-t,
--send-cmd-term=char
Change the termination
char for text protocol when using the send_cmd
command.
The default
value is ASCII CR (’0x0D’). ASCII non-printing
characters can be given as the ASCII number in hexadecimal
format prepended with “0x”. You may pass an
empty string for no termination char. The string
“-1” tells ampctl to switch to binary
protocol.
For example, to
specify a command terminator for Kenwood style text commands
pass “-t ’;’” to ampctl. See
EXAMPLE below.
-L,
--show-conf
List all config parameters for
the amplifier defined with -m above.
-C,
--set-conf=parm=val[,parm=val]
Set amplifier configuration
parameter(s), e.g. stop_bits=2.
Use the
-L option above for a list of configuration
parameters for a given model number.
-u,
--dump-caps
Dump capabilities for the
amplifier defined with -m above and exit.
-l, --list
List all amplifier model
numbers defined in Hamlib and exit.
The list is
sorted by model number.
Note: In
Linux the list can be scrolled back using
Shift-PageUp/Shift-PageDown, or using the
scrollbars of a virtual terminal in X or the cmd window in
Windows. The output can be piped to more(1) or
less(1), e.g. “ampctl -l | more”.
-i,
--read-history
Read previously saved command
and argument history from a file (default
$HOME/.ampctl_history) for the current session.
Available when
ampctl is built with Readline support (see READLINE
below).
Note: To
read a history file stored in another directory, set the
AMPCTL_HIST_DIR environment variable, e.g.
“AMPCTL_HIST_DIR=~/tmp ampctl -i”. When
AMPCTL_HIST_DIR is not set, the value of HOME is
used.
-I,
--save-history
Write current session (and
previous session(s), if -i option is given) command
and argument history to a file (default
$HOME/.ampctl_history) at the end of the current
session.
Complete
commands with arguments are saved as a single line to be
recalled and used or edited. Available when ampctl is
built with Readline support (see READLINE below).
Note: To
write a history file in another directory, set the
AMPCTL_HIST_DIR environment variable, e.g.
“AMPCTL_HIST_DIR=~/tmp ampctl -IRq. When
AMPCTL_HIST_DIR is not set, the value of HOME is
used.
-v, --verbose
Set verbose mode, cumulative
(see DIAGNOSTICS below).
-Z,
--debug-time-stamps
Enable time stamps for the
debug messages.
Use only in
combination with the -v option as it generates no
output on its own.
-h, --help
Show a summary of these options
and exit.
-V, --version
Show version of ampctl
and exit.
|
- |
|
Stop option processing and read commands from standard
input. |
See Standard
Input below.
Note:
Some options may not be implemented by a given backend and
will return an error. This is most likely to occur with the
--set-conf and --show-conf options.
Please note
that the backend for the amplifier to be controlled, or the
amplifier itself may not support some commands. In that
case, the operation will fail with a Hamlib error
code.
COMMANDS
Commands can be
entered either as a single char, or as a long command name.
The commands are not prefixed with a dash as the options
are. They may be typed in when in interactive mode or
provided as argument(s) in command line interface mode. In
interactive mode commands and their arguments may be entered
on a single line:
F
14250000
Since most of
the Hamlib operations have a set and a
get method, an upper case letter will often be used
for a set method whereas the corresponding lower case
letter refers to the get method. Each operation also
has a long name; in interactive mode, prepend a backslash,
’\’, to enter a long command name.
Example: Use
“\dump_caps” to see what capabilities this
amplifier and backend support.
Note:
The backend for the amplifier to be controlled, or the
amplifier itself may not support some commands. In that
case, the operation will fail with a Hamlib error
message.
A simple
example using commands saved to a file (typed text shown in
bold):
$ cat
<<.EOF. >cmds.txt
> # File of commands
> F 14250000
> f
> l PWRINPUT
> l PWRFORWARD
> l SWR
> \dump_caps
> .EOF.
$ ampctl -m1
- <cmds.txt
Amplifier
command: # File of commands
Amplifier
command: F 14250000
Amplifier
command: f
Frequency(Hz): 14250000
Amplifier
command: l PWRINPUT
Level Value: 0
Amplifier
command: l PWRFORWARD
Level Value: 1499
Amplifier
command: l SWR
Level Value: 1.000000
Amplifier
command: \dump_caps
Caps dump for model: 1
Model name: Dummy
Mfg name: Hamlib
Backend version: 0.1
Backend copyright: LGPL
Backend status: Alpha
Amp type: Other
Port type: None
Write delay: 0mS, timeout 0mS, 0 retries
Post Write delay: 0mS
Has priv data: N
Get level: SWR NH PF PWRINPUT PWRFORWARD PWRREFLECTED
PWRPEAK FAULT
Has Init: Y
Has Cleanup: Y
Has Open: Y
Has Close: Y
Can set Conf: N
Can get Conf: N
Can Reset: Y
Can get Info: Y
Overall backend
warnings: 0
Amplifier
command:
$
ampctl
Commands
A summary of commands is included below (In the case of
set commands the quoted italicized string is replaced
by the value in the description. In the case of get
commands the quoted italicized string is the key name of the
value returned.):
Q|q, exit ampctl
Exit ampctl in interactive
mode.
When ampctl is
controlling the amplifier directly, will close the amplifier
backend and port. When ampctl is connected to ampctld
(amplifier model 2), the TCP/IP connection to ampctld is
closed and ampctld remains running, available for another
TCP/IP network connection.
F, set_freq
'Frequency'
Set 'Frequency', in
Hz.
Frequency may
be a floating point or integer value.
f, get_freq
Get 'Frequency', in
Hz.
Returns an
integer value.
l, get_level
'Level'
Get 'Level Value'.
Returns Level
Value as a float or integer for the Level token given.
Note:
Passing a ’?’ (query) as the first argument
instead of a Level token will return a space separated list
of amplifier backend supported get level tokens. Use this to
determine the supported levels of a given amplifier
backend.
w, send_cmd
'Cmd'
Send a raw command string to
the amplifier.
This is useful
for testing and troubleshooting amplifier commands and
responses when developing a backend.
For binary
protocols enter values as \0xAA\0xBB. Expect a
'Reply' from the amplifier which will likely be a
binary block or an ASCII string depending on the
amplifier’s protocol (see your amplifier’s
computer control documentation).
The command
terminator, set by the send-cmd-term option above,
will terminate each command string sent to the amplifier.
This character should not be a part of the input string.
dump_state
Return certain state
information about the amplifier backend.
1, dump_caps
Not a real amplifier remote
command, it just dumps capabilities, i.e. what the backend
knows about this model, and what it can do.
TODO: Ensure
this is in a consistent format so it can be read into a
hash, dictionary, etc. Bug reports requested.
Note:
This command will produce many lines of output so be very
careful if using a fixed length array! For example, running
this command against the Dummy backend results in a number
of lines of text output.
_, get_info
Return information from the
amplifier backend.
R, reset
'Reset'
Perform amplifier
'Reset'.
Reset is an
integer value: ’0’ = None, ’1’ =
Memory reset, ’2’ = Fault reset, ’3’
= Amplifier reset.
set_powerstat 'Power
Status'
Set 'Power Status'.
Power Status is
an integer value: ’0’ = Power Off,
’1’ = Power On, ’2’ = Power Standby
(enter standby), ’4’ = Power Operate (leave
standby).
get_powerstat
Get 'Power Status' as in
set_powerstat above.
READLINE
If
Readline library development files are found at
configure time, ampctl will be conditonally built
with Readline support for command and argument entry.
Readline command key bindings are at their defaults as
described in the
Readline
manual. ampctl sets the name “ampctl”
which can be used in Conditional Init Constructs in the
Readline Init File ($HOME/.inputrc by default) for
custom keybindings unique to ampctl.
Command history
is available with Readline support as described in the
Readline
History manual. Command and argument strings are stored
as single lines even when arguments are prompted for input
individually. Commands and arguments are not validated and
are stored as typed with values separated by a single
space.
Normally
session history is not saved, however, use of either of the
-i/--read-history or
-I/--save-history options when starting
ampctl will cause any previously saved history to be
read in and/or the current and any previous session history
(assuming the -i and -I options are given
together) will be written out when ampctl is closed.
Each option is mutually exclusive, i.e. either may be given
separately or in combination. This is useful to save a set
of commands and then read them later but not write the
modified history for a consistent set of test commands in
interactive mode, for example.
History is
stored in $HOME/.ampctl_history by default although
the destination directory may be changed by setting the
AMPCTL_HIST_DIR environment variable. When
AMPCTL_HIST_DIR is unset, the value of the HOME
environment variable is used instead. Only the destination
directory may be changed at this time.
If Readline
support is not found at configure time the original internal
command handler is used. Readline is not used for
ampctl commands entered on the command line
regardless if Readline support is built in or not.
Note:
Readline support is not included in the MS Windows 32 or 64
bit binary builds supplied by the Hamlib Project. Running
ampctl on the MS Windows platform in the
’cmd’ shell does give session command line
history, however, it is not saved to disk between
sessions.
DIAGNOSTICS
The -v,
--verbose option allows different levels of
diagnostics to be output to stderr and correspond to
-v for BUG, -vv for ERR, -vvv for WARN,
-vvvv for VERBOSE, or -vvvvv for TRACE.
A given verbose
level is useful for providing needed debugging information
to the email address below. For example, TRACE output shows
all of the values sent to and received from the amplifier
which is very useful for amplifier backend library
development and may be requested by the developers.
EXIT STATUS
ampctl
exits with:
|
0 |
|
if all operations completed normally; |
|
1 |
|
if there was an invalid command line option or
argument; |
|
2 |
|
if an error was returned by Hamlib. |
EXAMPLES
Start
ampctl for am Elecraft KPA-1500 using a USB to serial
adapter on Linux in interactive mode:
$ ampctl -m
201 -r /dev/ttyUSB1
Start
ampctl for an Elecraft KPA-1500 using COM1 on MS
Windows while generating TRACE output to stderr:
> ampctl
-m 201 -r COM1 -vvvvv
Connect to a
running ampctld with amplifier model 2 (“NET
ampctl”) on the local host and specifying the TCP
port, setting frequency and mode:
$ ampctl -m
2 -r localhost:4531 F 7253500
BUGS
This almost
empty section...
Report bugs
to:
Hamlib
Developer mailing list
COPYING
This file is
part of Hamlib, a project to develop a library that
simplifies radio, rotator, and amplifier control functions
for developers of software primarily of interest to radio
amateurs and those interested in radio communications.
Copyright
© 2000-2011 Stephane Fillod
Copyright © 2000-2018 the Hamlib Group (various
contributors)
Copyright © 2010-2020 Nate Bargmann
This is free
software; see the file COPYING for copying conditions. There
is NO warranty; not even for MERCHANTABILITY or FITNESS FOR
A PARTICULAR PURPOSE.
SEE ALSO
less(1),
more(1), ampctld(1), hamlib(7)
COLOPHON
Links to the
Hamlib Wiki, Git repository, release archives, and daily
snapshot archives are available via
hamlib.org.
================================================
FILE: software/hamlib-w64-4.5~git/doc/ampctld.1.html
================================================
AMPCTLD
AMPCTLD
NAME
SYNOPSIS
DESCRIPTION
OPTIONS
COMMANDS
PROTOCOL
DIAGNOSTICS
EXAMPLES
SECURITY
BUGS
COPYING
SEE ALSO
COLOPHON
NAME
ampctld - TCP
amplifier control daemon
SYNOPSIS
|
ampctld |
|
[-hlLuV]
[-m id] [-r device]
[-s baud] [-T IPADDR]
[-t number]
[-C parm=val] [-v[-Z]] |
DESCRIPTION
The
ampctld program is an amplifier control daemon that
handles client requests via TCP sockets. This allows
multiple user programs to share one amplifier (this needs
more development). Multiple amplifiers can be controlled on
different TCP ports by use of multiple ampctld
processes. Note that multiple processes/ports are also
necessary if some clients use extended responses and/or vfo
mode. So up to 4 processes/ports may be needed for each
combination of extended response/vfo mode. The syntax of the
commands are the same as ampctl(1). It is hoped that
ampctld will be especially useful for client authors
using languages such as Perl, Python, PHP, and others.
ampctld
communicates to a client through a TCP socket using text
commands shared with ampctl. The protocol is simple,
commands are sent to ampctld on one line and
ampctld responds to get commands with the
requested values, one per line, when successful, otherwise,
it responds with one line “RPRT x”, where
’x’ is a negative number indicating the error
code. Commands that do not return values respond with the
line “RPRT x”, where ’x’ is
’0’ when successful, otherwise is a regative
number indicating the error code. Each line is terminated
with a newline ’\n’ character. This protocol is
primarily for use by the NET ampctl (amplifier model
2) backend.
A separate
Extended Response Protocol extends the above behavior
by echoing the received command string as a header, any
returned values as a key: value pair, and the “RPRT
x” string as the end of response marker which includes
the Hamlib success or failure value. See the
PROTOCOL section for details. Consider using this
protocol for clients that will interact with ampctld
directly through a TCP socket.
Keep in mind
that Hamlib is BETA level software. While a lot of backend
libraries lack complete amplifier support, the basic
functions are usually well supported.
Please report
bugs and provide feedback at the e-mail address given in the
BUGS section below. Patches and code enhancements
sent to the same address are welcome.
OPTIONS
This program
follows the usual GNU command line syntax. Short options
that take an argument may have the value follow immediately
or be separated by a space. Long options starting with two
dashes (’-’) require an ’=’ between
the option and any argument.
Here is a
summary of the supported options:
-m, --model=id
Select amplifier model
number.
See model list
(use “ampctl -l”).
Note:
ampctl (or third party software using the C API) will
use amplifier model 2 for NET ampctl (communicating
with ampctld).
-r,
--amp-file=device
Use device as the file
name of the port connected to the amplifier.
Often a serial
port, but could be a USB to serial adapter. Typically
/dev/ttyS0, /dev/ttyS1, /dev/ttyUSB0,
etc. on Linux, COM1, COM2, etc. on MS Windows.
The BSD flavors and Mac OS/X have their own designations.
See your system’s documentation.
-s,
--serial-speed=baud
Set serial speed to baud
rate.
Uses maximum
serial speed from amplifier backend capabilities (set by
-m above) as the default.
-t,
--port=number
Use number as the TCP
listening port.
The default is
4531.
Note: As
rigctld’s default port is 4532 and
rotctld’s default port is 4533, it is
recommended to use DESCENDING odd numbered ports for
multiple ampctld instances, e.g. 4529, 4527, 4525,
etc.
-T,
--listen-addr=IPADDR
Use IPADDR as the
listening IP address.
The default is
ANY.
-L,
--show-conf
List all config parameters for
the amplifier defined with -m above.
-C,
--set-conf=parm=val[,parm=val]
Set amplifier configuration
parameter(s), e.g. stop_bits=2.
Use the
-L option above for a list of configuration
parameters for a given model number.
-u,
--dump-caps
Dump capabilities for the
amplifier defined with -m above and exit.
-l, --list
List all amplifier model
numbers defined in Hamlib and exit.
The list is
sorted by model number.
Note: In
Linux the list can be scrolled back using
Shift-PageUp/Shift-PageDown, or using the
scrollbars of a virtual terminal in X or the cmd window in
Windows. The output can be piped to more(1) or
less(1), e.g. “ampctl -l | more”.
-v, --verbose
Set verbose mode, cumulative
(see DIAGNOSTICS below).
-Z,
--debug-time-stamps
Enable time stamps for the
debug messages.
Use only in
combination with the -v option as it generates no
output on its own.
-h, --help
Show a summary of these options
and exit.
-V, --version
Show version of ampctl
and exit.
Note:
Some options may not be implemented by a given backend and
will return an error. This is most likely to occur with the
--set-conf and --show-conf options.
Please note
that the backend for the amplifier to be controlled, or the
amplifier itself may not support some commands. In that
case, the operation will fail with a Hamlib error
code.
COMMANDS
Commands can be
sent over the TCP socket either as a single char, or as a
long command name plus the value(s) space separated on one
’\n’ terminated line. See PROTOCOL.
Since most of
the Hamlib operations have a set and a
get method, an upper case letter will be used for
set methods whereas the corresponding lower case
letter refers to the get method. Each operation also
has a long name; prepend a backslash, ’\’, to
send a long command name.
Example (Perl):
“print $socket "\\dump_caps\n";” to
see what the amplifier’s backend can do (Note:
In Perl and many other languages a ’\’ will need
to be escaped with a preceding ’\’ so that even
though two backslash characters appear in the code, only one
will be passed to ampctld. This is a possible bug,
beware!).
Note:
The backend for the amplifier to be controlled, or the
amplifier itself may not support some commands. In that
case, the operation will fail with a Hamlib error
message.
Here is a
summary of the supported commands (In the case of set
commands the quoted italicized string is replaced by the
value in the description. In the case of get commands
the quoted italicized string is the key name of the value
returned.):
F, set_freq 'Frequency'
Set 'Frequency', in
Hz.
Frequency may
be a floating point or integer value.
f, get_freq
Get 'Frequency', in
Hz.
Returns an
integer value.
l, get_level
'Level'
Get 'Level Value'.
Returns Level
Value as a float or integer for the Level token given.
Note:
Passing a ’?’ (query) as the first argument
instead of a Level token will return a space separated list
of amplifier backend supported get level tokens. Use this to
determine the supported levels of a given amplifier
backend.
dump_state
Return certain state
information about the amplifier backend.
1, dump_caps
Not a real amplifier remote
command, it just dumps capabilities, i.e. what the backend
knows about this model, and what it can do.
TODO: Ensure
this is in a consistent format so it can be read into a
hash, dictionary, etc. Bug reports requested.
Note:
This command will produce many lines of output so be very
careful if using a fixed length array! For example, running
this command against the Dummy backend results in a number
of lines of text output.
_, get_info
Return information from the
amplifier backend.
R, reset
'Reset'
Perform amplifier
'Reset'.
Reset is an
integer value: ’0’ = None, ’1’ =
Memory reset, ’2’ = Fault reset, ’3’
= Amplifier reset.
set_powerstat 'Power
Status'
Set 'Power Status'.
Power Status is
an integer value: ’0’ = Power Off,
’1’ = Power On, ’2’ = Power Standby
(enter standby), ’4’ = Power Operate (leave
standby).
get_powerstat
Get 'Power Status' as in
set_powerstat above.
PROTOCOL
There are two
protocols in use by ampctld, the Default
Protocol and the Extended Response Protocol.
The Default
Protocol is intended primarily for the communication
between Hamlib library functions and ampctld
(“NET ampctl”, available using amplifier model
’2’).
The Extended
Response Protocol is intended to be used with scripts or
other programs interacting directly with ampctld as
consistent feedback is provided.
Default
Protocol
The Default Protocol is intentionally simple.
Commands are entered on a single line with any needed
values. In practice, reliable results are obtained by
terminating each command string with a newline character,
’\n’.
Example set
frequency and mode commands (Perl code (typed text shown in
bold)):
print
$socket "F 14250000\n";
print $socket "\\set_powerstat 1\n"; # escape
leading ’\’
A one line
response will be sent as a reply to set commands,
“RPRT x\n” where x is the Hamlib
error code with ’0’ indicating success of the
command.
Responses from
ampctld get commands are text values and match the
same tokens used in the set commands. Each value is
returned on its own line. On error the string “RPRT
x\n” is returned where x is the Hamlib
error code.
Example get
frequency (Perl code):
print
$socket "f\n";
"14250000\n"
Most get
functions return one to three values. A notable exception is
the dump_caps command which returns many lines of
key:value pairs.
This protocol
is primarily used by the “NET ampctl” (ampctl
model 2) backend which allows applications already written
for Hamlib’s C API to take advantage of ampctld
without the need of rewriting application code. An
application’s user can select amplifier model 2
(“NET ampctl”) and then set amp_pathname
to “localhost:4531” or other network
host:port (set by the -T/-t
options, respectively, above).
Extended
Response Protocol
The Extended Response protocol adds several rules to the
strings returned by ampctld and adds a rule for the
command syntax.
1. The command
received by ampctld is echoed with its long command
name followed by the value(s) (if any) received from the
client terminated by the specified response separator as the
first record of the response.
2. The last
record of each block is the string “RPRT
x\n” where x is the numeric return value
of the Hamlib backend function that was called by the
command.
3. Any records
consisting of data values returned by the amplifier backend
are prepended by a string immediately followed by a colon
then a space and then the value terminated by the response
separator. e.g. “Frequency: 14250000\n” when the
command was prepended by ’+’.
4. All commands
received will be acknowledged by ampctld
with records from rules 1 and 2. Records from rule 3 are
only returned when data values must be returned to the
client.
4. All commands
received will be acknowledged by ampctld with records
from rules 1 and 2. Records from rule 3 are only returned
when data values must be returned to the client.
An example
response to a set_frequency command sent from the
shell prompt (note the prepended ’+’):
$ echo
"+F 14250000" | nc -w 1 localhost 4531
set_freq: 14250000
RPRT 0
In this case
the long command name and values are returned on the first
line and the second line contains the end of block marker
and the numeric amplifier backend return value indicating
success.
An example
response to a get_freq query:
$ echo
"+\get_freq" | nc -w 1 localhost 4531
get_freq:
Frequency(Hz): 14250000
RPRT 0
Note:
The ’\’ is still required for the long command
name even with the ERP character.
In this case,
as no value is passed to ampctld, the first line
consists only of the long command name. The final line shows
that the command was processed successfully by the amplifier
backend.
Invoking the
Extended Response Protocol requires prepending a command
with a punctuation character. As shown in the examples
above, prepending a ’+’ character to the command
results in the responses being separated by a newline
character (’\n’). Any other punctuation
character recognized by the C ispunct() function
except ’\’, ’?’, or ’_’
will cause that character to become the response separator
and the entire response will be on one line.
Separator
character summary:
|
’+’ |
|
Each record of the response is appended with a newline
(’\n’). |
’;’,
’|’, or, ’,’
Each record of the response is
appended by the given character resulting in entire response
on one line.
These are
common record separators for text representations of
spreadsheet data, etc.
|
’?’ |
|
Reserved for help in ampctl. |
|
’_’ |
|
Reserved for get_info short command |
|
’#’ |
|
Reserved for comments when reading a command file
script. |
Note:
Other punctuation characters have not been tested! Use at
your own risk.
For example,
invoking a get_freq query with a leading
’;’ returns:
get_freq:;Frequency(Hz):
14250000;RPRT 0
Or, using the
pipe character ’|’ returns:
get_freq:|Frequency(Hz):
14250000|RPRT 0
And a
set_freq command prepended with a ’|’
returns:
set_freq:
14250000|RPRT 0
Such a format
will allow reading a response as a single event using a
preferred response separator. Other punctuation characters
have not been tested!
DIAGNOSTICS
The -v,
--verbose option allows different levels of
diagnostics to be output to stderr and correspond to
-v for BUG, -vv for ERR, -vvv for WARN,
-vvvv for VERBOSE, or -vvvvv for TRACE.
A given verbose
level is useful for providing needed debugging information
to the email address below. For example, TRACE output shows
all of the values sent to and received from the amplifier
which is very useful for amplifier backend library
development and may be requested by the developers.
EXAMPLES
Start
ampctld for an Elecraft KPA-1500 using a
USB-to-serial adapter and backgrounding:
$ ampctld -m
201 -r /dev/ttyUSB1 &
Start
ampctld for an Elecraft KPA-1500 using COM2 on MS
Windows:
$ ampctld -m
201 -r COM2
Connect to the
already running ampctld and set the frequency to
14.266 MHz with a 1 second read timeout using the default
protocol from the shell prompt:
$ echo
"\set_freq 14266000" | nc -w 1 localhost
4531
Connect to a
running ampctld with ampctl on the local
host:
$ ampctl
-m2
SECURITY
No
authentication whatsoever; DO NOT leave this TCP port open
wide to the Internet. Please ask if stronger security is
needed or consider using a Secure Shell (ssh(1))
tunnel.
As
ampctld does not need any greater permissions than
ampctl, it is advisable to not start ampctld
as “root” or another system user account in
order to limit any vulnerability.
BUGS
The daemon is
not detaching and backgrounding itself.
No method to
exit the daemon so the kill(1) command must be used
to terminate it.
Multiple
clients using the daemon may experience contention with the
connected amplifier.
Report bugs
to:
Hamlib
Developer mailing list
COPYING
This file is
part of Hamlib, a project to develop a library that
simplifies radio, rotator, and amplifier control functions
for developers of software primarily of interest to radio
amateurs and those interested in radio communications.
Copyright
© 2000-2010 Stephane Fillod
Copyright © 2000-2018 the Hamlib Group (various
contributors)
Copyright © 2011-2020 Nate Bargmann
This is free
software; see the file COPYING for copying conditions. There
is NO warranty; not even for MERCHANTABILITY or FITNESS FOR
A PARTICULAR PURPOSE.
SEE ALSO
kill(1),
ampctl(1), ssh(1), hamlib(7)
COLOPHON
Links to the
Hamlib Wiki, Git repository, release archives, and daily
snapshot archives are available via
hamlib.org.
================================================
FILE: software/hamlib-w64-4.5~git/doc/hamlib-primer.7.html
================================================
HAMLIB-PRIMER
HAMLIB-PRIMER
NAME
DESCRIPTION
COPYING
SEE ALSO
COLOPHON
NAME
hamlib-primer -
compiling and using the radio and rotator control
library
DESCRIPTION
There are
several ways to obtain a working installation of Hamlib. The
following sections discuss installing from a package
manager, building from source, and installing Hamlib project
supplied binaries on Microsoft Windows®
Installing
binary packages on Linux and BSD
The easiest way to install a released version of Hamlib on a
Linux based distribution or a BSD variant is through the
provided package manager. While package managers vary
according to the distribution (it’s easy to lump BSD
variants in this group too) their end goal is to provide
ready to use software packages. Since such a wide variety of
package managers exist, it is best to recommend that the
documentation for your chosen distribution be your
guide.
A variety of
Hamlib sources
Distribution packages are most often official Hamlib
releases and in some cases could be quite old and lacking
support for newer radios or rotators. In some cases support
is improved in existing radio or rotator back ends and bugs
are fixed in newer releases. Often times to get the improved
support/bug fixes, building from source will be required.
Relax, it’s not hard. :-)
Source code is
available as official releases, testing snapshots, daily
development snapshots, and the bleeding edge of development
directly from the
Git
repository. As a rule, even the bleeding edge tarballs
should configure and compile without error even though
certain implementation work may be in progress and may be
incomplete or have errors.
Getting
released source
Official Hamlib source releases, commonly called
tarballs can be found on the
SourceForge.net
Hamlib files Web page. The most recent release is listed
first.
Getting
source snapshots
Testing release candidates (RCs) are posted during the
period (often a few weeks) before a planned release.
Beginning with the 4.0 release, RCs are hosted by the
SourceForge.net
Hamlib files Web page. RCs are identifed by having a
~rcX suffix where the X is replace by a
numeral for successive release candidates.
Daily snapshots
of the development repository are available via the World
Wide Web from
Hamlib Git
daily snapshots. These are not official releases but are
provided for testing new features and bug fixes.
The daily
development snapshot is made and posted each day by around
1030 UTC. Daily snapshots should compile but
sometimes a bug creeps in that prevents compilation. If that
should happen, please report it to the
hamlib-developer
mailing list.
Git
repository
The source repository can be cloned which copies the
repository to your computer including its entire history,
branches, and release tag information. In other words, once
the git(1) clone command is finished a
complete copy of the Hamlib development will be on your
computer. You can do quite a lot with this as nothing is
hidden from view since the entire history of Hamlib is right
there all the way from the very first commit to the present.
None of the meta-data is hidden away on some central
server.
To clone the
repository use the following command:
git clone
https://git.code.sf.net/p/hamlib/code hamlib
or:
git clone
https://github.com/Hamlib/Hamlib.git
Odds are that
you will want to run the above command in a sub directory of
your home directory. The hamlib directory will be
created by Git and the master branch will be checked
out for you as the working copy. The master branch is
one of several branches used in Hamlib development. It is
the main branch of new features and bug fixes. The working
copy will be the latest revision of every file at the time
of the clone. Later updates from the developers will require
using another Git command to update your local
repository.
Building
from source
Building from source will be required for various reasons.
Perhaps only an older release is provided by your
distribution, or you would like to test recent changes to
Hamlib—either a specific back end or API
changes—and offer a report to the developers, or you
would like to take part in development and offer your
contribution to the project, or you would just like to learn
how to build a relatively comprehensive package from source.
Any is a good reason to build from the source code
archive.
Before going
further, this manual assumes familiarity with working from
the command prompt in a Linux/BSD/Unix like system’s
Bourne shell environment (compatible Bourne shells
include bash(1), ksh(1), zsh(1), and
several more) either in a virtual console (a text
only screen with no graphics) or in a terminal in a
desktop environment (xterm(1), rxvt(1),
konsole(1) (included with the KDE desktop),
gnome-terminal(1), xfce4-terminal(1),
terminal(1) (included in macOS), etc.). If this is
new to you, take some time and read up on using the shell. A
good tutorial can be found at
LinuxCommand.org
which also offers an in-depth book that can be purchased or
downloaded for no cost (the Hamlib project is not associated
with nor has any interest in the sale of this book, it just
looks like a very good effort on the part of its
author).
Let’s get
started.
Compiling
source tarballs
Before proceeding, it is essential to read the information
in the files, README, INSTALL, and
README.betatester supplied in the Hamlib
top-level directory which will be named something
like hamlib-3.3~git where the latter part is the
release version. In this case the 3.3~git indicates
this is a development snapshot of the Git master branch.
These files provide detailed information for compiling
Hamlib and will vary some from release to release.
Compiling from
a source tarball whether it is an official release or a
testing or daily development snapshot follows the same set
of commands, known as the three step which are each
run from the top-level directory:
./configure
make
sudo make install
configure
The ./configure command examines your system
and checks it for any packages that are required or good to
have options for compiling Hamlib. The leading ./
tells the shell to only run the configure command
found in the current directory. It is always possible that a
configure command could be lurking elsewhere and we
don’t want to run that!
Run:
./configure
from the
top-level directory.
Note:
Some distributions are configured so commands can only be
run from directories listed in the PATH environment
variable. The ./ is necessary or the configure
command will not be run as the current directory
(defined as .) is not in the PATH. This is
considered a default security feature so that only programs
provided by the distribution are run. PATH can be
modified for your own session, but that is a topic for the
LinuxCommand.org reference above.
Of course,
things are usually complicated a bit by options and Hamlib
is no exception. The good news is that the defaults, i.e.,
no options, work well in most situations. Options are needed
to enable the compilation of certain portions of Hamlib such
as the language bindings. Optional features usually require
that more development tools are installed. The
INSTALL and README.betatester files in the
Hamlib top-level directory will have details on the options
available for that release.
A useful option
is --prefix which tells configure where in the
file system hierarchy Hamlib should be installed. If it is
not given, Hamlib will be installed in the /usr/local
file system hierarchy. Perhaps you want to install to your
home directory instead:
./configure
--prefix=$HOME/local
Note:
For practice you may wish to start out using the
--prefix=$HOME/local option to install the
Hamlib files into your home directory and avoid overwriting
any version of Hamlib installed into the system directories.
The code examples in the remainder of this manual will
assume Hamlib has been installed to $HOME/local.
As a result of
this option, all of the files will be installed in the
local directory of your home directory. local
will be created if it does not exist during installation as
will several other directories in it. Installing in your
home directory means that root, or superuser
(administrator) privileges are not required when running
make install. On the other hand, some extra work will
need to be done so other programs can use the library. The
utilities that are compiled as a part of the Hamlib build
system will work as they are linked to the library
installed under local. Running them will require
declaring the complete path:
local/bin/rigctl
or modifying
your shell’s PATH environment variable (see the
shell tutorial site above).
Another useful
option is --help which will give a few screens full
of options for configure. If in a desktop environment
the scroll bar can be used to scroll back up through the
output. In either a terminal or a virtual console Linux
supports the Shift-PageUp key combination to scroll back up.
Conversely, Shift-PageDown can be used to scroll down toward
the end of the output and the shell prompt
(Shift-UpArrow/Shift-DownArrow may also work to scroll one
line at a time (terminal dependent)).
After a fair
amount of time, depending on your computer, and a lot of
screen output, configure will finish its job. So long
as the few lines previous to the shell prompt don’t
say “error” or some such failure message Hamlib
is ready to be compiled. If there is an error and all of the
required packages listed in README.betatester have
been installed, please ask for help on the
hamlib-developer
mailing list.
make
The make(1) command is responsible for running the
compiler which reads the source files and from the
instructions it finds in them writes object files
which are the binary instructions the CPU of a computer can
execute. make then calls the linker which puts
the object files together in the correct order to create the
Hamlib library files and its executable programs.
Run:
make
from the
top-level directory.
Any error that
causes make to stop early is cause for a question to
the
hamlib-developer
mailing list.
In general
make will take longer than configure to
complete its run. As it is a system command, and therefore
found in the shell’s PATH environment variable,
prefixing make with ./ will cause a
“command not found” error from the shell.
make
install
Assuming that you have not set the installation prefix to
your home directory, root (administrator) privileges will be
required to install Hamlib to the system directories. Two
popular methods exist for gaining root privileges,
su(1) and sudo(8). sudo is probably the
most popular these days, particularly when using the
Ubuntu family of
distributions.
Run:
sudo make
install
or:
$ su -l
Password:
# make install
as root from
the top-level directory.
Note:
The shell session is shown to show the change in prompt from
a normal user account to the root account.
The -l
option to su forces a login shell so that
environment variables such as PATH are set
correctly.
Running make
install will call the installer to put all of the newly
compiled files and other files (such as this document) in
predetermined places set by the --prefix option to
configure in the directory hierarchy (yes, this is by
design and make is not just flinging files any old
place!).
A lot of screen
output will be generated. Any errors will probably be rather
early in the process and will likely be related to your
username not having write permissions in the system
directory structure.
ldconfig
Once the installation is complete one more step is required
if Hamlib has never been installed from a local build
before. The ldconfig command tells the system library
loader where to find the newly installed Hamlib libraries.
It too will need to be run with root privileges:
Run:
sudo
ldconfig
as root from
any directory or while logged in as root from above.
Note:
Subsequent installations of Hamlib will not need to have
ldconfig run after each installation if a newer
version of Hamlib was not installed, i.e., when recompiling
the same version during development.
On some
distributions a bit of configuration will be needed before
ldconfig will add locally compiled software to its
database. Please consult your distribution’s
documentation.
Bootstrapping
from a 'git clone'
Choosing to build from from a git clone requires a
few more development tools (notice a theme here?) as
detailed in README.developer. The most critical will
be the GNU Autotools (autoconf, automake,
libtool, and more) from which the build system
consisting of configure, the various
Makefile.ins throughout the directory structure, and
the final Makefiles are generated.
In the
top-level directory is the bootstrap script from
which the build system is bootsrapped—the
process of generating the Hamlib build system from
configure.ac and the various Makefile.ams. At
its completion the configure script will be present
to configure the build system.
Next
configure is run with any needed build options
(configure --help is useful) to enable certain
features or provide paths for locating needed build
dependencies, etc. Environment variables intended for the
preprocessor and/or compiler may also be set on the
configure command line.
After the
configuration is complete, the build may proceed with the
make step as for the source tarballs above. Or
configure --help may be run, and configure run
again with specific options in which case the
Makefiles will be regenerated and the build can
proceed with the new configuration.
Other make
targets
Besides make install, other targets exist when
running make. Running make clean from the
top-level directory removes all of the generated object and
executable files generated by running make freeing up
considerable disk space.
Note:
During development of individual source files, it is not
necessary to run make clean each time before
make. Simply run make and only the modified
file(s) and any objects that depend on them will be
recompiled. This speeds up development time
considerably.
To remove even
the generated Makefiles, run make distclean
from the top-level directory. After this target is run,
configure will need to be run again to regenerate the
Makefiles. This command may not be as useful as the
Makefiles do not take up much space, however it can
be useful for rebuilding the Makefiles when modifying
a Makefile.am or confgure.ac during build
system development.
Parallel
build trees
One feature of the GNU build system used by Hamlib is that
the object files can be kept in a directory structure
separate from the source files. While this has no effect on
the make targets described above, it does help the
developer find files in the source tree! One such way of
using parallel builds is described in
README.developer.
Parallel builds
can be very useful as one build directory can be configured
for a release and another build directory can be configured
for debugging with different options passed to
configure from each directory. The generated
Makefiles are unique to each build directory and will
not interfere with each other.
Adding
debugging symbols
When additional debugging symbols are needed with, for
example, the GNU Debugger, gdb, the needed compiler
and linker options are passed as environment variables.
Run:
../hamlib/configure
CFLAGS="-ggdb3 -O0" CXXFLAGS="-ggdb3
-O0"
from a sibling
build directory intended for a debugging build.
The
-ggdb3 option tells the C compiler, in this case the
GNU C Compiler, gcc, to add special symbols useful
for GDB, the GNU debugger. The -O0 option tells
gcc to turn off all optimizations which will make it
easier to follow some variables that might otherwise be
optimized away. CFLAGS and CXXFLAGS may be set
independently for each compiler.
Note:
There are a number compiler options available for
controlling debugging symbols and setting optimization
levels. Please consult the compiler’s manual for all
the details.
Compiling
for Microsoft Windows
Currently compiling is done on a Debian 10 (Buster) virtual
machine using MinGW.
README.build-win32 in the scripts directory
has details on how this is accomplished.
Pre-compiled
binaries for Microsoft Windows
Pre-compiled binaries for Microsoft Windows 32 and 64 bit
architectures (Windows NT and newer) are available for both
official releases and daily development snapshots.
Official
releases are available through the
SourceForge.net
file download service.
Daily
development snapshots are available from the
daily snapshots
page.
Beginning with
the Hamlib 1.2.15.3 release a self-extracting installer is
available. Among its features are selecting which portions
of Hamlib are installed. The PATH environment
variable will need to be set manually per the included
README.w32-bin or README.w64-bin file.
Daily
development snapshots feature both a .ZIP archive and the
self extracting installer.
Bug reports and
questions about these archives should be sent to the
hamlib-developer
mailing list.
COPYING
This file is
part of Hamlib, a project to develop a library that
simplifies radio and rotator control functions for
developers of software primarily of interest to radio
amateurs and those interested in radio communications.
Copyright
© 2001-2020 Hamlib Group (various contributors)
This is free
software; see the file COPYING for copying conditions. There
is NO warranty; not even for MERCHANTABILITY or FITNESS FOR
A PARTICULAR PURPOSE.
SEE ALSO
git(1),
hamlib(7), ldconfig(8), make(1),
su(1), sudo(8)
COLOPHON
Links to the
Hamlib Wiki, Git repository, release archives, and daily
snapshot archives are available via
hamlib.org.
================================================
FILE: software/hamlib-w64-4.5~git/doc/hamlib-utilities.7.html
================================================
HAMLIB-UTILITIES
HAMLIB-UTILITIES
NAME
DESCRIPTION
rigctl
rotctl
ampctl
rigctld
rotctld
ampctl
rigmem
rigsmtr
rigswr
COPYING
SEE ALSO
COLOPHON
NAME
hamlib-utilties
- radio and rotator control utilities of Hamlib
DESCRIPTION
Included with
the Hamlib distribution are several utility programs.
Besides providing a way for developers to test new code and
bug fixes, the programs also offer a reference
implementation for interfacing to the Hamlib library
functions both through the C API
(Application Programming Interface) and offering a network
accessible API.
This page
summarizes the three test programs, ampctl(1) for
testing amplifier back ends, rigctl(1) for testing
radio back ends, and rotctl(1) for testing rotator
back ends and the three network daemons, ampctld(1),
rigctld(1), and rotcltd(1) for amplifier,
radio, and rotator access via network sockets. Also included
are three demonstration utilities, rigmem(1),
rigsmtr(1), and rigswr(1) which provide
functional examples of how Hamlib may be used to accomplish
various tasks.
rigctl
rigctl(1)
is the most frequently used Hamlib utility. As the other
ctl utilities share many of the same characteristics,
much of the introductory information presented in this
section is applicable to the other utility programs.
Introduction
to rigctl
Most likely the first of the Hamlib utility programs that is
used is rigctl(1). rigctl is a character based
interactive program and a command line program able to set
or query a radio’s value with a single command. rigctl
is invoked from a shell command prompt with various options
and additional commands.
In its most
simple use as a command line program, rigctl is used
to set frequency and mode by typing commands after any
rigctl options:
rigctl F
14205000
rigctl M USB 2400
and then query
those values:
rigctl f
rigctl m
Entering
interactive mode is a simple matter of not placing
any commands after any rigctl options:
rigctl
Entering
interactive mode allows successive commands to be entered
without exiting rigctl. Recent additions to rigctl allow
command editing and history recall through use of the
Readline
library.
Interactive
mode is indicated by the spartan prompt:
Rig
command:
Commands are
given at the prompt and follow the general rule that upper
case letters set a value and lower case letters query a
value:
Rig command:
M
Mode: USB
Passband: 2500
Rig command:
m
Mode: USB
Passband: 2500
Rig
command:
An additional
prompt is printed when more information is required by the
command. For M above, rigctl prompted for the Mode and
Passband values. For m above, rigctl returned the Mode and
Passband values without further prompts. The command prompt
is returned after each command invocation.
The above
examples invoked rigctl without specifying a radio model.
This is a feature where the Hamlib internal radio model 1
dummy is used. The dummy radio provides a way to test
Hamlib functions without the need for actual radio hardware.
However, to develop the Hamlib backend capability for a
given radio, having the actual radio connected to the
computer is necessary for debugging.
For example, to
quickly set frequency on an Elecraft K3:
rigctl -m
2029 -r /dev/rig F 3900000
and to query
the frequency and then mode:
rigctl -m
2029 -r /dev/rig f
3900000
rigctl -m
2029 -r /dev/rig m
LSB
2000
Note:
the returned values do not have the prompt strings
associated with interactive mode as shown above.
The -m
option takes a numeric value that corresponds to a given
radio back end model. The -r option takes the path to
the port device on POSIX and the device name
on Microsoft Windows.
Note: A
complete list of supported radio models may be seen by use
of the -l option:
rigctl
-l
Rig # Mfg Model Version Status
1 Hamlib Dummy 0.5 Beta
2 Hamlib NET rigctl 0.3 Beta
1001 Yaesu FT-847 0.5 Beta
1003 Yaesu FT-1000D 0.0.6 Alpha
.
.
.
27002 Rohde&Schwarz EB200 0.1 Untested
28001 Philips/Simoco PRM8060 0.1 Alpha
29001 ADAT www.adat.ch ADT-200A 1.36 Beta
The list is
long so use Shift-PageUp/Shift-PageDown on Linux, ScrollLock
then PageUp/PageDown on Free BSD, or use the scrollbar to
the virtual terminal window (cmd window on Microsoft
Windows) or the output can be piped to more(1) or
less(1), e.g., “rigctl -l | more” to
scroll back up the list. The list is sorted numerically by
model number since Hamlib 1.2.15.1. Model numbers of a
manufacturer/protocol family are grouped together.
rigctl
reference
The complete reference for rigctl can be found in the
rigctl(1) manual page.
rotctl
Identical in
function to rigctl(1), rotctl(1) provides a
means for testing Hamlib functions useful for rotator
control and QTH (Maidenhead gridsquare system, see
Maidenhead
Locator System) locator computations. As rotators have a
much narrower scope than radios, there are fewer command
line options and commands for rotctl.
Introduction
to rotctl
rotctl(1) is a character based interactive program and a
command line program able to set or query a rotator’s
value with a single command. rotctl is invoked from a shell
command prompt with various options and additional
commands.
In its most
simple use as a command line program, rotctl is used
to set azimuth position and (optionally) elevation by typing
commands after any rotctl options:
rotctl P
145.0 23.0
rotctl M 8 25
and then query
those values:
rotctl
p
Entering
interactive mode is a simple matter of not placing
any commands after any rotctl options:
rotctl
Entering
interactive mode allows successive commands to be entered
without exiting rotctl. Interactive mode allows for command
editing and history recall through the use of the
Readline
library.
Interactive
mode is indicated by the spartan prompt:
Rotator
command:
Commands are
given at the prompt:
Rotator
command: M
Direction: 16
Speed: 60
Rotator
command: p
Azimuth: 11.352000
Elevation: 0.000000
Rotator
command: p
Azimuth: 27.594000
Elevation: 0.000000
Rotator
command:
An additional
prompt is printed when more information is required by the
command. For M above, rotctl prompted for the Direction and
Speed values. For p above, rotctl returned the Azimuth and
Elevation values without further prompts. The command prompt
is returned after each command invocation.
The above
examples invoked rotctl without specifying a rotator model.
This is a feature where the Hamlib internal rotator model 1
dummy is used instead. The dummy rotator provides a
way to test Hamlib functions without the need for actual
rotator hardware. However, to develop back end capability
for a given rotator, having the actual controller connected
to the computer is necessary for debugging.
For example, to
quickly set position for RotorEZ:
rotctl -m
401 -r /dev/rotor P 100.0 0.0
and to query
the position:
rotctl -m
401 -r /dev/rotor p
100.000000
0.000000
The returned
values do not have the prompt strings associated with
interactive mode as shown above.
The -m
option takes a numeric value that corresponds to a given
rotator back end model. The -r option takes the path
to the port device on POSIX or the device
name on Microsoft Windows.
Note: A
complete list of supported rotator models may be seen by use
of the -l option:
rotctl
-l
Rot # Mfg Model Version Status
1 Hamlib Dummy 0.5 Beta
2 Hamlib NET rotctl 0.3 Beta
201 Hamlib EasycommI 0.3 Beta
202 Hamlib EasycommII 0.3 Beta
.
.
.
1201 AMSAT IF-100 0.1 Untested
1301 LA7LKA ts7400 0.1 Beta
1401 Celestron NexStar 0.1 Untested
The list is
long so use Shift-PageUp/Shift-PageDown on Linux, ScrollLock
then PageUp/PageDown on Free BSD, or use the scrollbar to
the virtual terminal window (cmd window on Microsoft
Windows) or the output can be piped to more(1) or
less(1), e.g. “rotctl -l | more” to
scroll back up the list. The list is sorted numerically by
model number since Hamlib 1.2.15.1. Model numbers of a
manufacturer/protocol family are grouped together.
rotctl
reference
The complete reference for rotctl can be found in the
rotctl(1) manual page.
ampctl
The
ampctl(1) utility is a recent addition to the Hamlib
utilities as a part of the 4.0 development cycle. It is
intended to test the Hamlib implementation of amplifier
control and is similar in function to the utilities
previously described. See the ampctl(1) manual page
for the complete reference.
rigctld
The
rigctld(1) program is a network server that accepts
the familiar commands of rigctl(1) and provides the
response data over a TCP/IP network socket to
an application. In this manner an application can access a
rigctld instance from nearly anywhere (caveat, no security
is currently provided by rigctld). Applications using
rigctld do not link directly to Hamlib nor use its C
API.
Introduction
to rigctld
rigctld(1) communicates to a client through a
TCP network socket using text commands shared
with rigctl(1). The protocol is simple; commands are
sent to rigctld on one line and rigctld responds to
get commands with the requested values, one per line,
when successful, otherwise, it responds with one line
RPRT x, where x is a negative number
indicating the Hamlib error code. Commands that do not
return values respond with the line RPRT x,
where x is zero when successful, otherwise a negative
number indicating the Hamlib error code. Each line is
terminated with a newline, \n, character. This
protocol is primarily for use by the NET rigctl
(radio model 2) backend.
A separate
Extended Response protocol extends the above behavior by
echoing the received command string as a header, any
returned values as a key: value pair, and the RPRT
x string as the end of response marker which includes
the Hamlib success or failure value. Consider using this
protocol for clients that will interact with rigctld
directly through a TCP network socket.
Multiple radios
can be controlled on different TCP ports by use of multiple
rigctld processes each listening on a unique TCP port. It is
hoped that rigctld will be especially useful for client
authors using languages such as
Perl,
Python,
PHP,
Ruby,
TCL, and others.
rigctld
reference
The complete reference for rigctld can be found in the
rigctld(1) manual page.
rotctld
The
rotctld(1) program is a network server that accepts
the familiar commands of rotctl(1) and provides the
response data over a TCP/IP network socket to an
application. In this manner an application can access a
rotctld instance from nearly anywhere (caveat, no security
is currently provided by rotctld). Applications using
rotctld do not link directly to Hamlib nor use its C
API.
Introduction
to rotctld
rotctld(1) communicates to a client through a
TCP network socket using text commands shared
with rotctl(1). The protocol is simple, commands are
sent to rotctld on one line and rotctld responds to
get commands with the requested values, one per line,
when successful, otherwise, it responds with one line
RPRT x, where x is a negative number
indicating the Hamlib error code. Commands that do not
return values respond with the line RPRT x,
where x is zero when successful, otherwise a negative
number indicating the Hamlib error code. Each line is
terminated with a newline, \n character. This
protocol is primarily for use by the NET rotctl
(rotator model 2) backend.
A separate
Extended Response protocol extends the above behavior by
echoing the received command string as a header, any
returned values as a key: value pair, and the RPRT
x string as the end of response marker which includes
the Hamlib success or failure value. Consider using this
protocol for clients that will interact with rotctld
directly through a TCP network socket.
Multiple
rotators can be controlled on different TCP ports by use of
multiple rotctld processes each listening on a unique TCP
port. It is hoped that rotctld will be especially useful for
client authors using languages such as
Perl,
Python,
PHP,
Ruby,
TCL, and others.
rotctld
reference
The complete reference for rotctld can be found in the
rotctld(1) manual page.
ampctl
The
ampctld(1) utility is a recent addition to the Hamlib
utilities as a part of the 4.0 development cycle. It
provides network socket access for the Hamlib implementation
of amplifier control and is similar in function to the
network utilities previously described. See the
ampctld(1) manual page for the complete
reference.
rigmem
rigmem
may be used to backup and restore memory of radio
transceivers and receivers.
Introduction
to rigmem
Backup and restore memory of radio transceivers and
receivers. rigmem accepts commands from the
command line only.
rigmem
reference
The complete reference for rigmem can be found in the
rigmem(1) manual page.
rigsmtr
rigsmtr
uses Hamlib to control a radio to measure S-Meter
value versus antenna azimuth.
Introduction
to rigsmtr
rigsmtr rotates the antenna from minimum azimuth to maximum
azimuth. Every second, or time_step if specified in
seconds, it retrieves the signal strength. Azimuth in
degrees and the corresponding S-Meter level in dB relative
to S9 are then printed on stdout.
To work
correctly, rigsmtr needs a radio that could measure S-Meter
and a Hamlib backend that is able to retrieve it, connected
to a Hamlib supported rotator.
rigsmtr
reference
The complete reference for rigsmtr can be found in the
rigsmtr(1) manual page.
rigswr
rigswr
may be used to measure VSWR vs frequency.
Introduction
to rigswr
rigswr uses Hamlib to control a radio to measure VSWR
(Voltage Standing Wave Ratio) over a frequency range.
It scans
frequencies from start_freq to stop_freq with
an optional increment of freq_step (default step is
100 kHz). All values must be entered as an integer in Hertz
(cycles per second).
Note:
rigswr assumes that start_freq is less than or equal to
stop_freq. If it is greater, rigswr will exit without
doing anything.
For each
frequency, rigswr transmits at 25% of total POWER during 0.5
second in CW mode and reads VSWR.
Frequency and
the corresponding VSWR are then printed on stdout.
To work
correctly, rigswr needs a radio that can measure VSWR and a
Hamlib backend that supports reading VSWR from the
radio.
rigswr
reference
The complete reference for rigswr can be found in the
rigswr(1) manual page.
COPYING
This file is
part of Hamlib, a project to develop a library that
simplifies radio and rotator control functions for
developers of software primarily of interest to radio
amateurs and those interested in radio communications.
Copyright
© 2001-2020 Hamlib Group (various contributors)
This is free
software; see the file COPYING for copying conditions. There
is NO warranty; not even for MERCHANTABILITY or FITNESS FOR
A PARTICULAR PURPOSE.
SEE ALSO
less(1),
more(1), ampctl(1), ampctld(1),
rigctl(1), rigctld(1), rotctl(1),
rotctld(1), rigmem(1), rigsmtr(1),
rigswr(1), hamlib(7),
hamlib-primer(7)
COLOPHON
Links to the
Hamlib Wiki, Git repository, release archives, and daily
snapshot archives are available via
hamlib.org.
================================================
FILE: software/hamlib-w64-4.5~git/doc/hamlib.7.html
================================================
HAMLIB
HAMLIB
NAME
DESCRIPTION
COPYING
SEE ALSO
COLOPHON
NAME
hamlib - radio
and rotator control library
DESCRIPTION
The Ham
Radio Control Libraries, Hamlib for short, is a
development effort to provide a consistent interface for
programmers wanting to incorporate radio and rotator control
in their programs.
Hamlib is not a
complete user application, rather, it is a software layer
intended to make controlling various radios and other
amateur radio station (shack) hardware much easier. Hamlib
will allow authors of software such as logging programs,
digital communications programs, or those wanting to develop
the ultimate radio control software to concentrate on the
user interface and the basic function of the program rather
than radio control. Hamlib consists of several parts, the
programming library, utility programs, and library
interfaces to other programming languages.
Most recent
amateur radio transceivers allow external control of their
functions through a serial interface. Unfortunately, control
commands are not always consistent across a
manufacturer’s product line and each
manufacturer’s product line differs greatly from its
competitors.
Hamlib attempts
to solve this problem by presenting a virtual radio
to the programmer by providing an interface to actions such
as setting a given Variable Frequency Oscillator’s
(VFO) frequency, setting the operating mode, querying the
radio of its current status and settings, and giving the
application a list of a given radio’s capabilities.
Unfortunately, what can be accomplished by Hamlib is limited
by the radios themselves and some offer very limited
capability.
Other devices,
such as antenna rotators, can be placed into the Hamlib
control scheme. Other recent developments include network
interface servers and a USB interface capability. Language
bindings are provided for C, C++, Perl,
Python, Lua and TCL (more to come).
Overview
Hamlib is a front end library providing a C
language Application Programming Interface (API) to
programmers wishing to integrate radio or rotator control in
their applications. Hamlib presents a virtual radio
or virtual rotator that is a consistent interface to
an application despite wide differences in radio and rotator
interfaces and capabilities.
The front end
library uses a number of back end libraries to
translate from the front end to the various individual radio
and rotator models. A back end library handles conversion of
the front end variables to the format needed by the radio or
rotator device it controls. The back end libraries are
generally grouped by manufacturer and in some cases by a
common control protocol.
Hamlib also
provides an interface library for each of several common
scripting languages such as
Perl,
Python,
Lua, and
TCL. These language
bindings are generated through the use of
SWIG, a
parser/generator for multiple language interfaces to a
C library. A natively generated C++ language
interface is also provided.
Besides the C
and supplemental APIs, Hamlib also provides a pair of
network daemons that provide a text command based API for
controlling an attached radio or rotator through a
TCP/IP network connection. The daemons then
handle the interface to the Hamlib C API.
More than one
type of device, radio or rotator, may be controlled at a
time, however, there is generally a limit of one device per
serial port or other port.
Hamlib
project information
The Hamlib Project was founded by Frank Singleton,
VK3FCS/KM5WS in July 2000. Shortly after Stephane Fillod,
F8CFE, joined Frank on the Hamlib project and the API and
implementation development led to a reasonable level of
maturity in a few years. A major milestone was reached when
Hamlib 1.2.0 was released in March 2004. The API and
Application Binary Interface (ABI) interfaces have remained
stable since that time up to the release of 3.3 in mid 2018.
Version 4.0 marks a major change to the ABI and certain
changes to the API.
Development
continues through the major version number 4.x series
and beyond. The 4.0 release marks a major change in the ABI
with several changes for additional modes and such that will
require client programs that use the C ABI to be
recompiled/relinked, etc. Other goals include improving the
overall documentation (this man page with more in progress),
and other updates as warranted.
The Project is
hosted by
SourceForge.net at the
Hamlib
project page. As GitHub
has become a very popular project hosting site, Hamlib also
has a dedicated
GitHub project
page. GitHub also hosts the
hamlib.org Web site and
the Hamlib
Wiki.
Development
discussion and most user support take place on the
hamlib-developer
mailing list. While there are
SourceForge.net
discussion forums, they are rarely used and not as
closely read by the developers as the mailing list.
For source
code management, the project uses
Git, a fast,
distributed content tracker. Among its features is that
every developer has the complete Hamlib development history
available locally. For more information on using Git, see
hamlib-git(7).
Note:
while a canonical Git repository is hosted at SourceForge,
its availability is not essential to continued development
although development work flows would change temporarily.
Several developers find the GitHub Web interface easier to
use and lately development has centered around GitHub rather
than SourceForge.
Applications
using Hamlib
A number of application developers have taken advantage of
Hamlib’s capabilities to implement radio and/or
rotator control. While not exhaustive, a list is maintained
at the Hamlib Wiki,
Applications/Screenshots.
Developers are encouraged to request their applications be
added to the gallery by way of the hamlib-developer mailing
list.
Using Hamlib
with your program
As with other Free Software projects, Hamlib relies heavily
on copyleft licensing to encourage development contributions
and provide an open atmosphere for development.
Hamlib’s source code is released under two licenses,
the Lesser General Public License (LGPL) version 2.1
for the library portion, and the General Public
License (GPL) version 2 for the utility programs.
The LGPL allows
the library to be used (linked) by programs regardless of
their individual license. However, any contributions to the
library source remain under a copyleft license which means
that the library source code may not be used in violation of
the terms of the LGPL (see the file COPYING.LIB in
the main source directory). Concepts learned by studying
these sources for the purpose of understanding the Hamlib
API is not covered nor prohibited by the LGPL, however,
directly copying LGPL sources into any work that is
incompatible with the terms of the LGPL is a violation of
the terms of the license.
The utility
program source files are released under the GPL. Any direct
use of these sources must be in a form that complies with
the terms of the GPL (see the file COPYING in the
main source directory). Concepts learned by studying these
sources for the purpose of understanding the Hamlib API is
not covered nor prohibited by the GPL, however, directly
copying GPL sources into any work that is incompatible with
the terms of the GPL is a violation of the terms of the
license.
Radios with
a clone capability
Hamlib’s focus is on controlling radios that employ a
port and command protocol for setting frequency, mode, VFO,
PTT, etc. Most VHF/UHF transceivers do not employ such
control capability but do provide for cloning the memory
contents from radio to another of the same model. A related
project,
Chirp, aims
to support radios with such a clone capability. Please
contact the Chirp project for support of such radios.
Pronouncing
Hamlib
English speakers seem to have two alternate pronunciations
for our project:
|
• |
|
Hamlib (Ham - lib, long ’i’, as in library.)
IPA style: /'ham læb/ |
|
• |
|
Hamlib (Ham - lib, short ’i’, as in
liberty.) IPA style: /'ham lɪb/ |
Then again, we
have people who say Linux “L-eye-nux” and those
who say “L-in-nux”...
If you’re
French, the above does not apply! :-)
COPYING
This file is
part of Hamlib, a project to develop a library that
simplifies radio, rotator, and amplifier control functions
for developers of software primarily of interest to radio
amateurs and those interested in radio communications.
Copyright
© 2001-2020 Hamlib Group (various contributors)
This is free
software; see the file COPYING for copying conditions. There
is NO warranty; not even for MERCHANTABILITY or FITNESS FOR
A PARTICULAR PURPOSE.
SEE ALSO
hamlib-primer(7)
COLOPHON
Links to the
Hamlib Wiki, Git repository, release archives, and daily
snapshot archives are available via
hamlib.org.
================================================
FILE: software/hamlib-w64-4.5~git/doc/rigctl.1.html
================================================
RIGCTL
RIGCTL
NAME
SYNOPSIS
DESCRIPTION
OPTIONS
COMMANDS
READLINE
DIAGNOSTICS
EXIT STATUS
EXAMPLES
BUGS
COPYING
SEE ALSO
COLOPHON
NAME
rigctl -
control radio transceivers and receivers
SYNOPSIS
|
rigctl |
|
[-hiIlLnouV]
[-m id] [-r device]
[-p device]
[-d device] [-P type]
[-D type] [-s baud]
[-c id] [-t char]
[-C parm=val] -Y [-v[-Z]]
[command|-] |
DESCRIPTION
Control radio
transceivers and receivers. rigctl accepts
commands from the command line as well as in
interactive mode if none are provided on the command
line.
Keep in mind
that Hamlib is BETA level software. While a lot of backend
libraries lack complete rig support, the basic functions are
usually well supported.
Please report
bugs and provide feedback at the e-mail address given in the
BUGS section below. Patches and code enhancements
sent to the same address are welcome.
OPTIONS
This program
follows the usual GNU command line syntax. Short options
that take an argument may have the value follow immediately
or be separated by a space. Long options starting with two
dashes (’-’) require an ’=’ between
the option and any argument.
Here is a
summary of the supported options:
-m, --model=id
Select radio model number.
Defaults to dummy rig.
See model list
(use “rigctl -l”).
Note:
rigctl (or third party software using the C API) will
use radio model 2 for NET rigctl (communicating with
rigctld).
-r,
--rig-file=device
Use device as the file
name of the port connected to the radio.
Often a serial
port, but could be a USB to serial adapter. Typically
/dev/ttyS0, /dev/ttyS1, /dev/ttyUSB0,
etc. on Linux, COM1, COM2, etc. on MS Windows.
The BSD flavors and Mac OS/X have their own designations.
See your system’s documentation.
Can be a
network address:port, e.g. 127.0.0.1:12345
The special
string “uh-rig” may be given to enable micro-ham
device support.
-p,
--ptt-file=device
Use device as the file
name of the Push-To-Talk device using a device file as
described above.
-d,
--dcd-file=device
Use device as the file
name of the Data Carrier Detect device using a device file
as described above.
-P,
--ptt-type=type
Use type of Push-To-Talk
device.
Supported types
are ’RIG’ (CAT command), ’DTR’,
’RTS’, ’PARALLEL’,
’CM108’, ’GPIO’,
’GPION’, ’NONE’, overriding PTT type
defined in the rig’s backend.
Some side
effects of this command are that when type is set to DTR,
read PTT state comes from the Hamlib frontend, not
read from the radio. When set to NONE, PTT state cannot be
read or set even if rig backend supports reading/setting PTT
status from the rig.
-D,
--dcd-type=type
Use type of Data Carrier
Detect device.
Supported types
are ’RIG’ (CAT command), ’DSR’,
’CTS’, ’CD’, ’PARALLEL’,
’CM108’, ’GPIO’,
’GPION’, ’NONE’.
-s,
--serial-speed=baud
Set serial speed to baud
rate.
Uses maximum
serial speed from radio backend capabilities (set by
-m above) as the default.
-c,
--civaddr=id
Use id as the CI-V
address to communicate with the rig.
Only useful for
Icom and some Ten-Tec rigs.
Note:
The id is in decimal notation, unless prefixed by
0x, in which case it is hexadecimal.
-t,
--send-cmd-term=char
Change the termination
char for text protocol when using the send_cmd
command.
The default
value is ASCII CR (’0x0D’). ASCII non-printing
characters can be given as the ASCII number in hexadecimal
format prepended with “0x”. You may pass an
empty string for no termination char. The string
“-1” tells rigctl to switch to binary
protocol. See the send_cmd command for further
explanation.
For example, to
specify a command terminator for Kenwood style text commands
pass “-t ’;’” to rigctl. See
EXAMPLE below.
-L,
--show-conf
List all config parameters for
the radio defined with -m above. Note the dummy
device has no serial parameters.
-C,
--set-conf=parm=val[,parm=val]
Set radio configuration
parameter(s), e.g. stop_bits=2.
Use the
-L option above for a list of configuration
parameters for a given model number.
-u,
--dump-caps
Dump capabilities for the radio
defined with -m above and exit.
-l, --list
List all model numbers defined
in Hamlib and exit.
The list is
sorted by model number.
Note: In
Linux the list can be scrolled back using
Shift-PageUp/Shift-PageDown, or using the
scrollbars of a virtual terminal in X or the cmd window in
Windows. The output can be piped to more(1) or
less(1), e.g. “rigctl -l | more”.
-o, --vfo
Enable vfo mode.
An extra VFO
argument will be required in front of each appropriate
command (except set_vfo). Otherwise,
’currVFO’ is used when this option is not set
and an extra VFO argument is not used.
-n,
--no-restore-ai
On exit rigctl restores
the state of auto information (AI) on the controlled
rig.
If this is not
desired, for example if you are using rigctl to turn
AI mode on or off, pass this option.
-i,
--read-history
Read previously saved command
and argument history from a file (default
$HOME/.rigctl_history) for the current session.
Available when
rigctl is built with Readline support (see READLINE
below).
Note: To
read a history file stored in another directory, set the
RIGCTL_HIST_DIR environment variable, e.g.
“RIGCTL_HIST_DIR=~/tmp rigctl -i”. When
RIGCTL_HIST_DIR is not set, the value of HOME is
used.
-I,
--save-history
Write current session (and
previous session(s), if -i option is given) command
and argument history to a file (default
$HOME/.rigctl_history) at the end of the current
session.
Complete
commands with arguments are saved as a single line to be
recalled and used or edited. Available when rigctl is
built with Readline support (see READLINE below).
Note: To
write a history file in another directory, set the
RIGCTL_HIST_DIR environment variable, e.g.
“RIGCTL_HIST_DIR=~/tmp rigctl -IRq. When
RIGCTL_HIST_DIR is not set, the value of HOME is
used.
-v, --verbose
Set verbose mode, cumulative
(see DIAGNOSTICS below).
-Y,--ignore-err
Ignores rig open errors
-Z,
--debug-time-stamps
Enable time stamps for the
debug messages.
Use only in
combination with the -v option as it generates no
output on its own.
-h, --help
Show a summary of these options
and exit.
-V, --version
Show version of rigctl
and exit.
|
- |
|
Stop option processing and read commands from standard
input. |
See Standard
Input below.
Note:
Some options may not be implemented by a given backend and
will return an error. This is most likely to occur with the
--set-conf and --show-conf options.
Please note
that the backend for the radio to be controlled, or the
radio itself may not support some commands. In that case,
the operation will fail with a Hamlib error code.
COMMANDS
Commands can be
entered either as a single char, or as a long command name.
The commands are not prefixed with a dash as the options
are. They may be typed in when in interactive mode or
provided as argument(s) in command line interface mode. In
interactive mode commands and their arguments may be entered
on a single line:
M LSB
2400
Since most of
the Hamlib operations have a set and a
get method, an upper case letter will often be used
for a set method whereas the corresponding lower case
letter refers to the get method. Each operation also
has a long name; in interactive mode, prepend a backslash,
’\’, to enter a long command name.
Example: Use
“\dump_caps” to see what capabilities this radio
and backend support.
Note:
The backend for the radio to be controlled, or the radio
itself may not support some commands. In that case, the
operation will fail with a Hamlib error message.
Standard
Input
As an alternative to the READLINE interactive command
entry or a single command for each run, rigctl
features a special option where a single dash
(’-’) may be used to read commands from standard
input (stdin). Commands must be separated by
whitespace similar to the commands given on the command
line. Comments may be added using the ’#’
character, all text up until the end of the current line
including the ’#’ character is ignored.
A simple
example (typed text is in bold):
$ cat
<<.EOF. >cmds.txt
> # File of commands
|
|
|
> v f m |
|
|
|
|
|
|
# query rig |
|
|
|
|
|
|
> V VFOB F 14200000 M CW 500 |
|
|
# set rig |
|
|
|
> v f m |
|
|
|
|
|
|
# query rig |
|
|
|
> .EOF.
$ rigctl -m1
- <cmds.txt
v VFOA
f 145000000
m FM
15000
V VFOB
F 14200000
M CW 500
v VFOB
f 14200000
m CW
500
$
rigctl
Commands
A summary of commands is included below (In the case of
set commands the quoted italicized string is replaced
by the value in the description. In the case of get
commands the quoted italicized string is the key name of the
value returned.):
Q|q, exit rigctl
Exit rigctl in interactive
mode.
When rigctl is
controlling the rig directly, will close the rig backend and
port. When rigctl is connected to rigctld (radio model 2),
the TCP/IP connection to rigctld is closed and rigctld
remains running, available for another TCP/IP network
connection.
F, set_freq
'Frequency'
Set 'Frequency', in
Hz.
Frequency may
be a floating point or integer value.
f, get_freq
Get 'Frequency', in
Hz.
Returns an
integer value and the VFO hamlib thinks is active. Note that
some rigs (e.g. all Icoms) cannot track current VFO so
hamlib can get out of sync with the rig if the user presses
rig buttons like the VFO.
M, set_mode
'Mode' 'Passband'
Set 'Mode' and
'Passband'.
Mode is a
token: ’USB’, ’LSB’,
’CW’, ’CWR’, ’RTTY’,
’RTTYR’, ’AM’, ’FM’,
’WFM’, ’AMS’, ’PKTLSB’,
’PKTUSB’, ’PKTFM’,
’ECSSUSB’, ’ECSSLSB’,
’FA’, ’SAM’, ’SAL’,
’SAH’, ’DSB’.
Passband is in
Hz as an integer, -1 for no change, or ’0’ for
the radio backend default.
Note:
Passing a ’?’ (query) as the first argument
instead of a Mode token will return a space separated list
of radio backend supported Modes. Use this to determine the
supported Modes of a given radio backend.
m, get_mode
Get 'Mode' and
'Passband'.
Returns Mode as
a token and Passband in Hz as in set_mode above.
V, set_vfo
'VFO'
Set 'VFO'.
VFO is a token:
’VFOA’, ’VFOB’, ’VFOC’,
’currVFO’, ’VFO’, ’MEM’,
’Main’, ’Sub’, ’TX’,
’RX’.
In VFO mode
(see --vfo option above) only a single VFO parameter
is required:
$ rigctl -m
229 -r /dev/rig -o
Rig command: V
VFO: VFOB
Rig
command:
v, get_vfo
Get current 'VFO'.
Returns VFO as
a token as in set_vfo above.
J, set_rit
'RIT'
Set 'RIT'.
RIT is in Hz
and can be + or -. A value of ’0’ resets RIT
(Receiver Incremental Tuning) to match the VFO
frequency.
Note:
RIT needs to be explicitly activated or deactivated with the
set_func command. This allows setting the RIT offset
independently of its activation and allows RIT to remain
active while setting the offset to ’0’.
j, get_rit
Get 'RIT' in Hz.
Returned value
is an integer.
Z, set_xit
'XIT'
Set 'XIT'.
XIT is in Hz
and can be + or -. A value of ’0’ resets XIT
(Transmitter Incremental Tuning) to match the VFO
frequency.
Note:
XIT needs to be explicitly activated or deactivated with the
set_func command. This allows setting the XIT offset
independently of its activation and allows XIT to remain
active while setting the offset to ’0’.
z, get_xit
Get 'XIT' in Hz.
Returned value
is an integer.
T, set_ptt
'PTT'
Set 'PTT'.
PTT is a value:
’0’ (RX), ’1’ (TX), ’2’
(TX mic), or ’3’ (TX data).
t, get_ptt
Get 'PTT' status.
Returns PTT as
a value in set_ptt above.
S, set_split_vfo
'Split' 'TX VFO'
Set 'Split' mode.
Split is either
’0’ = Normal or ’1’ = Split.
Set 'TX
VFO'.
TX VFO is a
token: ’VFOA’, ’VFOB’,
’VFOC’, ’currVFO’,
’VFO’, ’MEM’, ’Main’,
’Sub’, ’TX’, ’RX’.
s,
get_split_vfo
Get 'Split' mode.
Split is either
’0’ = Normal or ’1’ = Split.
Get 'TX
VFO'.
TX VFO is a
token as in set_split_vfo above.
I, set_split_freq
'Tx Frequency'
Set 'TX Frequency', in
Hz.
Frequency may
be a floating point or integer value.
i,
get_split_freq
Get 'TX Frequency', in
Hz.
Returns an
integer value.
X, set_split_mode
'TX Mode' 'TX Passband'
Set 'TX Mode' and 'TX
Passband'.
TX Mode is a
token: ’USB’, ’LSB’,
’CW’, ’CWR’, ’RTTY’,
’RTTYR’, ’AM’, ’FM’,
’WFM’, ’AMS’, ’PKTLSB’,
’PKTUSB’, ’PKTFM’,
’ECSSUSB’, ’ECSSLSB’,
’FA’, ’SAM’, ’SAL’,
’SAH’, ’DSB’.
TX Passband is
in Hz as an integer, or ’0’ for the radio
backend default.
Note:
Passing a ’?’ (query) as the first argument
instead of a TX Mode token will return a space separated
list of radio backend supported TX Modes. Use this to
determine the supported TX Modes of a given radio
backend.
x,
get_split_mode
Get 'TX Mode' and 'TX
Passband'.
Returns TX Mode
as a token and TX Passband in Hz as in set_split_mode
above.
Y, set_ant
'Antenna' 'Option'
Set 'Antenna' and
'Option'.
Number is
1-based antenna# (’1’, ’2’,
’3’, ...).
Option depends
on rig..for Icom it probably sets the Tx & Rx antennas
as in the IC-7851. See your manual for rig specific option
values. Most rigs don’t care about the option.
For the
IC-7851, FTDX3000 (and perhaps others) it means this:
1 = TX/RX =
ANT1 FTDX3000=ANT1/ANT3
2 = TX/RX = ANT2 FTDX3000=ANT2/ANT3
3 = TX/RX = ANT3 FTDX3000=ANT3
4 = TX/RX = ANT1/ANT4
5 = TX/RX = ANT2/ANT4
6 = TX/RX = ANT3/ANT4
y, get_ant
'Antenna'
Get 'Antenna'
A value of 0
for Antenna will return the current TX antenna
> 0 is
1-based antenna# (’1’, ’2’,
’3’, ...).
Option returned
depends on rig..for Icom is likely the RX only flag.
b, send_morse
'Morse'
Send 'Morse' symbols.
For Yaesu rigs use memory#.
0x8b, get_dcd
Get 'DCD' (squelch)
status: ’0’ (Closed) or ’1’
(Open).
R, set_rptr_shift
'Rptr Shift'
Set 'Rptr Shift'.
Rptr Shift is
one of: ’+’, ’-’, or something else
for ’None’.
r,
get_rptr_shift
Get 'Rptr Shift'.
Returns
’+’, ’-’, or ’None’.
O, set_rptr_offs
'Rptr Offset'
Set 'Rptr Offset', in
Hz.
o,
get_rptr_offs
Get 'Rptr Offset', in
Hz.
C, set_ctcss_tone
'CTCSS Tone'
Set 'CTCSS Tone', in
tenths of Hz.
c,
get_ctcss_tone
Get 'CTCSS Tone', in
tenths of Hz.
D, set_dcs_code
'DCS Code'
Set 'DCS Code'.
d,
get_dcs_code
Get 'DCS Code'.
0x90,
set_ctcss_sql 'CTCSS Sql'
Set 'CTCSS Sql' tone, in
tenths of Hz.
0x91,
get_ctcss_sql
Get 'CTCSS Sql' tone, in
tenths of Hz.
0x92, set_dcs_sql
'DCS Sql'
Set 'DCS Sql' code.
0x93,
get_dcs_sql
Get 'DCS Sql'
code.
N, set_ts
'Tuning Step'
Set 'Tuning Step', in
Hz.
n, get_ts
Get 'Tuning Step', in
Hz.
U, set_func
'Func' 'Func Status'
Set 'Func' and 'Func
Status'.
Func is a
token: ’FAGC’, ’NB’,
’COMP’, ’VOX’, ’TONE’,
’TSQL’, ’SBKIN’,
’FBKIN’, ’ANF’, ’NR’,
’AIP’, ’APF’, ’MON’,
’MN’, ’RF’, ’ARO’,
’LOCK’, ’MUTE’, ’VSC’,
’REV’, ’SQL’, ’ABM’,
’BC’, ’MBC’, ’RIT’,
’AFC’, ’SATMODE’,
’SCOPE’, ’RESUME’,
’TBURST’, ’TUNER’,
’XIT’.
Func Status is
a non null value for “activate” or
“de-activate” otherwise, much as TRUE/FALSE
definitions in the C language (true is non-zero and false is
zero, ’0’).
Note:
Passing a ’?’ (query) as the first argument
instead of a Func token will return a space separated list
of radio backend supported set function tokens. Use this to
determine the supported functions of a given radio
backend.
u, get_func
'Func'
Get 'Func Status'.
Returns Func
Status as a non null value for the Func token given as in
set_func above.
Note:
Passing a ’?’ (query) as the first argument
instead of a Func token will return a space separated list
of radio backend supported get function tokens. Use this to
determine the supported functions of a given radio
backend.
L, set_level
'Level' 'Level Value'
Set 'Level' and
'Level Value'.
Level is a
token: ’PREAMP’, ’ATT’,
’VOX’, ’AF’, ’RF’,
’SQL’, ’IF’, ’APF’,
’NR’, ’PBT_IN’,
’PBT_OUT’, ’CWPITCH’,
’RFPOWER’, ’RFPOWER_METER’,
’RFPOWER_METER_WATTS’, ’MICGAIN’,
’KEYSPD’, ’NOTCHF’,
’COMP’, ’AGC’, ’BKINDL’,
’BAL’, ’METER’,
’VOXGAIN’, ’ANTIVOX’,
’SLOPE_LOW’, ’SLOPE_HIGH’,
’RAWSTR’, ’SWR’, ’ALC’,
’STRENGTH’.
The Level Value
can be a float or an integer value. For the AGC token the
value is one of ’0’ = OFF, ’1’ =
SUPERFAST, ’2’ = FAST, ’3’ = SLOW,
’4’ = USER, ’5’ = MEDIUM,
’6’ = AUTO.
Note:
Passing a ’?’ (query) as the first argument
instead of a Level token will return a space separated list
of radio backend supported set level tokens. Use this to
determine the supported levels of a given radio backend.
l, get_level
'Level'
Get 'Level Value'.
Returns Level
Value as a float or integer for the Level token given as in
set_level above.
Note:
Passing a ’?’ (query) as the first argument
instead of a Level token will return a space separated list
of radio backend supported get level tokens. Use this to
determine the supported levels of a given radio backend.
P, set_parm
'Parm' 'Parm Value'
Set 'Parm' and 'Parm
Value'.
Parm is a
token: ’ANN’, ’APO’,
’BACKLIGHT’, ’BEEP’,
’TIME’, ’BAT’,
’KEYLIGHT’.
Note:
Passing a ’?’ (query) as the first argument
instead of a Parm token will return a space separated list
of radio backend supported set parameter tokens. Use this to
determine the supported parameters of a given radio
backend.
p, get_parm
'Parm'
Get 'Parm Value'.
Returns Parm
Value as a float or integer for the Parm token given as in
set_parm above.
Note:
Passing a ’?’ (query) as the first argument
instead of a Parm token will return a space separated list
of radio backend supported get parameter tokens. Use this to
determine the supported parameters of a given radio
backend.
B, set_bank
'Bank'
Set 'Bank'.
Sets the
current memory bank number.
E, set_mem
'Memory#'
Set 'Memory#' channel
number.
e, get_mem
Get 'Memory#' channel
number.
G, vfo_op
'Mem/VFO Op'
Perform a 'Mem/VFO
Op'.
Mem/VFO
Operation is a token: ’CPY’, ’XCHG’,
’FROM_VFO’, ’TO_VFO’,
’MCL’, ’UP’, ’DOWN’,
’BAND_UP’, ’BAND_DOWN’,
’LEFT’, ’RIGHT’, ’TUNE’,
’TOGGLE’.
Note:
Passing a ’?’ (query) as the first argument
instead of a Mem/VFO Op token will return a space separated
list of radio backend supported Set Mem/VFO Op tokens. Use
this to determine the supported Mem/VFO Ops of a given radio
backend.
g, scan 'Scan
Fct' 'Scan Channel'
Perform a 'Scan Fct' on
a 'Scan Channel'.
Scan Function
is a token: ’STOP’, ’MEM’,
’SLCT’, ’PRIO’, ’PROG’,
’DELTA’, ’VFO’,
’PLT’.
Scan Channel is
an integer (maybe?).
Note:
Passing a ’?’ (query) as the first argument
instead of a Scan Fct token will return a space separated
list of radio backend supported Scan Function tokens. Use
this to determine the supported Scan Functions of a given
radio backend.
H, set_channel
'Channel'
Set memory 'Channel'
data.
Sets memory
channel information
h, get_channel
'readonly'
Get channel memory.
If readonly!=0
then only channel data is returned and rig remains on the
current channel. If readonly=0 then rig will be set to the
channel requested. data.
A, set_trn
'Transceive'
Set 'Transceive'
mode.
Transcieve is a
token: ’OFF’, ’RIG’,
’POLL’.
Transceive is a
mechanism for radios to report events without a specific
call for information.
Note:
Passing a ’?’ (query) as the first argument
instead of a Transceive token will return a space separated
list of radio backend supported Transceive mode tokens. Use
this to determine the supported Transceive modes of a given
radio backend.
a, get_trn
Get 'Transceive'
mode.
Transceive mode
(reporting event) as in set_trn above.
*, reset
'Reset'
Perform rig 'Reset'.
Reset is a
value: ’0’ = None, ’1’ = Software
reset, ’2’ = VFO reset, ’4’ = Memory
Clear reset, ’8’ = Master reset.
Since these
values are defined as a bitmask in
include/hamlib/rig.h, it should be possible to AND
these values together to do multiple resets at once, if the
backend supports it or supports a reset action via rig
control at all.
0x87,
set_powerstat 'Power Status'
Set 'Power Status'.
Power Status is
a value: ’0’ = Power Off, ’1’ =
Power On, ’2’ = Power Standby (enter standby),
’4’ = Power Operate (leave standby).
0x88,
get_powerstat
Get 'Power Status' as in
set_powerstat above.
0x89, send_dtmf
'Digits'
Set DTMF 'Digits'.
0x8a,
recv_dtmf
Get DTMF 'Digits'.
_, get_info
Get misc information about the
rig.
0xf5,
get_rig_info
Get misc information about the
rig vfo status and other info.
0xf3,
get_vfo_info 'VFO'
Get misc information about a
specific vfo.
dump_state
Return certain state
information about the radio backend.
1, dump_caps
Not a real rig remote command,
it just dumps capabilities, i.e. what the backend knows
about this model, and what it can do.
TODO: Ensure
this is in a consistent format so it can be read into a
hash, dictionary, etc. Bug reports requested.
Note:
This command will produce many lines of output so be very
careful if using a fixed length array! For example, running
this command against the Dummy backend results in over 5kB
of text output.
VFO parameter
not used in ’VFO mode’.
2, power2mW
'Power [0.0..1.0]' 'Frequency'
'Mode'
Returns 'Power mW'.
Converts a
Power value in a range of 0.0...1.0 to the
real transmit power in milli-Watts (integer).
'Frequency'
and 'Mode' also need to be provided as output power
may vary according to these values.
VFO parameter
is not used in VFO mode.
4, mW2power
'Power mW' 'Frequency' 'Mode'
Returns 'Power
[0.0..1.0]'.
Converts the
real transmit power in milli-Watts (integer) to a Power
value in a range of 0.0 ... 1.0.
'Frequency'
and 'Mode' also need to be provided as output power
may vary according to these values.
VFO parameter
is not used in VFO mode.
w, send_cmd
'Cmd'
Send a raw command string to
the radio.
This is useful
for testing and troubleshooting radio commands and responses
when developing a backend.
For binary
protocols enter values as \0xAA\0xBB. Expect a
'Reply' from the radio which will likely be a binary
block or an ASCII string depending on the radio’s
protocol (see your radio’s computer control
documentation).
The command
terminator, set by the send-cmd-term option above,
will terminate each command string sent to the radio. This
character should not be a part of the input string.
W, send_cmd_rx
'Cmd' nbytes
Send a raw command string to
the radio and expect nbytes returned.
This is useful
for testing and troubleshooting radio commands and responses
when developing a backend. If the # of bytes requested is
<= the number actually returned no timeout will
occur.
The command
argument can have no spaces in it. For binary protocols
enter values as \0xAA\0xBB. Expect a 'Reply' from the
radio which will likely be a binary block or an ASCII string
depending on the radio’s protocol (see your
radio’s computer control documentation).
The command
terminator, set by the send-cmd-term option above,
will terminate each command string sent to the radio. This
character should not be a part of the input string.
set_clock
'DateTime'
Set 'DateTime'
Sets rig clock
-- note that some rigs do not handle seconds or
milliseconds. If you try to set sec/msec and rig does not
support it you will get a debug warning message. Format is
ISO8601,
Formats accepted
YYYY-MM-DDTHH:MM:SS.SSS+ZZ (where +ZZ is either -/+ UTC
offset)
YYYY-MM-DDTHH:MM:SS+ZZ
YYYY-MM-DDTHH:MM+ZZ
YYYY-MM-DD (sets date only)
Note: Icom rigs expect you to set local time and the hours
off to UTC.
So...4PM EST example would be 2021-12-01T16:00:00+05
But...if you want to display GMT you must set the clock for
GMT with zero UTC offset.
Hopefully Icom will allow displaying either clock in the
future
get_clock
Get 'RigTime'
Gets rig clock
-- note that some rigs do not handle seconds or
milliseconds. Format is ISO8601 YYYY-MM-DDTHH:MM:SS.sss+ZZ
where +ZZ is either -/+ UTC offset
chk_vfo
Get 'Status'
Returns Status
as 1 if vfo option is on and 0 if vfo option is off. This
command reflects the -o switch for rigctl and ritctld and
can be dynamically changed by set_vfo_opt.
set_vfo_opt
'Status'
Set 'Status'
Set vfo option
Status 1=on or 0=off This is the same as using the -o switch
for rigctl and ritctld. This can be dyamically changed while
running.
pause
'Seconds'
Pause for the given whole
(integer) number of 'Seconds' before sending the next
command to the radio.
password
'Password'
Sends password to rigctld when
rigctld has been secured with -A. Must use the 32-char
shared secret from rigctld.
READLINE
If
Readline library development files are found at
configure time, rigctl will be conditonally built
with Readline support for command and argument entry.
Readline command key bindings are at their defaults as
described in the
Readline
manual. rigctl sets the name “rigctl”
which can be used in Conditional Init Constructs in the
Readline Init File ($HOME/.inputrc by default) for
custom keybindings unique to rigctl.
Command history
is available with Readline support as described in the
Readline
History manual. Command and argument strings are stored
as single lines even when arguments are prompted for input
individually. Commands and arguments are not validated and
are stored as typed with values separated by a single
space.
Normally
session history is not saved, however, use of either of the
-i/--read-history or
-I/--save-history options when starting
rigctl will cause any previously saved history to be
read in and/or the current and any previous session history
(assuming the -i and -I options are given
together) will be written out when rigctl is closed.
Each option is mutually exclusive, i.e. either may be given
separately or in combination. This is useful to save a set
of commands and then read them later but not write the
modified history for a consistent set of test commands in
interactive mode, for example.
History is
stored in $HOME/.rigctl_history by default although
the destination directory may be changed by setting the
RIGCTL_HIST_DIR environment variable. When
RIGCTL_HIST_DIR is unset, the value of the HOME
environment variable is used instead. Only the destination
directory may be changed at this time.
If Readline
support is not found at configure time the original internal
command handler is used. Readline is not used for
rigctl commands entered on the command line
regardless if Readline support is built in or not.
Note:
Readline support is not included in the MS Windows 32 or 64
bit binary builds supplied by the Hamlib Project. Running
rigctl on the MS Windows platform in the
’cmd’ shell does give session command line
history, however, it is not saved to disk between
sessions.
DIAGNOSTICS
The -v,
--verbose option allows different levels of
diagnostics to be output to stderr and correspond to
-v for BUG, -vv for ERR, -vvv for WARN,
-vvvv for VERBOSE, or -vvvvv for TRACE.
A given verbose
level is useful for providing needed debugging information
to the email address below. For example, TRACE output shows
all of the values sent to and received from the radio which
is very useful for radio backend library development and may
be requested by the developers.
EXIT STATUS
rigctl
exits with:
|
0 |
|
if all operations completed normally; |
|
1 |
|
if there was an invalid command line option or
argument; |
|
2 |
|
if an error was returned by Hamlib. |
EXAMPLES
Start
rigctl for a Yaesu FT-920 using a USB to serial
adapter on Linux in interactive mode:
$ rigctl -m
1014 -r /dev/ttyUSB1
Start
rigctl for a Yaesu FT-920 using COM1 on MS Windows
while generating TRACE output to stderr:
> rigctl
-m 1014 -r COM1 -vvvvv
Start
rigctl for a Yaesu FT-920 using a USB to serial
adapter while setting baud rate and stop bits:
$ rigctl -m
1014 -r /dev/ttyUSB1 -s 4800 -C stop_bits=2
Start
rigctl for an Elecraft K3 using a USB to serial
adapter while specifying a command terminator for the
w command:
$ rigctl -m
2029 -r /dev/ttyUSB0 -t’;’
Connect to a
running rigctld with radio model 2 (“NET
rigctl”) on the local host and specifying the TCP
port, setting frequency and mode:
$ rigctl -m
2 -r localhost:4532 F 7253500 M LSB 0
BUGS
set_chan
has no entry method as of yet, hence left unimplemented.
This almost
empty section...
Report bugs
to:
Hamlib
Developer mailing list
COPYING
This file is
part of Hamlib, a project to develop a library that
simplifies radio, rotator, and amplifier control functions
for developers of software primarily of interest to radio
amateurs and those interested in radio communications.
Copyright
© 2000-2011 Stephane Fillod
Copyright © 2000-2018 the Hamlib Group (various
contributors)
Copyright © 2010-2020 Nate Bargmann
This is free
software; see the file COPYING for copying conditions. There
is NO warranty; not even for MERCHANTABILITY or FITNESS FOR
A PARTICULAR PURPOSE.
SEE ALSO
less(1),
more(1), rigctld(1), hamlib(7)
COLOPHON
Links to the
Hamlib Wiki, Git repository, release archives, and daily
snapshot archives are available via
hamlib.org.
================================================
FILE: software/hamlib-w64-4.5~git/doc/rigctlcom.1.html
================================================
RIGCTLCOM
RIGCTLCOM
NAME
SYNOPSIS
DESCRIPTION
OPTIONS
DIAGNOSTICS
EXIT STATUS
EXAMPLE
BUGS
COPYING
SEE ALSO
COLOPHON
NAME
rigctlcom - COM
port passthru as TS-2000 emulator to your rig
SYNOPSIS
|
rigctlcom |
|
[-hlLuV]
[-m id] [-r device]
[-R device]
[-p device]
[-d device] [-P type]
[-D type] [-s baud]
[-S baud] [-c id]
[-C parm=val] [-B]
[-v[-Z]] |
DESCRIPTION
Allows programs
which can connect to TS-2000 via COM port to use Hamlib
radios. Multiple programs can connect to the radio via FLRig
or rigctld.
Virtual
serial/COM ports must be set up first using socat(1)
or similar on POSIX systems (BSD, Linux, OS/X). On Microsoft
Windows available utilities are
com0com,
Free Virtual
Serial Ports, or
VPSD.
Please report
bugs and provide feedback at the e-mail address given in the
BUGS section below. Patches and code enhancements
sent to the same address are welcome.
OPTIONS
This program
follows the usual GNU command line syntax. Short options
that take an argument may have the value follow immediately
or be separated by a space. Long options starting with two
dashes (’-’) require an ’=’ between
the option and any argument.
Here is a
summary of the supported options:
-m, --model=id
Select radio model number.
See model list
(use “rigctlcom -l”).
Note:
rigctlcom (or third party software using the C API)
will use radio model 2 for NET rigctl (communicating
with rigctld).
-r,
--rig-file=device
Use device as the file
name of the port connected to the radio.
Often a serial
port, but could be a USB to serial adapter. Typically
/dev/ttyS0, /dev/ttyS1, /dev/ttyUSB0,
etc. on Linux, COM1, COM2, etc. on MS Windows.
The BSD flavors and Mac OS/X have their own designations.
See your system’s documentation.
The special
string “uh-rig” may be given to enable micro-ham
device support.
-R,
--rig-file2=device
Use device as the file
name of one of the virtual com ports -- your program will
connect to the other com port of the virtual pair.
Virtual serial
ports on POSIX systems can be done with socat(1):
$ socat -d
-d pty,raw,echo=0 pty,raw,echo=0
See this
Stackoverflow
answer for using socat.
On Microsoft
Windows available utilities are com0com, Free Virtual Serial
Ports, or VPSD (see DESCRIPTION above for WWW
links).
-p,
--ptt-file=device
Use device as the file
name of the Push-To-Talk device using a device file as
described above.
-d,
--dcd-file=device
Use device as the file
name of the Data Carrier Detect device using a device file
as described above.
-P,
--ptt-type=type
Use type of Push-To-Talk
device.
Supported types
are ’RIG’ (CAT command), ’DTR’,
’RTS’, ’PARALLEL’,
’NONE’, overriding PTT type defined in the
rig’s backend.
Some side
effects of this command are that when type is set to DTR,
read PTT state comes from the Hamlib frontend, not
read from the radio. When set to NONE, PTT state cannot be
read or set even if rig backend supports reading/setting PTT
status from the rig.
-D,
--dcd-type=type
Use type of Data Carrier
Detect device.
Supported types
are ’RIG’ (CAT command), ’DSR’,
’CTS’, ’CD’, ’PARALLEL’,
’NONE’.
-s,
--serial-speed=baud
Set serial speed to baud
rate.
Uses maximum
serial speed from radio backend capabilities (set by
-m above) as the default.
-S,
--serial-speed2=baud
Set serial speed to baud
rate for virtual com port (see -R).
Uses maximum
serial speed from radio backend capabilities (set by
-m above) as the default.
-c,
--civaddr=id
Use id as the CI-V
address to communicate with the rig.
Only useful for
Icom and some Ten-Tec rigs.
Note:
The id is in decimal notation, unless prefixed by
0x, in which case it is hexadecimal.
-L,
--show-conf
List all config parameters for
the radio defined with -m above.
-C,
--set-conf=parm=val[,parm=val]
Set radio configuration
parameter(s), e.g. stop_bits=2.
Use the
-L option above for a list of configuration
parameters for a given model number.
-u,
--dump-caps
Dump capabilities for the radio
defined with -m above and exit.
-l, --list
List all model numbers defined
in Hamlib and exit.
The list is
sorted by model number.
Note: In
Linux the list can be scrolled back using
Shift-PageUp/Shift-PageDown, or using the
scrollbars of a virtual terminal in X or the cmd window in
Windows. The output can be piped to more(1) or
less(1), e.g. “rigctl -l | more”.
-n,
--no-restore-ai
rigctl restores the
state of auto information (AI) on the controlled rig.
If this is not
desired, for example if you are using rigctl to turn
AI mode on or off, pass this option.
-B, --mapa2b
Maps set_freq on VFOA to VFOB
instead. This allows using CW skimmer with the rig in split
mode and clicking on a frequency in CW skimmer will set VFOB
to the transmit frequency.
-v, --verbose
Set verbose mode, cumulative
(see DIAGNOSTICS below).
-Z,
--debug-time-stamps
Enable time stamps for the
debug messages.
Use only in
combination with the -v option as it generates no
output on its own.
-h, --help
Show a summary of these options
and exit.
-V, --version
Show version of rigctl
and exit.
Note:
Some options may not be implemented by a given backend and
will return an error. This is most likely to occur with the
--set-conf and --show-conf options.
DIAGNOSTICS
The -v,
--verbose option allows different levels of
diagnostics to be output to stderr and correspond to
-v for BUG, -vv for ERR, -vvv for WARN,
-vvvv for VERBOSE, or -vvvvv for TRACE.
A given verbose
level is useful for providing needed debugging information
to the email address below. For example, TRACE output shows
all of the values sent to and received from the radio which
is very useful for radio backend library development and may
be requested by the developers.
EXIT STATUS
rigctlcom
exits with:
|
0 |
|
if all operations completed normally; |
|
1 |
|
if there was an invalid command line option or
argument; |
|
2 |
|
if an error was returned by Hamlib. |
EXAMPLE
Start
rigctlcom with FLRig as the Hamlib model and virtual
com port pair COM9/COM10, e.g.
N1MM Logger+ attaching
to COM10 and using the TS-2000 emulator attached to COM9
(assumes virtual serial/COM ports pipe has been created with
the proper utility as described above):
$ rigctlcom
-m 4 -R COM9 -S 115200
The following
diagram shows the communications flow that allows N1MM
Logger+ to communicate with a radio connected to Flrig:
Flrig
-><- rigctlcom -> COM9 <- virt_port_pipe ->
COM10 <- N1MM
BUGS
Report bugs
to:
Hamlib
Developer mailing list
COPYING
This file is
part of Hamlib, a project to develop a library that
simplifies radio, rotator, and amplifier control functions
for developers of software primarily of interest to radio
amateurs and those interested in radio communications.
Copyright
© 2000-2011 Stephane Fillod
Copyright © 2000-2018 the Hamlib Group (various
contributors)
Copyright © 2010-2020 Nate Bargmann
Copyright © 2019 Michael Black W9MDB
This is free
software; see the file COPYING for copying conditions. There
is NO warranty; not even for MERCHANTABILITY or FITNESS FOR
A PARTICULAR PURPOSE.
SEE ALSO
rigctld(1),
rigctl(1), socat(1), hamlib(7)
COLOPHON
Links to the
Hamlib Wiki, Git repository, release archives, and daily
snapshot archives are available via
hamlib.org.
================================================
FILE: software/hamlib-w64-4.5~git/doc/rigctld.1.html
================================================
RIGCTLD
RIGCTLD
NAME
SYNOPSIS
DESCRIPTION
OPTIONS
COMMANDS
PROTOCOL
DIAGNOSTICS
EXAMPLES
SECURITY
BUGS
COPYING
SEE ALSO
COLOPHON
NAME
rigctld - TCP
radio control daemon
SYNOPSIS
|
rigctld |
|
[-hlLouV]
[-m id] [-r device]
[-p device]
[-d device] [-P type]
[-D type] [-s baud]
[-c id] [-T IPADDR]
[-t number]
[-C parm=val]
[-X seconds] [-v[-Z]] |
DESCRIPTION
The
rigctld program is a radio control daemon that
handles client requests via TCP sockets. This allows
multiple user programs to share one radio (this needs more
development). Multiple radios can be controlled on different
TCP ports by use of multiple rigctld processes. Note
that multiple processes/ports are also necessary if some
clients use extended responses and/or vfo mode. So up to 4
processes/ports may be needed for each combination of
extended response/vfo mode. The syntax of the commands are
the same as rigctl(1). It is hoped that
rigctld will be especially useful for client authors
using languages such as Perl, Python, PHP, and others.
rigctld
communicates to a client through a TCP socket using text
commands shared with rigctl. The protocol is simple,
commands are sent to rigctld on one line and
rigctld responds to get commands with the
requested values, one per line, when successful, otherwise,
it responds with one line “RPRT x”, where
’x’ is a negative number indicating the error
code. Commands that do not return values respond with the
line “RPRT x”, where ’x’ is
’0’ when successful, otherwise is a regative
number indicating the error code. Each line is terminated
with a newline ’\n’ character. This protocol is
primarily for use by the NET rigctl (radio model 2)
backend.
A separate
Extended Response Protocol extends the above behavior
by echoing the received command string as a header, any
returned values as a key: value pair, and the “RPRT
x” string as the end of response marker which includes
the Hamlib success or failure value. See the
PROTOCOL section for details. Consider using this
protocol for clients that will interact with rigctld
directly through a TCP socket.
Keep in mind
that Hamlib is BETA level software. While a lot of backend
libraries lack complete rotator support, the basic functions
are usually well supported.
Please report
bugs and provide feedback at the e-mail address given in the
BUGS section below. Patches and code enhancements
sent to the same address are welcome.
OPTIONS
This program
follows the usual GNU command line syntax. Short options
that take an argument may have the value follow immediately
or be separated by a space. Long options starting with two
dashes (’-’) require an ’=’ between
the option and any argument.
Here is a
summary of the supported options:
-m, --model=id
Select radio model number.
Defaults to dummy device.
See model list
(use “rigctl -l”).
Note:
rigctl (or third party software using the C API) will
use radio model 2 for NET rigctl (this model number
is not used for rigctld even though it shows in the model
list).
-r,
--rig-file=device
Use device as the file
name of the port connected to the radio.
Often a serial
port, but could be a USB to serial adapter. Typically
/dev/ttyS0, /dev/ttyS1, /dev/ttyUSB0,
etc. on Linux, COM1, COM2, etc. on MS Windows.
The BSD flavors and Mac OS/X have their own designations.
See your system’s documentation.
The special
string “uh-rig” may be given to enable micro-ham
device support.
-p,
--ptt-file=device
Use device as the file
name of the Push-To-Talk device using a device file as
described above.
-d,
--dcd-file=device
Use device as the file
name of the Data Carrier Detect device using a device file
as described above.
-P,
--ptt-type=type
Use type of Push-To-Talk
device.
Supported types
are ’RIG’ (CAT command), ’DTR’,
’RTS’, ’PARALLEL’,
’NONE’, overriding PTT type defined in the
rig’s backend.
Some side
effects of this command are that when type is set to DTR,
read PTT state comes from the Hamlib frontend, not
read from the radio. When set to NONE, PTT state cannot be
read or set even if rig backend supports reading/setting PTT
status from the rig.
-D,
--dcd-type=type
Use type of Data Carrier
Detect device.
Supported types
are ’RIG’ (CAT command), ’DSR’,
’CTS’, ’CD’, ’PARALLEL’,
’NONE’.
-s,
--serial-speed=baud
Set serial speed to baud
rate.
Uses maximum
serial speed from radio backend capabilities (set by
-m above) as the default.
-c,
--civaddr=id
Use id as the CI-V
address to communicate with the rig.
Only useful for
Icom and some Ten-Tec rigs.
Note:
The id is in decimal notation, unless prefixed by
0x, in which case it is hexadecimal.
-T,
--listen-addr=IPADDR
Use IPADDR as the
listening IP address.
The default is
ANY (0.0.0.0).
rigctld
can be run and connected to like this:
rigctld
rigctl -m 2
rigctl -m 2 -r 127.0.0.1
rigctl -m 2 -r localhost
rigctl -m 2 -r 192.168.1.1 (local IP address)
rigctl -m 2 -r ::1 (on Linux rigctld doesn’t listen on
IPV6 by default)
rigctld -T
127.0.0.1
rigctl -m 2
rigctl -m 2 -r 127.0.0.1
Exceptions:
rigctl -m 2 -r localhost (only works if localhost is IPV4
address)
rigctld -T
localhost (will set up on IPV4 or IPV6 based on
localhost)
rigctl -m 2
rigctl -m 2 -r localhost
rigctl -m 2 ip6-localhost
Exceptions:
rigctl -m 2 -r 127.0.0.1 (only works if localhost is IPV4
address)
rigctl -m 2 -r ::1 (only works localhost is IPV6
address)
On Linux only
where ip6-localhost is fe00::0:
rigctld -T ip6-localhost
rigctl -m 2 -r
ip6-localhost
-t,
--port=number
Use number as the TCP
listening port.
The default is
4532.
Note: As
rotctld’s default port is 4533, it is advisable
to use even numbered ports for rigctld, e.g. 4532,
4534, 4536, etc.
-L,
--show-conf
List all config parameters for
the radio defined with -m above.
-C,
--set-conf=parm=val[,parm=val]
Set radio configuration
parameter(s), e.g. stop_bits=2.
Use the
-L option above for a list of configuration
parameters for a given model number.
-u,
--dump-caps
Dump capabilities for the radio
defined with -m above and exit.
-l, --list
List all model numbers defined
in Hamlib and exit.
The list is
sorted by model number.
Note: In
Linux the list can be scrolled back using
Shift-PageUp/Shift-PageDown, or using the
scrollbars of a virtual terminal in X or the cmd window in
Windows. The output can be piped to more(1) or
less(1), e.g. “rigctl -l | more”.
-o, --vfo
Enable vfo mode.
An extra VFO
argument will be required in front of each appropriate
command (except set_vfo). Otherwise,
’currVFO’ is used when this option is not set
and an extra VFO argument is not used.
See
chk_vfo below.
-v, --verbose
Set verbose mode, cumulative
(see DIAGNOSTICS below).
-W,
--twiddle_timeout=seconds
Enables timeout when VFO
twiddling is detected. Some functions will be ignored.
Should only be
needed when controlling software should be
"paused" so you can move the VFO. Continuous
movement extends the timeout.
-x,
--uplink=option
1=Sub, 2=Main
For GPredict
use to ignore get_freq for Sub or Main uplink VFO.
Should allow
downlink VFO movement without confusing GPredict or the
uplink
-Z,
--debug-time-stamps
Enable time stamps for the
debug messages.
Use only in
combination with the -v option as it generates no
output on its own.
-A,
--password
Sets password on rigctld which
requires hamlib to use rig_set_password and rigctl to use
\password to access rigctld. A 32-char shared secret will be
displayed to be used on the client side.
-h, --help
Show a summary of these options
and exit.
-V, --version
Show version of rigctl
and exit.
Note:
Some options may not be implemented by a given backend and
will return an error. This is most likely to occur with the
--set-conf and --show-conf options.
Please note
that the backend for the radio to be controlled, or the
radio itself may not support some commands. In that case,
the operation will fail with a Hamlib error code.
COMMANDS
Commands can be
sent over the TCP socket either as a single char, or as a
long command name plus the value(s) space separated on one
’\n’ terminated line. See PROTOCOL.
Since most of
the Hamlib operations have a set and a
get method, an upper case letter will be used for
set methods whereas the corresponding lower case
letter refers to the get method. Each operation also
has a long name; prepend a backslash, ’\’, to
send a long command name.
Example (Perl):
“print $socket "\\dump_caps\n";” to
see what the radio’s backend can do (Note: In
Perl and many other languages a ’\’ will need to
be escaped with a preceding ’\’ so that even
though two backslash characters appear in the code, only one
will be passed to rigctld. This is a possible bug,
beware!).
Note:
The backend for the radio to be controlled, or the radio
itself may not support some commands. In that case, the
operation will fail with a Hamlib error message.
Here is a
summary of the supported commands (In the case of set
commands the quoted italicized string is replaced by the
value in the description. In the case of get commands
the quoted italicized string is the key name of the value
returned.):
F, set_freq 'Frequency'
Set 'Frequency', in
Hz.
Frequency may
be a floating point or integer value.
f, get_freq
Get 'Frequency', in
Hz.
Returns an
integer value and the VFO hamlib thinks is active. Note that
some rigs (e.g. all Icoms) cannot track current VFO so
hamlib can get out of sync with the rig if the user presses
rig buttons like the VFO. rigctld clients should ensure they
set the intended VFO or use vfo mode.
M, set_mode
'Mode' 'Passband'
Set 'Mode' and
'Passband'.
Mode is a
token: ’USB’, ’LSB’,
’CW’, ’CWR’, ’RTTY’,
’RTTYR’, ’AM’, ’FM’,
’WFM’, ’AMS’, ’PKTLSB’,
’PKTUSB’, ’PKTFM’,
’ECSSUSB’, ’ECSSLSB’,
’FA’, ’SAM’, ’SAL’,
’SAH’, ’DSB’.
Passband is in
Hz as an integer, or ’0’ for the radio backend
default.
Note:
Passing a ’?’ (query) as the first argument
instead of a Mode token will return a space separated list
of radio backend supported Modes. Use this to determine the
supported Modes of a given radio backend.
m, get_mode
Get 'Mode' and
'Passband'.
Returns Mode as
a token and Passband in Hz as in set_mode above.
V, set_vfo
'VFO'
Set 'VFO'.
VFO is a token:
’VFOA’, ’VFOB’, ’VFOC’,
’currVFO’, ’VFO’, ’MEM’,
’Main’, ’Sub’, ’TX’,
’RX’, ’MainA’, ’MainB’,
’MainC’, ’SubA’, ’SubB’
’SubC’.
In VFO mode
(see --vfo option above) only a single VFO parameter
is required:
$ rigctl -m 229
-r /dev/rig -o
Rig command: V
VFO: VFOB
Rig
command:
v, get_vfo
Get current 'VFO'.
Returns VFO as
a token as in set_vfo above.
J, set_rit
'RIT'
Set 'RIT'.
RIT is in Hz
and can be + or -. A value of ’0’ resets RIT
(Receiver Incremental Tuning) to match the VFO
frequency.
Note:
RIT needs to be explicitly activated or deactivated with the
set_func command. This allows setting the RIT offset
independently of its activation and allows RIT to remain
active while setting the offset to ’0’.
j, get_rit
Get 'RIT' in Hz.
Returned value
is an integer.
Z, set_xit
'XIT'
Set 'XIT'.
XIT is in Hz
and can be + or -. A value of ’0’ resets XIT
(Transmitter Incremental Tuning) to match the VFO
frequency.
Note:
XIT needs to be explicitly activated or deactivated with the
set_func command. This allows setting the XIT offset
independently of its activation and allows XIT to remain
active while setting the offset to ’0’.
z, get_xit
Get 'XIT' in Hz.
Returned value
is an integer.
T, set_ptt
'PTT'
Set 'PTT'.
PTT is a value:
’0’ (RX), ’1’ (TX), ’2’
(TX mic), or ’3’ (TX data).
t, get_ptt
Get 'PTT' status.
Returns PTT as
a value in set_ptt above.
S, set_split_vfo
'Split' 'TX VFO'
Set 'Split' mode.
Split is either
’0’ = Normal or ’1’ = Split.
Set 'TX
VFO'.
TX VFO is a
token: ’VFOA’, ’VFOB’,
’VFOC’, ’currVFO’,
’VFO’, ’MEM’, ’Main’,
’Sub’, ’TX’, ’RX’.
s,
get_split_vfo
Get 'Split' mode.
Split is either
’0’ = Normal or ’1’ = Split.
Get 'TX
VFO'.
TX VFO is a
token as in set_split_vfo above.
I, set_split_freq
'Tx Frequency'
Set 'TX Frequency', in
Hz.
Frequency may
be a floating point or integer value.
i,
get_split_freq
Get 'TX Frequency', in
Hz.
Returns an
integer value.
X, set_split_mode
'TX Mode' 'TX Passband'
Set 'TX Mode' and 'TX
Passband'.
TX Mode is a
token: ’USB’, ’LSB’,
’CW’, ’CWR’, ’RTTY’,
’RTTYR’, ’AM’, ’FM’,
’WFM’, ’AMS’, ’PKTLSB’,
’PKTUSB’, ’PKTFM’,
’ECSSUSB’, ’ECSSLSB’,
’FA’, ’SAM’, ’SAL’,
’SAH’, ’DSB’.
TX Passband is
in Hz as an integer, or ’0’ for the radio
backend default.
Note:
Passing a ’?’ (query) as the first argument
instead of a TX Mode token will return a space separated
list of radio backend supported TX Modes. Use this to
determine the supported TX Modes of a given radio
backend.
x,
get_split_mode
Get 'TX Mode' and 'TX
Passband'.
Returns TX Mode
as a token and TX Passband in Hz as in set_split_mode
above.
Y, set_ant
'Antenna'
Set 'Antenna' number
(’0’, ’1’, ’2’,
...).
Option depends
on rig..for Icom it probably sets the Tx & Rx antennas
as in the IC-7851. See your manual for rig specific option
values. Most rigs don’t care about the option.
For the IC-7851
(and perhaps others) it means this:
1 = TX/RX =
ANT1
2 = TX/RX = ANT2
3 = TX/RX = ANT3
4 = TX/RX = ANT1/ANT4
5 = TX/RX = ANT2/ANT4
6 = TX/RX = ANT3/ANT4
y, get_ant
Get 'Antenna' number
(’0’, ’1’, ’2’,
...).
b, send_morse
'Morse'
Send 'Morse'
symbols.
0x8b, get_dcd
Get 'DCD' (squelch)
status: ’0’ (Closed) or ’1’
(Open).
R, set_rptr_shift
'Rptr Shift'
Set 'Rptr Shift'.
Rptr Shift is
one of: ’+’, ’-’, or something else
for ’None’.
r,
get_rptr_shift
Get 'Rptr Shift'.
Returns
’+’, ’-’, or ’None’.
O, set_rptr_offs
'Rptr Offset'
Set 'Rptr Offset', in
Hz.
o,
get_rptr_offs
Get 'Rptr Offset', in
Hz.
C, set_ctcss_tone
'CTCSS Tone'
Set 'CTCSS Tone', in
tenths of Hz.
c,
get_ctcss_tone
Get 'CTCSS Tone', in
tenths of Hz.
D, set_dcs_code
'DCS Code'
Set 'DCS Code'.
d,
get_dcs_code
Get 'DCS Code'.
0x90,
set_ctcss_sql 'CTCSS Sql'
Set 'CTCSS Sql' tone, in
tenths of Hz.
0x91,
get_ctcss_sql
Get 'CTCSS Sql' tone, in
tenths of Hz.
0x92, set_dcs_sql
'DCS Sql'
Set 'DCS Sql' code.
0x93,
get_dcs_sql
Get 'DCS Sql'
code.
N, set_ts
'Tuning Step'
Set 'Tuning Step', in
Hz.
n, get_ts
Get 'Tuning Step', in
Hz.
U, set_func
'Func' 'Func Status'
Set 'Func' and 'Func
Status'.
Func is a
token: ’FAGC’, ’NB’,
’COMP’, ’VOX’, ’TONE’,
’TSQL’, ’SBKIN’,
’FBKIN’, ’ANF’, ’NR’,
’AIP’, ’APF’, ’MON’,
’MN’, ’RF’, ’ARO’,
’LOCK’, ’MUTE’, ’VSC’,
’REV’, ’SQL’, ’ABM’,
’BC’, ’MBC’, ’RIT’,
’AFC’, ’SATMODE’,
’SCOPE’, ’RESUME’,
’TBURST’, ’TUNER’,
’XIT’.
Func Status is
a non null value for “activate” or
“de-activate” otherwise, much as TRUE/FALSE
definitions in the C language (true is non-zero and false is
zero, ’0’).
Note:
Passing a ’?’ (query) as the first argument
instead of a Func token will return a space separated list
of radio backend supported set function tokens. Use this to
determine the supported functions of a given radio
backend.
u, get_func
'Func'
Get 'Func Status'.
Returns Func
Status as a non null value for the Func token given as in
set_func above.
Note:
Passing a ’?’ (query) as the first argument
instead of a Func token will return a space separated list
of radio backend supported get function tokens. Use this to
determine the supported functions of a given radio
backend.
L, set_level
'Level' 'Level Value'
Set 'Level' and
'Level Value'.
Level is a
token: ’PREAMP’, ’ATT’,
’VOX’, ’AF’, ’RF’,
’SQL’, ’IF’, ’APF’,
’NR’, ’PBT_IN’,
’PBT_OUT’, ’CWPITCH’,
’RFPOWER’, ’RFPOWER_METER’,
’RFPOWER_METER_WATTS’, ’MICGAIN’,
’KEYSPD’, ’NOTCHF’,
’COMP’, ’AGC’, ’BKINDL’,
’BAL’, ’METER’,
’VOXGAIN’, ’ANTIVOX’,
’SLOPE_LOW’, ’SLOPE_HIGH’,
’RAWSTR’, ’SWR’, ’ALC’,
’STRENGTH’.
The Level Value
can be a float or an integer value. For the AGC token the
value is one of ’0’ = OFF, ’1’ =
SUPERFAST, ’2’ = FAST, ’3’ = SLOW,
’4’ = USER, ’5’ = MEDIUM,
’6’ = AUTO.
Note:
Passing a ’?’ (query) as the first argument
instead of a Level token will return a space separated list
of radio backend supported set level tokens. Use this to
determine the supported levels of a given radio backend.
l, get_level
'Level'
Get 'Level Value'.
Returns Level
Value as a float or integer for the Level token given as in
set_level above.
Note:
Passing a ’?’ (query) as the first argument
instead of a Level token will return a space separated list
of radio backend supported get level tokens. Use this to
determine the supported levels of a given radio backend.
P, set_parm
'Parm' 'Parm Value'
Set 'Parm' and 'Parm
Value'.
Parm is a
token: ’ANN’, ’APO’,
’BACKLIGHT’, ’BEEP’,
’TIME’, ’BAT’,
’KEYLIGHT’.
Note:
Passing a ’?’ (query) as the first argument
instead of a Parm token will return a space separated list
of radio backend supported set parameter tokens. Use this to
determine the supported parameters of a given radio
backend.
p, get_parm
'Parm'
Get 'Parm Value'.
Returns Parm
Value as a float or integer for the Parm token given as in
set_parm above.
Note:
Passing a ’?’ (query) as the first argument
instead of a Parm token will return a space separated list
of radio backend supported get parameter tokens. Use this to
determine the supported parameters of a given radio
backend.
B, set_bank
'Bank'
Set 'Bank'.
Sets the
current memory bank number.
E, set_mem
'Memory#'
Set 'Memory#' channel
number.
e, get_mem
Get 'Memory#' channel
number.
G, vfo_op
'Mem/VFO Op'
Perform a 'Mem/VFO
Op'.
Mem/VFO
Operation is a token: ’CPY’, ’XCHG’,
’FROM_VFO’, ’TO_VFO’,
’MCL’, ’UP’, ’DOWN’,
’BAND_UP’, ’BAND_DOWN’,
’LEFT’, ’RIGHT’, ’TUNE’,
’TOGGLE’.
Note:
Passing a ’?’ (query) as the first argument
instead of a Mem/VFO Op token will return a space separated
list of radio backend supported Set Mem/VFO Op tokens. Use
this to determine the supported Mem/VFO Ops of a given radio
backend.
g, scan 'Scan
Fct' 'Scan Channel'
Perform a 'Scan Fct' on
a 'Scan Channel'.
Scan Function
is a token: ’STOP’, ’MEM’,
’SLCT’, ’PRIO’, ’PROG’,
’DELTA’, ’VFO’,
’PLT’.
Scan Channel is
an integer (maybe?).
Note:
Passing a ’?’ (query) as the first argument
instead of a Scan Fct token will return a space separated
list of radio backend supported Scan Function tokens. Use
this to determine the supported Scan Functions of a given
radio backend.
H, set_channel
'Channel'
Set memory 'Channel'
data.
Not implemented
yet.
h, get_channel
'readonly'
Get channel memory.
If readonly!=0
then only channel data is returned and rig remains on the
current channel. If readonly=0 then rig will be set to the
channel requested. data.
A, set_trn
'Transceive'
Set 'Transceive'
mode.
Transcieve is a
token: ’OFF’, ’RIG’,
’POLL’.
Transceive is a
mechanism for radios to report events without a specific
call for information.
Note:
Passing a ’?’ (query) as the first argument
instead of a Transceive token will return a space separated
list of radio backend supported Transceive mode tokens. Use
this to determine the supported Transceive modes of a given
radio backend.
a, get_trn
Get 'Transceive'
mode.
Transceive mode
(reporting event) as in set_trn above.
*, reset
'Reset'
Perform rig 'Reset'.
Reset is a
value: ’0’ = None, ’1’ = Software
reset, ’2’ = VFO reset, ’4’ = Memory
Clear reset, ’8’ = Master reset.
Since these
values are defined as a bitmask in
include/hamlib/rig.h, it should be possible to AND
these values together to do multiple resets at once, if the
backend supports it or supports a reset action via rig
control at all.
0x87,
set_powerstat 'Power Status'
Set 'Power Status'.
Power Status is
a value: ’0’ = Power Off, ’1’ =
Power On, ’2’ = Power Standby.
0x88,
get_powerstat
Get 'Power Status' as in
set_powerstat above.
0x89, send_dtmf
'Digits'
Set DTMF 'Digits'.
0x8a,
recv_dtmf
Get DTMF 'Digits'.
_, get_info
Get misc information about the
rig.
0xf5,
get_rig_info
Get misc information about the
rig vfos and other info.
0xf3,
get_vfo_info 'VFO'
Get misc information about a
specific vfo.
dump_state
Return certain state
information about the radio backend.
1, dump_caps
Not a real rig remote command,
it just dumps capabilities, i.e. what the backend knows
about this model, and what it can do.
TODO: Ensure
this is in a consistent format so it can be read into a
hash, dictionary, etc. Bug reports requested.
Note:
This command will produce many lines of output so be very
careful if using a fixed length array! For example, running
this command against the Dummy backend results in over 5kB
of text output.
VFO parameter
not used in ’VFO mode’.
2, power2mW
'Power [0.0..1.0]' 'Frequency'
'Mode'
Returns 'Power mW'.
Converts a
Power value in a range of 0.0...1.0 to the
real transmit power in milli-Watts (integer).
'Frequency'
and 'Mode' also need to be provided as output power
may vary according to these values.
VFO parameter
is not used in VFO mode.
4, mW2power
'Power mW' 'Frequency' 'Mode'
Returns 'Power
[0.0..1.0]'.
Converts the
real transmit power in milli-Watts (integer) to a Power
value in a range of 0.0 ... 1.0.
'Frequency'
and 'Mode' also need to be provided as output power
may vary according to these values.
VFO parameter
is not used in VFO mode.
set_clock
'DateTime'
Set 'DateTime'
Sets rig clock
-- note that some rigs do not handle seconds or
milliseconds. If you try to set that you will get a debug
warning message. Format is ISO8601.
Formats accepted
YYYY-MM-DDTHH:MM:SS.sss+ZZ (where +ZZ is either -/+ UTC
offset)
YYYY-MM-DDTHH:MM:SS+ZZ
YYYY-MM-DDTHH:MM+ZZ
YYYY-MM-DD (sets date only)
get_clock
Get 'RigTime'
Gets rig clock
-- note that some rigs do not handle seconds or
milliseconds. Format is ISO8601 YYYY-MM-DDTHH:MM:SS.sss+ZZ
where +ZZ is either -/+ UTC offset
chk_vfo
Returns “1\n”
(single line only) if rigctld was invoked with the
-o/--vfo option and “0\n” if
not.
When in VFO
mode the client will need to pass 'VFO' as the first
parameter to set or get commands. VFO is one
of the strings defined in set_vfo above.
set_vfo_opt
'Status'
Set 'Status'
Set vfo option
Status 1=on or 0=off This is the same as using the -o switch
for rigctl and ritctld. This can be dyamically changed while
running.
PROTOCOL
There are two
protocols in use by rigctld, the Default
Protocol and the Extended Response Protocol.
The Default
Protocol is intended primarily for the communication
between Hamlib library functions and rigctld
(“NET rigctl”, available using radio model
’2’).
The Extended
Response Protocol is intended to be used with scripts or
other programs interacting directly with rigctld as
consistent feedback is provided.
Default
Protocol
The Default Protocol is intentionally simple.
Commands are entered on a single line with any needed
values. In practice, reliable results are obtained by
terminating each command string with a newline character,
’\n’.
Example set
frequency and mode commands (Perl code (typed text shown in
bold)):
print
$socket "F 14250000\n";
print $socket "\\set_mode LSB 2400\n"; #
escape leading ’\’
A one line
response will be sent as a reply to set commands,
“RPRT x\n” where x is the Hamlib
error code with ’0’ indicating success of the
command.
Responses from
rigctld get commands are text values and match the
same tokens used in the set commands. Each value is
returned on its own line. On error the string “RPRT
x\n” is returned where x is the Hamlib
error code.
Example get
frequency (Perl code):
print
$socket "f\n";
"14250000\n"
Most get
functions return one to three values. A notable exception is
the dump_caps command which returns many lines of
key:value pairs.
This protocol
is primarily used by the “NET rigctl” (rigctl
model 2) backend which allows applications already written
for Hamlib’s C API to take advantage of rigctld
without the need of rewriting application code. An
application’s user can select rotator model 2
(“NET rigctl”) and then set rig_pathname
to “localhost:4532” or other network
host:port (set by the -T/-t
options, respectively, above).
Extended
Response Protocol
The Extended Response protocol adds several rules to the
strings returned by rigctld and adds a rule for the
command syntax.
1. The command
received by rigctld is echoed with its long command
name followed by the value(s) (if any) received from the
client terminated by the specified response separator as the
first record of the response.
2. The last
record of each block is the string “RPRT
x\n” where x is the numeric return value
of the Hamlib backend function that was called by the
command.
3. Any records
consisting of data values returned by the radio backend are
prepended by a string immediately followed by a colon then a
space and then the value terminated by the response
separator. e.g. “Frequency: 14250000\n” when the
command was prepended by ’+’.
4. All commands
received will be acknowledged by rigctld
with records from rules 1 and 2. Records from rule 3 are
only returned when data values must be returned to the
client.
An example
response to a set_mode command sent from the shell
prompt (note the prepended ’+’):
$ echo
"+M USB 2400" | nc -w 1 localhost 4532
set_mode: USB 2400
RPRT 0
In this case
the long command name and values are returned on the first
line and the second line contains the end of block marker
and the numeric radio backend return value indicating
success.
An example
response to a get_mode query:
$ echo
"+\get_mode" | nc -w 1 localhost 4532
get_mode:
Mode: USB
Passband: 2400
RPRT 0
Note:
The ’\’ is still required for the long command
name even with the ERP character.
In this case,
as no value is passed to rigctld, the first line
consists only of the long command name. The final line shows
that the command was processed successfully by the radio
backend.
Invoking the
Extended Response Protocol requires prepending a command
with a punctuation character. As shown in the examples
above, prepending a ’+’ character to the command
results in the responses being separated by a newline
character (’\n’). Any other punctuation
character recognized by the C ispunct() function
except ’\’, ’?’, or ’_’
will cause that character to become the response separator
and the entire response will be on one line.
Separator
character summary:
|
’+’ |
|
Each record of the response is appended with a newline
(’\n’). |
’;’,
’|’, or, ’,’
Each record of the response is
appended by the given character resulting in entire response
on one line.
These are
common record separators for text representations of
spreadsheet data, etc.
|
’?’ |
|
Reserved for help in rigctl. |
|
’_’ |
|
Reserved for get_info short command |
|
’#’ |
|
Reserved for comments when reading a command file
script. |
Note:
Other punctuation characters have not been tested! Use at
your own risk.
For example,
invoking a get_mode query with a leading
’;’ returns:
get_mode:;Mode:
USB;Passband: 2400;RPRT 0
Or, using the
pipe character ’|’ returns:
get_mode:|Mode:
USB|Passband: 2400|RPRT 0
And a
set_mode command prepended with a ’|’
returns:
set_mode: USB
2400|RPRT 0
Such a format
will allow reading a response as a single event using a
preferred response separator. Other punctuation characters
have not been tested!
The following
commands have been tested with the Extended Response
protocol and the included testctld.pl Perl
script:
set_freq,
get_freq, set_split_freq,
get_split_freq, set_mode, get_mode,
set_split_mode, get_split_mode,
set_vfo, get_vfo, set_split_vfo,
get_split_vfo, set_rit, get_rit,
set_xit, get_xit, set_ptt,
get_ptt, power2mW, mW2power,
dump_caps.
DIAGNOSTICS
The -v,
--verbose option allows different levels of
diagnostics to be output to stderr and correspond to
-v for BUG, -vv for ERR, -vvv for WARN,
-vvvv for VERBOSE, or -vvvvv for TRACE.
A given verbose
level is useful for providing needed debugging information
to the email address below. For example, TRACE output shows
all of the values sent to and received from the radio which
is very useful for radio backend library development and may
be requested by the developers.
EXAMPLES
Start
rigctld for a Yaesu FT-920 using a USB-to-serial
adapter and backgrounding:
$ rigctld -m
1014 -r /dev/ttyUSB1 &
Start
rigctld for a Yaesu FT-920 using a USB-to-serial
adapter while setting baud rate and stop bits, and
backgrounding:
$ rigctld -m
1014 -r /dev/ttyUSB1 -s 4800 -C stop_bits=2 &
Start
rigctld for an Elecraft K3 using COM2 on MS
Windows:
$ rigctld -m
2029 -r COM2
Connect to the
already running rigctld and set the frequency to
14.266 MHz with a 1 second read timeout using the default
protocol from the shell prompt:
$ echo
"\set_freq 14266000" | nc -w 1 localhost
4532P
Connect to a
running rigctld with rigctl on the local
host:
$ rigctl
-m2
SECURITY
No
authentication whatsoever; DO NOT leave this TCP port open
wide to the Internet. Please ask if stronger security is
needed or consider using a Secure Shell (ssh(1))
tunnel.
As
rigctld does not need any greater permissions than
rigctl, it is advisable to not start rigctld
as “root” or another system user account in
order to limit any vulnerability.
BUGS
The daemon is
not detaching and backgrounding itself.
No method to
exit the daemon so the kill(1) command must be used
to terminate it.
Multiple
clients using the daemon may experience contention with the
connected radio.
Report bugs
to:
Hamlib
Developer mailing list
COPYING
This file is
part of Hamlib, a project to develop a library that
simplifies radio, rotator, and amplifier control functions
for developers of software primarily of interest to radio
amateurs and those interested in radio communications.
Copyright
© 2000-2010 Stephane Fillod
Copyright © 2000-2018 the Hamlib Group (various
contributors)
Copyright © 2011-2020 Nate Bargmann
This is free
software; see the file COPYING for copying conditions. There
is NO warranty; not even for MERCHANTABILITY or FITNESS FOR
A PARTICULAR PURPOSE.
SEE ALSO
kill(1),
rigctl(1), ssh(1), hamlib(7)
COLOPHON
Links to the
Hamlib Wiki, Git repository, release archives, and daily
snapshot archives are available via
hamlib.org.
================================================
FILE: software/hamlib-w64-4.5~git/doc/rigmem.1.html
================================================
RIGMEM
RIGMEM
NAME
SYNOPSIS
DESCRIPTION
OPTIONS
COMMANDS
DIAGNOSTICS
EXIT STATUS
BUGS
COPYING
SEE ALSO
COLOPHON
NAME
rigmem - backup
and restore memory of radio transceivers and receivers
SYNOPSIS
|
rigmem |
|
[-ahvVx]
[-m id] [-r device]
[-s baud] [-c id]
[-C parm=val] [-p sep]
command [file] |
DESCRIPTION
Backup and
restore memory of radio transceivers and receivers.
rigmem accepts commands from the command line
only.
Keep in mind
that Hamlib is BETA level software. While a lot of backend
libraries lack complete radio support, the basic functions
are usually well supported.
Please report
bugs and provide feedback at the e-mail address given in the
BUGS section below. Patches and code enhancements
sent to the same address are welcome.
OPTIONS
This program
follows the usual GNU command line syntax. Short options
that take an argument may have the value follow immediately
or be separated by a space. Long options starting with two
dashes (’-’) require an ’=’ between
the option and any argument.
Here is a
summary of the supported options:
-m, --model=id
Select radio model number.
See model list
(use “rigctl -l”).
-r,
--rig-file=device
Use device as the file
name of the port connected to the radio.
Often a serial
port, but could be a USB to serial adapter. Typically
/dev/ttyS0, /dev/ttyS1, /dev/ttyUSB0,
etc. on Linux, COM1, COM2, etc. on MS Windows.
The BSD flavors and Mac OS/X have their own designations.
See your system’s documentation.
-s,
--serial-speed=baud
Set radio serial speed to
baud rate.
Uses maximum
serial speed from radio backend capabilities as the
default.
-c,
--civaddr=id
Use id as the CI-V
address to communicate with the radio.
Only useful for
Icom and some Ten-Tec radios.
Note:
The id is in decimal notation, unless prefixed by
0x, in which case it is hexadecimal.
-C,
--set-conf=parm=val[,parm=val]
Set radio configuration
parameter(s), e.g. stop_bits=2.
Use the
-L option of rigctl for a list of
configuration parameters for a given model number.
-p,
--set-separator=sep
Set character as column
separator instead of the CSV comma.
Some common
alternatives are the vertical bar (pipe), ’|’,
semicolon, ’;’, and colon, ’:’.
-a, --all
Bypass mem_caps, apply to all
fields of channel_t.
-x, --xml
Use XML format instead of CSV,
if libxml2 is available.
-v, --verbose
Set verbose mode, cumulative
(see DIAGNOSTICS below).
-h, --help
Show a summary of these options
and exit.
-V, --version
Show version of rigmem
and exit.
Note:
Some options may not be implemented by a given backend and
will return an error. This is most likely to occur with the
--set-conf option.
COMMANDS
Backup and
restore are supported for basic CSV file and XML format
where available.
Please note
that the backend for the radio to be controlled, or the
radio itself may not support some commands. In that case,
the operation will fail with a Hamlib error
message.
Here is a
summary of the supported commands:
save file
Save all the content of memory
in a CSV (or XML) file given as an argument to the
command.
load file
Load the content into all the
memory from a CSV (or XML) file given as an argument to the
command.
save_parm
file
Save all the parameters of the
radio in a CSV (or XML) file given as an argument to the
command.
load_parm
file
Load the parameters of the
radio from a CSV (or XML) file given as an argument to the
command.
|
clear |
|
This is a very DANGEROUS command, as it will
completely clear out everything you have programmed in the
memory of your radio. ALL DATA WILL BE LOST. Use at
your own risk! |
DIAGNOSTICS
The -v,
--verbose option allows different levels of
diagnostics to be output to stderr and correspond to
-v for BUG, -vv for ERR, -vvv for WARN,
-vvvv for VERBOSE, or -vvvvv for TRACE.
A given verbose
level is useful for providing needed debugging information
to the email address below. For example, TRACE output shows
all of the values sent to and received from the radio which
is very useful for radio backend library development and may
be requested by the developers.
EXIT STATUS
rigmem
exits with:
|
0 |
|
if all operations completed
normally; |
|
1 |
|
if there was an invalid command line option or
argument; |
|
2 |
|
if an error was returned by Hamlib. |
|
3 |
|
the Hamlib backend has no memory support
implemented and/or the radio has no memory access
available. |
BUGS
Report bugs
to:
Hamlib
Developer mailing list
COPYING
This file is
part of Hamlib, a project to develop a library that
simplifies radio, rotator, and amplifier control functions
for developers of software primarily of interest to radio
amateurs and those interested in radio communications.
Copyright
© 2003-2011 Stephane Fillod
Copyright © 2007,2019-2020 Nate Bargmann
This is free
software; see the file COPYING for copying conditions. There
is NO warranty; not even for MERCHANTABILITY or FITNESS FOR
A PARTICULAR PURPOSE.
SEE ALSO
rigctl(1),
hamlib(7)
COLOPHON
Links to the
Hamlib Wiki, Git repository, release archives, and daily
snapshot archives are available via
hamlib.org.
================================================
FILE: software/hamlib-w64-4.5~git/doc/rigsmtr.1.html
================================================
RIGSMTR
RIGSMTR
NAME
SYNOPSIS
DESCRIPTION
OPTIONS
DIAGNOSTICS
EXIT STATUS
EXAMPLE
BUGS
COPYING
SEE ALSO
COLOPHON
NAME
rigsmtr -
measure S-Meter vs azimuth using Hamlib
SYNOPSIS
|
rigsmtr |
|
[-hvV]
[-m id] [-r device]
[-s baud] [-c id]
[-C parm=val] [-M id]
[-R device] [-S baud]
[-N parm=val] [time_step] |
DESCRIPTION
rigsmtr
uses Hamlib to control a radio to measure S-Meter
value versus antenna azimuth.
It rotates the
antenna from minimum azimuth to maximum azimuth. Every
second, or time_step if specified in seconds, it
retrieves the signal strength. Azimuth in degrees and the
corresponding S-Meter level in dB relative to S9 are then
printed on stdout.
To work
correctly, rigsmtr needs a radio that could measure S-Meter
and a Hamlib backend that is able to retrieve it, connected
to a Hamlib supported rotator.
Keep in mind
that Hamlib is BETA level software. While a lot of backend
libraries lack complete radio support, the basic functions
are usually well supported.
Please report
bugs and provide feedback at the e-mail address given in the
BUGS section below. Patches and code enhancements
sent to the same address are welcome.
OPTIONS
This program
follows the usual GNU command line syntax. Short options
that take an argument may have the value follow immediately
or be separated by a space. Long options starting with two
dashes (’-’) require an ’=’ between
the option and any argument.
Here is a
summary of the supported options.
-m, --model=id
Select radio model number.
See model list
(use “rigctl -l”).
-r,
--rig-file=device
Use device as the file
name of the port connected to the radio.
Often a serial
port, but could be a USB to serial adapter. Typically
/dev/ttyS0, /dev/ttyS1, /dev/ttyUSB0,
etc. on Linux, COM1, COM2, etc. on MS Windows.
The BSD flavors and Mac OS/X have their own designations.
See your system’s documentation.
-s,
--serial-speed=baud
Set radio serial speed to
baud rate.
Uses maximum
serial speed from radio backend capabilities as the
default.
-c,
--civaddr=id
Use id as the CI-V
address to communicate with the radio.
Only useful for
Icom and some Ten-Tec radios.
Note:
The id is in decimal notation, unless prefixed by
0x, in which case it is hexadecimal.
-C,
--set-conf=parm=val[,parm=val]
Set radio configuration
parameter(s), e.g. stop_bits=2.
Use the
-L option of rigctl for a list of
configuration parameters for a given model number.
-M,
--rot-model=id
Select rotator model
number.
See model list
(use “rotctl -l”).
-R,
--rot-file=device
Use device as the file
name of the port connected to the rotator.
Often a serial
port, but could be a USB to serial adapter. Typically
/dev/ttyS0, /dev/ttyS1, /dev/ttyUSB0,
etc. on Linux, COM1, COM2, etc. on MS Windows.
The BSD flavors and Mac OS/X have their own designations.
See your system’s documentation.
-S,
--rot-serial-speed=baud
Set rotator serial speed to
baud rate.
Uses maximum
serial speed from rotator backend capabilities as the
default.
-N,
--rot-set-conf=parm=val[,parm=val]
Set rotator configuration
parameter(s), e.g. stop_bits=2.
Use the
-L option of rotctl for a list of
configuration parameters for a given model number.
-v, --verbose
Set verbose mode, cumulative
(see DIAGNOSTICS below).
-h, --help
Show a summary of these options
and exit.
-V, --version
Show version of rigsmtr
and exit.
Note:
Some options may not be implemented by a given backend and
will return an error. This is most likely to occur with the
--set-conf and --rot-set-conf options.
DIAGNOSTICS
The -v,
--verbose option allows different levels of
diagnostics to be output to stderr and correspond to
-v for BUG, -vv for ERR, -vvv for WARN,
-vvvv for VERBOSE, or -vvvvv for TRACE.
A given verbose
level is useful for providing needed debugging information
to the email address below. For example, TRACE output shows
all of the values sent to and received from the radio which
is very useful for radio backend library development and may
be requested by the developers.
EXIT STATUS
rigsmtr
exits with:
|
0 |
|
if all operations completed normally; |
|
1 |
|
if there was an invalid command line option or
argument; |
|
2 |
|
if an error was returned by Hamlib; |
|
3 |
|
if the radio doesn’t have the required
capabilities. |
EXAMPLE
Collect S-Meter
readings on a TS-850 while an EasycommII rotator makes a
full 360° rotation and record measurements in the file
csmtr (typed text shown in bold):
$ rigsmtr -m
2009 -r /dev/ttyS1 -M 202 > csmtr
After
completion the file csmtr contains lines such as:
0 -47
30 -40
60 -22
90 -3
120 10
150 1
180 -11
210 -24
240 -35
270 -42
300 -48
330 -51
360 -49
The results can
be plotted with gnuplot(1):
$ gnuplot
set angles degrees
set polar
set grid polar 15.
unset border
unset param
set style data line
set rrange [-60:60]
set xrange [-60:60]
set yrange [-60:60]
plot csmtr
BUGS
Report bugs
to:
Hamlib
Developer mailing list
COPYING
This file is
part of Hamlib, a project to develop a library that
simplifies radio, rotator, and amplifier control functions
for developers of software primarily of interest to radio
amateurs and those interested in radio communications.
Copyright
© 2007-2009 Stephane Fillod
Copyright © 2018-2020 Nate Bargmann
This is free
software; see the file COPYING for copying conditions. There
is NO warranty; not even for MERCHANTABILITY or FITNESS FOR
A PARTICULAR PURPOSE.
SEE ALSO
gnuplot(1),
rigctl(1), rotctl(1), hamlib(7)
COLOPHON
Links to the
Hamlib Wiki, Git repository, release archives, and daily
snapshot archives are available via
hamlib.org.
================================================
FILE: software/hamlib-w64-4.5~git/doc/rigswr.1.html
================================================
RIGSWR
RIGSWR
NAME
SYNOPSIS
DESCRIPTION
OPTIONS
DIAGNOSTICS
EXIT STATUS
EXAMPLE
BUGS
COPYING
SEE ALSO
COLOPHON
NAME
rigswr -
measure VSWR vs frequency.
SYNOPSIS
|
rigswr |
|
[-hvV]
[-m id] [-r device]
[-s baud] [-c id]
[-C parm=val]
[-p device] [-P type]
start_freq stop_freq [freq_step] |
DESCRIPTION
rigswr
uses Hamlib to control a radio to measure VSWR
(Voltage Standing Wave Ratio) over a frequency range.
It scans
frequencies from start_freq to stop_freq with
an optional increment of freq_step (default step is
100 kHz). All values must be entered as an integer in Hertz
(cycles per second).
Note:
rigswr assumes that start_freq is less than or
equal to stop_freq. If it is greater, rigswr
will exit without doing anything.
For each
frequency, it transmits at 25% of total POWER during 0.5
second in CW mode and reads VSWR.
Frequency and
the corresponding VSWR are then printed on
stdout.
To work
correctly, rigswr needs a radio that can measure VSWR
and a Hamlib backend that supports reading VSWR from
the radio.
Keep in mind
that Hamlib is BETA level software. While a lot of backend
libraries lack complete radio support, the basic functions
are usually well supported.
Please report
bugs and provide feedback at the e-mail address given in the
BUGS section below. Patches and code enhancements
sent to the same address are welcome.
OPTIONS
This program
follows the usual GNU command line syntax. Short options
that take an argument may have the value follow immediately
or be separated by a space. Long options starting with two
dashes (’-’) require an ’=’ between
the option and any argument.
Here is a
summary of the supported options:
-m, --model=id
Select radio model number.
See model list
(use “rigctl -l”).
-r,
--rig-file=device
Use device as the file
name of the port connected to the radio.
Often a serial
port, but could be a USB to serial adapter. Typically
/dev/ttyS0, /dev/ttyS1, /dev/ttyUSB0,
etc. on Linux, COM1, COM2, etc. on MS Windows.
The BSD flavors and Mac OS/X have their own designations.
See your system’s documentation.
-s,
--serial-speed=baud
Set radio serial speed to
baud rate.
Uses maximum
serial speed from radio backend capabilities as the
default.
-c,
--civaddr=id
Use id as the CI-V
address to communicate with the radio.
Only useful for
Icom and some Ten-Tec radios.
Note:
The id is in decimal notation, unless prefixed by
0x, in which case it is hexadecimal.
-C,
--set-conf=parm=val[,parm=val]
Set radio configuration
parameter(s), e.g. stop_bits=2.
Use the
-L option of rigctl for a list of
configuration parameters for a given model number.
-p,
--ptt-file=device
Use device as the file
name of the Push-To-Talk port using a device file as with
the -r option above.
This is only
needed if the radio doesn’t have CAT PTT control and
requires a separate device port to key the transmitter.
-P,
--ptt-type=type
Use type of Push-To-Talk
device.
Supported types
are RIG (CAT), DTR, RTS, PARALLEL, NONE.
-v, --verbose
Set verbose mode, cumulative
(see DIAGNOSTICS below).
-h, --help
Show a summary of these options
and exit.
-V, --version
Show version of rigswr
and exit.
Note:
Some options may not be implemented by a given backend and
will return an error. This is most likely to occur with the
--set-conf option.
DIAGNOSTICS
The -v,
--verbose option allows different levels of
diagnostics to be output to stderr and correspond to
-v for BUG, -vv for ERR, -vvv for WARN,
-vvvv for VERBOSE, or -vvvvv for TRACE.
A given verbose
level is useful for providing needed debugging information
to the email address below. For example, TRACE output shows
all of the values sent to and received from the radio which
is very useful for radio backend library development and may
be requested by the developers.
EXIT STATUS
rigswr
exits with:
|
0 |
|
if all operations completed normally; |
|
1 |
|
if there was an invalid command line option or
argument; |
|
2 |
|
if an error was returned by Hamlib; |
|
3 |
|
if the rig doesn’t have the required
capabilities. |
EXAMPLE
Scans
frequencies between 14.000 MHz and 14.200 MHz with 50 kHz
step on a TS-850 and records VSWR measurements in file
cswr (typed text shown in bold):
$ rigswr -m
2009 -r /dev/ttyS1 14000000 14200000 50000 > cswr
After
completion, cswr contains the following lines:
14000000 1.50
14050000 1.31
14100000 1.22
14150000 1.07
14200000 1.07
The result can
be plotted with gnuplot(1):
$ gnuplot
set data style linespoints
set grid
plot cswr
BUGS
Depending on
keyer/QSK setup, transmissions in CW mode may not be
modulated thus possibly giving a wrong result. Please report
this situation if it happens.
Report bugs
to:
Hamlib
Developer mailing list
COPYING
This file is
part of Hamlib, a project to develop a library that
simplifies radio, rotator, and amplifier control functions
for developers of software primarily of interest to radio
amateurs and those interested in radio communications.
Copyright
© 2004 Thierry Leconte
Copyright © 2004-2011 Stephane Fillod
Copyright © 2007,2018-2020 Nate Bargmann
This is free
software; see the file COPYING for copying conditions. There
is NO warranty; not even for MERCHANTABILITY or FITNESS FOR
A PARTICULAR PURPOSE.
SEE ALSO
gnuplot(1),
rigctl(1), hamlib(7)
COLOPHON
Links to the
Hamlib Wiki, Git repository, release archives, and daily
snapshot archives are available via
hamlib.org.
================================================
FILE: software/hamlib-w64-4.5~git/doc/rotctl.1.html
================================================
ROTCTL
ROTCTL
NAME
SYNOPSIS
DESCRIPTION
OPTIONS
COMMANDS
READLINE
DIAGNOSTICS
EXIT STATUS
EXAMPLES
BUGS
COPYING
SEE ALSO
COLOPHON
NAME
rotctl -
control antenna rotators
SYNOPSIS
|
rotctl |
|
[-hiIlLuV]
[-m id] [-r device]
[-R device2] [-s baud]
[-t char]
[-C parm=val] [-v[-Z]]
[command|-] |
DESCRIPTION
Control antenna
rotators.
rotctl
accepts commands from the command line as well as in
interactive mode if none are provided on the command
line.
Keep in mind
that Hamlib is BETA level software. While a lot of backend
libraries lack complete rotator support, the basic functions
are usually well supported.
Please report
bugs and provide feedback at the e-mail address given in the
BUGS section below. Patches and code enhancements
sent to the same address are welcome.
OPTIONS
This program
follows the usual GNU command line syntax. Short options
that take an argument may have the value follow immediately
or be separated by a space. Long options starting with two
dashes (’-’) require an ’=’ between
the option and any argument.
Here is a
summary of the supported options:
-m, --model=id
Select rotator model
number.
See model list
(use “rotctl -l”).
Note:
rotctl (or third party software using the C API) will
use rotator model 2 for NET rotctl (communicating
with rotctld).
-r,
--rot-file=device
Use device as the file
name of the port connected to the rotator.
Often a serial
port, but could be a USB to serial adapter. Typically
/dev/ttyS0, /dev/ttyS1, /dev/ttyUSB0,
etc. on Linux, COM1, COM2, etc. on MS Windows.
The BSD flavors and Mac OS/X have their own designations.
See your system’s documentation.
-R,
--rot-file2=device
Use device as the file
name of the port connected to the 2nd rotator. e.g. 2nd
rotator used for elevation.
Often a serial
port, but could be a USB to serial adapter. Typically
/dev/ttyS0, /dev/ttyS1, /dev/ttyUSB0,
etc. on Linux, COM1, COM2, etc. on MS Windows.
The BSD flavors and Mac OS/X have their own designations.
See your system’s documentation.
-s,
--serial-speed=baud
Set serial speed to baud
rate.
Uses maximum
serial speed from rotator backend capabilities as the
default.
-t,
--send-cmd-term=char
Change the termination
char for text protocol when using the send_cmd
command.
The default
value is ASCII CR (’0x0D’). ASCII non-printing
characters can be given as the ASCII number in hexadecimal
format prepended with “0x”. You may pass an
empty string for no termination char. The string
“-1” tells rotctl to switch to binary
protocol. See the send_cmd command for further
explanation.
Note:
The semicolon (’;’) is a common terminator for
rotators that accept ASCII character strings.
-L,
--show-conf
List all configuration
parameters for the rotator defined with -m above.
-C,
--set-conf=parm=val[,parm=val]
Set rotator configuration
parameter(s), e.g. stop_bits=2.
Use the
-L option above for a list of configuration
parameters for a given model number.
-u,
--dump-caps
Dump capabilities for the
rotator defined with -m above and exit.
-l, --list
List all rotator model numbers
defined in Hamlib and exit.
The list is
sorted by model number.
Note: In
Linux the list can be scrolled back using
Shift-PageUp/Shift-PageDown, or using the
scrollbars of a virtual terminal in X or the cmd window in
Windows. The output can be piped to more(1) or
less(1), e.g. “rotctl -l | more”.
-i,
--read-history
Read previously saved command
and argument history from a file (default
$HOME/.rotctl_history) for the current session.
Available when
rotctl is built with Readline support (see
READLINE below).
Note: To
read a history file stored in another directory, set the
ROTCTL_HIST_DIR environment variable, e.g.
“ROTCTL_HIST_DIR=$HOME/tmp rotctl -i”. When
ROTCTL_HIST_DIR is not set, the value of HOME is
used.
-I,
--save-history
Write current session (and any
previous session(s), if -i option is also given)
command and argument history to a file (default
$HOME/.rotctl_history) at the end of the current
session.
Complete
commands with arguments are saved as a single line to be
recalled and used or edited. Available when rotctl is
built with Readline support (see READLINE below).
Note: To
write a history file in another directory, set the
ROTCTL_HIST_DIR environment variable, e.g.
“ROTCTL_HIST_DIR=$HOME/tmp rotctl -I”. When
ROTCTL_HIST_DIR is not set, the value of HOME is
used.
-v, --verbose
Set verbose mode, cumulative
(see DIAGNOSTICS below).
-Z,
--debug-time-stamps
Enable time stamps for the
debug messages.
Use only in
combination with the -v option as it generates no
output on its own.
-h, --help
Show a summary of these options
and exit.
-V, --version
Show version of rotctl
and exit.
|
- |
|
Stop option processing and read commands from standard
input. |
See Standard
Input below.
Note:
Some options may not be implemented by a given backend and
will return an error. This is most likely to occur with the
--set-conf and --show-conf options.
Be aware that
the backend for the rotator to be controlled, or the rotator
itself may not support some commands. In that case, the
operation will fail with a Hamlib error code.
COMMANDS
Commands can be
entered either as a single char, or as a long command name.
The commands are not prefixed with a dash as the options
are. They may be typed in when in interactive mode or
provided as argument(s) in command line interface mode. In
interactive mode commands and their arguments may be entered
on a single line (typed text shown in bold):
P 123
45
Since most of
the Hamlib operations have a set and a
get method, an upper case letter will often be used
for a set method whereas the corresponding lower case
letter refers to the get method. Each operation also
has a long name; in interactive mode, prepend a backslash,
’\’, to enter a long command name.
Example: Use
“\get_info” in interactive mode to see the
rotator’s information.
Note:
The backend for the rotator to be controlled, or the rotator
itself may not support some commands. In that case, the
operation will fail with a Hamlib error message.
Standard
Input
As an alternative to the READLINE interactive command
entry or a single command for each run, rotctl
features a special option where a single dash
(’-’) may be used to read commands from standard
input (stdin). Commands must be separated by
whitespace similar to the commands given on the command
line. Comments may be added using the ’#’
character, all text up until the end of the current line
including the ’#’ character is ignored.
A simple
example:
$ cat
<<.EOF. >cmds.txt
> # File of commands
|
> set_pos 180.0 10.0 |
|
|
# rotate |
> pause 30 # wait for
action to complete
> get_pos # query rotator
>.EOF.
$ rotctl -m
1 - <cmds.txt
set_pos 180.0
10.0
pause 30
get_pos 180.000000
10.000000
$
Rotator
Commands
A summary of commands is included below (In the case of
set commands the quoted italicized string is replaced
by the value in the description. In the case of get
commands the quoted italicized string is the key name of the
value returned.):
Q|q, exit rotctl
Exit rotctl in interactive
mode.
When rotctl is
controlling the rotator directly, will close the rotator
backend and port. When rotctl is connected to rotctld
(rotator model 2), the TCP/IP connection to rotctld is
closed and rotctld remains running, available for another
TCP/IP network connection.
P, set_pos
'Azimuth' 'Elevation'
Set position.
'Azimuth'
and 'Elevation' are floating point values.
Azimuth can be
-180 to 540 depending on the rotator to allow for rotators
facing south and the capabilities of the rotator.
Elevation can
be -20 to 210 depending on the rotator.
For
example:
P 163.0
41.0
Note: If
the rotator does not support setting elevation (most do not)
supply “0.0” for 'Elevation'.
p, get_pos
Get position.
'Azimuth'
and 'Elevation' are returned as double precision
floating point values.
M, move
'Direction' 'Speed'
Move the rotator in a specific
direction at the given rate.
'Direction'
is an integer or keyword defined as ’2’ = UP,
’4’ = DOWN, ’8’ = LEFT or CCW and
’16’ = RIGHT or CW
'Speed'
is an integer between 1 and 100. Use -1 for no change to
current speed.
Note:
Not all backends that implement the move command use the
Speed value.
S, stop
Stop the rotator.
K, park
Park the rotator.
C, set_conf
'Token' 'Value'
Set a configuration
parameter.
'Token'
is a string; see the -C option and the -L
output.
'Value'
is a string of up to 20 characters.
R, reset
'Reset'
Reset the rotator.
'Reset'
accepts an integer value of ’1’ for “Reset
All”.
_, get_info
Get miscellaneous information
about the rotator.
Returns
'Info' “Model Name” at present.
dump_state
Return certain state
information about the rotator backend.
1, dump_caps
Not a real rot remote command,
it just dumps capabilities, i.e. what the backend knows
about this model, and what it can do.
w, send_cmd
'Cmd'
Send a raw command string to
the rotator.
ASCII CR (or
--send-cmd-term value, see -t option) is
appended automatically at the end of the command for text
protocols. For binary protocols, enter hexadecimal values as
“\0xAA\0xBB”.
Locator
Commands
These commands offer conversions of Degrees Minutes Seconds
to other formats, Maidenhead square locator
conversions and distance and azimuth conversions.
L, lonlat2loc 'Longitude'
'Latitude' 'Loc Len'
Returns the Maidenhead
'Locator' for the given 'Longitude' and
'Latitude'.
Floating point
values are supplied. The precision of the returned square is
controlled by 'Loc Len' which should be an even
numbered integer value between 2 and 12.
For
example:
L -170.0
-85.0 12
returns:
Locator:
AA55AA00AA00
l, loc2lonlat
'Locator'
Returns 'Longitude' and
'Latitude' in decimal degrees at the approximate
center of the requested Maidenhead grid square.
'Locator'
can be from 2 to 12 characters in length.
West longitude
is expressed as a negative value.
South latitude
is expressed as a negative value.
For
example:
l
AA55AA00AA00
returns:
Longitude:
-169.999983 Latitude: -84.999991
Note:
Despite the use of double precision variables internally,
some rounding error occurs.
D, dms2dec
'Degrees' 'Minutes' 'Seconds'
'S/W'
Returns 'Dec Degrees', a
signed floating point value.
'Degrees'
and 'Minutes' are integer values.
'Seconds'
is a floating point value.
'S/W' is
a flag with ’1’ indicating South latitude or
West longitude and ’0’ North or East (the flag
is needed as computers don’t recognize a signed zero
even though only the 'Degrees' value is typically
signed in DMS notation).
d, dec2dms
'Dec Degrees'
Returns 'Degrees'
'Minutes' 'Seconds' 'S/W'.
Values are as
in dms2dec above.
E, dmmm2dec
'Degrees' 'Dec Minutes' 'S/W'
Returns 'Dec Degrees', a
signed floating point value.
'Degrees'
is an integer value.
'Dec
Minutes' is a floating point value.
'S/W' is
a flag as in dms2dec above.
e, dec2dmmm
'Dec Deg'
Returns 'Degrees'
'Minutes' 'S/W'.
Values are as
in dmmm2dec above.
B, qrb 'Lon
1' 'Lat 1' 'Lon 2' 'Lat 2'
Returns 'Distance' and
'Azimuth'.
'Distance'
is in km.
'Azimuth'
is in degrees.
Supplied
Lon/Lat values are signed floating point
numbers.
A, a_sp2a_lp
'Short Path Deg'
Returns 'Long Path
Deg'.
Both the
supplied argument and returned value are floating point
values within the range of 0.00 to 360.00.
Note:
Supplying a negative value will return an error message.
a, d_sp2d_lp
'Short Path km'
Returns 'Long Path
km'.
Both the
supplied argument and returned value are floating point
values.
pause
'Seconds'
Pause for the given whole
(integer) number of 'Seconds' before sending the next
command to the rotator.
READLINE
If
Readline library development files are found at
configure time, rotctl will be conditonally built
with Readline support for command and argument entry.
Readline command key bindings are at their defaults as
described in the
Readline
manual. rotctl sets the name “rotctl”
which can be used in Conditional Init Constructs in the
Readline Init File ($HOME/.inputrc by default) for
custom keybindings unique to rotctl.
Command history
is available with Readline support as described in the
Readline
History manual. Command and argument strings are stored
as single lines even when arguments are prompted for input
individually. Commands and arguments are not validated and
are stored as typed with values separated by a single
space.
Normally
session history is not saved, however, use of either of the
-i/--read-history or
-I/--save-history options when starting
rotctl will cause any previously saved history to be
read in and/or the current and any previous session history
(assuming the -i and -I options are given
together) will be written out when rotctl is closed.
Each option is mutually exclusive, i.e. either may be given
separately or in combination. This is useful to save a set
of commands and then read them later but not write the
modified history for a consistent set of test commands in
interactive mode, for example.
History is
stored in $HOME/.rotctl_history by default although
the destination directory may be changed by setting the
ROTCTL_HIST_DIR environment variable. When
ROTCTL_HIST_DIR is unset, the value of the HOME
environment variable is used instead. Only the destination
directory may be changed at this time.
If Readline
support is not found at configure time the original internal
command handler is used. Readline is not used for
rotctl commands entered on the command line
regardless if Readline support is built in or not.
Note:
Readline support is not included in the MS Windows 32 or 64
bit binary builds supplied by the Hamlib Project. Running
rotctl on the MS Windows platform in the
’cmd’ shell does give session command line
history, however, it is not saved to disk between
sessions.
DIAGNOSTICS
The -v,
--verbose option allows different levels of
diagnostics to be output to stderr and correspond to
-v for BUG, -vv for ERR, -vvv for WARN,
-vvvv for VERBOSE, or -vvvvv for TRACE.
A given verbose
level is useful for providing needed debugging information
to the email address below. For example, TRACE output shows
all of the values sent to and received from the radio which
is very useful for radio backend library development and may
be requested by the developers.
EXIT STATUS
rotctl
exits with:
|
0 |
|
if all operations completed normally; |
|
1 |
|
if there was an invalid command line option or
argument; |
|
2 |
|
if an error was returned by Hamlib. |
EXAMPLES
Start
rotctl for RotorEZ using the first serial port on
Linux:
$ rotctl -m
401 -r /dev/ttyS0
Start
rotctl for RotorEZ using COM2 on MS Windows:
> rotctl
-m 401 -r COM2
Connect to a
running rotctld with rotator model 2 (“NET
rotctl”) on the local host and specifying the TCP
port, and querying the position:
$ rotctl -m
2 -r localhost:4533 t_pos
BUGS
Report bugs
to:
Hamlib
Developer mailing list
COPYING
This file is
part of Hamlib, a project to develop a library that
simplifies radio, rotator, and amplifier control functions
for developers of software primarily of interest to radio
amateurs and those interested in radio communications.
Copyright
© 2001-2011 Stephane Fillod
Copyright © 2002-2017 the Hamlib Group (various
contributors)
Copyright © 2003-2020 Nate Bargmann
This is free
software; see the file COPYING for copying conditions. There
is NO warranty; not even for MERCHANTABILITY or FITNESS FOR
A PARTICULAR PURPOSE.
SEE ALSO
less(1),
more(1), rotctld(1), hamlib(7)
COLOPHON
Links to the
Hamlib Wiki, Git repository, release archives, and daily
snapshot archives are available via
hamlib.org.
================================================
FILE: software/hamlib-w64-4.5~git/doc/rotctld.1.html
================================================
ROTCTLD
ROTCTLD
NAME
SYNOPSIS
DESCRIPTION
OPTIONS
COMMANDS
PROTOCOL
DIAGNOSTICS
EXAMPLES
SECURITY
BUGS
COPYING
SEE ALSO
COLOPHON
NAME
rotctld - TCP
rotator control daemon
SYNOPSIS
|
rotctld |
|
[-hlLuV]
[-m id] [-r device]
[-s baud] [-T IPADDR]
[-t number]
[-C parm=val] [-v[-Z]] |
DESCRIPTION
The
rotctld program is a rotator control daemon that
handles client requests via TCP sockets. This allows
multiple user programs to share one rotator (this needs more
development). Multiple rotators can be controlled on
different TCP ports by use of multiple rotctld
processes. The syntax of the commands are the same as
rotctl(1). It is hoped that rotctld will be
especially useful for client authors using languages such as
Perl, Python, PHP, and others.
rotctld
communicates to a client through a TCP socket using text
commands shared with rotctl. The protocol is simple,
commands are sent to rotctld on one line and
rotctld responds to “get” commands with
the requested values, one per line, when successful,
otherwise, it responds with one line “RPRT x”,
where ’x’ is a negative number indicating the
error code. Commands that do not return values respond with
the line “RPRT x”, where ’x’ is
’0’ when successful, otherwise is a regative
number indicating the error code. Each line is terminated
with a newline ’\n’ character. This protocol is
primarily for use by the NET rotctl (rotator model 2)
backend.
A separate
Extended Response Protocol extends the above behavior
by echoing the received command string as a header, any
returned values as a key: value pair, and the “RPRT
x” string as the end of response marker which includes
the Hamlib success or failure value. See the
PROTOCOL section for details. Consider using this
protocol for clients that will interact with rotctld
directly through a TCP socket.
Keep in mind
that Hamlib is BETA level software. While a lot of backend
libraries lack complete rotator support, the basic functions
are usually well supported.
Please report
bugs and provide feedback at the e-mail address given in the
BUGS section below. Patches and code enhancements
sent to the same address are welcome.
OPTIONS
This program
follows the usual GNU command line syntax. Short options
that take an argument may have the value follow immediately
or be separated by a space. Long options starting with two
dashes (’-’) require an ’=’ between
the option and any argument.
Here is a
summary of the supported options:
-m, --model=id
Select rotator model
number.
See model list
(use “rotctld -l”).
Note:
rotctl (or third party software using the C API) will
use rotator model 2 for NET rotctl (this model number
is not used for rotctld even though it shows in the model
list).
-r,
--rot-file=device
Use device as the file
name of the port connected to the rotator.
Often a serial
port, but could be a USB to serial adapter. Typically
/dev/ttyS0, /dev/ttyS1, /dev/ttyUSB0,
etc. on Linux, COM1, COM2, etc. on MS Windows.
The BSD flavors and Mac OS/X have their own designations.
See your system’s documentation.
-s,
--serial-speed=baud
Set serial speed to baud
rate.
Uses maximum
serial speed from rotator backend capabilities as the
default.
-T,
--listen-addr=IPADDR
Use IPADDR as the
listening IP address.
The default is
ANY.
-t,
--port=number
Use number as the TCP
listening port.
The default is
4533.
Note: As
rigctld's default port is 4532, it is advisable to
use odd numbered ports for rotctld, e.g. 4533, 4535,
4537, etc.
-L,
--show-conf
List all configuration
parameters for the rotator defined with -m above.
-C,
--set-conf=parm=val[,parm=val]
Set rotator configuration
parameter(s), e.g. stop_bits=2.
Use the
-L option above for a list of configuration
parameters for a given model number.
-u,
--dump-state
Dump state for the rotator
defined with -m above and exit.
-u,
--dump-caps
Dump capabilities for the
rotator defined with -m above and exit.
-l, --list
List all rotator model numbers
defined in Hamlib and exit.
The list is
sorted by model number.
Note: In
Linux the list can be scrolled back using
Shift-PageUp/Shift-PageDown, or using the
scrollbars of a virtual terminal in X or the cmd window in
Windows. The output can be piped to more(1) or
less(1), e.g. “rotctl -l | more”.
-v, --verbose
Set verbose mode, cumulative
(see DIAGNOSTICS below).
-Z,
--debug-time-stamps
Enable time stamps for the
debug messages.
Use only in
combination with the -v option as it generates no
output on its own.
-h, --help
Show a summary of these options
and exit.
-V, --version
Show version of rotctld
and exit.
Note:
Some options may not be implemented by a given backend and
will return an error. This is most likely to occur with the
--set-conf and --show-conf options.
Be aware that
the backend for the rotator to be controlled, or the rotator
itself may not support some commands. In that case, the
operation will fail with a Hamlib error code.
COMMANDS
Commands can be
sent over the TCP socket either as a single char, or as a
long command name plus the value(s) space separated on one
’\n’ terminated line. See PROTOCOL.
Since most of
the Hamlib operations have a set and a
get method, an upper case letter will be used for
set methods whereas the corresponding lower case
letter refers to the get method. Each operation also
has a long name; prepend a backslash, ’\’, to
send a long command name.
Example (Perl):
“print $socket "\\dump_caps\n";” to
see what the rotator’s backend can do (Note: In
Perl and many other languages a ’\’ will need to
be escaped with a preceding ’\’ so that even
though two backslash characters appear in the code, only one
will be passed to rotctld. This is a possible bug,
beware!).
Note:
The backend for the rotator to be controlled, or the rotator
itself may not support some commands. In that case, the
operation will fail with a Hamlib error message.
Here is a
summary of the supported commands (In the case of set
commands the quoted italicized string is replaced by the
value in the description. In the case of get commands
the quoted italicized string is the key name of the value
returned.):
P, set_pos 'Azimuth'
'Elevation'
Set position.
'Azimuth'
and 'Elevation' are floating point values.
For example
(typed text shown in bold):
P 163.0
41.0
Note: If
the rotator does not support setting elevation (most do not)
supply “0.0” for 'Elevation'.
p, get_pos
Get position.
'Azimuth'
and 'Elevation' are returned as double precision
floating point values.
M, move
'Direction' 'Speed'
Move the rotator in a specific
direction at the given rate.
'Direction'
is an integer defined as ’2’ = Up,
’4’ = Down, ’8’ = Left, and
’16’ = Right.
'Speed'
is an integer between 1 and 100. Use -1 for no change to
current speed.
Note:
Not all backends that implement the move command use the
Speed value.
S, stop
Stop the rotator.
K, park
Park the rotator.
C, set_conf
'Token' 'Value'
Set a configuration
parameter.
'Token'
is a string; see the -C option and the -L
output.
'Value'
is a string of up to 20 characters.
R, reset
'Reset'
Reset the rotator.
'Reset'
accepts an integer value of ’1’ for “Reset
All”.
_, get_info
Get misc information about the
rotator.
Returns
'Info' “Model Name”.
dump_state
Return certain state
information about the rotator backend.
1, dump_caps
Not a real rot remote command,
it just dumps capabilities, i.e. what the backend knows
about this model, and what it can do.
w, send_cmd
'Cmd'
Send a raw command string to
the rotator.
ASCII CR is
appended automatically at the end of the command for text
protocols. For binary protocols, enter hexadecimal values as
“\0xAA\0xBB”.
Locator
Commands
These commands offer conversions of Degrees Minutes Seconds
to other formats, Maidenhead square locator
conversions and distance and azimuth conversions.
L, lonlat2loc 'Longitude'
'Latitude' 'Loc Len'
Returns the Maidenhead
'Locator' for the given 'Longitude' and
'Latitude'.
'Longitude'
and 'Latitude' are floating point values.
'Loc
Len' is the precision of the returned square and should
be an even numbered integer value between 2 and 12.
For
example:
L -170.0
-85.0 12
returns:
Locator:
AA55AA00AA00
l, loc2lonlat
'Locator'
Returns 'Longitude' and
'Latitude' in decimal degrees at the approximate
center of the requested Maidenhead grid square.
'Locator'
can be from 2 to 12 characters in length.
West longitude
is expressed as a negative value.
South latitude
is expressed as a negative value.
For
example:
l
AA55AA00AA00
returns:
Longitude:
-169.999983 Latitude: -84.999991
Note:
Despite the use of double precision variables internally,
some rounding error occurs.
D, dms2dec
'Degrees' 'Minutes' 'Seconds'
'S/W'
Returns 'Dec Degrees', a
signed floating point value.
'Degrees'
and 'Minutes' are integer values.
'Seconds'
is a floating point value.
'S/W' is
a flag with ’1’ indicating South latitude or
West longitude and ’0’ North or East (the flag
is needed as computers don’t recognize a signed zero
even though only the 'Degrees' value is typically
signed in DMS notation).
d, dec2dms
'Dec Degrees'
Returns 'Degrees'
'Minutes' 'Seconds' 'S/W'.
Values are as
in dms2dec above.
E, dmmm2dec
'Degrees' 'Dec Minutes' 'S/W'
Returns 'Dec Degrees', a
signed floating point value.
'Degrees'
is an integer value.
'Dec
Minutes' is a floating point value.
'S/W' is
a flag as in dms2dec above.
e, dec2dmmm
'Dec Deg'
Returns 'Degrees'
'Minutes' 'S/W'.
Values are as
in dmmm2dec above.
B, qrb 'Lon
1' 'Lat 1' 'Lon 2' 'Lat 2'
Returns 'Distance' and
'Azimuth'.
'Distance'
is in km.
'Azimuth'
is in degrees.
Supplied
Lon/Lat values are signed floating point
numbers.
A, a_sp2a_lp
'Short Path Deg'
Returns 'Long Path
Deg'.
Both the
supplied argument and returned value are floating point
values within the range of 0.00 to 360.00.
Note:
Supplying a negative value will return an error message.
a, d_sp2d_lp
'Short Path km'
Returns 'Long Path
km'.
Both the
supplied argument and returned value are floating point
values.
pause
'Seconds'
Pause for the given whole
(integer) number of 'Seconds' before sending the next
command to the rotator.
PROTOCOL
There are two
protocols in use by rotctld, the Default
Protocol and the Extended Response Protocol.
The Default
Protocol is intended primarily for the communication
between Hamlib library functions and rotctld
(“NET rotctl”, available using rotator model
’2’).
The Extended
Response Protocol is intended to be used with scripts or
other programs interacting directly with rotctld as
consistent feedback is provided.
Default
Protocol
The Default Protocol is intentionally simple.
Commands are entered on a single line with any needed
values. In practice, reliable results are obtained by
terminating each command string with a newline character,
’\n’.
Example set
position (Perl code):
print
$socket "P 135 10\n";
or:
print
$socket "\\set_pos 135 10\n"; # escape leading
’\’
A one line
response will be sent as a reply to set commands,
“RPRT x\n” where x is the Hamlib
error code with ’0’ indicating success of the
command.
Responses from
rotctld get commands are text values and match the
same tokens used in the set commands. Each value is
returned on its own line. On error the string “RPRT
x\n” is returned where x is the Hamlib
error code.
Example get
position (Perl code):
print
$socket "p\n";
"135"
"10"
Most get
functions return one to three values. A notable exception is
the dump_caps command which returns many lines of
key:value pairs.
This protocol
is primarily used by the “NET rotctl” (rotctl
model 2) backend which allows applications already written
for Hamlib’s C API to take advantage of rotctld
without the need of rewriting application code. An
application’s user can select rotator model 2
(“NET rotctl”) and then set rot_pathname
to “localhost:4533” or other network
host:port (set by the -T/-t
options, respectively, above).
Extended
Response Protocol
The Extended Response protocol adds several rules to the
strings returned by rotctld and adds a rule for the
command syntax.
1. The command
received by rotctld is echoed with its long command
name followed by the value(s) (if any) received from the
client terminated by the specified response separator as the
first record of the response.
2. The last
record of each block is the string “RPRT
x\n” where x is the numeric return value
of the Hamlib backend function that was called by the
command.
3. Any records
consisting of data values returned by the rotator backend
are prepended by a string immediately followed by a colon
then a space and then the value terminated by the response
separator, e.g. “Azimuth: 90.000000\n” when the
command was prepended by ’+’.
4. All commands
received will be acknowledged by rotctld with records
from rules 1 and 2. Records from rule 3 are only returned
when data values must be returned to the client.
An example
response to a P command sent from the shell prompt
(note the prepended ’+’):
$ echo
"+P 90 45" | nc -w 1 localhost 4533
set_pos: 90 45
RPRT 0
In this case
the long command name and values are returned on the first
line and the second line contains the end of block marker
and the numeric rotor backend return value indicating
success.
An example
response to a get_pos query:
$ echo
"+\get_pos" | nc -w 1 localhost 4533
get_pos:
Azimuth: 90.000000
Elevation: 45.000000
RPRT 0
Note:
The ’\’ is still required for the long command
name even with the ERP character.
In this case,
as no value is passed to rotctld, the first line
consists only of the long command name. The final line shows
that the command was processed successfully by the rotor
backend.
Invoking the
Extended Response Protocol requires prepending a command
with a punctuation character. As shown in the examples
above, prepending a ’+’ character to the command
results in the responses being separated by a newline
character (’\n’). Any other punctuation
character recognized by the C ispunct() function
except ’\’, ’?’, or ’_’
will cause that character to become the response separator
and the entire response will be on one line.
Separator
character summary:
|
’+’ |
|
Each record of the response is appended with a newline
(’\n’). |
’;’,
’|’, or, ’,’
Each record of the response is
appended by the given character resulting in entire response
on one line.
These are
common record separators for text representations of
spreadsheet data, etc.
|
’?’ |
|
Reserved for help in rotctl. |
|
’_’ |
|
Reserved for get_info short command |
|
’#’ |
|
Reserved for comments when reading a command file
script. |
Note:
Other punctuation characters have not been tested! Use at
your own risk.
For example,
invoking a get_pos query with a leading
’;’ returns:
get_pos:;Azimuth:
90.000000;Elevation: 45.000000;RPRT 0
Or, using the
pipe character ’|’ returns:
get_pos:|Azimuth:
90.000000|Elevation: 45.000000|RPRT 0
And a
set_pos command prepended with a ’|’
returns:
set_pos: 135
22.5|RPRT 0
Such a format
will allow reading a response as a single event using a
preferred response separator. Other punctuation characters
have not been tested!
All commands
with the exception of set_conf have been tested with
the Extended Response protocol and the included
testrotctld.pl Perl script.
DIAGNOSTICS
The -v,
--verbose option allows different levels of
diagnostics to be output to stderr and correspond to
-v for BUG, -vv for ERR, -vvv for WARN,
-vvvv for VERBOSE, or -vvvvv for TRACE.
A given verbose
level is useful for providing needed debugging information
to the email address below. For example, TRACE output shows
all of the values sent to and received from the radio which
is very useful for radio backend library development and may
be requested by the developers.
EXAMPLES
Start
rotctld for a Hy-Gain Ham IV rotor with the Idiom
Press RotorEZ board installed using a USB-to-serial adapter
and backgrounding:
$ rotctld -m
401 -r /dev/ttyUSB1 &
Start
rotctld for RotorEZ using COM2 on Win32:
> rotctl
-m 401 -r COM2
Connect to the
already running rotctld, and set position to 135.0
degrees azimuth and 30.0 degrees elevation with a 1 second
read timeout from the shell prompt:
$ echo
"\set_pos 135.0 30.0" | nc -w 1 localhost
4533
Connect to a
running rotctld with rotctl on the local
host:
$ rotctl -m
2
SECURITY
No
authentication whatsoever; DO NOT leave this TCP port open
wide to the Internet. Please ask if stronger security is
needed or consider using a Secure Shell (ssh(1))
tunnel.
As
rotctld does not need any greater permissions than
rotctl, it is advisable to not start rotctld
as “root” or another system user account in
order to limit any vulnerability.
BUGS
The daemon is
not detaching and backgrounding itself.
No method to
exit the daemon so the kill(1) command must be used
to terminate it.
Multiple
clients using the daemon may experience contention with the
connected rotator.
Report bugs
to:
Hamlib
Developer mailing list
COPYING
This file is
part of Hamlib, a project to develop a library that
simplifies radio, rotator, and amplifier control functions
for developers of software primarily of interest to radio
amateurs and those interested in radio communications.
Copyright
© 2000-2009 Stephane Fillod
Copyright © 2000-2018 the Hamlib Group (various
contributors)
Copyright © 2011-2020 Nate Bargmann
This is free
software; see the file COPYING for copying conditions. There
is NO warranty; not even for MERCHANTABILITY or FITNESS FOR
A PARTICULAR PURPOSE.
SEE ALSO
kill(1),
rotctl(1), ssh(1), hamlib(7)
COLOPHON
Links to the
Hamlib Wiki, Git repository, release archives, and daily
snapshot archives are available via
hamlib.org.
================================================
FILE: software/hamlib-w64-4.5~git/include/hamlib/amplifier.h
================================================
/*
* Hamlib Interface - Amplifier API header
* Copyright (c) 2000-2005 by Stephane Fillod
*
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
*/
#ifndef _AMPLIFIER_H
#define _AMPLIFIER_H 1
#include
#include
/**
* \addtogroup amplifier
* @{
*/
/**
* \brief Hamlib amplifier data structures.
*
* \file amplifier.h
*
* This file contains the data structures and declarations for the Hamlib
* amplifier Application Programming Interface (API).
*
* See the amplifier.c file for details on the amplifier API functions.
*/
__BEGIN_DECLS
/* Forward struct references */
struct amp;
struct amp_state;
/**
* \brief Main amplifier handle type definition.
*
* \typedef typedef struct amp AMP
*
* The #AMP handle is returned by amp_init() and is passed as a parameter to
* every amplifier specific API call.
*
* amp_cleanup() must be called when this handle is no longer needed.
*/
typedef struct amp AMP;
/**
* \brief Type definition for
* SWR (Standing Wave Ratio).
*
* \typedef typedef float swr_t
*
* The \a swr_t type is used as a parameter for the amp_get_swr() function.
*
* The unit of \a swr_t is 1.0 to the maximum value reported by the amplifier's
* internal antenna system tuner, i.e.
* transmatch,
* representing the ratio of 1.0:1 to Maximum:1.
*/
typedef float swr_t;
/**
* \brief Type definition for the
* transmatch
* tuning values of
* capacitance
* and
* inductance.
*
* \typedef typedef float tune_value_t
*
* The \a tune_value_t type is used as a parameter for amp_get_level().
*
* The unit of \a tune_value_t is
* picoFarads (pF)
* or
* nanoHenrys (nH).
*/
typedef int tune_value_t;
/**
* \brief The token in the netampctl protocol for returning an error condition code.
*/
#define NETAMPCTL_RET "RPRT "
//! @cond Doxygen_Suppress
typedef enum
{
AMP_RESET_MEM, // erase tuner memory
AMP_RESET_FAULT, // reset any fault
AMP_RESET_AMP // for kpa1500
} amp_reset_t;
//! @endcond
/**
* \brief Amplifier type flags
*/
typedef enum
{
AMP_FLAG_1 = (1 << 1), /*!< TBD */
AMP_FLAG_2 = (1 << 2) /*!< TBD */
} amp_type_t;
//! @cond Doxygen_Suppress
// TBD AMP_TYPE
#define AMP_TYPE_MASK (AMP_FLAG_1|AMP_FLAG_2)
#define AMP_TYPE_OTHER 0
#define AMP_TYPE_1 AMP_FLAG_1
#define AMP_TYPE_2 AMP_FLAG_2
#define AMP_TYPE_ALL (AMP_FLAG_1|AMP_FLAG_2)
//! @endcond
//! @cond Doxygen_Suppress
enum amp_level_e
{
AMP_LEVEL_NONE = 0, /*!< '' -- No Level. */
AMP_LEVEL_SWR = (1 << 0), /*!< \c SWR 1.0 or greater. */
AMP_LEVEL_NH = (1 << 1), /*!< \c Tune setting in nanohenries. */
AMP_LEVEL_PF = (1 << 2), /*!< \c Tune setting in picofarads. */
AMP_LEVEL_PWR_INPUT = (1 << 3), /*!< \c Power reading from amplifier. */
AMP_LEVEL_PWR_FWD = (1 << 4), /*!< \c Power reading forward. */
AMP_LEVEL_PWR_REFLECTED = (1 << 5), /*!< \c Power reading reverse. */
AMP_LEVEL_PWR_PEAK = (1 << 6), /*!< \c Power reading peak. */
AMP_LEVEL_FAULT = (1 << 7) /*!< \c Fault code. */
};
//! @endcond
//! @cond Doxygen_Suppress
#define AMP_LEVEL_FLOAT_LIST (AMP_LEVEL_SWR)
#define AMP_LEVEL_STRING_LIST (AMP_LEVEL_FAULT)
#define AMP_LEVEL_IS_FLOAT(l) ((l)&_LEVEL_FLOAT_LIST)
#define AMP_LEVEL_IS_STRING(l) ((l)&_LEVEL_STRING_LIST)
//! @endcond
/* Basic amp type, can store some useful info about different amplifiers. Each
* lib must be able to populate this structure, so we can make useful
* enquiries about capabilities.
*/
//! @cond Doxygen_Suppress
#define AMP_MODEL(arg) .amp_model=arg,.macro_name=#arg
//! @endcond
/**
* \brief Amplifier capabilities.
*
* \struct amp_caps
*
* The main idea of this struct is that it will be defined by the backend
* amplifier driver and will remain read-only for the application. Fields
* that need to be modifiable by the application are copied into the
* amp_state structure, which is the private memory area of the #AMP instance.
*
* This way you can have several amplifiers running within the same
* application, sharing the amp_caps structure of the backend, while keeping
* their own customized data.
*
* \b Note: Don't move fields around and only add new fields at the end of the
* amp_caps structure. Shared libraries and DLLs depend on a constant
* structure to maintain compatibility.
*/
struct amp_caps
{
amp_model_t amp_model; /*!< Amplifier model as defined in amplist.h. */
const char *model_name; /*!< Model name, e.g. MM-5k. */
const char *mfg_name; /*!< Manufacturer, e.g. Moonbeam. */
const char *version; /*!< Driver version, typically in YYYYMMDD.x format. */
const char *copyright; /*!< Copyright info (should be LGPL). */
enum rig_status_e status; /*!< Driver status. */
int amp_type; /*!< Amplifier type. */
enum rig_port_e port_type; /*!< Type of communication port (serial, ethernet, etc.). */
int serial_rate_min; /*!< Minimal serial speed. */
int serial_rate_max; /*!< Maximal serial speed. */
int serial_data_bits; /*!< Number of data bits. */
int serial_stop_bits; /*!< Number of stop bits. */
enum serial_parity_e serial_parity; /*!< Parity. */
enum serial_handshake_e serial_handshake; /*!< Handshake. */
int write_delay; /*!< Write delay. */
int post_write_delay; /*!< Post-write delay. */
int timeout; /*!< Timeout. */
int retry; /*!< Number of retries if a command fails. */
const struct confparams *cfgparams; /*!< Configuration parameters. */
const rig_ptr_t priv; /*!< Private data. */
const char *amp_model_macro_name; /*!< Model macro name. */
setting_t has_get_level; /*!< List of get levels. */
setting_t has_set_level; /*!< List of set levels. */
gran_t level_gran[RIG_SETTING_MAX]; /*!< Level granularity. */
gran_t parm_gran[RIG_SETTING_MAX]; /*!< Parameter granularity. */
/*
* Amp Admin API
*
*/
int (*amp_init)(AMP *amp); /*!< Pointer to backend implementation of ::amp_init(). */
int (*amp_cleanup)(AMP *amp); /*!< Pointer to backend implementation of ::amp_cleanup(). */
int (*amp_open)(AMP *amp); /*!< Pointer to backend implementation of ::amp_open(). */
int (*amp_close)(AMP *amp); /*!< Pointer to backend implementation of ::amp_close(). */
int (*set_freq)(AMP *amp, freq_t val); /*!< Pointer to backend implementation of ::amp_set_freq(). */
int (*get_freq)(AMP *amp, freq_t *val); /*!< Pointer to backend implementation of ::amp_get_freq(). */
int (*set_conf)(AMP *amp, token_t token, const char *val); /*!< Pointer to backend implementation of ::amp_set_conf(). */
int (*get_conf2)(AMP *amp, token_t token, char *val, int val_len); /*!< Pointer to backend implementation of ::amp_get_conf(). */
int (*get_conf)(AMP *amp, token_t token, char *val); /*!< Pointer to backend implementation of ::amp_get_conf(). */
/*
* General API commands, from most primitive to least.. :()
* List Set/Get functions pairs
*/
int (*reset)(AMP *amp, amp_reset_t reset); /*!< Pointer to backend implementation of ::amp_reset(). */
int (*get_level)(AMP *amp, setting_t level, value_t *val); /*!< Pointer to backend implementation of ::amp_get_level(). */
int (*get_ext_level)(AMP *amp, token_t level, value_t *val); /*!< Pointer to backend implementation of ::amp_get_ext_level(). */
int (*set_powerstat)(AMP *amp, powerstat_t status); /*!< Pointer to backend implementation of ::amp_set_powerstat(). */
int (*get_powerstat)(AMP *amp, powerstat_t *status); /*!< Pointer to backend implementation of ::amp_get_powerstat(). */
/* get firmware info, etc. */
const char *(*get_info)(AMP *amp); /*!< Pointer to backend implementation of ::amp_get_info(). */
//! @cond Doxygen_Suppress
setting_t levels;
unsigned ext_levels;
//! @endcond
const struct confparams *extlevels; /*!< Extension levels list. \sa extamp.c */
const struct confparams *extparms; /*!< Extension parameters list. \sa extamp.c */
const char *macro_name; /*!< Amplifier model macro name. */
};
/**
* \brief Amplifier state structure.
*
* \struct amp_state
*
* This structure contains live data, as well as a copy of capability fields
* that may be updated, i.e. customized while the #AMP handle is instantiated.
*
* It is fine to move fields around, as this kind of struct should not be
* initialized like amp_caps are.
*/
struct amp_state
{
/*
* overridable fields
*/
/*
* non overridable fields, internal use
*/
hamlib_port_t_deprecated ampport_deprecated; /*!< Amplifier port (internal use). Deprecated */
int comm_state; /*!< Comm port state, opened/closed. */
rig_ptr_t priv; /*!< Pointer to private amplifier state data. */
rig_ptr_t obj; /*!< Internal use by hamlib++ for event handling. */
setting_t has_get_level; /*!< List of get levels. */
gran_t level_gran[RIG_SETTING_MAX]; /*!< Level granularity. */
gran_t parm_gran[RIG_SETTING_MAX]; /*!< Parameter granularity. */
hamlib_port_t ampport; /*!< Amplifier port (internal use). */
};
/**
* \brief Master amplifier structure.
*
* \struct amp
*
* Master amplifier data structure acting as the #AMP handle for the
* controlled amplifier. A pointer to this structure is returned by the
* amp_init() API function and is passed as a parameter to every amplifier
* specific API call.
*
* \sa amp_init(), amp_caps, amp_state
*/
struct amp
{
struct amp_caps *caps; /*!< Amplifier caps. */
struct amp_state state; /*!< Amplifier state. */
};
//! @cond Doxygen_Suppress
/* --------------- API function prototypes -----------------*/
extern HAMLIB_EXPORT(AMP *)
amp_init HAMLIB_PARAMS((amp_model_t amp_model));
extern HAMLIB_EXPORT(int)
amp_open HAMLIB_PARAMS((AMP *amp));
extern HAMLIB_EXPORT(int)
amp_close HAMLIB_PARAMS((AMP *amp));
extern HAMLIB_EXPORT(int)
amp_cleanup HAMLIB_PARAMS((AMP *amp));
extern HAMLIB_EXPORT(int)
amp_set_conf HAMLIB_PARAMS((AMP *amp,
token_t token,
const char *val));
extern HAMLIB_EXPORT(int)
amp_get_conf HAMLIB_PARAMS((AMP *amp,
token_t token,
char *val));
extern HAMLIB_EXPORT(int)
amp_set_powerstat HAMLIB_PARAMS((AMP *amp,
powerstat_t status));
extern HAMLIB_EXPORT(int)
amp_get_powerstat HAMLIB_PARAMS((AMP *amp,
powerstat_t *status));
/*
* General API commands, from most primitive to least.. )
* List Set/Get functions pairs
*/
extern HAMLIB_EXPORT(int)
amp_get_freq HAMLIB_PARAMS((AMP *amp,
freq_t *freq));
extern HAMLIB_EXPORT(int)
amp_set_freq HAMLIB_PARAMS((AMP *amp,
freq_t freq));
extern HAMLIB_EXPORT(int)
amp_reset HAMLIB_PARAMS((AMP *amp,
amp_reset_t reset));
extern HAMLIB_EXPORT(const char *)
amp_get_info HAMLIB_PARAMS((AMP *amp));
extern HAMLIB_EXPORT(int)
amp_get_level HAMLIB_PARAMS((AMP *amp, setting_t level, value_t *val));
extern HAMLIB_EXPORT(int)
amp_register HAMLIB_PARAMS((const struct amp_caps *caps));
extern HAMLIB_EXPORT(int)
amp_unregister HAMLIB_PARAMS((amp_model_t amp_model));
extern HAMLIB_EXPORT(int)
amp_list_foreach HAMLIB_PARAMS((int (*cfunc)(const struct amp_caps *,
rig_ptr_t),
rig_ptr_t data));
extern HAMLIB_EXPORT(int)
amp_load_backend HAMLIB_PARAMS((const char *be_name));
extern HAMLIB_EXPORT(int)
amp_check_backend HAMLIB_PARAMS((amp_model_t amp_model));
extern HAMLIB_EXPORT(int)
amp_load_all_backends HAMLIB_PARAMS((void));
extern HAMLIB_EXPORT(amp_model_t)
amp_probe_all HAMLIB_PARAMS((hamlib_port_t *p));
extern HAMLIB_EXPORT(int)
amp_token_foreach HAMLIB_PARAMS((AMP *amp,
int (*cfunc)(const struct confparams *,
rig_ptr_t),
rig_ptr_t data));
extern HAMLIB_EXPORT(const struct confparams *)
amp_confparam_lookup HAMLIB_PARAMS((AMP *amp,
const char *name));
extern HAMLIB_EXPORT(token_t)
amp_token_lookup HAMLIB_PARAMS((AMP *amp,
const char *name));
extern HAMLIB_EXPORT(const struct amp_caps *)
amp_get_caps HAMLIB_PARAMS((amp_model_t amp_model));
extern HAMLIB_EXPORT(setting_t)
amp_has_get_level HAMLIB_PARAMS((AMP *amp,
setting_t level));
extern HAMLIB_EXPORT(const struct confparams *)
amp_ext_lookup HAMLIB_PARAMS((AMP *amp,
const char *name));
extern HAMLIB_EXPORT(int)
amp_get_ext_level HAMLIB_PARAMS((AMP *amp,
token_t token,
value_t *val));
extern HAMLIB_EXPORT(const char *) amp_strlevel(setting_t);
extern HAMLIB_EXPORT(const struct confparams *)
rig_ext_lookup HAMLIB_PARAMS((RIG *rig,
const char *name));
extern HAMLIB_EXPORT(setting_t) amp_parse_level(const char *s);
extern HAMLIB_EXPORT(const char *) amp_strlevel(setting_t);
//! @endcond
/**
* \brief Convenience macro for generating debugging messages.
*
* \def amp_debug
*
* This is an alias of the rig_debug() function call and is used in the same
* manner.
*/
#define amp_debug rig_debug
__END_DECLS
#endif /* _AMPLIFIER_H */
/** @} */
================================================
FILE: software/hamlib-w64-4.5~git/include/hamlib/amplist.h
================================================
/*
* Hamlib Interface - list of known amplifiers
* Copyright (c) 2000-2011 by Stephane Fillod
* Copyright (c) 2000-2002 by Frank Singleton
* Copyright (C) 2019 by Michael Black W9MDB. Derived from rotlist.h
*
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
*/
#ifndef _AMPLIST_H
#define _AMPLIST_H 1
//! @cond Doxygen_Suppress
#define AMP_MAKE_MODEL(a,b) ((a)*100+(b))
#define AMP_BACKEND_NUM(a) ((a)/100)
//! @endcond
/**
* \addtogroup amplifier
* @{
*/
/**
* \brief Hamlib amplifier model definitions.
*
* \file amplist.h
*
* This file contains amplifier model definitions for the Hamlib amplifier
* Application Programming Interface (API). Each distinct amplifier type has
* a unique model number (ID) and is used by Hamlib to identify and
* distinguish between the different hardware drivers. The exact model
* numbers can be acquired using the macros in this file. To obtain a list of
* supported amplifier branches, one can use the statically defined
* AMP_BACKEND_LIST macro (defined in configure.ac). To obtain a full list of
* supported amplifiers (including each model in every branch), the
* foreach_opened_amp() API function can be used.
*
* The model number, or ID, is used to tell Hamlib which amplifier the client
* wishes to use which is done with the amp_init() API call.
*/
/**
* \brief A macro that returns the model number for an unknown model.
*
* \def AMP_MODEL_NONE
*
* The none backend, as the name suggests, does nothing. It is mainly for
* internal use.
*/
#define AMP_MODEL_NONE 0
/**
* \brief A macro that returns the model number for the DUMMY backend.
*
* \def AMP_MODEL_DUMMY
*
* The DUMMY backend, as the name suggests, is a backend which performs no
* hardware operations and always behaves as one would expect. It can be
* thought of as a hardware simulator and is very useful for testing client
* applications.
*/
/**
* \brief A macro that returns the model number for the NETAMPCTL backend.
*
* \def AMP_MODEL_NETAMPCTL
*
* The NETAMPCTL backend allows use of the `ampctld` daemon through the normal
* Hamlib API.
*/
//! @cond Doxygen_Suppress
#define AMP_DUMMY 0
#define AMP_BACKEND_DUMMY "dummy"
//! @endcond
#define AMP_MODEL_DUMMY AMP_MAKE_MODEL(AMP_DUMMY, 1)
#define AMP_MODEL_NETAMPCTL AMP_MAKE_MODEL(AMP_DUMMY, 2)
/**
* \brief A macro that returns the model number of the KPA1500 backend.
*
* \def AMP_MODEL_ELECRAFT_KPA1500
*
* The KPA1500 backend can be used with amplifiers that support the Elecraft
* KPA-1500 protocol.
*/
//! @cond Doxygen_Suppress
#define AMP_ELECRAFT 2
#define AMP_BACKEND_ELECRAFT "elecraft"
//! @endcond
#define AMP_MODEL_ELECRAFT_KPA1500 AMP_MAKE_MODEL(AMP_ELECRAFT, 1)
//#define AMP_MODEL_ELECRAFT_KPA500 AMP_MAKE_MODEL(AMP_ELECRAFT, 2)
/**
* \brief Convenience type definition for an amplifier model.
*
* \typedef typedef int amp_model_t
*/
typedef int amp_model_t;
#endif /* _AMPLIST_H */
/** @} */
================================================
FILE: software/hamlib-w64-4.5~git/include/hamlib/config.h
================================================
/* include/hamlib/config.h. Generated from config.h.in by configure. */
/* include/hamlib/config.h.in. Generated from configure.ac by autoheader. */
/* Frontend ABI age */
#define ABI_AGE 0
/* Frontend ABI revision */
#define ABI_REVISION 5
/* Frontend ABI version */
#define ABI_VERSION 4
/* Define to one of `_getb67', `GETB67', `getb67' for Cray-2 and Cray-YMP
systems. This function is required for `alloca.c' support on those systems.
*/
/* #undef CRAY_STACKSEG_END */
/* Define to 1 if using `alloca.c'. */
/* #undef C_ALLOCA */
/* Define to 1 if you have `alloca', as a function or macro. */
#define HAVE_ALLOCA 1
/* Define to 1 if you have and it should be used (not on Ultrix).
*/
/* #undef HAVE_ALLOCA_H */
/* Define to 1 if you have the header file. */
/* #undef HAVE_ARPA_INET_H */
/* Define to 1 if you have the `cfmakeraw' function. */
/* #undef HAVE_CFMAKERAW */
/* define if the compiler supports basic C++11 syntax */
#define HAVE_CXX11 1
/* Define to 1 if you have the declaration of `gai_strerror', and to 0 if you
don't. */
#define HAVE_DECL_GAI_STRERROR 1
/* Define to 1 if you have the header
file. */
/* #undef HAVE_DEV_PPBUS_PPBCONF_HDEV_PPBUS_PPI_H */
/* Define to 1 if you have the header file. */
/* #undef HAVE_DLFCN_H */
/* Define to 1 if you have the header file. */
#define HAVE_ERRNO_H 1
/* Define to 1 if you have the header file. */
#define HAVE_FCNTL_H 1
/* Define to 1 if you have the `floor' function. */
#define HAVE_FLOOR 1
/* Define to 1 if you have the header file. */
/* #undef HAVE_GD_H */
/* Define to 1 if you have the `getaddrinfo' function. */
#define HAVE_GETADDRINFO 1
/* Define to 1 if you have the `getopt' function. */
#define HAVE_GETOPT 1
/* Define to 1 if you have the header file. */
#define HAVE_GETOPT_H 1
/* Define to 1 if you have the `getopt_long' function. */
#define HAVE_GETOPT_LONG 1
/* Define to 1 if you have the `getpagesize' function. */
#define HAVE_GETPAGESIZE 1
/* Define to 1 if you have the `gettimeofday' function. */
#define HAVE_GETTIMEOFDAY 1
/* Define to 1 if you have the `glob' function. */
/* #undef HAVE_GLOB */
/* Define to 1 if you have the header file. */
/* #undef HAVE_GLOB_H */
/* Define to 1 if you have the header file. */
/* #undef HAVE_HISTORY_H */
/* Define to 1 if you have the `inet_ntoa' function. */
/* #undef HAVE_INET_NTOA */
/* Define to 1 if you have the header file. */
#define HAVE_INTTYPES_H 1
/* Define to 1 if you have the `ioctl' function. */
/* #undef HAVE_IOCTL */
/* Define to 1 if you have the header file. */
/* #undef HAVE_LAUXLIB_H */
/* Define if you have an INDI compatible library */
/* #undef HAVE_LIBINDI */
/* Define if you have a nova compatible library */
/* #undef HAVE_LIBNOVA */
/* Define if you have a readline compatible library */
/* #undef HAVE_LIBREADLINE */
/* Define if libusb-1.0 is available */
#define HAVE_LIBUSB 1
/* Define to 1 if you have the header file. */
#define HAVE_LIBUSB_1_0_LIBUSB_H 1
/* Define to 1 if you have the header file. */
/* #undef HAVE_LIBUSB_H */
/* Define to 1 if you have the header file. */
#define HAVE_LIMITS_H 1
/* Define to 1 if you have the header file. */
/* #undef HAVE_LINUX_HIDRAW_H */
/* Define to 1 if you have the header file. */
/* #undef HAVE_LINUX_IOCTL_H */
/* Define to 1 if you have the header file. */
/* #undef HAVE_LINUX_PARPORT_H */
/* Define to 1 if you have the header file. */
/* #undef HAVE_LINUX_PPDEV_H */
/* Define to 1 if you have the header file. */
#define HAVE_LOCALE_H 1
/* Define to 1 if you have the header file. */
/* #undef HAVE_LUACONF_H */
/* Define to 1 if you have the header file. */
/* #undef HAVE_LUALIB_H */
/* Define to 1 if you have the header file. */
/* #undef HAVE_LUA_H */
/* Define to 1 if you have the header file. */
#define HAVE_MALLOC_H 1
/* Define to 1 if you have the `memchr' function. */
#define HAVE_MEMCHR 1
/* Define to 1 if you have the `memmove' function. */
#define HAVE_MEMMOVE 1
/* Define to 1 if you have the header file. */
#define HAVE_MEMORY_H 1
/* Define to 1 if you have the `memset' function. */
#define HAVE_MEMSET 1
/* Define to 1 if you have the `nanosleep' function. */
#define HAVE_NANOSLEEP 1
/* Define to 1 if you have the header file. */
/* #undef HAVE_NETDB_H */
/* Define to 1 if you have the header file. */
/* #undef HAVE_NETINET_IN_H */
/* Define to 1 if you have the `pow' function. */
#define HAVE_POW 1
/* Define if you have POSIX threads libraries and header files. */
#define HAVE_PTHREAD 1
/* Define to 1 if you have the header file. */
#define HAVE_PTHREAD_H 1
/* Have PTHREAD_PRIO_INHERIT. */
#define HAVE_PTHREAD_PRIO_INHERIT 1
/* If available, contains the Python version number currently in use. */
/* #undef HAVE_PYTHON */
/* Define to 1 if you have the header file. */
/* #undef HAVE_READLINE_H */
/* Define if your readline library has \`add_history' */
/* #undef HAVE_READLINE_HISTORY */
/* Define to 1 if you have the header file. */
/* #undef HAVE_READLINE_HISTORY_H */
/* Define to 1 if you have the header file. */
/* #undef HAVE_READLINE_READLINE_H */
/* Define to 1 if you have the `rint' function. */
#define HAVE_RINT 1
/* Define to 1 if you have the `select' function. */
/* #undef HAVE_SELECT */
/* Define to 1 if you have the `setitimer' function. */
/* #undef HAVE_SETITIMER */
/* Define to 1 if you have the `setlocale' function. */
#define HAVE_SETLOCALE 1
/* Define to 1 if you have the header file. */
/* #undef HAVE_SGTTY_H */
/* Define to 1 if you have the `sigaction' function. */
/* #undef HAVE_SIGACTION */
/* Define to 1 if the system has the type `siginfo_t'. */
/* #undef HAVE_SIGINFO_T */
/* Define to 1 if you have the `signal' function. */
#define HAVE_SIGNAL 1
/* Define to 1 if the system has the type `sig_atomic_t'. */
#define HAVE_SIG_ATOMIC_T 1
/* Define to 1 if you have the `sleep' function. */
#define HAVE_SLEEP 1
/* Define to 1 if you have the `snprintf' function. */
#define HAVE_SNPRINTF 1
/* Define to 1 if you have the `socket' function. */
/* #undef HAVE_SOCKET */
/* Define to 1 if you have the `socketpair' function. */
/* #undef HAVE_SOCKETPAIR */
/* Define to 1 if you have the `sqrt' function. */
#define HAVE_SQRT 1
/* Define to 1 if the system has the type `ssize_t'. */
#define HAVE_SSIZE_T 1
/* Define to 1 if you have Windows Sleep */
#define HAVE_SSLEEP 1
/* Define to 1 if you have the header file. */
#define HAVE_STDDEF_H 1
/* Define to 1 if you have the header file. */
#define HAVE_STDINT_H 1
/* Define to 1 if you have the header file. */
#define HAVE_STDLIB_H 1
/* Define to 1 if you have the `strchr' function. */
#define HAVE_STRCHR 1
/* Define to 1 if you have the `strdup' function. */
#define HAVE_STRDUP 1
/* Define to 1 if you have the `strerror' function. */
#define HAVE_STRERROR 1
/* Define to 1 if you have the header file. */
#define HAVE_STRINGS_H 1
/* Define to 1 if you have the header file. */
#define HAVE_STRING_H 1
/* Define to 1 if you have the `strncasecmp' function. */
#define HAVE_STRNCASECMP 1
/* Define to 1 if you have the `strrchr' function. */
#define HAVE_STRRCHR 1
/* Define to 1 if you have the `strstr' function. */
#define HAVE_STRSTR 1
/* Define to 1 if you have the `strtol' function. */
#define HAVE_STRTOL 1
/* Define to 1 if the system has the type `struct addrinfo'. */
#define HAVE_STRUCT_ADDRINFO 1
/* Define to 1 if the system has the type `struct timezone'. */
#define HAVE_STRUCT_TIMEZONE 1
/* Define to 1 if you have the header file. */
/* #undef HAVE_SYS_IOCCOM_H */
/* Define to 1 if you have the header file. */
/* #undef HAVE_SYS_IOCTL_H */
/* Define to 1 if you have the header file. */
#define HAVE_SYS_PARAM_H 1
/* Define to 1 if you have the header file. */
/* #undef HAVE_SYS_SELECT_H */
/* Define to 1 if you have the header file. */
/* #undef HAVE_SYS_SOCKET_H */
/* Define to 1 if you have the header file. */
#define HAVE_SYS_STAT_H 1
/* Define to 1 if you have the header file. */
#define HAVE_SYS_TIME_H 1
/* Define to 1 if you have the header file. */
#define HAVE_SYS_TYPES_H 1
/* Define to 1 if you have the header file. */
/* #undef HAVE_TCL_H */
/* Define to 1 if you have the header file. */
/* #undef HAVE_TERMIOS_H */
/* Define to 1 if you have the header file. */
/* #undef HAVE_TERMIO_H */
/* Define to 1 if you have the header file. */
#define HAVE_UNISTD_H 1
/* Define to 1 if you have the `usleep' function. */
#define HAVE_USLEEP 1
/* Define to 1 if you have the header file. */
/* #undef HAVE_VALUES_H */
/* Define to 1 if you have the header file. */
#define HAVE_WINBASE_H 1
/* Define to 1 if you have the header file. */
#define HAVE_WINDOWS_H 1
/* Define to 1 if you have the header file. */
#define HAVE_WINIOCTL_H 1
/* Define if winradio backend is built */
#define HAVE_WINRADIO 1
/* Define to 1 if you have the header file. */
#define HAVE_WS2TCPIP_H 1
/* Define to 1 if you have the header file. */
#define HAVE_WSPIAPI_H 1
/* Define to the sub-directory where libtool stores uninstalled libraries. */
#define LT_OBJDIR ".libs/"
/* Compilation on POSIX other than Linux */
/* #undef OTHER_POSIX */
/* Name of package */
#define PACKAGE "hamlib"
/* Define to the address where bug reports for this package should be sent. */
#define PACKAGE_BUGREPORT "hamlib-developer@lists.sourceforge.net"
/* Define to the full name of this package. */
#define PACKAGE_NAME "Hamlib"
/* Define to the full name and version of this package. */
#define PACKAGE_STRING "Hamlib 4.5~git"
/* Define to the one symbol short name of this package. */
#define PACKAGE_TARNAME "hamlib"
/* Define to the home page for this package. */
#define PACKAGE_URL "http://www.hamlib.org"
/* Define to the version of this package. */
#define PACKAGE_VERSION "4.5~git"
/* Define to necessary symbol if this constant uses a non-standard name on
your system. */
/* #undef PTHREAD_CREATE_JOINABLE */
/* If using the C implementation of alloca, define if you know the
direction of stack growth for your system; otherwise it will be
automatically deduced at runtime.
STACK_DIRECTION > 0 => grows toward higher addresses
STACK_DIRECTION < 0 => grows toward lower addresses
STACK_DIRECTION = 0 => direction of growth unknown */
/* #undef STACK_DIRECTION */
/* Define to 1 if you have the ANSI C header files. */
#define STDC_HEADERS 1
/* Enable extensions on AIX 3, Interix. */
#ifndef _ALL_SOURCE
# define _ALL_SOURCE 1
#endif
/* Enable GNU extensions on systems that have them. */
#ifndef _GNU_SOURCE
# define _GNU_SOURCE 1
#endif
/* Enable threading extensions on Solaris. */
#ifndef _POSIX_PTHREAD_SEMANTICS
# define _POSIX_PTHREAD_SEMANTICS 1
#endif
/* Enable extensions on HP NonStop. */
#ifndef _TANDEM_SOURCE
# define _TANDEM_SOURCE 1
#endif
/* Enable general extensions on Solaris. */
#ifndef __EXTENSIONS__
# define __EXTENSIONS__ 1
#endif
/* Version number of package */
#define VERSION "4.5~git"
/* Define to 1 if on MINIX. */
/* #undef _MINIX */
/* Define to 2 if the system does not provide POSIX.1 features except with
this defined. */
/* #undef _POSIX_1_SOURCE */
/* Define to 1 if you need to in order for `stat' and other things to work. */
/* #undef _POSIX_SOURCE */
/* Define to `__inline__' or `__inline' if that's what the C compiler
calls it, or to nothing if 'inline' is not supported under any name. */
#ifndef __cplusplus
/* #undef inline */
#endif
/* Define to `unsigned int' if does not define. */
/* #undef size_t */
/* Define missing prototypes, implemented in replacement lib */
#ifdef __cplusplus
extern "C" {
#endif
#ifndef HAVE_GETOPT
int getopt (int argc, char * const argv[], const char * optstring);
extern char * optarg;
extern int optind, opterr, optopt;
#endif
#ifndef HAVE_GETOPT_LONG
struct option;
int getopt_long (int argc, char * const argv[], const char * optstring,
const struct option * longopts, int * longindex);
#endif
#ifndef HAVE_USLEEP
int usleep(unsigned long usec); /* SUSv2 */
#endif
#ifndef HAVE_GETTIMEOFDAY
#ifdef HAVE_SYS_TIME_H
#include
#endif
#ifndef HAVE_STRUCT_TIMEZONE
struct timezone {
int tz_minuteswest;
int tz_dsttime;
};
#endif
int gettimeofday(struct timeval *tv, struct timezone *tz);
#endif
#ifndef timersub
# define timersub(a, b, result) \
do { \
(result)->tv_sec = (a)->tv_sec - (b)->tv_sec; \
(result)->tv_usec = (a)->tv_usec - (b)->tv_usec; \
if ((result)->tv_usec < 0) { \
--(result)->tv_sec; \
(result)->tv_usec += 1000000; \
} \
} while (0)
#endif
#ifndef HAVE_SSIZE_T
typedef size_t ssize_t;
#endif
#ifdef __cplusplus
}
#endif
/* Define missing prototypes, implemented in replacement lib */
#ifdef __cplusplus
extern "C" {
#endif
#ifndef HAVE_STRUCT_ADDRINFO
#ifdef HAVE_NETINET_IN_H
#include
#endif
#if HAVE_NETDB_H
#include
#endif
#ifdef HAVE_ARPA_INET_H
#include
#endif
#ifdef HAVE_SYS_SOCKET_H
#include
#elif HAVE_WS2TCPIP_H
#include
#endif
struct addrinfo {
int ai_flags;
int ai_family;
int ai_socktype;
int ai_protocol;
socklen_t ai_addrlen;
struct sockaddr *ai_addr;
};
#endif
#ifndef HAVE_GETADDRINFO
#ifdef HAVE_NETINET_IN_H
#include
#endif
#if HAVE_NETDB_H
#include
#endif
#ifdef HAVE_ARPA_INET_H
#include
#endif
#ifdef HAVE_SYS_SOCKET_H
#include
#elif HAVE_WS2TCPIP_H
#include
#endif
#ifndef AI_PASSIVE
#define AI_PASSIVE 0x0001
#endif
int getaddrinfo(const char *node, const char *service,
const struct addrinfo *hints, struct addrinfo **res);
void freeaddrinfo(struct addrinfo *res);
#endif
#if !defined(HAVE_DECL_GAI_STRERROR) && !defined(gai_strerror)
const char *gai_strerror(int errcode);
#endif /* !HAVE_DECL_GAI_STRERROR */
#ifdef __cplusplus
}
#endif
================================================
FILE: software/hamlib-w64-4.5~git/include/hamlib/rig.h
================================================
/*
* Hamlib Interface - API header
* Copyright (c) 2000-2003 by Frank Singleton
* Copyright (c) 2000-2012 by Stephane Fillod
*
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
*/
#ifndef _RIG_H
#define _RIG_H 1
#define BUILTINFUNC 0
// Our shared secret password
#define HAMLIB_SECRET_LENGTH 32
#define TRACE rig_debug(RIG_DEBUG_TRACE,"%s(%d) trace\n", __FILE__, __LINE__)
#define __FILENAME__ (strrchr(__FILE__, '/') ? strrchr(__FILE__, '/') + 1 : __FILE__)
#include
#include
#include
#include
#include
#include
#ifdef HAVE_PTHREAD
#include
#endif
/* Rig list is in a separate file so as not to mess up w/ this one */
#include
/**
* \addtogroup rig
* @{
*/
/*! \file rig.h
* \brief Hamlib rig data structures.
*
* This file contains the data structures and definitions for the Hamlib rig API.
* see the rig.c file for more details on the rig API.
*/
/* __BEGIN_DECLS should be used at the beginning of your declarations,
* so that C++ compilers don't mangle their names. Use __END_DECLS at
* the end of C declarations. */
//! @cond Doxygen_Suppress
#undef __BEGIN_DECLS
#undef __END_DECLS
#ifdef __cplusplus
# define __BEGIN_DECLS extern "C" {
# define __END_DECLS }
#else
# define __BEGIN_DECLS /* empty */
# define __END_DECLS /* empty */
#endif
//! @endcond
/* HAMLIB_PARAMS is a macro used to wrap function prototypes, so that compilers
* that don't understand ANSI C prototypes still work, and ANSI C
* compilers can issue warnings about type mismatches. */
//! @cond Doxygen_Suppress
#undef HAMLIB_PARAMS
#if defined (__STDC__) \
|| defined (_AIX) \
|| (defined (__mips) && defined (_SYSTYPE_SVR4)) \
|| defined(__CYGWIN__) \
|| defined(_WIN32) \
|| defined(__cplusplus)
# define HAMLIB_PARAMS(protos) protos
# define rig_ptr_t void *
# define amp_ptr_t void *
#else
# define HAMLIB_PARAMS(protos) ()
# define rig_ptr_t char *
# define amp_ptr_t char *
#endif
//! @endcond
#include
#ifndef SWIGLUA
//! @cond Doxygen_Suppress
#define CONSTANT_64BIT_FLAG(BIT) (1ull << (BIT))
//! @endcond
#else
/* SWIG's older Lua generator doesn't grok ull due to Lua using a
double-precision floating point type internally for number
representations (max 53 bits of precision) so makes a string
constant from a constant number literal using ull */
// #define CONSTANT_64BIT_FLAG(BIT) (1 << (BIT))
// #define SWIGLUAHIDE
/* But this appears to have been fixed so we'll use the correct one now
If you have the older version of SWIG comment out this line and use
the two above */
// This 1ul definition works on swig 4.0.1 and lua 5.3.5
#define CONSTANT_64BIT_FLAG(BIT) (1ul << (BIT))
#endif
__BEGIN_DECLS
/**
* \brief size of cookie request buffer
* Minimum size of cookie buffer to pass to rig_cookie
*/
// cookie is 26-char time code plus 10-char (2^31-1) random number
#define HAMLIB_COOKIE_SIZE 37
extern int cookie_use; // this is global as once one client requests it everybody needs to honor it
//! @cond Doxygen_Suppress
extern HAMLIB_EXPORT_VAR(const char) hamlib_version[];
extern HAMLIB_EXPORT_VAR(const char) hamlib_copyright[];
extern HAMLIB_EXPORT_VAR(const char *) hamlib_version2;
extern HAMLIB_EXPORT_VAR(const char *) hamlib_copyright2;
//! @endcond
/**
* \brief Hamlib error codes
* Error code definition that can be returned by the Hamlib functions.
* Unless stated otherwise, Hamlib functions return the negative value
* of rig_errcode_e definitions in case of error, or 0 when successful.
*/
enum rig_errcode_e {
RIG_OK = 0, /*!< 0 No error, operation completed successfully */
RIG_EINVAL, /*!< 1 invalid parameter */
RIG_ECONF, /*!< 2 invalid configuration (serial,..) */
RIG_ENOMEM, /*!< 3 memory shortage */
RIG_ENIMPL, /*!< 4 function not implemented, but will be */
RIG_ETIMEOUT, /*!< 5 communication timed out */
RIG_EIO, /*!< 6 IO error, including open failed */
RIG_EINTERNAL, /*!< 7 Internal Hamlib error, huh! */
RIG_EPROTO, /*!< 8 Protocol error */
RIG_ERJCTED, /*!< 9 Command rejected by the rig */
RIG_ETRUNC, /*!< 10 Command performed, but arg truncated */
RIG_ENAVAIL, /*!< 11 Function not available */
RIG_ENTARGET, /*!< 12 VFO not targetable */
RIG_BUSERROR, /*!< 13 Error talking on the bus */
RIG_BUSBUSY, /*!< 14 Collision on the bus */
RIG_EARG, /*!< 15 NULL RIG handle or any invalid pointer parameter in get arg */
RIG_EVFO, /*!< 16 Invalid VFO */
RIG_EDOM, /*!< 17 Argument out of domain of func */
RIG_EDEPRECATED,/*!< 18 Function deprecated */
RIG_ESECURITY /*!< 19 Security error */
};
/**
* \brief Determines if the given error code indicates a "soft" error
* Soft errors are caused by invalid parameters and software/hardware features
* and cannot be fixed by retries or by re-initializing hardware.
*/
#define RIG_IS_SOFT_ERRCODE(errcode) (errcode == RIG_EINVAL || errcode == RIG_ENIMPL || errcode == RIG_ERJCTED \
|| errcode == RIG_ETRUNC || errcode == RIG_ENAVAIL || errcode == RIG_ENTARGET \
|| errcode == RIG_EVFO || errcode == RIG_EDOM || errcode == RIG_ESECURITY)
/**
* \brief Token in the netrigctl protocol for returning error code
*/
#define NETRIGCTL_RET "RPRT "
/**
*\brief Hamlib debug levels
*
* NOTE: Numeric order matters for debug level
*
* \sa rig_set_debug()
*/
enum rig_debug_level_e {
RIG_DEBUG_NONE = 0, /*!< no bug reporting */
RIG_DEBUG_BUG, /*!< serious bug */
RIG_DEBUG_ERR, /*!< error case (e.g. protocol, memory allocation) */
RIG_DEBUG_WARN, /*!< warning */
RIG_DEBUG_VERBOSE, /*!< verbose */
RIG_DEBUG_TRACE, /*!< tracing */
RIG_DEBUG_CACHE /*!< caching */
};
/* --------------- Rig capabilities -----------------*/
/* Forward struct references */
struct rig;
struct rig_state;
/**
* \brief Rig structure definition (see rig for details).
*/
typedef struct s_rig RIG;
//! @cond Doxygen_Suppress
#define HAMLIB_RIGNAMSIZ 30
#define HAMLIB_RIGVERSIZ 8
#define HAMLIB_FILPATHLEN 512
#define HAMLIB_FRQRANGESIZ 30
#define HAMLIB_MAXCHANDESC 30 /* describe channel eg: "WWV 5Mhz" */
#define HAMLIB_TSLSTSIZ 20 /* max tuning step list size, zero ended */
#define HAMLIB_FLTLSTSIZ 60 /* max mode/filter list size, zero ended */
#define HAMLIB_MAXDBLSTSIZ 8 /* max preamp/att levels supported, zero ended */
#define HAMLIB_CHANLSTSIZ 16 /* max mem_list size, zero ended */
#define HAMLIB_MAX_AGC_LEVELS 8 /* max AGC levels supported */
#define HAMLIB_MAX_SPECTRUM_SCOPES 4 /* max number of spectrum scopes supported */
#define HAMLIB_MAX_SPECTRUM_MODES 5 /* max number of spectrum modes supported */
#define HAMLIB_MAX_SPECTRUM_AVG_MODES 12 /* max number of spectrum averaging modes supported */
#define HAMLIB_MAX_SPECTRUM_SPANS 20 /* max number of spectrum modes supported */
#define HAMLIB_MAX_SPECTRUM_DATA 2048 /* max number of data bytes in a single spectrum line */
#define HAMLIB_MAX_CAL_LENGTH 32 /* max calibration plots in cal_table_t */
#define HAMLIB_MAX_MODES 63
#define HAMLIB_MAX_VFOS 31
#define HAMLIB_MAX_ROTORS 63
#define HAMLIB_MAX_VFO_OPS 31
#define HAMLIB_MAX_RSCANS 31
#define HAMLIB_MAX_SNAPSHOT_PACKET_SIZE 16384 /* maximum number of bytes in a UDP snapshot packet */
//! @endcond
/**
* \brief CTCSS and DCS type definition.
*
* Continuous Tone Controlled Squelch System (CTCSS)
* sub-audible tone frequency are expressed in \em tenth of Hz.
* For example, the subaudible tone of 88.5 Hz is represented within
* Hamlib by 885.
*
* Digitally-Coded Squelch codes are simple direct integers.
*/
#define CTCSS_LIST_SIZE 60
#define DCS_LIST_SIZE 128
typedef unsigned int tone_t;
/**
* \brief Port type
*/
typedef enum rig_port_e {
RIG_PORT_NONE = 0, /*!< No port */
RIG_PORT_SERIAL, /*!< Serial */
RIG_PORT_NETWORK, /*!< Network socket type */
RIG_PORT_DEVICE, /*!< Device driver, like the WiNRADiO */
RIG_PORT_PACKET, /*!< AX.25 network type, e.g. SV8CS protocol */
RIG_PORT_DTMF, /*!< DTMF protocol bridge via another rig, eg. Kenwood Sky Cmd System */
RIG_PORT_ULTRA, /*!< IrDA Ultra protocol! */
RIG_PORT_RPC, /*!< RPC wrapper */
RIG_PORT_PARALLEL, /*!< Parallel port */
RIG_PORT_USB, /*!< USB port */
RIG_PORT_UDP_NETWORK, /*!< UDP Network socket type */
RIG_PORT_CM108, /*!< CM108 GPIO */
RIG_PORT_GPIO, /*!< GPIO */
RIG_PORT_GPION, /*!< GPIO inverted */
} rig_port_t;
/**
* \brief Serial parity
*/
enum serial_parity_e {
RIG_PARITY_NONE = 0, /*!< No parity */
RIG_PARITY_ODD, /*!< Odd */
RIG_PARITY_EVEN, /*!< Even */
RIG_PARITY_MARK, /*!< Mark */
RIG_PARITY_SPACE /*!< Space */
};
/**
* \brief Serial handshake
*/
enum serial_handshake_e {
RIG_HANDSHAKE_NONE = 0, /*!< No handshake */
RIG_HANDSHAKE_XONXOFF, /*!< Software XON/XOFF */
RIG_HANDSHAKE_HARDWARE /*!< Hardware CTS/RTS */
};
/**
* \brief Serial control state
*/
enum serial_control_state_e {
RIG_SIGNAL_UNSET = 0, /*!< Unset or tri-state */
RIG_SIGNAL_ON, /*!< ON */
RIG_SIGNAL_OFF /*!< OFF */
};
/**
* \brief Rig type flags
*/
typedef enum {
RIG_FLAG_RECEIVER = (1 << 1), /*!< Receiver */
RIG_FLAG_TRANSMITTER = (1 << 2), /*!< Transmitter */
RIG_FLAG_SCANNER = (1 << 3), /*!< Scanner */
RIG_FLAG_MOBILE = (1 << 4), /*!< mobile sized */
RIG_FLAG_HANDHELD = (1 << 5), /*!< handheld sized */
RIG_FLAG_COMPUTER = (1 << 6), /*!< "Computer" rig */
RIG_FLAG_TRUNKING = (1 << 7), /*!< has trunking */
RIG_FLAG_APRS = (1 << 8), /*!< has APRS */
RIG_FLAG_TNC = (1 << 9), /*!< has TNC */
RIG_FLAG_DXCLUSTER = (1 << 10), /*!< has DXCluster */
RIG_FLAG_TUNER = (1 << 11) /*!< dumb tuner */
} rig_type_t;
/**
* \brief AGC delay settings
*/
/* TODO: kill me, and replace by real AGC delay */
enum agc_level_e {
RIG_AGC_OFF = 0,
RIG_AGC_SUPERFAST,
RIG_AGC_FAST,
RIG_AGC_SLOW,
RIG_AGC_USER, /*!< user selectable */
RIG_AGC_MEDIUM,
RIG_AGC_AUTO
};
//! @cond Doxygen_Suppress
#define RIG_FLAG_TRANSCEIVER (RIG_FLAG_RECEIVER|RIG_FLAG_TRANSMITTER)
#define RIG_TYPE_MASK (RIG_FLAG_TRANSCEIVER|RIG_FLAG_SCANNER|RIG_FLAG_MOBILE|RIG_FLAG_HANDHELD|RIG_FLAG_COMPUTER|RIG_FLAG_TRUNKING|RIG_FLAG_TUNER)
#define RIG_TYPE_OTHER 0
#define RIG_TYPE_TRANSCEIVER RIG_FLAG_TRANSCEIVER
#define RIG_TYPE_HANDHELD (RIG_FLAG_TRANSCEIVER|RIG_FLAG_HANDHELD)
#define RIG_TYPE_MOBILE (RIG_FLAG_TRANSCEIVER|RIG_FLAG_MOBILE)
#define RIG_TYPE_RECEIVER RIG_FLAG_RECEIVER
#define RIG_TYPE_PCRECEIVER (RIG_FLAG_COMPUTER|RIG_FLAG_RECEIVER)
#define RIG_TYPE_SCANNER (RIG_FLAG_SCANNER|RIG_FLAG_RECEIVER)
#define RIG_TYPE_TRUNKSCANNER (RIG_TYPE_SCANNER|RIG_FLAG_TRUNKING)
#define RIG_TYPE_COMPUTER (RIG_FLAG_TRANSCEIVER|RIG_FLAG_COMPUTER)
#define RIG_TYPE_TUNER RIG_FLAG_TUNER
//! @endcond
/**
* \brief Development status of the backend
*/
enum rig_status_e {
RIG_STATUS_ALPHA = 0, /*!< Alpha quality, i.e. development */
RIG_STATUS_UNTESTED, /*!< Written from available specs, rig unavailable for test, feedback wanted! */
RIG_STATUS_BETA, /*!< Beta quality */
RIG_STATUS_STABLE, /*!< Stable */
RIG_STATUS_BUGGY /*!< Was stable, but something broke it! */
/* RIG_STATUS_NEW * *!< Initial release of code
* !! Use of RIG_STATUS_NEW is deprecated. Do not use it anymore */
};
/**
* \brief Map all deprecated RIG_STATUS_NEW references to
* RIG_STATUS_UNTESTED for backward compatibility
*/
#define RIG_STATUS_NEW RIG_STATUS_UNTESTED
/**
* \brief Repeater shift type
*/
typedef enum {
RIG_RPT_SHIFT_NONE = 0, /*!< No repeater shift */
RIG_RPT_SHIFT_MINUS, /*!< "-" shift */
RIG_RPT_SHIFT_PLUS /*!< "+" shift */
} rptr_shift_t;
/**
* \brief Split mode
*/
typedef enum {
RIG_SPLIT_OFF = 0, /*!< Split mode disabled */
RIG_SPLIT_ON /*!< Split mode enabled */
} split_t;
/**
* \brief Frequency type,
*
* Frequency type unit in Hz, able to hold SHF frequencies.
*/
typedef double freq_t;
/**
* \brief printf(3) format to be used for freq_t type
*/
#define PRIfreq ".0f"
/**
* \brief scanf(3) format to be used for freq_t type
*/
#define SCNfreq "lf"
/**
* \brief printf(3) format to be used for freq_t type
*/
#define FREQFMT SCNfreq
/**
* \brief Short frequency type
*
* Frequency in Hz restricted to 31bits, suitable for offsets, shifts, etc..
*/
typedef signed long shortfreq_t;
/** \brief \c Macro to return Hz when f=Hz */
#define Hz(f) ((freq_t)(f))
/** \brief \c Macro to return Hz when f=kHz */
#define kHz(f) ((freq_t)((f)*(freq_t)1000))
/** \brief \c Macro to return Hz when f=MHz */
#define MHz(f) ((freq_t)((f)*(freq_t)1000000))
/** \brief \c Macro to return Hz when f=GHz */
#define GHz(f) ((freq_t)((f)*(freq_t)1000000000))
/** \brief \c Macro to return short Hz when f=Hz */
#define s_Hz(f) ((shortfreq_t)(f))
/** \brief \c Macro to return short Hz when f=kHz */
#define s_kHz(f) ((shortfreq_t)((f)*(shortfreq_t)1000))
/** \brief \c Macro to return short Hz when f=MHz */
#define s_MHz(f) ((shortfreq_t)((f)*(shortfreq_t)1000000))
/** \brief \c Macro to return short Hz when f=GHz */
#define s_GHz(f) ((shortfreq_t)((f)*(shortfreq_t)1000000000))
/** \brief \c Frequency none -- used as default value for checking */
#define RIG_FREQ_NONE Hz(0)
/**
* \brief VFO definition
*
* There are several ways of using a vfo_t. For most cases, using RIG_VFO_A,
* RIG_VFO_B, RIG_VFO_CURR, etc., as opaque macros should suffice.
*
* Strictly speaking a VFO is Variable Frequency Oscillator.
* Here, it is referred as a tunable channel, from the radio operator's
* point of view. The channel can be designated individually by its real
* number, or by using an alias.
*
* Aliases may or may not be honored by a backend and are defined using
* high significant bits, i.e. RIG_VFO_MEM, RIG_VFO_MAIN, etc.
*/
typedef unsigned int vfo_t;
/** \brief '' -- used in caps */
#define RIG_VFO_N(n) (1u<<(n))
/** \brief \c VFONone -- vfo unknown */
#define RIG_VFO_NONE 0
/** \brief \c VFOA -- VFO A */
#define RIG_VFO_A RIG_VFO_N(0)
/** \brief \c VFOB -- VFO B */
#define RIG_VFO_B RIG_VFO_N(1)
/** \brief \c VFOC -- VFO C */
#define RIG_VFO_C RIG_VFO_N(2)
// Any addition VFOS need to go from 3-20
// To maintain backward compatibility these values cannot change
/** \brief \c SubA -- alias for SUB_A */
#define RIG_VFO_SUB_A RIG_VFO_N(21)
/** \brief \c SubB -- alias for SUB_B */
#define RIG_VFO_SUB_B RIG_VFO_N(22)
/** \brief \c SubC -- alias for SUB_B */
#define RIG_VFO_SUB_C RIG_VFO_N(3)
/** \brief \c MainA -- alias for MAIN_A */
#define RIG_VFO_MAIN_A RIG_VFO_N(23)
/** \brief \c MainB -- alias for MAIN_B */
#define RIG_VFO_MAIN_B RIG_VFO_N(24)
/** \brief \c MainC -- alias for MAIN_C */
#define RIG_VFO_MAIN_C RIG_VFO_N(4)
/** \brief \c Other -- alias for OTHER -- e.g. Icom rigs without get_vfo capability */
#define RIG_VFO_OTHER RIG_VFO_N(5)
/** \brief \c Sub -- alias for SUB */
#define RIG_VFO_SUB RIG_VFO_N(25)
/** \brief \c Main -- alias for MAIN */
#define RIG_VFO_MAIN RIG_VFO_N(26)
/** \brief \c VFO -- means (last or any)VFO mode, with set_vfo */
#define RIG_VFO_VFO RIG_VFO_N(27)
/** \brief \c MEM -- means Memory mode, to be used with set_vfo */
#define RIG_VFO_MEM RIG_VFO_N(28)
/** \brief \c currVFO -- current "tunable channel"/VFO */
#define RIG_VFO_CURR RIG_VFO_N(29)
/** \brief \c Flag to set if VFO can transmit */
#define RIG_VFO_TX_FLAG RIG_VFO_N(30)
/** \brief \c Flag to set all VFOS */
#define RIG_VFO_ALL RIG_VFO_N(31)
// we can also use RIG_VFO_N(31) if needed
// Misc VFO Macros
/** \brief \c Macro to tell you if VFO can transmit */
#define RIG_VFO_TX_VFO(v) ((v)|RIG_VFO_TX_FLAG)
/** \brief \c TX -- alias for split tx or uplink, of VFO_CURR */
#define RIG_VFO_TX RIG_VFO_TX_VFO(RIG_VFO_CURR)
/** \brief \c RX -- alias for split rx or downlink */
#define RIG_VFO_RX RIG_VFO_CURR
/*
* targetable bitfields, for internal use.
* In rig.c lack of a flag will case a VFO change if needed
* So setting this flag will mean the backend handles any VFO needs
* For many rigs RITXIT, PTT, MEM, and BANK are non-VFO commands so need these flags to avoid unnecessary VFO swapping
*/
//! @cond Doxygen_Suppress
#define RIG_TARGETABLE_NONE 0
#define RIG_TARGETABLE_FREQ (1<<0)
#define RIG_TARGETABLE_MODE (1<<1) // mode by vfo or same mode on both vfos
#define RIG_TARGETABLE_PURE (1<<2) // deprecated -- not used -- reuse it
#define RIG_TARGETABLE_TONE (1<<3)
#define RIG_TARGETABLE_FUNC (1<<4)
#define RIG_TARGETABLE_LEVEL (1<<5)
#define RIG_TARGETABLE_RITXIT (1<<6)
#define RIG_TARGETABLE_PTT (1<<7)
#define RIG_TARGETABLE_MEM (1<<8)
#define RIG_TARGETABLE_BANK (1<<9)
#define RIG_TARGETABLE_ANT (1<<10)
#define RIG_TARGETABLE_ROOFING (1<<11) // roofing filter targetable by VFO
#define RIG_TARGETABLE_SPECTRUM (1<<12) // spectrum scope targetable by VFO
#define RIG_TARGETABLE_BAND (1<<13) // Band select -- e.g. Yaeus BS command
#define RIG_TARGETABLE_COMMON (RIG_TARGETABLE_RITXIT | RIG_TARGETABLE_PTT | RIG_TARGETABLE_MEM | RIG_TARGETABLE_BANK)
#define RIG_TARGETABLE_ALL 0x7fffffff
//! @endcond
//
//
// Newer Icoms like the 9700 and 910 have VFOA/B on both Main & Sub
// Compared to older rigs which have one or the other
// So we need to distinguish between them
//! @cond Doxygen_Suppress
#define VFO_HAS_A_B ((rig->state.vfo_list & (RIG_VFO_A|RIG_VFO_B)) == (RIG_VFO_A|RIG_VFO_B))
#define VFO_HAS_MAIN_SUB ((rig->state.vfo_list & (RIG_VFO_MAIN|RIG_VFO_SUB)) == (RIG_VFO_MAIN|RIG_VFO_SUB))
#define VFO_HAS_MAIN_SUB_ONLY ((!VFO_HAS_A_B) & VFO_HAS_MAIN_SUB)
#define VFO_HAS_MAIN_SUB_A_B_ONLY (VFO_HAS_A_B & VFO_HAS_MAIN_SUB)
#define VFO_HAS_A_B_ONLY (VFO_HAS_A_B & (!VFO_HAS_MAIN_SUB))
#define VFO_DUAL (RIG_VFO_MAIN_A|RIG_VFO_MAIN_B|RIG_VFO_SUB_A|RIG_VFO_SUB_B)
#define VFO_HAS_DUAL ((rig->state.vfo_list & VFO_DUAL) == VFO_DUAL)
//! @endcond
/**
* \brief Macro for bandpass to be set to normal
* \def RIG_PASSBAND_NORMAL
*/
#define RIG_PASSBAND_NORMAL s_Hz(0)
/**
* \brief Macro for bandpass to be left alone
*/
#define RIG_PASSBAND_NOCHANGE s_Hz(-1)
/**
*
* \sa rig_passband_normal(), rig_passband_narrow(), rig_passband_wide()
*/
typedef shortfreq_t pbwidth_t;
/**
* \brief DCD status
*/
typedef enum dcd_e {
RIG_DCD_OFF = 0, /*!< Squelch closed */
RIG_DCD_ON /*!< Squelch open */
} dcd_t;
/**
* \brief DCD type
*
* \sa rig_get_dcd()
*/
typedef enum {
RIG_DCD_NONE = 0, /*!< No DCD available */
RIG_DCD_RIG, /*!< Rig has DCD status support, i.e. rig has get_dcd cap */
RIG_DCD_SERIAL_DSR, /*!< DCD status from serial DSR signal */
RIG_DCD_SERIAL_CTS, /*!< DCD status from serial CTS signal */
RIG_DCD_SERIAL_CAR, /*!< DCD status from serial CD signal */
RIG_DCD_PARALLEL, /*!< DCD status from parallel port pin */
RIG_DCD_CM108, /*!< DCD status from CM108 vol dn pin */
RIG_DCD_GPIO, /*!< DCD status from GPIO pin */
RIG_DCD_GPION, /*!< DCD status from inverted GPIO pin */
} dcd_type_t;
/**
* \brief PTT status
*/
typedef enum {
RIG_PTT_OFF = 0, /*!< PTT deactivated */
RIG_PTT_ON, /*!< PTT activated */
RIG_PTT_ON_MIC, /*!< PTT Mic only, fallbacks on RIG_PTT_ON if unavailable */
RIG_PTT_ON_DATA /*!< PTT Data (Mic-muted), fallbacks on RIG_PTT_ON if unavailable */
} ptt_t;
/**
* \brief PTT type
*
* \sa rig_get_ptt()
*/
typedef enum {
RIG_PTT_NONE = 0, /*!< No PTT available */
RIG_PTT_RIG, /*!< Legacy PTT (CAT PTT) */
RIG_PTT_SERIAL_DTR, /*!< PTT control through serial DTR signal */
RIG_PTT_SERIAL_RTS, /*!< PTT control through serial RTS signal */
RIG_PTT_PARALLEL, /*!< PTT control through parallel port */
RIG_PTT_RIG_MICDATA, /*!< Legacy PTT (CAT PTT), supports RIG_PTT_ON_MIC/RIG_PTT_ON_DATA */
RIG_PTT_CM108, /*!< PTT control through CM108 GPIO pin */
RIG_PTT_GPIO, /*!< PTT control through GPIO pin */
RIG_PTT_GPION, /*!< PTT control through inverted GPIO pin */
} ptt_type_t;
/**
* \brief Radio power state
*/
typedef enum {
RIG_POWER_OFF = 0, /*!< Power off */
RIG_POWER_ON = (1 << 0), /*!< Power on */
RIG_POWER_STANDBY = (1 << 1), /*!< Standby */
RIG_POWER_OPERATE = (1 << 2), /*!< Operate (from Standby) */
RIG_POWER_UNKNOWN = (1 << 3) /*!< Unknown power status */
} powerstat_t;
/**
* \brief Reset operation
*/
typedef enum {
RIG_RESET_NONE = 0, /*!< No reset */
RIG_RESET_SOFT = (1 << 0), /*!< Software reset */
RIG_RESET_VFO = (1 << 1), /*!< VFO reset */
RIG_RESET_MCALL = (1 << 2), /*!< Memory clear */
RIG_RESET_MASTER = (1 << 3) /*!< Master reset */
} reset_t;
/**
* \brief VFO operation
*
* A VFO operation is an action on a VFO (or tunable memory).
* The difference with a function is that an action has no on/off
* status, it is performed at once.
*
* NOTE: the vfo argument for some vfo operation may be irrelevant,
* and thus will be ignored.
*
* The VFO/MEM "mode" is set by rig_set_vfo.\n
* \c STRING used in rigctl
*
* \sa rig_parse_vfo_op(), rig_strvfop()
*/
typedef enum {
RIG_OP_NONE = 0, /*!< '' No VFO_OP */
RIG_OP_CPY = (1 << 0), /*!< \c CPY -- VFO A = VFO B */
RIG_OP_XCHG = (1 << 1), /*!< \c XCHG -- Exchange VFO A/B */
RIG_OP_FROM_VFO = (1 << 2), /*!< \c FROM_VFO -- VFO->MEM */
RIG_OP_TO_VFO = (1 << 3), /*!< \c TO_VFO -- MEM->VFO */
RIG_OP_MCL = (1 << 4), /*!< \c MCL -- Memory clear */
RIG_OP_UP = (1 << 5), /*!< \c UP -- UP increment VFO freq by tuning step*/
RIG_OP_DOWN = (1 << 6), /*!< \c DOWN -- DOWN decrement VFO freq by tuning step*/
RIG_OP_BAND_UP = (1 << 7), /*!< \c BAND_UP -- Band UP */
RIG_OP_BAND_DOWN = (1 << 8), /*!< \c BAND_DOWN -- Band DOWN */
RIG_OP_LEFT = (1 << 9), /*!< \c LEFT -- LEFT */
RIG_OP_RIGHT = (1 << 10), /*!< \c RIGHT -- RIGHT */
RIG_OP_TUNE = (1 << 11), /*!< \c TUNE -- Start tune */
RIG_OP_TOGGLE = (1 << 12) /*!< \c TOGGLE -- Toggle VFOA and VFOB */
} vfo_op_t;
/**
* \brief Band enumeration
*
* Some rig commands like Yaesu band select know about bands
*
* \sa rig_set_level()
*/
typedef enum { // numbers here reflect the Yaesu values
RIG_BAND_160M = 0, /*!< \c 160M */
RIG_BAND_80M = 1, /*!< \c 80M */
RIG_BAND_60M = 2, /*!< \c 60M */
RIG_BAND_40M = 3, /*!< \c 40M */
RIG_BAND_30M = 4, /*!< \c 30M */
RIG_BAND_20M = 5, /*!< \c 20M */
RIG_BAND_17M = 6, /*!< \c 17M */
RIG_BAND_15M = 7, /*!< \c 15M */
RIG_BAND_12M = 8, /*!< \c 12M */
RIG_BAND_10M = 9, /*!< \c 10M */
RIG_BAND_6M = 10, /*!< \c 6M */
RIG_BAND_GEN = 11, /*!< \c 60M */
RIG_BAND_MW = 12, /*!< \c Medium Wave */
RIG_BAND_UNUSED = 13, /*!< \c Medium Wave */
RIG_BAND_AIR = 14, /*!< \c Air band */
RIG_BAND_144MHZ = 15, /*!< \c 144MHz */
RIG_BAND_430MHZ = 16, /*!< \c 430MHz */
} hamlib_band_t;
/**
* \brief Rig Scan operation
*
* Various scan operations supported by a rig.\n
* \c STRING used in rigctl
*
* \sa rig_parse_scan(), rig_strscan()
*/
typedef enum {
RIG_SCAN_NONE = 0, /*!< '' No-op value */
RIG_SCAN_MEM = (1 << 0), /*!< \c MEM -- Scan all memory channels */
RIG_SCAN_SLCT = (1 << 1), /*!< \c SLCT -- Scan all selected memory channels */
RIG_SCAN_PRIO = (1 << 2), /*!< \c PRIO -- Priority watch (mem or call channel) */
RIG_SCAN_PROG = (1 << 3), /*!< \c PROG -- Programmed(edge) scan */
RIG_SCAN_DELTA = (1 << 4), /*!< \c DELTA -- delta-f scan */
RIG_SCAN_VFO = (1 << 5), /*!< \c VFO -- most basic scan */
RIG_SCAN_PLT = (1 << 6), /*!< \c PLT -- Scan using pipelined tuning */
RIG_SCAN_STOP = (1 << 7) /*!< \c STOP -- Stop scanning */
} scan_t;
/**
* \brief configuration token
*/
typedef long token_t;
//! @cond Doxygen_Suppress
#define RIG_CONF_END 0
//! @endcond
/**
* \brief parameter types
*
* Used with configuration, parameter and extra-parm tables.
*
* Current internal implementation
* NUMERIC: val.f or val.i
* COMBO: val.i, starting from 0. Points to a table of strings or asci stored values.
* STRING: val.s or val.cs
* CHECKBUTTON: val.i 0/1
* BINARY: val.b
*/
/* strongly inspired from soundmodem. Thanks Thomas! */
enum rig_conf_e {
RIG_CONF_STRING, /*!< String type */
RIG_CONF_COMBO, /*!< Combo type */
RIG_CONF_NUMERIC, /*!< Numeric type integer or real */
RIG_CONF_CHECKBUTTON, /*!< on/off type */
RIG_CONF_BUTTON, /*!< Button type */
RIG_CONF_BINARY /*!< Binary buffer type */
};
//! @cond Doxygen_Suppress
#define RIG_COMBO_MAX 16
#define RIG_BIN_MAX 80
//! @endcond
/**
* \brief Configuration parameter structure.
*/
struct confparams {
token_t token; /*!< Conf param token ID */
const char *name; /*!< Param name, no spaces allowed */
const char *label; /*!< Human readable label */
const char *tooltip; /*!< Hint on the parameter */
const char *dflt; /*!< Default value */
enum rig_conf_e type; /*!< Type of the parameter */
union { /*!< */
struct { /*!< */
float min; /*!< Minimum value */
float max; /*!< Maximum value */
float step; /*!< Step */
} n; /*!< Numeric type */
struct { /*!< */
const char *combostr[RIG_COMBO_MAX]; /*!< Combo list */
} c; /*!< Combo type */
} u; /*!< Type union */
};
/**
* \brief Announce
*
* Designate optional speech synthesizer.
*/
typedef enum {
RIG_ANN_NONE = 0, /*!< None */
RIG_ANN_OFF = RIG_ANN_NONE, /*!< disable announces */
RIG_ANN_FREQ = (1 << 0), /*!< Announce frequency */
RIG_ANN_RXMODE = (1 << 1), /*!< Announce receive mode */
RIG_ANN_CW = (1 << 2), /*!< CW */
RIG_ANN_ENG = (1 << 3), /*!< English */
RIG_ANN_JAP = (1 << 4) /*!< Japan */
} ann_t;
/**
* \brief Antenna typedef
* \typedef ant_t
*/
/**
* \brief Antenna number
* \def RIG_ANT_NONE
* No antenna set yet or unknown
*/
/**
* \brief Antenna conversion macro
* \def RIG_ANT_N
* Convert antenna number to bit mask
*/
/**
* \brief Macro for Ant#1
* \def RIG_ANT_1
*/
/**
* \brief Macro for Ant#2
* \def RIG_ANT_2
*/
/**
* \brief Macro for Ant#3
* \def RIG_ANT_3
*/
/**
* \brief Macro for Ant#4
* \def RIG_ANT_4
*/
/**
* \brief Macro for Ant#5
* \def RIG_ANT_5
*/
/**
* \brief Antenna is on whatever "current" means
* \def RIG_ANT_CURR
*/
/**
* \brief Macro for unknown antenna
* \def RIG_ANT_UNKNOWN
*/
/**
* \brief Maximum antenna#
* \def RIG_ANT_MAX
*/
typedef unsigned int ant_t;
#define RIG_ANT_NONE 0
#define RIG_ANT_N(n) ((ant_t)1<<(n))
#define RIG_ANT_1 RIG_ANT_N(0)
#define RIG_ANT_2 RIG_ANT_N(1)
#define RIG_ANT_3 RIG_ANT_N(2)
#define RIG_ANT_4 RIG_ANT_N(3)
#define RIG_ANT_5 RIG_ANT_N(4)
#define RIG_ANT_UNKNOWN RIG_ANT_N(30)
#define RIG_ANT_CURR RIG_ANT_N(31)
#define RIG_ANT_MAX 32
//! @cond Doxygen_Suppress
#define RIG_AGC_LAST RIG_AGC_AUTO
//! @endcond
#if 1 // deprecated
/**
* \brief Level display meters
*/
enum meter_level_e {
RIG_METER_NONE = 0, /*< No display meter */
RIG_METER_SWR = (1 << 0), /*< Stationary Wave Ratio */
RIG_METER_COMP = (1 << 1), /*< Compression level */
RIG_METER_ALC = (1 << 2), /*< ALC */
RIG_METER_IC = (1 << 3), /*< IC */
RIG_METER_DB = (1 << 4), /*< DB */
RIG_METER_PO = (1 << 5), /*< Power Out */
RIG_METER_VDD = (1 << 6), /*< Final Amp Voltage */
RIG_METER_TEMP = (1 << 7) /*< Final Amp Temperature */
};
#endif
/**
* \brief Universal approach for passing values
*
* \sa rig_set_level(), rig_get_level(), rig_set_parm(), rig_get_parm()
*/
typedef union {
signed int i; /*!< Signed integer */
float f; /*!< Single precision float */
char *s; /*!< Pointer to char string */
const char *cs; /*!< Pointer to constant char string */
//! @cond Doxygen_Suppress
struct {
int l; /*!< Length of data */
unsigned char *d; /* Pointer to data buffer */
} b;
//! @endcond
} value_t;
/**
* \brief Rig Level Settings
*
* Various operating levels supported by a rig.\n
* \c STRING used in rigctl
*
* \sa rig_parse_level(), rig_strlevel()
*/
typedef uint64_t rig_level_e;
#define RIG_LEVEL_NONE 0 /*!< '' -- No Level */
#define RIG_LEVEL_PREAMP CONSTANT_64BIT_FLAG(0) /*!< \c PREAMP -- Preamp, arg int (dB) */
#define RIG_LEVEL_ATT CONSTANT_64BIT_FLAG(1) /*!< \c ATT -- Attenuator, arg int (dB) */
#define RIG_LEVEL_VOXDELAY CONSTANT_64BIT_FLAG(2) /*!< \c VOXDELAY -- VOX delay, arg int (tenth of seconds) */
#define RIG_LEVEL_AF CONSTANT_64BIT_FLAG(3) /*!< \c AF -- Volume, arg float [0.0 ... 1.0] */
#define RIG_LEVEL_RF CONSTANT_64BIT_FLAG(4) /*!< \c RF -- RF gain (not TX power) arg float [0.0 ... 1.0] */
#define RIG_LEVEL_SQL CONSTANT_64BIT_FLAG(5) /*!< \c SQL -- Squelch, arg float [0.0 ... 1.0] */
#define RIG_LEVEL_IF CONSTANT_64BIT_FLAG(6) /*!< \c IF shift -- IF, arg int (+/-Hz) */
#define RIG_LEVEL_APF CONSTANT_64BIT_FLAG(7) /*!< \c APF -- Audio Peak Filter, arg float [0.0 ... 1.0] */
#define RIG_LEVEL_NR CONSTANT_64BIT_FLAG(8) /*!< \c NR -- Noise Reduction, arg float [0.0 ... 1.0] */
#define RIG_LEVEL_PBT_IN CONSTANT_64BIT_FLAG(9) /*!< \c PBT_IN -- Twin PBT (inside) arg float [0.0 ... 1.0] */
#define RIG_LEVEL_PBT_OUT CONSTANT_64BIT_FLAG(10) /*!< \c PBT_OUT -- Twin PBT (outside) arg float [0.0 ... 1.0] */
#define RIG_LEVEL_CWPITCH CONSTANT_64BIT_FLAG(11) /*!< \c CWPITCH -- CW pitch, arg int (Hz) */
#define RIG_LEVEL_RFPOWER CONSTANT_64BIT_FLAG(12) /*!< \c RFPOWER -- RF Power, arg float [0.0 ... 1.0] */
#define RIG_LEVEL_MICGAIN CONSTANT_64BIT_FLAG(13) /*!< \c MICGAIN -- MIC Gain, arg float [0.0 ... 1.0] */
#define RIG_LEVEL_KEYSPD CONSTANT_64BIT_FLAG(14) /*!< \c KEYSPD -- Key Speed, arg int (WPM) */
#define RIG_LEVEL_NOTCHF CONSTANT_64BIT_FLAG(15) /*!< \c NOTCHF -- Notch Freq., arg int (Hz) */
#define RIG_LEVEL_COMP CONSTANT_64BIT_FLAG(16) /*!< \c COMP -- Compressor, arg float [0.0 ... 1.0] */
#define RIG_LEVEL_AGC CONSTANT_64BIT_FLAG(17) /*!< \c AGC -- AGC, arg int (see enum agc_level_e) */
#define RIG_LEVEL_BKINDL CONSTANT_64BIT_FLAG(18) /*!< \c BKINDL -- BKin Delay, arg int (tenth of dots) */
#define RIG_LEVEL_BALANCE CONSTANT_64BIT_FLAG(19) /*!< \c BAL -- Balance (Dual Watch) arg float [0.0 ... 1.0] */
#define RIG_LEVEL_METER CONSTANT_64BIT_FLAG(20) /*!< \c METER -- Display meter, arg int (see enum meter_level_e) */
#define RIG_LEVEL_VOXGAIN CONSTANT_64BIT_FLAG(21) /*!< \c VOXGAIN -- VOX gain level, arg float [0.0 ... 1.0] */
#define RIG_LEVEL_ANTIVOX CONSTANT_64BIT_FLAG(22) /*!< \c ANTIVOX -- anti-VOX level, arg float [0.0 ... 1.0] */
#define RIG_LEVEL_SLOPE_LOW CONSTANT_64BIT_FLAG(23) /*!< \c SLOPE_LOW -- Slope tune, low frequency cut, arg int (Hz) */
#define RIG_LEVEL_SLOPE_HIGH CONSTANT_64BIT_FLAG(24) /*!< \c SLOPE_HIGH -- Slope tune, high frequency cut, arg int (Hz) */
#define RIG_LEVEL_BKIN_DLYMS CONSTANT_64BIT_FLAG(25) /*!< \c BKIN_DLYMS -- BKin Delay, arg int Milliseconds */
/*!< These are not settable */
#define RIG_LEVEL_RAWSTR CONSTANT_64BIT_FLAG(26) /*!< \c RAWSTR -- Raw (A/D) value for signal strength, specific to each rig, arg int */
//#define RIG_LEVEL_SQLSTAT CONSTANT_64BIT_FLAG(27) /*!< \c SQLSTAT -- SQL status, arg int (open=1/closed=0). Deprecated, use get_dcd instead */
#define RIG_LEVEL_SWR CONSTANT_64BIT_FLAG(28) /*!< \c SWR -- SWR, arg float [0.0 ... infinite] */
#define RIG_LEVEL_ALC CONSTANT_64BIT_FLAG(29) /*!< \c ALC -- ALC, arg float */
#define RIG_LEVEL_STRENGTH CONSTANT_64BIT_FLAG(30) /*!< \c STRENGTH -- Effective (calibrated) signal strength relative to S9, arg int (dB) */
/* RIG_LEVEL_BWC (1<<31) */ /*!< Bandwidth Control, arg int (Hz) */
#define RIG_LEVEL_RFPOWER_METER CONSTANT_64BIT_FLAG(32) /*!< \c RFPOWER_METER -- RF power output meter, arg float [0.0 ... 1.0] (percentage of maximum power) */
#define RIG_LEVEL_COMP_METER CONSTANT_64BIT_FLAG(33) /*!< \c COMP_METER -- Audio output level compression meter, arg float (dB) */
#define RIG_LEVEL_VD_METER CONSTANT_64BIT_FLAG(34) /*!< \c VD_METER -- Input voltage level meter, arg float (V, volts) */
#define RIG_LEVEL_ID_METER CONSTANT_64BIT_FLAG(35) /*!< \c ID_METER -- Current draw meter, arg float (A, amperes) */
#define RIG_LEVEL_NOTCHF_RAW CONSTANT_64BIT_FLAG(36) /*!< \c NOTCHF_RAW -- Notch Freq., arg float [0.0 ... 1.0] */
#define RIG_LEVEL_MONITOR_GAIN CONSTANT_64BIT_FLAG(37) /*!< \c MONITOR_GAIN -- Monitor gain (level for monitoring of transmitted audio) arg float [0.0 ... 1.0] */
#define RIG_LEVEL_NB CONSTANT_64BIT_FLAG(38) /*!< \c NB -- Noise Blanker level, arg float [0.0 ... 1.0] */
#define RIG_LEVEL_RFPOWER_METER_WATTS CONSTANT_64BIT_FLAG(39) /*!< \c RFPOWER_METER_WATTS -- RF power output meter, arg float [0.0 ... MAX] (output power in watts) */
#define RIG_LEVEL_SPECTRUM_MODE CONSTANT_64BIT_FLAG(40) /*!< \c SPECTRUM_MODE -- Spectrum scope mode, arg int (see enum rig_spectrum_mode_e). Supported modes defined in rig caps. */
#define RIG_LEVEL_SPECTRUM_SPAN CONSTANT_64BIT_FLAG(41) /*!< \c SPECTRUM_SPAN -- Spectrum scope span in center mode, arg int (Hz). Supported spans defined in rig caps. */
#define RIG_LEVEL_SPECTRUM_EDGE_LOW CONSTANT_64BIT_FLAG(42) /*!< \c SPECTRUM_EDGE_LOW -- Spectrum scope low edge in fixed mode, arg int (Hz) */
#define RIG_LEVEL_SPECTRUM_EDGE_HIGH CONSTANT_64BIT_FLAG(43) /*!< \c SPECTRUM_EDGE_HIGH -- Spectrum scope high edge in fixed mode, arg int (Hz) */
#define RIG_LEVEL_SPECTRUM_SPEED CONSTANT_64BIT_FLAG(44) /*!< \c SPECTRUM_SPEED -- Spectrum scope update speed, arg int (highest is fastest, define rig-specific granularity) */
#define RIG_LEVEL_SPECTRUM_REF CONSTANT_64BIT_FLAG(45) /*!< \c SPECTRUM_REF -- Spectrum scope reference display level, arg float (dB, define rig-specific granularity) */
#define RIG_LEVEL_SPECTRUM_AVG CONSTANT_64BIT_FLAG(46) /*!< \c SPECTRUM_AVG -- Spectrum scope averaging mode, arg int (see struct rig_spectrum_avg_mode). Supported averaging modes defined in rig caps. */
#define RIG_LEVEL_SPECTRUM_ATT CONSTANT_64BIT_FLAG(47) /*!< \c SPECTRUM_ATT -- Spectrum scope attenuator, arg int (dB). Supported attenuator values defined in rig caps. */
#define RIG_LEVEL_TEMP_METER CONSTANT_64BIT_FLAG(48) /*!< \c TEMP_METER -- arg float (C, centigrade) */
#define RIG_LEVEL_BAND_SELECT CONSTANT_64BIT_FLAG(49) /*!< \c BAND_SELECT -- arg enum BAND_ENUM */
#define RIG_LEVEL_50 CONSTANT_64BIT_FLAG(50) /*!< \c Future use */
#define RIG_LEVEL_51 CONSTANT_64BIT_FLAG(51) /*!< \c Future use */
#define RIG_LEVEL_52 CONSTANT_64BIT_FLAG(52) /*!< \c Future use */
#define RIG_LEVEL_53 CONSTANT_64BIT_FLAG(53) /*!< \c Future use */
#define RIG_LEVEL_54 CONSTANT_64BIT_FLAG(54) /*!< \c Future use */
#define RIG_LEVEL_55 CONSTANT_64BIT_FLAG(55) /*!< \c Future use */
#define RIG_LEVEL_56 CONSTANT_64BIT_FLAG(56) /*!< \c Future use */
#define RIG_LEVEL_57 CONSTANT_64BIT_FLAG(57) /*!< \c Future use */
#define RIG_LEVEL_58 CONSTANT_64BIT_FLAG(58) /*!< \c Future use */
#define RIG_LEVEL_59 CONSTANT_64BIT_FLAG(59) /*!< \c Future use */
#define RIG_LEVEL_60 CONSTANT_64BIT_FLAG(60) /*!< \c Future use */
#define RIG_LEVEL_61 CONSTANT_64BIT_FLAG(61) /*!< \c Future use */
#define RIG_LEVEL_62 CONSTANT_64BIT_FLAG(62) /*!< \c Future use */
#define RIG_LEVEL_63 CONSTANT_64BIT_FLAG(63) /*!< \c Future use */
//! @cond Doxygen_Suppress
#define RIG_LEVEL_FLOAT_LIST (RIG_LEVEL_AF|RIG_LEVEL_RF|RIG_LEVEL_SQL|RIG_LEVEL_APF|RIG_LEVEL_NR|RIG_LEVEL_PBT_IN|RIG_LEVEL_PBT_OUT|RIG_LEVEL_RFPOWER|RIG_LEVEL_MICGAIN|RIG_LEVEL_COMP|RIG_LEVEL_BALANCE|RIG_LEVEL_SWR|RIG_LEVEL_ALC|RIG_LEVEL_VOXGAIN|RIG_LEVEL_ANTIVOX|RIG_LEVEL_RFPOWER_METER|RIG_LEVEL_RFPOWER_METER_WATTS|RIG_LEVEL_COMP_METER|RIG_LEVEL_VD_METER|RIG_LEVEL_ID_METER|RIG_LEVEL_NOTCHF_RAW|RIG_LEVEL_MONITOR_GAIN|RIG_LEVEL_NB|RIG_LEVEL_SPECTRUM_REF|RIG_LEVEL_TEMP_METER)
#define RIG_LEVEL_READONLY_LIST (RIG_LEVEL_SWR|RIG_LEVEL_ALC|RIG_LEVEL_STRENGTH|RIG_LEVEL_RAWSTR|RIG_LEVEL_RFPOWER_METER|RIG_LEVEL_COMP_METER|RIG_LEVEL_VD_METER|RIG_LEVEL_ID_METER)
#define RIG_LEVEL_IS_FLOAT(l) ((l)&RIG_LEVEL_FLOAT_LIST)
#define RIG_LEVEL_SET(l) ((l)&~RIG_LEVEL_READONLY_LIST)
//! @endcond
/**
* \brief Rig Parameters
*
* Parameters are settings that are not VFO specific.\n
* \c STRING used in rigctl
*
* \sa rig_parse_parm(), rig_strparm()
*/
enum rig_parm_e {
RIG_PARM_NONE = 0, /*!< '' -- No Parm */
RIG_PARM_ANN = (1 << 0), /*!< \c ANN -- "Announce" level, see ann_t */
RIG_PARM_APO = (1 << 1), /*!< \c APO -- Auto power off, int in minute */
RIG_PARM_BACKLIGHT = (1 << 2), /*!< \c BACKLIGHT -- LCD light, float [0.0 ... 1.0] */
RIG_PARM_BEEP = (1 << 4), /*!< \c BEEP -- Beep on keypressed, int (0,1) */
RIG_PARM_TIME = (1 << 5), /*!< \c TIME -- hh:mm:ss, int in seconds from 00:00:00 */
RIG_PARM_BAT = (1 << 6), /*!< \c BAT -- battery level, float [0.0 ... 1.0] */
RIG_PARM_KEYLIGHT = (1 << 7), /*!< \c KEYLIGHT -- Button backlight, on/off */
RIG_PARM_SCREENSAVER = (1 << 8), /*!< \c SCREENSAVER -- rig specific timeouts */
RIG_PARM_AFIF = (1 << 9) /*!< \c AFIF -- 0=AF audio, 1=IF audio -- see IC-7300/9700/705 */
};
/**
* \brief Rig Cookie enumerations
*
* Cookies are used for a client to request exclusive control of the rig until the client releases the cookie
* Cookies will expire after 1 second unless renewed
* Normal flow would be cookie=rig_cookie(NULL, RIG_COOKIE_GET), rig op, rig_cookie(cookie, RIG_COOKIE_RENEW), rig op, etc....
*
*/
enum cookie_e {
RIG_COOKIE_GET, /*!< Setup a cookie */
RIG_COOKIE_RELEASE, /*!< Release a cookie */
RIG_COOKIE_RENEW, /*!< Renew a cookie */
};
/**
* \brief Multicast data items
* 3 different data item can be included in the multicast JSON
*/
enum multicast_item_e {
RIG_MULTICAST_POLL, // hamlib will be polling the rig for all rig items
RIG_MULTICAST_TRANSCEIVE, // transceive will be turned on and processed
RIG_MULTICAST_SPECTRUM // spectrum data will be included
};
//! @cond Doxygen_Suppress
#define RIG_PARM_FLOAT_LIST (RIG_PARM_BACKLIGHT|RIG_PARM_BAT|RIG_PARM_KEYLIGHT)
#define RIG_PARM_READONLY_LIST (RIG_PARM_BAT)
#define RIG_PARM_IS_FLOAT(l) ((l)&RIG_PARM_FLOAT_LIST)
#define RIG_PARM_SET(l) ((l)&~RIG_PARM_READONLY_LIST)
//! @endcond
/**
* \brief Setting
*
* This can be a func, a level or a parm.
* Each bit designates one of them.
*/
typedef uint64_t setting_t;
/**
* \brief Maximum # of rig settings
*
*/
#define RIG_SETTING_MAX 64
/**
* \brief Transceive mode
* The rig notifies the host of any event, like freq changed, mode changed, etc.
* \def RIG_TRN_OFF
* \deprecated
* Turn it off
* \brief Transceive mode
* \def RIG_TRN_RIG
* \deprecated
* RIG_TRN_RIG means the rig acts asynchronously
* \brief Transceive mode
* \def RIG_TRN_POLL
* \deprecated
* RIG_TRN_POLL means we have to poll the rig
*
*/
#define RIG_TRN_OFF 0
#define RIG_TRN_RIG 1
#define RIG_TRN_POLL 2
/**
* \brief Rig Function Settings
*
* Various operating functions supported by a rig.\n
* \c STRING used in rigctl/rigctld
*
* \sa rig_parse_func(), rig_strfunc()
*/
/*
* The C standard dictates that an enum constant is a 32 bit signed integer.
* Setting a constant's bit 31 created a negative value that on amd64 had the
* upper 32 bits set as well when assigned to the misc.c:rig_func_str structure.
* This caused misc.c:rig_strfunc() to fail its comparison for RIG_FUNC_XIT
* on amd64 (x86_64). To use bit 31 as an unsigned long, preprocessor macros
* have been used instead as a 'const unsigned long' which cannot be used to
* initialize the rig_func_str.func members. TNX KA6MAL, AC6SL. - N0NB
*/
#define RIG_FUNC_NONE 0 /*!< '' -- No Function */
#define RIG_FUNC_FAGC CONSTANT_64BIT_FLAG (0) /*!< \c FAGC -- Fast AGC */
#define RIG_FUNC_NB CONSTANT_64BIT_FLAG (1) /*!< \c NB -- Noise Blanker */
#define RIG_FUNC_COMP CONSTANT_64BIT_FLAG (2) /*!< \c COMP -- Speech Compression */
#define RIG_FUNC_VOX CONSTANT_64BIT_FLAG (3) /*!< \c VOX -- Voice Operated Relay */
#define RIG_FUNC_TONE CONSTANT_64BIT_FLAG (4) /*!< \c TONE -- CTCSS Tone TX */
#define RIG_FUNC_TSQL CONSTANT_64BIT_FLAG (5) /*!< \c TSQL -- CTCSS Activate/De-activate RX */
#define RIG_FUNC_SBKIN CONSTANT_64BIT_FLAG (6) /*!< \c SBKIN -- Semi Break-in (CW mode) */
#define RIG_FUNC_FBKIN CONSTANT_64BIT_FLAG (7) /*!< \c FBKIN -- Full Break-in (CW mode) */
#define RIG_FUNC_ANF CONSTANT_64BIT_FLAG (8) /*!< \c ANF -- Automatic Notch Filter (DSP) */
#define RIG_FUNC_NR CONSTANT_64BIT_FLAG (9) /*!< \c NR -- Noise Reduction (DSP) */
#define RIG_FUNC_AIP CONSTANT_64BIT_FLAG (10) /*!< \c AIP -- RF pre-amp (AIP on Kenwood, IPO on Yaesu, etc.) */
#define RIG_FUNC_APF CONSTANT_64BIT_FLAG (11) /*!< \c APF -- Audio Peak Filter */
#define RIG_FUNC_MON CONSTANT_64BIT_FLAG (12) /*!< \c MON -- Monitor transmitted signal */
#define RIG_FUNC_MN CONSTANT_64BIT_FLAG (13) /*!< \c MN -- Manual Notch */
#define RIG_FUNC_RF CONSTANT_64BIT_FLAG (14) /*!< \c RF -- RTTY Filter */
#define RIG_FUNC_ARO CONSTANT_64BIT_FLAG (15) /*!< \c ARO -- Auto Repeater Offset */
#define RIG_FUNC_LOCK CONSTANT_64BIT_FLAG (16) /*!< \c LOCK -- Lock */
#define RIG_FUNC_MUTE CONSTANT_64BIT_FLAG (17) /*!< \c MUTE -- Mute */
#define RIG_FUNC_VSC CONSTANT_64BIT_FLAG (18) /*!< \c VSC -- Voice Scan Control */
#define RIG_FUNC_REV CONSTANT_64BIT_FLAG (19) /*!< \c REV -- Reverse transmit and receive frequencies */
#define RIG_FUNC_SQL CONSTANT_64BIT_FLAG (20) /*!< \c SQL -- Turn Squelch Monitor on/off */
#define RIG_FUNC_ABM CONSTANT_64BIT_FLAG (21) /*!< \c ABM -- Auto Band Mode */
#define RIG_FUNC_BC CONSTANT_64BIT_FLAG (22) /*!< \c BC -- Beat Canceller */
#define RIG_FUNC_MBC CONSTANT_64BIT_FLAG (23) /*!< \c MBC -- Manual Beat Canceller */
#define RIG_FUNC_RIT CONSTANT_64BIT_FLAG (24) /*!< \c RIT -- Receiver Incremental Tuning */
#define RIG_FUNC_AFC CONSTANT_64BIT_FLAG (25) /*!< \c AFC -- Auto Frequency Control ON/OFF */
#define RIG_FUNC_SATMODE CONSTANT_64BIT_FLAG (26) /*!< \c SATMODE -- Satellite mode ON/OFF */
#define RIG_FUNC_SCOPE CONSTANT_64BIT_FLAG (27) /*!< \c SCOPE -- Simple bandscope ON/OFF */
#define RIG_FUNC_RESUME CONSTANT_64BIT_FLAG (28) /*!< \c RESUME -- Scan auto-resume */
#define RIG_FUNC_TBURST CONSTANT_64BIT_FLAG (29) /*!< \c TBURST -- 1750 Hz tone burst */
#define RIG_FUNC_TUNER CONSTANT_64BIT_FLAG (30) /*!< \c TUNER -- Enable automatic tuner */
#define RIG_FUNC_XIT CONSTANT_64BIT_FLAG (31) /*!< \c XIT -- Transmitter Incremental Tuning */
#ifndef SWIGLUAHIDE
/* Hide the top 32 bits from the old Lua binding as they can't be represented */
#define RIG_FUNC_NB2 CONSTANT_64BIT_FLAG (32) /*!< \c NB2 -- 2nd Noise Blanker */
#define RIG_FUNC_CSQL CONSTANT_64BIT_FLAG (33) /*!< \c CSQL -- DCS Squelch setting */
#define RIG_FUNC_AFLT CONSTANT_64BIT_FLAG (34) /*!< \c AFLT -- AF Filter setting */
#define RIG_FUNC_ANL CONSTANT_64BIT_FLAG (35) /*!< \c ANL -- Noise limiter setting */
#define RIG_FUNC_BC2 CONSTANT_64BIT_FLAG (36) /*!< \c BC2 -- 2nd Beat Cancel */
#define RIG_FUNC_DUAL_WATCH CONSTANT_64BIT_FLAG (37) /*!< \c DUAL_WATCH -- Dual Watch / Sub Receiver */
#define RIG_FUNC_DIVERSITY CONSTANT_64BIT_FLAG (38) /*!< \c DIVERSITY -- Diversity receive */
#define RIG_FUNC_DSQL CONSTANT_64BIT_FLAG (39) /*!< \c DSQL -- Digital modes squelch */
#define RIG_FUNC_SCEN CONSTANT_64BIT_FLAG (40) /*!< \c SCEN -- scrambler/encryption */
#define RIG_FUNC_SLICE CONSTANT_64BIT_FLAG (41) /*!< \c Rig slice selection -- Flex */
#define RIG_FUNC_TRANSCEIVE CONSTANT_64BIT_FLAG (42) /*!< \c TRANSCEIVE -- Send radio state changes automatically ON/OFF */
#define RIG_FUNC_SPECTRUM CONSTANT_64BIT_FLAG (43) /*!< \c SPECTRUM -- Spectrum scope data output ON/OFF */
#define RIG_FUNC_SPECTRUM_HOLD CONSTANT_64BIT_FLAG (44) /*!< \c SPECTRUM_HOLD -- Pause spectrum scope updates ON/OFF */
#define RIG_FUNC_SEND_MORSE CONSTANT_64BIT_FLAG (45) /*!< \c SEND_MORSE -- Send specified characters using CW */
#define RIG_FUNC_SEND_VOICE_MEM CONSTANT_64BIT_FLAG (46) /*!< \c SEND_VOICE_MEM -- Transmit in SSB message stored in memory */
#define RIG_FUNC_BIT47 CONSTANT_64BIT_FLAG (47) /*!< \c available for future RIG_FUNC items */
#define RIG_FUNC_BIT48 CONSTANT_64BIT_FLAG (48) /*!< \c available for future RIG_FUNC items */
#define RIG_FUNC_BIT49 CONSTANT_64BIT_FLAG (49) /*!< \c available for future RIG_FUNC items */
#define RIG_FUNC_BIT50 CONSTANT_64BIT_FLAG (50) /*!< \c available for future RIG_FUNC items */
#define RIG_FUNC_BIT51 CONSTANT_64BIT_FLAG (51) /*!< \c available for future RIG_FUNC items */
#define RIG_FUNC_BIT52 CONSTANT_64BIT_FLAG (52) /*!< \c available for future RIG_FUNC items */
#define RIG_FUNC_BIT53 CONSTANT_64BIT_FLAG (53) /*!< \c available for future RIG_FUNC items */
#define RIG_FUNC_BIT54 CONSTANT_64BIT_FLAG (54) /*!< \c available for future RIG_FUNC items */
#define RIG_FUNC_BIT55 CONSTANT_64BIT_FLAG (55) /*!< \c available for future RIG_FUNC items */
#define RIG_FUNC_BIT56 CONSTANT_64BIT_FLAG (56) /*!< \c available for future RIG_FUNC items */
#define RIG_FUNC_BIT57 CONSTANT_64BIT_FLAG (57) /*!< \c available for future RIG_FUNC items */
#define RIG_FUNC_BIT58 CONSTANT_64BIT_FLAG (58) /*!< \c available for future RIG_FUNC items */
#define RIG_FUNC_BIT59 CONSTANT_64BIT_FLAG (59) /*!< \c available for future RIG_FUNC items */
#define RIG_FUNC_BIT60 CONSTANT_64BIT_FLAG (60) /*!< \c available for future RIG_FUNC items */
#define RIG_FUNC_BIT61 CONSTANT_64BIT_FLAG (61) /*!< \c available for future RIG_FUNC items */
#define RIG_FUNC_BIT62 CONSTANT_64BIT_FLAG (62) /*!< \c available for future RIG_FUNC items */
#define RIG_FUNC_BIT63 CONSTANT_64BIT_FLAG (63) /*!< \c available for future RIG_FUNC items */
/* 63 is this highest bit number that can be used */
#endif
/**
* \brief power unit macros
* \def mW
* Converts a power level integer to milliwatts. This is limited to 2
* megawatts on 32 bit systems.
*/
#define mW(p) ((int)(p))
/**
* \brief power unit macros
* \def Watts
*
* Converts a power level integer to watts. This is limited to 2
* gigawatts on 32 bit systems.
*/
#define Watts(p) ((int)((p)*1000))
/**
* \brief power unit macros
* \def W
*
* Same as Watts for the person who is too lazy to type Watts :-)
*/
#define W(p) Watts(p)
#if 0 // deprecating kW macro as this doesn't make sense
/**
* \brief power unit macros
* \def kW
*
* Same as Watts for the person who is too lazy to type Watts :-)
*/
#define kW(p) ((int)((p)*1000000L))
#endif
/**
* \brief Radio mode
*
* Various modes supported by a rig.\n
* \c STRING used in rigctl
*
* \sa rig_parse_mode(), rig_strrmode()
* TODO: Add new 8600 modes to rig2icom_mode() and icom2rig_mode() in frame.c
*/
typedef uint64_t rmode_t;
#define RIG_MODE_NONE 0 /*!< '' -- None */
#define RIG_MODE_AM CONSTANT_64BIT_FLAG (0) /*!< \c AM -- Amplitude Modulation */
#define RIG_MODE_CW CONSTANT_64BIT_FLAG (1) /*!< \c CW -- CW "normal" sideband */
#define RIG_MODE_USB CONSTANT_64BIT_FLAG (2) /*!< \c USB -- Upper Side Band */
#define RIG_MODE_LSB CONSTANT_64BIT_FLAG (3) /*!< \c LSB -- Lower Side Band */
#define RIG_MODE_RTTY CONSTANT_64BIT_FLAG (4) /*!< \c RTTY -- Radio Teletype */
#define RIG_MODE_FM CONSTANT_64BIT_FLAG (5) /*!< \c FM -- "narrow" band FM */
#define RIG_MODE_WFM CONSTANT_64BIT_FLAG (6) /*!< \c WFM -- broadcast wide FM */
#define RIG_MODE_CWR CONSTANT_64BIT_FLAG (7) /*!< \c CWR -- CW "reverse" sideband */
#define RIG_MODE_RTTYR CONSTANT_64BIT_FLAG (8) /*!< \c RTTYR -- RTTY "reverse" sideband */
#define RIG_MODE_AMS CONSTANT_64BIT_FLAG (9) /*!< \c AMS -- Amplitude Modulation Synchronous */
#define RIG_MODE_PKTLSB CONSTANT_64BIT_FLAG (10) /*!< \c PKTLSB -- Packet/Digital LSB mode (dedicated port) */
#define RIG_MODE_PKTUSB CONSTANT_64BIT_FLAG (11) /*!< \c PKTUSB -- Packet/Digital USB mode (dedicated port) */
#define RIG_MODE_PKTFM CONSTANT_64BIT_FLAG (12) /*!< \c PKTFM -- Packet/Digital FM mode (dedicated port) */
#define RIG_MODE_ECSSUSB CONSTANT_64BIT_FLAG (13) /*!< \c ECSSUSB -- Exalted Carrier Single Sideband USB */
#define RIG_MODE_ECSSLSB CONSTANT_64BIT_FLAG (14) /*!< \c ECSSLSB -- Exalted Carrier Single Sideband LSB */
#define RIG_MODE_FAX CONSTANT_64BIT_FLAG (15) /*!< \c FAX -- Facsimile Mode */
#define RIG_MODE_SAM CONSTANT_64BIT_FLAG (16) /*!< \c SAM -- Synchronous AM double sideband */
#define RIG_MODE_SAL CONSTANT_64BIT_FLAG (17) /*!< \c SAL -- Synchronous AM lower sideband */
#define RIG_MODE_SAH CONSTANT_64BIT_FLAG (18) /*!< \c SAH -- Synchronous AM upper (higher) sideband */
#define RIG_MODE_DSB CONSTANT_64BIT_FLAG (19) /*!< \c DSB -- Double sideband suppressed carrier */
#define RIG_MODE_FMN CONSTANT_64BIT_FLAG (21) /*!< \c FMN -- FM Narrow Kenwood ts990s */
#define RIG_MODE_PKTAM CONSTANT_64BIT_FLAG (22) /*!< \c PKTAM -- Packet/Digital AM mode e.g. IC7300 */
#define RIG_MODE_P25 CONSTANT_64BIT_FLAG (23) /*!< \c P25 -- APCO/P25 VHF,UHF digital mode IC-R8600 */
#define RIG_MODE_DSTAR CONSTANT_64BIT_FLAG (24) /*!< \c D-Star -- VHF,UHF digital mode IC-R8600 */
#define RIG_MODE_DPMR CONSTANT_64BIT_FLAG (25) /*!< \c dPMR -- digital PMR, VHF,UHF digital mode IC-R8600 */
#define RIG_MODE_NXDNVN CONSTANT_64BIT_FLAG (26) /*!< \c NXDN-VN -- VHF,UHF digital mode IC-R8600 */
#define RIG_MODE_NXDN_N CONSTANT_64BIT_FLAG (27) /*!< \c NXDN-N -- VHF,UHF digital mode IC-R8600 */
#define RIG_MODE_DCR CONSTANT_64BIT_FLAG (28) /*!< \c DCR -- VHF,UHF digital mode IC-R8600 */
#define RIG_MODE_AMN CONSTANT_64BIT_FLAG (29) /*!< \c AM-N -- Narrow band AM mode IC-R30 */
#define RIG_MODE_PSK CONSTANT_64BIT_FLAG (30) /*!< \c PSK - Kenwood PSK and others */
#define RIG_MODE_PSKR CONSTANT_64BIT_FLAG (31) /*!< \c PSKR - Kenwood PSKR and others */
#ifndef SWIGLUAHIDE
/* hide the top 32 bits from the Lua binding as they will not work */
#define RIG_MODE_DD CONSTANT_64BIT_FLAG (32) /*!< \c DD Mode IC-9700 */
#define RIG_MODE_C4FM CONSTANT_64BIT_FLAG (33) /*!< \c Yaesu C4FM mode */
#define RIG_MODE_PKTFMN CONSTANT_64BIT_FLAG (34) /*!< \c Yaesu DATA-FM-N */
#define RIG_MODE_SPEC CONSTANT_64BIT_FLAG (35) /*!< \c Unfiltered as in PowerSDR */
#define RIG_MODE_CWN CONSTANT_64BIT_FLAG (36) /*!< \c CWN -- Narrow band CW (FT-736R) */
#define RIG_MODE_IQ CONSTANT_64BIT_FLAG (37) /*!< \c IQ mode for a couple of kit rigs */
#define RIG_MODE_BIT38 CONSTANT_64BIT_FLAG (38) /*!< \c reserved for future expansion */
#define RIG_MODE_BIT39 CONSTANT_64BIT_FLAG (39) /*!< \c reserved for future expansion */
#define RIG_MODE_BIT40 CONSTANT_64BIT_FLAG (40) /*!< \c reserved for future expansion */
#define RIG_MODE_BIT41 CONSTANT_64BIT_FLAG (41) /*!< \c reserved for future expansion */
#define RIG_MODE_BIT42 CONSTANT_64BIT_FLAG (42) /*!< \c reserved for future expansion */
#define RIG_MODE_BIT43 CONSTANT_64BIT_FLAG (43) /*!< \c reserved for future expansion */
#define RIG_MODE_BIT44 CONSTANT_64BIT_FLAG (44) /*!< \c reserved for future expansion */
#define RIG_MODE_BIT45 CONSTANT_64BIT_FLAG (45) /*!< \c reserved for future expansion */
#define RIG_MODE_BIT46 CONSTANT_64BIT_FLAG (46) /*!< \c reserved for future expansion */
#define RIG_MODE_BIT47 CONSTANT_64BIT_FLAG (47) /*!< \c reserved for future expansion */
#define RIG_MODE_BIT48 CONSTANT_64BIT_FLAG (48) /*!< \c reserved for future expansion */
#define RIG_MODE_BIT49 CONSTANT_64BIT_FLAG (49) /*!< \c reserved for future expansion */
#define RIG_MODE_BIT50 CONSTANT_64BIT_FLAG (50) /*!< \c reserved for future expansion */
#define RIG_MODE_BIT51 CONSTANT_64BIT_FLAG (51) /*!< \c reserved for future expansion */
#define RIG_MODE_BIT52 CONSTANT_64BIT_FLAG (52) /*!< \c reserved for future expansion */
#define RIG_MODE_BIT53 CONSTANT_64BIT_FLAG (53) /*!< \c reserved for future expansion */
#define RIG_MODE_BIT54 CONSTANT_64BIT_FLAG (54) /*!< \c reserved for future expansion */
#define RIG_MODE_BIT55 CONSTANT_64BIT_FLAG (55) /*!< \c reserved for future expansion */
#define RIG_MODE_BIT56 CONSTANT_64BIT_FLAG (56) /*!< \c reserved for future expansion */
#define RIG_MODE_BIT57 CONSTANT_64BIT_FLAG (57) /*!< \c reserved for future expansion */
#define RIG_MODE_BIT58 CONSTANT_64BIT_FLAG (58) /*!< \c reserved for future expansion */
#define RIG_MODE_BIT59 CONSTANT_64BIT_FLAG (59) /*!< \c reserved for future expansion */
#define RIG_MODE_BIT60 CONSTANT_64BIT_FLAG (60) /*!< \c reserved for future expansion */
#define RIG_MODE_BIT61 CONSTANT_64BIT_FLAG (61) /*!< \c reserved for future expansion */
#define RIG_MODE_BIT62 CONSTANT_64BIT_FLAG (62) /*!< \c reserved for future expansion */
#define RIG_MODE_TESTS_MAX CONSTANT_64BIT_FLAG (63) /*!< \c last bit available for 64-bit enum MUST ALWAYS BE LAST, Max Count for dumpcaps.c */
#endif
/**
* \brief macro for backends, not to be used by rig_set_mode et al.
*/
#define RIG_MODE_SSB (RIG_MODE_USB|RIG_MODE_LSB)
/**
* \brief macro for backends, not to be used by rig_set_mode et al.
*/
#define RIG_MODE_ECSS (RIG_MODE_ECSSUSB|RIG_MODE_ECSSLSB)
//! @cond Doxygen_Suppress
#define RIG_DBLST_END 0 /* end marker in a preamp/att level list */
#define RIG_IS_DBLST_END(d) ((d)==0)
//! @endcond
/**
* \brief Frequency range
*
* Put together a group of this struct in an array to define
* what frequencies your rig has access to.
*/
typedef struct freq_range_list {
freq_t startf; /*!< Start frequency */
freq_t endf; /*!< End frequency */
rmode_t modes; /*!< Bit field of RIG_MODE's */
int low_power; /*!< Lower RF power in mW, -1 for no power (ie. rx list) */
int high_power; /*!< Higher RF power in mW, -1 for no power (ie. rx list) */
vfo_t vfo; /*!< VFO list equipped with this range */
ant_t ant; /*!< Antenna list equipped with this range, 0 means all, RIG_ANT_CURR means dedicated to certain bands and automatically switches, no set_ant command */
char *label; /*!< Label for this range that explains why. e.g. Icom rigs USA, EUR, ITR, TPE, KOR */
} freq_range_t;
//! @cond Doxygen_Suppress
#define RIG_FRNG_END {Hz(0),Hz(0),RIG_MODE_NONE,0,0,RIG_VFO_NONE}
#define RIG_IS_FRNG_END(r) ((r).startf == Hz(0) && (r).endf == Hz(0))
//! @endcond
/**
* \brief Tuning step definition
*
* Lists the tuning steps available for each mode.
*
* If a ts field in the list has RIG_TS_ANY value, this means the rig allows
* its tuning step to be set to any value ranging from the lowest to the
* highest (if any) value in the list for that mode. The tuning step must be
* sorted in the ascending order, and the RIG_TS_ANY value, if present, must
* be the last one in the list.
*
* Note also that the minimum frequency resolution of the rig is determined by
* the lowest value in the Tuning step list.
*
* \sa rig_set_ts(), rig_get_resolution()
*/
struct tuning_step_list {
rmode_t modes; /*!< Bit field of RIG_MODE's */
shortfreq_t ts; /*!< Tuning step in Hz */
};
//! @cond Doxygen_Suppress
#define RIG_TS_ANY 0
#define RIG_TS_END {RIG_MODE_NONE, 0}
#define RIG_IS_TS_END(t) ((t).modes == RIG_MODE_NONE && (t).ts == 0)
//! @endcond
/**
* \brief Filter definition
*
* Lists the filters available for each mode.
*
* If more than one filter is available for a given mode, the first entry in
* the array will be the default filter to use for the normal passband of this
* mode. The first entry in the array below the default normal passband is
* the default narrow passband and the first entry in the array above the
* default normal passband is the default wide passband. Note: if there's no
* lower width or upper width, then narrow or respectively wide passband is
* equal to the default normal passband.
*
* If a width field in the list has RIG_FLT_ANY value, this means the rig
* allows its passband width to be set to any value ranging from the lowest to
* the highest value (if any) in the list for that mode. The RIG_FLT_ANY
* value, if present, must be the last one in the list.
*
* The width field is the narrowest passband in a transmit/receive chain with
* regard to different IF.
*
* \sa rig_set_mode(), rig_passband_normal(), rig_passband_narrow(), rig_passband_wide()
*/
struct filter_list {
rmode_t modes; /*!< Bit field of RIG_MODE's */
pbwidth_t width; /*!< Passband width in Hz */
};
//! @cond Doxygen_Suppress
#define RIG_FLT_ANY 0
#define RIG_FLT_END {RIG_MODE_NONE, 0}
#define RIG_IS_FLT_END(f) ((f).modes == RIG_MODE_NONE)
//! @endcond
/**
* \brief Empty channel_t.flags field
*/
#define RIG_CHFLAG_NONE 0
/**
* \brief skip memory channel during scan (lock out), channel_t.flags
*/
#define RIG_CHFLAG_SKIP (1<<0)
/**
* \brief DATA port mode flag
*/
#define RIG_CHFLAG_DATA (1<<1)
/**
* \brief programmed skip (PSKIP) memory channel during scan (lock out), channel_t.flags
*/
#define RIG_CHFLAG_PSKIP (1<<2)
/**
* \brief Extension attribute definition
*
*/
struct ext_list {
token_t token; /*!< Token ID */
value_t val; /*!< Value */
};
//! @cond Doxygen_Suppress
#define RIG_EXT_END {0, {.i=0}}
#define RIG_IS_EXT_END(x) ((x).token == 0)
//! @endcond
/**
* \brief Channel structure
*
* The channel struct stores all the attributes peculiar to a VFO.
*
* \sa rig_set_channel(), rig_get_channel()
*/
struct channel {
int channel_num; /*!< Channel number */
int bank_num; /*!< Bank number */
vfo_t vfo; /*!< VFO */
ant_t ant; /*!< Selected antenna */
freq_t freq; /*!< Receive frequency */
rmode_t mode; /*!< Receive mode */
pbwidth_t width; /*!< Receive passband width associated with mode */
freq_t tx_freq; /*!< Transmit frequency */
rmode_t tx_mode; /*!< Transmit mode */
pbwidth_t tx_width; /*!< Transmit passband width associated with mode */
split_t split; /*!< Split mode */
vfo_t tx_vfo; /*!< Split transmit VFO */
rptr_shift_t rptr_shift; /*!< Repeater shift */
shortfreq_t rptr_offs; /*!< Repeater offset */
shortfreq_t tuning_step; /*!< Tuning step */
shortfreq_t rit; /*!< RIT */
shortfreq_t xit; /*!< XIT */
setting_t funcs; /*!< Function status */
value_t levels[RIG_SETTING_MAX]; /*!< Level values */
tone_t ctcss_tone; /*!< CTCSS tone */
tone_t ctcss_sql; /*!< CTCSS squelch tone */
tone_t dcs_code; /*!< DCS code */
tone_t dcs_sql; /*!< DCS squelch code */
int scan_group; /*!< Scan group */
unsigned int flags; /*!< Channel flags, see RIG_CHFLAG's */
char channel_desc[HAMLIB_MAXCHANDESC]; /*!< Name */
struct ext_list
*ext_levels; /*!< Extension level value list, NULL ended. ext_levels can be NULL */
};
/**
* \brief Channel structure typedef
*/
typedef struct channel channel_t;
/**
* \brief Channel capability definition
*
* Definition of the attributes that can be stored/retrieved in/from memory
*/
struct channel_cap {
unsigned bank_num: 1; /*!< Bank number */
unsigned vfo: 1; /*!< VFO */
unsigned ant: 1; /*!< Selected antenna */
unsigned freq: 1; /*!< Receive frequency */
unsigned mode: 1; /*!< Receive mode */
unsigned width: 1; /*!< Receive passband width associated with mode */
unsigned tx_freq: 1; /*!< Transmit frequency */
unsigned tx_mode: 1; /*!< Transmit mode */
unsigned tx_width: 1; /*!< Transmit passband width associated with mode */
unsigned split: 1; /*!< Split mode */
unsigned tx_vfo: 1; /*!< Split transmit VFO */
unsigned rptr_shift: 1; /*!< Repeater shift */
unsigned rptr_offs: 1; /*!< Repeater offset */
unsigned tuning_step: 1; /*!< Tuning step */
unsigned rit: 1; /*!< RIT */
unsigned xit: 1; /*!< XIT */
setting_t funcs; /*!< Function status */
setting_t levels; /*!< Level values */
unsigned ctcss_tone: 1; /*!< CTCSS tone */
unsigned ctcss_sql: 1; /*!< CTCSS squelch tone */
unsigned dcs_code: 1; /*!< DCS code */
unsigned dcs_sql: 1; /*!< DCS squelch code */
unsigned scan_group: 1; /*!< Scan group */
unsigned flags: 1; /*!< Channel flags */
unsigned channel_desc: 1; /*!< Name */
unsigned ext_levels: 1; /*!< Extension level value list */
};
/**
* \brief Channel cap
*/
typedef struct channel_cap channel_cap_t;
/**
* \brief Memory channel type definition
*
* Definition of memory types. Depending on the type, the content
* of the memory channel has to be interpreted accordingly.
* For instance, a RIG_MTYPE_EDGE channel_t will hold only a start
* or stop frequency.
*
* \sa chan_list()
*/
typedef enum {
RIG_MTYPE_NONE = 0, /*!< None */
RIG_MTYPE_MEM, /*!< Regular */
RIG_MTYPE_EDGE, /*!< Scan edge */
RIG_MTYPE_CALL, /*!< Call channel */
RIG_MTYPE_MEMOPAD, /*!< Memory pad */
RIG_MTYPE_SAT, /*!< Satellite */
RIG_MTYPE_BAND, /*!< VFO/Band channel */
RIG_MTYPE_PRIO /*!< Priority channel */
} chan_type_t;
/**
* \brief Memory channel list definition
*
* Example for the Ic706MkIIG (99 memory channels, 2 scan edges, 2 call chans):
\code
chan_t chan_list[] = {
{ 1, 99, RIG_MTYPE_MEM },
{ 100, 103, RIG_MTYPE_EDGE },
{ 104, 105, RIG_MTYPE_CALL },
RIG_CHAN_END
}
\endcode
*/
struct chan_list {
int startc; /*!< Starting memory channel \b number */
int endc; /*!< Ending memory channel \b number */
chan_type_t type; /*!< Memory type. see chan_type_t */
channel_cap_t
mem_caps; /*!< Definition of attributes that can be stored/retrieved */
};
//! @cond Doxygen_Suppress
#define RIG_CHAN_END {0,0,RIG_MTYPE_NONE}
#define RIG_IS_CHAN_END(c) ((c).type == RIG_MTYPE_NONE)
//! @endcond
/**
* \brief Special memory channel value to tell rig_lookup_mem_caps() to retrieve all the ranges
*/
#define RIG_MEM_CAPS_ALL -1
/**
* \brief chan_t type
*/
typedef struct chan_list chan_t;
/**
* \brief level/parm granularity definition
*
* The granularity is undefined if min = 0, max = 0, and step = 0.
*
* For float settings, if min.f = 0 and max.f = 0 (and step.f! = 0), max.f is
* assumed to be actually equal to 1.0.
*
* If step = 0 (and min and/or max are not null), then this means step can
* have maximum resolution, depending on type (int or float).
*/
struct gran {
value_t min; /*!< Minimum value */
value_t max; /*!< Maximum value */
value_t step; /*!< Step */
};
/**
* \brief gran_t type
*/
typedef struct gran gran_t;
/**
* \brief Calibration table struct
*/
struct cal_table {
int size; /*!< number of plots in the table */
struct {
int raw; /*!< raw (A/D) value, as returned by \a RIG_LEVEL_RAWSTR */
int val; /*!< associated value, basically the measured dB value */
} table[HAMLIB_MAX_CAL_LENGTH]; /*!< table of plots */
};
/**
* \brief calibration table type
*
* cal_table_t is a data type suited to hold linear calibration.
* cal_table_t.size tells the number of plots cal_table_t.table contains.
*
* If a value is below or equal to cal_table_t.table[0].raw,
* rig_raw2val() will return cal_table_t.table[0].val.
*
* If a value is greater or equal to cal_table_t.table[cal_table_t.size-1].raw,
* rig_raw2val() will return cal_table_t.table[cal_table_t.size-1].val.
*/
typedef struct cal_table cal_table_t;
//! @cond Doxygen_Suppress
#define EMPTY_STR_CAL { 0, { { 0, 0 }, } }
//! @endcond Doxygen_Suppress
/**
* \brief Calibration table struct for float values
*/
struct cal_table_float {
int size; /*!< number of plots in the table */
struct {
int raw; /*!< raw (A/D) value */
float val; /*!< associated value */
} table[HAMLIB_MAX_CAL_LENGTH]; /*!< table of plots */
};
/**
* \brief calibration table type for float values
*
* cal_table_float_t is a data type suited to hold linear calibration.
* cal_table_float_t.size tells the number of plots cal_table_float_t.table contains.
*
* If a value is below or equal to cal_table_float_t.table[0].raw,
* rig_raw2val_float() will return cal_table_float_t.table[0].val.
*
* If a value is greater or equal to cal_table_float_t.table[cal_table_float_t.size-1].raw,
* rig_raw2val_float() will return cal_table_float_t.table[cal_table_float_t.size-1].val.
*/
typedef struct cal_table_float cal_table_float_t;
//! @cond Doxygen_Suppress
#define EMPTY_FLOAT_CAL { 0, { { 0, 0f }, } }
typedef int (* chan_cb_t)(RIG *, channel_t **, int, const chan_t *, rig_ptr_t);
typedef int (* confval_cb_t)(RIG *,
const struct confparams *,
value_t *,
rig_ptr_t);
//! @endcond
/**
* \brief Spectrum scope
*/
struct rig_spectrum_scope
{
int id;
char *name;
};
/**
* \brief Spectrum scope modes
*/
enum rig_spectrum_mode_e {
RIG_SPECTRUM_MODE_NONE = 0,
RIG_SPECTRUM_MODE_CENTER, /*!< Spectrum scope centered around the VFO frequency */
RIG_SPECTRUM_MODE_FIXED, /*!< Spectrum scope edge frequencies are fixed */
RIG_SPECTRUM_MODE_CENTER_SCROLL, /*!< Spectrum scope edge frequencies are fixed, but identical to what the center mode would use. Scrolling is enabled. */
RIG_SPECTRUM_MODE_FIXED_SCROLL, /*!< Spectrum scope edge frequencies are fixed with scrolling enabled */
};
/**
* \brief Spectrum scope averaging modes
*/
struct rig_spectrum_avg_mode
{
int id;
char *name;
};
/**
* \brief Represents a single line of rig spectrum scope FFT data.
*
* The data levels specify the range of the spectrum scope FFT data.
* The minimum level should represent the lowest numeric value and the lowest signal level in dB.
* The maximum level should represent the highest numeric value and the highest signal level in dB.
* The data level values are assumed to represent the dB strength scale in a linear way.
*
* Note that the data level and signal strength ranges may change depending on the settings of the rig.
* At least on Kenwood the sub-scope provides different kind of data compared to the main scope.
*/
struct rig_spectrum_line
{
int id; /*!< Numeric ID of the spectrum scope data stream identifying the VFO/receiver. First ID is zero. Rigs with multiple scopes usually have identifiers, such as 0 = Main, 1 = Sub. */
int data_level_min; /*!< The numeric value that represents the minimum signal level. */
int data_level_max; /*!< The numeric value that represents the maximum signal level. */
double signal_strength_min; /*!< The strength of the minimum signal level in dB. */
double signal_strength_max; /*!< The strength of the maximum signal level in dB. */
enum rig_spectrum_mode_e spectrum_mode; /*!< Spectrum mode. */
freq_t center_freq; /*!< Center frequency of the spectrum scope in Hz in RIG_SPECTRUM_CENTER mode. */
freq_t span_freq; /*!< Span of the spectrum scope in Hz in RIG_SPECTRUM_CENTER mode. */
freq_t low_edge_freq; /*!< Low edge frequency of the spectrum scope in Hz in RIG_SPECTRUM_FIXED mode. */
freq_t high_edge_freq; /*!< High edge frequency of the spectrum scope in Hz in RIG_SPECTRUM_FIXED mode. */
size_t spectrum_data_length; /*!< Number of bytes of 8-bit spectrum data in the data buffer. The amount of data may vary if the rig has multiple spectrum scopes, depending on the scope. */
unsigned char *spectrum_data; /*!< 8-bit spectrum data covering bandwidth of either the span_freq in center mode or from low edge to high edge in fixed mode. A higher value represents higher signal strength. */
};
/**
* \brief Rig data structure.
*
* Basic rig type, can store some useful info about different radios. Each
* backend must be able to populate this structure, so we can make useful
* inquiries about capabilities.
*
* The main idea of this struct is that it will be defined by the backend rig
* driver, and will remain readonly for the application. Fields that need to
* be modifiable by the application are copied into the struct rig_state,
* which is a kind of private storage of the RIG instance.
*
* This way, you can have several rigs running within the same application,
* sharing the struct rig_caps of the backend, while keeping their own
* customized data.
*
* mdblack: Don't move or add fields around without bumping the version numbers
* DLL or shared library replacement depends on order
*/
//! @cond Doxygen_Suppress
#define RIG_MODEL(arg) .rig_model=arg,.macro_name=#arg
#define HAMLIB_CHECK_RIG_CAPS "HAMLIB_CHECK_RIG_CAPS"
struct rig_caps {
rig_model_t rig_model; /*!< Rig model. */
const char *model_name; /*!< Model name. */
const char *mfg_name; /*!< Manufacturer. */
const char *version; /*!< Driver version. */
const char *copyright; /*!< Copyright info. */
enum rig_status_e status; /*!< Driver status. */
int rig_type; /*!< Rig type. */
ptt_type_t ptt_type; /*!< Type of the PTT port. */
dcd_type_t dcd_type; /*!< Type of the DCD port. */
rig_port_t port_type; /*!< Type of communication port. */
int serial_rate_min; /*!< Minimum serial speed. */
int serial_rate_max; /*!< Maximum serial speed. */
int serial_data_bits; /*!< Number of data bits. */
int serial_stop_bits; /*!< Number of stop bits. */
enum serial_parity_e serial_parity; /*!< Parity. */
enum serial_handshake_e serial_handshake; /*!< Handshake. */
int write_delay; /*!< Delay between each byte sent out, in mS */
int post_write_delay; /*!< Delay between each commands send out, in mS */
int timeout; /*!< Timeout, in mS */
int retry; /*!< Maximum number of retries if command fails, 0 to disable */
setting_t has_get_func; /*!< List of get functions */
setting_t has_set_func; /*!< List of set functions */
setting_t has_get_level; /*!< List of get level */
setting_t has_set_level; /*!< List of set level */
setting_t has_get_parm; /*!< List of get parm */
setting_t has_set_parm; /*!< List of set parm */
gran_t level_gran[RIG_SETTING_MAX]; /*!< level granularity (i.e. steps) */
gran_t parm_gran[RIG_SETTING_MAX]; /*!< parm granularity (i.e. steps) */
const struct confparams *extparms; /*!< Extension parm list, \sa ext.c */
const struct confparams *extlevels; /*!< Extension level list, \sa ext.c */
const struct confparams *extfuncs; /*!< Extension func list, \sa ext.c */
int *ext_tokens; /*!< Extension token list */
tone_t *ctcss_list; /*!< CTCSS tones list, zero ended */
tone_t *dcs_list; /*!< DCS code list, zero ended */
int preamp[HAMLIB_MAXDBLSTSIZ]; /*!< Preamp list in dB, 0 terminated */
int attenuator[HAMLIB_MAXDBLSTSIZ]; /*!< Attenuator list in dB, 0 terminated */
shortfreq_t max_rit; /*!< max absolute RIT */
shortfreq_t max_xit; /*!< max absolute XIT */
shortfreq_t max_ifshift; /*!< max absolute IF-SHIFT */
int agc_level_count; /*!< Number of supported AGC levels. Zero indicates all modes should be available (for backwards-compatibility). */
enum agc_level_e agc_levels[HAMLIB_MAX_AGC_LEVELS]; /*!< Supported AGC levels */
ann_t announces; /*!< Announces bit field list */
vfo_op_t vfo_ops; /*!< VFO op bit field list */
scan_t scan_ops; /*!< Scan bit field list */
int targetable_vfo; /*!< Bit field list of direct VFO access commands */
int transceive; /*!< \deprecated Use async_data_supported instead */
int bank_qty; /*!< Number of banks */
int chan_desc_sz; /*!< Max length of memory channel name */
chan_t chan_list[HAMLIB_CHANLSTSIZ]; /*!< Channel list, zero ended */
// As of 2020-02-12 we know of 5 models from Icom USA, EUR, ITR, TPE, KOR for the IC-9700
// So we currently have 5 ranges we need to deal with
// The backend for the model should fill in the label field to explain what model it is
// The the IC-9700 in ic7300.c for an example
freq_range_t rx_range_list1[HAMLIB_FRQRANGESIZ]; /*!< Receive frequency range list #1 */
freq_range_t tx_range_list1[HAMLIB_FRQRANGESIZ]; /*!< Transmit frequency range list #1 */
freq_range_t rx_range_list2[HAMLIB_FRQRANGESIZ]; /*!< Receive frequency range list #2 */
freq_range_t tx_range_list2[HAMLIB_FRQRANGESIZ]; /*!< Transmit frequency range list #2 */
freq_range_t rx_range_list3[HAMLIB_FRQRANGESIZ]; /*!< Receive frequency range list #3 */
freq_range_t tx_range_list3[HAMLIB_FRQRANGESIZ]; /*!< Transmit frequency range list #3 */
freq_range_t rx_range_list4[HAMLIB_FRQRANGESIZ]; /*!< Receive frequency range list #4 */
freq_range_t tx_range_list4[HAMLIB_FRQRANGESIZ]; /*!< Transmit frequency range list #4 */
freq_range_t rx_range_list5[HAMLIB_FRQRANGESIZ]; /*!< Receive frequency range list #5 */
freq_range_t tx_range_list5[HAMLIB_FRQRANGESIZ]; /*!< Transmit frequency range list #5 */
struct tuning_step_list tuning_steps[HAMLIB_TSLSTSIZ]; /*!< Tuning step list */
struct filter_list filters[HAMLIB_FLTLSTSIZ]; /*!< mode/filter table, at -6dB */
cal_table_t str_cal; /*!< S-meter calibration table */
cal_table_float_t swr_cal; /*!< SWR meter calibration table */
cal_table_float_t alc_cal; /*!< ALC meter calibration table */
cal_table_float_t rfpower_meter_cal; /*!< RF power meter calibration table */
cal_table_float_t comp_meter_cal; /*!< COMP meter calibration table */
cal_table_float_t vd_meter_cal; /*!< Voltage meter calibration table */
cal_table_float_t id_meter_cal; /*!< Current draw meter calibration table */
struct rig_spectrum_scope spectrum_scopes[HAMLIB_MAX_SPECTRUM_SCOPES]; /*!< Supported spectrum scopes. The array index must match the scope ID. Last entry must have NULL name. */
enum rig_spectrum_mode_e spectrum_modes[HAMLIB_MAX_SPECTRUM_MODES]; /*!< Supported spectrum scope modes. Last entry must be RIG_SPECTRUM_MODE_NONE. */
freq_t spectrum_spans[HAMLIB_MAX_SPECTRUM_SPANS]; /*!< Supported spectrum scope frequency spans in Hz in center mode. Last entry must be 0. */
struct rig_spectrum_avg_mode spectrum_avg_modes[HAMLIB_MAX_SPECTRUM_AVG_MODES]; /*!< Supported spectrum scope averaging modes. Last entry must have NULL name. */
int spectrum_attenuator[HAMLIB_MAXDBLSTSIZ]; /*!< Spectrum attenuator list in dB, 0 terminated */
const struct confparams *cfgparams; /*!< Configuration parameters. */
const rig_ptr_t priv; /*!< Private data. */
/*
* Rig API
*
*/
int (*rig_init)(RIG *rig);
int (*rig_cleanup)(RIG *rig);
int (*rig_open)(RIG *rig);
int (*rig_close)(RIG *rig);
/*
* General API commands, from most primitive to least.. :()
* List Set/Get functions pairs
*/
int (*set_freq)(RIG *rig, vfo_t vfo, freq_t freq);
int (*get_freq)(RIG *rig, vfo_t vfo, freq_t *freq);
int (*set_mode)(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t width);
int (*get_mode)(RIG *rig, vfo_t vfo, rmode_t *mode, pbwidth_t *width);
int (*set_vfo)(RIG *rig, vfo_t vfo);
int (*get_vfo)(RIG *rig, vfo_t *vfo);
int (*set_ptt)(RIG *rig, vfo_t vfo, ptt_t ptt);
int (*get_ptt)(RIG *rig, vfo_t vfo, ptt_t *ptt);
int (*get_dcd)(RIG *rig, vfo_t vfo, dcd_t *dcd);
int (*set_rptr_shift)(RIG *rig, vfo_t vfo, rptr_shift_t rptr_shift);
int (*get_rptr_shift)(RIG *rig, vfo_t vfo, rptr_shift_t *rptr_shift);
int (*set_rptr_offs)(RIG *rig, vfo_t vfo, shortfreq_t offs);
int (*get_rptr_offs)(RIG *rig, vfo_t vfo, shortfreq_t *offs);
int (*set_split_freq)(RIG *rig, vfo_t vfo, freq_t tx_freq);
int (*get_split_freq)(RIG *rig, vfo_t vfo, freq_t *tx_freq);
int (*set_split_mode)(RIG *rig,
vfo_t vfo,
rmode_t tx_mode,
pbwidth_t tx_width);
int (*get_split_mode)(RIG *rig,
vfo_t vfo,
rmode_t *tx_mode,
pbwidth_t *tx_width);
int (*set_split_freq_mode)(RIG *rig,
vfo_t vfo,
freq_t tx_freq,
rmode_t tx_mode,
pbwidth_t tx_width);
int (*get_split_freq_mode)(RIG *rig,
vfo_t vfo,
freq_t *tx_freq,
rmode_t *tx_mode,
pbwidth_t *tx_width);
int (*set_split_vfo)(RIG *rig, vfo_t vfo, split_t split, vfo_t tx_vfo);
int (*get_split_vfo)(RIG *rig, vfo_t vfo, split_t *split, vfo_t *tx_vfo);
int (*set_rit)(RIG *rig, vfo_t vfo, shortfreq_t rit);
int (*get_rit)(RIG *rig, vfo_t vfo, shortfreq_t *rit);
int (*set_xit)(RIG *rig, vfo_t vfo, shortfreq_t xit);
int (*get_xit)(RIG *rig, vfo_t vfo, shortfreq_t *xit);
int (*set_ts)(RIG *rig, vfo_t vfo, shortfreq_t ts);
int (*get_ts)(RIG *rig, vfo_t vfo, shortfreq_t *ts);
int (*set_dcs_code)(RIG *rig, vfo_t vfo, tone_t code);
int (*get_dcs_code)(RIG *rig, vfo_t vfo, tone_t *code);
int (*set_tone)(RIG *rig, vfo_t vfo, tone_t tone);
int (*get_tone)(RIG *rig, vfo_t vfo, tone_t *tone);
int (*set_ctcss_tone)(RIG *rig, vfo_t vfo, tone_t tone);
int (*get_ctcss_tone)(RIG *rig, vfo_t vfo, tone_t *tone);
int (*set_dcs_sql)(RIG *rig, vfo_t vfo, tone_t code);
int (*get_dcs_sql)(RIG *rig, vfo_t vfo, tone_t *code);
int (*set_tone_sql)(RIG *rig, vfo_t vfo, tone_t tone);
int (*get_tone_sql)(RIG *rig, vfo_t vfo, tone_t *tone);
int (*set_ctcss_sql)(RIG *rig, vfo_t vfo, tone_t tone);
int (*get_ctcss_sql)(RIG *rig, vfo_t vfo, tone_t *tone);
int (*power2mW)(RIG *rig,
unsigned int *mwpower,
float power,
freq_t freq,
rmode_t mode);
int (*mW2power)(RIG *rig,
float *power,
unsigned int mwpower,
freq_t freq,
rmode_t mode);
int (*set_powerstat)(RIG *rig, powerstat_t status);
int (*get_powerstat)(RIG *rig, powerstat_t *status);
int (*reset)(RIG *rig, reset_t reset);
int (*set_ant)(RIG *rig, vfo_t vfo, ant_t ant, value_t option);
int (*get_ant)(RIG *rig, vfo_t vfo, ant_t ant, value_t *option, ant_t *ant_curr, ant_t *ant_tx, ant_t *ant_rx);
int (*set_level)(RIG *rig, vfo_t vfo, setting_t level, value_t val);
int (*get_level)(RIG *rig, vfo_t vfo, setting_t level, value_t *val);
int (*set_func)(RIG *rig, vfo_t vfo, setting_t func, int status);
int (*get_func)(RIG *rig, vfo_t vfo, setting_t func, int *status);
int (*set_parm)(RIG *rig, setting_t parm, value_t val);
int (*get_parm)(RIG *rig, setting_t parm, value_t *val);
int (*set_ext_level)(RIG *rig, vfo_t vfo, token_t token, value_t val);
int (*get_ext_level)(RIG *rig, vfo_t vfo, token_t token, value_t *val);
int (*set_ext_func)(RIG *rig, vfo_t vfo, token_t token, int status);
int (*get_ext_func)(RIG *rig, vfo_t vfo, token_t token, int *status);
int (*set_ext_parm)(RIG *rig, token_t token, value_t val);
int (*get_ext_parm)(RIG *rig, token_t token, value_t *val);
int (*set_conf)(RIG *rig, token_t token, const char *val);
int (*get_conf)(RIG *rig, token_t token, char *val);
int (*send_dtmf)(RIG *rig, vfo_t vfo, const char *digits);
int (*recv_dtmf)(RIG *rig, vfo_t vfo, char *digits, int *length);
int (*send_morse)(RIG *rig, vfo_t vfo, const char *msg);
int (*stop_morse)(RIG *rig, vfo_t vfo);
int (*wait_morse)(RIG *rig, vfo_t vfo);
int (*send_voice_mem)(RIG *rig, vfo_t vfo, int ch);
int (*set_bank)(RIG *rig, vfo_t vfo, int bank);
int (*set_mem)(RIG *rig, vfo_t vfo, int ch);
int (*get_mem)(RIG *rig, vfo_t vfo, int *ch);
int (*vfo_op)(RIG *rig, vfo_t vfo, vfo_op_t op);
int (*scan)(RIG *rig, vfo_t vfo, scan_t scan, int ch);
int (*set_trn)(RIG *rig, int trn);
int (*get_trn)(RIG *rig, int *trn);
int (*decode_event)(RIG *rig);
int (*set_channel)(RIG *rig, vfo_t vfo, const channel_t *chan);
int (*get_channel)(RIG *rig, vfo_t vfo, channel_t *chan, int read_only);
const char * (*get_info)(RIG *rig);
int (*set_chan_all_cb)(RIG *rig, vfo_t vfo, chan_cb_t chan_cb, rig_ptr_t);
int (*get_chan_all_cb)(RIG *rig, vfo_t vfo, chan_cb_t chan_cb, rig_ptr_t);
int (*set_mem_all_cb)(RIG *rig,
chan_cb_t chan_cb,
confval_cb_t parm_cb,
rig_ptr_t);
int (*get_mem_all_cb)(RIG *rig,
chan_cb_t chan_cb,
confval_cb_t parm_cb,
rig_ptr_t);
int (*set_vfo_opt)(RIG *rig, int status); // only for Net Rigctl device
int (*rig_get_vfo_info) (RIG *rig,
vfo_t vfo,
freq_t *freq,
rmode_t *mode,
pbwidth_t *width,
split_t *split);
int(*set_clock) (RIG *rig, int year, int month, int day, int hour, int min, int sec, double msec, int utc_offset);
int(*get_clock) (RIG *rig, int *year, int *month, int *day, int *hour, int *min, int *sec, double *msec, int *utc_offset);
const char *clone_combo_set; /*!< String describing key combination to enter load cloning mode */
const char *clone_combo_get; /*!< String describing key combination to enter save cloning mode */
const char *macro_name; /*!< Rig model macro name */
int async_data_supported; /*!< Indicates that rig is capable of outputting asynchronous data updates, such as transceive state updates or spectrum data. 1 if true, 0 otherwise. */
int (*read_frame_direct)(RIG *rig,
size_t buffer_length,
const unsigned char *buffer);
int (*is_async_frame)(RIG *rig,
size_t frame_length,
const unsigned char *frame);
int (*process_async_frame)(RIG *rig,
size_t frame_length,
const unsigned char *frame);
// this will be used to check rigcaps structure is compatible with client
char *hamlib_check_rig_caps; // a constant value we can check for hamlib integrity
int (*get_conf2)(RIG *rig, token_t token, char *val, int val_len);
int (*password)(RIG *rig, const char *key1); /*< Send encrypted password if rigctld is secured with -A/--password */
};
//! @endcond
/**
* \brief Enumeration of all rig_ functions
*
*/
//! @cond Doxygen_Suppress
// all functions enumerated for rig_get_function_ptr
enum rig_function_e {
RIG_FUNCTION_INIT,
RIG_FUNCTION_CLEANUP,
RIG_FUNCTION_OPEN,
RIG_FUNCTION_CLOSE,
RIG_FUNCTION_SET_FREQ,
RIG_FUNCTION_GET_FREQ,
RIG_FUNCTION_SET_MODE,
RIG_FUNCTION_GET_MODE,
RIG_FUNCTION_SET_VFO,
RIG_FUNCTION_GET_VFO,
RIG_FUNCTION_SET_PTT,
RIG_FUNCTION_GET_PTT,
RIG_FUNCTION_GET_DCD,
RIG_FUNCTION_SET_RPTR_SHIFT,
RIG_FUNCTION_GET_RPTR_SHIFT,
RIG_FUNCTION_SET_RPTR_OFFS,
RIG_FUNCTION_GET_RPTR_OFFS,
RIG_FUNCTION_SET_SPLIT_FREQ,
RIG_FUNCTION_GET_SPLIT_FREQ,
RIG_FUNCTION_SET_SPLIT_MODE,
RIG_FUNCTION_SET_SPLIT_FREQ_MODE,
RIG_FUNCTION_GET_SPLIT_FREQ_MODE,
RIG_FUNCTION_SET_SPLIT_VFO,
RIG_FUNCTION_GET_SPLIT_VFO,
RIG_FUNCTION_SET_RIT,
RIG_FUNCTION_GET_RIT,
RIG_FUNCTION_SET_XIT,
RIG_FUNCTION_GET_XIT,
RIG_FUNCTION_SET_TS,
RIG_FUNCTION_GET_TS,
RIG_FUNCTION_SET_DCS_CODE,
RIG_FUNCTION_GET_DCS_CODE,
RIG_FUNCTION_SET_TONE,
RIG_FUNCTION_GET_TONE,
RIG_FUNCTION_SET_CTCSS_TONE,
RIG_FUNCTION_GET_CTCSS_TONE,
RIG_FUNCTION_SET_DCS_SQL,
RIG_FUNCTION_GET_DCS_SQL,
RIG_FUNCTION_SET_TONE_SQL,
RIG_FUNCTION_GET_TONE_SQL,
RIG_FUNCTION_SET_CTCSS_SQL,
RIG_FUNCTION_GET_CTCSS_SQL,
RIG_FUNCTION_POWER2MW,
RIG_FUNCTION_MW2POWER,
RIG_FUNCTION_SET_POWERSTAT,
RIG_FUNCTION_GET_POWERSTAT,
RIG_FUNCTION_RESET,
RIG_FUNCTION_SET_ANT,
RIG_FUNCTION_GET_ANT,
RIG_FUNCTION_SET_LEVEL,
RIG_FUNCTION_GET_LEVEL,
RIG_FUNCTION_SET_FUNC,
RIG_FUNCTION_GET_FUNC,
RIG_FUNCTION_SET_PARM,
RIG_FUNCTION_GET_PARM,
RIG_FUNCTION_SET_EXT_LEVEL,
RIG_FUNCTION_GET_EXT_LEVEL,
RIG_FUNCTION_SET_EXT_FUNC,
RIG_FUNCTION_GET_EXT_FUNC,
RIG_FUNCTION_SET_EXT_PARM,
RIG_FUNCTION_GET_EXT_PARM,
RIG_FUNCTION_SET_CONF,
RIG_FUNCTION_GET_CONF,
RIG_FUNCTION_SEND_DTMF,
RIG_FUNCTION_SEND_MORSE,
RIG_FUNCTION_STOP_MORSE,
RIG_FUNCTION_WAIT_MORSE,
RIG_FUNCTION_SEND_VOICE_MEM,
RIG_FUNCTION_SET_BANK,
RIG_FUNCTION_SET_MEM,
RIG_FUNCTION_GET_MEM,
RIG_FUNCTION_VFO_OP,
RIG_FUNCTION_SCAN,
RIG_FUNCTION_SET_TRN,
RIG_FUNCTION_GET_TRN,
RIG_FUNCTION_DECODE_EVENT,
RIG_FUNCTION_SET_CHANNEL,
RIG_FUNCTION_GET_CHANNEL,
RIG_FUNCTION_GET_INFO,
RIG_FUNCTION_SET_CHAN_ALL_CB,
RIG_FUNCTION_GET_CHAN_ALL_CB,
RIG_FUNCTION_SET_MEM_ALL_CB,
RIG_FUNCTION_GET_MEM_ALL_CB,
RIG_FUNCTION_SET_VFO_OPT,
RIG_FUNCTION_READ_FRAME_DIRECT,
RIG_FUNCTION_IS_ASYNC_FRAME,
RIG_FUNCTION_PROCESS_ASYNC_FRAME,
RIG_FUNCTION_GET_CONF2,
};
/**
* \brief Function to return pointer to rig_* function
*
*/
//! @cond Doxygen_Suppress
extern HAMLIB_EXPORT (void *) rig_get_function_ptr(rig_model_t rig_model, enum rig_function_e rig_function);
/**
* \brief Enumeration of rig->caps values
*
*/
//! @cond Doxygen_Suppress
// values enumerated for rig->caps values
enum rig_caps_int_e {
RIG_CAPS_TARGETABLE_VFO,
RIG_CAPS_RIG_MODEL,
RIG_CAPS_PORT_TYPE,
RIG_CAPS_PTT_TYPE,
RIG_CAPS_HAS_GET_LEVEL
};
enum rig_caps_cptr_e {
RIG_CAPS_VERSION_CPTR,
RIG_CAPS_MFG_NAME_CPTR,
RIG_CAPS_MODEL_NAME_CPTR,
RIG_CAPS_STATUS_CPTR
};
/**
* \brief Function to return int value from rig->caps
* Does not support > 32-bit rig_caps values
*/
//! @cond Doxygen_Suppress
extern HAMLIB_EXPORT (long long) rig_get_caps_int(rig_model_t rig_model, enum rig_caps_int_e rig_caps);
/**
* \brief Function to return char pointer value from rig->caps
*
*/
//! @cond Doxygen_Suppress
extern HAMLIB_EXPORT (const char *) rig_get_caps_cptr(rig_model_t rig_model, enum rig_caps_cptr_e rig_caps);
struct hamlib_async_pipe;
typedef struct hamlib_async_pipe hamlib_async_pipe_t;
/**
* \brief Port definition
*
* Of course, looks like OO painstakingly programmed in C, sigh.
*/
//! @cond Doxygen_Suppress
// DO NOT CHANGE THIS STRUCTURE ALL UNTIL 5.0
// Right now it is static inside rig structure
// 5.0 will change it to a pointer which can then be added to
// At that point only add to the end of the stucture
typedef struct hamlib_port {
union {
rig_port_t rig; /*!< Communication port type */
ptt_type_t ptt; /*!< PTT port type */
dcd_type_t dcd; /*!< DCD port type */
} type;
int fd; /*!< File descriptor */
void *handle; /*!< handle for USB */
int write_delay; /*!< Delay between each byte sent out, in mS */
int post_write_delay; /*!< Delay between each commands send out, in mS */
struct {
int tv_sec, tv_usec;
} post_write_date; /*!< hamlib internal use */
int timeout; /*!< Timeout, in mS */
short retry; /*!< Maximum number of retries, 0 to disable */
short flushx; /*!< If true flush is done with read instead of TCFLUSH - MicroHam */
char pathname[HAMLIB_FILPATHLEN]; /*!< Port pathname */
union {
struct {
int rate; /*!< Serial baud rate */
int data_bits; /*!< Number of data bits */
int stop_bits; /*!< Number of stop bits */
enum serial_parity_e parity; /*!< Serial parity */
enum serial_handshake_e handshake; /*!< Serial handshake */
enum serial_control_state_e rts_state; /*!< RTS set state */
enum serial_control_state_e dtr_state; /*!< DTR set state */
} serial; /*!< serial attributes */
struct {
int pin; /*!< Parallel port pin number */
} parallel; /*!< parallel attributes */
struct {
int ptt_bitnum; /*!< Bit number for CM108 GPIO PTT */
} cm108; /*!< CM108 attributes */
struct {
int vid; /*!< Vendor ID */
int pid; /*!< Product ID */
int conf; /*!< Configuration */
int iface; /*!< interface */
int alt; /*!< alternate */
char *vendor_name; /*!< Vendor name (opt.) */
char *product; /*!< Product (opt.) */
} usb; /*!< USB attributes */
struct {
int on_value; /*!< GPIO: 1 == normal, GPION: 0 == inverted */
int value; /*!< Toggle PTT ON or OFF */
} gpio; /*!< GPIO attributes */
} parm; /*!< Port parameter union */
int client_port; /*!< client socket port for tcp connection */
RIG *rig; /*!< our parent RIG device */
int asyncio; /*!< enable asynchronous data handling if true -- async collides with python keyword so _async is used */
#if defined(_WIN32)
hamlib_async_pipe_t *sync_data_pipe; /*!< pipe data structure for synchronous data */
hamlib_async_pipe_t *sync_data_error_pipe; /*!< pipe data structure for synchronous data error codes */
#else
int fd_sync_write; /*!< file descriptor for writing synchronous data */
int fd_sync_read; /*!< file descriptor for reading synchronous data */
int fd_sync_error_write; /*!< file descriptor for writing synchronous data error codes */
int fd_sync_error_read; /*!< file descriptor for reading synchronous data error codes */
#endif
} hamlib_port_t;
// DO NOT CHANGE THIS STRUCTURE AT ALL
// Will be removed in 5.0
typedef struct hamlib_port_deprecated {
union {
rig_port_t rig; /*!< Communication port type */
ptt_type_t ptt; /*!< PTT port type */
dcd_type_t dcd; /*!< DCD port type */
} type;
int fd; /*!< File descriptor */
void *handle; /*!< handle for USB */
int write_delay; /*!< Delay between each byte sent out, in mS */
int post_write_delay; /*!< Delay between each commands send out, in mS */
struct {
int tv_sec, tv_usec;
} post_write_date; /*!< hamlib internal use */
int timeout; /*!< Timeout, in mS */
short retry; /*!< Maximum number of retries, 0 to disable */
short flushx; /*!< If true flush is done with read instead of TCFLUSH - MicroHam */
char pathname[HAMLIB_FILPATHLEN]; /*!< Port pathname */
union {
struct {
int rate; /*!< Serial baud rate */
int data_bits; /*!< Number of data bits */
int stop_bits; /*!< Number of stop bits */
enum serial_parity_e parity; /*!< Serial parity */
enum serial_handshake_e handshake; /*!< Serial handshake */
enum serial_control_state_e rts_state; /*!< RTS set state */
enum serial_control_state_e dtr_state; /*!< DTR set state */
} serial; /*!< serial attributes */
struct {
int pin; /*!< Parallel port pin number */
} parallel; /*!< parallel attributes */
struct {
int ptt_bitnum; /*!< Bit number for CM108 GPIO PTT */
} cm108; /*!< CM108 attributes */
struct {
int vid; /*!< Vendor ID */
int pid; /*!< Product ID */
int conf; /*!< Configuration */
int iface; /*!< interface */
int alt; /*!< alternate */
char *vendor_name; /*!< Vendor name (opt.) */
char *product; /*!< Product (opt.) */
} usb; /*!< USB attributes */
struct {
int on_value; /*!< GPIO: 1 == normal, GPION: 0 == inverted */
int value; /*!< Toggle PTT ON or OFF */
} gpio; /*!< GPIO attributes */
} parm; /*!< Port parameter union */
int client_port; /*!< client socket port for tcp connection */
RIG *rig; /*!< our parent RIG device */
} hamlib_port_t_deprecated;
//! @endcond
#if !defined(__APPLE__) || !defined(__cplusplus)
typedef hamlib_port_t_deprecated port_t_deprecated;
typedef hamlib_port_t port_t;
#endif
#define HAMLIB_ELAPSED_GET 0
#define HAMLIB_ELAPSED_SET 1
#define HAMLIB_ELAPSED_INVALIDATE 2
#define HAMLIB_CACHE_ALWAYS (-1) /*< value to set cache timeout to always use cache */
typedef enum {
HAMLIB_CACHE_ALL, // to set all cache timeouts at once
HAMLIB_CACHE_VFO,
HAMLIB_CACHE_FREQ,
HAMLIB_CACHE_MODE,
HAMLIB_CACHE_PTT,
HAMLIB_CACHE_SPLIT,
HAMLIB_CACHE_WIDTH
} hamlib_cache_t;
typedef enum {
TWIDDLE_OFF,
TWIDDLE_ON
} twiddle_state_t;
/**
* \brief Rig cache data
*
* This struct contains all the items we cache at the highest level
*/
struct rig_cache {
int timeout_ms; // the cache timeout for invalidating itself
vfo_t vfo;
//freq_t freq; // to be deprecated in 4.1 when full Main/Sub/A/B caching is implemented in 4.1
// other abstraction here is based on dual vfo rigs and mapped to all others
// So we have four possible states of rig
// MainA, MainB, SubA, SubB
// Main is the Main VFO and Sub is for the 2nd VFO
// Most rigs have MainA and MainB
// Dual VFO rigs can have SubA and SubB too
// For dual VFO rigs simplex operations are all done on MainA/MainB -- ergo this abstraction
freq_t freqCurr; // Other VFO
freq_t freqOther; // Other VFO
freq_t freqMainA; // VFO_A, VFO_MAIN, and VFO_MAINA
freq_t freqMainB; // VFO_B, VFO_SUB, and VFO_MAINB
freq_t freqMainC; // VFO_C, VFO_MAINC
freq_t freqSubA; // VFO_SUBA -- only for rigs with dual Sub VFOs
freq_t freqSubB; // VFO_SUBB -- only for rigs with dual Sub VFOs
freq_t freqSubC; // VFO_SUBC -- only for rigs with 3 Sub VFOs
freq_t freqMem; // VFO_MEM -- last MEM channel
rmode_t modeCurr;
rmode_t modeOther;
rmode_t modeMainA;
rmode_t modeMainB;
rmode_t modeMainC;
rmode_t modeSubA;
rmode_t modeSubB;
rmode_t modeSubC;
rmode_t modeMem;
pbwidth_t widthCurr; // if non-zero then rig has separate width for MainA
pbwidth_t widthOther; // if non-zero then rig has separate width for MainA
pbwidth_t widthMainA; // if non-zero then rig has separate width for MainA
pbwidth_t widthMainB; // if non-zero then rig has separate width for MainB
pbwidth_t widthMainC; // if non-zero then rig has separate width for MainC
pbwidth_t widthSubA; // if non-zero then rig has separate width for SubA
pbwidth_t widthSubB; // if non-zero then rig has separate width for SubB
pbwidth_t widthSubC; // if non-zero then rig has separate width for SubC
pbwidth_t widthMem; // if non-zero then rig has separate width for Mem
ptt_t ptt;
split_t split;
vfo_t split_vfo; // split caches two values
struct timespec time_freqCurr;
struct timespec time_freqOther;
struct timespec time_freqMainA;
struct timespec time_freqMainB;
struct timespec time_freqMainC;
struct timespec time_freqSubA;
struct timespec time_freqSubB;
struct timespec time_freqSubC;
struct timespec time_freqMem;
struct timespec time_vfo;
struct timespec time_modeCurr;
struct timespec time_modeOther;
struct timespec time_modeMainA;
struct timespec time_modeMainB;
struct timespec time_modeMainC;
struct timespec time_modeSubA;
struct timespec time_modeSubB;
struct timespec time_modeSubC;
struct timespec time_modeMem;
struct timespec time_widthCurr;
struct timespec time_widthOther;
struct timespec time_widthMainA;
struct timespec time_widthMainB;
struct timespec time_widthMainC;
struct timespec time_widthSubA;
struct timespec time_widthSubB;
struct timespec time_widthSubC;
struct timespec time_widthMem;
struct timespec time_ptt;
struct timespec time_split;
int satmode; // if rig is in satellite mode
};
/**
* \brief Rig state containing live data and customized fields.
*
* This struct contains live data, as well as a copy of capability fields
* that may be updated (ie. customized)
*
* It is NOT fine to move fields around as it can break share library offset
* As of 2021-03-03 vfo_list is the last known item being reference externally
* So any additions or changes to this structure must be at the end of the structure
*/
struct rig_state {
/********* ENSURE ANY NEW ITEMS ARE ADDED AT BOTTOM OF THIS STRUCTURE *********/
/*
* overridable fields
*/
// moving the hamlib_port_t to the end of rig_state and making it a pointer
// this should allow changes to hamlib_port_t without breaking shared libraries
// these will maintain a copy of the new port_t for backwards compatiblity
// to these offsets -- note these must stay until a major version update is done like 5.0
hamlib_port_t_deprecated rigport_deprecated; /*!< Rig port (internal use). */
hamlib_port_t_deprecated pttport_deprecated; /*!< PTT port (internal use). */
hamlib_port_t_deprecated dcdport_deprecated; /*!< DCD port (internal use). */
double vfo_comp; /*!< VFO compensation in PPM, 0.0 to disable */
int deprecated_itu_region; /*!< ITU region to select among freq_range_t */
freq_range_t rx_range_list[HAMLIB_FRQRANGESIZ]; /*!< Receive frequency range list */
freq_range_t tx_range_list[HAMLIB_FRQRANGESIZ]; /*!< Transmit frequency range list */
struct tuning_step_list tuning_steps[HAMLIB_TSLSTSIZ]; /*!< Tuning step list */
struct filter_list filters[HAMLIB_FLTLSTSIZ]; /*!< Mode/filter table, at -6dB */
cal_table_t str_cal; /*!< S-meter calibration table */
chan_t chan_list[HAMLIB_CHANLSTSIZ]; /*!< Channel list, zero ended */
shortfreq_t max_rit; /*!< max absolute RIT */
shortfreq_t max_xit; /*!< max absolute XIT */
shortfreq_t max_ifshift; /*!< max absolute IF-SHIFT */
ann_t announces; /*!< Announces bit field list */
int preamp[HAMLIB_MAXDBLSTSIZ]; /*!< Preamp list in dB, 0 terminated */
int attenuator[HAMLIB_MAXDBLSTSIZ]; /*!< Preamp list in dB, 0 terminated */
setting_t has_get_func; /*!< List of get functions */
setting_t has_set_func; /*!< List of set functions */
setting_t has_get_level; /*!< List of get level */
setting_t has_set_level; /*!< List of set level */
setting_t has_get_parm; /*!< List of get parm */
setting_t has_set_parm; /*!< List of set parm */
gran_t level_gran[RIG_SETTING_MAX]; /*!< level granularity */
gran_t parm_gran[RIG_SETTING_MAX]; /*!< parm granularity */
/*
* non overridable fields, internal use
*/
int transaction_active; /*!< set to 1 to inform the async reader thread that a synchronous command transaction is waiting for a response, otherwise 0 */
vfo_t current_vfo; /*!< VFO currently set */
int vfo_list; /*!< Complete list of VFO for this rig */
int comm_state; /*!< Comm port state, opened/closed. */
rig_ptr_t priv; /*!< Pointer to private rig state data. */
rig_ptr_t obj; /*!< Internal use by hamlib++ for event handling. */
int async_data_enabled; /*!< Whether async data mode is enabled */
int poll_interval; /*!< Rig state polling period in milliseconds */
freq_t current_freq; /*!< Frequency currently set */
rmode_t current_mode; /*!< Mode currently set */
//rmode_t current_modeB; /*!< Mode currently set VFOB */
pbwidth_t current_width; /*!< Passband width currently set */
vfo_t tx_vfo; /*!< Tx VFO currently set */
rmode_t mode_list; /*!< Complete list of modes for this rig */
// mode_list is used by some
// so anything added to this structure must be below here
int transmit; /*!< rig should be transmitting i.e. hard
wired PTT asserted - used by rigs that
don't do CAT while in Tx */
freq_t lo_freq; /*!< Local oscillator frequency of any transverter */
time_t twiddle_time; /*!< time when vfo twiddling was detected */
int twiddle_timeout; /*!< timeout to resume from twiddling */
// uplink allows gpredict to behave better by no reading the uplink VFO
int uplink; /*!< uplink=1 will not read Sub, uplink=2 will not read Main */
struct rig_cache cache;
int vfo_opt; /*!< Is -o switch turned on? */
int auto_power_on; /*!< Allow Hamlib to power on rig
automatically if supported */
int auto_power_off; /*!< Allow Hamlib to power off rig
automatically if supported */
int auto_disable_screensaver; /*!< Allow Hamlib to disable the
rig's screen saver automatically if
supported */
int ptt_share; /*!< Share ptt port by open/close during get_ptt, set_ptt hogs the port while active */
int power_now; /*!< Current RF power level in rig units */
int power_min; /*!< Minimum RF power level in rig units */
int power_max; /*!< Maximum RF power level in rig units */
unsigned char disable_yaesu_bandselect; /*!< Disables Yaesu band select logic */
int twiddle_rit; /*!< Suppresses VFOB reading (cached value used) so RIT control can be used */
int twiddle_state; /*!< keeps track of twiddle status */
vfo_t rx_vfo; /*!< Rx VFO currently set */
volatile unsigned int snapshot_packet_sequence_number;
volatile int multicast_publisher_run;
void *multicast_publisher_priv_data;
volatile int async_data_handler_thread_run;
void *async_data_handler_priv_data;
volatile int poll_routine_thread_run;
void *poll_routine_priv_data;
#ifdef HAVE_PTHREAD
pthread_mutex_t mutex_set_transaction;
#endif
hamlib_port_t rigport; /*!< Rig port (internal use). */
hamlib_port_t pttport; /*!< PTT port (internal use). */
hamlib_port_t dcdport; /*!< DCD port (internal use). */
/********* DO NOT ADD or CHANGE anything (or than to rename) ABOVE THIS LINE *********/
/********* ENSURE ANY NEW ITEMS ARE ADDED AFTER HERE *********/
/* flags instructing the rig_get routines to use cached values when asyncio is in use */
int use_cached_freq; /*state.depth, spaces(), rig->state.depth, __func__, elapsed_ms(&__begin, HAMLIB_ELAPSED_GET));
// use this instead of snprintf for automatic detection of buffer limit
#define SNPRINTF(s,n,...) { snprintf(s,n,##__VA_ARGS__);if (strlen(s) > n-1) fprintf(stderr,"****** %s(%d): buffer overflow ******\n", __func__, __LINE__); }
extern HAMLIB_EXPORT(void)
rig_debug HAMLIB_PARAMS((enum rig_debug_level_e debug_level,
const char *fmt, ...));
extern HAMLIB_EXPORT(vprintf_cb_t)
rig_set_debug_callback HAMLIB_PARAMS((vprintf_cb_t cb,
rig_ptr_t arg));
extern HAMLIB_EXPORT(FILE *)
rig_set_debug_file HAMLIB_PARAMS((FILE *stream));
extern HAMLIB_EXPORT(int)
rig_register HAMLIB_PARAMS((const struct rig_caps *caps));
extern HAMLIB_EXPORT(int)
rig_unregister HAMLIB_PARAMS((rig_model_t rig_model));
extern HAMLIB_EXPORT(int)
rig_list_foreach HAMLIB_PARAMS((int (*cfunc)(const struct rig_caps *, rig_ptr_t),
rig_ptr_t data));
extern HAMLIB_EXPORT(int)
rig_list_foreach_model HAMLIB_PARAMS((int (*cfunc)(const rig_model_t rig_model, rig_ptr_t),
rig_ptr_t data));
extern HAMLIB_EXPORT(int)
rig_load_backend HAMLIB_PARAMS((const char *be_name));
extern HAMLIB_EXPORT(int)
rig_check_backend HAMLIB_PARAMS((rig_model_t rig_model));
extern HAMLIB_EXPORT(int)
rig_load_all_backends HAMLIB_PARAMS((void));
typedef int (*rig_probe_func_t)(const hamlib_port_t *, rig_model_t, rig_ptr_t);
extern HAMLIB_EXPORT(int)
rig_probe_all HAMLIB_PARAMS((hamlib_port_t *p,
rig_probe_func_t,
rig_ptr_t));
extern HAMLIB_EXPORT(rig_model_t)
rig_probe HAMLIB_PARAMS((hamlib_port_t *p));
/* Misc calls */
extern HAMLIB_EXPORT(const char *) rig_strrmode(rmode_t mode);
extern HAMLIB_EXPORT(int) rig_strrmodes(rmode_t modes, char *buf, int buflen);
extern HAMLIB_EXPORT(const char *) rig_strvfo(vfo_t vfo);
extern HAMLIB_EXPORT(const char *) rig_strfunc(setting_t);
extern HAMLIB_EXPORT(const char *) rig_strlevel(setting_t);
extern HAMLIB_EXPORT(const char *) rig_strparm(setting_t);
extern HAMLIB_EXPORT(const char *) rig_stragclevel(enum agc_level_e level);
extern HAMLIB_EXPORT(enum agc_level_e) rig_levelagcstr (char *agcString);
extern HAMLIB_EXPORT(enum agc_level_e) rig_levelagcvalue (int agcValue);
extern HAMLIB_EXPORT(value_t) rig_valueagclevel (enum agc_level_e agcLevel);
extern HAMLIB_EXPORT(const char *) rig_strptrshift(rptr_shift_t);
extern HAMLIB_EXPORT(const char *) rig_strvfop(vfo_op_t op);
extern HAMLIB_EXPORT(const char *) rig_strscan(scan_t scan);
extern HAMLIB_EXPORT(const char *) rig_strstatus(enum rig_status_e status);
extern HAMLIB_EXPORT(const char *) rig_strmtype(chan_type_t mtype);
extern HAMLIB_EXPORT(const char *) rig_strspectrummode(enum rig_spectrum_mode_e mode);
extern HAMLIB_EXPORT(rmode_t) rig_parse_mode(const char *s);
extern HAMLIB_EXPORT(vfo_t) rig_parse_vfo(const char *s);
extern HAMLIB_EXPORT(setting_t) rig_parse_func(const char *s);
extern HAMLIB_EXPORT(setting_t) rig_parse_level(const char *s);
extern HAMLIB_EXPORT(setting_t) rig_parse_parm(const char *s);
extern HAMLIB_EXPORT(vfo_op_t) rig_parse_vfo_op(const char *s);
extern HAMLIB_EXPORT(scan_t) rig_parse_scan(const char *s);
extern HAMLIB_EXPORT(rptr_shift_t) rig_parse_rptr_shift(const char *s);
extern HAMLIB_EXPORT(chan_type_t) rig_parse_mtype(const char *s);
extern HAMLIB_EXPORT(const char *) rig_license HAMLIB_PARAMS(());
extern HAMLIB_EXPORT(const char *) rig_version HAMLIB_PARAMS(());
extern HAMLIB_EXPORT(const char *) rig_copyright HAMLIB_PARAMS(());
extern HAMLIB_EXPORT(void) rig_no_restore_ai();
extern HAMLIB_EXPORT(int) rig_get_cache_timeout_ms(RIG *rig, hamlib_cache_t selection);
extern HAMLIB_EXPORT(int) rig_set_cache_timeout_ms(RIG *rig, hamlib_cache_t selection, int ms);
extern HAMLIB_EXPORT(int) rig_set_vfo_opt(RIG *rig, int status);
extern HAMLIB_EXPORT(int) rig_get_vfo_info(RIG *rig, vfo_t vfo, freq_t *freq, rmode_t *mode, pbwidth_t *width, split_t *split, int *satmode);
extern HAMLIB_EXPORT(int) rig_get_rig_info(RIG *rig, char *response, int max_response_len);
extern HAMLIB_EXPORT(int) rig_get_cache(RIG *rig, vfo_t vfo, freq_t *freq, int * cache_ms_freq, rmode_t *mode, int *cache_ms_mode, pbwidth_t *width, int *cache_ms_width);
extern HAMLIB_EXPORT(int) rig_set_clock(RIG *rig, int year, int month, int day, int hour, int min, int sec, double msec, int utc_offset);
extern HAMLIB_EXPORT(int) rig_get_clock(RIG *rig, int *year, int *month, int *day, int *hour, int *min, int *sec, double *msec, int *utc_offset);
typedef unsigned long rig_useconds_t;
extern HAMLIB_EXPORT(int) hl_usleep(rig_useconds_t msec);
extern HAMLIB_EXPORT(int) rig_cookie(RIG *rig, enum cookie_e cookie_cmd, char *cookie, int cookie_len);
extern HAMLIB_EXPORT(int) rig_password(RIG *rig, const char *key1);
extern HAMLIB_EXPORT(void) rig_password_generate_secret(char *pass,
char result[HAMLIB_SECRET_LENGTH + 1]);
extern HAMLIB_EXPORT(int)
longlat2locator HAMLIB_PARAMS((double longitude,
double latitude,
char *locator_res,
int pair_count));
extern HAMLIB_EXPORT(int)
locator2longlat HAMLIB_PARAMS((double *longitude,
double *latitude,
const char *locator));
extern HAMLIB_EXPORT(char*) rig_make_md5(char *pass);
//! @endcond
__END_DECLS
#endif /* _RIG_H */
/*! @} */
================================================
FILE: software/hamlib-w64-4.5~git/include/hamlib/rig_dll.h
================================================
/*
* Hamlib Win32 DLL build definitions
* Copyright (c) 2001-2009 by Stephane Fillod
*
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
*/
/*
* Provide definitions to compile in Windows
* using C-friendly options, e.g.
*
* HAMLIB_API -> __cdecl
* HAMLIB_EXPORT, HAMLIB_EXPORT_VAR -> __declspec(dllexport)
* BACKEND_EXPORT, BACKEND_EXPORT_VAR -> __declspec(dllexport)
*
* No effect in non-Windows environments.
*/
#if defined(_WIN32) && !defined(__CYGWIN__)
# undef HAMLIB_IMPEXP
# undef HAMLIB_CPP_IMPEXP
# undef HAMLIB_API
# undef HAMLIB_EXPORT
# undef HAMLIB_EXPORT_VAR
# undef BACKEND_EXPORT
# undef BACKEND_EXPORT_VAR
# undef HAMLIB_DLL_IMPORT
# undef HAMLIB_DLL_EXPORT
# if defined (__BORLANDC__)
# define HAMLIB_DLL_IMPORT __import
# define HAMLIB_DLL_EXPORT __export
# else
# define HAMLIB_DLL_IMPORT __declspec(dllimport)
# define HAMLIB_DLL_EXPORT __declspec(dllexport)
# endif
# ifdef DLL_EXPORT
/* HAMLIB_API may be set to __stdcall for VB, .. */
# define HAMLIB_API __cdecl
# ifdef IN_HAMLIB
# define HAMLIB_CPP_IMPEXP HAMLIB_DLL_EXPORT
# define HAMLIB_IMPEXP HAMLIB_DLL_EXPORT
# else
# define HAMLIB_CPP_IMPEXP HAMLIB_DLL_IMPORT
# define HAMLIB_IMPEXP HAMLIB_DLL_IMPORT
# endif
# else
/* static build, only export the backend entry points for lt_dlsym */
# define HAMLIB_CPP_IMPEXP HAMLIB_DLL_EXPORT
# endif
#endif
/* Take care of non-cygwin platforms */
#if !defined(HAMLIB_IMPEXP)
# define HAMLIB_IMPEXP
#endif
#if !defined(HAMLIB_CPP_IMPEXP)
# define HAMLIB_CPP_IMPEXP
#endif
#if !defined(HAMLIB_API)
# define HAMLIB_API
#endif
#if !defined(HAMLIB_EXPORT)
# define HAMLIB_EXPORT(type) HAMLIB_IMPEXP type HAMLIB_API
#endif
#if !defined(HAMLIB_EXPORT_VAR)
# define HAMLIB_EXPORT_VAR(type) HAMLIB_IMPEXP type
#endif
#if !defined(BACKEND_EXPORT)
# define BACKEND_EXPORT(type) HAMLIB_CPP_IMPEXP type HAMLIB_API
#endif
#if !defined(BACKEND_EXPORT_VAR)
# define BACKEND_EXPORT_VAR(type) HAMLIB_CPP_IMPEXP type
#endif
================================================
FILE: software/hamlib-w64-4.5~git/include/hamlib/riglist.h
================================================
/*
* Hamlib Interface - list of known rigs
* Copyright (c) 2000-2003 by Frank Singleton
* Copyright (c) 2000-2015 by Stephane Fillod
*
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
*/
#ifndef _RIGLIST_H
#define _RIGLIST_H 1
//! @cond Doxygen_Suppress
// The rig model number is designed to fit in a 32-bit int
// As of 2020-02-18 we have 33 backends defined
// With a max of 1000 models per backend we get total a model number range of 1001-33001
// This MAX was 100 prior to 2020-02-18 and Icom was close to running out of the 100 range
#define MAX_MODELS_PER_BACKEND 1000
#define RIG_MAKE_MODEL(a,b) ((a)*MAX_MODELS_PER_BACKEND+(b))
#define RIG_BACKEND_NUM(a) ((a)/MAX_MODELS_PER_BACKEND)
/*! \file riglist.h
* \brief Hamlib rig(radio) model definitions.
*
* This file contains rig model definitions for the Hamlib rig API. Each
* distinct rig type has a unique model number (ID) and is used by hamlib to
* identify and distinguish between the different hardware drivers. The
* exact model numbers can be acquired using the macros in this file. To
* obtain a list of supported rig branches, one can use the statically
* defined RIG_BACKEND_LIST macro. To obtain a full list of supported rig
* (including each model in every branch), the foreach_opened_rig() API
* function can be used.
*
* The model number, or ID, is used to tell hamlib, which rig the client
* whishes to use. It is done with the rig_init() API call.
*/
#define RIG_MODEL_NONE 0
/*! \def RIG_MODEL_DUMMY
* \brief A macro that returns the model number for the dummy backend.
*
* The dummy backend, as the name suggests, is a backend which performs no
* hardware operations and always behaves as one would expect. It can be
* thought of as a hardware simulator and is very useful for testing client
* applications.
*
* It has also been expanded to provide support to "virtual" type of rigs
* such as the network rig control backend and W1HKJ's Flrig application.
*/
#define RIG_DUMMY 0
#define RIG_BACKEND_DUMMY "dummy"
#define RIG_MODEL_DUMMY RIG_MAKE_MODEL(RIG_DUMMY, 1)
#define RIG_MODEL_NETRIGCTL RIG_MAKE_MODEL(RIG_DUMMY, 2)
#define RIG_MODEL_ARMSTRONG RIG_MAKE_MODEL(RIG_DUMMY, 3)
#define RIG_MODEL_FLRIG RIG_MAKE_MODEL(RIG_DUMMY, 4)
#define RIG_MODEL_TRXMANAGER_RIG RIG_MAKE_MODEL(RIG_DUMMY, 5)
#define RIG_MODEL_DUMMY_NOVFO RIG_MAKE_MODEL(RIG_DUMMY, 6)
#define RIG_MODEL_TCI1X RIG_MAKE_MODEL(RIG_DUMMY, 7)
/*
* Yaesu
*/
#define RIG_YAESU 1
#define RIG_BACKEND_YAESU "yaesu"
#define RIG_MODEL_FT847 RIG_MAKE_MODEL(RIG_YAESU, 1)
#define RIG_MODEL_FT1000 RIG_MAKE_MODEL(RIG_YAESU, 2)
#define RIG_MODEL_FT1000D RIG_MAKE_MODEL(RIG_YAESU, 3)
#define RIG_MODEL_FT1000MPMKV RIG_MAKE_MODEL(RIG_YAESU, 4)
#define RIG_MODEL_FT747 RIG_MAKE_MODEL(RIG_YAESU, 5)
#define RIG_MODEL_FT757 RIG_MAKE_MODEL(RIG_YAESU, 6)
#define RIG_MODEL_FT757GXII RIG_MAKE_MODEL(RIG_YAESU, 7)
#define RIG_MODEL_FT575 RIG_MAKE_MODEL(RIG_YAESU, 8)
#define RIG_MODEL_FT767 RIG_MAKE_MODEL(RIG_YAESU, 9)
#define RIG_MODEL_FT736R RIG_MAKE_MODEL(RIG_YAESU, 10)
#define RIG_MODEL_FT840 RIG_MAKE_MODEL(RIG_YAESU, 11)
#define RIG_MODEL_FT820 RIG_MAKE_MODEL(RIG_YAESU, 12)
#define RIG_MODEL_FT900 RIG_MAKE_MODEL(RIG_YAESU, 13)
#define RIG_MODEL_FT920 RIG_MAKE_MODEL(RIG_YAESU, 14)
#define RIG_MODEL_FT890 RIG_MAKE_MODEL(RIG_YAESU, 15)
#define RIG_MODEL_FT990 RIG_MAKE_MODEL(RIG_YAESU, 16)
#define RIG_MODEL_FRG100 RIG_MAKE_MODEL(RIG_YAESU, 17)
#define RIG_MODEL_FRG9600 RIG_MAKE_MODEL(RIG_YAESU, 18)
#define RIG_MODEL_FRG8800 RIG_MAKE_MODEL(RIG_YAESU, 19)
#define RIG_MODEL_FT817 RIG_MAKE_MODEL(RIG_YAESU, 20)
#define RIG_MODEL_FT100 RIG_MAKE_MODEL(RIG_YAESU, 21)
#define RIG_MODEL_FT857 RIG_MAKE_MODEL(RIG_YAESU, 22)
#define RIG_MODEL_FT897 RIG_MAKE_MODEL(RIG_YAESU, 23)
#define RIG_MODEL_FT1000MP RIG_MAKE_MODEL(RIG_YAESU, 24)
#define RIG_MODEL_FT1000MPMKVFLD RIG_MAKE_MODEL(RIG_YAESU, 25)
#define RIG_MODEL_VR5000 RIG_MAKE_MODEL(RIG_YAESU, 26)
#define RIG_MODEL_FT450 RIG_MAKE_MODEL(RIG_YAESU, 27)
#define RIG_MODEL_FT950 RIG_MAKE_MODEL(RIG_YAESU, 28)
#define RIG_MODEL_FT2000 RIG_MAKE_MODEL(RIG_YAESU, 29)
#define RIG_MODEL_FT9000 RIG_MAKE_MODEL(RIG_YAESU, 30)
#define RIG_MODEL_FT980 RIG_MAKE_MODEL(RIG_YAESU, 31)
#define RIG_MODEL_FTDX5000 RIG_MAKE_MODEL(RIG_YAESU, 32)
#define RIG_MODEL_VX1700 RIG_MAKE_MODEL(RIG_YAESU, 33)
#define RIG_MODEL_FTDX1200 RIG_MAKE_MODEL(RIG_YAESU, 34)
#define RIG_MODEL_FT991 RIG_MAKE_MODEL(RIG_YAESU, 35)
#define RIG_MODEL_FT891 RIG_MAKE_MODEL(RIG_YAESU, 36)
#define RIG_MODEL_FTDX3000 RIG_MAKE_MODEL(RIG_YAESU, 37)
#define RIG_MODEL_FT847UNI RIG_MAKE_MODEL(RIG_YAESU, 38)
#define RIG_MODEL_FT600 RIG_MAKE_MODEL(RIG_YAESU, 39)
#define RIG_MODEL_FTDX101D RIG_MAKE_MODEL(RIG_YAESU, 40)
#define RIG_MODEL_FT818 RIG_MAKE_MODEL(RIG_YAESU, 41)
#define RIG_MODEL_FTDX10 RIG_MAKE_MODEL(RIG_YAESU, 42)
#define RIG_MODEL_FT897D RIG_MAKE_MODEL(RIG_YAESU, 43)
#define RIG_MODEL_FTDX101MP RIG_MAKE_MODEL(RIG_YAESU, 44)
#define RIG_MODEL_MCHFQRP RIG_MAKE_MODEL(RIG_YAESU, 45)
#define RIG_MODEL_FT450D RIG_MAKE_MODEL(RIG_YAESU, 46)
/*
* Kenwood
*/
#define RIG_KENWOOD 2
#define RIG_BACKEND_KENWOOD "kenwood"
#define RIG_MODEL_TS50 RIG_MAKE_MODEL(RIG_KENWOOD, 1)
#define RIG_MODEL_TS440 RIG_MAKE_MODEL(RIG_KENWOOD, 2)
#define RIG_MODEL_TS450S RIG_MAKE_MODEL(RIG_KENWOOD, 3)
#define RIG_MODEL_TS570D RIG_MAKE_MODEL(RIG_KENWOOD, 4)
#define RIG_MODEL_TS690S RIG_MAKE_MODEL(RIG_KENWOOD, 5)
#define RIG_MODEL_TS711 RIG_MAKE_MODEL(RIG_KENWOOD, 6)
#define RIG_MODEL_TS790 RIG_MAKE_MODEL(RIG_KENWOOD, 7)
#define RIG_MODEL_TS811 RIG_MAKE_MODEL(RIG_KENWOOD, 8)
#define RIG_MODEL_TS850 RIG_MAKE_MODEL(RIG_KENWOOD, 9)
#define RIG_MODEL_TS870S RIG_MAKE_MODEL(RIG_KENWOOD, 10)
#define RIG_MODEL_TS940 RIG_MAKE_MODEL(RIG_KENWOOD, 11)
#define RIG_MODEL_TS950S RIG_MAKE_MODEL(RIG_KENWOOD, 12)
#define RIG_MODEL_TS950SDX RIG_MAKE_MODEL(RIG_KENWOOD, 13)
#define RIG_MODEL_TS2000 RIG_MAKE_MODEL(RIG_KENWOOD, 14)
#define RIG_MODEL_R5000 RIG_MAKE_MODEL(RIG_KENWOOD, 15)
#define RIG_MODEL_TS570S RIG_MAKE_MODEL(RIG_KENWOOD, 16)
#define RIG_MODEL_THD7A RIG_MAKE_MODEL(RIG_KENWOOD, 17)
#define RIG_MODEL_THD7AG RIG_MAKE_MODEL(RIG_KENWOOD, 18)
#define RIG_MODEL_THF6A RIG_MAKE_MODEL(RIG_KENWOOD, 19)
#define RIG_MODEL_THF7E RIG_MAKE_MODEL(RIG_KENWOOD, 20)
#define RIG_MODEL_K2 RIG_MAKE_MODEL(RIG_KENWOOD, 21)
#define RIG_MODEL_TS930 RIG_MAKE_MODEL(RIG_KENWOOD, 22)
#define RIG_MODEL_THG71 RIG_MAKE_MODEL(RIG_KENWOOD, 23)
#define RIG_MODEL_TS680S RIG_MAKE_MODEL(RIG_KENWOOD, 24)
#define RIG_MODEL_TS140S RIG_MAKE_MODEL(RIG_KENWOOD, 25)
#define RIG_MODEL_TMD700 RIG_MAKE_MODEL(RIG_KENWOOD, 26)
#define RIG_MODEL_TMV7 RIG_MAKE_MODEL(RIG_KENWOOD, 27)
#define RIG_MODEL_TS480 RIG_MAKE_MODEL(RIG_KENWOOD, 28)
#define RIG_MODEL_K3 RIG_MAKE_MODEL(RIG_KENWOOD, 29)
#define RIG_MODEL_TRC80 RIG_MAKE_MODEL(RIG_KENWOOD, 30)
#define RIG_MODEL_TS590S RIG_MAKE_MODEL(RIG_KENWOOD, 31)
#define RIG_MODEL_TRANSFOX RIG_MAKE_MODEL(RIG_KENWOOD, 32) /* SigFox Transfox */
#define RIG_MODEL_THD72A RIG_MAKE_MODEL(RIG_KENWOOD, 33)
#define RIG_MODEL_TMD710 RIG_MAKE_MODEL(RIG_KENWOOD, 34)
#define RIG_MODEL_TMV71 RIG_MAKE_MODEL(RIG_KENWOOD, 35)
#define RIG_MODEL_F6K RIG_MAKE_MODEL(RIG_KENWOOD, 36) /* Flex 6000 Series */
#define RIG_MODEL_TS590SG RIG_MAKE_MODEL(RIG_KENWOOD, 37)
#define RIG_MODEL_XG3 RIG_MAKE_MODEL(RIG_KENWOOD, 38) /* Elecraft XG-3 signal generator */
#define RIG_MODEL_TS990S RIG_MAKE_MODEL(RIG_KENWOOD, 39)
#define RIG_MODEL_HPSDR RIG_MAKE_MODEL(RIG_KENWOOD, 40) /* OpenHPSDR, PiHPSDR */
#define RIG_MODEL_TS890S RIG_MAKE_MODEL(RIG_KENWOOD, 41)
#define RIG_MODEL_THD74 RIG_MAKE_MODEL(RIG_KENWOOD, 42)
#define RIG_MODEL_K3S RIG_MAKE_MODEL(RIG_KENWOOD, 43)
#define RIG_MODEL_KX2 RIG_MAKE_MODEL(RIG_KENWOOD, 44)
#define RIG_MODEL_KX3 RIG_MAKE_MODEL(RIG_KENWOOD, 45)
#define RIG_MODEL_PT8000A RIG_MAKE_MODEL(RIG_KENWOOD, 46)
#define RIG_MODEL_K4 RIG_MAKE_MODEL(RIG_KENWOOD, 47)
#define RIG_MODEL_POWERSDR RIG_MAKE_MODEL(RIG_KENWOOD, 48)
#define RIG_MODEL_MALACHITE RIG_MAKE_MODEL(RIG_KENWOOD, 49)
#define RIG_MODEL_LAB599_TX500 RIG_MAKE_MODEL(RIG_KENWOOD,50)
#define RIG_MODEL_SDRUNO RIG_MAKE_MODEL(RIG_KENWOOD,51)
/*
* Icom
*/
#define RIG_ICOM 3
#define RIG_BACKEND_ICOM "icom"
#define RIG_MODEL_IC1271 RIG_MAKE_MODEL(RIG_ICOM, 1)
#define RIG_MODEL_IC1275 RIG_MAKE_MODEL(RIG_ICOM, 2)
#define RIG_MODEL_IC271 RIG_MAKE_MODEL(RIG_ICOM, 3)
#define RIG_MODEL_IC275 RIG_MAKE_MODEL(RIG_ICOM, 4)
#define RIG_MODEL_IC375 RIG_MAKE_MODEL(RIG_ICOM, 5)
#define RIG_MODEL_IC471 RIG_MAKE_MODEL(RIG_ICOM, 6)
#define RIG_MODEL_IC475 RIG_MAKE_MODEL(RIG_ICOM, 7)
#define RIG_MODEL_IC575 RIG_MAKE_MODEL(RIG_ICOM, 8)
#define RIG_MODEL_IC706 RIG_MAKE_MODEL(RIG_ICOM, 9)
#define RIG_MODEL_IC706MKII RIG_MAKE_MODEL(RIG_ICOM, 10)
#define RIG_MODEL_IC706MKIIG RIG_MAKE_MODEL(RIG_ICOM, 11)
#define RIG_MODEL_IC707 RIG_MAKE_MODEL(RIG_ICOM, 12)
#define RIG_MODEL_IC718 RIG_MAKE_MODEL(RIG_ICOM, 13)
#define RIG_MODEL_IC725 RIG_MAKE_MODEL(RIG_ICOM, 14)
#define RIG_MODEL_IC726 RIG_MAKE_MODEL(RIG_ICOM, 15)
#define RIG_MODEL_IC728 RIG_MAKE_MODEL(RIG_ICOM, 16)
#define RIG_MODEL_IC729 RIG_MAKE_MODEL(RIG_ICOM, 17)
#define RIG_MODEL_IC731 RIG_MAKE_MODEL(RIG_ICOM, 18)
#define RIG_MODEL_IC735 RIG_MAKE_MODEL(RIG_ICOM, 19)
#define RIG_MODEL_IC736 RIG_MAKE_MODEL(RIG_ICOM, 20)
#define RIG_MODEL_IC737 RIG_MAKE_MODEL(RIG_ICOM, 21)
#define RIG_MODEL_IC738 RIG_MAKE_MODEL(RIG_ICOM, 22)
#define RIG_MODEL_IC746 RIG_MAKE_MODEL(RIG_ICOM, 23)
#define RIG_MODEL_IC751 RIG_MAKE_MODEL(RIG_ICOM, 24)
#define RIG_MODEL_IC751A RIG_MAKE_MODEL(RIG_ICOM, 25)
#define RIG_MODEL_IC756 RIG_MAKE_MODEL(RIG_ICOM, 26)
#define RIG_MODEL_IC756PRO RIG_MAKE_MODEL(RIG_ICOM, 27)
#define RIG_MODEL_IC761 RIG_MAKE_MODEL(RIG_ICOM, 28)
#define RIG_MODEL_IC765 RIG_MAKE_MODEL(RIG_ICOM, 29)
#define RIG_MODEL_IC775 RIG_MAKE_MODEL(RIG_ICOM, 30)
#define RIG_MODEL_IC781 RIG_MAKE_MODEL(RIG_ICOM, 31)
#define RIG_MODEL_IC820 RIG_MAKE_MODEL(RIG_ICOM, 32)
//#define RIG_MODEL_IC821 RIG_MAKE_MODEL(RIG_ICOM, 33) // not implemented and can be reused
#define RIG_MODEL_IC821H RIG_MAKE_MODEL(RIG_ICOM, 34)
#define RIG_MODEL_IC970 RIG_MAKE_MODEL(RIG_ICOM, 35)
#define RIG_MODEL_ICR10 RIG_MAKE_MODEL(RIG_ICOM, 36)
#define RIG_MODEL_ICR71 RIG_MAKE_MODEL(RIG_ICOM, 37)
#define RIG_MODEL_ICR72 RIG_MAKE_MODEL(RIG_ICOM, 38)
#define RIG_MODEL_ICR75 RIG_MAKE_MODEL(RIG_ICOM, 39)
#define RIG_MODEL_ICR7000 RIG_MAKE_MODEL(RIG_ICOM, 40)
#define RIG_MODEL_ICR7100 RIG_MAKE_MODEL(RIG_ICOM, 41)
#define RIG_MODEL_ICR8500 RIG_MAKE_MODEL(RIG_ICOM, 42)
#define RIG_MODEL_ICR9000 RIG_MAKE_MODEL(RIG_ICOM, 43)
#define RIG_MODEL_IC910 RIG_MAKE_MODEL(RIG_ICOM, 44)
#define RIG_MODEL_IC78 RIG_MAKE_MODEL(RIG_ICOM, 45)
#define RIG_MODEL_IC746PRO RIG_MAKE_MODEL(RIG_ICOM, 46)
#define RIG_MODEL_IC756PROII RIG_MAKE_MODEL(RIG_ICOM, 47) /* 48-53 defined below */
#define RIG_MODEL_ICID1 RIG_MAKE_MODEL(RIG_ICOM, 54)
#define RIG_MODEL_IC703 RIG_MAKE_MODEL(RIG_ICOM, 55)
#define RIG_MODEL_IC7800 RIG_MAKE_MODEL(RIG_ICOM, 56)
#define RIG_MODEL_IC756PROIII RIG_MAKE_MODEL(RIG_ICOM, 57)
#define RIG_MODEL_ICR20 RIG_MAKE_MODEL(RIG_ICOM, 58) /* 59 defined below */
#define RIG_MODEL_IC7000 RIG_MAKE_MODEL(RIG_ICOM, 60)
#define RIG_MODEL_IC7200 RIG_MAKE_MODEL(RIG_ICOM, 61)
#define RIG_MODEL_IC7700 RIG_MAKE_MODEL(RIG_ICOM, 62)
#define RIG_MODEL_IC7600 RIG_MAKE_MODEL(RIG_ICOM, 63) /* 64 defined below */
#define RIG_MODEL_IC92D RIG_MAKE_MODEL(RIG_ICOM, 65)
#define RIG_MODEL_ICR9500 RIG_MAKE_MODEL(RIG_ICOM, 66)
#define RIG_MODEL_IC7410 RIG_MAKE_MODEL(RIG_ICOM, 67)
#define RIG_MODEL_IC9100 RIG_MAKE_MODEL(RIG_ICOM, 68)
#define RIG_MODEL_ICRX7 RIG_MAKE_MODEL(RIG_ICOM, 69)
#define RIG_MODEL_IC7100 RIG_MAKE_MODEL(RIG_ICOM, 70)
#define RIG_MODEL_ID5100 RIG_MAKE_MODEL(RIG_ICOM, 71)
#define RIG_MODEL_IC2730 RIG_MAKE_MODEL(RIG_ICOM, 72)
#define RIG_MODEL_IC7300 RIG_MAKE_MODEL(RIG_ICOM, 73)
#define RIG_MODEL_PERSEUS RIG_MAKE_MODEL(RIG_ICOM, 74)
#define RIG_MODEL_IC785x RIG_MAKE_MODEL(RIG_ICOM, 75)
#define RIG_MODEL_X108G RIG_MAKE_MODEL(RIG_ICOM, 76) /* Xiegu X108 */
#define RIG_MODEL_ICR6 RIG_MAKE_MODEL(RIG_ICOM, 77)
#define RIG_MODEL_IC7610 RIG_MAKE_MODEL(RIG_ICOM, 78)
#define RIG_MODEL_ICR8600 RIG_MAKE_MODEL(RIG_ICOM, 79)
#define RIG_MODEL_ICR30 RIG_MAKE_MODEL(RIG_ICOM, 80)
#define RIG_MODEL_IC9700 RIG_MAKE_MODEL(RIG_ICOM, 81)
#define RIG_MODEL_ID4100 RIG_MAKE_MODEL(RIG_ICOM, 82)
#define RIG_MODEL_ID31 RIG_MAKE_MODEL(RIG_ICOM, 83)
#define RIG_MODEL_ID51 RIG_MAKE_MODEL(RIG_ICOM, 84)
#define RIG_MODEL_IC705 RIG_MAKE_MODEL(RIG_ICOM, 85)
#define RIG_MODEL_ICF8101 RIG_MAKE_MODEL(RIG_ICOM, 86)
#define RIG_MODEL_X6100 RIG_MAKE_MODEL(RIG_ICOM, 87) /* Xiegu X6100 */
#define RIG_MODEL_G90 RIG_MAKE_MODEL(RIG_ICOM, 88) /* Xiegu G90 */
/*
* Optoelectronics (CI-V)
*/
#define RIG_MODEL_MINISCOUT RIG_MAKE_MODEL(RIG_ICOM, 48)
#define RIG_MODEL_XPLORER RIG_MAKE_MODEL(RIG_ICOM, 49)
#define RIG_MODEL_OS535 RIG_MAKE_MODEL(RIG_ICOM, 52)
#define RIG_MODEL_OS456 RIG_MAKE_MODEL(RIG_ICOM, 53)
/*
* TenTec (CI-V)
*/
#define RIG_MODEL_OMNIVI RIG_MAKE_MODEL(RIG_ICOM, 50)
#define RIG_MODEL_OMNIVIP RIG_MAKE_MODEL(RIG_ICOM, 51) /* OMNI-VI+ */
#define RIG_MODEL_PARAGON2 RIG_MAKE_MODEL(RIG_ICOM, 59)
#define RIG_MODEL_DELTAII RIG_MAKE_MODEL(RIG_ICOM, 64)
/*
* Icom PCR
*/
#define RIG_PCR 4
#define RIG_BACKEND_PCR "pcr"
#define RIG_MODEL_PCR1000 RIG_MAKE_MODEL(RIG_PCR, 1)
#define RIG_MODEL_PCR100 RIG_MAKE_MODEL(RIG_PCR, 2)
#define RIG_MODEL_PCR1500 RIG_MAKE_MODEL(RIG_PCR, 3)
#define RIG_MODEL_PCR2500 RIG_MAKE_MODEL(RIG_PCR, 4)
/*
* AOR
*/
#define RIG_AOR 5
#define RIG_BACKEND_AOR "aor"
#define RIG_MODEL_AR8200 RIG_MAKE_MODEL(RIG_AOR, 1)
#define RIG_MODEL_AR8000 RIG_MAKE_MODEL(RIG_AOR, 2)
#define RIG_MODEL_AR7030 RIG_MAKE_MODEL(RIG_AOR, 3)
#define RIG_MODEL_AR5000 RIG_MAKE_MODEL(RIG_AOR, 4)
#define RIG_MODEL_AR3030 RIG_MAKE_MODEL(RIG_AOR, 5)
#define RIG_MODEL_AR3000A RIG_MAKE_MODEL(RIG_AOR, 6)
#define RIG_MODEL_AR3000 RIG_MAKE_MODEL(RIG_AOR, 7)
#define RIG_MODEL_AR2700 RIG_MAKE_MODEL(RIG_AOR, 8)
#define RIG_MODEL_AR2500 RIG_MAKE_MODEL(RIG_AOR, 9)
#define RIG_MODEL_AR16 RIG_MAKE_MODEL(RIG_AOR, 10)
#define RIG_MODEL_SDU5500 RIG_MAKE_MODEL(RIG_AOR, 11)
#define RIG_MODEL_SDU5000 RIG_MAKE_MODEL(RIG_AOR, 12)
#define RIG_MODEL_AR8600 RIG_MAKE_MODEL(RIG_AOR, 13)
#define RIG_MODEL_AR5000A RIG_MAKE_MODEL(RIG_AOR, 14)
#define RIG_MODEL_AR7030P RIG_MAKE_MODEL(RIG_AOR, 15)
#define RIG_MODEL_SR2200 RIG_MAKE_MODEL(RIG_AOR, 16)
/*
* JRC
*/
#define RIG_JRC 6
#define RIG_BACKEND_JRC "jrc"
#define RIG_MODEL_JST145 RIG_MAKE_MODEL(RIG_JRC, 1)
#define RIG_MODEL_JST245 RIG_MAKE_MODEL(RIG_JRC, 2)
#define RIG_MODEL_CMH530 RIG_MAKE_MODEL(RIG_JRC, 3)
#define RIG_MODEL_NRD345 RIG_MAKE_MODEL(RIG_JRC, 4)
#define RIG_MODEL_NRD525 RIG_MAKE_MODEL(RIG_JRC, 5)
#define RIG_MODEL_NRD535 RIG_MAKE_MODEL(RIG_JRC, 6)
#define RIG_MODEL_NRD545 RIG_MAKE_MODEL(RIG_JRC, 7)
/*
* Radio Shack
* Actually, they might be either Icom or Uniden. TBC --SF
*/
#define RIG_RADIOSHACK 7
#define RIG_BACKEND_RADIOSHACK "radioshack"
#define RIG_MODEL_RS64 RIG_MAKE_MODEL(RIG_RADIOSHACK, 1) /* PRO-64 */
#define RIG_MODEL_RS2005 RIG_MAKE_MODEL(RIG_RADIOSHACK, 2) /* w/ OptoElectronics OS456 Board */
#define RIG_MODEL_RS2006 RIG_MAKE_MODEL(RIG_RADIOSHACK, 3) /* w/ OptoElectronics OS456 Board */
#define RIG_MODEL_RS2035 RIG_MAKE_MODEL(RIG_RADIOSHACK, 4) /* w/ OptoElectronics OS435 Board */
#define RIG_MODEL_RS2042 RIG_MAKE_MODEL(RIG_RADIOSHACK, 5) /* w/ OptoElectronics OS435 Board */
#define RIG_MODEL_RS2041 RIG_MAKE_MODEL(RIG_RADIOSHACK, 6) /* PRO-2041 */
/*
* Uniden
*/
#define RIG_UNIDEN 8
#define RIG_BACKEND_UNIDEN "uniden"
#define RIG_MODEL_BC780 RIG_MAKE_MODEL(RIG_UNIDEN, 1) /* Uniden BC780 - Trunk Tracker "Desktop Radio" */
#define RIG_MODEL_BC245 RIG_MAKE_MODEL(RIG_UNIDEN, 2)
#define RIG_MODEL_BC895 RIG_MAKE_MODEL(RIG_UNIDEN, 3)
#define RIG_MODEL_PRO2052 RIG_MAKE_MODEL(RIG_UNIDEN, 4) /* Radio Shack PRO-2052 */
#define RIG_MODEL_BC235 RIG_MAKE_MODEL(RIG_UNIDEN, 5)
#define RIG_MODEL_BC250 RIG_MAKE_MODEL(RIG_UNIDEN, 6)
#define RIG_MODEL_BC785 RIG_MAKE_MODEL(RIG_UNIDEN, 7)
#define RIG_MODEL_BC786 RIG_MAKE_MODEL(RIG_UNIDEN, 8)
#define RIG_MODEL_BCT8 RIG_MAKE_MODEL(RIG_UNIDEN, 9)
#define RIG_MODEL_BCD396T RIG_MAKE_MODEL(RIG_UNIDEN, 10)
#define RIG_MODEL_BCD996T RIG_MAKE_MODEL(RIG_UNIDEN, 11)
#define RIG_MODEL_BC898 RIG_MAKE_MODEL(RIG_UNIDEN, 12)
/*
* Drake
*/
#define RIG_DRAKE 9
#define RIG_BACKEND_DRAKE "drake"
#define RIG_MODEL_DKR8 RIG_MAKE_MODEL(RIG_DRAKE, 1)
#define RIG_MODEL_DKR8A RIG_MAKE_MODEL(RIG_DRAKE, 2)
#define RIG_MODEL_DKR8B RIG_MAKE_MODEL(RIG_DRAKE, 3)
/*
* Lowe
*/
#define RIG_LOWE 10
#define RIG_BACKEND_LOWE "lowe"
#define RIG_MODEL_HF150 RIG_MAKE_MODEL(RIG_LOWE, 1)
#define RIG_MODEL_HF225 RIG_MAKE_MODEL(RIG_LOWE, 2)
#define RIG_MODEL_HF250 RIG_MAKE_MODEL(RIG_LOWE, 3)
#define RIG_MODEL_HF235 RIG_MAKE_MODEL(RIG_LOWE, 4)
/*
* Racal
*/
#define RIG_RACAL 11
#define RIG_BACKEND_RACAL "racal"
#define RIG_MODEL_RA3790 RIG_MAKE_MODEL(RIG_RACAL, 1)
#define RIG_MODEL_RA3720 RIG_MAKE_MODEL(RIG_RACAL, 2)
#define RIG_MODEL_RA6790 RIG_MAKE_MODEL(RIG_RACAL, 3)
#define RIG_MODEL_RA3710 RIG_MAKE_MODEL(RIG_RACAL, 4)
#define RIG_MODEL_RA3702 RIG_MAKE_MODEL(RIG_RACAL, 5)
/*
* Watkins-Johnson
*/
#define RIG_WJ 12
#define RIG_BACKEND_WJ "wj"
#define RIG_MODEL_HF1000 RIG_MAKE_MODEL(RIG_WJ, 1)
#define RIG_MODEL_HF1000A RIG_MAKE_MODEL(RIG_WJ, 2)
#define RIG_MODEL_WJ8711 RIG_MAKE_MODEL(RIG_WJ, 3)
#define RIG_MODEL_WJ8888 RIG_MAKE_MODEL(RIG_WJ, 4)
/*
* Rohde & Schwarz--ek
*/
#define RIG_EK 13
#define RIG_BACKEND_EK "ek"
#define RIG_MODEL_ESM500 RIG_MAKE_MODEL(RIG_EK, 1)
#define RIG_MODEL_EK890 RIG_MAKE_MODEL(RIG_EK, 2)
#define RIG_MODEL_EK891 RIG_MAKE_MODEL(RIG_EK, 3)
#define RIG_MODEL_EK895 RIG_MAKE_MODEL(RIG_EK, 4)
#define RIG_MODEL_EK070 RIG_MAKE_MODEL(RIG_EK, 5)
/*
* Skanti
*/
#define RIG_SKANTI 14
#define RIG_BACKEND_SKANTI "skanti"
#define RIG_MODEL_TRP7000 RIG_MAKE_MODEL(RIG_SKANTI, 1)
#define RIG_MODEL_TRP8000 RIG_MAKE_MODEL(RIG_SKANTI, 2)
#define RIG_MODEL_TRP9000 RIG_MAKE_MODEL(RIG_SKANTI, 3)
#define RIG_MODEL_TRP8255 RIG_MAKE_MODEL(RIG_SKANTI, 4)
/*
* WiNRADiO/LinRADiO
*/
#define RIG_WINRADIO 15
#define RIG_BACKEND_WINRADIO "winradio"
#define RIG_MODEL_WR1000 RIG_MAKE_MODEL(RIG_WINRADIO, 1)
#define RIG_MODEL_WR1500 RIG_MAKE_MODEL(RIG_WINRADIO, 2)
#define RIG_MODEL_WR1550 RIG_MAKE_MODEL(RIG_WINRADIO, 3)
#define RIG_MODEL_WR3100 RIG_MAKE_MODEL(RIG_WINRADIO, 4)
#define RIG_MODEL_WR3150 RIG_MAKE_MODEL(RIG_WINRADIO, 5)
#define RIG_MODEL_WR3500 RIG_MAKE_MODEL(RIG_WINRADIO, 6)
#define RIG_MODEL_WR3700 RIG_MAKE_MODEL(RIG_WINRADIO, 7)
#define RIG_MODEL_G303 RIG_MAKE_MODEL(RIG_WINRADIO, 8)
#define RIG_MODEL_G313 RIG_MAKE_MODEL(RIG_WINRADIO, 9)
#define RIG_MODEL_G305 RIG_MAKE_MODEL(RIG_WINRADIO, 10)
#define RIG_MODEL_G315 RIG_MAKE_MODEL(RIG_WINRADIO, 11)
/*
* Ten Tec
*/
#define RIG_TENTEC 16
#define RIG_BACKEND_TENTEC "tentec"
#define RIG_MODEL_TT550 RIG_MAKE_MODEL(RIG_TENTEC, 1) /* Pegasus */
#define RIG_MODEL_TT538 RIG_MAKE_MODEL(RIG_TENTEC, 2) /* Jupiter */
#define RIG_MODEL_RX320 RIG_MAKE_MODEL(RIG_TENTEC, 3)
#define RIG_MODEL_RX340 RIG_MAKE_MODEL(RIG_TENTEC, 4)
#define RIG_MODEL_RX350 RIG_MAKE_MODEL(RIG_TENTEC, 5)
#define RIG_MODEL_TT526 RIG_MAKE_MODEL(RIG_TENTEC, 6) /* 6N2 */
#define RIG_MODEL_TT516 RIG_MAKE_MODEL(RIG_TENTEC, 7) /* Argonaut V */
#define RIG_MODEL_TT565 RIG_MAKE_MODEL(RIG_TENTEC, 8) /* Orion */
#define RIG_MODEL_TT585 RIG_MAKE_MODEL(RIG_TENTEC, 9) /* Paragon */
#define RIG_MODEL_TT588 RIG_MAKE_MODEL(RIG_TENTEC, 11) /* Omni-VII */
#define RIG_MODEL_RX331 RIG_MAKE_MODEL(RIG_TENTEC, 12)
#define RIG_MODEL_TT599 RIG_MAKE_MODEL(RIG_TENTEC, 13) /* Eagle */
/*
* Alinco
*/
#define RIG_ALINCO 17
#define RIG_BACKEND_ALINCO "alinco"
#define RIG_MODEL_DX77 RIG_MAKE_MODEL(RIG_ALINCO, 1)
#define RIG_MODEL_DXSR8 RIG_MAKE_MODEL(RIG_ALINCO, 2)
/*
* Kachina
*/
#define RIG_KACHINA 18
#define RIG_BACKEND_KACHINA "kachina"
#define RIG_MODEL_505DSP RIG_MAKE_MODEL(RIG_KACHINA, 1)
/*
* Gnuradio backend
*/
#define RIG_GNURADIO 20
#define RIG_BACKEND_GNURADIO "gnuradio"
#define RIG_MODEL_GNURADIO RIG_MAKE_MODEL(RIG_GNURADIO, 1) /* dev model, Chirp source */
#define RIG_MODEL_MC4020 RIG_MAKE_MODEL(RIG_GNURADIO, 2) /* MC4020 */
#define RIG_MODEL_GRAUDIO RIG_MAKE_MODEL(RIG_GNURADIO, 3) /* Sound card source */
#define RIG_MODEL_GRAUDIOIQ RIG_MAKE_MODEL(RIG_GNURADIO, 4) /* I&Q stereo sound card source */
#define RIG_MODEL_USRP_G RIG_MAKE_MODEL(RIG_GNURADIO, 5) /* Universal Software Radio Peripheral */
/*
* Microtune tuners
*/
#define RIG_MICROTUNE 21
#define RIG_BACKEND_MICROTUNE "microtune"
#define RIG_MODEL_MICROTUNE_4937 RIG_MAKE_MODEL(RIG_MICROTUNE, 1) /* eval board */
#define RIG_MODEL_MICROTUNE_4702 RIG_MAKE_MODEL(RIG_MICROTUNE, 2) /* Alan's */
#define RIG_MODEL_MICROTUNE_4707 RIG_MAKE_MODEL(RIG_MICROTUNE, 3)
/*
* TAPR
*/
#define RIG_TAPR 22
#define RIG_BACKEND_TAPR "tapr"
#define RIG_MODEL_DSP10 RIG_MAKE_MODEL(RIG_TAPR, 1)
/*
* Flex-radio
*/
#define RIG_FLEXRADIO 23
#define RIG_BACKEND_FLEXRADIO "flexradio"
#define RIG_MODEL_SDR1000 RIG_MAKE_MODEL(RIG_FLEXRADIO, 1)
#define RIG_MODEL_SDR1000RFE RIG_MAKE_MODEL(RIG_FLEXRADIO, 2)
#define RIG_MODEL_DTTSP RIG_MAKE_MODEL(RIG_FLEXRADIO, 3)
#define RIG_MODEL_DTTSP_UDP RIG_MAKE_MODEL(RIG_FLEXRADIO, 4)
/*
* VEB Funkwerk Köpenick RFT
*/
#define RIG_RFT 24
#define RIG_BACKEND_RFT "rft"
#define RIG_MODEL_EKD500 RIG_MAKE_MODEL(RIG_RFT, 1)
/*
* Various kits
*/
#define RIG_KIT 25
#define RIG_BACKEND_KIT "kit"
#define RIG_MODEL_ELEKTOR304 RIG_MAKE_MODEL(RIG_KIT, 1)
#define RIG_MODEL_DRT1 RIG_MAKE_MODEL(RIG_KIT, 2)
#define RIG_MODEL_DWT RIG_MAKE_MODEL(RIG_KIT, 3)
#define RIG_MODEL_USRP0 RIG_MAKE_MODEL(RIG_KIT, 4) /* prototype */
#define RIG_MODEL_USRP RIG_MAKE_MODEL(RIG_KIT, 5)
#define RIG_MODEL_DDS60 RIG_MAKE_MODEL(RIG_KIT, 6)
#define RIG_MODEL_ELEKTOR507 RIG_MAKE_MODEL(RIG_KIT, 7) /* Elektor SDR USB */
#define RIG_MODEL_MINIVNA RIG_MAKE_MODEL(RIG_KIT, 8)
#define RIG_MODEL_SI570AVRUSB RIG_MAKE_MODEL(RIG_KIT, 9) /* SoftRock Si570 AVR */
#define RIG_MODEL_PMSDR RIG_MAKE_MODEL(RIG_KIT, 10)
#define RIG_MODEL_SI570PICUSB RIG_MAKE_MODEL(RIG_KIT, 11) /* SoftRock Si570 PIC */
#define RIG_MODEL_FIFISDR RIG_MAKE_MODEL(RIG_KIT, 12) /* FiFi-SDR USB */
#define RIG_MODEL_FUNCUBEDONGLE RIG_MAKE_MODEL(RIG_KIT, 13) /* FunCUBE Dongle */
#define RIG_MODEL_HIQSDR RIG_MAKE_MODEL(RIG_KIT, 14) /* HiQSDR */
#define RIG_MODEL_FASDR RIG_MAKE_MODEL(RIG_KIT,15) /* Funkamateur Sdr */
#define RIG_MODEL_SI570PEABERRY1 RIG_MAKE_MODEL(RIG_KIT, 16) /* Peaberry V1 */
#define RIG_MODEL_SI570PEABERRY2 RIG_MAKE_MODEL(RIG_KIT, 17) /* Peaberry V2 */
#define RIG_MODEL_FUNCUBEDONGLEPLUS RIG_MAKE_MODEL(RIG_KIT, 18) /* FunCUBE Dongle Pro+ */
#define RIG_MODEL_RSHFIQ RIG_MAKE_MODEL(RIG_KIT, 19) /* RS-HFIQ */
/*
* SW/FM/TV tuner cards supported by Video4Linux,*BSD, ..
*/
#define RIG_TUNER 26
#define RIG_BACKEND_TUNER "tuner"
#define RIG_MODEL_V4L RIG_MAKE_MODEL(RIG_TUNER, 1)
#define RIG_MODEL_V4L2 RIG_MAKE_MODEL(RIG_TUNER, 2)
/*
* Rohde & Schwarz--rs
*/
#define RIG_RS 27
#define RIG_BACKEND_RS "rs"
#define RIG_MODEL_ESMC RIG_MAKE_MODEL(RIG_RS, 1)
#define RIG_MODEL_EB200 RIG_MAKE_MODEL(RIG_RS, 2)
#define RIG_MODEL_XK2100 RIG_MAKE_MODEL(RIG_RS, 3)
/*
* Phillips/Simoco PRM80
*/
#define RIG_PRM80 28
#define RIG_BACKEND_PRM80 "prm80"
#define RIG_MODEL_PRM8060 RIG_MAKE_MODEL(RIG_PRM80, 1)
#define RIG_MODEL_PRM8070 RIG_MAKE_MODEL(RIG_PRM80, 2)
/*
* ADAT by HB9CBU
*
* ADDED: frgo (DG1SBG), 2012-01-01
*/
#define RIG_ADAT 29
#define RIG_BACKEND_ADAT "adat"
#define RIG_MODEL_ADT_200A RIG_MAKE_MODEL(RIG_ADAT, 1)
/*
* ICOM Marine
*/
#define RIG_ICMARINE 30
#define RIG_BACKEND_ICMARINE "icmarine"
#define RIG_MODEL_IC_M700PRO RIG_MAKE_MODEL(RIG_ICMARINE, 1)
#define RIG_MODEL_IC_M802 RIG_MAKE_MODEL(RIG_ICMARINE, 2)
#define RIG_MODEL_IC_M710 RIG_MAKE_MODEL(RIG_ICMARINE, 3)
#define RIG_MODEL_IC_M803 RIG_MAKE_MODEL(RIG_ICMARINE, 4)
/*
* Dorji transceiver modules
*/
#define RIG_DORJI 31
#define RIG_BACKEND_DORJI "dorji"
#define RIG_MODEL_DORJI_DRA818V RIG_MAKE_MODEL(RIG_DORJI, 1)
#define RIG_MODEL_DORJI_DRA818U RIG_MAKE_MODEL(RIG_DORJI, 2)
/*
* Barrett
*/
#define RIG_BARRETT 32
#define RIG_BACKEND_BARRETT "barrett"
#define RIG_MODEL_BARRETT_2050 RIG_MAKE_MODEL(RIG_BARRETT, 1)
#define RIG_MODEL_BARRETT_950 RIG_MAKE_MODEL(RIG_BARRETT, 2)
#define RIG_MODEL_BARRETT_4050 RIG_MAKE_MODEL(RIG_BARRETT, 3)
/*
* Elad
*/
#define RIG_ELAD 33
#define RIG_BACKEND_ELAD "elad"
#define RIG_MODEL_ELAD_FDM_DUO RIG_MAKE_MODEL(RIG_ELAD, 1)
/*
* CODAN
*/
#define RIG_CODAN 34
#define RIG_BACKEND_CODAN "codan"
#define RIG_MODEL_CODAN_ENVOY RIG_MAKE_MODEL(RIG_CODAN, 1)
#define RIG_MODEL_CODAN_NGT RIG_MAKE_MODEL(RIG_CODAN, 2)
/*
* Gomspace
*/
#define RIG_GOMSPACE 35
#define RIG_BACKEND_GOMSPACE "gomspace"
#define RIG_MODEL_GS100 RIG_MAKE_MODEL(RIG_GOMSPACE, 1)
//! @endcond
/*
* TODO:
RIG_MODEL_KWZ30, KNEISNER +DOERING
RIG_MODEL_E1800, DASA-Telefunken
etc.
*/
/*! \typedef typedef int rig_model_t
\brief Convenience type definition for rig model.
*/
typedef uint32_t rig_model_t;
/*
* struct rig_backend_list {
* rig_model_t model;
* const char *backend;
* } rig_backend_list[] = RIG_LIST;
*
* TODO:
*
{ RIG_RADIOSHACK, RIG_BACKEND_RADIOSHACK }, \
*/
#endif /* _RIGLIST_H */
================================================
FILE: software/hamlib-w64-4.5~git/include/hamlib/rotator.h
================================================
/*
* Hamlib Interface - Rotator API header
* Copyright (c) 2000-2005 by Stephane Fillod
*
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
*/
#ifndef _ROTATOR_H
#define _ROTATOR_H 1
#include
#include
/**
* \addtogroup rotator
* @{
*/
/**
* \file rotator.h
* \brief Hamlib rotator data structures.
*
* This file contains the data structures and declarations for the Hamlib
* rotator Application Programming Interface (API).
*
* See the rotator.c file for more details on the rotator API functions.
*/
__BEGIN_DECLS
/* Forward struct references */
struct rot;
struct rot_state;
/**
* \typedef typedef struct s_rot ROT
* \brief Main rotator handle type definition.
*
* The #ROT handle is returned by rot_init() and is passed as a parameter to
* every rotator specific API call.
*
* rot_cleanup() must be called when this handle is no longer needed.
*/
typedef struct s_rot ROT;
/**
* \typedef typedef float elevation_t
* \brief Type definition for elevation.
*
* The \a elevation_t type is used as parameter for the rot_set_position() and
* rot_get_position() functions.
*
* Unless specified otherwise, the unit of \a elevation_t is decimal degrees.
*/
typedef float elevation_t;
/**
* \typedef typedef float azimuth_t
* \brief Type definition for azimuth.
*
* The \a azimuth_t type is used as parameter for the rot_set_position() and
* rot_get_position() functions.
*
* Unless specified otherwise, the unit of \a azimuth_t is decimal degrees.
*/
typedef float azimuth_t;
/**
* \brief The token in the netrotctl protocol for returning an error condition code.
*/
#define NETROTCTL_RET "RPRT "
/**
* \def ROT_RESET_ALL
* \brief A macro that returns the flag for the \b reset operation.
*
* \sa rot_reset(), rot_reset_t
*/
#define ROT_RESET_ALL 1
/**
* \typedef typedef int rot_reset_t
* \brief Type definition for rotator reset.
*
* The \a rot_reset_t type is used as parameter for the rot_reset() API
* function.
*/
typedef int rot_reset_t;
/**
* \brief Rotator type flags for bitmasks.
*/
typedef enum {
ROT_FLAG_AZIMUTH = (1 << 1), /*!< Azimuth */
ROT_FLAG_ELEVATION = (1 << 2) /*!< Elevation */
} rot_type_t;
//! @cond Doxygen_Suppress
/* So far only used in ests/dumpcaps_rot.c. */
#define ROT_TYPE_MASK (ROT_FLAG_AZIMUTH|ROT_FLAG_ELEVATION)
//! @endcond
/**
* \def ROT_TYPE_OTHER
* \brief Other type of rotator.
* \def ROT_TYPE_AZIMUTH
* \brief Azimuth only rotator.
* \def ROT_TYPE_ELEVATION
* \brief Elevation only rotator.
* \def ROT_TYPE_AZEL
* \brief Combination azimuth/elevation rotator.
*/
#define ROT_TYPE_OTHER 0
#define ROT_TYPE_AZIMUTH ROT_FLAG_AZIMUTH
#define ROT_TYPE_ELEVATION ROT_FLAG_ELEVATION
#define ROT_TYPE_AZEL (ROT_FLAG_AZIMUTH|ROT_FLAG_ELEVATION)
/**
* \def ROT_MOVE_UP
* \brief A macro that returns the flag for the \b UP direction.
*
* This macro defines the value of the \b UP direction which can be
* used with the rot_move() function.
*
* \sa rot_move(), ROT_MOVE_DOWN, ROT_MOVE_LEFT, ROT_MOVE_CCW,
* ROT_MOVE_RIGHT, ROT_MOVE_CW
*/
#define ROT_MOVE_UP (1<<1)
/**
* \def ROT_MOVE_DOWN
* \brief A macro that returns the flag for the \b DOWN direction.
*
* This macro defines the value of the \b DOWN direction which can be
* used with the rot_move() function.
*
* \sa rot_move(), ROT_MOVE_UP, ROT_MOVE_LEFT, ROT_MOVE_CCW, ROT_MOVE_RIGHT,
* ROT_MOVE_CW
*/
#define ROT_MOVE_DOWN (1<<2)
/**
* \def ROT_MOVE_LEFT
* \brief A macro that returns the flag for the \b LEFT direction.
*
* This macro defines the value of the \b LEFT direction which can be
* used with the rot_move function.
*
* \sa rot_move(), ROT_MOVE_UP, ROT_MOVE_DOWN, ROT_MOVE_CCW, ROT_MOVE_RIGHT,
* ROT_MOVE_CW
*/
#define ROT_MOVE_LEFT (1<<3)
/**
* \def ROT_MOVE_CCW
* \brief A macro that returns the flag for the \b counterclockwise direction.
*
* This macro defines the value of the \b counterclockwise direction which
* can be used with the rot_move() function. This value is equivalent to
* ROT_MOVE_LEFT.
*
* \sa rot_move(), ROT_MOVE_UP, ROT_MOVE_DOWN, ROT_MOVE_LEFT, ROT_MOVE_RIGHT,
* ROT_MOVE_CW
*/
#define ROT_MOVE_CCW ROT_MOVE_LEFT
/**
* \def ROT_MOVE_RIGHT
* \brief A macro that returns the flag for the \b RIGHT direction.
*
* This macro defines the value of the \b RIGHT direction which can be used
* with the rot_move() function.
*
* \sa rot_move(), ROT_MOVE_UP, ROT_MOVE_DOWN, ROT_MOVE_LEFT, ROT_MOVE_CCW,
* ROT_MOVE_CW
*/
#define ROT_MOVE_RIGHT (1<<4)
/**
* \def ROT_MOVE_CW
* \brief A macro that returns the flag for the \b clockwise direction.
*
* This macro defines the value of the \b clockwise direction which can be
* used with the rot_move() function. This value is equivalent to
* ROT_MOVE_RIGHT.
*
* \sa rot_move(), ROT_MOVE_UP, ROT_MOVE_DOWN, ROT_MOVE_LEFT, ROT_MOVE_CCW,
* ROT_MOVE_RIGHT
*/
#define ROT_MOVE_CW ROT_MOVE_RIGHT
/**
* \brief Rotator status flags
*/
typedef enum {
ROT_STATUS_NONE = 0, /*!< '' -- No status. */
ROT_STATUS_BUSY = (1 << 0), /*!< Rotator is busy, not accepting commands. */
ROT_STATUS_MOVING = (1 << 1), /*!< Rotator is currently moving (direction type not specified). */
ROT_STATUS_MOVING_AZ = (1 << 2), /*!< Azimuth rotator is currently moving (direction not specified). */
ROT_STATUS_MOVING_LEFT = (1 << 3), /*!< Azimuth rotator is currently moving left. */
ROT_STATUS_MOVING_RIGHT = (1 << 4), /*!< Azimuth rotator is currently moving right. */
ROT_STATUS_MOVING_EL = (1 << 5), /*!< Elevation rotator is currently moving (direction not specified). */
ROT_STATUS_MOVING_UP = (1 << 6), /*!< Elevation rotator is currently moving up. */
ROT_STATUS_MOVING_DOWN = (1 << 7), /*!< Elevation rotator is currently moving down. */
ROT_STATUS_LIMIT_UP = (1 << 8), /*!< The elevation rotator has reached its limit to move up. */
ROT_STATUS_LIMIT_DOWN = (1 << 9), /*!< The elevation rotator has reached its limit to move down.*/
ROT_STATUS_LIMIT_LEFT = (1 << 10), /*!< The azimuth rotator has reached its limit to move left (CCW). */
ROT_STATUS_LIMIT_RIGHT = (1 << 11), /*!< The azimuth rotator has reached its limit to move right (CW). */
ROT_STATUS_OVERLAP_UP = (1 << 12), /*!< The elevation rotator has rotated up past 360 degrees. */
ROT_STATUS_OVERLAP_DOWN = (1 << 13), /*!< The elevation rotator has rotated down past 0 degrees. */
ROT_STATUS_OVERLAP_LEFT = (1 << 14), /*!< The azimuth rotator has rotated left (CCW) past 0 degrees. */
ROT_STATUS_OVERLAP_RIGHT = (1 << 16), /*!< The azimuth rotator has rotated right (CW) past 360 degrees. */
} rot_status_t;
//! @cond Doxygen_Suppress
/* So far only used in tests/sprintflst.c. */
#define ROT_STATUS_N(n) (1u<<(n))
//! @endcond
/**
* \brief Macro for not changing the rotator speed with move() function.
*/
#define ROT_SPEED_NOCHANGE (-1)
/**
* \brief Rotator Level Settings.
*
* Various operating levels supported by a rotator.
*
* \c STRING used in the \c rotctl and \c rotctld utilities.
*
* \sa rot_parse_level(), rot_strlevel()
*/
enum rot_level_e {
ROT_LEVEL_NONE = 0, /*!< '' -- No Level. */
ROT_LEVEL_SPEED = (1 << 0), /*!< \c SPEED -- Rotation speed, arg int (default range 1-100 if not specified). */
ROT_LEVEL_63 = CONSTANT_64BIT_FLAG(63), /*!< **Future use**, last level. */
};
//! @cond Doxygen_Suppress
#define ROT_LEVEL_FLOAT_LIST (0)
#define ROT_LEVEL_READONLY_LIST (0)
#define ROT_LEVEL_IS_FLOAT(l) ((l)&ROT_LEVEL_FLOAT_LIST)
#define ROT_LEVEL_SET(l) ((l)&~ROT_LEVEL_READONLY_LIST)
//! @endcond
/** @cond Doxygen_Suppress
* FIXME: The following needs more explanation about how STRING relates
* to this macro.
* @endcond
*/
/**
* \brief Rotator Parameters
*
* Parameters are settings that are not related to core rotator functionality,
* i.e. antenna rotation.
*
* \c STRING used in the \c rotctl and \c rotctld utilities.
*
* \sa rot_parse_parm(), rot_strparm()
*/
enum rot_parm_e {
ROT_PARM_NONE = 0, /*!< '' -- No Parm */
};
//! @cond Doxygen_Suppress
#define ROT_PARM_FLOAT_LIST (0)
#define ROT_PARM_READONLY_LIST (0)
#define ROT_PARM_IS_FLOAT(l) ((l)&ROT_PARM_FLOAT_LIST)
#define ROT_PARM_SET(l) ((l)&~ROT_PARM_READONLY_LIST)
//! @endcond
/** @cond Doxygen_Suppress
* FIXME: The following needs more explanation about how STRING relates
* to these macros.
* @endcond
*/
/**
* \brief Rotator Function Settings.
*
* Various operating functions supported by a rotator.
*
* \c STRING used in the \c rotctl and \c rotctld utilities.
*
* \sa rot_parse_func(), rot_strfunc()
*/
#define ROT_FUNC_NONE 0 /*!< '' -- No Function */
#ifndef SWIGLUAHIDE
/* Hide the top 32 bits from the old Lua binding as they can't be represented */
#define ROT_FUNC_BIT63 CONSTANT_64BIT_FLAG (63) /*!< **Future use**, ROT_FUNC items. */
/* 63 is this highest bit number that can be used */
#endif
/* Basic rot type, can store some useful info about different rotators. Each
* lib must be able to populate this structure, so we can make useful
* enquiries about capabilities.
*/
/**
* \struct rot_caps
* \brief Rotator capability data structure.
*
* The main idea of this structure is that it will be defined by the backend
* rotator driver, and will remain read-only for the application. Fields that
* need to be modifiable by the application are copied into the rot_state
* structure, which is the private memory area of the #ROT instance.
*
* This way, you can have several rotators running within the same
* application, sharing the rot_caps structure of the backend, while keeping
* their own customized data.
*
* \b Note: Don't move fields around and only add new fields at the end of the
* rot_caps structure. Shared libraries and DLLs depend on a constant
* structure to maintain compatibility.
*/
struct rot_caps {
rot_model_t rot_model; /*!< Rotator model as defined in rotlist.h. */
const char *model_name; /*!< Model name, e.g. TT-360. */
const char *mfg_name; /*!< Manufacturer, e.g. Tower Torquer. */
const char *version; /*!< Driver version, typically in YYYYMMDD.x format. */
const char *copyright; /*!< Copyright info (should be LGPL). */
enum rig_status_e status; /*!< Driver status. */
int rot_type; /*!< Rotator type. */
enum rig_port_e port_type; /*!< Type of communication port (serial, ethernet, etc.). */
int serial_rate_min; /*!< Minimal serial speed. */
int serial_rate_max; /*!< Maximal serial speed. */
int serial_data_bits; /*!< Number of data bits. */
int serial_stop_bits; /*!< Number of stop bits. */
enum serial_parity_e serial_parity; /*!< Parity. */
enum serial_handshake_e serial_handshake; /*!< Handshake. */
int write_delay; /*!< Write delay. */
int post_write_delay; /*!< Post-write delay. */
int timeout; /*!< Timeout. */
int retry; /*!< Number of retries if command fails. */
setting_t has_get_func; /*!< List of get functions. */
setting_t has_set_func; /*!< List of set functions. */
setting_t has_get_level; /*!< List of get levels. */
setting_t has_set_level; /*!< List of set levels. */
setting_t has_get_parm; /*!< List of get parameters. */
setting_t has_set_parm; /*!< List of set parameters. */
rot_status_t has_status; /*!< Supported status flags. */
gran_t level_gran[RIG_SETTING_MAX]; /*!< level granularity (i.e. steps). */
gran_t parm_gran[RIG_SETTING_MAX]; /*!< parm granularity (i.e. steps). */
const struct confparams *extparms; /*!< Extension parameters list, \sa rot_ext.c. */
const struct confparams *extlevels; /*!< Extension levels list, \sa rot_ext.c. */
const struct confparams *extfuncs; /*!< Extension functions list, \sa rot_ext.c. */
int *ext_tokens; /*!< Extension token list. */
/*
* Movement range, az is relative to North
* negative values allowed for overlap
*/
azimuth_t min_az; /*!< Lower limit for azimuth (relative to North). */
azimuth_t max_az; /*!< Upper limit for azimuth (relative to North). */
elevation_t
min_el; /*!< Lower limit for elevation. */
elevation_t
max_el; /*!< Upper limit for elevation. */
const struct confparams *cfgparams; /*!< Configuration parameters. */
const rig_ptr_t priv; /*!< Private data. */
/*
* Rot Admin API
*
*/
int (*rot_init)(ROT *rot); /*!< Pointer to backend implementation of ::rot_init(). */
int (*rot_cleanup)(ROT *rot); /*!< Pointer to backend implementation of ::rot_cleanup(). */
int (*rot_open)(ROT *rot); /*!< Pointer to backend implementation of ::rot_open(). */
int (*rot_close)(ROT *rot); /*!< Pointer to backend implementation of ::rot_close(). */
int (*set_conf)(ROT *rot, token_t token, const char *val); /*!< Pointer to backend implementation of ::rot_set_conf(). */
int (*get_conf)(ROT *rot, token_t token, char *val); /*!< Pointer to backend implementation of ::rot_get_conf(). */
/*
* General API commands, from most primitive to least.. :()
* List Set/Get functions pairs
*/
int (*set_position)(ROT *rot, azimuth_t azimuth, elevation_t elevation); /*!< Pointer to backend implementation of ::rot_set_position(). */
int (*get_position)(ROT *rot, azimuth_t *azimuth, elevation_t *elevation); /*!< Pointer to backend implementation of ::rot_get_position(). */
int (*stop)(ROT *rot); /*!< Pointer to backend implementation of ::rot_stop(). */
int (*park)(ROT *rot); /*!< Pointer to backend implementation of ::rot_park(). */
int (*reset)(ROT *rot, rot_reset_t reset); /*!< Pointer to backend implementation of ::rot_reset(). */
int (*move)(ROT *rot, int direction, int speed); /*!< Pointer to backend implementation of ::rot_move(). */
/* get firmware info, etc. */
const char * (*get_info)(ROT *rot); /*!< Pointer to backend implementation of ::rot_get_info(). */
int (*set_level)(ROT *rot, setting_t level, value_t val); /*!< Pointer to backend implementation of ::rot_set_level(). */
int (*get_level)(ROT *rot, setting_t level, value_t *val); /*!< Pointer to backend implementation of ::rot_get_level(). */
int (*set_func)(ROT *rot, setting_t func, int status); /*!< Pointer to backend implementation of ::rot_set_func(). */
int (*get_func)(ROT *rot, setting_t func, int *status); /*!< Pointer to backend implementation of ::rot_get_func(). */
int (*set_parm)(ROT *rot, setting_t parm, value_t val); /*!< Pointer to backend implementation of ::rot_set_parm(). */
int (*get_parm)(ROT *rot, setting_t parm, value_t *val); /*!< Pointer to backend implementation of ::rot_get_parm(). */
int (*set_ext_level)(ROT *rot, token_t token, value_t val); /*!< Pointer to backend implementation of ::rot_set_ext_level(). */
int (*get_ext_level)(ROT *rot, token_t token, value_t *val); /*!< Pointer to backend implementation of ::rot_get_ext_level(). */
int (*set_ext_func)(ROT *rot, token_t token, int status); /*!< Pointer to backend implementation of ::rot_set_ext_func(). */
int (*get_ext_func)(ROT *rot, token_t token, int *status); /*!< Pointer to backend implementation of ::rot_get_ext_func(). */
int (*set_ext_parm)(ROT *rot, token_t token, value_t val); /*!< Pointer to backend implementation of ::rot_set_ext_parm(). */
int (*get_ext_parm)(ROT *rot, token_t token, value_t *val); /*!< Pointer to backend implementation of ::rot_get_ext_parm(). */
int (*get_status)(ROT *rot, rot_status_t *status); /*!< Pointer to backend implementation of ::rot_get_status(). */
const char *macro_name; /*!< Rotator model macro name. */
int (*get_conf2)(ROT *rot, token_t token, char *val, int val_len); /*!< Pointer to backend implementation of ::rot_get_conf2(). */
};
//! @cond Doxygen_Suppress
#define ROT_MODEL(arg) .rot_model=arg,.macro_name=#arg
//! @endcond
/**
* \struct rot_state
* \brief Rotator state structure
*
* This structure contains live data, as well as a copy of capability fields
* that may be updated, i.e. customized while the #ROT handle is instantiated.
*
* It is fine to move fields around, as this kind of structure should not be
* initialized like rot_caps are.
*/
struct rot_state {
/*
* overridable fields
*/
azimuth_t min_az; /*!< Lower limit for azimuth (overridable). */
azimuth_t max_az; /*!< Upper limit for azimuth (overridable). */
elevation_t min_el; /*!< Lower limit for elevation (overridable). */
elevation_t max_el; /*!< Upper limit for elevation (overridable). */
int south_zero; /*!< South is zero degrees. */
azimuth_t az_offset; /*!< Offset to be applied to azimuth. */
elevation_t el_offset; /*!< Offset to be applied to elevation. */
setting_t has_get_func; /*!< List of get functions. */
setting_t has_set_func; /*!< List of set functions. */
setting_t has_get_level; /*!< List of get levels. */
setting_t has_set_level; /*!< List of set levels. */
setting_t has_get_parm; /*!< List of get parameters. */
setting_t has_set_parm; /*!< List of set parameters. */
rot_status_t has_status; /*!< Supported status flags. */
gran_t level_gran[RIG_SETTING_MAX]; /*!< Level granularity. */
gran_t parm_gran[RIG_SETTING_MAX]; /*!< Parameter granularity. */
/*
* non overridable fields, internal use
*/
hamlib_port_t_deprecated rotport_deprecated; /*!< Rotator port (internal use). Deprecated */
hamlib_port_t_deprecated rotport2_deprecated; /*!< 2nd Rotator port (internal use). Deprecated */
int comm_state; /*!< Comm port state, i.e. opened or closed. */
rig_ptr_t priv; /*!< Pointer to private rotator state data. */
rig_ptr_t obj; /*!< Internal use by hamlib++ for event handling. */
int current_speed; /*!< Current speed 1-100, to be used when no change to speed is requested. */
hamlib_port_t rotport; /*!< Rotator port (internal use). */
hamlib_port_t rotport2; /*!< 2nd Rotator port (internal use). */
};
/**
* \struct s_rot
* \brief Master rotator structure.
*
* This is the master data structure acting as the #ROT handle for the
* controlled rotator. A pointer to this structure is returned by the
* rot_init() API function and is passed as a parameter to every rotator
* specific API call.
*
* \sa rot_init(), rot_caps, rot_state
*/
struct s_rot {
struct rot_caps *caps; /*!< Rotator caps. */
struct rot_state state; /*!< Rotator state. */
};
//! @cond Doxygen_Suppress
/* --------------- API function prototypes -----------------*/
extern HAMLIB_EXPORT(ROT *)
rot_init HAMLIB_PARAMS((rot_model_t rot_model));
extern HAMLIB_EXPORT(int)
rot_open HAMLIB_PARAMS((ROT *rot));
extern HAMLIB_EXPORT(int)
rot_close HAMLIB_PARAMS((ROT *rot));
extern HAMLIB_EXPORT(int)
rot_cleanup HAMLIB_PARAMS((ROT *rot));
extern HAMLIB_EXPORT(int)
rot_set_conf HAMLIB_PARAMS((ROT *rot,
token_t token,
const char *val));
extern HAMLIB_EXPORT(int)
rot_get_conf HAMLIB_PARAMS((ROT *rot,
token_t token,
char *val));
extern HAMLIB_EXPORT(int)
rot_get_conf2 HAMLIB_PARAMS((ROT *rot,
token_t token,
char *val,
int val_len));
/*
* General API commands, from most primitive to least.. )
* List Set/Get functions pairs
*/
extern HAMLIB_EXPORT(int)
rot_set_position HAMLIB_PARAMS((ROT *rot,
azimuth_t azimuth,
elevation_t elevation));
extern HAMLIB_EXPORT(int)
rot_get_position HAMLIB_PARAMS((ROT *rot,
azimuth_t *azimuth,
elevation_t *elevation));
extern HAMLIB_EXPORT(int)
rot_stop HAMLIB_PARAMS((ROT *rot));
extern HAMLIB_EXPORT(int)
rot_park HAMLIB_PARAMS((ROT *rot));
extern HAMLIB_EXPORT(int)
rot_reset HAMLIB_PARAMS((ROT *rot,
rot_reset_t reset));
extern HAMLIB_EXPORT(int)
rot_move HAMLIB_PARAMS((ROT *rot,
int direction,
int speed));
extern HAMLIB_EXPORT(setting_t)
rot_has_get_level HAMLIB_PARAMS((ROT *rot,
setting_t level));
extern HAMLIB_EXPORT(setting_t)
rot_has_set_level HAMLIB_PARAMS((ROT *rot,
setting_t level));
extern HAMLIB_EXPORT(setting_t)
rot_has_get_parm HAMLIB_PARAMS((ROT *rot,
setting_t parm));
extern HAMLIB_EXPORT(setting_t)
rot_has_set_parm HAMLIB_PARAMS((ROT *rot,
setting_t parm));
extern HAMLIB_EXPORT(setting_t)
rot_has_get_func HAMLIB_PARAMS((ROT *rot,
setting_t func));
extern HAMLIB_EXPORT(setting_t)
rot_has_set_func HAMLIB_PARAMS((ROT *rot,
setting_t func));
extern HAMLIB_EXPORT(int)
rot_set_func HAMLIB_PARAMS((ROT *rot,
setting_t func,
int status));
extern HAMLIB_EXPORT(int)
rot_get_func HAMLIB_PARAMS((ROT *rot,
setting_t func,
int *status));
extern HAMLIB_EXPORT(int)
rot_set_level HAMLIB_PARAMS((ROT *rig,
setting_t level,
value_t val));
extern HAMLIB_EXPORT(int)
rot_get_level HAMLIB_PARAMS((ROT *rig,
setting_t level,
value_t *val));
extern HAMLIB_EXPORT(int)
rot_set_parm HAMLIB_PARAMS((ROT *rig,
setting_t parm,
value_t val));
extern HAMLIB_EXPORT(int)
rot_get_parm HAMLIB_PARAMS((ROT *rig,
setting_t parm,
value_t *val));
extern HAMLIB_EXPORT(int)
rot_set_ext_level HAMLIB_PARAMS((ROT *rig,
token_t token,
value_t val));
extern HAMLIB_EXPORT(int)
rot_get_ext_level HAMLIB_PARAMS((ROT *rig,
token_t token,
value_t *val));
extern HAMLIB_EXPORT(int)
rot_set_ext_func HAMLIB_PARAMS((ROT *rig,
token_t token,
int status));
extern HAMLIB_EXPORT(int)
rot_get_ext_func HAMLIB_PARAMS((ROT *rig,
token_t token,
int *status));
extern HAMLIB_EXPORT(int)
rot_set_ext_parm HAMLIB_PARAMS((ROT *rig,
token_t token,
value_t val));
extern HAMLIB_EXPORT(int)
rot_get_ext_parm HAMLIB_PARAMS((ROT *rig,
token_t token,
value_t *val));
extern HAMLIB_EXPORT(const char *)
rot_get_info HAMLIB_PARAMS((ROT *rot));
extern HAMLIB_EXPORT(int)
rot_get_status HAMLIB_PARAMS((ROT *rot,
rot_status_t *status));
extern HAMLIB_EXPORT(int)
rot_register HAMLIB_PARAMS((const struct rot_caps *caps));
extern HAMLIB_EXPORT(int)
rot_unregister HAMLIB_PARAMS((rot_model_t rot_model));
extern HAMLIB_EXPORT(int)
rot_list_foreach HAMLIB_PARAMS((int (*cfunc)(const struct rot_caps *,
rig_ptr_t),
rig_ptr_t data));
extern HAMLIB_EXPORT(int)
rot_load_backend HAMLIB_PARAMS((const char *be_name));
extern HAMLIB_EXPORT(int)
rot_check_backend HAMLIB_PARAMS((rot_model_t rot_model));
extern HAMLIB_EXPORT(int)
rot_load_all_backends HAMLIB_PARAMS((void));
extern HAMLIB_EXPORT(rot_model_t)
rot_probe_all HAMLIB_PARAMS((hamlib_port_t *p));
extern HAMLIB_EXPORT(int)
rot_token_foreach HAMLIB_PARAMS((ROT *rot,
int (*cfunc)(const struct confparams *,
rig_ptr_t),
rig_ptr_t data));
extern HAMLIB_EXPORT(const struct confparams *)
rot_confparam_lookup HAMLIB_PARAMS((ROT *rot,
const char *name));
extern HAMLIB_EXPORT(token_t)
rot_token_lookup HAMLIB_PARAMS((ROT *rot,
const char *name));
extern HAMLIB_EXPORT(int)
rot_ext_func_foreach HAMLIB_PARAMS((ROT *rot,
int (*cfunc)(ROT *,
const struct confparams *,
rig_ptr_t),
rig_ptr_t data));
extern HAMLIB_EXPORT(int)
rot_ext_level_foreach HAMLIB_PARAMS((ROT *rot,
int (*cfunc)(ROT *,
const struct confparams *,
rig_ptr_t),
rig_ptr_t data));
extern HAMLIB_EXPORT(int)
rot_ext_parm_foreach HAMLIB_PARAMS((ROT *rot,
int (*cfunc)(ROT *,
const struct confparams *,
rig_ptr_t),
rig_ptr_t data));
extern HAMLIB_EXPORT(const struct confparams *)
rot_ext_lookup HAMLIB_PARAMS((ROT *rot,
const char *name));
extern HAMLIB_EXPORT(const struct confparams *)
rot_ext_lookup_tok HAMLIB_PARAMS((ROT *rot,
token_t token));
extern HAMLIB_EXPORT(token_t)
rot_ext_token_lookup HAMLIB_PARAMS((ROT *rot,
const char *name));
extern HAMLIB_EXPORT(const struct rot_caps *)
rot_get_caps HAMLIB_PARAMS((rot_model_t rot_model));
extern HAMLIB_EXPORT(int)
qrb HAMLIB_PARAMS((double lon1,
double lat1,
double lon2,
double lat2,
double *distance,
double *azimuth));
extern HAMLIB_EXPORT(double)
distance_long_path HAMLIB_PARAMS((double distance));
extern HAMLIB_EXPORT(double)
azimuth_long_path HAMLIB_PARAMS((double azimuth));
#if 0
extern HAMLIB_EXPORT(int)
longlat2locator HAMLIB_PARAMS((double longitude,
double latitude,
char *locator_res,
int pair_count));
extern HAMLIB_EXPORT(int)
locator2longlat HAMLIB_PARAMS((double *longitude,
double *latitude,
const char *locator));
#endif
extern HAMLIB_EXPORT(double)
dms2dec HAMLIB_PARAMS((int degrees,
int minutes,
double seconds,
int sw));
extern HAMLIB_EXPORT(int)
dec2dms HAMLIB_PARAMS((double dec,
int *degrees,
int *minutes,
double *seconds,
int *sw));
extern HAMLIB_EXPORT(int)
dec2dmmm HAMLIB_PARAMS((double dec,
int *degrees,
double *minutes,
int *sw));
extern HAMLIB_EXPORT(double)
dmmm2dec HAMLIB_PARAMS((int degrees,
double minutes,
double seconds,
int sw));
extern HAMLIB_EXPORT(setting_t) rot_parse_func(const char *s);
extern HAMLIB_EXPORT(setting_t) rot_parse_level(const char *s);
extern HAMLIB_EXPORT(setting_t) rot_parse_parm(const char *s);
extern HAMLIB_EXPORT(const char *) rot_strfunc(setting_t);
extern HAMLIB_EXPORT(const char *) rot_strlevel(setting_t);
extern HAMLIB_EXPORT(const char *) rot_strparm(setting_t);
extern HAMLIB_EXPORT(const char *) rot_strstatus(rot_status_t);
//! @endcond
/**
* \def rot_debug
* \brief Convenience macro for generating debugging messages.
*
* This is an alias of the rig_debug() function call and is used in the same
* manner.
*/
#define rot_debug rig_debug
__END_DECLS
#endif /* _ROTATOR_H */
/** @} */
================================================
FILE: software/hamlib-w64-4.5~git/include/hamlib/rotlist.h
================================================
/*
* Hamlib Interface - list of known rotators
* Copyright (c) 2000-2011 by Stephane Fillod
* Copyright (c) 2000-2002 by Frank Singleton
*
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
*/
#ifndef _ROTLIST_H
#define _ROTLIST_H 1
//! @cond Doxygen_Suppress
#define ROT_MAKE_MODEL(a,b) ((a)*100+(b))
#define ROT_BACKEND_NUM(a) ((a)/100)
//! @endcond
/**
* \addtogroup rotator
* @{
*/
/**
* \file rotlist.h
* \brief Hamlib rotator model definitions.
*
* This file contains rotator model definitions for the Hamlib rotator
* Application Programming Interface (API). Each distinct rotator type has a
* unique model number (ID) and is used by Hamlib to identify and distinguish
* between the different hardware drivers. The exact model numbers can be
* acquired using the macros in this file. To obtain a list of supported
* rotator branches, one can use the statically defined ROT_BACKEND_LIST macro
* (defined in configure.ac). To obtain a full list of supported rotators
* (including each model in every branch), the foreach_opened_rot() API
* function can be used.
*
* The model number, or ID, is used to tell Hamlib which rotator the client
* wishes to use which is done with the rot_init() API call.
*/
/**
* \def ROT_MODEL_NONE
* \brief A macro that returns the model number for an unknown model.
*
* The none backend, as the name suggests, does nothing. It is mainly for
* internal use.
*/
#define ROT_MODEL_NONE 0
/**
* \brief A macro that returns the model number for the DUMMY backend.
*
* \def ROT_MODEL_DUMMY
*
* The DUMMY backend, as the name suggests, is a backend which performs
* no hardware operations and always behaves as one would expect. It can
* be thought of as a hardware simulator and is very useful for testing
* client applications.
*/
/**
* \brief A macro that returns the model number for the NETROTCTL backend.
*
* \def ROT_MODEL_NETROTCTL
*
* The NETROTCTL backend allows use of the `rotctld` daemon through the normal
* Hamlib API.
*/
//! @cond Doxygen_Suppress
#define ROT_DUMMY 0
#define ROT_BACKEND_DUMMY "dummy"
//! @endcond
#define ROT_MODEL_DUMMY ROT_MAKE_MODEL(ROT_DUMMY, 1)
#define ROT_MODEL_NETROTCTL ROT_MAKE_MODEL(ROT_DUMMY, 2)
/**
* \brief A macro that returns the model number of the EASYCOMM 1 backend.
*
* \def ROT_MODEL_EASYCOMM1
*
* The EASYCOMM1 backend can be used with rotators that support the EASYCOMM
* I Standard.
*/
/**
* \brief A macro that returns the model number of the EASYCOMM 2 backend.
*
* \def ROT_MODEL_EASYCOMM2
*
* The EASYCOMM2 backend can be used with rotators that support the EASYCOMM
* II Standard.
*/
/**
* \brief A macro that returns the model number of the EASYCOMM 3 backend.
*
* \def ROT_MODEL_EASYCOMM3
*
* The EASYCOMM3 backend can be used with rotators that support the EASYCOMM
* III Standard.
*/
//! @cond Doxygen_Suppress
#define ROT_EASYCOMM 2
#define ROT_BACKEND_EASYCOMM "easycomm"
//! @endcond
#define ROT_MODEL_EASYCOMM1 ROT_MAKE_MODEL(ROT_EASYCOMM, 1)
#define ROT_MODEL_EASYCOMM2 ROT_MAKE_MODEL(ROT_EASYCOMM, 2)
#define ROT_MODEL_EASYCOMM3 ROT_MAKE_MODEL(ROT_EASYCOMM, 4)
/**
* \brief A macro that returns the model number of the FODTRACK backend.
*
* \def ROT_MODEL_FODTRACK
*
* The FODTRACK backend can be used with rotators that support the FODTRACK
* Standard.
*/
//! @cond Doxygen_Suppress
#define ROT_FODTRACK 3
#define ROT_BACKEND_FODTRACK "fodtrack"
//! @endcond
#define ROT_MODEL_FODTRACK ROT_MAKE_MODEL(ROT_FODTRACK, 1)
/**
* \brief A macro that returns the model number of the ROTOREZ backend.
*
* \def ROT_MODEL_ROTOREZ
*
* The ROTOREZ backend can be used with Hy-Gain rotators that support the
* extended DCU command set by the Idiom Press Rotor-EZ board.
*/
/**
* \brief A macro that returns the model number of the ROTORCARD backend.
*
* \def ROT_MODEL_ROTORCARD
*
* The ROTORCARD backend can be used with Yaesu rotators that support the
* extended DCU command set by the Idiom Press Rotor Card board.
*/
/**
* \brief A macro that returns the model number of the DCU backend.
*
* \def ROT_MODEL_DCU
*
* The DCU backend can be used with rotators that support the DCU command set
* by Hy-Gain (currently the DCU-1).
*/
/**
* \brief A macro that returns the model number of the ERC backend.
*
* \def ROT_MODEL_ERC
*
* The ERC backend can be used with rotators that support the DCU command set
* by DF9GR (currently the ERC).
*/
/**
* \brief A macro that returns the model number of the RT21 backend.
*
* \def ROT_MODEL_RT21
*
* The RT21 backend can be used with rotators that support the DCU command set
* by Green Heron (currently the RT-21).
*/
//! @cond Doxygen_Suppress
#define ROT_ROTOREZ 4
#define ROT_BACKEND_ROTOREZ "rotorez"
//! @endcond
#define ROT_MODEL_ROTOREZ ROT_MAKE_MODEL(ROT_ROTOREZ, 1)
#define ROT_MODEL_ROTORCARD ROT_MAKE_MODEL(ROT_ROTOREZ, 2)
#define ROT_MODEL_DCU ROT_MAKE_MODEL(ROT_ROTOREZ, 3)
#define ROT_MODEL_ERC ROT_MAKE_MODEL(ROT_ROTOREZ, 4)
#define ROT_MODEL_RT21 ROT_MAKE_MODEL(ROT_ROTOREZ, 5)
/**
* \brief A macro that returns the model number of the SARTEK1 backend.
*
* \def ROT_MODEL_SARTEK1
*
* The SARTEK1 backend can be used with rotators that support the SARtek
* protocol.
*/
//! @cond Doxygen_Suppress
#define ROT_SARTEK 5
#define ROT_BACKEND_SARTEK "sartek"
//! @endcond
#define ROT_MODEL_SARTEK1 ROT_MAKE_MODEL(ROT_SARTEK, 1)
/**
* \brief A macro that returns the model number of the GS232A backend.
*
* \def ROT_MODEL_GS232A
*
* The GS232A backend can be used with rotators that support the GS-232A
* protocol.
*/
/**
* \brief A macro that returns the model number of the GS232 backend.
*
* \def ROT_MODEL_GS232_GENERIC
*
* The GS232_GENERIC backend can be used with rotators that support the
* generic (even if not coded correctly) GS-232 protocol.
*/
/**
* \brief A macro that returns the model number of the GS232B backend.
*
* \def ROT_MODEL_GS232B
*
* The GS232B backend can be used with rotators that support the GS232B
* protocol.
*/
/**
* \brief A macro that returns the model number of the F1TETRACKER backend.
*
* \def ROT_MODEL_F1TETRACKER
*
* The F1TETRACKER backend can be used with rotators that support the F1TE
* Tracker protocol.
*/
/**
* \brief A macro that returns the model number of the GS23 backend.
*
* \def ROT_MODEL_GS23
*
* The GS23 backend can be used with rotators that support the GS-23 protocol.
*/
/**
* \brief A macro that returns the model number of the GS232 backend.
*
* \def ROT_MODEL_GS232
*
* The GS232 backend can be used with rotators that support the GS-232
* protocol.
*/
/**
* \brief A macro that returns the model number of the LVB backend.
*
* \def ROT_MODEL_LVB
*
* The LVB backend can be used with rotators that support the G6LVB AMSAT LVB
* Tracker GS-232 based protocol.
*/
/**
* \brief A macro that returns the model number of the ST2 backend.
*
* \def ROT_MODEL_ST2
*
* The ST2 backend can be used with rotators that support the Fox Delta ST2
* GS-232 based protocol.
*/
/**
* \brief A macro that returns the model number of the GS232A_AZ Azimuth backend.
*
* \def ROT_MODEL_GS232A_AZ
*
* The GS232A_AZ backend can be used with azimuth rotators that support the
* GS-232A protocol.
*/
/**
* \brief A macro that returns the model number of the GS232A_EL Elevation backend.
*
* \def ROT_MODEL_GS232A_EL
*
* The GS232A_EL backend can be used with elevation rotators that support the
* GS-232A protocol.
*/
/**
* \brief A macro that returns the model number of the GS232B_AZ Azimuth backend.
*
* \def ROT_MODEL_GS232B_AZ
*
* The GS232B_AZ backend can be used with azimuth rotators that support the
* GS-232B protocol.
*/
/**
* \brief A macro that returns the model number of the GS232B_EL Elevation backend.
*
* \def ROT_MODEL_GS232B_EL
*
* The GS232B_EL backend can be used with elevation rotators that support the
* GS-232B protocol.
*/
//! @cond Doxygen_Suppress
#define ROT_GS232A 6
#define ROT_BACKEND_GS232A "gs232a"
//! @endcond
#define ROT_MODEL_GS232A ROT_MAKE_MODEL(ROT_GS232A, 1)
#define ROT_MODEL_GS232_GENERIC ROT_MAKE_MODEL(ROT_GS232A, 2) /* GENERIC */
#define ROT_MODEL_GS232B ROT_MAKE_MODEL(ROT_GS232A, 3)
#define ROT_MODEL_F1TETRACKER ROT_MAKE_MODEL(ROT_GS232A, 4)
#define ROT_MODEL_GS23 ROT_MAKE_MODEL(ROT_GS232A, 5)
#define ROT_MODEL_GS232 ROT_MAKE_MODEL(ROT_GS232A, 6) /* Not A or B */
#define ROT_MODEL_LVB ROT_MAKE_MODEL(ROT_GS232A, 7)
#define ROT_MODEL_ST2 ROT_MAKE_MODEL(ROT_GS232A, 8)
#define ROT_MODEL_GS232A_AZ ROT_MAKE_MODEL(ROT_GS232A, 9)
#define ROT_MODEL_GS232A_EL ROT_MAKE_MODEL(ROT_GS232A, 10)
#define ROT_MODEL_GS232B_AZ ROT_MAKE_MODEL(ROT_GS232A, 11)
#define ROT_MODEL_GS232B_EL ROT_MAKE_MODEL(ROT_GS232A, 12)
/**
* \brief A macro that returns the model number of the PCROTOR backend.
*
* \def ROT_MODEL_PCROTOR
*
* The PCROTOR backend is a member of the kit backend group that can be used
* with home brewed rotators.
*/
//! @cond Doxygen_Suppress
#define ROT_KIT 7
#define ROT_BACKEND_KIT "kit"
//! @endcond
#define ROT_MODEL_PCROTOR ROT_MAKE_MODEL(ROT_KIT, 1)
/**
* \brief A macro that returns the model number of the HD1780 backend.
*
* \def ROT_MODEL_HD1780
*
* The HD1780 backend can be used with rotators that support the Heathkit
* HD-1780 protocol.
*/
//! @cond Doxygen_Suppress
#define ROT_HEATHKIT 8
#define ROT_BACKEND_HEATHKIT "heathkit"
//! @endcond
#define ROT_MODEL_HD1780 ROT_MAKE_MODEL(ROT_HEATHKIT, 1)
/**
* \brief A macro that returns the model number of the ROT2PROG backend.
*
* \def ROT_MODEL_SPID_ROT2PROG
*
* The SPID_ROT2PROG backend can be used with rotators that support the SPID
* azimuth and elevation protocol.
*/
/**
* \brief A macro that returns the model number of the ROT1PROG backend.
*
* \def ROT_MODEL_SPID_ROT1PROG
*
* The SPID_ROT1PROG backend can be used with rotators that support the SPID
* azimuth protocol.
*/
/**
* \brief A macro that returns the model number of the SPID_MD01_ROT2PROG backend.
*
* \def ROT_MODEL_SPID_MD01_ROT2PROG
*
* The SPID_MD01_ROT2PROG backend can be used with rotators that support the
* extended SPID ROT2PROG azimuth and elevation protocol.
*/
//! @cond Doxygen_Suppress
#define ROT_SPID 9
#define ROT_BACKEND_SPID "spid"
//! @endcond
#define ROT_MODEL_SPID_ROT2PROG ROT_MAKE_MODEL(ROT_SPID, 1)
#define ROT_MODEL_SPID_ROT1PROG ROT_MAKE_MODEL(ROT_SPID, 2)
#define ROT_MODEL_SPID_MD01_ROT2PROG ROT_MAKE_MODEL(ROT_SPID, 3)
/**
* \brief A macro that returns the model number of the RC2800 backend.
*
* \def ROT_MODEL_RC2800
*
* The RC2800 backend can be used with rotators that support the M2 (M
* Squared) RC2800 protocol.
*/
/**
* \brief A macro that returns the model number of the RC2800_EARLY_AZ
* backend.
*
* \def ROT_MODEL_RC2800_EARLY_AZ
*
* The RC2800_EARLY_AZ backend can be used with rotators that support the M2
* (M Squared) RC2800 early azimuth protocol.
*/
/**
* \brief A macro that returns the model number of the RC2800_EARLY_AZEL
* backend.
*
* \def ROT_MODEL_RC2800_EARLY_AZEL
*
* The RC2800_EARLY_AZEL backend can be used with rotators that support the M2
* (M Squared) RC2800 early azimuth and elevation protocol.
*/
//! @cond Doxygen_Suppress
#define ROT_M2 10
#define ROT_BACKEND_M2 "m2"
//! @endcond
#define ROT_MODEL_RC2800 ROT_MAKE_MODEL(ROT_M2, 1)
#define ROT_MODEL_RC2800_EARLY_AZ ROT_MAKE_MODEL(ROT_M2, 2)
#define ROT_MODEL_RC2800_EARLY_AZEL ROT_MAKE_MODEL(ROT_M2, 3)
/**
* \brief A macro that returns the model number of the RCI_AZEL backend.
*
* \def ROT_MODEL_RCI_AZEL
*
* The RCI_AZEL backend can be used with rotators that support the ARS azimuth
* and elevation protocol.
*/
/**
* \brief A macro that returns the model number of the RCI_AZ backend.
*
* \def ROT_MODEL_RCI_AZ
*
* The RCI_AZ backend can be used with rotators that support the ARS azimuth
* protocol.
*/
//! @cond Doxygen_Suppress
#define ROT_ARS 11
#define ROT_BACKEND_ARS "ars"
//! @endcond
#define ROT_MODEL_RCI_AZEL ROT_MAKE_MODEL(ROT_ARS, 1)
#define ROT_MODEL_RCI_AZ ROT_MAKE_MODEL(ROT_ARS, 2)
/**
* \brief A macro that returns the model number of the IF100 backend.
*
* \def ROT_MODEL_IF100
*
* The IF100 backend can be used with rotators that support the AMSAT IF-100
* interface.
*/
//! @cond Doxygen_Suppress
#define ROT_AMSAT 12
#define ROT_BACKEND_AMSAT "amsat"
//! @endcond
#define ROT_MODEL_IF100 ROT_MAKE_MODEL(ROT_AMSAT, 1)
/**
* \brief A macro that returns the model number of the TS7400 backend.
*
* \def ROT_MODEL_TS7400
*
* The TS7400 backend supports an embedded ARM board using the TS-7400 Linux
* board. More information is at https://www.embeddedarm.com
*/
//! @cond Doxygen_Suppress
#define ROT_TS7400 13
#define ROT_BACKEND_TS7400 "ts7400"
//! @endcond
#define ROT_MODEL_TS7400 ROT_MAKE_MODEL(ROT_TS7400, 1)
/**
* \brief A macro that returns the model number of the NEXSTAR backend.
*
* \def ROT_MODEL_NEXSTAR
*
* The NEXSTAR backend can be used with rotators that support the Celestron
* NexStar protocol and alike.
*/
//! @cond Doxygen_Suppress
#define ROT_CELESTRON 14
#define ROT_BACKEND_CELESTRON "celestron"
//! @endcond
#define ROT_MODEL_NEXSTAR ROT_MAKE_MODEL(ROT_CELESTRON, 1)
/**
* \brief A macro that returns the model number of the ETHER6 backend.
*
* \def ROT_MODEL_ETHER6
*
* The ETHER6 backend can be used with rotators that support the Ether6
* protocol.
*/
//! @cond Doxygen_Suppress
#define ROT_ETHER6 15
#define ROT_BACKEND_ETHER6 "ether6"
//! @endcond
#define ROT_MODEL_ETHER6 ROT_MAKE_MODEL(ROT_ETHER6, 1)
/**
* \brief A macro that returns the model number of the CNCTRK backend.
*
* \def ROT_MODEL_CNCTRK
*
* The CNCTRK backend can be used with rotators that support the LinuxCNC
* running Axis GUI interface.
*/
//! @cond Doxygen_Suppress
#define ROT_CNCTRK 16
#define ROT_BACKEND_CNCTRK "cnctrk"
//! @endcond
#define ROT_MODEL_CNCTRK ROT_MAKE_MODEL(ROT_CNCTRK, 1)
/**
* \brief A macro that returns the model number of the PROSISTEL_D_AZ backend.
*
* \def ROT_MODEL_PROSISTEL_D_AZ
*
* The PROSISTEL_D_AZ backend can be used with rotators that support the Prosistel
* azimuth protocol.
*/
/**
* \brief A macro that returns the model number of the PROSISTEL_D_EL backend.
*
* \def ROT_MODEL_PROSISTEL_D_EL
*
* The PROSISTEL_D_EL backend can be used with rotators that support the Prosistel
* elevation protocol.
*/
/**
* \brief A macro that returns the model number of the
* PROSISTEL_COMBI_TRACK_AZEL backend.
*
* \def ROT_MODEL_PROSISTEL_COMBI_TRACK_AZEL
*
* The PROSISTEL_AZEL_COMBI_TRACK_AZEL backend can be used with rotators that
* support the Prosistel combination azimuth and elevation protocol.
*/
//! @cond Doxygen_Suppress
#define ROT_PROSISTEL 17
#define ROT_BACKEND_PROSISTEL "prosistel"
//! @endcond
#define ROT_MODEL_PROSISTEL_D_AZ ROT_MAKE_MODEL(ROT_PROSISTEL, 1)
#define ROT_MODEL_PROSISTEL_D_EL ROT_MAKE_MODEL(ROT_PROSISTEL, 2)
#define ROT_MODEL_PROSISTEL_COMBI_TRACK_AZEL ROT_MAKE_MODEL(ROT_PROSISTEL, 3)
/**
* \brief A macro that returns the model number of the MEADE backend.
*
* \def ROT_MODEL_MEADE
*
* The MEADE backend can be used with Meade telescope rotators like the
* DS-2000.
*/
//! @cond Doxygen_Suppress
#define ROT_MEADE 18
#define ROT_BACKEND_MEADE "meade"
//! @endcond
#define ROT_MODEL_MEADE ROT_MAKE_MODEL(ROT_MEADE, 1)
/**
* \brief A macro that returns the model number of the IOPTRON backend.
*
* \def ROT_MODEL_IOPTRON
*
* The IOPTRON backend can be used with IOPTRON telescope mounts.
*/
//! @cond Doxygen_Suppress
#define ROT_IOPTRON 19
#define ROT_BACKEND_IOPTRON "ioptron"
//! @endcond
#define ROT_MODEL_IOPTRON ROT_MAKE_MODEL(ROT_IOPTRON, 1)
/**
* \brief A macro that returns the model number of the INDI backend.
*
* \def ROT_MODEL_INDI
*
* The INDI backend can be used with rotators that support the INDI interface.
*/
//! @cond Doxygen_Suppress
#define ROT_INDI 20
#define ROT_BACKEND_INDI "indi"
//! @endcond
#define ROT_MODEL_INDI ROT_MAKE_MODEL(ROT_INDI, 1)
/**
* \brief A macro that returns the model number of the SATEL backend.
*
* \def ROT_MODEL_SATEL
*
* The SATEL backend can be used with rotators that support the VE5FP
* interface.
*/
//! @cond Doxygen_Suppress
#define ROT_SATEL 21
#define ROT_BACKEND_SATEL "satel"
//! @endcond
#define ROT_MODEL_SATEL ROT_MAKE_MODEL(ROT_SATEL, 1)
/**
* \brief A macro that returns the model number of the RADANT backend.
*
* \def ROT_MODEL_RADANT
*
* The RADANT backend can be used with rotators that support the MS232
* interface.
*/
//! @cond Doxygen_Suppress
#define ROT_RADANT 22
#define ROT_BACKEND_RADANT "radant"
//! @endcond
#define ROT_MODEL_RADANT ROT_MAKE_MODEL(ROT_RADANT, 1)
#define ROT_ANDROIDSENSOR 23
#define ROT_BACKEND_ANDROIDSENSOR "androidsensor"
#define ROT_MODEL_ANDROIDSENSOR ROT_MAKE_MODEL(ROT_ANDROIDSENSOR, 1)
/**
* \brief A macro that returns the model number of the GRBLTRK backend.
*
* \def ROT_MODEL_GRBLTRK
*
* The GRBLTRK backend can be used with rotators that support the GRBL
* protocol.
*/
//! @cond Doxygen_Suppress
#define ROT_GRBLTRK 24
#define ROT_BACKEND_GRBLTRK "grbltrk"
//! @endcond
#define ROT_MODEL_GRBLTRK_SER ROT_MAKE_MODEL(ROT_GRBLTRK, 1)
#define ROT_MODEL_GRBLTRK_NET ROT_MAKE_MODEL(ROT_GRBLTRK, 2)
/**
* \brief Convenience type definition for a rotator model.
*
* \typedef typedef int rot_model_t
*/
typedef int rot_model_t;
#endif /* _ROTLIST_H */
/** @} */
================================================
FILE: software/hamlib-w64-4.5~git/lib/msvc/libhamlib-4.def
================================================
EXPORTS
CRC32_function @1
add2debugmsgsave @2
amp_check_backend @3
amp_cleanup @4
amp_close @5
amp_confparam_lookup @6
amp_ext_lookup @7
amp_get_caps @8
amp_get_conf @9
amp_get_ext_level @10
amp_get_freq @11
amp_get_info @12
amp_get_level @13
amp_get_powerstat @14
amp_has_get_level @15
amp_init @16
amp_list_foreach @17
amp_load_all_backends @18
amp_load_backend @19
amp_open @20
amp_parse_level @21
amp_probe_all @22
amp_register @23
amp_reset @24
amp_set_conf @25
amp_set_freq @26
amp_set_powerstat @27
amp_sprintf_level @28
amp_strlevel @29
amp_token_lookup @30
amp_unregister @31
azimuth_long_path @32
cJSON_AddArrayToObject @33
cJSON_AddBoolToObject @34
cJSON_AddFalseToObject @35
cJSON_AddItemReferenceToArray @36
cJSON_AddItemReferenceToObject @37
cJSON_AddItemToArray @38
cJSON_AddItemToObject @39
cJSON_AddItemToObjectCS @40
cJSON_AddNullToObject @41
cJSON_AddNumberToObject @42
cJSON_AddObjectToObject @43
cJSON_AddRawToObject @44
cJSON_AddStringToObject @45
cJSON_AddTrueToObject @46
cJSON_Compare @47
cJSON_CreateArray @48
cJSON_CreateArrayReference @49
cJSON_CreateBool @50
cJSON_CreateDoubleArray @51
cJSON_CreateFalse @52
cJSON_CreateFloatArray @53
cJSON_CreateIntArray @54
cJSON_CreateNull @55
cJSON_CreateNumber @56
cJSON_CreateObject @57
cJSON_CreateObjectReference @58
cJSON_CreateRaw @59
cJSON_CreateString @60
cJSON_CreateStringArray @61
cJSON_CreateStringReference @62
cJSON_CreateTrue @63
cJSON_Delete @64
cJSON_DeleteItemFromArray @65
cJSON_DeleteItemFromObject @66
cJSON_DeleteItemFromObjectCaseSensitive @67
cJSON_DetachItemFromArray @68
cJSON_DetachItemFromObject @69
cJSON_DetachItemFromObjectCaseSensitive @70
cJSON_DetachItemViaPointer @71
cJSON_Duplicate @72
cJSON_GetArrayItem @73
cJSON_GetArraySize @74
cJSON_GetErrorPtr @75
cJSON_GetNumberValue @76
cJSON_GetObjectItem @77
cJSON_GetObjectItemCaseSensitive @78
cJSON_GetStringValue @79
cJSON_HasObjectItem @80
cJSON_InitHooks @81
cJSON_InsertItemInArray @82
cJSON_IsArray @83
cJSON_IsBool @84
cJSON_IsFalse @85
cJSON_IsInvalid @86
cJSON_IsNull @87
cJSON_IsNumber @88
cJSON_IsObject @89
cJSON_IsRaw @90
cJSON_IsString @91
cJSON_IsTrue @92
cJSON_Minify @93
cJSON_Parse @94
cJSON_ParseWithLength @95
cJSON_ParseWithLengthOpts @96
cJSON_ParseWithOpts @97
cJSON_Print @98
cJSON_PrintBuffered @99
cJSON_PrintPreallocated @100
cJSON_PrintUnformatted @101
cJSON_ReplaceItemInArray @102
cJSON_ReplaceItemInObject @103
cJSON_ReplaceItemInObjectCaseSensitive @104
cJSON_ReplaceItemViaPointer @105
cJSON_SetNumberHelper @106
cJSON_SetValuestring @107
cJSON_Version @108
cJSON_free @109
cJSON_malloc @110
cookie_use @111 DATA
date_strget @112
debugmsgsave @113 DATA
debugmsgsave2 @114 DATA
debugmsgsave3 @115 DATA
dec2dmmm @116
dec2dms @117
distance_long_path @118
dmmm2dec @119
dms2dec @120
dot10ths_to_millis @121
dump_hex @122
elapsed_ms @123
flrig_cat_string @124
from_bcd @125
from_bcd_be @126
get_rig_conf_type @127
hamlib_copyright @128 DATA
hamlib_copyright2 @129 DATA
hamlib_version @130 DATA
hamlib_version2 @131 DATA
hl_usleep @132
initamps4_dummy @133
initamps4_kpa1500 @134
initrigs4_adat @135
initrigs4_alinco @136
initrigs4_aor @137
initrigs4_barrett @138
initrigs4_codan @139
initrigs4_dorji @140
initrigs4_drake @141
initrigs4_dummy @142
initrigs4_elad @143
initrigs4_flexradio @144
initrigs4_gomspace @145
initrigs4_icm710 @146
initrigs4_icmarine @147
initrigs4_icom @148
initrigs4_jrc @149
initrigs4_kachina @150
initrigs4_kenwood @151
initrigs4_kit @152
initrigs4_lowe @153
initrigs4_pcr @154
initrigs4_prm80 @155
initrigs4_racal @156
initrigs4_rft @157
initrigs4_rs @158
initrigs4_skanti @159
initrigs4_tapr @160
initrigs4_tentec @161
initrigs4_tuner @162
initrigs4_uniden @163
initrigs4_winradio @164
initrigs4_wj @165
initrigs4_yaesu @166
initrots4_amsat @167
initrots4_ars @168
initrots4_celestron @169
initrots4_cnctrk @170
initrots4_dummy @171
initrots4_easycomm @172
initrots4_ether6 @173
initrots4_fodtrack @174
initrots4_grbltrk @175
initrots4_gs232a @176
initrots4_heathkit @177
initrots4_ioptron @178
initrots4_kit @179
initrots4_m2 @180
initrots4_meade @181
initrots4_prosistel @182
initrots4_radant @183
initrots4_rotorez @184
initrots4_sartek @185
initrots4_satel @186
initrots4_spid @187
initrots4_ts7400 @188
locator2longlat @189
longlat2locator @190
millis_to_dot10ths @191
morse_code_dot_to_millis @192
netrigctl_get_vfo_mode @193
network_multicast_publisher_start @194
network_multicast_publisher_stop @195
par_lock @196
par_read_control @197
par_read_data @198
par_read_status @199
par_unlock @200
par_write_control @201
par_write_data @202
parse_hoststr @203
port_close @204
port_open @205
print_ext_param @206
probeallrigs4_adat @207
probeallrigs4_drake @208
probeallrigs4_elad @209
probeallrigs4_gomspace @210
probeallrigs4_icom @211
probeallrigs4_kenwood @212
probeallrigs4_lowe @213
probeallrigs4_uniden @214
probeallrigs4_yaesu @215
qrb @216
read_block @217
read_block_direct @218
read_string @219
read_string_direct @220
rig_check_backend @221
rig_check_cache_timeout @222
rig_cleanup @223
rig_close @224
rig_confparam_lookup @225
rig_cookie @226
rig_copyright @227
rig_debug @228
rig_ext_func_foreach @229
rig_ext_level_foreach @230
rig_ext_lookup @231
rig_ext_lookup_tok @232
rig_ext_parm_foreach @233
rig_ext_token_lookup @234
rig_flush @235
rig_force_cache_timeout @236
rig_get_ant @237
rig_get_cache @238
rig_get_cache_timeout_ms @239
rig_get_caps @240
rig_get_caps_cptr @241
rig_get_caps_int @242
rig_get_chan_all @243
rig_get_chan_all_cb @244
rig_get_channel @245
rig_get_clock @246
rig_get_conf @247
rig_get_conf2 @248
rig_get_ctcss_sql @249
rig_get_ctcss_tone @250
rig_get_dcd @251
rig_get_dcs_code @252
rig_get_dcs_sql @253
rig_get_ext_func @254
rig_get_ext_level @255
rig_get_ext_parm @256
rig_get_freq @257
rig_get_func @258
rig_get_function_ptr @259
rig_get_info @260
rig_get_level @261
rig_get_mem @262
rig_get_mem_all @263
rig_get_mem_all_cb @264
rig_get_mode @265
rig_get_parm @266
rig_get_powerstat @267
rig_get_ptt @268
rig_get_range @269
rig_get_resolution @270
rig_get_rig_info @271
rig_get_rit @272
rig_get_rptr_offs @273
rig_get_rptr_shift @274
rig_get_split_freq @275
rig_get_split_freq_mode @276
rig_get_split_mode @277
rig_get_split_vfo @278
rig_get_trn @279
rig_get_ts @280
rig_get_twiddle @281
rig_get_vfo @282
rig_get_vfo_info @283
rig_get_vfo_list @284
rig_get_xit @285
rig_has_get_func @286
rig_has_get_level @287
rig_has_get_parm @288
rig_has_scan @289
rig_has_set_func @290
rig_has_set_level @291
rig_has_set_parm @292
rig_has_vfo_op @293
rig_idx2setting @294
rig_init @295
rig_levelagcstr @296
rig_levelagcvalue @297
rig_license @298
rig_list_foreach @299
rig_list_foreach_model @300
rig_load_all_backends @301
rig_load_backend @302
rig_lookup_mem_caps @303
rig_mW2power @304
rig_make_md5 @305
rig_mem_count @306
rig_need_debug @307
rig_no_restore_ai @308
rig_open @309
rig_parse_func @310
rig_parse_level @311
rig_parse_mode @312
rig_parse_mtype @313
rig_parse_parm @314
rig_parse_rptr_shift @315
rig_parse_scan @316
rig_parse_vfo @317
rig_parse_vfo_op @318
rig_passband_narrow @319
rig_passband_normal @320
rig_passband_wide @321
rig_password @322
rig_password_generate_secret @323
rig_power2mW @324
rig_probe @325
rig_probe_all @326
rig_raw2val @327
rig_raw2val_float @328
rig_recv_dtmf @329
rig_register @330
rig_reset @331
rig_scan @332
rig_send_dtmf @333
rig_send_morse @334
rig_send_voice_mem @335
rig_set_ant @336
rig_set_bank @337
rig_set_cache_timeout_ms @338
rig_set_chan_all @339
rig_set_chan_all_cb @340
rig_set_channel @341
rig_set_clock @342
rig_set_conf @343
rig_set_ctcss_sql @344
rig_set_ctcss_tone @345
rig_set_dcd_callback @346
rig_set_dcs_code @347
rig_set_dcs_sql @348
rig_set_debug @349
rig_set_debug_callback @350
rig_set_debug_file @351
rig_set_debug_time_stamp @352
rig_set_ext_func @353
rig_set_ext_level @354
rig_set_ext_parm @355
rig_set_freq @356
rig_set_freq_callback @357
rig_set_func @358
rig_set_level @359
rig_set_mem @360
rig_set_mem_all @361
rig_set_mem_all_cb @362
rig_set_mode @363
rig_set_mode_callback @364
rig_set_parm @365
rig_set_pltune_callback @366
rig_set_powerstat @367
rig_set_ptt @368
rig_set_ptt_callback @369
rig_set_rit @370
rig_set_rptr_offs @371
rig_set_rptr_shift @372
rig_set_spectrum_callback @373
rig_set_split_freq @374
rig_set_split_freq_mode @375
rig_set_split_mode @376
rig_set_split_vfo @377
rig_set_trn @378
rig_set_ts @379
rig_set_twiddle @380
rig_set_uplink @381
rig_set_vfo @382
rig_set_vfo_callback @383
rig_set_vfo_opt @384
rig_set_xit @385
rig_setting2idx @386
rig_settings_load @387
rig_settings_load_all @388
rig_settings_save @389
rig_sprintf_ant @390
rig_sprintf_func @391
rig_sprintf_level @392
rig_sprintf_level_gran @393
rig_sprintf_mode @394
rig_sprintf_parm @395
rig_sprintf_parm_gran @396
rig_sprintf_scan @397
rig_sprintf_spectrum_avg_modes @398
rig_sprintf_spectrum_modes @399
rig_sprintf_spectrum_spans @400
rig_sprintf_vfo @401
rig_sprintf_vfop @402
rig_stop_morse @403
rig_stragclevel @404
rig_strfunc @405
rig_strlevel @406
rig_strmtype @407
rig_strparm @408
rig_strptrshift @409
rig_strrmode @410
rig_strrmodes @411
rig_strscan @412
rig_strspectrummode @413
rig_strstatus @414
rig_strvfo @415
rig_strvfop @416
rig_token_foreach @417
rig_token_lookup @418
rig_unregister @419
rig_valueagclevel @420
rig_version @421
rig_vfo_op @422
rig_wait_morse @423
rigerror @424
rot_check_backend @425
rot_cleanup @426
rot_close @427
rot_confparam_lookup @428
rot_ext_func_foreach @429
rot_ext_level_foreach @430
rot_ext_lookup @431
rot_ext_lookup_tok @432
rot_ext_parm_foreach @433
rot_ext_token_lookup @434
rot_get_caps @435
rot_get_conf @436
rot_get_conf2 @437
rot_get_ext_func @438
rot_get_ext_level @439
rot_get_ext_parm @440
rot_get_func @441
rot_get_info @442
rot_get_level @443
rot_get_parm @444
rot_get_position @445
rot_get_status @446
rot_has_get_func @447
rot_has_get_level @448
rot_has_get_parm @449
rot_has_set_func @450
rot_has_set_level @451
rot_has_set_parm @452
rot_init @453
rot_list_foreach @454
rot_load_all_backends @455
rot_load_backend @456
rot_move @457
rot_open @458
rot_park @459
rot_parse_func @460
rot_parse_level @461
rot_parse_parm @462
rot_probe_all @463
rot_register @464
rot_reset @465
rot_set_conf @466
rot_set_ext_func @467
rot_set_ext_level @468
rot_set_ext_parm @469
rot_set_func @470
rot_set_level @471
rot_set_parm @472
rot_set_position @473
rot_sprintf_func @474
rot_sprintf_level @475
rot_sprintf_level_gran @476
rot_sprintf_parm @477
rot_sprintf_parm_gran @478
rot_sprintf_status @479
rot_stop @480
rot_strfunc @481
rot_strlevel @482
rot_strparm @483
rot_strstatus @484
rot_token_foreach @485
rot_token_lookup @486
rot_unregister @487
ser_get_car @488
ser_get_cts @489
ser_get_dsr @490
ser_get_dtr @491
ser_get_rts @492
ser_set_brk @493
ser_set_dtr @494
ser_set_rts @495
serial_flush @496
serial_open @497
serial_setup @498
spaces @499
sprintf_freq @500
sprintf_level_ext @501
sync_callback @502
to_bcd @503
to_bcd_be @504
to_hex @505
vfo_fixup @506
vfo_fixup2a @507
write_block @508
write_block_sync @509
write_block_sync_error @510