#pragma once #include "DDS/Core/core_types.h" #include "logger.h" #include "main_dispatcher.h" #include "telegrams.h" #include #include #include #include #include #include #include #include #include #include namespace AdlerJson { class MainDispatcher; class AesHandler : public QObject , protected AreaEffectSimulation::Interface::Ftc::AirSupportImpactModifyReplyHandler , protected AreaEffectSimulation::Interface::Ftc::OffRouteMineModifyReplyHandler , protected AreaEffectSimulation::Interface::Ftc::EffectClusterModifyReplyHandler , protected AreaEffectSimulation::Interface::Ftc::TrajectoryAdlerModifyReplyHandler , protected NotificationManagement::Interface::Ftc::CreateNotificationReplyHandler { Q_OBJECT public: explicit AesHandler(std::shared_ptr ftsTab, QObject *parent = nullptr); bool init(MainDispatcher *mainDispatcher); bool sendAesModifyRequest(const QJsonObject &obj); bool sendExplosionArea(const QJsonObject &data); void onAirSupportImpactModifyReply(const Core::FunctionReplyObject &reply) override; void onOffRouteMineModifyReply(const Core::FunctionReplyObject &replyObject) override; void onEffectClusterModifyReply(const Core::FunctionReplyObject &replyObject) override; void onCreateNotificationReply(const Core::FunctionReplyObject &replyObject) override; void onExplosionSingleChanged(const AreaEffectSimulation::ExplosionSingle &data, DataModification modType); void onEffectClusterChanged(const AreaEffectSimulation::EffectCluster &data, DataModification modType); void handleCreateSingleExplosion(const TrainingAreaBase::TetraIcd::CreateSingleExplosion &data); void handleEXFire(const Feuerkampfdaten &data, int wsId); void handleEXDontFire(const Feuerkampfdaten &data, int wsId); void sendTrajectoryAdlerModifyRequest(const WirkfeldplanungData &data, int participantId, int wirkmittelIndex, int aesId); void handleEffectCluster(const WirkfeldplanungData &data, int wsId); void removeAllPendingEffectCluster(int partyId); std::shared_ptr getDtc() { return m_dtcAes; }; std::shared_ptr getFtc() { return m_ftcAes; }; private: NGL::INGLLogger &m_logger; AreaEffectSimulation::Area createMinimumRect(int zone, const QVector &points); signals: void explosionSingleChanged(const QJsonObject &jsonObj); private: NGL::INGLLogger &m_logger; QList findAllPendingEffectCluster(int partyId); void handleAmmoCount(const Feuerkampfdaten &data, int saaPartyId, bool sendExVollzug = false); private: NGL::INGLLogger &m_logger; MainDispatcher *m_mainDispatcher; std::shared_ptr m_ftcAes; std::shared_ptr m_dtcAes; std::shared_ptr m_dtcPpm; std::shared_ptr m_ddsHandler; void onTrajectoryAdlerModifyReply(const Core::FunctionReplyObject &reply) override; LtsUtils::RequestHelper *m_requestHelper; QHash m_singleExplosions; WirkfeldplanungData m_wirkfeldPlanungsData; QHash m_aesIdToFeuerkampfReferenz; QHash m_feuerkampReferenzAmmoCounter; QHash> m_feuerkampfReferenzWirkmittel; QHash m_feuerkampfReferenzUsedFeuerHalt; int m_participantId; int m_wirkmittelIndex; int m_aesId; QHash aesIdWsId; }; }