Reinserts original comments
This commit is contained in:
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 "LogViewInjectionThread.hpp"
|
||||
|
||||
#include "LogViewTelegram.hpp"
|
||||
@@ -30,13 +30,13 @@ LogViewInjectionThread::LogViewInjectionThread()
|
||||
, m_Socket(nullptr)
|
||||
, m_Timer(nullptr)
|
||||
{
|
||||
|
||||
// load the settings (and write default-values if not defined)
|
||||
QSettings settings;
|
||||
settings.beginGroup(LogViewOptionDialog::INJECTION_GROUP);
|
||||
m_Hostname = settings.value(LogViewOptionDialog::INJECTION_HOSTNAME).toString();
|
||||
if (m_Hostname.isEmpty())
|
||||
{
|
||||
|
||||
// set default-hostname if nothing was set
|
||||
m_Hostname = QLatin1String("localhost");
|
||||
settings.setValue(LogViewOptionDialog::INJECTION_HOSTNAME, m_Hostname);
|
||||
}
|
||||
@@ -48,7 +48,7 @@ LogViewInjectionThread::LogViewInjectionThread()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ---------------------------------------------------------------
|
||||
void LogViewInjectionThread::run()
|
||||
{
|
||||
emit updateStatus(QLatin1String(":/image/RedLamp.png"),
|
||||
@@ -59,7 +59,7 @@ void LogViewInjectionThread::run()
|
||||
}
|
||||
|
||||
|
||||
|
||||
// ---------------------------------------------------------------
|
||||
void LogViewInjectionThread::setPort(uint16_t port)
|
||||
{
|
||||
m_Port = port;
|
||||
@@ -69,17 +69,17 @@ void LogViewInjectionThread::setPort(uint16_t port)
|
||||
}
|
||||
|
||||
|
||||
|
||||
// ---------------------------------------------------------------
|
||||
bool LogViewInjectionThread::isSendingPossible() const
|
||||
{
|
||||
return m_SendingPossible;
|
||||
}
|
||||
|
||||
|
||||
|
||||
// ---------------------------------------------------------------
|
||||
void LogViewInjectionThread::tryToConnect()
|
||||
{
|
||||
|
||||
//m_Timer->setInterval(3000);
|
||||
if (!m_Socket)
|
||||
{
|
||||
m_Socket = new QTcpSocket(this);
|
||||
@@ -87,7 +87,7 @@ void LogViewInjectionThread::tryToConnect()
|
||||
connect(m_Socket, &QTcpSocket::disconnected, this, &LogViewInjectionThread::doDisconnect);
|
||||
}
|
||||
|
||||
|
||||
// we need a timer for retrying connection
|
||||
if (!m_Timer)
|
||||
{
|
||||
m_Timer = new QTimer(this);
|
||||
@@ -101,7 +101,7 @@ void LogViewInjectionThread::tryToConnect()
|
||||
}
|
||||
|
||||
|
||||
|
||||
// ---------------------------------------------------------------
|
||||
void LogViewInjectionThread::doConnect()
|
||||
{
|
||||
INFO_LOG(m_logger) << "LogView has successful connected to injection-server of TETRA-If";
|
||||
@@ -112,7 +112,7 @@ void LogViewInjectionThread::doConnect()
|
||||
}
|
||||
|
||||
|
||||
|
||||
// ---------------------------------------------------------------
|
||||
void LogViewInjectionThread::doDisconnect()
|
||||
{
|
||||
INFO_LOG(m_logger) << "LogView was disconnected from injection-server of TETRA-If";
|
||||
@@ -123,7 +123,7 @@ void LogViewInjectionThread::doDisconnect()
|
||||
}
|
||||
|
||||
|
||||
|
||||
// ---------------------------------------------------------------
|
||||
void LogViewInjectionThread::sendTelegram(LogViewTelegram* a_telegram, const bool a_doSendAsCentralTelegram)
|
||||
{
|
||||
INFO_LOG(m_logger) << "inject " << (a_doSendAsCentralTelegram ? "central" : "Tetra") << " telegram";
|
||||
@@ -140,4 +140,4 @@ void LogViewInjectionThread::sendTelegram(LogViewTelegram* a_telegram, const boo
|
||||
m_Socket->write(data);
|
||||
}
|
||||
|
||||
}
|
||||
} // namespace N_LogView
|
||||
Reference in new issue
Block a user