Files
qt5-legatus-legacy/Lts/Services/ExerciseEventManagement/handler_equipment_error_registration.h
T
2026-08-13 18:33:10 +02:00

75 lines
1.9 KiB
C++
Executable File

/**
* Handler for infrastructure data
* $Id$
* $HeadURL$
* $Author$
* Created by Christian Roeskens, SLSE, 2016-09-21
*/
#pragma once
#include "main_handler.h"
#include "logger.h"
#include <OcSituationServer/oss_dtc.h>
//#include <Proxies/Buildings/bld_dtc.h>
//#include <Proxies/Buildings/bld.hpp>
#include <QtCore/QObject>
#include <QtCore/QMap>
namespace ExerciseEventManagement
{
class HandlerEquipmentErrorRegistration : public QObject
{
Q_OBJECT
public:
explicit HandlerEquipmentErrorRegistration(MainHandler *mainHandler,
const std::shared_ptr<DdsHandler> &ddsHandler,
const std::shared_ptr<DbHandler> &db,
const std::shared_ptr<WebSocketEventServer> &eventServer);
~HandlerEquipmentErrorRegistration();
/**
* Initialize the handler to manage information from infrastructure management
*/
bool init();
/**
* Returns the shared pointer to OSS DTC Interface.
*/
std::shared_ptr<OcSituationServer::Interface::Dtc> dtc() const
{
return m_ossDtc;
}
Q_SIGNALS:
private Q_SLOTS:
/**
* Handle the signals from 'OcSituationServer'
*/
void onEquipmentErrorRegistrationChanged(const OcSituationServer::EquipmentErrorRegistration &data, DataModification modType);
private: // methoden
void publishData(const Database::EemEvent &data);
ExerciseEventManagement::Event toDdsData(const Database::EemEvent &data);
private: // attributes
MainHandler *m_mainHandler;
std::shared_ptr<DdsHandler> m_ddsHandler;
std::shared_ptr<DbHandler> m_dbHandler;
std::shared_ptr<WebSocketEventServer> m_eventServer;
std::shared_ptr<OcSituationServer::Interface::Dtc> m_ossDtc;
NGL::INGLLogger &m_logger;
};
} // namespace ExerciseEventManagement