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

+38
View File
@@ -0,0 +1,38 @@
/**
* Handler to publish (project) static data to dds
* $Id$
* $HeadURL$
* $Author$
* Created by Christian Ehrlicher, SLSE, 2017-07-20
*/
#pragma once
#include "dds_handler.h"
#include "pdm_db.h"
#include "logger.h"
namespace ProjectDataManagement
{
template <typename DB>
bool publishData(const std::shared_ptr<DatabaseInterface> &db,
const std::shared_ptr<ProjectDataManagement::Interface::Dts> &dts,
NGL::INGLLogger &logger)
{
const auto cb = [dts](const DB & data)
{
dts->publish(convert(data));
};
// read from db
if (!db->select(cb))
{
ERROR_LOG(logger) << "Error reading data from database!";
return false;
}
return true;
}
} // namespace ProjectDataManagement