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
+31
-32
@@ -42,7 +42,6 @@ HandlerExercise::HandlerExercise(MainHandler *mainHandler,
|
||||
, m_db(db)
|
||||
, m_exTblGen(exTableGenerator)
|
||||
, m_startupExerciseTimer(new QTimer(this))
|
||||
, m_logger(getLogger("HandlerExercise"))
|
||||
{
|
||||
//m_imageCache.setMaxCost(15);
|
||||
m_startupExerciseTimer->setSingleShot(false);
|
||||
@@ -57,14 +56,14 @@ HandlerExercise::~HandlerExercise()
|
||||
|
||||
bool HandlerExercise::init()
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "Finish Initialise DbAdministration (dba) ";
|
||||
INFO_LOG(m_logger) << "Data available for services: " << m_exTblGen->getAvailableServices().join(QLatin1Char(','));
|
||||
DEBUG_LOG() << "Finish Initialise DbAdministration (dba) ";
|
||||
INFO_LOG() << "Data available for services: " << m_exTblGen->getAvailableServices().join(QLatin1Char(','));
|
||||
|
||||
QVector<Database::ExmExercise> dataVec;
|
||||
// read all exercises 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;
|
||||
}
|
||||
|
||||
@@ -78,13 +77,13 @@ bool HandlerExercise::init()
|
||||
if (ret.error())
|
||||
{
|
||||
delete ifs;
|
||||
ERROR_LOG(m_logger) << ret();
|
||||
ERROR_LOG() << ret();
|
||||
return false;
|
||||
}
|
||||
m_exeObjMap.insert(ifs->id(), ifs);
|
||||
exerciseStates.push_back({ifs->id(), ifs->data().exerciseStateId});
|
||||
}
|
||||
DEBUG_LOG(m_logger) << "m_exeObjMap.size() = " << m_exeObjMap.size();
|
||||
DEBUG_LOG() << "m_exeObjMap.size() = " << m_exeObjMap.size();
|
||||
|
||||
// make sure to start the important exercises first
|
||||
std::sort(exerciseStates.begin(), exerciseStates.end(),
|
||||
@@ -141,7 +140,7 @@ void HandlerExercise::onStartNextExercise()
|
||||
auto *objEx = m_exeObjMap.value(exId);
|
||||
if (!objEx)
|
||||
{
|
||||
WARNING_LOG(m_logger) << "Trying to start exercise with id " << exId << " but could not find a handler !?";
|
||||
WARNING_LOG() << "Trying to start exercise with id " << exId << " but could not find a handler !?";
|
||||
continue;
|
||||
}
|
||||
NOTICE_LOG(m_logger) << "Init state machine for exercise " << exId << " (" << objEx->data().name << ")";
|
||||
@@ -156,7 +155,7 @@ bool HandlerExercise::hasError(const Core::FunctionReplyObject &replyObject, Obj
|
||||
if (replyObject.error())
|
||||
{
|
||||
delete ifs;
|
||||
ERROR_LOG(m_logger) << replyObject();
|
||||
ERROR_LOG() << replyObject();
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
@@ -195,7 +194,7 @@ void HandlerExercise::onExerciseCreateRequest(const rti::core::SampleIdentity &c
|
||||
auto ret = exerciseCreateRequest(request);
|
||||
if (ret.error())
|
||||
{
|
||||
WARNING_LOG(m_logger) << ret();
|
||||
WARNING_LOG() << ret();
|
||||
|
||||
}
|
||||
m_ddsHandler->fts()->exerciseCreateReply(cookie, ret);
|
||||
@@ -203,7 +202,7 @@ void HandlerExercise::onExerciseCreateRequest(const rti::core::SampleIdentity &c
|
||||
|
||||
Core::FunctionReplyObject HandlerExercise::exerciseCreateRequest(const ExerciseCreateRequest &request)
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "onExerciseCreateRequest: " << request;
|
||||
DEBUG_LOG() << "onExerciseCreateRequest: " << request;
|
||||
|
||||
Database::ExmExercise newData(copyBaseData(request));
|
||||
newData.linkedExerciseId = 0;
|
||||
@@ -235,7 +234,7 @@ Core::FunctionReplyObject HandlerExercise::exerciseCreateRequest(const ExerciseC
|
||||
if (hasError(ret, ifs))
|
||||
{
|
||||
// remove failed create exercise request from DDS bus (id = 0)
|
||||
ERROR_LOG(m_logger) << "CreateExercise failed, removing request from dds";
|
||||
ERROR_LOG() << "CreateExercise failed, removing request from dds";
|
||||
m_ddsHandler->dts()->removeExerciseByKey(0);
|
||||
return ret;
|
||||
}
|
||||
@@ -251,7 +250,7 @@ Core::FunctionReplyObject HandlerExercise::exerciseCreateRequest(const ExerciseC
|
||||
|
||||
if (hasError(ret, ifs))
|
||||
{
|
||||
ERROR_LOG(m_logger) << "CreateExercisePhase failed, removing requests from dds";
|
||||
ERROR_LOG() << "CreateExercisePhase failed, removing requests from dds";
|
||||
m_ddsHandler->dts()->removeExercisePhaseByKey(0);
|
||||
m_ddsHandler->dts()->removeExerciseByKey(0);
|
||||
return ret;
|
||||
@@ -264,7 +263,7 @@ Core::FunctionReplyObject HandlerExercise::exerciseCreateRequest(const ExerciseC
|
||||
|
||||
if (hasError(ret, ifs))
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Set active phase failed, removing requests from dds";
|
||||
ERROR_LOG() << "Set active phase failed, removing requests from dds";
|
||||
m_ddsHandler->dts()->removeExercisePhaseByKey(0);
|
||||
m_ddsHandler->dts()->removeExerciseByKey(0);
|
||||
return ret;
|
||||
@@ -284,13 +283,13 @@ void HandlerExercise::onExerciseModifyRequest(const rti::core::SampleIdentity &c
|
||||
{
|
||||
auto ret = exerciseModifyRequest(request);
|
||||
if (ret.error())
|
||||
WARNING_LOG(m_logger) << ret();
|
||||
WARNING_LOG() << ret();
|
||||
m_ddsHandler->fts()->exerciseModifyReply(cookie, ret);
|
||||
}
|
||||
|
||||
Core::FunctionReplyObject HandlerExercise::exerciseModifyRequest(const ExerciseModifyRequest &request)
|
||||
{
|
||||
INFO_LOG(m_logger) << "onExerciseModifyRequest: " << request;
|
||||
INFO_LOG() << "onExerciseModifyRequest: " << request;
|
||||
|
||||
ObjectExercise *ifs = m_exeObjMap.value(request.id());
|
||||
if (ifs == nullptr)
|
||||
@@ -431,7 +430,7 @@ Core::FunctionReplyObject HandlerExercise::exerciseModifyRequest(const ExerciseM
|
||||
}
|
||||
}
|
||||
|
||||
DEBUG_LOG(m_logger) << "Linked exercise: " << request.linkedExerciseId()
|
||||
DEBUG_LOG() << "Linked exercise: " << request.linkedExerciseId()
|
||||
<< ", state: " << ifs->exerciseState()
|
||||
<< ", new: " << request.newState();
|
||||
if (request.linkedExerciseId() != 0 && ifs->exerciseState() != request.newState())
|
||||
@@ -441,7 +440,7 @@ Core::FunctionReplyObject HandlerExercise::exerciseModifyRequest(const ExerciseM
|
||||
{
|
||||
ObjectExercise *ifsLinked = m_exeObjMap.value(request.linkedExerciseId());
|
||||
if (!ifsLinked)
|
||||
WARNING_LOG(m_logger) << "Linked exercise with id " << request.linkedExerciseId() << " not found!";
|
||||
WARNING_LOG() << "Linked exercise with id " << request.linkedExerciseId() << " not found!";
|
||||
else
|
||||
{
|
||||
if (ifsLinked->exerciseState() != ExerciseManagement::ExerciseState::Paused ||
|
||||
@@ -479,7 +478,7 @@ Core::FunctionReplyObject HandlerExercise::exerciseModifyRequest(const ExerciseM
|
||||
//{
|
||||
// Core::FunctionReplyObject ret;
|
||||
|
||||
// INFO_LOG(m_logger) << "onExerciseChangeStateRequest id = " << request.id();
|
||||
// INFO_LOG() << "onExerciseChangeStateRequest id = " << request.id();
|
||||
|
||||
// ObjectExercise *ifs = m_exeObjMap.value(request.id());
|
||||
// if (ifs == nullptr)
|
||||
@@ -489,7 +488,7 @@ Core::FunctionReplyObject HandlerExercise::exerciseModifyRequest(const ExerciseM
|
||||
// return;
|
||||
// }
|
||||
|
||||
// DEBUG_LOG(m_logger) << "request.newState() = " << request.newState();
|
||||
// DEBUG_LOG() << "request.newState() = " << request.newState();
|
||||
|
||||
// ret = ifs->switchToState(request.newState());
|
||||
// if (!ret.error() && ifs->linkedExerciseId() != 0)
|
||||
@@ -499,7 +498,7 @@ Core::FunctionReplyObject HandlerExercise::exerciseModifyRequest(const ExerciseM
|
||||
// {
|
||||
// ObjectExercise *ifsLinked = m_exeObjMap.value(ifs->linkedExerciseId());
|
||||
// if (!ifsLinked)
|
||||
// WARNING_LOG(m_logger) << "Linked exercise with id " << ifs->linkedExerciseId() << " not found!";
|
||||
// WARNING_LOG() << "Linked exercise with id " << ifs->linkedExerciseId() << " not found!";
|
||||
// else
|
||||
// {
|
||||
// if (ifsLinked->exerciseState() != ExerciseManagement::ExerciseState::Paused ||
|
||||
@@ -510,7 +509,7 @@ Core::FunctionReplyObject HandlerExercise::exerciseModifyRequest(const ExerciseM
|
||||
// }
|
||||
|
||||
// if (ret.error())
|
||||
// ERROR_LOG(m_logger) << ret();
|
||||
// ERROR_LOG() << ret();
|
||||
|
||||
// m_ddsHandler->fts()->exerciseChangeStateReply(cookie, ret);
|
||||
//}
|
||||
@@ -531,7 +530,7 @@ void HandlerExercise::onGetExerciseImageRequest(const rti::core::SampleIdentity
|
||||
int32_t exerciseId = request.exerciseId();
|
||||
reply.id(exerciseId);
|
||||
|
||||
DEBUG_LOG(m_logger) << "onGetExerciseImageRequest id = " << exerciseId;
|
||||
DEBUG_LOG() << "onGetExerciseImageRequest id = " << exerciseId;
|
||||
|
||||
Database::ExmExerciseImage exmImg;
|
||||
if (!m_db->selectExmExerciseImage(exerciseId, exmImg))
|
||||
@@ -567,7 +566,7 @@ void HandlerExercise::onGetExerciseImageRequest(const rti::core::SampleIdentity
|
||||
// reply.imageData(LtsUtils::fromPixmap(excPx));
|
||||
// }
|
||||
// else
|
||||
// ERROR_LOG(m_logger) << "image isNull for exercise " << exerciseId;
|
||||
// ERROR_LOG() << "image isNull for exercise " << exerciseId;
|
||||
}
|
||||
|
||||
/* test behaviour on bad network speeds
|
||||
@@ -583,7 +582,7 @@ void HandlerExercise::onExerciseImageModifyRequest(const rti::core::SampleIdenti
|
||||
{
|
||||
qint32 exerciseId = request.id();
|
||||
|
||||
DEBUG_LOG(m_logger) << "onExerciseImageModifyRequest id = " << exerciseId << ", image size = " << request.image().size();
|
||||
DEBUG_LOG() << "onExerciseImageModifyRequest id = " << exerciseId << ", image size = " << request.image().size();
|
||||
|
||||
Database::ExmExerciseImage exImg;
|
||||
exImg.exerciseId = exerciseId;
|
||||
@@ -640,7 +639,7 @@ void HandlerExercise::onExerciseRemoveRequest(const rti::core::SampleIdentity &c
|
||||
|
||||
if (ret.error())
|
||||
{
|
||||
ERROR_LOG(m_logger) << ret();
|
||||
ERROR_LOG() << ret();
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -658,13 +657,13 @@ void HandlerExercise::onExerciseRemoveRequest(const rti::core::SampleIdentity &c
|
||||
void HandlerExercise::onStartGroupReply(const Core::FunctionReplyObject &replyObject)
|
||||
{
|
||||
if (replyObject.error())
|
||||
WARNING_LOG(m_logger) << "Error starting group: " << replyObject();
|
||||
WARNING_LOG() << "Error starting group: " << replyObject();
|
||||
}
|
||||
|
||||
|
||||
bool HandlerExercise::checkEquipmentNumbersOnAllExercises(int exerciseIdToBeStarted, QString &mesgOut)
|
||||
{
|
||||
INFO_LOG(m_logger) << LOGFUNCTION <<" START, exerciseIdTobeStarted: " << exerciseIdToBeStarted;
|
||||
INFO_LOG() << Q_FUNC_INFO <<" START, exerciseIdTobeStarted: " << exerciseIdToBeStarted;
|
||||
|
||||
// only one exercise, about to start
|
||||
if (m_exeObjMap.size() <= 1)
|
||||
@@ -685,7 +684,7 @@ bool HandlerExercise::checkEquipmentNumbersOnAllExercises(int exerciseIdToBeStar
|
||||
|
||||
if (!ppmDtcForEx)
|
||||
{
|
||||
WARNING_LOG(m_logger) << LOGFUNCTION << " no ppmDtcForEx (" << exerciseIdToBeStarted << ")";
|
||||
WARNING_LOG() << Q_FUNC_INFO << " no ppmDtcForEx (" << exerciseIdToBeStarted << ")";
|
||||
return true;
|
||||
}
|
||||
ppmDtcForEx->enableParticipant();
|
||||
@@ -705,7 +704,7 @@ bool HandlerExercise::checkEquipmentNumbersOnAllExercises(int exerciseIdToBeStar
|
||||
std::shared_ptr<ParticipantManagement::Interface::Dtc> ppmDtc = m_ddsHandler->ppmDtc();
|
||||
if (!ppmDtc)
|
||||
{
|
||||
WARNING_LOG(m_logger) << LOGFUNCTION << " no ppmDtc";
|
||||
WARNING_LOG() << Q_FUNC_INFO << " no ppmDtc";
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -724,7 +723,7 @@ bool HandlerExercise::checkEquipmentNumbersOnAllExercises(int exerciseIdToBeStar
|
||||
ObjectExercise *ifs = m_exeObjMap.value(exerciseId);
|
||||
if (!ifs)
|
||||
{
|
||||
ERROR_LOG(m_logger) << LOGFUNCTION << " Exercise not found, exId = " << exerciseId;
|
||||
ERROR_LOG() << Q_FUNC_INFO << " Exercise not found, exId = " << exerciseId;
|
||||
return;
|
||||
}
|
||||
if ((ifs->exerciseState() == ExerciseState::Started) ||
|
||||
@@ -734,7 +733,7 @@ bool HandlerExercise::checkEquipmentNumbersOnAllExercises(int exerciseIdToBeStar
|
||||
for (const auto &eq2p : std::as_const(mapping))
|
||||
if (eqNoForEx.contains(eq2p.equipmentNumber()))
|
||||
{
|
||||
DEBUG_LOG(m_logger) << LOGFUNCTION << " !!! eq = " << eq2p.equipmentNumber() << " is already used in exercise =" << exerciseId;
|
||||
DEBUG_LOG() << Q_FUNC_INFO << " !!! eq = " << eq2p.equipmentNumber() << " is already used in exercise =" << exerciseId;
|
||||
usedEqNumbers[exerciseId].insert(eq2p.equipmentNumber());
|
||||
}
|
||||
}
|
||||
@@ -768,7 +767,7 @@ bool HandlerExercise::checkEquipmentNumbersOnAllExercises(int exerciseIdToBeStar
|
||||
}
|
||||
} // while
|
||||
|
||||
WARNING_LOG(m_logger) << LOGFUNCTION << " state change request not allowed: mesgOut:" << mesgOut;
|
||||
WARNING_LOG() << Q_FUNC_INFO << " state change request not allowed: mesgOut:" << mesgOut;
|
||||
|
||||
// limit length:
|
||||
if (mesgOut.size()>200)
|
||||
|
||||
Reference in new issue
Block a user