Skip to content

Commit

Permalink
#29 rename APRSWriters variables
Browse files Browse the repository at this point in the history
  • Loading branch information
F4FXL committed Dec 29, 2022
1 parent e62ab36 commit 1352597
Show file tree
Hide file tree
Showing 4 changed files with 40 additions and 40 deletions.
46 changes: 23 additions & 23 deletions Common/RepeaterHandler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,8 @@ bool CRepeaterHandler::m_dtmfEnabled = true;

CHeaderLogger* CRepeaterHandler::m_headerLogger = NULL;

CAPRSHandler* CRepeaterHandler::m_outgoingAprsWriter = NULL;
CAPRSHandler* CRepeaterHandler::m_incomingAprsWriter = NULL;
CAPRSHandler* CRepeaterHandler::m_outgoingAprsHandler = NULL;
CAPRSHandler* CRepeaterHandler::m_incomingAprsHandler = NULL;

CCallsignList* CRepeaterHandler::m_restrictList = NULL;

Expand Down Expand Up @@ -353,10 +353,10 @@ void CRepeaterHandler::setHeaderLogger(CHeaderLogger* logger)
m_headerLogger = logger;
}

void CRepeaterHandler::setAPRSWriters(CAPRSHandler* outgoingAprsWriter, CAPRSHandler* incomingAprsWriter)
void CRepeaterHandler::setAPRSHandlers(CAPRSHandler* outgoingAprsHandler, CAPRSHandler* incomingAprsHandler)
{
m_outgoingAprsWriter = outgoingAprsWriter;
m_incomingAprsWriter = incomingAprsWriter;
m_outgoingAprsHandler = outgoingAprsHandler;
m_incomingAprsHandler = incomingAprsHandler;
}

void CRepeaterHandler::setLocalAddress(const std::string& address)
Expand Down Expand Up @@ -615,8 +615,8 @@ void CRepeaterHandler::processRepeater(CHeaderData& header)
m_text.clear();

// Reset the APRS Writer if it's enabled
if (m_outgoingAprsWriter != NULL)
m_outgoingAprsWriter->writeHeader(m_rptCallsign, header);
if (m_outgoingAprsHandler != NULL)
m_outgoingAprsHandler->writeHeader(m_rptCallsign, header);

// Write to Header.log if it's enabled
if (m_headerLogger != NULL)
Expand Down Expand Up @@ -825,8 +825,8 @@ void CRepeaterHandler::processRepeater(CAMBEData& data)
if (m_drats != NULL)
m_drats->writeData(data);

if (m_outgoingAprsWriter != NULL)
m_outgoingAprsWriter->writeData(m_rptCallsign, data);
if (m_outgoingAprsHandler != NULL)
m_outgoingAprsHandler->writeData(m_rptCallsign, data);

if (m_text.empty() && !data.isEnd()) {
m_textCollector.writeData(data);
Expand Down Expand Up @@ -1175,8 +1175,8 @@ bool CRepeaterHandler::process(CHeaderData& header, DIRECTION, AUDIO_SOURCE sour
if (source == AS_DUP)
return true;

if(m_incomingAprsWriter != nullptr)
m_incomingAprsWriter->writeHeader(m_rptCallsign, header);
if(m_incomingAprsHandler != nullptr)
m_incomingAprsHandler->writeHeader(m_rptCallsign, header);

sendToIncoming(header);

Expand Down Expand Up @@ -1217,8 +1217,8 @@ bool CRepeaterHandler::process(CAMBEData& data, DIRECTION, AUDIO_SOURCE source)

m_repeaterHandler->writeAMBE(data);

if(m_incomingAprsWriter != nullptr)
m_incomingAprsWriter->writeData(m_rptCallsign, data);
if(m_incomingAprsHandler != nullptr)
m_incomingAprsHandler->writeData(m_rptCallsign, data);

sendToIncoming(data);

Expand Down Expand Up @@ -2421,8 +2421,8 @@ void CRepeaterHandler::startupInt()
m_irc->rptrQTH(callsign, m_latitude, m_longitude, m_description1, m_description2, m_url);
}

if(m_outgoingAprsWriter != nullptr) {
m_outgoingAprsWriter->addReadAPRSCallback(this);
if(m_outgoingAprsHandler != nullptr) {
m_outgoingAprsHandler->addReadAPRSCallback(this);
}

#ifdef USE_CCS
Expand Down Expand Up @@ -2572,8 +2572,8 @@ void CRepeaterHandler::writeLinkingTo(const std::string &callsign)
m_infoAudio->setStatus(m_linkStatus, m_linkRepeater, text);
triggerInfo();

if(m_outgoingAprsWriter != nullptr)
m_outgoingAprsWriter->writeStatus(m_rptCallsign, text);
if(m_outgoingAprsHandler != nullptr)
m_outgoingAprsHandler->writeStatus(m_rptCallsign, text);

#ifdef USE_CCS
m_ccsHandler->setReflector();
Expand Down Expand Up @@ -2627,8 +2627,8 @@ void CRepeaterHandler::writeLinkedTo(const std::string &callsign)
m_infoAudio->setStatus(m_linkStatus, m_linkRepeater, text);
triggerInfo();

if(m_outgoingAprsWriter != nullptr)
m_outgoingAprsWriter->writeStatus(m_rptCallsign, text);
if(m_outgoingAprsHandler != nullptr)
m_outgoingAprsHandler->writeStatus(m_rptCallsign, text);

#ifdef USE_CCS
m_ccsHandler->setReflector(callsign);
Expand Down Expand Up @@ -2682,8 +2682,8 @@ void CRepeaterHandler::writeNotLinked()
m_infoAudio->setStatus(m_linkStatus, m_linkRepeater, text);
triggerInfo();

if(m_outgoingAprsWriter != nullptr)
m_outgoingAprsWriter->writeStatus(m_rptCallsign, text);
if(m_outgoingAprsHandler != nullptr)
m_outgoingAprsHandler->writeStatus(m_rptCallsign, text);

#ifdef USE_CCS
m_ccsHandler->setReflector();
Expand Down Expand Up @@ -2753,8 +2753,8 @@ void CRepeaterHandler::writeIsBusy(const std::string& callsign)
m_infoAudio->setTempStatus(m_linkStatus, m_linkRepeater, tempText);
triggerInfo();

if(m_outgoingAprsWriter != nullptr)
m_outgoingAprsWriter->writeStatus(m_rptCallsign, text);
if(m_outgoingAprsHandler != nullptr)
m_outgoingAprsHandler->writeStatus(m_rptCallsign, text);

#ifdef USE_CCS
m_ccsHandler->setReflector();
Expand Down
6 changes: 3 additions & 3 deletions Common/RepeaterHandler.h
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ class CRepeaterHandler : public IRepeaterCallback, public IReflectorCallback, pu
static void setDPlusEnabled(bool enabled);
static void setDCSEnabled(bool enabled);
static void setHeaderLogger(CHeaderLogger* logger);
static void setAPRSWriters(CAPRSHandler* outgoingAprsWriter, CAPRSHandler* incomingAprsWriter);
static void setAPRSHandlers(CAPRSHandler* outgoingAprsHandler, CAPRSHandler* incomingAprsHandler);
static void setInfoEnabled(bool enabled);
static void setEchoEnabled(bool enabled);
static void setDTMFEnabled(bool enabled);
Expand Down Expand Up @@ -169,8 +169,8 @@ class CRepeaterHandler : public IRepeaterCallback, public IReflectorCallback, pu

static CHeaderLogger* m_headerLogger;

static CAPRSHandler* m_outgoingAprsWriter;
static CAPRSHandler* m_incomingAprsWriter;
static CAPRSHandler* m_outgoingAprsHandler;
static CAPRSHandler* m_incomingAprsHandler;

static CCallsignList* m_whiteList;
static CCallsignList* m_blackList;
Expand Down
24 changes: 12 additions & 12 deletions DStarGateway/DStarGatewayThread.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,8 @@ m_dextraPool(nullptr),
m_dplusPool(nullptr),
m_dcsPool(nullptr),
m_g2HandlerPool(nullptr),
m_outgoingAprsWriter(nullptr),
m_incomingAprsWriter(nullptr),
m_outgoingAprsHandler(nullptr),
m_incomingAprsHandler(nullptr),
m_irc(nullptr),
m_cache(),
m_language(TL_ENGLISH_UK),
Expand Down Expand Up @@ -251,7 +251,7 @@ void* CDStarGatewayThread::Entry()
CRepeaterHandler::setDPlusEnabled(m_dplusEnabled);
CRepeaterHandler::setDCSEnabled(m_dcsEnabled);
CRepeaterHandler::setHeaderLogger(headerLogger);
CRepeaterHandler::setAPRSWriters(m_outgoingAprsWriter, m_incomingAprsWriter);
CRepeaterHandler::setAPRSHandlers(m_outgoingAprsHandler, m_incomingAprsHandler);
CRepeaterHandler::setInfoEnabled(m_infoEnabled);
CRepeaterHandler::setEchoEnabled(m_echoEnabled);
CRepeaterHandler::setDTMFEnabled(m_dtmfEnabled);
Expand Down Expand Up @@ -378,8 +378,8 @@ void* CDStarGatewayThread::Entry()
m_statusFileTimer.start();
}

if (m_outgoingAprsWriter != NULL)
m_outgoingAprsWriter->clock(ms);
if (m_outgoingAprsHandler != NULL)
m_outgoingAprsHandler->clock(ms);

if (m_logEnabled) {
m_statusTimer1.clock(ms);
Expand Down Expand Up @@ -470,9 +470,9 @@ void* CDStarGatewayThread::Entry()
delete m_remote;
}

if(m_outgoingAprsWriter != nullptr) {
m_outgoingAprsWriter->close();
delete m_outgoingAprsWriter;
if(m_outgoingAprsHandler != nullptr) {
m_outgoingAprsHandler->close();
delete m_outgoingAprsHandler;
}

if (headerLogger != NULL) {
Expand Down Expand Up @@ -639,8 +639,8 @@ void CDStarGatewayThread::setLog(bool enabled)

void CDStarGatewayThread::setAPRSWriters(CAPRSHandler* outgoingWriter, CAPRSHandler* incomingWriter)
{
m_outgoingAprsWriter = outgoingWriter;
m_incomingAprsWriter = incomingWriter;
m_outgoingAprsHandler = outgoingWriter;
m_incomingAprsHandler = incomingWriter;
}

void CDStarGatewayThread::setInfoEnabled(bool enabled)
Expand Down Expand Up @@ -1246,8 +1246,8 @@ void CDStarGatewayThread::writeStatus()
CDStarGatewayStatusData* CDStarGatewayThread::getStatus() const
{
bool aprsStatus = false;
if (m_outgoingAprsWriter != NULL)
aprsStatus = m_outgoingAprsWriter->isConnected();
if (m_outgoingAprsHandler != NULL)
aprsStatus = m_outgoingAprsHandler->isConnected();

CDStarGatewayStatusData* status = new CDStarGatewayStatusData(m_lastStatus, aprsStatus);

Expand Down
4 changes: 2 additions & 2 deletions DStarGateway/DStarGatewayThread.h
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,8 @@ class CDStarGatewayThread : public CThread{
CDPlusProtocolHandlerPool* m_dplusPool;
CDCSProtocolHandlerPool* m_dcsPool;
CG2ProtocolHandlerPool* m_g2HandlerPool;
CAPRSHandler* m_outgoingAprsWriter;
CAPRSHandler* m_incomingAprsWriter;
CAPRSHandler* m_outgoingAprsHandler;
CAPRSHandler* m_incomingAprsHandler;
CIRCDDB* m_irc;
CCacheManager m_cache;
TEXT_LANG m_language;
Expand Down

0 comments on commit 1352597

Please sign in to comment.