|
|
|
@ -1,5 +1,5 @@
|
|
|
|
|
/*
|
|
|
|
|
* Copyright (C) 2016-2019 by Jonathan Naylor G4KLX
|
|
|
|
|
* Copyright (C) 2016-2020 by Jonathan Naylor G4KLX
|
|
|
|
|
*
|
|
|
|
|
* 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
|
|
|
|
@ -130,21 +130,27 @@ bool CYSFReflectors::load()
|
|
|
|
|
std::string host = std::string(p4);
|
|
|
|
|
unsigned int port = (unsigned int)::atoi(p5);
|
|
|
|
|
|
|
|
|
|
CYSFReflector* refl = new CYSFReflector;
|
|
|
|
|
|
|
|
|
|
CUDPSocket::lookup(host, port, refl->m_addr, refl->m_addrLen);
|
|
|
|
|
|
|
|
|
|
refl->m_id = std::string(p1);
|
|
|
|
|
refl->m_name = std::string(p2);
|
|
|
|
|
refl->m_desc = std::string(p3);
|
|
|
|
|
refl->m_count = std::string(p6);
|
|
|
|
|
refl->m_type = YT_YSF;
|
|
|
|
|
refl->m_wiresX = (refl->m_name.compare(0, 3, "XLX") == 0);
|
|
|
|
|
|
|
|
|
|
refl->m_name.resize(16U, ' ');
|
|
|
|
|
refl->m_desc.resize(14U, ' ');
|
|
|
|
|
|
|
|
|
|
m_newReflectors.push_back(refl);
|
|
|
|
|
sockaddr_storage addr;
|
|
|
|
|
unsigned int addrLen;
|
|
|
|
|
if (CUDPSocket::lookup(host, port, addr, addrLen) == 0) {
|
|
|
|
|
CYSFReflector* refl = new CYSFReflector;
|
|
|
|
|
|
|
|
|
|
refl->m_id = std::string(p1);
|
|
|
|
|
refl->m_name = std::string(p2);
|
|
|
|
|
refl->m_desc = std::string(p3);
|
|
|
|
|
refl->m_addr = addr;
|
|
|
|
|
refl->m_addrLen = addrLen;
|
|
|
|
|
refl->m_count = std::string(p6);
|
|
|
|
|
refl->m_type = YT_YSF;
|
|
|
|
|
refl->m_wiresX = (refl->m_name.compare(0, 3, "XLX") == 0);
|
|
|
|
|
|
|
|
|
|
refl->m_name.resize(16U, ' ');
|
|
|
|
|
refl->m_desc.resize(14U, ' ');
|
|
|
|
|
|
|
|
|
|
m_newReflectors.push_back(refl);
|
|
|
|
|
} else {
|
|
|
|
|
LogWarning("Unable to resolve the address of YSF reflector - %s", p2);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -156,66 +162,94 @@ bool CYSFReflectors::load()
|
|
|
|
|
|
|
|
|
|
// Add the Parrot entry
|
|
|
|
|
if (m_parrotPort > 0U) {
|
|
|
|
|
CYSFReflector* refl = new CYSFReflector;
|
|
|
|
|
refl->m_id = "00001";
|
|
|
|
|
refl->m_name = "ZZ Parrot ";
|
|
|
|
|
refl->m_desc = "Parrot ";
|
|
|
|
|
CUDPSocket::lookup(m_parrotAddress, m_parrotPort, refl->m_addr, refl->m_addrLen);
|
|
|
|
|
refl->m_count = "000";
|
|
|
|
|
refl->m_type = YT_YSF;
|
|
|
|
|
refl->m_wiresX = false;
|
|
|
|
|
|
|
|
|
|
m_newReflectors.push_back(refl);
|
|
|
|
|
|
|
|
|
|
LogInfo("Loaded YSF parrot");
|
|
|
|
|
sockaddr_storage addr;
|
|
|
|
|
unsigned int addrLen;
|
|
|
|
|
if (CUDPSocket::lookup(m_parrotAddress, m_parrotPort, addr, addrLen) == 0) {
|
|
|
|
|
CYSFReflector* refl = new CYSFReflector;
|
|
|
|
|
refl->m_id = "00001";
|
|
|
|
|
refl->m_name = "ZZ Parrot ";
|
|
|
|
|
refl->m_desc = "Parrot ";
|
|
|
|
|
refl->m_addr = addr;
|
|
|
|
|
refl->m_addrLen = addrLen;
|
|
|
|
|
refl->m_count = "000";
|
|
|
|
|
refl->m_type = YT_YSF;
|
|
|
|
|
refl->m_wiresX = false;
|
|
|
|
|
|
|
|
|
|
m_newReflectors.push_back(refl);
|
|
|
|
|
|
|
|
|
|
LogInfo("Loaded YSF parrot");
|
|
|
|
|
} else {
|
|
|
|
|
LogWarning("Unable to resolve the address of the YSF Parrot");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Add the YSF2DMR entry
|
|
|
|
|
if (m_YSF2DMRPort > 0U) {
|
|
|
|
|
CYSFReflector* refl = new CYSFReflector;
|
|
|
|
|
refl->m_id = "00002";
|
|
|
|
|
refl->m_name = "YSF2DMR ";
|
|
|
|
|
refl->m_desc = "Link YSF2DMR ";
|
|
|
|
|
CUDPSocket::lookup(m_YSF2DMRAddress, m_YSF2DMRPort, refl->m_addr, refl->m_addrLen);
|
|
|
|
|
refl->m_count = "000";
|
|
|
|
|
refl->m_type = YT_YSF;
|
|
|
|
|
refl->m_wiresX = true;
|
|
|
|
|
|
|
|
|
|
m_newReflectors.push_back(refl);
|
|
|
|
|
|
|
|
|
|
LogInfo("Loaded YSF2DMR");
|
|
|
|
|
sockaddr_storage addr;
|
|
|
|
|
unsigned int addrLen;
|
|
|
|
|
if (CUDPSocket::lookup(m_YSF2DMRAddress, m_YSF2DMRPort, addr, addrLen) == 0) {
|
|
|
|
|
CYSFReflector* refl = new CYSFReflector;
|
|
|
|
|
refl->m_id = "00002";
|
|
|
|
|
refl->m_name = "YSF2DMR ";
|
|
|
|
|
refl->m_desc = "Link YSF2DMR ";
|
|
|
|
|
refl->m_addr = addr;
|
|
|
|
|
refl->m_addrLen = addrLen;
|
|
|
|
|
refl->m_count = "000";
|
|
|
|
|
refl->m_type = YT_YSF;
|
|
|
|
|
refl->m_wiresX = true;
|
|
|
|
|
|
|
|
|
|
m_newReflectors.push_back(refl);
|
|
|
|
|
|
|
|
|
|
LogInfo("Loaded YSF2DMR");
|
|
|
|
|
} else {
|
|
|
|
|
LogWarning("Unable to resolve the address of YSF2DMR");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Add the YSF2NXDN entry
|
|
|
|
|
if (m_YSF2NXDNPort > 0U) {
|
|
|
|
|
CYSFReflector* refl = new CYSFReflector;
|
|
|
|
|
refl->m_id = "00003";
|
|
|
|
|
refl->m_name = "YSF2NXDN ";
|
|
|
|
|
refl->m_desc = "Link YSF2NXDN ";
|
|
|
|
|
CUDPSocket::lookup(m_YSF2NXDNAddress, m_YSF2NXDNPort, refl->m_addr, refl->m_addrLen);
|
|
|
|
|
refl->m_count = "000";
|
|
|
|
|
refl->m_type = YT_YSF;
|
|
|
|
|
refl->m_wiresX = true;
|
|
|
|
|
|
|
|
|
|
m_newReflectors.push_back(refl);
|
|
|
|
|
|
|
|
|
|
LogInfo("Loaded YSF2NXDN");
|
|
|
|
|
sockaddr_storage addr;
|
|
|
|
|
unsigned int addrLen;
|
|
|
|
|
if (CUDPSocket::lookup(m_YSF2NXDNAddress, m_YSF2NXDNPort, addr, addrLen) == 0) {
|
|
|
|
|
CYSFReflector* refl = new CYSFReflector;
|
|
|
|
|
refl->m_id = "00003";
|
|
|
|
|
refl->m_name = "YSF2NXDN ";
|
|
|
|
|
refl->m_desc = "Link YSF2NXDN ";
|
|
|
|
|
refl->m_addr = addr;
|
|
|
|
|
refl->m_addrLen = addrLen;
|
|
|
|
|
refl->m_count = "000";
|
|
|
|
|
refl->m_type = YT_YSF;
|
|
|
|
|
refl->m_wiresX = true;
|
|
|
|
|
|
|
|
|
|
m_newReflectors.push_back(refl);
|
|
|
|
|
|
|
|
|
|
LogInfo("Loaded YSF2NXDN");
|
|
|
|
|
} else {
|
|
|
|
|
LogWarning("Unable to resolve the address of YSF2NXDN");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Add the YSF2P25 entry
|
|
|
|
|
if (m_YSF2P25Port > 0U) {
|
|
|
|
|
CYSFReflector* refl = new CYSFReflector;
|
|
|
|
|
refl->m_id = "00004";
|
|
|
|
|
refl->m_name = "YSF2P25 ";
|
|
|
|
|
refl->m_desc = "Link YSF2P25 ";
|
|
|
|
|
CUDPSocket::lookup(m_YSF2P25Address, m_YSF2P25Port, refl->m_addr, refl->m_addrLen);
|
|
|
|
|
refl->m_count = "000";
|
|
|
|
|
refl->m_type = YT_YSF;
|
|
|
|
|
refl->m_wiresX = true;
|
|
|
|
|
|
|
|
|
|
m_newReflectors.push_back(refl);
|
|
|
|
|
|
|
|
|
|
LogInfo("Loaded YSF2P25");
|
|
|
|
|
sockaddr_storage addr;
|
|
|
|
|
unsigned int addrLen;
|
|
|
|
|
if (CUDPSocket::lookup(m_YSF2P25Address, m_YSF2P25Port, addr, addrLen) == 0) {
|
|
|
|
|
CYSFReflector* refl = new CYSFReflector;
|
|
|
|
|
refl->m_id = "00004";
|
|
|
|
|
refl->m_name = "YSF2P25 ";
|
|
|
|
|
refl->m_desc = "Link YSF2P25 ";
|
|
|
|
|
refl->m_addr = addr;
|
|
|
|
|
refl->m_addrLen = addrLen;
|
|
|
|
|
refl->m_count = "000";
|
|
|
|
|
refl->m_type = YT_YSF;
|
|
|
|
|
refl->m_wiresX = true;
|
|
|
|
|
|
|
|
|
|
m_newReflectors.push_back(refl);
|
|
|
|
|
|
|
|
|
|
LogInfo("Loaded YSF2P25");
|
|
|
|
|
} else {
|
|
|
|
|
LogWarning("Unable to resolve the address of YSF2P25");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
unsigned int id = 10U;
|
|
|
|
|