/** * DdsHandlerTargetAreas for DDS * $Id$ * $HeadURL$ * $Author$ * Created by gr, SLSE, 2015-09-02 */ #pragma once #include #include #include #include #include #include #include #include #include "logger.h" namespace TargetAreas { class DdsHandlerTargetAreas : public QObject { Q_OBJECT public: DdsHandlerTargetAreas(int domainId, int exerciseId); bool init(const QStringList &qosFileList = QStringList()); std::shared_ptr topicLockMaster() const { return m_topicLockMaster; } std::shared_ptr dds() const { return m_ddsConnector; } std::shared_ptr dtcCore() const { return m_dtcCore;} std::shared_ptr dtcPpm() const {return m_dtcPpm;} ///< Pointer to DTC ParticipantManagement interface object std::shared_ptr ftcTab() const { return m_ftcTab;} int getParticipantEventId() { return m_participantEventId++;} qint64 currentPartitionTime() const; /** * Get equipment number for the given participant * @param participantId participant id to get the equipment number for * @return equipment number or 0 in case of failure */ int participantId2EquipNo(const int participantId) const; private Q_SLOTS: /** * Handle the signals from 'ParticipantManagement' */ void onParticipantChanged(const ParticipantManagement::Participant &data, DataModification modType); private: std::shared_ptr m_ddsConnector; std::shared_ptr m_topicLockMaster; std::shared_ptr m_dtcCore; std::shared_ptr m_dtcPpm; ///< Pointer to DTC ParticipantManagement interface object std::shared_ptr m_ftcTab; QMap m_partId2EquipNoMap; ///< Reference map participant (player) to equipment number int m_participantEventId; int m_exerciseId; NGL::INGLLogger &m_logger; }; }