Fix network ports datatype (unsigned int -> unsigned short). UDPSocket: fix old bug using m_port instead of m_port[x].
This commit is contained in:
parent
b30d5465f5
commit
ec0bc51899
68
Conf.cpp
68
Conf.cpp
|
@ -535,9 +535,9 @@ bool CConf::read()
|
||||||
else if (::strcmp(key, "RemoteAddress") == 0)
|
else if (::strcmp(key, "RemoteAddress") == 0)
|
||||||
m_transparentRemoteAddress = value;
|
m_transparentRemoteAddress = value;
|
||||||
else if (::strcmp(key, "RemotePort") == 0)
|
else if (::strcmp(key, "RemotePort") == 0)
|
||||||
m_transparentRemotePort = (unsigned int)::atoi(value);
|
m_transparentRemotePort = (unsigned short)::atoi(value);
|
||||||
else if (::strcmp(key, "LocalPort") == 0)
|
else if (::strcmp(key, "LocalPort") == 0)
|
||||||
m_transparentLocalPort = (unsigned int)::atoi(value);
|
m_transparentLocalPort = (unsigned short)::atoi(value);
|
||||||
else if (::strcmp(key, "SendFrameType") == 0)
|
else if (::strcmp(key, "SendFrameType") == 0)
|
||||||
m_transparentSendFrameType = (unsigned int)::atoi(value);
|
m_transparentSendFrameType = (unsigned int)::atoi(value);
|
||||||
} else if (section == SECTION_UMP) {
|
} else if (section == SECTION_UMP) {
|
||||||
|
@ -806,9 +806,9 @@ bool CConf::read()
|
||||||
else if (::strcmp(key, "GatewayAddress") == 0)
|
else if (::strcmp(key, "GatewayAddress") == 0)
|
||||||
m_dstarGatewayAddress = value;
|
m_dstarGatewayAddress = value;
|
||||||
else if (::strcmp(key, "GatewayPort") == 0)
|
else if (::strcmp(key, "GatewayPort") == 0)
|
||||||
m_dstarGatewayPort = (unsigned int)::atoi(value);
|
m_dstarGatewayPort = (unsigned short)::atoi(value);
|
||||||
else if (::strcmp(key, "LocalPort") == 0)
|
else if (::strcmp(key, "LocalPort") == 0)
|
||||||
m_dstarLocalPort = (unsigned int)::atoi(value);
|
m_dstarLocalPort = (unsigned short)::atoi(value);
|
||||||
else if (::strcmp(key, "ModeHang") == 0)
|
else if (::strcmp(key, "ModeHang") == 0)
|
||||||
m_dstarNetworkModeHang = (unsigned int)::atoi(value);
|
m_dstarNetworkModeHang = (unsigned int)::atoi(value);
|
||||||
else if (::strcmp(key, "Debug") == 0)
|
else if (::strcmp(key, "Debug") == 0)
|
||||||
|
@ -821,9 +821,9 @@ bool CConf::read()
|
||||||
else if (::strcmp(key, "Address") == 0)
|
else if (::strcmp(key, "Address") == 0)
|
||||||
m_dmrNetworkAddress = value;
|
m_dmrNetworkAddress = value;
|
||||||
else if (::strcmp(key, "Port") == 0)
|
else if (::strcmp(key, "Port") == 0)
|
||||||
m_dmrNetworkPort = (unsigned int)::atoi(value);
|
m_dmrNetworkPort = (unsigned short)::atoi(value);
|
||||||
else if (::strcmp(key, "Local") == 0)
|
else if (::strcmp(key, "Local") == 0)
|
||||||
m_dmrNetworkLocal = (unsigned int)::atoi(value);
|
m_dmrNetworkLocal = (unsigned short)::atoi(value);
|
||||||
else if (::strcmp(key, "Password") == 0)
|
else if (::strcmp(key, "Password") == 0)
|
||||||
m_dmrNetworkPassword = value;
|
m_dmrNetworkPassword = value;
|
||||||
else if (::strcmp(key, "Options") == 0)
|
else if (::strcmp(key, "Options") == 0)
|
||||||
|
@ -844,11 +844,11 @@ bool CConf::read()
|
||||||
else if (::strcmp(key, "LocalAddress") == 0)
|
else if (::strcmp(key, "LocalAddress") == 0)
|
||||||
m_fusionNetworkMyAddress = value;
|
m_fusionNetworkMyAddress = value;
|
||||||
else if (::strcmp(key, "LocalPort") == 0)
|
else if (::strcmp(key, "LocalPort") == 0)
|
||||||
m_fusionNetworkMyPort = (unsigned int)::atoi(value);
|
m_fusionNetworkMyPort = (unsigned short)::atoi(value);
|
||||||
else if (::strcmp(key, "GatewayAddress") == 0)
|
else if (::strcmp(key, "GatewayAddress") == 0)
|
||||||
m_fusionNetworkGatewayAddress = value;
|
m_fusionNetworkGatewayAddress = value;
|
||||||
else if (::strcmp(key, "GatewayPort") == 0)
|
else if (::strcmp(key, "GatewayPort") == 0)
|
||||||
m_fusionNetworkGatewayPort = (unsigned int)::atoi(value);
|
m_fusionNetworkGatewayPort = (unsigned short)::atoi(value);
|
||||||
else if (::strcmp(key, "ModeHang") == 0)
|
else if (::strcmp(key, "ModeHang") == 0)
|
||||||
m_fusionNetworkModeHang = (unsigned int)::atoi(value);
|
m_fusionNetworkModeHang = (unsigned int)::atoi(value);
|
||||||
else if (::strcmp(key, "Debug") == 0)
|
else if (::strcmp(key, "Debug") == 0)
|
||||||
|
@ -859,9 +859,9 @@ bool CConf::read()
|
||||||
else if (::strcmp(key, "GatewayAddress") == 0)
|
else if (::strcmp(key, "GatewayAddress") == 0)
|
||||||
m_p25GatewayAddress = value;
|
m_p25GatewayAddress = value;
|
||||||
else if (::strcmp(key, "GatewayPort") == 0)
|
else if (::strcmp(key, "GatewayPort") == 0)
|
||||||
m_p25GatewayPort = (unsigned int)::atoi(value);
|
m_p25GatewayPort = (unsigned short)::atoi(value);
|
||||||
else if (::strcmp(key, "LocalPort") == 0)
|
else if (::strcmp(key, "LocalPort") == 0)
|
||||||
m_p25LocalPort = (unsigned int)::atoi(value);
|
m_p25LocalPort = (unsigned short)::atoi(value);
|
||||||
else if (::strcmp(key, "ModeHang") == 0)
|
else if (::strcmp(key, "ModeHang") == 0)
|
||||||
m_p25NetworkModeHang = (unsigned int)::atoi(value);
|
m_p25NetworkModeHang = (unsigned int)::atoi(value);
|
||||||
else if (::strcmp(key, "Debug") == 0)
|
else if (::strcmp(key, "Debug") == 0)
|
||||||
|
@ -874,11 +874,11 @@ bool CConf::read()
|
||||||
else if (::strcmp(key, "LocalAddress") == 0)
|
else if (::strcmp(key, "LocalAddress") == 0)
|
||||||
m_nxdnLocalAddress = value;
|
m_nxdnLocalAddress = value;
|
||||||
else if (::strcmp(key, "LocalPort") == 0)
|
else if (::strcmp(key, "LocalPort") == 0)
|
||||||
m_nxdnLocalPort = (unsigned int)::atoi(value);
|
m_nxdnLocalPort = (unsigned short)::atoi(value);
|
||||||
else if (::strcmp(key, "GatewayAddress") == 0)
|
else if (::strcmp(key, "GatewayAddress") == 0)
|
||||||
m_nxdnGatewayAddress = value;
|
m_nxdnGatewayAddress = value;
|
||||||
else if (::strcmp(key, "GatewayPort") == 0)
|
else if (::strcmp(key, "GatewayPort") == 0)
|
||||||
m_nxdnGatewayPort = (unsigned int)::atoi(value);
|
m_nxdnGatewayPort = (unsigned short)::atoi(value);
|
||||||
else if (::strcmp(key, "ModeHang") == 0)
|
else if (::strcmp(key, "ModeHang") == 0)
|
||||||
m_nxdnNetworkModeHang = (unsigned int)::atoi(value);
|
m_nxdnNetworkModeHang = (unsigned int)::atoi(value);
|
||||||
else if (::strcmp(key, "Debug") == 0)
|
else if (::strcmp(key, "Debug") == 0)
|
||||||
|
@ -889,11 +889,11 @@ bool CConf::read()
|
||||||
else if (::strcmp(key, "LocalAddress") == 0)
|
else if (::strcmp(key, "LocalAddress") == 0)
|
||||||
m_pocsagLocalAddress = value;
|
m_pocsagLocalAddress = value;
|
||||||
else if (::strcmp(key, "LocalPort") == 0)
|
else if (::strcmp(key, "LocalPort") == 0)
|
||||||
m_pocsagLocalPort = (unsigned int)::atoi(value);
|
m_pocsagLocalPort = (unsigned short)::atoi(value);
|
||||||
else if (::strcmp(key, "GatewayAddress") == 0)
|
else if (::strcmp(key, "GatewayAddress") == 0)
|
||||||
m_pocsagGatewayAddress = value;
|
m_pocsagGatewayAddress = value;
|
||||||
else if (::strcmp(key, "GatewayPort") == 0)
|
else if (::strcmp(key, "GatewayPort") == 0)
|
||||||
m_pocsagGatewayPort = (unsigned int)::atoi(value);
|
m_pocsagGatewayPort = (unsigned short)::atoi(value);
|
||||||
else if (::strcmp(key, "ModeHang") == 0)
|
else if (::strcmp(key, "ModeHang") == 0)
|
||||||
m_pocsagNetworkModeHang = (unsigned int)::atoi(value);
|
m_pocsagNetworkModeHang = (unsigned int)::atoi(value);
|
||||||
else if (::strcmp(key, "Debug") == 0)
|
else if (::strcmp(key, "Debug") == 0)
|
||||||
|
@ -962,9 +962,9 @@ bool CConf::read()
|
||||||
if (::strcmp(key, "Address") == 0)
|
if (::strcmp(key, "Address") == 0)
|
||||||
m_lcdprocAddress = value;
|
m_lcdprocAddress = value;
|
||||||
else if (::strcmp(key, "Port") == 0)
|
else if (::strcmp(key, "Port") == 0)
|
||||||
m_lcdprocPort = (unsigned int)::atoi(value);
|
m_lcdprocPort = (unsigned short)::atoi(value);
|
||||||
else if (::strcmp(key, "LocalPort") == 0)
|
else if (::strcmp(key, "LocalPort") == 0)
|
||||||
m_lcdprocLocalPort = (unsigned int)::atoi(value);
|
m_lcdprocLocalPort = (unsigned short)::atoi(value);
|
||||||
else if (::strcmp(key, "DisplayClock") == 0)
|
else if (::strcmp(key, "DisplayClock") == 0)
|
||||||
m_lcdprocDisplayClock = ::atoi(value) == 1;
|
m_lcdprocDisplayClock = ::atoi(value) == 1;
|
||||||
else if (::strcmp(key, "UTC") == 0)
|
else if (::strcmp(key, "UTC") == 0)
|
||||||
|
@ -982,7 +982,7 @@ bool CConf::read()
|
||||||
else if (::strcmp(key, "Address") == 0)
|
else if (::strcmp(key, "Address") == 0)
|
||||||
m_remoteControlAddress = value;
|
m_remoteControlAddress = value;
|
||||||
else if (::strcmp(key, "Port") == 0)
|
else if (::strcmp(key, "Port") == 0)
|
||||||
m_remoteControlPort = (unsigned int)::atoi(value);
|
m_remoteControlPort = (unsigned short)::atoi(value);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1266,12 +1266,12 @@ std::string CConf::getTransparentRemoteAddress() const
|
||||||
return m_transparentRemoteAddress;
|
return m_transparentRemoteAddress;
|
||||||
}
|
}
|
||||||
|
|
||||||
unsigned int CConf::getTransparentRemotePort() const
|
unsigned short CConf::getTransparentRemotePort() const
|
||||||
{
|
{
|
||||||
return m_transparentRemotePort;
|
return m_transparentRemotePort;
|
||||||
}
|
}
|
||||||
|
|
||||||
unsigned int CConf::getTransparentLocalPort() const
|
unsigned short CConf::getTransparentLocalPort() const
|
||||||
{
|
{
|
||||||
return m_transparentLocalPort;
|
return m_transparentLocalPort;
|
||||||
}
|
}
|
||||||
|
@ -1716,12 +1716,12 @@ std::string CConf::getDStarGatewayAddress() const
|
||||||
return m_dstarGatewayAddress;
|
return m_dstarGatewayAddress;
|
||||||
}
|
}
|
||||||
|
|
||||||
unsigned int CConf::getDStarGatewayPort() const
|
unsigned short CConf::getDStarGatewayPort() const
|
||||||
{
|
{
|
||||||
return m_dstarGatewayPort;
|
return m_dstarGatewayPort;
|
||||||
}
|
}
|
||||||
|
|
||||||
unsigned int CConf::getDStarLocalPort() const
|
unsigned short CConf::getDStarLocalPort() const
|
||||||
{
|
{
|
||||||
return m_dstarLocalPort;
|
return m_dstarLocalPort;
|
||||||
}
|
}
|
||||||
|
@ -1751,12 +1751,12 @@ std::string CConf::getDMRNetworkAddress() const
|
||||||
return m_dmrNetworkAddress;
|
return m_dmrNetworkAddress;
|
||||||
}
|
}
|
||||||
|
|
||||||
unsigned int CConf::getDMRNetworkPort() const
|
unsigned short CConf::getDMRNetworkPort() const
|
||||||
{
|
{
|
||||||
return m_dmrNetworkPort;
|
return m_dmrNetworkPort;
|
||||||
}
|
}
|
||||||
|
|
||||||
unsigned int CConf::getDMRNetworkLocal() const
|
unsigned short CConf::getDMRNetworkLocal() const
|
||||||
{
|
{
|
||||||
return m_dmrNetworkLocal;
|
return m_dmrNetworkLocal;
|
||||||
}
|
}
|
||||||
|
@ -1806,7 +1806,7 @@ std::string CConf::getFusionNetworkMyAddress() const
|
||||||
return m_fusionNetworkMyAddress;
|
return m_fusionNetworkMyAddress;
|
||||||
}
|
}
|
||||||
|
|
||||||
unsigned int CConf::getFusionNetworkMyPort() const
|
unsigned short CConf::getFusionNetworkMyPort() const
|
||||||
{
|
{
|
||||||
return m_fusionNetworkMyPort;
|
return m_fusionNetworkMyPort;
|
||||||
}
|
}
|
||||||
|
@ -1816,7 +1816,7 @@ std::string CConf::getFusionNetworkGatewayAddress() const
|
||||||
return m_fusionNetworkGatewayAddress;
|
return m_fusionNetworkGatewayAddress;
|
||||||
}
|
}
|
||||||
|
|
||||||
unsigned int CConf::getFusionNetworkGatewayPort() const
|
unsigned short CConf::getFusionNetworkGatewayPort() const
|
||||||
{
|
{
|
||||||
return m_fusionNetworkGatewayPort;
|
return m_fusionNetworkGatewayPort;
|
||||||
}
|
}
|
||||||
|
@ -1841,12 +1841,12 @@ std::string CConf::getP25GatewayAddress() const
|
||||||
return m_p25GatewayAddress;
|
return m_p25GatewayAddress;
|
||||||
}
|
}
|
||||||
|
|
||||||
unsigned int CConf::getP25GatewayPort() const
|
unsigned short CConf::getP25GatewayPort() const
|
||||||
{
|
{
|
||||||
return m_p25GatewayPort;
|
return m_p25GatewayPort;
|
||||||
}
|
}
|
||||||
|
|
||||||
unsigned int CConf::getP25LocalPort() const
|
unsigned short CConf::getP25LocalPort() const
|
||||||
{
|
{
|
||||||
return m_p25LocalPort;
|
return m_p25LocalPort;
|
||||||
}
|
}
|
||||||
|
@ -1876,7 +1876,7 @@ std::string CConf::getNXDNGatewayAddress() const
|
||||||
return m_nxdnGatewayAddress;
|
return m_nxdnGatewayAddress;
|
||||||
}
|
}
|
||||||
|
|
||||||
unsigned int CConf::getNXDNGatewayPort() const
|
unsigned short CConf::getNXDNGatewayPort() const
|
||||||
{
|
{
|
||||||
return m_nxdnGatewayPort;
|
return m_nxdnGatewayPort;
|
||||||
}
|
}
|
||||||
|
@ -1886,7 +1886,7 @@ std::string CConf::getNXDNLocalAddress() const
|
||||||
return m_nxdnLocalAddress;
|
return m_nxdnLocalAddress;
|
||||||
}
|
}
|
||||||
|
|
||||||
unsigned int CConf::getNXDNLocalPort() const
|
unsigned short CConf::getNXDNLocalPort() const
|
||||||
{
|
{
|
||||||
return m_nxdnLocalPort;
|
return m_nxdnLocalPort;
|
||||||
}
|
}
|
||||||
|
@ -1911,7 +1911,7 @@ std::string CConf::getPOCSAGGatewayAddress() const
|
||||||
return m_pocsagGatewayAddress;
|
return m_pocsagGatewayAddress;
|
||||||
}
|
}
|
||||||
|
|
||||||
unsigned int CConf::getPOCSAGGatewayPort() const
|
unsigned short CConf::getPOCSAGGatewayPort() const
|
||||||
{
|
{
|
||||||
return m_pocsagGatewayPort;
|
return m_pocsagGatewayPort;
|
||||||
}
|
}
|
||||||
|
@ -1921,7 +1921,7 @@ std::string CConf::getPOCSAGLocalAddress() const
|
||||||
return m_pocsagLocalAddress;
|
return m_pocsagLocalAddress;
|
||||||
}
|
}
|
||||||
|
|
||||||
unsigned int CConf::getPOCSAGLocalPort() const
|
unsigned short CConf::getPOCSAGLocalPort() const
|
||||||
{
|
{
|
||||||
return m_pocsagLocalPort;
|
return m_pocsagLocalPort;
|
||||||
}
|
}
|
||||||
|
@ -2062,12 +2062,12 @@ std::string CConf::getLCDprocAddress() const
|
||||||
return m_lcdprocAddress;
|
return m_lcdprocAddress;
|
||||||
}
|
}
|
||||||
|
|
||||||
unsigned int CConf::getLCDprocPort() const
|
unsigned short CConf::getLCDprocPort() const
|
||||||
{
|
{
|
||||||
return m_lcdprocPort;
|
return m_lcdprocPort;
|
||||||
}
|
}
|
||||||
|
|
||||||
unsigned int CConf::getLCDprocLocalPort() const
|
unsigned short CConf::getLCDprocLocalPort() const
|
||||||
{
|
{
|
||||||
return m_lcdprocLocalPort;
|
return m_lcdprocLocalPort;
|
||||||
}
|
}
|
||||||
|
@ -2112,7 +2112,7 @@ std::string CConf::getRemoteControlAddress() const
|
||||||
return m_remoteControlAddress;
|
return m_remoteControlAddress;
|
||||||
}
|
}
|
||||||
|
|
||||||
unsigned int CConf::getRemoteControlPort() const
|
unsigned short CConf::getRemoteControlPort() const
|
||||||
{
|
{
|
||||||
return m_remoteControlPort;
|
return m_remoteControlPort;
|
||||||
}
|
}
|
||||||
|
|
68
Conf.h
68
Conf.h
|
@ -100,8 +100,8 @@ public:
|
||||||
// The Transparent Data section
|
// The Transparent Data section
|
||||||
bool getTransparentEnabled() const;
|
bool getTransparentEnabled() const;
|
||||||
std::string getTransparentRemoteAddress() const;
|
std::string getTransparentRemoteAddress() const;
|
||||||
unsigned int getTransparentRemotePort() const;
|
unsigned short getTransparentRemotePort() const;
|
||||||
unsigned int getTransparentLocalPort() const;
|
unsigned short getTransparentLocalPort() const;
|
||||||
unsigned int getTransparentSendFrameType() const;
|
unsigned int getTransparentSendFrameType() const;
|
||||||
|
|
||||||
// The UMP section
|
// The UMP section
|
||||||
|
@ -208,8 +208,8 @@ public:
|
||||||
// The D-Star Network section
|
// The D-Star Network section
|
||||||
bool getDStarNetworkEnabled() const;
|
bool getDStarNetworkEnabled() const;
|
||||||
std::string getDStarGatewayAddress() const;
|
std::string getDStarGatewayAddress() const;
|
||||||
unsigned int getDStarGatewayPort() const;
|
unsigned short getDStarGatewayPort() const;
|
||||||
unsigned int getDStarLocalPort() const;
|
unsigned short getDStarLocalPort() const;
|
||||||
unsigned int getDStarNetworkModeHang() const;
|
unsigned int getDStarNetworkModeHang() const;
|
||||||
bool getDStarNetworkDebug() const;
|
bool getDStarNetworkDebug() const;
|
||||||
|
|
||||||
|
@ -217,8 +217,8 @@ public:
|
||||||
bool getDMRNetworkEnabled() const;
|
bool getDMRNetworkEnabled() const;
|
||||||
std::string getDMRNetworkType() const;
|
std::string getDMRNetworkType() const;
|
||||||
std::string getDMRNetworkAddress() const;
|
std::string getDMRNetworkAddress() const;
|
||||||
unsigned int getDMRNetworkPort() const;
|
unsigned short getDMRNetworkPort() const;
|
||||||
unsigned int getDMRNetworkLocal() const;
|
unsigned short getDMRNetworkLocal() const;
|
||||||
std::string getDMRNetworkPassword() const;
|
std::string getDMRNetworkPassword() const;
|
||||||
std::string getDMRNetworkOptions() const;
|
std::string getDMRNetworkOptions() const;
|
||||||
bool getDMRNetworkDebug() const;
|
bool getDMRNetworkDebug() const;
|
||||||
|
@ -230,17 +230,17 @@ public:
|
||||||
// The System Fusion Network section
|
// The System Fusion Network section
|
||||||
bool getFusionNetworkEnabled() const;
|
bool getFusionNetworkEnabled() const;
|
||||||
std::string getFusionNetworkMyAddress() const;
|
std::string getFusionNetworkMyAddress() const;
|
||||||
unsigned int getFusionNetworkMyPort() const;
|
unsigned short getFusionNetworkMyPort() const;
|
||||||
std::string getFusionNetworkGatewayAddress() const;
|
std::string getFusionNetworkGatewayAddress() const;
|
||||||
unsigned int getFusionNetworkGatewayPort() const;
|
unsigned short getFusionNetworkGatewayPort() const;
|
||||||
unsigned int getFusionNetworkModeHang() const;
|
unsigned int getFusionNetworkModeHang() const;
|
||||||
bool getFusionNetworkDebug() const;
|
bool getFusionNetworkDebug() const;
|
||||||
|
|
||||||
// The P25 Network section
|
// The P25 Network section
|
||||||
bool getP25NetworkEnabled() const;
|
bool getP25NetworkEnabled() const;
|
||||||
std::string getP25GatewayAddress() const;
|
std::string getP25GatewayAddress() const;
|
||||||
unsigned int getP25GatewayPort() const;
|
unsigned short getP25GatewayPort() const;
|
||||||
unsigned int getP25LocalPort() const;
|
unsigned short getP25LocalPort() const;
|
||||||
unsigned int getP25NetworkModeHang() const;
|
unsigned int getP25NetworkModeHang() const;
|
||||||
bool getP25NetworkDebug() const;
|
bool getP25NetworkDebug() const;
|
||||||
|
|
||||||
|
@ -248,18 +248,18 @@ public:
|
||||||
bool getNXDNNetworkEnabled() const;
|
bool getNXDNNetworkEnabled() const;
|
||||||
std::string getNXDNNetworkProtocol() const;
|
std::string getNXDNNetworkProtocol() const;
|
||||||
std::string getNXDNGatewayAddress() const;
|
std::string getNXDNGatewayAddress() const;
|
||||||
unsigned int getNXDNGatewayPort() const;
|
unsigned short getNXDNGatewayPort() const;
|
||||||
std::string getNXDNLocalAddress() const;
|
std::string getNXDNLocalAddress() const;
|
||||||
unsigned int getNXDNLocalPort() const;
|
unsigned short getNXDNLocalPort() const;
|
||||||
unsigned int getNXDNNetworkModeHang() const;
|
unsigned int getNXDNNetworkModeHang() const;
|
||||||
bool getNXDNNetworkDebug() const;
|
bool getNXDNNetworkDebug() const;
|
||||||
|
|
||||||
// The POCSAG Network section
|
// The POCSAG Network section
|
||||||
bool getPOCSAGNetworkEnabled() const;
|
bool getPOCSAGNetworkEnabled() const;
|
||||||
std::string getPOCSAGGatewayAddress() const;
|
std::string getPOCSAGGatewayAddress() const;
|
||||||
unsigned int getPOCSAGGatewayPort() const;
|
unsigned short getPOCSAGGatewayPort() const;
|
||||||
std::string getPOCSAGLocalAddress() const;
|
std::string getPOCSAGLocalAddress() const;
|
||||||
unsigned int getPOCSAGLocalPort() const;
|
unsigned short getPOCSAGLocalPort() const;
|
||||||
unsigned int getPOCSAGNetworkModeHang() const;
|
unsigned int getPOCSAGNetworkModeHang() const;
|
||||||
bool getPOCSAGNetworkDebug() const;
|
bool getPOCSAGNetworkDebug() const;
|
||||||
|
|
||||||
|
@ -298,8 +298,8 @@ public:
|
||||||
|
|
||||||
// The LCDproc section
|
// The LCDproc section
|
||||||
std::string getLCDprocAddress() const;
|
std::string getLCDprocAddress() const;
|
||||||
unsigned int getLCDprocPort() const;
|
unsigned short getLCDprocPort() const;
|
||||||
unsigned int getLCDprocLocalPort() const;
|
unsigned short getLCDprocLocalPort() const;
|
||||||
bool getLCDprocDisplayClock() const;
|
bool getLCDprocDisplayClock() const;
|
||||||
bool getLCDprocUTC() const;
|
bool getLCDprocUTC() const;
|
||||||
bool getLCDprocDimOnIdle() const;
|
bool getLCDprocDimOnIdle() const;
|
||||||
|
@ -311,7 +311,7 @@ public:
|
||||||
// The Remote Control section
|
// The Remote Control section
|
||||||
bool getRemoteControlEnabled() const;
|
bool getRemoteControlEnabled() const;
|
||||||
std::string getRemoteControlAddress() const;
|
std::string getRemoteControlAddress() const;
|
||||||
unsigned int getRemoteControlPort() const;
|
unsigned short getRemoteControlPort() const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
std::string m_file;
|
std::string m_file;
|
||||||
|
@ -377,8 +377,8 @@ private:
|
||||||
|
|
||||||
bool m_transparentEnabled;
|
bool m_transparentEnabled;
|
||||||
std::string m_transparentRemoteAddress;
|
std::string m_transparentRemoteAddress;
|
||||||
unsigned int m_transparentRemotePort;
|
unsigned short m_transparentRemotePort;
|
||||||
unsigned int m_transparentLocalPort;
|
unsigned short m_transparentLocalPort;
|
||||||
unsigned int m_transparentSendFrameType;
|
unsigned int m_transparentSendFrameType;
|
||||||
|
|
||||||
bool m_umpEnabled;
|
bool m_umpEnabled;
|
||||||
|
@ -476,16 +476,16 @@ private:
|
||||||
|
|
||||||
bool m_dstarNetworkEnabled;
|
bool m_dstarNetworkEnabled;
|
||||||
std::string m_dstarGatewayAddress;
|
std::string m_dstarGatewayAddress;
|
||||||
unsigned int m_dstarGatewayPort;
|
unsigned short m_dstarGatewayPort;
|
||||||
unsigned int m_dstarLocalPort;
|
unsigned short m_dstarLocalPort;
|
||||||
unsigned int m_dstarNetworkModeHang;
|
unsigned int m_dstarNetworkModeHang;
|
||||||
bool m_dstarNetworkDebug;
|
bool m_dstarNetworkDebug;
|
||||||
|
|
||||||
bool m_dmrNetworkEnabled;
|
bool m_dmrNetworkEnabled;
|
||||||
std::string m_dmrNetworkType;
|
std::string m_dmrNetworkType;
|
||||||
std::string m_dmrNetworkAddress;
|
std::string m_dmrNetworkAddress;
|
||||||
unsigned int m_dmrNetworkPort;
|
unsigned short m_dmrNetworkPort;
|
||||||
unsigned int m_dmrNetworkLocal;
|
unsigned short m_dmrNetworkLocal;
|
||||||
std::string m_dmrNetworkPassword;
|
std::string m_dmrNetworkPassword;
|
||||||
std::string m_dmrNetworkOptions;
|
std::string m_dmrNetworkOptions;
|
||||||
bool m_dmrNetworkDebug;
|
bool m_dmrNetworkDebug;
|
||||||
|
@ -496,33 +496,33 @@ private:
|
||||||
|
|
||||||
bool m_fusionNetworkEnabled;
|
bool m_fusionNetworkEnabled;
|
||||||
std::string m_fusionNetworkMyAddress;
|
std::string m_fusionNetworkMyAddress;
|
||||||
unsigned int m_fusionNetworkMyPort;
|
unsigned short m_fusionNetworkMyPort;
|
||||||
std::string m_fusionNetworkGatewayAddress;
|
std::string m_fusionNetworkGatewayAddress;
|
||||||
unsigned int m_fusionNetworkGatewayPort;
|
unsigned short m_fusionNetworkGatewayPort;
|
||||||
unsigned int m_fusionNetworkModeHang;
|
unsigned int m_fusionNetworkModeHang;
|
||||||
bool m_fusionNetworkDebug;
|
bool m_fusionNetworkDebug;
|
||||||
|
|
||||||
bool m_p25NetworkEnabled;
|
bool m_p25NetworkEnabled;
|
||||||
std::string m_p25GatewayAddress;
|
std::string m_p25GatewayAddress;
|
||||||
unsigned int m_p25GatewayPort;
|
unsigned short m_p25GatewayPort;
|
||||||
unsigned int m_p25LocalPort;
|
unsigned short m_p25LocalPort;
|
||||||
unsigned int m_p25NetworkModeHang;
|
unsigned int m_p25NetworkModeHang;
|
||||||
bool m_p25NetworkDebug;
|
bool m_p25NetworkDebug;
|
||||||
|
|
||||||
bool m_nxdnNetworkEnabled;
|
bool m_nxdnNetworkEnabled;
|
||||||
std::string m_nxdnNetworkProtocol;
|
std::string m_nxdnNetworkProtocol;
|
||||||
std::string m_nxdnGatewayAddress;
|
std::string m_nxdnGatewayAddress;
|
||||||
unsigned int m_nxdnGatewayPort;
|
unsigned short m_nxdnGatewayPort;
|
||||||
std::string m_nxdnLocalAddress;
|
std::string m_nxdnLocalAddress;
|
||||||
unsigned int m_nxdnLocalPort;
|
unsigned short m_nxdnLocalPort;
|
||||||
unsigned int m_nxdnNetworkModeHang;
|
unsigned int m_nxdnNetworkModeHang;
|
||||||
bool m_nxdnNetworkDebug;
|
bool m_nxdnNetworkDebug;
|
||||||
|
|
||||||
bool m_pocsagNetworkEnabled;
|
bool m_pocsagNetworkEnabled;
|
||||||
std::string m_pocsagGatewayAddress;
|
std::string m_pocsagGatewayAddress;
|
||||||
unsigned int m_pocsagGatewayPort;
|
unsigned short m_pocsagGatewayPort;
|
||||||
std::string m_pocsagLocalAddress;
|
std::string m_pocsagLocalAddress;
|
||||||
unsigned int m_pocsagLocalPort;
|
unsigned short m_pocsagLocalPort;
|
||||||
unsigned int m_pocsagNetworkModeHang;
|
unsigned int m_pocsagNetworkModeHang;
|
||||||
bool m_pocsagNetworkDebug;
|
bool m_pocsagNetworkDebug;
|
||||||
|
|
||||||
|
@ -556,8 +556,8 @@ private:
|
||||||
bool m_oledLogoScreensaver;
|
bool m_oledLogoScreensaver;
|
||||||
|
|
||||||
std::string m_lcdprocAddress;
|
std::string m_lcdprocAddress;
|
||||||
unsigned int m_lcdprocPort;
|
unsigned short m_lcdprocPort;
|
||||||
unsigned int m_lcdprocLocalPort;
|
unsigned short m_lcdprocLocalPort;
|
||||||
bool m_lcdprocDisplayClock;
|
bool m_lcdprocDisplayClock;
|
||||||
bool m_lcdprocUTC;
|
bool m_lcdprocUTC;
|
||||||
bool m_lcdprocDimOnIdle;
|
bool m_lcdprocDimOnIdle;
|
||||||
|
@ -567,7 +567,7 @@ private:
|
||||||
|
|
||||||
bool m_remoteControlEnabled;
|
bool m_remoteControlEnabled;
|
||||||
std::string m_remoteControlAddress;
|
std::string m_remoteControlAddress;
|
||||||
unsigned int m_remoteControlPort;
|
unsigned short m_remoteControlPort;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -30,7 +30,7 @@ const unsigned int BUFFER_LENGTH = 500U;
|
||||||
const unsigned int HOMEBREW_DATA_PACKET_LENGTH = 55U;
|
const unsigned int HOMEBREW_DATA_PACKET_LENGTH = 55U;
|
||||||
|
|
||||||
|
|
||||||
CDMRDirectNetwork::CDMRDirectNetwork(const std::string& address, unsigned int port, unsigned int local, unsigned int id, const std::string& password, bool duplex, const char* version, bool slot1, bool slot2, HW_TYPE hwType, bool debug) :
|
CDMRDirectNetwork::CDMRDirectNetwork(const std::string& address, unsigned short port, unsigned short local, unsigned int id, const std::string& password, bool duplex, const char* version, bool slot1, bool slot2, HW_TYPE hwType, bool debug) :
|
||||||
m_address(address),
|
m_address(address),
|
||||||
m_port(port),
|
m_port(port),
|
||||||
m_addr(),
|
m_addr(),
|
||||||
|
|
|
@ -32,7 +32,7 @@
|
||||||
class CDMRDirectNetwork : public IDMRNetwork
|
class CDMRDirectNetwork : public IDMRNetwork
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
CDMRDirectNetwork(const std::string& address, unsigned int port, unsigned int local, unsigned int id, const std::string& password, bool duplex, const char* version, bool slot1, bool slot2, HW_TYPE hwType, bool debug);
|
CDMRDirectNetwork(const std::string& address, unsigned short port, unsigned short local, unsigned int id, const std::string& password, bool duplex, const char* version, bool slot1, bool slot2, HW_TYPE hwType, bool debug);
|
||||||
virtual ~CDMRDirectNetwork();
|
virtual ~CDMRDirectNetwork();
|
||||||
|
|
||||||
virtual void setOptions(const std::string& options);
|
virtual void setOptions(const std::string& options);
|
||||||
|
@ -61,7 +61,7 @@ public:
|
||||||
|
|
||||||
private:
|
private:
|
||||||
std::string m_address;
|
std::string m_address;
|
||||||
unsigned int m_port;
|
unsigned short m_port;
|
||||||
sockaddr_storage m_addr;
|
sockaddr_storage m_addr;
|
||||||
unsigned int m_addrLen;
|
unsigned int m_addrLen;
|
||||||
uint8_t* m_id;
|
uint8_t* m_id;
|
||||||
|
|
|
@ -31,7 +31,7 @@ const unsigned int BUFFER_LENGTH = 500U;
|
||||||
const unsigned int HOMEBREW_DATA_PACKET_LENGTH = 55U;
|
const unsigned int HOMEBREW_DATA_PACKET_LENGTH = 55U;
|
||||||
|
|
||||||
|
|
||||||
CDMRGatewayNetwork::CDMRGatewayNetwork(const std::string& address, unsigned int port, unsigned int local, unsigned int id, bool duplex, const char* version, bool slot1, bool slot2, HW_TYPE hwType, bool debug) :
|
CDMRGatewayNetwork::CDMRGatewayNetwork(const std::string& address, unsigned short port, unsigned short local, unsigned int id, bool duplex, const char* version, bool slot1, bool slot2, HW_TYPE hwType, bool debug) :
|
||||||
m_addressStr(address),
|
m_addressStr(address),
|
||||||
m_addr(),
|
m_addr(),
|
||||||
m_addrLen(0U),
|
m_addrLen(0U),
|
||||||
|
|
|
@ -33,7 +33,7 @@
|
||||||
class CDMRGatewayNetwork : public IDMRNetwork
|
class CDMRGatewayNetwork : public IDMRNetwork
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
CDMRGatewayNetwork(const std::string& address, unsigned int port, unsigned int local, unsigned int id, bool duplex, const char* version, bool slot1, bool slot2, HW_TYPE hwType, bool debug);
|
CDMRGatewayNetwork(const std::string& address, unsigned short port, unsigned short local, unsigned int id, bool duplex, const char* version, bool slot1, bool slot2, HW_TYPE hwType, bool debug);
|
||||||
virtual ~CDMRGatewayNetwork();
|
virtual ~CDMRGatewayNetwork();
|
||||||
|
|
||||||
virtual void setOptions(const std::string& options);
|
virtual void setOptions(const std::string& options);
|
||||||
|
@ -64,7 +64,7 @@ private:
|
||||||
std::string m_addressStr;
|
std::string m_addressStr;
|
||||||
sockaddr_storage m_addr;
|
sockaddr_storage m_addr;
|
||||||
unsigned int m_addrLen;
|
unsigned int m_addrLen;
|
||||||
unsigned int m_port;
|
unsigned short m_port;
|
||||||
uint8_t* m_id;
|
uint8_t* m_id;
|
||||||
bool m_duplex;
|
bool m_duplex;
|
||||||
const char* m_version;
|
const char* m_version;
|
||||||
|
|
|
@ -30,7 +30,7 @@
|
||||||
|
|
||||||
const unsigned int BUFFER_LENGTH = 100U;
|
const unsigned int BUFFER_LENGTH = 100U;
|
||||||
|
|
||||||
CDStarNetwork::CDStarNetwork(const std::string& gatewayAddress, unsigned int gatewayPort, unsigned int localPort, bool duplex, const char* version, bool debug) :
|
CDStarNetwork::CDStarNetwork(const std::string& gatewayAddress, unsigned short gatewayPort, unsigned short localPort, bool duplex, const char* version, bool debug) :
|
||||||
m_socket(localPort),
|
m_socket(localPort),
|
||||||
m_addr(),
|
m_addr(),
|
||||||
m_addrLen(0U),
|
m_addrLen(0U),
|
||||||
|
|
|
@ -30,7 +30,7 @@
|
||||||
|
|
||||||
class CDStarNetwork {
|
class CDStarNetwork {
|
||||||
public:
|
public:
|
||||||
CDStarNetwork(const std::string& gatewayAddress, unsigned int gatewayPort, unsigned int localPort, bool duplex, const char* version, bool debug);
|
CDStarNetwork(const std::string& gatewayAddress, unsigned short gatewayPort, unsigned short localPort, bool duplex, const char* version, bool debug);
|
||||||
~CDStarNetwork();
|
~CDStarNetwork();
|
||||||
|
|
||||||
bool open();
|
bool open();
|
||||||
|
|
|
@ -96,7 +96,7 @@ const unsigned int YSF_RSSI_COUNT = 13U; // 13 * 100ms = 1300ms
|
||||||
const unsigned int P25_RSSI_COUNT = 7U; // 7 * 180ms = 1260ms
|
const unsigned int P25_RSSI_COUNT = 7U; // 7 * 180ms = 1260ms
|
||||||
const unsigned int NXDN_RSSI_COUNT = 28U; // 28 * 40ms = 1120ms
|
const unsigned int NXDN_RSSI_COUNT = 28U; // 28 * 40ms = 1120ms
|
||||||
|
|
||||||
CLCDproc::CLCDproc(std::string address, unsigned int port, unsigned int localPort, const std::string& callsign, unsigned int dmrid, bool displayClock, bool utc, bool duplex, bool dimOnIdle) :
|
CLCDproc::CLCDproc(std::string address, unsigned int port, unsigned short localPort, const std::string& callsign, unsigned int dmrid, bool displayClock, bool utc, bool duplex, bool dimOnIdle) :
|
||||||
CDisplay(),
|
CDisplay(),
|
||||||
m_address(address),
|
m_address(address),
|
||||||
m_port(port),
|
m_port(port),
|
||||||
|
|
|
@ -28,7 +28,7 @@
|
||||||
class CLCDproc : public CDisplay
|
class CLCDproc : public CDisplay
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
CLCDproc(std::string address, unsigned int port, unsigned int localPort, const std::string& callsign, unsigned int dmrid, bool displayClock, bool utc, bool duplex, bool dimOnIdle);
|
CLCDproc(std::string address, unsigned int port, unsigned short localPort, const std::string& callsign, unsigned int dmrid, bool displayClock, bool utc, bool duplex, bool dimOnIdle);
|
||||||
virtual ~CLCDproc();
|
virtual ~CLCDproc();
|
||||||
|
|
||||||
virtual bool open();
|
virtual bool open();
|
||||||
|
@ -73,7 +73,7 @@ protected:
|
||||||
private:
|
private:
|
||||||
std::string m_address;
|
std::string m_address;
|
||||||
unsigned int m_port;
|
unsigned int m_port;
|
||||||
unsigned int m_localPort;
|
unsigned short m_localPort;
|
||||||
std::string m_callsign;
|
std::string m_callsign;
|
||||||
unsigned int m_dmrid;
|
unsigned int m_dmrid;
|
||||||
bool m_displayClock;
|
bool m_displayClock;
|
||||||
|
|
|
@ -339,14 +339,14 @@ int CMMDVMHost::run()
|
||||||
unsigned int sendFrameType = 0U;
|
unsigned int sendFrameType = 0U;
|
||||||
if (m_conf.getTransparentEnabled()) {
|
if (m_conf.getTransparentEnabled()) {
|
||||||
std::string remoteAddress = m_conf.getTransparentRemoteAddress();
|
std::string remoteAddress = m_conf.getTransparentRemoteAddress();
|
||||||
unsigned int remotePort = m_conf.getTransparentRemotePort();
|
unsigned short remotePort = m_conf.getTransparentRemotePort();
|
||||||
unsigned int localPort = m_conf.getTransparentLocalPort();
|
unsigned short localPort = m_conf.getTransparentLocalPort();
|
||||||
sendFrameType = m_conf.getTransparentSendFrameType();
|
sendFrameType = m_conf.getTransparentSendFrameType();
|
||||||
|
|
||||||
LogInfo("Transparent Data");
|
LogInfo("Transparent Data");
|
||||||
LogInfo(" Remote Address: %s", remoteAddress.c_str());
|
LogInfo(" Remote Address: %s", remoteAddress.c_str());
|
||||||
LogInfo(" Remote Port: %u", remotePort);
|
LogInfo(" Remote Port: %hu", remotePort);
|
||||||
LogInfo(" Local Port: %u", localPort);
|
LogInfo(" Local Port: %hu", localPort);
|
||||||
LogInfo(" Send Frame Type: %u", sendFrameType);
|
LogInfo(" Send Frame Type: %u", sendFrameType);
|
||||||
|
|
||||||
if (CUDPSocket::lookup(remoteAddress, remotePort, transparentAddress, transparentAddrLen) != 0) {
|
if (CUDPSocket::lookup(remoteAddress, remotePort, transparentAddress, transparentAddrLen) != 0) {
|
||||||
|
@ -629,11 +629,11 @@ int CMMDVMHost::run()
|
||||||
bool remoteControlEnabled = m_conf.getRemoteControlEnabled();
|
bool remoteControlEnabled = m_conf.getRemoteControlEnabled();
|
||||||
if (remoteControlEnabled) {
|
if (remoteControlEnabled) {
|
||||||
std::string address = m_conf.getRemoteControlAddress();
|
std::string address = m_conf.getRemoteControlAddress();
|
||||||
unsigned int port = m_conf.getRemoteControlPort();
|
unsigned short port = m_conf.getRemoteControlPort();
|
||||||
|
|
||||||
LogInfo("Remote Control Parameters");
|
LogInfo("Remote Control Parameters");
|
||||||
LogInfo(" Address: %s", address.c_str());
|
LogInfo(" Address: %s", address.c_str());
|
||||||
LogInfo(" Port: %u", port);
|
LogInfo(" Port: %hu", port);
|
||||||
|
|
||||||
m_remoteControl = new CRemoteControl(this, address, port);
|
m_remoteControl = new CRemoteControl(this, address, port);
|
||||||
|
|
||||||
|
@ -1265,7 +1265,7 @@ bool CMMDVMHost::createModem()
|
||||||
bool cosInvert = m_conf.getFMCOSInvert();
|
bool cosInvert = m_conf.getFMCOSInvert();
|
||||||
unsigned int rfAudioBoost = m_conf.getFMRFAudioBoost();
|
unsigned int rfAudioBoost = m_conf.getFMRFAudioBoost();
|
||||||
float maxDevLevel = m_conf.getFMMaxDevLevel();
|
float maxDevLevel = m_conf.getFMMaxDevLevel();
|
||||||
unsigned int extAudioBoost = m_conf.getFMExtAudioBoost();
|
//unsigned int extAudioBoost = m_conf.getFMExtAudioBoost();
|
||||||
|
|
||||||
LogInfo("FM Parameters");
|
LogInfo("FM Parameters");
|
||||||
LogInfo(" Callsign: %s", callsign.c_str());
|
LogInfo(" Callsign: %s", callsign.c_str());
|
||||||
|
@ -1317,15 +1317,15 @@ bool CMMDVMHost::createModem()
|
||||||
bool CMMDVMHost::createDStarNetwork()
|
bool CMMDVMHost::createDStarNetwork()
|
||||||
{
|
{
|
||||||
std::string gatewayAddress = m_conf.getDStarGatewayAddress();
|
std::string gatewayAddress = m_conf.getDStarGatewayAddress();
|
||||||
unsigned int gatewayPort = m_conf.getDStarGatewayPort();
|
unsigned short gatewayPort = m_conf.getDStarGatewayPort();
|
||||||
unsigned int localPort = m_conf.getDStarLocalPort();
|
unsigned short localPort = m_conf.getDStarLocalPort();
|
||||||
bool debug = m_conf.getDStarNetworkDebug();
|
bool debug = m_conf.getDStarNetworkDebug();
|
||||||
m_dstarNetModeHang = m_conf.getDStarNetworkModeHang();
|
m_dstarNetModeHang = m_conf.getDStarNetworkModeHang();
|
||||||
|
|
||||||
LogInfo("D-Star Network Parameters");
|
LogInfo("D-Star Network Parameters");
|
||||||
LogInfo(" Gateway Address: %s", gatewayAddress.c_str());
|
LogInfo(" Gateway Address: %s", gatewayAddress.c_str());
|
||||||
LogInfo(" Gateway Port: %u", gatewayPort);
|
LogInfo(" Gateway Port: %hu", gatewayPort);
|
||||||
LogInfo(" Local Port: %u", localPort);
|
LogInfo(" Local Port: %hu", localPort);
|
||||||
LogInfo(" Mode Hang: %us", m_dstarNetModeHang);
|
LogInfo(" Mode Hang: %us", m_dstarNetModeHang);
|
||||||
|
|
||||||
m_dstarNetwork = new CDStarNetwork(gatewayAddress, gatewayPort, localPort, m_duplex, VERSION, debug);
|
m_dstarNetwork = new CDStarNetwork(gatewayAddress, gatewayPort, localPort, m_duplex, VERSION, debug);
|
||||||
|
@ -1345,8 +1345,8 @@ bool CMMDVMHost::createDStarNetwork()
|
||||||
bool CMMDVMHost::createDMRNetwork()
|
bool CMMDVMHost::createDMRNetwork()
|
||||||
{
|
{
|
||||||
std::string address = m_conf.getDMRNetworkAddress();
|
std::string address = m_conf.getDMRNetworkAddress();
|
||||||
unsigned int port = m_conf.getDMRNetworkPort();
|
unsigned short port = m_conf.getDMRNetworkPort();
|
||||||
unsigned int local = m_conf.getDMRNetworkLocal();
|
unsigned short local = m_conf.getDMRNetworkLocal();
|
||||||
unsigned int id = m_conf.getDMRId();
|
unsigned int id = m_conf.getDMRId();
|
||||||
std::string password = m_conf.getDMRNetworkPassword();
|
std::string password = m_conf.getDMRNetworkPassword();
|
||||||
bool debug = m_conf.getDMRNetworkDebug();
|
bool debug = m_conf.getDMRNetworkDebug();
|
||||||
|
@ -1362,9 +1362,9 @@ bool CMMDVMHost::createDMRNetwork()
|
||||||
LogInfo("DMR Network Parameters");
|
LogInfo("DMR Network Parameters");
|
||||||
LogInfo(" Type: %s", type.c_str());
|
LogInfo(" Type: %s", type.c_str());
|
||||||
LogInfo(" Address: %s", address.c_str());
|
LogInfo(" Address: %s", address.c_str());
|
||||||
LogInfo(" Port: %u", port);
|
LogInfo(" Port: %hu", port);
|
||||||
if (local > 0U)
|
if (local > 0U)
|
||||||
LogInfo(" Local: %u", local);
|
LogInfo(" Local: %hu", local);
|
||||||
else
|
else
|
||||||
LogInfo(" Local: random");
|
LogInfo(" Local: random");
|
||||||
LogInfo(" Jitter: %ums", jitter);
|
LogInfo(" Jitter: %ums", jitter);
|
||||||
|
@ -1429,17 +1429,17 @@ bool CMMDVMHost::createDMRNetwork()
|
||||||
bool CMMDVMHost::createYSFNetwork()
|
bool CMMDVMHost::createYSFNetwork()
|
||||||
{
|
{
|
||||||
std::string myAddress = m_conf.getFusionNetworkMyAddress();
|
std::string myAddress = m_conf.getFusionNetworkMyAddress();
|
||||||
unsigned int myPort = m_conf.getFusionNetworkMyPort();
|
unsigned short myPort = m_conf.getFusionNetworkMyPort();
|
||||||
std::string gatewayAddress = m_conf.getFusionNetworkGatewayAddress();
|
std::string gatewayAddress = m_conf.getFusionNetworkGatewayAddress();
|
||||||
unsigned int gatewayPort = m_conf.getFusionNetworkGatewayPort();
|
unsigned short gatewayPort = m_conf.getFusionNetworkGatewayPort();
|
||||||
m_ysfNetModeHang = m_conf.getFusionNetworkModeHang();
|
m_ysfNetModeHang = m_conf.getFusionNetworkModeHang();
|
||||||
bool debug = m_conf.getFusionNetworkDebug();
|
bool debug = m_conf.getFusionNetworkDebug();
|
||||||
|
|
||||||
LogInfo("System Fusion Network Parameters");
|
LogInfo("System Fusion Network Parameters");
|
||||||
LogInfo(" Local Address: %s", myAddress.c_str());
|
LogInfo(" Local Address: %s", myAddress.c_str());
|
||||||
LogInfo(" Local Port: %u", myPort);
|
LogInfo(" Local Port: %hu", myPort);
|
||||||
LogInfo(" Gateway Address: %s", gatewayAddress.c_str());
|
LogInfo(" Gateway Address: %s", gatewayAddress.c_str());
|
||||||
LogInfo(" Gateway Port: %u", gatewayPort);
|
LogInfo(" Gateway Port: %hu", gatewayPort);
|
||||||
LogInfo(" Mode Hang: %us", m_ysfNetModeHang);
|
LogInfo(" Mode Hang: %us", m_ysfNetModeHang);
|
||||||
|
|
||||||
m_ysfNetwork = new CYSFNetwork(myAddress, myPort, gatewayAddress, gatewayPort, m_callsign, debug);
|
m_ysfNetwork = new CYSFNetwork(myAddress, myPort, gatewayAddress, gatewayPort, m_callsign, debug);
|
||||||
|
@ -1459,15 +1459,15 @@ bool CMMDVMHost::createYSFNetwork()
|
||||||
bool CMMDVMHost::createP25Network()
|
bool CMMDVMHost::createP25Network()
|
||||||
{
|
{
|
||||||
std::string gatewayAddress = m_conf.getP25GatewayAddress();
|
std::string gatewayAddress = m_conf.getP25GatewayAddress();
|
||||||
unsigned int gatewayPort = m_conf.getP25GatewayPort();
|
unsigned short gatewayPort = m_conf.getP25GatewayPort();
|
||||||
unsigned int localPort = m_conf.getP25LocalPort();
|
unsigned short localPort = m_conf.getP25LocalPort();
|
||||||
m_p25NetModeHang = m_conf.getP25NetworkModeHang();
|
m_p25NetModeHang = m_conf.getP25NetworkModeHang();
|
||||||
bool debug = m_conf.getP25NetworkDebug();
|
bool debug = m_conf.getP25NetworkDebug();
|
||||||
|
|
||||||
LogInfo("P25 Network Parameters");
|
LogInfo("P25 Network Parameters");
|
||||||
LogInfo(" Gateway Address: %s", gatewayAddress.c_str());
|
LogInfo(" Gateway Address: %s", gatewayAddress.c_str());
|
||||||
LogInfo(" Gateway Port: %u", gatewayPort);
|
LogInfo(" Gateway Port: %hu", gatewayPort);
|
||||||
LogInfo(" Local Port: %u", localPort);
|
LogInfo(" Local Port: %hu", localPort);
|
||||||
LogInfo(" Mode Hang: %us", m_p25NetModeHang);
|
LogInfo(" Mode Hang: %us", m_p25NetModeHang);
|
||||||
|
|
||||||
m_p25Network = new CP25Network(gatewayAddress, gatewayPort, localPort, debug);
|
m_p25Network = new CP25Network(gatewayAddress, gatewayPort, localPort, debug);
|
||||||
|
@ -1488,18 +1488,18 @@ bool CMMDVMHost::createNXDNNetwork()
|
||||||
{
|
{
|
||||||
std::string protocol = m_conf.getNXDNNetworkProtocol();
|
std::string protocol = m_conf.getNXDNNetworkProtocol();
|
||||||
std::string gatewayAddress = m_conf.getNXDNGatewayAddress();
|
std::string gatewayAddress = m_conf.getNXDNGatewayAddress();
|
||||||
unsigned int gatewayPort = m_conf.getNXDNGatewayPort();
|
unsigned short gatewayPort = m_conf.getNXDNGatewayPort();
|
||||||
std::string localAddress = m_conf.getNXDNLocalAddress();
|
std::string localAddress = m_conf.getNXDNLocalAddress();
|
||||||
unsigned int localPort = m_conf.getNXDNLocalPort();
|
unsigned short localPort = m_conf.getNXDNLocalPort();
|
||||||
m_nxdnNetModeHang = m_conf.getNXDNNetworkModeHang();
|
m_nxdnNetModeHang = m_conf.getNXDNNetworkModeHang();
|
||||||
bool debug = m_conf.getNXDNNetworkDebug();
|
bool debug = m_conf.getNXDNNetworkDebug();
|
||||||
|
|
||||||
LogInfo("NXDN Network Parameters");
|
LogInfo("NXDN Network Parameters");
|
||||||
LogInfo(" Protocol: %s", protocol.c_str());
|
LogInfo(" Protocol: %s", protocol.c_str());
|
||||||
LogInfo(" Gateway Address: %s", gatewayAddress.c_str());
|
LogInfo(" Gateway Address: %s", gatewayAddress.c_str());
|
||||||
LogInfo(" Gateway Port: %u", gatewayPort);
|
LogInfo(" Gateway Port: %hu", gatewayPort);
|
||||||
LogInfo(" Local Address: %s", localAddress.c_str());
|
LogInfo(" Local Address: %s", localAddress.c_str());
|
||||||
LogInfo(" Local Port: %u", localPort);
|
LogInfo(" Local Port: %hu", localPort);
|
||||||
LogInfo(" Mode Hang: %us", m_nxdnNetModeHang);
|
LogInfo(" Mode Hang: %us", m_nxdnNetModeHang);
|
||||||
|
|
||||||
if (protocol == "Kenwood")
|
if (protocol == "Kenwood")
|
||||||
|
@ -1522,17 +1522,17 @@ bool CMMDVMHost::createNXDNNetwork()
|
||||||
bool CMMDVMHost::createPOCSAGNetwork()
|
bool CMMDVMHost::createPOCSAGNetwork()
|
||||||
{
|
{
|
||||||
std::string gatewayAddress = m_conf.getPOCSAGGatewayAddress();
|
std::string gatewayAddress = m_conf.getPOCSAGGatewayAddress();
|
||||||
unsigned int gatewayPort = m_conf.getPOCSAGGatewayPort();
|
unsigned short gatewayPort = m_conf.getPOCSAGGatewayPort();
|
||||||
std::string localAddress = m_conf.getPOCSAGLocalAddress();
|
std::string localAddress = m_conf.getPOCSAGLocalAddress();
|
||||||
unsigned int localPort = m_conf.getPOCSAGLocalPort();
|
unsigned short localPort = m_conf.getPOCSAGLocalPort();
|
||||||
m_pocsagNetModeHang = m_conf.getPOCSAGNetworkModeHang();
|
m_pocsagNetModeHang = m_conf.getPOCSAGNetworkModeHang();
|
||||||
bool debug = m_conf.getPOCSAGNetworkDebug();
|
bool debug = m_conf.getPOCSAGNetworkDebug();
|
||||||
|
|
||||||
LogInfo("POCSAG Network Parameters");
|
LogInfo("POCSAG Network Parameters");
|
||||||
LogInfo(" Gateway Address: %s", gatewayAddress.c_str());
|
LogInfo(" Gateway Address: %s", gatewayAddress.c_str());
|
||||||
LogInfo(" Gateway Port: %u", gatewayPort);
|
LogInfo(" Gateway Port: %hu", gatewayPort);
|
||||||
LogInfo(" Local Address: %s", localAddress.c_str());
|
LogInfo(" Local Address: %s", localAddress.c_str());
|
||||||
LogInfo(" Local Port: %u", localPort);
|
LogInfo(" Local Port: %hu", localPort);
|
||||||
LogInfo(" Mode Hang: %us", m_pocsagNetModeHang);
|
LogInfo(" Mode Hang: %us", m_pocsagNetModeHang);
|
||||||
|
|
||||||
m_pocsagNetwork = new CPOCSAGNetwork(localAddress, localPort, gatewayAddress, gatewayPort, debug);
|
m_pocsagNetwork = new CPOCSAGNetwork(localAddress, localPort, gatewayAddress, gatewayPort, debug);
|
||||||
|
|
|
@ -28,7 +28,7 @@
|
||||||
|
|
||||||
const unsigned int BUFFER_LENGTH = 200U;
|
const unsigned int BUFFER_LENGTH = 200U;
|
||||||
|
|
||||||
CNXDNIcomNetwork::CNXDNIcomNetwork(const std::string& localAddress, unsigned int localPort, const std::string& gatewayAddress, unsigned int gatewayPort, bool debug) :
|
CNXDNIcomNetwork::CNXDNIcomNetwork(const std::string& localAddress, unsigned short localPort, const std::string& gatewayAddress, unsigned short gatewayPort, bool debug) :
|
||||||
m_socket(localAddress, localPort),
|
m_socket(localAddress, localPort),
|
||||||
m_addr(),
|
m_addr(),
|
||||||
m_addrLen(0U),
|
m_addrLen(0U),
|
||||||
|
|
|
@ -30,7 +30,7 @@
|
||||||
|
|
||||||
class CNXDNIcomNetwork : public INXDNNetwork {
|
class CNXDNIcomNetwork : public INXDNNetwork {
|
||||||
public:
|
public:
|
||||||
CNXDNIcomNetwork(const std::string& localAddress, unsigned int localPort, const std::string& gatewayAddress, unsigned int gatewayPort, bool debug);
|
CNXDNIcomNetwork(const std::string& localAddress, unsigned short localPort, const std::string& gatewayAddress, unsigned short gatewayPort, bool debug);
|
||||||
virtual ~CNXDNIcomNetwork();
|
virtual ~CNXDNIcomNetwork();
|
||||||
|
|
||||||
virtual bool open();
|
virtual bool open();
|
||||||
|
|
|
@ -33,7 +33,7 @@ const unsigned char BIT_MASK_TABLE[] = { 0x80U, 0x40U, 0x20U, 0x10U, 0x08U, 0x04
|
||||||
|
|
||||||
const unsigned int BUFFER_LENGTH = 200U;
|
const unsigned int BUFFER_LENGTH = 200U;
|
||||||
|
|
||||||
CNXDNKenwoodNetwork::CNXDNKenwoodNetwork(const std::string& localAddress, unsigned int localPort, const std::string& gwyAddress, unsigned int gwyPort, bool debug) :
|
CNXDNKenwoodNetwork::CNXDNKenwoodNetwork(const std::string& localAddress, unsigned short localPort, const std::string& gwyAddress, unsigned short gwyPort, bool debug) :
|
||||||
m_rtpSocket(localAddress, localPort + 0U),
|
m_rtpSocket(localAddress, localPort + 0U),
|
||||||
m_rtcpSocket(localAddress, localPort + 1U),
|
m_rtcpSocket(localAddress, localPort + 1U),
|
||||||
m_rtcpAddr(),
|
m_rtcpAddr(),
|
||||||
|
|
|
@ -29,7 +29,7 @@
|
||||||
|
|
||||||
class CNXDNKenwoodNetwork : public INXDNNetwork {
|
class CNXDNKenwoodNetwork : public INXDNNetwork {
|
||||||
public:
|
public:
|
||||||
CNXDNKenwoodNetwork(const std::string& localAddress, unsigned int localPort, const std::string& gwyAddress, unsigned int gwyPort, bool debug);
|
CNXDNKenwoodNetwork(const std::string& localAddress, unsigned short localPort, const std::string& gwyAddress, unsigned short gwyPort, bool debug);
|
||||||
virtual ~CNXDNKenwoodNetwork();
|
virtual ~CNXDNKenwoodNetwork();
|
||||||
|
|
||||||
virtual bool open();
|
virtual bool open();
|
||||||
|
|
|
@ -87,7 +87,7 @@ const unsigned char REC80[] = {
|
||||||
|
|
||||||
const unsigned int BUFFER_LENGTH = 100U;
|
const unsigned int BUFFER_LENGTH = 100U;
|
||||||
|
|
||||||
CP25Network::CP25Network(const std::string& gatewayAddress, unsigned int gatewayPort, unsigned int localPort, bool debug) :
|
CP25Network::CP25Network(const std::string& gatewayAddress, unsigned short gatewayPort, unsigned short localPort, bool debug) :
|
||||||
m_socket(localPort),
|
m_socket(localPort),
|
||||||
m_addr(),
|
m_addr(),
|
||||||
m_addrLen(0U),
|
m_addrLen(0U),
|
||||||
|
|
|
@ -30,7 +30,7 @@
|
||||||
|
|
||||||
class CP25Network {
|
class CP25Network {
|
||||||
public:
|
public:
|
||||||
CP25Network(const std::string& gatewayAddress, unsigned int gatewayPort, unsigned int localPort, bool debug);
|
CP25Network(const std::string& gatewayAddress, unsigned short gatewayPort, unsigned short localPort, bool debug);
|
||||||
~CP25Network();
|
~CP25Network();
|
||||||
|
|
||||||
bool open();
|
bool open();
|
||||||
|
|
|
@ -28,7 +28,7 @@
|
||||||
|
|
||||||
const unsigned int BUFFER_LENGTH = 200U;
|
const unsigned int BUFFER_LENGTH = 200U;
|
||||||
|
|
||||||
CPOCSAGNetwork::CPOCSAGNetwork(const std::string& myAddress, unsigned int myPort, const std::string& gatewayAddress, unsigned int gatewayPort, bool debug) :
|
CPOCSAGNetwork::CPOCSAGNetwork(const std::string& myAddress, unsigned short myPort, const std::string& gatewayAddress, unsigned short gatewayPort, bool debug) :
|
||||||
m_socket(myAddress, myPort),
|
m_socket(myAddress, myPort),
|
||||||
m_addr(),
|
m_addr(),
|
||||||
m_addrLen(0U),
|
m_addrLen(0U),
|
||||||
|
|
|
@ -29,7 +29,7 @@
|
||||||
|
|
||||||
class CPOCSAGNetwork {
|
class CPOCSAGNetwork {
|
||||||
public:
|
public:
|
||||||
CPOCSAGNetwork(const std::string& myAddress, unsigned int myPort, const std::string& gatewayAddress, unsigned int gatewayPort, bool debug);
|
CPOCSAGNetwork(const std::string& myAddress, unsigned short myPort, const std::string& gatewayAddress, unsigned short gatewayPort, bool debug);
|
||||||
~CPOCSAGNetwork();
|
~CPOCSAGNetwork();
|
||||||
|
|
||||||
bool open();
|
bool open();
|
||||||
|
|
|
@ -33,7 +33,7 @@
|
||||||
#define LogInfo(fmt, ...) ::fprintf(stderr, fmt "\n", ## __VA_ARGS__)
|
#define LogInfo(fmt, ...) ::fprintf(stderr, fmt "\n", ## __VA_ARGS__)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
CUDPSocket::CUDPSocket(const std::string& address, unsigned int port) :
|
CUDPSocket::CUDPSocket(const std::string& address, unsigned short port) :
|
||||||
m_address_save(address),
|
m_address_save(address),
|
||||||
m_port_save(port),
|
m_port_save(port),
|
||||||
m_counter(0U)
|
m_counter(0U)
|
||||||
|
@ -46,7 +46,7 @@ m_counter(0U)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
CUDPSocket::CUDPSocket(unsigned int port) :
|
CUDPSocket::CUDPSocket(unsigned short port) :
|
||||||
m_address_save(),
|
m_address_save(),
|
||||||
m_port_save(port),
|
m_port_save(port),
|
||||||
m_counter(0U)
|
m_counter(0U)
|
||||||
|
@ -80,7 +80,7 @@ void CUDPSocket::shutdown()
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
int CUDPSocket::lookup(const std::string& hostname, unsigned int port, sockaddr_storage& addr, unsigned int& address_length)
|
int CUDPSocket::lookup(const std::string& hostname, unsigned short port, sockaddr_storage& addr, unsigned int& address_length)
|
||||||
{
|
{
|
||||||
struct addrinfo hints;
|
struct addrinfo hints;
|
||||||
::memset(&hints, 0, sizeof(hints));
|
::memset(&hints, 0, sizeof(hints));
|
||||||
|
@ -88,7 +88,7 @@ int CUDPSocket::lookup(const std::string& hostname, unsigned int port, sockaddr_
|
||||||
return lookup(hostname, port, addr, address_length, hints);
|
return lookup(hostname, port, addr, address_length, hints);
|
||||||
}
|
}
|
||||||
|
|
||||||
int CUDPSocket::lookup(const std::string& hostname, unsigned int port, sockaddr_storage& addr, unsigned int& address_length, struct addrinfo& hints)
|
int CUDPSocket::lookup(const std::string& hostname, unsigned short port, sockaddr_storage& addr, unsigned int& address_length, struct addrinfo& hints)
|
||||||
{
|
{
|
||||||
std::string portstr = std::to_string(port);
|
std::string portstr = std::to_string(port);
|
||||||
struct addrinfo *res;
|
struct addrinfo *res;
|
||||||
|
@ -171,7 +171,7 @@ bool CUDPSocket::open(unsigned int af)
|
||||||
return open(0, af, m_address_save, m_port_save);
|
return open(0, af, m_address_save, m_port_save);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool CUDPSocket::open(const unsigned int index, const unsigned int af, const std::string& address, const unsigned int port)
|
bool CUDPSocket::open(const unsigned int index, const unsigned int af, const std::string& address, const unsigned short port)
|
||||||
{
|
{
|
||||||
sockaddr_storage addr;
|
sockaddr_storage addr;
|
||||||
unsigned int addrlen;
|
unsigned int addrlen;
|
||||||
|
@ -225,7 +225,7 @@ bool CUDPSocket::open(const unsigned int index, const unsigned int af, const std
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
LogInfo("Opening UDP port on %u", port);
|
LogInfo("Opening UDP port on %hu", port);
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
@ -294,7 +294,7 @@ int CUDPSocket::read(unsigned char* buffer, unsigned int length, sockaddr_storag
|
||||||
LogError("Error returned from recvfrom, err: %d", errno);
|
LogError("Error returned from recvfrom, err: %d", errno);
|
||||||
|
|
||||||
if (len == -1 && errno == ENOTSOCK) {
|
if (len == -1 && errno == ENOTSOCK) {
|
||||||
LogMessage("Re-opening UDP port on %u", m_port);
|
LogMessage("Re-opening UDP port on %hu", m_port[index]);
|
||||||
close();
|
close();
|
||||||
open();
|
open();
|
||||||
}
|
}
|
||||||
|
|
10
UDPSocket.h
10
UDPSocket.h
|
@ -46,13 +46,13 @@ enum IPMATCHTYPE {
|
||||||
|
|
||||||
class CUDPSocket {
|
class CUDPSocket {
|
||||||
public:
|
public:
|
||||||
CUDPSocket(const std::string& address, unsigned int port = 0U);
|
CUDPSocket(const std::string& address, unsigned short port = 0U);
|
||||||
CUDPSocket(unsigned int port = 0U);
|
CUDPSocket(unsigned short port = 0U);
|
||||||
~CUDPSocket();
|
~CUDPSocket();
|
||||||
|
|
||||||
bool open(unsigned int af = AF_UNSPEC);
|
bool open(unsigned int af = AF_UNSPEC);
|
||||||
bool open(const sockaddr_storage& address);
|
bool open(const sockaddr_storage& address);
|
||||||
bool open(const unsigned int index, const unsigned int af, const std::string& address, const unsigned int port);
|
bool open(const unsigned int index, const unsigned int af, const std::string& address, const unsigned short port);
|
||||||
|
|
||||||
int read(unsigned char* buffer, unsigned int length, sockaddr_storage& address, unsigned int &address_length);
|
int read(unsigned char* buffer, unsigned int length, sockaddr_storage& address, unsigned int &address_length);
|
||||||
bool write(const unsigned char* buffer, unsigned int length, const sockaddr_storage& address, unsigned int address_length);
|
bool write(const unsigned char* buffer, unsigned int length, const sockaddr_storage& address, unsigned int address_length);
|
||||||
|
@ -63,8 +63,8 @@ public:
|
||||||
static void startup();
|
static void startup();
|
||||||
static void shutdown();
|
static void shutdown();
|
||||||
|
|
||||||
static int lookup(const std::string& hostName, unsigned int port, sockaddr_storage& address, unsigned int& address_length);
|
static int lookup(const std::string& hostName, unsigned short port, sockaddr_storage& address, unsigned int& address_length);
|
||||||
static int lookup(const std::string& hostName, unsigned int port, sockaddr_storage& address, unsigned int& address_length, struct addrinfo& hints);
|
static int lookup(const std::string& hostName, unsigned short port, sockaddr_storage& address, unsigned int& address_length, struct addrinfo& hints);
|
||||||
|
|
||||||
static bool match(const sockaddr_storage& addr1, const sockaddr_storage& addr2, IPMATCHTYPE type = IMT_ADDRESS_AND_PORT);
|
static bool match(const sockaddr_storage& addr1, const sockaddr_storage& addr2, IPMATCHTYPE type = IMT_ADDRESS_AND_PORT);
|
||||||
|
|
||||||
|
|
|
@ -28,7 +28,7 @@
|
||||||
|
|
||||||
const unsigned int BUFFER_LENGTH = 200U;
|
const unsigned int BUFFER_LENGTH = 200U;
|
||||||
|
|
||||||
CYSFNetwork::CYSFNetwork(const std::string& myAddress, unsigned int myPort, const std::string& gatewayAddress, unsigned int gatewayPort, const std::string& callsign, bool debug) :
|
CYSFNetwork::CYSFNetwork(const std::string& myAddress, unsigned short myPort, const std::string& gatewayAddress, unsigned short gatewayPort, const std::string& callsign, bool debug) :
|
||||||
m_socket(myAddress, myPort),
|
m_socket(myAddress, myPort),
|
||||||
m_addr(),
|
m_addr(),
|
||||||
m_addrLen(0U),
|
m_addrLen(0U),
|
||||||
|
|
|
@ -29,7 +29,7 @@
|
||||||
|
|
||||||
class CYSFNetwork {
|
class CYSFNetwork {
|
||||||
public:
|
public:
|
||||||
CYSFNetwork(const std::string& myAddress, unsigned int myPort, const std::string& gatewayAddress, unsigned int gatewayPort, const std::string& callsign, bool debug);
|
CYSFNetwork(const std::string& myAddress, unsigned short myPort, const std::string& gatewayAddress, unsigned short gatewayPort, const std::string& callsign, bool debug);
|
||||||
~CYSFNetwork();
|
~CYSFNetwork();
|
||||||
|
|
||||||
bool open();
|
bool open();
|
||||||
|
|
Loading…
Reference in New Issue