#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 "parallel.h"
#include "usb_port.h"
#include "event.h"
Functions | |
| const char * | rigerror (int errnum) |
| get string describing the error code | |
| RIG * | rig_init (rig_model_t rig_model) |
| allocate a new RIG handle | |
| int | rig_open (RIG *rig) |
| open the communication to the rig | |
| int | rig_close (RIG *rig) |
| close the communication to the rig | |
| int | rig_cleanup (RIG *rig) |
| release a rig handle and free associated memory | |
| int | rig_set_freq (RIG *rig, vfo_t vfo, freq_t freq) |
| set the frequency of the target VFO | |
| int | rig_get_freq (RIG *rig, vfo_t vfo, freq_t *freq) |
| get the frequency of the target VFO | |
| int | rig_set_mode (RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t width) |
| set the mode of the target VFO | |
| int | rig_get_mode (RIG *rig, vfo_t vfo, rmode_t *mode, pbwidth_t *width) |
| get the mode of the target VFO | |
| pbwidth_t | rig_passband_normal (RIG *rig, rmode_t mode) |
| get the normal passband of a mode | |
| pbwidth_t | rig_passband_narrow (RIG *rig, rmode_t mode) |
| get the narrow passband of a mode | |
| pbwidth_t | rig_passband_wide (RIG *rig, rmode_t mode) |
| get the wide passband of a mode | |
| int | rig_set_vfo (RIG *rig, vfo_t vfo) |
| set the current VFO | |
| int | rig_get_vfo (RIG *rig, vfo_t *vfo) |
| get the current VFO | |
| int | rig_set_ptt (RIG *rig, vfo_t vfo, ptt_t ptt) |
| set PTT on/off | |
| int | rig_get_ptt (RIG *rig, vfo_t vfo, ptt_t *ptt) |
| get the status of the PTT | |
| int | rig_get_dcd (RIG *rig, vfo_t vfo, dcd_t *dcd) |
| get the status of the DCD | |
| int | rig_set_rptr_shift (RIG *rig, vfo_t vfo, rptr_shift_t rptr_shift) |
| set the repeater shift | |
| int | rig_get_rptr_shift (RIG *rig, vfo_t vfo, rptr_shift_t *rptr_shift) |
| get the current repeater shift | |
| int | rig_set_rptr_offs (RIG *rig, vfo_t vfo, shortfreq_t rptr_offs) |
| set the repeater offset | |
| int | rig_get_rptr_offs (RIG *rig, vfo_t vfo, shortfreq_t *rptr_offs) |
| get the current repeater offset | |
| int | rig_set_split_freq (RIG *rig, vfo_t vfo, freq_t tx_freq) |
| set the split frequencies | |
| int | rig_get_split_freq (RIG *rig, vfo_t vfo, freq_t *tx_freq) |
| get the current split frequencies | |
| int | rig_set_split_mode (RIG *rig, vfo_t vfo, rmode_t tx_mode, pbwidth_t tx_width) |
| set the split modes | |
| int | rig_get_split_mode (RIG *rig, vfo_t vfo, rmode_t *tx_mode, pbwidth_t *tx_width) |
| get the current split modes | |
| int | rig_set_split_vfo (RIG *rig, vfo_t vfo, split_t split, vfo_t tx_vfo) |
| set the split mode | |
| int | rig_get_split_vfo (RIG *rig, vfo_t vfo, split_t *split, vfo_t *tx_vfo) |
| get the current split mode | |
| int | rig_set_rit (RIG *rig, vfo_t vfo, shortfreq_t rit) |
| set the RIT | |
| int | rig_get_rit (RIG *rig, vfo_t vfo, shortfreq_t *rit) |
| get the current RIT offset | |
| int | rig_set_xit (RIG *rig, vfo_t vfo, shortfreq_t xit) |
| set the XIT | |
| int | rig_get_xit (RIG *rig, vfo_t vfo, shortfreq_t *xit) |
| get the current XIT offset | |
| int | rig_set_ts (RIG *rig, vfo_t vfo, shortfreq_t ts) |
| set the Tuning Step | |
| int | rig_get_ts (RIG *rig, vfo_t vfo, shortfreq_t *ts) |
| get the current Tuning Step | |
| int | rig_set_ant (RIG *rig, vfo_t vfo, ant_t ant) |
| set the antenna | |
| int | rig_get_ant (RIG *rig, vfo_t vfo, ant_t *ant) |
| get the current antenna | |
| 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 | |
| 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 | |
| shortfreq_t | rig_get_resolution (RIG *rig, rmode_t mode) |
| get the best frequency resolution of the rig | |
| int | rig_set_powerstat (RIG *rig, powerstat_t status) |
| turn on/off the radio | |
| int | rig_get_powerstat (RIG *rig, powerstat_t *status) |
| get the on/off status of the radio | |
| int | rig_reset (RIG *rig, reset_t reset) |
| reset the radio | |
| rig_model_t | rig_probe (hamlib_port_t *port) |
| try to guess a rig | |
| int | rig_probe_all (hamlib_port_t *port, rig_probe_func_t cfunc, char *data) |
| try to guess rigs | |
| vfo_op_t | rig_has_vfo_op (RIG *rig, vfo_op_t op) |
| check retrieval ability of VFO operations | |
| int | rig_vfo_op (RIG *rig, vfo_t vfo, vfo_op_t op) |
| perform Memory/VFO operations | |
| scan_t | rig_has_scan (RIG *rig, scan_t scan) |
| check availability of scaning functions | |
| int | rig_scan (RIG *rig, vfo_t vfo, scan_t scan, int ch) |
| perform Memory/VFO operations | |
| int | rig_send_dtmf (RIG *rig, vfo_t vfo, const char *digits) |
| send DTMF digits | |
| int | rig_recv_dtmf (RIG *rig, vfo_t vfo, char *digits, int *length) |
| receive DTMF digits | |
| int | rig_send_morse (RIG *rig, vfo_t vfo, const char *msg) |
| send morse code | |
| 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 | |
| const char * | rig_get_info (RIG *rig) |
| get general information from the radio | |
Variables | |
| const char | hamlib_version [] = "Hamlib version " PACKAGE_VERSION |
| Hamlib release number. | |
| const char | hamlib_copyright [] |
| Hamlib copyright notice. | |
| int rig_cleanup | ( | RIG * | rig | ) |
release a rig handle and free associated memory
| rig | The RIG handle of the radio to be closed |
| int rig_close | ( | RIG * | rig | ) |
close the communication to the rig
| rig | The RIG handle of the radio to be closed |
get the current antenna
| rig | The rig handle | |
| vfo | The target VFO | |
| ant | The location where to store the current antenna |
get the status of the DCD
| rig | The rig handle | |
| vfo | The target VFO | |
| dcd | The location where to store the status of the DCD |
get the frequency of the target VFO
| rig | The rig handle | |
| vfo | The target VFO | |
| freq | The location where to store the current frequency |
| const char* rig_get_info | ( | RIG * | rig | ) |
get general information from the radio
| rig | The rig handle |
get the mode of the target VFO
| 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 |
| int rig_get_powerstat | ( | RIG * | rig, | |
| powerstat_t * | status | |||
| ) |
get the on/off status of the radio
| rig | The rig handle | |
| status | The locatation where to store the current status |
get the status of the PTT
| rig | The rig handle | |
| vfo | The target VFO | |
| ptt | The location where to store the status of the 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
| 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 |
| shortfreq_t rig_get_resolution | ( | RIG * | rig, | |
| rmode_t | mode | |||
| ) |
get the best frequency resolution of the rig
| rig | The rig handle | |
| mode | The mode where the conversion should take place |
| int rig_get_rit | ( | RIG * | rig, | |
| vfo_t | vfo, | |||
| shortfreq_t * | rit | |||
| ) |
get the current RIT offset
| rig | The rig handle | |
| vfo | The target VFO | |
| rit | The location where to store the current RIT offset |
| int rig_get_rptr_offs | ( | RIG * | rig, | |
| vfo_t | vfo, | |||
| shortfreq_t * | rptr_offs | |||
| ) |
get the current repeater offset
| rig | The rig handle | |
| vfo | The target VFO | |
| rptr_offs | The location where to store the current repeater offset |
| int rig_get_rptr_shift | ( | RIG * | rig, | |
| vfo_t | vfo, | |||
| rptr_shift_t * | rptr_shift | |||
| ) |
get the current repeater shift
| rig | The rig handle | |
| vfo | The target VFO | |
| rptr_shift | The location where to store the current repeater shift |
get the current split frequencies
| rig | The rig handle | |
| vfo | The target VFO | |
| tx_freq | The location where to store the current transmit split frequency |
get the current split modes
| 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 |
get the current split mode
| rig | The rig handle | |
| vfo | The target VFO | |
| split | The location where to store the current split mode | |
| tx_vfo | The transmit VFO |
| int rig_get_ts | ( | RIG * | rig, | |
| vfo_t | vfo, | |||
| shortfreq_t * | ts | |||
| ) |
get the current Tuning Step
| rig | The rig handle | |
| vfo | The target VFO | |
| ts | The location where to store the current tuning step |
get the current VFO
| rig | The rig handle | |
| vfo | The location where to store the current VFO |
| int rig_get_xit | ( | RIG * | rig, | |
| vfo_t | vfo, | |||
| shortfreq_t * | xit | |||
| ) |
get the current XIT offset
| rig | The rig handle | |
| vfo | The target VFO | |
| xit | The location where to store the current XIT offset |
check availability of scaning functions
| rig | The rig handle | |
| scan | The scan op |
EXAMPLE: if (rig_has_scan(my_rig, RIG_SCAN_PRIO)) disp_SCANprio_btn();
check retrieval ability of VFO operations
| rig | The rig handle | |
| op | The VFO op |
EXAMPLE: if (rig_has_vfo_op(my_rig, RIG_OP_CPY)) disp_VFOcpy_btn();
| RIG* rig_init | ( | rig_model_t | rig_model | ) |
allocate a new RIG handle
| rig_model | The rig model for this new handle |
conversion utility from absolute in mW to relative range
| 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 |
| int rig_open | ( | RIG * | rig | ) |
open the communication to the rig
| rig | The RIG handle of the radio to be opened |
| RIG_EINVAL | rig is NULL or unconsistent. | |
| RIG_ENIMPL | port type communication is not implemented yet. |
get the narrow passband of a mode
| rig | The rig handle | |
| mode | The mode to get the passband |
get the normal passband of a mode
| rig | The rig handle | |
| mode | The mode to get the passband |
get the wide passband of a mode
| rig | The rig handle | |
| mode | The mode to get the passband |
conversion utility from relative range to absolute in mW
| 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 |
| rig_model_t rig_probe | ( | hamlib_port_t * | port | ) |
try to guess a rig
| port | A pointer describing a port linking the host to the rig |
| int rig_probe_all | ( | hamlib_port_t * | port, | |
| rig_probe_func_t | cfunc, | |||
| char * | data | |||
| ) |
try to guess rigs
| port | A pointer describing a port linking the host to the rigs | |
| cfunc | Function to be called each time a rig is found | |
| data | Arbitrary data passed to cfunc |
receive DTMF digits
| 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. |
reset the radio
| rig | The rig handle | |
| reset | The reset operation to perform |
perform Memory/VFO operations
| rig | The rig handle | |
| vfo | The target VFO | |
| scan | The scanning operation to perform | |
| ch | Optional channel argument used for the scan. |
send DTMF digits
| rig | The rig handle | |
| vfo | The target VFO | |
| digits | Digits to be send |
send morse code
| rig | The rig handle | |
| vfo | The target VFO | |
| msg | Message to be sent |
set the antenna
| rig | The rig handle | |
| vfo | The target VFO | |
| ant | The anntena to select |
rig_set_ant(rig, RIG_VFO_CURR, RIG_ANT_1); // apply to both TX&RX rig_set_ant(rig, RIG_VFO_RX, RIG_ANT_2);
set the frequency of the target VFO
| rig | The rig handle | |
| vfo | The target VFO | |
| freq | The frequency to set to |
set the mode of the target VFO
| rig | The rig handle | |
| vfo | The target VFO | |
| mode | The mode to set to | |
| width | The passband width to set to |
| int rig_set_powerstat | ( | RIG * | rig, | |
| powerstat_t | status | |||
| ) |
turn on/off the radio
| rig | The rig handle | |
| status | The status to set to |
set PTT on/off
| rig | The rig handle | |
| vfo | The target VFO | |
| ptt | The PTT status to set to |
| int rig_set_rit | ( | RIG * | rig, | |
| vfo_t | vfo, | |||
| shortfreq_t | rit | |||
| ) |
set the RIT
| rig | The rig handle | |
| vfo | The target VFO | |
| rit | The RIT offset to adjust to |
| int rig_set_rptr_offs | ( | RIG * | rig, | |
| vfo_t | vfo, | |||
| shortfreq_t | rptr_offs | |||
| ) |
set the repeater offset
| rig | The rig handle | |
| vfo | The target VFO | |
| rptr_offs | The VFO to set to |
| int rig_set_rptr_shift | ( | RIG * | rig, | |
| vfo_t | vfo, | |||
| rptr_shift_t | rptr_shift | |||
| ) |
set the repeater shift
| rig | The rig handle | |
| vfo | The target VFO | |
| rptr_shift | The repeater shift to set to |
set the split frequencies
| rig | The rig handle | |
| vfo | The target VFO | |
| tx_freq | The transmit split frequency to set to |
set the split modes
| 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 |
set the split mode
| rig | The rig handle | |
| vfo | The target VFO | |
| split | The split mode to set to | |
| tx_vfo | The transmit VFO |
| int rig_set_ts | ( | RIG * | rig, | |
| vfo_t | vfo, | |||
| shortfreq_t | ts | |||
| ) |
set the Tuning Step
| rig | The rig handle | |
| vfo | The target VFO | |
| ts | The tuning step to set to |
set the current VFO
| rig | The rig handle | |
| vfo | The VFO to set to |
| int rig_set_xit | ( | RIG * | rig, | |
| vfo_t | vfo, | |||
| shortfreq_t | xit | |||
| ) |
set the XIT
| rig | The rig handle | |
| vfo | The target VFO | |
| xit | The XIT offset to adjust to |
perform Memory/VFO operations
| rig | The rig handle | |
| vfo | The target VFO | |
| op | The Memory/VFO operation to perform |
| const char* rigerror | ( | int | errnum | ) |
get string describing the error code
| errnum | The error code |
1.5.1