-
Notifications
You must be signed in to change notification settings - Fork 2
/
Conf.h
154 lines (127 loc) · 4.52 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
/*
* Copyright (C) 2015-2020 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.
*/
#pragma once
#include <string>
#include <vector>
class CConf
{
public:
CConf(const std::string& file);
~CConf();
bool read();
// The General section
std::string getCallsign() const;
bool getDuplex() const;
// The Info section
unsigned int getRXFrequency() const;
unsigned int getTXFrequency() const;
// The DMR Id section
std::string getDMRIdLookupFile() const;
unsigned int getDMRIdLookupTime() const;
// The Display section
std::string getDisplayServerAddress() const;
unsigned int getDisplayServerPort() const;
std::string getDisplayServerType() const;
bool getDisplayServerDebug() const;
bool getDisplayServerTrace() const;
unsigned int getLogLevel() const;
bool getSyslog() const;
// The Transparent Data section
bool getTransparentEnabled() const;
std::string getTransparentRemoteAddress() const;
unsigned short getTransparentRemotePort() const;
std::string getTransparentLocalAddress() const;
unsigned short getTransparentLocalPort() const;
unsigned int getTransparentSendFrameType() const;
// The DMR section
unsigned int getDMRId() const;
// The DMR Network section
bool getDMRNetworkSlot1() const;
bool getDMRNetworkSlot2() const;
// The TFTSERIAL section
std::string getTFTSerialPort() const;
unsigned int getTFTSerialBrightness() const;
// The Nextion section
std::string getNextionPort() const;
unsigned int getNextionBrightness() const;
bool getNextionDisplayClock() const;
bool getNextionUTC() const;
unsigned int getNextionIdleBrightness() const;
unsigned int getNextionScreenLayout() const;
bool getNextionTempInFahrenheit() const;
// The OLED section
unsigned char getOLEDType() const;
unsigned char getOLEDBrightness() const;
bool getOLEDInvert() const;
bool getOLEDScroll() const;
bool getOLEDRotate() const;
bool getOLEDLogoScreensaver() const;
// The LCDproc section
std::string getLCDprocAddress() const;
unsigned short getLCDprocPort() const;
unsigned short getLCDprocLocalPort() const;
bool getLCDprocDisplayClock() const;
bool getLCDprocUTC() const;
bool getLCDprocDimOnIdle() const;
private:
std::string m_file;
std::string m_callsign;
bool m_duplex;
std::string m_display;
std::string m_displayServerAddress;
unsigned int m_displayServerPort;
std::string m_displayServerType;
bool m_displayServerDebug;
bool m_displayServerTrace;
unsigned int m_rxFrequency;
unsigned int m_txFrequency;
bool m_transparentEnabled;
std::string m_transparentRemoteAddress;
unsigned short m_transparentRemotePort;
std::string m_transparentLocalAddress;
unsigned short m_transparentLocalPort;
unsigned int m_transparentSendFrameType;
std::string m_dmrIdLookupFile;
unsigned int m_dmrIdLookupTime;
unsigned int m_logLevel;
bool m_syslog;
unsigned int m_dmrId;
bool m_dmrNetworkSlot1;
bool m_dmrNetworkSlot2;
std::string m_tftSerialPort;
unsigned int m_tftSerialBrightness;
std::string m_nextionPort;
unsigned int m_nextionBrightness;
bool m_nextionDisplayClock;
bool m_nextionUTC;
unsigned int m_nextionIdleBrightness;
unsigned int m_nextionScreenLayout;
bool m_nextionTempInFahrenheit;
unsigned char m_oledType;
unsigned char m_oledBrightness;
bool m_oledInvert;
bool m_oledScroll;
bool m_oledRotate;
bool m_oledLogoScreensaver;
std::string m_lcdprocAddress;
unsigned short m_lcdprocPort;
unsigned short m_lcdprocLocalPort;
bool m_lcdprocDisplayClock;
bool m_lcdprocUTC;
bool m_lcdprocDimOnIdle;
};