/** * Handler for player data * $Id: handler_functional_area.h 64170 2024-11-25 11:34:11Z fritsche_h $ * $HeadURL: svn://slssvn/TDS/branches/product/features/25_03_etb_uas/Lts/Services/CentralEffectSimulation/Plugins/FunctionalAreas/handler_functional_area.h $ * $Author: fritsche_h $ * Created by gr, SLSE, 2017-02-20 */ #pragma once #include #include #include #include #include #include #include #include #include #include #include // AES-Handling for participants namespace CES_JAMMING { struct ParticipantDistance { double squareDistance = 0; CentralEffectSimulation::HandlerParticipant::CesParticipantData participantPosition; }; struct EnterLeaveType { ProjectDataManagement::EventType eventType = ProjectDataManagement::EventType_def::Unknown; bool isAlreadySupplied = false; }; class HandlerJamming : public QObject , protected TrainingAreaBase::Interface::Ftc::SendCesHitReplyHandler { Q_OBJECT public: explicit HandlerJamming(const std::shared_ptr &ddsHandler, const std::shared_ptr &participantHandler, const std::shared_ptr &handlerBuildingData, QObject *parent = nullptr); ~HandlerJamming(); /** * Initialize the handler to manage information from player management */ bool init(); protected: void onSendCesHitReply(const Core::FunctionReplyObject &replyObject) override final; private Q_SLOTS: /** * Handle the signals from 'AES' */ // void onAesItemViewChanged(const AreaEffectSimulation::AesItemView &data, DataModification modType); // void onJammingChanged(const AreaEffectSimulation::JammingArea &data, DataModification modType); void onParticipantGearEventChanged(const ParticipantManagement::ParticipantGearEvent &data, DataModification modType); private: // methoden void sendCesHitRequest(const int chargeTypeId, const int originatorId, const CentralEffectSimulation::HandlerParticipant::CesParticipantData &participantData); ProjectDataManagement::EventType leaveEventTypeForAesType(AreaEffectSimulation::AesType aesTypeId); private: // attributes std::shared_ptr m_ddsHandler; ///< Pointer to VOM DDS handler std::shared_ptr m_handlerParticipant; std::shared_ptr m_handlerBuildingData; QHash m_aesItemId2partIdMap; // AES-Values QHash m_aesItemViews; // key = aesItemId QQueue m_sendCesHitRequestQueue; QQueue m_sendInitRequestQueue; QHash, EnterLeaveType> m_cesEnterLeaveFunctionalArea; // QPair < aesItemId, participantId> Last Event QHash> m_aesPolygonEncloseBuilding; // key = aesItemId value = BuildingIds inside form int m_requestId = 1; NGL::INGLLogger &m_logger; ///< Interface to the Logging-Facility }; } // namespace CES_JAMMING