#include <ConfigObjectFactory.hpp>
Definition at line 26 of file ConfigObjectFactory.hpp.
◆ ConfigObjectFactory() [1/2]
dunedaq::appmodel::ConfigObjectFactory::ConfigObjectFactory |
( |
conffwk::Configuration * | config, |
|
|
const std::string & | dbfile, |
|
|
const std::string & | app_uid ) |
Definition at line 7 of file ConfigObjectFactory.cpp.
13
14
16}
conffwk::Configuration * m_config
static void set_nolock_mode(bool nl)
◆ ConfigObjectFactory() [2/2]
dunedaq::appmodel::ConfigObjectFactory::ConfigObjectFactory |
( |
const conffwk::DalObject * | parent | ) |
|
◆ ~ConfigObjectFactory()
dunedaq::appmodel::ConfigObjectFactory::~ConfigObjectFactory |
( |
| ) |
|
◆ create()
conffwk::ConfigObject dunedaq::appmodel::ConfigObjectFactory::create |
( |
const std::string & | class_name, |
|
|
const std::string & | id ) const |
|
nodiscard |
Definition at line 35 of file ConfigObjectFactory.cpp.
36 {
39 return cfg_obj;
40}
void create(const std::string &at, const std::string &class_name, const std::string &id, ConfigObject &object)
Create new object by class name and object id.
◆ create_net_obj() [1/2]
Definition at line 102 of file ConfigObjectFactory.cpp.
102 {
104}
conffwk::ConfigObject create_net_obj(const NetworkConnectionDescriptor *ndesc, std::string uid) const
Helper function that gets a network connection config.
◆ create_net_obj() [2/2]
Helper function that gets a network connection config.
- Parameters
-
uid | Unique ID name of the config object |
ndesc | Network connection descriptor object |
\ret OKS configuration object for the network connection
Definition at line 87 of file ConfigObjectFactory.cpp.
88 {
89
90 auto svc_obj = ndesc->get_associated_service()->config_object();
91 std::string net_id = ndesc->get_uid_base() + app_uid;
92 auto net_obj =
create(
"NetworkConnection", net_id);
93
94 net_obj.set_by_val<std::string>("data_type", ndesc->get_data_type());
95 net_obj.set_by_val<std::string>("connection_type", ndesc->get_connection_type());
96 net_obj.set_obj("associated_service", &svc_obj);
97
98 return net_obj;
99}
conffwk::ConfigObject create(const std::string &class_name, const std::string &id) const
◆ create_queue_obj()
Definition at line 44 of file ConfigObjectFactory.cpp.
44 {
45
46 std::string queue_uid(qdesc->get_uid_base() + uid);
47 auto queue_obj =
create(
"Queue", queue_uid);
48 queue_obj.set_by_val<std::string>("data_type", qdesc->get_data_type());
49 queue_obj.set_by_val<std::string>("queue_type", qdesc->get_queue_type());
50 queue_obj.set_by_val<uint32_t>("capacity", qdesc->get_capacity());
51
52 return queue_obj;
53}
◆ create_queue_sid_obj() [1/2]
Definition at line 71 of file ConfigObjectFactory.cpp.
72 {
74}
conffwk::ConfigObject create_queue_sid_obj(const QueueDescriptor *qdesc, uint32_t src_id) const
◆ create_queue_sid_obj() [2/2]
Definition at line 57 of file ConfigObjectFactory.cpp.
57 {
58 std::string queue_uid(fmt::format("{}{}", qdesc->get_uid_base(), src_id));
59 auto queue_obj =
create(
"QueueWithSourceId", queue_uid);
60
61 queue_obj.set_by_val<std::string>("data_type", qdesc->get_data_type());
62 queue_obj.set_by_val<std::string>("queue_type", qdesc->get_queue_type());
63 queue_obj.set_by_val<uint32_t>("capacity", qdesc->get_capacity());
64 queue_obj.set_by_val<uint32_t>(
"source_id",
src_id);
65
66 return queue_obj;
67}
◆ get_dal() [1/2]
Definition at line 75 of file ConfigObjectFactory.hpp.
75 {
77 }
void get(const std::string &class_name, const std::string &id, ConfigObject &object, unsigned long rlevel=0, const std::vector< std::string > *rclasses=0)
Get object by class name and object id (multi-thread safe).
◆ get_dal() [2/2]
template<class T >
const T * dunedaq::appmodel::ConfigObjectFactory::get_dal |
( |
std::string | uid | ) |
const |
|
inline |
◆ m_app_uid
std::string dunedaq::appmodel::ConfigObjectFactory::m_app_uid |
|
private |
◆ m_config
◆ m_dbfile
std::string dunedaq::appmodel::ConfigObjectFactory::m_dbfile |
|
private |
The documentation for this class was generated from the following files: