diff --git a/YSFGateway/Makefile b/YSFGateway/Makefile index 5646b0c..8e627bd 100644 --- a/YSFGateway/Makefile +++ b/YSFGateway/Makefile @@ -4,8 +4,8 @@ CFLAGS = -g -O3 -Wall -std=c++0x -pthread LIBS = -lm -lpthread LDFLAGS = -g -OBJECTS = APRSWriterThread.o APRSWriter.o Conf.o CRC.o DTMF.o Golay24128.o GPS.o Log.o Network.o Reflectors.o StopWatch.o Sync.o TCPSocket.o Thread.o Timer.o \ - UDPSocket.o Utils.o WiresX.o YSFConvolution.o YSFFICH.o YSFGateway.o YSFPayload.o +OBJECTS = APRSWriterThread.o APRSWriter.o Conf.o CRC.o DTMF.o Golay24128.o GPS.o Log.o StopWatch.o Sync.o TCPSocket.o Thread.o Timer.o \ + UDPSocket.o Utils.o WiresX.o YSFConvolution.o YSFFICH.o YSFGateway.o YSFNetwork.o YSFPayload.o YSFReflectors.o all: YSFGateway diff --git a/YSFGateway/Makefile.Solaris b/YSFGateway/Makefile.Solaris index 83461e4..2b533ab 100644 --- a/YSFGateway/Makefile.Solaris +++ b/YSFGateway/Makefile.Solaris @@ -4,8 +4,8 @@ CFLAGS = -g -O3 -Wall -std=c++0x -pthread LIBS = -lm -lpthread -lsocket LDFLAGS = -g -OBJECTS = APRSWriterThread.o APRSWriter.o Conf.o CRC.o DTMF.o Golay24128.o GPS.o Log.o Network.o Reflectors.o StopWatch.o Sync.o TCPSocket.o Thread.o Timer.o \ - UDPSocket.o Utils.o WiresX.o YSFConvolution.o YSFFICH.o YSFGateway.o YSFPayload.o +OBJECTS = APRSWriterThread.o APRSWriter.o Conf.o CRC.o DTMF.o Golay24128.o GPS.o Log.o StopWatch.o Sync.o TCPSocket.o Thread.o Timer.o \ + UDPSocket.o Utils.o WiresX.o YSFConvolution.o YSFFICH.o YSFGateway.o YSFNetwork.o YSFPayload.o YSFReflectors.o all: YSFGateway diff --git a/YSFGateway/WiresX.cpp b/YSFGateway/WiresX.cpp index ec362bb..72d9c4f 100644 --- a/YSFGateway/WiresX.cpp +++ b/YSFGateway/WiresX.cpp @@ -1,5 +1,5 @@ /* -* Copyright (C) 2016,2017 by Jonathan Naylor G4KLX +* Copyright (C) 2016,2017,2018 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 @@ -42,7 +42,7 @@ const unsigned char DEFAULT_FICH[] = {0x20U, 0x00U, 0x01U, 0x00U}; const unsigned char NET_HEADER[] = "YSFD ALL "; -CWiresX::CWiresX(const std::string& callsign, const std::string& suffix, CNetwork* network, const std::string& hostsFile, unsigned int reloadTime) : +CWiresX::CWiresX(const std::string& callsign, const std::string& suffix, CYSFNetwork* network, const std::string& hostsFile, unsigned int reloadTime) : m_callsign(callsign), m_node(), m_network(network), diff --git a/YSFGateway/WiresX.h b/YSFGateway/WiresX.h index ba82bd7..847e858 100644 --- a/YSFGateway/WiresX.h +++ b/YSFGateway/WiresX.h @@ -1,5 +1,5 @@ /* -* Copyright (C) 2016,2017 by Jonathan Naylor G4KLX +* Copyright (C) 2016,2017,2018 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 @@ -19,8 +19,8 @@ #if !defined(WIRESX_H) #define WIRESX_H -#include "Reflectors.h" -#include "Network.h" +#include "YSFReflectors.h" +#include "YSFNetwork.h" #include "Timer.h" #include @@ -42,7 +42,7 @@ enum WXSI_STATUS { class CWiresX { public: - CWiresX(const std::string& callsign, const std::string& suffix, CNetwork* network, const std::string& hostsFile, unsigned int reloadTime); + CWiresX(const std::string& callsign, const std::string& suffix, CYSFNetwork* network, const std::string& hostsFile, unsigned int reloadTime); ~CWiresX(); void setInfo(const std::string& name, unsigned int txFrequency, unsigned int rxFrequency); @@ -64,8 +64,8 @@ public: private: std::string m_callsign; std::string m_node; - CNetwork* m_network; - CReflectors m_reflectors; + CYSFNetwork* m_network; + CYSFReflectors m_reflectors; CYSFReflector* m_reflector; std::string m_id; std::string m_name; diff --git a/YSFGateway/YSFGateway.cpp b/YSFGateway/YSFGateway.cpp index 8f39137..5228f4e 100644 --- a/YSFGateway/YSFGateway.cpp +++ b/YSFGateway/YSFGateway.cpp @@ -1,5 +1,5 @@ /* -* Copyright (C) 2016,2017 by Jonathan Naylor G4KLX +* Copyright (C) 2016,2017,2018 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 @@ -17,7 +17,7 @@ */ #include "YSFGateway.h" -#include "Reflectors.h" +#include "YSFReflectors.h" #include "UDPSocket.h" #include "StopWatch.h" #include "Version.h" @@ -81,7 +81,7 @@ m_conf(configFile), m_gps(NULL), m_wiresX(NULL), m_dtmf(NULL), -m_netNetwork(NULL), +m_ysfNetwork(NULL), m_linked(false), m_exclude(false) { @@ -174,7 +174,7 @@ int CYSFGateway::run() std::string myAddress = m_conf.getMyAddress(); unsigned int myPort = m_conf.getMyPort(); - CNetwork rptNetwork(myAddress, myPort, m_callsign, debug); + CYSFNetwork rptNetwork(myAddress, myPort, m_callsign, debug); rptNetwork.setDestination(rptAddress, rptPort); ret = rptNetwork.open(); @@ -186,10 +186,10 @@ int CYSFGateway::run() unsigned int netPort = m_conf.getNetworkPort(); - m_netNetwork = new CNetwork(netPort, m_callsign, debug); - ret = m_netNetwork->open(); + m_ysfNetwork = new CYSFNetwork(netPort, m_callsign, debug); + ret = m_ysfNetwork->open(); if (!ret) { - ::LogError("Cannot open the reflector network port"); + ::LogError("Cannot open the YSF reflector network port"); ::LogFinalise(); return 1; } @@ -234,10 +234,10 @@ int CYSFGateway::run() if (reflector != NULL) { LogMessage("Automatic connection to %5.5s - \"%s\"", reflector->m_id.c_str(), reflector->m_name.c_str()); - m_netNetwork->setDestination(reflector->m_address, reflector->m_port); - m_netNetwork->writePoll(); - m_netNetwork->writePoll(); - m_netNetwork->writePoll(); + m_ysfNetwork->setDestination(reflector->m_address, reflector->m_port); + m_ysfNetwork->writePoll(); + m_ysfNetwork->writePoll(); + m_ysfNetwork->writePoll(); if (!revert) inactivityTimer.start(); @@ -276,17 +276,17 @@ int CYSFGateway::run() WX_STATUS status = m_wiresX->process(buffer + 35U, buffer + 14U, fi, dt, fn, ft); switch (status) { case WXS_CONNECT: { - m_netNetwork->writeUnlink(); - m_netNetwork->writeUnlink(); - m_netNetwork->writeUnlink(); + m_ysfNetwork->writeUnlink(); + m_ysfNetwork->writeUnlink(); + m_ysfNetwork->writeUnlink(); CYSFReflector* reflector = m_wiresX->getReflector(); LogMessage("Connect to %5.5s - \"%s\" has been requested by %10.10s", reflector->m_id.c_str(), reflector->m_name.c_str(), buffer + 14U); - m_netNetwork->setDestination(reflector->m_address, reflector->m_port); - m_netNetwork->writePoll(); - m_netNetwork->writePoll(); - m_netNetwork->writePoll(); + m_ysfNetwork->setDestination(reflector->m_address, reflector->m_port); + m_ysfNetwork->writePoll(); + m_ysfNetwork->writePoll(); + m_ysfNetwork->writePoll(); inactivityTimer.start(); lostTimer.start(); @@ -298,10 +298,10 @@ int CYSFGateway::run() case WXS_DISCONNECT: LogMessage("Disconnect has been requested by %10.10s", buffer + 14U); - m_netNetwork->writeUnlink(); - m_netNetwork->writeUnlink(); - m_netNetwork->writeUnlink(); - m_netNetwork->clearDestination(); + m_ysfNetwork->writeUnlink(); + m_ysfNetwork->writeUnlink(); + m_ysfNetwork->writeUnlink(); + m_ysfNetwork->clearDestination(); inactivityTimer.stop(); lostTimer.stop(); @@ -330,17 +330,17 @@ int CYSFGateway::run() m_wiresX->processConnect(reflector); if (m_linked) { - m_netNetwork->writeUnlink(); - m_netNetwork->writeUnlink(); - m_netNetwork->writeUnlink(); + m_ysfNetwork->writeUnlink(); + m_ysfNetwork->writeUnlink(); + m_ysfNetwork->writeUnlink(); } LogMessage("Connect via DTMF to %5.5s - \"%s\" has been requested by %10.10s", reflector->m_id.c_str(), reflector->m_name.c_str(), buffer + 14U); - m_netNetwork->setDestination(reflector->m_address, reflector->m_port); - m_netNetwork->writePoll(); - m_netNetwork->writePoll(); - m_netNetwork->writePoll(); + m_ysfNetwork->setDestination(reflector->m_address, reflector->m_port); + m_ysfNetwork->writePoll(); + m_ysfNetwork->writePoll(); + m_ysfNetwork->writePoll(); inactivityTimer.start(); lostTimer.start(); @@ -356,10 +356,10 @@ int CYSFGateway::run() LogMessage("Disconnect via DTMF has been requested by %10.10s", buffer + 14U); - m_netNetwork->writeUnlink(); - m_netNetwork->writeUnlink(); - m_netNetwork->writeUnlink(); - m_netNetwork->clearDestination(); + m_ysfNetwork->writeUnlink(); + m_ysfNetwork->writeUnlink(); + m_ysfNetwork->writeUnlink(); + m_ysfNetwork->clearDestination(); inactivityTimer.stop(); lostTimer.stop(); @@ -378,7 +378,7 @@ int CYSFGateway::run() } if (networkEnabled && m_linked && !m_exclude) { - m_netNetwork->write(buffer); + m_ysfNetwork->write(buffer); if (::memcmp(buffer + 0U, "YSFD", 4U) == 0) inactivityTimer.start(); } @@ -392,7 +392,7 @@ int CYSFGateway::run() } } - while (m_netNetwork->read(buffer) > 0U) { + while (m_ysfNetwork->read(buffer) > 0U) { if (networkEnabled && m_linked) { // Only pass through YSF data packets if (::memcmp(buffer + 0U, "YSFD", 4U) == 0) @@ -406,7 +406,7 @@ int CYSFGateway::run() stopWatch.start(); rptNetwork.clock(ms); - m_netNetwork->clock(ms); + m_ysfNetwork->clock(ms); if (m_gps != NULL) m_gps->clock(ms); if (m_wiresX != NULL) @@ -424,14 +424,14 @@ int CYSFGateway::run() m_wiresX->processConnect(reflector); - m_netNetwork->writeUnlink(); - m_netNetwork->writeUnlink(); - m_netNetwork->writeUnlink(); + m_ysfNetwork->writeUnlink(); + m_ysfNetwork->writeUnlink(); + m_ysfNetwork->writeUnlink(); - m_netNetwork->setDestination(reflector->m_address, reflector->m_port); - m_netNetwork->writePoll(); - m_netNetwork->writePoll(); - m_netNetwork->writePoll(); + m_ysfNetwork->setDestination(reflector->m_address, reflector->m_port); + m_ysfNetwork->writePoll(); + m_ysfNetwork->writePoll(); + m_ysfNetwork->writePoll(); lostTimer.start(); pollTimer.start(); @@ -441,10 +441,10 @@ int CYSFGateway::run() if (m_wiresX != NULL) m_wiresX->processDisconnect(); - m_netNetwork->writeUnlink(); - m_netNetwork->writeUnlink(); - m_netNetwork->writeUnlink(); - m_netNetwork->clearDestination(); + m_ysfNetwork->writeUnlink(); + m_ysfNetwork->writeUnlink(); + m_ysfNetwork->writeUnlink(); + m_ysfNetwork->clearDestination(); lostTimer.stop(); pollTimer.stop(); @@ -463,7 +463,7 @@ int CYSFGateway::run() if (m_wiresX != NULL) m_wiresX->processDisconnect(); - m_netNetwork->clearDestination(); + m_ysfNetwork->clearDestination(); inactivityTimer.stop(); lostTimer.stop(); @@ -474,7 +474,7 @@ int CYSFGateway::run() pollTimer.clock(ms); if (pollTimer.isRunning() && pollTimer.hasExpired()) { - m_netNetwork->writePoll(); + m_ysfNetwork->writePoll(); pollTimer.start(); } @@ -483,14 +483,14 @@ int CYSFGateway::run() } rptNetwork.close(); - m_netNetwork->close(); + m_ysfNetwork->close(); if (m_gps != NULL) { m_gps->close(); delete m_gps; } - delete m_netNetwork; + delete m_ysfNetwork; delete m_wiresX; delete m_dtmf; diff --git a/YSFGateway/YSFGateway.h b/YSFGateway/YSFGateway.h index ca7ee94..f7c320d 100644 --- a/YSFGateway/YSFGateway.h +++ b/YSFGateway/YSFGateway.h @@ -1,5 +1,5 @@ /* -* Copyright (C) 2016,2017 by Jonathan Naylor G4KLX +* Copyright (C) 2016,2017,2018 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 @@ -19,7 +19,7 @@ #if !defined(YSFGateway_H) #define YSFGateway_H -#include "Network.h" +#include "YSFNetwork.h" #include "WiresX.h" #include "Conf.h" #include "DTMF.h" @@ -36,15 +36,15 @@ public: int run(); private: - std::string m_callsign; - std::string m_suffix; - CConf m_conf; - CGPS* m_gps; - CWiresX* m_wiresX; - CDTMF* m_dtmf; - CNetwork* m_netNetwork; - bool m_linked; - bool m_exclude; + std::string m_callsign; + std::string m_suffix; + CConf m_conf; + CGPS* m_gps; + CWiresX* m_wiresX; + CDTMF* m_dtmf; + CYSFNetwork* m_ysfNetwork; + bool m_linked; + bool m_exclude; void createGPS(); }; diff --git a/YSFGateway/YSFGateway.vcxproj b/YSFGateway/YSFGateway.vcxproj index 386e32f..521ef68 100644 --- a/YSFGateway/YSFGateway.vcxproj +++ b/YSFGateway/YSFGateway.vcxproj @@ -154,8 +154,6 @@ - - @@ -170,7 +168,9 @@ + + @@ -181,8 +181,6 @@ - - @@ -194,7 +192,9 @@ + + diff --git a/YSFGateway/YSFGateway.vcxproj.filters b/YSFGateway/YSFGateway.vcxproj.filters index 20053c3..9065e58 100644 --- a/YSFGateway/YSFGateway.vcxproj.filters +++ b/YSFGateway/YSFGateway.vcxproj.filters @@ -11,9 +11,6 @@ - - Header Files - Header Files @@ -74,9 +71,6 @@ Header Files - - Header Files - Header Files @@ -86,11 +80,14 @@ Header Files + + Header Files + + + Header Files + - - Source Files - Source Files @@ -142,9 +139,6 @@ Source Files - - Source Files - Source Files @@ -154,5 +148,11 @@ Source Files + + Source Files + + + Source Files + \ No newline at end of file diff --git a/YSFGateway/Network.cpp b/YSFGateway/YSFNetwork.cpp similarity index 81% rename from YSFGateway/Network.cpp rename to YSFGateway/YSFNetwork.cpp index f643a43..93e84f0 100644 --- a/YSFGateway/Network.cpp +++ b/YSFGateway/YSFNetwork.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2009-2014,2016,2017 by Jonathan Naylor G4KLX + * Copyright (C) 2009-2014,2016,2017,2018 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 @@ -17,7 +17,7 @@ */ #include "YSFDefines.h" -#include "Network.h" +#include "YSFNetwork.h" #include "Utils.h" #include "Log.h" @@ -27,7 +27,7 @@ const unsigned int BUFFER_LENGTH = 200U; -CNetwork::CNetwork(const std::string& address, unsigned int port, const std::string& callsign, bool debug) : +CYSFNetwork::CYSFNetwork(const std::string& address, unsigned int port, const std::string& callsign, bool debug) : m_socket(address, port), m_debug(debug), m_address(), @@ -51,7 +51,7 @@ m_buffer(1000U, "YSF Network Buffer") } } -CNetwork::CNetwork(unsigned int port, const std::string& callsign, bool debug) : +CYSFNetwork::CYSFNetwork(unsigned int port, const std::string& callsign, bool debug) : m_socket(port), m_debug(debug), m_address(), @@ -75,31 +75,31 @@ m_buffer(1000U, "YSF Network Buffer") } } -CNetwork::~CNetwork() +CYSFNetwork::~CYSFNetwork() { delete[] m_poll; } -bool CNetwork::open() +bool CYSFNetwork::open() { LogMessage("Opening YSF network connection"); return m_socket.open(); } -void CNetwork::setDestination(const in_addr& address, unsigned int port) +void CYSFNetwork::setDestination(const in_addr& address, unsigned int port) { m_address = address; m_port = port; } -void CNetwork::clearDestination() +void CYSFNetwork::clearDestination() { m_address.s_addr = INADDR_NONE; m_port = 0U; } -bool CNetwork::write(const unsigned char* data) +bool CYSFNetwork::write(const unsigned char* data) { assert(data != NULL); @@ -112,7 +112,7 @@ bool CNetwork::write(const unsigned char* data) return m_socket.write(data, 155U, m_address, m_port); } -bool CNetwork::writePoll() +bool CYSFNetwork::writePoll() { if (m_port == 0U) return true; @@ -120,7 +120,7 @@ bool CNetwork::writePoll() return m_socket.write(m_poll, 14U, m_address, m_port); } -bool CNetwork::writeUnlink() +bool CYSFNetwork::writeUnlink() { if (m_port == 0U) return true; @@ -128,7 +128,7 @@ bool CNetwork::writeUnlink() return m_socket.write(m_unlink, 14U, m_address, m_port); } -void CNetwork::clock(unsigned int ms) +void CYSFNetwork::clock(unsigned int ms) { if (m_port == 0U) return; @@ -153,7 +153,7 @@ void CNetwork::clock(unsigned int ms) m_buffer.addData(buffer, length); } -unsigned int CNetwork::read(unsigned char* data) +unsigned int CYSFNetwork::read(unsigned char* data) { assert(data != NULL); @@ -168,7 +168,7 @@ unsigned int CNetwork::read(unsigned char* data) return len; } -void CNetwork::close() +void CYSFNetwork::close() { m_socket.close(); diff --git a/YSFGateway/Network.h b/YSFGateway/YSFNetwork.h similarity index 81% rename from YSFGateway/Network.h rename to YSFGateway/YSFNetwork.h index fc023c5..bd8e746 100644 --- a/YSFGateway/Network.h +++ b/YSFGateway/YSFNetwork.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2009-2014,2016,2017 by Jonathan Naylor G4KLX + * Copyright (C) 2009-2014,2016,2017,2018 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 @@ -16,8 +16,8 @@ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -#ifndef Network_H -#define Network_H +#ifndef YSFNetwork_H +#define YSFNetwork_H #include "YSFDefines.h" #include "UDPSocket.h" @@ -26,11 +26,11 @@ #include #include -class CNetwork { +class CYSFNetwork { public: - CNetwork(const std::string& address, unsigned int port, const std::string& callsign, bool debug); - CNetwork(unsigned int port, const std::string& callsign, bool debug); - ~CNetwork(); + CYSFNetwork(const std::string& address, unsigned int port, const std::string& callsign, bool debug); + CYSFNetwork(unsigned int port, const std::string& callsign, bool debug); + ~CYSFNetwork(); bool open(); diff --git a/YSFGateway/Reflectors.cpp b/YSFGateway/YSFReflectors.cpp similarity index 88% rename from YSFGateway/Reflectors.cpp rename to YSFGateway/YSFReflectors.cpp index fe07c34..e72661a 100644 --- a/YSFGateway/Reflectors.cpp +++ b/YSFGateway/YSFReflectors.cpp @@ -1,5 +1,5 @@ /* -* Copyright (C) 2016,2017 by Jonathan Naylor G4KLX +* Copyright (C) 2016,2017,2018 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 @@ -16,7 +16,7 @@ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -#include "Reflectors.h" +#include "YSFReflectors.h" #include "Log.h" #include @@ -26,7 +26,7 @@ #include #include -CReflectors::CReflectors(const std::string& hostsFile, unsigned int reloadTime) : +CYSFReflectors::CYSFReflectors(const std::string& hostsFile, unsigned int reloadTime) : m_hostsFile(hostsFile), m_parrotAddress(), m_parrotPort(0U), @@ -39,7 +39,7 @@ m_timer(1000U, reloadTime * 60U) m_timer.start(); } -CReflectors::~CReflectors() +CYSFReflectors::~CYSFReflectors() { for (std::vector::iterator it = m_newReflectors.begin(); it != m_newReflectors.end(); ++it) delete *it; @@ -68,19 +68,19 @@ static bool refComparison(const CYSFReflector* r1, const CYSFReflector* r2) return false; } -void CReflectors::setParrot(const std::string& address, unsigned int port) +void CYSFReflectors::setParrot(const std::string& address, unsigned int port) { m_parrotAddress = address; m_parrotPort = port; } -void CReflectors::setYSF2DMR(const std::string& address, unsigned int port) +void CYSFReflectors::setYSF2DMR(const std::string& address, unsigned int port) { m_YSF2DMRAddress = address; m_YSF2DMRPort = port; } -bool CReflectors::load() +bool CYSFReflectors::load() { for (std::vector::iterator it = m_newReflectors.begin(); it != m_newReflectors.end(); ++it) delete *it; @@ -163,24 +163,24 @@ bool CReflectors::load() return true; } -CYSFReflector* CReflectors::find(const std::string& id) +CYSFReflector* CYSFReflectors::find(const std::string& id) { for (std::vector::iterator it = m_currReflectors.begin(); it != m_currReflectors.end(); ++it) { if (id == (*it)->m_id) return *it; } - LogMessage("Trying to find non existent reflector with an id of %s", id.c_str()); + LogMessage("Trying to find non existent YSF reflector with an id of %s", id.c_str()); return NULL; } -std::vector& CReflectors::current() +std::vector& CYSFReflectors::current() { return m_currReflectors; } -std::vector& CReflectors::search(const std::string& name) +std::vector& CYSFReflectors::search(const std::string& name) { m_search.clear(); @@ -204,7 +204,7 @@ std::vector& CReflectors::search(const std::string& name) return m_search; } -bool CReflectors::reload() +bool CYSFReflectors::reload() { if (m_newReflectors.empty()) return false; @@ -221,7 +221,7 @@ bool CReflectors::reload() return true; } -void CReflectors::clock(unsigned int ms) +void CYSFReflectors::clock(unsigned int ms) { m_timer.clock(ms); diff --git a/YSFGateway/Reflectors.h b/YSFGateway/YSFReflectors.h similarity index 88% rename from YSFGateway/Reflectors.h rename to YSFGateway/YSFReflectors.h index 9ba8cb4..bd5b7a7 100644 --- a/YSFGateway/Reflectors.h +++ b/YSFGateway/YSFReflectors.h @@ -1,5 +1,5 @@ /* -* Copyright (C) 2016,2017 by Jonathan Naylor G4KLX +* Copyright (C) 2016,2017,2018 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 @@ -16,8 +16,8 @@ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -#if !defined(Reflectors_H) -#define Reflectors_H +#if !defined(YSFReflectors_H) +#define YSFReflectors_H #include "UDPSocket.h" #include "Timer.h" @@ -45,10 +45,10 @@ public: unsigned int m_port; }; -class CReflectors { +class CYSFReflectors { public: - CReflectors(const std::string& hostsFile, unsigned int reloadTime); - ~CReflectors(); + CYSFReflectors(const std::string& hostsFile, unsigned int reloadTime); + ~CYSFReflectors(); void setParrot(const std::string& address, unsigned int port); void setYSF2DMR(const std::string& address, unsigned int port);