- BUILD_RTI conditional compilation für RTI Connext DDS dependencies - Namespace fixes in core_dtc.h (Core:: → DDS::Core::) - CMakeLists.txt: BUILD_RTI option und conditional dependencies - Handler minelayer: namespace closing mit BUILD_RTI guard - Build erfolgreich mit BUILD_RTI=OFF validiert Signed-off-by: Torsten Wierschin <torsten.wierschin@life-maps.com>
64 lines
1.9 KiB
C++
Executable File
64 lines
1.9 KiB
C++
Executable File
/**
|
|
* 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(NGL::NGLLoggerBootstrap::getNGLRootLogger()) {
|
|
} // 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
|