Add P252DMR Reflector option to P25Gateway

This commit is contained in:
Doug McLain
2020-06-18 00:56:34 -04:00
parent b4c15971ac
commit 36f090b29f
6 changed files with 41 additions and 0 deletions
+16
View File
@@ -52,6 +52,12 @@ void CReflectors::setParrot(const std::string& address, unsigned int port)
m_parrotPort = port;
}
void CReflectors::setP252DMR(const std::string& address, unsigned int port)
{
m_p252dmrAddress = address;
m_p252dmrPort = port;
}
bool CReflectors::load()
{
// Clear out the old reflector list
@@ -134,6 +140,16 @@ bool CReflectors::load()
m_reflectors.push_back(refl);
LogInfo("Loaded P25 parrot (TG%u)", refl->m_id);
}
// Add the P252DMR entry
if (m_p252dmrPort > 0U) {
CP25Reflector* refl = new CP25Reflector;
refl->m_id = 10U;
refl->m_address = CUDPSocket::lookup(m_p252dmrAddress);
refl->m_port = m_p252dmrPort;
m_reflectors.push_back(refl);
LogInfo("Loaded P25 parrot (TG%u)", refl->m_id);
}
size = m_reflectors.size();
if (size == 0U)