Initial commit
This commit is contained in:
commit
b7d90b9afe
16245 files changed
+3396666
No files matched your search
@@ -0,0 +1,57 @@
|
||||
/**
|
||||
* Handle Participants which are available in the system (map between Wls id and ParticipantId)
|
||||
* $Id$
|
||||
* $HeadURL$
|
||||
* $Author$
|
||||
* Created by Christian Ehrlicher, SLSE, 2017-01-10
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "logger.h"
|
||||
#include "wls_participant.h"
|
||||
#include <QHash>
|
||||
#include <QObject>
|
||||
#include <QTimer>
|
||||
#include <unordered_map>
|
||||
#include <unordered_set>
|
||||
|
||||
namespace WirelessLocationSystem
|
||||
{
|
||||
class WebSocketHandler;
|
||||
class WlsHandler;
|
||||
|
||||
class WlsParticipantHandler : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit WlsParticipantHandler(QObject *parent = nullptr);
|
||||
~WlsParticipantHandler();
|
||||
|
||||
void init(WebSocketHandler *wsHandler,
|
||||
WlsHandler *wlsHandler);
|
||||
|
||||
// ownership stays here
|
||||
WlsParticipant *createNewParticipant(const QByteArray &tagId);
|
||||
void setEquipmentNumber(WlsParticipant *participant, int equipmentNumber);
|
||||
|
||||
WlsParticipant *participantByTagId(const QByteArray &tagId) const;
|
||||
const QHash<QByteArray, WlsParticipant *> &participants() const { return m_participantsByTagId; }
|
||||
|
||||
void exerciseEquipmentAssignmentChanged(const std::unordered_map<int, std::unordered_set<int>> &eea);
|
||||
void handleWlsBinarySfmData(const TrainingAreaBase::TetraIcd::WlsBinarySfmData &data);
|
||||
|
||||
private Q_SLOTS:
|
||||
void onGpsOnOffTimeoutTimer();
|
||||
private:
|
||||
WebSocketHandler *m_wsHandler = nullptr;
|
||||
WlsHandler *m_wlsHandler = nullptr;
|
||||
|
||||
QHash<QByteArray, WlsParticipant *> m_participantsByTagId;
|
||||
QHash<int, WlsParticipant *> m_participantsByEqId;
|
||||
QHash<int, int> m_equipNo2ExerciseId;
|
||||
|
||||
QTimer *m_gpsOnOffTimeoutTimer;
|
||||
NGL::INGLLogger &m_logger;
|
||||
};
|
||||
} // namespace WirelessLocationSystem
|
||||
Reference in new issue
Block a user