Initial commit
This commit is contained in:
commit
b7d90b9afe
16245 files changed
+3396666
No files matched your search
Executable
+48
@@ -0,0 +1,48 @@
|
||||
/**
|
||||
* Send a function topic to TrainingAreabase in a specific exercise
|
||||
* $Id$
|
||||
* $HeadURL$
|
||||
* $Author$
|
||||
* Created by Christian Ehrlicher, SLSE, 2016-12-13
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "dds_handler.h"
|
||||
#include "logger.h"
|
||||
#include <QObject>
|
||||
#include <QTimer>
|
||||
#include <TrainingAreaBase/tab_ftc.h>
|
||||
#include <OcSituationServer/oss_ftc.h>
|
||||
|
||||
namespace Messaging
|
||||
{
|
||||
class ExerciseHandler final : public QObject,
|
||||
public TrainingAreaBase::Interface::Ftc::SendEquipmentMessageReplyHandler,
|
||||
public OcSituationServer::Interface::Ftc::SendEquipmentMessageOcReplyHandler
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
ExerciseHandler(const std::shared_ptr<DDSConnector::DdsConnector> &ddsConnector,
|
||||
const int exerciseId);
|
||||
|
||||
bool init();
|
||||
bool sendEquipmentMessage(const TrainingAreaBase::SendEquipmentMessageRequest &request);
|
||||
bool sendOcEquipmentMessage(const OcSituationServer::SendEquipmentMessageRequest &request);
|
||||
int exerciseId() const;
|
||||
Q_SIGNALS:
|
||||
void exerciseHandlerIdleTimeout();
|
||||
void equipmentMessageReply(int msgId, bool sentSuccessful);
|
||||
void equipmentMessageOcReply(int replyId, bool sentSuccessful);
|
||||
private:
|
||||
void onSendEquipmentMessageReply(const Core::FunctionReplyObject &replyObject) override;
|
||||
void onSendEquipmentMessageOcReply(const Core::FunctionReplyObject &replyObject) override;
|
||||
private:
|
||||
std::shared_ptr<DDSConnector::DdsConnector> m_ddsConnector;
|
||||
std::shared_ptr<TrainingAreaBase::Interface::Ftc> m_tabFtc;
|
||||
std::shared_ptr<OcSituationServer::Interface::Ftc> m_ossFtc;
|
||||
int m_exerciseId;
|
||||
QTimer *m_idleTimer; //<! timer to delete ExerciseHandler after n seconds when no longer needed
|
||||
LOGGER_T m_logger;
|
||||
};
|
||||
} // namespace Messaging
|
||||
Reference in new issue
Block a user