Qt6 Migration: DDS-Stubs, Logger-Fixes, Export-Header Korrekturen

- NGL_ADD_LIBRARY2: 87 CMakeLists.txt konvertiert für Export-Header Generierung
- 44 Export-Header Include-Pfade korrigiert (_export.h)
- 81 DDS-Stub-Header generiert (*_dtc.h, *_fts.h, *_dts.h, *_ftc.h)
- INGLLogger: Duplikat gelöscht, m_logger Member entfernt, variadische Makros
- Q_FUNC_INFO Redefinition behoben (Qt6 definiert bereits)
- FATAL_LOG Makro hinzugefügt
- InfrastructureManagement DDS-Stubs (ism.hpp, ism_enums.hpp, ism_ftc.h)
- FilterManagement DDS-Stubs (flt_ftc.h, flt_dts.h)
- AreaEffectSimulation DDS-Stubs (aes.hpp, aes_enums.hpp)
- SymbolAppearance Klasse vollständig definiert mit content() Methode
- BuildingComponentFilter Klasse definiert mit Copy-Konstruktor
- Ftc Factory: nullptr Return (abstract class)
- AesFilter Klasse in aes.hpp hinzugefügt
- Dtc Klasse in ppm.hpp mit participantChanged Signal
- AesType Enum: alle 15 At* Werte definiert
- AesEffectState_def: EsReceived hinzugefügt
- DataModification Enum: eAdded/eModified/eRemoved
- function_reply_object.h → core_types.h Include-Pfad (72 Dateien)
- Enum-Class-Streaming Template-Operator in INGLLogger.h
- ism_mounting_point.h: QImage → QtGui/QImage, QGuiApplication/QScreen
- ism_data_plugin_interface.h: QSet Include, Include-Reihenfolge
- QRegExp → QRegularExpression in tpm_js_parser.cpp
- .underlying() Aufrufe zu direktem Enum-Vergleich korrigiert
- Include-Pfade: aes.hpp in symbol_appearance_settings_impl.h und aes_display_filter_impl.h

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
torstenandCopilot committed 2026-08-19 06:06:24 +02:00
1 parent 010f91928a
commit b774f4035c
2785 files changed
+18754 -18316

No files matched your search

@@ -11,7 +11,7 @@
#include <AudioVideoManagement/icommand.h>
#include <AudioVideoManagement/ava_types.h>
#include <AudioVideoManagement/avm_export.h>
#include "svcavmcommon_export.h"
#include <QString>
#include <boost/optional.hpp>
@@ -130,7 +130,7 @@ CODEGEN_CLIENT_TOPICS_IFC(SRCS_common ${xml_FILE})
# Generate avm_db_structs.cpp/.h
CODEGEN_DATABASE_STRUCTS(SRCS_common ${xml_FILE})
NGL_ADD_LIBRARY(AAR SV WS svcAvmCommon SHARED ${SRCS_common})
NGL_ADD_LIBRARY2(AAR SV WS svcAvmCommon SHARED ${SRCS_common})
NGL_TARGET_INCLUDE_DIRECTORIES(svcAvmCommon
PUBLIC
${CMAKE_CURRENT_SOURCE_DIR}/../
@@ -165,7 +165,7 @@ SET(SRCS_client
# generate avm_[d|f]tc_impl.[cpp|h]
CODEGEN_CLIENT_TOPICS_IMPL(SRCS_client ${xml_FILE})
NGL_ADD_LIBRARY(AAR SV WS svcAvmClient SHARED ${SRCS_client})
NGL_ADD_LIBRARY2(AAR SV WS svcAvmClient SHARED ${SRCS_client})
NGL_TARGET_INCLUDE_DIRECTORIES(svcAvmClient
PUBLIC
${CMAKE_CURRENT_SOURCE_DIR}/../
@@ -193,7 +193,7 @@ SET(SRCS_server
# generate avm_[d|f]ts.h, avm_[d|f]ts_impl.[cpp|h]
CODEGEN_SERVER_TOPICS(SRCS_server ${xml_FILE})
NGL_ADD_LIBRARY(AAR SV svcAvmServer SHARED ${SRCS_server})
NGL_ADD_LIBRARY2(AAR SV svcAvmServer SHARED ${SRCS_server})
NGL_TARGET_INCLUDE_DIRECTORIES(svcAvmServer
PUBLIC
${CMAKE_CURRENT_SOURCE_DIR}/../
@@ -25,7 +25,6 @@ AvmFtTests::AvmFtTests(QObject *parent)
, m_testId(0)
, m_mountingPointId(100)
, m_bTestsSuccessful(true)
, m_logger(getLogger("FtTest"))
{
qRegisterMetaType<Core::FunctionReply>("Core::FunctionReply");
}
@@ -37,7 +36,7 @@ AvmFtTests::~AvmFtTests()
// ------------------------------------------------------------------------------
bool AvmFtTests::init(int domainId, int testId, int menuId, int mountingPointId)
{
INFO_LOG(m_logger) << "init begin";
INFO_LOG() << "init begin";
m_testId = testId;
m_menuStructId = menuId;
@@ -48,14 +47,14 @@ bool AvmFtTests::init(int domainId, int testId, int menuId, int mountingPointId)
return false;
m_ddsConnector->initPublisherSubscriber();
DEBUG_LOG(m_logger) << "create ftc AVM";
DEBUG_LOG() << "create ftc AVM";
m_ftc = AudioVideoManagement::Interface::Ftc::create(m_ddsConnector);
DEBUG_LOG(m_logger) << "init ftc AVM";
DEBUG_LOG() << "init ftc AVM";
bool bRet = m_ftc->enableAll();
DEBUG_LOG(m_logger) << "init end AVM - bRet = " << bRet;
DEBUG_LOG() << "init end AVM - bRet = " << bRet;
DEBUG_LOG(m_logger) << "Domain Id = " << domainId;
DEBUG_LOG(m_logger) << "Test Id = " << testId;
DEBUG_LOG() << "Domain Id = " << domainId;
DEBUG_LOG() << "Test Id = " << testId;
return bRet;
}
@@ -63,7 +62,7 @@ bool AvmFtTests::init(int domainId, int testId, int menuId, int mountingPointId)
// ------------------------------------------------------------------------------
void AvmFtTests::startTest()
{
INFO_LOG(m_logger) << "startTest";
INFO_LOG() << "startTest";
if (m_testId <= 1)
QTimer::singleShot(0, this, &AvmFtTests::tryCreate);
else if (m_testId == 2)
@@ -75,7 +74,7 @@ void AvmFtTests::startTest()
// ------------------------------------------------------------------------------
void AvmFtTests::tryCreate()
{
INFO_LOG(m_logger) << "trying to send createMenuStructRequest";
INFO_LOG() << "trying to send createMenuStructRequest";
m_menuStructId = -2;
ModifyMenuStructRequest request;
@@ -102,7 +101,7 @@ void AvmFtTests::tryCreate()
if (!m_ftc->modifyMenuStructRequest(request, this))
{
ERROR_LOG(m_logger) << "Error requesting create data";
ERROR_LOG() << "Error requesting create data";
failExit();
}
}
@@ -110,7 +109,7 @@ void AvmFtTests::tryCreate()
// ------------------------------------------------------------------------------
void AvmFtTests::tryModify()
{
INFO_LOG(m_logger) << "trying to send modify request for menuStructId = " << m_menuStructId;
INFO_LOG() << "trying to send modify request for menuStructId = " << m_menuStructId;
ModifyMenuStructRequest request;
request.id(m_menuStructId);
request.name("TestGlobalMenuModify");
@@ -135,7 +134,7 @@ void AvmFtTests::tryModify()
if (!m_ftc->modifyMenuStructRequest(request, this))
{
ERROR_LOG(m_logger) << "Error requesting modify data";
ERROR_LOG() << "Error requesting modify data";
failExit();
}
}
@@ -143,13 +142,13 @@ void AvmFtTests::tryModify()
// ------------------------------------------------------------------------------
void AvmFtTests::tryDelete()
{
INFO_LOG(m_logger) << "trying to send delete request for menuStructId = " << m_menuStructId;
INFO_LOG() << "trying to send delete request for menuStructId = " << m_menuStructId;
RemoveMenuStructRequest request;
request.id(m_menuStructId);
if (!m_ftc->removeMenuStructRequest(request, this))
{
ERROR_LOG(m_logger) << "Error requesting delete data";
ERROR_LOG() << "Error requesting delete data";
failExit();
}
}
@@ -168,15 +167,15 @@ void AvmFtTests::createMenuStructReply(const Core::FunctionReplyObject &replyObj
{
if (replyObject.error())
{
ERROR_LOG(m_logger) << "Got onCreateMenuStructReply error: " << replyObject();
ERROR_LOG() << "Got onCreateMenuStructReply error: " << replyObject();
failExit();
return;
}
INFO_LOG(m_logger) << "Got createReply with id " << replyObject.id()
INFO_LOG() << "Got createReply with id " << replyObject.id()
<< " and errorString " << replyObject.translated();
m_menuStructId = replyObject.id();
DEBUG_LOG(m_logger) << "m_testId = " << m_testId;
DEBUG_LOG() << "m_testId = " << m_testId;
if(m_testId == 0)
QTimer::singleShot(0, this, &AvmFtTests::tryModify);
@@ -189,11 +188,11 @@ void AvmFtTests::modifyMenuStructReply(const Core::FunctionReplyObject &replyObj
{
if (replyObject.error())
{
ERROR_LOG(m_logger) << "Got onModifyMenuStructReply error: " << replyObject();
ERROR_LOG() << "Got onModifyMenuStructReply error: " << replyObject();
failExit();
return;
}
INFO_LOG(m_logger) << "Got modifyRequest with id " << replyObject.id()
INFO_LOG() << "Got modifyRequest with id " << replyObject.id()
<< " and errorString " << replyObject.translated();
if(m_testId == 0)
QTimer::singleShot(0, this, &AvmFtTests::tryDelete);
@@ -206,11 +205,11 @@ void AvmFtTests::onRemoveMenuStructReply(const Core::FunctionReplyObject &replyO
{
if (replyObject.error())
{
ERROR_LOG(m_logger) << "Got onRemoveMenuStructReply error: " << replyObject();
ERROR_LOG() << "Got onRemoveMenuStructReply error: " << replyObject();
failExit();
return;
}
INFO_LOG(m_logger) << "Got removeReply with id " << replyObject.id()
INFO_LOG() << "Got removeReply with id " << replyObject.id()
<< " and errorString " << replyObject.translated();
QTimer::singleShot(0, qApp, &QCoreApplication::quit);
}
@@ -64,8 +64,6 @@ private:
int m_testId;
int m_mountingPointId;
bool m_bTestsSuccessful;
NGL::INGLLogger &m_logger;
};
} // namespace AudioVideoManagement
@@ -72,7 +72,6 @@ private:
bool m_removeReplyReceived{false};
QVector<int> m_tvcConfigIds;
QVector<int> m_cnrConfigIds;
NGL::INGLLogger &m_logger;
};
} // namespace AudioVideoManagement
@@ -27,7 +27,6 @@ MvsTests::MvsTests(QObject *parent)
, m_radioStationId(200)
, m_exerciseId(0)
, m_bTestsSuccessful(true)
, m_logger(getLogger("Test"))
{
qRegisterMetaType<Core::FunctionReply>("Core::FunctionReply");
}
@@ -39,7 +38,7 @@ MvsTests::~MvsTests()
//----------------------------------------------------------------------------------
bool MvsTests::init(int domainId, int testId, int teamId, int receiverId, int stationId, int exerciseId)
{
INFO_LOG(m_logger) << "init begin";
INFO_LOG() << "init begin";
m_testId = testId;
m_teamId = teamId;
@@ -53,18 +52,18 @@ bool MvsTests::init(int domainId, int testId, int teamId, int receiverId, int st
return false;
m_ddsConnector->initPublisherSubscriber();
DEBUG_LOG(m_logger) << "create ftc MVS";
DEBUG_LOG() << "create ftc MVS";
m_ftc = AudioVideoManagement::Interface::Ftc::create(m_ddsConnector);
DEBUG_LOG(m_logger) << "init ftc MVS";
DEBUG_LOG() << "init ftc MVS";
bool bRet = m_ftc->enableAll();
DEBUG_LOG(m_logger) << "init end MVS - bRet = " << bRet;
DEBUG_LOG() << "init end MVS - bRet = " << bRet;
DEBUG_LOG(m_logger) << "Domain Id = " << domainId;
DEBUG_LOG(m_logger) << "Team Id = " << teamId;
DEBUG_LOG(m_logger) << "Test Id = " << testId;
DEBUG_LOG(m_logger) << "Receiver Id = " << receiverId;
DEBUG_LOG(m_logger) << "Radio Station Id = " << stationId;
DEBUG_LOG(m_logger) << "Exercise Id = " << exerciseId;
DEBUG_LOG() << "Domain Id = " << domainId;
DEBUG_LOG() << "Team Id = " << teamId;
DEBUG_LOG() << "Test Id = " << testId;
DEBUG_LOG() << "Receiver Id = " << receiverId;
DEBUG_LOG() << "Radio Station Id = " << stationId;
DEBUG_LOG() << "Exercise Id = " << exerciseId;
return bRet;
}
@@ -72,7 +71,7 @@ bool MvsTests::init(int domainId, int testId, int teamId, int receiverId, int st
//----------------------------------------------------------------------------------
void MvsTests::startTest()
{
INFO_LOG(m_logger) << "startTest";
INFO_LOG() << "startTest";
switch (m_testId)
{
// case 1:
@@ -100,18 +99,18 @@ void MvsTests::startTest()
tryModifyAvsVideoReceiver();
break;
default:
ERROR_LOG(m_logger) << "Unknown test case !";
ERROR_LOG() << "Unknown test case !";
failExit();
break;
}
INFO_LOG(m_logger) << "********* endTest **************";
INFO_LOG() << "********* endTest **************";
QTimer::singleShot(0, qApp, &QCoreApplication::quit);
}
//----------------------------------------------------------------------------------
//void MvsTests::tryCreateVideoTeam()
//{
// INFO_LOG(m_logger) << "trying to send createRequest VideoTeam";
// INFO_LOG() << "trying to send createRequest VideoTeam";
// VideoTeamModifyRequest request;
// request.id(0);
@@ -126,7 +125,7 @@ void MvsTests::startTest()
// if (!m_ftc->videoTeamModifyRequest(request, this))
// {
// INFO_LOG(m_logger) << "Error requesting create data, as expected";
// INFO_LOG() << "Error requesting create data, as expected";
// successExit();
// }
@@ -151,7 +150,7 @@ void MvsTests::tryModifyVideoTeam()
if (!m_ftc->videoTeamModifyRequest(request, this))
{
ERROR_LOG(m_logger) << "Error requesting modify data";
ERROR_LOG() << "Error requesting modify data";
failExit();
}
@@ -167,7 +166,7 @@ void MvsTests::tryModifyVideoTeam()
// if (!m_ftc->videoTeamRemoveRequest(request, this))
// {
// ERROR_LOG(m_logger) << "Error requesting remove data";
// ERROR_LOG() << "Error requesting remove data";
// failExit();
// }
@@ -177,7 +176,7 @@ void MvsTests::tryModifyVideoTeam()
//----------------------------------------------------------------------------------
void MvsTests::tryCreateVideoReceiver()
{
INFO_LOG(m_logger) << "trying to send createRequest VideoReceiver";
INFO_LOG() << "trying to send createRequest VideoReceiver";
VideoReceiverModifyRequest request;
request.id(0);
@@ -190,7 +189,7 @@ void MvsTests::tryCreateVideoReceiver()
if (!m_ftc->videoReceiverModifyRequest(request, this))
{
ERROR_LOG(m_logger) << "Error requesting create data";
ERROR_LOG() << "Error requesting create data";
failExit();
}
@@ -212,7 +211,7 @@ void MvsTests::tryModifyVideoReceiver()
if (!m_ftc->videoReceiverModifyRequest(request, this))
{
ERROR_LOG(m_logger) << "Error requesting modify data";
ERROR_LOG() << "Error requesting modify data";
failExit();
}
@@ -230,7 +229,7 @@ void MvsTests::tryModifyAvsVideoReceiver()
if (!m_ftc->videoReceiverModifyAvsRequest(request, this))
{
ERROR_LOG(m_logger) << "Error requesting modify AVS data";
ERROR_LOG() << "Error requesting modify AVS data";
failExit();
}
@@ -247,7 +246,7 @@ void MvsTests::tryModifyActiveVideoReceiver()
if (!m_ftc->videoReceiverModifyActiveRequest(request, this))
{
ERROR_LOG(m_logger) << "Error requesting modify active data";
ERROR_LOG() << "Error requesting modify active data";
failExit();
}
@@ -264,7 +263,7 @@ void MvsTests::tryDeleteVideoReceiver()
if (!m_ftc->videoReceiverRemoveRequest(request, this))
{
ERROR_LOG(m_logger) << "Error requesting remove data";
ERROR_LOG() << "Error requesting remove data";
failExit();
}
@@ -275,7 +274,7 @@ void MvsTests::tryDeleteVideoReceiver()
//----------------------------------------------------------------------------------
void MvsTests::failExit()
{
ERROR_LOG(m_logger) << "FAIL EXIT !";
ERROR_LOG() << "FAIL EXIT !";
m_bTestsSuccessful = false;
QTimer::singleShot(0, qApp, &QCoreApplication::quit);
}
@@ -283,7 +282,7 @@ void MvsTests::failExit()
//----------------------------------------------------------------------------------
void MvsTests::successExit()
{
INFO_LOG(m_logger) << "SUCCES EXIT !";
INFO_LOG() << "SUCCES EXIT !";
m_bTestsSuccessful = true;
QTimer::singleShot(0, qApp, &QCoreApplication::quit);
}
@@ -292,14 +291,14 @@ void MvsTests::successExit()
//----------------------------------------------------------------------------------
void MvsTests::onVideoTeamModifyReply(const Core::FunctionReplyObject &replyObject)
{
DEBUG_LOG(m_logger) << "END (onVideoTeamModifyReply)";
DEBUG_LOG() << "END (onVideoTeamModifyReply)";
if (replyObject.error())
{
ERROR_LOG(m_logger) << "Got onVideoTeamModifyReply error: " << replyObject();
ERROR_LOG() << "Got onVideoTeamModifyReply error: " << replyObject();
QTimer::singleShot(0, qApp, SLOT(quit()));
return;
}
INFO_LOG(m_logger) << "Got Reply with id " << replyObject.id()
INFO_LOG() << "Got Reply with id " << replyObject.id()
<< " and errorString " << replyObject.translated();
m_teamId = replyObject.id();
@@ -310,14 +309,14 @@ void MvsTests::onVideoTeamModifyReply(const Core::FunctionReplyObject &replyObje
//----------------------------------------------------------------------------------
void MvsTests::onVideoReceiverModifyReply(const Core::FunctionReplyObject &replyObject)
{
DEBUG_LOG(m_logger) << "END (onVideoReceiverModifyReply)";
DEBUG_LOG() << "END (onVideoReceiverModifyReply)";
if (replyObject.error())
{
ERROR_LOG(m_logger) << "Got onVideoReceiverModifyReply error: " << replyObject();
ERROR_LOG() << "Got onVideoReceiverModifyReply error: " << replyObject();
QTimer::singleShot(0, qApp, SLOT(quit()));
return;
}
INFO_LOG(m_logger) << "Got Reply with id " << replyObject.id()
INFO_LOG() << "Got Reply with id " << replyObject.id()
<< " and errorString " << replyObject.translated();
m_receiverId = replyObject.id();
@@ -328,7 +327,7 @@ void MvsTests::onVideoReceiverModifyReply(const Core::FunctionReplyObject &reply
// ------------------------------------------------------------------------------
void MvsTests::onError(const QString &reason)
{
ERROR_LOG(m_logger) << "Got Reply error: " << reason;
ERROR_LOG() << "Got Reply error: " << reason;
failExit();
}
@@ -340,7 +339,7 @@ void MvsTests::onReply(const Core::FunctionReplyObject &replyObject)
onError(replyObject.translated());
return;
}
INFO_LOG(m_logger) << "Got Reply with id " << replyObject.id()
INFO_LOG() << "Got Reply with id " << replyObject.id()
<< " and errorString " << replyObject.translated();
// QTimer::singleShot(0, qApp, SLOT(quit()));
}
@@ -9,7 +9,7 @@
#pragma once
#include "avm_export.h"
#include "svcavmcommon_export.h"
#include <QObject>
#include <memory>
@@ -373,7 +373,7 @@ bool AssetAssignmentManager::hasPendingModifications(int assetId)
void AssetAssignmentManager::logPending()
{
DEBUG_LOG(m_logger) << "pending Mounts, Modifications (Asset), Unmounts, Removes: "
DEBUG_LOG() << "pending Mounts, Modifications (Asset), Unmounts, Removes: "
<< m_pendingMounts.size() << ", "
<< m_pendingModifications.size() << ", "
<< m_pendingUnmounts.size() << ", "
@@ -10,7 +10,7 @@
#pragma once
#include "exercise_context.h"
#include "avm_export.h"
#include "svcavmcommon_export.h"
#include "logger.h"
#include <QObject>
#include <boost/optional.hpp>
@@ -222,7 +222,6 @@ AudioVideoHandlerImpl::AudioVideoHandlerImpl(Exercise *exercise, IDbProxy *dbPro
, m_exercise(exercise)
, m_dbProxy(dbProxy)
, m_dtsProxy(dtsProxy)
, m_logger(getLogger("AudioVideoHandler"))
{
Q_ASSERT(exercise);
Q_ASSERT(dbProxy);
@@ -324,7 +323,7 @@ void AudioVideoHandlerImpl::onAssetChanged(Asset *asset)
{
Q_ASSERT(m_isActive);
Q_ASSERT(asset);
DEBUG_LOG(m_logger) << m_exContext << ": Asset changed: " << asset->data().name() << "(" << asset->data().id() << ")";
DEBUG_LOG() << m_exContext << ": Asset changed: " << asset->data().name() << "(" << asset->data().id() << ")";
updateDeviceConfig(asset);
}
@@ -333,7 +332,7 @@ void AudioVideoHandlerImpl::onMountingPointChanged(MountingPoint *mountingPoint)
{
Q_ASSERT(m_isActive);
Q_ASSERT(mountingPoint);
DEBUG_LOG(m_logger) << m_exContext << ": MountingPoint changed: " << mountingPoint->data().name() << "(" << mountingPoint->data().id() << ")";
DEBUG_LOG() << m_exContext << ": MountingPoint changed: " << mountingPoint->data().name() << "(" << mountingPoint->data().id() << ")";
updateDeviceConfig(mountingPoint->asset());
}
@@ -11,7 +11,7 @@
#include "exercise_context.h"
#include "logger.h"
#include "avm_export.h"
#include "svcavmcommon_export.h"
#include <AudioVideoManagement/avm_db_structs.h>
#include <boost/optional.hpp>
#include <QObject>
@@ -9,7 +9,7 @@
#pragma once
#include "avm_export.h"
#include "svcavmcommon_export.h"
#include "ava_types.h"
#include <chrono>
#include <utility>
@@ -69,7 +69,7 @@ AVSocket::~AVSocket()
void AVSocket::onDisconnected()
{
// WARNING_LOG(m_logger) << "Disconnected from A/V system ("
// WARNING_LOG() << "Disconnected from A/V system ("
// << getConnectionString()
// << ") - trying to reconnect";
m_bSuccessfullyLoggedIn = false;
@@ -80,7 +80,7 @@ void AVSocket::onError(QAbstractSocket::SocketError error)
{
if (!m_bErrorInTcpComWarnedOnce)
{
ERROR_LOG(m_logger) << "Error in tcp communication with A/V system ("
ERROR_LOG() << "Error in tcp communication with A/V system ("
<< getConnectionString()
<< "): " << QVariant::fromValue(error).toString();
m_bErrorInTcpComWarnedOnce = true;
@@ -123,7 +123,7 @@ bool AVSocket::sendInternal(const QByteArray &cmd)
{
if (!m_avsSocket || !m_avsSocket->isWritable())
{
WARNING_LOG(m_logger) << "AVS not connected - can not send command '"
WARNING_LOG() << "AVS not connected - can not send command '"
<< cmd << "'";
return false;
}
@@ -13,7 +13,7 @@
#include <queue>
#include "logger.h"
#include "avm_export.h"
#include "svcavmcommon_export.h"
namespace AudioVideoManagement
{
@@ -55,7 +55,6 @@ protected:
QTimer *m_rcpLoginTimer;
QTimer *m_reconnectTimer;
std::queue<QByteArray> m_commandQueueForErrorHandling;
NGL::INGLLogger &m_logger;
NGL::INGLLogger &m_loggerIO;
};
@@ -24,7 +24,6 @@ namespace AudioVideoManagement
AvaComm::AvaComm(const QString &avaHost, quint16 avaPort)
: m_avSocket(avaHost, avaPort, getLogger("AvaComm"), getLogger("AvaComm.IO"))
, m_logger(getLogger("AvaComm"))
, m_loggerIO(getLogger("AvaComm.IO"))
{
connect(&m_avSocket, &AVSocketWrapper::readyRead, this, &AvaComm::onReadyRead);
@@ -603,7 +602,7 @@ void AvaComm::parseResponse(const QByteArray &line)
}
default:
DEBUG_LOG(m_logger) << "Response not implemented: " << line;
DEBUG_LOG() << "Response not implemented: " << line;
}
}
@@ -11,7 +11,7 @@
#include "iava_comm.h"
#include "ava_types.h"
#include "avm_export.h"
#include "svcavmcommon_export.h"
#include "logger.h"
#include <AudioVideoManagement/av_socket.h>
#include <QList>
@@ -42,7 +42,6 @@ AvaControl::AvaControl(IAvaComm *comm, StreamNameMapping *streamNameMapping, std
: m_comm(comm)
, m_streamNameMapping(streamNameMapping)
, m_queue(commandTimeout)
, m_logger(getLogger("AvaControl"))
{
Q_ASSERT(comm);
Q_ASSERT(streamNameMapping);
@@ -289,13 +288,13 @@ void AvaControl::keepAlive()
void AvaControl::onConnected()
{
m_connected = true;
DEBUG_LOG(m_logger) << "connected";
DEBUG_LOG() << "connected";
}
void AvaControl::onDisconnected()
{
m_connected = false;
DEBUG_LOG(m_logger) << "disconnected";
DEBUG_LOG() << "disconnected";
m_queue.flush();
}
@@ -304,12 +303,12 @@ void AvaControl::onTimeout()
ICommand *cmd = m_queue.currentCommand();
if (cmd->canTimeout())
{
INFO_LOG(m_logger) << "command '" << cmd->debug() << "' failed";
INFO_LOG() << "command '" << cmd->debug() << "' failed";
m_queue.done();
return;
}
ERROR_LOG(m_logger) << "command timed out";
ERROR_LOG() << "command timed out";
failed(cmd);
}
@@ -320,7 +319,7 @@ void AvaControl::queue(ICommand *cmd, LtsUtils::IConnection *connection)
if (!m_connected)
{
DEBUG_LOG(m_logger) << "not connected -> dropping command";
DEBUG_LOG() << "not connected -> dropping command";
return;
}
@@ -450,7 +449,7 @@ void AvaControl::failed(AvaCommands::SetScript *cmd)
void AvaControl::failed(ICommand *cmd)
{
ERROR_LOG(m_logger) << "command '" << cmd->debug() << "' failed";
ERROR_LOG() << "command '" << cmd->debug() << "' failed";
Q_ASSERT(cmd == m_queue.currentCommand());
auto cmdSetScript = dynamic_cast<AvaCommands::SetScript*>(cmd);
if (cmdSetScript)
@@ -10,7 +10,7 @@
#pragma once
#include "iava_command_done_observer.h"
#include "avm_export.h"
#include "svcavmcommon_export.h"
#include "ava_types.h"
#include "rt_state.h"
#include "avs_command_queue.h"
@@ -25,7 +25,6 @@ AvaSession::AvaSession(AvaControl *ctrl, int exerciseId, const QString &operator
, m_timezone(timezone)
, m_guiStyle(guiStyle)
, m_keepAliveEnabled(keepAliveEnabled)
, m_logger(getLogger("AvaSession"))
{
Q_ASSERT(ctrl);
@@ -65,7 +64,7 @@ void AvaSession::onConnected()
m_established = true;
if (m_keepAliveEnabled)
m_keepAliveTimer.start();
DEBUG_LOG(m_logger) << "session established";
DEBUG_LOG() << "session established";
emit sessionEstablished();
}
@@ -73,7 +72,7 @@ void AvaSession::onDisconnected()
{
m_keepAliveTimer.stop();
m_established = false;
DEBUG_LOG(m_logger) << "disconnected";
DEBUG_LOG() << "disconnected";
emit disconnected();
}
@@ -9,7 +9,7 @@
#pragma once
#include "avm_export.h"
#include "svcavmcommon_export.h"
#include "ava_types.h"
#include "logger.h"
#include <QObject>
@@ -11,7 +11,7 @@
#include "ava_types.h"
#include "rt_state.h"
#include "avm_export.h"
#include "svcavmcommon_export.h"
#include <QString>
#include <QStringList>
#include <QMap>
@@ -10,7 +10,7 @@
#pragma once
#include <QMetaType>
#include "avm_export.h"
#include "svcavmcommon_export.h"
#include <QString>
#include <QStringList>
#include <QVector>
@@ -37,7 +37,7 @@ void AvsCommandQueue::queue(std::unique_ptr<ICommand> cmd, std::unique_ptr<LtsUt
bool noPendingCommand = m_queue.empty();
m_queue.push_back(CommandWithConn{std::move(cmd), std::move(connection)});
DEBUG_LOG(m_logger) << "queueing command, queue size: " << m_queue.size();
DEBUG_LOG() << "queueing command, queue size: " << m_queue.size();
tryReduce();
if (noPendingCommand)
nextCommand();
@@ -48,7 +48,7 @@ void AvsCommandQueue::done()
Q_ASSERT(!m_queue.empty());
m_timer.stop();
m_queue.pop_front();
DEBUG_LOG(m_logger) << "command finished, queue size: " << m_queue.size();
DEBUG_LOG() << "command finished, queue size: " << m_queue.size();
if (m_queue.empty())
emit queueEmpty();
else
@@ -79,7 +79,7 @@ void AvsCommandQueue::flush()
if (m_queue.empty())
return;
DEBUG_LOG(m_logger) << "flushing " << m_queue.size() << " commands";
DEBUG_LOG() << "flushing " << m_queue.size() << " commands";
m_timer.stop();
m_queue.clear();
emit queueEmpty();
@@ -95,7 +95,7 @@ void AvsCommandQueue::nextCommand()
{
Q_ASSERT(!m_queue.empty());
DEBUG_LOG(m_logger) << "sending next command";
DEBUG_LOG() << "sending next command";
ICommand *cmd = currentCommand();
m_timer.start();
cmd->send();
@@ -124,7 +124,7 @@ void AvsCommandQueue::tryReduce()
if (!lastCommand.cmd->nullifies(current.cmd.get()))
continue;
DEBUG_LOG(m_logger) << "dropping command due to override";
DEBUG_LOG() << "dropping command due to override";
m_queue.erase(m_queue.begin() + i);
return;
}
@@ -10,7 +10,7 @@
#pragma once
#include "logger.h"
#include "avm_export.h"
#include "svcavmcommon_export.h"
#include <QObject>
#include <QTimer>
#include <deque>
@@ -9,7 +9,7 @@
#pragma once
#include "avm_export.h"
#include "svcavmcommon_export.h"
#include <QString>
@@ -9,7 +9,7 @@
#pragma once
#include "avm_export.h"
#include "svcavmcommon_export.h"
#include <QObject>
#include <boost/optional.hpp>
#include <functional>
@@ -126,7 +126,7 @@ public:
Database::AvmDeviceConfig deviceConfig = m_handler->toDeviceConfig(config);
bool status = m_db->insert(deviceConfig);
if (!status)
ERROR_LOG(m_logger) << "Error while inserting device config";
ERROR_LOG() << "Error while inserting device config";
m_cache.insert(config.id(), deviceConfig);
emit m_handler->avDbReloadNeeded();
@@ -142,7 +142,7 @@ public:
newDeviceConfig.id = oldDeviceConfig.id;
bool status = m_db->update(newDeviceConfig);
if (!status)
ERROR_LOG(m_logger) << "Error while updating device config";
ERROR_LOG() << "Error while updating device config";
m_cache[config.id()] = newDeviceConfig;
emit m_handler->avDbReloadNeeded();
@@ -168,7 +168,7 @@ public:
bool status = m_db->removeAvmDeviceConfig(m_cache.value(configId).id);
if (!status)
ERROR_LOG(m_logger) << "Error while removing device config";
ERROR_LOG() << "Error while removing device config";
m_cache.remove(configId);
emit m_handler->avDbReloadNeeded();
@@ -178,7 +178,6 @@ private:
CnrHandler *m_handler;
DatabaseInterface *m_db;
QHash<int32_t, Database::AvmDeviceConfig> m_cache; //!< cnrConfig-Id -> AvmDeviceConfig
LOGGER_T m_logger;
};
@@ -190,7 +189,6 @@ CnrHandler::CnrHandler(Interface::Dts *dts, Interface::Fts *fts, InfrastructureM
, m_frequencyPlanningHandler(frequencyPlanningHandler)
, m_db(db)
, m_activeExercises(activeExercises)
, m_logger(getLogger("CombatNetRadioHandler"))
, m_deviceConfig(new DeviceConfig(this, db, m_logger))
{
Q_ASSERT(dts);
@@ -232,7 +230,7 @@ bool CnrHandler::init()
if (!m_db->select(m_channels))
{
ERROR_LOG(m_logger) << "Error while selecting cnr channels from db";
ERROR_LOG() << "Error while selecting cnr channels from db";
return false;
}
@@ -243,7 +241,7 @@ bool CnrHandler::init()
QVector<AvmCnrConfig> cnrConfigs;
if (!m_db->select(cnrConfigs))
{
ERROR_LOG(m_logger) << "Error while selecting CNR configs from db";
ERROR_LOG() << "Error while selecting CNR configs from db";
return false;
}
@@ -277,7 +275,7 @@ void CnrHandler::onRemoveCnrConfigRequest(const rti::core::SampleIdentity &cooki
{
auto ret = removeCnrConfig(request);
if (ret.error())
WARNING_LOG(m_logger) << ret();
WARNING_LOG() << ret();
m_fts->removeCnrConfigReply(cookie, ret);
}
@@ -286,19 +284,19 @@ void CnrHandler::onModifyCnrConfigRequest(const rti::core::SampleIdentity &cooki
{
auto ret = (request.id() < 1 ? createCnrConfig(request) : modifyCnrConfig(request));
if (ret.error())
WARNING_LOG(m_logger) << ret();
WARNING_LOG() << ret();
m_fts->modifyCnrConfigReply(cookie, ret);
}
void CnrHandler::onRadioStationAdded(int id, const QString &name, const QString &hostname)
{
DEBUG_LOG(m_logger) << "Adding radio station with id " << id << " (" << name << ") and hostname '" << hostname << "'";
DEBUG_LOG() << "Adding radio station with id " << id << " (" << name << ") and hostname '" << hostname << "'";
auto it = m_cnrRadioStations.find(id);
if (it != m_cnrRadioStations.end() && it.value() == hostname)
return;
if (hostname.isEmpty())
{
WARNING_LOG(m_logger) << "Radio station with id " << id << " (" << name << ") has an empty hostname - ignoring!";
WARNING_LOG() << "Radio station with id " << id << " (" << name << ") has an empty hostname - ignoring!";
return;
}
m_cnrRadioStations[id] = hostname;
@@ -307,7 +305,7 @@ void CnrHandler::onRadioStationAdded(int id, const QString &name, const QString
void CnrHandler::onRadioStationRemoved(int id)
{
DEBUG_LOG(m_logger) << "Removing radio station with id " << id;
DEBUG_LOG() << "Removing radio station with id " << id;
auto it = m_cnrRadioStations.find(id);
if (it == m_cnrRadioStations.end())
return;
@@ -349,7 +347,7 @@ void CnrHandler::onDbDeleteAvmCnrConfig(const QVariant &id)
if (!m_cache.contains(configId))
return; // the notification was a result of our own removal of the entry
DEBUG_LOG(m_logger) << "DB deleted AvmCnrConfig with id: " << configId;
DEBUG_LOG() << "DB deleted AvmCnrConfig with id: " << configId;
removeCnrConfig(Core::RemoveElementRequest(configId));
}
@@ -387,7 +385,7 @@ void CnrHandler::reevalutate()
{
auto reply = modifyCnrConfig(toRequest(cnrConfig));
if (reply.error())
ERROR_LOG(m_logger) << reply();
ERROR_LOG() << reply();
}
trans.commit();
@@ -560,7 +558,7 @@ bool CnrHandler::isNameUnique(const std::string &name, const boost::optional<int
*/
Core::FunctionReplyObject CnrHandler::createCnrConfig(const ModifyCnrConfigRequest &request, const boost::optional<int32_t> &dbId)
{
DEBUG_LOG(m_logger) << "CreateCnrConfigRequest: " << request;
DEBUG_LOG() << "CreateCnrConfigRequest: " << request;
auto reply = validateRequest(request);
if (reply.error())
@@ -588,7 +586,7 @@ Core::FunctionReplyObject CnrHandler::createCnrConfig(const ModifyCnrConfigReque
Core::FunctionReplyObject CnrHandler::modifyCnrConfig(const ModifyCnrConfigRequest &request)
{
DEBUG_LOG(m_logger) << "ModifyCnrConfigRequest: " << request;
DEBUG_LOG() << "ModifyCnrConfigRequest: " << request;
auto reply = validateRequest(request);
if (reply.error())
@@ -632,7 +630,7 @@ Core::FunctionReplyObject CnrHandler::modifyCnrConfig(const ModifyCnrConfigReque
Core::FunctionReplyObject CnrHandler::removeCnrConfig(const Core::RemoveElementRequest &request)
{
DEBUG_LOG(m_logger) << "RemoveCnrConfigRequest: " << request;
DEBUG_LOG() << "RemoveCnrConfigRequest: " << request;
int32_t configId = request.id();
Core::FunctionReplyObject reply(configId);
@@ -117,7 +117,6 @@ CnrTvcProfileHandler::CnrTvcProfileHandler(DatabaseInterface *db, Interface::Dts
, m_fts(fts)
, m_cnrHandler(cnrHandler)
, m_tvcHandler(tvcHandler)
, m_logger(getLogger("CnrTvcProfileHandler"))
{
Q_ASSERT(db);
Q_ASSERT(dts);
@@ -145,7 +144,7 @@ bool CnrTvcProfileHandler::init()
bool status = m_db->select(circuitContainersDb);
if (!status)
{
ERROR_LOG(m_logger) << "Error reading data from database 'avm.avm_cnr_tvc_profile'";
ERROR_LOG() << "Error reading data from database 'avm.avm_cnr_tvc_profile'";
return false;
}
@@ -175,7 +174,7 @@ bool CnrTvcProfileHandler::collectAndPublish(const Database::AvmCnrTvcProfile &c
bool status = m_db->selectByContainerId(circuitsContentDb, circuitContainerDb.id);
if (!status)
{
ERROR_LOG(m_logger) << "Error reading data from database 'avm.avm_cnr_tvc_profile_data'";
ERROR_LOG() << "Error reading data from database 'avm.avm_cnr_tvc_profile_data'";
return false;
}
@@ -186,7 +185,7 @@ bool CnrTvcProfileHandler::collectAndPublish(const Database::AvmCnrTvcProfile &c
{
status = m_db->removeAvmCnrTvcProfileData(invalid.id);
if (!status)
ERROR_LOG(m_logger) << "Failed to remove from 'avm.avm_cnr_tvc_profile_data' with id " << invalid.id;
ERROR_LOG() << "Failed to remove from 'avm.avm_cnr_tvc_profile_data' with id " << invalid.id;
auto newEnd = std::remove_if(circuitsContentDb.begin(), circuitsContentDb.end(), [&invalid] (const Database::AvmCnrTvcProfileData &circuit) { return circuit.id == invalid.id; });
circuitsContentDb.erase(newEnd, circuitsContentDb.end());
}
@@ -199,7 +198,7 @@ bool CnrTvcProfileHandler::collectAndPublish(const Database::AvmCnrTvcProfile &c
status = m_db->removeAvmCnrTvcProfile(circuitContainerDb.id);
if (!status)
{
ERROR_LOG(m_logger) << "Failed to remove from 'avm.avm_cnr_tvc_profile' with id " << circuitContainerDb.id;
ERROR_LOG() << "Failed to remove from 'avm.avm_cnr_tvc_profile' with id " << circuitContainerDb.id;
return false;
}
@@ -232,7 +231,7 @@ void CnrTvcProfileHandler::onModifyCnrTvcProfileRequest(const rti::core::SampleI
rep = modifyProfile(request);
if (rep.error())
WARNING_LOG(m_logger) << rep.str();
WARNING_LOG() << rep.str();
m_fts->modifyCnrTvcProfileReply(cookie, rep);
}
@@ -243,7 +242,7 @@ void CnrTvcProfileHandler::onRemoveCnrTvcProfileRequest(const rti::core::SampleI
Core::FunctionReplyObject rep = removeProfile(request);
if (rep.error())
WARNING_LOG(m_logger) << rep.str();
WARNING_LOG() << rep.str();
m_fts->removeCnrTvcProfileReply(cookie, rep);
}
@@ -362,7 +361,7 @@ void CnrTvcProfileHandler::addProfile(const CnrTvcProfile &profile)
bool status = m_dts->publish(profile);
if (!status)
ERROR_LOG(m_logger) << QStringLiteral("Failed to publish 'CnrTvcProfile' data with id %1 (create)").arg(profile.id());
ERROR_LOG() << QStringLiteral("Failed to publish 'CnrTvcProfile' data with id %1 (create)").arg(profile.id());
}
void CnrTvcProfileHandler::removeProfile(int64_t id)
@@ -376,7 +375,7 @@ void CnrTvcProfileHandler::removeProfile(int64_t id)
bool status = m_dts->removeCnrTvcProfileByKey(id);
if (!status)
ERROR_LOG(m_logger) << QStringLiteral("Failed to publish 'CnrTvcProfile' with id %1 (remove)").arg(id);
ERROR_LOG() << QStringLiteral("Failed to publish 'CnrTvcProfile' with id %1 (remove)").arg(id);
}
void CnrTvcProfileHandler::updateProfile(const CnrTvcProfile &profile)
@@ -394,7 +393,7 @@ void CnrTvcProfileHandler::updateProfile(const CnrTvcProfile &profile)
bool status = m_dts->publish(profile);
if (!status)
ERROR_LOG(m_logger) << QStringLiteral("Failed to publish 'CnrTvcProfile' data with id %1 (modify)").arg(profile.id());
ERROR_LOG() << QStringLiteral("Failed to publish 'CnrTvcProfile' data with id %1 (modify)").arg(profile.id());
}
void CnrTvcProfileHandler::onCnrConfigChanged(const CnrConfig &cnrConfig)
@@ -26,16 +26,15 @@ namespace AudioVideoManagement
DdsHandler::DdsHandler(int domainId)
: m_ddsConnector(std::make_shared<DDSConnector::DdsConnector>(domainId, IDL::PartitionType::Any))
, m_logger(getLogger("DdsHandler"))
{
DEBUG_LOG(m_logger) << "DdsHandler(" << domainId << ") for partition: " << m_ddsConnector->getDefaultPartition();
DEBUG_LOG() << "DdsHandler(" << domainId << ") for partition: " << m_ddsConnector->getDefaultPartition();
}
bool DdsHandler::init(const QStringList &qosFileList)
{
if (!m_ddsConnector->init(qosFileList))
{
ERROR_LOG(m_logger) << "Error initializing dds connections - aborting";
ERROR_LOG() << "Error initializing dds connections - aborting";
return false;
}
@@ -95,8 +95,6 @@ private:
std::shared_ptr<InfrastructureManagement::Interface::Dtc> m_ismDtc;
std::shared_ptr<AssetManagement::Interface::Dtc> m_asmDtc;
std::shared_ptr<Interface::Fts> m_fts;
NGL::INGLLogger &m_logger;
};
}
@@ -76,7 +76,6 @@ DefaultAvMenus::DefaultAvMenus(const ExerciseContext &context, Interface::Dts *d
, m_videoTeamHandler(handlerVideoTeams)
, m_ismDtc(ismDtc)
, m_timer(new QTimer)
, m_logger(getLogger("DefaultAvMenus"))
, m_isInitialized(false)
{
Q_ASSERT(dts);
@@ -10,7 +10,7 @@
#pragma once
#include "exercise_context.h"
#include "avm_export.h"
#include "svcavmcommon_export.h"
#include "asset.h"
#include "mounting_point.h"
#include <QObject>
@@ -9,7 +9,7 @@
#pragma once
#include "avm_export.h"
#include "svcavmcommon_export.h"
#include <boost/optional.hpp>
#include <QtGlobal>
#include <ostream>
@@ -44,7 +44,6 @@ ExerciseHandler::ExerciseHandler(MainHandler *mainHandler, int exerciseId)
, m_updateTimer(new QTimer(this))
, m_lastSeenTimer(new QTimer(this))
, m_bWarnedOnce(false)
, m_logger(getLogger("ExerciseHandler"))
{
m_updateTimer->setSingleShot(true);
connect(m_updateTimer, &QTimer::timeout, this, &ExerciseHandler::onUpdateTimerTimeout);
@@ -75,7 +74,7 @@ void ExerciseHandler::checkForRecordPlaybackSession()
m_recordSession.type = avTypeRecordSession();
if (!db()->insert(m_recordSession))
{
ERROR_LOG(m_logger) << m_exContext << " Error adding AvmDeviceConfig - aborting";
ERROR_LOG() << m_exContext << " Error adding AvmDeviceConfig - aborting";
return;
}
emit avDbReloadNeeded();
@@ -89,7 +88,7 @@ void ExerciseHandler::checkForRecordPlaybackSession()
m_replaySession.type = avTypePlaybackSession();
if (!db()->insert(m_replaySession))
{
ERROR_LOG(m_logger) << m_exContext << " Error adding AvmDeviceConfig - aborting";
ERROR_LOG() << m_exContext << " Error adding AvmDeviceConfig - aborting";
return;
}
emit avDbReloadNeeded();
@@ -99,7 +98,7 @@ void ExerciseHandler::checkForRecordPlaybackSession()
void ExerciseHandler::setNewExerciseState(ExerciseManagement::ExerciseState newState)
{
Q_ASSERT(newState != ExerciseManagement::ExerciseState::Unknown);
INFO_LOG(m_logger) << m_exContext << ": state change: " << m_curExerciseState << " -> " << newState;
INFO_LOG() << m_exContext << ": state change: " << m_curExerciseState << " -> " << newState;
if (m_curExerciseState == newState)
return;
@@ -121,12 +120,12 @@ void ExerciseHandler::setNewExerciseState(ExerciseManagement::ExerciseState newS
{
if (newIsActive)
{
DEBUG_LOG(m_logger) << m_exContext << " activated";
DEBUG_LOG() << m_exContext << " activated";
emit contextActivated();
}
else
{
DEBUG_LOG(m_logger) << m_exContext << " deactivated";
DEBUG_LOG() << m_exContext << " deactivated";
emit contextDeactivated();
}
}
@@ -164,12 +163,12 @@ void ExerciseHandler::onUpdateTimerTimeout()
if (m_curAVOperatingMode == desiredOperatingMode)
return;
DEBUG_LOG(m_logger) << "Context: " << m_exContext << " Try switching to " << desiredOperatingMode;
DEBUG_LOG() << "Context: " << m_exContext << " Try switching to " << desiredOperatingMode;
if (!avControl()->setOperatingModeForContext(m_exContext, desiredOperatingMode))
{
if (!m_bWarnedOnce)
{
DEBUG_LOG(m_logger) << "Context: " << m_exContext
DEBUG_LOG() << "Context: " << m_exContext
<< " - could not change operating mode, maybe not yet connected to AVS - trying again in 5 seconds";
m_bWarnedOnce = true;
}
@@ -206,7 +205,7 @@ void ExerciseHandler::onLastSeenTimerTimeout()
m_lastSeen.lastSeen.isNull() ||
m_lastSeen.lastSeen.addDays(1) < QDateTime::currentDateTimeUtc())
{
INFO_LOG(m_logger) << "Exercise with id " << m_exContext.id()
INFO_LOG() << "Exercise with id " << m_exContext.id()
<< " not seen since more than 1 day -> removing";
// not seen at all or not since more than 1 day -> remove
setNewExerciseState(ExerciseManagement::ExerciseState::Terminated);
@@ -225,13 +224,13 @@ void ExerciseHandler::onOperatingModeChanged(const ExerciseContext &context,
if (desiredOperatingMode != om)
{
DEBUG_LOG(m_logger) << "Context: " << context << " Got " << om
DEBUG_LOG() << "Context: " << context << " Got " << om
<< " for " << comp << " but expected " << desiredOperatingMode;
m_updateTimer->start(100);
}
else
{
DEBUG_LOG(m_logger) << "Context: " << context << " Got " << om
DEBUG_LOG() << "Context: " << context << " Got " << om
<< " for " << comp << " which is the expected value";
m_updateTimer->stop();
}
@@ -56,7 +56,6 @@ ExercisesHandler::ExercisesHandler(MainHandler *mainHandler)
: m_mainHandler(mainHandler)
, m_triggerAvUpdateTimer(new QTimer(this))
, m_assetAssignmentManager(AssetAssignmentManager::create(mainHandler->ddsHandler()->ismDtc()))
, m_logger(getLogger("ExercisesHandler"))
{
m_triggerAvUpdateTimer->setSingleShot(true);
m_triggerAvUpdateTimer->setInterval(1000);
@@ -99,7 +98,7 @@ bool ExercisesHandler::init()
connect(exmDtc(), &ExerciseManagement::Interface::Dtc::exerciseChanged,
this, &ExercisesHandler::onExerciseChanged);
DEBUG_LOG(m_logger) << LOGFUNCTION << " done";
DEBUG_LOG() << Q_FUNC_INFO << " done";
return true;
}
@@ -166,7 +165,7 @@ ExerciseHandler *ExercisesHandler::getOrCreateExerciseHandler(int exerciseId)
ExerciseHandler *ExercisesHandler::createExerciseHandler(int exerciseId)
{
DEBUG_LOG(m_logger) << "Creating handler for exercise " << exerciseId;
DEBUG_LOG() << "Creating handler for exercise " << exerciseId;
ExerciseParts parts(m_mainHandler, m_assetAssignmentManager->exercise(exerciseId));
ExerciseHandler *exH = parts.exerciseHandler();
@@ -98,7 +98,5 @@ private:
class ExerciseParts;
std::map<int, ExerciseParts> m_exercises;
NGL::INGLLogger &m_logger;
};
} // namespace WarehouseManagement
@@ -118,7 +118,6 @@ FrequencyPlanningHandler::FrequencyPlanningHandler(Interface::Dts *dts, Interfac
, m_db(db)
, m_frequencySetHandler(frequencySetHandler)
, m_activeExercises(activeExercises)
, m_logger(getLogger("FrequencyPlanningHandler"))
{
Q_ASSERT(dts);
Q_ASSERT(fts);
@@ -157,7 +156,7 @@ bool FrequencyPlanningHandler::init()
QVector<Database::AvmFrequencyPlanning> frequencyPlannings;
if (!m_db->select(frequencyPlannings))
{
ERROR_LOG(m_logger) << "Error while selecting frequency plannings from db";
ERROR_LOG() << "Error while selecting frequency plannings from db";
return false;
}
@@ -170,11 +169,11 @@ bool FrequencyPlanningHandler::init()
m_activePlannings.insert(exerciseId, currentDbData);
if (!m_dts->publish(ActiveFrequencyPlanning(exerciseId, currentDbData.frequencyPlanningId)))
ERROR_LOG(m_logger) << "Error while publishing ActiveFrequencyPlanning with ID " << exerciseId;
ERROR_LOG() << "Error while publishing ActiveFrequencyPlanning with ID " << exerciseId;
};
if (!m_db->select(cbAfp))
{
ERROR_LOG(m_logger) << "Error while selecting AvmActiveFrequencyPlannings from db";
ERROR_LOG() << "Error while selecting AvmActiveFrequencyPlannings from db";
return false;
}
@@ -186,7 +185,7 @@ void FrequencyPlanningHandler::onModifyFrequencyPlanningRequest(const rti::core:
{
auto ret = request.id() > 0 ? handleModify(request) : handleCreate(request);
if (ret.error())
WARNING_LOG(m_logger) << ret();
WARNING_LOG() << ret();
m_fts->modifyFrequencyPlanningReply(cookie, ret);
}
@@ -195,7 +194,7 @@ void FrequencyPlanningHandler::onRemoveFrequencyPlanningRequest(const rti::core:
{
auto ret = handleRemove(request);
if (ret.error())
WARNING_LOG(m_logger) << ret();
WARNING_LOG() << ret();
m_fts->removeFrequencyPlanningReply(cookie, ret);
}
@@ -204,7 +203,7 @@ void FrequencyPlanningHandler::onModifyActiveFrequencyPlanningRequest(const rti:
{
auto ret = modifyActiveFrequencyPlanningRequest(request);
if (ret.error())
WARNING_LOG(m_logger) << ret();
WARNING_LOG() << ret();
m_fts->modifyActiveFrequencyPlanningReply(cookie, ret);
}
@@ -213,7 +212,7 @@ void FrequencyPlanningHandler::onRemoveActiveFrequencyPlanningRequest(const rti:
{
auto ret = removeActiveFrequencyPlanningRequest(request);
if (ret.error())
WARNING_LOG(m_logger) << ret();
WARNING_LOG() << ret();
m_fts->removeActiveFrequencyPlanningReply(cookie, ret);
}
@@ -264,7 +263,7 @@ Core::FunctionReplyObject FrequencyPlanningHandler::handleCreate(const ModifyFre
status = m_db->insert(dbEntry);
if (!status)
{
WARNING_LOG(m_logger) << "Failed to insert new FrequencyPlanningData into DB";
WARNING_LOG() << "Failed to insert new FrequencyPlanningData into DB";
break;
}
dbEntries.push_back(dbEntry);
@@ -308,7 +307,7 @@ Q_ASSERT(request.id() > 0);
status = m_db->insert(dbEntry);
if (!status)
{
WARNING_LOG(m_logger) << "Failed to insert new FrequencyPlanningData into DB";
WARNING_LOG() << "Failed to insert new FrequencyPlanningData into DB";
break;
}
dbEntries.push_back(dbEntry);
@@ -445,7 +444,7 @@ std::vector<Database::AvmFrequencyPlanningData> FrequencyPlanningHandler::insert
Core::FunctionReplyObject FrequencyPlanningHandler::modifyActiveFrequencyPlanningRequest(const ModifyActiveFrequencyPlanningRequest &request)
{
DEBUG_LOG(m_logger) << "ModifyActiveFrequencyPlanningRequest: " << request;
DEBUG_LOG() << "ModifyActiveFrequencyPlanningRequest: " << request;
Core::FunctionReplyObject reply = validateRequest(request);
if (reply.error())
@@ -481,7 +480,7 @@ Core::FunctionReplyObject FrequencyPlanningHandler::modifyActiveFrequencyPlannin
Core::FunctionReplyObject FrequencyPlanningHandler::removeActiveFrequencyPlanningRequest(const RemoveActiveFrequencyPlanningRequest &request)
{
DEBUG_LOG(m_logger) << "RemoveActiveFrequencyPlanningRequest: " << request;
DEBUG_LOG() << "RemoveActiveFrequencyPlanningRequest: " << request;
Core::FunctionReplyObject reply(request.exerciseId());
@@ -669,7 +668,7 @@ bool FrequencyPlanningHandler::collectAndPublish(const Database::AvmFrequencyPla
bool status = m_db->selectByFrequencyPlanningId(dbEntries, planDb.id);
if (!status)
{
ERROR_LOG(m_logger) << "Error selecting AvmFrequencyPlanningData from db";
ERROR_LOG() << "Error selecting AvmFrequencyPlanningData from db";
return false;
}
@@ -692,7 +691,7 @@ void FrequencyPlanningHandler::addPlan(const FrequencyPlanning &plan)
bool status = m_dts->publish(plan);
if (!status)
ERROR_LOG(m_logger) << QStringLiteral("Failed to publish 'FrequencyPlanning' data with id %1 (create)").arg(plan.id());
ERROR_LOG() << QStringLiteral("Failed to publish 'FrequencyPlanning' data with id %1 (create)").arg(plan.id());
emit planningChanged();
}
@@ -707,7 +706,7 @@ void FrequencyPlanningHandler::updatePlan(const FrequencyPlanning &plan)
bool status = m_dts->publish(plan);
if (!status)
ERROR_LOG(m_logger) << QStringLiteral("Failed to publish 'FrequencyPlanning' data with id %1 (modify)").arg(plan.id());
ERROR_LOG() << QStringLiteral("Failed to publish 'FrequencyPlanning' data with id %1 (modify)").arg(plan.id());
emit planningChanged();
}
@@ -721,7 +720,7 @@ void FrequencyPlanningHandler::removePlan(int32_t planId)
bool status = m_dts->removeFrequencyPlanningByKey(planId);
if (!status)
ERROR_LOG(m_logger) << QStringLiteral("Failed to publish 'FrequencyPlanning' with id %1 (remove)").arg(planId);
ERROR_LOG() << QStringLiteral("Failed to publish 'FrequencyPlanning' with id %1 (remove)").arg(planId);
emit planningChanged();
}
@@ -19,7 +19,6 @@ namespace AudioVideoManagement
FrequencySetHandler::FrequencySetHandler(Interface::Dts *dts, DatabaseInterface *db)
: m_dts(dts)
, m_db(db)
, m_logger(getLogger("FrequencySetHandler"))
{
Q_ASSERT(dts);
Q_ASSERT(db);
@@ -27,16 +26,16 @@ FrequencySetHandler::FrequencySetHandler(Interface::Dts *dts, DatabaseInterface
bool FrequencySetHandler::init()
{
DEBUG_LOG(m_logger) << LOGFUNCTION;
DEBUG_LOG() << Q_FUNC_INFO;
QVector<Database::AvmFrequencySet> frequencySets;
// Don't use select() with callback here as the callback (body of for-loop below) would use the DB, too.
if (!m_db->select(frequencySets))
{
ERROR_LOG(m_logger) << "Error while selecting frequency sets from db";
ERROR_LOG() << "Error while selecting frequency sets from db";
return false;
}
DEBUG_LOG(m_logger) << "Found " << frequencySets.size() << " Frequency Sets";
DEBUG_LOG() << "Found " << frequencySets.size() << " Frequency Sets";
for (const Database::AvmFrequencySet &currentfrequencySet : std::as_const(frequencySets))
addFrequencySet(toDdsFrequencySet(currentfrequencySet));
@@ -67,7 +66,7 @@ FrequencySet FrequencySetHandler::toDdsFrequencySet(const Database::AvmFrequency
};
m_db->selectByFrequencySetId(cb, result.id());
DEBUG_LOG(m_logger) << "Frequency Set with ID " << dbData.id << " has " << result.data().size() << " data entries";
DEBUG_LOG() << "Frequency Set with ID " << dbData.id << " has " << result.data().size() << " data entries";
return result;
}
@@ -123,7 +122,7 @@ void FrequencySetHandler::addFrequencySet(const FrequencySet &frequencySet)
m_frequencySetDatas.insert(frequencySet.id(), dataIds);
if (!m_dts->publish(frequencySet))
ERROR_LOG(m_logger) << "Error while publishing Frequency Set with id " << frequencySet.id();
ERROR_LOG() << "Error while publishing Frequency Set with id " << frequencySet.id();
}
} // namespace AudioVideoManagement
@@ -54,7 +54,6 @@ HandlerFrequencyPlanningStatus::HandlerFrequencyPlanningStatus(Interface::Dts *d
, m_dts(dts)
, m_fts(fts)
, m_db(db)
, m_logger(getLogger("HandlerFrequencyPlanningStatus"))
{
Q_ASSERT(dts);
Q_ASSERT(fts);
@@ -77,7 +76,7 @@ bool HandlerFrequencyPlanningStatus::init()
// read all HandlerFrequencyPlanningStatus Data from database
if (!m_db->select(dataVec))
{
ERROR_LOG(m_logger) << "Error reading data from database!";
ERROR_LOG() << "Error reading data from database!";
return false;
}
@@ -90,7 +89,7 @@ bool HandlerFrequencyPlanningStatus::init()
if (ret.error())
{
delete ifs;
ERROR_LOG(m_logger) << ret();
ERROR_LOG() << ret();
return false;
}
m_data.insert(ifs->getData().client(), ifs);
@@ -102,10 +101,10 @@ bool HandlerFrequencyPlanningStatus::init()
void HandlerFrequencyPlanningStatus::onModifyFrequencyPlanningStatusRequest(const rti::core::SampleIdentity &cookie,
const ModifyFrequencyPlanningStatusRequest &request)
{
DEBUG_LOG(m_logger) << "onModifyFrequencyPlanningStatusRequest: " << request;
DEBUG_LOG() << "onModifyFrequencyPlanningStatusRequest: " << request;
auto ret = m_data.contains(request.client()) ? frequencyPlanningStatusModifyRequest(request) : frequencyPlanningStatusCreateRequest(request);
if (ret.error())
WARNING_LOG(m_logger) << ret();
WARNING_LOG() << ret();
m_fts->modifyFrequencyPlanningStatusReply(cookie, ret);
}
@@ -133,7 +132,7 @@ void HandlerFrequencyPlanningStatus::onRemoveFrequencyPlanningStatusByClientRequ
int client = ifs->getData().client();
ret = ifs->removeObject();
if (ret.error())
ERROR_LOG(m_logger) << ret();
ERROR_LOG() << ret();
else
clients << client;
}
@@ -106,7 +106,6 @@ HandlerMenuStruct::HandlerMenuStruct(Interface::Dts *dts, Interface::Fts *fts, D
, m_dts(dts)
, m_fts(fts)
, m_db(db)
, m_logger(getLogger("HandlerMenuStruct"))
{
Q_ASSERT(dts);
Q_ASSERT(fts);
@@ -223,10 +222,10 @@ QList<MenuStruct> HandlerMenuStruct::loadFromDb(bool &status)
void HandlerMenuStruct::onModifyMenuStructRequest(const rti::core::SampleIdentity &cookie,
const MenuStruct &request)
{
DEBUG_LOG(m_logger) << "onModifyMenuStructRequest: " << request;
DEBUG_LOG() << "onModifyMenuStructRequest: " << request;
auto ret = request.id() > 0 ? modifyMenuStructRequest(request) : createMenuStructRequest(request);
if (ret.error())
WARNING_LOG(m_logger) << ret();
WARNING_LOG() << ret();
m_fts->modifyMenuStructReply(cookie, ret);
}
@@ -234,7 +233,7 @@ Core::FunctionReplyObject HandlerMenuStruct::createMenuStructRequest(const MenuS
{
ObjectMenuStruct *ifs = new ObjectMenuStruct(m_dts, m_db);
DEBUG_LOG(m_logger) << "request.menuEntries.size() : " << request.menuEntries().size();
DEBUG_LOG() << "request.menuEntries.size() : " << request.menuEntries().size();
Core::FunctionReplyObject ret = ifs->createFromDds(request);
if (ret.error())
@@ -264,7 +263,7 @@ void HandlerMenuStruct::onRemoveMenuStructRequest(const rti::core::SampleIdentit
{
Core::FunctionReplyObject ret;
INFO_LOG(m_logger) << "onRemoveMenuStructRequest id = " << request.id();
INFO_LOG() << "onRemoveMenuStructRequest id = " << request.id();
ObjectMenuStruct *ifs = m_objMap.value(request.id());
if (ifs == nullptr)
@@ -288,7 +287,7 @@ void HandlerMenuStruct::onRemoveMenuStructRequest(const rti::core::SampleIdentit
void HandlerMenuStruct::onDbDeletedAvmMenuStruct(const QVariant &id_)
{
int id = id_.toInt();
DEBUG_LOG(m_logger) << "DB deleted AvmMenuStruct with id: " << id;
DEBUG_LOG() << "DB deleted AvmMenuStruct with id: " << id;
reload();
}
@@ -34,7 +34,6 @@ HandlerVideoReceiver::HandlerVideoReceiver(MainHandler *mainHandler,
, m_dts(dts)
, m_fts(fts)
, m_db(db)
, m_logger(getLogger("HandlerVideoReceiver"))
{
m_fts->setVideoReceiverModifyActiveRequestHandler(this);
m_fts->setVideoReceiverModifyAvsRequestHandler(this);
@@ -64,7 +63,7 @@ bool HandlerVideoReceiver::init()
// read all VideoReceiver Data from database
if (!m_db->select(dataVec))
{
ERROR_LOG(m_logger) << "Error reading data from database!";
ERROR_LOG() << "Error reading data from database!";
return true;
}
@@ -77,13 +76,13 @@ bool HandlerVideoReceiver::init()
if (ret.error())
{
delete ifs;
ERROR_LOG(m_logger) << ret();
ERROR_LOG() << ret();
return false;
}
m_videoReceiverObjMap.insert(ifs->getId(), ifs);
}
DEBUG_LOG(m_logger) << "m_videoReceiverObjMap.size() = " << m_videoReceiverObjMap.size();
DEBUG_LOG() << "m_videoReceiverObjMap.size() = " << m_videoReceiverObjMap.size();
m_httpRequestTimer.setInterval(std::chrono::milliseconds(20000).count());
m_httpRequestTimer.setSingleShot(false);
@@ -100,10 +99,10 @@ bool HandlerVideoReceiver::init()
void HandlerVideoReceiver::onVideoReceiverModifyRequest(const rti::core::SampleIdentity &cookie,
const VideoReceiverModifyRequest &request)
{
DEBUG_LOG(m_logger) << "onVideoReceiverModifyRequest: " << request;
DEBUG_LOG() << "onVideoReceiverModifyRequest: " << request;
auto ret = request.id() > 0 ? videoReceiverModifyRequest(request) : videoReceiverCreateRequest(request);
if (ret.error())
WARNING_LOG(m_logger) << ret();
WARNING_LOG() << ret();
m_fts->videoReceiverModifyReply(cookie, ret);
}
@@ -111,10 +110,10 @@ void HandlerVideoReceiver::onVideoReceiverModifyRequest(const rti::core::SampleI
void HandlerVideoReceiver::onVideoReceiverModifyActiveRequest(const rti::core::SampleIdentity &cookie,
const VideoReceiverModifyActiveRequest &request)
{
DEBUG_LOG(m_logger) << "onVideoReceiverModifyActiveRequest";
DEBUG_LOG() << "onVideoReceiverModifyActiveRequest";
auto ret = videoReceiverModifyActiveRequest(request);
if (ret.error())
WARNING_LOG(m_logger) << ret();
WARNING_LOG() << ret();
else
// activate channel here
activateChannel(request.id(), request.isActive());
@@ -127,7 +126,7 @@ void HandlerVideoReceiver::onVideoReceiverModifyAvsRequest(const rti::core::Samp
{
auto ret = videoReceiverModifyAvsRequest(request);
if (ret.error())
WARNING_LOG(m_logger) << ret();
WARNING_LOG() << ret();
m_fts->videoReceiverModifyAvsReply(cookie, ret);
}
@@ -177,7 +176,7 @@ VideoReceiver HandlerVideoReceiver::convertActive(const VideoReceiverModifyActiv
//--------------------------------------------------------------------------------------------------
Core::FunctionReplyObject HandlerVideoReceiver::videoReceiverModifyRequest(const VideoReceiverModifyRequest &request)
{
DEBUG_LOG(m_logger) << "videoReceiverModifyRequest";
DEBUG_LOG() << "videoReceiverModifyRequest";
ObjectVideoReceiver *ifs = m_videoReceiverObjMap.value(request.id());
if (ifs == nullptr)
return Core::FunctionReplyObject(request.id(), tr_lts("dds", "Video Receiver with id %1 not found")).arg(request.id());
@@ -243,7 +242,7 @@ void HandlerVideoReceiver::onVideoReceiverRemoveRequest(const rti::core::SampleI
ret = ifs->removeObject();
if (ret.error())
ERROR_LOG(m_logger) << ret();
ERROR_LOG() << ret();
else
{
// delete ObjectVideoReceiver
@@ -269,13 +268,13 @@ void HandlerVideoReceiver::onGetStatus()
ObjectVideoReceiver *objectVideoReceiver = i.value();
QString host = QString::fromStdString(objectVideoReceiver->getData().hostName()).toLower();
DEBUG_LOG(m_logger) << " streamName=" << objectVideoReceiver->getData().streamName()
DEBUG_LOG() << " streamName=" << objectVideoReceiver->getData().streamName()
<< " hostName=" << host
<< " teamId=" << objectVideoReceiver->getData().teamId();
if ((objectVideoReceiver->getData().teamId() == 1)
&& (!m_receiver.contains(host)))
{
DEBUG_LOG(m_logger) << " onSendHttpRequest host=" << host << " key=" << i.key()
DEBUG_LOG() << " onSendHttpRequest host=" << host << " key=" << i.key()
<< " id=" << objectVideoReceiver->getData().id();
m_receiver.insert(host, i.key());
onSendHttpRequest(i.key());
@@ -285,7 +284,7 @@ void HandlerVideoReceiver::onGetStatus()
void HandlerVideoReceiver::onSendHttpRequest(const int key)
{
INFO_LOG(m_logger) << "onSendHttpRequest key=" << key;
INFO_LOG() << "onSendHttpRequest key=" << key;
//request = QStringLiteral("http://localhost/set_param?remuxBitrate=90.0");
//request = QStringLiteral("http://localhost/status.json");
@@ -298,7 +297,7 @@ void HandlerVideoReceiver::onSendHttpRequest(const int key)
void HandlerVideoReceiver::startRequest(const QUrl &requestedUrl)
{
INFO_LOG(m_logger) << "startRequest:" << requestedUrl.toString();
INFO_LOG() << "startRequest:" << requestedUrl.toString();
m_httpRequestAborted = false;
@@ -318,22 +317,22 @@ void HandlerVideoReceiver::onHttpFinished(QNetworkReply *reply)
const QByteArray replyData = reply->readAll();
INFO_LOG(m_logger) << "Answer = " << replyData
INFO_LOG() << "Answer = " << replyData
<< " size = " << replyData.size()
<< " url=" << urlString
<< " host=" << host;
m_receiver.remove(host);
if (reply->error())
{
ERROR_LOG(m_logger) << "Cannot connect to VideoReceiver";
ERROR_LOG(m_logger) << "reply->error: " << reply->errorString();
ERROR_LOG() << "Cannot connect to VideoReceiver";
ERROR_LOG() << "reply->error: " << reply->errorString();
reply->deleteLater();
return;
}
// Success
INFO_LOG(m_logger) << "Connected to VideoReceiver ";
INFO_LOG() << "Connected to VideoReceiver ";
// Keine Antwort vom Receiver
if (replyData.size() == 0)
@@ -367,10 +366,10 @@ void HandlerVideoReceiver::onHttpFinished(QNetworkReply *reply)
const QJsonObject jsonObject = doc.object();
//QJsonDocument doc(jsonObject);
//QStringList keyList = jsonObject.keys();
//DEBUG_LOG(m_logger) << "keyList.size()" << keyList.size() ;
//DEBUG_LOG() << "keyList.size()" << keyList.size() ;
//for (int i = 0; i < keyList.size(); ++i)
// DEBUG_LOG(m_logger) << keyList.at(i).toLocal8Bit().constData() ;
//DEBUG_LOG(m_logger) << doc.toJson(QJsonDocument::Indented);
// DEBUG_LOG() << keyList.at(i).toLocal8Bit().constData() ;
//DEBUG_LOG() << doc.toJson(QJsonDocument::Indented);
/////////////////////
double snrA = 0;
double snrB = 0;
@@ -383,7 +382,7 @@ void HandlerVideoReceiver::onHttpFinished(QNetworkReply *reply)
int freqencyB = jsonObject[QStringLiteral("inputFrequency2")].toInt();
// 0 = Off, 1 = Channel1, 2 = Channel2, 3 = Channel1 + Channel2
int remuxInputMask = jsonObject[QStringLiteral("remuxInputMask")].toInt();
INFO_LOG(m_logger) << "lockstatusA = " << lockstatusA
INFO_LOG() << "lockstatusA = " << lockstatusA
<< " lockstatusB = " << lockstatusB
<< " freqencyA=" << freqencyA
<< " freqencyB=" << freqencyB
@@ -464,7 +463,7 @@ void HandlerVideoReceiver::onHttpFinished(QNetworkReply *reply)
double tmpLevel = ((-40 - powerLevelA) / 60) * 100;
powerLevelA = 100.0 - tmpLevel;
}
DEBUG_LOG(m_logger) << "Channel 1: snrA=" << snrA
DEBUG_LOG() << "Channel 1: snrA=" << snrA
<< " powerLevelA " << powerLevelA;
// send Topic LTS_VideoReceiver
@@ -532,7 +531,7 @@ void HandlerVideoReceiver::onHttpFinished(QNetworkReply *reply)
double tmpLevel = ((-40 - powerLevelB) / 60) * 100;
powerLevelB = 100.0 - tmpLevel;
}
DEBUG_LOG(m_logger) << "Channel 2: snrB=" << snrB
DEBUG_LOG() << "Channel 2: snrB=" << snrB
<< " powerLevelB " << powerLevelB;
// Der Key von Receiver2 folgt immer dem von Receiver 1
updateObject(key + 1, powerLevelB, snrB, lockstatusB, freqencyB);
@@ -546,7 +545,7 @@ void HandlerVideoReceiver::onHttpFinished(QNetworkReply *reply)
{
i.next();
ObjectVideoReceiver *objectVideoReceiver = i.value();
DEBUG_LOG(m_logger) << "key=" << i.key()
DEBUG_LOG() << "key=" << i.key()
<< " : value.Id=" << objectVideoReceiver->getId()
<< " mse=" << objectVideoReceiver->getData().mainStructureElementId()
<< " streamName=" << objectVideoReceiver->getData().streamName()
@@ -590,7 +589,7 @@ void HandlerVideoReceiver::activateChannel(const int channelId, const bool activ
int active2 = 0;
int active = 0;
int id = 0;
DEBUG_LOG(m_logger) << "activateChannel channelId=" << channelId
DEBUG_LOG() << "activateChannel channelId=" << channelId
<< " activate = " << activate
<< " hostname = " << hostName
<< " teamId = " << m_videoReceiverObjMap.value(channelId)->getData().teamId();
@@ -599,7 +598,7 @@ void HandlerVideoReceiver::activateChannel(const int channelId, const bool activ
if (!m_videoReceiverObjMap.contains(channelId))
{
ERROR_LOG(m_logger) << "channelId " << channelId << " does not exist";
ERROR_LOG() << "channelId " << channelId << " does not exist";
return;
}
@@ -609,7 +608,7 @@ void HandlerVideoReceiver::activateChannel(const int channelId, const bool activ
active1 = activate;
if (!m_videoReceiverObjMap.contains(id + 1))
{
ERROR_LOG(m_logger) << "channelId " << id + 1 << " does not exist";
ERROR_LOG() << "channelId " << id + 1 << " does not exist";
return;
}
active2 = m_videoReceiverObjMap.value(id + 1)->getData().isActive();
@@ -623,7 +622,7 @@ void HandlerVideoReceiver::activateChannel(const int channelId, const bool activ
active2 = activate;
}
active = active1 + active2 * 2;
DEBUG_LOG(m_logger) << "activateChannel hostname=" << hostName
DEBUG_LOG() << "activateChannel hostname=" << hostName
<< " active1=" << active1
<< " active2=" << active2
<< " active=" << active;
@@ -643,7 +642,7 @@ void HandlerVideoReceiver::checkActiveState(const int key, const int remuxInputM
ObjectVideoReceiver *channel1 = m_videoReceiverObjMap.value(key);
if (channel1 == nullptr )
{
ERROR_LOG(m_logger) << "checkActiveState key=" << key
ERROR_LOG() << "checkActiveState key=" << key
<< " remuxInputMask=" << remuxInputMask << " channel1 == nullptr";
return;
}
@@ -652,7 +651,7 @@ void HandlerVideoReceiver::checkActiveState(const int key, const int remuxInputM
ObjectVideoReceiver *channel2 = m_videoReceiverObjMap.value(key + 1);
int channel2Active = channel2->getData().isActive();
int active = channel1Active + channel2Active * 2;
DEBUG_LOG(m_logger) << "checkActiveState "
DEBUG_LOG() << "checkActiveState "
<< " key=" << key
<< " active=" << active
<< " remuxInputMask=" << remuxInputMask
@@ -664,7 +663,7 @@ void HandlerVideoReceiver::checkActiveState(const int key, const int remuxInputM
{
bool activate = channel1Active;
activateChannel(key, activate);
DEBUG_LOG(m_logger) << "checkActiveState Send HTTP-Request activateChannel"
DEBUG_LOG() << "checkActiveState Send HTTP-Request activateChannel"
<< " key=" << key
<< " activate=" << activate;
}
@@ -673,7 +672,7 @@ void HandlerVideoReceiver::checkActiveState(const int key, const int remuxInputM
{
bool activate = channel2Active;
activateChannel(key + 1, activate);
DEBUG_LOG(m_logger) << "checkActiveState Send HTTP-Request activateChannel"
DEBUG_LOG() << "checkActiveState Send HTTP-Request activateChannel"
<< " key=" << key + 1
<< " activate=" << activate
<< " channel2Active=" << channel2Active
@@ -37,7 +37,7 @@ public:
Database::AvmDeviceConfig deviceConfig = toDeviceConfig(videoTeam);
if (!m_db->insert(deviceConfig))
ERROR_LOG(m_logger) << "Error while inserting device config into database";
ERROR_LOG() << "Error while inserting device config into database";
m_cache.insert(videoTeam.id(), deviceConfig);
emit m_handler->avDbReloadNeeded();
@@ -53,7 +53,7 @@ public:
deviceConfig.id = oldDeviceConfig.id;
if (!m_db->update(deviceConfig))
ERROR_LOG(m_logger) << "Error while updating device config";
ERROR_LOG() << "Error while updating device config";
m_cache[videoTeam.id()] = deviceConfig;
emit m_handler->avDbReloadNeeded();
@@ -73,7 +73,7 @@ public:
Q_ASSERT(found != m_cache.end());
if (!m_db->removeAvmDeviceConfig(found->id))
ERROR_LOG(m_logger) << "Error while removing device config";
ERROR_LOG() << "Error while removing device config";
m_cache.erase(found);
emit m_handler->avDbReloadNeeded();
@@ -101,7 +101,6 @@ private:
QMap<int32_t, Database::AvmDeviceConfig> m_cache; //!< <VideoTeam::id, Database::DeviceConfig>
HandlerVideoTeam *m_handler;
DatabaseInterface *m_db;
LOGGER_T m_logger;
};
@@ -112,7 +111,6 @@ HandlerVideoTeam::HandlerVideoTeam(Interface::Dts *dts, Interface::Fts *fts, Dat
, m_fts(fts)
, m_db(db)
, m_activeExercises(activeExercises)
, m_logger(getLogger("HandlerVideoTeam"))
, m_deviceConfig(new DeviceConfig(this, db, m_logger))
{
Q_ASSERT(dts);
@@ -139,7 +137,7 @@ bool HandlerVideoTeam::init()
// read all VideoTeam Data from database
if (!m_db->select(dataVec))
{
ERROR_LOG(m_logger) << "Error reading data from database!";
ERROR_LOG() << "Error reading data from database!";
return false;
}
@@ -152,7 +150,7 @@ bool HandlerVideoTeam::init()
if (ret.error())
{
delete ifs;
ERROR_LOG(m_logger) << ret();
ERROR_LOG() << ret();
return false;
}
m_videoTeamObjMap.insert(ifs->getId(), ifs);
@@ -161,7 +159,7 @@ bool HandlerVideoTeam::init()
m_deviceConfig->create(ddsData);
}
DEBUG_LOG(m_logger) << "m_VideoTeamObjMap.size() = " << m_videoTeamObjMap.size();
DEBUG_LOG() << "m_VideoTeamObjMap.size() = " << m_videoTeamObjMap.size();
return true;
}
@@ -178,10 +176,10 @@ QMap<int, VideoTeam> HandlerVideoTeam::videoTeams() const
void HandlerVideoTeam::onVideoTeamModifyRequest(const rti::core::SampleIdentity &cookie,
const VideoTeamModifyRequest &request)
{
DEBUG_LOG(m_logger) << "onVideoTeamModifyRequest: " << request;
DEBUG_LOG() << "onVideoTeamModifyRequest: " << request;
auto ret = request.id() > 0 ? videoTeamModifyRequest(request) : videoTeamCreateRequest(request);
if (ret.error())
WARNING_LOG(m_logger) << ret();
WARNING_LOG() << ret();
m_fts->videoTeamModifyReply(cookie, ret);
}
@@ -234,7 +232,7 @@ Core::FunctionReplyObject HandlerVideoTeam::videoTeamModifyRequest(const VideoTe
ObjectVideoTeam *ifs = m_videoTeamObjMap.value(request.id());
if (ifs == nullptr)
return Core::FunctionReplyObject(request.id(), tr_lts("dds", "Video Team with id %1 not found")).arg(request.id());
DEBUG_LOG(m_logger) << "on Modify Request" << request.streamName() << " ID: " << request.name() << " exId " << request.exerciseId();
DEBUG_LOG() << "on Modify Request" << request.streamName() << " ID: " << request.name() << " exId " << request.exerciseId();
VideoTeam ddsData = convert(request, ifs->getData());
if (needDeviceConfig(ddsData))
@@ -10,7 +10,7 @@
#pragma once
#include "ava_types.h"
#include "avm_export.h"
#include "svcavmcommon_export.h"
#include <boost/optional.hpp>
@@ -9,7 +9,7 @@
#pragma once
#include <AudioVideoManagement/avm_export.h>
#include "svcavmcommon_export.h"
#include <QObject>
namespace AudioVideoManagement
@@ -10,7 +10,7 @@
#pragma once
#include "ava_types.h"
#include "avm_export.h"
#include "svcavmcommon_export.h"
#include <QList>
#include <QObject>
#include <chrono>
@@ -11,7 +11,7 @@
#include "iava_comm.h"
#include "ava_types.h"
#include "avm_export.h"
#include "svcavmcommon_export.h"
#include <QVector>
#include <QList>
#include <QObject>
@@ -9,7 +9,7 @@
#pragma once
#include <NGLLogger/INGLLogger.h>
#include "avm_export.h"
#include "svcavmcommon_export.h"
namespace AudioVideoManagement
{
@@ -38,7 +38,6 @@ using namespace AudioVideoManagement;
MainHandler::MainHandler(QObject *parent)
: QObject(parent)
, m_logger(getLogger("MainHandler"))
{}
MainHandler::~MainHandler() = default;
@@ -49,7 +48,7 @@ bool MainHandler::init(int domainId)
m_dbHandler.reset(new DbHandler());
if (!m_dbHandler->init(0, Settings::settings()))
{
ERROR_LOG(m_logger) << "Initialisation dbHandler failed.";
ERROR_LOG() << "Initialisation dbHandler failed.";
return false;
}
m_dbInterface = m_dbHandler->db();
@@ -58,7 +57,7 @@ bool MainHandler::init(int domainId)
m_ddsHandler.reset(new DdsHandler(domainId));
if (!m_ddsHandler->init())
{
ERROR_LOG(m_logger) << "Initialisation ddsHandler failed.";
ERROR_LOG() << "Initialisation ddsHandler failed.";
return false;
}
@@ -83,7 +82,7 @@ bool MainHandler::init(int domainId)
connect(m_videoTeamHandler.get(), &HandlerVideoTeam::avDbReloadNeeded, m_exHandler.get(), &ExercisesHandler::onAvDbReloadNeeded);
if (!m_videoTeamHandler->init())
{
ERROR_LOG(m_logger) << "Initialisation HandlerVideoTeam failed.";
ERROR_LOG() << "Initialisation HandlerVideoTeam failed.";
m_ddsHandler->pacemaker()->setNewState(Core::RunningState::StartingError);
return false;
}
@@ -91,7 +90,7 @@ bool MainHandler::init(int domainId)
m_frequencyPlanningStatusHandler.reset(new HandlerFrequencyPlanningStatus(m_ddsHandler->dts(), m_ddsHandler->fts(), m_dbInterface.get()));
if (!m_frequencyPlanningStatusHandler->init())
{
ERROR_LOG(m_logger) << "Initialisation HandlerFrequencyPlanningStatus failed.";
ERROR_LOG() << "Initialisation HandlerFrequencyPlanningStatus failed.";
m_ddsHandler->pacemaker()->setNewState(Core::RunningState::StartingError);
return false;
}
@@ -109,7 +108,7 @@ bool MainHandler::init(int domainId)
connect(m_tvcHandler.get(), &TvcHandler::avDbReloadNeeded, m_exHandler.get(), &ExercisesHandler::onAvDbReloadNeeded);
if (!m_tvcHandler->init())
{
ERROR_LOG(m_logger) << "Initialisation tvcHandler failed";
ERROR_LOG() << "Initialisation tvcHandler failed";
m_ddsHandler->pacemaker()->setNewState(Core::RunningState::StartingError);
return false;
}
@@ -117,7 +116,7 @@ bool MainHandler::init(int domainId)
m_frequencySetHandler.reset(new FrequencySetHandler(m_ddsHandler->dts(), m_dbInterface.get()));
if (!m_frequencySetHandler->init())
{
ERROR_LOG(m_logger) << "Initialisation FrequencySetHandler failed";
ERROR_LOG() << "Initialisation FrequencySetHandler failed";
m_ddsHandler->pacemaker()->setNewState(Core::RunningState::StartingError);
return false;
}
@@ -131,14 +130,14 @@ bool MainHandler::init(int domainId)
m_frequencyPlanningHandler->setCnrHandler(m_cnrHandler.get());
if (!m_frequencyPlanningHandler->init())
{
ERROR_LOG(m_logger) << "Initialisation FrequencyPlanningHandler failed";
ERROR_LOG() << "Initialisation FrequencyPlanningHandler failed";
m_ddsHandler->pacemaker()->setNewState(Core::RunningState::StartingError);
return false;
}
if (!m_cnrHandler->init())
{
ERROR_LOG(m_logger) << "Initialisation cnrHandler failed";
ERROR_LOG() << "Initialisation cnrHandler failed";
m_ddsHandler->pacemaker()->setNewState(Core::RunningState::StartingError);
return false;
}
@@ -146,7 +145,7 @@ bool MainHandler::init(int domainId)
m_cnrTvcProfileHandler.reset(new CnrTvcProfileHandler(m_dbInterface.get(), m_ddsHandler->dts(), m_ddsHandler->fts(), m_cnrHandler.get(), m_tvcHandler.get()));
if (!m_cnrTvcProfileHandler->init())
{
ERROR_LOG(m_logger) << "Initialisation RadioCircuitsHandler failed";
ERROR_LOG() << "Initialisation RadioCircuitsHandler failed";
m_ddsHandler->pacemaker()->setNewState(Core::RunningState::StartingError);
return false;
}
@@ -157,7 +156,7 @@ bool MainHandler::init(int domainId)
m_videoReceiverHandler.reset(new HandlerVideoReceiver(this, m_ddsHandler->dts(), m_ddsHandler->fts(), m_dbInterface.get()));
if (!m_videoReceiverHandler->init())
{
ERROR_LOG(m_logger) << "Initialisation HandlerVideoReceiver failed.";
ERROR_LOG() << "Initialisation HandlerVideoReceiver failed.";
m_ddsHandler->pacemaker()->setNewState(Core::RunningState::StartingError);
return false;
}
@@ -166,7 +165,7 @@ bool MainHandler::init(int domainId)
if (!m_ddsHandler->enableDtcClients())
{
ERROR_LOG(m_logger) << "Initialisation DTCs failed.";
ERROR_LOG() << "Initialisation DTCs failed.";
m_ddsHandler->pacemaker()->setNewState(Core::RunningState::StartingError);
return false;
}
@@ -78,8 +78,6 @@ private:
std::unique_ptr<HandlerVideoReceiver> m_videoReceiverHandler;
std::unique_ptr<HandlerVideoTeam> m_videoTeamHandler;
std::unique_ptr<HandlerFrequencyPlanningStatus> m_frequencyPlanningStatusHandler;
NGL::INGLLogger &m_logger;
};
} // namespace AudioVideoManagement
@@ -9,7 +9,7 @@
#pragma once
#include "avm_export.h"
#include "svcavmcommon_export.h"
#include <QObject>
#include <memory>
@@ -16,7 +16,6 @@ ObjectFrequencyPlanningStatus::ObjectFrequencyPlanningStatus(Interface::Dts *dts
DatabaseInterface *db)
: m_dts(dts)
, m_db(db)
, m_logger(getLogger("ObjectVideoTeam"))
{
}
@@ -63,7 +62,7 @@ Core::FunctionReplyObject ObjectFrequencyPlanningStatus::createObjectFromDDS(con
return Core::FunctionReplyObject(data.id(), tr_lts("dds", "Error updating VideoTeam into database"));
m_data.id() = dbData.id;
DEBUG_LOG(m_logger) << "Data changed for VideoTeam Id: " << m_data.id();
DEBUG_LOG() << "Data changed for VideoTeam Id: " << m_data.id();
// Publish Data via DTS
onPublishData();
@@ -83,7 +82,7 @@ Core::FunctionReplyObject ObjectFrequencyPlanningStatus::updateObject(const Freq
if (!m_db->update(dbData))
return Core::FunctionReplyObject(data.id(), tr_lts("dds", "Error updating FrequencyPlanningStatus into database"));
DEBUG_LOG(m_logger) << "Data changed for FrequencyPlanningStatus Id: " << data.id();
DEBUG_LOG() << "Data changed for FrequencyPlanningStatus Id: " << data.id();
// Publish Data via DTS
onPublishData();
@@ -105,10 +104,10 @@ Core::FunctionReplyObject ObjectFrequencyPlanningStatus::removeObject()
//-------------------------------------------------------------------------------------------------------------
void ObjectFrequencyPlanningStatus::onPublishData()
{
INFO_LOG(m_logger) << "Publish ObjectFrequencyPlanningStatus to dds (" << m_data.id() << ") ..." << m_data.client() << ") ...";
INFO_LOG() << "Publish ObjectFrequencyPlanningStatus to dds (" << m_data.id() << ") ..." << m_data.client() << ") ...";
if (!m_dts->publish(m_data))
ERROR_LOG(m_logger) << "Error publishing ObjectFrequencyPlanningStatus to dds";
ERROR_LOG() << "Error publishing ObjectFrequencyPlanningStatus to dds";
}
//-------------------------------------------------------------------------------------------------------------
@@ -13,7 +13,7 @@
#include "logger.h"
#include <AudioVideoManagement/avm_dts.h>
#include <AudioVideoManagement/avm_db.h>
#include <DDS/Core/function_reply_object.h>
#include <DDS/Core/core_types.h>
#include <ngldb/dbtransaction.h>
#include <vector>
#include <set>
@@ -78,7 +78,6 @@ namespace AudioVideoManagement
ObjectMenuStruct::ObjectMenuStruct(Interface::Dts *dts, DatabaseInterface *db)
: m_dts(dts)
, m_db(db)
, m_logger(getLogger("ObjectMenuStruct"))
{
Q_ASSERT(dts);
Q_ASSERT(db);
@@ -128,10 +127,10 @@ Core::FunctionReplyObject ObjectMenuStruct::remove()
{
DBTransaction trans(m_db->database());
INFO_LOG(m_logger) << "menuEntries.size(): " << m_data.menuEntries().size();
INFO_LOG() << "menuEntries.size(): " << m_data.menuEntries().size();
for (const AudioVideoManagement::AvMenuEntry &me : m_data.menuEntries())
{
INFO_LOG(m_logger) << "Remove entries with id/parentId: " << me.id();
INFO_LOG() << "Remove entries with id/parentId: " << me.id();
// no recursion needed, only 2 levels allowed
if (me.isGroup())
if (!m_db->removeAvmMenuStructByParentId(me.id()))
@@ -152,10 +151,10 @@ Core::FunctionReplyObject ObjectMenuStruct::remove()
void ObjectMenuStruct::onPublishData()
{
INFO_LOG(m_logger) << "Publish MenuStruct-data to dds (" << m_data.id() << ") ...";
INFO_LOG() << "Publish MenuStruct-data to dds (" << m_data.id() << ") ...";
if (!m_dts->publish(m_data))
ERROR_LOG(m_logger) << "Error publishing MenuStruct-data to dds";
ERROR_LOG() << "Error publishing MenuStruct-data to dds";
}
@@ -199,7 +198,7 @@ Core::FunctionReplyObject ObjectMenuStruct::insertUpdateDb(const MenuStruct &dat
if (ret.error())
return ret;
DEBUG_LOG(m_logger) << "old entries: " << m_data;
DEBUG_LOG() << "old entries: " << m_data;
for (const AvMenuEntry &me : oldEntries)
{
// new entries - ignore
@@ -209,14 +208,14 @@ Core::FunctionReplyObject ObjectMenuStruct::insertUpdateDb(const MenuStruct &dat
auto found = std::find_if(newEntries.begin(), newEntries.end(), [&me] (const AvMenuEntry &newEntry) { return me.id() == newEntry.id(); });
if (found == newEntries.end())
{
DEBUG_LOG(m_logger) << "Menu Entry with id not found - was removed: " << me.id();
DEBUG_LOG() << "Menu Entry with id not found - was removed: " << me.id();
m_db->removeAvmMenuStruct(me.id());
}
}
m_data.menuEntries(newEntries);
HandlerMenuStruct::sortEntries(m_data);
DEBUG_LOG(m_logger) << "new entries: " << m_data;
DEBUG_LOG() << "new entries: " << m_data;
trans.commit();
return Core::FunctionReplyObject(m_data.id());
@@ -62,8 +62,6 @@ private:
Interface::Dts *m_dts;
DatabaseInterface *m_db;
MenuStruct m_data;
NGL::INGLLogger &m_logger;
};
} // namespace AudioVideoManagement
@@ -17,7 +17,6 @@ ObjectVideoReceiver::ObjectVideoReceiver(Interface::Dts *dts,
DatabaseInterface *db)
: m_dts(dts)
, m_db(db)
, m_logger(getLogger("ObjectVideoReceiver"))
{
}
@@ -39,7 +38,7 @@ Core::FunctionReplyObject ObjectVideoReceiver::createObject(const VideoReceiver
return Core::FunctionReplyObject(0, tr_lts("dds", "Error inserting AvmVideoReceiver-data into database"));
m_data.id(dbData.id);
DEBUG_LOG(m_logger) << "New Id: " << m_data.id();
DEBUG_LOG() << "New Id: " << m_data.id();
}
// Publish Data via DTS
@@ -52,7 +51,7 @@ Core::FunctionReplyObject ObjectVideoReceiver::createObject(const VideoReceiver
Core::FunctionReplyObject ObjectVideoReceiver::updateObject(const VideoReceiver &data)
{
m_data = data;
DEBUG_LOG(m_logger) << "ObjectVideoReceiver::updateObject id=" << data.id()
DEBUG_LOG() << "ObjectVideoReceiver::updateObject id=" << data.id()
<< " isActive=" << data.isActive()
<< " hostName=" << data.hostName()
<< " isLocked=" << data.isLocked();
@@ -63,7 +62,7 @@ Core::FunctionReplyObject ObjectVideoReceiver::updateObject(const VideoReceiver
return Core::FunctionReplyObject(data.id(), tr_lts("dds", "Error updating VideoReceiver2 into database"));
DEBUG_LOG(m_logger) << "Data changed for VideoReceiver Id: " << data.id();
DEBUG_LOG() << "Data changed for VideoReceiver Id: " << data.id();
// Publish Data via DTS
onPublishData();
@@ -86,10 +85,10 @@ Core::FunctionReplyObject ObjectVideoReceiver::removeObject()
//-------------------------------------------------------------------------------------------------------------
void ObjectVideoReceiver::onPublishData()
{
INFO_LOG(m_logger) << "Publish MvsVideoReceiver-data to dds (" << m_data.id() << ") ...";
INFO_LOG() << "Publish MvsVideoReceiver-data to dds (" << m_data.id() << ") ...";
if (!m_dts->publish(m_data))
ERROR_LOG(m_logger) << "Error publishing MvsVideoReceiver-data to dds";
ERROR_LOG() << "Error publishing MvsVideoReceiver-data to dds";
}
//-------------------------------------------------------------------------------------------------------------
@@ -16,7 +16,6 @@ ObjectVideoTeam::ObjectVideoTeam(Interface::Dts *dts,
DatabaseInterface *db)
: m_dts(dts)
, m_db(db)
, m_logger(getLogger("ObjectVideoTeam"))
{
}
@@ -50,7 +49,7 @@ Core::FunctionReplyObject ObjectVideoTeam::updateObject(const VideoTeam &data)
if (!m_db->update(dbData))
return Core::FunctionReplyObject(data.id(), tr_lts("dds", "Error updating VideoTeam into database"));
DEBUG_LOG(m_logger) << "Data changed for VideoTeam Id: " << data.id();
DEBUG_LOG() << "Data changed for VideoTeam Id: " << data.id();
// Publish Data via DTS
onPublishData();
@@ -60,10 +59,10 @@ Core::FunctionReplyObject ObjectVideoTeam::updateObject(const VideoTeam &data)
//-------------------------------------------------------------------------------------------------------------
void ObjectVideoTeam::onPublishData()
{
INFO_LOG(m_logger) << "Publish AvmVideoTeam-data to dds (" << m_data.id() << ") ...";
INFO_LOG() << "Publish AvmVideoTeam-data to dds (" << m_data.id() << ") ...";
if (!m_dts->publish(m_data))
ERROR_LOG(m_logger) << "Error publishing AvmVideoTeam-data to dds";
ERROR_LOG() << "Error publishing AvmVideoTeam-data to dds";
}
//-------------------------------------------------------------------------------------------------------------
@@ -9,7 +9,7 @@
#pragma once
#include "avm_export.h"
#include "svcavmcommon_export.h"
#include "ava_types.h"
#include <AudioVideoManagement/avm_enums.hpp>
#include <boost/optional.hpp>
@@ -9,7 +9,7 @@
#pragma once
#include "avm_export.h"
#include "svcavmcommon_export.h"
#include <QObject>
#include <QString>
#include <QRegExp>
@@ -9,7 +9,7 @@
#pragma once
#include "avm_export.h"
#include "svcavmcommon_export.h"
#include <QObject>
#include <cstdint>
@@ -98,7 +98,7 @@ public:
Database::AvmDeviceConfig deviceConfig = toDeviceConfig(config);
if (!m_db->insert(deviceConfig))
ERROR_LOG(m_logger) << "Error while inserting device config into database";
ERROR_LOG() << "Error while inserting device config into database";
m_cache.insert(config.id(), deviceConfig);
emit m_handler->avDbReloadNeeded();
@@ -114,7 +114,7 @@ public:
deviceConfig.id = oldDeviceConfig.id;
if (!m_db->update(deviceConfig))
ERROR_LOG(m_logger) << "Error while updating device config";
ERROR_LOG() << "Error while updating device config";
m_cache[config.id()] = deviceConfig;
emit m_handler->avDbReloadNeeded();
@@ -140,7 +140,7 @@ public:
Q_ASSERT(found != m_cache.end());
if (!m_db->removeAvmDeviceConfig(found->id))
ERROR_LOG(m_logger) << "Error while removing device config";
ERROR_LOG() << "Error while removing device config";
m_cache.erase(found);
emit m_handler->avDbReloadNeeded();
@@ -156,7 +156,6 @@ private:
TvcHandler *m_handler;
DatabaseInterface *m_db;
QMap<int32_t, Database::AvmDeviceConfig> m_cache; // <TvcConfig::id, Database::DeviceConfig>
LOGGER_T m_logger;
};
@@ -167,7 +166,6 @@ TvcHandler::TvcHandler(Interface::Dts *dts, Interface::Fts *fts, DatabaseInterfa
, m_fts(fts)
, m_db(db)
, m_activeExercises(activeExercises)
, m_logger(getLogger("TrainingVoiceCommunicationHandler"))
, m_deviceConfig(new DeviceConfig(this, m_db, m_logger))
{
Q_ASSERT(dts);
@@ -198,7 +196,7 @@ bool TvcHandler::init()
if (!m_db->select(m_channels))
{
ERROR_LOG(m_logger) << "Error while selecting tetra channels from db";
ERROR_LOG() << "Error while selecting tetra channels from db";
return false;
}
@@ -209,7 +207,7 @@ bool TvcHandler::init()
if (!m_db->select(tvcConfigs))
{
ERROR_LOG(m_logger) << "Error while selecting TVC configs from db";
ERROR_LOG() << "Error while selecting TVC configs from db";
return false;
}
@@ -234,23 +232,23 @@ const TvcConfig &TvcHandler::config(int32_t id) const
void TvcHandler::onModifyTvcConfigRequest(const rti::core::SampleIdentity &cookie,
const ModifyTvcConfigRequest &request)
{
DEBUG_LOG(m_logger) << "onModifyTvcConfigRequest: " << request;
DEBUG_LOG() << "onModifyTvcConfigRequest: " << request;
Q_ASSERT(request.id() >= 0);
auto ret = request.id() > 0 ? modifyTvcConfig(request) : createTvcConfig(request);
if (ret.error())
WARNING_LOG(m_logger) << ret();
WARNING_LOG() << ret();
m_fts->modifyTvcConfigReply(cookie, ret);
}
void TvcHandler::onRemoveTvcConfigRequest(const rti::core::SampleIdentity &cookie,
const Core::RemoveElementRequest &request)
{
DEBUG_LOG(m_logger) << "onRemoveTvcConfigRequest" << request;
DEBUG_LOG() << "onRemoveTvcConfigRequest" << request;
Core::FunctionReplyObject rep = removeTvcConfig(request);
if (rep.error())
WARNING_LOG(m_logger) << rep.translated();
WARNING_LOG() << rep.translated();
m_fts->removeTvcConfigReply(cookie, rep);
}
@@ -483,7 +481,7 @@ void TvcHandler::onDbDeleteAvmTvcConfig(const QVariant &id)
if (!m_cache.contains(configId))
return; // the notification was a result of our own removal of the entry
DEBUG_LOG(m_logger) << "DB deleted AvmTvcConfig with id: " << configId;
DEBUG_LOG() << "DB deleted AvmTvcConfig with id: " << configId;
removeTvcConfig(Core::RemoveElementRequest(configId));
}
@@ -22,7 +22,6 @@ namespace AudioVideoManagement
VdComm::VdComm(const QString &vdHost, quint16 vdPort)
: m_avSocket(vdHost, vdPort, getLogger("VdComm"), getLogger("VdComm.IO"))
, m_logger(getLogger("VdComm"))
, m_loggerIO(getLogger("VdComm.IO"))
{
connect(&m_avSocket, &AVSocketWrapper::readyRead, this, &VdComm::onReadyRead);
@@ -65,7 +64,7 @@ void VdComm::vdSetScript(const QString &scriptName, AvaStreamType typ, int fileS
static const QString cmd = QStringLiteral(R"(VDSetScript "%1" %2 %3 "%4" "%5" "%6")");
TRACE_LOG(m_loggerIO) << "New Export Script: '" << cmd << "'";
TRACE_LOG(m_logger) << "New Export Script: '" << cmd << "'";
TRACE_LOG() << "New Export Script: '" << cmd << "'";
m_avSocket.send(cmd.arg(scriptName).arg(static_cast<int>(typ)).arg(QString::number(fileSplitting), streamList.join(QLatin1Char('\n')),
exportedDirBaseName, absolutePath).toUtf8());
@@ -138,7 +137,7 @@ void VdComm::parseResponse(const QByteArray &line)
break;
default:
DEBUG_LOG(m_logger) << "Response not implemented: " << line;
DEBUG_LOG() << "Response not implemented: " << line;
}
}
@@ -11,7 +11,7 @@
#include "ivd_comm.h"
#include "ava_types.h"
#include "avm_export.h"
#include "svcavmcommon_export.h"
#include "logger.h"
#include <AudioVideoManagement/av_socket.h>
#include <QList>
@@ -25,7 +25,6 @@ namespace AudioVideoManagement
VdControl::VdControl(IVdComm *comm, std::chrono::milliseconds commandTimeout)
: m_comm(comm)
, m_queue(commandTimeout)
, m_logger(getLogger("VdControl"))
{
Q_ASSERT(comm);
@@ -59,13 +58,13 @@ void VdControl::keepAlive()
void VdControl::onConnected()
{
m_connected = true;
DEBUG_LOG(m_logger) << "connected";
DEBUG_LOG() << "connected";
}
void VdControl::onDisconnected()
{
m_connected = false;
DEBUG_LOG(m_logger) << "disconnected";
DEBUG_LOG() << "disconnected";
m_queue.flush();
}
@@ -74,12 +73,12 @@ void VdControl::onTimeout()
ICommand *cmd = m_queue.currentCommand();
if (cmd->canTimeout())
{
INFO_LOG(m_logger) << "command '" << cmd->debug() << "' failed";
INFO_LOG() << "command '" << cmd->debug() << "' failed";
m_queue.done();
return;
}
ERROR_LOG(m_logger) << "command timed out";
ERROR_LOG() << "command timed out";
failed(cmd);
}
@@ -98,7 +97,7 @@ void VdControl::queue(ICommand *cmd, LtsUtils::IConnection *connection)
if (!m_connected)
{
DEBUG_LOG(m_logger) << "not connected -> dropping command";
DEBUG_LOG() << "not connected -> dropping command";
return;
}
@@ -128,7 +127,7 @@ void VdControl::done(AvaCommands::VdSetScript *cmd)
void VdControl::failed(ICommand *cmd)
{
ERROR_LOG(m_logger) << "command '" << cmd->debug() << "' failed";
ERROR_LOG() << "command '" << cmd->debug() << "' failed";
Q_ASSERT(cmd == m_queue.currentCommand());
m_queue.flush();
m_comm->forceDisconnect();
@@ -10,7 +10,7 @@
#pragma once
#include "ivd_command_done_observer.h"
#include "avm_export.h"
#include "svcavmcommon_export.h"
#include "ava_types.h"
#include "avs_command_queue.h"
#include "logger.h"
@@ -18,7 +18,6 @@ VdSession::VdSession(VdControl *ctrl, int exerciseId, bool keepAliveEnabled)
: m_ctrl(ctrl)
, m_exerciseId(exerciseId)
, m_keepAliveEnabled(keepAliveEnabled)
, m_logger(getLogger("AvaSession"))
{
Q_ASSERT(ctrl);
@@ -37,7 +36,7 @@ void VdSession::onConnected()
m_established = true;
if (m_keepAliveEnabled)
m_keepAliveTimer.start();
DEBUG_LOG(m_logger) << "session established";
DEBUG_LOG() << "session established";
emit sessionEstablished();
}
@@ -45,7 +44,7 @@ void VdSession::onDisconnected()
{
m_keepAliveTimer.stop();
m_established = false;
DEBUG_LOG(m_logger) << "disconnected";
DEBUG_LOG() << "disconnected";
emit disconnected();
}
@@ -9,7 +9,7 @@
#pragma once
#include "avm_export.h"
#include "svcavmcommon_export.h"
#include "logger.h"
#include <QObject>
#include <QString>