57 lines
1.1 KiB
C++
Executable File
57 lines
1.1 KiB
C++
Executable File
/**
|
|
* @RDE_HEADER@
|
|
* DdsHandlerExercise
|
|
* $Id$
|
|
* $HeadURL$
|
|
* $Author$
|
|
* Created by Christian Fröbel, NLE, 2019-08-02
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include <dds/domain/DomainParticipant.hpp>
|
|
#include <memory>
|
|
|
|
namespace DDSConnector
|
|
{
|
|
class DdsConnector;
|
|
}
|
|
|
|
namespace ParticipantManagement
|
|
{
|
|
namespace Interface
|
|
{
|
|
class Dtc;
|
|
}
|
|
}
|
|
|
|
namespace CombatNetRadio
|
|
{
|
|
|
|
/**
|
|
* @author Christian Fröbel
|
|
*/
|
|
class DdsHandlerExercise
|
|
{
|
|
public:
|
|
explicit DdsHandlerExercise(const dds::domain::DomainParticipant &domainParticipant, int exerciseId);
|
|
virtual ~DdsHandlerExercise();
|
|
|
|
/**
|
|
* Must be called *after* all DTC-consuming instances have been setup.
|
|
* This is to avoid data races that otherwise could arise
|
|
* when
|
|
* - connecting to the onFooChanged() signal and
|
|
* - shortly after that calling foo() to get all received entities so far.
|
|
*/
|
|
void enableDtcs();
|
|
|
|
ParticipantManagement::Interface::Dtc *ppmDtc() const { return m_ppmDtc.get(); }
|
|
|
|
private:
|
|
std::shared_ptr<DDSConnector::DdsConnector> m_ddsConnector;
|
|
std::shared_ptr<ParticipantManagement::Interface::Dtc> m_ppmDtc;
|
|
};
|
|
|
|
} // namespace CombatNetRadio
|