70 lines
2.4 KiB
C++
Executable File
70 lines
2.4 KiB
C++
Executable File
/**
|
|
* DdsHandlerTargetAreas for DDS
|
|
* $Id$
|
|
* $HeadURL$
|
|
* $Author$
|
|
* Created by gr, SLSE, 2015-09-02
|
|
*/
|
|
#pragma once
|
|
|
|
#include <QObject>
|
|
#include <DDS/DDSConnector/dds_connector.h>
|
|
#include <DDS/Core/core_dtc.h>
|
|
#include <DDS/Core/topic_lock_master.h>
|
|
#include <ParticipantManagement/ppm_dtc.h>
|
|
#include <TrainingAreaBase/tab_ftc.h>
|
|
#include <ParticipantManagement/ppm.hpp>
|
|
#include <LtsCoordTrans/lts_coord_trans.h>
|
|
|
|
#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<Core::TopicLockMaster> topicLockMaster() const { return m_topicLockMaster; }
|
|
std::shared_ptr<DDSConnector::DdsConnector> dds() const { return m_ddsConnector; }
|
|
|
|
std::shared_ptr<Core::Interface::Dtc> dtcCore() const { return m_dtcCore;}
|
|
std::shared_ptr<ParticipantManagement::Interface::Dtc> dtcPpm() const {return m_dtcPpm;} ///< Pointer to DTC ParticipantManagement interface object
|
|
std::shared_ptr<TrainingAreaBase::Interface::Ftc> 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<DDSConnector::DdsConnector> m_ddsConnector;
|
|
std::shared_ptr<Core::TopicLockMaster> m_topicLockMaster;
|
|
std::shared_ptr<Core::Interface::Dtc> m_dtcCore;
|
|
std::shared_ptr<ParticipantManagement::Interface::Dtc> m_dtcPpm; ///< Pointer to DTC ParticipantManagement interface object
|
|
std::shared_ptr<TrainingAreaBase::Interface::Ftc> m_ftcTab;
|
|
|
|
QMap<int, int> m_partId2EquipNoMap; ///< Reference map participant (player) to equipment number
|
|
int m_participantEventId;
|
|
int m_exerciseId;
|
|
|
|
NGL::INGLLogger &m_logger;
|
|
};
|
|
|
|
}
|