Reinserts original comments

This commit is contained in:
torsten committed 2026-10-14 12:56:16 +00:00
1 parent 1dd1e86355
commit b662e4daf9
112 files changed
+7113 -5131

No files matched your search

@@ -1,17 +1,17 @@
// **************************************************************************
//
// (C) Copyright 2009 Swiss SIMTEC AG
//
// **************************************************************************
//
// $HeadURL$
// $LastChangedBy$
// $LastChangedDate$
// $LastChangedRevision$
//
// **************************************************************************
// manual class headers
#include "PrtCnvInjectionThread.hpp"
#include "PrtCnvInjectionSocket.hpp"
@@ -23,7 +23,7 @@
namespace PrtCnv
{
// ---------------------------------------------------------------
PrtCnvInjectionThread::PrtCnvInjectionThread(PrtCnvThreadStarter* a_parent)
: PrtCnvThread(a_parent, "PrtCnvInjectionThread")
, m_Port(46666)
@@ -41,7 +41,7 @@ PrtCnvInjectionThread::~PrtCnvInjectionThread()
delete m_RadioListMutex;
}
// ---------------------------------------------------------------
int32_t PrtCnvInjectionThread::create(NGL::Settings *settings)
{
INFO_LOG(m_logger) << "create";
@@ -52,7 +52,7 @@ int32_t PrtCnvInjectionThread::create(NGL::Settings *settings)
m_Enabled = m_Config->getBoolean(getName(), QStringLiteral("Enable"), false);
// prepare a tcp-server for simulating central
if (m_Enabled)
{
m_Server = new QTcpServer(this);
@@ -64,7 +64,7 @@ int32_t PrtCnvInjectionThread::create(NGL::Settings *settings)
}
// ---------------------------------------------------------------
int32_t PrtCnvInjectionThread::init()
{
INFO_LOG(m_logger) << "init";
@@ -76,15 +76,15 @@ int32_t PrtCnvInjectionThread::init()
// ---------------------------------------------------------------
// Starts the thread and listen for TCP-clients
// ---------------------------------------------------------------
int32_t PrtCnvInjectionThread::start()
{
INFO_LOG(m_logger) << "Start";
PrtCnvThread::start();
// start the TCP-server
if (m_Enabled)
{
m_Server->setMaxPendingConnections(1);
@@ -97,9 +97,9 @@ int32_t PrtCnvInjectionThread::start()
// ---------------------------------------------------------------
// Connects a TCP-client
// ---------------------------------------------------------------
void PrtCnvInjectionThread::connectClient()
{
INFO_LOG(m_logger) << "A client has connected to the injection-server";
@@ -111,9 +111,9 @@ void PrtCnvInjectionThread::connectClient()
// ---------------------------------------------------------------
// Disconnects a TCP-client
// ---------------------------------------------------------------
void PrtCnvInjectionThread::disconnectClient(PrtCnvInjectionSocket *a_injectionSocket)
{
auto it = m_SocketList.find(a_injectionSocket);
@@ -125,13 +125,13 @@ void PrtCnvInjectionThread::disconnectClient(PrtCnvInjectionSocket *a_injectionS
// ---------------------------------------------------------------
// Returns the next central-telegram to be injected. It will
// automatically be taken out of the list.
// The caller is responsible to delete the telegram, if no
// longer used.
// Returns NULL if no central-telegram available
// ---------------------------------------------------------------
N_CoPrtCnv::CoPrtCnvCentralTelegram *PrtCnvInjectionThread::getNextCentralInjectionTelegram()
{
QMutexLocker l(m_CentralListMutex);
@@ -144,13 +144,13 @@ N_CoPrtCnv::CoPrtCnvCentralTelegram *PrtCnvInjectionThread::getNextCentralInject
}
// ---------------------------------------------------------------
// Returns the next radio-telegram to be injected. It will
// automatically be taken out of the list.
// The caller is responsible to delete the telegram, if no
// longer used.
// Returns NULL if no radio-telegram available
// ---------------------------------------------------------------
N_CoPrtCnv::CoPrtCnvCentralTelegram *PrtCnvInjectionThread::getNextRadioInjectionTelegram()
{
QMutexLocker l(m_RadioListMutex);
@@ -163,7 +163,7 @@ N_CoPrtCnv::CoPrtCnvCentralTelegram *PrtCnvInjectionThread::getNextRadioInjectio
}
// ---------------------------------------------------------------
void PrtCnvInjectionThread::addToCentralList(N_CoPrtCnv::CoPrtCnvCentralTelegram *a_telegram)
{
QMutexLocker l(m_CentralListMutex);
@@ -171,12 +171,12 @@ void PrtCnvInjectionThread::addToCentralList(N_CoPrtCnv::CoPrtCnvCentralTelegram
}
// ---------------------------------------------------------------
void PrtCnvInjectionThread::addToRadioList(N_CoPrtCnv::CoPrtCnvCentralTelegram *a_telegram)
{
QMutexLocker l(m_RadioListMutex);
m_RadioTelegramList.push(a_telegram);
}
}
} // namespace PrtCnv