Psyllid
v1.12.4
Project 8 Data Acquisisition Software
|
Manages one or multiple sets of midge-nodes. More...
#include <stream_manager.hh>
Classes | |
struct | stream_template |
Public Types | |
typedef std::shared_ptr< midge::diptera > | midge_ptr_t |
Public Member Functions | |
stream_manager () | |
virtual | ~stream_manager () |
bool | initialize (const scarab::param_node &a_config) |
bool | add_stream (const std::string &a_name, const scarab::param_node &a_node) |
const stream_template * | get_stream (const std::string &a_name) const |
void | remove_stream (const std::string &a_name) |
bool | configure_node (const std::string &a_stream_name, const std::string &a_node_name, const scarab::param_node &a_config) |
bool | dump_node_config (const std::string &a_stream_name, const std::string &a_node_name, scarab::param_node &a_config) const |
void | reset_midge () |
bool | must_reset_midge () const |
midge_package | get_midge () |
void | return_midge (midge_package &&a_midge) |
active_node_bindings * | get_node_bindings () |
std::string | get_node_run_str () const |
bool | is_in_use () const |
dripline::reply_ptr_t | handle_add_stream_request (const dripline::request_ptr_t a_request) |
dripline::reply_ptr_t | handle_remove_stream_request (const dripline::request_ptr_t a_request) |
dripline::reply_ptr_t | handle_configure_node_request (const dripline::request_ptr_t a_request) |
dripline::reply_ptr_t | handle_dump_config_node_request (const dripline::request_ptr_t a_request) |
dripline::reply_ptr_t | handle_get_stream_list_request (const dripline::request_ptr_t a_request) |
dripline::reply_ptr_t | handle_get_stream_node_list_request (const dripline::request_ptr_t a_request) |
Private Types | |
typedef std::map< std::string, stream_template > | streams_t |
Private Member Functions | |
void | _add_stream (const std::string &a_name, const scarab::param_node &a_node) |
void | _add_stream (const std::string &a_name, const std::string &a_type, const scarab::param_node &a_node) |
void | _remove_stream (const std::string &a_name) |
void | _configure_node (const std::string &a_stream_name, const std::string &a_node_name, const scarab::param_node &a_config) |
void | _dump_node_config (const std::string &a_stream_name, const std::string &a_node_name, scarab::param_node &a_config) const |
void | clear_node_bindings () |
Private Attributes | |
streams_t | f_streams |
std::mutex | f_manager_mutex |
midge_ptr_t | f_midge |
active_node_bindings | f_node_bindings |
bool | f_must_reset_midge |
std::mutex | f_midge_mutex |
Manages one or multiple sets of midge-nodes.
Holds pointer to midge object that is running all nodes. With initialization, stream_manager is given the node configurations set for the currently running psyllid instance. A stream is added for every configured set of midge nodes. For every node in a node config an instance of the nodes builder class is created. daq_control activate-daq calls reset_midge in stream_manager. reset_midge makes fresh copies of the configured node classes and the node binding classes and adds the classes and all the node connections to the midge object. The node binding classes allow access to the nodes held and owned by midge. Via the node binding classes some node configurations can be changed while the daq is activated. When the daq is de- or re-activated these settings are lost, as stream_manager makes a fresh copy of every node with the original/global configurations.
Definition at line 51 of file stream_manager.hh.
typedef std::shared_ptr< midge::diptera > midge_ptr_t |
Definition at line 67 of file stream_manager.hh.
|
private |
Definition at line 115 of file stream_manager.hh.
stream_manager | ( | ) |
Definition at line 32 of file stream_manager.cc.
|
virtual |
Definition at line 42 of file stream_manager.cc.
|
private |
Definition at line 175 of file stream_manager.cc.
|
private |
Definition at line 213 of file stream_manager.cc.
|
private |
Definition at line 131 of file stream_manager.cc.
|
private |
Definition at line 152 of file stream_manager.cc.
|
private |
Definition at line 287 of file stream_manager.cc.
bool add_stream | ( | const std::string & | a_name, |
const scarab::param_node & | a_node | ||
) |
Definition at line 74 of file stream_manager.cc.
|
private |
Definition at line 417 of file stream_manager.cc.
bool configure_node | ( | const std::string & | a_stream_name, |
const std::string & | a_node_name, | ||
const scarab::param_node & | a_config | ||
) |
Definition at line 103 of file stream_manager.cc.
bool dump_node_config | ( | const std::string & | a_stream_name, |
const std::string & | a_node_name, | ||
scarab::param_node & | a_config | ||
) | const |
Definition at line 117 of file stream_manager.cc.
midge_package get_midge | ( | ) |
Definition at line 372 of file stream_manager.cc.
|
inline |
Definition at line 141 of file stream_manager.hh.
std::string get_node_run_str | ( | ) | const |
Definition at line 389 of file stream_manager.cc.
|
inline |
Definition at line 127 of file stream_manager.hh.
dripline::reply_ptr_t handle_add_stream_request | ( | const dripline::request_ptr_t | a_request | ) |
Definition at line 429 of file stream_manager.cc.
dripline::reply_ptr_t handle_configure_node_request | ( | const dripline::request_ptr_t | a_request | ) |
Definition at line 476 of file stream_manager.cc.
dripline::reply_ptr_t handle_dump_config_node_request | ( | const dripline::request_ptr_t | a_request | ) |
Definition at line 556 of file stream_manager.cc.
dripline::reply_ptr_t handle_get_stream_list_request | ( | const dripline::request_ptr_t | a_request | ) |
Definition at line 614 of file stream_manager.cc.
dripline::reply_ptr_t handle_get_stream_node_list_request | ( | const dripline::request_ptr_t | a_request | ) |
Definition at line 641 of file stream_manager.cc.
dripline::reply_ptr_t handle_remove_stream_request | ( | const dripline::request_ptr_t | a_request | ) |
Definition at line 448 of file stream_manager.cc.
bool initialize | ( | const scarab::param_node & | a_config | ) |
Definition at line 56 of file stream_manager.cc.
bool is_in_use | ( | ) | const |
Definition at line 406 of file stream_manager.cc.
|
inline |
Definition at line 135 of file stream_manager.hh.
void remove_stream | ( | const std::string & | a_name | ) |
Definition at line 89 of file stream_manager.cc.
void reset_midge | ( | ) |
Definition at line 313 of file stream_manager.cc.
void return_midge | ( | midge_package && | a_midge | ) |
Definition at line 381 of file stream_manager.cc.
|
mutableprivate |
Definition at line 118 of file stream_manager.hh.
|
private |
Definition at line 120 of file stream_manager.hh.
|
mutableprivate |
Definition at line 123 of file stream_manager.hh.
|
private |
Definition at line 122 of file stream_manager.hh.
|
private |
Definition at line 121 of file stream_manager.hh.
|
private |
Definition at line 116 of file stream_manager.hh.