13#ifndef DDT_FORWARDER_HPP
14#define DDT_FORWARDER_HPP
21#include <fmt/format.h>
38template <
class T,
class...
Args>
40 units.emplace_back(std::make_unique<T>(std::forward<Args>(
args)...));
60 :
m_logger(componentFramework::GetLogger(
"rtctk"))
61 , m_oldb(services.Get<
OldbIf>())
153 fmt::format(
"State '{}' does not fulfill precondition '{}'.",
172 std::string m_comp_id;
173 std::string m_fwd_id;
174 std::atomic<State> m_state;
176 std::string m_oldb_prefix;
Class used to parse default command line arguments.
Definition rtcComponentArgs.hpp:33
This class provides a wrapper for a data point path.
Definition dataPointPath.hpp:74
Base interface for all OLDB adapters.
Definition oldbIf.hpp:25
void CreateDataPoint(const DataPointPath &path)
Creates a new datapoint in the repository.
Definition repositoryIf.ipp:1696
void SetDataPoint(const DataPointPath &path, const T &value)
Sets a datapoint in the repository.
Definition repositoryIf.ipp:1720
The RtctkException class is the base class for all Rtctk exceptions.
Definition exceptions.hpp:211
Container class that holds services of any type.
Definition serviceContainer.hpp:39
Base class defining common interface for all DDT forwarders.
Definition ddtForwarder.hpp:46
const std::map< State, std::string > m_state_text
Definition ddtForwarder.hpp:159
DdtForwarder(const std::string &comp_id, const std::string &fwd_type, const std::string &fwd_id, ServiceContainer &services)
Definition ddtForwarder.hpp:56
virtual void Stop()=0
Stop the processing thread of the forwarder unit.
virtual void Update()=0
Reload dynamic configuration of the forwarder unit.
virtual void Start()=0
Start the processing thread of the forwarder unit.
void AssertState(const std::set< State > &states)
Definition ddtForwarder.hpp:144
virtual void Idle()=0
Stop publishing DDT streams.
virtual void SetState(State state)
Definition ddtForwarder.hpp:131
State
States a forwarder unit can be in.
Definition ddtForwarder.hpp:54
log4cplus::Logger & m_logger
Definition ddtForwarder.hpp:167
virtual ~DdtForwarder()=default
virtual void Recover()=0
Stop the processing thread of the forwarder unit and clear errors.
State GetState()
Get the state of the forwarder unit.
Definition ddtForwarder.hpp:91
std::string GetId()
Get identifier of the forwarder unit.
Definition ddtForwarder.hpp:84
virtual void CheckErrors()=0
Check for Errors, will rethrow errors thrown in the forwarder.
virtual void Run()=0
Start publishing DDT streams.
Provides macros and utilities for exception handling.
Logging Support Library based on log4cplus.
Definition ddsSub.hpp:151
Definition commandReplier.cpp:22
elt::mal::future< std::string > InjectReqRepEvent(StateMachineEngine &engine)
Definition malEventInjector.hpp:23
Definition businessLogic.cpp:24
void AddDdtForwarder(DdtForwarderListType &units, Args &&... args)
Definition ddtForwarder.hpp:39
std::function< DdtForwarderListType( const std::string &, rtctk::componentFramework::ServiceContainer &)> DdtForwarderFactoryType
Definition ddtForwarder.hpp:35
std::list< std::unique_ptr< DdtForwarder > > DdtForwarderListType
Definition ddtForwarder.hpp:34
Header file for OldbIf, which defines the API for OldbAdapters.
A container that can hold any type of service.