30 class HAMLIB_CPP_IMPEXP Rig
37 explicit Rig(rig_model_t rig_model);
41 Rig(
const Rig&) =
default;
43 Rig& operator=(
const Rig&) =
default;
44 Rig& operator=(Rig&&) =
default;
46 const struct rig_caps *caps;
54 void setConf(
token_t token,
const char *val);
55 void setConf(
const char *name,
const char *val);
56 void getConf(
token_t token,
char *val);
57 void getConf(
const char *name,
char *val);
58 token_t tokenLookup(
const char *name);
86 void getParm(
setting_t parm,
float& valf);
101 bool hasScan(
scan_t scan);
103 const char * getInfo(
void);
126 unsigned int power2mW(
float power,
freq_t freq,
rmode_t mode);
127 float mW2power(
unsigned int mwpower,
freq_t freq,
rmode_t mode);
128 void setTrn(
int trn);
154 void setSplitVFO(
split_t split,
177 virtual int FreqEvent(
vfo_t,
freq_t, rig_ptr_t)
const
185 virtual int VFOEvent(
vfo_t, rig_ptr_t)
const
189 virtual int PTTEvent(
vfo_t,
ptt_t, rig_ptr_t)
const
193 virtual int DCDEvent(
vfo_t,
dcd_t, rig_ptr_t)
const
202 # if ((__GNUG__ <= 2) && (__GNUC_MINOR__ < 8))
209 #if defined(__GNUG__)
210 # if HAVE_BUILTIN_H || HAVE_GXX_BUILTIN_H || HAVE_GPP_BUILTIN_H
211 # if ETIP_NEEDS_MATH_H
212 # if ETIP_NEEDS_MATH_EXCEPTION
214 # define exception math_exception
219 # define exception builtin_exception
220 # if HAVE_GPP_BUILTIN_H
221 # include <gpp/builtin.h>
222 # elif HAVE_GXX_BUILTIN_H
223 # include <g++/builtin.h>
225 # include <builtin.h>
229 #elif defined (__SUNPRO_CC)
230 # include <generic.h>
247 #if !(defined(__GNUG__)||defined(__SUNPRO_CC)||defined(_WIN32))
248 extern "C" void exit(
int);
254 class HAMLIB_CPP_IMPEXP RigException
260 explicit RigException(
const char *msg,
int err)
261 : message(msg), errorno(err)
264 explicit RigException(
int err)
265 : message(rigerror(err)), errorno(err)
268 explicit RigException(
const char *msg)
272 virtual ~RigException()
277 std::cerr <<
"Rig exception: " << message << std::endl;
279 virtual const char *classname()
const
287 inline void THROW(
const RigException *e)
289 #if defined(__GNUG__)
290 # if ((__GNUG__ <= 2) && (__GNUC_MINOR__ < 8))
291 (*lib_error_handler)(e ? e->classname() :
"", e ? e->message :
"");
295 #elif defined(__SUNPRO_CC)
296 genericerror(1, ((e != 0) ? (
char *)(e->message) :
""));
300 std::cerr << e->message << std::endl;
unsigned int vfo_t
VFO definition.
Definition: rig.h:413
uint64_t rmode_t
Radio mode.
Definition: rig.h:1147
shortfreq_t pbwidth_t
Definition: rig.h:540
split_t
Split mode.
Definition: rig.h:342
rptr_shift_t
Repeater shift type.
Definition: rig.h:332
uint64_t setting_t
Setting.
Definition: rig.h:992
powerstat_t
Radio power state.
Definition: rig.h:602
enum dcd_e dcd_t
DCD status.
scan_t
Rig Scan operation.
Definition: rig.h:664
#define RIG_VFO_CURR
currVFO – current "tunable channel"/VFO
Definition: rig.h:465
double freq_t
Frequency type,.
Definition: rig.h:353
ptt_t
PTT status.
Definition: rig.h:573
#define RIG_PASSBAND_NORMAL
Macro for bandpass to be set to normal.
Definition: rig.h:529
vfo_op_t
VFO operation.
Definition: rig.h:638
signed long shortfreq_t
Short frequency type.
Definition: rig.h:375
long token_t
configuration token
Definition: rig.h:680
unsigned int ant_t
Antenna typedef.
Definition: rig.h:801
reset_t
Reset operation.
Definition: rig.h:614
@ RIG_OK
Definition: rig.h:123
@ RIG_EINTERNAL
Definition: rig.h:130
Hamlib rig data structures.
Channel structure.
Definition: rig.h:1355
The Rig structure.
Definition: rig.h:2330
Universal approach for passing values.
Definition: rig.h:856