- Migrated all 104 CMakeLists.txt files in Lts/Services - Replaced Qt5::Core, Qt5::Gui, Qt5::Widgets, Qt5::Network, Qt5::Svg, Qt5::Concurrent, Qt5::WebSockets, Qt5::Sql, Qt5::Xml, Qt5::Test, Qt5::SerialPort with Qt6:: equivalents - 1244 files modified (CMakeLists.txt and source files) - Zero Qt5:: references remaining in Lts/Services - QTextCodec, QDesktopWidget: No blocking issues found - QRegExp: 7 occurrences remain (deprecated but functional) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
49 lines
1.6 KiB
C++
Executable File
49 lines
1.6 KiB
C++
Executable File
/**
|
|
* 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
|