hamlib API Reference This chapter documents the Hamlib API for &curver;. Each function of the API occuring in rig.c at the time of release is documented here. Every effort was made to ensure all arguments and return values are correct, but, as always, the source is definitive. Errors are bound to have occurred and others will be blamed! rigerror rigerror return string describing error code Synopsis const char * rigerror int errnum Arguments errnum The error code Description The rigerror function returns a string describing the error code passed in the argument errnum. RETURN VALUE The rigerror function returns the appropriate description string, or an unknown error message if the error code is unknown. TODO check table bounds, support gettext foreach_opened_rig foreach_opened_rig execs cfunc() on each opened rig Synopsis int foreach_opened_rig int (*cfunc) RIG *, void * void * data Arguments cfunc The function to be executed on each rig data Data pointer to be passed to cfunc Description The foreach_opened_rig function 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, which 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. RETURN VALUE The foreach_opened_rig function always returns RIG_OK. rig_init rig_init rig_init allocate a new &RIG handle Synopsis RIG * rig_init rig_model_t rig_model Arguments rig_model The rig model for this new handle Description The rig_init function allocates a new &RIG handle and initialize the associated data for rig_model. RETURN VALUE The rig_init function returns a pointer to the &RIG handle or NULL if memory allocation failed or rig_model is unknown. SEE ALSO rig_cleanup, rig_open rig_open rig_open open the communication to the rig Synopsis int rig_open RIG * rig Arguments rig The &RIG handle of the radio to be opened Description The rig_open function opens communication to a radio which &RIG handle has been passed by argument. RETURN VALUE The rig_open function returns RIG_OK if the operation has been sucessful, or a negative value if an error occured (in which case, cause is set appropriately). ERRORS RIG_EINVAL rig is NULL or unconsistent. RIG_ENIMPL port type communication is not implemented yet. SEE ALSO rig_close rig_close rig_close close the communication to the rig Synopsis int rig_close RIG * rig Arguments rig The &RIG handle of the radio to be closed Description The rig_close function closes communication to a radio which &RIG handle has been passed by argument. RETURN VALUE The rig_close function returns RIG_OK if the operation has been sucessful, or a negative value if an error occured (in which case, cause is set appropriately). ERRORS RIG_EINVAL rig is NULL or inconsistent. SEE ALSO rig_open, rig_cleanup rig_cleanup rig_cleanup release a closed rig struct Synopsis int rig_cleanup RIG * rig Arguments rig The rig handle Description The rig_cleanup function releases a rig struct which port has already been closed. RETURN VALUE The rig_get_freq function returns RIG_OK if the operation has been sucessful, or a negative value if an error occured (in which case, cause is set appropriately). ERRORS RIG_EINVAL rig is NULL or inconsistent. SEE ALSO rig_close rig_set_freq rig_set_freq set the frequency of the current VFO Synopsis int rig_set_freq RIG * rig vfo_t vfo freq_t freq Arguments rig The rig handle vfo The target VFO freq The frequency to set to Description The rig_set_freq function sets the frequency of the current VFO. RETURN VALUE The rig_set_freq function returns RIG_OK if the operation has been sucessful, or a negative value if an error occured (in which case, cause is set appropriately). SEE ALSO rig_get_freq rig_get_freq rig_get_freq get the frequency of the current VFO Synopsis int rig_get_freq RIG * rig vfo_t vfo freq_t * freq Arguments rig The rig handle vfo The target VFO freq The location where to store the current frequency Description The rig_get_freq function retrieves the frequency of the current VFO. RETURN VALUE The rig_get_freq function returns RIG_OK if the operation has been sucessful, or a negative value if an error occured (in which case, cause is set appropriately). SEE ALSO rig_set_freq rig_set_mode rig_set_mode set the mode of the current VFO Synopsis int rig_set_mode RIG * rig vfo_t vfo rmode_t mode pbwidth_t width Arguments rig The rig handle vfo The target VFO mode The mode to set to width The passband width to set to Description The rig_set_mode function sets the mode of the current VFO. As a begining, the backend is free to ignore the width argument, however, it would be nice to at least honor the WFM case. RETURN VALUE The rig_set_mode function returns RIG_OK if the operation has been sucessful, or a negative value if an error occured (in which case, cause is set appropriately). SEE ALSO rig_get_mode rig_get_mode rig_get_mode get the mode of the current VFO Synopsis int rig_get_mode RIG * rig vfo_t vfo rmode_t * mode pbwidth_t * width Arguments 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 Description The rig_set_mode function retrieves the mode of the current VFO. If the backend is unable to determine the width, it must return RIG_PASSBAND_NORMAL as a default. RETURN VALUE The rig_get_mode function returns RIG_OK if the operation has been sucessful, or a negative value if an error occured (in which case, cause is set appropriately). SEE ALSO rig_set_mode rig_set_vfo rig_set_vfo set the current VFO Synopsis int rig_set_vfo RIG * rig vfo_t vfo Arguments rig The rig handle vfo The VFO to set to Description The rig_set_vfo function sets the current VFO. RETURN VALUE The rig_set_vfo function returns RIG_OK if the operation has been sucessful, or a negative value if an error occured (in which case, cause is set appropriately). SEE ALSO rig_get_vfo rig_get_vfo rig_get_vfo get the current VFO Synopsis int rig_get_vfo RIG * rig vfo_t * vfo Arguments rig The rig handle vfo The location where to store the current VFO Description The rig_get_vfo function retrieves the current VFO. RETURN VALUE The rig_get_vfo function returns RIG_OK if the operation has been sucessful, or a negative value if an error occured (in which case, cause is set appropriately). SEE ALSO rig_set_vfo rig_set_ptt rig_set_ptt set PTT on/off Synopsis int rig_set_ptt RIG * rig vfo_t vfo ptt_t ptt Arguments rig The rig handle vfo The target VFO ptt The PTT status to set to Description The rig_set_ptt function sets Push-To-Talk on/off. RETURN VALUE The rig_set_ptt function returns RIG_OK if the operation has been sucessful, or a negative value if an error occured (in which case, cause is set appropriately). SEE ALSO rig_get_ptt rig_get_ptt rig_get_ptt get the status of the PTT Synopsis int rig_get_ptt RIG * rig vfo_t vfo ptt_t * ptt Arguments rig The rig handle vfo The target VFO ptt The location where to store the status of the PTT Description The rig_get_ptt function retrieves the status of PTT (are we on the air?). RETURN VALUE The rig_get_ptt function returns RIG_OK if the operation has been sucessful, or a negative value if an error occured (in which case, cause is set appropriately). SEE ALSO rig_set_ptt rig_set_rptr_shift rig_set_rptr_shift set the repeater shift Synopsis int rig_set_rptr_shift RIG * rig vfo_t vfo rptr_shift_t rptr_shift Arguments rig The rig handle vfo The target VFO rptr_shift The repeater shift to set to Description The rig_set_rptr_shift function sets the current repeater shift. RETURN VALUE The rig_rptr_shift function returns RIG_OK if the operation has been sucessful, or a negative value if an error occured (in which case, cause is set appropriately). SEE ALSO rig_get_rptr_shift rig_get_rptr_shift rig_get_rptr_shift get the current repeater shift Synopsis int rig_get_rptr_shift RIG * rig vfo_t vfo rptr_shift_t * rptr_shift Arguments rig The rig handle vfo The target VFO rptr_shift The location where to store the current repeater shift Description The rig_get_rptr_shift function retrieves the current repeater shift. RETURN VALUE The rig_get_rptr_shift function returns RIG_OK if the operation has been sucessful, or a negative value if an error occured (in which case, cause is set appropriately). SEE ALSO rig_set_rptr_shift rig_set_rptr_offs rig_set_rptr_offs set the repeater offset Synopsis int rig_set_rptr_offs RIG * rig vfo_t vfo shortfreq_t rptr_offs Arguments rig The rig handle vfo The target VFO rptr_offs The VFO to set to Description The rig_set_rptr_offs function sets the current repeater offset. RETURN VALUE The rig_set_rptr_offs function returns RIG_OK if the operation has been sucessful, or a negative value if an error occured (in which case, cause is set appropriately). SEE ALSO rig_get_rptr_offs rig_get_rptr_offs rig_get_rptr_offs get the current repeater offset Synopsis int rig_get_rptr_offs RIG * rig vfo_t vfo shortfreq_t * rptr_offs Arguments rig The rig handle vfo The target VFO rptr_offs The location where to store the current repeater offset Description The rig_get_rptr_offs function retrieves the current repeater offset. RETURN VALUE The rig_get_rptr_offs function returns RIG_OK if the operation has been sucessful, or a negative value if an error occured (in which case, cause is set appropriately). SEE ALSO rig_set_rptr_offs rig_set_split_freq rig_set_split_freq set the split frequencies Synopsis int rig_set_split_freq RIG * rig vfo_t vfo freq_t rx_freq freq_t tx_freq Arguments rig The rig handle vfo The target VFO rx_freq The receive split frequency to set to tx_freq The transmit split frequency to set to Description The rig_set_split_freq function sets the split frequencies. RETURN VALUE The rig_set_split_freq function returns RIG_OK if the operation has been sucessful, or a negative value if an error occured (in which case, cause is set appropriately). SEE ALSO rig_get_split_freq rig_get_split_freq rig_get_split_freq get the current split frequencies Synopsis int rig_get_split_freq RIG * rig vfo_t vfo freq_t * rx_freq freq_t * tx_freq Arguments rig The rig handle vfo The target VFO rx_freq The location where to store the current receive split frequency tx_freq The location where to store the current receive split frequency Description The rig_get_split_freq function retrieves the current split frequencies. RETURN VALUE The rig_get_split_freq function returns RIG_OK if the operation has been sucessful, or a negative value if an error occured (in which case, cause is set appropriately). SEE ALSO rig_set_split_freq rig_set_split rig_set_split set the split mode Synopsis int rig_set_split RIG * rig vfo_t vfo split_t split Arguments rig The rig handle vfo The target VFO split The split mode to set to Description The rig_set_split function sets the current split mode. RETURN VALUE The rig_set_split function returns RIG_OK if the operation has been sucessful, or a negative value if an error occured (in which case, cause is set appropriately). SEE ALSO rig_get_split rig_get_split rig_get_split get the current split mode Synopsis int rig_get_split RIG * rig vfo_t vfo split_t * split Arguments rig The rig handle vfo The target VFO split The location where to store the current split mode Description The rig_get_split function retrieves the current split mode. RETURN VALUE The rig_get_split function returns RIG_OK if the operation has been sucessful, or a negative value if an error occured (in which case, cause is set appropriately). SEE ALSO rig_set_split rig_set_rit rig_set_rit set the RIT Synopsis int rig_set_rit RIG * rig vfo_t vfo shortfreq_t rit Arguments rig The rig handle vfo The target VFO rit The RIT offset to adjust to Description The rig_set_rit function sets the current RIT offset. A value of 0 for rit disables RIT. RETURN VALUE The rig_set_rit function returns RIG_OK if the operation has been sucessful, or a negative value if an error occured (in which case, cause is set appropriately). SEE ALSO rig_get_rit rig_get_rit rig_get_rit get the current RIT offset Synopsis int rig_get_rit RIG * rig vfo_t vfo shortfreq_t * rit Arguments rig The rig handle vfo The target VFO rit The location where to store the current RIT offset Description The rig_get_rit function retrieves the current RIT offset. RETURN VALUE The rig_get_rit function returns RIG_OK if the operation has been sucessful, or a negative value if an error occured (in which case, cause is set appropriately). SEE ALSO rig_set_rit rig_set_ts rig_set_ts set the Tuning Step Synopsis int rig_set_ts RIG * rig vfo_t vfo shortfreq_t ts Arguments rig The rig handle vfo The target VFO ts The tuning step to set to Description The rig_set_rs function sets the Tuning Step. RETURN VALUE The rig_set_ts function returns RIG_OK if the operation has been sucessful, or a negative value if an error occured (in which case, cause is set appropriately). SEE ALSO rig_get_ts rig_get_ts rig_get_ts get the current Tuning Step Synopsis int rig_get_ts RIG * rig vfo_t vfo shortfreq_t * ts Arguments rig The rig handle vfo The target VFO ts The location where to store the current tuning step Description The rig_get_ts function retrieves the current tuning step. RETURN VALUE The rig_get_ts function returns RIG_OK if the operation has been sucessful, or a negative value if an error occured (in which case, cause is set appropriately). SEE ALSO rig_set_ts rig_power2mW rig_power2mW conversion utility from relative range to absolute in mW Synopsis int rig_power2mW RIG * rig unsigned int * mwpower float power freq_t freq rmode_t mode Arguments 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 Description The rig_power2mW function 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. RETURN VALUE The rig_power2mW function returns RIG_OK if the operation has been sucessful, or a negative value if an error occured (in which case, cause is set appropriately). SEE ALSO rig_mW2power rig_mW2power rig_mW2power conversion utility from absolute in mW to relative range Synopsis int rig_mW2power RIG * rig float * power unsigned int mwpower freq_t freq rmode_t mode Arguments 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 Description The rig_mW2power function 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. RETURN VALUE The rig_mW2power function returns RIG_OK if the operation has been sucessful, or a negative value if an error occured (in which case, cause is set appropriately). SEE ALSO rig_power2mW rig_set_ctcss rig_set_ctcss set CTCSS Synopsis int rig_set_ctcss RIG * rig vfo_t vfo unsigned int tone Arguments rig The rig handle vfo The target VFO tone The tone to set to Description The rig_set_ctcss function sets the current Continuous Tone Controlled Squelch System (CTCSS) sub-audible tone. NB, tone is NOT in Hz, but in tenth of Hz! This way, if you want to set subaudible tone of 88.5 Hz for example, then pass 885 to this function. Also, to disable Tone squelch, set tone to 0. RETURN VALUE The rig_set_ctcss function returns RIG_OK if the operation has been sucessful, or a negative value if an error occured (in which case, cause is set appropriately). SEE ALSO rig_get_ctcss, rig_set_dcs, rig_get_dcs rig_get_ctcss rig_get_ctcss get the current CTCSS Synopsis int rig_get_ctcss RIG * rig vfo_t vfo unsigned int * tone Arguments rig The rig handle vfo The target VFO tone The location where to store the current tone Description The rig_get_ctcss function retrieves the current Continuous Tone Controlled Squelch System (CTCSS) sub-audible tone. NB, tone is NOT in Hz, but in tenth of Hz! This way, if the function rig_get_ctcss 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. RETURN VALUE The rig_get_ctcss function returns RIG_OK if the operation has been sucessful, or a negative value if an error occured (in which case, cause is set appropriately). SEE ALSO rig_set_ctcss, rig_set_dcs, rig_get_dcs rig_set_dcs rig_set_dcs set the current DCS Synopsis int rig_set_dcs RIG * rig vfo_t vfo unsigned int code Arguments rig The rig handle vfo The target VFO code The tone to set to Description The rig_set_dcs function sets the current Digitally-Coded Squelch code. RETURN VALUE The rig_set_dcs function returns RIG_OK if the operation has been sucessful, or a negative value if an error occured (in which case, cause is set appropriately). SEE ALSO rig_get_dcs, rig_set_ctcss, rig_get_ctcss rig_get_dcs rig_get_dcs get the current DCS Synopsis int rig_get_dcs RIG * rig vfo_t vfo unsigned int * code Arguments rig The rig handle vfo The target VFO code The location where to store the current tone Description The rig_get_dcs function retrieves the current Digitally-Coded Squelch. RETURN VALUE The rig_get_dcs function returns RIG_OK if the operation has been sucessful, or a negative value if an error occured (in which case, cause is set appropriately). SEE ALSO rig_get_dcs, rig_set_ctcss, rig_get_ctcss rig_set_ctcss_sql rig_set_ctcss_sql set CTCSS squelch Synopsis int rig_set_ctcss_sql RIG * rig vfo_t vfo unsigned int tone Arguments rig The rig handle vfo The target VFO tone The PL tone to set the squelch to Description The rig_set_ctcss_sql function sets the current Continuous Tone Controlled Squelch System (CTCSS) sub-audible squelch tone. NB, tone is NOT in Hz, but in tenth of Hz! This way, if you want to set subaudible tone of 88.5 Hz for example, then pass 885 to this function. Also, to disable Tone squelch, set tone to 0. RETURN VALUE The rig_set_ctcss_sql function returns RIG_OK if the operation has been sucessful, or a negative value if an error occured (in which case, cause is set appropriately). SEE ALSO rig_get_ctcss_sql, rig_set_ctcss rig_get_ctcss_sql rig_get_ctcss_sql get the current CTCSS squelch Synopsis int rig_get_ctcss_sql RIG * rig vfo_t vfo unsigned int * tone Arguments rig The rig handle vfo The target VFO tone The location where to store the current tone Description The rig_get_ctcss_sql function retrieves the current Continuous Tone Controlled Squelch System (CTCSS) sub-audible squelch tone. NB, tone is NOT in Hz, but in tenth of Hz! This way, if the function rig_get_ctcss 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. RETURN VALUE The rig_get_ctcss_sql function returns RIG_OK if the operation has been sucessful, or a negative value if an error occured (in which case, cause is set appropriately). SEE ALSO rig_set_ctcss_sql, rig_get_ctcss rig_set_dcs_sql rig_set_dcs_sql set the current DCS Synopsis int rig_set_dcs_sql RIG * rig vfo_t vfo unsigned int code Arguments rig The rig handle vfo The target VFO code The tone to set to Description The rig_set_dcs_sql function sets the current Digitally-Coded Squelch code. RETURN VALUE The rig_set_dcs_sql function returns RIG_OK if the operation has been sucessful, or a negative value if an error occured (in which case, cause is set appropriately). SEE ALSO rig_get_dcs_sql, rig_set_dcs rig_get_dcs_sql rig_get_dcs_sql get the current DCS Synopsis int rig_get_dcs_sql RIG * rig vfo_t vfo unsigned int * code Arguments rig The rig handle vfo The target VFO code The location where to store the current tone Description The rig_get_dcs_sql function retrieves the current Digitally-Coded Squelch. RETURN VALUE The rig_get_dcs_sql function returns RIG_OK if the operation has been sucessful, or a negative value if an error occured (in which case, cause is set appropriately). SEE ALSO rig_get_dcs_sql, rig_get_dcs rig_set_poweron rig_set_poweron turn on the radio Synopsis int rig_set_poweron RIG * rig Arguments rig The rig handle Description The rig_set_poweron function turns on the radio. RETURN VALUE The rig_set_poweron function returns RIG_OK if the operation has been sucessful, or a negative value if an error occured (in which case, cause is set appropriately). SEE ALSO rig_set_poweroff rig_set_poweroff rig_set_poweroff turn off the radio Synopsis int rig_set_poweroff RIG * rig Arguments rig The rig handle Description The rig_set_poweroff function turns off the radio. RETURN VALUE The rig_set_poweroff function returns RIG_OK if the operation has been sucessful, or a negative value if an error occured (in which case, cause is set appropriately). SEE ALSO rig_set_poweron rig_set_level rig_set_level set a radio level setting Synopsis int rig_set_level RIG * rig vfo_t vfo setting_t level value_t val Arguments rig The rig handle vfo The target VFO level The level setting val The value to set the level setting to Description The rig_set_level function sets the level of a setting. The level value val can be a float or an integer. See &value_t for more information. RETURN VALUE The rig_set_level function returns RIG_OK if the operation has been sucessful, or a negative value if an error occured (in which case, cause is set appropriately). SEE ALSO rig_has_set_level, rig_get_level rig_get_level rig_get_level get the level of a level Synopsis int rig_get_level RIG * rig vfo_t vfo setting_t level value_t * val Arguments rig The rig handle vfo The target VFO level The level setting val The location where to store the value of level Description The rig_get_level function retrieves the value of a level. The level value val can be a float or an integer. See &value_t for more information. RETURN VALUE The rig_get_level function returns RIG_OK if the operation has been sucessful, or a negative value if an error occured (in which case, cause is set appropriately). SEE ALSO rig_has_level, rig_set_level rig_has_level rig_has_level check retrieval ability of level settings Synopsis setting_t rig_has_level RIG * rig setting_t level Arguments rig The rig handle level The level settings Description The rig_has_level macro checks if a rig can *get* a level setting. Since the level is a OR'ed bitwise argument, more than one level can be checked at the same time. RETURN VALUE The rig_has_level macro returns a bit wise mask of supported level settings that can be retrieve, 0 if none supported. EXAMPLE if (rig_has_level(my_rig, RIG_LVL_STRENGTH)) disp_Smeter; SEE ALSO rig_has_set_level, rig_get_level rig_has_set_level rig_has_set_level check settable ability of level settings Synopsis setting_t rig_has_set_level RIG * rig setting_t level Arguments rig The rig handle level The level settings Description The rig_has_set_level macro checks if a rig can *set* a level setting. Since the level is a OR'ed bitwise argument, more than one level can be check at the same time. RETURN VALUE The rig_has_set_level macro returns a bit wise mask of supported level settings that can be set, 0 if none supported. EXAMPLE if (rig_has_set_level(my_rig, RIG_LVL_RFPOWER)) crank_tx; SEE ALSO rig_has_level, rig_set_level rig_has_func rig_has_func check ability of radio functions Synopsis setting_t rig_has_func RIG * rig setting_t func Arguments rig The rig handle func The functions Description The rig_has_func macro checks if a rig supports a set of functions. Since the func is a OR'ed bitwise argument, more than one function can be checked at the same time. RETURN VALUE The rig_has_func macro returns a bit wise mask of supported functions, 0 if none supported. EXAMPLE if (rig_has_func(my_rig, RIG_FUNC_FAGC)) disp_fagc_button; SEE ALSO rig_set_func, rig_get_func rig_set_func rig_set_func activate/desactivate functions of radio Synopsis int rig_set_func RIG * rig vfo_t vfo setting_t func int status Arguments rig The rig handle vfo The target VFO func The functions to activate status The status (on or off) to set to Description The rig_set_func function activate/desactivate functions of the radio. RETURN VALUE The rig_set_func function returns RIG_OK if the operation has been sucessful, or a negative value if an error occured (in which case, cause is set appropriately). SEE ALSO rig_get_func rig_get_func rig_get_func get the status of functions of the radio Synopsis int rig_get_func RIG * rig vfo_t vfo setting_t * func Arguments rig The rig handle vfo The target VFO func The location where to store the function status Description The rig_get_func function 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 funtions (bit set to 1 = activated, bit set to 0 = desactivated). RETURN VALUE The rig_get_func function returns RIG_OK if the operation has been sucessful, or a negative value if an error occured (in which case, cause is set appropriately). SEE ALSO rig_set_func rig_set_mem rig_set_mem set the current memory channel number Synopsis int rig_set_mem RIG * rig vfo_t vfo int ch Arguments rig The rig handle vfo The target VFO ch The memory channel number Description The rig_set_mem function sets the current memory channel number. It is not mandatory for the radio to be in memory mode. Actually it depends on rigs. YMMV. RETURN VALUE The rig_set_mem function returns RIG_OK if the operation has been sucessful, or a negative value if an error occured (in which case, cause is set appropriately). SEE ALSO rig_get_mem rig_get_mem rig_get_mem get the current memory channel number Synopsis int rig_get_mem RIG * rig vfo_t vfo int * ch Arguments rig The rig handle vfo The target VFO ch The location where to store the current memory channel number Description The rig_get_mem function retrieves the current memory channel number. It is not mandatory for the radio to be in memory mode. Actually it depends on rigs. YMMV. RETURN VALUE The rig_get_mem function returns RIG_OK if the operation has been sucessful, or a negative value if an error occured (in which case, cause is set appropriately). SEE ALSO rig_set_mem rig_mv_ctl rig_mv_ctl perform Memory/VFO operations Synopsis int rig_mv_ctl RIG * rig vfo_t vfo mv_op_t op Arguments rig The rig handle vfo The target VFO op The Memory/VFO operation to perform Description The rig_mv_ctl function performs Memory/VFO operation. See &mv_op_t for more information. RETURN VALUE The rig_mv_ctl function returns RIG_OK if the operation has been sucessful, or a negative value if an error occured (in which case, cause is set appropriately). rig_set_bank rig_set_bank set the current memory bank Synopsis int rig_set_bank RIG * rig vfo_t vfo int bank Arguments rig The rig handle vfo The target VFO bank The memory bank Description The rig_set_bank function sets the current memory bank. It is not mandatory for the radio to be in memory mode. Actually it depends on rigs. YMMV. RETURN VALUE The rig_set_bank function returns RIG_OK if the operation has been sucessful, or a negative value if an error occured (in which case, cause is set appropriately). SEE ALSO rig_set_mem rig_set_channel rig_set_channel set channel data Synopsis int rig_set_channel RIG * rig const channel_t * chan Arguments rig The rig handle chan The location of data to set for this channel Description The rig_set_channel function sets the data associated with a channel. See &channel_t for more information. RETURN VALUE The rig_set_channel function returns RIG_OK if the operation has been sucessful, or a negative value if an error occured (in which case, cause is set appropriately). SEE ALSO rig_get_channel rig_get_channel rig_get_channel get channel data Synopsis int rig_get_channel RIG * rig channel_t * chan Arguments rig The rig handle chan The location where to store the channel data Description The rig_get_channel function retrieves the data associated with the channel chan->channel_num. See &channel_t for more information. RETURN VALUE The rig_get_channel function returns RIG_OK if the operation has been sucessful, or a negative value if an error occured (in which case, cause is set appropriately). SEE ALSO rig_set_channel rig_get_range rig_get_range find the freq_range of freq/mode Synopsis const freq_range_t * rig_get_range const freq_range_t * range_list freq_t freq rmode_t mode Arguments 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 Description The rig_get_range function returns the location of the &freq_range_t including freq and mode. Works for rx and tx range list as well. RETURN VALUE The rig_get_range function returns the location of the &freq_range_t if found, NULL if not found or if range_list is invalid. rig_set_trn rig_set_trn control the transceive mode Synopsis int rig_set_trn RIG * rig vfo_t vfo int trn Arguments rig The rig handle vfo The target VFO trn The transceive status to set to Description The rig_set_trn function enable/disable the transceive handling of a rig and kick off async mode. RETURN VALUE The rig_set_trn function returns RIG_OK if the operation has been sucessful, or a negative value if an error occured (in which case, cause is set appropriately). SEE ALSO rig_get_trn rig_get_trn rig_get_trn get the current transceive mode Synopsis int rig_get_trn RIG * rig vfo_t vfo int * trn Arguments rig The rig handle vfo The target VFO trn The location where to store the current transceive mode Description The rig_get_trn function retrieves the current status of the transceive mode, ie. if radio sends new status automatically when some changes happened on the radio. RETURN VALUE The rig_get_trn function returns RIG_OK if the operation has been sucessful, or a negative value if an error occured (in which case, cause is set appropriately). SEE ALSO rig_set_trn rig_get_info rig_get_info get general information from the radio Synopsis unsigned char* rig_get_info RIG * rig Arguments rig The rig handle Description The rig_get_info function retrieves some general information from the radio. This can include firmware revision, exact model name, or just nothing. RETURN VALUE The rig_get_info function returns a pointer to freshly allocated memory containing the ASCIIZ string if the operation has been sucessful, or NULL if an error occured.