39 lines
979 B
C++
Executable File
39 lines
979 B
C++
Executable File
/**
|
|
* @RDE_HEADER@
|
|
* DdsHandlerExercise
|
|
* $Id$
|
|
* $HeadURL$
|
|
* $Author$
|
|
* Created by Christian Fröbel, NLE, 2019-08-02
|
|
*/
|
|
|
|
#include "dds_handler_exercise.h"
|
|
#include <ParticipantManagement/ppm_dtc.h>
|
|
#include <DDS/DDSConnector/dds_connector.h>
|
|
#include <QtGlobal>
|
|
|
|
namespace CombatNetRadio
|
|
{
|
|
|
|
DdsHandlerExercise::DdsHandlerExercise(const dds::domain::DomainParticipant &domainParticipant, int exerciseId)
|
|
: m_ddsConnector(new DDSConnector::DdsConnector(domainParticipant, IDL::PartitionType::Exercise, exerciseId))
|
|
{
|
|
bool ok = m_ddsConnector->init();
|
|
Q_ASSERT(ok);
|
|
m_ddsConnector->initSubscriber();
|
|
|
|
m_ppmDtc = ParticipantManagement::Interface::Dtc::create(m_ddsConnector);
|
|
}
|
|
|
|
void DdsHandlerExercise::enableDtcs()
|
|
{
|
|
bool ok = m_ppmDtc->enableParticipant() &&
|
|
m_ppmDtc->enableParticipantPosition() &&
|
|
m_ppmDtc->enableType();
|
|
Q_ASSERT(ok);
|
|
}
|
|
|
|
DdsHandlerExercise::~DdsHandlerExercise() = default;
|
|
|
|
} // namespace CombatNetRadio
|