- 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>
67 lines
1.6 KiB
C++
Executable File
67 lines
1.6 KiB
C++
Executable File
/**
|
|
* The BiteHandler class manages everything todo with bite requests.
|
|
* $Id$
|
|
* $HeadURL$
|
|
* $Author$
|
|
* Created by Hannes Baeuerle, SLSE, 2016-06-06
|
|
*/
|
|
#pragma once
|
|
|
|
#include <QSet>
|
|
#include <QMap>
|
|
|
|
#include "dds_handler.h"
|
|
#include "logger.h"
|
|
|
|
|
|
#include <TrainingAreaBase/tab_ftc.h>
|
|
|
|
#include <QtCore/QObject>
|
|
#include <QtCore/QPointer>
|
|
#include <QtCore/QVector>
|
|
|
|
class QTimer;
|
|
namespace ParticipantManagement
|
|
{
|
|
class MainHandler;
|
|
|
|
namespace BiteHandling
|
|
{
|
|
class BiteReplier;
|
|
class BiteHandler final : public QObject
|
|
, protected Interface::Fts::CallBiteRequestHandler
|
|
, protected TrainingAreaBase::Interface::Ftc::DemandBiteReplyHandler
|
|
{
|
|
Q_OBJECT
|
|
public:
|
|
explicit BiteHandler(MainHandler *mainHandler);
|
|
|
|
bool init();
|
|
|
|
void onDemandBiteReply(const Core::FunctionReplyObject &replyObject) override;
|
|
|
|
void onCallBiteRequest(const rti::core::SampleIdentity &cookie,
|
|
const CallBiteRequest &request) override;
|
|
|
|
private:
|
|
Core::FunctionReplyObject callBiteRequest(const rti::core::SampleIdentity &cookie,
|
|
const CallBiteRequest &request);
|
|
void onBiteRequestTimeout(int requestId);
|
|
|
|
private:
|
|
MainHandler *m_mainHandler;
|
|
struct DemandedParticipants
|
|
{
|
|
QSet<int> demandedBiteParticipants;
|
|
rti::core::SampleIdentity cookie;
|
|
QPointer<QTimer> timer;
|
|
};
|
|
QMap<int, DemandedParticipants> m_demandedBiteParticipantRequests;
|
|
QSet<int32_t> m_demandedBiteParticipants; // participant IDs
|
|
|
|
LOGGER_T m_logger;
|
|
|
|
}; // class BiteHandler
|
|
} // namespace BiteHandling
|
|
} // namespace ParticipantManagement
|