Apply formatting to 'include/' directory.

Format public and private header files per new formatting guide.
pull/1/head
Nate Bargmann 2017-08-07 08:04:25 -05:00
rodzic f76b354588
commit cedd914e68
10 zmienionych plików z 2348 dodań i 1610 usunięć

Wyświetl plik

@ -33,13 +33,13 @@
* *
* As a reminder: * As a reminder:
* struct freq_range_list { * struct freq_range_list {
* freq_t start; * freq_t start;
* freq_t end; * freq_t end;
* rmode_t modes; * rmode_t modes;
* int low_power; * int low_power;
* int high_power; * int high_power;
* vfo_t vfo; * vfo_t vfo;
* ant_t ant; * ant_t ant;
* }; * };
*/ */
@ -50,49 +50,49 @@
/* MF: 300 kHz - 3 MHz */ /* MF: 300 kHz - 3 MHz */
#define FRQ_RNG_160m_REGION1(md,lp,hp,v,a) \ #define FRQ_RNG_160m_REGION1(md,lp,hp,v,a) \
{ kHz(1810), MHz(2), (md), (lp), (hp), (v), (a) } { kHz(1810), MHz(2), (md), (lp), (hp), (v), (a) }
/* HF: 3 MHz - 30 MHz */ /* HF: 3 MHz - 30 MHz */
#define FRQ_RNG_80m_REGION1(md,lp,hp,v,a) \ #define FRQ_RNG_80m_REGION1(md,lp,hp,v,a) \
{ kHz(3500),kHz(3800), (md), (lp), (hp), (v), (a) } { kHz(3500),kHz(3800), (md), (lp), (hp), (v), (a) }
#define FRQ_RNG_40m_REGION1(md,lp,hp,v,a) \ #define FRQ_RNG_40m_REGION1(md,lp,hp,v,a) \
{ MHz(7),kHz(7100), (md), (lp), (hp), (v), (a) } { MHz(7),kHz(7100), (md), (lp), (hp), (v), (a) }
#define FRQ_RNG_30m_REGION1(md,lp,hp,v,a) \ #define FRQ_RNG_30m_REGION1(md,lp,hp,v,a) \
{ kHz(10100),kHz(10150), (md), (lp), (hp), (v), (a) } { kHz(10100),kHz(10150), (md), (lp), (hp), (v), (a) }
#define FRQ_RNG_20m_REGION1(md,lp,hp,v,a) \ #define FRQ_RNG_20m_REGION1(md,lp,hp,v,a) \
{ MHz(14),kHz(14350), (md), (lp), (hp), (v), (a) } { MHz(14),kHz(14350), (md), (lp), (hp), (v), (a) }
#define FRQ_RNG_17m_REGION1(md,lp,hp,v,a) \ #define FRQ_RNG_17m_REGION1(md,lp,hp,v,a) \
{ kHz(18068),kHz(18168), (md), (lp), (hp), (v), (a) } { kHz(18068),kHz(18168), (md), (lp), (hp), (v), (a) }
#define FRQ_RNG_15m_REGION1(md,lp,hp,v,a) \ #define FRQ_RNG_15m_REGION1(md,lp,hp,v,a) \
{ MHz(21),kHz(21450), (md), (lp), (hp), (v), (a) } { MHz(21),kHz(21450), (md), (lp), (hp), (v), (a) }
#define FRQ_RNG_12m_REGION1(md,lp,hp,v,a) \ #define FRQ_RNG_12m_REGION1(md,lp,hp,v,a) \
{ kHz(24890),kHz(24990), (md), (lp), (hp), (v), (a) } { kHz(24890),kHz(24990), (md), (lp), (hp), (v), (a) }
#define FRQ_RNG_10m_REGION1(md,lp,hp,v,a) \ #define FRQ_RNG_10m_REGION1(md,lp,hp,v,a) \
{ MHz(28),kHz(29700), (md), (lp), (hp), (v), (a) } { MHz(28),kHz(29700), (md), (lp), (hp), (v), (a) }
/* VHF: 30 MHz - 300 MHz */ /* VHF: 30 MHz - 300 MHz */
#define FRQ_RNG_6m_REGION1(md,lp,hp,v,a) \ #define FRQ_RNG_6m_REGION1(md,lp,hp,v,a) \
{ kHz(50200),kHz(51200), (md), (lp), (hp), (v), (a) } { kHz(50200),kHz(51200), (md), (lp), (hp), (v), (a) }
#define FRQ_RNG_2m_REGION1(md,lp,hp,v,a) \ #define FRQ_RNG_2m_REGION1(md,lp,hp,v,a) \
{ MHz(144),MHz(146), (md), (lp), (hp), (v), (a) } { MHz(144),MHz(146), (md), (lp), (hp), (v), (a) }
/* UHF: 300 MHz - 3 GHz */ /* UHF: 300 MHz - 3 GHz */
#define FRQ_RNG_70cm_REGION1(md,lp,hp,v,a) \ #define FRQ_RNG_70cm_REGION1(md,lp,hp,v,a) \
{ MHz(430),MHz(440), (md), (lp), (hp), (v), (a) } { MHz(430),MHz(440), (md), (lp), (hp), (v), (a) }
#define FRQ_RNG_23cm_REGION1(md,lp,hp,v,a) \ #define FRQ_RNG_23cm_REGION1(md,lp,hp,v,a) \
{ MHz(1240),MHz(1300), (md), (lp), (hp), (v), (a) } { MHz(1240),MHz(1300), (md), (lp), (hp), (v), (a) }
#define FRQ_RNG_13cm_REGION1(md,lp,hp,v,a) \ #define FRQ_RNG_13cm_REGION1(md,lp,hp,v,a) \
{ MHz(2300),MHz(2450), (md), (lp), (hp), (v), (a) } { MHz(2300),MHz(2450), (md), (lp), (hp), (v), (a) }
/* /*
@ -101,49 +101,49 @@
/* MF: 300 kHz - 3 MHz */ /* MF: 300 kHz - 3 MHz */
#define FRQ_RNG_160m_REGION2(md,lp,hp,v,a) \ #define FRQ_RNG_160m_REGION2(md,lp,hp,v,a) \
{ kHz(1800),MHz(2), (md), (lp), (hp), (v), (a) } { kHz(1800),MHz(2), (md), (lp), (hp), (v), (a) }
/* HF: 3 MHz - 30 MHz */ /* HF: 3 MHz - 30 MHz */
#define FRQ_RNG_80m_REGION2(md,lp,hp,v,a) \ #define FRQ_RNG_80m_REGION2(md,lp,hp,v,a) \
{ kHz(3500),MHz(4), (md), (lp), (hp), (v), (a) } { kHz(3500),MHz(4), (md), (lp), (hp), (v), (a) }
#define FRQ_RNG_40m_REGION2(md,lp,hp,v,a) \ #define FRQ_RNG_40m_REGION2(md,lp,hp,v,a) \
{ MHz(7),kHz(7300), (md), (lp), (hp), (v), (a) } { MHz(7),kHz(7300), (md), (lp), (hp), (v), (a) }
#define FRQ_RNG_30m_REGION2(md,lp,hp,v,a) \ #define FRQ_RNG_30m_REGION2(md,lp,hp,v,a) \
{ kHz(10100),kHz(10150), (md), (lp), (hp), (v), (a) } { kHz(10100),kHz(10150), (md), (lp), (hp), (v), (a) }
#define FRQ_RNG_20m_REGION2(md,lp,hp,v,a) \ #define FRQ_RNG_20m_REGION2(md,lp,hp,v,a) \
{ MHz(14),kHz(14350), (md), (lp), (hp), (v), (a) } { MHz(14),kHz(14350), (md), (lp), (hp), (v), (a) }
#define FRQ_RNG_17m_REGION2(md,lp,hp,v,a) \ #define FRQ_RNG_17m_REGION2(md,lp,hp,v,a) \
{ kHz(18068),kHz(18168), (md), (lp), (hp), (v), (a) } { kHz(18068),kHz(18168), (md), (lp), (hp), (v), (a) }
#define FRQ_RNG_15m_REGION2(md,lp,hp,v,a) \ #define FRQ_RNG_15m_REGION2(md,lp,hp,v,a) \
{ MHz(21),kHz(21450), (md), (lp), (hp), (v), (a) } { MHz(21),kHz(21450), (md), (lp), (hp), (v), (a) }
#define FRQ_RNG_12m_REGION2(md,lp,hp,v,a) \ #define FRQ_RNG_12m_REGION2(md,lp,hp,v,a) \
{ kHz(24890),kHz(24990), (md), (lp), (hp), (v), (a) } { kHz(24890),kHz(24990), (md), (lp), (hp), (v), (a) }
#define FRQ_RNG_10m_REGION2(md,lp,hp,v,a) \ #define FRQ_RNG_10m_REGION2(md,lp,hp,v,a) \
{ MHz(28),kHz(29700), (md), (lp), (hp), (v), (a) } { MHz(28),kHz(29700), (md), (lp), (hp), (v), (a) }
/* VHF: 30 MHz - 300 MHz */ /* VHF: 30 MHz - 300 MHz */
#define FRQ_RNG_6m_REGION2(md,lp,hp,v,a) \ #define FRQ_RNG_6m_REGION2(md,lp,hp,v,a) \
{ MHz(50),MHz(54), (md), (lp), (hp), (v), (a) } { MHz(50),MHz(54), (md), (lp), (hp), (v), (a) }
#define FRQ_RNG_2m_REGION2(md,lp,hp,v,a) \ #define FRQ_RNG_2m_REGION2(md,lp,hp,v,a) \
{ MHz(144),MHz(148), (md), (lp), (hp), (v), (a) } { MHz(144),MHz(148), (md), (lp), (hp), (v), (a) }
/* UHF: 300 MHz - 3 GHz */ /* UHF: 300 MHz - 3 GHz */
#define FRQ_RNG_70cm_REGION2(md,lp,hp,v,a) \ #define FRQ_RNG_70cm_REGION2(md,lp,hp,v,a) \
{ MHz(430),MHz(440), (md), (lp), (hp), (v), (a) } { MHz(430),MHz(440), (md), (lp), (hp), (v), (a) }
#define FRQ_RNG_23cm_REGION2(md,lp,hp,v,a) \ #define FRQ_RNG_23cm_REGION2(md,lp,hp,v,a) \
{ MHz(1240),MHz(1300), (md), (lp), (hp), (v), (a) } { MHz(1240),MHz(1300), (md), (lp), (hp), (v), (a) }
#define FRQ_RNG_13cm_REGION2(md,lp,hp,v,a) \ #define FRQ_RNG_13cm_REGION2(md,lp,hp,v,a) \
{ MHz(2320),MHz(2450), (md), (lp), (hp), (v), (a) } { MHz(2320),MHz(2450), (md), (lp), (hp), (v), (a) }
/* /*
* ITU Region 3: South Pacific and Southern Asia * ITU Region 3: South Pacific and Southern Asia
@ -151,49 +151,49 @@
/* MF: 300 kHz - 3 MHz */ /* MF: 300 kHz - 3 MHz */
#define FRQ_RNG_160m_REGION3(md,lp,hp,v,a) \ #define FRQ_RNG_160m_REGION3(md,lp,hp,v,a) \
{ kHz(1810),MHz(2), (md), (lp), (hp), (v), (a) } { kHz(1810),MHz(2), (md), (lp), (hp), (v), (a) }
/* HF: 3 MHz - 30 MHz */ /* HF: 3 MHz - 30 MHz */
#define FRQ_RNG_80m_REGION3(md,lp,hp,v,a) \ #define FRQ_RNG_80m_REGION3(md,lp,hp,v,a) \
{ kHz(3500),kHz(3900), (md), (lp), (hp), (v), (a) } { kHz(3500),kHz(3900), (md), (lp), (hp), (v), (a) }
#define FRQ_RNG_40m_REGION3(md,lp,hp,v,a) \ #define FRQ_RNG_40m_REGION3(md,lp,hp,v,a) \
{ MHz(7),kHz(7100), (md), (lp), (hp), (v), (a) } { MHz(7),kHz(7100), (md), (lp), (hp), (v), (a) }
#define FRQ_RNG_30m_REGION3(md,lp,hp,v,a) \ #define FRQ_RNG_30m_REGION3(md,lp,hp,v,a) \
{ kHz(10100),kHz(10150), (md), (lp), (hp), (v), (a) } { kHz(10100),kHz(10150), (md), (lp), (hp), (v), (a) }
#define FRQ_RNG_20m_REGION3(md,lp,hp,v,a) \ #define FRQ_RNG_20m_REGION3(md,lp,hp,v,a) \
{ MHz(14),kHz(14350), (md), (lp), (hp), (v), (a) } { MHz(14),kHz(14350), (md), (lp), (hp), (v), (a) }
#define FRQ_RNG_17m_REGION3(md,lp,hp,v,a) \ #define FRQ_RNG_17m_REGION3(md,lp,hp,v,a) \
{ kHz(18068),kHz(18168), (md), (lp), (hp), (v), (a) } { kHz(18068),kHz(18168), (md), (lp), (hp), (v), (a) }
#define FRQ_RNG_15m_REGION3(md,lp,hp,v,a) \ #define FRQ_RNG_15m_REGION3(md,lp,hp,v,a) \
{ MHz(21),kHz(21450), (md), (lp), (hp), (v), (a) } { MHz(21),kHz(21450), (md), (lp), (hp), (v), (a) }
#define FRQ_RNG_12m_REGION3(md,lp,hp,v,a) \ #define FRQ_RNG_12m_REGION3(md,lp,hp,v,a) \
{ kHz(24890),kHz(24990), (md), (lp), (hp), (v), (a) } { kHz(24890),kHz(24990), (md), (lp), (hp), (v), (a) }
#define FRQ_RNG_10m_REGION3(md,lp,hp,v,a) \ #define FRQ_RNG_10m_REGION3(md,lp,hp,v,a) \
{ MHz(28),kHz(29700), (md), (lp), (hp), (v), (a) } { MHz(28),kHz(29700), (md), (lp), (hp), (v), (a) }
/* VHF: 30 MHz - 300 MHz */ /* VHF: 30 MHz - 300 MHz */
#define FRQ_RNG_6m_REGION3(md,lp,hp,v,a) \ #define FRQ_RNG_6m_REGION3(md,lp,hp,v,a) \
{ MHz(50),MHz(54), (md), (lp), (hp), (v), (a) } { MHz(50),MHz(54), (md), (lp), (hp), (v), (a) }
#define FRQ_RNG_2m_REGION3(md,lp,hp,v,a) \ #define FRQ_RNG_2m_REGION3(md,lp,hp,v,a) \
{ MHz(144),MHz(148), (md), (lp), (hp), (v), (a) } { MHz(144),MHz(148), (md), (lp), (hp), (v), (a) }
/* UHF: 300 MHz - 3 GHz */ /* UHF: 300 MHz - 3 GHz */
#define FRQ_RNG_70cm_REGION3(md,lp,hp,v,a) \ #define FRQ_RNG_70cm_REGION3(md,lp,hp,v,a) \
{ MHz(430),MHz(440), (md), (lp), (hp), (v), (a) } { MHz(430),MHz(440), (md), (lp), (hp), (v), (a) }
#define FRQ_RNG_23cm_REGION3(md,lp,hp,v,a) \ #define FRQ_RNG_23cm_REGION3(md,lp,hp,v,a) \
{ MHz(1240),MHz(1300), (md), (lp), (hp), (v), (a) } { MHz(1240),MHz(1300), (md), (lp), (hp), (v), (a) }
#define FRQ_RNG_13cm_REGION3(md,lp,hp,v,a) \ #define FRQ_RNG_13cm_REGION3(md,lp,hp,v,a) \
{ MHz(2320),MHz(2450), (md), (lp), (hp), (v), (a) } { MHz(2320),MHz(2450), (md), (lp), (hp), (v), (a) }
/* /*
@ -201,28 +201,28 @@
* Let's define FRQ_RNG_HF for REGION1, FRQ_RNG_HF_REGION2, * Let's define FRQ_RNG_HF for REGION1, FRQ_RNG_HF_REGION2,
* and FRQ_RNG_HF_REGION3 all at once! * and FRQ_RNG_HF_REGION3 all at once!
* NB: FRQ_RNG_HF defines non-AM/AM freq_range for all HF bands, * NB: FRQ_RNG_HF defines non-AM/AM freq_range for all HF bands,
* plus 160m which is not an HF band strictly speaking. * plus 160m which is not an HF band strictly speaking.
*/ */
#define FRQ_RNG_HF(r,m,lp,hp,v,a) \ #define FRQ_RNG_HF(r,m,lp,hp,v,a) \
FRQ_RNG_160m_REGION##r((m), (lp), (hp), (v), (a)), \ FRQ_RNG_160m_REGION##r((m), (lp), (hp), (v), (a)), \
FRQ_RNG_80m_REGION##r((m), (lp), (hp), (v), (a)), \ FRQ_RNG_80m_REGION##r((m), (lp), (hp), (v), (a)), \
FRQ_RNG_40m_REGION##r((m), (lp), (hp), (v), (a)), \ FRQ_RNG_40m_REGION##r((m), (lp), (hp), (v), (a)), \
FRQ_RNG_30m_REGION##r((m), (lp), (hp), (v), (a)), \ FRQ_RNG_30m_REGION##r((m), (lp), (hp), (v), (a)), \
FRQ_RNG_20m_REGION##r((m), (lp), (hp), (v), (a)), \ FRQ_RNG_20m_REGION##r((m), (lp), (hp), (v), (a)), \
FRQ_RNG_17m_REGION##r((m), (lp), (hp), (v), (a)), \ FRQ_RNG_17m_REGION##r((m), (lp), (hp), (v), (a)), \
FRQ_RNG_15m_REGION##r((m), (lp), (hp), (v), (a)), \ FRQ_RNG_15m_REGION##r((m), (lp), (hp), (v), (a)), \
FRQ_RNG_12m_REGION##r((m), (lp), (hp), (v), (a)), \ FRQ_RNG_12m_REGION##r((m), (lp), (hp), (v), (a)), \
FRQ_RNG_10m_REGION##r((m), (lp), (hp), (v), (a)) \ FRQ_RNG_10m_REGION##r((m), (lp), (hp), (v), (a)) \
#define FRQ_RNG_6m(r,m,lp,hp,v,a) \ #define FRQ_RNG_6m(r,m,lp,hp,v,a) \
FRQ_RNG_6m_REGION##r((m), (lp), (hp), (v), (a)) \ FRQ_RNG_6m_REGION##r((m), (lp), (hp), (v), (a)) \
#define FRQ_RNG_2m(r,m,lp,hp,v,a) \ #define FRQ_RNG_2m(r,m,lp,hp,v,a) \
FRQ_RNG_2m_REGION##r((m), (lp), (hp), (v), (a)) \ FRQ_RNG_2m_REGION##r((m), (lp), (hp), (v), (a)) \
#define FRQ_RNG_70cm(r,m,lp,hp,v,a) \ #define FRQ_RNG_70cm(r,m,lp,hp,v,a) \
FRQ_RNG_70cm_REGION##r((m), (lp), (hp), (v), (a)) \ FRQ_RNG_70cm_REGION##r((m), (lp), (hp), (v), (a)) \
#endif /* _BANDPLAN_H */
#endif /* _BANDPLAN_H */

Plik diff jest za duży Load Diff

Wyświetl plik

@ -42,15 +42,15 @@
# undef HAMLIB_DLL_EXPORT # undef HAMLIB_DLL_EXPORT
# if defined (__BORLANDC__) # if defined (__BORLANDC__)
# define HAMLIB_DLL_IMPORT __import # define HAMLIB_DLL_IMPORT __import
# define HAMLIB_DLL_EXPORT __export # define HAMLIB_DLL_EXPORT __export
# else # else
# define HAMLIB_DLL_IMPORT __declspec(dllimport) # define HAMLIB_DLL_IMPORT __declspec(dllimport)
# define HAMLIB_DLL_EXPORT __declspec(dllexport) # define HAMLIB_DLL_EXPORT __declspec(dllexport)
# endif # endif
# ifdef DLL_EXPORT # ifdef DLL_EXPORT
/* HAMLIB_API may be set to __stdcall for VB, .. */ /* HAMLIB_API may be set to __stdcall for VB, .. */
# define HAMLIB_API __cdecl # define HAMLIB_API __cdecl
# ifdef IN_HAMLIB # ifdef IN_HAMLIB
# define BACKEND_IMPEXP HAMLIB_DLL_EXPORT # define BACKEND_IMPEXP HAMLIB_DLL_EXPORT
@ -60,8 +60,8 @@
# define HAMLIB_IMPEXP HAMLIB_DLL_IMPORT # define HAMLIB_IMPEXP HAMLIB_DLL_IMPORT
# endif # endif
# else # else
/* static build, only export the backend entry points for lt_dlsym */ /* static build, only export the backend entry points for lt_dlsym */
# define BACKEND_IMPEXP HAMLIB_DLL_EXPORT # define BACKEND_IMPEXP HAMLIB_DLL_EXPORT
# endif # endif
#endif #endif
@ -88,5 +88,3 @@
#if !defined(BACKEND_EXPORT_VAR) #if !defined(BACKEND_EXPORT_VAR)
# define BACKEND_EXPORT_VAR(type) BACKEND_IMPEXP type # define BACKEND_EXPORT_VAR(type) BACKEND_IMPEXP type
#endif #endif

Wyświetl plik

@ -26,156 +26,171 @@
#include <iostream> #include <iostream>
class BACKEND_IMPEXP Rig { class BACKEND_IMPEXP Rig
{
private: private:
RIG* theRig; // Global ref. to the rig RIG *theRig; // Global ref. to the rig
protected: protected:
public: public:
Rig(rig_model_t rig_model); Rig(rig_model_t rig_model);
virtual ~Rig(); virtual ~Rig();
const struct rig_caps *caps; const struct rig_caps *caps;
// This method open the communication port to the rig // This method opens the communication port to the rig
void open(void); void open(void);
// This method close the communication port to the rig // This method closes the communication port to the rig
void close(void); void close(void);
void setConf(token_t token, const char *val); void setConf(token_t token, const char *val);
void setConf(const char *name, const char *val); void setConf(const char *name, const char *val);
void getConf(token_t token, char *val); void getConf(token_t token, char *val);
void getConf(const char *name, char *val); void getConf(const char *name, char *val);
token_t tokenLookup(const char *name); token_t tokenLookup(const char *name);
void setFreq(freq_t freq, vfo_t vfo = RIG_VFO_CURR); void setFreq(freq_t freq, vfo_t vfo = RIG_VFO_CURR);
freq_t getFreq(vfo_t vfo = RIG_VFO_CURR); freq_t getFreq(vfo_t vfo = RIG_VFO_CURR);
void setMode(rmode_t, pbwidth_t width = RIG_PASSBAND_NORMAL, vfo_t vfo = RIG_VFO_CURR); void setMode(rmode_t,
rmode_t getMode(pbwidth_t&, vfo_t vfo = RIG_VFO_CURR); pbwidth_t width = RIG_PASSBAND_NORMAL,
void setVFO(vfo_t); vfo_t vfo = RIG_VFO_CURR);
vfo_t getVFO();
void setPTT (ptt_t ptt, vfo_t vfo = RIG_VFO_CURR); rmode_t getMode(pbwidth_t&, vfo_t vfo = RIG_VFO_CURR);
ptt_t getPTT (vfo_t vfo = RIG_VFO_CURR); void setVFO(vfo_t);
dcd_t getDCD (vfo_t vfo = RIG_VFO_CURR); vfo_t getVFO();
void setLevel(setting_t level, int vali, vfo_t vfo = RIG_VFO_CURR); void setPTT(ptt_t ptt, vfo_t vfo = RIG_VFO_CURR);
void setLevel(setting_t level, float valf, vfo_t vfo = RIG_VFO_CURR); ptt_t getPTT(vfo_t vfo = RIG_VFO_CURR);
void getLevel(setting_t level, int& vali, vfo_t vfo = RIG_VFO_CURR); dcd_t getDCD(vfo_t vfo = RIG_VFO_CURR);
void getLevel(setting_t level, float& valf, vfo_t vfo = RIG_VFO_CURR);
int getLevelI(setting_t level, vfo_t vfo = RIG_VFO_CURR);
float getLevelF(setting_t level, vfo_t vfo = RIG_VFO_CURR);
bool hasGetLevel (setting_t level);
bool hasSetLevel (setting_t level);
void setParm(setting_t parm, int vali); void setLevel(setting_t level, int vali, vfo_t vfo = RIG_VFO_CURR);
void setParm(setting_t parm, float valf); void setLevel(setting_t level, float valf, vfo_t vfo = RIG_VFO_CURR);
void getParm(setting_t parm, int& vali); void getLevel(setting_t level, int& vali, vfo_t vfo = RIG_VFO_CURR);
void getParm(setting_t parm, float& valf); void getLevel(setting_t level, float& valf, vfo_t vfo = RIG_VFO_CURR);
int getParmI(setting_t parm); int getLevelI(setting_t level, vfo_t vfo = RIG_VFO_CURR);
float getParmF(setting_t parm); float getLevelF(setting_t level, vfo_t vfo = RIG_VFO_CURR);
bool hasGetParm (setting_t parm); bool hasGetLevel(setting_t level);
bool hasSetParm (setting_t parm); bool hasSetLevel(setting_t level);
void setFunc (setting_t func, bool status, vfo_t vfo = RIG_VFO_CURR); void setParm(setting_t parm, int vali);
bool getFunc (setting_t func, vfo_t vfo = RIG_VFO_CURR); void setParm(setting_t parm, float valf);
bool hasGetFunc (setting_t func); void getParm(setting_t parm, int& vali);
bool hasSetFunc (setting_t func); void getParm(setting_t parm, float& valf);
int getParmI(setting_t parm);
float getParmF(setting_t parm);
bool hasGetParm(setting_t parm);
bool hasSetParm(setting_t parm);
void VFOop(vfo_op_t op, vfo_t vfo = RIG_VFO_CURR); void setFunc(setting_t func, bool status, vfo_t vfo = RIG_VFO_CURR);
bool hasVFOop (vfo_op_t op); bool getFunc(setting_t func, vfo_t vfo = RIG_VFO_CURR);
bool hasGetFunc(setting_t func);
bool hasSetFunc(setting_t func);
void scan(scan_t scan, int ch, vfo_t vfo = RIG_VFO_CURR); void VFOop(vfo_op_t op, vfo_t vfo = RIG_VFO_CURR);
bool hasScan (scan_t scan); bool hasVFOop(vfo_op_t op);
const char *getInfo (void); void scan(scan_t scan, int ch, vfo_t vfo = RIG_VFO_CURR);
pbwidth_t passbandNormal (rmode_t); bool hasScan(scan_t scan);
pbwidth_t passbandNarrow (rmode_t);
pbwidth_t passbandWide (rmode_t);
void setRptrShift (rptr_shift_t rptr_shift, vfo_t vfo = RIG_VFO_CURR); const char * getInfo(void);
rptr_shift_t getRptrShift (vfo_t vfo = RIG_VFO_CURR); pbwidth_t passbandNormal(rmode_t);
void setRptrOffs (shortfreq_t rptr_offs, vfo_t vfo = RIG_VFO_CURR); pbwidth_t passbandNarrow(rmode_t);
shortfreq_t getRptrOffs (vfo_t vfo = RIG_VFO_CURR); pbwidth_t passbandWide(rmode_t);
void setTs (shortfreq_t ts, vfo_t vfo = RIG_VFO_CURR);
shortfreq_t getTs (vfo_t vfo = RIG_VFO_CURR);
void setCTCSS (tone_t tone, vfo_t vfo = RIG_VFO_CURR); void setRptrShift(rptr_shift_t rptr_shift, vfo_t vfo = RIG_VFO_CURR);
tone_t getCTCSS (vfo_t vfo = RIG_VFO_CURR); rptr_shift_t getRptrShift(vfo_t vfo = RIG_VFO_CURR);
void setDCS (tone_t code, vfo_t vfo = RIG_VFO_CURR); void setRptrOffs(shortfreq_t rptr_offs, vfo_t vfo = RIG_VFO_CURR);
tone_t getDCS (vfo_t vfo = RIG_VFO_CURR); shortfreq_t getRptrOffs(vfo_t vfo = RIG_VFO_CURR);
void setTs(shortfreq_t ts, vfo_t vfo = RIG_VFO_CURR);
shortfreq_t getTs(vfo_t vfo = RIG_VFO_CURR);
void setCTCSSsql (tone_t tone, vfo_t vfo = RIG_VFO_CURR); void setCTCSS(tone_t tone, vfo_t vfo = RIG_VFO_CURR);
tone_t getCTCSSsql (vfo_t vfo = RIG_VFO_CURR); tone_t getCTCSS(vfo_t vfo = RIG_VFO_CURR);
void setDCSsql (tone_t tone, vfo_t vfo = RIG_VFO_CURR); void setDCS(tone_t code, vfo_t vfo = RIG_VFO_CURR);
tone_t getDCSsql (vfo_t vfo = RIG_VFO_CURR); tone_t getDCS(vfo_t vfo = RIG_VFO_CURR);
void setCTCSSsql(tone_t tone, vfo_t vfo = RIG_VFO_CURR);
tone_t getCTCSSsql(vfo_t vfo = RIG_VFO_CURR);
void setDCSsql(tone_t tone, vfo_t vfo = RIG_VFO_CURR);
tone_t getDCSsql(vfo_t vfo = RIG_VFO_CURR);
unsigned int power2mW (float power, freq_t freq, rmode_t mode); unsigned int power2mW(float power, freq_t freq, rmode_t mode);
float mW2power (unsigned int mwpower, freq_t freq, rmode_t mode); float mW2power(unsigned int mwpower, freq_t freq, rmode_t mode);
void setTrn (int trn); void setTrn(int trn);
int getTrn (void); int getTrn(void);
void setBank (int bank, vfo_t vfo = RIG_VFO_CURR); void setBank(int bank, vfo_t vfo = RIG_VFO_CURR);
void setMem (int ch, vfo_t vfo = RIG_VFO_CURR); void setMem(int ch, vfo_t vfo = RIG_VFO_CURR);
int getMem (vfo_t vfo = RIG_VFO_CURR); int getMem(vfo_t vfo = RIG_VFO_CURR);
void setChannel (const channel_t *chan); void setChannel(const channel_t *chan);
void getChannel (channel_t *chan); void getChannel(channel_t *chan);
void setPowerStat (powerstat_t status); void setPowerStat(powerstat_t status);
powerstat_t getPowerStat (void); powerstat_t getPowerStat(void);
rmode_t RngRxModes (freq_t freq); rmode_t RngRxModes(freq_t freq);
rmode_t RngTxModes (freq_t freq); rmode_t RngTxModes(freq_t freq);
void setSplitFreq (freq_t tx_freq, vfo_t vfo = RIG_VFO_CURR); void setSplitFreq(freq_t tx_freq, vfo_t vfo = RIG_VFO_CURR);
freq_t getSplitFreq (vfo_t vfo = RIG_VFO_CURR); freq_t getSplitFreq(vfo_t vfo = RIG_VFO_CURR);
void setSplitMode(rmode_t, pbwidth_t width = RIG_PASSBAND_NORMAL, vfo_t vfo = RIG_VFO_CURR); void setSplitMode(rmode_t,
rmode_t getSplitMode(pbwidth_t&, vfo_t vfo = RIG_VFO_CURR); pbwidth_t width = RIG_PASSBAND_NORMAL,
void setSplitFreqMode(freq_t, rmode_t, pbwidth_t width = RIG_PASSBAND_NORMAL, vfo_t vfo = RIG_VFO_CURR); vfo_t vfo = RIG_VFO_CURR);
freq_t getSplitFreqMode(rmode_t&, pbwidth_t&, vfo_t vfo = RIG_VFO_CURR);
void setSplitVFO(split_t split, vfo_t vfo = RIG_VFO_CURR, vfo_t tx_vfo = RIG_VFO_CURR);
split_t getSplitVFO(vfo_t &tx_vfo, vfo_t vfo = RIG_VFO_CURR);
void setRit (shortfreq_t rit, vfo_t vfo = RIG_VFO_CURR); rmode_t getSplitMode(pbwidth_t&, vfo_t vfo = RIG_VFO_CURR);
shortfreq_t getRit (vfo_t vfo = RIG_VFO_CURR); void setSplitFreqMode(freq_t, rmode_t,
void setXit (shortfreq_t xit, vfo_t vfo = RIG_VFO_CURR); pbwidth_t width = RIG_PASSBAND_NORMAL,
shortfreq_t getXit (vfo_t vfo = RIG_VFO_CURR); vfo_t vfo = RIG_VFO_CURR);
void setAnt (ant_t ant, vfo_t vfo = RIG_VFO_CURR); freq_t getSplitFreqMode(rmode_t&, pbwidth_t&, vfo_t vfo = RIG_VFO_CURR);
ant_t getAnt (vfo_t vfo = RIG_VFO_CURR); void setSplitVFO(split_t split,
vfo_t vfo = RIG_VFO_CURR,
vfo_t tx_vfo = RIG_VFO_CURR);
void sendDtmf (const char *digits, vfo_t vfo = RIG_VFO_CURR); split_t getSplitVFO(vfo_t& tx_vfo, vfo_t vfo = RIG_VFO_CURR);
int recvDtmf (char *digits, vfo_t vfo = RIG_VFO_CURR);
void sendMorse (const char *msg, vfo_t vfo = RIG_VFO_CURR); void setRit(shortfreq_t rit, vfo_t vfo = RIG_VFO_CURR);
shortfreq_t getRit(vfo_t vfo = RIG_VFO_CURR);
void setXit(shortfreq_t xit, vfo_t vfo = RIG_VFO_CURR);
shortfreq_t getXit(vfo_t vfo = RIG_VFO_CURR);
void setAnt(ant_t ant, vfo_t vfo = RIG_VFO_CURR);
ant_t getAnt(vfo_t vfo = RIG_VFO_CURR);
void sendDtmf(const char *digits, vfo_t vfo = RIG_VFO_CURR);
int recvDtmf(char *digits, vfo_t vfo = RIG_VFO_CURR);
void sendMorse(const char *msg, vfo_t vfo = RIG_VFO_CURR);
shortfreq_t getResolution (rmode_t mode); shortfreq_t getResolution(rmode_t mode);
void reset (reset_t reset); void reset(reset_t reset);
// callbacks available in your derived object
virtual int FreqEvent(vfo_t, freq_t, rig_ptr_t) const {
return RIG_OK;
}
virtual int ModeEvent(vfo_t, rmode_t, pbwidth_t, rig_ptr_t) const {
return RIG_OK;
}
virtual int VFOEvent(vfo_t, rig_ptr_t) const {
return RIG_OK;
}
virtual int PTTEvent(vfo_t, ptt_t, rig_ptr_t) const {
return RIG_OK;
}
virtual int DCDEvent(vfo_t, dcd_t, rig_ptr_t) const {
return RIG_OK;
}
// callbacks available in your derived object
virtual int FreqEvent(vfo_t, freq_t, rig_ptr_t) const
{
return RIG_OK;
}
virtual int ModeEvent(vfo_t, rmode_t, pbwidth_t, rig_ptr_t) const
{
return RIG_OK;
}
virtual int VFOEvent(vfo_t, rig_ptr_t) const
{
return RIG_OK;
}
virtual int PTTEvent(vfo_t, ptt_t, rig_ptr_t) const
{
return RIG_OK;
}
virtual int DCDEvent(vfo_t, dcd_t, rig_ptr_t) const
{
return RIG_OK;
}
}; };
#ifdef __GNUG__ #ifdef __GNUG__
# if ((__GNUG__ <= 2) && (__GNUC_MINOR__ < 8)) # if ((__GNUG__ <= 2) && (__GNUC_MINOR__ < 8))
# if HAVE_TYPEINFO # if HAVE_TYPEINFO
@ -196,11 +211,11 @@ public:
# undef exception # undef exception
# define exception builtin_exception # define exception builtin_exception
# if HAVE_GPP_BUILTIN_H # if HAVE_GPP_BUILTIN_H
# include <gpp/builtin.h> # include <gpp/builtin.h>
# elif HAVE_GXX_BUILTIN_H # elif HAVE_GXX_BUILTIN_H
# include <g++/builtin.h> # include <g++/builtin.h>
# else # else
# include <builtin.h> # include <builtin.h>
# endif # endif
# undef exception # undef exception
# endif # endif
@ -223,57 +238,65 @@ extern "C" {
#include <iostream> #include <iostream>
#if !(defined(__GNUG__)||defined(__SUNPRO_CC)) #if !(defined(__GNUG__)||defined(__SUNPRO_CC))
extern "C" void exit(int); extern "C" void exit(int);
#endif #endif
// Forward Declarations // Forward Declarations
class BACKEND_IMPEXP RigException class BACKEND_IMPEXP RigException
{ {
public: public:
const char *message; const char *message;
int errorno; int errorno;
RigException (const char* msg, int err) RigException(const char *msg, int err)
: message(msg), errorno (err) : message(msg), errorno(err)
{}; {};
RigException (int err) RigException(int err)
: message(rigerror(err)), errorno (err) : message(rigerror(err)), errorno(err)
{}; {};
RigException (const char* msg) RigException(const char *msg)
: message(msg), errorno (-RIG_EINTERNAL) : message(msg), errorno(-RIG_EINTERNAL)
{}; {};
virtual ~RigException() virtual ~RigException()
{}; {};
void print() const { void print() const
std::cerr << "Rig exception: " << message << std::endl; {
} std::cerr << "Rig exception: " << message << std::endl;
virtual const char *classname() const { }
return "Rig"; virtual const char *classname() const
} {
return "Rig";
}
}; };
inline void THROW(const RigException *e) {
inline void THROW(const RigException *e)
{
#if defined(__GNUG__) #if defined(__GNUG__)
# if ((__GNUG__ <= 2) && (__GNUC_MINOR__ < 8)) # if ((__GNUG__ <= 2) && (__GNUC_MINOR__ < 8))
(*lib_error_handler)(e?e->classname():"",e?e->message:""); (*lib_error_handler)(e ? e->classname() : "", e ? e->message : "");
#else #else
throw *e; throw *e;
#endif #endif
#elif defined(__SUNPRO_CC) #elif defined(__SUNPRO_CC)
genericerror(1, ((e != 0) ? (char *)(e->message) : "")); genericerror(1, ((e != 0) ? (char *)(e->message) : ""));
#else #else
if (e)
std::cerr << e->message << endl; if (e) {
exit(0); std::cerr << e->message << endl;
}
exit(0);
#endif #endif
} }
#define THROWS(s) #define THROWS(s)
#endif // _RIGCLASS_H #endif // _RIGCLASS_H

Wyświetl plik

@ -29,16 +29,17 @@
/*! \file riglist.h /*! \file riglist.h
* \brief Hamlib rig(radio) model definitions. * \brief Hamlib rig(radio) model definitions.
* *
* This file contains rig model definitions for the Hamlib rig API. * This file contains rig model definitions for the Hamlib rig API. Each
* Each distinct rig type has a unique model number (ID) and is used * distinct rig type has a unique model number (ID) and is used by hamlib to
* by hamlib to identify and distinguish between the different hardware drivers. * identify and distinguish between the different hardware drivers. The
* The exact model numbers can be acquired using the macros in this * exact model numbers can be acquired using the macros in this file. To
* file. To obtain a list of supported rig branches, one can use the statically * obtain a list of supported rig branches, one can use the statically
* defined RIG_BACKEND_LIST macro. To obtain a full list of supported rig (including * defined RIG_BACKEND_LIST macro. To obtain a full list of supported rig
* each model in every branch), the foreach_opened_rig() API function can be used. * (including each model in every branch), the foreach_opened_rig() API
* function can be used.
* *
* The model number, or ID, is used to tell hamlib, which rig the client whishes to * The model number, or ID, is used to tell hamlib, which rig the client
* use. It is done with the rig_init() API call. * whishes to use. It is done with the rig_init() API call.
*/ */
#define RIG_MODEL_NONE 0 #define RIG_MODEL_NONE 0
@ -46,10 +47,13 @@
/*! \def RIG_MODEL_DUMMY /*! \def RIG_MODEL_DUMMY
* \brief A macro that returns the model number for the dummy backend. * \brief A macro that returns the model number for the dummy backend.
* *
* The dummy backend, as the name suggests, is a backend which performs * The dummy backend, as the name suggests, is a backend which performs no
* no hardware operations and always behaves as one would expect. It can * hardware operations and always behaves as one would expect. It can be
* be thought of as a hardware simulator and is very usefull for testing * thought of as a hardware simulator and is very usefull for testing client
* client applications. * applications.
*
* It has also been expanded to provide support to "virtual" type of rigs
* such as the network rig control backend and W1HKJ's Flrig application.
*/ */
#define RIG_DUMMY 0 #define RIG_DUMMY 0
#define RIG_BACKEND_DUMMY "dummy" #define RIG_BACKEND_DUMMY "dummy"
@ -58,9 +62,10 @@
#define RIG_MODEL_ARMSTRONG RIG_MAKE_MODEL(RIG_DUMMY, 3) #define RIG_MODEL_ARMSTRONG RIG_MAKE_MODEL(RIG_DUMMY, 3)
#define RIG_MODEL_FLRIG RIG_MAKE_MODEL(RIG_DUMMY, 4) #define RIG_MODEL_FLRIG RIG_MAKE_MODEL(RIG_DUMMY, 4)
/*
* Yaesu /*
*/ * Yaesu
*/
#define RIG_YAESU 1 #define RIG_YAESU 1
#define RIG_BACKEND_YAESU "yaesu" #define RIG_BACKEND_YAESU "yaesu"
#define RIG_MODEL_FT847 RIG_MAKE_MODEL(RIG_YAESU, 1) #define RIG_MODEL_FT847 RIG_MAKE_MODEL(RIG_YAESU, 1)
@ -100,9 +105,10 @@
#define RIG_MODEL_FT991 RIG_MAKE_MODEL(RIG_YAESU, 35) #define RIG_MODEL_FT991 RIG_MAKE_MODEL(RIG_YAESU, 35)
#define RIG_MODEL_FT891 RIG_MAKE_MODEL(RIG_YAESU, 36) #define RIG_MODEL_FT891 RIG_MAKE_MODEL(RIG_YAESU, 36)
/*
* Kenwood /*
*/ * Kenwood
*/
#define RIG_KENWOOD 2 #define RIG_KENWOOD 2
#define RIG_BACKEND_KENWOOD "kenwood" #define RIG_BACKEND_KENWOOD "kenwood"
#define RIG_MODEL_TS50 RIG_MAKE_MODEL(RIG_KENWOOD, 1) #define RIG_MODEL_TS50 RIG_MAKE_MODEL(RIG_KENWOOD, 1)
@ -140,15 +146,16 @@
#define RIG_MODEL_THD72A RIG_MAKE_MODEL(RIG_KENWOOD, 33) #define RIG_MODEL_THD72A RIG_MAKE_MODEL(RIG_KENWOOD, 33)
#define RIG_MODEL_TMD710 RIG_MAKE_MODEL(RIG_KENWOOD, 34) #define RIG_MODEL_TMD710 RIG_MAKE_MODEL(RIG_KENWOOD, 34)
#define RIG_MODEL_TMV71 RIG_MAKE_MODEL(RIG_KENWOOD, 35) #define RIG_MODEL_TMV71 RIG_MAKE_MODEL(RIG_KENWOOD, 35)
#define RIG_MODEL_F6K RIG_MAKE_MODEL(RIG_KENWOOD, 36) /* Flex 6000 Series */ #define RIG_MODEL_F6K RIG_MAKE_MODEL(RIG_KENWOOD, 36) /* Flex 6000 Series */
#define RIG_MODEL_TS590SG RIG_MAKE_MODEL(RIG_KENWOOD, 37) #define RIG_MODEL_TS590SG RIG_MAKE_MODEL(RIG_KENWOOD, 37)
#define RIG_MODEL_XG3 RIG_MAKE_MODEL(RIG_KENWOOD, 38) #define RIG_MODEL_XG3 RIG_MAKE_MODEL(RIG_KENWOOD, 38) /* Elecraft XG-3 signal generator */
#define RIG_MODEL_TS990S RIG_MAKE_MODEL(RIG_KENWOOD, 39) #define RIG_MODEL_TS990S RIG_MAKE_MODEL(RIG_KENWOOD, 39)
#define RIG_MODEL_HPSDR RIG_MAKE_MODEL(RIG_KENWOOD, 40) /* OpenHPSDR, PiHPSDR */ #define RIG_MODEL_HPSDR RIG_MAKE_MODEL(RIG_KENWOOD, 40) /* OpenHPSDR, PiHPSDR */
/*
* Icom /*
*/ * Icom
*/
#define RIG_ICOM 3 #define RIG_ICOM 3
#define RIG_BACKEND_ICOM "icom" #define RIG_BACKEND_ICOM "icom"
#define RIG_MODEL_IC1271 RIG_MAKE_MODEL(RIG_ICOM, 1) #define RIG_MODEL_IC1271 RIG_MAKE_MODEL(RIG_ICOM, 1)
@ -197,16 +204,16 @@
#define RIG_MODEL_IC910 RIG_MAKE_MODEL(RIG_ICOM, 44) #define RIG_MODEL_IC910 RIG_MAKE_MODEL(RIG_ICOM, 44)
#define RIG_MODEL_IC78 RIG_MAKE_MODEL(RIG_ICOM, 45) #define RIG_MODEL_IC78 RIG_MAKE_MODEL(RIG_ICOM, 45)
#define RIG_MODEL_IC746PRO RIG_MAKE_MODEL(RIG_ICOM, 46) #define RIG_MODEL_IC746PRO RIG_MAKE_MODEL(RIG_ICOM, 46)
#define RIG_MODEL_IC756PROII RIG_MAKE_MODEL(RIG_ICOM, 47) #define RIG_MODEL_IC756PROII RIG_MAKE_MODEL(RIG_ICOM, 47) /* 48-53 defined below */
#define RIG_MODEL_ICID1 RIG_MAKE_MODEL(RIG_ICOM, 54) #define RIG_MODEL_ICID1 RIG_MAKE_MODEL(RIG_ICOM, 54)
#define RIG_MODEL_IC703 RIG_MAKE_MODEL(RIG_ICOM, 55) #define RIG_MODEL_IC703 RIG_MAKE_MODEL(RIG_ICOM, 55)
#define RIG_MODEL_IC7800 RIG_MAKE_MODEL(RIG_ICOM, 56) #define RIG_MODEL_IC7800 RIG_MAKE_MODEL(RIG_ICOM, 56)
#define RIG_MODEL_IC756PROIII RIG_MAKE_MODEL(RIG_ICOM, 57) #define RIG_MODEL_IC756PROIII RIG_MAKE_MODEL(RIG_ICOM, 57)
#define RIG_MODEL_ICR20 RIG_MAKE_MODEL(RIG_ICOM, 58) #define RIG_MODEL_ICR20 RIG_MAKE_MODEL(RIG_ICOM, 58) /* 59 defined below */
#define RIG_MODEL_IC7000 RIG_MAKE_MODEL(RIG_ICOM, 60) #define RIG_MODEL_IC7000 RIG_MAKE_MODEL(RIG_ICOM, 60)
#define RIG_MODEL_IC7200 RIG_MAKE_MODEL(RIG_ICOM, 61) #define RIG_MODEL_IC7200 RIG_MAKE_MODEL(RIG_ICOM, 61)
#define RIG_MODEL_IC7700 RIG_MAKE_MODEL(RIG_ICOM, 62) #define RIG_MODEL_IC7700 RIG_MAKE_MODEL(RIG_ICOM, 62)
#define RIG_MODEL_IC7600 RIG_MAKE_MODEL(RIG_ICOM, 63) #define RIG_MODEL_IC7600 RIG_MAKE_MODEL(RIG_ICOM, 63) /* 64 defined below */
#define RIG_MODEL_IC92D RIG_MAKE_MODEL(RIG_ICOM, 65) #define RIG_MODEL_IC92D RIG_MAKE_MODEL(RIG_ICOM, 65)
#define RIG_MODEL_ICR9500 RIG_MAKE_MODEL(RIG_ICOM, 66) #define RIG_MODEL_ICR9500 RIG_MAKE_MODEL(RIG_ICOM, 66)
#define RIG_MODEL_IC7410 RIG_MAKE_MODEL(RIG_ICOM, 67) #define RIG_MODEL_IC7410 RIG_MAKE_MODEL(RIG_ICOM, 67)
@ -218,29 +225,32 @@
#define RIG_MODEL_IC7300 RIG_MAKE_MODEL(RIG_ICOM, 73) #define RIG_MODEL_IC7300 RIG_MAKE_MODEL(RIG_ICOM, 73)
#define RIG_MODEL_PERSEUS RIG_MAKE_MODEL(RIG_ICOM, 74) #define RIG_MODEL_PERSEUS RIG_MAKE_MODEL(RIG_ICOM, 74)
#define RIG_MODEL_IC785x RIG_MAKE_MODEL(RIG_ICOM, 75) #define RIG_MODEL_IC785x RIG_MAKE_MODEL(RIG_ICOM, 75)
#define RIG_MODEL_X108G RIG_MAKE_MODEL(RIG_ICOM, 76) /* Xiegu X108 */ #define RIG_MODEL_X108G RIG_MAKE_MODEL(RIG_ICOM, 76) /* Xiegu X108 */
#define RIG_MODEL_ICR6 RIG_MAKE_MODEL(RIG_ICOM, 77) #define RIG_MODEL_ICR6 RIG_MAKE_MODEL(RIG_ICOM, 77)
/* next one is 78 */ /* next one is 78 */
/*
* Optoelectronics (CI-V) /*
*/ * Optoelectronics (CI-V)
*/
#define RIG_MODEL_MINISCOUT RIG_MAKE_MODEL(RIG_ICOM, 48) #define RIG_MODEL_MINISCOUT RIG_MAKE_MODEL(RIG_ICOM, 48)
#define RIG_MODEL_XPLORER RIG_MAKE_MODEL(RIG_ICOM, 49) #define RIG_MODEL_XPLORER RIG_MAKE_MODEL(RIG_ICOM, 49)
#define RIG_MODEL_OS535 RIG_MAKE_MODEL(RIG_ICOM, 52) #define RIG_MODEL_OS535 RIG_MAKE_MODEL(RIG_ICOM, 52)
#define RIG_MODEL_OS456 RIG_MAKE_MODEL(RIG_ICOM, 53) #define RIG_MODEL_OS456 RIG_MAKE_MODEL(RIG_ICOM, 53)
/*
* TenTec (CI-V) /*
*/ * TenTec (CI-V)
*/
#define RIG_MODEL_OMNIVI RIG_MAKE_MODEL(RIG_ICOM, 50) #define RIG_MODEL_OMNIVI RIG_MAKE_MODEL(RIG_ICOM, 50)
#define RIG_MODEL_OMNIVIP RIG_MAKE_MODEL(RIG_ICOM, 51) /* OMNI-VI+ */ #define RIG_MODEL_OMNIVIP RIG_MAKE_MODEL(RIG_ICOM, 51) /* OMNI-VI+ */
#define RIG_MODEL_PARAGON2 RIG_MAKE_MODEL(RIG_ICOM, 59) #define RIG_MODEL_PARAGON2 RIG_MAKE_MODEL(RIG_ICOM, 59)
#define RIG_MODEL_DELTAII RIG_MAKE_MODEL(RIG_ICOM, 64) #define RIG_MODEL_DELTAII RIG_MAKE_MODEL(RIG_ICOM, 64)
/*
* Icom PCR /*
*/ * Icom PCR
*/
#define RIG_PCR 4 #define RIG_PCR 4
#define RIG_BACKEND_PCR "pcr" #define RIG_BACKEND_PCR "pcr"
#define RIG_MODEL_PCR1000 RIG_MAKE_MODEL(RIG_PCR, 1) #define RIG_MODEL_PCR1000 RIG_MAKE_MODEL(RIG_PCR, 1)
@ -248,9 +258,10 @@
#define RIG_MODEL_PCR1500 RIG_MAKE_MODEL(RIG_PCR, 3) #define RIG_MODEL_PCR1500 RIG_MAKE_MODEL(RIG_PCR, 3)
#define RIG_MODEL_PCR2500 RIG_MAKE_MODEL(RIG_PCR, 4) #define RIG_MODEL_PCR2500 RIG_MAKE_MODEL(RIG_PCR, 4)
/*
* AOR /*
*/ * AOR
*/
#define RIG_AOR 5 #define RIG_AOR 5
#define RIG_BACKEND_AOR "aor" #define RIG_BACKEND_AOR "aor"
#define RIG_MODEL_AR8200 RIG_MAKE_MODEL(RIG_AOR, 1) #define RIG_MODEL_AR8200 RIG_MAKE_MODEL(RIG_AOR, 1)
@ -270,9 +281,10 @@
#define RIG_MODEL_AR7030P RIG_MAKE_MODEL(RIG_AOR, 15) #define RIG_MODEL_AR7030P RIG_MAKE_MODEL(RIG_AOR, 15)
#define RIG_MODEL_SR2200 RIG_MAKE_MODEL(RIG_AOR, 16) #define RIG_MODEL_SR2200 RIG_MAKE_MODEL(RIG_AOR, 16)
/*
* JRC /*
*/ * JRC
*/
#define RIG_JRC 6 #define RIG_JRC 6
#define RIG_BACKEND_JRC "jrc" #define RIG_BACKEND_JRC "jrc"
#define RIG_MODEL_JST145 RIG_MAKE_MODEL(RIG_JRC, 1) #define RIG_MODEL_JST145 RIG_MAKE_MODEL(RIG_JRC, 1)
@ -283,28 +295,30 @@
#define RIG_MODEL_NRD535 RIG_MAKE_MODEL(RIG_JRC, 6) #define RIG_MODEL_NRD535 RIG_MAKE_MODEL(RIG_JRC, 6)
#define RIG_MODEL_NRD545 RIG_MAKE_MODEL(RIG_JRC, 7) #define RIG_MODEL_NRD545 RIG_MAKE_MODEL(RIG_JRC, 7)
/*
* Radio Shack /*
* Actualy, they might be either Icom or Uniden. TBC --SF * Radio Shack
*/ * Actualy, they might be either Icom or Uniden. TBC --SF
*/
#define RIG_RADIOSHACK 7 #define RIG_RADIOSHACK 7
#define RIG_BACKEND_RADIOSHACK "radioshack" #define RIG_BACKEND_RADIOSHACK "radioshack"
#define RIG_MODEL_RS64 RIG_MAKE_MODEL(RIG_RADIOSHACK, 1) /* PRO-64 */ #define RIG_MODEL_RS64 RIG_MAKE_MODEL(RIG_RADIOSHACK, 1) /* PRO-64 */
#define RIG_MODEL_RS2005 RIG_MAKE_MODEL(RIG_RADIOSHACK, 2) /* w/ OptoElectronics OS456 Board */ #define RIG_MODEL_RS2005 RIG_MAKE_MODEL(RIG_RADIOSHACK, 2) /* w/ OptoElectronics OS456 Board */
#define RIG_MODEL_RS2006 RIG_MAKE_MODEL(RIG_RADIOSHACK, 3) /* w/ OptoElectronics OS456 Board */ #define RIG_MODEL_RS2006 RIG_MAKE_MODEL(RIG_RADIOSHACK, 3) /* w/ OptoElectronics OS456 Board */
#define RIG_MODEL_RS2035 RIG_MAKE_MODEL(RIG_RADIOSHACK, 4) /* w/ OptoElectronics OS435 Board */ #define RIG_MODEL_RS2035 RIG_MAKE_MODEL(RIG_RADIOSHACK, 4) /* w/ OptoElectronics OS435 Board */
#define RIG_MODEL_RS2042 RIG_MAKE_MODEL(RIG_RADIOSHACK, 5) /* w/ OptoElectronics OS435 Board */ #define RIG_MODEL_RS2042 RIG_MAKE_MODEL(RIG_RADIOSHACK, 5) /* w/ OptoElectronics OS435 Board */
#define RIG_MODEL_RS2041 RIG_MAKE_MODEL(RIG_RADIOSHACK, 6) /* PRO-2041 */ #define RIG_MODEL_RS2041 RIG_MAKE_MODEL(RIG_RADIOSHACK, 6) /* PRO-2041 */
/*
* Uniden /*
*/ * Uniden
*/
#define RIG_UNIDEN 8 #define RIG_UNIDEN 8
#define RIG_BACKEND_UNIDEN "uniden" #define RIG_BACKEND_UNIDEN "uniden"
#define RIG_MODEL_BC780 RIG_MAKE_MODEL(RIG_UNIDEN, 1) /* Uniden BC780 - Trunk Tracker "Desktop Radio" */ #define RIG_MODEL_BC780 RIG_MAKE_MODEL(RIG_UNIDEN, 1) /* Uniden BC780 - Trunk Tracker "Desktop Radio" */
#define RIG_MODEL_BC245 RIG_MAKE_MODEL(RIG_UNIDEN, 2) #define RIG_MODEL_BC245 RIG_MAKE_MODEL(RIG_UNIDEN, 2)
#define RIG_MODEL_BC895 RIG_MAKE_MODEL(RIG_UNIDEN, 3) #define RIG_MODEL_BC895 RIG_MAKE_MODEL(RIG_UNIDEN, 3)
#define RIG_MODEL_PRO2052 RIG_MAKE_MODEL(RIG_UNIDEN, 4) /* Radio Shack PRO-2052 */ #define RIG_MODEL_PRO2052 RIG_MAKE_MODEL(RIG_UNIDEN, 4) /* Radio Shack PRO-2052 */
#define RIG_MODEL_BC235 RIG_MAKE_MODEL(RIG_UNIDEN, 5) #define RIG_MODEL_BC235 RIG_MAKE_MODEL(RIG_UNIDEN, 5)
#define RIG_MODEL_BC250 RIG_MAKE_MODEL(RIG_UNIDEN, 6) #define RIG_MODEL_BC250 RIG_MAKE_MODEL(RIG_UNIDEN, 6)
#define RIG_MODEL_BC785 RIG_MAKE_MODEL(RIG_UNIDEN, 7) #define RIG_MODEL_BC785 RIG_MAKE_MODEL(RIG_UNIDEN, 7)
@ -314,18 +328,20 @@
#define RIG_MODEL_BCD996T RIG_MAKE_MODEL(RIG_UNIDEN, 11) #define RIG_MODEL_BCD996T RIG_MAKE_MODEL(RIG_UNIDEN, 11)
#define RIG_MODEL_BC898 RIG_MAKE_MODEL(RIG_UNIDEN, 12) #define RIG_MODEL_BC898 RIG_MAKE_MODEL(RIG_UNIDEN, 12)
/*
* Drake /*
*/ * Drake
*/
#define RIG_DRAKE 9 #define RIG_DRAKE 9
#define RIG_BACKEND_DRAKE "drake" #define RIG_BACKEND_DRAKE "drake"
#define RIG_MODEL_DKR8 RIG_MAKE_MODEL(RIG_DRAKE, 1) #define RIG_MODEL_DKR8 RIG_MAKE_MODEL(RIG_DRAKE, 1)
#define RIG_MODEL_DKR8A RIG_MAKE_MODEL(RIG_DRAKE, 2) #define RIG_MODEL_DKR8A RIG_MAKE_MODEL(RIG_DRAKE, 2)
#define RIG_MODEL_DKR8B RIG_MAKE_MODEL(RIG_DRAKE, 3) #define RIG_MODEL_DKR8B RIG_MAKE_MODEL(RIG_DRAKE, 3)
/*
* Lowe /*
*/ * Lowe
*/
#define RIG_LOWE 10 #define RIG_LOWE 10
#define RIG_BACKEND_LOWE "lowe" #define RIG_BACKEND_LOWE "lowe"
#define RIG_MODEL_HF150 RIG_MAKE_MODEL(RIG_LOWE, 1) #define RIG_MODEL_HF150 RIG_MAKE_MODEL(RIG_LOWE, 1)
@ -333,9 +349,10 @@
#define RIG_MODEL_HF250 RIG_MAKE_MODEL(RIG_LOWE, 3) #define RIG_MODEL_HF250 RIG_MAKE_MODEL(RIG_LOWE, 3)
#define RIG_MODEL_HF235 RIG_MAKE_MODEL(RIG_LOWE, 4) #define RIG_MODEL_HF235 RIG_MAKE_MODEL(RIG_LOWE, 4)
/*
* Racal /*
*/ * Racal
*/
#define RIG_RACAL 11 #define RIG_RACAL 11
#define RIG_BACKEND_RACAL "racal" #define RIG_BACKEND_RACAL "racal"
#define RIG_MODEL_RA3790 RIG_MAKE_MODEL(RIG_RACAL, 1) #define RIG_MODEL_RA3790 RIG_MAKE_MODEL(RIG_RACAL, 1)
@ -344,9 +361,10 @@
#define RIG_MODEL_RA3710 RIG_MAKE_MODEL(RIG_RACAL, 4) #define RIG_MODEL_RA3710 RIG_MAKE_MODEL(RIG_RACAL, 4)
#define RIG_MODEL_RA3702 RIG_MAKE_MODEL(RIG_RACAL, 5) #define RIG_MODEL_RA3702 RIG_MAKE_MODEL(RIG_RACAL, 5)
/*
* Watkins-Johnson /*
*/ * Watkins-Johnson
*/
#define RIG_WJ 12 #define RIG_WJ 12
#define RIG_BACKEND_WJ "wj" #define RIG_BACKEND_WJ "wj"
#define RIG_MODEL_HF1000 RIG_MAKE_MODEL(RIG_WJ, 1) #define RIG_MODEL_HF1000 RIG_MAKE_MODEL(RIG_WJ, 1)
@ -354,9 +372,10 @@
#define RIG_MODEL_WJ8711 RIG_MAKE_MODEL(RIG_WJ, 3) #define RIG_MODEL_WJ8711 RIG_MAKE_MODEL(RIG_WJ, 3)
#define RIG_MODEL_WJ8888 RIG_MAKE_MODEL(RIG_WJ, 4) #define RIG_MODEL_WJ8888 RIG_MAKE_MODEL(RIG_WJ, 4)
/*
* Rohde & Schwarz /*
*/ * Rohde & Schwarz--ek
*/
#define RIG_EK 13 #define RIG_EK 13
#define RIG_BACKEND_EK "ek" #define RIG_BACKEND_EK "ek"
#define RIG_MODEL_ESM500 RIG_MAKE_MODEL(RIG_EK, 1) #define RIG_MODEL_ESM500 RIG_MAKE_MODEL(RIG_EK, 1)
@ -365,9 +384,10 @@
#define RIG_MODEL_EK895 RIG_MAKE_MODEL(RIG_EK, 4) #define RIG_MODEL_EK895 RIG_MAKE_MODEL(RIG_EK, 4)
#define RIG_MODEL_EK070 RIG_MAKE_MODEL(RIG_EK, 5) #define RIG_MODEL_EK070 RIG_MAKE_MODEL(RIG_EK, 5)
/*
* Skanti /*
*/ * Skanti
*/
#define RIG_SKANTI 14 #define RIG_SKANTI 14
#define RIG_BACKEND_SKANTI "skanti" #define RIG_BACKEND_SKANTI "skanti"
#define RIG_MODEL_TRP7000 RIG_MAKE_MODEL(RIG_SKANTI, 1) #define RIG_MODEL_TRP7000 RIG_MAKE_MODEL(RIG_SKANTI, 1)
@ -375,9 +395,10 @@
#define RIG_MODEL_TRP9000 RIG_MAKE_MODEL(RIG_SKANTI, 3) #define RIG_MODEL_TRP9000 RIG_MAKE_MODEL(RIG_SKANTI, 3)
#define RIG_MODEL_TRP8255 RIG_MAKE_MODEL(RIG_SKANTI, 4) #define RIG_MODEL_TRP8255 RIG_MAKE_MODEL(RIG_SKANTI, 4)
/*
* WiNRADiO/LinRADiO /*
*/ * WiNRADiO/LinRADiO
*/
#define RIG_WINRADIO 15 #define RIG_WINRADIO 15
#define RIG_BACKEND_WINRADIO "winradio" #define RIG_BACKEND_WINRADIO "winradio"
#define RIG_MODEL_WR1000 RIG_MAKE_MODEL(RIG_WINRADIO, 1) #define RIG_MODEL_WR1000 RIG_MAKE_MODEL(RIG_WINRADIO, 1)
@ -392,69 +413,75 @@
#define RIG_MODEL_G305 RIG_MAKE_MODEL(RIG_WINRADIO, 10) #define RIG_MODEL_G305 RIG_MAKE_MODEL(RIG_WINRADIO, 10)
#define RIG_MODEL_G315 RIG_MAKE_MODEL(RIG_WINRADIO, 11) #define RIG_MODEL_G315 RIG_MAKE_MODEL(RIG_WINRADIO, 11)
/*
* Ten Tec /*
*/ * Ten Tec
*/
#define RIG_TENTEC 16 #define RIG_TENTEC 16
#define RIG_BACKEND_TENTEC "tentec" #define RIG_BACKEND_TENTEC "tentec"
#define RIG_MODEL_TT550 RIG_MAKE_MODEL(RIG_TENTEC, 1) /* Pegasus */ #define RIG_MODEL_TT550 RIG_MAKE_MODEL(RIG_TENTEC, 1) /* Pegasus */
#define RIG_MODEL_TT538 RIG_MAKE_MODEL(RIG_TENTEC, 2) /* Jupiter */ #define RIG_MODEL_TT538 RIG_MAKE_MODEL(RIG_TENTEC, 2) /* Jupiter */
#define RIG_MODEL_RX320 RIG_MAKE_MODEL(RIG_TENTEC, 3) #define RIG_MODEL_RX320 RIG_MAKE_MODEL(RIG_TENTEC, 3)
#define RIG_MODEL_RX340 RIG_MAKE_MODEL(RIG_TENTEC, 4) #define RIG_MODEL_RX340 RIG_MAKE_MODEL(RIG_TENTEC, 4)
#define RIG_MODEL_RX350 RIG_MAKE_MODEL(RIG_TENTEC, 5) #define RIG_MODEL_RX350 RIG_MAKE_MODEL(RIG_TENTEC, 5)
#define RIG_MODEL_TT526 RIG_MAKE_MODEL(RIG_TENTEC, 6) /* 6N2 */ #define RIG_MODEL_TT526 RIG_MAKE_MODEL(RIG_TENTEC, 6) /* 6N2 */
#define RIG_MODEL_TT516 RIG_MAKE_MODEL(RIG_TENTEC, 7) /* Argonaut V */ #define RIG_MODEL_TT516 RIG_MAKE_MODEL(RIG_TENTEC, 7) /* Argonaut V */
#define RIG_MODEL_TT565 RIG_MAKE_MODEL(RIG_TENTEC, 8) /* Orion */ #define RIG_MODEL_TT565 RIG_MAKE_MODEL(RIG_TENTEC, 8) /* Orion */
#define RIG_MODEL_TT585 RIG_MAKE_MODEL(RIG_TENTEC, 9) /* Paragon */ #define RIG_MODEL_TT585 RIG_MAKE_MODEL(RIG_TENTEC, 9) /* Paragon */
#define RIG_MODEL_TT588 RIG_MAKE_MODEL(RIG_TENTEC, 11) /* Omni-VII */ #define RIG_MODEL_TT588 RIG_MAKE_MODEL(RIG_TENTEC, 11) /* Omni-VII */
#define RIG_MODEL_RX331 RIG_MAKE_MODEL(RIG_TENTEC, 12) #define RIG_MODEL_RX331 RIG_MAKE_MODEL(RIG_TENTEC, 12)
#define RIG_MODEL_TT599 RIG_MAKE_MODEL(RIG_TENTEC, 13) /* Eagle */ #define RIG_MODEL_TT599 RIG_MAKE_MODEL(RIG_TENTEC, 13) /* Eagle */
/*
* Alinco /*
*/ * Alinco
*/
#define RIG_ALINCO 17 #define RIG_ALINCO 17
#define RIG_BACKEND_ALINCO "alinco" #define RIG_BACKEND_ALINCO "alinco"
#define RIG_MODEL_DX77 RIG_MAKE_MODEL(RIG_ALINCO, 1) #define RIG_MODEL_DX77 RIG_MAKE_MODEL(RIG_ALINCO, 1)
/*
* Kachina /*
*/ * Kachina
*/
#define RIG_KACHINA 18 #define RIG_KACHINA 18
#define RIG_BACKEND_KACHINA "kachina" #define RIG_BACKEND_KACHINA "kachina"
#define RIG_MODEL_505DSP RIG_MAKE_MODEL(RIG_KACHINA, 1) #define RIG_MODEL_505DSP RIG_MAKE_MODEL(RIG_KACHINA, 1)
/* /*
* Gnuradio backend * Gnuradio backend
*/ */
#define RIG_GNURADIO 20 #define RIG_GNURADIO 20
#define RIG_BACKEND_GNURADIO "gnuradio" #define RIG_BACKEND_GNURADIO "gnuradio"
#define RIG_MODEL_GNURADIO RIG_MAKE_MODEL(RIG_GNURADIO, 1) /* dev model, Chirp source */ #define RIG_MODEL_GNURADIO RIG_MAKE_MODEL(RIG_GNURADIO, 1) /* dev model, Chirp source */
#define RIG_MODEL_MC4020 RIG_MAKE_MODEL(RIG_GNURADIO, 2) /* MC4020 */ #define RIG_MODEL_MC4020 RIG_MAKE_MODEL(RIG_GNURADIO, 2) /* MC4020 */
#define RIG_MODEL_GRAUDIO RIG_MAKE_MODEL(RIG_GNURADIO, 3) /* Sound card source */ #define RIG_MODEL_GRAUDIO RIG_MAKE_MODEL(RIG_GNURADIO, 3) /* Sound card source */
#define RIG_MODEL_GRAUDIOIQ RIG_MAKE_MODEL(RIG_GNURADIO, 4) /* I&Q stereo sound card source */ #define RIG_MODEL_GRAUDIOIQ RIG_MAKE_MODEL(RIG_GNURADIO, 4) /* I&Q stereo sound card source */
#define RIG_MODEL_USRP_G RIG_MAKE_MODEL(RIG_GNURADIO, 5) /* Universal Software Radio Peripheral */ #define RIG_MODEL_USRP_G RIG_MAKE_MODEL(RIG_GNURADIO, 5) /* Universal Software Radio Peripheral */
/*
* Microtune tuners /*
*/ * Microtune tuners
*/
#define RIG_MICROTUNE 21 #define RIG_MICROTUNE 21
#define RIG_BACKEND_MICROTUNE "microtune" #define RIG_BACKEND_MICROTUNE "microtune"
#define RIG_MODEL_MICROTUNE_4937 RIG_MAKE_MODEL(RIG_MICROTUNE, 1) /* eval board */ #define RIG_MODEL_MICROTUNE_4937 RIG_MAKE_MODEL(RIG_MICROTUNE, 1) /* eval board */
#define RIG_MODEL_MICROTUNE_4702 RIG_MAKE_MODEL(RIG_MICROTUNE, 2) /* Alan's */ #define RIG_MODEL_MICROTUNE_4702 RIG_MAKE_MODEL(RIG_MICROTUNE, 2) /* Alan's */
#define RIG_MODEL_MICROTUNE_4707 RIG_MAKE_MODEL(RIG_MICROTUNE, 3) #define RIG_MODEL_MICROTUNE_4707 RIG_MAKE_MODEL(RIG_MICROTUNE, 3)
/*
* TAPR /*
*/ * TAPR
*/
#define RIG_TAPR 22 #define RIG_TAPR 22
#define RIG_BACKEND_TAPR "tapr" #define RIG_BACKEND_TAPR "tapr"
#define RIG_MODEL_DSP10 RIG_MAKE_MODEL(RIG_TAPR, 1) #define RIG_MODEL_DSP10 RIG_MAKE_MODEL(RIG_TAPR, 1)
/*
* Flex-radio /*
*/ * Flex-radio
*/
#define RIG_FLEXRADIO 23 #define RIG_FLEXRADIO 23
#define RIG_BACKEND_FLEXRADIO "flexradio" #define RIG_BACKEND_FLEXRADIO "flexradio"
#define RIG_MODEL_SDR1000 RIG_MAKE_MODEL(RIG_FLEXRADIO, 1) #define RIG_MODEL_SDR1000 RIG_MAKE_MODEL(RIG_FLEXRADIO, 1)
@ -463,116 +490,126 @@
#define RIG_MODEL_DTTSP_UDP RIG_MAKE_MODEL(RIG_FLEXRADIO, 4) #define RIG_MODEL_DTTSP_UDP RIG_MAKE_MODEL(RIG_FLEXRADIO, 4)
/* /*
* VEB Funkwerk Köpenick RFT * VEB Funkwerk Köpenick RFT
*/ */
#define RIG_RFT 24 #define RIG_RFT 24
#define RIG_BACKEND_RFT "rft" #define RIG_BACKEND_RFT "rft"
#define RIG_MODEL_EKD500 RIG_MAKE_MODEL(RIG_RFT, 1) #define RIG_MODEL_EKD500 RIG_MAKE_MODEL(RIG_RFT, 1)
/*
* Various kits /*
*/ * Various kits
*/
#define RIG_KIT 25 #define RIG_KIT 25
#define RIG_BACKEND_KIT "kit" #define RIG_BACKEND_KIT "kit"
#define RIG_MODEL_ELEKTOR304 RIG_MAKE_MODEL(RIG_KIT, 1) #define RIG_MODEL_ELEKTOR304 RIG_MAKE_MODEL(RIG_KIT, 1)
#define RIG_MODEL_DRT1 RIG_MAKE_MODEL(RIG_KIT, 2) #define RIG_MODEL_DRT1 RIG_MAKE_MODEL(RIG_KIT, 2)
#define RIG_MODEL_DWT RIG_MAKE_MODEL(RIG_KIT, 3) #define RIG_MODEL_DWT RIG_MAKE_MODEL(RIG_KIT, 3)
#define RIG_MODEL_USRP0 RIG_MAKE_MODEL(RIG_KIT, 4) /* prototype */ #define RIG_MODEL_USRP0 RIG_MAKE_MODEL(RIG_KIT, 4) /* prototype */
#define RIG_MODEL_USRP RIG_MAKE_MODEL(RIG_KIT, 5) #define RIG_MODEL_USRP RIG_MAKE_MODEL(RIG_KIT, 5)
#define RIG_MODEL_DDS60 RIG_MAKE_MODEL(RIG_KIT, 6) #define RIG_MODEL_DDS60 RIG_MAKE_MODEL(RIG_KIT, 6)
#define RIG_MODEL_ELEKTOR507 RIG_MAKE_MODEL(RIG_KIT, 7) /* Elektor SDR USB */ #define RIG_MODEL_ELEKTOR507 RIG_MAKE_MODEL(RIG_KIT, 7) /* Elektor SDR USB */
#define RIG_MODEL_MINIVNA RIG_MAKE_MODEL(RIG_KIT, 8) #define RIG_MODEL_MINIVNA RIG_MAKE_MODEL(RIG_KIT, 8)
#define RIG_MODEL_SI570AVRUSB RIG_MAKE_MODEL(RIG_KIT, 9) /* SoftRock Si570 AVR */ #define RIG_MODEL_SI570AVRUSB RIG_MAKE_MODEL(RIG_KIT, 9) /* SoftRock Si570 AVR */
#define RIG_MODEL_PMSDR RIG_MAKE_MODEL(RIG_KIT, 10) #define RIG_MODEL_PMSDR RIG_MAKE_MODEL(RIG_KIT, 10)
#define RIG_MODEL_SI570PICUSB RIG_MAKE_MODEL(RIG_KIT, 11) /* SoftRock Si570 PIC */ #define RIG_MODEL_SI570PICUSB RIG_MAKE_MODEL(RIG_KIT, 11) /* SoftRock Si570 PIC */
#define RIG_MODEL_FIFISDR RIG_MAKE_MODEL(RIG_KIT, 12) /* FiFi-SDR USB */ #define RIG_MODEL_FIFISDR RIG_MAKE_MODEL(RIG_KIT, 12) /* FiFi-SDR USB */
#define RIG_MODEL_FUNCUBEDONGLE RIG_MAKE_MODEL(RIG_KIT, 13) /* FunCUBE Dongle */ #define RIG_MODEL_FUNCUBEDONGLE RIG_MAKE_MODEL(RIG_KIT, 13) /* FunCUBE Dongle */
#define RIG_MODEL_HIQSDR RIG_MAKE_MODEL(RIG_KIT, 14) /* HiQSDR */ #define RIG_MODEL_HIQSDR RIG_MAKE_MODEL(RIG_KIT, 14) /* HiQSDR */
#define RIG_MODEL_FASDR RIG_MAKE_MODEL(RIG_KIT,15) /* Funkamateur Sdr */ #define RIG_MODEL_FASDR RIG_MAKE_MODEL(RIG_KIT,15) /* Funkamateur Sdr */
#define RIG_MODEL_SI570PEABERRY1 RIG_MAKE_MODEL(RIG_KIT, 16) /* Peaberry V1 */ #define RIG_MODEL_SI570PEABERRY1 RIG_MAKE_MODEL(RIG_KIT, 16) /* Peaberry V1 */
#define RIG_MODEL_SI570PEABERRY2 RIG_MAKE_MODEL(RIG_KIT, 17) /* Peaberry V2 */ #define RIG_MODEL_SI570PEABERRY2 RIG_MAKE_MODEL(RIG_KIT, 17) /* Peaberry V2 */
#define RIG_MODEL_FUNCUBEDONGLEPLUS RIG_MAKE_MODEL(RIG_KIT, 18) /* FunCUBE Dongle Pro+ */ #define RIG_MODEL_FUNCUBEDONGLEPLUS RIG_MAKE_MODEL(RIG_KIT, 18) /* FunCUBE Dongle Pro+ */
#define RIG_MODEL_RSHFIQ RIG_MAKE_MODEL(RIG_KIT, 19) /* RS-HFIQ */ #define RIG_MODEL_RSHFIQ RIG_MAKE_MODEL(RIG_KIT, 19) /* RS-HFIQ */
/*
* SW/FM/TV tuner cards supported by Video4Linux,*BSD, .. /*
*/ * SW/FM/TV tuner cards supported by Video4Linux,*BSD, ..
*/
#define RIG_TUNER 26 #define RIG_TUNER 26
#define RIG_BACKEND_TUNER "tuner" #define RIG_BACKEND_TUNER "tuner"
#define RIG_MODEL_V4L RIG_MAKE_MODEL(RIG_TUNER, 1) #define RIG_MODEL_V4L RIG_MAKE_MODEL(RIG_TUNER, 1)
#define RIG_MODEL_V4L2 RIG_MAKE_MODEL(RIG_TUNER, 2) #define RIG_MODEL_V4L2 RIG_MAKE_MODEL(RIG_TUNER, 2)
/*
* Rohde&Schwarz /*
*/ * Rohde & Schwarz--rs
*/
#define RIG_RS 27 #define RIG_RS 27
#define RIG_BACKEND_RS "rs" #define RIG_BACKEND_RS "rs"
#define RIG_MODEL_ESMC RIG_MAKE_MODEL(RIG_RS, 1) #define RIG_MODEL_ESMC RIG_MAKE_MODEL(RIG_RS, 1)
#define RIG_MODEL_EB200 RIG_MAKE_MODEL(RIG_RS, 2) #define RIG_MODEL_EB200 RIG_MAKE_MODEL(RIG_RS, 2)
/*
* Phillips/Simoco PRM80 /*
*/ * Phillips/Simoco PRM80
*/
#define RIG_PRM80 28 #define RIG_PRM80 28
#define RIG_BACKEND_PRM80 "prm80" #define RIG_BACKEND_PRM80 "prm80"
#define RIG_MODEL_PRM8060 RIG_MAKE_MODEL(RIG_PRM80, 1) #define RIG_MODEL_PRM8060 RIG_MAKE_MODEL(RIG_PRM80, 1)
#define RIG_MODEL_PRM8070 RIG_MAKE_MODEL(RIG_PRM80, 2) #define RIG_MODEL_PRM8070 RIG_MAKE_MODEL(RIG_PRM80, 2)
/*
* ADAT by HB9CBU /*
* * ADAT by HB9CBU
* ADDED: frgo (DG1SBG), 2012-01-01 *
*/ * ADDED: frgo (DG1SBG), 2012-01-01
*/
#define RIG_ADAT 29 #define RIG_ADAT 29
#define RIG_BACKEND_ADAT "adat" #define RIG_BACKEND_ADAT "adat"
#define RIG_MODEL_ADT_200A RIG_MAKE_MODEL(RIG_ADAT, 1) #define RIG_MODEL_ADT_200A RIG_MAKE_MODEL(RIG_ADAT, 1)
/*
* ICOM Marine /*
*/ * ICOM Marine
*/
#define RIG_ICMARINE 30 #define RIG_ICMARINE 30
#define RIG_BACKEND_ICMARINE "icmarine" #define RIG_BACKEND_ICMARINE "icmarine"
#define RIG_MODEL_IC_M700PRO RIG_MAKE_MODEL(RIG_ICMARINE, 1) #define RIG_MODEL_IC_M700PRO RIG_MAKE_MODEL(RIG_ICMARINE, 1)
#define RIG_MODEL_IC_M802 RIG_MAKE_MODEL(RIG_ICMARINE, 2) #define RIG_MODEL_IC_M802 RIG_MAKE_MODEL(RIG_ICMARINE, 2)
#define RIG_MODEL_IC_M710 RIG_MAKE_MODEL(RIG_ICMARINE, 3) #define RIG_MODEL_IC_M710 RIG_MAKE_MODEL(RIG_ICMARINE, 3)
/*
* Dorji transceiver modules /*
*/ * Dorji transceiver modules
*/
#define RIG_DORJI 31 #define RIG_DORJI 31
#define RIG_BACKEND_DORJI "dorji" #define RIG_BACKEND_DORJI "dorji"
#define RIG_MODEL_DORJI_DRA818V RIG_MAKE_MODEL(RIG_DORJI, 1) #define RIG_MODEL_DORJI_DRA818V RIG_MAKE_MODEL(RIG_DORJI, 1)
#define RIG_MODEL_DORJI_DRA818U RIG_MAKE_MODEL(RIG_DORJI, 2) #define RIG_MODEL_DORJI_DRA818U RIG_MAKE_MODEL(RIG_DORJI, 2)
/* /*
* Dorji transceiver modules * Barrett
*/ */
#define RIG_BARRETT 32 #define RIG_BARRETT 32
#define RIG_BACKEND_BARRETT "barrett" #define RIG_BACKEND_BARRETT "barrett"
#define RIG_MODEL_BARRETT_2050 RIG_MAKE_MODEL(RIG_BARRETT, 1) #define RIG_MODEL_BARRETT_2050 RIG_MAKE_MODEL(RIG_BARRETT, 1)
/*
* TODO: /*
RIG_MODEL_KWZ30, KNEISNER +DOERING * TODO:
RIG_MODEL_E1800, DASA-Telefunken RIG_MODEL_KWZ30, KNEISNER +DOERING
etc. RIG_MODEL_E1800, DASA-Telefunken
*/ etc.
*/
/*! \typedef typedef int rig_model_t /*! \typedef typedef int rig_model_t
\brief Convenience type definition for rig model. \brief Convenience type definition for rig model.
*/ */
typedef int rig_model_t; typedef int rig_model_t;
/* /*
* struct rig_backend_list { * struct rig_backend_list {
* rig_model_t model; * rig_model_t model;
* const char *backend; * const char *backend;
* } rig_backend_list[] = RIG_LIST; * } rig_backend_list[] = RIG_LIST;
* *
* TODO: * TODO:
* *
{ RIG_RADIOSHACK, RIG_BACKEND_RADIOSHACK }, \ { RIG_RADIOSHACK, RIG_BACKEND_RADIOSHACK }, \
*/ */
#endif /* _RIGLIST_H */ #endif /* _RIGLIST_H */

Wyświetl plik

@ -30,11 +30,12 @@
* @{ * @{
*/ */
/*! \file rotator.h /**
* \file rotator.h
* \brief Hamlib rotator data structures. * \brief Hamlib rotator data structures.
* *
* This file contains the data structures and definitions for the Hamlib rotator API. * This file contains the data structures and declarations for the Hamlib
* see the rotator.c file for more details on the rotator API. * rotator API. see the rotator.c file for more details on the rotator API.
*/ */
@ -46,212 +47,247 @@ __BEGIN_DECLS
struct rot; struct rot;
struct rot_state; struct rot_state;
/*! \typedef typedef struct rot ROT
/**
* \typedef typedef struct rot ROT
* \brief Rotator structure definition (see rot for details). * \brief Rotator structure definition (see rot for details).
*/ */
typedef struct rot ROT; typedef struct rot ROT;
/*! \typedef typedef float elevation_t /**
* \typedef typedef float elevation_t
* \brief Type definition for elevation. * \brief Type definition for elevation.
* *
* The elevation_t type is used as parameter for the * The elevation_t type is used as parameter for the rot_set_position() and
* rot_set_position() and rot_get_position() functions. * rot_get_position() functions.
* *
* Unless specified otherwise, the unit of elevation_t is decimal degrees. * Unless specified otherwise, the unit of elevation_t is decimal degrees.
*/ */
/*! \typedef typedef float azimuth_t typedef float elevation_t;
/**
* \typedef typedef float azimuth_t
* \brief Type definition for azimuth. * \brief Type definition for azimuth.
* *
* The azimuth_t type is used as parameter for the * The azimuth_t type is used as parameter for the rot_set_position() and
* rot_set_position() and rot_get_position() functions. * rot_get_position() functions.
* *
* Unless specified otherwise, the unit of azimuth_t is decimal degrees. * Unless specified otherwise, the unit of azimuth_t is decimal degrees.
*/ */
typedef float elevation_t;
typedef float azimuth_t; typedef float azimuth_t;
/** \brief Token in the netrotctl protocol for returning error code */
/**
* \brief Token in the netrotctl protocol for returning error code
*/
#define NETROTCTL_RET "RPRT " #define NETROTCTL_RET "RPRT "
/*! \def ROT_RESET_ALL
* \brief A macro that returns the flag for the \b reset operation.
* \sa rot_reset(), rot_reset_t
*/
#define ROT_RESET_ALL 1
/*! \typedef typedef int rot_reset_t /**
* \def ROT_RESET_ALL
* \brief A macro that returns the flag for the \b reset operation.
* \sa rot_reset(), rot_reset_t()
*/
#define ROT_RESET_ALL 1
/**
* \typedef typedef int rot_reset_t
* \brief Type definition for rotator reset. * \brief Type definition for rotator reset.
* *
* The rot_reset_t type is used as parameter for * The rot_reset_t type is used as parameter for the rot_reset() API
* the rot_reset() API function. * function.
*/ */
typedef int rot_reset_t; typedef int rot_reset_t;
/** \brief Rotator type flags */ /**
* \brief Rotator type flags
*/
typedef enum { typedef enum {
ROT_FLAG_AZIMUTH = (1<<1), /*!< Azimuth */ ROT_FLAG_AZIMUTH = (1 << 1), /*!< Azimuth */
ROT_FLAG_ELEVATION = (1<<2) /*!< Elevation */ ROT_FLAG_ELEVATION = (1 << 2) /*!< Elevation */
} rot_type_t; } rot_type_t;
#define ROT_TYPE_MASK (ROT_FLAG_AZIMUTH|ROT_FLAG_ELEVATION) #define ROT_TYPE_MASK (ROT_FLAG_AZIMUTH|ROT_FLAG_ELEVATION)
#define ROT_TYPE_OTHER 0 #define ROT_TYPE_OTHER 0
#define ROT_TYPE_AZIMUTH ROT_FLAG_AZIMUTH #define ROT_TYPE_AZIMUTH ROT_FLAG_AZIMUTH
#define ROT_TYPE_ELEVATION ROT_FLAG_ELEVATION #define ROT_TYPE_ELEVATION ROT_FLAG_ELEVATION
#define ROT_TYPE_AZEL (ROT_FLAG_AZIMUTH|ROT_FLAG_ELEVATION) #define ROT_TYPE_AZEL (ROT_FLAG_AZIMUTH|ROT_FLAG_ELEVATION)
/*! \def ROT_MOVE_UP /**
* \def ROT_MOVE_UP
* \brief A macro that returns the flag for the \b UP direction. * \brief A macro that returns the flag for the \b UP direction.
* *
* This macro defines the value of the \b UP direction which can be * This macro defines the value of the \b UP direction which can be
* used with the rot_move() function. * used with the rot_move() function.
* *
* \sa rot_move(), ROT_MOVE_DOWN, ROT_MOVE_LEFT, ROT_MOVE_CCW, ROT_MOVE_RIGHT, ROT_MOVE_CW * \sa rot_move(), ROT_MOVE_DOWN, ROT_MOVE_LEFT, ROT_MOVE_CCW,
* ROT_MOVE_RIGHT, ROT_MOVE_CW
*/ */
/*! \def ROT_MOVE_DOWN #define ROT_MOVE_UP (1<<1)
/**
* \def ROT_MOVE_DOWN
* \brief A macro that returns the flag for the \b DOWN direction. * \brief A macro that returns the flag for the \b DOWN direction.
* *
* This macro defines the value of the \b DOWN direction which can be * This macro defines the value of the \b DOWN direction which can be
* used with the rot_move() function. * used with the rot_move() function.
* *
* \sa rot_move(), ROT_MOVE_UP, ROT_MOVE_LEFT, ROT_MOVE_CCW, ROT_MOVE_RIGHT, ROT_MOVE_CW * \sa rot_move(), ROT_MOVE_UP, ROT_MOVE_LEFT, ROT_MOVE_CCW, ROT_MOVE_RIGHT,
* ROT_MOVE_CW
*/ */
/*! \def ROT_MOVE_LEFT #define ROT_MOVE_DOWN (1<<2)
/**
* \def ROT_MOVE_LEFT
* \brief A macro that returns the flag for the \b LEFT direction. * \brief A macro that returns the flag for the \b LEFT direction.
* *
* This macro defines the value of the \b LEFT direction which can be * This macro defines the value of the \b LEFT direction which can be
* used with the rot_move function. * used with the rot_move function.
* *
* \sa rot_move(), ROT_MOVE_UP, ROT_MOVE_DOWN, ROT_MOVE_CCW, ROT_MOVE_RIGHT, ROT_MOVE_CW * \sa rot_move(), ROT_MOVE_UP, ROT_MOVE_DOWN, ROT_MOVE_CCW, ROT_MOVE_RIGHT,
* ROT_MOVE_CW
*/ */
/*! \def ROT_MOVE_CCW #define ROT_MOVE_LEFT (1<<3)
/**
* \def ROT_MOVE_CCW
* \brief A macro that returns the flag for the \b counterclockwise direction. * \brief A macro that returns the flag for the \b counterclockwise direction.
* *
* This macro defines the value of the \b counterclockwise direction which * This macro defines the value of the \b counterclockwise direction which
* can be used with the rot_move() function. This value is equivalent to * can be used with the rot_move() function. This value is equivalent to
* ROT_MOVE_LEFT . * ROT_MOVE_LEFT .
* *
* \sa rot_move(), ROT_MOVE_UP, ROT_MOVE_DOWN, ROT_MOVE_LEFT, ROT_MOVE_RIGHT, ROT_MOVE_CW * \sa rot_move(), ROT_MOVE_UP, ROT_MOVE_DOWN, ROT_MOVE_LEFT, ROT_MOVE_RIGHT,
* ROT_MOVE_CW
*/ */
/*! \def ROT_MOVE_RIGHT #define ROT_MOVE_CCW ROT_MOVE_LEFT
/**
* \def ROT_MOVE_RIGHT
* \brief A macro that returns the flag for the \b RIGHT direction. * \brief A macro that returns the flag for the \b RIGHT direction.
* *
* This macro defines the value of the \b RIGHT direction which can be used * This macro defines the value of the \b RIGHT direction which can be used
* with the rot_move() function. * with the rot_move() function.
* *
* \sa rot_move(), ROT_MOVE_UP, ROT_MOVE_DOWN, ROT_MOVE_LEFT, ROT_MOVE_CCW, ROT_MOVE_CW * \sa rot_move(), ROT_MOVE_UP, ROT_MOVE_DOWN, ROT_MOVE_LEFT, ROT_MOVE_CCW,
* ROT_MOVE_CW
*/ */
/*! \def ROT_MOVE_CW #define ROT_MOVE_RIGHT (1<<4)
/**
* \def ROT_MOVE_CW
* \brief A macro that returns the flag for the \b clockwise direction. * \brief A macro that returns the flag for the \b clockwise direction.
* *
* This macro defines the value of the \b clockwise direction wich can be * This macro defines the value of the \b clockwise direction wich can be
* used with the rot_move() function. This value is equivalent to * used with the rot_move() function. This value is equivalent to
* ROT_MOVE_RIGHT . * ROT_MOVE_RIGHT .
* *
* \sa rot_move(), ROT_MOVE_UP, ROT_MOVE_DOWN, ROT_MOVE_LEFT, ROT_MOVE_CCW, ROT_MOVE_RIGHT * \sa rot_move(), ROT_MOVE_UP, ROT_MOVE_DOWN, ROT_MOVE_LEFT, ROT_MOVE_CCW,
* ROT_MOVE_RIGHT
*/ */
#define ROT_MOVE_UP (1<<1) #define ROT_MOVE_CW ROT_MOVE_RIGHT
#define ROT_MOVE_DOWN (1<<2)
#define ROT_MOVE_LEFT (1<<3)
#define ROT_MOVE_CCW ROT_MOVE_LEFT
#define ROT_MOVE_RIGHT (1<<4)
#define ROT_MOVE_CW ROT_MOVE_RIGHT
/* Basic rot type, can store some useful
* info about different rotators. Each lib must /* Basic rot type, can store some useful info about different rotators. Each
* be able to populate this structure, so we can make * lib must be able to populate this structure, so we can make useful
* useful enquiries about capablilities. * enquiries about capablilities.
*/ */
/*! /**
* Rotator Caps * Rotator Caps
* \struct rot_caps * \struct rot_caps
* \brief Rotator data structure. * \brief Rotator data structure.
* *
* The main idea of this struct is that it will be defined by the backend * The main idea of this struct is that it will be defined by the backend
* rotator driver, and will remain readonly for the application. * rotator driver, and will remain readonly for the application. Fields that
* Fields that need to be modifiable by the application are * need to be modifiable by the application are copied into the struct
* copied into the struct rot_state, which is a kind of private * rot_state, which is a kind of private of the ROT instance.
* of the ROT instance. *
* This way, you can have several rigs running within the same application, * This way, you can have several rigs running within the same application,
* sharing the struct rot_caps of the backend, while keeping their own * sharing the struct rot_caps of the backend, while keeping their own
* customized data. * customized data.
* NB: don't move fields around, as backend depends on it when initializing *
* their caps. * n.b.: Don't move fields around, as the backends depend on it when
* initializing their caps.
*/ */
struct rot_caps { struct rot_caps {
rot_model_t rot_model; /*!< Rotator model. */ rot_model_t rot_model; /*!< Rotator model. */
const char *model_name; /*!< Model name. */ const char *model_name; /*!< Model name. */
const char *mfg_name; /*!< Manufacturer. */ const char *mfg_name; /*!< Manufacturer. */
const char *version; /*!< Driver version. */ const char *version; /*!< Driver version. */
const char *copyright; /*!< Copyright info. */ const char *copyright; /*!< Copyright info. */
enum rig_status_e status; /*!< Driver status. */ enum rig_status_e status; /*!< Driver status. */
int rot_type; /*!< Rotator type. */ int rot_type; /*!< Rotator type. */
enum rig_port_e port_type; /*!< Type of communication port. */ enum rig_port_e port_type; /*!< Type of communication port. */
int serial_rate_min; /*!< Minimal serial speed. */ int serial_rate_min; /*!< Minimal serial speed. */
int serial_rate_max; /*!< Maximal serial speed. */ int serial_rate_max; /*!< Maximal serial speed. */
int serial_data_bits; /*!< Number of data bits. */ int serial_data_bits; /*!< Number of data bits. */
int serial_stop_bits; /*!< Number of stop bits. */ int serial_stop_bits; /*!< Number of stop bits. */
enum serial_parity_e serial_parity; /*!< Parity. */ enum serial_parity_e serial_parity; /*!< Parity. */
enum serial_handshake_e serial_handshake; /*!< Handshake. */ enum serial_handshake_e serial_handshake; /*!< Handshake. */
int write_delay; /*!< Write delay. */ int write_delay; /*!< Write delay. */
int post_write_delay; /*!< Post-write delay. */ int post_write_delay; /*!< Post-write delay. */
int timeout; /*!< Timeout. */ int timeout; /*!< Timeout. */
int retry; /*!< Number of retry if command fails. */ int retry; /*!< Number of retry if command fails. */
/* /*
* Movement range, az is relative to North * Movement range, az is relative to North
* negative values allowed for overlap * negative values allowed for overlap
*/ */
azimuth_t min_az; /*!< Lower limit for azimuth (relative to North). */ azimuth_t min_az; /*!< Lower limit for azimuth (relative to North). */
azimuth_t max_az; /*!< Upper limit for azimuth (relative to North). */ azimuth_t max_az; /*!< Upper limit for azimuth (relative to North). */
elevation_t min_el; /*!< Lower limit for elevation. */ elevation_t
elevation_t max_el; /*!< Upper limit for elevation. */ min_el; /*!< Lower limit for elevation. */
elevation_t
max_el; /*!< Upper limit for elevation. */
const struct confparams *cfgparams; /*!< Configuration parametres. */ const struct confparams *cfgparams; /*!< Configuration parametres. */
const rig_ptr_t priv; /*!< Private data. */ const rig_ptr_t priv; /*!< Private data. */
/* /*
* Rot Admin API * Rot Admin API
* *
*/ */
int (*rot_init)(ROT *rot); int (*rot_init)(ROT *rot);
int (*rot_cleanup)(ROT *rot); int (*rot_cleanup)(ROT *rot);
int (*rot_open)(ROT *rot); int (*rot_open)(ROT *rot);
int (*rot_close)(ROT *rot); int (*rot_close)(ROT *rot);
int (*set_conf)(ROT *rot, token_t token, const char *val); int (*set_conf)(ROT *rot, token_t token, const char *val);
int (*get_conf)(ROT *rot, token_t token, char *val); int (*get_conf)(ROT *rot, token_t token, char *val);
/* /*
* General API commands, from most primitive to least.. :() * General API commands, from most primitive to least.. :()
* List Set/Get functions pairs * List Set/Get functions pairs
*/ */
int (*set_position)(ROT *rot, azimuth_t azimuth, elevation_t elevation); int (*set_position)(ROT *rot, azimuth_t azimuth, elevation_t elevation);
int (*get_position)(ROT *rot, azimuth_t *azimuth, elevation_t *elevation); int (*get_position)(ROT *rot, azimuth_t *azimuth, elevation_t *elevation);
int (*stop)(ROT *rot); int (*stop)(ROT *rot);
int (*park)(ROT *rot); int (*park)(ROT *rot);
int (*reset)(ROT *rot, rot_reset_t reset); int (*reset)(ROT *rot, rot_reset_t reset);
int (*move)(ROT *rot, int direction, int speed); int (*move)(ROT *rot, int direction, int speed);
/* get firmware info, etc. */ /* get firmware info, etc. */
const char* (*get_info)(ROT *rot); const char * (*get_info)(ROT *rot);
/* more to come... */ /* more to come... */
}; };
/*! /**
* Rotator state * Rotator state
* \struct rot_state * \struct rot_state
* \brief Live data and customized fields. * \brief Live data and customized fields.
@ -263,26 +299,27 @@ struct rot_caps {
* not be initialized like caps are. * not be initialized like caps are.
*/ */
struct rot_state { struct rot_state {
/* /*
* overridable fields * overridable fields
*/ */
azimuth_t min_az; /*!< Lower limit for azimuth (overridable). */ azimuth_t min_az; /*!< Lower limit for azimuth (overridable). */
azimuth_t max_az; /*!< Upper limit for azimuth (overridable). */ azimuth_t max_az; /*!< Upper limit for azimuth (overridable). */
elevation_t min_el; /*!< Lower limit for elevation (overridable). */ elevation_t min_el; /*!< Lower limit for elevation (overridable). */
elevation_t max_el; /*!< Upper limit for elevation (overridable). */ elevation_t max_el; /*!< Upper limit for elevation (overridable). */
/* /*
* non overridable fields, internal use * non overridable fields, internal use
*/ */
hamlib_port_t rotport; /*!< Rotator port (internal use). */ hamlib_port_t rotport; /*!< Rotator port (internal use). */
int comm_state; /*!< Comm port state, opened/closed. */ int comm_state; /*!< Comm port state, opened/closed. */
rig_ptr_t priv; /*!< Pointer to private rotator state data. */ rig_ptr_t priv; /*!< Pointer to private rotator state data. */
rig_ptr_t obj; /*!< Internal use by hamlib++ for event handling. */ rig_ptr_t obj; /*!< Internal use by hamlib++ for event handling. */
/* etc... */ /* etc... */
}; };
/** /**
* Rotator structure * Rotator structure
* \struct rot * \struct rot
@ -293,76 +330,166 @@ struct rot_state {
* rotator. A pointer to this structure is returned by the rot_init() API * rotator. A pointer to this structure is returned by the rot_init() API
* function and is passed as a parameter to every rotator specific API call. * function and is passed as a parameter to every rotator specific API call.
* *
* \sa rot_init(), rot_caps, rot_state * \sa rot_init(), rot_caps(), rot_state()
*/ */
struct rot { struct rot {
struct rot_caps *caps; /*!< Rotator caps. */ struct rot_caps *caps; /*!< Rotator caps. */
struct rot_state state; /*!< Rotator state. */ struct rot_state state; /*!< Rotator state. */
}; };
/* --------------- API function prototypes -----------------*/ /* --------------- API function prototypes -----------------*/
extern HAMLIB_EXPORT(ROT *) rot_init HAMLIB_PARAMS((rot_model_t rot_model)); extern HAMLIB_EXPORT(ROT *)
extern HAMLIB_EXPORT(int) rot_open HAMLIB_PARAMS((ROT *rot)); rot_init HAMLIB_PARAMS((rot_model_t rot_model));
extern HAMLIB_EXPORT(int) rot_close HAMLIB_PARAMS((ROT *rot));
extern HAMLIB_EXPORT(int) rot_cleanup HAMLIB_PARAMS((ROT *rot));
extern HAMLIB_EXPORT(int) rot_set_conf HAMLIB_PARAMS((ROT *rot, token_t token, const char *val)); extern HAMLIB_EXPORT(int)
extern HAMLIB_EXPORT(int) rot_get_conf HAMLIB_PARAMS((ROT *rot, token_t token, char *val)); rot_open HAMLIB_PARAMS((ROT *rot));
/*
* General API commands, from most primitive to least.. )
* List Set/Get functions pairs
*/
extern HAMLIB_EXPORT(int) rot_set_position HAMLIB_PARAMS((ROT *rot, azimuth_t azimuth, elevation_t elevation));
extern HAMLIB_EXPORT(int) rot_get_position HAMLIB_PARAMS((ROT *rot, azimuth_t *azimuth, elevation_t *elevation));
extern HAMLIB_EXPORT(int) rot_stop HAMLIB_PARAMS((ROT *rot));
extern HAMLIB_EXPORT(int) rot_park HAMLIB_PARAMS((ROT *rot));
extern HAMLIB_EXPORT(int) rot_reset HAMLIB_PARAMS((ROT *rot, rot_reset_t reset));
extern HAMLIB_EXPORT(int) rot_move HAMLIB_PARAMS((ROT *rot, int direction, int speed));
extern HAMLIB_EXPORT(const char*) rot_get_info HAMLIB_PARAMS((ROT *rot));
extern HAMLIB_EXPORT(int) rot_register HAMLIB_PARAMS((const struct rot_caps *caps)); extern HAMLIB_EXPORT(int)
extern HAMLIB_EXPORT(int) rot_unregister HAMLIB_PARAMS((rot_model_t rot_model)); rot_close HAMLIB_PARAMS((ROT *rot));
extern HAMLIB_EXPORT(int) rot_list_foreach HAMLIB_PARAMS((int (*cfunc)(const struct rot_caps*, rig_ptr_t), rig_ptr_t data));
extern HAMLIB_EXPORT(int) rot_load_backend HAMLIB_PARAMS((const char *be_name));
extern HAMLIB_EXPORT(int) rot_check_backend HAMLIB_PARAMS((rot_model_t rot_model));
extern HAMLIB_EXPORT(int) rot_load_all_backends HAMLIB_PARAMS((void));
extern HAMLIB_EXPORT(rot_model_t) rot_probe_all HAMLIB_PARAMS((hamlib_port_t *p));
extern HAMLIB_EXPORT(int) rot_token_foreach HAMLIB_PARAMS((ROT *rot, int (*cfunc)(const struct confparams *, rig_ptr_t), rig_ptr_t data)); extern HAMLIB_EXPORT(int)
extern HAMLIB_EXPORT(const struct confparams*) rot_confparam_lookup HAMLIB_PARAMS((ROT *rot, const char *name)); rot_cleanup HAMLIB_PARAMS((ROT *rot));
extern HAMLIB_EXPORT(token_t) rot_token_lookup HAMLIB_PARAMS((ROT *rot, const char *name));
extern HAMLIB_EXPORT(const struct rot_caps *) rot_get_caps HAMLIB_PARAMS((rot_model_t rot_model)); extern HAMLIB_EXPORT(int)
rot_set_conf HAMLIB_PARAMS((ROT *rot,
token_t token,
const char *val));
extern HAMLIB_EXPORT(int)
rot_get_conf HAMLIB_PARAMS((ROT *rot,
token_t token,
char *val));
extern HAMLIB_EXPORT(int) qrb HAMLIB_PARAMS((double lon1, double lat1, /*
double lon2, double lat2, * General API commands, from most primitive to least.. )
double *distance, double *azimuth)); * List Set/Get functions pairs
extern HAMLIB_EXPORT(double) distance_long_path HAMLIB_PARAMS((double distance)); */
extern HAMLIB_EXPORT(double) azimuth_long_path HAMLIB_PARAMS((double azimuth)); extern HAMLIB_EXPORT(int)
rot_set_position HAMLIB_PARAMS((ROT *rot,
azimuth_t azimuth,
elevation_t elevation));
extern HAMLIB_EXPORT(int)
rot_get_position HAMLIB_PARAMS((ROT *rot,
azimuth_t *azimuth,
elevation_t *elevation));
extern HAMLIB_EXPORT(int) longlat2locator HAMLIB_PARAMS((double longitude, extern HAMLIB_EXPORT(int)
double latitude, char *locator_res, int pair_count)); rot_stop HAMLIB_PARAMS((ROT *rot));
extern HAMLIB_EXPORT(int) locator2longlat HAMLIB_PARAMS((double *longitude,
double *latitude, const char *locator));
extern HAMLIB_EXPORT(double) dms2dec HAMLIB_PARAMS((int degrees, int minutes, extern HAMLIB_EXPORT(int)
double seconds, int sw)); rot_park HAMLIB_PARAMS((ROT *rot));
extern HAMLIB_EXPORT(int) dec2dms HAMLIB_PARAMS((double dec, int *degrees,
int *minutes, double *seconds, int *sw));
extern HAMLIB_EXPORT(int) dec2dmmm HAMLIB_PARAMS((double dec, int *degrees, extern HAMLIB_EXPORT(int)
double *minutes, int *sw)); rot_reset HAMLIB_PARAMS((ROT *rot,
extern HAMLIB_EXPORT(double) dmmm2dec HAMLIB_PARAMS((int degrees, rot_reset_t reset));
double minutes, int sw));
/*! \def rot_debug extern HAMLIB_EXPORT(int)
rot_move HAMLIB_PARAMS((ROT *rot,
int direction,
int speed));
extern HAMLIB_EXPORT(const char *)
rot_get_info HAMLIB_PARAMS((ROT *rot));
extern HAMLIB_EXPORT(int)
rot_register HAMLIB_PARAMS((const struct rot_caps *caps));
extern HAMLIB_EXPORT(int)
rot_unregister HAMLIB_PARAMS((rot_model_t rot_model));
extern HAMLIB_EXPORT(int)
rot_list_foreach HAMLIB_PARAMS((int (*cfunc)(const struct rot_caps *,
rig_ptr_t),
rig_ptr_t data));
extern HAMLIB_EXPORT(int)
rot_load_backend HAMLIB_PARAMS((const char *be_name));
extern HAMLIB_EXPORT(int)
rot_check_backend HAMLIB_PARAMS((rot_model_t rot_model));
extern HAMLIB_EXPORT(int)
rot_load_all_backends HAMLIB_PARAMS((void));
extern HAMLIB_EXPORT(rot_model_t)
rot_probe_all HAMLIB_PARAMS((hamlib_port_t *p));
extern HAMLIB_EXPORT(int)
rot_token_foreach HAMLIB_PARAMS((ROT *rot,
int (*cfunc)(const struct confparams *,
rig_ptr_t),
rig_ptr_t data));
extern HAMLIB_EXPORT(const struct confparams *)
rot_confparam_lookup HAMLIB_PARAMS((ROT *rot,
const char *name));
extern HAMLIB_EXPORT(token_t)
rot_token_lookup HAMLIB_PARAMS((ROT *rot,
const char *name));
extern HAMLIB_EXPORT(const struct rot_caps *)
rot_get_caps HAMLIB_PARAMS((rot_model_t rot_model));
extern HAMLIB_EXPORT(int)
qrb HAMLIB_PARAMS((double lon1,
double lat1,
double lon2,
double lat2,
double *distance,
double *azimuth));
extern HAMLIB_EXPORT(double)
distance_long_path HAMLIB_PARAMS((double distance));
extern HAMLIB_EXPORT(double)
azimuth_long_path HAMLIB_PARAMS((double azimuth));
extern HAMLIB_EXPORT(int)
longlat2locator HAMLIB_PARAMS((double longitude,
double latitude,
char *locator_res,
int pair_count));
extern HAMLIB_EXPORT(int)
locator2longlat HAMLIB_PARAMS((double *longitude,
double *latitude,
const char *locator));
extern HAMLIB_EXPORT(double)
dms2dec HAMLIB_PARAMS((int degrees,
int minutes,
double seconds,
int sw));
extern HAMLIB_EXPORT(int)
dec2dms HAMLIB_PARAMS((double dec,
int *degrees,
int *minutes,
double *seconds,
int *sw));
extern HAMLIB_EXPORT(int)
dec2dmmm HAMLIB_PARAMS((double dec,
int *degrees,
double *minutes,
int *sw));
extern HAMLIB_EXPORT(double)
dmmm2dec HAMLIB_PARAMS((int degrees,
double minutes,
int sw));
/**
* \def rot_debug
* \brief Convenience definition for debug level. * \brief Convenience definition for debug level.
* *
* This is just as convenience definition of the rotator debug level, * This is just as convenience definition of the rotator debug level,
* and is the same as for the rig debug level. * and is the same as for the rig debug level.
* *
* \sa rig_debug * \sa rig_debug()
*/ */
#define rot_debug rig_debug #define rot_debug rig_debug

Wyświetl plik

@ -26,39 +26,40 @@
class BACKEND_IMPEXP Rotator { class BACKEND_IMPEXP Rotator
{
private: private:
ROT* theRot; // Global ref. to the rot ROT *theRot; // Global ref. to the rot
protected: protected:
public: public:
Rotator(rot_model_t rot_model); Rotator(rot_model_t rot_model);
virtual ~Rotator(); virtual ~Rotator();
const struct rot_caps *caps; const struct rot_caps *caps;
// This method open the communication port to the rot // This method opens the communication port to the rot
void open(void); void open(void);
// This method close the communication port to the rot // This method closes the communication port to the rot
void close(void); void close(void);
void setConf(token_t token, const char *val); void setConf(token_t token, const char *val);
void setConf(const char *name, const char *val); void setConf(const char *name, const char *val);
void getConf(token_t token, char *val); void getConf(token_t token, char *val);
void getConf(const char *name, char *val); void getConf(const char *name, char *val);
token_t tokenLookup(const char *name); token_t tokenLookup(const char *name);
void setPosition(azimuth_t az, elevation_t el); void setPosition(azimuth_t az, elevation_t el);
void getPosition(azimuth_t& az, elevation_t& el); void getPosition(azimuth_t& az, elevation_t& el);
void stop(); void stop();
void park(); void park();
void reset (rot_reset_t reset); void reset(rot_reset_t reset);
void move(int direction, int speed); void move(int direction, int speed);
}; };
#endif // _ROTCLASS_H #endif // _ROTCLASS_H

Wyświetl plik

@ -26,29 +26,35 @@
#define ROT_MAKE_MODEL(a,b) ((a)*100+(b)) #define ROT_MAKE_MODEL(a,b) ((a)*100+(b))
#define ROT_BACKEND_NUM(a) ((a)/100) #define ROT_BACKEND_NUM(a) ((a)/100)
/** /**
* \addtogroup rotator * \addtogroup rotator
* @{ * @{
*/ */
/*! \file rotlist.h /**
* \file rotlist.h
* \brief Hamlib rotator model definitions. * \brief Hamlib rotator model definitions.
* *
* This file contains rotator model definitions for the Hamlib rotator API. * This file contains rotator model definitions for the Hamlib rotator API.
* Each distinct rotator type has a unique model number (ID) and is used * Each distinct rotator type has a unique model number (ID) and is used by
* by hamlib to identify and distinguish between the different hardware drivers. * hamlib to identify and distinguish between the different hardware drivers.
* The exact model numbers can be acquired using the macros in this * The exact model numbers can be acquired using the macros in this file. To
* file. To obtain a list of supported rotator branches, one can use the statically * obtain a list of supported rotator branches, one can use the statically
* defined ROT_BACKEND_LIST macro. To obtain a full list of supported rotators (including * defined ROT_BACKEND_LIST macro. To obtain a full list of supported
* each model in every branch), the foreach_opened_rot() API function can be used. * rotators (including each model in every branch), the foreach_opened_rot()
* API function can be used.
* *
* The model number, or ID, is used to tell hamlib, which rotator the client whishes to * The model number, or ID, is used to tell Hamlib which rotator the client
* use. It is done with the rot_init() API call. * whishes to use. It is done with the rot_init() API call.
*/ */
#define ROT_MODEL_NONE 0 #define ROT_MODEL_NONE 0
/*! \def ROT_MODEL_DUMMY
/**
* \def ROT_MODEL_DUMMY
* \brief A macro that returns the model number for the dummy backend. * \brief A macro that returns the model number for the dummy backend.
* *
* The dummy backend, as the name suggests, is a backend which performs * The dummy backend, as the name suggests, is a backend which performs
@ -56,7 +62,8 @@
* be thought of as a hardware simulator and is very usefull for testing * be thought of as a hardware simulator and is very usefull for testing
* client applications. * client applications.
*/ */
/*! \def ROT_MODEL_NETROTCTL /**
* \def ROT_MODEL_NETROTCTL
* \brief A macro that returns the model number for the Network backend. * \brief A macro that returns the model number for the Network backend.
* *
* This backend allows use of the rotctld daemon through the normal * This backend allows use of the rotctld daemon through the normal
@ -67,16 +74,20 @@
#define ROT_MODEL_DUMMY ROT_MAKE_MODEL(ROT_DUMMY, 1) #define ROT_MODEL_DUMMY ROT_MAKE_MODEL(ROT_DUMMY, 1)
#define ROT_MODEL_NETROTCTL ROT_MAKE_MODEL(ROT_DUMMY, 2) #define ROT_MODEL_NETROTCTL ROT_MAKE_MODEL(ROT_DUMMY, 2)
/*
* Easycomm /*
*/ * Easycomm
/*! \def ROT_MODEL_EASYCOMM1 */
/**
* \def ROT_MODEL_EASYCOMM1
* \brief A macro that returns the model number of the EasyComm 1 backend. * \brief A macro that returns the model number of the EasyComm 1 backend.
* *
* The EasyComm 1 backend can be used with rotators that support the * The EasyComm 1 backend can be used with rotators that support the
* EASYCOMM I Standard. * EASYCOMM I Standard.
*/ */
/*! \def ROT_MODEL_EASYCOMM2 /**
* \def ROT_MODEL_EASYCOMM2
* \brief A macro that returns the model number of the EasyComm 2 backend. * \brief A macro that returns the model number of the EasyComm 2 backend.
* *
* The EasyComm 2 backend can be used with rotators that support the * The EasyComm 2 backend can be used with rotators that support the
@ -89,7 +100,9 @@
#define ROT_MODEL_TRAKBOX ROT_MAKE_MODEL(ROT_EASYCOMM, 3) #define ROT_MODEL_TRAKBOX ROT_MAKE_MODEL(ROT_EASYCOMM, 3)
#define ROT_MODEL_EASYCOMM3 ROT_MAKE_MODEL(ROT_EASYCOMM, 4) #define ROT_MODEL_EASYCOMM3 ROT_MAKE_MODEL(ROT_EASYCOMM, 4)
/*! \def ROT_MODEL_FODTRACK
/**
* \def ROT_MODEL_FODTRACK
* \brief A macro that returns the model number of the Fodtrack backend. * \brief A macro that returns the model number of the Fodtrack backend.
* *
* The Fodtrack backend can be used with rotators that support the * The Fodtrack backend can be used with rotators that support the
@ -99,35 +112,41 @@
#define ROT_BACKEND_FODTRACK "fodtrack" #define ROT_BACKEND_FODTRACK "fodtrack"
#define ROT_MODEL_FODTRACK ROT_MAKE_MODEL(ROT_FODTRACK, 1) #define ROT_MODEL_FODTRACK ROT_MAKE_MODEL(ROT_FODTRACK, 1)
/*! \def ROT_MODEL_ROTOREZ
/**
* \def ROT_MODEL_ROTOREZ
* \brief A macro that returns the model number of the Rotor-EZ backend. * \brief A macro that returns the model number of the Rotor-EZ backend.
* *
* The Rotor-EZ backend can be used with Hy-Gain rotators that support * The Rotor-EZ backend can be used with Hy-Gain rotators that support
* the extended DCU command set by Idiom Press Rotor-EZ board. * the extended DCU command set by Idiom Press Rotor-EZ board.
*/ */
/*! \def ROT_MODEL_ROTORCARD /**
* \def ROT_MODEL_ROTORCARD
* \brief A macro that returns the model number of the Rotor Card backend. * \brief A macro that returns the model number of the Rotor Card backend.
* *
* The Rotor-EZ backend can be used with Yaesu rotators that support the * The Rotor-EZ backend can be used with Yaesu rotators that support the
* extended DCU command set by Idiom Press Rotor Card board. * extended DCU command set by Idiom Press Rotor Card board.
*/ */
/*! \def ROT_MODEL_DCU /**
* \def ROT_MODEL_DCU
* \brief A macro that returns the model number of the DCU backend. * \brief A macro that returns the model number of the DCU backend.
* *
* The Rotor-EZ backend can be used with rotators that support the * The Rotor-EZ backend can be used with rotators that support the DCU
* DCU command set by Hy-Gain (currently the DCU-1). * command set by Hy-Gain (currently the DCU-1).
*/ */
/*! \def ROT_MODEL_ERC /**
* \def ROT_MODEL_ERC
* \brief A macro that returns the model number of the ERC backend. * \brief A macro that returns the model number of the ERC backend.
* *
* The Rotor-EZ backend can be used with rotators that support the * The Rotor-EZ backend can be used with rotators that support the DCU
* DCU command set by DF9GR (currently the ERC). * command set by DF9GR (currently the ERC).
*/ */
/*! \def ROT_MODEL_RT21 /**
* \def ROT_MODEL_RT21
* \brief A macro that returns the model number of the RT21 backend. * \brief A macro that returns the model number of the RT21 backend.
* *
* The Rotor-EZ backend can be used with rotators that support the * The Rotor-EZ backend can be used with rotators that support the DCU
* DCU command set by Green Heron (currently the RT-21). * command set by Green Heron (currently the RT-21).
*/ */
#define ROT_ROTOREZ 4 #define ROT_ROTOREZ 4
#define ROT_BACKEND_ROTOREZ "rotorez" #define ROT_BACKEND_ROTOREZ "rotorez"
@ -137,35 +156,42 @@
#define ROT_MODEL_ERC ROT_MAKE_MODEL(ROT_ROTOREZ, 4) #define ROT_MODEL_ERC ROT_MAKE_MODEL(ROT_ROTOREZ, 4)
#define ROT_MODEL_RT21 ROT_MAKE_MODEL(ROT_ROTOREZ, 5) #define ROT_MODEL_RT21 ROT_MAKE_MODEL(ROT_ROTOREZ, 5)
/*! \def ROT_MODEL_SARTEK1
/**
* \def ROT_MODEL_SARTEK1
* \brief A macro that returns the model number of the SARtek-1 backend. * \brief A macro that returns the model number of the SARtek-1 backend.
* *
* The sartek backend can be used with rotators that support the * The sartek backend can be used with rotators that support the SARtek
* SARtek protocol. * protocol.
*/ */
#define ROT_SARTEK 5 #define ROT_SARTEK 5
#define ROT_BACKEND_SARTEK "sartek" #define ROT_BACKEND_SARTEK "sartek"
#define ROT_MODEL_SARTEK1 ROT_MAKE_MODEL(ROT_SARTEK, 1) #define ROT_MODEL_SARTEK1 ROT_MAKE_MODEL(ROT_SARTEK, 1)
/*! \def ROT_MODEL_GS232A
/**
* \def ROT_MODEL_GS232A
* \brief A macro that returns the model number of the GS-232A backend. * \brief A macro that returns the model number of the GS-232A backend.
* *
* The GS-232A backend can be used with rotators that support the * The GS-232A backend can be used with rotators that support the GS-232A
* GS-232A protocol. * protocol.
*/ */
/*! \def ROT_MODEL_GS232 /**
* \def ROT_MODEL_GS232
* \brief A macro that returns the model number of the GS-232 backend. * \brief A macro that returns the model number of the GS-232 backend.
* *
* The GS-232 backend can be used with rotators that support the * The GS-232 backend can be used with rotators that support the GS-232
* GS-232 protocol. * protocol.
*/ */
/*! \def ROT_MODEL_GS232B /**
* \def ROT_MODEL_GS232B
* \brief A macro that returns the model number of the GS-232B backend. * \brief A macro that returns the model number of the GS-232B backend.
* *
* The GS-232B backend can be used with rotators that support the * The GS-232B backend can be used with rotators that support the GS-232B
* GS-232B protocol. * protocol.
*/ */
/*! \def ROT_MODEL_F1TETRACKER /**
* \def ROT_MODEL_F1TETRACKER
* \brief A macro that returns the model number of the F1TETRACKER backend. * \brief A macro that returns the model number of the F1TETRACKER backend.
* *
* The F1TETRACKER backend can be used with rotators that support the * The F1TETRACKER backend can be used with rotators that support the
@ -178,7 +204,9 @@
#define ROT_MODEL_GS232B ROT_MAKE_MODEL(ROT_GS232A, 3) #define ROT_MODEL_GS232B ROT_MAKE_MODEL(ROT_GS232A, 3)
#define ROT_MODEL_F1TETRACKER ROT_MAKE_MODEL(ROT_GS232A, 4) #define ROT_MODEL_F1TETRACKER ROT_MAKE_MODEL(ROT_GS232A, 4)
/*! \def ROT_MODEL_PCROTOR
/**
* \def ROT_MODEL_PCROTOR
* \brief A macro that returns the model number of the PcRotor/WA6UFQ backend. * \brief A macro that returns the model number of the PcRotor/WA6UFQ backend.
* *
* The kit backend can be used with home brewed rotators. * The kit backend can be used with home brewed rotators.
@ -187,30 +215,33 @@
#define ROT_BACKEND_KIT "kit" #define ROT_BACKEND_KIT "kit"
#define ROT_MODEL_PCROTOR ROT_MAKE_MODEL(ROT_KIT, 1) #define ROT_MODEL_PCROTOR ROT_MAKE_MODEL(ROT_KIT, 1)
/*! \def ROT_MODEL_HD1780
/**
* \def ROT_MODEL_HD1780
* \brief A macro that returns the model number of the HD 1780 backend. * \brief A macro that returns the model number of the HD 1780 backend.
*/ */
#define ROT_HEATHKIT 8 #define ROT_HEATHKIT 8
#define ROT_BACKEND_HEATHKIT "heathkit" #define ROT_BACKEND_HEATHKIT "heathkit"
#define ROT_MODEL_HD1780 ROT_MAKE_MODEL(ROT_HEATHKIT, 1) #define ROT_MODEL_HD1780 ROT_MAKE_MODEL(ROT_HEATHKIT, 1)
/*! \def ROT_MODEL_SPID_ROT2PROG
/**
* \def ROT_MODEL_SPID_ROT2PROG
* \brief A macro that returns the model number of the ROT2PROG backend. * \brief A macro that returns the model number of the ROT2PROG backend.
* *
* The SPID backend can be used with rotators that support the SPID * The SPID backend can be used with rotators that support the SPID protocol.
* protocol.
*/ */
/*! \def ROT_MODEL_SPID_ROT1PROG /**
* \def ROT_MODEL_SPID_ROT1PROG
* \brief A macro that returns the model number of the ROT1PROG backend. * \brief A macro that returns the model number of the ROT1PROG backend.
* *
* The SPID backend can be used with rotators that support the SPID * The SPID backend can be used with rotators that support the SPID protocol.
* protocol.
*/ */
/*! \def ROT_MODEL_SPID_MD01_ROT2PROG \brief A macro that returns the /**
* model number of the MD-01/02 (ROT2PROG protocol) backend. * \def ROT_MODEL_SPID_MD01_ROT2PROG
* \brief A macro that returns the model number of the MD-01/02 (ROT2PROG protocol) backend.
* *
* The SPID backend can be used with rotators that support the SPID * The SPID backend can be used with rotators that support the SPID protocol.
* protocol.
*/ */
#define ROT_SPID 9 #define ROT_SPID 9
#define ROT_BACKEND_SPID "spid" #define ROT_BACKEND_SPID "spid"
@ -218,45 +249,51 @@
#define ROT_MODEL_SPID_ROT1PROG ROT_MAKE_MODEL(ROT_SPID, 2) #define ROT_MODEL_SPID_ROT1PROG ROT_MAKE_MODEL(ROT_SPID, 2)
#define ROT_MODEL_SPID_MD01_ROT2PROG ROT_MAKE_MODEL(ROT_SPID, 3) #define ROT_MODEL_SPID_MD01_ROT2PROG ROT_MAKE_MODEL(ROT_SPID, 3)
/*! \def ROT_MODEL_RC2800
/**
* \def ROT_MODEL_RC2800
* \brief A macro that returns the model number of the RC2800 backend. * \brief A macro that returns the model number of the RC2800 backend.
* *
* The M2 backend can be used with rotators that support the RC2800 * The M2 backend can be used with rotators that support the RC2800 protocol
* protocol and alike. * and alike.
*/ */
#define ROT_M2 10 #define ROT_M2 10
#define ROT_BACKEND_M2 "m2" #define ROT_BACKEND_M2 "m2"
#define ROT_MODEL_RC2800 ROT_MAKE_MODEL(ROT_M2, 1) #define ROT_MODEL_RC2800 ROT_MAKE_MODEL(ROT_M2, 1)
/*! \def ROT_MODEL_RCI_AZEL
/**
* \def ROT_MODEL_RCI_AZEL
* \brief A macro that returns the model number of the RCI_AZEL backend. * \brief A macro that returns the model number of the RCI_AZEL backend.
* *
* The ARS backend can be used with rotators that support the ARS * The ARS backend can be used with rotators that support the ARS protocol.
* protocol.
*/ */
/*! \def ROT_MODEL_RCI_AZ /**
* \def ROT_MODEL_RCI_AZ
* \brief A macro that returns the model number of the RCI_AZ backend. * \brief A macro that returns the model number of the RCI_AZ backend.
* *
* The ARS backend can be used with rotators that support the ARS * The ARS backend can be used with rotators that support the ARS protocol.
* protocol.
*/ */
#define ROT_ARS 11 #define ROT_ARS 11
#define ROT_BACKEND_ARS "ars" #define ROT_BACKEND_ARS "ars"
#define ROT_MODEL_RCI_AZEL ROT_MAKE_MODEL(ROT_ARS, 1) #define ROT_MODEL_RCI_AZEL ROT_MAKE_MODEL(ROT_ARS, 1)
#define ROT_MODEL_RCI_AZ ROT_MAKE_MODEL(ROT_ARS, 2) #define ROT_MODEL_RCI_AZ ROT_MAKE_MODEL(ROT_ARS, 2)
/*! \def ROT_MODEL_IF100
/**
* \def ROT_MODEL_IF100
* \brief A macro that returns the model number of the IF-100 backend. * \brief A macro that returns the model number of the IF-100 backend.
* *
* The AMSAT backend can be used with rotators that support, * The AMSAT backend can be used with rotators that support, among other, the
* among other, the IF-100 interface. * IF-100 interface.
*/ */
#define ROT_AMSAT 12 #define ROT_AMSAT 12
#define ROT_BACKEND_AMSAT "amsat" #define ROT_BACKEND_AMSAT "amsat"
#define ROT_MODEL_IF100 ROT_MAKE_MODEL(ROT_AMSAT, 1) #define ROT_MODEL_IF100 ROT_MAKE_MODEL(ROT_AMSAT, 1)
/*! \def ROT_MODEL_TS7400 /**
* \def ROT_MODEL_TS7400
* \brief A macro that returns the model number of the TS7400 backend. * \brief A macro that returns the model number of the TS7400 backend.
* *
* The TS-7400 backend supports and embedded ARM board using the TS-7400 * The TS-7400 backend supports and embedded ARM board using the TS-7400
@ -266,7 +303,9 @@
#define ROT_BACKEND_TS7400 "ts7400" #define ROT_BACKEND_TS7400 "ts7400"
#define ROT_MODEL_TS7400 ROT_MAKE_MODEL(ROT_TS7400, 1) #define ROT_MODEL_TS7400 ROT_MAKE_MODEL(ROT_TS7400, 1)
/*! \def ROT_MODEL_NEXSTAR
/**
* \def ROT_MODEL_NEXSTAR
* \brief A macro that returns the model number of the NEXSTAR backend. * \brief A macro that returns the model number of the NEXSTAR backend.
* *
* The CELESTRON backend can be used with rotators that support the Celestron * The CELESTRON backend can be used with rotators that support the Celestron
@ -276,7 +315,9 @@
#define ROT_BACKEND_CELESTRON "celestron" #define ROT_BACKEND_CELESTRON "celestron"
#define ROT_MODEL_NEXSTAR ROT_MAKE_MODEL(ROT_CELESTRON, 1) #define ROT_MODEL_NEXSTAR ROT_MAKE_MODEL(ROT_CELESTRON, 1)
/*! \def ROT_MODEL_ETHER6
/**
* \def ROT_MODEL_ETHER6
* \brief A macro that returns the model number of the Ether6 backend. * \brief A macro that returns the model number of the Ether6 backend.
* *
* The Ether6 backend can be used with rotators that support the Ether6 * The Ether6 backend can be used with rotators that support the Ether6
@ -287,18 +328,20 @@
#define ROT_MODEL_ETHER6 ROT_MAKE_MODEL(ROT_ETHER6, 1) #define ROT_MODEL_ETHER6 ROT_MAKE_MODEL(ROT_ETHER6, 1)
/*! \def ROT_MODEL_CNCTRK /**
* \def ROT_MODEL_CNCTRK
* \brief A macro that returns the model number of the CNCTRK backend. * \brief A macro that returns the model number of the CNCTRK backend.
* *
* The CNCTRK backend can be used with rotators that support, * The CNCTRK backend can be used with rotators that support the LinuxCNC
* the LinuxCNC running Axis GUI interface. * running Axis GUI interface.
*/ */
#define ROT_CNCTRK 16 #define ROT_CNCTRK 16
#define ROT_BACKEND_CNCTRK "cnctrk" #define ROT_BACKEND_CNCTRK "cnctrk"
#define ROT_MODEL_CNCTRK ROT_MAKE_MODEL(ROT_CNCTRK, 1) #define ROT_MODEL_CNCTRK ROT_MAKE_MODEL(ROT_CNCTRK, 1)
/*! \def ROT_MODEL_PROSISTEL /**
* \def ROT_MODEL_PROSISTEL
* \brief A macro that returns the model number of the PROSISTEL backend. * \brief A macro that returns the model number of the PROSISTEL backend.
* *
*/ */
@ -307,11 +350,13 @@
#define ROT_MODEL_PROSISTEL ROT_MAKE_MODEL(ROT_PROSISTEL, 1) #define ROT_MODEL_PROSISTEL ROT_MAKE_MODEL(ROT_PROSISTEL, 1)
/*! \typedef typedef int rot_model_t /**
\brief Convenience type definition for rotator model. * \typedef typedef int rot_model_t
* \brief Convenience type definition for rotator model.
*/ */
typedef int rot_model_t; typedef int rot_model_t;
#endif /* _ROTLIST_H */ #endif /* _ROTLIST_H */
/** @} */ /** @} */

Wyświetl plik

@ -30,7 +30,11 @@ extern "C" {
#endif #endif
/* TODO: what about SleepEx? */ /* TODO: what about SleepEx? */
static inline unsigned int sleep(unsigned int nb_sec) { Sleep(nb_sec*1000); return 0; } static inline unsigned int sleep(unsigned int nb_sec)
{
Sleep(nb_sec * 1000);
return 0;
}
#ifdef __cplusplus #ifdef __cplusplus
} }

Wyświetl plik

@ -34,30 +34,30 @@
* separator (float, ...) is not the dot. * separator (float, ...) is not the dot.
*/ */
#define num_sscanf(a...) \ #define num_sscanf(a...) \
({ int __ret; char *__savedlocale; \ ({ int __ret; char *__savedlocale; \
__savedlocale = setlocale(LC_NUMERIC, NULL); \ __savedlocale = setlocale(LC_NUMERIC, NULL); \
setlocale(LC_NUMERIC, "C"); \ setlocale(LC_NUMERIC, "C"); \
__ret = sscanf(a); \ __ret = sscanf(a); \
setlocale(LC_NUMERIC, __savedlocale); \ setlocale(LC_NUMERIC, __savedlocale); \
__ret; \ __ret; \
}) })
#define num_sprintf(s, a...) \ #define num_sprintf(s, a...) \
({ int __ret; char *__savedlocale; \ ({ int __ret; char *__savedlocale; \
__savedlocale = setlocale(LC_NUMERIC, NULL); \ __savedlocale = setlocale(LC_NUMERIC, NULL); \
setlocale(LC_NUMERIC, "C"); \ setlocale(LC_NUMERIC, "C"); \
__ret = sprintf(s, a); \ __ret = sprintf(s, a); \
setlocale(LC_NUMERIC, __savedlocale); \ setlocale(LC_NUMERIC, __savedlocale); \
__ret; \ __ret; \
}) })
#define num_snprintf(s, n, a...) \ #define num_snprintf(s, n, a...) \
({ int __ret; char *__savedlocale; \ ({ int __ret; char *__savedlocale; \
__savedlocale = setlocale(LC_NUMERIC, NULL); \ __savedlocale = setlocale(LC_NUMERIC, NULL); \
setlocale(LC_NUMERIC, "C"); \ setlocale(LC_NUMERIC, "C"); \
__ret = snprintf(s, n, a); \ __ret = snprintf(s, n, a); \
setlocale(LC_NUMERIC, __savedlocale); \ setlocale(LC_NUMERIC, __savedlocale); \
__ret; \ __ret; \
}) })
#endif /* _NUM_STDIO_H */ #endif /* _NUM_STDIO_H */