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:
2785 files changed
+18754
-18316
No files matched your search
@@ -32,7 +32,7 @@ CODEGEN_TOPIC_TYPEDEFS(SRCS_common ${xml_FILE})
|
||||
# generate asm_[d|f]tc.h
|
||||
CODEGEN_CLIENT_TOPICS_IFC(SRCS_common ${xml_FILE})
|
||||
|
||||
NGL_ADD_LIBRARY(AAR SV WS HLA svcAsmCommon SHARED ${SRCS_common})
|
||||
NGL_ADD_LIBRARY2(AAR SV WS HLA svcAsmCommon SHARED ${SRCS_common})
|
||||
NGL_TARGET_INCLUDE_DIRECTORIES(svcAsmCommon
|
||||
PUBLIC
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/../
|
||||
@@ -62,7 +62,7 @@ SET(SRCS_client
|
||||
# generate asm_ftc_impl.[cpp|h]
|
||||
CODEGEN_CLIENT_TOPICS_IMPL(SRCS_client ${xml_FILE})
|
||||
|
||||
NGL_ADD_LIBRARY(WS AAR SV svcAsmClient SHARED ${SRCS_client})
|
||||
NGL_ADD_LIBRARY2(WS AAR SV svcAsmClient SHARED ${SRCS_client})
|
||||
NGL_TARGET_INCLUDE_DIRECTORIES(svcAsmClient
|
||||
PUBLIC
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/../
|
||||
@@ -91,7 +91,7 @@ SET(SRCS_server
|
||||
# generate asm_[d|f]ts.h, asm_[d|f]ts_impl.[cpp|h]
|
||||
CODEGEN_SERVER_TOPICS(SRCS_server ${xml_FILE})
|
||||
|
||||
NGL_ADD_LIBRARY(WS AAR SV svcAsmServer SHARED ${SRCS_server})
|
||||
NGL_ADD_LIBRARY2(WS AAR SV svcAsmServer SHARED ${SRCS_server})
|
||||
NGL_TARGET_INCLUDE_DIRECTORIES(svcAsmServer
|
||||
PUBLIC
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/../
|
||||
|
||||
+16
-17
@@ -32,7 +32,6 @@ AsmTests::AsmTests(QObject *parent)
|
||||
, m_trainingAreaId(0)
|
||||
, m_testId(0)
|
||||
, m_bTestsSuccessful(true)
|
||||
, m_logger(getLogger("Test"))
|
||||
{
|
||||
qRegisterMetaType<Core::FunctionReply>("Core::FunctionReply");
|
||||
}
|
||||
@@ -44,7 +43,7 @@ AsmTests::~AsmTests()
|
||||
// ------------------------------------------------------------------
|
||||
bool AsmTests::init(int domainId, int trainingAreaId, int testId)
|
||||
{
|
||||
INFO_LOG(m_logger) << "init begin";
|
||||
INFO_LOG() << "init begin";
|
||||
|
||||
m_testId = testId;
|
||||
m_trainingAreaId = trainingAreaId; // overwritten when new exercise created
|
||||
@@ -57,15 +56,15 @@ bool AsmTests::init(int domainId, int trainingAreaId, int testId)
|
||||
}
|
||||
m_ddsConnector->initPublisherSubscriber();
|
||||
|
||||
DEBUG_LOG(m_logger) << "create ftc";
|
||||
DEBUG_LOG() << "create ftc";
|
||||
m_ftc = AssetManagement::Interface::Ftc::create(m_ddsConnector);
|
||||
DEBUG_LOG(m_logger) << "init ftc";
|
||||
DEBUG_LOG() << "init ftc";
|
||||
bool bRet = m_ftc->enableAll();
|
||||
DEBUG_LOG(m_logger) << "init end - bRet = " << bRet;
|
||||
DEBUG_LOG() << "init end - bRet = " << bRet;
|
||||
|
||||
DEBUG_LOG(m_logger) << "Domain Id = " << domainId;
|
||||
DEBUG_LOG(m_logger) << "Training Area Id = " << trainingAreaId;
|
||||
DEBUG_LOG(m_logger) << "Test Id = " << testId;
|
||||
DEBUG_LOG() << "Domain Id = " << domainId;
|
||||
DEBUG_LOG() << "Training Area Id = " << trainingAreaId;
|
||||
DEBUG_LOG() << "Test Id = " << testId;
|
||||
|
||||
if (!bRet)
|
||||
failExit();
|
||||
@@ -75,7 +74,7 @@ bool AsmTests::init(int domainId, int trainingAreaId, int testId)
|
||||
// ------------------------------------------------------------------
|
||||
void AsmTests::startTest()
|
||||
{
|
||||
INFO_LOG(m_logger) << "startTest";
|
||||
INFO_LOG() << "startTest";
|
||||
if (m_testId == 1)
|
||||
QTimer::singleShot(0, this, &AsmTests::tryCreate);
|
||||
else if (m_testId == 2)
|
||||
@@ -182,7 +181,7 @@ void AsmTests::setRequestData(AssetManagement::TrainingAreaModifyRequest &reques
|
||||
// ------------------------------------------------------------------
|
||||
void AsmTests::tryCreate()
|
||||
{
|
||||
INFO_LOG(m_logger) << "trying to send ModifyRequest TrainingArea (create)";
|
||||
INFO_LOG() << "trying to send ModifyRequest TrainingArea (create)";
|
||||
|
||||
AssetManagement::TrainingAreaModifyRequest request;
|
||||
|
||||
@@ -190,7 +189,7 @@ void AsmTests::tryCreate()
|
||||
|
||||
if (!m_ftc->trainingAreaModifyRequest(request, this))
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Error requesting create data";
|
||||
ERROR_LOG() << "Error requesting create data";
|
||||
failExit();
|
||||
}
|
||||
|
||||
@@ -202,13 +201,13 @@ void AsmTests::tryCreate()
|
||||
void AsmTests::tryModify()
|
||||
{
|
||||
AssetManagement::TrainingAreaModifyRequest request;
|
||||
INFO_LOG(m_logger) << "trying to send modify request for training Area Id = " << m_trainingAreaId;
|
||||
INFO_LOG() << "trying to send modify request for training Area Id = " << m_trainingAreaId;
|
||||
|
||||
setRequestData(request, m_trainingAreaId);
|
||||
|
||||
if (!m_ftc->trainingAreaModifyRequest(request, this))
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Error requesting modify data";
|
||||
ERROR_LOG() << "Error requesting modify data";
|
||||
failExit();
|
||||
}
|
||||
|
||||
@@ -219,10 +218,10 @@ void AsmTests::tryModify()
|
||||
// ------------------------------------------------------------------
|
||||
void AsmTests::tryDelete()
|
||||
{
|
||||
INFO_LOG(m_logger) << "trying to send delete request for exercise Id = " << m_trainingAreaId;
|
||||
INFO_LOG() << "trying to send delete request for exercise Id = " << m_trainingAreaId;
|
||||
if (!m_ftc->trainingAreaRemoveRequest(TrainingAreaRemoveRequest(m_trainingAreaId), this))
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Error requesting delete data";
|
||||
ERROR_LOG() << "Error requesting delete data";
|
||||
failExit();
|
||||
}
|
||||
|
||||
@@ -233,7 +232,7 @@ void AsmTests::tryDelete()
|
||||
// ------------------------------------------------------------------
|
||||
void AsmTests::onTrainingAreaModifyReply(const Core::FunctionReplyObject &replyObject)
|
||||
{
|
||||
INFO_LOG(m_logger) << "Got modifyReply with id " << replyObject.id()
|
||||
INFO_LOG() << "Got modifyReply with id " << replyObject.id()
|
||||
<< " and errorString " << replyObject.translated();
|
||||
|
||||
if (replyObject.error())
|
||||
@@ -247,7 +246,7 @@ void AsmTests::onTrainingAreaModifyReply(const Core::FunctionReplyObject &replyO
|
||||
// ------------------------------------------------------------------
|
||||
void AsmTests::onTrainingAreaRemoveReply(const Core::FunctionReplyObject &replyObject)
|
||||
{
|
||||
INFO_LOG(m_logger) << "Got removeReply with id " << replyObject.id()
|
||||
INFO_LOG() << "Got removeReply with id " << replyObject.id()
|
||||
<< " and errorString " << replyObject.translated();
|
||||
|
||||
if (replyObject.error())
|
||||
|
||||
-1
@@ -47,7 +47,6 @@ LtsWebSocket::AbstractClientMessage *ClientMessageFactory::createMessage(LtsWebS
|
||||
ClientMessage::ClientMessage(DataManager *dataManager, LtsWebSocket::ReplyHandler *client, const QString &type, const int typeId, const QString &uuid, const QJsonValue &data)
|
||||
: LtsWebSocket::AbstractClientMessage(client, type, typeId, uuid, data)
|
||||
, m_dataManager(dataManager)
|
||||
, m_logger(getLogger("ClientMessage"))
|
||||
{}
|
||||
// ####### ClientMessage end #######
|
||||
|
||||
|
||||
+6
-7
@@ -24,7 +24,6 @@ WebSocketInterfaceHandler::WebSocketInterfaceHandler(MainHandler *mainHandler, Q
|
||||
, m_messageFactory(nullptr)
|
||||
, m_dataManager(nullptr)
|
||||
, m_mainHandler(mainHandler)
|
||||
, m_logger(getLogger("WebSocketInterfaceHandler"))
|
||||
{
|
||||
}
|
||||
|
||||
@@ -37,7 +36,7 @@ bool WebSocketInterfaceHandler::init()
|
||||
{
|
||||
cleanup();
|
||||
|
||||
DEBUG_LOG(m_logger) << "... ok";
|
||||
DEBUG_LOG() << "... ok";
|
||||
|
||||
m_dataManager = new DataManager(m_mainHandler);
|
||||
|
||||
@@ -45,16 +44,16 @@ bool WebSocketInterfaceHandler::init()
|
||||
|
||||
m_webSocketServer = new LtsWebSocket::LtsWebSocketServer(m_messageFactory, this);
|
||||
|
||||
DEBUG_LOG(m_logger) << "Initialising LtsWebSocketServer";
|
||||
DEBUG_LOG() << "Initialising LtsWebSocketServer";
|
||||
if (!m_webSocketServer->init(QStringLiteral("ASM"), Settings::getWebSocketServerPortRange(1)))
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Failed to initialise LtsWebSocketServer";
|
||||
ERROR_LOG() << "Failed to initialise LtsWebSocketServer";
|
||||
return false;
|
||||
}
|
||||
DEBUG_LOG(m_logger) << "... ok";
|
||||
DEBUG_LOG() << "... ok";
|
||||
|
||||
DEBUG_LOG(m_logger) << "Connection signals and slots";
|
||||
DEBUG_LOG(m_logger) << "... ok";
|
||||
DEBUG_LOG() << "Connection signals and slots";
|
||||
DEBUG_LOG() << "... ok";
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -15,16 +15,15 @@ namespace AssetManagement
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
@@ -39,10 +38,10 @@ bool DdsHandler::init(const QStringList &qosFileList)
|
||||
m_ddsDts = AssetManagement::Interface::Dts::create(m_ddsConnector);
|
||||
m_ddsFts = AssetManagement::Interface::Fts::create(m_ddsConnector);
|
||||
bool bRet = m_ddsDts->enableAll();
|
||||
INFO_LOG(m_logger) << "Dts initialised";
|
||||
INFO_LOG() << "Dts initialised";
|
||||
|
||||
bRet &= m_ddsFts->enableAll();
|
||||
INFO_LOG(m_logger) << "Fts initialised";
|
||||
INFO_LOG() << "Fts initialised";
|
||||
|
||||
return bRet;
|
||||
}
|
||||
|
||||
@@ -42,8 +42,6 @@ private:
|
||||
std::shared_ptr<Core::TopicLockMaster> m_topicLockMaster;
|
||||
std::shared_ptr<AssetManagement::Interface::Dts> m_ddsDts;
|
||||
std::shared_ptr<AssetManagement::Interface::Fts> m_ddsFts;
|
||||
|
||||
NGL::INGLLogger &m_logger;
|
||||
};
|
||||
|
||||
}
|
||||
@@ -18,7 +18,6 @@ HandlerAsset::HandlerAsset(MainHandler *mainHandler, QObject *parent)
|
||||
, Interface::Fts::AssetModifyRequestHandler(mainHandler->dds()->fts())
|
||||
, Interface::Fts::AssetRemoveRequestHandler(mainHandler->dds()->fts())
|
||||
, m_mainHandler(mainHandler)
|
||||
, m_logger(getLogger("HandlerAsset"))
|
||||
{
|
||||
}
|
||||
|
||||
@@ -40,7 +39,7 @@ bool HandlerAsset::init()
|
||||
if (ret.error())
|
||||
{
|
||||
delete ifs;
|
||||
ERROR_LOG(m_logger) << ret();
|
||||
ERROR_LOG() << ret();
|
||||
bRet = false;
|
||||
return;
|
||||
}
|
||||
@@ -48,11 +47,11 @@ bool HandlerAsset::init()
|
||||
};
|
||||
if (!m_mainHandler->db()->select(cb) || !bRet)
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Error reading data from database!";
|
||||
ERROR_LOG() << "Error reading data from database!";
|
||||
return false;
|
||||
}
|
||||
|
||||
DEBUG_LOG(m_logger) << "m_objectAssetMap.size() = " << m_objectAssetMap.size();
|
||||
DEBUG_LOG() << "m_objectAssetMap.size() = " << m_objectAssetMap.size();
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -63,7 +62,7 @@ void HandlerAsset::onAssetModifyRequest(const rti::core::SampleIdentity &cookie,
|
||||
{
|
||||
const auto ret = assetModifyRequest(request);
|
||||
if (ret.error())
|
||||
WARNING_LOG(m_logger) << ret();
|
||||
WARNING_LOG() << ret();
|
||||
m_mainHandler->dds()->fts()->assetModifyReply(cookie, ret);
|
||||
}
|
||||
|
||||
@@ -115,7 +114,7 @@ void HandlerAsset::onAssetRemoveRequest(const rti::core::SampleIdentity &cookie,
|
||||
ret = ifs->removeObject();
|
||||
|
||||
if (ret.error())
|
||||
ERROR_LOG(m_logger) << ret();
|
||||
ERROR_LOG() << ret();
|
||||
else
|
||||
{
|
||||
// delete ObjectAsset
|
||||
|
||||
@@ -39,7 +39,5 @@ private:
|
||||
private:
|
||||
QHash<int, ObjectAsset *> m_objectAssetMap;
|
||||
MainHandler *m_mainHandler;
|
||||
NGL::INGLLogger &m_logger;
|
||||
|
||||
};
|
||||
}
|
||||
@@ -31,7 +31,6 @@ static inline Location toDdsData(const Database::AsmLocation &dbData)
|
||||
|
||||
HandlerLocation::HandlerLocation(MainHandler *mainHandler)
|
||||
: m_mainHandler(mainHandler)
|
||||
, m_logger(getLogger("HandlerLocation"))
|
||||
{
|
||||
}
|
||||
|
||||
@@ -46,11 +45,11 @@ bool HandlerLocation::init()
|
||||
};
|
||||
if (!m_mainHandler->db()->select(cb))
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Error reading data from database!";
|
||||
ERROR_LOG() << "Error reading data from database!";
|
||||
return false;
|
||||
}
|
||||
|
||||
DEBUG_LOG(m_logger) << "#Locations published: " << iCnt;
|
||||
DEBUG_LOG() << "#Locations published: " << iCnt;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -20,7 +20,5 @@ public:
|
||||
bool init();
|
||||
private:
|
||||
MainHandler *m_mainHandler;
|
||||
NGL::INGLLogger &m_logger;
|
||||
|
||||
};
|
||||
}
|
||||
@@ -18,7 +18,6 @@ HandlerRelayInfo::HandlerRelayInfo(MainHandler *mainHandler, QObject *parent)
|
||||
, Interface::Fts::RelayInfoModifyRequestHandler(mainHandler->dds()->fts())
|
||||
, Interface::Fts::RelayInfoRemoveRequestHandler(mainHandler->dds()->fts())
|
||||
, m_mainHandler(mainHandler)
|
||||
, m_logger(getLogger("HandlerRelayInfo"))
|
||||
{
|
||||
}
|
||||
|
||||
@@ -40,7 +39,7 @@ bool HandlerRelayInfo::init()
|
||||
if (ret.error())
|
||||
{
|
||||
delete ifs;
|
||||
ERROR_LOG(m_logger) << ret();
|
||||
ERROR_LOG() << ret();
|
||||
bRet = false;
|
||||
return;
|
||||
}
|
||||
@@ -48,11 +47,11 @@ bool HandlerRelayInfo::init()
|
||||
};
|
||||
if (!m_mainHandler->db()->select(cb) || !bRet)
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Error reading data from database!";
|
||||
ERROR_LOG() << "Error reading data from database!";
|
||||
return false;
|
||||
}
|
||||
|
||||
DEBUG_LOG(m_logger) << "m_objectRelayInfoMap.size() = " << m_objectRelayInfoMap.size();
|
||||
DEBUG_LOG() << "m_objectRelayInfoMap.size() = " << m_objectRelayInfoMap.size();
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -63,7 +62,7 @@ void HandlerRelayInfo::onRelayInfoModifyRequest(const rti::core::SampleIdentity
|
||||
{
|
||||
const auto ret = relayInfoModifyRequest(request);
|
||||
if (ret.error())
|
||||
WARNING_LOG(m_logger) << ret();
|
||||
WARNING_LOG() << ret();
|
||||
m_mainHandler->dds()->fts()->relayInfoModifyReply(cookie, ret);
|
||||
}
|
||||
|
||||
@@ -115,7 +114,7 @@ void HandlerRelayInfo::onRelayInfoRemoveRequest(const rti::core::SampleIdentity
|
||||
ret = ifs->removeObject();
|
||||
|
||||
if (ret.error())
|
||||
ERROR_LOG(m_logger) << ret();
|
||||
ERROR_LOG() << ret();
|
||||
else
|
||||
{
|
||||
// delete ObjectRelayInfo
|
||||
|
||||
@@ -39,7 +39,5 @@ private:
|
||||
private:
|
||||
QHash<int, ObjectRelayInfo*> m_objectRelayInfoMap;
|
||||
MainHandler *m_mainHandler;
|
||||
NGL::INGLLogger &m_logger;
|
||||
|
||||
};
|
||||
}
|
||||
+22
-23
@@ -23,7 +23,6 @@ HandlerTrainingArea::HandlerTrainingArea(MainHandler *mainHandler, QObject *pare
|
||||
, Interface::Fts::MapDescriptionModifyRequestHandler(mainHandler->dds()->fts())
|
||||
, Interface::Fts::MapDescriptionRemoveRequestHandler(mainHandler->dds()->fts())
|
||||
, m_mainHandler(mainHandler)
|
||||
, m_logger(getLogger("HandlerTrainingArea"))
|
||||
{
|
||||
}
|
||||
|
||||
@@ -43,7 +42,7 @@ bool HandlerTrainingArea::init()
|
||||
QVector<Database::AsmMapDescription> dataVecMD;
|
||||
if (!m_mainHandler->db()->select(dataVecMD))
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Error reading data from database!";
|
||||
ERROR_LOG() << "Error reading data from database!";
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -59,38 +58,38 @@ bool HandlerTrainingArea::init()
|
||||
{
|
||||
case AssetManagement::MapDescriptionType_def::Map2D:
|
||||
mapDescriptionSeq.map2D.insert(data.objOrder, data);
|
||||
INFO_LOG(m_logger) << "map2D.insert order =" << data.objOrder;
|
||||
INFO_LOG() << "map2D.insert order =" << data.objOrder;
|
||||
break;
|
||||
case AssetManagement::MapDescriptionType_def::Scene3D:
|
||||
mapDescriptionSeq.scene3D.insert(data.objOrder, data);
|
||||
INFO_LOG(m_logger) << "Scene3D.insert order =" << data.objOrder;
|
||||
INFO_LOG() << "Scene3D.insert order =" << data.objOrder;
|
||||
break;
|
||||
case AssetManagement::MapDescriptionType_def::Elevation:
|
||||
mapDescriptionSeq.elevation.insert(data.objOrder, data);
|
||||
INFO_LOG(m_logger) << "Elevation.insert order =" << data.objOrder;
|
||||
INFO_LOG() << "Elevation.insert order =" << data.objOrder;
|
||||
break;
|
||||
case AssetManagement::MapDescriptionType_def::SceneObj:
|
||||
mapDescriptionSeq.sceneObj.insert(data.objOrder, data);
|
||||
INFO_LOG(m_logger) << "sceneObj.insert order =" << data.objOrder;
|
||||
INFO_LOG() << "sceneObj.insert order =" << data.objOrder;
|
||||
break;
|
||||
}
|
||||
mapDescriptionSeqences.insert(data.trainingAreaId, mapDescriptionSeq);
|
||||
if (ret.error())
|
||||
{
|
||||
delete ifs;
|
||||
ERROR_LOG(m_logger) << ret();
|
||||
ERROR_LOG() << ret();
|
||||
return false;
|
||||
}
|
||||
m_objectMapDescriptionMap.insert(ifs->getId(), ifs);
|
||||
}
|
||||
|
||||
DEBUG_LOG(m_logger) << "m_objectMapDescriptionMap.size() = " << m_objectMapDescriptionMap.size();
|
||||
DEBUG_LOG() << "m_objectMapDescriptionMap.size() = " << m_objectMapDescriptionMap.size();
|
||||
|
||||
QVector<Database::AsmTrainingArea> dataVec;
|
||||
// read all training areas from database
|
||||
if (!m_mainHandler->db()->select(dataVec))
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Error reading data from database!";
|
||||
ERROR_LOG() << "Error reading data from database!";
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -126,13 +125,13 @@ bool HandlerTrainingArea::init()
|
||||
if (ret.error())
|
||||
{
|
||||
delete ifs;
|
||||
ERROR_LOG(m_logger) << ret();
|
||||
ERROR_LOG() << ret();
|
||||
return false;
|
||||
}
|
||||
m_objectTrainingAreaMap.insert(ifs->getId(), ifs);
|
||||
}
|
||||
|
||||
DEBUG_LOG(m_logger) << "m_objectTrainingAreaMap.size() = " << m_objectTrainingAreaMap.size();
|
||||
DEBUG_LOG() << "m_objectTrainingAreaMap.size() = " << m_objectTrainingAreaMap.size();
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -140,16 +139,16 @@ bool HandlerTrainingArea::init()
|
||||
//----------------------------------------------------------------------------------------------
|
||||
void HandlerTrainingArea::removeMapDescriptions(int trainingAreaId)
|
||||
{
|
||||
INFO_LOG(m_logger) << "removeMapDescriptions trainingAreaId = " << trainingAreaId
|
||||
INFO_LOG() << "removeMapDescriptions trainingAreaId = " << trainingAreaId
|
||||
<< " m_objectMapDescriptionMap.size = " << m_objectMapDescriptionMap.size();
|
||||
QMapIterator< int, ObjectMapDescription *> it(m_objectMapDescriptionMap);
|
||||
while ( it.hasNext())
|
||||
{
|
||||
it.next();
|
||||
INFO_LOG(m_logger) << "remove map description key = " << it.key();
|
||||
INFO_LOG() << "remove map description key = " << it.key();
|
||||
if ( it.value()->getData().trainingAreaId() == trainingAreaId)
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "remove id= " << it.key();
|
||||
DEBUG_LOG() << "remove id= " << it.key();
|
||||
|
||||
ObjectMapDescription *ifs = m_objectMapDescriptionMap.value(it.key());
|
||||
|
||||
@@ -166,7 +165,7 @@ void HandlerTrainingArea::onTrainingAreaModifyRequest(const rti::core::SampleIde
|
||||
{
|
||||
const auto ret = trainingAreaModifyRequest(request);
|
||||
if (ret.error())
|
||||
WARNING_LOG(m_logger) << ret();
|
||||
WARNING_LOG() << ret();
|
||||
m_mainHandler->dds()->fts()->trainingAreaModifyReply(cookie, ret);
|
||||
}
|
||||
|
||||
@@ -201,7 +200,7 @@ Core::FunctionReplyObject HandlerTrainingArea::trainingAreaModifyRequest(const T
|
||||
}
|
||||
if (request.id() > 0) // Modify
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "modify: delete old entries in map_description";
|
||||
DEBUG_LOG() << "modify: delete old entries in map_description";
|
||||
removeMapDescriptions(ifs->getId());
|
||||
}
|
||||
|
||||
@@ -216,7 +215,7 @@ Core::FunctionReplyObject HandlerTrainingArea::trainingAreaModifyRequest(const T
|
||||
mdData.id(0);
|
||||
mdData.trainingAreaId(ifs->getId());
|
||||
ret = md->createObject(mdData, i);
|
||||
DEBUG_LOG(m_logger) << "insert topographic entries in map_description"
|
||||
DEBUG_LOG() << "insert topographic entries in map_description"
|
||||
<< " for training area id " << ifs->getId()
|
||||
<< " mapTypeId=" << mdData.mapTypeId()
|
||||
<< " mapDescriptionTypeId=" << mdData.mapDescriptionTypeId();
|
||||
@@ -241,7 +240,7 @@ Core::FunctionReplyObject HandlerTrainingArea::trainingAreaModifyRequest(const T
|
||||
mdData.id(0);
|
||||
mdData.trainingAreaId(ifs->getId());
|
||||
ret = md->createObject(mdData, i);
|
||||
DEBUG_LOG(m_logger) << "insert elevation entries in map_description"
|
||||
DEBUG_LOG() << "insert elevation entries in map_description"
|
||||
<< " for training area id " << ifs->getId()
|
||||
<< " mapTypeId=" << mdData.mapTypeId()
|
||||
<< " mapDescriptionTypeId=" << mdData.mapDescriptionTypeId();
|
||||
@@ -266,7 +265,7 @@ Core::FunctionReplyObject HandlerTrainingArea::trainingAreaModifyRequest(const T
|
||||
mdData.id(0);
|
||||
mdData.trainingAreaId(ifs->getId());
|
||||
ret = md->createObject(mdData, i);
|
||||
DEBUG_LOG(m_logger) << "insert scene3D entries in map_description"
|
||||
DEBUG_LOG() << "insert scene3D entries in map_description"
|
||||
<< " for training area id " << ifs->getId()
|
||||
<< " mapTypeId=" << mdData.mapTypeId()
|
||||
<< " mapDescriptionTypeId=" << mdData.mapDescriptionTypeId();
|
||||
@@ -291,7 +290,7 @@ Core::FunctionReplyObject HandlerTrainingArea::trainingAreaModifyRequest(const T
|
||||
mdData.id(0);
|
||||
mdData.trainingAreaId(ifs->getId());
|
||||
ret = md->createObject(mdData, i);
|
||||
DEBUG_LOG(m_logger) << "insert sceneObjects entries in map_description"
|
||||
DEBUG_LOG() << "insert sceneObjects entries in map_description"
|
||||
<< " for training area id " << ifs->getId()
|
||||
<< " mapTypeId=" << mdData.mapTypeId()
|
||||
<< " mapDescriptionTypeId=" << mdData.mapDescriptionTypeId();
|
||||
@@ -336,7 +335,7 @@ void HandlerTrainingArea::onTrainingAreaRemoveRequest(const rti::core::SampleIde
|
||||
ret = ifs->removeObject();
|
||||
|
||||
if (ret.error())
|
||||
ERROR_LOG(m_logger) << ret();
|
||||
ERROR_LOG() << ret();
|
||||
else
|
||||
{
|
||||
// delete ObjectTrainingArea
|
||||
@@ -357,7 +356,7 @@ void HandlerTrainingArea::onMapDescriptionModifyRequest(const rti::core::SampleI
|
||||
{
|
||||
const auto ret = mapDescriptionModifyRequest(request);
|
||||
if (ret.error())
|
||||
WARNING_LOG(m_logger) << ret();
|
||||
WARNING_LOG() << ret();
|
||||
m_mainHandler->dds()->fts()->mapDescriptionModifyReply(cookie, ret);
|
||||
}
|
||||
|
||||
@@ -394,7 +393,7 @@ void HandlerTrainingArea::onMapDescriptionRemoveRequest(const rti::core::SampleI
|
||||
ret = ifs->removeObject();
|
||||
|
||||
if (ret.error())
|
||||
ERROR_LOG(m_logger) << ret();
|
||||
ERROR_LOG() << ret();
|
||||
else
|
||||
{
|
||||
// delete ObjectMapDescription
|
||||
|
||||
@@ -61,7 +61,5 @@ private:
|
||||
QMap<int, ObjectTrainingArea *> m_objectTrainingAreaMap;
|
||||
QMap<int, ObjectMapDescription *> m_objectMapDescriptionMap;
|
||||
MainHandler *m_mainHandler;
|
||||
NGL::INGLLogger &m_logger;
|
||||
|
||||
};
|
||||
}
|
||||
-1
@@ -21,7 +21,6 @@ constexpr int MAX_DATATOPIC_LIFETIME = 10 * 1000; //10 sec
|
||||
HandlerWorkstationLogout::HandlerWorkstationLogout(MainHandler *mainHandler, QObject *parent)
|
||||
: QObject(parent)
|
||||
, Interface::Fts::WorkstationLogoutRequestHandler(mainHandler->dds()->fts())
|
||||
, m_logger(getLogger("HandlerWorkstationLogout"))
|
||||
, m_mainHandler(mainHandler)
|
||||
{
|
||||
}
|
||||
|
||||
-1
@@ -34,7 +34,6 @@ public:
|
||||
void onWorkstationLogoutRequest(const rti::core::SampleIdentity &cookie, const WorkstationLogout &request) override final;
|
||||
|
||||
private:
|
||||
NGL::INGLLogger &m_logger;
|
||||
MainHandler *m_mainHandler;
|
||||
QMap<int, QTimer*> m_logoutRequestMap;
|
||||
};
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
#pragma once
|
||||
|
||||
#include <NGLLogger/INGLLogger.h>
|
||||
#include "asm_export.h"
|
||||
#include "svcasmcommon_export.h"
|
||||
|
||||
namespace AssetManagement
|
||||
{
|
||||
|
||||
@@ -31,7 +31,6 @@ MainHandler::MainHandler(QObject *parent)
|
||||
, m_ddsHandler(nullptr)
|
||||
, m_dbHandler(nullptr)
|
||||
, m_handlerWebSocket(nullptr)
|
||||
, m_logger(getLogger("MainHandler"))
|
||||
{}
|
||||
|
||||
MainHandler::~MainHandler()
|
||||
@@ -53,29 +52,29 @@ bool MainHandler::init(int domainId)
|
||||
|
||||
if (!m_dbHandler->init(0, Settings::settings()))
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Initialisation dbHandler failed.";
|
||||
ERROR_LOG() << "Initialisation dbHandler failed.";
|
||||
return false;
|
||||
}
|
||||
DEBUG_LOG(m_logger) << "Initialisation dbHandler succesful.";
|
||||
DEBUG_LOG() << "Initialisation dbHandler succesful.";
|
||||
|
||||
// initialize DDS
|
||||
m_ddsHandler = std::make_shared<DdsHandler>(domainId);
|
||||
if (!m_ddsHandler->init())
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Initialisation ddsHandler failed.";
|
||||
ERROR_LOG() << "Initialisation ddsHandler failed.";
|
||||
return false;
|
||||
}
|
||||
DEBUG_LOG(m_logger) << "Initialisation ddsHandler succesful.";
|
||||
DEBUG_LOG() << "Initialisation ddsHandler succesful.";
|
||||
|
||||
// read project specific data from database
|
||||
// publish project specific data
|
||||
// initialize all handlers
|
||||
if (!initAsmHandler())
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Initialisation AsmHandler failed.";
|
||||
ERROR_LOG() << "Initialisation AsmHandler failed.";
|
||||
return false;
|
||||
}
|
||||
DEBUG_LOG(m_logger) << "Initialisation AsmHandler succesful.";
|
||||
DEBUG_LOG() << "Initialisation AsmHandler succesful.";
|
||||
|
||||
m_ddsHandler->pacemaker()->setNewState(Core::RunningState::Running);
|
||||
|
||||
@@ -84,73 +83,73 @@ bool MainHandler::init(int domainId)
|
||||
|
||||
bool MainHandler::initAsmHandler()
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "Start Initialisation AsmHandler";
|
||||
DEBUG_LOG() << "Start Initialisation AsmHandler";
|
||||
|
||||
// TrainingArea
|
||||
m_handlerTrainingArea = std::make_shared<HandlerTrainingArea>(this);
|
||||
DEBUG_LOG(m_logger) << "Reset HandlerTrainingArea succesful.";
|
||||
DEBUG_LOG() << "Reset HandlerTrainingArea succesful.";
|
||||
|
||||
if (!m_handlerTrainingArea->init())
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Initialisation of HandlerTrainingArea failed.";
|
||||
ERROR_LOG() << "Initialisation of HandlerTrainingArea failed.";
|
||||
return false;
|
||||
}
|
||||
DEBUG_LOG(m_logger) << "Initialisation HandlerTrainingArea succesful.";
|
||||
DEBUG_LOG() << "Initialisation HandlerTrainingArea succesful.";
|
||||
|
||||
// WorkstationLogout
|
||||
m_handlerWorkstationLogout = std::make_shared<HandlerWorkstationLogout>(this);
|
||||
DEBUG_LOG(m_logger) << "Reset HandlerWorkstationLogout succesful.";
|
||||
DEBUG_LOG() << "Reset HandlerWorkstationLogout succesful.";
|
||||
|
||||
if (!m_handlerWorkstationLogout->init())
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Initialisation of HandlerWorkstationLogout failed.";
|
||||
ERROR_LOG() << "Initialisation of HandlerWorkstationLogout failed.";
|
||||
return false;
|
||||
}
|
||||
DEBUG_LOG(m_logger) << "Initialisation HandlerWorkstationLogout succesful.";
|
||||
DEBUG_LOG() << "Initialisation HandlerWorkstationLogout succesful.";
|
||||
|
||||
// Asset
|
||||
m_handlerAsset = std::make_shared<HandlerAsset>(this);
|
||||
DEBUG_LOG(m_logger) << "Reset HandlerAsset succesful.";
|
||||
DEBUG_LOG() << "Reset HandlerAsset succesful.";
|
||||
|
||||
if (!m_handlerAsset->init())
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Initialisation of HandlerAsset failed.";
|
||||
ERROR_LOG() << "Initialisation of HandlerAsset failed.";
|
||||
return false;
|
||||
}
|
||||
DEBUG_LOG(m_logger) << "Initialisation HandlerAsset succesful.";
|
||||
DEBUG_LOG() << "Initialisation HandlerAsset succesful.";
|
||||
|
||||
// Location
|
||||
m_handlerLocation = std::make_shared<HandlerLocation>(this);
|
||||
DEBUG_LOG(m_logger) << "Reset HandlerLocation succesful.";
|
||||
DEBUG_LOG() << "Reset HandlerLocation succesful.";
|
||||
|
||||
if (!m_handlerLocation->init())
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Initialisation of HandlerLocation failed.";
|
||||
ERROR_LOG() << "Initialisation of HandlerLocation failed.";
|
||||
return false;
|
||||
}
|
||||
DEBUG_LOG(m_logger) << "Initialisation HandlerLocation succesful.";
|
||||
DEBUG_LOG() << "Initialisation HandlerLocation succesful.";
|
||||
|
||||
// RelayInfo
|
||||
m_handlerRelayInfo = std::make_shared<HandlerRelayInfo>(this);
|
||||
DEBUG_LOG(m_logger) << "Reset HandlerRelayInfo succesful.";
|
||||
DEBUG_LOG() << "Reset HandlerRelayInfo succesful.";
|
||||
|
||||
if (!m_handlerRelayInfo->init())
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Initialisation of HandlerRelayInfo failed.";
|
||||
ERROR_LOG() << "Initialisation of HandlerRelayInfo failed.";
|
||||
return false;
|
||||
}
|
||||
DEBUG_LOG(m_logger) << "Initialisation HandlerRelayInfo succesful.";
|
||||
DEBUG_LOG() << "Initialisation HandlerRelayInfo succesful.";
|
||||
|
||||
// WebSocketServer
|
||||
m_handlerWebSocket = std::make_shared<WebSocketInterface::WebSocketInterfaceHandler>(this);
|
||||
DEBUG_LOG(m_logger) << "Reset WebSocketInterfaceHandler succesful.";
|
||||
DEBUG_LOG() << "Reset WebSocketInterfaceHandler succesful.";
|
||||
if (!m_handlerWebSocket->init())
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Initialisation WebSocketInterfaceHandler failed.";
|
||||
ERROR_LOG() << "Initialisation WebSocketInterfaceHandler failed.";
|
||||
return false;
|
||||
}
|
||||
m_ddsHandler->pacemaker()->addPort(m_handlerWebSocket->serverWebSocketPort(), Core::PortType::WebSocketServer);
|
||||
DEBUG_LOG(m_logger) << "Initialisation WebSocketInterfaceHandler succesful.";
|
||||
DEBUG_LOG() << "Initialisation WebSocketInterfaceHandler succesful.";
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -55,8 +55,5 @@ private:
|
||||
std::shared_ptr<DdsHandler> m_ddsHandler;
|
||||
std::shared_ptr<DbHandler> m_dbHandler;
|
||||
std::shared_ptr<WebSocketInterface::WebSocketInterfaceHandler> m_handlerWebSocket;
|
||||
|
||||
NGL::INGLLogger &m_logger;
|
||||
|
||||
};
|
||||
} // namespace AssetManagement
|
||||
@@ -17,7 +17,6 @@ namespace AssetManagement
|
||||
{
|
||||
ObjectAsset::ObjectAsset(MainHandler *mainHandler)
|
||||
: m_mainHandler(mainHandler)
|
||||
, m_logger(getLogger("ObjectAsset"))
|
||||
{
|
||||
}
|
||||
|
||||
@@ -55,7 +54,7 @@ Core::FunctionReplyObject ObjectAsset::createObject(const Asset &data)
|
||||
return Core::FunctionReplyObject(0, tr_lts("dds", "Error inserting AsmAsset-data into database"));
|
||||
|
||||
m_data.id(dbData.id);
|
||||
DEBUG_LOG(m_logger) << "New assetId: " << m_data.id();
|
||||
DEBUG_LOG() << "New assetId: " << m_data.id();
|
||||
}
|
||||
|
||||
// Publish Data via DTS
|
||||
@@ -77,7 +76,7 @@ Core::FunctionReplyObject ObjectAsset::updateObject(const Asset &data)
|
||||
return Core::FunctionReplyObject(data.id(), tr_lts("dds", "Error updating AsmAsset-data into database"));
|
||||
|
||||
m_data = data;
|
||||
DEBUG_LOG(m_logger) << "Data changed for assetId: " << m_data.id();
|
||||
DEBUG_LOG() << "Data changed for assetId: " << m_data.id();
|
||||
|
||||
// Publish Data via DTS
|
||||
onPublishData();
|
||||
@@ -117,10 +116,10 @@ Core::FunctionReplyObject ObjectAsset::removeObject()
|
||||
//------------------------------------------------------------------------------
|
||||
void ObjectAsset::onPublishData()
|
||||
{
|
||||
INFO_LOG(m_logger) << "Publish AsmAsset-data to dds (" << m_data.id() << ") ...";
|
||||
INFO_LOG() << "Publish AsmAsset-data to dds (" << m_data.id() << ") ...";
|
||||
|
||||
if (!m_mainHandler->dds()->dts()->publish(m_data))
|
||||
ERROR_LOG(m_logger) << "Error publishing AsmAsset-data to dds";
|
||||
ERROR_LOG() << "Error publishing AsmAsset-data to dds";
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------------------------------------------
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
#include "dds_handler.h"
|
||||
#include "logger.h"
|
||||
|
||||
#include <DDS/Core/function_reply_object.h>
|
||||
#include <DDS/Core/core_types.h>
|
||||
|
||||
// Generated
|
||||
#include <AssetManagement/asm_db.h>
|
||||
@@ -52,7 +52,5 @@ protected:
|
||||
private:
|
||||
MainHandler *m_mainHandler;
|
||||
Asset m_data;
|
||||
NGL::INGLLogger &m_logger;
|
||||
|
||||
};
|
||||
}
|
||||
+2
-3
@@ -15,7 +15,6 @@ namespace AssetManagement
|
||||
ObjectMapDescription::ObjectMapDescription(MainHandler *mainHandler)
|
||||
: m_mainHandler(mainHandler)
|
||||
, m_order(-1)
|
||||
, m_logger(getLogger("ObjectMapDescription"))
|
||||
{
|
||||
}
|
||||
|
||||
@@ -39,7 +38,7 @@ Core::FunctionReplyObject ObjectMapDescription::createObject(const MapDescriptio
|
||||
return Core::FunctionReplyObject(0, tr_lts("dds", "Error inserting AsmMapDescription-data into database"));
|
||||
|
||||
m_data.id(dbData.id);
|
||||
DEBUG_LOG(m_logger) << "New MapDescription Id: " << m_data.id();
|
||||
DEBUG_LOG() << "New MapDescription Id: " << m_data.id();
|
||||
}
|
||||
else if (order != m_order && m_order >= 0)
|
||||
{
|
||||
@@ -65,7 +64,7 @@ Core::FunctionReplyObject ObjectMapDescription::updateObject(const MapDescriptio
|
||||
return Core::FunctionReplyObject(data.id(), tr_lts("dds", "Error updating AsmMapDescription-data into database"));
|
||||
|
||||
m_data = data;
|
||||
DEBUG_LOG(m_logger) << "Data changed for MapDescription Id: " << m_data.id();
|
||||
DEBUG_LOG() << "Data changed for MapDescription Id: " << m_data.id();
|
||||
|
||||
return Core::FunctionReplyObject(m_data.id());
|
||||
}
|
||||
|
||||
+1
-2
@@ -8,7 +8,7 @@
|
||||
#pragma once
|
||||
|
||||
#include "logger.h"
|
||||
#include <DDS/Core/function_reply_object.h>
|
||||
#include <DDS/Core/core_types.h>
|
||||
|
||||
// Generated
|
||||
#include <AssetManagement/asm_db.h>
|
||||
@@ -41,6 +41,5 @@ private:
|
||||
MainHandler *m_mainHandler;
|
||||
MapDescription m_data;
|
||||
int m_order;
|
||||
NGL::INGLLogger &m_logger;
|
||||
};
|
||||
}
|
||||
@@ -17,7 +17,6 @@ namespace AssetManagement
|
||||
{
|
||||
ObjectRelayInfo::ObjectRelayInfo(MainHandler *mainHandler)
|
||||
: m_mainHandler(mainHandler)
|
||||
, m_logger(getLogger("ObjectRelayInfo"))
|
||||
{
|
||||
}
|
||||
|
||||
@@ -55,7 +54,7 @@ Core::FunctionReplyObject ObjectRelayInfo::createObject(const RelayInfo &data)
|
||||
return Core::FunctionReplyObject(0, tr_lts("dds", "Error inserting AsmEgcuRelayInfo-data into database"));
|
||||
|
||||
m_data.id(dbData.id);
|
||||
DEBUG_LOG(m_logger) << "New relayInfo Id: " << m_data.id();
|
||||
DEBUG_LOG() << "New relayInfo Id: " << m_data.id();
|
||||
}
|
||||
|
||||
// Publish Data via DTS
|
||||
@@ -77,7 +76,7 @@ Core::FunctionReplyObject ObjectRelayInfo::updateObject(const RelayInfo &data)
|
||||
return Core::FunctionReplyObject(data.id(), tr_lts("dds", "Error updating AsmEgcuRelayInfo-data into database"));
|
||||
|
||||
m_data = data;
|
||||
DEBUG_LOG(m_logger) << "Data changed for relayInfo Id: " << m_data.id();
|
||||
DEBUG_LOG() << "Data changed for relayInfo Id: " << m_data.id();
|
||||
|
||||
// Publish Data via DTS
|
||||
onPublishData();
|
||||
@@ -117,10 +116,10 @@ Core::FunctionReplyObject ObjectRelayInfo::removeObject()
|
||||
//------------------------------------------------------------------------------
|
||||
void ObjectRelayInfo::onPublishData()
|
||||
{
|
||||
INFO_LOG(m_logger) << "Publish AsmEgcuRelayInfo-data to dds (" << m_data.id() << ") ...";
|
||||
INFO_LOG() << "Publish AsmEgcuRelayInfo-data to dds (" << m_data.id() << ") ...";
|
||||
|
||||
if (!m_mainHandler->dds()->dts()->publish(m_data))
|
||||
ERROR_LOG(m_logger) << "Error publishing AsmEgcuRelayInfo-data to dds";
|
||||
ERROR_LOG() << "Error publishing AsmEgcuRelayInfo-data to dds";
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------------------------------------------
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
#include "dds_handler.h"
|
||||
#include "logger.h"
|
||||
|
||||
#include <DDS/Core/function_reply_object.h>
|
||||
#include <DDS/Core/core_types.h>
|
||||
|
||||
// Generated
|
||||
#include <AssetManagement/asm_db.h>
|
||||
@@ -52,7 +52,5 @@ protected:
|
||||
private:
|
||||
MainHandler *m_mainHandler;
|
||||
RelayInfo m_data;
|
||||
NGL::INGLLogger &m_logger;
|
||||
|
||||
};
|
||||
}
|
||||
+4
-5
@@ -16,7 +16,6 @@ namespace AssetManagement
|
||||
{
|
||||
ObjectTrainingArea::ObjectTrainingArea(MainHandler *mainHandler)
|
||||
: m_mainHandler(mainHandler)
|
||||
, m_logger(getLogger("ObjectTrainingArea"))
|
||||
{
|
||||
}
|
||||
|
||||
@@ -54,7 +53,7 @@ Core::FunctionReplyObject ObjectTrainingArea::createObject(const TrainingArea &d
|
||||
return Core::FunctionReplyObject(0, tr_lts("dds", "Error inserting AsmTrainingArea-data into database"));
|
||||
|
||||
m_data.id(dbData.id);
|
||||
DEBUG_LOG(m_logger) << "New mapId: " << m_data.id();
|
||||
DEBUG_LOG() << "New mapId: " << m_data.id();
|
||||
}
|
||||
|
||||
// Publish Data via DTS
|
||||
@@ -76,7 +75,7 @@ Core::FunctionReplyObject ObjectTrainingArea::updateObject(const TrainingArea &d
|
||||
return Core::FunctionReplyObject(data.id(), tr_lts("dds", "Error updating AsmTrainingArea-data into database"));
|
||||
|
||||
m_data = data;
|
||||
DEBUG_LOG(m_logger) << "Data changed for mapId: " << m_data.id();
|
||||
DEBUG_LOG() << "Data changed for mapId: " << m_data.id();
|
||||
|
||||
// Publish Data via DTS
|
||||
onPublishData();
|
||||
@@ -116,10 +115,10 @@ Core::FunctionReplyObject ObjectTrainingArea::removeObject()
|
||||
//------------------------------------------------------------------------------
|
||||
void ObjectTrainingArea::onPublishData()
|
||||
{
|
||||
INFO_LOG(m_logger) << "Publish AsmTrainingArea-data to dds (" << m_data.id() << ") ...";
|
||||
INFO_LOG() << "Publish AsmTrainingArea-data to dds (" << m_data.id() << ") ...";
|
||||
|
||||
if (!m_mainHandler->dds()->dts()->publish(m_data))
|
||||
ERROR_LOG(m_logger) << "Error publishing AsmTrainingArea-data to dds";
|
||||
ERROR_LOG() << "Error publishing AsmTrainingArea-data to dds";
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------------------------------------------
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
#include <QObject>
|
||||
#include "dds_handler.h"
|
||||
#include "logger.h"
|
||||
#include <DDS/Core/function_reply_object.h>
|
||||
#include <DDS/Core/core_types.h>
|
||||
|
||||
// Generated
|
||||
#include <AssetManagement/asm_db.h>
|
||||
@@ -51,7 +51,5 @@ protected:
|
||||
private:
|
||||
MainHandler *m_mainHandler;
|
||||
TrainingArea m_data;
|
||||
NGL::INGLLogger &m_logger;
|
||||
|
||||
};
|
||||
}
|
||||
Reference in new issue
Block a user