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);
130 void getChannel(
channel_t *chan,
int readOnly);
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;
305 #endif // _RIGCLASS_H