61 lines
1.8 KiB
C++
Executable File
61 lines
1.8 KiB
C++
Executable File
/**
|
|
* Handler for aes data received transparent by the oc-laptop
|
|
* $Id$
|
|
* $HeadURL$
|
|
* $Author$
|
|
* Created by Philipp Dassow, NLST, 18-04-2018
|
|
*/
|
|
#pragma once
|
|
|
|
#include <QObject>
|
|
#include <QPointF>
|
|
|
|
#include <LtsCoordTrans/lts_coord_trans.h>
|
|
|
|
#include "main_handler.h"
|
|
#include "logger.h"
|
|
|
|
namespace OcSituationClient
|
|
{
|
|
class HandlerOcAesData : public QObject
|
|
, protected AreaEffectSimulation::Interface::Ftc::DangerAreaModifyReplyHandler
|
|
, protected AreaEffectSimulation::Interface::Ftc::DangerAreaRemoveReplyHandler
|
|
{
|
|
Q_OBJECT
|
|
|
|
public:
|
|
explicit HandlerOcAesData(MainHandler *mainHandler,
|
|
QObject *parent = nullptr);
|
|
~HandlerOcAesData();
|
|
|
|
bool init();
|
|
|
|
void process(const QByteArray &data);
|
|
|
|
void onDangerAreaModifyReply(const Core::FunctionReplyObject &reply);
|
|
void onDangerAreaRemoveReply(const Core::FunctionReplyObject &reply);
|
|
|
|
private:
|
|
void handleDangerAreas(const QByteArray &data, size_t pos);
|
|
void handleIeds(const QByteArray &data, size_t pos);
|
|
void handleIedPositions(const QByteArray &data, size_t pos);
|
|
Core::GeoPosition2D relativeFromGeoPosition(int x, int y);
|
|
|
|
void onSpecificsExerciseChanged(const TrainingAreaBaseOC::SpecificsExercise &data, DataModification mod);
|
|
|
|
// for partition time
|
|
std::shared_ptr<DdsHandler> m_dds;
|
|
|
|
// data publishing
|
|
std::shared_ptr<AreaEffectSimulation::Interface::Dtc> m_aesDtc;
|
|
std::shared_ptr<AreaEffectSimulation::Interface::Ftc> m_aesFtc;
|
|
std::shared_ptr<GuezIedManagement::Interface::Dtc> m_gimDtc;
|
|
std::shared_ptr<TrainingAreaBase::Interface::Dts> m_tabDts;
|
|
std::shared_ptr<TrainingAreaBaseOC::Interface::Dtc> m_tabocDtc;
|
|
|
|
LtsCoordTrans::UtmCoordinate m_utmCoord; // for position translation to relative
|
|
|
|
LOGGER_T &m_logger;
|
|
};
|
|
} // namespace OcSituationClient
|