Main Page   Compound List   File List   Compound Members   File Members   Related Pages  

rig.c File Reference

Ham Radio Control Libraries interface. More...

#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <stdio.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <hamlib/rig.h>
#include <serial.h>
#include "event.h"
#include "conf.h"

Compounds

struct  opened_rig_l

Defines

#define HAMLIB_DLL
#define DEFAULT_SERIAL_PORT   "/dev/ttyS0"
#define ERROR_TBL_SZ   (sizeof(rigerror_table)/sizeof(char *))

Functions

const char * rigerror (int errnum)
 get string describing the error code. More...

int foreach_opened_rig (int(*cfunc)(RIG *, rig_ptr_t), rig_ptr_t data)
 execs cfunc() on each opened rig. More...

RIG * rig_init (rig_model_t rig_model)
 allocate a new RIG handle. More...

int rig_open (RIG *rig)
 open the communication to the rig. More...

int rig_close (RIG *rig)
 close the communication to the rig. More...

int rig_cleanup (RIG *rig)
 release a rig handle and free associated memory. More...

int rig_set_freq (RIG *rig, vfo_t vfo, freq_t freq)
 set the frequency of the target VFO. More...

int rig_get_freq (RIG *rig, vfo_t vfo, freq_t *freq)
 get the frequency of the target VFO. More...

int rig_set_mode (RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t width)
 set the mode of the target VFO. More...

int rig_get_mode (RIG *rig, vfo_t vfo, rmode_t *mode, pbwidth_t *width)
 get the mode of the target VFO. More...

pbwidth_t rig_passband_normal (RIG *rig, rmode_t mode)
 get the normal passband of a mode. More...

pbwidth_t rig_passband_narrow (RIG *rig, rmode_t mode)
 get the narrow passband of a mode. More...

pbwidth_t rig_passband_wide (RIG *rig, rmode_t mode)
 get the wide passband of a mode. More...

int rig_set_vfo (RIG *rig, vfo_t vfo)
 set the current VFO. More...

int rig_get_vfo (RIG *rig, vfo_t *vfo)
 get the current VFO. More...

int rig_set_ptt (RIG *rig, vfo_t vfo, ptt_t ptt)
 set PTT on/off. More...

int rig_get_ptt (RIG *rig, vfo_t vfo, ptt_t *ptt)
 get the status of the PTT. More...

int rig_get_dcd (RIG *rig, vfo_t vfo, dcd_t *dcd)
 get the status of the DCD. More...

int rig_set_rptr_shift (RIG *rig, vfo_t vfo, rptr_shift_t rptr_shift)
 set the repeater shift. More...

int rig_get_rptr_shift (RIG *rig, vfo_t vfo, rptr_shift_t *rptr_shift)
 get the current repeater shift. More...

int rig_set_rptr_offs (RIG *rig, vfo_t vfo, shortfreq_t rptr_offs)
 set the repeater offset. More...

int rig_get_rptr_offs (RIG *rig, vfo_t vfo, shortfreq_t *rptr_offs)
 get the current repeater offset. More...

int rig_set_split_freq (RIG *rig, vfo_t vfo, freq_t tx_freq)
 set the split frequencies. More...

int rig_get_split_freq (RIG *rig, vfo_t vfo, freq_t *tx_freq)
 get the current split frequencies. More...

int rig_set_split_mode (RIG *rig, vfo_t vfo, rmode_t tx_mode, pbwidth_t tx_width)
 set the split modes. More...

int rig_get_split_mode (RIG *rig, vfo_t vfo, rmode_t *tx_mode, pbwidth_t *tx_width)
 get the current split modes. More...

int rig_set_split (RIG *rig, vfo_t vfo, split_t split)
 set the split mode. More...

int rig_get_split (RIG *rig, vfo_t vfo, split_t *split)
 get the current split mode. More...

int rig_set_rit (RIG *rig, vfo_t vfo, shortfreq_t rit)
 set the RIT. More...

int rig_get_rit (RIG *rig, vfo_t vfo, shortfreq_t *rit)
 get the current RIT offset. More...

int rig_set_xit (RIG *rig, vfo_t vfo, shortfreq_t xit)
 set the XIT. More...

int rig_get_xit (RIG *rig, vfo_t vfo, shortfreq_t *xit)
 get the current XIT offset. More...

int rig_set_ts (RIG *rig, vfo_t vfo, shortfreq_t ts)
 set the Tuning Step. More...

int rig_get_ts (RIG *rig, vfo_t vfo, shortfreq_t *ts)
 get the current Tuning Step. More...

int rig_set_ant (RIG *rig, vfo_t vfo, ant_t ant)
 set the antenna. More...

int rig_get_ant (RIG *rig, vfo_t vfo, ant_t *ant)
 get the current antenna. More...

int rig_power2mW (RIG *rig, unsigned int *mwpower, float power, freq_t freq, rmode_t mode)
 conversion utility from relative range to absolute in mW. More...

int rig_mW2power (RIG *rig, float *power, unsigned int mwpower, freq_t freq, rmode_t mode)
 conversion utility from absolute in mW to relative range. More...

shortfreq_t rig_get_resolution (RIG *rig, rmode_t mode)
 get the best frequency resolution of the rig. More...

int rig_set_ctcss_tone (RIG *rig, vfo_t vfo, tone_t tone)
 set CTCSS sub-tone frequency. More...

int rig_get_ctcss_tone (RIG *rig, vfo_t vfo, tone_t *tone)
 get the current CTCSS sub-tone frequency. More...

int rig_set_dcs_code (RIG *rig, vfo_t vfo, tone_t code)
 set the current encoding DCS code. More...

int rig_get_dcs_code (RIG *rig, vfo_t vfo, tone_t *code)
 get the current encoding DCS code. More...

int rig_set_ctcss_sql (RIG *rig, vfo_t vfo, tone_t tone)
 set CTCSS squelch. More...

int rig_get_ctcss_sql (RIG *rig, vfo_t vfo, tone_t *tone)
 get the current CTCSS squelch. More...

int rig_set_dcs_sql (RIG *rig, vfo_t vfo, tone_t code)
 set the current DCS code. More...

int rig_get_dcs_sql (RIG *rig, vfo_t vfo, tone_t *code)
 get the current DCS code. More...

int rig_set_powerstat (RIG *rig, powerstat_t status)
 turn on/off the radio. More...

int rig_get_powerstat (RIG *rig, powerstat_t *status)
 get the on/off status of the radio. More...

int rig_reset (RIG *rig, reset_t reset)
 reset the radio. More...

rig_model_t rig_probe (port_t *port)
 try to guess a rig. More...

int rig_set_level (RIG *rig, vfo_t vfo, setting_t level, value_t val)
 set a radio level setting. More...

int rig_get_level (RIG *rig, vfo_t vfo, setting_t level, value_t *val)
 get the value of a level. More...

int rig_set_parm (RIG *rig, setting_t parm, value_t val)
 set a radio parameter. More...

int rig_get_parm (RIG *rig, setting_t parm, value_t *val)
 get the value of a parameter. More...

setting_t rig_has_get_level (RIG *rig, setting_t level)
 check retrieval ability of level settings. More...

setting_t rig_has_set_level (RIG *rig, setting_t level)
 check settable ability of level settings. More...

setting_t rig_has_get_parm (RIG *rig, setting_t parm)
 check retrieval ability of parameter settings. More...

setting_t rig_has_set_parm (RIG *rig, setting_t parm)
 check settable ability of parameter settings. More...

setting_t rig_has_get_func (RIG *rig, setting_t func)
 check ability of radio functions. More...

setting_t rig_has_set_func (RIG *rig, setting_t func)
 check ability of radio functions. More...

int rig_set_func (RIG *rig, vfo_t vfo, setting_t func, int status)
 activate/desactivate functions of radio. More...

int rig_get_func (RIG *rig, vfo_t vfo, setting_t func, int *status)
 get the status of functions of the radio. More...

int rig_set_conf (RIG *rig, token_t token, const char *val)
 set a radio configuration parameter. More...

int rig_get_conf (RIG *rig, token_t token, char *val)
 get the value of a configuration parameter. More...

int rig_set_mem (RIG *rig, vfo_t vfo, int ch)
 set the current memory channel number. More...

int rig_get_mem (RIG *rig, vfo_t vfo, int *ch)
 get the current memory channel number. More...

vfo_op_t rig_has_vfo_op (RIG *rig, vfo_op_t op)
 check retrieval ability of VFO operations. More...

int rig_vfo_op (RIG *rig, vfo_t vfo, vfo_op_t op)
 perform Memory/VFO operations. More...

scan_t rig_has_scan (RIG *rig, scan_t scan)
 check availability of scaning functions. More...

int rig_scan (RIG *rig, vfo_t vfo, scan_t scan, int ch)
 perform Memory/VFO operations. More...

int rig_send_dtmf (RIG *rig, vfo_t vfo, const char *digits)
 send DTMF digits. More...

int rig_recv_dtmf (RIG *rig, vfo_t vfo, char *digits, int *length)
 receive DTMF digits. More...

int rig_send_morse (RIG *rig, vfo_t vfo, const char *msg)
 send morse code. More...

int rig_set_bank (RIG *rig, vfo_t vfo, int bank)
 set the current memory bank. More...

int rig_save_channel (RIG *rig, channel_t *chan)
 save all the data associated with current VFO. More...

int rig_restore_channel (RIG *rig, const channel_t *chan)
 restore all the data associated with current VFO. More...

int rig_set_channel (RIG *rig, const channel_t *chan)
 set channel data. More...

int rig_get_channel (RIG *rig, channel_t *chan)
 get channel data. More...

const freq_range_t * rig_get_range (const freq_range_t range_list[], freq_t freq, rmode_t mode)
 find the freq_range of freq/mode. More...

int rig_set_trn (RIG *rig, vfo_t vfo, int trn)
 control the transceive mode. More...

int rig_get_trn (RIG *rig, vfo_t vfo, int *trn)
 get the current transceive mode. More...

const char * rig_get_info (RIG *rig)
 get general information from the radio. More...

int rig_setting2idx (setting_t s)
 basically convert setting_t expressed 2^n to n. More...


Variables

const char hamlib_version [] = "Hamlib version " VERSION
 Hamlib release number. More...

const char hamlib_copyright []
 Hamlib copyright notice. More...

const tone_t full_ctcss_list []
const tone_t common_ctcss_list []
const tone_t full_dcs_list []


Detailed Description

Ham Radio Control Libraries interface.

Author:
Stephane Fillod , Frank Singleton
Date:
2000-2001
Hamlib interface is a frontend implementing wrapper functions.


Define Documentation

#define DEFAULT_SERIAL_PORT   "/dev/ttyS0"
 

#define ERROR_TBL_SZ   (sizeof(rigerror_table)/sizeof(char *))
 

For internal use only.

#define HAMLIB_DLL
 


Function Documentation

int foreach_opened_rig int(*    cfunc)(RIG *, rig_ptr_t),
rig_ptr_t    data
 

execs cfunc() on each opened rig.

Parameters:
cfunc  The function to be executed on each rig
data  Data pointer to be passed to cfunc()
Calls cfunc() function for each opened rig. The contents of the opened rig table is processed in random order according to a function pointed to by cfunc, whic is called with two arguments, the first pointing to the RIG handle, the second to a data pointer data. If data is not needed, then it can be set to NULL. The processing of the opened rig table is stopped when cfunc() returns 0.

For internal use only.

int rig_cleanup RIG *    rig
 

release a rig handle and free associated memory.

Parameters:
rig  The RIG handle of the radio to be closed
Releases a rig struct which port has eventualy been closed already with rig_close().

Returns:
RIG_OK if the operation has been sucessful, otherwise a negative value if an error occured (in which case, cause is set appropriately).
See also:
rig_init(), rig_close()

int rig_close RIG *    rig
 

close the communication to the rig.

Parameters:
rig  The RIG handle of the radio to be closed
Closes communication to a radio which RIG handle has been passed by argument that was previously open with rig_open().

Returns:
RIG_OK if the operation has been sucessful, otherwise a negative value if an error occured (in which case, cause is set appropriately).
See also:
rig_cleanup(), rig_open()

int rig_get_ant RIG *    rig,
vfo_t    vfo,
ant_t *    ant
 

get the current antenna.

Parameters:
rig  The rig handle
vfo  The target VFO
ant  The location where to store the current antenna
Retrieves the current antenna.

Returns:
RIG_OK if the operation has been sucessful, otherwise a negative value if an error occured (in which case, cause is set appropriately).
See also:
rig_set_ant()

int rig_get_channel RIG *    rig,
channel_t *    chan
 

get channel data.

Parameters:
rig  The rig handle
chan  The location where to store the channel data
Retrieves the data associated with the channel chan->channel_num. See channel_t for more information.

Returns:
RIG_OK if the operation has been sucessful, otherwise a negative value if an error occured (in which case, cause is set appropriately).
See also:
rig_set_channel()

int rig_get_conf RIG *    rig,
token_t    token,
char *    val
 

get the value of a configuration parameter.

Parameters:
rig  The rig handle
token  The parameter
val  The location where to store the value of config token
Retrieves the value of a configuration paramter associated with token.

Returns:
RIG_OK if the operation has been sucessful, otherwise a negative value if an error occured (in which case, cause is set appropriately).
See also:
rig_set_conf()

int rig_get_ctcss_sql RIG *    rig,
vfo_t    vfo,
tone_t *    tone
 

get the current CTCSS squelch.

Parameters:
rig  The rig handle
vfo  The target VFO
tone  The location where to store the current tone
Retrieves the current Continuous Tone Controlled Squelch System (CTCSS) sub-audible *squelch* tone.
Note:
*tone is NOT in Hz, but in tenth of Hz! This way, if the function rig_get_ctcss_sql() returns a subaudible tone of 885 for example, then the real tone is 88.5 Hz. Also, a value of 0 for tone means the Tone squelch is disabled.
Returns:
RIG_OK if the operation has been sucessful, otherwise a negative value if an error occured (in which case, cause is set appropriately).
See also:
rig_set_ctcss_sql(), rig_get_ctcss_tone()

int rig_get_ctcss_tone RIG *    rig,
vfo_t    vfo,
tone_t *    tone
 

get the current CTCSS sub-tone frequency.

Parameters:
rig  The rig handle
vfo  The target VFO
tone  The location where to store the current tone
Retrieves the current Continuous Tone Controlled Squelch System (CTCSS) sub-audible tone frequency.
Note:
the *tone integer is NOT in Hz, but in tenth of Hz! This way, if the function rig_get_ctcss_tone() returns a subaudible tone of 885 for example, then the real tone is 88.5 Hz. Also, a value of 0 for *tone means the Tone encoding is disabled.
Returns:
RIG_OK if the operation has been sucessful, otherwise a negative value if an error occured (in which case, cause is set appropriately).
See also:
rig_set_ctcss_tone(), rig_get_ctcss_sql()

int rig_get_dcd RIG *    rig,
vfo_t    vfo,
dcd_t *    dcd
 

get the status of the DCD.

Parameters:
rig  The rig handle
vfo  The target VFO
dcd  The location where to store the status of the DCD
Retrieves the status of DCD (is squelch open?).

Returns:
RIG_OK if the operation has been sucessful, otherwise a negative value if an error occured (in which case, cause is set appropriately).

int rig_get_dcs_code RIG *    rig,
vfo_t    vfo,
tone_t *    code
 

get the current encoding DCS code.

Parameters:
rig  The rig handle
vfo  The target VFO
code  The location where to store the current tone
Retrieves the current encoding Digitally-Coded Squelch code.

Returns:
RIG_OK if the operation has been sucessful, otherwise a negative value if an error occured (in which case, cause is set appropriately).
See also:
rig_set_dcs_code(), rig_get_dcs_sql()

int rig_get_dcs_sql RIG *    rig,
vfo_t    vfo,
tone_t *    code
 

get the current DCS code.

Parameters:
rig  The rig handle
vfo  The target VFO
code  The location where to store the current tone
Retrieves the current Digitally-Coded *Squelch* code.

Returns:
RIG_OK if the operation has been sucessful, ortherwise a negative value if an error occured (in which case, cause is set appropriately).
See also:
rig_set_dcs_sql(), rig_get_dcs_code()

int rig_get_freq RIG *    rig,
vfo_t    vfo,
freq_t *    freq
 

get the frequency of the target VFO.

Parameters:
rig  The rig handle
vfo  The target VFO
freq  The location where to store the current frequency
Retrieves the frequency of the target VFO. The value stored at freq location equals RIG_FREQ_NONE when the current frequency of the VFO is not defined (e.g. blank memory).

Returns:
RIG_OK if the operation has been sucessful, otherwise a negative value if an error occured (in which case, cause is set appropriately).
See also:
rig_set_freq()

int rig_get_func RIG *    rig,
vfo_t    vfo,
setting_t    func,
int *    status
 

get the status of functions of the radio.

Parameters:
rig  The rig handle
vfo  The target VFO
func  The functions to get the status
status  The location where to store the function status
Retrieves the status of functions of the radio. Only the function bits set to 1 will be queried. On return, func will hold the status of functions (bit set to 1 = activated, bit set to 0 = desactivated).

Returns:
RIG_OK if the operation has been sucessful, otherwise a negative value if an error occured (in which case, cause is set appropriately).
See also:
rig_set_func()

const char* rig_get_info RIG *    rig
 

get general information from the radio.

Parameters:
rig  The rig handle
Retrieves some general information from the radio. This can include firmware revision, exact model name, or just nothing.

Returns:
a pointer to freshly allocated memory containing the ASCIIZ string if the operation has been sucessful, otherwise NULL if an error occured or get_info not part of capabilities.

int rig_get_level RIG *    rig,
vfo_t    vfo,
setting_t    level,
value_t *    val
 

get the value of a level.

Parameters:
rig  The rig handle
vfo  The target VFO
level  The level setting
val  The location where to store the value of level
Retrieves the value of a level. The level value val can be a float or an integer. See value_t for more information.

RIG_LEVEL_STRENGTH: val is an integer, representing the S Meter level in dB, according to the ideal S Meter scale. The ideal S Meter scale is as follow: S0=-54, S1=-48, S2=-42, S3=-36, S4=-30, S5=-24, S6=-18, S7=-12, S8=-6, S9=0, +10=10, +20=20, +30=30, +40=40, +50=50 and +60=60. This is the responsability of the backend to return values calibrated for this scale.

Returns:
RIG_OK if the operation has been sucessful, otherwise a negative value if an error occured (in which case, cause is set appropriately).
See also:
rig_has_get_level(), rig_set_level()

int rig_get_mem RIG *    rig,
vfo_t    vfo,
int *    ch
 

get the current memory channel number.

Parameters:
rig  The rig handle
vfo  The target VFO
ch  The location where to store the current memory channel number
Retrieves the current memory channel number. It is not mandatory for the radio to be in memory mode. Actually it depends on rigs. YMMV.

Returns:
RIG_OK if the operation has been sucessful, otherwise a negative value if an error occured (in which case, cause is set appropriately).
See also:
rig_set_mem()

int rig_get_mode RIG *    rig,
vfo_t    vfo,
rmode_t *    mode,
pbwidth_t *    width
 

get the mode of the target VFO.

Parameters:
rig  The rig handle
vfo  The target VFO
mode  The location where to store the current mode
width  The location where to store the current passband width
Retrieves the mode and passband of the target VFO. If the backend is unable to determine the width, the width will be set to RIG_PASSBAND_NORMAL as a default. The value stored at mode location equals RIG_MODE_NONE when the current mode of the VFO is not defined (e.g. blank memory).

Returns:
RIG_OK if the operation has been sucessful, otherwise a negative value if an error occured (in which case, cause is set appropriately).
See also:
rig_set_mode()

int rig_get_parm RIG *    rig,
setting_t    parm,
value_t *    val
 

get the value of a parameter.

Parameters:
rig  The rig handle
parm  The parameter
val  The location where to store the value of parm
Retrieves the value of a parm. The parameter value val can be a float or an integer. See value_t for more information.

Returns:
RIG_OK if the operation has been sucessful, otherwise a negative value if an error occured (in which case, cause is set appropriately).
See also:
rig_has_get_parm(), rig_set_parm()

int rig_get_powerstat RIG *    rig,
powerstat_t *    status
 

get the on/off status of the radio.

Parameters:
rig  The rig handle
status  The locatation where to store the current status
Retrieve the status of the radio. See RIG_POWER_ON, RIG_POWER_OFF and RIG_POWER_STANDBY defines for the status.

Returns:
RIG_OK if the operation has been sucessful, otherwise a negative value if an error occured (in which case, cause is set appropriately).
See also:
rig_set_powerstat()

int rig_get_ptt RIG *    rig,
vfo_t    vfo,
ptt_t *    ptt
 

get the status of the PTT.

Parameters:
rig  The rig handle
vfo  The target VFO
ptt  The location where to store the status of the PTT
Retrieves the status of PTT (are we on the air?).

Returns:
RIG_OK if the operation has been sucessful, otherwise a negative value if an error occured (in which case, cause is set appropriately).
See also:
rig_set_ptt()

const freq_range_t* rig_get_range const freq_range_t    range_list[],
freq_t    freq,
rmode_t    mode
 

find the freq_range of freq/mode.

Parameters:
range_list  The range list to search from
freq  The frequency that will be part of this range
mode  The mode that will be part of this range
Returns a pointer to the freq_range_t including freq and mode. Works for rx and tx range list as well.

Returns:
the location of the freq_range_t if found, otherwise NULL if not found or if range_list is invalid.

shortfreq_t rig_get_resolution RIG *    rig,
rmode_t    mode
 

get the best frequency resolution of the rig.

Parameters:
rig  The rig handle
mode  The mode where the conversion should take place
Returns the best frequency resolution of the rig, for a given mode.

Returns:
the frequency resolution in Hertz if the operation h has been sucessful, otherwise a negative value if an error occured.

int rig_get_rit RIG *    rig,
vfo_t    vfo,
shortfreq_t *    rit
 

get the current RIT offset.

Parameters:
rig  The rig handle
vfo  The target VFO
rit  The location where to store the current RIT offset
Retrieves the current RIT offset.

Returns:
RIG_OK if the operation has been sucessful, otherwise a negative value if an error occured (in which case, cause is set appropriately).
See also:
rig_set_rit()

int rig_get_rptr_offs RIG *    rig,
vfo_t    vfo,
shortfreq_t *    rptr_offs
 

get the current repeater offset.

Parameters:
rig  The rig handle
vfo  The target VFO
rptr_offs  The location where to store the current repeater offset
Retrieves the current repeater offset.

Returns:
RIG_OK if the operation has been sucessful, otherwise a negative value if an error occured (in which case, cause is set appropriately).
See also:
rig_set_rptr_offs()

int rig_get_rptr_shift RIG *    rig,
vfo_t    vfo,
rptr_shift_t *    rptr_shift
 

get the current repeater shift.

Parameters:
rig  The rig handle
vfo  The target VFO
rptr_shift  The location where to store the current repeater shift
Retrieves the current repeater shift.

Returns:
RIG_OK if the operation has been sucessful, otherwise a negative value if an error occured (in which case, cause is set appropriately).
See also:
rig_set_rptr_shift()

int rig_get_split RIG *    rig,
vfo_t    vfo,
split_t *    split
 

get the current split mode.

Parameters:
rig  The rig handle
vfo  The target VFO
split  The location where to store the current split mode
Retrieves the current split mode.

Returns:
RIG_OK if the operation has been sucessful, otherwise a negative value if an error occured (in which case, cause is set appropriately).
See also:
rig_set_split()

int rig_get_split_freq RIG *    rig,
vfo_t    vfo,
freq_t *    tx_freq
 

get the current split frequencies.

Parameters:
rig  The rig handle
vfo  The target VFO
tx_freq  The location where to store the current transmit split frequency
Retrieves the current split frequencies.

Returns:
RIG_OK if the operation has been sucessful, otherwise a negative value if an error occured (in which case, cause is set appropriately).
See also:
rig_set_split_freq()

int rig_get_split_mode RIG *    rig,
vfo_t    vfo,
rmode_t *    tx_mode,
pbwidth_t *    tx_width
 

get the current split modes.

Parameters:
rig  The rig handle
vfo  The target VFO
tx_mode  The location where to store the current transmit split mode
tx_width  The location where to store the current transmit split width
Retrieves the current split mode.

Returns:
RIG_OK if the operation has been sucessful, otherwise a negative value if an error occured (in which case, cause is set appropriately).
See also:
rig_set_split_mode()

int rig_get_trn RIG *    rig,
vfo_t    vfo,
int *    trn
 

get the current transceive mode.

Parameters:
rig  The rig handle
vfo  The target VFO
trn  The location where to store the current transceive mode
Retrieves the current status of the transceive mode, i.e. if radio sends new status automatically when some changes happened on the radio.

Returns:
RIG_OK if the operation has been sucessful, otherwise a negative value if an error occured (in which case, cause is set appropriately).
See also:
rig_set_trn()

int rig_get_ts RIG *    rig,
vfo_t    vfo,
shortfreq_t *    ts
 

get the current Tuning Step.

Parameters:
rig  The rig handle
vfo  The target VFO
ts  The location where to store the current tuning step
Retrieves the current tuning step.

Returns:
RIG_OK if the operation has been sucessful, otherwise a negative value if an error occured (in which case, cause is set appropriately).
See also:
rig_set_ts()

int rig_get_vfo RIG *    rig,
vfo_t *    vfo
 

get the current VFO.

Parameters:
rig  The rig handle
vfo  The location where to store the current VFO
Retrieves the current VFO. The VFO can be RIG_VFO_A, RIG_VFO_B, RIG_VFO_C for VFOA, VFOB, VFOC respectively or RIG_VFO_MEM for Memory mode. Supported VFOs depends on rig capabilities.

Returns:
RIG_OK if the operation has been sucessful, otherwise a negative value if an error occured (in which case, cause is set appropriately).
See also:
rig_set_vfo()

int rig_get_xit RIG *    rig,
vfo_t    vfo,
shortfreq_t *    xit
 

get the current XIT offset.

Parameters:
rig  The rig handle
vfo  The target VFO
xit  The location where to store the current XIT offset
Retrieves the current XIT offset.

Returns:
RIG_OK if the operation has been sucessful, otherwise a negative value if an error occured (in which case, cause is set appropriately).
See also:
rig_set_xit()

setting_t rig_has_get_func RIG *    rig,
setting_t    func
 

check ability of radio functions.

Parameters:
rig  The rig handle
func  The functions
Checks if a rig supports a set of functions. Since the func is an OR'ed bitwise argument, more than one function can be checked at the same time.

EXAMPLE: if (rig_has_get_func(my_rig,RIG_FUNC_FAGC)) disp_fagc_button();

Returns:
a bit map of supported functions, otherwise 0 if none supported.
See also:
rig_has_set_func(), rig_get_func()

setting_t rig_has_get_level RIG *    rig,
setting_t    level
 

check retrieval ability of level settings.

Parameters:
rig  The rig handle
level  The level settings
Checks if a rig is capable of *getting* a level setting. Since the level is an OR'ed bitwise argument, more than one level can be checked at the same time.

EXAMPLE: if (rig_has_get_level(my_rig, RIG_LVL_STRENGTH)) disp_Smeter();

Returns:
a bit map of supported level settings that can be retrieved, otherwise 0 if none supported.
See also:
rig_has_set_level(), rig_get_level()

setting_t rig_has_get_parm RIG *    rig,
setting_t    parm
 

check retrieval ability of parameter settings.

Parameters:
rig  The rig handle
parm  The parameter settings
Checks if a rig is capable of *getting* a parm setting. Since the parm is an OR'ed bitwise argument, more than one parameter can be checked at the same time.

EXAMPLE: if (rig_has_get_parm(my_rig, RIG_PARM_ANN)) good4you();

Returns:
a bit map of supported parameter settings that can be retrieved, otherwise 0 if none supported.
See also:
rig_has_set_parm(), rig_get_parm()

scan_t rig_has_scan RIG *    rig,
scan_t    scan
 

check availability of scaning functions.

Parameters:
rig  The rig handle
scan  The scan op
Checks if a rig is capable of performing a scan operation. Since the scan parameter is an OR'ed bitmap argument, more than one op can be checked at the same time.

EXAMPLE: if (rig_has_scan(my_rig, RIG_SCAN_PRIO)) disp_SCANprio_btn();

Returns:
a bit map of supported scan settings that can be retrieved, otherwise 0 if none supported.
See also:
rig_scan()

setting_t rig_has_set_func RIG *    rig,
setting_t    func
 

check ability of radio functions.

Parameters:
rig  The rig handle
func  The functions
Checks if a rig supports a set of functions. Since the func is an OR'ed bitwise argument, more than one function can be checked at the same time.

EXAMPLE: if (rig_has_set_func(my_rig,RIG_FUNC_FAGC)) disp_fagc_button();

Returns:
a bit map of supported functions, otherwise 0 if none supported.
See also:
rig_set_func(), rig_has_get_func()

setting_t rig_has_set_level RIG *    rig,
setting_t    level
 

check settable ability of level settings.

Parameters:
rig  The rig handle
level  The level settings
Checks if a rig can *set* a level setting. Since the level is an OR'ed bitwise argument, more than one level can be check at the same time.

EXAMPLE: if (rig_has_set_level(my_rig, RIG_LVL_RFPOWER)) crank_tx();

Returns:
a bit map of supported level settings that can be set, otherwise 0 if none supported.
See also:
rig_has_get_level(), rig_set_level()

setting_t rig_has_set_parm RIG *    rig,
setting_t    parm
 

check settable ability of parameter settings.

Parameters:
rig  The rig handle
parm  The parameter settings
Checks if a rig can *set* a parameter setting. Since the parm is an OR'ed bitwise argument, more than one parameter can be check at the same time.

EXAMPLE: if (rig_has_set_parm(my_rig, RIG_PARM_ANN)) announce_all();

Returns:
a bit map of supported parameter settings that can be set, otherwise 0 if none supported.
See also:
rig_has_get_parm(), rig_set_parm()

vfo_op_t rig_has_vfo_op RIG *    rig,
vfo_op_t    op
 

check retrieval ability of VFO operations.

Parameters:
rig  The rig handle
op  The VFO op
Checks if a rig is capable of executing a VFO operation. Since the op is an OR'ed bitmap argument, more than one op can be checked at the same time.

EXAMPLE: if (rig_has_vfo_op(my_rig, RIG_OP_CPY)) disp_VFOcpy_btn();

Returns:
a bit map mask of supported op settings that can be retrieved, otherwise 0 if none supported.
See also:
rig_vfo_op()

RIG* rig_init rig_model_t    rig_model
 

allocate a new RIG handle.

Parameters:
rig_model  The rig model for this new handle
Allocates a new RIG handle and initializes the associated data for rig_model.

Returns:
a pointer to the RIG handle otherwise NULL if memory allocation failed or rig_model is unknown (e.g. backend autoload failed).
See also:
rig_cleanup(), rig_open()

int rig_mW2power RIG *    rig,
float *    power,
unsigned int    mwpower,
freq_t    freq,
rmode_t    mode
 

conversion utility from absolute in mW to relative range.

Parameters:
rig  The rig handle
power  The location where to store the converted relative power
mwpower  The power in mW
freq  The frequency where the conversion should take place
mode  The mode where the conversion should take place
Converts a power value expressed in the real transmit power in milli Watts the radio would emit to a range on a [0.0 .. 1.0] relative scale. The freq and mode where the conversion should take place must be also provided since the relative power is peculiar to a specific freq and mode range of the radio.

Returns:
RIG_OK if the operation has been sucessful, otherwise a negative value if an error occured (in which case, cause is set appropriately).
See also:
rig_power2mW()

int rig_open RIG *    rig
 

open the communication to the rig.

Parameters:
rig  The RIG handle of the radio to be opened
Opens communication to a radio which RIG handle has been passed by argument.

Returns:
RIG_OK if the operation has been sucessful, otherwise a negative value if an error occured (in which case, cause is set appropriately).
Return values:
RIG_EINVAL  rig is NULL or unconsistent.
RIG_ENIMPL  port type communication is not implemented yet.
See also:
rig_init(), rig_close()

pbwidth_t rig_passband_narrow RIG *    rig,
rmode_t    mode
 

get the narrow passband of a mode.

Parameters:
rig  The rig handle
mode  The mode to get the passband
Returns the narrow (closest) passband for the given mode. EXAMPLE: rig_set_mode(my_rig, RIG_MODE_LSB, rig_passband_narrow(my_rig, RIG_MODE_LSB) );

Returns:
the passband in Hz if the operation has been sucessful, or a 0 if an error occured (passband not found, whatever).
See also:
rig_passband_normal(), rig_passband_wide()

pbwidth_t rig_passband_normal RIG *    rig,
rmode_t    mode
 

get the normal passband of a mode.

Parameters:
rig  The rig handle
mode  The mode to get the passband
Returns the normal (default) passband for the given mode.

Returns:
the passband in Hz if the operation has been sucessful, or a 0 if an error occured (passband not found, whatever).
See also:
rig_passband_narrow(), rig_passband_wide()

pbwidth_t rig_passband_wide RIG *    rig,
rmode_t    mode
 

get the wide passband of a mode.

Parameters:
rig  The rig handle
mode  The mode to get the passband
Returns the wide (default) passband for the given mode. EXAMPLE: rig_set_mode(my_rig, RIG_MODE_AM, rig_passband_wide(my_rig, RIG_MODE_AM) );

Returns:
the passband in Hz if the operation has been sucessful, or a 0 if an error occured (passband not found, whatever).
See also:
rig_passband_narrow(), rig_passband_normal()

int rig_power2mW RIG *    rig,
unsigned int *    mwpower,
float    power,
freq_t    freq,
rmode_t    mode
 

conversion utility from relative range to absolute in mW.

Parameters:
rig  The rig handle
mwpower  The location where to store the converted power in mW
power  The relative power
freq  The frequency where the conversion should take place
mode  The mode where the conversion should take place
Converts a power value expressed in a range on a [0.0 .. 1.0] relative scale to the real transmit power in milli Watts the radio would emit. The freq and mode where the conversion should take place must be also provided since the relative power is peculiar to a specific freq and mode range of the radio.

Returns:
RIG_OK if the operation has been sucessful, otherwise a negative value if an error occured (in which case, cause is set appropriately).
See also:
rig_mW2power()

rig_model_t rig_probe port_t *    port
 

try to guess a rig.

Parameters:
port  A pointer describing a port linking the host to the rig
Try to guess what is the model of rig pointed to by port. It can be very buggy, and mess up the radio at the other end. (but fun if it works!)

Warning:
this is really Experimental, It has been tested only with IC-706MkIIG. any feedback welcome! --SF
Returns:
the rig model id according to the rig_model_t type if found, otherwise RIG_MODEL_NONE if unable to determine rig model.

int rig_recv_dtmf RIG *    rig,
vfo_t    vfo,
char *    digits,
int *    length
 

receive DTMF digits.

Parameters:
rig  The rig handle
vfo  The target VFO
digits  Location where the digits are to be stored
length  in: max length of buffer, out: number really read.
Receives DTMF digits (not blocking). See DTMF change speed, etc. (TODO).

Returns:
RIG_OK if the operation has been sucessful, otherwise a negative value if an error occured (in which case, cause is set appropriately).

int rig_reset RIG *    rig,
reset_t    reset
 

reset the radio.

Parameters:
rig  The rig handle
reset  The reset operation to perform
Resets the radio. See RIG_RESET_NONE, RIG_RESET_SOFT and RIG_RESET_MCALL defines for the reset.

Returns:
RIG_OK if the operation has been sucessful, otherwise a negative value if an error occured (in which case, cause is set appropriately).

int rig_restore_channel RIG *    rig,
const channel_t *    chan
 

restore all the data associated with current VFO.

Parameters:
rig  The rig handle
chan  The location where to store the channel data
Sets all the data associated with current VFO. See channel_t for more information.

Returns:
RIG_OK if the operation has been sucessful, otherwise a negative value if an error occured (in which case, cause is set appropriately).
Todo:
return code checking
See also:
rig_get_channel()

int rig_save_channel RIG *    rig,
channel_t *    chan
 

save all the data associated with current VFO.

Parameters:
rig  The rig handle
chan  The location where to store the channel data
Gets all the data associated with current VFO. See channel_t for more information.

Returns:
RIG_OK if the operation has been sucessful, otherwise a negative value if an error occured (in which case, cause is set appropriately).
Todo:
return code checking
See also:
rig_get_channel()

int rig_scan RIG *    rig,
vfo_t    vfo,
scan_t    scan,
int    ch
 

perform Memory/VFO operations.

Parameters:
rig  The rig handle
vfo  The target VFO
scan  The scanning operation to perform
ch  Optional channel argument used for the scan.
Performs scanning operation. See scan_t for more information.

Returns:
RIG_OK if the operation has been sucessful, otherwise a negative value if an error occured (in which case, cause is set appropriately).
See also:
rig_has_scan()

int rig_send_dtmf RIG *    rig,
vfo_t    vfo,
const char *    digits
 

send DTMF digits.

Parameters:
rig  The rig handle
vfo  The target VFO
digits  Digits to be send
Sends DTMF digits. See DTMF change speed, etc. (TODO).

Returns:
RIG_OK if the operation has been sucessful, otherwise a negative value if an error occured (in which case, cause is set appropriately).

int rig_send_morse RIG *    rig,
vfo_t    vfo,
const char *    msg
 

send morse code.

Parameters:
rig  The rig handle
vfo  The target VFO
msg  Message to be sent
Sends morse message. See keyer change speed, etc. (TODO).

Returns:
RIG_OK if the operation has been sucessful, otherwise a negative value if an error occured (in which case, cause is set appropriately).

int rig_set_ant RIG *    rig,
vfo_t    vfo,
ant_t    ant
 

set the antenna.

Parameters:
rig  The rig handle
vfo  The target VFO
ant  The anntena to select
Sets the current antenna.

Returns:
RIG_OK if the operation has been sucessful, otherwise a negative value if an error occured (in which case, cause is set appropriately).
See also:
rig_get_ant()

int rig_set_bank RIG *    rig,
vfo_t    vfo,
int    bank
 

set the current memory bank.

Parameters:
rig  The rig handle
vfo  The target VFO
bank  The memory bank
Sets the current memory bank number. It is not mandatory for the radio to be in memory mode. Actually it depends on rigs. YMMV.

Returns:
RIG_OK if the operation has been sucessful, otherwise a negative value if an error occured (in which case, cause is set appropriately).
See also:
rig_set_mem()

int rig_set_channel RIG *    rig,
const channel_t *    chan
 

set channel data.

Parameters:
rig  The rig handle
chan  The location of data to set for this channel
Sets the data associated with a channel. See channel_t for more information.

Returns:
RIG_OK if the operation has been sucessful, otherwise a negative value if an error occured (in which case, cause is set appropriately).
See also:
rig_get_channel()

int rig_set_conf RIG *    rig,
token_t    token,
const char *    val
 

set a radio configuration parameter.

Parameters:
rig  The rig handle
token  The parameter
val  The value to set the parameter to
Sets a configuration parameter.

Returns:
RIG_OK if the operation has been sucessful, otherwise a negative value if an error occured (in which case, cause is set appropriately).
See also:
rig_get_conf()

int rig_set_ctcss_sql RIG *    rig,
vfo_t    vfo,
tone_t    tone
 

set CTCSS squelch.

Parameters:
rig  The rig handle
vfo  The target VFO
tone  The PL tone to set the squelch to
Sets the current Continuous Tone Controlled Squelch System (CTCSS) sub-audible *squelch* tone.
Note:
tone is NOT in Hz, but in tenth of Hz! This way, if you want to set subaudible squelch tone of 88.5 Hz for example, then pass 885 to this function. Also, to disable Tone squelch, set tone to 0 (FIXME: not clear in API).
Returns:
RIG_OK if the operation has been sucessful, otherwise a negative value if an error occured (in which case, cause is set appropriately).
See also:
rig_get_ctcss_sql(), rig_set_ctcss_tone()

int rig_set_ctcss_tone RIG *    rig,
vfo_t    vfo,
tone_t    tone
 

set CTCSS sub-tone frequency.

Parameters:
rig  The rig handle
vfo  The target VFO
tone  The tone to set to
Sets the current Continuous Tone Controlled Squelch System (CTCSS) sub-audible tone frequency.
Note:
the tone integer is NOT in Hz, but in tenth of Hz! This way, if you want to set a subaudible tone of 88.5 Hz for example, then pass 885 to this function. Also, to disable Tone encoding, set tone to 0 (FIXME: not clear in API).
Returns:
RIG_OK if the operation has been sucessful, otherwise a negative value if an error occured (in which case, cause is set appropriately).
See also:
rig_get_ctcss_tone(), rig_set_ctcss_sql()

int rig_set_dcs_code RIG *    rig,
vfo_t    vfo,
tone_t    code
 

set the current encoding DCS code.

Parameters:
rig  The rig handle
vfo  The target VFO
code  The tone to set to
Sets the current encoding Digitally-Coded Squelch code.

Returns:
RIG_OK if the operation has been sucessful, otherwise a negative value if an error occured (in which case, cause is set appropriately).
See also:
rig_get_dcs_code(), rig_set_dcs_sql()

int rig_set_dcs_sql RIG *    rig,
vfo_t    vfo,
tone_t    code
 

set the current DCS code.

Parameters:
rig  The rig handle
vfo  The target VFO
code  The tone to set to
Sets the current Digitally-Coded *Squelch* code.

Returns:
returns RIG_OK if the operation has been sucessful, ortherwise a negative value if an error occured (in which case, cause is set appropriately).
See also:
rig_get_dcs_sql(), rig_set_dcs_code()

int rig_set_freq RIG *    rig,
vfo_t    vfo,
freq_t    freq
 

set the frequency of the target VFO.

Parameters:
rig  The rig handle
vfo  The target VFO
freq  The frequency to set to
Sets the frequency of the target VFO.

Returns:
RIG_OK if the operation has been sucessful, otherwise a negative value if an error occured (in which case, cause is set appropriately).
See also:
rig_get_freq()

int rig_set_func RIG *    rig,
vfo_t    vfo,
setting_t    func,
int    status
 

activate/desactivate functions of radio.

Parameters:
rig  The rig handle
vfo  The target VFO
func  The functions to activate
status  The status (on or off) to set to
Activate/desactivate functions of the radio.

Returns:
RIG_OK if the operation has been sucessful, otherwise a negative value if an error occured (in which case, cause is set appropriately).
See also:
rig_get_func()

int rig_set_level RIG *    rig,
vfo_t    vfo,
setting_t    level,
value_t    val
 

set a radio level setting.

Parameters:
rig  The rig handle
vfo  The target VFO
level  The level setting
val  The value to set the level setting to
Sets the level of a setting. The level value val can be a float or an integer. See value_t for more information.

Returns:
RIG_OK if the operation has been sucessful, otherwise a negative value if an error occured (in which case, cause is set appropriately).
See also:
rig_has_set_level(), rig_get_level()

int rig_set_mem RIG *    rig,
vfo_t    vfo,
int    ch
 

set the current memory channel number.

Parameters:
rig  The rig handle
vfo  The target VFO
ch  The memory channel number
Sets the current memory channel number. It is not mandatory for the radio to be in memory mode. Actually it depends on rigs. YMMV.

Returns:
RIG_OK if the operation has been sucessful, otherwise a negative value if an error occured (in which case, cause is set appropriately).
See also:
rig_get_mem()

int rig_set_mode RIG *    rig,
vfo_t    vfo,
rmode_t    mode,
pbwidth_t    width
 

set the mode of the target VFO.

Parameters:
rig  The rig handle
vfo  The target VFO
mode  The mode to set to
width  The passband width to set to
Sets the mode and associated passband of the target VFO. The passband width must be supported by the backend of the rig.

Returns:
RIG_OK if the operation has been sucessful, otherwise a negative value if an error occured (in which case, cause is set appropriately).
See also:
rig_get_mode()

int rig_set_parm RIG *    rig,
setting_t    parm,
value_t    val
 

set a radio parameter.

Parameters:
rig  The rig handle
parm  The parameter
val  The value to set the parameter to
Sets a parameter. The parameter value val can be a float or an integer. See value_t for more information.

Returns:
RIG_OK if the operation has been sucessful, otherwise a negative value if an error occured (in which case, cause is set appropriately).
See also:
rig_has_set_parm(), rig_get_parm()

int rig_set_powerstat RIG *    rig,
powerstat_t    status
 

turn on/off the radio.

Parameters:
rig  The rig handle
status  The status to set to
turns on/off the radio. See RIG_POWER_ON, RIG_POWER_OFF and RIG_POWER_STANDBY defines for the status.

Returns:
RIG_OK if the operation has been sucessful, ortherwise a negative value if an error occured (in which case, cause is set appropriately).
See also:
rig_get_powerstat()

int rig_set_ptt RIG *    rig,
vfo_t    vfo,
ptt_t    ptt
 

set PTT on/off.

Parameters:
rig  The rig handle
vfo  The target VFO
ptt  The PTT status to set to
Sets "Push-To-Talk" on/off.

Returns:
RIG_OK if the operation has been sucessful, otherwise a negative value if an error occured (in which case, cause is set appropriately).
See also:
rig_get_ptt()

int rig_set_rit RIG *    rig,
vfo_t    vfo,
shortfreq_t    rit
 

set the RIT.

Parameters:
rig  The rig handle
vfo  The target VFO
rit  The RIT offset to adjust to
Sets the current RIT offset. A value of 0 for rit disables RIT.

Returns:
RIG_OK if the operation has been sucessful, otherwise a negative value if an error occured (in which case, cause is set appropriately).
See also:
rig_get_rit()

int rig_set_rptr_offs RIG *    rig,
vfo_t    vfo,
shortfreq_t    rptr_offs
 

set the repeater offset.

Parameters:
rig  The rig handle
vfo  The target VFO
rptr_offs  The VFO to set to
Sets the current repeater offset.

Returns:
RIG_OK if the operation has been sucessful, otherwise a negative value if an error occured (in which case, cause is set appropriately).
See also:
rig_get_rptr_offs()

int rig_set_rptr_shift RIG *    rig,
vfo_t    vfo,
rptr_shift_t    rptr_shift
 

set the repeater shift.

Parameters:
rig  The rig handle
vfo  The target VFO
rptr_shift  The repeater shift to set to
Sets the current repeater shift.

Returns:
RIG_OK if the operation has been sucessful, otherwise a negative value if an error occured (in which case, cause is set appropriately).
See also:
rig_get_rptr_shift()

int rig_set_split RIG *    rig,
vfo_t    vfo,
split_t    split
 

set the split mode.

Parameters:
rig  The rig handle
vfo  The target VFO
split  The split mode to set to
Sets the current split mode.

Returns:
RIG_OK if the operation has been sucessful, otherwise a negative value if an error occured (in which case, cause is set appropriately).
See also:
rig_get_split()

int rig_set_split_freq RIG *    rig,
vfo_t    vfo,
freq_t    tx_freq
 

set the split frequencies.

Parameters:
rig  The rig handle
vfo  The target VFO
tx_freq  The transmit split frequency to set to
Sets the split frequencies.

Returns:
RIG_OK if the operation has been sucessful, otherwise a negative value if an error occured (in which case, cause is set appropriately).
See also:
rig_get_split_freq()

int rig_set_split_mode RIG *    rig,
vfo_t    vfo,
rmode_t    tx_mode,
pbwidth_t    tx_width
 

set the split modes.

Parameters:
rig  The rig handle
vfo  The target VFO
tx_mode  The transmit split mode to set to
tx_width  The transmit split width to set to
Sets the split mode.

Returns:
RIG_OK if the operation has been sucessful, otherwise a negative value if an error occured (in which case, cause is set appropriately).
See also:
rig_get_split_mode()

int rig_set_trn RIG *    rig,
vfo_t    vfo,
int    trn
 

control the transceive mode.

Parameters:
rig  The rig handle
vfo  The target VFO
trn  The transceive status to set to
Enable/disable the transceive handling of a rig and kick off async mode.

Returns:
RIG_OK if the operation has been sucessful, otherwise a negative value if an error occured (in which case, cause is set appropriately).
See also:
rig_get_trn()

int rig_set_ts RIG *    rig,
vfo_t    vfo,
shortfreq_t    ts
 

set the Tuning Step.

Parameters:
rig  The rig handle
vfo  The target VFO
ts  The tuning step to set to
Sets the Tuning Step.

Returns:
RIG_OK if the operation has been sucessful, otherwise a negative value if an error occured (in which case, cause is set appropriately).
See also:
rig_get_ts()

int rig_set_vfo RIG *    rig,
vfo_t    vfo
 

set the current VFO.

Parameters:
rig  The rig handle
vfo  The VFO to set to
Sets the current VFO. The VFO can be RIG_VFO_A, RIG_VFO_B, RIG_VFO_C for VFOA, VFOB, VFOC respectively or RIG_VFO_MEM for Memory mode. Supported VFOs depends on rig capabilities.

Returns:
RIG_OK if the operation has been sucessful, otherwise a negative value if an error occured (in which case, cause is set appropriately).
See also:
rig_get_vfo()

int rig_set_xit RIG *    rig,
vfo_t    vfo,
shortfreq_t    xit
 

set the XIT.

Parameters:
rig  The rig handle
vfo  The target VFO
xit  The XIT offset to adjust to
Sets the current XIT offset. A value of 0 for xit disables XIT.

Returns:
RIG_OK if the operation has been sucessful, otherwise a negative value if an error occured (in which case, cause is set appropriately).
See also:
rig_get_xit()

int rig_setting2idx setting_t    s
 

basically convert setting_t expressed 2^n to n.

Parameters:
s  The setting to convert to
Converts a setting_t value expressed by 2^n to the value of n.

Returns:
the index such that 2^n is the setting, otherwise 0 if the setting was not found.

int rig_vfo_op RIG *    rig,
vfo_t    vfo,
vfo_op_t    op
 

perform Memory/VFO operations.

Parameters:
rig  The rig handle
vfo  The target VFO
op  The Memory/VFO operation to perform
Performs Memory/VFO operation. See vfo_op_t for more information.

Returns:
RIG_OK if the operation has been sucessful, otherwise a negative value if an error occured (in which case, cause is set appropriately).
See also:
rig_has_vfo_op()

const char* rigerror int    errnum
 

get string describing the error code.

Parameters:
errnum  The error code
Returns:
the appropriate description string, ortherwise a NULL pointer if the error code is unknown.
Returns a string describing the error code passed in the argument errnum.

Todo:
support gettext/localization


Variable Documentation

const tone_t common_ctcss_list[]
 

Initial value:

 {
                670,  693,  719,  744,  770,  797,  825,  854,  885,  915,
                948,  974, 1000, 1035, 1072, 1109, 1148, 1188,  1230, 1273,
                1318, 1365, 1413, 1462, 1514, 1567, 1598, 1622, 1655, 1679,
                1713, 1738, 1773, 1799, 1835, 1862, 1899, 1928, 1966, 1995,
                2035, 2065, 2107, 2181, 2257, 2291, 2336, 2418, 2503, 2541,
                0,
}
50 CTCSS sub-audible tones, from 67.0Hz to 254.1Hz

Note:
Don't even think about changing a bit of this array, several backends depend on it. If you need to, create a copy for your own caps. --SF

const tone_t full_ctcss_list[]
 

Initial value:

 {
                600,  670,  693,  719,  744,  770,  797,  825,  854,  885,  915,
                948,  974, 1000, 1035, 1072, 1109, 1148, 1188, 1200,  1230, 1273,
                1318, 1365, 1413, 1462, 1514, 1567, 1598, 1622, 1655, 1679,
                1713, 1738, 1773, 1799, 1835, 1862, 1899, 1928, 1966, 1995,
                2035, 2065, 2107, 2181, 2257, 2291, 2336, 2418, 2503, 2541,
                0,
}
52 CTCSS sub-audible tones

const tone_t full_dcs_list[]
 

Initial value:

 {
                017, 023, 025, 026, 031, 032, 036, 043, 047, 050, 051, 053, 
                054, 065, 071, 072, 073, 074, 114, 115, 116, 122, 125, 131, 
                132, 134, 143, 145, 152, 155, 156, 162, 165, 172, 174, 205, 
                212, 223, 225, 226, 243, 244, 245, 246, 251, 252, 255, 261, 
                263, 265, 266, 271, 274, 306, 311, 315, 325, 331, 332, 343, 
                346, 351, 356, 364, 365, 371, 411, 412, 413, 423, 431, 432, 
                445, 446, 452, 454, 455, 462, 464, 465, 466, 503, 506, 516, 
                523, 526, 532, 546, 565, 606, 612, 624, 627, 631, 632, 654, 
                662, 664, 703, 712, 723, 731, 732, 734, 743, 754, 
                0,
}
106 DCS codes

const char hamlib_copyright[]
 

Initial value:

 
        "Copyright (C) 2000, 2001 Stephane Fillod and Frank Singleton\n"
        "This is free software; see the source for copying conditions.  "
        "There is NO\n warranty; not even for MERCHANTABILITY or FITNESS FOR A"
        "PARTICULAR PURPOSE."
Hamlib copyright notice.

const char hamlib_version[] = "Hamlib version " VERSION
 

Hamlib release number.


Generated on Sat Dec 29 21:57:37 2001 for hamlib by doxygen1.2.11.1 written by Dimitri van Heesch, © 1997-2001