MMDVMHost-Private/Conf.cpp

1523 lines
36 KiB
C++
Raw Normal View History

2016-01-14 18:45:04 +00:00
/*
2018-01-11 19:35:33 +00:00
* Copyright (C) 2015,2016,2017,2018 by Jonathan Naylor G4KLX
2016-01-14 18:45:04 +00:00
*
* 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.
*/
#include "DStarDefines.h"
2016-01-14 18:45:04 +00:00
#include "Conf.h"
#include "Log.h"
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cctype>
2016-01-14 18:45:04 +00:00
const int BUFFER_SIZE = 500;
enum SECTION {
SECTION_NONE,
SECTION_GENERAL,
SECTION_INFO,
SECTION_LOG,
2016-05-09 20:55:44 +00:00
SECTION_CWID,
SECTION_DMRID_LOOKUP,
2018-01-17 21:21:25 +00:00
SECTION_NXDNID_LOOKUP,
2016-01-14 18:45:04 +00:00
SECTION_MODEM,
2016-11-03 19:07:44 +00:00
SECTION_UMP,
2016-01-14 18:45:04 +00:00
SECTION_DSTAR,
SECTION_DMR,
SECTION_FUSION,
2016-09-08 17:38:59 +00:00
SECTION_P25,
2018-01-11 19:35:33 +00:00
SECTION_NXDN,
2016-01-14 18:45:04 +00:00
SECTION_DSTAR_NETWORK,
SECTION_DMR_NETWORK,
SECTION_FUSION_NETWORK,
2016-09-08 17:38:59 +00:00
SECTION_P25_NETWORK,
2018-01-11 19:35:33 +00:00
SECTION_NXDN_NETWORK,
SECTION_TFTSERIAL,
SECTION_HD44780,
2016-05-06 23:03:39 +00:00
SECTION_NEXTION,
2016-09-19 12:39:51 +00:00
SECTION_OLED,
2016-10-28 12:22:20 +00:00
SECTION_LCDPROC,
2016-09-19 12:39:51 +00:00
SECTION_TGREWRITE
2016-01-14 18:45:04 +00:00
};
CConf::CConf(const std::string& file) :
m_file(file),
m_callsign(),
2017-08-19 15:23:37 +00:00
m_id(0U),
2016-01-14 18:45:04 +00:00
m_timeout(120U),
m_duplex(true),
m_display(),
m_daemon(false),
2016-01-14 18:45:04 +00:00
m_rxFrequency(0U),
m_txFrequency(0U),
m_power(0U),
m_latitude(0.0F),
m_longitude(0.0F),
m_height(0),
m_location(),
m_description(),
m_url(),
2016-03-07 18:42:05 +00:00
m_logDisplayLevel(0U),
m_logFileLevel(0U),
m_logFilePath(),
m_logFileRoot(),
2016-05-09 20:55:44 +00:00
m_cwIdEnabled(false),
m_cwIdTime(10U),
m_cwIdCallsign(),
m_dmrIdLookupFile(),
m_dmrIdLookupTime(0U),
2018-01-17 21:21:25 +00:00
m_nxdnIdLookupFile(),
m_nxdnIdLookupTime(0U),
2016-01-14 18:45:04 +00:00
m_modemPort(),
m_modemRXInvert(false),
m_modemTXInvert(false),
m_modemPTTInvert(false),
m_modemTXDelay(100U),
2016-03-17 18:12:14 +00:00
m_modemDMRDelay(0U),
m_modemTXOffset(0),
m_modemRXOffset(0),
m_modemRXDCOffset(0),
m_modemTXDCOffset(0),
m_modemRFLevel(100.0F),
m_modemRXLevel(50.0F),
m_modemCWIdTXLevel(50.0F),
m_modemDStarTXLevel(50.0F),
m_modemDMRTXLevel(50.0F),
m_modemYSFTXLevel(50.0F),
m_modemP25TXLevel(50.0F),
2018-01-11 19:35:33 +00:00
m_modemNXDNTXLevel(50.0F),
m_modemRSSIMappingFile(),
m_modemTrace(false),
2016-01-14 18:45:04 +00:00
m_modemDebug(false),
2016-11-03 19:07:44 +00:00
m_umpEnabled(false),
m_umpPort(),
2016-09-30 10:41:56 +00:00
m_dstarEnabled(false),
2016-01-14 18:45:04 +00:00
m_dstarModule("C"),
m_dstarSelfOnly(false),
m_dstarBlackList(),
2017-06-10 12:18:18 +00:00
m_dstarAckReply(true),
2017-06-16 06:58:30 +00:00
m_dstarAckTime(750U),
m_dstarErrorReply(true),
m_dstarRemoteGateway(false),
m_dstarModeHang(10U),
2016-09-30 10:41:56 +00:00
m_dmrEnabled(false),
2018-01-16 18:35:29 +00:00
m_dmrBeacons(false),
m_dmrBeaconInterval(60U),
m_dmrBeaconDuration(3U),
2016-01-14 18:45:04 +00:00
m_dmrId(0U),
m_dmrColorCode(2U),
m_dmrSelfOnly(false),
m_dmrEmbeddedLCOnly(false),
m_dmrDumpTAData(true),
2016-04-04 18:03:38 +00:00
m_dmrPrefixes(),
m_dmrBlackList(),
m_dmrWhiteList(),
2017-01-05 19:15:10 +00:00
m_dmrSlot1TGWhiteList(),
m_dmrSlot2TGWhiteList(),
m_dmrCallHang(10U),
m_dmrTXHang(4U),
m_dmrModeHang(10U),
2016-09-30 10:41:56 +00:00
m_fusionEnabled(false),
2017-03-23 20:26:17 +00:00
m_fusionLowDeviation(false),
m_fusionRemoteGateway(false),
2017-08-15 09:11:05 +00:00
m_fusionSelfOnly(false),
2017-08-13 09:30:02 +00:00
m_fusionSQLEnabled(false),
m_fusionSQL(0U),
m_fusionModeHang(10U),
2016-09-30 10:41:56 +00:00
m_p25Enabled(false),
2017-08-19 15:23:37 +00:00
m_p25Id(0U),
m_p25NAC(0x293U),
m_p25SelfOnly(false),
m_p25OverrideUID(false),
m_p25RemoteGateway(false),
m_p25ModeHang(10U),
2018-01-11 19:35:33 +00:00
m_nxdnEnabled(false),
m_nxdnId(0U),
2018-01-11 21:59:31 +00:00
m_nxdnRAN(1U),
2018-01-11 19:35:33 +00:00
m_nxdnSelfOnly(false),
m_nxdnRemoteGateway(false),
m_nxdnModeHang(10U),
m_dstarNetworkEnabled(false),
2016-01-14 18:45:04 +00:00
m_dstarGatewayAddress(),
m_dstarGatewayPort(0U),
m_dstarLocalPort(0U),
m_dstarNetworkModeHang(3U),
2016-01-14 18:45:04 +00:00
m_dstarNetworkDebug(false),
m_dmrNetworkEnabled(false),
2016-01-14 18:45:04 +00:00
m_dmrNetworkAddress(),
m_dmrNetworkPort(0U),
m_dmrNetworkLocal(0U),
2016-01-14 18:45:04 +00:00
m_dmrNetworkPassword(),
m_dmrNetworkOptions(),
2016-01-14 18:45:04 +00:00
m_dmrNetworkDebug(false),
2016-09-06 18:42:15 +00:00
m_dmrNetworkJitter(300U),
m_dmrNetworkSlot1(true),
m_dmrNetworkSlot2(true),
m_dmrNetworkModeHang(3U),
2016-01-14 18:45:04 +00:00
m_fusionNetworkEnabled(false),
2016-06-07 20:17:57 +00:00
m_fusionNetworkMyAddress(),
m_fusionNetworkMyPort(0U),
m_fusionNetworkGatewayAddress(),
m_fusionNetworkGatewayPort(0U),
m_fusionNetworkModeHang(3U),
2016-01-14 18:45:04 +00:00
m_fusionNetworkDebug(false),
m_p25NetworkEnabled(false),
2016-09-08 17:38:59 +00:00
m_p25GatewayAddress(),
m_p25GatewayPort(0U),
m_p25LocalPort(0U),
m_p25NetworkModeHang(3U),
2016-09-08 17:38:59 +00:00
m_p25NetworkDebug(false),
2018-01-15 21:03:34 +00:00
m_nxdnNetworkEnabled(false),
m_nxdnNetworkMyAddress(),
m_nxdnNetworkMyPort(0U),
m_nxdnNetworkGatewayAddress(),
m_nxdnNetworkGatewayPort(0U),
m_nxdnNetworkModeHang(3U),
m_nxdnNetworkDebug(false),
2016-05-03 16:59:21 +00:00
m_tftSerialPort("/dev/ttyAMA0"),
m_tftSerialBrightness(50U),
m_hd44780Rows(2U),
m_hd44780Columns(16U),
m_hd44780Pins(),
2016-06-30 19:16:29 +00:00
m_hd44780i2cAddress(),
2016-05-03 16:59:21 +00:00
m_hd44780PWM(false),
2016-05-01 15:59:43 +00:00
m_hd44780PWMPin(),
m_hd44780PWMBright(),
m_hd44780PWMDim(),
2016-05-28 20:29:30 +00:00
m_hd44780DisplayClock(false),
m_hd44780UTC(false),
2016-05-03 16:59:21 +00:00
m_nextionPort("/dev/ttyAMA0"),
2016-05-06 23:03:39 +00:00
m_nextionBrightness(50U),
m_nextionDisplayClock(false),
m_nextionUTC(false),
m_nextionIdleBrightness(20U),
m_nextionScreenLayout(0U),
2016-11-03 21:43:29 +00:00
m_oledType(3U),
m_oledBrightness(0U),
m_oledInvert(false),
m_oledScroll(false),
2016-10-28 12:22:20 +00:00
m_lcdprocAddress(),
m_lcdprocPort(0U),
m_lcdprocLocalPort(0U),
m_lcdprocDisplayClock(false),
m_lcdprocUTC(false)
2016-01-14 18:45:04 +00:00
{
}
CConf::~CConf()
{
}
bool CConf::read()
{
FILE* fp = ::fopen(m_file.c_str(), "rt");
if (fp == NULL) {
::fprintf(stderr, "Couldn't open the .ini file - %s\n", m_file.c_str());
return false;
}
SECTION section = SECTION_NONE;
char buffer[BUFFER_SIZE];
while (::fgets(buffer, BUFFER_SIZE, fp) != NULL) {
if (buffer[0U] == '#')
continue;
if (buffer[0U] == '[') {
if (::strncmp(buffer, "[General]", 9U) == 0)
2017-03-08 13:01:59 +00:00
section = SECTION_GENERAL;
2016-01-14 18:45:04 +00:00
else if (::strncmp(buffer, "[Info]", 6U) == 0)
section = SECTION_INFO;
else if (::strncmp(buffer, "[Log]", 5U) == 0)
section = SECTION_LOG;
2016-05-09 20:55:44 +00:00
else if (::strncmp(buffer, "[CW Id]", 7U) == 0)
section = SECTION_CWID;
else if (::strncmp(buffer, "[DMR Id Lookup]", 15U) == 0)
section = SECTION_DMRID_LOOKUP;
2018-01-17 21:21:25 +00:00
else if (::strncmp(buffer, "[NXDN Id Lookup]", 16U) == 0)
section = SECTION_NXDNID_LOOKUP;
2016-01-14 18:45:04 +00:00
else if (::strncmp(buffer, "[Modem]", 7U) == 0)
2016-11-03 19:07:44 +00:00
section = SECTION_MODEM;
else if (::strncmp(buffer, "[UMP]", 5U) == 0)
section = SECTION_UMP;
2016-01-14 18:45:04 +00:00
else if (::strncmp(buffer, "[D-Star]", 8U) == 0)
section = SECTION_DSTAR;
else if (::strncmp(buffer, "[DMR]", 5U) == 0)
section = SECTION_DMR;
else if (::strncmp(buffer, "[System Fusion]", 15U) == 0)
section = SECTION_FUSION;
2016-09-08 17:38:59 +00:00
else if (::strncmp(buffer, "[P25]", 5U) == 0)
section = SECTION_P25;
2018-01-11 19:35:33 +00:00
else if (::strncmp(buffer, "[NXDN]", 6U) == 0)
section = SECTION_NXDN;
2016-01-14 18:45:04 +00:00
else if (::strncmp(buffer, "[D-Star Network]", 16U) == 0)
2016-11-03 19:07:44 +00:00
section = SECTION_DSTAR_NETWORK;
2017-03-08 13:01:59 +00:00
else if (::strncmp(buffer, "[DMR Network]", 13U) == 0)
2016-11-03 19:07:44 +00:00
section = SECTION_DMR_NETWORK;
2017-03-08 13:01:59 +00:00
else if (::strncmp(buffer, "[System Fusion Network]", 23U) == 0)
2016-11-03 19:07:44 +00:00
section = SECTION_FUSION_NETWORK;
2016-09-08 17:38:59 +00:00
else if (::strncmp(buffer, "[P25 Network]", 13U) == 0)
section = SECTION_P25_NETWORK;
2018-01-11 19:35:33 +00:00
else if (::strncmp(buffer, "[NXDN Network]", 14U) == 0)
section = SECTION_NXDN_NETWORK;
2016-09-08 17:38:59 +00:00
else if (::strncmp(buffer, "[TFT Serial]", 12U) == 0)
2016-11-03 19:07:44 +00:00
section = SECTION_TFTSERIAL;
else if (::strncmp(buffer, "[HD44780]", 9U) == 0)
section = SECTION_HD44780;
else if (::strncmp(buffer, "[Nextion]", 9U) == 0)
section = SECTION_NEXTION;
2016-05-06 23:03:39 +00:00
else if (::strncmp(buffer, "[OLED]", 6U) == 0)
section = SECTION_OLED;
else if (::strncmp(buffer, "[LCDproc]", 9U) == 0)
2016-10-28 12:22:20 +00:00
section = SECTION_LCDPROC;
else
2016-11-03 19:07:44 +00:00
section = SECTION_NONE;
2016-01-14 18:45:04 +00:00
2017-03-08 13:01:59 +00:00
continue;
2017-03-07 20:38:06 +00:00
}
2016-01-14 18:45:04 +00:00
2017-03-07 20:38:06 +00:00
char* key = ::strtok(buffer, " \t=\r\n");
if (key == NULL)
continue;
2016-01-14 18:45:04 +00:00
2017-03-07 20:38:06 +00:00
char* value = ::strtok(NULL, "\r\n");
if (value == NULL)
2017-03-08 13:01:59 +00:00
continue;
// Remove quotes from the value
size_t len = ::strlen(value);
if (len > 1U && *value == '"' && value[len - 1U] == '"') {
value[len - 1U] = '\0';
value++;
}
2017-03-07 20:38:06 +00:00
if (section == SECTION_GENERAL) {
2016-04-19 16:25:13 +00:00
if (::strcmp(key, "Callsign") == 0) {
// Convert the callsign to upper case
for (unsigned int i = 0U; value[i] != 0; i++)
value[i] = ::toupper(value[i]);
m_cwIdCallsign = m_callsign = value;
2017-08-19 15:23:37 +00:00
} else if (::strcmp(key, "Id") == 0)
m_id = m_p25Id = m_dmrId = (unsigned int)::atoi(value);
else if (::strcmp(key, "Timeout") == 0)
2016-01-14 18:45:04 +00:00
m_timeout = (unsigned int)::atoi(value);
else if (::strcmp(key, "Duplex") == 0)
m_duplex = ::atoi(value) == 1;
else if (::strcmp(key, "ModeHang") == 0)
m_dstarNetworkModeHang = m_dmrNetworkModeHang = m_fusionNetworkModeHang = m_p25NetworkModeHang =
m_dstarModeHang = m_dmrModeHang = m_fusionModeHang = m_p25ModeHang = (unsigned int)::atoi(value);
else if (::strcmp(key, "RFModeHang") == 0)
m_dstarModeHang = m_dmrModeHang = m_fusionModeHang = m_p25ModeHang = (unsigned int)::atoi(value);
else if (::strcmp(key, "NetModeHang") == 0)
m_dstarNetworkModeHang = m_dmrNetworkModeHang = m_fusionNetworkModeHang = m_p25NetworkModeHang = (unsigned int)::atoi(value);
2016-01-14 18:45:04 +00:00
else if (::strcmp(key, "Display") == 0)
m_display = value;
else if (::strcmp(key, "Daemon") == 0)
m_daemon = ::atoi(value) == 1;
2016-01-14 18:45:04 +00:00
} else if (section == SECTION_INFO) {
if (::strcmp(key, "TXFrequency") == 0)
m_txFrequency = (unsigned int)::atoi(value);
else if (::strcmp(key, "RXFrequency") == 0)
m_rxFrequency = (unsigned int)::atoi(value);
else if (::strcmp(key, "Power") == 0)
m_power = (unsigned int)::atoi(value);
else if (::strcmp(key, "Latitude") == 0)
m_latitude = float(::atof(value));
else if (::strcmp(key, "Longitude") == 0)
m_longitude = float(::atof(value));
else if (::strcmp(key, "Height") == 0)
m_height = ::atoi(value);
else if (::strcmp(key, "Location") == 0)
m_location = value;
else if (::strcmp(key, "Description") == 0)
m_description = value;
else if (::strcmp(key, "URL") == 0)
m_url = value;
} else if (section == SECTION_LOG) {
2016-03-07 18:42:05 +00:00
if (::strcmp(key, "FilePath") == 0)
m_logFilePath = value;
else if (::strcmp(key, "FileRoot") == 0)
m_logFileRoot = value;
else if (::strcmp(key, "FileLevel") == 0)
m_logFileLevel = (unsigned int)::atoi(value);
else if (::strcmp(key, "DisplayLevel") == 0)
m_logDisplayLevel = (unsigned int)::atoi(value);
2016-05-09 20:55:44 +00:00
} else if (section == SECTION_CWID) {
if (::strcmp(key, "Enable") == 0)
m_cwIdEnabled = ::atoi(value) == 1;
else if (::strcmp(key, "Time") == 0)
m_cwIdTime = (unsigned int)::atoi(value);
2017-04-11 18:26:44 +00:00
else if (::strcmp(key, "Callsign") == 0) {
// Convert the callsign to upper case
for (unsigned int i = 0U; value[i] != 0; i++)
value[i] = ::toupper(value[i]);
m_cwIdCallsign = value;
}
} else if (section == SECTION_DMRID_LOOKUP) {
if (::strcmp(key, "File") == 0)
m_dmrIdLookupFile = value;
else if (::strcmp(key, "Time") == 0)
m_dmrIdLookupTime = (unsigned int)::atoi(value);
2018-01-17 21:21:25 +00:00
} else if (section == SECTION_NXDNID_LOOKUP) {
if (::strcmp(key, "File") == 0)
m_nxdnIdLookupFile = value;
else if (::strcmp(key, "Time") == 0)
m_nxdnIdLookupTime = (unsigned int)::atoi(value);
2016-01-14 18:45:04 +00:00
} else if (section == SECTION_MODEM) {
if (::strcmp(key, "Port") == 0)
m_modemPort = value;
else if (::strcmp(key, "RXInvert") == 0)
m_modemRXInvert = ::atoi(value) == 1;
else if (::strcmp(key, "TXInvert") == 0)
m_modemTXInvert = ::atoi(value) == 1;
else if (::strcmp(key, "PTTInvert") == 0)
m_modemPTTInvert = ::atoi(value) == 1;
else if (::strcmp(key, "TXDelay") == 0)
m_modemTXDelay = (unsigned int)::atoi(value);
2016-03-17 18:12:14 +00:00
else if (::strcmp(key, "DMRDelay") == 0)
m_modemDMRDelay = (unsigned int)::atoi(value);
else if (::strcmp(key, "RXOffset") == 0)
m_modemRXOffset = ::atoi(value);
else if (::strcmp(key, "TXOffset") == 0)
m_modemTXOffset = ::atoi(value);
else if (::strcmp(key, "RXDCOffset") == 0)
m_modemRXDCOffset = ::atoi(value);
else if (::strcmp(key, "TXDCOffset") == 0)
m_modemTXDCOffset = ::atoi(value);
else if (::strcmp(key, "RFLevel") == 0)
m_modemRFLevel = float(::atof(value));
2016-01-14 18:45:04 +00:00
else if (::strcmp(key, "RXLevel") == 0)
2017-06-02 15:39:23 +00:00
m_modemRXLevel = float(::atof(value));
2016-01-14 18:45:04 +00:00
else if (::strcmp(key, "TXLevel") == 0)
2018-01-11 19:35:33 +00:00
m_modemCWIdTXLevel = m_modemDStarTXLevel = m_modemDMRTXLevel = m_modemYSFTXLevel = m_modemP25TXLevel = m_modemNXDNTXLevel = float(::atof(value));
2016-10-10 16:46:37 +00:00
else if (::strcmp(key, "CWIdTXLevel") == 0)
2017-06-02 15:39:23 +00:00
m_modemCWIdTXLevel = float(::atof(value));
2016-08-09 06:08:37 +00:00
else if (::strcmp(key, "D-StarTXLevel") == 0)
2017-06-02 15:39:23 +00:00
m_modemDStarTXLevel = float(::atof(value));
2016-08-09 06:08:37 +00:00
else if (::strcmp(key, "DMRTXLevel") == 0)
2017-06-02 15:39:23 +00:00
m_modemDMRTXLevel = float(::atof(value));
2016-08-09 06:08:37 +00:00
else if (::strcmp(key, "YSFTXLevel") == 0)
2017-06-02 15:39:23 +00:00
m_modemYSFTXLevel = float(::atof(value));
2016-09-08 17:38:59 +00:00
else if (::strcmp(key, "P25TXLevel") == 0)
2017-06-02 15:39:23 +00:00
m_modemP25TXLevel = float(::atof(value));
2018-01-11 19:35:33 +00:00
else if (::strcmp(key, "NXDNTXLevel") == 0)
m_modemNXDNTXLevel = float(::atof(value));
else if (::strcmp(key, "RSSIMappingFile") == 0)
m_modemRSSIMappingFile = value;
else if (::strcmp(key, "Trace") == 0)
m_modemTrace = ::atoi(value) == 1;
2016-01-14 18:45:04 +00:00
else if (::strcmp(key, "Debug") == 0)
m_modemDebug = ::atoi(value) == 1;
2016-11-03 19:07:44 +00:00
} else if (section == SECTION_UMP) {
if (::strcmp(key, "Enable") == 0)
m_umpEnabled = ::atoi(value) == 1;
else if (::strcmp(key, "Port") == 0)
m_umpPort = value;
2016-01-14 18:45:04 +00:00
} else if (section == SECTION_DSTAR) {
if (::strcmp(key, "Enable") == 0)
2016-01-14 18:45:04 +00:00
m_dstarEnabled = ::atoi(value) == 1;
else if (::strcmp(key, "Module") == 0) {
// Convert the module to upper case
for (unsigned int i = 0U; value[i] != 0; i++)
value[i] = ::toupper(value[i]);
2016-01-14 18:45:04 +00:00
m_dstarModule = value;
} else if (::strcmp(key, "SelfOnly") == 0)
m_dstarSelfOnly = ::atoi(value) == 1;
else if (::strcmp(key, "BlackList") == 0) {
char* p = ::strtok(value, ",\r\n");
while (p != NULL) {
if (::strlen(p) > 0U) {
2016-04-19 16:25:13 +00:00
for (unsigned int i = 0U; p[i] != 0; i++)
p[i] = ::toupper(p[i]);
std::string callsign = std::string(p);
callsign.resize(DSTAR_LONG_CALLSIGN_LENGTH, ' ');
m_dstarBlackList.push_back(callsign);
}
p = ::strtok(NULL, ",\r\n");
}
2017-06-10 12:18:18 +00:00
} else if (::strcmp(key, "AckReply") == 0)
m_dstarAckReply = ::atoi(value) == 1;
2017-06-14 10:54:44 +00:00
else if (::strcmp(key, "AckTime") == 0)
m_dstarAckTime = (unsigned int)::atoi(value);
2017-06-10 12:18:18 +00:00
else if (::strcmp(key, "ErrorReply") == 0)
m_dstarErrorReply = ::atoi(value) == 1;
else if (::strcmp(key, "RemoteGateway") == 0)
m_dstarRemoteGateway = ::atoi(value) == 1;
else if (::strcmp(key, "ModeHang") == 0)
m_dstarModeHang = (unsigned int)::atoi(value);
2016-01-14 18:45:04 +00:00
} else if (section == SECTION_DMR) {
if (::strcmp(key, "Enable") == 0)
2016-01-14 18:45:04 +00:00
m_dmrEnabled = ::atoi(value) == 1;
2016-01-14 19:58:16 +00:00
else if (::strcmp(key, "Beacons") == 0)
2018-01-16 18:35:29 +00:00
m_dmrBeacons = ::atoi(value) == 1;
else if (::strcmp(key, "BeaconInterval") == 0)
m_dmrBeaconInterval = (unsigned int)::atoi(value);
else if (::strcmp(key, "BeaconDuration") == 0)
m_dmrBeaconDuration = (unsigned int)::atoi(value);
2016-01-14 18:45:04 +00:00
else if (::strcmp(key, "Id") == 0)
m_dmrId = (unsigned int)::atoi(value);
else if (::strcmp(key, "ColorCode") == 0)
m_dmrColorCode = (unsigned int)::atoi(value);
else if (::strcmp(key, "SelfOnly") == 0)
m_dmrSelfOnly = ::atoi(value) == 1;
else if (::strcmp(key, "EmbeddedLCOnly") == 0)
m_dmrEmbeddedLCOnly = ::atoi(value) == 1;
else if (::strcmp(key, "DumpTAData") == 0)
m_dmrDumpTAData = ::atoi(value) == 1;
2016-04-04 18:03:38 +00:00
else if (::strcmp(key, "Prefixes") == 0) {
char* p = ::strtok(value, ",\r\n");
while (p != NULL) {
unsigned int prefix = (unsigned int)::atoi(p);
if (prefix > 0U && prefix <= 999U)
m_dmrPrefixes.push_back(prefix);
p = ::strtok(NULL, ",\r\n");
}
} else if (::strcmp(key, "BlackList") == 0) {
char* p = ::strtok(value, ",\r\n");
while (p != NULL) {
unsigned int id = (unsigned int)::atoi(p);
if (id > 0U)
m_dmrBlackList.push_back(id);
p = ::strtok(NULL, ",\r\n");
}
} else if (::strcmp(key, "WhiteList") == 0) {
2016-06-07 14:33:17 +00:00
char* p = ::strtok(value, ",\r\n");
while (p != NULL) {
unsigned int id = (unsigned int)::atoi(p);
if (id > 0U)
m_dmrWhiteList.push_back(id);
2016-06-07 14:33:17 +00:00
p = ::strtok(NULL, ",\r\n");
}
2017-01-05 19:15:10 +00:00
} else if (::strcmp(key, "Slot1TGWhiteList") == 0) {
char* p = ::strtok(value, ",\r\n");
while (p != NULL) {
unsigned int id = (unsigned int)::atoi(p);
if (id > 0U)
m_dmrSlot1TGWhiteList.push_back(id);
p = ::strtok(NULL, ",\r\n");
}
} else if (::strcmp(key, "Slot2TGWhiteList") == 0) {
char* p = ::strtok(value, ",\r\n");
while (p != NULL) {
unsigned int id = (unsigned int)::atoi(p);
if (id > 0U)
m_dmrSlot2TGWhiteList.push_back(id);
p = ::strtok(NULL, ",\r\n");
}
} else if (::strcmp(key, "TXHang") == 0)
m_dmrTXHang = (unsigned int)::atoi(value);
else if (::strcmp(key, "CallHang") == 0)
m_dmrCallHang = (unsigned int)::atoi(value);
else if (::strcmp(key, "ModeHang") == 0)
m_dmrModeHang = (unsigned int)::atoi(value);
2016-01-14 18:45:04 +00:00
} else if (section == SECTION_FUSION) {
if (::strcmp(key, "Enable") == 0)
2016-01-14 18:45:04 +00:00
m_fusionEnabled = ::atoi(value) == 1;
2017-03-23 20:26:17 +00:00
else if (::strcmp(key, "LowDeviation") == 0)
m_fusionLowDeviation = ::atoi(value) == 1;
2017-08-13 09:30:02 +00:00
else if (::strcmp(key, "DSQ") == 0) {
m_fusionSQLEnabled = true;
m_fusionSQL = (unsigned int)::atoi(value);
} else if (::strcmp(key, "RemoteGateway") == 0)
m_fusionRemoteGateway = ::atoi(value) == 1;
2017-08-15 09:11:05 +00:00
else if (::strcmp(key, "SelfOnly") == 0)
m_fusionSelfOnly = ::atoi(value) == 1;
else if (::strcmp(key, "ModeHang") == 0)
m_fusionModeHang = (unsigned int)::atoi(value);
2016-09-08 17:38:59 +00:00
} else if (section == SECTION_P25) {
if (::strcmp(key, "Enable") == 0)
m_p25Enabled = ::atoi(value) == 1;
2017-08-19 15:23:37 +00:00
else if (::strcmp(key, "Id") == 0)
m_p25Id = (unsigned int)::atoi(value);
else if (::strcmp(key, "NAC") == 0)
m_p25NAC = (unsigned int)::strtoul(value, NULL, 16);
2017-03-29 19:46:27 +00:00
else if (::strcmp(key, "OverrideUIDCheck") == 0)
m_p25OverrideUID = ::atoi(value) == 1;
else if (::strcmp(key, "SelfOnly") == 0)
m_p25SelfOnly = ::atoi(value) == 1;
else if (::strcmp(key, "RemoteGateway") == 0)
m_p25RemoteGateway = ::atoi(value) == 1;
else if (::strcmp(key, "ModeHang") == 0)
m_p25ModeHang = (unsigned int)::atoi(value);
2018-01-11 19:35:33 +00:00
} else if (section == SECTION_NXDN) {
if (::strcmp(key, "Enable") == 0)
m_nxdnEnabled = ::atoi(value) == 1;
else if (::strcmp(key, "Id") == 0)
m_nxdnId = (unsigned int)::atoi(value);
else if (::strcmp(key, "RAN") == 0)
m_nxdnRAN = (unsigned int)::atoi(value);
else if (::strcmp(key, "SelfOnly") == 0)
m_nxdnSelfOnly = ::atoi(value) == 1;
else if (::strcmp(key, "RemoteGateway") == 0)
m_nxdnRemoteGateway = ::atoi(value) == 1;
else if (::strcmp(key, "ModeHang") == 0)
m_nxdnModeHang = (unsigned int)::atoi(value);
2016-01-14 18:45:04 +00:00
} else if (section == SECTION_DSTAR_NETWORK) {
if (::strcmp(key, "Enable") == 0)
2016-01-14 18:45:04 +00:00
m_dstarNetworkEnabled = ::atoi(value) == 1;
else if (::strcmp(key, "GatewayAddress") == 0)
m_dstarGatewayAddress = value;
else if (::strcmp(key, "GatewayPort") == 0)
m_dstarGatewayPort = (unsigned int)::atoi(value);
else if (::strcmp(key, "LocalPort") == 0)
m_dstarLocalPort = (unsigned int)::atoi(value);
else if (::strcmp(key, "ModeHang") == 0)
m_dstarNetworkModeHang = (unsigned int)::atoi(value);
2016-01-14 18:45:04 +00:00
else if (::strcmp(key, "Debug") == 0)
m_dstarNetworkDebug = ::atoi(value) == 1;
} else if (section == SECTION_DMR_NETWORK) {
if (::strcmp(key, "Enable") == 0)
2016-01-14 18:45:04 +00:00
m_dmrNetworkEnabled = ::atoi(value) == 1;
else if (::strcmp(key, "Address") == 0)
m_dmrNetworkAddress = value;
else if (::strcmp(key, "Port") == 0)
m_dmrNetworkPort = (unsigned int)::atoi(value);
else if (::strcmp(key, "Local") == 0)
m_dmrNetworkLocal = (unsigned int)::atoi(value);
2016-01-14 18:45:04 +00:00
else if (::strcmp(key, "Password") == 0)
m_dmrNetworkPassword = value;
else if (::strcmp(key, "Options") == 0)
m_dmrNetworkOptions = value;
2016-01-14 18:45:04 +00:00
else if (::strcmp(key, "Debug") == 0)
m_dmrNetworkDebug = ::atoi(value) == 1;
2016-09-06 18:42:15 +00:00
else if (::strcmp(key, "Jitter") == 0)
m_dmrNetworkJitter = (unsigned int)::atoi(value);
else if (::strcmp(key, "Slot1") == 0)
m_dmrNetworkSlot1 = ::atoi(value) == 1;
else if (::strcmp(key, "Slot2") == 0)
m_dmrNetworkSlot2 = ::atoi(value) == 1;
else if (::strcmp(key, "ModeHang") == 0)
m_dmrNetworkModeHang = (unsigned int)::atoi(value);
2016-01-14 18:45:04 +00:00
} else if (section == SECTION_FUSION_NETWORK) {
if (::strcmp(key, "Enable") == 0)
2016-01-14 18:45:04 +00:00
m_fusionNetworkEnabled = ::atoi(value) == 1;
2016-06-08 05:10:51 +00:00
else if (::strcmp(key, "LocalAddress") == 0)
2016-06-07 20:17:57 +00:00
m_fusionNetworkMyAddress = value;
2016-06-08 05:10:51 +00:00
else if (::strcmp(key, "LocalPort") == 0)
2016-06-07 20:17:57 +00:00
m_fusionNetworkMyPort = (unsigned int)::atoi(value);
else if (::strcmp(key, "GatewayAddress") == 0)
m_fusionNetworkGatewayAddress = value;
else if (::strcmp(key, "GatewayPort") == 0)
m_fusionNetworkGatewayPort = (unsigned int)::atoi(value);
else if (::strcmp(key, "ModeHang") == 0)
m_fusionNetworkModeHang = (unsigned int)::atoi(value);
2016-01-14 18:45:04 +00:00
else if (::strcmp(key, "Debug") == 0)
m_fusionNetworkDebug = ::atoi(value) == 1;
2016-09-08 17:38:59 +00:00
} else if (section == SECTION_P25_NETWORK) {
if (::strcmp(key, "Enable") == 0)
m_p25NetworkEnabled = ::atoi(value) == 1;
else if (::strcmp(key, "GatewayAddress") == 0)
m_p25GatewayAddress = value;
else if (::strcmp(key, "GatewayPort") == 0)
m_p25GatewayPort = (unsigned int)::atoi(value);
else if (::strcmp(key, "LocalPort") == 0)
m_p25LocalPort = (unsigned int)::atoi(value);
else if (::strcmp(key, "ModeHang") == 0)
m_p25NetworkModeHang = (unsigned int)::atoi(value);
2016-09-08 17:38:59 +00:00
else if (::strcmp(key, "Debug") == 0)
m_p25NetworkDebug = ::atoi(value) == 1;
2018-01-15 21:03:34 +00:00
} else if (section == SECTION_NXDN_NETWORK) {
if (::strcmp(key, "Enable") == 0)
m_nxdnNetworkEnabled = ::atoi(value) == 1;
else if (::strcmp(key, "LocalAddress") == 0)
m_nxdnNetworkMyAddress = value;
else if (::strcmp(key, "LocalPort") == 0)
m_nxdnNetworkMyPort = (unsigned int)::atoi(value);
else if (::strcmp(key, "GatewayAddress") == 0)
m_nxdnNetworkGatewayAddress = value;
else if (::strcmp(key, "GatewayPort") == 0)
m_nxdnNetworkGatewayPort = (unsigned int)::atoi(value);
else if (::strcmp(key, "ModeHang") == 0)
m_nxdnNetworkModeHang = (unsigned int)::atoi(value);
else if (::strcmp(key, "Debug") == 0)
m_nxdnNetworkDebug = ::atoi(value) == 1;
2016-01-14 18:45:04 +00:00
} else if (section == SECTION_TFTSERIAL) {
if (::strcmp(key, "Port") == 0)
m_tftSerialPort = value;
else if (::strcmp(key, "Brightness") == 0)
m_tftSerialBrightness = (unsigned int)::atoi(value);
} else if (section == SECTION_HD44780) {
if (::strcmp(key, "Rows") == 0)
m_hd44780Rows = (unsigned int)::atoi(value);
else if (::strcmp(key, "Columns") == 0)
m_hd44780Columns = (unsigned int)::atoi(value);
else if (::strcmp(key, "I2CAddress") == 0)
2016-06-30 20:55:02 +00:00
m_hd44780i2cAddress = (unsigned int)::strtoul(value, NULL, 16);
2016-05-01 15:59:43 +00:00
else if (::strcmp(key, "PWM") == 0)
2016-05-03 16:59:21 +00:00
m_hd44780PWM = ::atoi(value) == 1;
2016-05-01 15:59:43 +00:00
else if (::strcmp(key, "PWMPin") == 0)
m_hd44780PWMPin = (unsigned int)::atoi(value);
else if (::strcmp(key, "PWMBright") == 0)
m_hd44780PWMBright = (unsigned int)::atoi(value);
else if (::strcmp(key, "PWMDim") == 0)
m_hd44780PWMDim = (unsigned int)::atoi(value);
2016-05-28 20:29:30 +00:00
else if (::strcmp(key, "DisplayClock") == 0)
m_hd44780DisplayClock = ::atoi(value) == 1;
else if (::strcmp(key, "UTC") == 0)
m_hd44780UTC = ::atoi(value) == 1;
else if (::strcmp(key, "Pins") == 0) {
char* p = ::strtok(value, ",\r\n");
while (p != NULL) {
unsigned int pin = (unsigned int)::atoi(p);
m_hd44780Pins.push_back(pin);
p = ::strtok(NULL, ",\r\n");
}
}
} else if (section == SECTION_NEXTION) {
if (::strcmp(key, "Port") == 0)
m_nextionPort = value;
else if (::strcmp(key, "Brightness") == 0)
m_nextionIdleBrightness = m_nextionBrightness = (unsigned int)::atoi(value);
else if (::strcmp(key, "DisplayClock") == 0)
m_nextionDisplayClock = ::atoi(value) == 1;
else if (::strcmp(key, "UTC") == 0)
m_nextionUTC = ::atoi(value) == 1;
else if (::strcmp(key, "IdleBrightness") == 0)
m_nextionIdleBrightness = (unsigned int)::atoi(value);
else if (::strcmp(key, "ScreenLayout") == 0)
m_nextionScreenLayout = (unsigned int)::atoi(value);
2016-05-06 23:03:39 +00:00
} else if (section == SECTION_OLED) {
if (::strcmp(key, "Type") == 0)
m_oledType = (unsigned char)::atoi(value);
else if (::strcmp(key, "Brightness") == 0)
2016-11-03 21:43:29 +00:00
m_oledBrightness = (unsigned char)::atoi(value);
else if (::strcmp(key, "Invert") == 0)
m_oledInvert = ::atoi(value) == 1;
else if (::strcmp(key, "Scroll") == 0)
m_oledScroll = ::atoi(value) == 1;
2016-10-28 12:22:20 +00:00
} else if (section == SECTION_LCDPROC) {
if (::strcmp(key, "Address") == 0)
m_lcdprocAddress = value;
else if (::strcmp(key, "Port") == 0)
m_lcdprocPort = (unsigned int)::atoi(value);
else if (::strcmp(key, "LocalPort") == 0)
m_lcdprocLocalPort = (unsigned int)::atoi(value);
else if (::strcmp(key, "DisplayClock") == 0)
m_lcdprocDisplayClock = ::atoi(value) == 1;
else if (::strcmp(key, "UTC") == 0)
m_lcdprocUTC = ::atoi(value) == 1;
else if (::strcmp(key, "DimOnIdle") == 0)
m_lcdprocDimOnIdle = ::atoi(value) == 1;
2016-10-28 12:22:20 +00:00
}
2016-01-14 18:45:04 +00:00
}
::fclose(fp);
return true;
}
std::string CConf::getCallsign() const
{
2017-04-11 18:26:44 +00:00
return m_callsign;
2016-01-14 18:45:04 +00:00
}
2017-08-19 15:23:37 +00:00
unsigned int CConf::getId() const
{
return m_id;
}
2016-01-14 18:45:04 +00:00
unsigned int CConf::getTimeout() const
{
2017-04-11 18:26:44 +00:00
return m_timeout;
2016-01-14 18:45:04 +00:00
}
bool CConf::getDuplex() const
{
2017-04-11 18:26:44 +00:00
return m_duplex;
2016-01-14 18:45:04 +00:00
}
std::string CConf::getDisplay() const
{
2017-04-11 18:26:44 +00:00
return m_display;
2016-01-14 18:45:04 +00:00
}
bool CConf::getDaemon() const
{
return m_daemon;
}
unsigned int CConf::getRXFrequency() const
2016-01-14 18:45:04 +00:00
{
return m_rxFrequency;
}
unsigned int CConf::getTXFrequency() const
2016-01-14 18:45:04 +00:00
{
return m_txFrequency;
}
unsigned int CConf::getPower() const
{
return m_power;
}
float CConf::getLatitude() const
{
return m_latitude;
}
float CConf::getLongitude() const
{
return m_longitude;
}
int CConf::getHeight() const
{
return m_height;
}
std::string CConf::getLocation() const
{
return m_location;
}
std::string CConf::getDescription() const
{
return m_description;
}
std::string CConf::getURL() const
{
return m_url;
}
2016-03-07 18:42:05 +00:00
unsigned int CConf::getLogDisplayLevel() const
2016-01-14 18:45:04 +00:00
{
2016-03-07 18:42:05 +00:00
return m_logDisplayLevel;
2016-01-14 18:45:04 +00:00
}
2016-03-07 18:42:05 +00:00
unsigned int CConf::getLogFileLevel() const
2016-01-14 18:45:04 +00:00
{
2016-03-07 18:42:05 +00:00
return m_logFileLevel;
2016-01-14 18:45:04 +00:00
}
2016-03-07 18:42:05 +00:00
std::string CConf::getLogFilePath() const
2016-01-14 18:45:04 +00:00
{
2017-04-11 18:26:44 +00:00
return m_logFilePath;
2016-01-14 18:45:04 +00:00
}
2016-03-07 18:42:05 +00:00
std::string CConf::getLogFileRoot() const
2016-01-14 18:45:04 +00:00
{
2017-04-11 18:26:44 +00:00
return m_logFileRoot;
2016-01-14 18:45:04 +00:00
}
2016-05-09 20:55:44 +00:00
bool CConf::getCWIdEnabled() const
{
return m_cwIdEnabled;
}
unsigned int CConf::getCWIdTime() const
{
return m_cwIdTime;
}
std::string CConf::getCWIdCallsign() const
{
2017-04-11 18:26:44 +00:00
return m_cwIdCallsign;
}
2016-05-09 20:55:44 +00:00
std::string CConf::getDMRIdLookupFile() const
{
return m_dmrIdLookupFile;
}
unsigned int CConf::getDMRIdLookupTime() const
{
return m_dmrIdLookupTime;
}
2018-01-17 21:21:25 +00:00
std::string CConf::getNXDNIdLookupFile() const
{
return m_nxdnIdLookupFile;
}
unsigned int CConf::getNXDNIdLookupTime() const
{
return m_nxdnIdLookupTime;
}
2016-01-14 18:45:04 +00:00
std::string CConf::getModemPort() const
{
return m_modemPort;
}
bool CConf::getModemRXInvert() const
{
return m_modemRXInvert;
}
bool CConf::getModemTXInvert() const
{
return m_modemTXInvert;
}
bool CConf::getModemPTTInvert() const
{
return m_modemPTTInvert;
}
unsigned int CConf::getModemTXDelay() const
{
return m_modemTXDelay;
}
2016-03-17 18:12:14 +00:00
unsigned int CConf::getModemDMRDelay() const
{
return m_modemDMRDelay;
}
int CConf::getModemRXOffset() const
{
return m_modemRXOffset;
}
int CConf::getModemTXOffset() const
{
return m_modemTXOffset;
}
int CConf::getModemRXDCOffset() const
{
return m_modemRXDCOffset;
}
int CConf::getModemTXDCOffset() const
{
return m_modemTXDCOffset;
}
float CConf::getModemRFLevel() const
{
return m_modemRFLevel;
}
float CConf::getModemRXLevel() const
2016-01-14 18:45:04 +00:00
{
return m_modemRXLevel;
}
float CConf::getModemCWIdTXLevel() const
2016-10-10 16:46:37 +00:00
{
return m_modemCWIdTXLevel;
}
float CConf::getModemDStarTXLevel() const
2016-01-14 18:45:04 +00:00
{
2016-08-09 06:08:37 +00:00
return m_modemDStarTXLevel;
}
float CConf::getModemDMRTXLevel() const
2016-08-09 06:08:37 +00:00
{
return m_modemDMRTXLevel;
}
float CConf::getModemYSFTXLevel() const
2016-08-09 06:08:37 +00:00
{
return m_modemYSFTXLevel;
2016-01-14 18:45:04 +00:00
}
float CConf::getModemP25TXLevel() const
2016-09-08 17:38:59 +00:00
{
return m_modemP25TXLevel;
}
2018-01-11 19:35:33 +00:00
float CConf::getModemNXDNTXLevel() const
{
return m_modemNXDNTXLevel;
}
std::string CConf::getModemRSSIMappingFile () const
2016-08-08 20:26:18 +00:00
{
return m_modemRSSIMappingFile;
2016-08-08 20:26:18 +00:00
}
bool CConf::getModemTrace() const
{
return m_modemTrace;
}
2016-01-14 18:45:04 +00:00
bool CConf::getModemDebug() const
{
return m_modemDebug;
}
2016-11-03 19:07:44 +00:00
bool CConf::getUMPEnabled() const
{
return m_umpEnabled;
}
std::string CConf::getUMPPort() const
{
return m_umpPort;
}
2016-01-14 18:45:04 +00:00
bool CConf::getDStarEnabled() const
{
return m_dstarEnabled;
}
std::string CConf::getDStarModule() const
{
return m_dstarModule;
}
bool CConf::getDStarSelfOnly() const
{
return m_dstarSelfOnly;
}
std::vector<std::string> CConf::getDStarBlackList() const
{
return m_dstarBlackList;
}
2017-06-10 12:18:18 +00:00
bool CConf::getDStarAckReply() const
{
return m_dstarAckReply;
}
2017-06-14 10:54:44 +00:00
unsigned int CConf::getDStarAckTime() const
{
return m_dstarAckTime;
}
bool CConf::getDStarErrorReply() const
{
return m_dstarErrorReply;
}
bool CConf::getDStarRemoteGateway() const
{
return m_dstarRemoteGateway;
}
unsigned int CConf::getDStarModeHang() const
{
return m_dstarModeHang;
}
2016-01-14 18:45:04 +00:00
bool CConf::getDMREnabled() const
{
return m_dmrEnabled;
}
2018-01-16 18:35:29 +00:00
bool CConf::getDMRBeacons() const
2016-01-14 19:58:16 +00:00
{
return m_dmrBeacons;
}
2018-01-16 18:35:29 +00:00
unsigned int CConf::getDMRBeaconInterval() const
{
return m_dmrBeaconInterval;
}
unsigned int CConf::getDMRBeaconDuration() const
{
return m_dmrBeaconDuration;
}
2016-01-14 18:45:04 +00:00
unsigned int CConf::getDMRId() const
{
return m_dmrId;
}
unsigned int CConf::getDMRColorCode() const
{
return m_dmrColorCode;
}
bool CConf::getDMRSelfOnly() const
{
return m_dmrSelfOnly;
}
bool CConf::getDMREmbeddedLCOnly() const
{
return m_dmrEmbeddedLCOnly;
}
bool CConf::getDMRDumpTAData() const
{
return m_dmrDumpTAData;
}
2016-04-04 18:03:38 +00:00
std::vector<unsigned int> CConf::getDMRPrefixes() const
{
return m_dmrPrefixes;
}
std::vector<unsigned int> CConf::getDMRBlackList() const
{
return m_dmrBlackList;
}
std::vector<unsigned int> CConf::getDMRWhiteList() const
{
return m_dmrWhiteList;
}
2017-01-05 19:15:10 +00:00
std::vector<unsigned int> CConf::getDMRSlot1TGWhiteList() const
{
return m_dmrSlot1TGWhiteList;
}
std::vector<unsigned int> CConf::getDMRSlot2TGWhiteList() const
{
return m_dmrSlot2TGWhiteList;
}
unsigned int CConf::getDMRCallHang() const
{
return m_dmrCallHang;
}
unsigned int CConf::getDMRTXHang() const
{
return m_dmrTXHang;
}
unsigned int CConf::getDMRModeHang() const
{
return m_dmrModeHang;
}
2016-01-14 18:45:04 +00:00
bool CConf::getFusionEnabled() const
{
return m_fusionEnabled;
}
2017-03-23 20:26:17 +00:00
bool CConf::getFusionLowDeviation() const
{
return m_fusionLowDeviation;
}
bool CConf::getFusionRemoteGateway() const
{
return m_fusionRemoteGateway;
}
2017-08-15 09:11:05 +00:00
bool CConf::getFusionSelfOnly() const
{
return m_fusionSelfOnly;
}
2017-08-13 09:30:02 +00:00
bool CConf::getFusionSQLEnabled() const
{
return m_fusionSQLEnabled;
}
unsigned char CConf::getFusionSQL() const
{
return m_fusionSQL;
}
unsigned int CConf::getFusionModeHang() const
{
return m_fusionModeHang;
}
2016-09-08 17:38:59 +00:00
bool CConf::getP25Enabled() const
{
return m_p25Enabled;
}
2017-08-19 15:23:37 +00:00
unsigned int CConf::getP25Id() const
{
return m_p25Id;
}
unsigned int CConf::getP25NAC() const
2016-09-08 17:38:59 +00:00
{
return m_p25NAC;
2016-09-08 17:38:59 +00:00
}
bool CConf::getP25OverrideUID() const
{
return m_p25OverrideUID;
}
bool CConf::getP25SelfOnly() const
{
return m_p25SelfOnly;
}
bool CConf::getP25RemoteGateway() const
{
return m_p25RemoteGateway;
}
unsigned int CConf::getP25ModeHang() const
{
return m_p25ModeHang;
}
2018-01-11 19:35:33 +00:00
bool CConf::getNXDNEnabled() const
{
return m_nxdnEnabled;
}
unsigned int CConf::getNXDNId() const
{
return m_nxdnId;
}
unsigned int CConf::getNXDNRAN() const
{
return m_nxdnRAN;
}
bool CConf::getNXDNSelfOnly() const
{
return m_nxdnSelfOnly;
}
bool CConf::getNXDNRemoteGateway() const
{
return m_nxdnRemoteGateway;
}
unsigned int CConf::getNXDNModeHang() const
{
return m_nxdnModeHang;
}
2016-01-14 18:45:04 +00:00
bool CConf::getDStarNetworkEnabled() const
{
return m_dstarNetworkEnabled;
}
std::string CConf::getDStarGatewayAddress() const
{
2017-04-11 18:26:44 +00:00
return m_dstarGatewayAddress;
2016-01-14 18:45:04 +00:00
}
unsigned int CConf::getDStarGatewayPort() const
{
2017-04-11 18:26:44 +00:00
return m_dstarGatewayPort;
2016-01-14 18:45:04 +00:00
}
unsigned int CConf::getDStarLocalPort() const
{
2017-04-11 18:26:44 +00:00
return m_dstarLocalPort;
2016-01-14 18:45:04 +00:00
}
unsigned int CConf::getDStarNetworkModeHang() const
{
return m_dstarNetworkModeHang;
}
2016-01-14 18:45:04 +00:00
bool CConf::getDStarNetworkDebug() const
{
return m_dstarNetworkDebug;
}
bool CConf::getDMRNetworkEnabled() const
{
return m_dmrNetworkEnabled;
}
std::string CConf::getDMRNetworkAddress() const
{
2017-04-11 18:26:44 +00:00
return m_dmrNetworkAddress;
2016-01-14 18:45:04 +00:00
}
unsigned int CConf::getDMRNetworkPort() const
{
2017-04-11 18:26:44 +00:00
return m_dmrNetworkPort;
2016-01-14 18:45:04 +00:00
}
unsigned int CConf::getDMRNetworkLocal() const
{
return m_dmrNetworkLocal;
}
2016-01-14 18:45:04 +00:00
std::string CConf::getDMRNetworkPassword() const
{
2017-04-11 18:26:44 +00:00
return m_dmrNetworkPassword;
2016-01-14 18:45:04 +00:00
}
std::string CConf::getDMRNetworkOptions() const
{
return m_dmrNetworkOptions;
}
unsigned int CConf::getDMRNetworkModeHang() const
{
return m_dmrNetworkModeHang;
}
2016-01-14 18:45:04 +00:00
bool CConf::getDMRNetworkDebug() const
{
return m_dmrNetworkDebug;
}
2016-09-06 18:42:15 +00:00
unsigned int CConf::getDMRNetworkJitter() const
{
return m_dmrNetworkJitter;
}
bool CConf::getDMRNetworkSlot1() const
{
return m_dmrNetworkSlot1;
}
bool CConf::getDMRNetworkSlot2() const
{
return m_dmrNetworkSlot2;
}
2016-01-14 18:45:04 +00:00
bool CConf::getFusionNetworkEnabled() const
{
return m_fusionNetworkEnabled;
}
2016-06-07 20:17:57 +00:00
std::string CConf::getFusionNetworkMyAddress() const
{
return m_fusionNetworkMyAddress;
}
unsigned int CConf::getFusionNetworkMyPort() const
{
return m_fusionNetworkMyPort;
}
std::string CConf::getFusionNetworkGatewayAddress() const
2016-01-14 18:45:04 +00:00
{
return m_fusionNetworkGatewayAddress;
2016-01-14 18:45:04 +00:00
}
unsigned int CConf::getFusionNetworkGatewayPort() const
2016-01-14 18:45:04 +00:00
{
return m_fusionNetworkGatewayPort;
2016-01-14 18:45:04 +00:00
}
unsigned int CConf::getFusionNetworkModeHang() const
{
return m_fusionNetworkModeHang;
}
2016-01-14 18:45:04 +00:00
bool CConf::getFusionNetworkDebug() const
{
return m_fusionNetworkDebug;
}
2016-09-08 17:38:59 +00:00
bool CConf::getP25NetworkEnabled() const
{
return m_p25NetworkEnabled;
}
std::string CConf::getP25GatewayAddress() const
{
return m_p25GatewayAddress;
}
unsigned int CConf::getP25GatewayPort() const
{
return m_p25GatewayPort;
}
unsigned int CConf::getP25LocalPort() const
{
return m_p25LocalPort;
}
unsigned int CConf::getP25NetworkModeHang() const
{
return m_p25NetworkModeHang;
}
bool CConf::getP25NetworkDebug() const
{
return m_p25NetworkDebug;
}
2018-01-15 21:03:34 +00:00
bool CConf::getNXDNNetworkEnabled() const
{
return m_nxdnNetworkEnabled;
}
std::string CConf::getNXDNNetworkMyAddress() const
{
return m_nxdnNetworkMyAddress;
}
unsigned int CConf::getNXDNNetworkMyPort() const
{
return m_nxdnNetworkMyPort;
}
std::string CConf::getNXDNNetworkGatewayAddress() const
{
return m_nxdnNetworkGatewayAddress;
}
unsigned int CConf::getNXDNNetworkGatewayPort() const
{
return m_nxdnNetworkGatewayPort;
}
unsigned int CConf::getNXDNNetworkModeHang() const
{
return m_nxdnNetworkModeHang;
}
bool CConf::getNXDNNetworkDebug() const
{
return m_nxdnNetworkDebug;
}
2016-01-14 18:45:04 +00:00
std::string CConf::getTFTSerialPort() const
{
2017-04-11 18:26:44 +00:00
return m_tftSerialPort;
2016-01-14 18:45:04 +00:00
}
unsigned int CConf::getTFTSerialBrightness() const
{
return m_tftSerialBrightness;
}
unsigned int CConf::getHD44780Rows() const
{
return m_hd44780Rows;
}
unsigned int CConf::getHD44780Columns() const
{
return m_hd44780Columns;
}
std::vector<unsigned int> CConf::getHD44780Pins() const
{
return m_hd44780Pins;
}
unsigned int CConf::getHD44780i2cAddress() const
{
return m_hd44780i2cAddress;
}
2016-05-03 16:59:21 +00:00
bool CConf::getHD44780PWM() const
2016-05-01 15:59:43 +00:00
{
return m_hd44780PWM;
}
unsigned int CConf::getHD44780PWMPin() const
{
return m_hd44780PWMPin;
}
unsigned int CConf::getHD44780PWMBright() const
{
return m_hd44780PWMBright;
}
unsigned int CConf::getHD44780PWMDim() const
{
return m_hd44780PWMDim;
}
2016-05-28 20:29:30 +00:00
bool CConf::getHD44780DisplayClock() const
{
return m_hd44780DisplayClock;
}
bool CConf::getHD44780UTC() const
{
return m_hd44780UTC;
}
std::string CConf::getNextionPort() const
{
return m_nextionPort;
}
unsigned int CConf::getNextionBrightness() const
{
return m_nextionBrightness;
}
2016-05-06 23:03:39 +00:00
bool CConf::getNextionDisplayClock() const
{
return m_nextionDisplayClock;
}
bool CConf::getNextionUTC() const
{
return m_nextionUTC;
}
unsigned int CConf::getNextionIdleBrightness() const
{
return m_nextionIdleBrightness;
}
unsigned int CConf::getNextionScreenLayout() const
{
return m_nextionScreenLayout;
}
2016-05-06 23:03:39 +00:00
unsigned char CConf::getOLEDType() const
{
return m_oledType;
}
unsigned char CConf::getOLEDBrightness() const
{
return m_oledBrightness;
}
2016-11-03 21:43:29 +00:00
bool CConf::getOLEDInvert() const
2016-05-06 23:03:39 +00:00
{
return m_oledInvert;
}
2016-10-28 12:22:20 +00:00
bool CConf::getOLEDScroll() const
{
return m_oledScroll;
}
2016-10-28 12:22:20 +00:00
std::string CConf::getLCDprocAddress() const
{
return m_lcdprocAddress;
}
unsigned int CConf::getLCDprocPort() const
{
return m_lcdprocPort;
}
unsigned int CConf::getLCDprocLocalPort() const
{
return m_lcdprocLocalPort;
}
bool CConf::getLCDprocDisplayClock() const
{
return m_lcdprocDisplayClock;
}
bool CConf::getLCDprocUTC() const
{
return m_lcdprocUTC;
}
bool CConf::getLCDprocDimOnIdle() const
{
return m_lcdprocDimOnIdle;
}