30 class BACKEND_IMPEXP Rig
37 explicit Rig(rig_model_t rig_model);
41 const struct rig_caps *caps;
49 void setConf(
token_t token,
const char *val);
50 void setConf(
const char *name,
const char *val);
51 void getConf(
token_t token,
char *val);
52 void getConf(
const char *name,
char *val);
53 token_t tokenLookup(
const char *name);
81 void getParm(
setting_t parm,
float& valf);
98 const char * getInfo(
void);
121 unsigned int power2mW(
float power,
freq_t freq,
rmode_t mode);
122 float mW2power(
unsigned int mwpower,
freq_t freq,
rmode_t mode);
123 void setTrn(
int trn);
149 void setSplitVFO(
split_t split,
172 virtual int FreqEvent(
vfo_t,
freq_t, rig_ptr_t)
const
180 virtual int VFOEvent(
vfo_t, rig_ptr_t)
const
184 virtual int PTTEvent(
vfo_t,
ptt_t, rig_ptr_t)
const
188 virtual int DCDEvent(
vfo_t,
dcd_t, rig_ptr_t)
const
197 # if ((__GNUG__ <= 2) && (__GNUC_MINOR__ < 8))
204 #if defined(__GNUG__)
205 # if HAVE_BUILTIN_H || HAVE_GXX_BUILTIN_H || HAVE_GPP_BUILTIN_H
206 # if ETIP_NEEDS_MATH_H
207 # if ETIP_NEEDS_MATH_EXCEPTION
209 # define exception math_exception
214 # define exception builtin_exception
215 # if HAVE_GPP_BUILTIN_H
216 # include <gpp/builtin.h>
217 # elif HAVE_GXX_BUILTIN_H
218 # include <g++/builtin.h>
220 # include <builtin.h>
224 #elif defined (__SUNPRO_CC)
225 # include <generic.h>
242 #if !(defined(__GNUG__)||defined(__SUNPRO_CC)||defined(_WIN32))
243 extern "C" void exit(
int);
249 class BACKEND_IMPEXP RigException
255 explicit RigException(
const char *msg,
int err)
256 : message(msg), errorno(err)
259 explicit RigException(
int err)
260 : message(rigerror(err)), errorno(err)
263 explicit RigException(
const char *msg)
267 virtual ~RigException()
272 std::cerr <<
"Rig exception: " << message << std::endl;
274 virtual const char *classname()
const
282 inline void THROW(
const RigException *e)
284 #if defined(__GNUG__)
285 # if ((__GNUG__ <= 2) && (__GNUC_MINOR__ < 8))
286 (*lib_error_handler)(e ? e->classname() :
"", e ? e->message :
"");
290 #elif defined(__SUNPRO_CC)
291 genericerror(1, ((e != 0) ? (
char *)(e->message) :
""));
295 std::cerr << e->message << std::endl;
unsigned int vfo_t
VFO definition.
Definition: rig.h:395
uint64_t rmode_t
Radio mode.
Definition: rig.h:1119
shortfreq_t pbwidth_t
Definition: rig.h:512
split_t
Split mode.
Definition: rig.h:324
rptr_shift_t
Repeater shift type.
Definition: rig.h:314
uint64_t setting_t
Setting.
Definition: rig.h:964
powerstat_t
Radio power state.
Definition: rig.h:574
enum dcd_e dcd_t
DCD status.
scan_t
Rig Scan operation.
Definition: rig.h:636
#define RIG_VFO_CURR
currVFO – current "tunable channel"/VFO
Definition: rig.h:441
double freq_t
Frequency type,.
Definition: rig.h:335
ptt_t
PTT status.
Definition: rig.h:545
#define RIG_PASSBAND_NORMAL
Macro for bandpass to be set to normal.
Definition: rig.h:501
vfo_op_t
VFO operation.
Definition: rig.h:610
signed long shortfreq_t
Short frequency type.
Definition: rig.h:357
unsigned int tone_t
CTCSS and DCS type definition.
Definition: rig.h:201
long token_t
configuration token
Definition: rig.h:652
unsigned int ant_t
Antenna typedef.
Definition: rig.h:773
reset_t
Reset operation.
Definition: rig.h:586
@ RIG_OK
Definition: rig.h:122
@ RIG_EINTERNAL
Definition: rig.h:129
Hamlib rig data structures.
Channel structure.
Definition: rig.h:1327
The Rig structure.
Definition: rig.h:2260
Universal approach for passing values.
Definition: rig.h:828