2016-01-14 18:45:04 +00:00
|
|
|
/*
|
2020-04-09 21:02:47 +00:00
|
|
|
* Copyright (C) 2015-2020 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.
|
|
|
|
*/
|
|
|
|
|
2016-04-06 17:46:05 +00:00
|
|
|
#include "DStarDefines.h"
|
2016-01-14 18:45:04 +00:00
|
|
|
#include "Conf.h"
|
|
|
|
#include "Log.h"
|
|
|
|
|
|
|
|
#include <cstdio>
|
|
|
|
#include <cstdlib>
|
|
|
|
#include <cstring>
|
2016-04-06 17:46:05 +00:00
|
|
|
#include <cctype>
|
2016-01-14 18:45:04 +00:00
|
|
|
|
|
|
|
const int BUFFER_SIZE = 500;
|
|
|
|
|
|
|
|
enum SECTION {
|
2020-05-23 12:03:55 +00:00
|
|
|
SECTION_NONE,
|
|
|
|
SECTION_GENERAL,
|
|
|
|
SECTION_INFO,
|
|
|
|
SECTION_LOG,
|
|
|
|
SECTION_CWID,
|
|
|
|
SECTION_DMRID_LOOKUP,
|
|
|
|
SECTION_NXDNID_LOOKUP,
|
|
|
|
SECTION_MODEM,
|
|
|
|
SECTION_TRANSPARENT,
|
|
|
|
SECTION_UMP,
|
|
|
|
SECTION_DSTAR,
|
|
|
|
SECTION_DMR,
|
|
|
|
SECTION_FUSION,
|
|
|
|
SECTION_P25,
|
|
|
|
SECTION_NXDN,
|
|
|
|
SECTION_POCSAG,
|
|
|
|
SECTION_FM,
|
2020-06-25 12:41:19 +00:00
|
|
|
SECTION_AX25,
|
2020-05-23 12:03:55 +00:00
|
|
|
SECTION_DSTAR_NETWORK,
|
|
|
|
SECTION_DMR_NETWORK,
|
|
|
|
SECTION_FUSION_NETWORK,
|
|
|
|
SECTION_P25_NETWORK,
|
|
|
|
SECTION_NXDN_NETWORK,
|
|
|
|
SECTION_POCSAG_NETWORK,
|
|
|
|
SECTION_FM_NETWORK,
|
2020-06-25 12:41:19 +00:00
|
|
|
SECTION_AX25_NETWORK,
|
2020-05-23 12:03:55 +00:00
|
|
|
SECTION_TFTSERIAL,
|
|
|
|
SECTION_HD44780,
|
|
|
|
SECTION_NEXTION,
|
|
|
|
SECTION_OLED,
|
|
|
|
SECTION_LCDPROC,
|
|
|
|
SECTION_LOCK_FILE,
|
2020-06-29 10:44:14 +00:00
|
|
|
SECTION_GPSD,
|
2020-05-23 12:03:55 +00:00
|
|
|
SECTION_REMOTE_CONTROL
|
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(),
|
2016-05-03 22:01:49 +00:00
|
|
|
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),
|
2017-04-10 16:55:53 +00:00
|
|
|
m_cwIdCallsign(),
|
2016-10-10 18:15:30 +00:00
|
|
|
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(),
|
2018-07-19 13:09:00 +00:00
|
|
|
m_modemProtocol("uart"),
|
2020-05-23 12:03:55 +00:00
|
|
|
m_modemSpeed(115200U),
|
2018-07-19 13:09:00 +00:00
|
|
|
m_modemAddress(0x22),
|
2016-01-14 18:45:04 +00:00
|
|
|
m_modemRXInvert(false),
|
|
|
|
m_modemTXInvert(false),
|
|
|
|
m_modemPTTInvert(false),
|
|
|
|
m_modemTXDelay(100U),
|
2016-03-17 18:12:14 +00:00
|
|
|
m_modemDMRDelay(0U),
|
2017-08-20 11:07:57 +00:00
|
|
|
m_modemTXOffset(0),
|
|
|
|
m_modemRXOffset(0),
|
2017-10-28 11:37:32 +00:00
|
|
|
m_modemRXDCOffset(0),
|
2017-08-20 11:07:57 +00:00
|
|
|
m_modemTXDCOffset(0),
|
2017-12-30 15:05:11 +00:00
|
|
|
m_modemRFLevel(100.0F),
|
2017-06-02 15:34:55 +00:00
|
|
|
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),
|
2018-06-07 17:46:03 +00:00
|
|
|
m_modemPOCSAGTXLevel(50.0F),
|
2020-04-12 14:10:51 +00:00
|
|
|
m_modemFMTXLevel(50.0F),
|
2020-06-20 20:28:39 +00:00
|
|
|
m_modemAX25TXLevel(50.0F),
|
2016-12-21 19:58:46 +00:00
|
|
|
m_modemRSSIMappingFile(),
|
2017-04-14 13:05:30 +00:00
|
|
|
m_modemTrace(false),
|
2016-01-14 18:45:04 +00:00
|
|
|
m_modemDebug(false),
|
2018-03-22 07:13:13 +00:00
|
|
|
m_transparentEnabled(false),
|
|
|
|
m_transparentRemoteAddress(),
|
|
|
|
m_transparentRemotePort(0U),
|
|
|
|
m_transparentLocalPort(0U),
|
2018-08-13 18:39:16 +00:00
|
|
|
m_transparentSendFrameType(0U),
|
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"),
|
2016-04-04 16:40:05 +00:00
|
|
|
m_dstarSelfOnly(false),
|
2016-04-06 17:46:05 +00:00
|
|
|
m_dstarBlackList(),
|
2017-06-10 12:18:18 +00:00
|
|
|
m_dstarAckReply(true),
|
2017-06-16 06:58:30 +00:00
|
|
|
m_dstarAckTime(750U),
|
2018-09-14 10:30:48 +00:00
|
|
|
m_dstarAckMessage(false),
|
2017-02-16 19:49:58 +00:00
|
|
|
m_dstarErrorReply(true),
|
2017-11-09 09:21:22 +00:00
|
|
|
m_dstarRemoteGateway(false),
|
2017-09-01 08:25:54 +00:00
|
|
|
m_dstarModeHang(10U),
|
2016-09-30 10:41:56 +00:00
|
|
|
m_dmrEnabled(false),
|
2019-11-05 08:42:21 +00:00
|
|
|
m_dmrBeacons(DMR_BEACONS_OFF),
|
2018-01-16 18:35:29 +00:00
|
|
|
m_dmrBeaconInterval(60U),
|
|
|
|
m_dmrBeaconDuration(3U),
|
2016-01-14 18:45:04 +00:00
|
|
|
m_dmrId(0U),
|
|
|
|
m_dmrColorCode(2U),
|
2016-04-04 16:40:05 +00:00
|
|
|
m_dmrSelfOnly(false),
|
2017-01-16 12:10:23 +00:00
|
|
|
m_dmrEmbeddedLCOnly(false),
|
2017-02-27 20:17:55 +00:00
|
|
|
m_dmrDumpTAData(true),
|
2016-04-04 18:03:38 +00:00
|
|
|
m_dmrPrefixes(),
|
2016-04-06 17:46:05 +00:00
|
|
|
m_dmrBlackList(),
|
2016-12-21 19:06:29 +00:00
|
|
|
m_dmrWhiteList(),
|
2017-01-05 19:15:10 +00:00
|
|
|
m_dmrSlot1TGWhiteList(),
|
|
|
|
m_dmrSlot2TGWhiteList(),
|
2018-02-08 18:30:16 +00:00
|
|
|
m_dmrCallHang(10U),
|
2016-05-05 16:56:18 +00:00
|
|
|
m_dmrTXHang(4U),
|
2017-09-01 08:25:54 +00:00
|
|
|
m_dmrModeHang(10U),
|
2019-11-17 02:57:58 +00:00
|
|
|
m_dmrOVCM(DMR_OVCM_OFF),
|
2016-09-30 10:41:56 +00:00
|
|
|
m_fusionEnabled(false),
|
2017-03-23 20:26:17 +00:00
|
|
|
m_fusionLowDeviation(false),
|
2016-09-26 17:07:06 +00:00
|
|
|
m_fusionRemoteGateway(false),
|
2017-08-15 09:11:05 +00:00
|
|
|
m_fusionSelfOnly(false),
|
2018-05-21 20:32:33 +00:00
|
|
|
m_fusionTXHang(4U),
|
2019-02-12 11:29:05 +00:00
|
|
|
m_fusionDGIdEnabled(false),
|
|
|
|
m_fusionDGId(0U),
|
2017-09-01 08:25:54 +00:00
|
|
|
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),
|
2016-09-12 22:26:05 +00:00
|
|
|
m_p25NAC(0x293U),
|
2017-08-15 09:30:05 +00:00
|
|
|
m_p25SelfOnly(false),
|
2017-09-01 08:25:54 +00:00
|
|
|
m_p25OverrideUID(false),
|
2017-11-09 09:21:22 +00:00
|
|
|
m_p25RemoteGateway(false),
|
2020-05-06 16:10:23 +00:00
|
|
|
m_p25TXHang(5U),
|
2017-09-01 08:25:54 +00:00
|
|
|
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),
|
2020-05-06 16:10:23 +00:00
|
|
|
m_nxdnTXHang(5U),
|
2018-01-11 19:35:33 +00:00
|
|
|
m_nxdnModeHang(10U),
|
2018-06-07 17:46:03 +00:00
|
|
|
m_pocsagEnabled(false),
|
2018-06-12 18:40:49 +00:00
|
|
|
m_pocsagFrequency(0U),
|
2020-04-09 21:02:47 +00:00
|
|
|
m_fmEnabled(false),
|
|
|
|
m_fmCallsign(),
|
|
|
|
m_fmCallsignSpeed(20U),
|
|
|
|
m_fmCallsignFrequency(1000U),
|
|
|
|
m_fmCallsignTime(10U),
|
|
|
|
m_fmCallsignHoldoff(1U),
|
2020-04-22 20:51:43 +00:00
|
|
|
m_fmCallsignHighLevel(35.0F),
|
|
|
|
m_fmCallsignLowLevel(15.0F),
|
2020-04-09 21:02:47 +00:00
|
|
|
m_fmCallsignAtStart(true),
|
|
|
|
m_fmCallsignAtEnd(true),
|
2020-05-04 21:30:16 +00:00
|
|
|
m_fmCallsignAtLatch(true),
|
2020-04-13 12:36:16 +00:00
|
|
|
m_fmRFAck("K"),
|
2020-04-28 13:39:14 +00:00
|
|
|
m_fmExtAck("N"),
|
2020-04-09 21:02:47 +00:00
|
|
|
m_fmAckSpeed(20U),
|
|
|
|
m_fmAckFrequency(1750U),
|
2020-04-13 14:53:18 +00:00
|
|
|
m_fmAckMinTime(5U),
|
2020-04-09 21:02:47 +00:00
|
|
|
m_fmAckDelay(1000U),
|
2020-04-12 15:01:28 +00:00
|
|
|
m_fmAckLevel(80.0F),
|
2020-04-15 13:14:38 +00:00
|
|
|
m_fmTimeout(180U),
|
2020-04-12 15:01:28 +00:00
|
|
|
m_fmTimeoutLevel(80.0F),
|
2020-04-09 21:02:47 +00:00
|
|
|
m_fmCTCSSFrequency(88.6F),
|
2020-05-12 12:43:43 +00:00
|
|
|
m_fmCTCSSHighThreshold(30U),
|
|
|
|
m_fmCTCSSLowThreshold(20U),
|
2020-04-22 20:51:43 +00:00
|
|
|
m_fmCTCSSLevel(2.0F),
|
2020-04-09 21:02:47 +00:00
|
|
|
m_fmKerchunkTime(0U),
|
2020-06-20 19:44:02 +00:00
|
|
|
m_fmKerchunkTX(true),
|
2020-04-09 21:02:47 +00:00
|
|
|
m_fmHangTime(7U),
|
2020-04-25 14:15:56 +00:00
|
|
|
m_fmUseCOS(true),
|
2020-05-06 10:26:54 +00:00
|
|
|
m_fmCOSInvert(false),
|
2020-04-28 13:39:14 +00:00
|
|
|
m_fmRFAudioBoost(1U),
|
2020-04-25 21:43:14 +00:00
|
|
|
m_fmMaxDevLevel(90.0F),
|
2020-04-28 13:39:14 +00:00
|
|
|
m_fmExtAudioBoost(1U),
|
2020-05-11 11:59:28 +00:00
|
|
|
m_fmModeHang(10U),
|
2020-06-08 15:33:20 +00:00
|
|
|
m_ax25Enabled(false),
|
2020-06-27 21:47:54 +00:00
|
|
|
m_ax25TXDelay(300U),
|
2020-07-01 09:59:46 +00:00
|
|
|
m_ax25RXTwist(6),
|
|
|
|
m_ax25SlotTime(30U),
|
|
|
|
m_ax25PPersist(128U),
|
2020-06-18 11:51:13 +00:00
|
|
|
m_ax25Trace(false),
|
2016-09-29 11:09:02 +00:00
|
|
|
m_dstarNetworkEnabled(false),
|
2016-01-14 18:45:04 +00:00
|
|
|
m_dstarGatewayAddress(),
|
|
|
|
m_dstarGatewayPort(0U),
|
|
|
|
m_dstarLocalPort(0U),
|
2017-09-01 08:25:54 +00:00
|
|
|
m_dstarNetworkModeHang(3U),
|
2016-01-14 18:45:04 +00:00
|
|
|
m_dstarNetworkDebug(false),
|
2016-09-29 11:09:02 +00:00
|
|
|
m_dmrNetworkEnabled(false),
|
2016-01-14 18:45:04 +00:00
|
|
|
m_dmrNetworkAddress(),
|
|
|
|
m_dmrNetworkPort(0U),
|
2016-04-03 18:11:45 +00:00
|
|
|
m_dmrNetworkLocal(0U),
|
2016-01-14 18:45:04 +00:00
|
|
|
m_dmrNetworkPassword(),
|
2016-11-03 19:27:52 +00:00
|
|
|
m_dmrNetworkOptions(),
|
2016-01-14 18:45:04 +00:00
|
|
|
m_dmrNetworkDebug(false),
|
2018-07-03 17:28:54 +00:00
|
|
|
m_dmrNetworkJitter(360U),
|
2016-02-15 20:36:05 +00:00
|
|
|
m_dmrNetworkSlot1(true),
|
|
|
|
m_dmrNetworkSlot2(true),
|
2017-09-01 08:25:54 +00:00
|
|
|
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),
|
2017-11-09 22:17:25 +00:00
|
|
|
m_fusionNetworkGatewayAddress(),
|
|
|
|
m_fusionNetworkGatewayPort(0U),
|
2017-09-01 08:25:54 +00:00
|
|
|
m_fusionNetworkModeHang(3U),
|
2016-01-14 18:45:04 +00:00
|
|
|
m_fusionNetworkDebug(false),
|
2016-09-29 11:09:02 +00:00
|
|
|
m_p25NetworkEnabled(false),
|
2016-09-08 17:38:59 +00:00
|
|
|
m_p25GatewayAddress(),
|
|
|
|
m_p25GatewayPort(0U),
|
|
|
|
m_p25LocalPort(0U),
|
2017-09-01 08:25:54 +00:00
|
|
|
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),
|
2020-05-27 11:07:21 +00:00
|
|
|
m_nxdnNetworkProtocol("Icom"),
|
2018-03-12 20:55:53 +00:00
|
|
|
m_nxdnGatewayAddress(),
|
|
|
|
m_nxdnGatewayPort(0U),
|
|
|
|
m_nxdnLocalAddress(),
|
|
|
|
m_nxdnLocalPort(0U),
|
2018-01-15 21:03:34 +00:00
|
|
|
m_nxdnNetworkModeHang(3U),
|
|
|
|
m_nxdnNetworkDebug(false),
|
2018-06-07 17:46:03 +00:00
|
|
|
m_pocsagNetworkEnabled(false),
|
|
|
|
m_pocsagGatewayAddress(),
|
|
|
|
m_pocsagGatewayPort(0U),
|
|
|
|
m_pocsagLocalAddress(),
|
|
|
|
m_pocsagLocalPort(0U),
|
|
|
|
m_pocsagNetworkModeHang(3U),
|
|
|
|
m_pocsagNetworkDebug(false),
|
2020-05-07 15:08:58 +00:00
|
|
|
m_fmNetworkEnabled(false),
|
|
|
|
m_fmGatewayAddress(),
|
|
|
|
m_fmGatewayPort(0U),
|
|
|
|
m_fmLocalAddress(),
|
|
|
|
m_fmLocalPort(0U),
|
|
|
|
m_fmNetworkModeHang(3U),
|
|
|
|
m_fmNetworkDebug(false),
|
2020-06-08 15:33:20 +00:00
|
|
|
m_ax25NetworkEnabled(false),
|
2020-06-21 13:15:37 +00:00
|
|
|
m_ax25NetworkPort(),
|
|
|
|
m_ax25NetworkSpeed(9600U),
|
2020-06-08 15:33:20 +00:00
|
|
|
m_ax25NetworkDebug(false),
|
2016-05-03 16:59:21 +00:00
|
|
|
m_tftSerialPort("/dev/ttyAMA0"),
|
2016-03-14 22:58:09 +00:00
|
|
|
m_tftSerialBrightness(50U),
|
|
|
|
m_hd44780Rows(2U),
|
2016-04-06 16:43:20 +00:00
|
|
|
m_hd44780Columns(16U),
|
2016-04-06 18:53:25 +00:00
|
|
|
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),
|
2016-06-01 10:55:24 +00:00
|
|
|
m_nextionDisplayClock(false),
|
|
|
|
m_nextionUTC(false),
|
2016-06-24 09:33:28 +00:00
|
|
|
m_nextionIdleBrightness(20U),
|
2017-11-13 20:48:47 +00:00
|
|
|
m_nextionScreenLayout(0U),
|
2018-09-05 20:12:12 +00:00
|
|
|
m_nextionTempInFahrenheit(false),
|
2016-11-03 21:43:29 +00:00
|
|
|
m_oledType(3U),
|
|
|
|
m_oledBrightness(0U),
|
|
|
|
m_oledInvert(false),
|
2017-08-13 09:57:02 +00:00
|
|
|
m_oledScroll(false),
|
2018-10-30 14:30:41 +00:00
|
|
|
m_oledRotate(false),
|
2019-09-27 20:28:57 +00:00
|
|
|
m_oledLogoScreensaver(true),
|
2016-10-28 12:22:20 +00:00
|
|
|
m_lcdprocAddress(),
|
|
|
|
m_lcdprocPort(0U),
|
|
|
|
m_lcdprocLocalPort(0U),
|
|
|
|
m_lcdprocDisplayClock(false),
|
2018-10-10 19:05:24 +00:00
|
|
|
m_lcdprocUTC(false),
|
2020-04-09 21:02:47 +00:00
|
|
|
m_lcdprocDimOnIdle(false),
|
2018-10-10 19:05:24 +00:00
|
|
|
m_lockFileEnabled(false),
|
2018-11-06 12:14:57 +00:00
|
|
|
m_lockFileName(),
|
2020-06-29 10:25:10 +00:00
|
|
|
m_gpsdEnabled(false),
|
|
|
|
m_gpsdAddress(),
|
|
|
|
m_gpsdPort(),
|
2019-01-07 11:03:37 +00:00
|
|
|
m_remoteControlEnabled(false),
|
|
|
|
m_remoteControlPort(0U)
|
2016-01-14 18:45:04 +00:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
CConf::~CConf()
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
bool CConf::read()
|
|
|
|
{
|
2020-05-23 12:03:55 +00:00
|
|
|
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;
|
|
|
|
}
|
2016-01-14 18:45:04 +00:00
|
|
|
|
2020-05-23 12:03:55 +00:00
|
|
|
SECTION section = SECTION_NONE;
|
2016-01-14 18:45:04 +00:00
|
|
|
|
2020-05-23 12:03:55 +00:00
|
|
|
char buffer[BUFFER_SIZE];
|
|
|
|
while (::fgets(buffer, BUFFER_SIZE, fp) != NULL) {
|
|
|
|
if (buffer[0U] == '#')
|
|
|
|
continue;
|
2016-01-14 18:45:04 +00:00
|
|
|
|
2020-05-23 12:03:55 +00:00
|
|
|
if (buffer[0U] == '[') {
|
|
|
|
if (::strncmp(buffer, "[General]", 9U) == 0)
|
|
|
|
section = SECTION_GENERAL;
|
|
|
|
else if (::strncmp(buffer, "[Info]", 6U) == 0)
|
|
|
|
section = SECTION_INFO;
|
|
|
|
else if (::strncmp(buffer, "[Log]", 5U) == 0)
|
|
|
|
section = SECTION_LOG;
|
|
|
|
else if (::strncmp(buffer, "[CW Id]", 7U) == 0)
|
|
|
|
section = SECTION_CWID;
|
|
|
|
else if (::strncmp(buffer, "[DMR Id Lookup]", 15U) == 0)
|
|
|
|
section = SECTION_DMRID_LOOKUP;
|
|
|
|
else if (::strncmp(buffer, "[NXDN Id Lookup]", 16U) == 0)
|
|
|
|
section = SECTION_NXDNID_LOOKUP;
|
|
|
|
else if (::strncmp(buffer, "[Modem]", 7U) == 0)
|
|
|
|
section = SECTION_MODEM;
|
|
|
|
else if (::strncmp(buffer, "[Transparent Data]", 18U) == 0)
|
|
|
|
section = SECTION_TRANSPARENT;
|
|
|
|
else if (::strncmp(buffer, "[UMP]", 5U) == 0)
|
|
|
|
section = SECTION_UMP;
|
|
|
|
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;
|
|
|
|
else if (::strncmp(buffer, "[P25]", 5U) == 0)
|
|
|
|
section = SECTION_P25;
|
|
|
|
else if (::strncmp(buffer, "[NXDN]", 6U) == 0)
|
|
|
|
section = SECTION_NXDN;
|
|
|
|
else if (::strncmp(buffer, "[POCSAG]", 8U) == 0)
|
|
|
|
section = SECTION_POCSAG;
|
|
|
|
else if (::strncmp(buffer, "[FM]", 4U) == 0)
|
|
|
|
section = SECTION_FM;
|
2020-06-25 12:41:19 +00:00
|
|
|
else if (::strncmp(buffer, "[AX.25]", 7U) == 0)
|
|
|
|
section = SECTION_AX25;
|
2020-05-23 12:03:55 +00:00
|
|
|
else if (::strncmp(buffer, "[D-Star Network]", 16U) == 0)
|
|
|
|
section = SECTION_DSTAR_NETWORK;
|
|
|
|
else if (::strncmp(buffer, "[DMR Network]", 13U) == 0)
|
|
|
|
section = SECTION_DMR_NETWORK;
|
|
|
|
else if (::strncmp(buffer, "[System Fusion Network]", 23U) == 0)
|
|
|
|
section = SECTION_FUSION_NETWORK;
|
|
|
|
else if (::strncmp(buffer, "[P25 Network]", 13U) == 0)
|
|
|
|
section = SECTION_P25_NETWORK;
|
|
|
|
else if (::strncmp(buffer, "[NXDN Network]", 14U) == 0)
|
|
|
|
section = SECTION_NXDN_NETWORK;
|
|
|
|
else if (::strncmp(buffer, "[POCSAG Network]", 16U) == 0)
|
|
|
|
section = SECTION_POCSAG_NETWORK;
|
|
|
|
else if (::strncmp(buffer, "[FM Network]", 12U) == 0)
|
|
|
|
section = SECTION_FM_NETWORK;
|
2020-06-25 12:41:19 +00:00
|
|
|
else if (::strncmp(buffer, "[AX.25 Network]", 15U) == 0)
|
|
|
|
section = SECTION_AX25_NETWORK;
|
2020-05-23 12:03:55 +00:00
|
|
|
else if (::strncmp(buffer, "[TFT Serial]", 12U) == 0)
|
|
|
|
section = SECTION_TFTSERIAL;
|
|
|
|
else if (::strncmp(buffer, "[HD44780]", 9U) == 0)
|
|
|
|
section = SECTION_HD44780;
|
|
|
|
else if (::strncmp(buffer, "[Nextion]", 9U) == 0)
|
|
|
|
section = SECTION_NEXTION;
|
|
|
|
else if (::strncmp(buffer, "[OLED]", 6U) == 0)
|
|
|
|
section = SECTION_OLED;
|
|
|
|
else if (::strncmp(buffer, "[LCDproc]", 9U) == 0)
|
|
|
|
section = SECTION_LCDPROC;
|
|
|
|
else if (::strncmp(buffer, "[Lock File]", 11U) == 0)
|
|
|
|
section = SECTION_LOCK_FILE;
|
2020-06-29 10:44:14 +00:00
|
|
|
else if (::strncmp(buffer, "[GPSD]", 6U) == 0)
|
|
|
|
section = SECTION_GPSD;
|
2020-05-23 12:03:55 +00:00
|
|
|
else if (::strncmp(buffer, "[Remote Control]", 16U) == 0)
|
|
|
|
section = SECTION_REMOTE_CONTROL;
|
|
|
|
else
|
|
|
|
section = SECTION_NONE;
|
2016-01-14 18:45:04 +00:00
|
|
|
|
2020-05-23 12:03:55 +00:00
|
|
|
continue;
|
2017-04-11 18:26:44 +00:00
|
|
|
}
|
2016-01-14 18:45:04 +00:00
|
|
|
|
2020-05-23 12:03:55 +00:00
|
|
|
char* key = ::strtok(buffer, " \t=\r\n");
|
|
|
|
if (key == NULL)
|
|
|
|
continue;
|
2018-01-29 23:08:48 +00:00
|
|
|
|
2020-05-23 12:03:55 +00:00
|
|
|
char* value = ::strtok(NULL, "\r\n");
|
|
|
|
if (value == NULL)
|
|
|
|
continue;
|
2018-01-29 23:08:48 +00:00
|
|
|
|
2020-05-23 12:03:55 +00:00
|
|
|
// Remove quotes from the value
|
|
|
|
size_t len = ::strlen(value);
|
|
|
|
if (len > 1U && *value == '"' && value[len - 1U] == '"') {
|
|
|
|
value[len - 1U] = '\0';
|
|
|
|
value++;
|
2020-07-02 15:38:53 +00:00
|
|
|
} else {
|
|
|
|
// if value is not quoted, remove after # (to make comment)
|
|
|
|
::strtok(value, "#");
|
2017-04-11 18:26:44 +00:00
|
|
|
}
|
2020-05-23 12:03:55 +00:00
|
|
|
|
|
|
|
if (section == SECTION_GENERAL) {
|
|
|
|
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_fmCallsign = m_cwIdCallsign = m_callsign = value;
|
|
|
|
} else if (::strcmp(key, "Id") == 0)
|
|
|
|
m_id = m_p25Id = m_dmrId = (unsigned int)::atoi(value);
|
|
|
|
else if (::strcmp(key, "Timeout") == 0)
|
|
|
|
m_fmTimeout = m_timeout = (unsigned int)::atoi(value);
|
|
|
|
else if (::strcmp(key, "Duplex") == 0)
|
|
|
|
m_duplex = ::atoi(value) == 1;
|
|
|
|
else if (::strcmp(key, "ModeHang") == 0)
|
2020-06-29 10:44:14 +00:00
|
|
|
m_dstarNetworkModeHang = m_dmrNetworkModeHang = m_fusionNetworkModeHang = m_p25NetworkModeHang =
|
|
|
|
m_dstarModeHang = m_dmrModeHang = m_fusionModeHang = m_p25ModeHang = (unsigned int)::atoi(value);
|
2020-05-23 12:03:55 +00:00
|
|
|
else if (::strcmp(key, "RFModeHang") == 0)
|
2020-06-29 10:44:14 +00:00
|
|
|
m_dstarModeHang = m_dmrModeHang = m_fusionModeHang = m_p25ModeHang = (unsigned int)::atoi(value);
|
2020-05-23 12:03:55 +00:00
|
|
|
else if (::strcmp(key, "NetModeHang") == 0)
|
2020-06-29 10:44:14 +00:00
|
|
|
m_dstarNetworkModeHang = m_dmrNetworkModeHang = m_fusionNetworkModeHang = m_p25NetworkModeHang = (unsigned int)::atoi(value);
|
2020-05-23 12:03:55 +00:00
|
|
|
else if (::strcmp(key, "Display") == 0)
|
|
|
|
m_display = value;
|
|
|
|
else if (::strcmp(key, "Daemon") == 0)
|
|
|
|
m_daemon = ::atoi(value) == 1;
|
|
|
|
} else if (section == SECTION_INFO) {
|
|
|
|
if (::strcmp(key, "TXFrequency") == 0)
|
|
|
|
m_pocsagFrequency = 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) {
|
|
|
|
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);
|
|
|
|
} 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);
|
|
|
|
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;
|
2017-01-05 19:15:10 +00:00
|
|
|
}
|
2020-05-23 12:03:55 +00:00
|
|
|
} 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);
|
|
|
|
} 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);
|
|
|
|
} else if (section == SECTION_MODEM) {
|
|
|
|
if (::strcmp(key, "Port") == 0)
|
|
|
|
m_modemPort = value;
|
|
|
|
else if (::strcmp(key, "Protocol") == 0)
|
|
|
|
m_modemProtocol = value;
|
|
|
|
else if (::strcmp(key, "Speed") == 0)
|
|
|
|
m_modemSpeed = (unsigned int)::atoi(value);
|
|
|
|
else if (::strcmp(key, "Address") == 0)
|
|
|
|
m_modemAddress = (unsigned int)::strtoul(value, NULL, 16);
|
|
|
|
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)
|
2020-06-27 21:47:54 +00:00
|
|
|
m_ax25TXDelay = m_modemTXDelay = (unsigned int)::atoi(value);
|
2020-05-23 12:03:55 +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));
|
|
|
|
else if (::strcmp(key, "RXLevel") == 0)
|
|
|
|
m_modemRXLevel = float(::atof(value));
|
|
|
|
else if (::strcmp(key, "TXLevel") == 0)
|
2020-06-25 12:41:19 +00:00
|
|
|
m_modemAX25TXLevel = m_modemFMTXLevel = m_modemCWIdTXLevel = m_modemDStarTXLevel = m_modemDMRTXLevel = m_modemYSFTXLevel = m_modemP25TXLevel = m_modemNXDNTXLevel = float(::atof(value));
|
2020-05-23 12:03:55 +00:00
|
|
|
else if (::strcmp(key, "CWIdTXLevel") == 0)
|
|
|
|
m_modemCWIdTXLevel = float(::atof(value));
|
|
|
|
else if (::strcmp(key, "D-StarTXLevel") == 0)
|
|
|
|
m_modemDStarTXLevel = float(::atof(value));
|
|
|
|
else if (::strcmp(key, "DMRTXLevel") == 0)
|
|
|
|
m_modemDMRTXLevel = float(::atof(value));
|
|
|
|
else if (::strcmp(key, "YSFTXLevel") == 0)
|
|
|
|
m_modemYSFTXLevel = float(::atof(value));
|
|
|
|
else if (::strcmp(key, "P25TXLevel") == 0)
|
|
|
|
m_modemP25TXLevel = float(::atof(value));
|
|
|
|
else if (::strcmp(key, "NXDNTXLevel") == 0)
|
|
|
|
m_modemNXDNTXLevel = float(::atof(value));
|
|
|
|
else if (::strcmp(key, "POCSAGTXLevel") == 0)
|
|
|
|
m_modemPOCSAGTXLevel = float(::atof(value));
|
|
|
|
else if (::strcmp(key, "FMTXLevel") == 0)
|
|
|
|
m_modemFMTXLevel = float(::atof(value));
|
2020-06-25 12:41:19 +00:00
|
|
|
else if (::strcmp(key, "AX25TXLevel") == 0)
|
|
|
|
m_modemAX25TXLevel = float(::atof(value));
|
2020-05-23 12:03:55 +00:00
|
|
|
else if (::strcmp(key, "RSSIMappingFile") == 0)
|
|
|
|
m_modemRSSIMappingFile = value;
|
|
|
|
else if (::strcmp(key, "Trace") == 0)
|
|
|
|
m_modemTrace = ::atoi(value) == 1;
|
|
|
|
else if (::strcmp(key, "Debug") == 0)
|
|
|
|
m_modemDebug = ::atoi(value) == 1;
|
|
|
|
} else if (section == SECTION_TRANSPARENT) {
|
|
|
|
if (::strcmp(key, "Enable") == 0)
|
|
|
|
m_transparentEnabled = ::atoi(value) == 1;
|
|
|
|
else if (::strcmp(key, "RemoteAddress") == 0)
|
|
|
|
m_transparentRemoteAddress = value;
|
|
|
|
else if (::strcmp(key, "RemotePort") == 0)
|
|
|
|
m_transparentRemotePort = (unsigned int)::atoi(value);
|
|
|
|
else if (::strcmp(key, "LocalPort") == 0)
|
|
|
|
m_transparentLocalPort = (unsigned int)::atoi(value);
|
|
|
|
else if (::strcmp(key, "SendFrameType") == 0)
|
|
|
|
m_transparentSendFrameType = (unsigned int)::atoi(value);
|
|
|
|
} else if (section == SECTION_UMP) {
|
|
|
|
if (::strcmp(key, "Enable") == 0)
|
|
|
|
m_umpEnabled = ::atoi(value) == 1;
|
|
|
|
else if (::strcmp(key, "Port") == 0)
|
|
|
|
m_umpPort = value;
|
|
|
|
} else if (section == SECTION_DSTAR) {
|
|
|
|
if (::strcmp(key, "Enable") == 0)
|
|
|
|
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]);
|
|
|
|
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) {
|
|
|
|
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");
|
|
|
|
}
|
|
|
|
} else if (::strcmp(key, "AckReply") == 0)
|
|
|
|
m_dstarAckReply = ::atoi(value) == 1;
|
|
|
|
else if (::strcmp(key, "AckTime") == 0)
|
|
|
|
m_dstarAckTime = (unsigned int)::atoi(value);
|
|
|
|
else if (::strcmp(key, "AckMessage") == 0)
|
|
|
|
m_dstarAckMessage = ::atoi(value) == 1;
|
|
|
|
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);
|
|
|
|
} else if (section == SECTION_DMR) {
|
|
|
|
if (::strcmp(key, "Enable") == 0)
|
|
|
|
m_dmrEnabled = ::atoi(value) == 1;
|
|
|
|
else if (::strcmp(key, "Beacons") == 0)
|
|
|
|
m_dmrBeacons = ::atoi(value) == 1 ? DMR_BEACONS_NETWORK : DMR_BEACONS_OFF;
|
|
|
|
else if (::strcmp(key, "BeaconInterval") == 0) {
|
|
|
|
m_dmrBeacons = m_dmrBeacons != DMR_BEACONS_OFF ? DMR_BEACONS_TIMED : DMR_BEACONS_OFF;
|
|
|
|
m_dmrBeaconInterval = (unsigned int)::atoi(value);
|
|
|
|
} else if (::strcmp(key, "BeaconDuration") == 0)
|
|
|
|
m_dmrBeaconDuration = (unsigned int)::atoi(value);
|
|
|
|
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;
|
|
|
|
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) {
|
|
|
|
char* p = ::strtok(value, ",\r\n");
|
|
|
|
while (p != NULL) {
|
|
|
|
unsigned int id = (unsigned int)::atoi(p);
|
|
|
|
if (id > 0U)
|
|
|
|
m_dmrWhiteList.push_back(id);
|
|
|
|
p = ::strtok(NULL, ",\r\n");
|
|
|
|
}
|
|
|
|
} 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);
|
|
|
|
else if (::strcmp(key, "OVCM") == 0) {
|
|
|
|
switch (::atoi(value)) {
|
2019-11-17 02:57:58 +00:00
|
|
|
case 1:
|
|
|
|
m_dmrOVCM = DMR_OVCM_RX_ON;
|
|
|
|
break;
|
|
|
|
case 2:
|
|
|
|
m_dmrOVCM = DMR_OVCM_TX_ON;
|
|
|
|
break;
|
|
|
|
case 3:
|
|
|
|
m_dmrOVCM = DMR_OVCM_ON;
|
|
|
|
break;
|
|
|
|
default:
|
|
|
|
m_dmrOVCM = DMR_OVCM_OFF;
|
|
|
|
break;
|
2020-05-23 12:03:55 +00:00
|
|
|
}
|
2019-11-17 02:57:58 +00:00
|
|
|
}
|
2020-05-23 12:03:55 +00:00
|
|
|
} else if (section == SECTION_FUSION) {
|
|
|
|
if (::strcmp(key, "Enable") == 0)
|
|
|
|
m_fusionEnabled = ::atoi(value) == 1;
|
|
|
|
else if (::strcmp(key, "LowDeviation") == 0)
|
|
|
|
m_fusionLowDeviation = ::atoi(value) == 1;
|
|
|
|
else if (::strcmp(key, "DGID") == 0) {
|
|
|
|
m_fusionDGIdEnabled = true;
|
|
|
|
m_fusionDGId = (unsigned int)::atoi(value);
|
|
|
|
} else if (::strcmp(key, "RemoteGateway") == 0)
|
|
|
|
m_fusionRemoteGateway = ::atoi(value) == 1;
|
|
|
|
else if (::strcmp(key, "SelfOnly") == 0)
|
|
|
|
m_fusionSelfOnly = ::atoi(value) == 1;
|
|
|
|
else if (::strcmp(key, "TXHang") == 0)
|
|
|
|
m_fusionTXHang = (unsigned int)::atoi(value);
|
|
|
|
else if (::strcmp(key, "ModeHang") == 0)
|
|
|
|
m_fusionModeHang = (unsigned int)::atoi(value);
|
|
|
|
} else if (section == SECTION_P25) {
|
|
|
|
if (::strcmp(key, "Enable") == 0)
|
|
|
|
m_p25Enabled = ::atoi(value) == 1;
|
|
|
|
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);
|
|
|
|
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, "TXHang") == 0)
|
|
|
|
m_p25TXHang = (unsigned int)::atoi(value);
|
|
|
|
else if (::strcmp(key, "ModeHang") == 0)
|
|
|
|
m_p25ModeHang = (unsigned int)::atoi(value);
|
|
|
|
} 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, "TXHang") == 0)
|
|
|
|
m_nxdnTXHang = (unsigned int)::atoi(value);
|
|
|
|
else if (::strcmp(key, "ModeHang") == 0)
|
|
|
|
m_nxdnModeHang = (unsigned int)::atoi(value);
|
|
|
|
} else if (section == SECTION_POCSAG) {
|
|
|
|
if (::strcmp(key, "Enable") == 0)
|
|
|
|
m_pocsagEnabled = ::atoi(value) == 1;
|
|
|
|
else if (::strcmp(key, "Frequency") == 0)
|
|
|
|
m_pocsagFrequency = (unsigned int)::atoi(value);
|
|
|
|
} else if (section == SECTION_FM) {
|
|
|
|
if (::strcmp(key, "Enable") == 0)
|
|
|
|
m_fmEnabled = ::atoi(value) == 1;
|
|
|
|
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_fmCallsign = value;
|
|
|
|
} else if (::strcmp(key, "CallsignSpeed") == 0)
|
|
|
|
m_fmCallsignSpeed = (unsigned int)::atoi(value);
|
|
|
|
else if (::strcmp(key, "CallsignFrequency") == 0)
|
|
|
|
m_fmCallsignFrequency = (unsigned int)::atoi(value);
|
|
|
|
else if (::strcmp(key, "CallsignTime") == 0)
|
|
|
|
m_fmCallsignTime = (unsigned int)::atoi(value);
|
|
|
|
else if (::strcmp(key, "CallsignHoldoff") == 0)
|
|
|
|
m_fmCallsignHoldoff = (unsigned int)::atoi(value);
|
|
|
|
else if (::strcmp(key, "CallsignHighLevel") == 0)
|
|
|
|
m_fmCallsignHighLevel = float(::atof(value));
|
|
|
|
else if (::strcmp(key, "CallsignLowLevel") == 0)
|
|
|
|
m_fmCallsignLowLevel = float(::atof(value));
|
|
|
|
else if (::strcmp(key, "CallsignAtStart") == 0)
|
|
|
|
m_fmCallsignAtStart = ::atoi(value) == 1;
|
|
|
|
else if (::strcmp(key, "CallsignAtEnd") == 0)
|
|
|
|
m_fmCallsignAtEnd = ::atoi(value) == 1;
|
|
|
|
else if (::strcmp(key, "CallsignAtLatch") == 0)
|
|
|
|
m_fmCallsignAtLatch = ::atoi(value) == 1;
|
|
|
|
else if (::strcmp(key, "RFAck") == 0) {
|
|
|
|
// Convert the ack to upper case
|
|
|
|
for (unsigned int i = 0U; value[i] != 0; i++)
|
|
|
|
value[i] = ::toupper(value[i]);
|
|
|
|
m_fmRFAck = value;
|
|
|
|
} else if (::strcmp(key, "ExtAck") == 0) {
|
|
|
|
// Convert the ack to upper case
|
|
|
|
for (unsigned int i = 0U; value[i] != 0; i++)
|
|
|
|
value[i] = ::toupper(value[i]);
|
|
|
|
m_fmExtAck = value;
|
|
|
|
} else if (::strcmp(key, "AckSpeed") == 0)
|
|
|
|
m_fmAckSpeed = (unsigned int)::atoi(value);
|
|
|
|
else if (::strcmp(key, "AckFrequency") == 0)
|
|
|
|
m_fmAckFrequency = (unsigned int)::atoi(value);
|
|
|
|
else if (::strcmp(key, "AckMinTime") == 0)
|
|
|
|
m_fmAckMinTime = (unsigned int)::atoi(value);
|
|
|
|
else if (::strcmp(key, "AckDelay") == 0)
|
|
|
|
m_fmAckDelay = (unsigned int)::atoi(value);
|
|
|
|
else if (::strcmp(key, "AckLevel") == 0)
|
|
|
|
m_fmAckLevel = float(::atof(value));
|
|
|
|
else if (::strcmp(key, "Timeout") == 0)
|
|
|
|
m_fmTimeout = (unsigned int)::atoi(value);
|
|
|
|
else if (::strcmp(key, "TimeoutLevel") == 0)
|
|
|
|
m_fmTimeoutLevel = float(::atof(value));
|
|
|
|
else if (::strcmp(key, "CTCSSFrequency") == 0)
|
|
|
|
m_fmCTCSSFrequency = float(::atof(value));
|
|
|
|
else if (::strcmp(key, "CTCSSThreshold") == 0)
|
|
|
|
m_fmCTCSSHighThreshold = m_fmCTCSSLowThreshold = (unsigned int)::atoi(value);
|
|
|
|
else if (::strcmp(key, "CTCSSHighThreshold") == 0)
|
|
|
|
m_fmCTCSSHighThreshold = (unsigned int)::atoi(value);
|
|
|
|
else if (::strcmp(key, "CTCSSLowThreshold") == 0)
|
|
|
|
m_fmCTCSSLowThreshold = (unsigned int)::atoi(value);
|
|
|
|
else if (::strcmp(key, "CTCSSLevel") == 0)
|
|
|
|
m_fmCTCSSLevel = float(::atof(value));
|
|
|
|
else if (::strcmp(key, "KerchunkTime") == 0)
|
|
|
|
m_fmKerchunkTime = (unsigned int)::atoi(value);
|
2020-06-20 19:44:02 +00:00
|
|
|
else if (::strcmp(key, "KerchunkTX") == 0)
|
|
|
|
m_fmKerchunkTX = ::atoi(value) == 1;
|
2020-05-23 12:03:55 +00:00
|
|
|
else if (::strcmp(key, "HangTime") == 0)
|
|
|
|
m_fmHangTime = (unsigned int)::atoi(value);
|
|
|
|
else if (::strcmp(key, "UseCOS") == 0)
|
|
|
|
m_fmUseCOS = ::atoi(value) == 1;
|
|
|
|
else if (::strcmp(key, "COSInvert") == 0)
|
|
|
|
m_fmCOSInvert = ::atoi(value) == 1;
|
|
|
|
else if (::strcmp(key, "RFAudioBoost") == 0)
|
|
|
|
m_fmRFAudioBoost = (unsigned int)::atoi(value);
|
|
|
|
else if (::strcmp(key, "MaxDevLevel") == 0)
|
|
|
|
m_fmMaxDevLevel = float(::atof(value));
|
|
|
|
else if (::strcmp(key, "ExtAudioBoost") == 0)
|
|
|
|
m_fmExtAudioBoost = (unsigned int)::atoi(value);
|
|
|
|
else if (::strcmp(key, "ModeHang") == 0)
|
|
|
|
m_fmModeHang = (unsigned int)::atoi(value);
|
2020-06-25 12:41:19 +00:00
|
|
|
} else if (section == SECTION_AX25) {
|
|
|
|
if (::strcmp(key, "Enable") == 0)
|
|
|
|
m_ax25Enabled = ::atoi(value) == 1;
|
2020-06-27 21:47:54 +00:00
|
|
|
else if (::strcmp(key, "TXDelay") == 0)
|
|
|
|
m_ax25TXDelay = (unsigned int)::atoi(value);
|
2020-07-01 09:59:46 +00:00
|
|
|
else if (::strcmp(key, "RXTwist") == 0)
|
|
|
|
m_ax25RXTwist = ::atoi(value);
|
|
|
|
else if (::strcmp(key, "SlotTime") == 0)
|
|
|
|
m_ax25SlotTime = (unsigned int)::atoi(value);
|
|
|
|
else if (::strcmp(key, "PPersist") == 0)
|
|
|
|
m_ax25PPersist = (unsigned int)::atoi(value);
|
2020-06-25 12:41:19 +00:00
|
|
|
else if (::strcmp(key, "Trace") == 0)
|
|
|
|
m_ax25Trace = ::atoi(value) == 1;
|
2020-05-23 12:03:55 +00:00
|
|
|
} else if (section == SECTION_DSTAR_NETWORK) {
|
|
|
|
if (::strcmp(key, "Enable") == 0)
|
|
|
|
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);
|
|
|
|
else if (::strcmp(key, "Debug") == 0)
|
|
|
|
m_dstarNetworkDebug = ::atoi(value) == 1;
|
|
|
|
} else if (section == SECTION_DMR_NETWORK) {
|
|
|
|
if (::strcmp(key, "Enable") == 0)
|
|
|
|
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);
|
|
|
|
else if (::strcmp(key, "Password") == 0)
|
|
|
|
m_dmrNetworkPassword = value;
|
|
|
|
else if (::strcmp(key, "Options") == 0)
|
|
|
|
m_dmrNetworkOptions = value;
|
|
|
|
else if (::strcmp(key, "Debug") == 0)
|
|
|
|
m_dmrNetworkDebug = ::atoi(value) == 1;
|
|
|
|
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);
|
|
|
|
} else if (section == SECTION_FUSION_NETWORK) {
|
|
|
|
if (::strcmp(key, "Enable") == 0)
|
|
|
|
m_fusionNetworkEnabled = ::atoi(value) == 1;
|
|
|
|
else if (::strcmp(key, "LocalAddress") == 0)
|
|
|
|
m_fusionNetworkMyAddress = value;
|
|
|
|
else if (::strcmp(key, "LocalPort") == 0)
|
|
|
|
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);
|
|
|
|
else if (::strcmp(key, "Debug") == 0)
|
|
|
|
m_fusionNetworkDebug = ::atoi(value) == 1;
|
|
|
|
} 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);
|
|
|
|
else if (::strcmp(key, "Debug") == 0)
|
|
|
|
m_p25NetworkDebug = ::atoi(value) == 1;
|
|
|
|
} else if (section == SECTION_NXDN_NETWORK) {
|
|
|
|
if (::strcmp(key, "Enable") == 0)
|
|
|
|
m_nxdnNetworkEnabled = ::atoi(value) == 1;
|
|
|
|
else if (::strcmp(key, "LocalAddress") == 0)
|
|
|
|
m_nxdnLocalAddress = value;
|
|
|
|
else if (::strcmp(key, "LocalPort") == 0)
|
|
|
|
m_nxdnLocalPort = (unsigned int)::atoi(value);
|
|
|
|
else if (::strcmp(key, "GatewayAddress") == 0)
|
|
|
|
m_nxdnGatewayAddress = value;
|
|
|
|
else if (::strcmp(key, "GatewayPort") == 0)
|
|
|
|
m_nxdnGatewayPort = (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;
|
|
|
|
} else if (section == SECTION_POCSAG_NETWORK) {
|
|
|
|
if (::strcmp(key, "Enable") == 0)
|
|
|
|
m_pocsagNetworkEnabled = ::atoi(value) == 1;
|
|
|
|
else if (::strcmp(key, "LocalAddress") == 0)
|
|
|
|
m_pocsagLocalAddress = value;
|
|
|
|
else if (::strcmp(key, "LocalPort") == 0)
|
|
|
|
m_pocsagLocalPort = (unsigned int)::atoi(value);
|
|
|
|
else if (::strcmp(key, "GatewayAddress") == 0)
|
|
|
|
m_pocsagGatewayAddress = value;
|
|
|
|
else if (::strcmp(key, "GatewayPort") == 0)
|
|
|
|
m_pocsagGatewayPort = (unsigned int)::atoi(value);
|
|
|
|
else if (::strcmp(key, "ModeHang") == 0)
|
|
|
|
m_pocsagNetworkModeHang = (unsigned int)::atoi(value);
|
|
|
|
else if (::strcmp(key, "Debug") == 0)
|
|
|
|
m_pocsagNetworkDebug = ::atoi(value) == 1;
|
|
|
|
} else if (section == SECTION_FM_NETWORK) {
|
|
|
|
if (::strcmp(key, "Enable") == 0)
|
|
|
|
m_fmNetworkEnabled = ::atoi(value) == 1;
|
|
|
|
else if (::strcmp(key, "LocalAddress") == 0)
|
|
|
|
m_fmLocalAddress = value;
|
|
|
|
else if (::strcmp(key, "LocalPort") == 0)
|
|
|
|
m_fmLocalPort = (unsigned int)::atoi(value);
|
|
|
|
else if (::strcmp(key, "GatewayAddress") == 0)
|
|
|
|
m_fmGatewayAddress = value;
|
|
|
|
else if (::strcmp(key, "GatewayPort") == 0)
|
|
|
|
m_fmGatewayPort = (unsigned int)::atoi(value);
|
|
|
|
else if (::strcmp(key, "ModeHang") == 0)
|
|
|
|
m_fmNetworkModeHang = (unsigned int)::atoi(value);
|
|
|
|
else if (::strcmp(key, "Debug") == 0)
|
|
|
|
m_fmNetworkDebug = ::atoi(value) == 1;
|
2020-06-25 12:41:19 +00:00
|
|
|
} else if (section == SECTION_AX25_NETWORK) {
|
|
|
|
if (::strcmp(key, "Enable") == 0)
|
|
|
|
m_ax25NetworkEnabled = ::atoi(value) == 1;
|
|
|
|
else if (::strcmp(key, "Port") == 0)
|
|
|
|
m_ax25NetworkPort = value;
|
|
|
|
else if (::strcmp(key, "Speed") == 0)
|
|
|
|
m_ax25NetworkSpeed = (unsigned int)::atoi(value);
|
|
|
|
else if (::strcmp(key, "Debug") == 0)
|
|
|
|
m_ax25NetworkDebug = ::atoi(value) == 1;
|
2020-05-23 12:03:55 +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)
|
|
|
|
m_hd44780i2cAddress = (unsigned int)::strtoul(value, NULL, 16);
|
|
|
|
else if (::strcmp(key, "PWM") == 0)
|
|
|
|
m_hd44780PWM = ::atoi(value) == 1;
|
|
|
|
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);
|
|
|
|
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");
|
|
|
|
}
|
2016-04-06 16:43:20 +00:00
|
|
|
}
|
2020-05-23 12:03:55 +00:00
|
|
|
} 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)
|
2020-07-02 15:38:53 +00:00
|
|
|
m_nextionScreenLayout = (unsigned int)::strtoul(value, NULL, 0);
|
2020-05-23 12:03:55 +00:00
|
|
|
else if (::strcmp(key, "DisplayTempInFahrenheit") == 0)
|
|
|
|
m_nextionTempInFahrenheit = ::atoi(value) == 1;
|
|
|
|
} else if (section == SECTION_OLED) {
|
|
|
|
if (::strcmp(key, "Type") == 0)
|
|
|
|
m_oledType = (unsigned char)::atoi(value);
|
|
|
|
else if (::strcmp(key, "Brightness") == 0)
|
|
|
|
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;
|
|
|
|
else if (::strcmp(key, "Rotate") == 0)
|
|
|
|
m_oledRotate = ::atoi(value) == 1;
|
|
|
|
else if (::strcmp(key, "LogoScreensaver") == 0)
|
|
|
|
m_oledLogoScreensaver = ::atoi(value) == 1;
|
|
|
|
} 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;
|
|
|
|
} else if (section == SECTION_LOCK_FILE) {
|
|
|
|
if (::strcmp(key, "Enable") == 0)
|
|
|
|
m_lockFileEnabled = ::atoi(value) == 1;
|
|
|
|
else if (::strcmp(key, "File") == 0)
|
|
|
|
m_lockFileName = value;
|
2020-06-29 10:44:14 +00:00
|
|
|
} else if (section == SECTION_GPSD) {
|
2020-05-23 12:03:55 +00:00
|
|
|
if (::strcmp(key, "Enable") == 0)
|
2020-06-29 10:44:14 +00:00
|
|
|
m_gpsdEnabled = ::atoi(value) == 1;
|
2020-05-23 12:03:55 +00:00
|
|
|
else if (::strcmp(key, "Address") == 0)
|
2020-06-29 10:44:14 +00:00
|
|
|
m_gpsdAddress = value;
|
2020-05-23 12:03:55 +00:00
|
|
|
else if (::strcmp(key, "Port") == 0)
|
2020-06-29 10:44:14 +00:00
|
|
|
m_gpsdPort = value;
|
2020-05-23 12:03:55 +00:00
|
|
|
} else if (section == SECTION_REMOTE_CONTROL) {
|
|
|
|
if (::strcmp(key, "Enable") == 0)
|
|
|
|
m_remoteControlEnabled = ::atoi(value) == 1;
|
|
|
|
else if (::strcmp(key, "Port") == 0)
|
|
|
|
m_remoteControlPort = (unsigned int)::atoi(value);
|
2016-04-06 16:43:20 +00:00
|
|
|
}
|
2016-10-28 12:22:20 +00:00
|
|
|
}
|
2016-01-14 18:45:04 +00:00
|
|
|
|
2020-05-23 12:03:55 +00:00
|
|
|
::fclose(fp);
|
2016-01-14 18:45:04 +00:00
|
|
|
|
2020-05-23 12:03:55 +00:00
|
|
|
return true;
|
2016-01-14 18:45:04 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
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
|
|
|
}
|
|
|
|
|
2016-05-03 22:01:49 +00:00
|
|
|
bool CConf::getDaemon() const
|
|
|
|
{
|
|
|
|
return m_daemon;
|
|
|
|
}
|
|
|
|
|
2017-08-20 11:07:57 +00:00
|
|
|
unsigned int CConf::getRXFrequency() const
|
2016-01-14 18:45:04 +00:00
|
|
|
{
|
|
|
|
return m_rxFrequency;
|
|
|
|
}
|
|
|
|
|
2017-08-20 11:07:57 +00:00
|
|
|
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;
|
|
|
|
}
|
2017-04-10 16:55:53 +00:00
|
|
|
|
|
|
|
std::string CConf::getCWIdCallsign() const
|
|
|
|
{
|
2017-04-11 18:26:44 +00:00
|
|
|
return m_cwIdCallsign;
|
2017-04-10 16:55:53 +00:00
|
|
|
}
|
2016-05-09 20:55:44 +00:00
|
|
|
|
2016-10-10 18:15:30 +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;
|
|
|
|
}
|
|
|
|
|
2018-07-19 13:09:00 +00:00
|
|
|
std::string CConf::getModemProtocol() const
|
|
|
|
{
|
|
|
|
return m_modemProtocol;
|
|
|
|
}
|
|
|
|
|
2020-05-23 12:03:55 +00:00
|
|
|
unsigned int CConf::getModemSpeed() const
|
|
|
|
{
|
|
|
|
return m_modemSpeed;
|
|
|
|
}
|
|
|
|
|
2018-07-19 13:09:00 +00:00
|
|
|
unsigned int CConf::getModemAddress() const
|
|
|
|
{
|
|
|
|
return m_modemAddress;
|
|
|
|
}
|
|
|
|
|
2016-01-14 18:45:04 +00:00
|
|
|
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;
|
|
|
|
}
|
|
|
|
|
2017-08-20 11:07:57 +00:00
|
|
|
int CConf::getModemRXOffset() const
|
2017-06-14 15:44:23 +00:00
|
|
|
{
|
2017-08-20 11:07:57 +00:00
|
|
|
return m_modemRXOffset;
|
2017-06-14 15:44:23 +00:00
|
|
|
}
|
|
|
|
|
2017-08-20 11:07:57 +00:00
|
|
|
int CConf::getModemTXOffset() const
|
2017-06-14 15:44:23 +00:00
|
|
|
{
|
2017-08-20 11:07:57 +00:00
|
|
|
return m_modemTXOffset;
|
|
|
|
}
|
|
|
|
|
2017-10-28 11:37:32 +00:00
|
|
|
int CConf::getModemRXDCOffset() const
|
|
|
|
{
|
|
|
|
return m_modemRXDCOffset;
|
|
|
|
}
|
|
|
|
|
2017-08-20 11:07:57 +00:00
|
|
|
int CConf::getModemTXDCOffset() const
|
|
|
|
{
|
|
|
|
return m_modemTXDCOffset;
|
2017-06-14 15:44:23 +00:00
|
|
|
}
|
|
|
|
|
2017-12-30 15:05:11 +00:00
|
|
|
float CConf::getModemRFLevel() const
|
|
|
|
{
|
|
|
|
return m_modemRFLevel;
|
|
|
|
}
|
|
|
|
|
2017-06-02 15:34:55 +00:00
|
|
|
float CConf::getModemRXLevel() const
|
2016-01-14 18:45:04 +00:00
|
|
|
{
|
|
|
|
return m_modemRXLevel;
|
|
|
|
}
|
|
|
|
|
2017-06-02 15:34:55 +00:00
|
|
|
float CConf::getModemCWIdTXLevel() const
|
2016-10-10 16:46:37 +00:00
|
|
|
{
|
|
|
|
return m_modemCWIdTXLevel;
|
|
|
|
}
|
|
|
|
|
2017-06-02 15:34:55 +00:00
|
|
|
float CConf::getModemDStarTXLevel() const
|
2016-01-14 18:45:04 +00:00
|
|
|
{
|
2016-08-09 06:08:37 +00:00
|
|
|
return m_modemDStarTXLevel;
|
|
|
|
}
|
|
|
|
|
2017-06-02 15:34:55 +00:00
|
|
|
float CConf::getModemDMRTXLevel() const
|
2016-08-09 06:08:37 +00:00
|
|
|
{
|
|
|
|
return m_modemDMRTXLevel;
|
|
|
|
}
|
|
|
|
|
2017-06-02 15:34:55 +00:00
|
|
|
float CConf::getModemYSFTXLevel() const
|
2016-08-09 06:08:37 +00:00
|
|
|
{
|
|
|
|
return m_modemYSFTXLevel;
|
2016-01-14 18:45:04 +00:00
|
|
|
}
|
|
|
|
|
2017-06-02 15:34:55 +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;
|
|
|
|
}
|
|
|
|
|
2018-06-07 17:46:03 +00:00
|
|
|
float CConf::getModemPOCSAGTXLevel() const
|
|
|
|
{
|
|
|
|
return m_modemPOCSAGTXLevel;
|
|
|
|
}
|
|
|
|
|
2020-04-12 14:10:51 +00:00
|
|
|
float CConf::getModemFMTXLevel() const
|
|
|
|
{
|
|
|
|
return m_modemFMTXLevel;
|
|
|
|
}
|
|
|
|
|
2020-06-20 20:28:39 +00:00
|
|
|
float CConf::getModemAX25TXLevel() const
|
|
|
|
{
|
|
|
|
return m_modemAX25TXLevel;
|
|
|
|
}
|
|
|
|
|
2016-12-21 19:58:46 +00:00
|
|
|
std::string CConf::getModemRSSIMappingFile () const
|
2016-08-08 20:26:18 +00:00
|
|
|
{
|
2016-12-21 19:58:46 +00:00
|
|
|
return m_modemRSSIMappingFile;
|
2016-08-08 20:26:18 +00:00
|
|
|
}
|
|
|
|
|
2017-04-14 13:05:30 +00:00
|
|
|
bool CConf::getModemTrace() const
|
|
|
|
{
|
|
|
|
return m_modemTrace;
|
|
|
|
}
|
|
|
|
|
2016-01-14 18:45:04 +00:00
|
|
|
bool CConf::getModemDebug() const
|
|
|
|
{
|
|
|
|
return m_modemDebug;
|
|
|
|
}
|
|
|
|
|
2018-03-22 07:13:13 +00:00
|
|
|
bool CConf::getTransparentEnabled() const
|
|
|
|
{
|
|
|
|
return m_transparentEnabled;
|
|
|
|
}
|
|
|
|
|
|
|
|
std::string CConf::getTransparentRemoteAddress() const
|
|
|
|
{
|
|
|
|
return m_transparentRemoteAddress;
|
|
|
|
}
|
|
|
|
|
|
|
|
unsigned int CConf::getTransparentRemotePort() const
|
|
|
|
{
|
|
|
|
return m_transparentRemotePort;
|
|
|
|
}
|
|
|
|
|
|
|
|
unsigned int CConf::getTransparentLocalPort() const
|
|
|
|
{
|
|
|
|
return m_transparentLocalPort;
|
|
|
|
}
|
|
|
|
|
2018-08-13 18:39:16 +00:00
|
|
|
unsigned int CConf::getTransparentSendFrameType() const
|
|
|
|
{
|
|
|
|
return m_transparentSendFrameType;
|
|
|
|
}
|
|
|
|
|
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;
|
|
|
|
}
|
|
|
|
|
2016-04-04 16:40:05 +00:00
|
|
|
bool CConf::getDStarSelfOnly() const
|
|
|
|
{
|
|
|
|
return m_dstarSelfOnly;
|
|
|
|
}
|
|
|
|
|
2016-04-06 17:46:05 +00:00
|
|
|
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;
|
|
|
|
}
|
|
|
|
|
2018-09-14 10:30:48 +00:00
|
|
|
bool CConf::getDStarAckMessage() const
|
|
|
|
{
|
|
|
|
return m_dstarAckMessage;
|
|
|
|
}
|
|
|
|
|
2017-02-16 19:49:58 +00:00
|
|
|
bool CConf::getDStarErrorReply() const
|
|
|
|
{
|
|
|
|
return m_dstarErrorReply;
|
|
|
|
}
|
|
|
|
|
2017-11-09 09:21:22 +00:00
|
|
|
bool CConf::getDStarRemoteGateway() const
|
|
|
|
{
|
|
|
|
return m_dstarRemoteGateway;
|
|
|
|
}
|
|
|
|
|
2017-09-01 08:25:54 +00:00
|
|
|
unsigned int CConf::getDStarModeHang() const
|
|
|
|
{
|
|
|
|
return m_dstarModeHang;
|
|
|
|
}
|
|
|
|
|
2016-01-14 18:45:04 +00:00
|
|
|
bool CConf::getDMREnabled() const
|
|
|
|
{
|
|
|
|
return m_dmrEnabled;
|
|
|
|
}
|
|
|
|
|
2019-11-05 08:42:21 +00:00
|
|
|
DMR_BEACONS 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;
|
|
|
|
}
|
|
|
|
|
2016-04-04 16:40:05 +00:00
|
|
|
bool CConf::getDMRSelfOnly() const
|
|
|
|
{
|
|
|
|
return m_dmrSelfOnly;
|
|
|
|
}
|
|
|
|
|
2017-01-16 12:10:23 +00:00
|
|
|
bool CConf::getDMREmbeddedLCOnly() const
|
|
|
|
{
|
|
|
|
return m_dmrEmbeddedLCOnly;
|
|
|
|
}
|
|
|
|
|
2017-02-27 20:17:55 +00:00
|
|
|
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;
|
|
|
|
}
|
|
|
|
|
2016-04-06 17:46:05 +00:00
|
|
|
std::vector<unsigned int> CConf::getDMRBlackList() const
|
|
|
|
{
|
|
|
|
return m_dmrBlackList;
|
|
|
|
}
|
2016-10-10 18:15:30 +00:00
|
|
|
|
2016-12-21 19:06:29 +00:00
|
|
|
std::vector<unsigned int> CConf::getDMRWhiteList() const
|
2016-04-12 17:26:13 +00:00
|
|
|
{
|
2016-12-21 19:06:29 +00:00
|
|
|
return m_dmrWhiteList;
|
2016-04-12 17:26:13 +00:00
|
|
|
}
|
|
|
|
|
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;
|
|
|
|
}
|
|
|
|
|
2016-06-16 20:40:05 +00:00
|
|
|
unsigned int CConf::getDMRCallHang() const
|
|
|
|
{
|
|
|
|
return m_dmrCallHang;
|
|
|
|
}
|
|
|
|
|
2016-05-05 16:56:18 +00:00
|
|
|
unsigned int CConf::getDMRTXHang() const
|
|
|
|
{
|
|
|
|
return m_dmrTXHang;
|
|
|
|
}
|
|
|
|
|
2017-09-01 08:25:54 +00:00
|
|
|
unsigned int CConf::getDMRModeHang() const
|
|
|
|
{
|
|
|
|
return m_dmrModeHang;
|
|
|
|
}
|
|
|
|
|
2019-11-17 02:57:58 +00:00
|
|
|
DMR_OVCM_TYPES CConf::getDMROVCM() const
|
2019-10-11 17:24:25 +00:00
|
|
|
{
|
|
|
|
return m_dmrOVCM;
|
|
|
|
}
|
|
|
|
|
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;
|
|
|
|
}
|
|
|
|
|
2016-09-26 17:07:06 +00:00
|
|
|
bool CConf::getFusionRemoteGateway() const
|
|
|
|
{
|
|
|
|
return m_fusionRemoteGateway;
|
|
|
|
}
|
|
|
|
|
2018-05-21 20:32:33 +00:00
|
|
|
unsigned int CConf::getFusionTXHang() const
|
|
|
|
{
|
|
|
|
return m_fusionTXHang;
|
|
|
|
}
|
|
|
|
|
2017-08-15 09:11:05 +00:00
|
|
|
bool CConf::getFusionSelfOnly() const
|
|
|
|
{
|
|
|
|
return m_fusionSelfOnly;
|
|
|
|
}
|
|
|
|
|
2019-02-12 11:29:05 +00:00
|
|
|
bool CConf::getFusionDGIdEnabled() const
|
2017-08-13 09:30:02 +00:00
|
|
|
{
|
2019-02-12 11:29:05 +00:00
|
|
|
return m_fusionDGIdEnabled;
|
2017-08-13 09:30:02 +00:00
|
|
|
}
|
|
|
|
|
2019-02-12 11:29:05 +00:00
|
|
|
unsigned char CConf::getFusionDGId() const
|
2017-08-13 09:30:02 +00:00
|
|
|
{
|
2019-02-12 11:29:05 +00:00
|
|
|
return m_fusionDGId;
|
2017-08-13 09:30:02 +00:00
|
|
|
}
|
|
|
|
|
2017-09-01 08:25:54 +00:00
|
|
|
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;
|
|
|
|
}
|
|
|
|
|
2016-09-12 22:26:05 +00:00
|
|
|
unsigned int CConf::getP25NAC() const
|
2016-09-08 17:38:59 +00:00
|
|
|
{
|
2016-09-12 22:26:05 +00:00
|
|
|
return m_p25NAC;
|
2016-09-08 17:38:59 +00:00
|
|
|
}
|
|
|
|
|
2017-09-01 08:25:54 +00:00
|
|
|
bool CConf::getP25OverrideUID() const
|
|
|
|
{
|
|
|
|
return m_p25OverrideUID;
|
|
|
|
}
|
|
|
|
|
|
|
|
bool CConf::getP25SelfOnly() const
|
|
|
|
{
|
|
|
|
return m_p25SelfOnly;
|
|
|
|
}
|
|
|
|
|
2017-11-09 09:21:22 +00:00
|
|
|
bool CConf::getP25RemoteGateway() const
|
|
|
|
{
|
|
|
|
return m_p25RemoteGateway;
|
|
|
|
}
|
|
|
|
|
2020-05-06 16:10:23 +00:00
|
|
|
unsigned int CConf::getP25TXHang() const
|
|
|
|
{
|
|
|
|
return m_p25TXHang;
|
|
|
|
}
|
|
|
|
|
2017-09-01 08:25:54 +00:00
|
|
|
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;
|
|
|
|
}
|
|
|
|
|
2020-05-06 16:10:23 +00:00
|
|
|
unsigned int CConf::getNXDNTXHang() const
|
|
|
|
{
|
|
|
|
return m_nxdnTXHang;
|
|
|
|
}
|
|
|
|
|
2018-01-11 19:35:33 +00:00
|
|
|
unsigned int CConf::getNXDNModeHang() const
|
|
|
|
{
|
|
|
|
return m_nxdnModeHang;
|
|
|
|
}
|
|
|
|
|
2018-06-07 17:46:03 +00:00
|
|
|
bool CConf::getPOCSAGEnabled() const
|
|
|
|
{
|
|
|
|
return m_pocsagEnabled;
|
|
|
|
}
|
|
|
|
|
2018-06-12 18:40:49 +00:00
|
|
|
unsigned int CConf::getPOCSAGFrequency() const
|
|
|
|
{
|
|
|
|
return m_pocsagFrequency;
|
|
|
|
}
|
|
|
|
|
2020-04-09 21:02:47 +00:00
|
|
|
bool CConf::getFMEnabled() const
|
|
|
|
{
|
|
|
|
return m_fmEnabled;
|
|
|
|
}
|
|
|
|
|
|
|
|
std::string CConf::getFMCallsign() const
|
|
|
|
{
|
|
|
|
return m_fmCallsign;
|
|
|
|
}
|
|
|
|
|
|
|
|
unsigned int CConf::getFMCallsignSpeed() const
|
|
|
|
{
|
|
|
|
return m_fmCallsignSpeed;
|
|
|
|
}
|
|
|
|
|
|
|
|
unsigned int CConf::getFMCallsignFrequency() const
|
|
|
|
{
|
|
|
|
return m_fmCallsignFrequency;
|
|
|
|
}
|
|
|
|
|
|
|
|
unsigned int CConf::getFMCallsignTime() const
|
|
|
|
{
|
|
|
|
return m_fmCallsignTime;
|
|
|
|
}
|
|
|
|
|
|
|
|
unsigned int CConf::getFMCallsignHoldoff() const
|
|
|
|
{
|
|
|
|
return m_fmCallsignHoldoff;
|
|
|
|
}
|
|
|
|
|
2020-04-22 20:51:43 +00:00
|
|
|
float CConf::getFMCallsignHighLevel() const
|
2020-04-09 21:02:47 +00:00
|
|
|
{
|
2020-04-22 20:51:43 +00:00
|
|
|
return m_fmCallsignHighLevel;
|
|
|
|
}
|
|
|
|
|
|
|
|
float CConf::getFMCallsignLowLevel() const
|
|
|
|
{
|
|
|
|
return m_fmCallsignLowLevel;
|
2020-04-09 21:02:47 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
bool CConf::getFMCallsignAtStart() const
|
|
|
|
{
|
|
|
|
return m_fmCallsignAtStart;
|
|
|
|
}
|
|
|
|
|
|
|
|
bool CConf::getFMCallsignAtEnd() const
|
|
|
|
{
|
|
|
|
return m_fmCallsignAtEnd;
|
|
|
|
}
|
|
|
|
|
2020-05-04 21:30:16 +00:00
|
|
|
bool CConf::getFMCallsignAtLatch() const
|
|
|
|
{
|
|
|
|
return m_fmCallsignAtLatch;
|
|
|
|
}
|
|
|
|
|
2020-04-13 12:36:16 +00:00
|
|
|
std::string CConf::getFMRFAck() const
|
|
|
|
{
|
|
|
|
return m_fmRFAck;
|
|
|
|
}
|
|
|
|
|
2020-04-28 13:39:14 +00:00
|
|
|
std::string CConf::getFMExtAck() const
|
2020-04-09 21:02:47 +00:00
|
|
|
{
|
2020-04-28 13:39:14 +00:00
|
|
|
return m_fmExtAck;
|
2020-04-09 21:02:47 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
unsigned int CConf::getFMAckSpeed() const
|
|
|
|
{
|
|
|
|
return m_fmAckSpeed;
|
|
|
|
}
|
|
|
|
|
|
|
|
unsigned int CConf::getFMAckFrequency() const
|
|
|
|
{
|
|
|
|
return m_fmAckFrequency;
|
|
|
|
}
|
|
|
|
|
2020-04-13 14:53:18 +00:00
|
|
|
unsigned int CConf::getFMAckMinTime() const
|
|
|
|
{
|
|
|
|
return m_fmAckMinTime;
|
|
|
|
}
|
|
|
|
|
2020-04-09 21:02:47 +00:00
|
|
|
unsigned int CConf::getFMAckDelay() const
|
|
|
|
{
|
|
|
|
return m_fmAckDelay;
|
|
|
|
}
|
|
|
|
|
2020-04-12 15:01:28 +00:00
|
|
|
float CConf::getFMAckLevel() const
|
2020-04-09 21:02:47 +00:00
|
|
|
{
|
|
|
|
return m_fmAckLevel;
|
|
|
|
}
|
|
|
|
|
2020-04-15 13:14:38 +00:00
|
|
|
unsigned int CConf::getFMTimeout() const
|
|
|
|
{
|
|
|
|
return m_fmTimeout;
|
|
|
|
}
|
|
|
|
|
2020-04-12 15:01:28 +00:00
|
|
|
float CConf::getFMTimeoutLevel() const
|
2020-04-09 21:02:47 +00:00
|
|
|
{
|
|
|
|
return m_fmTimeoutLevel;
|
|
|
|
}
|
|
|
|
|
|
|
|
float CConf::getFMCTCSSFrequency() const
|
|
|
|
{
|
|
|
|
return m_fmCTCSSFrequency;
|
|
|
|
}
|
|
|
|
|
2020-05-12 12:43:43 +00:00
|
|
|
unsigned int CConf::getFMCTCSSHighThreshold() const
|
2020-04-09 21:02:47 +00:00
|
|
|
{
|
2020-05-12 12:43:43 +00:00
|
|
|
return m_fmCTCSSHighThreshold;
|
|
|
|
}
|
|
|
|
|
|
|
|
unsigned int CConf::getFMCTCSSLowThreshold() const
|
|
|
|
{
|
|
|
|
return m_fmCTCSSLowThreshold;
|
2020-04-09 21:02:47 +00:00
|
|
|
}
|
|
|
|
|
2020-04-12 15:01:28 +00:00
|
|
|
float CConf::getFMCTCSSLevel() const
|
2020-04-09 21:02:47 +00:00
|
|
|
{
|
|
|
|
return m_fmCTCSSLevel;
|
|
|
|
}
|
|
|
|
|
|
|
|
unsigned int CConf::getFMKerchunkTime() const
|
|
|
|
{
|
|
|
|
return m_fmKerchunkTime;
|
|
|
|
}
|
|
|
|
|
2020-06-20 19:44:02 +00:00
|
|
|
bool CConf::getFMKerchunkTX() const
|
|
|
|
{
|
|
|
|
return m_fmKerchunkTX;
|
|
|
|
}
|
|
|
|
|
2020-04-09 21:02:47 +00:00
|
|
|
unsigned int CConf::getFMHangTime() const
|
|
|
|
{
|
|
|
|
return m_fmHangTime;
|
|
|
|
}
|
|
|
|
|
2020-04-25 14:15:56 +00:00
|
|
|
bool CConf::getFMUseCOS() const
|
|
|
|
{
|
|
|
|
return m_fmUseCOS;
|
|
|
|
}
|
|
|
|
|
2020-05-06 10:26:54 +00:00
|
|
|
bool CConf::getFMCOSInvert() const
|
|
|
|
{
|
|
|
|
return m_fmCOSInvert;
|
|
|
|
}
|
|
|
|
|
2020-04-28 13:39:14 +00:00
|
|
|
unsigned int CConf::getFMRFAudioBoost() const
|
2020-04-25 14:15:56 +00:00
|
|
|
{
|
2020-04-28 13:39:14 +00:00
|
|
|
return m_fmRFAudioBoost;
|
2020-04-25 14:15:56 +00:00
|
|
|
}
|
|
|
|
|
2020-04-25 21:43:14 +00:00
|
|
|
float CConf::getFMMaxDevLevel() const
|
|
|
|
{
|
|
|
|
return m_fmMaxDevLevel;
|
|
|
|
}
|
|
|
|
|
2020-04-28 13:39:14 +00:00
|
|
|
unsigned int CConf::getFMExtAudioBoost() const
|
|
|
|
{
|
|
|
|
return m_fmExtAudioBoost;
|
|
|
|
}
|
|
|
|
|
2020-05-11 11:59:28 +00:00
|
|
|
unsigned int CConf::getFMModeHang() const
|
|
|
|
{
|
|
|
|
return m_fmModeHang;
|
|
|
|
}
|
|
|
|
|
2020-06-08 15:33:20 +00:00
|
|
|
bool CConf::getAX25Enabled() const
|
|
|
|
{
|
|
|
|
return m_ax25Enabled;
|
|
|
|
}
|
|
|
|
|
2020-07-01 09:59:46 +00:00
|
|
|
unsigned int CConf::getAX25TXDelay() const
|
|
|
|
{
|
|
|
|
return m_ax25TXDelay;
|
|
|
|
}
|
|
|
|
|
2020-06-20 20:28:39 +00:00
|
|
|
int CConf::getAX25RXTwist() const
|
|
|
|
{
|
|
|
|
return m_ax25RXTwist;
|
|
|
|
}
|
|
|
|
|
2020-07-01 09:59:46 +00:00
|
|
|
unsigned int CConf::getAX25SlotTime() const
|
2020-06-20 20:28:39 +00:00
|
|
|
{
|
2020-07-01 09:59:46 +00:00
|
|
|
return m_ax25SlotTime;
|
|
|
|
}
|
|
|
|
|
|
|
|
unsigned int CConf::getAX25PPersist() const
|
|
|
|
{
|
|
|
|
return m_ax25PPersist;
|
2020-06-20 20:28:39 +00:00
|
|
|
}
|
|
|
|
|
2020-06-18 11:51:13 +00:00
|
|
|
bool CConf::getAX25Trace() const
|
|
|
|
{
|
|
|
|
return m_ax25Trace;
|
|
|
|
}
|
|
|
|
|
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
|
|
|
}
|
|
|
|
|
2017-09-01 08:25:54 +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
|
|
|
}
|
|
|
|
|
2016-04-03 18:11:45 +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
|
|
|
}
|
|
|
|
|
2016-11-03 19:27:52 +00:00
|
|
|
std::string CConf::getDMRNetworkOptions() const
|
|
|
|
{
|
|
|
|
return m_dmrNetworkOptions;
|
|
|
|
}
|
|
|
|
|
2017-09-01 08:25:54 +00:00
|
|
|
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;
|
|
|
|
}
|
|
|
|
|
2016-02-15 20:36:05 +00:00
|
|
|
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;
|
|
|
|
}
|
|
|
|
|
2017-11-09 22:17:25 +00:00
|
|
|
std::string CConf::getFusionNetworkGatewayAddress() const
|
2016-01-14 18:45:04 +00:00
|
|
|
{
|
2017-11-09 22:17:25 +00:00
|
|
|
return m_fusionNetworkGatewayAddress;
|
2016-01-14 18:45:04 +00:00
|
|
|
}
|
|
|
|
|
2017-11-09 22:17:25 +00:00
|
|
|
unsigned int CConf::getFusionNetworkGatewayPort() const
|
2016-01-14 18:45:04 +00:00
|
|
|
{
|
2017-11-09 22:17:25 +00:00
|
|
|
return m_fusionNetworkGatewayPort;
|
2016-01-14 18:45:04 +00:00
|
|
|
}
|
|
|
|
|
2017-09-01 08:25:54 +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;
|
|
|
|
}
|
|
|
|
|
2017-09-01 08:25:54 +00:00
|
|
|
unsigned int CConf::getP25NetworkModeHang() const
|
2017-03-29 15:18:54 +00:00
|
|
|
{
|
2017-09-01 08:25:54 +00:00
|
|
|
return m_p25NetworkModeHang;
|
2017-03-29 15:18:54 +00:00
|
|
|
}
|
|
|
|
|
2017-09-01 08:25:54 +00:00
|
|
|
bool CConf::getP25NetworkDebug() const
|
2017-08-15 09:30:05 +00:00
|
|
|
{
|
2017-09-01 08:25:54 +00:00
|
|
|
return m_p25NetworkDebug;
|
2017-08-15 09:30:05 +00:00
|
|
|
}
|
|
|
|
|
2018-01-15 21:03:34 +00:00
|
|
|
bool CConf::getNXDNNetworkEnabled() const
|
|
|
|
{
|
|
|
|
return m_nxdnNetworkEnabled;
|
|
|
|
}
|
|
|
|
|
2020-05-27 11:07:21 +00:00
|
|
|
std::string CConf::getNXDNNetworkProtocol() const
|
|
|
|
{
|
|
|
|
return m_nxdnNetworkProtocol;
|
|
|
|
}
|
|
|
|
|
2018-03-12 20:55:53 +00:00
|
|
|
std::string CConf::getNXDNGatewayAddress() const
|
|
|
|
{
|
|
|
|
return m_nxdnGatewayAddress;
|
|
|
|
}
|
|
|
|
|
|
|
|
unsigned int CConf::getNXDNGatewayPort() const
|
|
|
|
{
|
|
|
|
return m_nxdnGatewayPort;
|
|
|
|
}
|
|
|
|
|
|
|
|
std::string CConf::getNXDNLocalAddress() const
|
|
|
|
{
|
|
|
|
return m_nxdnLocalAddress;
|
|
|
|
}
|
|
|
|
|
|
|
|
unsigned int CConf::getNXDNLocalPort() const
|
2018-01-15 21:03:34 +00:00
|
|
|
{
|
2018-03-12 20:55:53 +00:00
|
|
|
return m_nxdnLocalPort;
|
2018-01-15 21:03:34 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
unsigned int CConf::getNXDNNetworkModeHang() const
|
|
|
|
{
|
|
|
|
return m_nxdnNetworkModeHang;
|
|
|
|
}
|
|
|
|
|
|
|
|
bool CConf::getNXDNNetworkDebug() const
|
|
|
|
{
|
|
|
|
return m_nxdnNetworkDebug;
|
|
|
|
}
|
|
|
|
|
2018-06-07 17:46:03 +00:00
|
|
|
bool CConf::getPOCSAGNetworkEnabled() const
|
|
|
|
{
|
|
|
|
return m_pocsagNetworkEnabled;
|
|
|
|
}
|
|
|
|
|
|
|
|
std::string CConf::getPOCSAGGatewayAddress() const
|
|
|
|
{
|
|
|
|
return m_pocsagGatewayAddress;
|
|
|
|
}
|
|
|
|
|
|
|
|
unsigned int CConf::getPOCSAGGatewayPort() const
|
|
|
|
{
|
|
|
|
return m_pocsagGatewayPort;
|
|
|
|
}
|
|
|
|
|
|
|
|
std::string CConf::getPOCSAGLocalAddress() const
|
|
|
|
{
|
|
|
|
return m_pocsagLocalAddress;
|
|
|
|
}
|
|
|
|
|
|
|
|
unsigned int CConf::getPOCSAGLocalPort() const
|
|
|
|
{
|
|
|
|
return m_pocsagLocalPort;
|
|
|
|
}
|
|
|
|
|
|
|
|
unsigned int CConf::getPOCSAGNetworkModeHang() const
|
|
|
|
{
|
|
|
|
return m_pocsagNetworkModeHang;
|
|
|
|
}
|
|
|
|
|
|
|
|
bool CConf::getPOCSAGNetworkDebug() const
|
|
|
|
{
|
|
|
|
return m_pocsagNetworkDebug;
|
|
|
|
}
|
|
|
|
|
2020-05-07 15:08:58 +00:00
|
|
|
bool CConf::getFMNetworkEnabled() const
|
|
|
|
{
|
|
|
|
return m_fmNetworkEnabled;
|
|
|
|
}
|
|
|
|
|
|
|
|
std::string CConf::getFMGatewayAddress() const
|
|
|
|
{
|
|
|
|
return m_fmGatewayAddress;
|
|
|
|
}
|
|
|
|
|
|
|
|
unsigned int CConf::getFMGatewayPort() const
|
|
|
|
{
|
|
|
|
return m_fmGatewayPort;
|
|
|
|
}
|
|
|
|
|
|
|
|
std::string CConf::getFMLocalAddress() const
|
|
|
|
{
|
|
|
|
return m_fmLocalAddress;
|
|
|
|
}
|
|
|
|
|
|
|
|
unsigned int CConf::getFMLocalPort() const
|
|
|
|
{
|
|
|
|
return m_fmLocalPort;
|
|
|
|
}
|
|
|
|
|
|
|
|
unsigned int CConf::getFMNetworkModeHang() const
|
|
|
|
{
|
|
|
|
return m_fmNetworkModeHang;
|
|
|
|
}
|
|
|
|
|
|
|
|
bool CConf::getFMNetworkDebug() const
|
|
|
|
{
|
|
|
|
return m_fmNetworkDebug;
|
|
|
|
}
|
|
|
|
|
2020-06-08 15:33:20 +00:00
|
|
|
bool CConf::getAX25NetworkEnabled() const
|
|
|
|
{
|
|
|
|
return m_ax25NetworkEnabled;
|
|
|
|
}
|
|
|
|
|
2020-06-21 13:15:37 +00:00
|
|
|
std::string CConf::getAX25NetworkPort() const
|
2020-06-08 15:33:20 +00:00
|
|
|
{
|
2020-06-21 13:15:37 +00:00
|
|
|
return m_ax25NetworkPort;
|
2020-06-08 15:33:20 +00:00
|
|
|
}
|
|
|
|
|
2020-06-21 13:15:37 +00:00
|
|
|
unsigned int CConf::getAX25NetworkSpeed() const
|
2020-06-08 15:33:20 +00:00
|
|
|
{
|
2020-06-21 13:15:37 +00:00
|
|
|
return m_ax25NetworkSpeed;
|
2020-06-08 15:33:20 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
bool CConf::getAX25NetworkDebug() const
|
|
|
|
{
|
|
|
|
return m_ax25NetworkDebug;
|
|
|
|
}
|
|
|
|
|
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
|
|
|
}
|
2016-02-16 18:30:12 +00:00
|
|
|
|
|
|
|
unsigned int CConf::getTFTSerialBrightness() const
|
|
|
|
{
|
|
|
|
return m_tftSerialBrightness;
|
|
|
|
}
|
2016-03-14 22:58:09 +00:00
|
|
|
|
|
|
|
unsigned int CConf::getHD44780Rows() const
|
|
|
|
{
|
|
|
|
return m_hd44780Rows;
|
|
|
|
}
|
|
|
|
|
|
|
|
unsigned int CConf::getHD44780Columns() const
|
|
|
|
{
|
|
|
|
return m_hd44780Columns;
|
|
|
|
}
|
2016-04-06 16:43:20 +00:00
|
|
|
|
|
|
|
std::vector<unsigned int> CConf::getHD44780Pins() const
|
|
|
|
{
|
|
|
|
return m_hd44780Pins;
|
|
|
|
}
|
2016-04-06 18:53:25 +00:00
|
|
|
|
2016-06-30 19:35:32 +00:00
|
|
|
unsigned int CConf::getHD44780i2cAddress() const
|
2016-06-30 19:10:30 +00:00
|
|
|
{
|
|
|
|
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;
|
|
|
|
}
|
|
|
|
|
2016-04-06 18:53:25 +00:00
|
|
|
std::string CConf::getNextionPort() const
|
|
|
|
{
|
|
|
|
return m_nextionPort;
|
|
|
|
}
|
|
|
|
|
|
|
|
unsigned int CConf::getNextionBrightness() const
|
|
|
|
{
|
|
|
|
return m_nextionBrightness;
|
|
|
|
}
|
2016-05-06 23:03:39 +00:00
|
|
|
|
2016-06-01 10:55:24 +00:00
|
|
|
bool CConf::getNextionDisplayClock() const
|
|
|
|
{
|
|
|
|
return m_nextionDisplayClock;
|
|
|
|
}
|
|
|
|
|
|
|
|
bool CConf::getNextionUTC() const
|
|
|
|
{
|
|
|
|
return m_nextionUTC;
|
|
|
|
}
|
|
|
|
|
2016-06-24 09:33:28 +00:00
|
|
|
unsigned int CConf::getNextionIdleBrightness() const
|
2016-06-24 07:30:46 +00:00
|
|
|
{
|
2016-06-24 09:33:28 +00:00
|
|
|
return m_nextionIdleBrightness;
|
2016-06-24 07:30:46 +00:00
|
|
|
}
|
|
|
|
|
2017-11-13 20:48:47 +00:00
|
|
|
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
|
|
|
|
2017-08-13 09:57:02 +00:00
|
|
|
bool CConf::getOLEDScroll() const
|
|
|
|
{
|
|
|
|
return m_oledScroll;
|
|
|
|
}
|
|
|
|
|
2018-10-30 14:30:41 +00:00
|
|
|
bool CConf::getOLEDRotate() const
|
|
|
|
{
|
|
|
|
return m_oledRotate;
|
|
|
|
}
|
|
|
|
|
2019-09-27 20:28:57 +00:00
|
|
|
bool CConf::getOLEDLogoScreensaver() const
|
|
|
|
{
|
|
|
|
return m_oledLogoScreensaver;
|
|
|
|
}
|
|
|
|
|
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;
|
|
|
|
}
|
2016-10-29 19:00:32 +00:00
|
|
|
|
|
|
|
bool CConf::getLCDprocDimOnIdle() const
|
|
|
|
{
|
|
|
|
return m_lcdprocDimOnIdle;
|
|
|
|
}
|
2018-09-05 20:12:12 +00:00
|
|
|
|
|
|
|
bool CConf::getNextionTempInFahrenheit() const
|
|
|
|
{
|
|
|
|
return m_nextionTempInFahrenheit;
|
|
|
|
}
|
2018-10-10 19:05:24 +00:00
|
|
|
|
|
|
|
bool CConf::getLockFileEnabled() const
|
|
|
|
{
|
|
|
|
return m_lockFileEnabled;
|
|
|
|
}
|
|
|
|
|
|
|
|
std::string CConf::getLockFileName() const
|
|
|
|
{
|
|
|
|
return m_lockFileName;
|
|
|
|
}
|
2018-11-06 12:14:57 +00:00
|
|
|
|
2020-06-29 10:25:10 +00:00
|
|
|
bool CConf::getGPSDEnabled() const
|
2018-11-06 12:14:57 +00:00
|
|
|
{
|
2020-06-29 10:25:10 +00:00
|
|
|
return m_gpsdEnabled;
|
2018-11-06 12:14:57 +00:00
|
|
|
}
|
|
|
|
|
2020-06-29 10:25:10 +00:00
|
|
|
std::string CConf::getGPSDAddress() const
|
2018-11-06 12:14:57 +00:00
|
|
|
{
|
2020-06-29 10:25:10 +00:00
|
|
|
return m_gpsdAddress;
|
2018-11-06 12:14:57 +00:00
|
|
|
}
|
|
|
|
|
2020-06-29 10:25:10 +00:00
|
|
|
std::string CConf::getGPSDPort() const
|
2018-11-06 12:14:57 +00:00
|
|
|
{
|
2020-06-29 10:25:10 +00:00
|
|
|
return m_gpsdPort;
|
2018-11-06 12:14:57 +00:00
|
|
|
}
|
|
|
|
|
2019-01-07 11:03:37 +00:00
|
|
|
bool CConf::getRemoteControlEnabled() const
|
|
|
|
{
|
|
|
|
return m_remoteControlEnabled;
|
|
|
|
}
|
|
|
|
|
|
|
|
unsigned int CConf::getRemoteControlPort() const
|
|
|
|
{
|
|
|
|
return m_remoteControlPort;
|
|
|
|
}
|