forked from wd8rde/libExtio_genesis
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgenesis.h
82 lines (76 loc) · 1.86 KB
/
genesis.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
#ifndef GENESIS_SDR_H_
#define GENESIS_SDR_H_
#include <string>
#include <vector>
#include "cmdbase.h"
#include "simpleini-master/SimpleIni.h"
class Genesis
{
public:
typedef struct _BandFilter_t
{
int index;
std::string band_str;
long low_freq;
long high_freq;
}BandFilter_t;
typedef std::vector<BandFilter_t> BandFilters_t;
Genesis(int productid);
virtual ~Genesis();
void register_observer(Genesis_Observer *p_observer);
std::string GetMake();
int GetVendorId();
virtual std::string GetModel() = 0;
virtual int GetProductId() = 0;
virtual bool Init();
virtual bool Close();
virtual bool SetLO(long freq);
virtual bool SetBand(long freq);
int FindBand(long freq);
bool SetTx(bool tx_enable);
void SetAtten(bool on);
void SetRFPreamp(bool on);
void SetWpm(int wpm);
void EnableLineMic(bool onoff);
void EnablePA10(bool onoff);
void SetKeyerRatio(float ratio_dot_to_dash);
void SetKeyerMode(int keyer_mode);
bool LoadConfigFile();
bool SaveConfigFile();
int m_vendorid;
int m_productid;
bool m_initialized;
bool m_hasMicPreamp;
bool m_hasPTTOut;
bool m_hasGPA10;
bool m_hasSECRX;
unsigned long m_tx_dropout_ms;
int m_keyer_mode;
int m_keyer_speed;
double m_keyer_ratio;
int m_current_filter;
long m_current_freq;
CSimpleIniA m_ini;
protected:
CmdBase *mp_cmd;
BandFilters_t m_bandfilters;
};
class G59: public Genesis
{
public:
G59();
virtual ~G59();
virtual int GetProductId();
virtual std::string GetModel();
static const BandFilters_t ms_g59_bandfilters;
};
class G11: public Genesis
{
public:
G11();
virtual ~G11();
virtual int GetProductId();
virtual std::string GetModel();
static const BandFilters_t ms_g11_bandfilters;
};
#endif /*GENESIS_SDR_H_*/