Initial commit
This commit is contained in:
commit
b7d90b9afe
16245 files changed
+3396666
No files matched your search
Executable
+53
@@ -0,0 +1,53 @@
|
||||
/**
|
||||
* Get information about (O/C) participants to be able to send/receive messages for them
|
||||
* $Id$
|
||||
* $HeadURL$
|
||||
* $Author$
|
||||
* Created by Christian Ehrlicher, SLSE, 2016-12-13
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "dds_handler.h"
|
||||
#include "logger.h"
|
||||
|
||||
#include <QObject>
|
||||
#include <QHash>
|
||||
#include <ParticipantManagement/ppm_dtc.h>
|
||||
#include <OcSituationServer/oss_dtc.h>
|
||||
#include <TrainingAreaBase/tab.hpp>
|
||||
#include <DDS/DDSConnector/dds_connector.h>
|
||||
|
||||
namespace Messaging
|
||||
{
|
||||
class ExerciseHandler;
|
||||
class ExercisesHandler final : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit ExercisesHandler(const std::shared_ptr<DdsHandler> &ddsHandler);
|
||||
~ExercisesHandler();
|
||||
|
||||
bool init();
|
||||
bool sendEquipmentMessage(const TrainingAreaBase::SendEquipmentMessageRequest &request);
|
||||
bool sendOcEquipmentMessage(const OcSituationServer::SendEquipmentMessageRequest &request);
|
||||
int findEquipmentNumber(int participantId, int exerciseId);
|
||||
Q_SIGNALS:
|
||||
void messageFromTrainingArea(const TrainingAreaBase::EquipmentMessage &data);
|
||||
|
||||
private Q_SLOTS:
|
||||
void onEquipmentExerciseMappingChanged(const ParticipantManagement::EquipmentExerciseMapping &data, DataModification modType);
|
||||
void onEquipmentMessageChanged(const TrainingAreaBase::EquipmentMessage &data, const DataModification modType);
|
||||
void onExerciseHandlerIdleTimeout();
|
||||
private:
|
||||
ExerciseHandler *exerciseHandlerForExerciseId(int exerciseId);
|
||||
private:
|
||||
std::shared_ptr<DdsHandler> m_ddsHandler;
|
||||
std::shared_ptr<ParticipantManagement::Interface::Dtc> m_ppmDtc;
|
||||
QHash<int, ExerciseHandler *> m_exerciseHandler;
|
||||
// QHash< QPair<exerciseId,ParticipantId>, equipmentNumber>
|
||||
QHash<QPair<int,int>, int> m_participant2EquipNumber;
|
||||
QHash<int, int> m_equipNo2ExerciseId;
|
||||
LOGGER_T m_logger;
|
||||
};
|
||||
} // namespace Messaging
|
||||
Reference in new issue
Block a user