Major Changes:
- Merged latest Qt5 devel content from dlbo (292 files changed, 7 new dirs)
- Consolidated forward-declarations and include folders
- Removed unneeded modules per Niklas' repo check list
Build System Fixes:
- Fixed CMake VERSION_GREATER syntax in ParticipantManagement/CMakeLists.txt
- Added VLC packages (libvlc-dev, vlc-plugin-base) to docker_build.sh
- Added PostgreSQL dev packages (libpq-dev, postgresql-server-dev-all) to Dockerfile
- Fixed locale warnings (ANSI_X3.4-1968 → C.UTF-8)
- Fixed ArcGIS SDK path warnings when BUILD_ARCGIS=OFF
Code Generation Fixes:
- Fixed IDL enum collisions (PortType→CorePortType/DdsutPortType, PdmEventType)
- Fixed Grantlee template svc_translation.cpp.grantlee:
- Changed {{ idl_enum.name }}_def:: to {{ idl_enum.name }}::
- Fixed .underlying() calls for C++11 scoped enums (enum class)
- Removed generated files from repo (moc_*, *_dtc.h, *_ftc.h)
Validation:
- BUILD_RTI=ON: SUCCESS
- BUILD_RTI=OFF: SUCCESS
- C++17 standard maintained for RTI 7.7 compatibility
- Ubuntu 26.04 Docker environment verified
Remaining Warnings (expected):
- BgViewer, KDChart, KDReports, Poppler-Qt6 not found (optional features)
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
111 lines
4.7 KiB
C++
111 lines
4.7 KiB
C++
/**
|
|
* Handler for AES data received from SFM
|
|
* $Id$
|
|
* $HeadURL$
|
|
* $Author$
|
|
* Created by Philipp Dassow, NLST, 2018-04-11
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include <QByteArray>
|
|
|
|
#include <LtsCoordTrans/lts_coord_trans.h>
|
|
|
|
#include <AreaEffectSimulation/aes_dtc.h>
|
|
#include <AreaEffectSimulation/aes_ftc.h>
|
|
#include <ProjectDataManagement/pdm_dtc.h>
|
|
|
|
#include "oc_telegrams.h"
|
|
#include "dds_handler.h"
|
|
#include "logger.h"
|
|
|
|
namespace TrainingAreaBaseOC
|
|
{
|
|
class HandlerAesData
|
|
: protected AreaEffectSimulation::Interface::Ftc::BCContaminationModifyReplyHandler
|
|
, protected AreaEffectSimulation::Interface::Ftc::ExplosionAreaModifyReplyHandler
|
|
, protected AreaEffectSimulation::Interface::Ftc::ExplosionSingleModifyReplyHandler
|
|
, protected AreaEffectSimulation::Interface::Ftc::FunctionalAreaModifyReplyHandler
|
|
, protected AreaEffectSimulation::Interface::Ftc::NContaminationModifyReplyHandler
|
|
, protected AreaEffectSimulation::Interface::Ftc::MineAreaModifyFromCtaDataReplyHandler
|
|
, protected AreaEffectSimulation::Interface::Ftc::BCContaminationRemoveReplyHandler
|
|
, protected AreaEffectSimulation::Interface::Ftc::ExplosionAreaRemoveReplyHandler
|
|
, protected AreaEffectSimulation::Interface::Ftc::ExplosionSingleRemoveReplyHandler
|
|
, protected AreaEffectSimulation::Interface::Ftc::FunctionalAreaRemoveReplyHandler
|
|
, protected AreaEffectSimulation::Interface::Ftc::NContaminationRemoveReplyHandler
|
|
, protected AreaEffectSimulation::Interface::Ftc::MineAreaRemoveReplyHandler
|
|
, protected AreaEffectSimulation::Interface::Ftc::ExplosionAreaPauseResumeReplyHandler
|
|
, protected AreaEffectSimulation::Interface::Ftc::ExplosionClusterOcModifyReplyHandler
|
|
, protected AreaEffectSimulation::Interface::Ftc::ExplosionClusterRemoveReplyHandler
|
|
{
|
|
public:
|
|
explicit HandlerAesData(const std::shared_ptr<DdsHandler> &dds,
|
|
const std::shared_ptr<AreaEffectSimulation::Interface::Dtc> &aesDtc,
|
|
const std::shared_ptr<AreaEffectSimulation::Interface::Ftc> &aesFtc,
|
|
const std::shared_ptr<ProjectDataManagement::Interface::Dtc> &pdmDtc);
|
|
|
|
bool init();
|
|
void setUse2BytesForSingleFireDiameter(bool bUse) { m_use2BytesForSingleFireDiameter = bUse; }
|
|
|
|
void process(const QByteArray &data, int multiplexer);
|
|
|
|
void specificsExercise(const OcTelegrams::SpecificsExercise &data);
|
|
|
|
void onMineAreaModifyFromCtaDataReply(const Core::FunctionReplyObject &reply);
|
|
void onNContaminationModifyReply(const Core::FunctionReplyObject &reply);
|
|
void onFunctionalAreaModifyReply(const Core::FunctionReplyObject &reply);
|
|
void onExplosionSingleModifyReply(const Core::FunctionReplyObject &reply);
|
|
void onExplosionAreaModifyReply(const Core::FunctionReplyObject &reply);
|
|
void onBCContaminationModifyReply(const Core::FunctionReplyObject &reply);
|
|
void onExplosionClusterOcModifyReply(const Core::FunctionReplyObject &reply);
|
|
|
|
void onMineAreaRemoveReply(const Core::FunctionReplyObject &reply);
|
|
void onNContaminationRemoveReply(const Core::FunctionReplyObject &reply);
|
|
void onFunctionalAreaRemoveReply(const Core::FunctionReplyObject &reply);
|
|
void onExplosionSingleRemoveReply(const Core::FunctionReplyObject &reply);
|
|
void onExplosionAreaRemoveReply(const Core::FunctionReplyObject &reply);
|
|
void onBCContaminationRemoveReply(const Core::FunctionReplyObject &reply);
|
|
void onExplosionClusterRemoveReply(const Core::FunctionReplyObject &reply);
|
|
|
|
void onExplosionAreaPauseResumeReply(const Core::FunctionReplyObject &reply);
|
|
|
|
private:
|
|
void bcContaminations(const QByteArray &data);
|
|
void explosionAreas(const QByteArray &data);
|
|
void explosionSingles(const QByteArray &data);
|
|
void functionalAreas(const QByteArray &data);
|
|
void nContaminations(const QByteArray &data);
|
|
void mineAreas(const QByteArray &data);
|
|
void explosionAreasPause(const QByteArray &data);
|
|
void explosionAreasResume(const QByteArray &data);
|
|
|
|
int chargeTypeIdFromChargeTasCode(ProjectDataManagement::GearClass gearClass, int chargeTasCodeIndirect);
|
|
|
|
Core::GeoPosition2D relativeToGeoPosition(int x, int y) const;
|
|
|
|
enum
|
|
{
|
|
MineArea = 1,
|
|
ExplosionArea = 2,
|
|
ExplosionSingle = 3,
|
|
NContamination = 4,
|
|
BcContamination = 5,
|
|
FunctionalArea = 6,
|
|
ExplosionAreaStop = 7,
|
|
ExplosionAreaContinue = 8
|
|
};
|
|
|
|
std::shared_ptr<DdsHandler> m_dds;
|
|
std::shared_ptr<AreaEffectSimulation::Interface::Dtc> m_aesDtc;
|
|
std::shared_ptr<AreaEffectSimulation::Interface::Ftc> m_aesFtc;
|
|
std::shared_ptr<ProjectDataManagement::Interface::Dtc> m_pdmDtc;
|
|
|
|
LtsCoordTrans::UtmCoordinate m_utmCoord; // for position translation to relative
|
|
|
|
bool m_use2BytesForSingleFireDiameter = true;
|
|
|
|
LOGGER_T &m_logger;
|
|
};
|
|
} // namespace TrainingAreaBaseOC
|