forked from paulh002/sdrberry
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathSettings.h
75 lines (68 loc) · 1.66 KB
/
Settings.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
#pragma once
#include <cstdio>
#include <iostream>
#include <iterator>
#include <string>
#include <map>
#include "configfile.h"
#include "sdrberry.h"
using namespace std;
class Settings
{
public:
void read_settings(string settings_file);
void init_settings(string settings_file);
void write_settings();
string get_mac_address() {return mac_address; }
;
string find_audio(string key);
string find_radio(string key);
string find_probe(string key);
string find_sdr(string key);
long long find_vfo1_freq(string key);
string find_vfo1(string key);
string find_vfo2(string key);
double find_samplerate(string key);
double find_samplerate_tx(string key);
int volume();
int gain();
int txgain();
int micgain();
int drive();
int agc_delay();
int agc_slope();
int agc_threshold();
int agc_mode();
void set_drive(int drive);
void set_micgain(int gain);
void set_txgain(int gain);
void set_gain(int gain);
string find_input(string key);
string find_cat(string key);
int convert_mode(string s);
vector<int> meters;
vector<string> labels;
vector<long> f_low;
vector<long> f_high;
vector<int> address;
vector<int> command_rx;
vector<int> command_tx;
vector<string> mode;
vector <string> receivers;
private:
cfg::File *config;
string file;
string mac_address;
map<string, string> sdr;
map<string, string> radio;
map<string, string> probes;
map<string, string> vfo1;
map<string, string> vfo2;
map<string, string> audio;
map<string, string> samplerate;
map<string, string> samplerate_tx;
map<string, string> input_dev;
map<string, string> cat;
map<string, string> agc;
};
extern Settings Settings_file;