mirror of
https://github.com/g4klx/MMDVMHost
synced 2025-12-23 16:55:52 +08:00
nitial commit of POCSAG files.
This commit is contained in:
80
Conf.cpp
80
Conf.cpp
@@ -43,11 +43,13 @@ enum SECTION {
|
||||
SECTION_FUSION,
|
||||
SECTION_P25,
|
||||
SECTION_NXDN,
|
||||
SECTION_POCSAG,
|
||||
SECTION_DSTAR_NETWORK,
|
||||
SECTION_DMR_NETWORK,
|
||||
SECTION_FUSION_NETWORK,
|
||||
SECTION_P25_NETWORK,
|
||||
SECTION_NXDN_NETWORK,
|
||||
SECTION_POCSAG_NETWORK,
|
||||
SECTION_TFTSERIAL,
|
||||
SECTION_HD44780,
|
||||
SECTION_NEXTION,
|
||||
@@ -102,6 +104,7 @@ m_modemDMRTXLevel(50.0F),
|
||||
m_modemYSFTXLevel(50.0F),
|
||||
m_modemP25TXLevel(50.0F),
|
||||
m_modemNXDNTXLevel(50.0F),
|
||||
m_modemPOCSAGTXLevel(50.0F),
|
||||
m_modemRSSIMappingFile(),
|
||||
m_modemTrace(false),
|
||||
m_modemDebug(false),
|
||||
@@ -158,6 +161,7 @@ m_nxdnRAN(1U),
|
||||
m_nxdnSelfOnly(false),
|
||||
m_nxdnRemoteGateway(false),
|
||||
m_nxdnModeHang(10U),
|
||||
m_pocsagEnabled(false),
|
||||
m_dstarNetworkEnabled(false),
|
||||
m_dstarGatewayAddress(),
|
||||
m_dstarGatewayPort(0U),
|
||||
@@ -195,6 +199,13 @@ m_nxdnLocalAddress(),
|
||||
m_nxdnLocalPort(0U),
|
||||
m_nxdnNetworkModeHang(3U),
|
||||
m_nxdnNetworkDebug(false),
|
||||
m_pocsagNetworkEnabled(false),
|
||||
m_pocsagGatewayAddress(),
|
||||
m_pocsagGatewayPort(0U),
|
||||
m_pocsagLocalAddress(),
|
||||
m_pocsagLocalPort(0U),
|
||||
m_pocsagNetworkModeHang(3U),
|
||||
m_pocsagNetworkDebug(false),
|
||||
m_tftSerialPort("/dev/ttyAMA0"),
|
||||
m_tftSerialBrightness(50U),
|
||||
m_hd44780Rows(2U),
|
||||
@@ -273,6 +284,8 @@ bool CConf::read()
|
||||
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, "[D-Star Network]", 16U) == 0)
|
||||
section = SECTION_DSTAR_NETWORK;
|
||||
else if (::strncmp(buffer, "[DMR Network]", 13U) == 0)
|
||||
@@ -283,6 +296,8 @@ bool CConf::read()
|
||||
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, "[TFT Serial]", 12U) == 0)
|
||||
section = SECTION_TFTSERIAL;
|
||||
else if (::strncmp(buffer, "[HD44780]", 9U) == 0)
|
||||
@@ -425,6 +440,8 @@ bool CConf::read()
|
||||
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, "RSSIMappingFile") == 0)
|
||||
m_modemRSSIMappingFile = value;
|
||||
else if (::strcmp(key, "Trace") == 0)
|
||||
@@ -586,6 +603,9 @@ bool CConf::read()
|
||||
m_nxdnRemoteGateway = ::atoi(value) == 1;
|
||||
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 (section == SECTION_DSTAR_NETWORK) {
|
||||
if (::strcmp(key, "Enable") == 0)
|
||||
m_dstarNetworkEnabled = ::atoi(value) == 1;
|
||||
@@ -665,6 +685,21 @@ bool CConf::read()
|
||||
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_TFTSERIAL) {
|
||||
if (::strcmp(key, "Port") == 0)
|
||||
m_tftSerialPort = value;
|
||||
@@ -960,6 +995,11 @@ float CConf::getModemNXDNTXLevel() const
|
||||
return m_modemNXDNTXLevel;
|
||||
}
|
||||
|
||||
float CConf::getModemPOCSAGTXLevel() const
|
||||
{
|
||||
return m_modemPOCSAGTXLevel;
|
||||
}
|
||||
|
||||
std::string CConf::getModemRSSIMappingFile () const
|
||||
{
|
||||
return m_modemRSSIMappingFile;
|
||||
@@ -1240,6 +1280,11 @@ unsigned int CConf::getNXDNModeHang() const
|
||||
return m_nxdnModeHang;
|
||||
}
|
||||
|
||||
bool CConf::getPOCSAGEnabled() const
|
||||
{
|
||||
return m_pocsagEnabled;
|
||||
}
|
||||
|
||||
bool CConf::getDStarNetworkEnabled() const
|
||||
{
|
||||
return m_dstarNetworkEnabled;
|
||||
@@ -1425,6 +1470,41 @@ bool CConf::getNXDNNetworkDebug() const
|
||||
return m_nxdnNetworkDebug;
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
std::string CConf::getTFTSerialPort() const
|
||||
{
|
||||
return m_tftSerialPort;
|
||||
|
||||
Reference in New Issue
Block a user