Initial commit

This commit is contained in:
torsten committed 2026-08-13 18:33:10 +02:00
commit b7d90b9afe
16245 files changed
+3396666

No files matched your search

@@ -0,0 +1,65 @@
/**
* Handler for all meteo data units
* $Id$
* $HeadURL$
* $Author$
* Created by hjl, SLSE, 2016-09-27
*/
#include "handler_meteo_data_units.h"
#include "handler_meteo_data_unit.h"
#include "handler_infrastructure_data.h"
namespace MeteoDataManagement
{
HandlerMeteoDataUnits::HandlerMeteoDataUnits(MainHandler *mainHandler)
: m_mainHandler(mainHandler)
, m_logger(getLogger("HandlerMeteoDataUnits"))
{
} // end of ctor()
//-----------------------------------------------------------------------------
HandlerMeteoDataUnits::~HandlerMeteoDataUnits()
{
qDeleteAll(m_handlerMeteoDataUnitsMap);
} // end of dtor()
//-----------------------------------------------------------------------------
bool HandlerMeteoDataUnits::init()
{
INFO_LOG(m_logger) << "HandlerMeteoDataUnits::init().... Initialisation of MDU's will be started from ISM directly. ";
return true;
} // end of init()
//-----------------------------------------------------------------------------
bool HandlerMeteoDataUnits::addMeteoDataUnit(const InfrastructureManagement::InstrumentationAsset &asset)
{
INFO_LOG(m_logger) << "addMeteoDataUnit: " << asset;
removeMeteoDataUnit(asset); // just to be sure
HandlerMeteoDataUnit *hMDU = new HandlerMeteoDataUnit(m_mainHandler, asset);
m_handlerMeteoDataUnitsMap.insert(asset.id(), hMDU);
return false;
} // end of addMeteoDataUnit()
//-----------------------------------------------------------------------------
bool HandlerMeteoDataUnits::removeMeteoDataUnit(const InfrastructureManagement::InstrumentationAsset &asset)
{
INFO_LOG(m_logger) << "removeMeteoDataUnit: " << asset;
auto it = m_handlerMeteoDataUnitsMap.find(asset.id());
if (it == m_handlerMeteoDataUnitsMap.end())
return false;
delete it.value();
m_handlerMeteoDataUnitsMap.erase(it);
return true;
} // end of removeMeteoDataUnit()
//-----------------------------------------------------------------------------
} // Namespace MeteoDataManagement