forked from g4klx/MMDVMHost
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Conf.h
164 lines (137 loc) · 4.55 KB
/
Conf.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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
/*
* Copyright (C) 2015,2016 by Jonathan Naylor G4KLX
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#if !defined(CONF_H)
#define CONF_H
#include <string>
class CConf
{
public:
CConf(const std::string& file);
~CConf();
bool read();
// The General section
std::string getCallsign() const;
unsigned int getTimeout() const;
bool getDuplex() const;
unsigned int getModeHang() const;
std::string getDisplay() const;
// The Info section
unsigned int getRxFrequency() const;
unsigned int getTxFrequency() const;
unsigned int getPower() const;
float getLatitude() const;
float getLongitude() const;
int getHeight() const;
std::string getLocation() const;
std::string getDescription() const;
std::string getURL() const;
// The Log section
std::string getLogPath() const;
std::string getLogRoot() const;
unsigned int getLogLevel() const;
bool getLogDisplay() const;
// The Modem section
std::string getModemPort() const;
bool getModemRXInvert() const;
bool getModemTXInvert() const;
bool getModemPTTInvert() const;
unsigned int getModemTXDelay() const;
unsigned int getModemRXLevel() const;
unsigned int getModemTXLevel() const;
bool getModemDebug() const;
// The D-Star section
bool getDStarEnabled() const;
std::string getDStarModule() const;
// The DMR section
bool getDMREnabled() const;
bool getDMRBeacons() const;
unsigned int getDMRId() const;
unsigned int getDMRColorCode() const;
// The System Fusion section
bool getFusionEnabled() const;
// The D-Star Network section
bool getDStarNetworkEnabled() const;
std::string getDStarGatewayAddress() const;
unsigned int getDStarGatewayPort() const;
unsigned int getDStarLocalPort() const;
bool getDStarNetworkDebug() const;
// The DMR Network section
bool getDMRNetworkEnabled() const;
std::string getDMRNetworkAddress() const;
unsigned int getDMRNetworkPort() const;
std::string getDMRNetworkPassword() const;
bool getDMRNetworkDebug() const;
// The System Fusion Network section
bool getFusionNetworkEnabled() const;
std::string getFusionNetworkAddress() const;
unsigned int getFusionNetworkPort() const;
bool getFusionNetworkDebug() const;
// The TFTSERIAL section
std::string getTFTSerialPort() const;
private:
std::string m_file;
std::string m_callsign;
unsigned int m_timeout;
bool m_duplex;
unsigned int m_modeHang;
std::string m_display;
unsigned int m_rxFrequency;
unsigned int m_txFrequency;
unsigned int m_power;
float m_latitude;
float m_longitude;
int m_height;
std::string m_location;
std::string m_description;
std::string m_url;
unsigned int m_logLevel;
std::string m_logPath;
std::string m_logRoot;
bool m_logDisplay;
std::string m_modemPort;
bool m_modemRXInvert;
bool m_modemTXInvert;
bool m_modemPTTInvert;
unsigned int m_modemTXDelay;
unsigned int m_modemRXLevel;
unsigned int m_modemTXLevel;
bool m_modemDebug;
bool m_dstarEnabled;
std::string m_dstarModule;
bool m_dmrEnabled;
bool m_dmrBeacons;
unsigned int m_dmrId;
unsigned int m_dmrColorCode;
bool m_fusionEnabled;
bool m_dstarNetworkEnabled;
std::string m_dstarGatewayAddress;
unsigned int m_dstarGatewayPort;
unsigned int m_dstarLocalPort;
bool m_dstarNetworkDebug;
bool m_dmrNetworkEnabled;
std::string m_dmrNetworkAddress;
unsigned int m_dmrNetworkPort;
std::string m_dmrNetworkPassword;
bool m_dmrNetworkDebug;
bool m_fusionNetworkEnabled;
std::string m_fusionNetworkAddress;
unsigned int m_fusionNetworkPort;
bool m_fusionNetworkDebug;
std::string m_tftSerialPort;
};
#endif