Initial commit
This commit is contained in:
commit
b7d90b9afe
16245 files changed
+3396666
No files matched your search
@@ -0,0 +1,51 @@
|
||||
/**
|
||||
* Handler for static meteo data request
|
||||
* $Id$
|
||||
* $HeadURL$
|
||||
* $Author$
|
||||
* Created by hjl, SLSE, 2016-10-12
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "dds_handler.h"
|
||||
#include <mdm_fts.h>
|
||||
#include <MeteoDataManagement/mdm_db.h>
|
||||
|
||||
namespace MeteoDataManagement
|
||||
{
|
||||
|
||||
class HandlerStaticMeteoData final : protected Interface::Fts::StaticMeteoDataModifyRequestHandler
|
||||
{
|
||||
public:
|
||||
explicit HandlerStaticMeteoData(const std::shared_ptr<DdsHandler> &ddsHandler,
|
||||
const std::shared_ptr<DatabaseInterface> &db);
|
||||
|
||||
bool init();
|
||||
|
||||
private: // methods
|
||||
void onStaticMeteoDataModifyRequest(const rti::core::SampleIdentity &cookie,
|
||||
const StaticMeteoDataModifyRequest &request) override final;
|
||||
|
||||
bool updateStaticMeteoDatainDB(const StaticMeteoDataModifyRequest &request);
|
||||
|
||||
void onPublishData();
|
||||
|
||||
bool insertDefaultStaticMeteoDataEntry();
|
||||
|
||||
|
||||
// convert methodes
|
||||
static MeteoData toDdsData(const Database::MdmStaticMeteoData &dbData); // db -> dds
|
||||
// for modify request
|
||||
static Database::MdmStaticMeteoData ddsInputDataToDbData(const StaticMeteoDataModifyRequest &ddsData); // dds -> db
|
||||
|
||||
|
||||
private: // attributes
|
||||
std::shared_ptr<DdsHandler> m_ddsHandler;
|
||||
std::shared_ptr<DatabaseInterface> m_db;
|
||||
Database::MdmStaticMeteoData m_dbStaticMeteoData;
|
||||
NGL::INGLLogger &m_logger;
|
||||
|
||||
};
|
||||
|
||||
} // namespace MeteoDataManagement
|
||||
Reference in new issue
Block a user