diff --git a/DMR2YSF/Conf.cpp b/DMR2YSF/Conf.cpp index 3dfcb0b..03846d6 100644 --- a/DMR2YSF/Conf.cpp +++ b/DMR2YSF/Conf.cpp @@ -48,6 +48,7 @@ m_dmrRptAddress(), m_dmrRptPort(0U), m_dmrLocalAddress(), m_dmrLocalPort(0U), +m_dmrDefaultDstTG(9U), m_dmrDebug(false), m_dmrIdLookupFile(), m_dmrIdLookupTime(0U), @@ -134,6 +135,8 @@ bool CConf::read() m_dmrLocalAddress = value; else if (::strcmp(key, "LocalPort") == 0) m_dmrLocalPort = (unsigned int)::atoi(value); + else if (::strcmp(key, "DefaultDstTG") == 0) + m_dmrDefaultDstTG = (unsigned int)::atoi(value); else if (::strcmp(key, "Debug") == 0) m_dmrDebug = ::atoi(value) == 1; } else if (section == SECTION_DMRID_LOOKUP) { @@ -213,6 +216,11 @@ unsigned int CConf::getDMRLocalPort() const return m_dmrLocalPort; } +unsigned int CConf::getDMRDefaultDstTG() const +{ + return m_dmrDefaultDstTG; +} + bool CConf::getDMRDebug() const { return m_dmrDebug; diff --git a/DMR2YSF/Conf.h b/DMR2YSF/Conf.h index 1ff0781..291e111 100644 --- a/DMR2YSF/Conf.h +++ b/DMR2YSF/Conf.h @@ -45,6 +45,7 @@ public: unsigned int getDMRRptPort() const; std::string getDMRLocalAddress() const; unsigned int getDMRLocalPort() const; + unsigned int getDMRDefaultDstTG() const; bool getDMRDebug() const; // The DMR Id section @@ -71,6 +72,7 @@ private: unsigned int m_dmrRptPort; std::string m_dmrLocalAddress; unsigned int m_dmrLocalPort; + unsigned int m_dmrDefaultDstTG; bool m_dmrDebug; std::string m_dmrIdLookupFile; diff --git a/DMR2YSF/DMR2YSF.cpp b/DMR2YSF/DMR2YSF.cpp index 1180327..56933ef 100644 --- a/DMR2YSF/DMR2YSF.cpp +++ b/DMR2YSF/DMR2YSF.cpp @@ -203,6 +203,7 @@ int CDMR2YSF::run() m_callsign = m_conf.getCallsign(); m_defsrcid = m_conf.getDMRId(); + m_dstid = m_conf.getDMRDefaultDstTG(); in_addr dstAddress = CUDPSocket::lookup(m_conf.getDstAddress()); unsigned int dstPort = m_conf.getDstPort(); diff --git a/DMR2YSF/DMR2YSF.ini b/DMR2YSF/DMR2YSF.ini index fa2f8d5..a8dc6b3 100644 --- a/DMR2YSF/DMR2YSF.ini +++ b/DMR2YSF/DMR2YSF.ini @@ -12,6 +12,7 @@ RptAddress=127.0.0.1 RptPort=62032 LocalAddress=127.0.0.1 LocalPort=62031 +DefaultDstTG=9 Debug=0 [DMR Id Lookup]