Initial commit
This commit is contained in:
commit
b7d90b9afe
16245 files changed
+3396666
No files matched your search
@@ -0,0 +1,69 @@
|
||||
/**
|
||||
* @RDE_HEADER@
|
||||
* The AlarmToMap class handles the transfer from MainStructureElement-DDS-Data to a representation on the map
|
||||
* $Id$
|
||||
* $HeadURL$
|
||||
* $Author$
|
||||
* Created by Norbert Thoden, NLSE, 2018-06-26
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "sim_to_situation_map_tmpl.h"
|
||||
#include <Plugins/AlarmManagement/alm_data_plugin_interface.h>
|
||||
#include <MapObjects/geo_image.h>
|
||||
|
||||
|
||||
namespace SituationMap
|
||||
{
|
||||
|
||||
// AlarmManagement::Notification: implemented for EmergencyCalls
|
||||
|
||||
class AlarmToMap final : public Sim2SituationMap<AlarmManagement::Notification, SituationMap::GeoImage>
|
||||
, protected DdsFilterHandling<SituationMap::GeoImage>
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
using BaseClass = SituationMap::Sim2SituationMap<AlarmManagement::Notification, SituationMap::GeoImage>;
|
||||
using FilterClass = DdsFilterHandling<SituationMap::GeoImage>;
|
||||
|
||||
public:
|
||||
AlarmToMap(ObjectFactory &objFac,
|
||||
const QString &layername,
|
||||
int drawOrder,
|
||||
const char *loggerName)
|
||||
: BaseClass(objFac, layername, drawOrder, loggerName)
|
||||
, FilterClass(loggerName, this)
|
||||
, m_pluginProvider(nullptr)
|
||||
{}
|
||||
|
||||
bool init(PluginProvider *pluginProvider);
|
||||
|
||||
bool run() override;
|
||||
void stop() override;
|
||||
|
||||
// bool unifiedMapObjectData(UniqueMapId uniqueMapId, UnifiedMapObjectData &umodOut) const override;
|
||||
|
||||
protected:
|
||||
bool isElapsed(const Sim2SituationMap::DDS_T &data) const override;
|
||||
int32_t getSimId(const Sim2SituationMap::DDS_T &ddsData) const override;
|
||||
bool updateElementImpl(const DDS_T &ddsData, RefPointer<MAP_T> mapObj) override;
|
||||
|
||||
bool symbolAppearanceSettingsChangesAreRelevant(const FilterManagement::SymbolAppearanceSettings::Settings &newSas) const override
|
||||
{
|
||||
return (m_currentSymbolSettings.symbolSettings.symbolScale != newSas.symbolSettings.symbolScale);
|
||||
}
|
||||
void handleSymbolAppearanceSettings(RefPointer<MAP_T> &mapObj) override
|
||||
{
|
||||
mapObj->setScale(m_currentSymbolSettings.symbolSettings.symbolScale);
|
||||
}
|
||||
|
||||
signals:
|
||||
void alarmUpdated(const QString &name, const Point3D &geoPosition);
|
||||
|
||||
private: // attributes
|
||||
PluginProvider *m_pluginProvider;
|
||||
std::shared_ptr<AlarmManagement::Interface::Dtc> m_almDtc;
|
||||
|
||||
}; // class AlarmToMap
|
||||
} // namespace SituationMap
|
||||
Reference in new issue
Block a user