Rename APRSHandlerThread to APRSISHandlerThread #29

pull/32/head
Geoffrey Merck 3 years ago
parent 5d383b8257
commit c408201eb6

@ -21,7 +21,7 @@
#include <iostream>
#include <boost/algorithm/string.hpp>
#include "APRSHandlerThread.h"
#include "APRSISHandlerThread.h"
#include "DStarDefines.h"
#include "Utils.h"
#include "Defs.h"
@ -36,7 +36,7 @@ const unsigned int APRS_TIMEOUT = 10U;
const unsigned int APRS_READ_TIMEOUT = 1U;
const unsigned int APRS_KEEP_ALIVE_TIMEOUT = 60U;
CAPRSHandlerThread::CAPRSHandlerThread(const std::string& callsign, const std::string& password, const std::string& address, const std::string& hostname, unsigned int port) :
CAPRSISHandlerThread::CAPRSISHandlerThread(const std::string& callsign, const std::string& password, const std::string& address, const std::string& hostname, unsigned int port) :
CThread("APRS"),
m_username(callsign),
m_password(password),
@ -64,7 +64,7 @@ m_clientName(FULL_PRODUCT_NAME)
m_ssid = m_ssid.substr(LONG_CALLSIGN_LENGTH - 1U, 1);
}
CAPRSHandlerThread::CAPRSHandlerThread(const std::string& callsign, const std::string& password, const std::string& address, const std::string& hostname, unsigned int port, const std::string& filter) :
CAPRSISHandlerThread::CAPRSISHandlerThread(const std::string& callsign, const std::string& password, const std::string& address, const std::string& hostname, unsigned int port, const std::string& filter) :
CThread("APRS"),
m_username(callsign),
m_password(password),
@ -92,7 +92,7 @@ m_clientName(FULL_PRODUCT_NAME)
m_ssid = m_ssid.substr(LONG_CALLSIGN_LENGTH - 1U, 1);
}
CAPRSHandlerThread::~CAPRSHandlerThread()
CAPRSISHandlerThread::~CAPRSISHandlerThread()
{
std::vector<IReadAPRSFrameCallback *> callBacksCopy;
callBacksCopy.assign(m_APRSReadCallbacks.begin(), m_APRSReadCallbacks.end());
@ -105,7 +105,7 @@ CAPRSHandlerThread::~CAPRSHandlerThread()
m_password.clear();
}
bool CAPRSHandlerThread::start()
bool CAPRSISHandlerThread::start()
{
Create();
Run();
@ -113,7 +113,7 @@ bool CAPRSHandlerThread::start()
return true;
}
void* CAPRSHandlerThread::Entry()
void* CAPRSISHandlerThread::Entry()
{
CLog::logInfo("Starting the APRS Writer thread");
@ -214,13 +214,13 @@ void* CAPRSHandlerThread::Entry()
return NULL;
}
void CAPRSHandlerThread::addReadAPRSCallback(IReadAPRSFrameCallback * cb)
void CAPRSISHandlerThread::addReadAPRSCallback(IReadAPRSFrameCallback * cb)
{
assert(cb != nullptr);
m_APRSReadCallbacks.push_back(cb);
}
void CAPRSHandlerThread::write(CAPRSFrame& frame)
void CAPRSISHandlerThread::write(CAPRSFrame& frame)
{
if (!m_connected)
return;
@ -235,25 +235,25 @@ void CAPRSHandlerThread::write(CAPRSFrame& frame)
}
}
bool CAPRSHandlerThread::isConnected() const
bool CAPRSISHandlerThread::isConnected() const
{
return m_connected;
}
void CAPRSHandlerThread::stop()
void CAPRSISHandlerThread::stop()
{
m_exit = true;
Wait();
}
void CAPRSHandlerThread::clock(unsigned int ms)
void CAPRSISHandlerThread::clock(unsigned int ms)
{
m_reconnectTimer.clock(ms);
m_keepAliveTimer.clock(ms);
}
bool CAPRSHandlerThread::connect()
bool CAPRSISHandlerThread::connect()
{
m_socket.close();
bool ret = m_socket.open();
@ -304,7 +304,7 @@ bool CAPRSHandlerThread::connect()
return true;
}
void CAPRSHandlerThread::startReconnectionTimer()
void CAPRSISHandlerThread::startReconnectionTimer()
{
// Clamp at a ten minutes reconnect time
m_tries++;

@ -29,11 +29,11 @@
#include "APRSFrame.h"
class CAPRSHandlerThread : public CThread, IAPRSHandlerBackend {
class CAPRSISHandlerThread : public CThread, IAPRSHandlerBackend {
public:
CAPRSHandlerThread(const std::string& callsign, const std::string& password, const std::string& address, const std::string& hostname, unsigned int port);
CAPRSHandlerThread(const std::string& callsign, const std::string& password, const std::string& address, const std::string& hostname, unsigned int port, const std::string& filter);
virtual ~CAPRSHandlerThread();
CAPRSISHandlerThread(const std::string& callsign, const std::string& password, const std::string& address, const std::string& hostname, unsigned int port);
CAPRSISHandlerThread(const std::string& callsign, const std::string& password, const std::string& address, const std::string& hostname, unsigned int port, const std::string& filter);
virtual ~CAPRSISHandlerThread();
bool start();

@ -59,8 +59,8 @@ bool CRepeaterHandler::m_dtmfEnabled = true;
CHeaderLogger* CRepeaterHandler::m_headerLogger = NULL;
CAPRSHandler* CRepeaterHandler::m_outgoingAprsHandler = NULL;
CAPRSHandler* CRepeaterHandler::m_incomingAprsHandler = NULL;
CAPRSHandler* CRepeaterHandler::m_outgoingAprsHandler = NULL; //handles APRS/DPRS frames coming from radio to network
CAPRSHandler* CRepeaterHandler::m_incomingAprsHandler = NULL; //handles APRS/DPRS frames coming from network to radio
CCallsignList* CRepeaterHandler::m_restrictList = NULL;

@ -48,7 +48,7 @@
#include "APRSGPSDIdFrameProvider.h"
#include "APRSFixedIdFrameProvider.h"
#include "Daemon.h"
#include "APRSHandlerThread.h"
#include "APRSISHandlerThread.h"
#include "DummyAPRSHandlerThread.h"
CDStarGatewayApp * CDStarGatewayApp::g_app = nullptr;
@ -197,8 +197,8 @@ bool CDStarGatewayApp::createThread()
CAPRSHandler * outgoingAprsWriter = nullptr;
CAPRSHandler * incomingAprsWriter = nullptr;
if(aprsConfig.enabled && !aprsConfig.password.empty()) {
CAPRSHandlerThread* thread = new CAPRSHandlerThread(gatewayConfig.callsign, aprsConfig.password, gatewayConfig.address, aprsConfig.hostname, aprsConfig.port);
outgoingAprsWriter = new CAPRSHandler((IAPRSHandlerBackend *)thread);
CAPRSISHandlerThread* aprsisthread = new CAPRSISHandlerThread(gatewayConfig.callsign, aprsConfig.password, gatewayConfig.address, aprsConfig.hostname, aprsConfig.port);
outgoingAprsWriter = new CAPRSHandler((IAPRSHandlerBackend *)aprsisthread);
incomingAprsWriter = new CAPRSHandler((IAPRSHandlerBackend *)new CDummyAPRSHandlerBackend());

Loading…
Cancel
Save

Powered by TurnKey Linux.