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
+19
-20
@@ -24,7 +24,6 @@ MissionPlanHandler::MissionPlanHandler(MainHandler *mainHandler)
|
||||
, Interface::Fts::RemoveMissionPlanRequestHandler(mainHandler->fts())
|
||||
, Interface::Fts::SetMissionActionFulfilledRequestHandler(mainHandler->fts())
|
||||
, m_mainHandler(mainHandler)
|
||||
, m_logger(getLogger("MissionPlanHandler"))
|
||||
{
|
||||
|
||||
}
|
||||
@@ -36,7 +35,7 @@ ParticipantManagement::UasHandling::MissionPlanHandler::~MissionPlanHandler()
|
||||
|
||||
bool MissionPlanHandler::init()
|
||||
{
|
||||
DEBUG_LOG(m_logger)<<" -- MissionPlanHandler init...";
|
||||
DEBUG_LOG()<<" -- MissionPlanHandler init...";
|
||||
qDeleteAll(m_objMissionPlans);
|
||||
m_objMissionPlans.clear();
|
||||
if (!loadMissionPlansFromDb())
|
||||
@@ -60,7 +59,7 @@ void MissionPlanHandler::onRemoveMissionPlanRequest(const rti::core::SampleIdent
|
||||
|
||||
void MissionPlanHandler::onSetMissionActionFulfilledRequest(const rti::core::SampleIdentity &cookie, const SetMissionActionFulfilledRequest &request)
|
||||
{
|
||||
//DEBUG_LOG(m_logger)<<">> -- onSetMissionActionFulfilledRequest -- ";
|
||||
//DEBUG_LOG()<<">> -- onSetMissionActionFulfilledRequest -- ";
|
||||
Core::FunctionReplyObject reply = setMissionActionFulfilledRequest(request);
|
||||
m_mainHandler->ddsHandler()->fts()->setMissionActionFulfilledReply(cookie, reply);
|
||||
}
|
||||
@@ -72,22 +71,22 @@ bool MissionPlanHandler::loadMissionPlansFromDb()
|
||||
QVector<ParticipantManagement::Database::PpmMissionAction> missionActionVec;
|
||||
if (!m_mainHandler->db()->select(missionActionVec))
|
||||
{
|
||||
ERROR_LOG(m_logger)<<"Error reading data from database >> PpmMissionAction: "<<missionActionVec.size();
|
||||
ERROR_LOG()<<"Error reading data from database >> PpmMissionAction: "<<missionActionVec.size();
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!m_mainHandler->db()->select(missionItemVec))
|
||||
{
|
||||
ERROR_LOG(m_logger)<<"Error reading data from database >> missionItemVec"<<missionItemVec.size();
|
||||
ERROR_LOG()<<"Error reading data from database >> missionItemVec"<<missionItemVec.size();
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!m_mainHandler->db()->select(missionPlanVec))
|
||||
{
|
||||
ERROR_LOG(m_logger)<<"Error reading data from database >> missionPlanVec"<<missionPlanVec.size();
|
||||
ERROR_LOG()<<"Error reading data from database >> missionPlanVec"<<missionPlanVec.size();
|
||||
return false;
|
||||
}
|
||||
DEBUG_LOG(m_logger) << "load MissionPlans From Db Plans size = " << missionPlanVec.size()
|
||||
DEBUG_LOG() << "load MissionPlans From Db Plans size = " << missionPlanVec.size()
|
||||
<<" Items size = "<<missionItemVec.size()
|
||||
<<" Actions size = "<<missionActionVec.size();
|
||||
// add to internal buffer
|
||||
@@ -170,7 +169,7 @@ bool MissionPlanHandler::loadMissionPlansFromDb()
|
||||
m_mainHandler->ddsHandler()->dts()->publish(missionPlan);
|
||||
|
||||
}
|
||||
DEBUG_LOG(m_logger)<<" -- END load mission plan From Db -- ";
|
||||
DEBUG_LOG()<<" -- END load mission plan From Db -- ";
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -181,11 +180,11 @@ bool MissionPlanHandler::isUasInAutoMode(int participantId)
|
||||
|
||||
if (uas.id() < 1)
|
||||
{
|
||||
ERROR_LOG(m_logger) << "no uas for pid " << participantId;
|
||||
ERROR_LOG() << "no uas for pid " << participantId;
|
||||
return false;
|
||||
}
|
||||
|
||||
DEBUG_LOG(m_logger) << "uas with pid " << participantId << " is in mode: " << (int)uas.uasState().underlying();
|
||||
DEBUG_LOG() << "uas with pid " << participantId << " is in mode: " << (int)uas.uasState().underlying();
|
||||
|
||||
return (uas.uasState() == ProjectDataManagement::UasState::Auto);
|
||||
}
|
||||
@@ -216,7 +215,7 @@ bool MissionPlanHandler::isUasCombatReady(int participantId)
|
||||
youngestState.stateTime(0);
|
||||
for (const auto &si : history)
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "StateInformation "
|
||||
DEBUG_LOG() << "StateInformation "
|
||||
<< " time=" << si.stateTime()
|
||||
<< " vulnerabilityBits=" << si.vulnerabilityBits()
|
||||
<< " vulnerabilityKindId=" << si.vulnerabilityKindId();
|
||||
@@ -229,7 +228,7 @@ bool MissionPlanHandler::isUasCombatReady(int participantId)
|
||||
|
||||
Core::FunctionReplyObject MissionPlanHandler::createMissionPlanRequest(const ModifyMissionPlanRequest &request)
|
||||
{
|
||||
DEBUG_LOG(m_logger) <<" >> -- createMissionPlanRequest -- ";
|
||||
DEBUG_LOG() <<" >> -- createMissionPlanRequest -- ";
|
||||
if (request.participantId() > 0 && !isUasParticipant(request.participantId()))
|
||||
{
|
||||
return Core::FunctionReplyObject(tr_lts("dds", "Participant with id %1 is not a Uas participant.")).arg(request.participantId());
|
||||
@@ -268,7 +267,7 @@ Core::FunctionReplyObject MissionPlanHandler::createMissionPlanRequest(const Mod
|
||||
|
||||
Core::FunctionReplyObject MissionPlanHandler::modifyMissionPlanRequest(const ModifyMissionPlanRequest &request)
|
||||
{
|
||||
DEBUG_LOG(m_logger)<<" >> -- modifyMissionPlanRequest -- ";
|
||||
DEBUG_LOG()<<" >> -- modifyMissionPlanRequest -- ";
|
||||
/// 1- update Mission plan Table
|
||||
/// 2- remove first all mission items and their actions
|
||||
/// 3- add New mission items
|
||||
@@ -286,7 +285,7 @@ Core::FunctionReplyObject MissionPlanHandler::modifyMissionPlanRequest(const Mod
|
||||
|
||||
Core::FunctionReplyObject MissionPlanHandler::removeMissionPlanRequest(int id)
|
||||
{
|
||||
DEBUG_LOG(m_logger)<<" >> -- removeMissionPlanRequest -- ";
|
||||
DEBUG_LOG()<<" >> -- removeMissionPlanRequest -- ";
|
||||
Core::FunctionReplyObject ret;
|
||||
ObjectMissionPlan *obj = m_objMissionPlans.value(id, nullptr);
|
||||
if (!obj)
|
||||
@@ -318,7 +317,7 @@ bool MissionPlanHandler::setCurrentMissionActionFulfilled(int participantId, con
|
||||
{
|
||||
const QString thisMissionName(QStringLiteral("%1_%2_%3").arg(missionPlan->missionPlan().id()).arg(QString::fromStdString(missionPlan->missionPlan().name()), QString::fromStdString(item.name())));
|
||||
|
||||
INFO_LOG(m_logger) << ">> mission item: this mission name: " << thisMissionName << ", fulfilled: " << msa.fulfilled();
|
||||
INFO_LOG() << ">> mission item: this mission name: " << thisMissionName << ", fulfilled: " << msa.fulfilled();
|
||||
|
||||
if (msa.fulfilled() > 0)
|
||||
{
|
||||
@@ -330,7 +329,7 @@ bool MissionPlanHandler::setCurrentMissionActionFulfilled(int participantId, con
|
||||
continue;
|
||||
}
|
||||
|
||||
DEBUG_LOG(m_logger) << ">> ######### setMissionActionFulfilledRequest !!! item = " << item.itemNumber() << ", name = " << item.name() << ", missionPlan = " << missionPlan->missionPlan().id();
|
||||
DEBUG_LOG() << ">> ######### setMissionActionFulfilledRequest !!! item = " << item.itemNumber() << ", name = " << item.name() << ", missionPlan = " << missionPlan->missionPlan().id();
|
||||
SetMissionActionFulfilledRequest req;
|
||||
req.actionNumber(msa.actionNumber());
|
||||
req.fulfilled(true);
|
||||
@@ -339,7 +338,7 @@ bool MissionPlanHandler::setCurrentMissionActionFulfilled(int participantId, con
|
||||
const auto res = setMissionActionFulfilledRequest(req);
|
||||
if (res.error())
|
||||
{
|
||||
ERROR_LOG(m_logger) << "failed to set current mission action as fulfilled: " << res.str();
|
||||
ERROR_LOG() << "failed to set current mission action as fulfilled: " << res.str();
|
||||
}
|
||||
|
||||
found = true;
|
||||
@@ -365,13 +364,13 @@ bool MissionPlanHandler::setCurrentMissionActionFulfilled(int participantId, con
|
||||
}
|
||||
|
||||
// maybe okay? last mission action was already fulfilled? is this even possible at this point?
|
||||
DEBUG_LOG(m_logger) << "failed to set current mission action as fulfilled: no action found for pId " << participantId;
|
||||
DEBUG_LOG() << "failed to set current mission action as fulfilled: no action found for pId " << participantId;
|
||||
return false;
|
||||
}
|
||||
|
||||
Core::FunctionReplyObject MissionPlanHandler::setMissionActionFulfilledRequest(const SetMissionActionFulfilledRequest &request)
|
||||
{
|
||||
DEBUG_LOG(m_logger)<<" -- [setMissionActionFulfilledRequest] req.missionId: "<<request.missionId();
|
||||
DEBUG_LOG()<<" -- [setMissionActionFulfilledRequest] req.missionId: "<<request.missionId();
|
||||
Core::FunctionReplyObject ret;
|
||||
ObjectMissionPlan *obj = m_objMissionPlans.value(request.missionId(), nullptr);
|
||||
if (!obj)
|
||||
@@ -392,7 +391,7 @@ bool MissionPlanHandler::isUasParticipant(int participantId) const
|
||||
|
||||
if (PARTICIPANT == nullptr)
|
||||
{
|
||||
WARNING_LOG(m_logger) << "Got invalid participantId " << participantId;
|
||||
WARNING_LOG() << "Got invalid participantId " << participantId;
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
-1
@@ -56,7 +56,6 @@ private:
|
||||
|
||||
MainHandler *m_mainHandler;
|
||||
QHash<int32_t, ObjectMissionPlan *> m_objMissionPlans;
|
||||
LOGGER_T m_logger;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
+15
-16
@@ -23,9 +23,8 @@ ObjectMissionPlan::ObjectMissionPlan(const std::shared_ptr<DdsHandler> &ddsHandl
|
||||
, m_ddsHandler(ddsHandler)
|
||||
, m_db(db)
|
||||
, m_missionplan(missionPlan)
|
||||
, m_logger(getLogger("ObjectMissionPlan"))
|
||||
{
|
||||
DEBUG_LOG(m_logger)<<" - ctor ObjectMissionPlan: planId: "<<m_missionplan.id();
|
||||
DEBUG_LOG()<<" - ctor ObjectMissionPlan: planId: "<<m_missionplan.id();
|
||||
|
||||
}
|
||||
|
||||
@@ -126,7 +125,7 @@ Core::FunctionReplyObject ObjectMissionPlan::createMissionPlan(Database::PpmMiss
|
||||
if (!m_db->insert(newMissionPlan))
|
||||
{
|
||||
QString error = QStringLiteral("Could not insert mission plan into database");
|
||||
ERROR_LOG(m_logger)<< error;
|
||||
ERROR_LOG()<< error;
|
||||
return Core::FunctionReplyObject(error.toStdString().c_str());
|
||||
}
|
||||
|
||||
@@ -182,11 +181,11 @@ Core::FunctionReplyObject ObjectMissionPlan::createMissionPlan(Database::PpmMiss
|
||||
for (auto &item : m_missionplan.items())
|
||||
{
|
||||
for (auto &action : item.actions())
|
||||
DEBUG_LOG(m_logger)<<"[CREATE] itemIdx: "<<item.itemNumber()
|
||||
DEBUG_LOG()<<"[CREATE] itemIdx: "<<item.itemNumber()
|
||||
<<" act.Num: "<<action.actionNumber()<<" act.ItemNum: "<<action.itemNumber()<<" itemFul:"<<action.fulfilled();
|
||||
}
|
||||
trans.commit();
|
||||
DEBUG_LOG(m_logger)<< ">> [NEW] mission plan with id( "<<newMissionPlan.id<<" ) inserted !!";
|
||||
DEBUG_LOG()<< ">> [NEW] mission plan with id( "<<newMissionPlan.id<<" ) inserted !!";
|
||||
return Core::FunctionReplyObject(newMissionPlan.id);
|
||||
}
|
||||
|
||||
@@ -206,7 +205,7 @@ Core::FunctionReplyObject ObjectMissionPlan::updateMissionPlan(Database::PpmMiss
|
||||
if (!m_db->update(newMissionPlan))
|
||||
{
|
||||
QString error = QStringLiteral("Could not update mission plan! ");
|
||||
ERROR_LOG(m_logger)<< error;
|
||||
ERROR_LOG()<< error;
|
||||
return Core::FunctionReplyObject(error.toStdString().c_str());
|
||||
}
|
||||
|
||||
@@ -216,7 +215,7 @@ Core::FunctionReplyObject ObjectMissionPlan::updateMissionPlan(Database::PpmMiss
|
||||
if (!m_db->removePpmMissionItem(itemId))
|
||||
{
|
||||
QString error = QStringLiteral("Could not remove mission plan from database");
|
||||
ERROR_LOG(m_logger)<< error;
|
||||
ERROR_LOG()<< error;
|
||||
return Core::FunctionReplyObject(0, tr_lts("dds", "Could not update mission plan into!"));
|
||||
}
|
||||
}
|
||||
@@ -270,7 +269,7 @@ Core::FunctionReplyObject ObjectMissionPlan::updateMissionPlan(Database::PpmMiss
|
||||
m_missionplan.itemsFulfilled(0); // on update items and action entries will be cleared
|
||||
m_missionplan.fulfilled(0);
|
||||
|
||||
DEBUG_LOG(m_logger)<< ">> [UPDATE] mission plan with id( "<<m_missionplan.id()<<" ) Updated !!";
|
||||
DEBUG_LOG()<< ">> [UPDATE] mission plan with id( "<<m_missionplan.id()<<" ) Updated !!";
|
||||
|
||||
return Core::FunctionReplyObject(m_missionplan.id());
|
||||
}
|
||||
@@ -281,13 +280,13 @@ Core::FunctionReplyObject ObjectMissionPlan::removeMissionPlan(int id)
|
||||
if (!m_db->removePpmMissionPlan(id))
|
||||
{
|
||||
QString error = QStringLiteral("Could not remove mission plan ! ");
|
||||
ERROR_LOG(m_logger)<< error;
|
||||
ERROR_LOG()<< error;
|
||||
return Core::FunctionReplyObject(error.toStdString().c_str());
|
||||
}
|
||||
trans.commit();
|
||||
m_dbMissionActions.clear();
|
||||
m_mapMissionItems.clear();
|
||||
DEBUG_LOG(m_logger)<< ">> [REMOVE] mission Action with id( "<<id<<" ) deleted !!";
|
||||
DEBUG_LOG()<< ">> [REMOVE] mission Action with id( "<<id<<" ) deleted !!";
|
||||
return Core::FunctionReplyObject();
|
||||
}
|
||||
|
||||
@@ -301,14 +300,14 @@ Core::FunctionReplyObject ObjectMissionPlan::setMissionActionFulfilled(SetMissio
|
||||
|
||||
if (!m_db)
|
||||
{
|
||||
ERROR_LOG(m_logger) << "no init yet....";
|
||||
ERROR_LOG() << "no init yet....";
|
||||
return Core::FunctionReplyObject("");
|
||||
}
|
||||
|
||||
if (req.missionId() != m_missionplan.id())
|
||||
{
|
||||
QString error = QStringLiteral("Wrong missionPlan Object caught Request: %1 / currPlanId: %2").arg(req.missionId()).arg(m_missionplan.id());
|
||||
ERROR_LOG(m_logger)<< error;
|
||||
ERROR_LOG()<< error;
|
||||
return Core::FunctionReplyObject(error.toStdString().c_str());
|
||||
}
|
||||
|
||||
@@ -327,7 +326,7 @@ Core::FunctionReplyObject ObjectMissionPlan::setMissionActionFulfilled(SetMissio
|
||||
|| req.itemNumber() < 0) // actionNumber start by 0
|
||||
{
|
||||
QString error = QStringLiteral("Could not set mission action with id: %1 ! ").arg(req.actionNumber());
|
||||
ERROR_LOG(m_logger)<< error;
|
||||
ERROR_LOG()<< error;
|
||||
return Core::FunctionReplyObject(error.toStdString().c_str());
|
||||
}
|
||||
|
||||
@@ -337,7 +336,7 @@ Core::FunctionReplyObject ObjectMissionPlan::setMissionActionFulfilled(SetMissio
|
||||
if (!m_db->update(dbAction))
|
||||
{
|
||||
QString error = QStringLiteral("Could not update mission action! ");
|
||||
ERROR_LOG(m_logger)<< error;
|
||||
ERROR_LOG()<< error;
|
||||
return Core::FunctionReplyObject(error.toStdString().c_str());
|
||||
}
|
||||
|
||||
@@ -372,7 +371,7 @@ Core::FunctionReplyObject ObjectMissionPlan::setMissionActionFulfilled(SetMissio
|
||||
|
||||
Core::FunctionReplyObject ObjectMissionPlan::setMissionPlanAborted(bool state)
|
||||
{
|
||||
DEBUG_LOG(m_logger)<<" -- [setMissionPlanAborted] abort mission plan: "<<m_missionplan.id();
|
||||
DEBUG_LOG()<<" -- [setMissionPlanAborted] abort mission plan: "<<m_missionplan.id();
|
||||
Database::PpmMissionPlan dbMissionPlan;
|
||||
// m_db->selectPpmMissionPlan(m_missionplan.id(),dbMissionPlan);
|
||||
dbMissionPlan.missionStart = QDateTime::fromMSecsSinceEpoch(m_missionplan.missionStart());
|
||||
@@ -388,7 +387,7 @@ Core::FunctionReplyObject ObjectMissionPlan::setMissionPlanAborted(bool state)
|
||||
if (!m_db->update(dbMissionPlan))
|
||||
{
|
||||
QString error = QStringLiteral("Could not update mission plan! ");
|
||||
ERROR_LOG(m_logger)<< error;
|
||||
ERROR_LOG()<< error;
|
||||
return Core::FunctionReplyObject(error.toStdString().c_str());
|
||||
}
|
||||
|
||||
|
||||
-2
@@ -51,8 +51,6 @@ private:
|
||||
QHash<int /*dbItemId*/, ParticipantManagement::MissionItem > m_mapMissionItems; /// key:dbItemId | Value MissionItem
|
||||
|
||||
std::vector<std::vector<ParticipantManagement::Database::PpmMissionAction> > m_dbMissionActions; /// [ItemNumber][ActionNumber]
|
||||
|
||||
LOGGER_T m_logger;
|
||||
};
|
||||
|
||||
} // namespace UasHandling
|
||||
|
||||
+13
-14
@@ -26,7 +26,6 @@ UasHandler::UasHandler(MainHandler *mainHandler)
|
||||
, CreateModifyUasRequestHandler(mainHandler->exAnyFts())
|
||||
, RemoveUasRequestHandler(mainHandler->exAnyFts())
|
||||
, m_mainHandler(mainHandler)
|
||||
, m_logger(getLogger("UasHandler"))
|
||||
{
|
||||
m_mainHandler->exAnyFts()->enableCreateModifyUas();
|
||||
m_mainHandler->exAnyFts()->enableRemoveUas();
|
||||
@@ -50,7 +49,7 @@ bool UasHandler::init()
|
||||
// read parties from db
|
||||
if (!m_mainHandler->db()->select(uasVec))
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Error while reading Uas data from database";
|
||||
ERROR_LOG() << "Error while reading Uas data from database";
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -70,7 +69,7 @@ bool UasHandler::init()
|
||||
this, &UasHandler::onExerciseChanged);
|
||||
if (!m_exmDtc->enableExercise())
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Could not enable Topic 'Exercise' of EXM DTC";
|
||||
ERROR_LOG() << "Could not enable Topic 'Exercise' of EXM DTC";
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -90,16 +89,16 @@ void UasHandler::onCreateModifyUasRequest(const rti::core::SampleIdentity &cooki
|
||||
|
||||
void UasHandler::onRemoveUasRequest(const rti::core::SampleIdentity &cookie, const RemoveUasRequest &request)
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "onRemoveUasRequest: " << request;
|
||||
DEBUG_LOG() << "onRemoveUasRequest: " << request;
|
||||
auto ret = removeUas(request);
|
||||
if (ret.error())
|
||||
WARNING_LOG(m_logger) << ret();
|
||||
WARNING_LOG() << ret();
|
||||
m_mainHandler->exAnyFts()->removeUasReply(cookie, ret);
|
||||
}
|
||||
|
||||
Core::FunctionReplyObject UasHandler::removeUas(const RemoveUasRequest &request)
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "onRemoveUasRequest " << request;
|
||||
DEBUG_LOG() << "onRemoveUasRequest " << request;
|
||||
|
||||
if (request.id() < 0)
|
||||
return Core::FunctionReplyObject(tr_lts("dds", "Got request to delete an UAS, but no valid UAS id to delete"));
|
||||
@@ -112,7 +111,7 @@ Core::FunctionReplyObject UasHandler::removeUas(const RemoveUasRequest &request)
|
||||
if (uasToDelete->participantId() > 0)
|
||||
return Core::FunctionReplyObject(tr_lts("dds", "Not possible to delete a UAS in use"));
|
||||
|
||||
DEBUG_LOG(m_logger) << "Removing UAS with ID " << request.id();
|
||||
DEBUG_LOG() << "Removing UAS with ID " << request.id();
|
||||
|
||||
return removeUas(uasToDelete);
|
||||
}
|
||||
@@ -138,7 +137,7 @@ Core::FunctionReplyObject UasHandler::removeUas(UasHandling::Uas *uasToDelete)
|
||||
//------------------------------------------------------------------------------------------
|
||||
Core::FunctionReplyObject UasHandler::createUas(const CreateModifyUasRequest &request)
|
||||
{
|
||||
DEBUG_LOG(m_logger) << LOGFUNCTION;
|
||||
DEBUG_LOG() << Q_FUNC_INFO;
|
||||
|
||||
// cant check here as we dont have access to all party participants
|
||||
/*
|
||||
@@ -146,7 +145,7 @@ Core::FunctionReplyObject UasHandler::createUas(const CreateModifyUasRequest &re
|
||||
{
|
||||
QString error = QStringLiteral("Participant with id %1 is no Uas participant.").arg(request.participantId());
|
||||
|
||||
ERROR_LOG(m_logger) << error;
|
||||
ERROR_LOG() << error;
|
||||
|
||||
return Core::FunctionReplyObject(error.toStdString().c_str());
|
||||
}*/
|
||||
@@ -169,7 +168,7 @@ Core::FunctionReplyObject UasHandler::createUas(const CreateModifyUasRequest &re
|
||||
{
|
||||
QString error = QStringLiteral("Could not insert Uas into database");
|
||||
|
||||
ERROR_LOG(m_logger) << error;
|
||||
ERROR_LOG() << error;
|
||||
|
||||
return Core::FunctionReplyObject(error.toStdString().c_str());
|
||||
}
|
||||
@@ -189,7 +188,7 @@ Core::FunctionReplyObject UasHandler::modifyUas(const CreateModifyUasRequest &re
|
||||
{
|
||||
QString error = QStringLiteral("Uas topic with id %1 not present. Not possible to modify it.").arg(request.id());
|
||||
|
||||
ERROR_LOG(m_logger) << error;
|
||||
ERROR_LOG() << error;
|
||||
|
||||
return Core::FunctionReplyObject(error.toStdString().c_str());
|
||||
}
|
||||
@@ -205,7 +204,7 @@ Core::FunctionReplyObject UasHandler::modifyUas(const CreateModifyUasRequest &re
|
||||
{
|
||||
QString error = QStringLiteral("There are no changes in modify request.");
|
||||
|
||||
ERROR_LOG(m_logger) << error;
|
||||
ERROR_LOG() << error;
|
||||
|
||||
return Core::FunctionReplyObject(error.toStdString().c_str());
|
||||
}
|
||||
@@ -216,7 +215,7 @@ Core::FunctionReplyObject UasHandler::modifyUas(const CreateModifyUasRequest &re
|
||||
{
|
||||
QString error = QStringLiteral("Participant with id %1 is no Uas participant.").arg(request.participantId());
|
||||
|
||||
ERROR_LOG(m_logger) << error;
|
||||
ERROR_LOG() << error;
|
||||
|
||||
return Core::FunctionReplyObject(error.toStdString().c_str());
|
||||
}
|
||||
@@ -234,7 +233,7 @@ bool UasHandler::isUasParticipant(int participantId) const
|
||||
|
||||
if (PARTICIPANT == nullptr)
|
||||
{
|
||||
WARNING_LOG(m_logger) << "Got invalid participantId " << participantId;
|
||||
WARNING_LOG() << "Got invalid participantId " << participantId;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
-3
@@ -53,9 +53,6 @@ private:
|
||||
MainHandler *m_mainHandler;
|
||||
std::shared_ptr<ExerciseManagement::Interface::Dtc> m_exmDtc;
|
||||
QHash<int32_t, Uas *> m_uass;
|
||||
|
||||
LOGGER_T m_logger;
|
||||
|
||||
};
|
||||
} // namespace UasHandling
|
||||
} // namespace ParticipantManagement
|
||||
Reference in new issue
Block a user