- cmake/FindRTI.cmake: Add INTERFACE placeholder targets when RTI not found - cmake/FindRTI.cmake: Force BUILD_RTI=OFF when RTI not installed - Lts/Common/LtsSession/CMakeLists.txt: Make LtsSessionDataDds conditional on BUILD_RTI - Lts/Viewer/CMakeLists.txt: Make LtsDataView conditional on BUILD_RTI - Lts/Plugins/*/CMakeLists.txt: 97 plugin files wrapped in BUILD_RTI conditionals - cmake/NGLMacros.cmake: Fix NGL_ADD_BIG_RESOURCES macro (removed premature return()) - Multiple Qt6 API fixes: QLinkedList→std::list, QStringRef→QStringView, etc. - BUILD_RTI_FIXES_SUMMARY.md: Comprehensive documentation of all fixes Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
96 lines
3.5 KiB
C++
Executable File
96 lines
3.5 KiB
C++
Executable File
/**
|
|
* Handler for infrastructure data
|
|
* $Id$
|
|
* $HeadURL$
|
|
* $Author$
|
|
* Created by hjl, SLSE, 2016-09-21
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include "main_handler.h"
|
|
#include "logger.h"
|
|
|
|
#include <ParticipantManagement/ppm.hpp>
|
|
#include <AreaEffectSimulation/aes_dtc.h>
|
|
#include <Proxies/Buildings/bld_dtc.h>
|
|
#include <Proxies/Buildings/bld.hpp>
|
|
|
|
#include <QtCore/QObject>
|
|
#include <QtCore/QMap>
|
|
|
|
namespace ExerciseEventManagement
|
|
{
|
|
class WebSocketEventServer;
|
|
|
|
class HandlerDynamicParticipantData : public QObject
|
|
{
|
|
Q_OBJECT
|
|
public:
|
|
explicit HandlerDynamicParticipantData(MainHandler *mainHandler,
|
|
const std::shared_ptr<DdsHandler> &ddsHandler,
|
|
const std::shared_ptr<DbHandler> &db,
|
|
const std::shared_ptr<WebSocketEventServer> &eventServer);
|
|
|
|
~HandlerDynamicParticipantData();
|
|
|
|
/**
|
|
* Initialize the handler to manage information from infrastructure management
|
|
*/
|
|
bool init();
|
|
|
|
|
|
/**
|
|
* Returns the shared pointer to PPM DTC Interface.
|
|
*/
|
|
std::shared_ptr<ParticipantManagement::Interface::Dtc> dtc() const
|
|
{
|
|
return m_ppmDtc;
|
|
}
|
|
|
|
|
|
private Q_SLOTS:
|
|
void tryCreateHitEvent(Database::EemEvent eData,
|
|
const ParticipantManagement::StateInformation &stateInfo);
|
|
/**
|
|
* Handle the signals from 'ParticipantManagement'
|
|
*/
|
|
void onDynamicParticipantDataChanged(const ParticipantManagement::DynamicParticipantData &data, DataModification modType);
|
|
void onParticipantGearEventChanged(const ParticipantManagement::ParticipantGearEvent &data, DataModification modType);
|
|
void onParticipantChanged(const ParticipantManagement::Participant &data, DataModification modType);
|
|
void onBiteChanged(const ParticipantManagement::Bite &data, DataModification modType);
|
|
void onBuildingStateChanged(const Buildings::BuildingState &data, DataModification modType);
|
|
void onParticipantPositionChanged(const ParticipantManagement::ParticipantPosition &data, DataModification modType);
|
|
void onAesItemViewChanged(const AreaEffectSimulation::AesItemView &data, DataModification modType);
|
|
/**
|
|
* Handle MainStructureElement from 'ISM'
|
|
*/
|
|
void onMainStructureElementChanged(const InfrastructureManagement::MainStructureElement &data, DataModification modType);
|
|
|
|
private: // methoden
|
|
void publishData(const Database::EemEvent &data);
|
|
ExerciseEventManagement::Event toDdsData(const Database::EemEvent &data);
|
|
|
|
private: // attributes
|
|
std::shared_ptr<DdsHandler> m_ddsHandler; ///< Pointer to DDS handler
|
|
std::shared_ptr<DbHandler> m_dbHandler;
|
|
std::shared_ptr<WebSocketEventServer> m_eventServer;
|
|
|
|
std::shared_ptr<ParticipantManagement::Interface::Dtc> m_ppmDtc; ///< Pointer to DTC ParticipantManagement interface object
|
|
std::shared_ptr<Buildings::Interface::Dtc> m_bldDtc; ///< Pointer to DTC ParticipantManagement interface object
|
|
std::shared_ptr<AreaEffectSimulation::Interface::Dtc> m_aesDtc;
|
|
|
|
QHash<qint32, ParticipantManagement::Participant> m_partMap;
|
|
QHash<qint32, ParticipantManagement::ParticipantPosition> m_partPosMap;
|
|
QHash<qint32, ParticipantManagement::DynamicParticipantData> m_lastDynData;
|
|
|
|
QHash<int, AreaEffectSimulation::AesType> m_itemViews;
|
|
QHash<int, InfrastructureManagement::MainStructureElement> m_mainStructureElements;
|
|
|
|
MainHandler *m_mainHandler;
|
|
|
|
|
|
};
|
|
} // namespace ExerciseEventManagement
|
|
|