diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AssetManagement/ModuleTests/asm_tests.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/AssetManagement/ModuleTests/asm_tests.cpp index 2b3c67ec3..9a5fbdda9 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AssetManagement/ModuleTests/asm_tests.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AssetManagement/ModuleTests/asm_tests.cpp @@ -96,86 +96,86 @@ void AsmTests::setRequestData(AssetManagement::TrainingAreaModifyRequest &reques std::vector elevation_param; std::vector sceneObjects_param; - mapDescription.name("Topographic 01"); - mapDescription.description("Description_01"); - mapDescription.isDeleted(false); - mapDescription.mapTypeId(AssetManagement::MapType_def::Topographic); - mapDescription.mapDescriptionTypeId(AssetManagement::MapDescriptionType::Map2D); - mapDescription.maxScale(20.0); - mapDescription.minScale(0.5); + mapDescription.name = "Topographic 01"; + mapDescription.description = "Description_01"; + mapDescription.isDeleted = false; + mapDescription.mapTypeId = AssetManagement::MapType::Topographic; + mapDescription.mapDescriptionTypeId = AssetManagement::MapDescriptionType::Map2D; + mapDescription.maxScale = 20.0; + mapDescription.minScale = 0.5; if (modId > 0) { - mapDescription.trainingAreaId(modId); - mapDescription.url("URL1 modified"); + mapDescription.trainingAreaId = modId; + mapDescription.url = "URL1 modified"; } else - mapDescription.url("URL1 initial"); + mapDescription.url = "URL1 initial"; map2D_param.resize(2); map2D_param[0] = mapDescription; - mapDescription.name("Topographic 02"); - mapDescription.description("Description_02"); + mapDescription.name = "Topographic 02"; + mapDescription.description = "Description_02"; if (modId > 0) { - mapDescription.trainingAreaId(modId); - mapDescription.url("URL2 modified"); + mapDescription.trainingAreaId = modId; + mapDescription.url = "URL2 modified"; } else - mapDescription.url("URL2 initial"); + mapDescription.url = "URL2 initial"; map2D_param[1] = mapDescription; - request.map2D(map2D_param); + request.map2D = map2D_param; scene3D_param.resize(1); - mapDescription.mapTypeId(AssetManagement::MapType_def::Topographic); - mapDescription.mapDescriptionTypeId(AssetManagement::MapDescriptionType::Scene3D); - mapDescription.description("Description_03"); - mapDescription.name("Scene3D"); + mapDescription.mapTypeId = AssetManagement::MapType::Topographic; + mapDescription.mapDescriptionTypeId = AssetManagement::MapDescriptionType::Scene3D; + mapDescription.description = "Description_03"; + mapDescription.name = "Scene3D"; if (modId > 0) { - mapDescription.trainingAreaId(modId); - mapDescription.url("URL3 modified"); + mapDescription.trainingAreaId = modId; + mapDescription.url = "URL3 modified"; } else - mapDescription.url("URL3 initial"); + mapDescription.url = "URL3 initial"; scene3D_param[0] = mapDescription; - request.scene3D(scene3D_param); + request.scene3D = scene3D_param; if (modId == 0) { elevation_param.resize(1); - mapDescription.mapTypeId(AssetManagement::MapType_def::Elevation); - mapDescription.mapDescriptionTypeId(AssetManagement::MapDescriptionType::Elevation); - mapDescription.url("URL4 initial"); - mapDescription.description("Description_04"); - mapDescription.name("Elevation"); + mapDescription.mapTypeId = AssetManagement::MapType::Elevation; + mapDescription.mapDescriptionTypeId = AssetManagement::MapDescriptionType::Elevation; + mapDescription.url = "URL4 initial"; + mapDescription.description = "Description_04"; + mapDescription.name = "Elevation"; elevation_param[0] = mapDescription; - request.elevation(elevation_param); + request.elevation = elevation_param; sceneObjects_param.resize(1); - mapDescription.mapTypeId(AssetManagement::MapType_def::SceneObjects); - mapDescription.mapDescriptionTypeId(AssetManagement::MapDescriptionType::SceneObj); - mapDescription.url("URL5 initial"); - mapDescription.description("Description_05"); - mapDescription.name("SceneObjects"); + mapDescription.mapTypeId = AssetManagement::MapType::SceneObjects; + mapDescription.mapDescriptionTypeId = AssetManagement::MapDescriptionType::SceneObj; + mapDescription.url = "URL5 initial"; + mapDescription.description = "Description_05"; + mapDescription.name = "SceneObjects"; sceneObjects_param[0] = mapDescription; - request.sceneObjects(sceneObjects_param); + request.sceneObjects = sceneObjects_param; - request.id(0); - request.name("TestTrainingAreaCreate"); - request.bottomLeft(Core::GeoPosition2D(11.61/180*M_PI, 53.07/180*M_PI)); - request.height(100000); - request.width(100000); - request.image(imageVector); + request.id = 0; + request.name = "TestTrainingAreaCreate"; + request.bottomLeft = Core::GeoPosition2D(11.61/180*M_PI, 53.07/180*M_PI); + request.height = 100000; + request.width = 100000; + request.image = imageVector; } else { - request.id(m_trainingAreaId); - request.name("TestTrainingAreaModified"); - request.bottomLeft(Core::GeoPosition2D(11.61/180*M_PI, 53.07/180*M_PI)); - request.height(140000); - request.width(120000); + request.id = m_trainingAreaId; + request.name = "TestTrainingAreaModified"; + request.bottomLeft = Core::GeoPosition2D(11.61/180*M_PI, 53.07/180*M_PI); + request.height = 140000; + request.width = 120000; } } diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AssetManagement/asm_dtc_impl_custom.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/AssetManagement/asm_dtc_impl_custom.cpp index 7e89b2d34..e1ee21d6c 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AssetManagement/asm_dtc_impl_custom.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AssetManagement/asm_dtc_impl_custom.cpp @@ -31,10 +31,10 @@ bool DtcImplCustom::isAARWorkstation(const QString &wsName) int wsId = -1; for (const auto &at : m_dtcAsset->readAlive()) { - if (at.data().assetTypeId() == AssetManagement::AssetType::MobileAfterActionVehicle && - QString::fromStdString(at.data().name()).toUpper() == wsName.toUpper()) + if (at.data().assetTypeId == AssetManagement::AssetType::MobileAfterActionVehicle && + QString::fromStdString(at.data().name).toUpper() == wsName.toUpper()) { - wsId = at.data().id(); + wsId = at.data().id; break; } } @@ -53,9 +53,9 @@ int DtcImplCustom::getAssetId(const QString &wsName) int wsId = -1; for (const auto &at : m_dtcAsset->readAlive()) { - if ( QString::fromStdString(at.data().name()).toUpper() == wsName.toUpper()) + if ( QString::fromStdString(at.data().name).toUpper() == wsName.toUpper()) { - wsId = at.data().id(); + wsId = at.data().id; break; } } diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AssetManagement/convert_db_to_dds.h b/qt6-after/qt6-migrated-legatus/Lts/Services/AssetManagement/convert_db_to_dds.h index 4836aa24d..e4696c086 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AssetManagement/convert_db_to_dds.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AssetManagement/convert_db_to_dds.h @@ -20,31 +20,31 @@ inline TrainingArea convert(const AsmTrainingArea &dbData) { TrainingArea ddsData; - ddsData.id(dbData.id); - ddsData.name(dbData.name.toStdString()); - ddsData.bottomLeft(Core::GeoPosition2D(dbData.bottomLeft.x(), dbData.bottomLeft.y())); - ddsData.height(dbData.height); - ddsData.width(dbData.width); - ddsData.image() = LtsUtils::convert>(dbData.image); + ddsData.id = dbData.id; + ddsData.name = dbData.name.toStdString(); + ddsData.bottomLeft = Core::GeoPosition2D(dbData.bottomLeft.x(), dbData.bottomLeft.y()); + ddsData.height = dbData.height; + ddsData.width = dbData.width; + ddsData.image = LtsUtils::convert>(dbData.image); // init data not in db - ddsData.isDeleted(false); - ddsData.isUsed(false); + ddsData.isDeleted = false; + ddsData.isUsed = false; return ddsData; } inline MapDescription convert(const AsmMapDescription &dbData) { MapDescription ddsData; - ddsData.id(dbData.id); - ddsData.name(dbData.name.toStdString()); - ddsData.description(dbData.description.toStdString()); - ddsData.mapDescriptionTypeId(dbData.mapDescriptionTypeId); - ddsData.mapTypeId(dbData.mapTypeId); - ddsData.maxScale(dbData.minScale); - ddsData.minScale(dbData.minScale); - ddsData.trainingAreaId(dbData.trainingAreaId); - ddsData.url(dbData.url.toStdString()); + ddsData.id = dbData.id; + ddsData.name = dbData.name.toStdString(); + ddsData.description = dbData.description.toStdString(); + ddsData.mapDescriptionTypeId = dbData.mapDescriptionTypeId; + ddsData.mapTypeId = dbData.mapTypeId; + ddsData.maxScale = dbData.minScale; + ddsData.minScale = dbData.minScale; + ddsData.trainingAreaId = dbData.trainingAreaId; + ddsData.url = dbData.url.toStdString(); return ddsData; } } diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AssetManagement/handler_asset.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/AssetManagement/handler_asset.cpp index 816fe6f45..306489163 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AssetManagement/handler_asset.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AssetManagement/handler_asset.cpp @@ -70,11 +70,11 @@ void HandlerAsset::onAssetModifyRequest(const rti::core::SampleIdentity &cookie, Core::FunctionReplyObject HandlerAsset::assetModifyRequest(const Asset &request) { // modify - if (request.id() > 0) + if (request.id > 0) { - ObjectAsset *ifs = m_objectAssetMap.value(request.id()); + ObjectAsset *ifs = m_objectAssetMap.value(request.id); if (!ifs) - return Core::FunctionReplyObject(request.id(), tr_lts("dds", "Asset with id %1 not found")).arg(request.id()); + return Core::FunctionReplyObject(request.id, tr_lts("dds", "Asset with id %1 not found")).arg(request.id); return ifs->updateObject(request); } // create @@ -96,18 +96,18 @@ void HandlerAsset::onAssetRemoveRequest(const rti::core::SampleIdentity &cookie, const Core::RemoveElementRequest &request) { Core::FunctionReplyObject ret; - ObjectAsset *ifs = m_objectAssetMap.value(request.id()); + ObjectAsset *ifs = m_objectAssetMap.value(request.id); if (ifs == nullptr) { - ret = Core::FunctionReplyObject(request.id(), tr_lts("dds", "Asset with id %1 not found")).arg(request.id()); + ret = Core::FunctionReplyObject(request.id, tr_lts("dds", "Asset with id %1 not found")).arg(request.id); m_mainHandler->dds()->fts()->assetRemoveReply(cookie, ret); return; } if (m_mainHandler->dds()->topicLockMaster()->isLocked(ifs->getData(), m_mainHandler->exerciseId())) { - ret = Core::FunctionReplyObject(request.id(), tr_lts("dds", "Asset '%1' is used by another user!")).arg(ifs->getName()); + ret = Core::FunctionReplyObject(request.id, tr_lts("dds", "Asset '%1' is used by another user!")).arg(ifs->getName()); m_mainHandler->dds()->fts()->assetRemoveReply(cookie, ret); return; } @@ -120,7 +120,7 @@ void HandlerAsset::onAssetRemoveRequest(const rti::core::SampleIdentity &cookie, { // delete ObjectAsset delete ifs; - m_objectAssetMap.remove(request.id()); + m_objectAssetMap.remove(request.id); } m_mainHandler->dds()->fts()->assetRemoveReply(cookie, ret); diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AssetManagement/handler_location.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/AssetManagement/handler_location.cpp index 85451a530..ca4f46ed4 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AssetManagement/handler_location.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AssetManagement/handler_location.cpp @@ -18,13 +18,13 @@ static inline Location toDdsData(const Database::AsmLocation &dbData) { Location ddsData; - ddsData.id(dbData.id); - ddsData.name(dbData.name.toStdString()); - ddsData.description(dbData.description.toStdString()); + ddsData.id = dbData.id; + ddsData.name = dbData.name.toStdString(); + ddsData.description = dbData.description.toStdString(); // init data not in db - ddsData.isDeleted(false); - ddsData.isUsed(false); + ddsData.isDeleted = false; + ddsData.isUsed = false; return ddsData; } diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AssetManagement/handler_relay_info.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/AssetManagement/handler_relay_info.cpp index d324e8064..f11cf3d13 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AssetManagement/handler_relay_info.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AssetManagement/handler_relay_info.cpp @@ -70,11 +70,11 @@ void HandlerRelayInfo::onRelayInfoModifyRequest(const rti::core::SampleIdentity Core::FunctionReplyObject HandlerRelayInfo::relayInfoModifyRequest(const RelayInfo &request) { // modify - if (request.id() > 0) + if (request.id > 0) { - ObjectRelayInfo *ifs = m_objectRelayInfoMap.value(request.id()); + ObjectRelayInfo *ifs = m_objectRelayInfoMap.value(request.id); if (!ifs) - return Core::FunctionReplyObject(request.id(), tr_lts("dds", "RelayInfo with id %1 not found")).arg(request.id()); + return Core::FunctionReplyObject(request.id, tr_lts("dds", "RelayInfo with id %1 not found")).arg(request.id); return ifs->updateObject(request); } // create @@ -96,18 +96,18 @@ void HandlerRelayInfo::onRelayInfoRemoveRequest(const rti::core::SampleIdentity const Core::RemoveElementRequest &request) { Core::FunctionReplyObject ret; - ObjectRelayInfo *ifs = m_objectRelayInfoMap.value(request.id()); + ObjectRelayInfo *ifs = m_objectRelayInfoMap.value(request.id); if (ifs == nullptr) { - ret = Core::FunctionReplyObject(request.id(), tr_lts("dds", "RelayInfo with id %1 not found")).arg(request.id()); + ret = Core::FunctionReplyObject(request.id, tr_lts("dds", "RelayInfo with id %1 not found")).arg(request.id); m_mainHandler->dds()->fts()->relayInfoRemoveReply(cookie, ret); return; } if (m_mainHandler->dds()->topicLockMaster()->isLocked(ifs->getData(), m_mainHandler->exerciseId())) { - ret = Core::FunctionReplyObject(request.id(), tr_lts("dds", "RelayInfo '%1' is used by another user!")).arg(ifs->getName()); + ret = Core::FunctionReplyObject(request.id, tr_lts("dds", "RelayInfo '%1' is used by another user!")).arg(ifs->getName()); m_mainHandler->dds()->fts()->relayInfoRemoveReply(cookie, ret); return; } @@ -120,7 +120,7 @@ void HandlerRelayInfo::onRelayInfoRemoveRequest(const rti::core::SampleIdentity { // delete ObjectRelayInfo delete ifs; - m_objectRelayInfoMap.remove(request.id()); + m_objectRelayInfoMap.remove(request.id); } m_mainHandler->dds()->fts()->relayInfoRemoveReply(cookie, ret); diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AssetManagement/handler_training_area.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/AssetManagement/handler_training_area.cpp index 65330903b..b44deaf4f 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AssetManagement/handler_training_area.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AssetManagement/handler_training_area.cpp @@ -54,21 +54,21 @@ bool HandlerTrainingArea::init() if (mapDescriptionSeqences.contains(data.trainingAreaId)) mapDescriptionSeq = mapDescriptionSeqences.value(data.trainingAreaId); - switch (data.mapDescriptionTypeId.underlying()) + switch (data.mapDescriptionTypeId) { - case AssetManagement::MapDescriptionType_def::Map2D: + case AssetManagement::MapDescriptionType::Map2D: mapDescriptionSeq.map2D.insert(data.objOrder, data); INFO_LOG(m_logger) << "map2D.insert order =" << data.objOrder; break; - case AssetManagement::MapDescriptionType_def::Scene3D: + case AssetManagement::MapDescriptionType::Scene3D: mapDescriptionSeq.scene3D.insert(data.objOrder, data); INFO_LOG(m_logger) << "Scene3D.insert order =" << data.objOrder; break; - case AssetManagement::MapDescriptionType_def::Elevation: + case AssetManagement::MapDescriptionType::Elevation: mapDescriptionSeq.elevation.insert(data.objOrder, data); INFO_LOG(m_logger) << "Elevation.insert order =" << data.objOrder; break; - case AssetManagement::MapDescriptionType_def::SceneObj: + case AssetManagement::MapDescriptionType::SceneObj: mapDescriptionSeq.sceneObj.insert(data.objOrder, data); INFO_LOG(m_logger) << "sceneObj.insert order =" << data.objOrder; break; @@ -100,25 +100,25 @@ bool HandlerTrainingArea::init() ObjectTrainingArea *ifs(new ObjectTrainingArea(m_mainHandler)); TrainingArea taData = convert(data); // insert sequences - if (mapDescriptionSeqences.contains(taData.id()) ) + if (mapDescriptionSeqences.contains(taData.id) ) { - const MapDescriptionSeq mapDescriptionSeq = mapDescriptionSeqences.value(taData.id()); + const MapDescriptionSeq mapDescriptionSeq = mapDescriptionSeqences.value(taData.id); - taData.map2D().reserve(mapDescriptionSeq.map2D.size()); + taData.map2D.reserve(mapDescriptionSeq.map2D.size()); for (const auto &dbDesc : mapDescriptionSeq.map2D) - taData.map2D().push_back(ObjectMapDescription::toDdsData(dbDesc)); + taData.map2D.push_back(ObjectMapDescription::toDdsData(dbDesc)); - taData.scene3D().reserve(mapDescriptionSeq.scene3D.size()); + taData.scene3D.reserve(mapDescriptionSeq.scene3D.size()); for (const auto &dbDesc : mapDescriptionSeq.scene3D) - taData.scene3D().push_back(ObjectMapDescription::toDdsData(dbDesc)); + taData.scene3D.push_back(ObjectMapDescription::toDdsData(dbDesc)); - taData.elevation().reserve(mapDescriptionSeq.elevation.size()); + taData.elevation.reserve(mapDescriptionSeq.elevation.size()); for (const auto &dbDesc : mapDescriptionSeq.elevation) - taData.elevation().push_back(ObjectMapDescription::toDdsData(dbDesc)); + taData.elevation.push_back(ObjectMapDescription::toDdsData(dbDesc)); - taData.sceneObjects().reserve(mapDescriptionSeq.sceneObj.size()); + taData.sceneObjects.reserve(mapDescriptionSeq.sceneObj.size()); for (const auto &dbDesc : mapDescriptionSeq.sceneObj) - taData.sceneObjects().push_back(ObjectMapDescription::toDdsData(dbDesc)); + taData.sceneObjects.push_back(ObjectMapDescription::toDdsData(dbDesc)); } // end insert sequences Core::FunctionReplyObject ret = ifs->createObject(taData); @@ -146,7 +146,7 @@ void HandlerTrainingArea::removeMapDescriptions(int trainingAreaId) { it.next(); INFO_LOG(m_logger) << "remove map description key = " << it.key(); - if ( it.value()->getData().trainingAreaId() == trainingAreaId) + if ( it.value()->getData().trainingAreaId == trainingAreaId) { DEBUG_LOG(m_logger) << "remove id= " << it.key(); @@ -175,12 +175,12 @@ Core::FunctionReplyObject HandlerTrainingArea::trainingAreaModifyRequest(const T ObjectTrainingArea *ifs; Core::FunctionReplyObject ret; - if (request.id() > 0) + if (request.id > 0) { - ifs = m_objectTrainingAreaMap.value(request.id()); + ifs = m_objectTrainingAreaMap.value(request.id); if (ifs == nullptr) - return Core::FunctionReplyObject(request.id(), tr_lts("dds", "Training area with id %1 not found")).arg(request.id()); + return Core::FunctionReplyObject(request.id, tr_lts("dds", "Training area with id %1 not found")).arg(request.id); ret = ifs->updateObject(ddsData); if (ret.error()) return ret; @@ -198,7 +198,7 @@ Core::FunctionReplyObject HandlerTrainingArea::trainingAreaModifyRequest(const T else m_objectTrainingAreaMap.insert(ifs->getId(), ifs); } - if (request.id() > 0) // Modify + if (request.id > 0) // Modify { DEBUG_LOG(m_logger) << "modify: delete old entries in map_description"; removeMapDescriptions(ifs->getId()); @@ -206,19 +206,19 @@ Core::FunctionReplyObject HandlerTrainingArea::trainingAreaModifyRequest(const T // insert new entries - auto &map2D = ddsData.map2D(); - map2D.resize(request.map2D().size()); - for (unsigned int i = 0; i < request.map2D().size(); i++) + auto &map2D = ddsData.map2D; + map2D.resize(request.map2D.size()); + for (unsigned int i = 0; i < request.map2D.size(); i++) { - MapDescription mdData = request.map2D().at(i); + MapDescription mdData = request.map2D.at(i); ObjectMapDescription *md (new ObjectMapDescription(m_mainHandler)); - mdData.id(0); - mdData.trainingAreaId(ifs->getId()); + mdData.id = 0; + mdData.trainingAreaId = ifs->getId(); ret = md->createObject(mdData, i); DEBUG_LOG(m_logger) << "insert topographic entries in map_description" << " for training area id " << ifs->getId() - << " mapTypeId=" << mdData.mapTypeId() - << " mapDescriptionTypeId=" << mdData.mapDescriptionTypeId(); + << " mapTypeId=" << mdData.mapTypeId + << " mapDescriptionTypeId=" << mdData.mapDescriptionTypeId; if (!ret.error()) { map2D[i] = md->getData(); @@ -231,19 +231,19 @@ Core::FunctionReplyObject HandlerTrainingArea::trainingAreaModifyRequest(const T } } - auto &elevation = ddsData.elevation(); - elevation.resize(request.elevation().size()); - for (unsigned int i = 0; i < request.elevation().size(); i++) + auto &elevation = ddsData.elevation; + elevation.resize(request.elevation.size()); + for (unsigned int i = 0; i < request.elevation.size(); i++) { - MapDescription mdData = request.elevation().at(i); + MapDescription mdData = request.elevation.at(i); ObjectMapDescription *md (new ObjectMapDescription(m_mainHandler)); - mdData.id(0); - mdData.trainingAreaId(ifs->getId()); + mdData.id = 0; + mdData.trainingAreaId = ifs->getId(); ret = md->createObject(mdData, i); DEBUG_LOG(m_logger) << "insert elevation entries in map_description" << " for training area id " << ifs->getId() - << " mapTypeId=" << mdData.mapTypeId() - << " mapDescriptionTypeId=" << mdData.mapDescriptionTypeId(); + << " mapTypeId=" << mdData.mapTypeId + << " mapDescriptionTypeId=" << mdData.mapDescriptionTypeId; if (!ret.error()) { elevation[i] = md->getData(); @@ -256,19 +256,19 @@ Core::FunctionReplyObject HandlerTrainingArea::trainingAreaModifyRequest(const T } } - auto &scene3D = ddsData.scene3D(); - scene3D.resize(request.scene3D().size()); - for (unsigned int i = 0; i < request.scene3D().size(); i++) + auto &scene3D = ddsData.scene3D; + scene3D.resize(request.scene3D.size()); + for (unsigned int i = 0; i < request.scene3D.size(); i++) { - MapDescription mdData = request.scene3D().at(i); + MapDescription mdData = request.scene3D.at(i); ObjectMapDescription *md (new ObjectMapDescription(m_mainHandler)); - mdData.id(0); - mdData.trainingAreaId(ifs->getId()); + mdData.id = 0; + mdData.trainingAreaId = ifs->getId(); ret = md->createObject(mdData, i); DEBUG_LOG(m_logger) << "insert scene3D entries in map_description" << " for training area id " << ifs->getId() - << " mapTypeId=" << mdData.mapTypeId() - << " mapDescriptionTypeId=" << mdData.mapDescriptionTypeId(); + << " mapTypeId=" << mdData.mapTypeId + << " mapDescriptionTypeId=" << mdData.mapDescriptionTypeId; if (!ret.error()) { scene3D[i] = md->getData(); @@ -281,19 +281,19 @@ Core::FunctionReplyObject HandlerTrainingArea::trainingAreaModifyRequest(const T } } - auto &sceneObj = ddsData.sceneObjects(); - sceneObj.resize(request.sceneObjects().size()); - for (unsigned int i = 0; i < request.sceneObjects().size(); i++) + auto &sceneObj = ddsData.sceneObjects; + sceneObj.resize(request.sceneObjects.size()); + for (unsigned int i = 0; i < request.sceneObjects.size(); i++) { - MapDescription mdData = request.sceneObjects().at(i); + MapDescription mdData = request.sceneObjects.at(i); ObjectMapDescription *md (new ObjectMapDescription(m_mainHandler)); - mdData.id(0); - mdData.trainingAreaId(ifs->getId()); + mdData.id = 0; + mdData.trainingAreaId = ifs->getId(); ret = md->createObject(mdData, i); DEBUG_LOG(m_logger) << "insert sceneObjects entries in map_description" << " for training area id " << ifs->getId() - << " mapTypeId=" << mdData.mapTypeId() - << " mapDescriptionTypeId=" << mdData.mapDescriptionTypeId(); + << " mapTypeId=" << mdData.mapTypeId + << " mapDescriptionTypeId=" << mdData.mapDescriptionTypeId; if (!ret.error()) { sceneObj[i] = md->getData(); @@ -306,7 +306,7 @@ Core::FunctionReplyObject HandlerTrainingArea::trainingAreaModifyRequest(const T } } - ddsData.id(ifs->getId()); + ddsData.id = ifs->getId(); return ifs->updateObject(ddsData); } @@ -315,17 +315,17 @@ void HandlerTrainingArea::onTrainingAreaRemoveRequest(const rti::core::SampleIde const Core::RemoveElementRequest &request) { Core::FunctionReplyObject ret; - ObjectTrainingArea *ifs = m_objectTrainingAreaMap.value(request.id()); + ObjectTrainingArea *ifs = m_objectTrainingAreaMap.value(request.id); if (ifs == nullptr) { - ret = Core::FunctionReplyObject(request.id(), tr_lts("dds", "Training area with id %1 not found")).arg(request.id()); + ret = Core::FunctionReplyObject(request.id, tr_lts("dds", "Training area with id %1 not found")).arg(request.id); m_mainHandler->dds()->fts()->trainingAreaRemoveReply(cookie, ret); return; } if (m_mainHandler->dds()->topicLockMaster()->isLocked(ifs->getData(), m_mainHandler->exerciseId())) { - ret = Core::FunctionReplyObject(request.id(), tr_lts("dds", "Training area '%1' is used by another user!")).arg(ifs->getName()); + ret = Core::FunctionReplyObject(request.id, tr_lts("dds", "Training area '%1' is used by another user!")).arg(ifs->getName()); m_mainHandler->dds()->fts()->trainingAreaRemoveReply(cookie, ret); return; } @@ -340,8 +340,8 @@ void HandlerTrainingArea::onTrainingAreaRemoveRequest(const rti::core::SampleIde { // delete ObjectTrainingArea delete ifs; - m_objectTrainingAreaMap.remove(request.id()); - removeMapDescriptions(request.id()); + m_objectTrainingAreaMap.remove(request.id); + removeMapDescriptions(request.id); trans.commit(); } @@ -362,10 +362,10 @@ void HandlerTrainingArea::onMapDescriptionModifyRequest(const rti::core::SampleI Core::FunctionReplyObject HandlerTrainingArea::mapDescriptionModifyRequest(const MapDescription &request) { - ObjectMapDescription *ifs = m_objectMapDescriptionMap.value(request.id()); + ObjectMapDescription *ifs = m_objectMapDescriptionMap.value(request.id); if (ifs == nullptr) - return Core::FunctionReplyObject(request.id(), tr_lts("dds", "MapDescription with id %1 not found")).arg(request.id()); + return Core::FunctionReplyObject(request.id, tr_lts("dds", "MapDescription with id %1 not found")).arg(request.id); return ifs->updateObject(request); } @@ -375,17 +375,17 @@ void HandlerTrainingArea::onMapDescriptionRemoveRequest(const rti::core::SampleI const Core::RemoveElementRequest &request) { Core::FunctionReplyObject ret; - ObjectMapDescription *ifs = m_objectMapDescriptionMap.value(request.id()); + ObjectMapDescription *ifs = m_objectMapDescriptionMap.value(request.id); if (ifs == nullptr) { - ret = Core::FunctionReplyObject(request.id(), tr_lts("dds", "MapDescription with id %1 not found")).arg(request.id()); + ret = Core::FunctionReplyObject(request.id, tr_lts("dds", "MapDescription with id %1 not found")).arg(request.id); m_mainHandler->dds()->fts()->mapDescriptionRemoveReply(cookie, ret); return; } if (m_mainHandler->dds()->topicLockMaster()->isLocked(ifs->getData(), m_mainHandler->exerciseId())) { - ret = Core::FunctionReplyObject(request.id(), tr_lts("dds", "MapDescription '%1' is used by another user!")).arg(ifs->getName()); + ret = Core::FunctionReplyObject(request.id, tr_lts("dds", "MapDescription '%1' is used by another user!")).arg(ifs->getName()); m_mainHandler->dds()->fts()->mapDescriptionRemoveReply(cookie, ret); return; } @@ -398,7 +398,7 @@ void HandlerTrainingArea::onMapDescriptionRemoveRequest(const rti::core::SampleI { // delete ObjectMapDescription delete ifs; - m_objectMapDescriptionMap.remove(request.id()); + m_objectMapDescriptionMap.remove(request.id); } m_mainHandler->dds()->fts()->mapDescriptionRemoveReply(cookie, ret); diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AssetManagement/handler_workstation_logout.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/AssetManagement/handler_workstation_logout.cpp index 153028e9c..798322ae3 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AssetManagement/handler_workstation_logout.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AssetManagement/handler_workstation_logout.cpp @@ -33,9 +33,9 @@ HandlerWorkstationLogout::~HandlerWorkstationLogout() void HandlerWorkstationLogout::onWorkstationLogoutRequest(const rti::core::SampleIdentity &cookie, const WorkstationLogout &request) { - if (!m_logoutRequestMap.contains(request.originatorId())) + if (!m_logoutRequestMap.contains(request.originatorId)) { - int originatorId = request.originatorId(); + int originatorId = request.originatorId; QTimer *dtLifetimeTimer = new QTimer(this); dtLifetimeTimer->setSingleShot(true); @@ -53,11 +53,11 @@ void HandlerWorkstationLogout::onWorkstationLogoutRequest(const rti::core::Sampl } else { - m_logoutRequestMap.value(request.originatorId())->start(MAX_DATATOPIC_LIFETIME); + m_logoutRequestMap.value(request.originatorId)->start(MAX_DATATOPIC_LIFETIME); m_mainHandler->dds()->dts()->publish(request); } - m_mainHandler->dds()->fts()->workstationLogoutReply(cookie, Core::FunctionReplyObject(request.originatorId())); + m_mainHandler->dds()->fts()->workstationLogoutReply(cookie, Core::FunctionReplyObject(request.originatorId)); } bool HandlerWorkstationLogout::init() diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AssetManagement/main_handler.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/AssetManagement/main_handler.cpp index 100983a50..63e4ec294 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AssetManagement/main_handler.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AssetManagement/main_handler.cpp @@ -149,7 +149,7 @@ bool MainHandler::initAsmHandler() ERROR_LOG(m_logger) << "Initialisation WebSocketInterfaceHandler failed."; return false; } - m_ddsHandler->pacemaker()->addPort(m_handlerWebSocket->serverWebSocketPort(), Core::PortType::WebSocketServer); + m_ddsHandler->pacemaker()->addPort(m_handlerWebSocket->serverWebSocketPort(), Core::CorePortType::WebSocketServer); DEBUG_LOG(m_logger) << "Initialisation WebSocketInterfaceHandler succesful."; return true; diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AssetManagement/object_asset.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/AssetManagement/object_asset.cpp index 05ba823bd..97b80e3a0 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AssetManagement/object_asset.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AssetManagement/object_asset.cpp @@ -25,19 +25,19 @@ ObjectAsset::ObjectAsset(MainHandler *mainHandler) ObjectAsset::~ObjectAsset() { if (isValid()) - m_mainHandler->dds()->dts()->removeAssetByKey(m_data.id()); + m_mainHandler->dds()->dts()->removeAssetByKey(m_data.id); } //------------------------------------------------------------------------------ bool ObjectAsset::isValid() const { - return m_data.id() > 0; + return m_data.id > 0; } //------------------------------------------------------------------------------ bool ObjectAsset::isUsed() const { - return m_data.isUsed(); + return m_data.isUsed; } //------------------------------------------------------------------------------ @@ -45,79 +45,79 @@ Core::FunctionReplyObject ObjectAsset::createObject(const Asset &data) { m_data = data; - if (m_data.id() <= 0) + if (m_data.id <= 0) { - m_data.isUsed(false); + m_data.isUsed = false; Database::AsmAsset dbData(toDbData(data)); if (!m_mainHandler->db()->insert(dbData)) 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(); + m_data.id = dbData.id; + DEBUG_LOG(m_logger) << "New assetId: " << m_data.id; } // Publish Data via DTS onPublishData(); - return Core::FunctionReplyObject(m_data.id()); + return Core::FunctionReplyObject(m_data.id); } //------------------------------------------------------------------------------ Core::FunctionReplyObject ObjectAsset::updateObject(const Asset &data) { if (!isValid()) - return Core::FunctionReplyObject(data.id(), tr_lts("dds", "Object not valid/blocked")); + return Core::FunctionReplyObject(data.id, tr_lts("dds", "Object not valid/blocked")); Database::AsmAsset dbData; dbData = toDbData(data); if (!m_mainHandler->db()->update(dbData)) - return Core::FunctionReplyObject(data.id(), tr_lts("dds", "Error updating AsmAsset-data into database")); + 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(m_logger) << "Data changed for assetId: " << m_data.id; // Publish Data via DTS onPublishData(); - return Core::FunctionReplyObject(m_data.id()); + return Core::FunctionReplyObject(m_data.id); } //------------------------------------------------------------------------------ Core::FunctionReplyObject ObjectAsset::setUsed(bool isUsed) { if (!isValid()) - return Core::FunctionReplyObject(m_data.id(), tr_lts("dds", "Trying to update an already removed AsmAsset object")); + return Core::FunctionReplyObject(m_data.id, tr_lts("dds", "Trying to update an already removed AsmAsset object")); - m_data.isUsed(isUsed); + m_data.isUsed = isUsed; // Publish Data via DTS onPublishData(); - return Core::FunctionReplyObject(m_data.id()); + return Core::FunctionReplyObject(m_data.id); } //------------------------------------------------------------------------------ Core::FunctionReplyObject ObjectAsset::removeObject() { if (isUsed()) - return Core::FunctionReplyObject(m_data.id(), tr_lts("dds", "Asset still in use")); + return Core::FunctionReplyObject(m_data.id, tr_lts("dds", "Asset still in use")); - if (!m_mainHandler->db()->removeAsmAsset(m_data.id())) - return Core::FunctionReplyObject(m_data.id(), tr_lts("dds", "Asset with id %1 can not be removed from DB")).arg(m_data.id()); + if (!m_mainHandler->db()->removeAsmAsset(m_data.id)) + return Core::FunctionReplyObject(m_data.id, tr_lts("dds", "Asset with id %1 can not be removed from DB")).arg(m_data.id); - if (!m_mainHandler->dds()->dts()->removeAssetByKey(m_data.id())) - return Core::FunctionReplyObject(m_data.id(), tr_lts("dds", "Asset with id %1 can not be removed from DDS")).arg(m_data.id()); + if (!m_mainHandler->dds()->dts()->removeAssetByKey(m_data.id)) + return Core::FunctionReplyObject(m_data.id, tr_lts("dds", "Asset with id %1 can not be removed from DDS")).arg(m_data.id); - return Core::FunctionReplyObject(m_data.id()); + return Core::FunctionReplyObject(m_data.id); } //------------------------------------------------------------------------------ void ObjectAsset::onPublishData() { - INFO_LOG(m_logger) << "Publish AsmAsset-data to dds (" << m_data.id() << ") ..."; + INFO_LOG(m_logger) << "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"; @@ -132,13 +132,13 @@ Database::AsmAsset ObjectAsset::toDbData(const Asset &ddsData) { Database::AsmAsset dbData; - dbData.id = ddsData.id(); - dbData.name = QString::fromStdString(ddsData.name()); - dbData.assetTypeId = ddsData.assetTypeId(); - dbData.locationId = ddsData.locationId(); - dbData.subLocation = ddsData.subLocation(); - dbData.certificate = LtsUtils::toQByteArray(ddsData.certificate()); - dbData.properties = QString::fromStdString(ddsData.properties()); + dbData.id = ddsData.id; + dbData.name = QString::fromStdString(ddsData.name); + dbData.assetTypeId = ddsData.assetTypeId; + dbData.locationId = ddsData.locationId; + dbData.subLocation = ddsData.subLocation; + dbData.certificate = LtsUtils::toQByteArray(ddsData.certificate); + dbData.properties = QString::fromStdString(ddsData.properties); return dbData; } @@ -149,17 +149,17 @@ Asset ObjectAsset::toDdsData(const Database::AsmAsset &dbData) { Asset ddsData; - ddsData.id(dbData.id); - ddsData.name(dbData.name.toStdString()); - ddsData.assetTypeId(dbData.assetTypeId); - ddsData.locationId(dbData.locationId); - ddsData.subLocation(dbData.subLocation); - ddsData.certificate(LtsUtils::convert>(dbData.certificate)); - ddsData.properties(dbData.properties.toStdString()); + ddsData.id = dbData.id; + ddsData.name = dbData.name.toStdString(); + ddsData.assetTypeId = dbData.assetTypeId; + ddsData.locationId = dbData.locationId; + ddsData.subLocation = dbData.subLocation; + ddsData.certificate = LtsUtils::convert>(dbData.certificate); + ddsData.properties = dbData.properties.toStdString(); // init data not in db - ddsData.isDeleted(false); - ddsData.isUsed(false); + ddsData.isDeleted = false; + ddsData.isUsed = false; return ddsData; } diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AssetManagement/object_asset.h b/qt6-after/qt6-migrated-legatus/Lts/Services/AssetManagement/object_asset.h index 1a97a53bb..2cf9aa79b 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AssetManagement/object_asset.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AssetManagement/object_asset.h @@ -34,8 +34,8 @@ public: Core::FunctionReplyObject updateObject(const Asset &data); Core::FunctionReplyObject removeObject(); - qint32 getId() const { return m_data.id(); } - QString getName() const { return QString::fromStdString(m_data.name()); } + qint32 getId() const { return m_data.id; } + QString getName() const { return QString::fromStdString(m_data.name); } const Asset &getData() const { return m_data; } bool isValid() const; diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AssetManagement/object_map_description.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/AssetManagement/object_map_description.cpp index 1cc934f58..a62e2f21d 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AssetManagement/object_map_description.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AssetManagement/object_map_description.cpp @@ -21,16 +21,16 @@ ObjectMapDescription::ObjectMapDescription(MainHandler *mainHandler) bool ObjectMapDescription::isValid() const { - return m_data.id() > 0; + return m_data.id > 0; } Core::FunctionReplyObject ObjectMapDescription::createObject(const MapDescription &data, int order) { m_data = data; - if (m_data.id() <= 0) + if (m_data.id <= 0) { - m_data.isUsed(false); + m_data.isUsed = false; Database::AsmMapDescription dbData(toDbData(data)); dbData.objOrder = order; @@ -38,44 +38,44 @@ Core::FunctionReplyObject ObjectMapDescription::createObject(const MapDescriptio if (!m_mainHandler->db()->insert(dbData)) 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(); + m_data.id = dbData.id; + DEBUG_LOG(m_logger) << "New MapDescription Id: " << m_data.id; } else if (order != m_order && m_order >= 0) { Database::AsmMapDescription dbData(toDbData(data)); dbData.objOrder = m_order; if (!m_mainHandler->db()->update(dbData)) - return Core::FunctionReplyObject(data.id(), tr_lts("dds", "Error updating AsmMapDescription-data into database")); + return Core::FunctionReplyObject(data.id, tr_lts("dds", "Error updating AsmMapDescription-data into database")); } m_order = order; - return Core::FunctionReplyObject(m_data.id()); + return Core::FunctionReplyObject(m_data.id); } Core::FunctionReplyObject ObjectMapDescription::updateObject(const MapDescription &data) { if (!isValid()) - return Core::FunctionReplyObject(data.id(), tr_lts("dds", "Object not valid/blocked")); + return Core::FunctionReplyObject(data.id, tr_lts("dds", "Object not valid/blocked")); Database::AsmMapDescription dbData(toDbData(data)); dbData.objOrder = m_order; if (!m_mainHandler->db()->update(dbData)) - return Core::FunctionReplyObject(data.id(), tr_lts("dds", "Error updating AsmMapDescription-data into database")); + 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(m_logger) << "Data changed for MapDescription Id: " << m_data.id; - return Core::FunctionReplyObject(m_data.id()); + return Core::FunctionReplyObject(m_data.id); } Core::FunctionReplyObject ObjectMapDescription::removeObject() { - if (!m_mainHandler->db()->removeAsmMapDescription(m_data.id())) - return Core::FunctionReplyObject(m_data.id(), tr_lts("dds", "MapDescription with id %1 can not be removed")).arg(m_data.id()); + if (!m_mainHandler->db()->removeAsmMapDescription(m_data.id)) + return Core::FunctionReplyObject(m_data.id, tr_lts("dds", "MapDescription with id %1 can not be removed")).arg(m_data.id); - return Core::FunctionReplyObject(m_data.id()); + return Core::FunctionReplyObject(m_data.id); } // ------------------------------------------------------------------------------------------------------- @@ -87,15 +87,15 @@ Database::AsmMapDescription ObjectMapDescription::toDbData(const MapDescription { Database::AsmMapDescription dbData; - dbData.id = ddsData.id(); - dbData.name = QString::fromStdString(ddsData.name()); - dbData.description = QString::fromStdString(ddsData.description()); - dbData.trainingAreaId = ddsData.trainingAreaId(); - dbData.mapTypeId = ddsData.mapTypeId(); - dbData.mapDescriptionTypeId = ddsData.mapDescriptionTypeId(); - dbData.url = QString::fromStdString(ddsData.url()); - dbData.minScale = ddsData.minScale(); - dbData.maxScale = ddsData.maxScale(); + dbData.id = ddsData.id; + dbData.name = QString::fromStdString(ddsData.name); + dbData.description = QString::fromStdString(ddsData.description); + dbData.trainingAreaId = ddsData.trainingAreaId; + dbData.mapTypeId = ddsData.mapTypeId; + dbData.mapDescriptionTypeId = ddsData.mapDescriptionTypeId; + dbData.url = QString::fromStdString(ddsData.url); + dbData.minScale = ddsData.minScale; + dbData.maxScale = ddsData.maxScale; return dbData; } @@ -106,19 +106,19 @@ MapDescription ObjectMapDescription::toDdsData(const Database::AsmMapDescription { MapDescription ddsData; - ddsData.id(dbData.id); - ddsData.name(dbData.name.toStdString()); - ddsData.description(dbData.description.toStdString()); - ddsData.trainingAreaId(dbData.trainingAreaId); - ddsData.mapTypeId(dbData.mapTypeId); - ddsData.mapDescriptionTypeId(dbData.mapDescriptionTypeId); - ddsData.url(dbData.url.toStdString()); - ddsData.minScale(dbData.minScale); - ddsData.maxScale(dbData.maxScale); + ddsData.id = dbData.id; + ddsData.name = dbData.name.toStdString(); + ddsData.description = dbData.description.toStdString(); + ddsData.trainingAreaId = dbData.trainingAreaId; + ddsData.mapTypeId = dbData.mapTypeId; + ddsData.mapDescriptionTypeId = dbData.mapDescriptionTypeId; + ddsData.url = dbData.url.toStdString(); + ddsData.minScale = dbData.minScale; + ddsData.maxScale = dbData.maxScale; // init data not in db - ddsData.isDeleted(false); - ddsData.isUsed(false); + ddsData.isDeleted = false; + ddsData.isUsed = false; return ddsData; } diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AssetManagement/object_map_description.h b/qt6-after/qt6-migrated-legatus/Lts/Services/AssetManagement/object_map_description.h index 3f45ebc2c..f097a61a0 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AssetManagement/object_map_description.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AssetManagement/object_map_description.h @@ -27,8 +27,8 @@ public: Core::FunctionReplyObject updateObject(const MapDescription &data); Core::FunctionReplyObject removeObject(); - qint32 getId() const { return m_data.id(); } - QString getName() const { return QString::fromStdString(m_data.name()); } + qint32 getId() const { return m_data.id; } + QString getName() const { return QString::fromStdString(m_data.name); } const MapDescription &getData() const { return m_data; } bool isValid() const; diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AssetManagement/object_relay_info.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/AssetManagement/object_relay_info.cpp index 36047b281..e47651f08 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AssetManagement/object_relay_info.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AssetManagement/object_relay_info.cpp @@ -25,19 +25,19 @@ ObjectRelayInfo::ObjectRelayInfo(MainHandler *mainHandler) ObjectRelayInfo::~ObjectRelayInfo() { if (isValid()) - m_mainHandler->dds()->dts()->removeRelayInfoByKey(m_data.id()); + m_mainHandler->dds()->dts()->removeRelayInfoByKey(m_data.id); } //------------------------------------------------------------------------------ bool ObjectRelayInfo::isValid() const { - return m_data.id() > 0; + return m_data.id > 0; } //------------------------------------------------------------------------------ bool ObjectRelayInfo::isUsed() const { - return m_data.isUsed(); + return m_data.isUsed; } //------------------------------------------------------------------------------ @@ -45,79 +45,79 @@ Core::FunctionReplyObject ObjectRelayInfo::createObject(const RelayInfo &data) { m_data = data; - if (m_data.id() < 0) + if (m_data.id < 0) { - m_data.isUsed(false); + m_data.isUsed = false; Database::AsmEgcuRelayInfo dbData(toDbData(data)); if (!m_mainHandler->db()->insert(dbData)) 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(); + m_data.id = dbData.id; + DEBUG_LOG(m_logger) << "New relayInfo Id: " << m_data.id; } // Publish Data via DTS onPublishData(); - return Core::FunctionReplyObject(m_data.id()); + return Core::FunctionReplyObject(m_data.id); } //------------------------------------------------------------------------------ Core::FunctionReplyObject ObjectRelayInfo::updateObject(const RelayInfo &data) { if (!isValid()) - return Core::FunctionReplyObject(data.id(), tr_lts("dds", "Object not valid/blocked")); + return Core::FunctionReplyObject(data.id, tr_lts("dds", "Object not valid/blocked")); Database::AsmEgcuRelayInfo dbData; dbData = toDbData(data); if (!m_mainHandler->db()->update(dbData)) - return Core::FunctionReplyObject(data.id(), tr_lts("dds", "Error updating AsmEgcuRelayInfo-data into database")); + 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(m_logger) << "Data changed for relayInfo Id: " << m_data.id; // Publish Data via DTS onPublishData(); - return Core::FunctionReplyObject(m_data.id()); + return Core::FunctionReplyObject(m_data.id); } //------------------------------------------------------------------------------ Core::FunctionReplyObject ObjectRelayInfo::setUsed(bool isUsed) { if (!isValid()) - return Core::FunctionReplyObject(m_data.id(), tr_lts("dds", "Trying to update an already removed AsmEgcuRelayInfo object")); + return Core::FunctionReplyObject(m_data.id, tr_lts("dds", "Trying to update an already removed AsmEgcuRelayInfo object")); - m_data.isUsed(isUsed); + m_data.isUsed = isUsed; // Publish Data via DTS onPublishData(); - return Core::FunctionReplyObject(m_data.id()); + return Core::FunctionReplyObject(m_data.id); } //------------------------------------------------------------------------------ Core::FunctionReplyObject ObjectRelayInfo::removeObject() { if (isUsed()) - return Core::FunctionReplyObject(m_data.id(), tr_lts("dds", "RelayInfo still in use")); + return Core::FunctionReplyObject(m_data.id, tr_lts("dds", "RelayInfo still in use")); - if (!m_mainHandler->db()->removeAsmEgcuRelayInfo(m_data.id())) - return Core::FunctionReplyObject(m_data.id(), tr_lts("dds", "RelayInfo with id %1 can not be removed from DB")).arg(m_data.id()); + if (!m_mainHandler->db()->removeAsmEgcuRelayInfo(m_data.id)) + return Core::FunctionReplyObject(m_data.id, tr_lts("dds", "RelayInfo with id %1 can not be removed from DB")).arg(m_data.id); - if (!m_mainHandler->dds()->dts()->removeRelayInfoByKey(m_data.id())) - return Core::FunctionReplyObject(m_data.id(), tr_lts("dds", "RelayInfo with id %1 can not be removed from DDS")).arg(m_data.id()); + if (!m_mainHandler->dds()->dts()->removeRelayInfoByKey(m_data.id)) + return Core::FunctionReplyObject(m_data.id, tr_lts("dds", "RelayInfo with id %1 can not be removed from DDS")).arg(m_data.id); - return Core::FunctionReplyObject(m_data.id()); + return Core::FunctionReplyObject(m_data.id); } //------------------------------------------------------------------------------ void ObjectRelayInfo::onPublishData() { - INFO_LOG(m_logger) << "Publish AsmEgcuRelayInfo-data to dds (" << m_data.id() << ") ..."; + INFO_LOG(m_logger) << "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"; @@ -132,11 +132,11 @@ Database::AsmEgcuRelayInfo ObjectRelayInfo::toDbData(const RelayInfo &ddsData) { Database::AsmEgcuRelayInfo dbData; - dbData.id = ddsData.id(); - dbData.relayId = ddsData.id(); - dbData.name = QString::fromStdString(ddsData.name()); - dbData.description = QString::fromStdString(ddsData.description()); - dbData.properties = QString::fromStdString(ddsData.property()); + dbData.id = ddsData.id; + dbData.relayId = ddsData.id; + dbData.name = QString::fromStdString(ddsData.name); + dbData.description = QString::fromStdString(ddsData.description); + dbData.properties = QString::fromStdString(ddsData.property); return dbData; } @@ -147,14 +147,14 @@ RelayInfo ObjectRelayInfo::toDdsData(const Database::AsmEgcuRelayInfo &dbData) { RelayInfo ddsData; - ddsData.id(dbData.relayId); - ddsData.name(dbData.name.toStdString()); - ddsData.description(dbData.description.toStdString()); - ddsData.property(dbData.properties.toStdString()); + ddsData.id = dbData.relayId; + ddsData.name = dbData.name.toStdString(); + ddsData.description = dbData.description.toStdString(); + ddsData.property = dbData.properties.toStdString(); // init data not in db - ddsData.isDeleted(false); - ddsData.isUsed(false); + ddsData.isDeleted = false; + ddsData.isUsed = false; return ddsData; } diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AssetManagement/object_relay_info.h b/qt6-after/qt6-migrated-legatus/Lts/Services/AssetManagement/object_relay_info.h index ae48cba13..3f42568c7 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AssetManagement/object_relay_info.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AssetManagement/object_relay_info.h @@ -34,8 +34,8 @@ public: Core::FunctionReplyObject updateObject(const RelayInfo &data); Core::FunctionReplyObject removeObject(); - qint32 getId() const { return m_data.id(); } - QString getName() const { return QString::fromStdString(m_data.name()); } + qint32 getId() const { return m_data.id; } + QString getName() const { return QString::fromStdString(m_data.name); } const RelayInfo &getData() const { return m_data; } bool isValid() const; diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AssetManagement/object_training_area.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/AssetManagement/object_training_area.cpp index 77517decd..c5331740e 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AssetManagement/object_training_area.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AssetManagement/object_training_area.cpp @@ -24,19 +24,19 @@ ObjectTrainingArea::ObjectTrainingArea(MainHandler *mainHandler) ObjectTrainingArea::~ObjectTrainingArea() { if (isValid()) - m_mainHandler->dds()->dts()->removeTrainingAreaByKey(m_data.id()); + m_mainHandler->dds()->dts()->removeTrainingAreaByKey(m_data.id); } //------------------------------------------------------------------------------ bool ObjectTrainingArea::isValid() const { - return m_data.id() > 0; + return m_data.id > 0; } //------------------------------------------------------------------------------ bool ObjectTrainingArea::isUsed() const { - return m_data.isUsed(); + return m_data.isUsed; } //------------------------------------------------------------------------------ @@ -44,79 +44,79 @@ Core::FunctionReplyObject ObjectTrainingArea::createObject(const TrainingArea &d { m_data = data; - if (m_data.id() <= 0) + if (m_data.id <= 0) { - m_data.isUsed(false); + m_data.isUsed = false; Database::AsmTrainingArea dbData(toDbData(data)); if (!m_mainHandler->db()->insert(dbData)) 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(); + m_data.id = dbData.id; + DEBUG_LOG(m_logger) << "New mapId: " << m_data.id; } // Publish Data via DTS onPublishData(); - return Core::FunctionReplyObject(m_data.id()); + return Core::FunctionReplyObject(m_data.id); } //------------------------------------------------------------------------------ Core::FunctionReplyObject ObjectTrainingArea::updateObject(const TrainingArea &data) { if (!isValid()) - return Core::FunctionReplyObject(data.id(), tr_lts("dds", "Object not valid/blocked")); + return Core::FunctionReplyObject(data.id, tr_lts("dds", "Object not valid/blocked")); Database::AsmTrainingArea dbData; dbData = toDbData(data); if (!m_mainHandler->db()->update(dbData)) - return Core::FunctionReplyObject(data.id(), tr_lts("dds", "Error updating AsmTrainingArea-data into database")); + 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(m_logger) << "Data changed for mapId: " << m_data.id; // Publish Data via DTS onPublishData(); - return Core::FunctionReplyObject(m_data.id()); + return Core::FunctionReplyObject(m_data.id); } //------------------------------------------------------------------------------ Core::FunctionReplyObject ObjectTrainingArea::setUsed(bool isUsed) { if (!isValid()) - return Core::FunctionReplyObject(m_data.id(), tr_lts("dds", "Trying to update an already removed AsmTrainingArea object")); + return Core::FunctionReplyObject(m_data.id, tr_lts("dds", "Trying to update an already removed AsmTrainingArea object")); - m_data.isUsed(isUsed); + m_data.isUsed = isUsed; // Publish Data via DTS onPublishData(); - return Core::FunctionReplyObject(m_data.id()); + return Core::FunctionReplyObject(m_data.id); } //------------------------------------------------------------------------------ Core::FunctionReplyObject ObjectTrainingArea::removeObject() { if (isUsed()) - return Core::FunctionReplyObject(m_data.id(), tr_lts("dds", "TrainingArea still in use")); + return Core::FunctionReplyObject(m_data.id, tr_lts("dds", "TrainingArea still in use")); - if (!m_mainHandler->db()->removeAsmTrainingArea(m_data.id())) - return Core::FunctionReplyObject(m_data.id(), tr_lts("dds", "TrainingArea with id %1 can not be removed from DB")).arg(m_data.id()); + if (!m_mainHandler->db()->removeAsmTrainingArea(m_data.id)) + return Core::FunctionReplyObject(m_data.id, tr_lts("dds", "TrainingArea with id %1 can not be removed from DB")).arg(m_data.id); - if (!m_mainHandler->dds()->dts()->removeTrainingAreaByKey(m_data.id())) - return Core::FunctionReplyObject(m_data.id(), tr_lts("dds", "TrainingArea with id %1 can not be removed from DDS")).arg(m_data.id()); + if (!m_mainHandler->dds()->dts()->removeTrainingAreaByKey(m_data.id)) + return Core::FunctionReplyObject(m_data.id, tr_lts("dds", "TrainingArea with id %1 can not be removed from DDS")).arg(m_data.id); - return Core::FunctionReplyObject(m_data.id()); + return Core::FunctionReplyObject(m_data.id); } //------------------------------------------------------------------------------ void ObjectTrainingArea::onPublishData() { - INFO_LOG(m_logger) << "Publish AsmTrainingArea-data to dds (" << m_data.id() << ") ..."; + INFO_LOG(m_logger) << "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"; @@ -131,13 +131,13 @@ Database::AsmTrainingArea ObjectTrainingArea::toDbData(const TrainingArea &ddsDa { Database::AsmTrainingArea dbData; - dbData.id = ddsData.id(); - dbData.name = QString::fromStdString(ddsData.name()); - dbData.bottomLeft = QPointF(ddsData.bottomLeft().lon(), ddsData.bottomLeft().lat()); - dbData.height = ddsData.height(); - dbData.width = ddsData.width(); + dbData.id = ddsData.id; + dbData.name = QString::fromStdString(ddsData.name); + dbData.bottomLeft = QPointF(ddsData.bottomLeft.lon, ddsData.bottomLeft.lat); + dbData.height = ddsData.height; + dbData.width = ddsData.width; - dbData.image = QByteArray::fromRawData(reinterpret_cast(&ddsData.image()[0]), ddsData.image().size()); + dbData.image = QByteArray::fromRawData(reinterpret_cast(&ddsData.image[0]), ddsData.image.size()); return dbData; } diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AssetManagement/object_training_area.h b/qt6-after/qt6-migrated-legatus/Lts/Services/AssetManagement/object_training_area.h index e2503bc9c..6ab65d47b 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AssetManagement/object_training_area.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AssetManagement/object_training_area.h @@ -34,8 +34,8 @@ public: Core::FunctionReplyObject updateObject(const TrainingArea &data); Core::FunctionReplyObject removeObject(); - qint32 getId() const { return m_data.id(); } - QString getName() const { return QString::fromStdString(m_data.name()); } + qint32 getId() const { return m_data.id; } + QString getName() const { return QString::fromStdString(m_data.name); } const TrainingArea &getData() const { return m_data; } bool isValid() const; diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowClient/handler_firing_explosion.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowClient/handler_firing_explosion.cpp index 02e815736..ea5d35bd6 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowClient/handler_firing_explosion.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowClient/handler_firing_explosion.cpp @@ -59,15 +59,15 @@ bool HandlerFiringExplosion::init() //============================================================================= void HandlerFiringExplosion::setFiringClearanceDuration() { - if (m_firingExplosionEntity.firingClearanceTime().is_set()) + if (m_firingExplosionEntity.firingClearanceTime.is_set()) { - qint64 pre = m_firingExplosionEntity.firingClearanceTime().get(); + qint64 pre = m_firingExplosionEntity.firingClearanceTime.get(); qint64 post = pre; pre -= PRE_START_TIME; post += m_firingExplosionEntity.duration() + POST_END_TIME; //as we already start "duration" earlier m_firingExplosionEntity.firingClearanceTime().set(pre); m_firingExplosionEntity.endOfFiringClearanceTime().set(post); - // m_firingExplosionEntity.firingClearanceTime().set(m_firingExplosionEntity.firingClearanceTime().get() - (2 * m_firingClearanceDuration)); + // m_firingExplosionEntity.firingClearanceTime().set(m_firingExplosionEntity.firingClearanceTime.get() - (2 * m_firingClearanceDuration)); } else m_firingExplosionEntity.endOfFiringClearanceTime().reset(); diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowClient/handler_firing_smoke.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowClient/handler_firing_smoke.cpp index c2e492f00..eb572f19c 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowClient/handler_firing_smoke.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowClient/handler_firing_smoke.cpp @@ -52,9 +52,9 @@ bool HandlerFiringSmoke::init() //============================================================================= void HandlerFiringSmoke::setFiringClearanceDuration() { - if (m_firingSmokeEntity.firingClearanceTime().is_set()) + if (m_firingSmokeEntity.firingClearanceTime.is_set()) { - qint64 pre = m_firingSmokeEntity.firingClearanceTime().get(); + qint64 pre = m_firingSmokeEntity.firingClearanceTime.get(); qint64 post = pre; pre -= PRE_START_TIME; post += m_firingSmokeEntity.duration() + POST_END_TIME; diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowManagement/dds_handler.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowManagement/dds_handler.cpp index 33508970e..840b26716 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowManagement/dds_handler.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowManagement/dds_handler.cpp @@ -144,7 +144,7 @@ bool DdsHandler::init(const QStringList &qosFileList) qint64 DdsHandler::currentPartitionTime() const { - return m_dtcCore->partitionTime().timeStamp(); + return m_dtcCore->partitionTime().timeStamp; } } // namespace EffectShowManagement diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowManagement/effect_show_effect_cluster.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowManagement/effect_show_effect_cluster.cpp index d71281356..62675465d 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowManagement/effect_show_effect_cluster.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowManagement/effect_show_effect_cluster.cpp @@ -40,7 +40,7 @@ Database::EsmEffectShow EffectShowEffectCluster::getEffectShow(int idx) Database::EsmEffectShow esmEffectShow; - if (!m_handlerPdmData->isSmoke(m_effectCluster.chargeStruct())) + if (!m_handlerPdmData->isSmoke(m_effectCluster.chargeStruct)) { int indX = idx % m_areasWidth.numOfAreas; int indY = idx / m_areasWidth.numOfAreas; @@ -67,15 +67,15 @@ Database::EsmEffectShow EffectShowEffectCluster::getEffectShow(int idx) esmEffectShow.id = 0; esmEffectShow.name = QStringLiteral("EXP"); - esmEffectShow.startTime = m_effectCluster.effectStart().is_set() ? m_effectCluster.effectStart().get() : 0; + esmEffectShow.startTime = m_effectCluster.effectStart.is_set() ? m_effectCluster.effectStart.get() : 0; esmEffectShow.centerPosition = centerPosRotated.geographic(); - esmEffectShow.idAreaEffectSimulation = m_effectCluster.id(); + esmEffectShow.idAreaEffectSimulation = m_effectCluster.id; esmEffectShow.esmParticipantId = -1; - esmEffectShow.nameAreaEfffectSimulation = QString::fromStdString(m_effectCluster.name()); + esmEffectShow.nameAreaEfffectSimulation = QString::fromStdString(m_effectCluster.name); esmEffectShow.numOfVolley = getNumberOfVolley(); esmEffectShow.shotsPerVolley = getShotsPerArea() / esmEffectShow.numOfVolley; - esmEffectShow.typeOfAmmunition = m_effectCluster.chargeStruct().chargeTypeId(); + esmEffectShow.typeOfAmmunition = m_effectCluster.chargeStruct.chargeTypeId; // can there be more then 48 shoots? if (esmEffectShow.shotsPerVolley > 48) @@ -85,12 +85,12 @@ Database::EsmEffectShow EffectShowEffectCluster::getEffectShow(int idx) DEBUG_LOG(m_logger) << "recalc effectDuration "; - if (m_effectCluster.effectDuration() == DEFAULT_EFFECT_DURATION) + if (m_effectCluster.effectDuration == DEFAULT_EFFECT_DURATION) { - QJsonObject probObject = QJsonDocument::fromJson(QByteArray::fromStdString(m_effectCluster.properties())).object(); + QJsonObject probObject = QJsonDocument::fromJson(QByteArray::fromStdString(m_effectCluster.properties)).object(); AreaEffectSimulation::FiringType firingType = AreaEffectSimulation::FiringType::ReportReadyToFire; if (probObject.contains(QStringLiteral("abfeuerungsArt"))) - firingType = static_cast(probObject[QStringLiteral("abfeuerungsArt")].toInt()); + firingType = static_cast(probObject[QStringLiteral("abfeuerungsArt")].toInt()); if (firingType == AreaEffectSimulation::FiringType::FireOnCommand) { //use default @@ -100,25 +100,25 @@ Database::EsmEffectShow EffectShowEffectCluster::getEffectShow(int idx) else { // use cadence - if (m_effectCluster.effectors().size()) //should always be there! + if (m_effectCluster.effectors.size()) //should always be there! { - esmEffectShow.duration = m_effectCluster.effectors().at(0).chargeAmount() * m_handlerPdmData.get()->getCadence(m_effectCluster.effectors().at(0).chargeStruct().chargeTypeId()); - DEBUG_LOG(m_logger) << " recalc effectDuration use cadence value " << esmEffectShow.duration << " effector shots: " << m_effectCluster.effectors().at(0).chargeAmount() << " cadence " << m_handlerPdmData.get()->getCadence(m_effectCluster.effectors().at(0).chargeStruct().chargeTypeId()); + esmEffectShow.duration = m_effectCluster.effectors.at(0).chargeAmount * m_handlerPdmData.get()->getCadence(m_effectCluster.effectors.at(0).chargeStruct.chargeTypeId); + DEBUG_LOG(m_logger) << " recalc effectDuration use cadence value " << esmEffectShow.duration << " effector shots: " << m_effectCluster.effectors.at(0).chargeAmount << " cadence " << m_handlerPdmData.get()->getCadence(m_effectCluster.effectors.at(0).chargeStruct.chargeTypeId); } } } else { DEBUG_LOG(m_logger) << "Use effectDuration directly "; - esmEffectShow.duration = m_effectCluster.effectDuration(); + esmEffectShow.duration = m_effectCluster.effectDuration; } esmEffectShow.lowerLeftPosition = lowerLeftPosRotated.geographic(); esmEffectShow.areaWidth = m_areasWidth.side(indX); esmEffectShow.areaDepth = m_areasDepth.side(indY); - esmEffectShow.areaRotation = m_effectCluster.area().rotation() + 90; + esmEffectShow.areaRotation = m_effectCluster.area.rotation + 90; - DEBUG_LOG(m_logger) << "\nWidth: " << m_effectCluster.area().width() << " Height: " << m_effectCluster.area().height() + DEBUG_LOG(m_logger) << "\nWidth: " << m_effectCluster.area.width << " Height: " << m_effectCluster.area.height << "\nRotated LL Pos: " << lowerLeftPosRotated.mgrs() << "\nduration: " << esmEffectShow.duration << "\nRotated Center Pos: " << centerPosRotated.mgrs() @@ -136,30 +136,30 @@ Database::EsmEffectShow EffectShowEffectCluster::getEffectShow(int idx) // calculate center position LtsCoordTrans::UtmCoordinate centerPos = lowerLeftPosRotated; - centerPos.x = centerPos.x + m_effectCluster.area().width() / 2.; - centerPos.y = centerPos.y + m_effectCluster.area().height() / 2.; + centerPos.x = centerPos.x + m_effectCluster.area.width / 2.; + centerPos.y = centerPos.y + m_effectCluster.area.height / 2.; LtsCoordTrans::UtmCoordinate centerPosRotated = rotate(centerPos, m_lowerLeftPos, rotationRad()); esmEffectShow.id = 0; esmEffectShow.name = QStringLiteral("EXP"); - esmEffectShow.startTime = m_effectCluster.effectStart().is_set() ? m_effectCluster.effectStart().get() : 0; - esmEffectShow.duration = m_effectCluster.effectDuration(); + esmEffectShow.startTime = m_effectCluster.effectStart.is_set() ? m_effectCluster.effectStart.get() : 0; + esmEffectShow.duration = m_effectCluster.effectDuration; esmEffectShow.centerPosition = centerPosRotated.geographic(); - esmEffectShow.idAreaEffectSimulation = m_effectCluster.id(); + esmEffectShow.idAreaEffectSimulation = m_effectCluster.id; esmEffectShow.esmParticipantId = -1; - esmEffectShow.nameAreaEfffectSimulation = QString::fromStdString(m_effectCluster.name()); - esmEffectShow.typeOfAmmunition = m_effectCluster.chargeStruct().chargeTypeId(); + esmEffectShow.nameAreaEfffectSimulation = QString::fromStdString(m_effectCluster.name); + esmEffectShow.typeOfAmmunition = m_effectCluster.chargeStruct.chargeTypeId; esmEffectShow.numOfVolley = 1; esmEffectShow.shotsPerVolley = 1; esmEffectShow.lowerLeftPosition = lowerLeftPosRotated.geographic(); - esmEffectShow.areaWidth = m_effectCluster.area().width(); - esmEffectShow.areaDepth = m_effectCluster.area().height(); - esmEffectShow.areaRotation = m_effectCluster.area().rotation() + 90; + esmEffectShow.areaWidth = m_effectCluster.area.width; + esmEffectShow.areaDepth = m_effectCluster.area.height; + esmEffectShow.areaRotation = m_effectCluster.area.rotation + 90; - DEBUG_LOG(m_logger) << "\nWidth: " << m_effectCluster.area().width() << " Height: " << m_effectCluster.area().height() + DEBUG_LOG(m_logger) << "\nWidth: " << m_effectCluster.area.width << " Height: " << m_effectCluster.area.height << "\nRotated LL Pos: " << lowerLeftPosRotated.mgrs() << "\nRotated Center Pos: " << centerPosRotated.mgrs() - << "\nSide x,y: " << m_effectCluster.area().width() << " , " << m_effectCluster.area().height(); + << "\nSide x,y: " << m_effectCluster.area.width << " , " << m_effectCluster.area.height; } return esmEffectShow; @@ -169,18 +169,18 @@ void EffectShowEffectCluster::updateEffectShow(Database::EsmEffectShow &data) { DEBUG_LOG(m_logger) << "update EffectSHow for (" << data.id << ")"; - data.nameAreaEfffectSimulation = QString::fromStdString(m_effectCluster.name()); - data.startTime = m_effectCluster.effectStart().is_set() ? m_effectCluster.effectStart().get() : 0; + data.nameAreaEfffectSimulation = QString::fromStdString(m_effectCluster.name); + data.startTime = m_effectCluster.effectStart.is_set() ? m_effectCluster.effectStart.get() : 0; DEBUG_LOG(m_logger) << "Recalc effectDuration "; - if (m_effectCluster.effectDuration() == DEFAULT_EFFECT_DURATION) + if (m_effectCluster.effectDuration == DEFAULT_EFFECT_DURATION) { - QJsonObject probObject = QJsonDocument::fromJson(QByteArray::fromStdString(m_effectCluster.properties())).object(); + QJsonObject probObject = QJsonDocument::fromJson(QByteArray::fromStdString(m_effectCluster.properties)).object(); AreaEffectSimulation::FiringType firingType = AreaEffectSimulation::FiringType::ReportReadyToFire; if (probObject.contains(QStringLiteral("abfeuerungsArt"))) - firingType = static_cast(probObject[QStringLiteral("abfeuerungsArt")].toInt()); + firingType = static_cast(probObject[QStringLiteral("abfeuerungsArt")].toInt()); if (firingType == AreaEffectSimulation::FiringType::FireOnCommand) { //use default @@ -190,17 +190,17 @@ void EffectShowEffectCluster::updateEffectShow(Database::EsmEffectShow &data) else { // use cadence - if (m_effectCluster.effectors().size()) //should always be there! + if (m_effectCluster.effectors.size()) //should always be there! { - data.duration = m_effectCluster.effectors().at(0).chargeAmount() * m_handlerPdmData.get()->getCadence(m_effectCluster.effectors().at(0).chargeStruct().chargeTypeId()); - DEBUG_LOG(m_logger) << " recalc effectDuration use cadence value " << data.duration << " effector shots: " << m_effectCluster.effectors().at(0).chargeAmount() << " cadence " << m_handlerPdmData.get()->getCadence(m_effectCluster.effectors().at(0).chargeStruct().chargeTypeId()); + data.duration = m_effectCluster.effectors.at(0).chargeAmount * m_handlerPdmData.get()->getCadence(m_effectCluster.effectors.at(0).chargeStruct.chargeTypeId); + DEBUG_LOG(m_logger) << " recalc effectDuration use cadence value " << data.duration << " effector shots: " << m_effectCluster.effectors.at(0).chargeAmount << " cadence " << m_handlerPdmData.get()->getCadence(m_effectCluster.effectors.at(0).chargeStruct.chargeTypeId); } } } else { DEBUG_LOG(m_logger) << "Use effectDuration directly "; - data.duration = m_effectCluster.effectDuration(); + data.duration = m_effectCluster.effectDuration; } if (data.shotsPerVolley > 48) @@ -208,21 +208,21 @@ void EffectShowEffectCluster::updateEffectShow(Database::EsmEffectShow &data) if (data.shotsPerVolley <= 0) data.shotsPerVolley = 1; - data.typeOfAmmunition = m_effectCluster.chargeStruct().chargeTypeId(); - data.esmParticipantId = (m_effectCluster.esmParticipantIds().size() > 0) - ? m_effectCluster.esmParticipantIds().at(0) + data.typeOfAmmunition = m_effectCluster.chargeStruct.chargeTypeId; + data.esmParticipantId = (m_effectCluster.esmParticipantIds.size() > 0) + ? m_effectCluster.esmParticipantIds.at(0) : -1; } //----------------------------------------------------------------------------- void EffectShowEffectCluster::calculateSquare() { - Core::GeoPosition2D geoPos = m_effectCluster.area().cornerBottomLeft(); - m_lowerLeftPos = LtsCoordTrans::UtmCoordinate::fromGeographic(geoPos.lon(), geoPos.lat()); + Core::GeoPosition2D geoPos = m_effectCluster.area.cornerBottomLeft; + m_lowerLeftPos = LtsCoordTrans::UtmCoordinate::fromGeographic(geoPos.lon, geoPos.lat); // Calculate squares. - m_areasWidth = getAreasSideLength(m_effectCluster.area().width()); // Squares in x-direction - m_areasDepth = getAreasSideLength(m_effectCluster.area().height()); // Squares in y-direction - m_numOfEffectShows = m_handlerPdmData->effectShowCount(m_effectCluster.chargeStruct()); + m_areasWidth = getAreasSideLength(m_effectCluster.area.width); // Squares in x-direction + m_areasDepth = getAreasSideLength(m_effectCluster.area.height); // Squares in y-direction + m_numOfEffectShows = m_handlerPdmData->effectShowCount(m_effectCluster.chargeStruct); } //static ---------------------------------------------------------------------- LtsCoordTrans::UtmCoordinate EffectShowEffectCluster::rotate(const LtsCoordTrans::UtmCoordinate &p, const LtsCoordTrans::UtmCoordinate &c, double angle) @@ -268,9 +268,9 @@ int EffectShowEffectCluster::getShotsPerArea() const if (!m_numOfEffectShows) return 0; int v = 0; - for (const auto &effector: m_effectCluster.effectors()) + for (const auto &effector: m_effectCluster.effectors) { - v+= effector.chargeAmount(); + v+= effector.chargeAmount; } return v / m_numOfEffectShows; //split even across all effect shows } @@ -280,9 +280,9 @@ int EffectShowEffectCluster::getShotsPerArea(int areas) const if (areas == 0) return 0; int v = 0; - for (const auto &effector: m_effectCluster.effectors()) + for (const auto &effector: m_effectCluster.effectors) { - v+= effector.chargeAmount(); + v+= effector.chargeAmount; } return v / areas; } @@ -308,7 +308,7 @@ int EffectShowEffectCluster::getNumberOfVolley(int v) //----------------------------------------------------------------------------- double EffectShowEffectCluster::rotationRad() const { - return -m_effectCluster.area().rotation() * LtsCoordTrans::deg2rad(); + return -m_effectCluster.area.rotation * LtsCoordTrans::deg2rad(); } //----------------------------------------------------------------------------- diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowManagement/effect_show_explosion_area.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowManagement/effect_show_explosion_area.cpp index e97a83890..7ec09c930 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowManagement/effect_show_explosion_area.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowManagement/effect_show_explosion_area.cpp @@ -35,7 +35,7 @@ Database::EsmEffectShow EffectShowExplosionArea::getEffectShow(int idx) Database::EsmEffectShow esmEffectShow; - if (!m_handlerPdmData->isSmoke(m_explosionArea.chargeStruct())) + if (!m_handlerPdmData->isSmoke(m_explosionArea.chargeStruct)) { int indX = idx % m_areasWidth.numOfAreas; int indY = idx / m_areasWidth.numOfAreas; @@ -62,15 +62,15 @@ Database::EsmEffectShow EffectShowExplosionArea::getEffectShow(int idx) esmEffectShow.id = 0; esmEffectShow.name = QStringLiteral("EXP"); - esmEffectShow.startTime = m_explosionArea.effectStart().is_set() ? m_explosionArea.effectStart().get() : 0; - esmEffectShow.duration = m_explosionArea.effectDuration(); + esmEffectShow.startTime = m_explosionArea.effectStart.is_set() ? m_explosionArea.effectStart.get() : 0; + esmEffectShow.duration = m_explosionArea.effectDuration; esmEffectShow.centerPosition = centerPosRotated.geographic(); - esmEffectShow.idAreaEffectSimulation = m_explosionArea.id(); + esmEffectShow.idAreaEffectSimulation = m_explosionArea.id; esmEffectShow.esmParticipantId = -1; - esmEffectShow.nameAreaEfffectSimulation = QString::fromStdString(m_explosionArea.name()); + esmEffectShow.nameAreaEfffectSimulation = QString::fromStdString(m_explosionArea.name); esmEffectShow.numOfVolley = getNumberOfVolley(); esmEffectShow.shotsPerVolley = getShotsPerArea() / esmEffectShow.numOfVolley; - esmEffectShow.typeOfAmmunition = m_explosionArea.chargeStruct().chargeTypeId(); + esmEffectShow.typeOfAmmunition = m_explosionArea.chargeStruct.chargeTypeId; // can there be more then 48 shoots? if (esmEffectShow.shotsPerVolley > 48) @@ -80,10 +80,10 @@ Database::EsmEffectShow EffectShowExplosionArea::getEffectShow(int idx) esmEffectShow.lowerLeftPosition = lowerLeftPosRotated.geographic(); esmEffectShow.areaWidth = m_areasWidth.side(indX); esmEffectShow.areaDepth = m_areasDepth.side(indY); - esmEffectShow.areaRotation = m_explosionArea.area().rotation() + 90; + esmEffectShow.areaRotation = m_explosionArea.area.rotation + 90; - DEBUG_LOG(m_logger) << "\nWidth: " << m_explosionArea.area().width() << " Height: " << m_explosionArea.area().height() + DEBUG_LOG(m_logger) << "\nWidth: " << m_explosionArea.area.width << " Height: " << m_explosionArea.area.height << "\nRotated LL Pos: " << lowerLeftPosRotated.mgrs() << "\nRotated Center Pos: " << centerPosRotated.mgrs() << "\nOffset x,y: " << x_off << " , " << y_off @@ -100,30 +100,30 @@ Database::EsmEffectShow EffectShowExplosionArea::getEffectShow(int idx) // calculate center position LtsCoordTrans::UtmCoordinate centerPos = lowerLeftPosRotated; - centerPos.x = centerPos.x + m_explosionArea.area().width() / 2.; - centerPos.y = centerPos.y + m_explosionArea.area().height() / 2.; + centerPos.x = centerPos.x + m_explosionArea.area.width / 2.; + centerPos.y = centerPos.y + m_explosionArea.area.height / 2.; LtsCoordTrans::UtmCoordinate centerPosRotated = rotate(centerPos, m_lowerLeftPos, rotationRad()); esmEffectShow.id = 0; esmEffectShow.name = QStringLiteral("EXP"); - esmEffectShow.startTime = m_explosionArea.effectStart().is_set() ? m_explosionArea.effectStart().get() : 0; - esmEffectShow.duration = m_explosionArea.effectDuration(); + esmEffectShow.startTime = m_explosionArea.effectStart.is_set() ? m_explosionArea.effectStart.get() : 0; + esmEffectShow.duration = m_explosionArea.effectDuration; esmEffectShow.centerPosition = centerPosRotated.geographic(); - esmEffectShow.idAreaEffectSimulation = m_explosionArea.id(); + esmEffectShow.idAreaEffectSimulation = m_explosionArea.id; esmEffectShow.esmParticipantId = -1; - esmEffectShow.nameAreaEfffectSimulation = QString::fromStdString(m_explosionArea.name()); - esmEffectShow.typeOfAmmunition = m_explosionArea.chargeStruct().chargeTypeId(); + esmEffectShow.nameAreaEfffectSimulation = QString::fromStdString(m_explosionArea.name); + esmEffectShow.typeOfAmmunition = m_explosionArea.chargeStruct.chargeTypeId; esmEffectShow.numOfVolley = 1; esmEffectShow.shotsPerVolley = 1; esmEffectShow.lowerLeftPosition = lowerLeftPosRotated.geographic(); - esmEffectShow.areaWidth = m_explosionArea.area().width(); - esmEffectShow.areaDepth = m_explosionArea.area().height(); - esmEffectShow.areaRotation = m_explosionArea.area().rotation() + 90; + esmEffectShow.areaWidth = m_explosionArea.area.width; + esmEffectShow.areaDepth = m_explosionArea.area.height; + esmEffectShow.areaRotation = m_explosionArea.area.rotation + 90; - DEBUG_LOG(m_logger) << "\nWidth: " << m_explosionArea.area().width() << " Height: " << m_explosionArea.area().height() + DEBUG_LOG(m_logger) << "\nWidth: " << m_explosionArea.area.width << " Height: " << m_explosionArea.area.height << "\nRotated LL Pos: " << lowerLeftPosRotated.mgrs() << "\nRotated Center Pos: " << centerPosRotated.mgrs() - << "\nSide x,y: " << m_explosionArea.area().width() << " , " << m_explosionArea.area().height(); + << "\nSide x,y: " << m_explosionArea.area.width << " , " << m_explosionArea.area.height; } return esmEffectShow; @@ -131,29 +131,29 @@ Database::EsmEffectShow EffectShowExplosionArea::getEffectShow(int idx) //============================================================================= void EffectShowExplosionArea::updateEffectShow(Database::EsmEffectShow &data) { - data.nameAreaEfffectSimulation = QString::fromStdString(m_explosionArea.name()); - data.startTime = m_explosionArea.effectStart().is_set() ? m_explosionArea.effectStart().get() : 0; - data.duration = m_explosionArea.effectDuration(); + data.nameAreaEfffectSimulation = QString::fromStdString(m_explosionArea.name); + data.startTime = m_explosionArea.effectStart.is_set() ? m_explosionArea.effectStart.get() : 0; + data.duration = m_explosionArea.effectDuration; if (data.shotsPerVolley > 48) data.shotsPerVolley = 48;//(48 / data.numOfVolley); if (data.shotsPerVolley <= 0) data.shotsPerVolley = 1; - data.typeOfAmmunition = m_explosionArea.chargeStruct().chargeTypeId(); + data.typeOfAmmunition = m_explosionArea.chargeStruct.chargeTypeId; } //----------------------------------------------------------------------------- void EffectShowExplosionArea::calculateSquare() { // start position of the area - Core::GeoPosition2D geoPos = m_explosionArea.area().cornerBottomLeft(); - m_lowerLeftPos = LtsCoordTrans::UtmCoordinate::fromGeographic(geoPos.lon(), geoPos.lat()); + Core::GeoPosition2D geoPos = m_explosionArea.area.cornerBottomLeft; + m_lowerLeftPos = LtsCoordTrans::UtmCoordinate::fromGeographic(geoPos.lon, geoPos.lat); // Calculate squares. - m_areasWidth = getAreasSideLength(m_explosionArea.area().width()); // Squares in x-direction - m_areasDepth = getAreasSideLength(m_explosionArea.area().height()); // Squares in y-direction + m_areasWidth = getAreasSideLength(m_explosionArea.area.width); // Squares in x-direction + m_areasDepth = getAreasSideLength(m_explosionArea.area.height); // Squares in y-direction // Calculate number of squares - if (m_handlerPdmData->isSmoke(m_explosionArea.chargeStruct())) + if (m_handlerPdmData->isSmoke(m_explosionArea.chargeStruct)) m_numOfEffectShows = 1; else m_numOfEffectShows = m_areasWidth.numOfAreas * m_areasDepth.numOfAreas; @@ -203,7 +203,7 @@ int EffectShowExplosionArea::getShotsPerArea() const { if (!m_numOfEffectShows) return 0; - int v = m_explosionArea.cannonCount() * m_explosionArea.cannonRounds(); + int v = m_explosionArea.cannonCount * m_explosionArea.cannonRounds; return v / m_numOfEffectShows; //split even across all effect shows } @@ -211,7 +211,7 @@ int EffectShowExplosionArea::getShotsPerArea(int areas) const { if (areas == 0) return 0; - int v = m_explosionArea.cannonCount() * m_explosionArea.cannonRounds(); + int v = m_explosionArea.cannonCount * m_explosionArea.cannonRounds; return v / areas; } @@ -237,7 +237,7 @@ int EffectShowExplosionArea::getNumberOfVolley(int v) //----------------------------------------------------------------------------- double EffectShowExplosionArea::rotationRad() const { - return -m_explosionArea.area().rotation() * LtsCoordTrans::deg2rad(); + return -m_explosionArea.area.rotation * LtsCoordTrans::deg2rad(); } //----------------------------------------------------------------------------- diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowManagement/effect_show_explosion_cluster.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowManagement/effect_show_explosion_cluster.cpp index a9d2154d8..f052980ad 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowManagement/effect_show_explosion_cluster.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowManagement/effect_show_explosion_cluster.cpp @@ -35,7 +35,7 @@ Database::EsmEffectShow EffectShowExplosionCluster::getEffectShow(int idx) Database::EsmEffectShow esmEffectShow; - if (!m_handlerPdmData->isSmoke(m_explosionCluster.chargeStruct())) + if (!m_handlerPdmData->isSmoke(m_explosionCluster.chargeStruct)) { int indX = idx % m_areasWidth.numOfAreas; int indY = idx / m_areasWidth.numOfAreas; @@ -62,15 +62,15 @@ Database::EsmEffectShow EffectShowExplosionCluster::getEffectShow(int idx) esmEffectShow.id = 0; esmEffectShow.name = QStringLiteral("EXP"); - esmEffectShow.startTime = m_explosionCluster.effectStart().is_set() ? m_explosionCluster.effectStart().get() : 0; - esmEffectShow.duration = m_explosionCluster.effectDuration(); + esmEffectShow.startTime = m_explosionCluster.effectStart.is_set() ? m_explosionCluster.effectStart.get() : 0; + esmEffectShow.duration = m_explosionCluster.effectDuration; esmEffectShow.centerPosition = centerPosRotated.geographic(); - esmEffectShow.idAreaEffectSimulation = m_explosionCluster.id(); + esmEffectShow.idAreaEffectSimulation = m_explosionCluster.id; esmEffectShow.esmParticipantId = -1; - esmEffectShow.nameAreaEfffectSimulation = QString::fromStdString(m_explosionCluster.name()); + esmEffectShow.nameAreaEfffectSimulation = QString::fromStdString(m_explosionCluster.name); esmEffectShow.numOfVolley = getNumberOfVolley(); esmEffectShow.shotsPerVolley = getShotsPerArea() / esmEffectShow.numOfVolley; - esmEffectShow.typeOfAmmunition = m_explosionCluster.chargeStruct().chargeTypeId(); + esmEffectShow.typeOfAmmunition = m_explosionCluster.chargeStruct.chargeTypeId; // can there be more then 48 shoots? if (esmEffectShow.shotsPerVolley > 48) @@ -80,10 +80,10 @@ Database::EsmEffectShow EffectShowExplosionCluster::getEffectShow(int idx) esmEffectShow.lowerLeftPosition = lowerLeftPosRotated.geographic(); esmEffectShow.areaWidth = m_areasWidth.side(indX); esmEffectShow.areaDepth = m_areasDepth.side(indY); - esmEffectShow.areaRotation = m_explosionCluster.area().rotation() + 90; + esmEffectShow.areaRotation = m_explosionCluster.area.rotation + 90; - DEBUG_LOG(m_logger) << "\nWidth: " << m_explosionCluster.area().width() << " Height: " << m_explosionCluster.area().height() + DEBUG_LOG(m_logger) << "\nWidth: " << m_explosionCluster.area.width << " Height: " << m_explosionCluster.area.height << "\nRotated LL Pos: " << lowerLeftPosRotated.mgrs() << "\nRotated Center Pos: " << centerPosRotated.mgrs() << "\nOffset x,y: " << x_off << " , " << y_off @@ -100,30 +100,30 @@ Database::EsmEffectShow EffectShowExplosionCluster::getEffectShow(int idx) // calculate center position LtsCoordTrans::UtmCoordinate centerPos = lowerLeftPosRotated; - centerPos.x = centerPos.x + m_explosionCluster.area().width() / 2.; - centerPos.y = centerPos.y + m_explosionCluster.area().height() / 2.; + centerPos.x = centerPos.x + m_explosionCluster.area.width / 2.; + centerPos.y = centerPos.y + m_explosionCluster.area.height / 2.; LtsCoordTrans::UtmCoordinate centerPosRotated = rotate(centerPos, m_lowerLeftPos, rotationRad()); esmEffectShow.id = 0; esmEffectShow.name = QStringLiteral("EXP"); - esmEffectShow.startTime = m_explosionCluster.effectStart().is_set() ? m_explosionCluster.effectStart().get() : 0; - esmEffectShow.duration = m_explosionCluster.effectDuration(); + esmEffectShow.startTime = m_explosionCluster.effectStart.is_set() ? m_explosionCluster.effectStart.get() : 0; + esmEffectShow.duration = m_explosionCluster.effectDuration; esmEffectShow.centerPosition = centerPosRotated.geographic(); - esmEffectShow.idAreaEffectSimulation = m_explosionCluster.id(); + esmEffectShow.idAreaEffectSimulation = m_explosionCluster.id; esmEffectShow.esmParticipantId = -1; - esmEffectShow.nameAreaEfffectSimulation = QString::fromStdString(m_explosionCluster.name()); - esmEffectShow.typeOfAmmunition = m_explosionCluster.chargeStruct().chargeTypeId(); + esmEffectShow.nameAreaEfffectSimulation = QString::fromStdString(m_explosionCluster.name); + esmEffectShow.typeOfAmmunition = m_explosionCluster.chargeStruct.chargeTypeId; esmEffectShow.numOfVolley = 1; esmEffectShow.shotsPerVolley = 1; esmEffectShow.lowerLeftPosition = lowerLeftPosRotated.geographic(); - esmEffectShow.areaWidth = m_explosionCluster.area().width(); - esmEffectShow.areaDepth = m_explosionCluster.area().height(); - esmEffectShow.areaRotation = m_explosionCluster.area().rotation() + 90; + esmEffectShow.areaWidth = m_explosionCluster.area.width; + esmEffectShow.areaDepth = m_explosionCluster.area.height; + esmEffectShow.areaRotation = m_explosionCluster.area.rotation + 90; - DEBUG_LOG(m_logger) << "\nWidth: " << m_explosionCluster.area().width() << " Height: " << m_explosionCluster.area().height() + DEBUG_LOG(m_logger) << "\nWidth: " << m_explosionCluster.area.width << " Height: " << m_explosionCluster.area.height << "\nRotated LL Pos: " << lowerLeftPosRotated.mgrs() << "\nRotated Center Pos: " << centerPosRotated.mgrs() - << "\nSide x,y: " << m_explosionCluster.area().width() << " , " << m_explosionCluster.area().height(); + << "\nSide x,y: " << m_explosionCluster.area.width << " , " << m_explosionCluster.area.height; } return esmEffectShow; @@ -133,27 +133,27 @@ void EffectShowExplosionCluster::updateEffectShow(Database::EsmEffectShow &data) { DEBUG_LOG(m_logger) << "update EffectSHow for (" << data.id << ")"; - data.nameAreaEfffectSimulation = QString::fromStdString(m_explosionCluster.name()); - data.startTime = m_explosionCluster.effectStart().is_set() ? m_explosionCluster.effectStart().get() : 0; - data.duration = m_explosionCluster.effectDuration(); + data.nameAreaEfffectSimulation = QString::fromStdString(m_explosionCluster.name); + data.startTime = m_explosionCluster.effectStart.is_set() ? m_explosionCluster.effectStart.get() : 0; + data.duration = m_explosionCluster.effectDuration; if (data.shotsPerVolley > 48) data.shotsPerVolley = 48;//(48 / data.numOfVolley); if (data.shotsPerVolley <= 0) data.shotsPerVolley = 1; - data.typeOfAmmunition = m_explosionCluster.chargeStruct().chargeTypeId(); + data.typeOfAmmunition = m_explosionCluster.chargeStruct.chargeTypeId; } //----------------------------------------------------------------------------- void EffectShowExplosionCluster::calculateSquare() { - Core::GeoPosition2D geoPos = m_explosionCluster.area().cornerBottomLeft(); - m_lowerLeftPos = LtsCoordTrans::UtmCoordinate::fromGeographic(geoPos.lon(), geoPos.lat()); + Core::GeoPosition2D geoPos = m_explosionCluster.area.cornerBottomLeft; + m_lowerLeftPos = LtsCoordTrans::UtmCoordinate::fromGeographic(geoPos.lon, geoPos.lat); // Calculate squares. - m_areasWidth = getAreasSideLength(m_explosionCluster.area().width()); // Squares in x-direction - m_areasDepth = getAreasSideLength(m_explosionCluster.area().height()); // Squares in y-direction - m_numOfEffectShows = m_handlerPdmData->effectShowCount(m_explosionCluster.chargeStruct()); + m_areasWidth = getAreasSideLength(m_explosionCluster.area.width); // Squares in x-direction + m_areasDepth = getAreasSideLength(m_explosionCluster.area.height); // Squares in y-direction + m_numOfEffectShows = m_handlerPdmData->effectShowCount(m_explosionCluster.chargeStruct); } //static ---------------------------------------------------------------------- LtsCoordTrans::UtmCoordinate EffectShowExplosionCluster::rotate(const LtsCoordTrans::UtmCoordinate &p, const LtsCoordTrans::UtmCoordinate &c, double angle) @@ -198,7 +198,7 @@ int EffectShowExplosionCluster::getShotsPerArea() const { if (!m_numOfEffectShows) return 0; - int v = m_explosionCluster.impactCount(); //cannonCount() * m_explosionCluster.cannonRounds(); + int v = m_explosionCluster.impactCount; //cannonCount() * m_explosionCluster.cannonRounds(); return v / m_numOfEffectShows; //split even across all effect shows } @@ -206,7 +206,7 @@ int EffectShowExplosionCluster::getShotsPerArea(int areas) const { if (areas == 0) return 0; - int v = m_explosionCluster.impactCount();//cannonCount() * m_explosionCluster.cannonRounds(); + int v = m_explosionCluster.impactCount;//cannonCount() * m_explosionCluster.cannonRounds(); return v / areas; } @@ -232,7 +232,7 @@ int EffectShowExplosionCluster::getNumberOfVolley(int v) //----------------------------------------------------------------------------- double EffectShowExplosionCluster::rotationRad() const { - return -m_explosionCluster.area().rotation() * LtsCoordTrans::deg2rad(); + return -m_explosionCluster.area.rotation * LtsCoordTrans::deg2rad(); } //----------------------------------------------------------------------------- diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowManagement/effect_show_mine_area.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowManagement/effect_show_mine_area.cpp index b8e1314d7..15590f4fc 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowManagement/effect_show_mine_area.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowManagement/effect_show_mine_area.cpp @@ -28,11 +28,11 @@ Database::EsmEffectShow EffectShowMineArea::getEffectShow() Database::EsmEffectShow esmEffectShow; esmEffectShow.id = 0; esmEffectShow.name = QLatin1String("MIN"); - esmEffectShow.startTime = m_mineArea.effectStart().is_set() ? m_mineArea.effectStart().get() : 0; - esmEffectShow.duration = m_mineArea.effectDuration(); + esmEffectShow.startTime = m_mineArea.effectStart.is_set() ? m_mineArea.effectStart.get() : 0; + esmEffectShow.duration = m_mineArea.effectDuration; esmEffectShow.centerPosition = m_centerPos.geographic(); - esmEffectShow.idAreaEffectSimulation = m_mineArea.id(); - esmEffectShow.nameAreaEfffectSimulation = QString::fromStdString(m_mineArea.name()); + esmEffectShow.idAreaEffectSimulation = m_mineArea.id; + esmEffectShow.nameAreaEfffectSimulation = QString::fromStdString(m_mineArea.name); esmEffectShow.esmParticipantId = -1; esmEffectShow.numOfVolley = 1; //Hardcode?? esmEffectShow.shotsPerVolley = 18; @@ -43,10 +43,10 @@ Database::EsmEffectShow EffectShowMineArea::getEffectShow() updateEffectShow(esmEffectShow); - for (const auto &seg : m_mineArea.segments()) + for (const auto &seg : m_mineArea.segments) { - const Core::GeoPosition2D &posGeo = seg.positionStart(); - LtsCoordTrans::UtmCoordinate pos = LtsCoordTrans::UtmCoordinate::fromGeographic(posGeo.lon(), posGeo.lat(), m_utmZone); + const Core::GeoPosition2D &posGeo = seg.positionStart; + LtsCoordTrans::UtmCoordinate pos = LtsCoordTrans::UtmCoordinate::fromGeographic(posGeo.lon, posGeo.lat, m_utmZone); DEBUG_LOG(m_logger) << "Start Pos Segm.: " << pos.mgrs(); } DEBUG_LOG(m_logger) << "Center Pos Effect Show: " << LtsCoordTrans::mgrsFromGeographic(esmEffectShow.centerPosition.x(), esmEffectShow.centerPosition.y()); @@ -55,27 +55,27 @@ Database::EsmEffectShow EffectShowMineArea::getEffectShow() //----------------------------------------------------------------------------- void EffectShowMineArea::updateEffectShow(Database::EsmEffectShow &data) { - data.nameAreaEfffectSimulation = QString::fromStdString(m_mineArea.name()); - data.duration = m_mineArea.effectDuration() / 10; + data.nameAreaEfffectSimulation = QString::fromStdString(m_mineArea.name); + data.duration = m_mineArea.effectDuration / 10; if (data.duration > (3600 * 1000)) data.duration = 3600 * 1000; - if (m_mineArea.effectStart().is_set()) - data.startTime = m_mineArea.effectStart().get() + m_mineArea.effectDuration() - data.duration; + if (m_mineArea.effectStart.is_set()) + data.startTime = m_mineArea.effectStart.get() + m_mineArea.effectDuration - data.duration; else data.startTime = 0; - data.typeOfAmmunition = m_mineArea.chargeStruct().chargeTypeId(); + data.typeOfAmmunition = m_mineArea.chargeStruct.chargeTypeId; } //----------------------------------------------------------------------------- void EffectShowMineArea::calculatePositions() { // start position of the segment - Core::GeoPosition2D geoPosStart = m_segment.positionStart(); - Core::GeoPosition2D geoPosEnd = m_segment.positionEnd(); - LtsCoordTrans::UtmCoordinate startPositionUtm = LtsCoordTrans::UtmCoordinate::fromGeographic(geoPosStart.lon(), geoPosStart.lat(), m_utmZone); + Core::GeoPosition2D geoPosStart = m_segment.positionStart; + Core::GeoPosition2D geoPosEnd = m_segment.positionEnd; + LtsCoordTrans::UtmCoordinate startPositionUtm = LtsCoordTrans::UtmCoordinate::fromGeographic(geoPosStart.lon, geoPosStart.lat, m_utmZone); if (m_utmZone == -1) m_utmZone = startPositionUtm.zone; - LtsCoordTrans::UtmCoordinate endPositionUtm = LtsCoordTrans::UtmCoordinate::fromGeographic(geoPosEnd.lon(), geoPosEnd.lat(), m_utmZone); + LtsCoordTrans::UtmCoordinate endPositionUtm = LtsCoordTrans::UtmCoordinate::fromGeographic(geoPosEnd.lon, geoPosEnd.lat, m_utmZone); const QLineF line({startPositionUtm.x, startPositionUtm.y}, {endPositionUtm.x, endPositionUtm.y}); // length/2 of the segment @@ -99,11 +99,11 @@ void EffectShowMineArea::calculatePositions() //----------------------------------------------------------------------------- int EffectShowMineArea::getEffectAreaWidth() const { - Core::GeoPosition2D geoPosStart = m_segment.positionStart(); - Core::GeoPosition2D geoPosEnd = m_segment.positionEnd(); + Core::GeoPosition2D geoPosStart = m_segment.positionStart; + Core::GeoPosition2D geoPosEnd = m_segment.positionEnd; - LtsCoordTrans::UtmCoordinate startPositionUtm = LtsCoordTrans::UtmCoordinate::fromGeographic(geoPosStart.lon(), geoPosStart.lat(), m_utmZone); - LtsCoordTrans::UtmCoordinate endPositionUtm = LtsCoordTrans::UtmCoordinate::fromGeographic(geoPosEnd.lon(), geoPosEnd.lat(), m_utmZone); + LtsCoordTrans::UtmCoordinate startPositionUtm = LtsCoordTrans::UtmCoordinate::fromGeographic(geoPosStart.lon, geoPosStart.lat, m_utmZone); + LtsCoordTrans::UtmCoordinate endPositionUtm = LtsCoordTrans::UtmCoordinate::fromGeographic(geoPosEnd.lon, geoPosEnd.lat, m_utmZone); const QLineF line({startPositionUtm.x, startPositionUtm.y}, {endPositionUtm.x, endPositionUtm.y}); int segmentLength = line.length(); @@ -114,7 +114,7 @@ int EffectShowMineArea::getEffectAreaWidth() const //----------------------------------------------------------------------------- int EffectShowMineArea::getEffectAreaDepth() const { - int segmentWidth = qRound(m_mineArea.width()); + int segmentWidth = qRound(m_mineArea.width); if (segmentWidth <= 50) return 50; if (segmentWidth >= 300) return 300; return (((segmentWidth + 25) / 50) * 50); diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowManagement/effect_show_mine_area.h b/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowManagement/effect_show_mine_area.h index 40267f0f0..df71ecb62 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowManagement/effect_show_mine_area.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowManagement/effect_show_mine_area.h @@ -56,7 +56,7 @@ public: */ static const AreaEffectSimulation::MineSegment &getEffectShowSegment(const AreaEffectSimulation::MineArea &mineArea) { - return mineArea.segments().at(mineArea.segments().size() / 2); + return mineArea.segments.at(mineArea.segments.size() / 2); } private: diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowManagement/esm_convert_from_tab.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowManagement/esm_convert_from_tab.cpp index 6a0d51b6c..4ac6dc0fb 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowManagement/esm_convert_from_tab.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowManagement/esm_convert_from_tab.cpp @@ -18,8 +18,8 @@ namespace ConvertFromTab //============================================================================= RxTelegram_e isTelegram(const TrainingAreaBase::FireSmokeMarkerData &data) { - Q_ASSERT(data.payload().size() > 0); - switch (data.payload().at(0)) + Q_ASSERT(data.payload.size() > 0); + switch (data.payload.at(0)) { case 120: return RxTelegram_e::OrderConfirmation; case 121: return RxTelegram_e::VehicleStatus; @@ -29,10 +29,10 @@ RxTelegram_e isTelegram(const TrainingAreaBase::FireSmokeMarkerData &data) //============================================================================= OrderConfirmation_t getOrderConfirmation(const TrainingAreaBase::FireSmokeMarkerData &data) { - Q_ASSERT(data.payload().size() >= 5); + Q_ASSERT(data.payload.size() >= 5); const QByteArray tele(QByteArray::fromRawData( - reinterpret_cast(&data.payload().at(0)), - data.payload().size())); + reinterpret_cast(&data.payload.at(0)), + data.payload.size())); OrderConfirmation_t res; size_t k = 1; @@ -45,9 +45,9 @@ OrderConfirmation_t getOrderConfirmation(const TrainingAreaBase::FireSmokeMarker res.confirmation = EffectShowManagement::OrderConfirmation_e::inner_enum(byte); QByteArray qbArr; - int ie = data.payload().size() - 5; + int ie = data.payload.size() - 5; for (int i = 0; i < ie; ++i) - qbArr.append(data.payload().at(5 + i)); // rationale (text) + qbArr.append(data.payload.at(5 + i)); // rationale (text) res.answerText = QString::fromUtf8(qbArr); @@ -56,14 +56,14 @@ OrderConfirmation_t getOrderConfirmation(const TrainingAreaBase::FireSmokeMarker //============================================================================= VehicleStatus_t getVehicleStatus(const TrainingAreaBase::FireSmokeMarkerData &data) { - Q_ASSERT(data.payload().size() == 5); + Q_ASSERT(data.payload.size() == 5); const QByteArray tele(QByteArray::fromRawData( - reinterpret_cast(&data.payload().at(0)), - data.payload().size())); + reinterpret_cast(&data.payload.at(0)), + data.payload.size())); VehicleStatus_t res; - res.equipmentNumber = data.equipmentNumber(); - res.timestamp = data.sampleTime(); + res.equipmentNumber = data.equipmentNumber; + res.timestamp = data.sampleTime; size_t k = 1; quint8 byte; diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowManagement/esm_convert_to_tab.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowManagement/esm_convert_to_tab.cpp index 2e8770491..cfdc07997 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowManagement/esm_convert_to_tab.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowManagement/esm_convert_to_tab.cpp @@ -27,8 +27,8 @@ std::vector convertEffectShowOrder(const EffectShowOrder_t &effectShowO LtsUtils::set2Byte(effectShowOrder.idEffectShow, ba); LtsUtils::set4Byte(effectShowOrder.startTime, ba); - LtsUtils::set8Byte(effectShowOrder.centerPosition.lon(), ba); - LtsUtils::set8Byte(effectShowOrder.centerPosition.lat(), ba); + LtsUtils::set8Byte(effectShowOrder.centerPosition.lon, ba); + LtsUtils::set8Byte(effectShowOrder.centerPosition.lat, ba); // 50m squares LtsUtils::set1Byte(effectShowOrder.areaWidth / 50, ba); @@ -39,8 +39,8 @@ std::vector convertEffectShowOrder(const EffectShowOrder_t &effectShowO rotation += 360.0; LtsUtils::set2Byte(qRound(rotation * 100), ba); - LtsUtils::set8Byte(effectShowOrder.lowerLeftPosition.lon(), ba); - LtsUtils::set8Byte(effectShowOrder.lowerLeftPosition.lat(), ba); + LtsUtils::set8Byte(effectShowOrder.lowerLeftPosition.lon, ba); + LtsUtils::set8Byte(effectShowOrder.lowerLeftPosition.lat, ba); LtsUtils::set1Byte(effectShowOrder.numOfVolley, ba); LtsUtils::set1Byte(effectShowOrder.shotsPerVolley, ba); @@ -65,8 +65,8 @@ std::vector convertRelocationOrder(const RelocationOrder_t &relocationO LtsUtils::set2Byte(relocationOrder.idRelocation, ba); LtsUtils::set4Byte(relocationOrder.executionTime, ba); - LtsUtils::set8Byte(relocationOrder.centerPosition.lon(), ba); - LtsUtils::set8Byte(relocationOrder.centerPosition.lat(), ba); + LtsUtils::set8Byte(relocationOrder.centerPosition.lon, ba); + LtsUtils::set8Byte(relocationOrder.centerPosition.lat, ba); const QByteArray text = relocationOrder.infoText.toUtf8().simplified(); for (auto c : text) @@ -124,16 +124,16 @@ std::vector convertMeteoData(const MeteoDataManagement::MeteoData &mete ba.reserve(11); LtsUtils::set1Byte(156, ba); - LtsUtils::set2Byte(qRound(meteoData.temperature() * 10.0), ba); - LtsUtils::set2Byte(qRound(meteoData.humidity()), ba); - LtsUtils::set2Byte(qRound(meteoData.pressure()), ba); + LtsUtils::set2Byte(qRound(meteoData.temperature * 10.0), ba); + LtsUtils::set2Byte(qRound(meteoData.humidity), ba); + LtsUtils::set2Byte(qRound(meteoData.pressure), ba); - double dir = fmod(meteoData.windDirection(), 360.0); + double dir = fmod(meteoData.windDirection, 360.0); if (dir < 0.0) dir += 360.0; LtsUtils::set2Byte(qRound(dir * 100), ba); - LtsUtils::set2Byte(qRound(meteoData.windSpeed()), ba); + LtsUtils::set2Byte(qRound(meteoData.windSpeed), ba); return LtsUtils::convert>(ba); } diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowManagement/handler_aes_data.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowManagement/handler_aes_data.cpp index 2cfed83d8..36acbb9a4 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowManagement/handler_aes_data.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowManagement/handler_aes_data.cpp @@ -117,45 +117,45 @@ bool HandlerAesData::init() //============================================================================= void HandlerAesData::onExplosionSingleChanged(const AreaEffectSimulation::ExplosionSingle &data, DataModification modType) { - const Core::GeoPosition2D &posLl = data.impactPosition(); + const Core::GeoPosition2D &posLl = data.impactPosition; AreaEffectSimulation::ExplosionArea areaData; - areaData.altitude(data.altitude()); - areaData.cannonCount(1); - areaData.cannonRounds(1); - areaData.chargeStruct().chargeTypeId(data.chargeStruct().chargeTypeId()); - areaData.effectDuration(data.effectDuration()); - areaData.effectMarkingInTa(data.effectMarkingInTa()); - areaData.effectStart(data.effectStart()); - areaData.effectStateId(data.effectStateId()); - areaData.externalId(data.externalId()); - areaData.fireRequestTime(data.fireRequestTime()); - areaData.remainExplosionNumber(1); - areaData.id(data.id()); - areaData.name(data.name()); - areaData.isDeleted(data.isDeleted()); - areaData.isUsed(data.isUsed()); + areaData.altitude = data.altitude; + areaData.cannonCount = 1; + areaData.cannonRounds = 1; + areaData.chargeStruct.chargeTypeId = data.chargeStruct.chargeTypeId; + areaData.effectDuration = data.effectDuration; + areaData.effectMarkingInTa = data.effectMarkingInTa; + areaData.effectStart = data.effectStart; + areaData.effectStateId = data.effectStateId; + areaData.externalId = data.externalId; + areaData.fireRequestTime = data.fireRequestTime; + areaData.remainExplosionNumber = 1; + areaData.id = data.id; + areaData.name = data.name; + areaData.isDeleted = data.isDeleted; + areaData.isUsed = data.isUsed; AreaEffectSimulation::Area area; - area.cornerBottomLeft(posLl); - area.height(50); - area.width(50); - areaData.area(area); + area.cornerBottomLeft = posLl; + area.height = 50; + area.width = 50; + areaData.area = area; HandlerEffectShow::KindOfModification_e kindOfModification = HandlerEffectShow::KindOfModification_e::Removed; - if (takeIntoAccountEffectShow(data.effectStateId()) && data.effectMarkingInTa()) + if (takeIntoAccountEffectShow(data.effectStateId) && data.effectMarkingInTa) kindOfModification = getKindOfModification(ObjectAesData::asEsmAesData(areaData), modType); - ObjectAesData *ifs = m_AesDataObjMap.value(data.id()); + ObjectAesData *ifs = m_AesDataObjMap.value(data.id); if (kindOfModification == HandlerEffectShow::KindOfModification_e::Added && ifs) kindOfModification = HandlerEffectShow::KindOfModification_e::ModifiedData; DEBUG_LOG(m_logger) << "Got ExplosionArea: " - << "\n ID: " << data.id() - << "\n Name: " << data.name() - << "\n Effect status: " << data.effectStateId() - << "\n Effect show (y/n): " << data.effectMarkingInTa() - << "\n Lower left Pos: " << LtsCoordTrans::mgrsFromGeographic(posLl.lon(), posLl.lat()) - << "\n Start: " << data.effectStart() - << "\n Duration: " << data.effectDuration() + << "\n ID: " << data.id + << "\n Name: " << data.name + << "\n Effect status: " << data.effectStateId + << "\n Effect show (y/n): " << data.effectMarkingInTa + << "\n Lower left Pos: " << LtsCoordTrans::mgrsFromGeographic(posLl.lon, posLl.lat) + << "\n Start: " << data.effectStart + << "\n Duration: " << data.effectDuration << "\n Modification: " << modType << "\n detected Mod: " << HandlerEffectShow::enumToString(kindOfModification); @@ -172,7 +172,7 @@ void HandlerAesData::onExplosionSingleChanged(const AreaEffectSimulation::Explos } else { - m_AesDataObjMap.insert(data.id(), ifs); + m_AesDataObjMap.insert(data.id, ifs); m_mainHandler->handlerEffectShow()->onExplosionAreaChanged(areaData, kindOfModification); } break; @@ -191,15 +191,15 @@ void HandlerAesData::onExplosionSingleChanged(const AreaEffectSimulation::Explos ERROR_LOG(m_logger) << ret(); } else - WARNING_LOG(m_logger) << "Explosion Area not available for modification: " << data.id(); + WARNING_LOG(m_logger) << "Explosion Area not available for modification: " << data.id; break; } case HandlerEffectShow::KindOfModification_e::Removed: { if (ifs != nullptr) { - if (!m_AesDataObjMap.remove(data.id())) - ERROR_LOG(m_logger) << "Remove of AES data (" << data.id() << ") from map failed."; + if (!m_AesDataObjMap.remove(data.id)) + ERROR_LOG(m_logger) << "Remove of AES data (" << data.id << ") from map failed."; Core::FunctionReplyObject ret = ifs->removeObject(); if (ret.error()) @@ -221,25 +221,25 @@ void HandlerAesData::onExplosionSingleChanged(const AreaEffectSimulation::Explos void HandlerAesData::onExplosionAreaChanged(const AreaEffectSimulation::ExplosionArea &data, DataModification modType) { HandlerEffectShow::KindOfModification_e kindOfModification = HandlerEffectShow::KindOfModification_e::Removed; - if (takeIntoAccountEffectShow(data.effectStateId()) && data.effectMarkingInTa()) + if (takeIntoAccountEffectShow(data.effectStateId) && data.effectMarkingInTa) kindOfModification = getKindOfModification(ObjectAesData::asEsmAesData(data), modType); - ObjectAesData *ifs = m_AesDataObjMap.value(data.id()); + ObjectAesData *ifs = m_AesDataObjMap.value(data.id); if (kindOfModification == HandlerEffectShow::KindOfModification_e::Added && ifs) kindOfModification = HandlerEffectShow::KindOfModification_e::ModifiedData; - const Core::GeoPosition2D &posLl = data.area().cornerBottomLeft(); + const Core::GeoPosition2D &posLl = data.area.cornerBottomLeft; DEBUG_LOG(m_logger) << "Got ExplosionArea: " - << "\n ID: " << data.id() - << "\n Name: " << data.name() - << "\n Effect status: " << data.effectStateId() - << "\n Effect show (y/n): " << data.effectMarkingInTa() - << "\n Lower left Pos: " << LtsCoordTrans::mgrsFromGeographic(posLl.lon(), posLl.lat()) - << "\n Width: " << data.area().width() - << "\n Height: " << data.area().height() - << "\n Rotation: " << data.area().rotation() - << "\n Start: " << data.effectStart() - << "\n Duration: " << data.effectDuration() + << "\n ID: " << data.id + << "\n Name: " << data.name + << "\n Effect status: " << data.effectStateId + << "\n Effect show (y/n): " << data.effectMarkingInTa + << "\n Lower left Pos: " << LtsCoordTrans::mgrsFromGeographic(posLl.lon, posLl.lat) + << "\n Width: " << data.area.width + << "\n Height: " << data.area.height + << "\n Rotation: " << data.area.rotation + << "\n Start: " << data.effectStart + << "\n Duration: " << data.effectDuration << "\n Modification: " << modType << "\n detected Mod: " << HandlerEffectShow::enumToString(kindOfModification); @@ -275,15 +275,15 @@ void HandlerAesData::onExplosionAreaChanged(const AreaEffectSimulation::Explosio ERROR_LOG(m_logger) << ret(); } else - WARNING_LOG(m_logger) << "Explosion Area not available for modification: " << data.id(); + WARNING_LOG(m_logger) << "Explosion Area not available for modification: " << data.id; break; } case HandlerEffectShow::KindOfModification_e::Removed: { if (ifs != nullptr) { - if (!m_AesDataObjMap.remove(data.id())) - ERROR_LOG(m_logger) << "Remove of AES data (" << data.id() << ") from map failed."; + if (!m_AesDataObjMap.remove(data.id)) + ERROR_LOG(m_logger) << "Remove of AES data (" << data.id << ") from map failed."; Core::FunctionReplyObject ret = ifs->removeObject(); if (ret.error()) @@ -303,25 +303,25 @@ void HandlerAesData::onExplosionAreaChanged(const AreaEffectSimulation::Explosio void HandlerAesData::onExplosionClusterChanged(const AreaEffectSimulation::ExplosionCluster &data, DataModification modType) { HandlerEffectShow::KindOfModification_e kindOfModification = HandlerEffectShow::KindOfModification_e::Removed; - if (takeIntoAccountEffectShow(data.effectStateId()) && data.effectMarkingInTa()) + if (takeIntoAccountEffectShow(data.effectStateId) && data.effectMarkingInTa) kindOfModification = getKindOfModification(ObjectAesData::asEsmAesData(data), modType); - ObjectAesData *ifs = m_AesDataObjMap.value(data.id()); + ObjectAesData *ifs = m_AesDataObjMap.value(data.id); if (kindOfModification == HandlerEffectShow::KindOfModification_e::Added && ifs) kindOfModification = HandlerEffectShow::KindOfModification_e::ModifiedData; - const Core::GeoPosition2D &posLl = data.area().cornerBottomLeft(); + const Core::GeoPosition2D &posLl = data.area.cornerBottomLeft; DEBUG_LOG(m_logger) << ">>>> Got Cluster: " - << "\n ID: " << data.id() - << "\n Name: " << data.name() - << "\n Effect status: " << data.effectStateId() - << "\n Effect show (y/n): " << data.effectMarkingInTa() - << "\n Lower left Pos: " << LtsCoordTrans::mgrsFromGeographic(posLl.lon(), posLl.lat()) - << "\n Width: " << data.area().width() - << "\n Height: " << data.area().height() - << "\n Rotation: " << data.area().rotation() - << "\n Start: " << data.effectStart() - << "\n Duration: " << data.effectDuration() + << "\n ID: " << data.id + << "\n Name: " << data.name + << "\n Effect status: " << data.effectStateId + << "\n Effect show (y/n): " << data.effectMarkingInTa + << "\n Lower left Pos: " << LtsCoordTrans::mgrsFromGeographic(posLl.lon, posLl.lat) + << "\n Width: " << data.area.width + << "\n Height: " << data.area.height + << "\n Rotation: " << data.area.rotation + << "\n Start: " << data.effectStart + << "\n Duration: " << data.effectDuration << "\n Modification: " << modType << "\n detected Mod: " << HandlerEffectShow::enumToString(kindOfModification); @@ -338,7 +338,7 @@ void HandlerAesData::onExplosionClusterChanged(const AreaEffectSimulation::Explo } else { - m_AesDataObjMap.insert(data.id(), ifs); + m_AesDataObjMap.insert(data.id, ifs); m_mainHandler->handlerEffectShow()->onExplosionClusterChanged(data, kindOfModification); } break; @@ -357,15 +357,15 @@ void HandlerAesData::onExplosionClusterChanged(const AreaEffectSimulation::Explo ERROR_LOG(m_logger) << ret(); } else - WARNING_LOG(m_logger) << "Explosion Area not available for modification: " << data.id(); + WARNING_LOG(m_logger) << "Explosion Area not available for modification: " << data.id; break; } case HandlerEffectShow::KindOfModification_e::Removed: { if (ifs != nullptr) { - if (!m_AesDataObjMap.remove(data.id())) - ERROR_LOG(m_logger) << "Remove of AES data (" << data.id() << ") from map failed."; + if (!m_AesDataObjMap.remove(data.id)) + ERROR_LOG(m_logger) << "Remove of AES data (" << data.id << ") from map failed."; Core::FunctionReplyObject ret = ifs->removeObject(); if (ret.error()) @@ -384,25 +384,25 @@ void HandlerAesData::onExplosionClusterChanged(const AreaEffectSimulation::Explo void HandlerAesData::onEffectClusterChanged(const AreaEffectSimulation::EffectCluster &data, DataModification modType) { HandlerEffectShow::KindOfModification_e kindOfModification = HandlerEffectShow::KindOfModification_e::Removed; - if (takeIntoAccountEffectShow(data.effectStateId()) && data.effectMarkingInTa()) + if (takeIntoAccountEffectShow(data.effectStateId) && data.effectMarkingInTa) kindOfModification = getKindOfModification(ObjectAesData::asEsmAesData(data), modType); - ObjectAesData *ifs = m_AesDataObjMap.value(data.id()); + ObjectAesData *ifs = m_AesDataObjMap.value(data.id); if (kindOfModification == HandlerEffectShow::KindOfModification_e::Added && ifs) kindOfModification = HandlerEffectShow::KindOfModification_e::ModifiedData; - const Core::GeoPosition2D &posLl = data.area().cornerBottomLeft(); + const Core::GeoPosition2D &posLl = data.area.cornerBottomLeft; DEBUG_LOG(m_logger) << ">>>> Got EffectCluster: " - << "\n ID: " << data.id() - << "\n Name: " << data.name() - << "\n Effect status: " << data.effectStateId() - << "\n Effect show (y/n): " << data.effectMarkingInTa() - << "\n Lower left Pos: " << LtsCoordTrans::mgrsFromGeographic(posLl.lon(), posLl.lat()) - << "\n Width: " << data.area().width() - << "\n Height: " << data.area().height() - << "\n Rotation: " << data.area().rotation() - << "\n Start: " << data.effectStart() - << "\n Duration: " << data.effectDuration() + << "\n ID: " << data.id + << "\n Name: " << data.name + << "\n Effect status: " << data.effectStateId + << "\n Effect show (y/n): " << data.effectMarkingInTa + << "\n Lower left Pos: " << LtsCoordTrans::mgrsFromGeographic(posLl.lon, posLl.lat) + << "\n Width: " << data.area.width + << "\n Height: " << data.area.height + << "\n Rotation: " << data.area.rotation + << "\n Start: " << data.effectStart + << "\n Duration: " << data.effectDuration << "\n Modification: " << modType << "\n detected Mod: " << HandlerEffectShow::enumToString(kindOfModification); @@ -419,7 +419,7 @@ void HandlerAesData::onEffectClusterChanged(const AreaEffectSimulation::EffectCl } else { - m_AesDataObjMap.insert(data.id(), ifs); + m_AesDataObjMap.insert(data.id, ifs); m_mainHandler->handlerEffectShow()->onEffectClusterChanged(data, kindOfModification); } break; @@ -438,15 +438,15 @@ void HandlerAesData::onEffectClusterChanged(const AreaEffectSimulation::EffectCl ERROR_LOG(m_logger) << ret(); } else - WARNING_LOG(m_logger) << "Explosion Area not available for modification: " << data.id(); + WARNING_LOG(m_logger) << "Explosion Area not available for modification: " << data.id; break; } case HandlerEffectShow::KindOfModification_e::Removed: { if (ifs != nullptr) { - if (!m_AesDataObjMap.remove(data.id())) - ERROR_LOG(m_logger) << "Remove of AES data (" << data.id() << ") from map failed."; + if (!m_AesDataObjMap.remove(data.id)) + ERROR_LOG(m_logger) << "Remove of AES data (" << data.id << ") from map failed."; Core::FunctionReplyObject ret = ifs->removeObject(); if (ret.error()) @@ -466,26 +466,26 @@ void HandlerAesData::onEffectClusterChanged(const AreaEffectSimulation::EffectCl void HandlerAesData::onMineAreaChanged(const AreaEffectSimulation::MineArea &data, DataModification modType) { HandlerEffectShow::KindOfModification_e kindOfModification = HandlerEffectShow::KindOfModification_e::Removed; - if (takeIntoAccountEffectShow(data.effectStateId()) && data.effectMarkingInTa()) + if (takeIntoAccountEffectShow(data.effectStateId) && data.effectMarkingInTa) kindOfModification = getKindOfModification(ObjectAesData::asEsmAesData(data), modType); - ObjectAesData *ifs = m_AesDataObjMap.value(data.id()); + ObjectAesData *ifs = m_AesDataObjMap.value(data.id); if (kindOfModification == HandlerEffectShow::KindOfModification_e::Added && ifs) kindOfModification = HandlerEffectShow::KindOfModification_e::ModifiedData; - if (data.segments().size() == 0) + if (data.segments.size() == 0) return; - const Core::GeoPosition2D &posLl = data.segments().at(data.segments().size() / 2).positionStart(); + const Core::GeoPosition2D &posLl = data.segments.at(data.segments.size() / 2).positionStart; DEBUG_LOG(m_logger) << "Got MineArea: " - << "\n ID: " << data.id() - << "\n Name: " << data.name() - << "\n Effect status: " << data.effectStateId() - << "\n Effect show (y/n): " << data.effectMarkingInTa() - << "\n Start Position " << LtsCoordTrans::mgrsFromGeographic(posLl.lon(), posLl.lat()) - << "\n Start: " << data.effectStart() - << "\n Duration: " << data.effectDuration() - << "\n Num of segments: " << data.segments().size() + << "\n ID: " << data.id + << "\n Name: " << data.name + << "\n Effect status: " << data.effectStateId + << "\n Effect show (y/n): " << data.effectMarkingInTa + << "\n Start Position " << LtsCoordTrans::mgrsFromGeographic(posLl.lon, posLl.lat) + << "\n Start: " << data.effectStart + << "\n Duration: " << data.effectDuration + << "\n Num of segments: " << data.segments.size() << "\n Modification: " << modType << "\n detected Mod: " << HandlerEffectShow::enumToString(kindOfModification); @@ -502,7 +502,7 @@ void HandlerAesData::onMineAreaChanged(const AreaEffectSimulation::MineArea &dat } else { - m_AesDataObjMap.insert(data.id(), ifs); + m_AesDataObjMap.insert(data.id, ifs); m_mainHandler->handlerEffectShow()->onMineAreaChanged(data, kindOfModification); } break; @@ -521,15 +521,15 @@ void HandlerAesData::onMineAreaChanged(const AreaEffectSimulation::MineArea &dat ERROR_LOG(m_logger) << ret(); } else - WARNING_LOG(m_logger) << "Mine Area not available for modification: " << data.id(); + WARNING_LOG(m_logger) << "Mine Area not available for modification: " << data.id; break; } case HandlerEffectShow::KindOfModification_e::Removed: { if (ifs != nullptr) { - if (!m_AesDataObjMap.remove(data.id())) - ERROR_LOG(m_logger) << "Remove of AES data (" << data.id() << ") from map failed."; + if (!m_AesDataObjMap.remove(data.id)) + ERROR_LOG(m_logger) << "Remove of AES data (" << data.id << ") from map failed."; Core::FunctionReplyObject ret = ifs->removeObject(); if (ret.error()) diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowManagement/handler_effect_show.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowManagement/handler_effect_show.cpp index a00f694f3..d7c48ccf2 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowManagement/handler_effect_show.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowManagement/handler_effect_show.cpp @@ -90,20 +90,20 @@ void HandlerEffectShow::onExplosionAreaChanged(const AreaEffectSimulation::Explo break; case KindOfModification_e::ModifiedData: updateEffectShowsRelatedToExplosionArea(data); - updateEffectShowOrdersRelatedToAes(data.id()); + updateEffectShowOrdersRelatedToAes(data.id); break; case KindOfModification_e::Removed: - if(data.effectStateId() == AreaEffectSimulation::AesEffectState::EsRemoved) - removeEffectShowsRelatedToAes(data.id()); + if(data.effectStateId == AreaEffectSimulation::AesEffectState::EsRemoved) + removeEffectShowsRelatedToAes(data.id); break; case KindOfModification_e::Paused: updateEffectShowsRelatedToExplosionArea(data); - updateEffectShowOrdersRelatedToAes(data.id()); + updateEffectShowOrdersRelatedToAes(data.id); //pauseEffectShowsRelatedToAes(data.id()); break; case KindOfModification_e::Continued: updateEffectShowsRelatedToExplosionArea(data); - updateEffectShowOrdersRelatedToAes(data.id()); + updateEffectShowOrdersRelatedToAes(data.id); //continueEffectShowsRelatedToAes(data.id()); break; case KindOfModification_e::None: @@ -124,20 +124,20 @@ void HandlerEffectShow::onExplosionClusterChanged(const AreaEffectSimulation::Ex break; case KindOfModification_e::ModifiedData: updateEffectShowsRelatedToExplosionCluster(data); - updateEffectShowOrdersRelatedToAes(data.id()); + updateEffectShowOrdersRelatedToAes(data.id); break; case KindOfModification_e::Removed: - if(data.effectStateId() == AreaEffectSimulation::AesEffectState::EsRemoved) - removeEffectShowsRelatedToAes(data.id()); + if(data.effectStateId == AreaEffectSimulation::AesEffectState::EsRemoved) + removeEffectShowsRelatedToAes(data.id); break; case KindOfModification_e::Paused: updateEffectShowsRelatedToExplosionCluster(data); - updateEffectShowOrdersRelatedToAes(data.id()); + updateEffectShowOrdersRelatedToAes(data.id); //pauseEffectShowsRelatedToAes(data.id()); break; case KindOfModification_e::Continued: updateEffectShowsRelatedToExplosionCluster(data); - updateEffectShowOrdersRelatedToAes(data.id()); + updateEffectShowOrdersRelatedToAes(data.id); //continueEffectShowsRelatedToAes(data.id()); break; case KindOfModification_e::None: @@ -159,20 +159,20 @@ void HandlerEffectShow::onEffectClusterChanged(const AreaEffectSimulation::Effec break; case KindOfModification_e::ModifiedData: updateEffectShowsRelatedToEffectCluster(data); - updateEffectShowOrdersRelatedToAes(data.id()); + updateEffectShowOrdersRelatedToAes(data.id); break; case KindOfModification_e::Removed: - if(data.effectStateId() == AreaEffectSimulation::AesEffectState::EsRemoved) - removeEffectShowsRelatedToAes(data.id()); + if(data.effectStateId == AreaEffectSimulation::AesEffectState::EsRemoved) + removeEffectShowsRelatedToAes(data.id); break; case KindOfModification_e::Paused: updateEffectShowsRelatedToEffectCluster(data); - updateEffectShowOrdersRelatedToAes(data.id()); + updateEffectShowOrdersRelatedToAes(data.id); //pauseEffectShowsRelatedToAes(data.id()); break; case KindOfModification_e::Continued: updateEffectShowsRelatedToEffectCluster(data); - updateEffectShowOrdersRelatedToAes(data.id()); + updateEffectShowOrdersRelatedToAes(data.id); //continueEffectShowsRelatedToAes(data.id()); break; case KindOfModification_e::None: @@ -195,20 +195,20 @@ void HandlerEffectShow::onMineAreaChanged(const AreaEffectSimulation::MineArea & break; case KindOfModification_e::ModifiedData: updateEffectShowsRelatedToMineArea(data); - updateEffectShowOrdersRelatedToAes(data.id()); + updateEffectShowOrdersRelatedToAes(data.id); break; case KindOfModification_e::Removed: - if(data.effectStateId() == AreaEffectSimulation::AesEffectState::EsRemoved) - removeEffectShowsRelatedToAes(data.id()); + if(data.effectStateId == AreaEffectSimulation::AesEffectState::EsRemoved) + removeEffectShowsRelatedToAes(data.id); break; case KindOfModification_e::Paused: updateEffectShowsRelatedToMineArea(data); - updateEffectShowOrdersRelatedToAes(data.id()); + updateEffectShowOrdersRelatedToAes(data.id); // pauseEffectShowsRelatedToAes(data.id()); break; case KindOfModification_e::Continued: updateEffectShowsRelatedToMineArea(data); - updateEffectShowOrdersRelatedToAes(data.id()); + updateEffectShowOrdersRelatedToAes(data.id); //continueEffectShowsRelatedToAes(data.id()); break; case KindOfModification_e::None: @@ -231,21 +231,21 @@ void HandlerEffectShow::effectShowOrderConfirmationReceived(const ConvertFromTab // add confirmation data ifs->updateObject(orderConfirmation); - if (oldId != ifs->getData().orderConfirmation && ifs->getData().orderConfirmation == EffectShowManagement::OrderConfirmation_e::FiringReadiness) + if (oldId != ifs->getData().orderConfirmation && ifs->getData().orderConfirmation == static_cast(EffectShowManagement::OrderConfirmation_e::FiringReadiness)) { DEBUG_LOG(m_logger) << "effectShowOrderConfirmationReceived Got Fire Readyness, send to aes for " << ifs->getId(); AreaEffectSimulation::SetAesItemEffectorStateRequest req; - req.aesId(ifs->getIdAES()); - req.newEffectorState(AreaEffectSimulation::AesEffectorState::EsReadyToFire); - req.participantId(ifs->getData().esmParticipantId); + req.aesId = ifs->getIdAES(); + req.newEffectorState = AreaEffectSimulation::AesEffectorState::EsReadyToFire; + req.participantId = ifs->getData().esmParticipantId; m_mainHandler->dds()->ftcAes()->setAesItemEffectorStateRequest(req, this); } - switch (orderConfirmation.confirmation.underlying()) + switch (orderConfirmation.confirmation) { - case EffectShowManagement::OrderConfirmation_e_def::DriveOff: - case EffectShowManagement::OrderConfirmation_e_def::FiringReadiness: - case EffectShowManagement::OrderConfirmation_e_def::InterruptExecution: - case EffectShowManagement::OrderConfirmation_e_def::PositionReached: + case EffectShowManagement::OrderConfirmation_e::DriveOff: + case EffectShowManagement::OrderConfirmation_e::FiringReadiness: + case EffectShowManagement::OrderConfirmation_e::InterruptExecution: + case EffectShowManagement::OrderConfirmation_e::PositionReached: { triggerMeteoData(ifs); // send meteo data for effect show position break; @@ -277,10 +277,10 @@ void HandlerEffectShow::onEffectShowModifyRequest( const rti::core::SampleIdentity &cookie, const EffectShow &request) { - DEBUG_LOG(m_logger) << "onEffectShowModifyRequest: " << request.id(); - if (request.id() <= 0) + DEBUG_LOG(m_logger) << "onEffectShowModifyRequest: " << request.id; + if (request.id <= 0) { - ERROR_LOG(m_logger) << "Illegal Effect Show Id: " << request.id(); + ERROR_LOG(m_logger) << "Illegal Effect Show Id: " << request.id; return; } @@ -297,13 +297,13 @@ void HandlerEffectShow::onEffectShowModifyRequest( //------------------------------------------------------------------------------- Core::FunctionReplyObject HandlerEffectShow::effectShowModifyRequest(const EffectShow &request) { - ObjectEffectShow *ifs = m_effectShowObjMap.value(request.id()); + ObjectEffectShow *ifs = m_effectShowObjMap.value(request.id); if (ifs == nullptr) - return Core::FunctionReplyObject(request.id(), tr_lts("dds", "EffectShow with id %1 not found")).arg(request.id()); + return Core::FunctionReplyObject(request.id, tr_lts("dds", "EffectShow with id %1 not found")).arg(request.id); Core::FunctionReplyObject ret; auto idCurrent = ifs->getData().esmParticipantId; - if ((idCurrent != -1) && (request.esmParticipantId() != idCurrent)) + if ((idCurrent != -1) && (request.esmParticipantId != idCurrent)) { triggerRetractOrder(ifs); // trigger retract order to current effect show actor, if needed ret = ifs->updateObject(request); // update effect show @@ -327,24 +327,24 @@ Core::FunctionReplyObject HandlerEffectShow::effectShowModifyRequest(const Effec void HandlerEffectShow::onEffectShowRemoveRequest(const rti::core::SampleIdentity &cookie, const Core::RemoveElementRequest &request) { - DEBUG_LOG(m_logger) << "onEffectShowRemoveRequest: " << request.id(); + DEBUG_LOG(m_logger) << "onEffectShowRemoveRequest: " << request.id; - ObjectEffectShow *ifs = m_effectShowObjMap.value(request.id()); + ObjectEffectShow *ifs = m_effectShowObjMap.value(request.id); Core::FunctionReplyObject ret; if (ifs == nullptr) { - ret = Core::FunctionReplyObject(request.id(), tr_lts("dds", "EffectShow id %1 is not valid")).arg(request.id()); + ret = Core::FunctionReplyObject(request.id, tr_lts("dds", "EffectShow id %1 is not valid")).arg(request.id); m_mainHandler->dds()->fts()->effectShowRemoveReply(cookie, ret); return; } EffectShowManagement::EffectShow ddsData; - ddsData.id(ifs->getId()); + ddsData.id = ifs->getId(); if (m_mainHandler->dds()->topicLockMaster()->isLocked(ddsData, m_mainHandler->exerciseId())) { - ret = Core::FunctionReplyObject(request.id(), tr_lts("dds", "EffectShow '%1' is used by another user!")).arg(ifs->getName()); + ret = Core::FunctionReplyObject(request.id, tr_lts("dds", "EffectShow '%1' is used by another user!")).arg(ifs->getName()); m_mainHandler->dds()->fts()->effectShowRemoveReply(cookie, ret); return; } @@ -431,7 +431,7 @@ QVector HandlerEffectShow::createEffectShowDbDataRelate EffectShowExplosionArea effectShowExplosionArea(data, m_mainHandler->handlerPdmData()); - if (m_mainHandler->handlerPdmData()->isSmoke(data.chargeStruct())) + if (m_mainHandler->handlerPdmData()->isSmoke(data.chargeStruct)) { //create exact 1 ret.reserve(1); @@ -479,13 +479,13 @@ QVector HandlerEffectShow::createEffectShowDbDataRelate EffectShowExplosionCluster effectShowExplosionCluster(data, m_mainHandler->handlerPdmData()); QVector ret; - if (m_mainHandler->handlerPdmData()->isSmoke(data.chargeStruct())) + if (m_mainHandler->handlerPdmData()->isSmoke(data.chargeStruct)) { //create exact 1 ret.reserve(1); Database::EsmEffectShow esmEffectShow = effectShowExplosionCluster.getEffectShow(0); - if(data.esmParticipantIds().size() > 0) - esmEffectShow.esmParticipantId = data.esmParticipantIds().at(0); // TODO handle vector + if(data.esmParticipantIds.size() > 0) + esmEffectShow.esmParticipantId = data.esmParticipantIds.at(0); // TODO handle vector DEBUG_LOG(m_logger) << toString(esmEffectShow); ret.push_back(std::move(esmEffectShow)); } @@ -519,8 +519,8 @@ QVector HandlerEffectShow::createEffectShowDbDataRelate DEBUG_LOG(m_logger) << toString(esmEffectShow); // Evlt. nicht bei DM42 (dann ist max > 1) - if(data.esmParticipantIds().size() > 0) - esmEffectShow.esmParticipantId = data.esmParticipantIds().at(0); // TODO handle vector + if(data.esmParticipantIds.size() > 0) + esmEffectShow.esmParticipantId = data.esmParticipantIds.at(0); // TODO handle vector ret.push_back(std::move(esmEffectShow)); } } @@ -532,13 +532,13 @@ QVector HandlerEffectShow::createEffectShowDbDataRelate EffectShowEffectCluster effectShowEffectCluster(data, m_mainHandler->handlerPdmData()); QVector ret; - if (m_mainHandler->handlerPdmData()->isSmoke(data.chargeStruct())) + if (m_mainHandler->handlerPdmData()->isSmoke(data.chargeStruct)) { //create exact 1 ret.reserve(1); Database::EsmEffectShow esmEffectShow = effectShowEffectCluster.getEffectShow(0); - if(data.esmParticipantIds().size() > 0) - esmEffectShow.esmParticipantId = data.esmParticipantIds().at(0); // TODO handle vector + if(data.esmParticipantIds.size() > 0) + esmEffectShow.esmParticipantId = data.esmParticipantIds.at(0); // TODO handle vector DEBUG_LOG(m_logger) << toString(esmEffectShow); ret.push_back(std::move(esmEffectShow)); } @@ -572,8 +572,8 @@ QVector HandlerEffectShow::createEffectShowDbDataRelate //DEBUG_LOG(m_logger) << toString(esmEffectShow); // Evlt. nicht bei DM42 (dann ist max > 1) - if(data.esmParticipantIds().size() > (size_t)i) - esmEffectShow.esmParticipantId = data.esmParticipantIds().at(i); // TODO handle vector + if(data.esmParticipantIds.size() > (size_t)i) + esmEffectShow.esmParticipantId = data.esmParticipantIds.at(i); // TODO handle vector DEBUG_LOG(m_logger) << toString(esmEffectShow); ret.push_back(std::move(esmEffectShow)); @@ -591,8 +591,8 @@ void HandlerEffectShow::removeEffectShowsRelatedToAes(int idAes, bool retract) bool remove = false; if (it.value()->getIdAES() == idAes) { - if ((it.value()->getData().orderConfirmation != EffectShowManagement::OrderConfirmation_e_def::Execution) && - (it.value()->getData().orderConfirmation != EffectShowManagement::OrderConfirmation_e_def::OrderCarriedOut)) + if ((it.value()->getData().orderConfirmation != static_cast(EffectShowManagement::OrderConfirmation_e::Execution))) && + (it.value()->getData().orderConfirmation != static_cast(EffectShowManagement::OrderConfirmation_e::OrderCarriedOut)) remove = true; else INFO_LOG(m_logger) << "Effect Show: " << it.value()->getId() << " not removed due to EXECUTION / ORDER CARRIED OUT"; @@ -612,7 +612,7 @@ void HandlerEffectShow::updateEffectShowsRelatedToMineArea(const AreaEffectSimul { for (ObjectEffectShow *obj : qAsConst(m_effectShowObjMap)) { - if (obj->getIdAES() == data.id()) + if (obj->getIdAES() == data.id) { Database::EsmEffectShow esmEffectShow = obj->getData(); EffectShowMineArea effectShowMineArea(data); @@ -626,7 +626,7 @@ void HandlerEffectShow::updateEffectShowsRelatedToExplosionArea(const AreaEffect { for (ObjectEffectShow *obj : qAsConst(m_effectShowObjMap)) { - if (obj->getIdAES() == data.id()) + if (obj->getIdAES() == data.id) { Database::EsmEffectShow esmEffectShow = obj->getData(); EffectShowExplosionArea effectShowExplosionArea(data, m_mainHandler->handlerPdmData()); @@ -640,7 +640,7 @@ void HandlerEffectShow::updateEffectShowsRelatedToExplosionCluster(const AreaEff { for (ObjectEffectShow *obj : qAsConst(m_effectShowObjMap)) { - if (obj->getIdAES() == data.id()) + if (obj->getIdAES() == data.id) { Database::EsmEffectShow esmEffectShow = obj->getData(); EffectShowExplosionCluster effectShowExplosionCluster(data, m_mainHandler->handlerPdmData()); @@ -654,7 +654,7 @@ void HandlerEffectShow::updateEffectShowsRelatedToEffectCluster(const AreaEffect { for (ObjectEffectShow *obj : qAsConst(m_effectShowObjMap)) { - if (obj->getIdAES() == data.id()) + if (obj->getIdAES() == data.id) { Database::EsmEffectShow esmEffectShow = obj->getData(); EffectShowEffectCluster effectShowEffectCluster(data, m_mainHandler->handlerPdmData()); @@ -677,22 +677,22 @@ void HandlerEffectShow::modifyEffectShowsRelatedToMineArea(const AreaEffectSimul { // even there can currently only be one object we use the same logic as for // modifyEffectShowsRelatedToExplosionArea for convenience - modifyEffectShows(createEffectShowDbDataRelatedToMineArea(data), data.id()); + modifyEffectShows(createEffectShowDbDataRelatedToMineArea(data), data.id); } //------------------------------------------------------------------------------- void HandlerEffectShow::modifyEffectShowsRelatedToExplosionArea(const AreaEffectSimulation::ExplosionArea &data) { - modifyEffectShows(createEffectShowDbDataRelatedToExplosionArea(data), data.id()); + modifyEffectShows(createEffectShowDbDataRelatedToExplosionArea(data), data.id); } void HandlerEffectShow::modifyEffectShowsRelatedToExplosionCluster(const AreaEffectSimulation::ExplosionCluster &data) { - modifyEffectShows(createEffectShowDbDataRelatedToExplosionCluster(data), data.id()); + modifyEffectShows(createEffectShowDbDataRelatedToExplosionCluster(data), data.id); } void HandlerEffectShow::modifyEffectShowsRelatedToEffectCluster(const AreaEffectSimulation::EffectCluster &data) { - modifyEffectShows(createEffectShowDbDataRelatedToEffectCluster(data), data.id()); + modifyEffectShows(createEffectShowDbDataRelatedToEffectCluster(data), data.id); } //------------------------------------------------------------------------------- @@ -821,7 +821,7 @@ void HandlerEffectShow::triggerRetractOrder(const ObjectEffectShow *ifs) << ", actor: " << effectShow.esmParticipantId; if (effectShow.esmParticipantId == -1) return; // up to now no actor allocated - if (effectShow.orderConfirmation >= EffectShowManagement::OrderConfirmation_e_def::OrderCarriedOut) + if (effectShow.orderConfirmation >= static_cast(EffectShowManagement::OrderConfirmation_e::OrderCarriedOut)) return; // order obsolete // trigger retract order @@ -866,7 +866,7 @@ void HandlerEffectShow::triggerMeteoData(const ObjectEffectShow *ifs) MeteoDataManagement::MeteoData meteoData; if (m_mainHandler->handlerMdmData()->getNearestWeather(pos, meteoData)) { - if (!meteoData.windOk() && !meteoData.climateOk()) + if (!meteoData.windOk && !meteoData.climateOk) { WARNING_LOG(m_logger) << "Found MeteoStation but no weather Data available, try again in 1 minute"; QTimer::singleShot(6000, this, &HandlerEffectShow::onSendMeteoData); @@ -877,7 +877,7 @@ void HandlerEffectShow::triggerMeteoData(const ObjectEffectShow *ifs) m_mainHandler->handlerTabData()->meteoData(equipmentNumber, effectShow.esmParticipantId, meteoData); // meteo data available - qint64 deltaTime = m_mainHandler->dds()->currentPartitionTime() - meteoData.timeStamp(); + qint64 deltaTime = m_mainHandler->dds()->currentPartitionTime() - meteoData.timeStamp; if (deltaTime > (60 * 15 * 1000)) WARNING_LOG(m_logger) << "Age of meteo data=" << (deltaTime / 60000) << "min for vehicle: " << equipmentNumber; } @@ -897,8 +897,8 @@ void HandlerEffectShow::onSendMeteoData() if (effectShow.esmParticipantId == -1) continue; // no actor allocated - if ((effectShow.orderConfirmation < EffectShowManagement::OrderConfirmation_e_def::DriveOff) || - (effectShow.orderConfirmation >= EffectShowManagement::OrderConfirmation_e_def::OrderCarriedOut)) + if ((effectShow.orderConfirmation < static_cast(EffectShowManagement::OrderConfirmation_e::DriveOff))) || + (effectShow.orderConfirmation >= static_cast(EffectShowManagement::OrderConfirmation_e::OrderCarriedOut)) continue; // effect show not processed triggerMeteoData(obj); @@ -912,7 +912,7 @@ void HandlerEffectShow::onCleanUp() for (ObjectEffectShow *obj : qAsConst(m_effectShowObjMap)) { const Database::EsmEffectShow &effectShow = obj->getData(); - if (effectShow.orderConfirmation == OrderConfirmation_e::OrderCarriedOut || effectShow.startTime <= 0 || effectShow.id <= 0) + if (effectShow.orderConfirmation == static_cast(OrderConfirmation_e::OrderCarriedOut) || effectShow.startTime <= 0 || effectShow.id <= 0) continue; DEBUG_LOG(m_logger) << "Effect show with ID " << effectShow.id << " will expire at: " << QDateTime::fromMSecsSinceEpoch(effectShow.startTime + effectShow.duration + CLEANUPTIME).toString() << " current time: " << QDateTime::fromMSecsSinceEpoch(m_mainHandler->dds()->currentPartitionTime()).toString(); diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowManagement/handler_effect_show_actor_relocation.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowManagement/handler_effect_show_actor_relocation.cpp index 156d87483..45bf9e835 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowManagement/handler_effect_show_actor_relocation.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowManagement/handler_effect_show_actor_relocation.cpp @@ -75,7 +75,7 @@ void HandlerEffectShowActorRelocation::relocationOrderConfirmationReceived(const // add confirmation data auto data = ifs->getData(); - data.orderConfirmation = orderConfirmation.confirmation.underlying(); + data.orderConfirmation = orderConfirmation.confirmation; data.answertText = orderConfirmation.answerText; ifs->updateObject(data); } @@ -84,8 +84,8 @@ void HandlerEffectShowActorRelocation::onEffectShowActorRelocationModifyRequest( const rti::core::SampleIdentity &cookie, const EffectShowActorRelocation &request) { - DEBUG_LOG(m_logger) << "onEffectShowActorRelocationModifyRequest: " << request.id(); - auto ret = request.id() > 0 ? effectShowActorRelocationModifyRequest(request) : effectShowActorRelocationCreateRequest(request); + DEBUG_LOG(m_logger) << "onEffectShowActorRelocationModifyRequest: " << request.id; + auto ret = request.id > 0 ? effectShowActorRelocationModifyRequest(request) : effectShowActorRelocationCreateRequest(request); if (ret.error()) WARNING_LOG(m_logger) << ret(); m_mainHandler->dds()->fts()->effectShowActorRelocationModifyReply(cookie, ret); @@ -114,32 +114,32 @@ Core::FunctionReplyObject HandlerEffectShowActorRelocation::effectShowActorReloc //----------------------------------------------------------------------------- Core::FunctionReplyObject HandlerEffectShowActorRelocation::effectShowActorRelocationModifyRequest(const EffectShowActorRelocation &request) { - ObjectEffectShowActorRelocation *ifs = m_effectShowActorRelocationObjMap.value(request.id()); + ObjectEffectShowActorRelocation *ifs = m_effectShowActorRelocationObjMap.value(request.id); if (ifs == nullptr) - return Core::FunctionReplyObject(request.id(), tr_lts("dds", "EffectShowActorRelocation with id %1 not found")).arg(request.id()); + return Core::FunctionReplyObject(request.id, tr_lts("dds", "EffectShowActorRelocation with id %1 not found")).arg(request.id); return ifs->updateObject(ObjectEffectShowActorRelocation::ddsToDb(request)); } //----------------------------------------------------------------------------- void HandlerEffectShowActorRelocation::onEffectShowActorRelocationRemoveRequest(const rti::core::SampleIdentity &cookie, const Core::RemoveElementRequest &request) { - DEBUG_LOG(m_logger) << "onEffectShowActorRelocationRemoveRequest: " << request.id(); + DEBUG_LOG(m_logger) << "onEffectShowActorRelocationRemoveRequest: " << request.id; Core::FunctionReplyObject ret; - ObjectEffectShowActorRelocation *ifs = m_effectShowActorRelocationObjMap.value(request.id()); + ObjectEffectShowActorRelocation *ifs = m_effectShowActorRelocationObjMap.value(request.id); if (!ifs) { - ret = Core::FunctionReplyObject(request.id(), tr_lts("dds", "'%1' with id %2 not found")).arg(QStringLiteral("HandlerEffectShowActorRelocation")).arg(request.id());; + ret = Core::FunctionReplyObject(request.id, tr_lts("dds", "'%1' with id %2 not found")).arg(QStringLiteral("HandlerEffectShowActorRelocation")).arg(request.id);; m_mainHandler->dds()->fts()->effectShowActorRelocationRemoveReply(cookie, ret); return; } EffectShowActorRelocation ddsData; - ddsData.id(request.id()); + ddsData.id = request.id; if (m_mainHandler->dds()->topicLockMaster()->isLocked(ddsData, m_mainHandler->exerciseId())) { - ret = Core::FunctionReplyObject(request.id(), tr_lts("dds", "EffectShowActorRelocation '%1' is used by another user!")).arg(ifs->getId()); + ret = Core::FunctionReplyObject(request.id, tr_lts("dds", "EffectShowActorRelocation '%1' is used by another user!")).arg(ifs->getId()); m_mainHandler->dds()->fts()->effectShowActorRelocationRemoveReply(cookie, ret); return; } @@ -156,7 +156,7 @@ void HandlerEffectShowActorRelocation::onEffectShowActorRelocationRemoveRequest( // remove from map delete ifs; - m_effectShowActorRelocationObjMap.remove(request.id()); + m_effectShowActorRelocationObjMap.remove(request.id); } m_mainHandler->dds()->fts()->effectShowActorRelocationRemoveReply(cookie, ret); diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowManagement/handler_mdm_data.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowManagement/handler_mdm_data.cpp index 8935f0488..4309438cd 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowManagement/handler_mdm_data.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowManagement/handler_mdm_data.cpp @@ -45,16 +45,16 @@ bool HandlerMdmData::init() bool HandlerMdmData::getNearestWeather(const Core::GeoPosition2D &pos, MeteoDataManagement::MeteoData &data) const { - const LtsCoordTrans::UtmCoordinate utm(LtsCoordTrans::UtmCoordinate::fromGeographic(pos.lon(), pos.lat())); + const LtsCoordTrans::UtmCoordinate utm(LtsCoordTrans::UtmCoordinate::fromGeographic(pos.lon, pos.lat)); double nearestDistanceSquared = std::numeric_limits::max(); bool found = false; for (const auto &md : qAsConst(m_meteoData)) { - if (md.isStaticMeteoData()) + if (md.isStaticMeteoData) continue; - const double distanceSquared = LtsCoordTrans::squareDistance(utm, md.pos().lon(), md.pos().lat()); + const double distanceSquared = LtsCoordTrans::squareDistance(utm, md.pos.lon, md.pos.lat); if (distanceSquared < nearestDistanceSquared) { @@ -71,11 +71,11 @@ void HandlerMdmData::onMeteoDataChanged(const MeteoDataManagement::MeteoData &da switch (modType) { case DataModification::eRemoved: - m_meteoData.remove(data.id()); + m_meteoData.remove(data.id); break; case DataModification::eAdded: case DataModification::eModified: - m_meteoData[data.id()] = data; + m_meteoData[data.id] = data; break; } } diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowManagement/handler_pdm_data.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowManagement/handler_pdm_data.cpp index 3494bb52c..a5139b989 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowManagement/handler_pdm_data.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowManagement/handler_pdm_data.cpp @@ -26,12 +26,12 @@ HandlerPdmData::HandlerPdmData(const std::shared_ptr &ddsHandler, bool HandlerPdmData::isSmoke(const AreaEffectSimulation::ChargeStruct &chargeStruct) const { - return m_ddsHandler->dtcPdm()->isSmoke(chargeStruct.chargeTypeId(), chargeStruct.igniterTypeId(), chargeStruct.igniterFunctionId()); + return m_ddsHandler->dtcPdm()->isSmoke(chargeStruct.chargeTypeId, chargeStruct.igniterTypeId, chargeStruct.igniterFunctionId); } // end of isSmoke() int HandlerPdmData::effectShowCount(const AreaEffectSimulation::ChargeStruct &chargeStruct) const { - return m_ddsHandler->dtcPdm()->maxEffectShows(chargeStruct.chargeTypeId(), chargeStruct.igniterTypeId(), chargeStruct.igniterFunctionId()); + return m_ddsHandler->dtcPdm()->maxEffectShows(chargeStruct.chargeTypeId, chargeStruct.igniterTypeId, chargeStruct.igniterFunctionId); } int HandlerPdmData::getCadence(const int chargeId) const diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowManagement/handler_ppm_data.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowManagement/handler_ppm_data.cpp index ceaf8ad3c..e8e2fa154 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowManagement/handler_ppm_data.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowManagement/handler_ppm_data.cpp @@ -78,9 +78,9 @@ void HandlerPpmData::onParticipantChanged(const ParticipantManagement::Participa if (modType != DataModification::eRemoved) { auto m_ppmDtc = m_mainHandler->dds()->dtcPpm(); - ParticipantManagement::TypeClass typeClass = m_ppmDtc->type(data.typeId()).typeClass(); + ParticipantManagement::TypeClass typeClass = m_ppmDtc->type(data.typeId).typeClass; DEBUG_LOG(m_logger) << "support entity / equipment number set " << (typeClass == ParticipantManagement::TypeClass::SupportEntity) - << " / " << data.equipmentNumber().is_set() << ", typeId: " << data.typeId() + << " / " << data.equipmentNumber.is_set() << ", typeId: " << data.typeId << ", cnt: " << m_ppmDtc->types().size(); if (typeClass != ParticipantManagement::TypeClass::SupportEntity) @@ -91,7 +91,7 @@ void HandlerPpmData::onParticipantChanged(const ParticipantManagement::Participa else { // does not exists or has no longer an equipment number -> remove - if (!data.equipmentNumber().is_set()) + if (!data.equipmentNumber.is_set()) modType = DataModification::eRemoved; } @@ -102,7 +102,7 @@ void HandlerPpmData::onParticipantChanged(const ParticipantManagement::Participa case DataModification::eAdded: case DataModification::eModified: { - auto &val = m_participant[data.id()]; + auto &val = m_participant[data.id]; val = Participant_t(data); m_mainHandler->handlerEffectShowVehicleStatus()->effectShowActorChanged(val, modType); break; @@ -110,17 +110,17 @@ void HandlerPpmData::onParticipantChanged(const ParticipantManagement::Participa case DataModification::eRemoved: { // remove if participant exists - auto it = m_participant.constFind(data.id()); + auto it = m_participant.constFind(data.id); if (it != m_participant.constEnd()) { m_mainHandler->handlerEffectShowVehicleStatus()->effectShowActorChanged(it.value(), modType); - m_participant.remove(data.id()); + m_participant.remove(data.id); } break; } } - DEBUG_LOG(m_logger) << "onParticipantChanged: " << data.id() << ' ' << data.name() << ' ' << modType; + DEBUG_LOG(m_logger) << "onParticipantChanged: " << data.id << ' ' << data.name << ' ' << modType; } // end of onParticipantChanged() diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowManagement/handler_ppm_data.h b/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowManagement/handler_ppm_data.h index c7624f62a..78b07eb62 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowManagement/handler_ppm_data.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowManagement/handler_ppm_data.h @@ -42,9 +42,9 @@ public: { Participant_t() = default; explicit Participant_t(const ParticipantManagement::Participant &data) - : id(data.id()) - , equipmentNumber(data.equipmentNumber().is_set() ? data.equipmentNumber().get() : 0) - , name(QString::fromStdString(data.name())) + : id(data.id) + , equipmentNumber(data.equipmentNumber.is_set() ? data.equipmentNumber.get() : 0) + , name(QString::fromStdString(data.name)) {} int id = -1; diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowManagement/handler_tab_data.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowManagement/handler_tab_data.cpp index 0f3d53ba3..82588ab84 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowManagement/handler_tab_data.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowManagement/handler_tab_data.cpp @@ -63,9 +63,9 @@ void HandlerTabData::effectShowVehicleStatusRequest(int equipmentNumber, int par DEBUG_LOG(m_logger) << "Trigger Status Request " << equipmentNumber << ' ' << participantId; TrainingAreaBase::SendFireSmokeMarkerDataRequest out; - out.equipmentNumber(equipmentNumber); - out.participantId(participantId); - out.payload(ConvertToTab::convertStatusRequest()); + out.equipmentNumber = equipmentNumber; + out.participantId = participantId; + out.payload = ConvertToTab::convertStatusRequest(); m_mainHandler->dds()->ftcTab()->sendFireSmokeMarkerDataRequest(out, this); } // end of onVehicleStatusStatusRequest() @@ -75,9 +75,9 @@ void HandlerTabData::relocationOrder(int equipmentNumber, int participantId, con DEBUG_LOG(m_logger) << "Trigger Relocation Order " << equipmentNumber << ' ' << participantId; TrainingAreaBase::SendFireSmokeMarkerDataRequest out; - out.equipmentNumber(equipmentNumber); - out.participantId(participantId); - out.payload(ConvertToTab::convertRelocationOrder(relocationOrder)); + out.equipmentNumber = equipmentNumber; + out.participantId = participantId; + out.payload = ConvertToTab::convertRelocationOrder(relocationOrder); m_mainHandler->dds()->ftcTab()->sendFireSmokeMarkerDataRequest(out, this); } // end of relocationOrder() //============================================================================= @@ -85,26 +85,26 @@ void HandlerTabData::effectShowOrder(int equipmentNumber, int participantId, con { TrainingAreaBase::SendFireSmokeMarkerDataRequest out; - out.equipmentNumber(equipmentNumber); - out.participantId(participantId); - out.payload(ConvertToTab::convertEffectShowOrder(effectShowOrder)); + out.equipmentNumber = equipmentNumber; + out.participantId = participantId; + out.payload = ConvertToTab::convertEffectShowOrder(effectShowOrder); Core::GeoPosition2D posCenter = effectShowOrder.centerPosition; Core::GeoPosition2D posLl = effectShowOrder.lowerLeftPosition; DEBUG_LOG(m_logger) << "Trigger Effect Show Order " << equipmentNumber << ' ' << participantId << "\n idEffectShow " << effectShowOrder.idEffectShow << "\n startTime " << effectShowOrder.startTime - << "\n centerPosition " << LtsCoordTrans::mgrsFromGeographic(posCenter.lon(), posCenter.lat()) + << "\n centerPosition " << LtsCoordTrans::mgrsFromGeographic(posCenter.lon, posCenter.lat) << "\n areaDepth " << effectShowOrder.areaDepth << "\n areaWidth " << effectShowOrder.areaWidth << "\n rotation " << effectShowOrder.rotation - << "\n lowerLeftPosition " << LtsCoordTrans::mgrsFromGeographic(posLl.lon(), posLl.lat()) + << "\n lowerLeftPosition " << LtsCoordTrans::mgrsFromGeographic(posLl.lon, posLl.lat) << "\n numOfVolley " << int(effectShowOrder.numOfVolley) << "\n shotsPerVolley " << int(effectShowOrder.shotsPerVolley) << "\n typeOfAmmunition " << int(effectShowOrder.typeOfAmmunition) << "\n duration " << effectShowOrder.duration << "\n name " << effectShowOrder.name - << "\n payload" << plText(out.payload()); + << "\n payload" << plText(out.payload); m_mainHandler->dds()->ftcTab()->sendFireSmokeMarkerDataRequest(out, this); } // end of effetShowOrder() @@ -114,9 +114,9 @@ void HandlerTabData::effectShowStop(int equipmentNumber, int participantId, cons DEBUG_LOG(m_logger) << "Trigger Effect Show Stop " << equipmentNumber << ' ' << participantId; TrainingAreaBase::SendFireSmokeMarkerDataRequest out; - out.equipmentNumber(equipmentNumber); - out.participantId(participantId); - out.payload(ConvertToTab::convertEffectShowStop(idEffectShow)); + out.equipmentNumber = equipmentNumber; + out.participantId = participantId; + out.payload = ConvertToTab::convertEffectShowStop(idEffectShow); m_mainHandler->dds()->ftcTab()->sendFireSmokeMarkerDataRequest(out, this); } // end of effectShowStop() //============================================================================= @@ -124,14 +124,14 @@ void HandlerTabData::effectShowContinue(int equipmentNumber, int participantId, { TrainingAreaBase::SendFireSmokeMarkerDataRequest out; - out.equipmentNumber(equipmentNumber); - out.participantId(participantId); - out.payload(ConvertToTab::convertEffectShowContinue(effectShowContinue)); + out.equipmentNumber = equipmentNumber; + out.participantId = participantId; + out.payload = ConvertToTab::convertEffectShowContinue(effectShowContinue); DEBUG_LOG(m_logger) << "Trigger Effect Show Continue " << equipmentNumber << ' ' << participantId << "\n idEffectShow " << effectShowContinue.idEffectShow << "\n executionTime " << effectShowContinue.executionTime - << "\n payload" << plText(out.payload()); + << "\n payload" << plText(out.payload); m_mainHandler->dds()->ftcTab()->sendFireSmokeMarkerDataRequest(out, this); } // end of effectShowContinue() @@ -140,14 +140,14 @@ void HandlerTabData::retractOrder(int equipmentNumber, int participantId, const { TrainingAreaBase::SendFireSmokeMarkerDataRequest out; - out.equipmentNumber(equipmentNumber); - out.participantId(participantId); - out.payload(ConvertToTab::convertOrderRetract(retractOrder)); + out.equipmentNumber = equipmentNumber; + out.participantId = participantId; + out.payload = ConvertToTab::convertOrderRetract(retractOrder); DEBUG_LOG(m_logger) << "Trigger Retract Order " << equipmentNumber << ' ' << participantId << "\n orderType " << retractOrder.orderType << "\n id " << retractOrder.id - << "\n payload" << plText(out.payload()); + << "\n payload" << plText(out.payload); m_mainHandler->dds()->ftcTab()->sendFireSmokeMarkerDataRequest(out, this); } // end of retractOrder() @@ -155,16 +155,16 @@ void HandlerTabData::retractOrder(int equipmentNumber, int participantId, const void HandlerTabData::meteoData(int equipmentNumber, int participantId, const MeteoDataManagement::MeteoData &meteoData) { TrainingAreaBase::SendFireSmokeMarkerDataRequest out; - out.equipmentNumber(equipmentNumber); - out.participantId(participantId); - out.payload(ConvertToTab::convertMeteoData(meteoData)); + out.equipmentNumber = equipmentNumber; + out.participantId = participantId; + out.payload = ConvertToTab::convertMeteoData(meteoData); DEBUG_LOG(m_logger) << "Trigger Meteo data " << equipmentNumber << ' ' << participantId - << "\n temperature " << meteoData.temperature() - << "\n humidity " << meteoData.humidity() - << "\n pressure " << meteoData.pressure() - << "\n windDirection " << meteoData.windDirection() - << "\n payload" << plText(out.payload()); + << "\n temperature " << meteoData.temperature + << "\n humidity " << meteoData.humidity + << "\n pressure " << meteoData.pressure + << "\n windDirection " << meteoData.windDirection + << "\n payload" << plText(out.payload); m_mainHandler->dds()->ftcTab()->sendFireSmokeMarkerDataRequest(out, this); } // end of @@ -182,7 +182,7 @@ void HandlerTabData::onFireSmokeMarkerDataChanged(const TrainingAreaBase::FireSm if (modType == DataModification::eRemoved) return; - DEBUG_LOG(m_logger) << "Got Fire Smoke Marker " << data.sampleTime(); + DEBUG_LOG(m_logger) << "Got Fire Smoke Marker " << data.sampleTime; switch (ConvertFromTab::isTelegram(data)) { case ConvertFromTab::RxTelegram_e::VehicleStatus: @@ -225,7 +225,7 @@ void HandlerTabData::onFireSmokeMarkerDataChanged(const TrainingAreaBase::FireSm //----------------------------------------------------------------------------- void HandlerTabData::publishVehicleStatus(const EffectShowManagement::EffectShowVehicleStatus &vehicleStatus) { - DEBUG_LOG(m_logger) << "Vehicle Status published esmParticipantId: " << vehicleStatus.esmParticipantId() << ' ' << vehicleStatus.operational(); + DEBUG_LOG(m_logger) << "Vehicle Status published esmParticipantId: " << vehicleStatus.esmParticipantId << ' ' << vehicleStatus.operational; m_mainHandler->dds()->dts()->publish(vehicleStatus); } // end of publishVehicleStatus() //----------------------------------------------------------------------------- @@ -235,7 +235,7 @@ void HandlerTabData::sendAdlerFqFb(const int aesId) DEBUG_LOG(m_logger) << "Send Adler Feuerbereitschaft"; TrainingAreaBase::AdlerFqFbRequest out; - out.aesItemId(aesId); + out.aesItemId = aesId; m_mainHandler->dds()->ftcTab()->adlerFqFbRequest(out, this); } //============================================================================= diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowManagement/object_aes_data.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowManagement/object_aes_data.cpp index e34d32a4c..1d823d8fe 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowManagement/object_aes_data.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowManagement/object_aes_data.cpp @@ -76,77 +76,77 @@ bool ObjectAesData::dataChanged(const Database::EsmAesData &data) const DEBUG_LOG(m_logger) << "Data Volley: " << data.volley << " old: " << m_data.volley; return (m_data.chargeTypeId != data.chargeTypeId) || (m_data.effectStart != data.effectStart) - || (m_data.effectStateId == AreaEffectSimulation::AesEffectState::EsFired) + || (m_data.effectStateId == static_cast(AreaEffectSimulation::AesEffectState::EsFired)) || (m_data.effectDuration != data.effectDuration); } //============================================================================= bool ObjectAesData::statusPaused(const Database::EsmAesData &data) const { - return (m_data.effectStateId != AreaEffectSimulation::AesEffectState_def::EsPaused) && - (data.effectStateId == AreaEffectSimulation::AesEffectState_def::EsPaused); + return (m_data.effectStateId != static_cast(AreaEffectSimulation::AesEffectState::EsPaused)) && + (data.effectStateId == static_cast(AreaEffectSimulation::AesEffectState::EsPaused)); } //============================================================================= bool ObjectAesData::statusContinued(const Database::EsmAesData &data) const { - return (data.effectStateId == AreaEffectSimulation::AesEffectState_def::EsActivated) && + return (data.effectStateId == static_cast(AreaEffectSimulation::AesEffectState::EsActivated)) && (m_data.effectStart != data.effectStart); // false, if the scheduled start time reached } bool ObjectAesData::statusExpired(const Database::EsmAesData &data) const { - return (data.effectStateId == AreaEffectSimulation::AesEffectState_def::EsExpired); + return (data.effectStateId == static_cast(AreaEffectSimulation::AesEffectState::EsExpired)); } //============================================================================= Database::EsmAesData ObjectAesData::asEsmAesData(const AreaEffectSimulation::ExplosionArea &data) { Database::EsmAesData res; - res.idAes = data.id(); - res.nameAes = QString::fromStdString(data.name()); - res.effectStateId = data.effectStateId().underlying(); - res.position = QPointF(data.area().cornerBottomLeft().lon(), data.area().cornerBottomLeft().lat()); - res.rotationAngle = data.area().rotation(); - res.depth = data.area().height(); - res.width = data.area().width(); - res.effectStart = data.effectStart().is_set() ? data.effectStart().get() : 0; - res.effectDuration = data.effectDuration(); - res.chargeTypeId = data.chargeStruct().chargeTypeId(); - res.volley = data.cannonCount() * data.cannonRounds(); + res.idAes = data.id; + res.nameAes = QString::fromStdString(data.name); + res.effectStateId = data.effectStateId; + res.position = QPointF(data.area.cornerBottomLeft.lon, data.area.cornerBottomLeft.lat); + res.rotationAngle = data.area.rotation; + res.depth = data.area.height; + res.width = data.area.width; + res.effectStart = data.effectStart.is_set() ? data.effectStart.get() : 0; + res.effectDuration = data.effectDuration; + res.chargeTypeId = data.chargeStruct.chargeTypeId; + res.volley = data.cannonCount * data.cannonRounds; return res; } Database::EsmAesData ObjectAesData::asEsmAesData(const AreaEffectSimulation::ExplosionCluster &data) { Database::EsmAesData res; - res.idAes = data.id(); - res.nameAes = QString::fromStdString(data.name()); - res.effectStateId = data.effectStateId().underlying(); - res.position = QPointF(data.area().cornerBottomLeft().lon(), data.area().cornerBottomLeft().lat()); - res.rotationAngle = data.area().rotation(); - res.depth = data.area().height(); - res.width = data.area().width(); - res.effectStart = data.effectStart().is_set() ? data.effectStart().get() : 0; - res.effectDuration = data.effectDuration(); - res.chargeTypeId = data.chargeStruct().chargeTypeId(); - res.volley = data.impactCount(); //cannonCount() * data.cannonRounds(); + res.idAes = data.id; + res.nameAes = QString::fromStdString(data.name); + res.effectStateId = data.effectStateId; + res.position = QPointF(data.area.cornerBottomLeft.lon, data.area.cornerBottomLeft.lat); + res.rotationAngle = data.area.rotation; + res.depth = data.area.height; + res.width = data.area.width; + res.effectStart = data.effectStart.is_set() ? data.effectStart.get() : 0; + res.effectDuration = data.effectDuration; + res.chargeTypeId = data.chargeStruct.chargeTypeId; + res.volley = data.impactCount; //cannonCount() * data.cannonRounds(); return res; } Database::EsmAesData ObjectAesData::asEsmAesData(const AreaEffectSimulation::EffectCluster &data) { Database::EsmAesData res; - res.idAes = data.id(); - res.nameAes = QString::fromStdString(data.name()); - res.effectStateId = data.effectStateId().underlying(); - res.position = QPointF(data.area().cornerBottomLeft().lon(), data.area().cornerBottomLeft().lat()); - res.rotationAngle = data.area().rotation(); - res.depth = data.area().height(); - res.width = data.area().width(); - res.effectStart = data.effectStart().is_set() ? data.effectStart().get() : 0; - res.effectDuration = data.effectDuration(); - res.chargeTypeId = data.chargeStruct().chargeTypeId(); + res.idAes = data.id; + res.nameAes = QString::fromStdString(data.name); + res.effectStateId = data.effectStateId; + res.position = QPointF(data.area.cornerBottomLeft.lon, data.area.cornerBottomLeft.lat); + res.rotationAngle = data.area.rotation; + res.depth = data.area.height; + res.width = data.area.width; + res.effectStart = data.effectStart.is_set() ? data.effectStart.get() : 0; + res.effectDuration = data.effectDuration; + res.chargeTypeId = data.chargeStruct.chargeTypeId; res.volley = 0; - for (const auto &effector : data.effectors()) + for (const auto &effector : data.effectors) { - res.volley += effector.chargeAmount(); + res.volley += effector.chargeAmount; } return res; @@ -157,19 +157,19 @@ Database::EsmAesData ObjectAesData::asEsmAesData(const AreaEffectSimulation::Min { Database::EsmAesData res; const AreaEffectSimulation::MineSegment &segment = EffectShowManagement::EffectShowMineArea::getEffectShowSegment(data); - LtsCoordTrans::UtmCoordinate startPositionUtm = LtsCoordTrans::UtmCoordinate::fromGeographic({segment.positionStart().lon(), segment.positionStart().lat()}); - LtsCoordTrans::UtmCoordinate endPositionUtm = LtsCoordTrans::UtmCoordinate::fromGeographic({segment.positionEnd().lon(), segment.positionEnd().lat()}, startPositionUtm.zone); + LtsCoordTrans::UtmCoordinate startPositionUtm = LtsCoordTrans::UtmCoordinate::fromGeographic({segment.positionStart.lon, segment.positionStart.lat}); + LtsCoordTrans::UtmCoordinate endPositionUtm = LtsCoordTrans::UtmCoordinate::fromGeographic({segment.positionEnd.lon, segment.positionEnd.lat}, startPositionUtm.zone); const QLineF line({startPositionUtm.x, startPositionUtm.y}, {endPositionUtm.x, endPositionUtm.y}); res.width = line.length(); - res.idAes = data.id(); - res.nameAes = QString::fromStdString(data.name()); - res.effectStateId = data.effectStateId().underlying(); - res.position = QPointF(segment.positionStart().lon(), segment.positionStart().lat()); - res.depth = data.width(); - res.effectStart = data.effectStart().is_set() ? data.effectStart().get() : 0; - res.effectDuration = data.effectDuration(); - res.chargeTypeId = data.chargeStruct().chargeTypeId(); + res.idAes = data.id; + res.nameAes = QString::fromStdString(data.name); + res.effectStateId = data.effectStateId; + res.position = QPointF(segment.positionStart.lon, segment.positionStart.lat); + res.depth = data.width; + res.effectStart = data.effectStart.is_set() ? data.effectStart.get() : 0; + res.effectDuration = data.effectDuration; + res.chargeTypeId = data.chargeStruct.chargeTypeId; res.volley = 18; return res; } diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowManagement/object_effect_show.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowManagement/object_effect_show.cpp index 594d63576..31e214acb 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowManagement/object_effect_show.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowManagement/object_effect_show.cpp @@ -74,22 +74,22 @@ Core::FunctionReplyObject ObjectEffectShow::removeObject() //============================================================================= Core::FunctionReplyObject ObjectEffectShow::updateObject(const EffectShowManagement::EffectShow &data) { - if (data.id() <= 0) - return Core::FunctionReplyObject(data.id(), tr_lts("dds", "Object not valid/blocked")); + if (data.id <= 0) + return Core::FunctionReplyObject(data.id, tr_lts("dds", "Object not valid/blocked")); - if (m_data.orderConfirmation == EffectShowManagement::OrderConfirmation_e_def::Execution) - return Core::FunctionReplyObject(data.id(), tr_lts("dds", "Changes rejected due to Effect Show in execution.")); + if (m_data.orderConfirmation == static_cast(EffectShowManagement::OrderConfirmation_e::Execution)) + return Core::FunctionReplyObject(data.id, tr_lts("dds", "Changes rejected due to Effect Show in execution.")); DEBUG_LOG(m_logger) << "updateObject(data topic) complete ->" - << "\n id " << m_data.id << " new: " << data.id() - << "\n centerPosition x " << m_data.centerPosition.x() << " new: " << data.position().lon() - << "\n centerPosition y " << m_data.centerPosition.y() << " new: " << data.position().lat() - << "\n idAreaEffectSimulation " << m_data.idAreaEffectSimulation << " new: " << data.idAreaEffectSimulation() - << "\n esmParticipantId " << m_data.esmParticipantId << " new: " << data.esmParticipantId() - << "\n numOfVolley " << m_data.numOfVolley << " new: " << data.numOfVolley() - << "\n shotsPerVolley " << m_data.shotsPerVolley << " new: " << data.shotsPerVolley() - << "\n orderConfirmation " << m_data.orderConfirmation << " new: " << data.orderConfirmation().underlying() - << "\n answerText " << m_data.answerText << " new: " << QString::fromStdString((data.answerText())) + << "\n id " << m_data.id << " new: " << data.id + << "\n centerPosition x " << m_data.centerPosition.x() << " new: " << data.position.lon + << "\n centerPosition y " << m_data.centerPosition.y() << " new: " << data.position.lat + << "\n idAreaEffectSimulation " << m_data.idAreaEffectSimulation << " new: " << data.idAreaEffectSimulation + << "\n esmParticipantId " << m_data.esmParticipantId << " new: " << data.esmParticipantId + << "\n numOfVolley " << m_data.numOfVolley << " new: " << data.numOfVolley + << "\n shotsPerVolley " << m_data.shotsPerVolley << " new: " << data.shotsPerVolley + << "\n orderConfirmation " << m_data.orderConfirmation << " new: " << data.orderConfirmation + << "\n answerText " << m_data.answerText << " new: " << QString::fromStdString((data.answerText)) << "\n startTime " << m_data.startTime << "\n duration " << m_data.duration << "\n lowerLeftPosition x " << m_data.lowerLeftPosition.x() @@ -99,24 +99,24 @@ Core::FunctionReplyObject ObjectEffectShow::updateObject(const EffectShowManagem << "\n areaRotation " << m_data.areaRotation << "\n typeOfAmmunition " << m_data.typeOfAmmunition; - m_data.id = data.id(); - m_data.name = QString::fromStdString(data.name()); - m_data.startTime = data.startTime().is_set() ? data.startTime().get() : 0; - m_data.duration = data.duration(); - m_data.idAreaEffectSimulation = data.idAreaEffectSimulation(); - m_data.nameAreaEfffectSimulation = QString::fromStdString(data.nameAreaEffectSimulation()); - m_data.esmParticipantId = data.esmParticipantId(); - m_data.centerPosition.setX(data.position().lon()); - m_data.centerPosition.setY(data.position().lat()); - m_data.numOfVolley = data.numOfVolley(); - m_data.shotsPerVolley = data.shotsPerVolley(); - m_data.lowerLeftPosition.setX(data.lowerLeftPosition().lon()); - m_data.lowerLeftPosition.setY(data.lowerLeftPosition().lat()); - m_data.areaDepth = data.areaDepth(); - m_data.areaWidth = data.areaWidth(); - m_data.areaRotation = data.areaRotation(); - m_data.orderConfirmation = data.orderConfirmation().underlying(); - m_data.answerText = QString::fromStdString((data.answerText())); + m_data.id = data.id; + m_data.name = QString::fromStdString(data.name); + m_data.startTime = data.startTime.is_set() ? data.startTime.get() : 0; + m_data.duration = data.duration; + m_data.idAreaEffectSimulation = data.idAreaEffectSimulation; + m_data.nameAreaEfffectSimulation = QString::fromStdString(data.nameAreaEffectSimulation); + m_data.esmParticipantId = data.esmParticipantId; + m_data.centerPosition.setX(data.position.lon); + m_data.centerPosition.setY(data.position.lat); + m_data.numOfVolley = data.numOfVolley; + m_data.shotsPerVolley = data.shotsPerVolley; + m_data.lowerLeftPosition.setX(data.lowerLeftPosition.lon); + m_data.lowerLeftPosition.setY(data.lowerLeftPosition.lat); + m_data.areaDepth = data.areaDepth; + m_data.areaWidth = data.areaWidth; + m_data.areaRotation = data.areaRotation; + m_data.orderConfirmation = data.orderConfirmation; + m_data.answerText = QString::fromStdString((data.answerText)); if (!m_mainHandler->db()->update(m_data)) return Core::FunctionReplyObject(m_data.id, tr_lts("dds", "Error updating EffectShow into database")); @@ -132,10 +132,10 @@ Core::FunctionReplyObject ObjectEffectShow::updateObject(const EffectShowManagem bool ObjectEffectShow::updateObject(const ConvertFromTab::OrderConfirmation_t &data) { DEBUG_LOG(m_logger) << "updateObject() partly ->" - << "\n orderConfirmation " << m_data.orderConfirmation << " new: " << data.confirmation.underlying() + << "\n orderConfirmation " << m_data.orderConfirmation << " new: " << data.confirmation << "\n answerText " << m_data.answerText << " new: " << data.answerText; - m_data.orderConfirmation = data.confirmation.underlying(); + m_data.orderConfirmation = data.confirmation; m_data.answerText = data.answerText; if (!m_mainHandler->db()->update(m_data)) @@ -190,7 +190,7 @@ bool ObjectEffectShow::updateObject(const Database::EsmEffectShow &data) //============================================================================= bool ObjectEffectShow::resetOrderConfirmation() { - m_data.orderConfirmation = EffectShowManagement::OrderConfirmation_e_def::WaitingForAcceptance; + m_data.orderConfirmation = EffectShowManagement::OrderConfirmation_e::WaitingForAcceptance; m_data.answerText.clear(); if (!m_mainHandler->db()->update(m_data)) @@ -265,27 +265,27 @@ ConvertToTab::EffectShowContinue_t ObjectEffectShow::getContinueOrder() const void ObjectEffectShow::onPublishData() { EffectShowManagement::EffectShow ddsData; - ddsData.id(m_data.id); - ddsData.name(m_data.name.toStdString()); - ddsData.startTime(m_data.startTime); - ddsData.duration(m_data.duration); - ddsData.idAreaEffectSimulation(m_data.idAreaEffectSimulation); - ddsData.nameAreaEffectSimulation(m_data.nameAreaEfffectSimulation.toStdString()); - ddsData.esmParticipantId(m_data.esmParticipantId); - ddsData.position() = Core::GeoPosition2D(m_data.centerPosition.x(), m_data.centerPosition.y()); - ddsData.numOfVolley(m_data.numOfVolley); - ddsData.shotsPerVolley(m_data.shotsPerVolley); + ddsData.id = m_data.id; + ddsData.name = m_data.name.toStdString(); + ddsData.startTime = m_data.startTime; + ddsData.duration = m_data.duration; + ddsData.idAreaEffectSimulation = m_data.idAreaEffectSimulation; + ddsData.nameAreaEffectSimulation = m_data.nameAreaEfffectSimulation.toStdString(); + ddsData.esmParticipantId = m_data.esmParticipantId; + ddsData.position = Core::GeoPosition2D(m_data.centerPosition.x(), m_data.centerPosition.y()); + ddsData.numOfVolley = m_data.numOfVolley; + ddsData.shotsPerVolley = m_data.shotsPerVolley; //we need this for the smoke type - ddsData.lowerLeftPosition() = Core::GeoPosition2D(m_data.lowerLeftPosition.x(), m_data.lowerLeftPosition.y()); - ddsData.areaDepth(m_data.areaDepth); - ddsData.areaWidth(m_data.areaWidth); - ddsData.areaRotation(m_data.areaRotation); - ddsData.typeOfAmmunition(m_data.typeOfAmmunition); + ddsData.lowerLeftPosition = Core::GeoPosition2D(m_data.lowerLeftPosition.x(), m_data.lowerLeftPosition.y()); + ddsData.areaDepth = m_data.areaDepth; + ddsData.areaWidth = m_data.areaWidth; + ddsData.areaRotation = m_data.areaRotation; + ddsData.typeOfAmmunition = m_data.typeOfAmmunition; - ddsData.orderConfirmation(EffectShowManagement::OrderConfirmation_e::inner_enum(m_data.orderConfirmation)); - ddsData.answerText(m_data.answerText.toStdString()); - ddsData.isDeleted(false); - ddsData.isUsed(false); + ddsData.orderConfirmation = EffectShowManagement::OrderConfirmation_e::inner_enum(m_data.orderConfirmation); + ddsData.answerText = m_data.answerText.toStdString(); + ddsData.isDeleted = false; + ddsData.isUsed = false; diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowManagement/object_effect_show_actor_relocation.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowManagement/object_effect_show_actor_relocation.cpp index fb57e95ef..d891b22b2 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowManagement/object_effect_show_actor_relocation.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowManagement/object_effect_show_actor_relocation.cpp @@ -71,15 +71,15 @@ void ObjectEffectShowActorRelocation::onPublishData() { EffectShowManagement::EffectShowActorRelocation ddsData; - ddsData.id(m_data.id); - ddsData.esmParticipantId(m_data.esmParticipantId); - ddsData.arrival_time(m_data.arrivalTime); - ddsData.position(Core::GeoPosition2D(m_data.position.x(), m_data.position.y())); - ddsData.info(m_data.info.toStdString()); - ddsData.orderConfirmation(EffectShowManagement::OrderConfirmation_e::inner_enum(m_data.orderConfirmation)); - ddsData.answerText(m_data.answertText.toStdString()); - ddsData.isDeleted(false); - ddsData.isUsed(false); + ddsData.id = m_data.id; + ddsData.esmParticipantId = m_data.esmParticipantId; + ddsData.arrival_time = m_data.arrivalTime; + ddsData.position = Core::GeoPosition2D(m_data.position.x(), m_data.position.y()); + ddsData.info = m_data.info.toStdString(); + ddsData.orderConfirmation = EffectShowManagement::OrderConfirmation_e::inner_enum(m_data.orderConfirmation); + ddsData.answerText = m_data.answertText.toStdString(); + ddsData.isDeleted = false; + ddsData.isUsed = false; INFO_LOG(m_logger) << "Publish EsmEffectShowActorRelocation-data to dds (" << m_data.id << ") ..."; @@ -109,13 +109,13 @@ Database::EsmEffectShowActorRelocation ObjectEffectShowActorRelocation::ddsToDb( { Database::EsmEffectShowActorRelocation dbData; - dbData.id = ddsData.id(); - dbData.esmParticipantId = ddsData.esmParticipantId(); - dbData.arrivalTime = ddsData.arrival_time().get(); - dbData.position = QPointF(ddsData.position().lon(), ddsData.position().lat()); - dbData.info = QString::fromStdString(ddsData.info()); - dbData.orderConfirmation = ddsData.orderConfirmation().underlying(); - dbData.answertText = QString::fromStdString(ddsData.answerText()); + dbData.id = ddsData.id; + dbData.esmParticipantId = ddsData.esmParticipantId; + dbData.arrivalTime = ddsData.arrival_time.get(); + dbData.position = QPointF(ddsData.position.lon, ddsData.position.lat); + dbData.info = QString::fromStdString(ddsData.info); + dbData.orderConfirmation = ddsData.orderConfirmation; + dbData.answertText = QString::fromStdString(ddsData.answerText); return dbData; } //============================================================================= diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowManagement/object_effect_show_vehicle_status.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowManagement/object_effect_show_vehicle_status.cpp index c247635c6..47dbb40dd 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowManagement/object_effect_show_vehicle_status.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowManagement/object_effect_show_vehicle_status.cpp @@ -100,17 +100,17 @@ void ObjectEffectShowVehicleStatus::onPublishData() EffectShowManagement::EffectShowVehicleStatus ddsData; //ddsData.equipmentNumber(m_data.equipmentNumber); - ddsData.airSpeedMeterFail(m_data.airSpeedMeterFail); - ddsData.ammunitionAvailable(m_data.ammunitionAvailable); - ddsData.ammunitionMagazine(m_data.ammunitionMagazine); - ddsData.controlComputerFail(m_data.controlComputerFail); - ddsData.feature(EffectShowManagement::Feature_e_def::type(m_data.feature)); - ddsData.esmParticipantId(m_data.esmParticipantId); - ddsData.inclinationSensorFail(m_data.inclinationSensorFail); - ddsData.magazineFail(m_data.magazineFail); - ddsData.nameEffectShowActor(m_data.nameEffectShowActor.toStdString()); - ddsData.operational(m_data.operational); - ddsData.sampleTime(m_data.timestamp); + ddsData.airSpeedMeterFail = m_data.airSpeedMeterFail; + ddsData.ammunitionAvailable = m_data.ammunitionAvailable; + ddsData.ammunitionMagazine = m_data.ammunitionMagazine; + ddsData.controlComputerFail = m_data.controlComputerFail; + ddsData.feature = EffectShowManagement::Feature_e::type(m_data.feature); + ddsData.esmParticipantId = m_data.esmParticipantId; + ddsData.inclinationSensorFail = m_data.inclinationSensorFail; + ddsData.magazineFail = m_data.magazineFail; + ddsData.nameEffectShowActor = m_data.nameEffectShowActor.toStdString(); + ddsData.operational = m_data.operational; + ddsData.sampleTime = m_data.timestamp; INFO_LOG(m_logger) << "Publish EsmEffectShowVehicleStatus-data to dds (" << m_data.esmParticipantId << ") ..."; if (!m_mainHandler->dds()->dts()->publish(ddsData))