Rename config file values (acc. to #ee93e4ce)

This commit is contained in:
phl0 2017-11-09 23:17:25 +01:00
parent 85e90610d7
commit ecb4ea1a38
No known key found for this signature in database
GPG key ID: 48EA1E640798CA9A
6 changed files with 25 additions and 25 deletions

View file

@ -157,8 +157,8 @@ m_dmrNetworkModeHang(3U),
m_fusionNetworkEnabled(false), m_fusionNetworkEnabled(false),
m_fusionNetworkMyAddress(), m_fusionNetworkMyAddress(),
m_fusionNetworkMyPort(0U), m_fusionNetworkMyPort(0U),
m_fusionNetworkGwyAddress(), m_fusionNetworkGatewayAddress(),
m_fusionNetworkGwyPort(0U), m_fusionNetworkGatewayPort(0U),
m_fusionNetworkModeHang(3U), m_fusionNetworkModeHang(3U),
m_fusionNetworkDebug(false), m_fusionNetworkDebug(false),
m_p25NetworkEnabled(false), m_p25NetworkEnabled(false),
@ -548,10 +548,10 @@ bool CConf::read()
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 int)::atoi(value);
else if (::strcmp(key, "GwyAddress") == 0) else if (::strcmp(key, "GatewayAddress") == 0)
m_fusionNetworkGwyAddress = value; m_fusionNetworkGatewayAddress = value;
else if (::strcmp(key, "GwyPort") == 0) else if (::strcmp(key, "GatewayPort") == 0)
m_fusionNetworkGwyPort = (unsigned int)::atoi(value); m_fusionNetworkGatewayPort = (unsigned int)::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)
@ -1157,14 +1157,14 @@ unsigned int CConf::getFusionNetworkMyPort() const
return m_fusionNetworkMyPort; return m_fusionNetworkMyPort;
} }
std::string CConf::getFusionNetworkGwyAddress() const std::string CConf::getFusionNetworkGatewayAddress() const
{ {
return m_fusionNetworkGwyAddress; return m_fusionNetworkGatewayAddress;
} }
unsigned int CConf::getFusionNetworkGwyPort() const unsigned int CConf::getFusionNetworkGatewayPort() const
{ {
return m_fusionNetworkGwyPort; return m_fusionNetworkGatewayPort;
} }
unsigned int CConf::getFusionNetworkModeHang() const unsigned int CConf::getFusionNetworkModeHang() const

8
Conf.h
View file

@ -160,8 +160,8 @@ public:
bool getFusionNetworkEnabled() const; bool getFusionNetworkEnabled() const;
std::string getFusionNetworkMyAddress() const; std::string getFusionNetworkMyAddress() const;
unsigned int getFusionNetworkMyPort() const; unsigned int getFusionNetworkMyPort() const;
std::string getFusionNetworkGwyAddress() const; std::string getFusionNetworkGatewayAddress() const;
unsigned int getFusionNetworkGwyPort() const; unsigned int getFusionNetworkGatewayPort() const;
unsigned int getFusionNetworkModeHang() const; unsigned int getFusionNetworkModeHang() const;
bool getFusionNetworkDebug() const; bool getFusionNetworkDebug() const;
@ -328,8 +328,8 @@ private:
bool m_fusionNetworkEnabled; bool m_fusionNetworkEnabled;
std::string m_fusionNetworkMyAddress; std::string m_fusionNetworkMyAddress;
unsigned int m_fusionNetworkMyPort; unsigned int m_fusionNetworkMyPort;
std::string m_fusionNetworkGwyAddress; std::string m_fusionNetworkGatewayAddress;
unsigned int m_fusionNetworkGwyPort; unsigned int m_fusionNetworkGatewayPort;
unsigned int m_fusionNetworkModeHang; unsigned int m_fusionNetworkModeHang;
bool m_fusionNetworkDebug; bool m_fusionNetworkDebug;

View file

@ -129,8 +129,8 @@ Debug=0
Enable=1 Enable=1
LocalAddress=127.0.0.1 LocalAddress=127.0.0.1
LocalPort=3200 LocalPort=3200
GwyAddress=127.0.0.1 GatewayAddress=127.0.0.1
GwyPort=4200 GatewayPort=4200
# ModeHang=3 # ModeHang=3
Debug=0 Debug=0

View file

@ -995,19 +995,19 @@ bool CMMDVMHost::createYSFNetwork()
{ {
std::string myAddress = m_conf.getFusionNetworkMyAddress(); std::string myAddress = m_conf.getFusionNetworkMyAddress();
unsigned int myPort = m_conf.getFusionNetworkMyPort(); unsigned int myPort = m_conf.getFusionNetworkMyPort();
std::string gwyAddress = m_conf.getFusionNetworkGwyAddress(); std::string gatewayAddress = m_conf.getFusionNetworkGatewayAddress();
unsigned int gwyPort = m_conf.getFusionNetworkGwyPort(); unsigned int 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: %u", myPort);
LogInfo(" Gateway Address: %s", gwyAddress.c_str()); LogInfo(" Gateway Address: %s", gatewayAddress.c_str());
LogInfo(" Gateway Port: %u", gwyPort); LogInfo(" Gateway Port: %u", gatewayPort);
LogInfo(" Mode Hang: %us", m_ysfNetModeHang); LogInfo(" Mode Hang: %us", m_ysfNetModeHang);
m_ysfNetwork = new CYSFNetwork(myAddress, myPort, gwyAddress, gwyPort, m_callsign, debug); m_ysfNetwork = new CYSFNetwork(myAddress, myPort, gatewayAddress, gatewayPort, m_callsign, debug);
bool ret = m_ysfNetwork->open(); bool ret = m_ysfNetwork->open();
if (!ret) { if (!ret) {

View file

@ -28,10 +28,10 @@
const unsigned int BUFFER_LENGTH = 200U; const unsigned int BUFFER_LENGTH = 200U;
CYSFNetwork::CYSFNetwork(const std::string& myAddress, unsigned int myPort, const std::string& gwyAddress, unsigned int gwyPort, const std::string& callsign, bool debug) : CYSFNetwork::CYSFNetwork(const std::string& myAddress, unsigned int myPort, const std::string& gatewayAddress, unsigned int gatewayPort, const std::string& callsign, bool debug) :
m_socket(myAddress, myPort), m_socket(myAddress, myPort),
m_address(), m_address(),
m_port(gwyPort), m_port(gatewayPort),
m_callsign(), m_callsign(),
m_debug(debug), m_debug(debug),
m_enabled(false), m_enabled(false),
@ -42,7 +42,7 @@ m_tag(NULL)
m_callsign = callsign; m_callsign = callsign;
m_callsign.resize(YSF_CALLSIGN_LENGTH, ' '); m_callsign.resize(YSF_CALLSIGN_LENGTH, ' ');
m_address = CUDPSocket::lookup(gwyAddress); m_address = CUDPSocket::lookup(gatewayAddress);
m_tag = new unsigned char[YSF_CALLSIGN_LENGTH]; m_tag = new unsigned char[YSF_CALLSIGN_LENGTH];
::memset(m_tag, ' ', YSF_CALLSIGN_LENGTH); ::memset(m_tag, ' ', YSF_CALLSIGN_LENGTH);

View file

@ -29,7 +29,7 @@
class CYSFNetwork { class CYSFNetwork {
public: public:
CYSFNetwork(const std::string& myAddress, unsigned int myPort, const std::string& gwyAddress, unsigned int gwyPort, const std::string& callsign, bool debug); CYSFNetwork(const std::string& myAddress, unsigned int myPort, const std::string& gatewayAddress, unsigned int gatewayPort, const std::string& callsign, bool debug);
~CYSFNetwork(); ~CYSFNetwork();
bool open(); bool open();