Psyllid
v1.12.4
Project 8 Data Acquisisition Software
|
A class sequentially execute a list of actions, equivalent to a sequence of dripline requests. More...
#include <batch_executor.hh>
Public Member Functions | |
batch_executor () | |
batch_executor (const scarab::param_node &a_master_config, std::shared_ptr< request_receiver > a_request_receiver) | |
virtual | ~batch_executor () |
mv_referrable_const (scarab::param_node, batch_commands) | |
void | clear_queue () |
void | add_to_queue (const scarab::param_node &an_action) |
void | add_to_queue (const scarab::param_array &actions_array) |
void | add_to_queue (const std::string &a_batch_command_name) |
void | replace_queue (const scarab::param_node &an_action) |
void | replace_queue (const scarab::param_array &actions_array) |
void | replace_queue (const std::string &a_batch_command_name) |
dripline::reply_ptr_t | do_batch_cmd_request (const std::string &a_command, const dripline::request_ptr_t a_request) |
dripline::reply_ptr_t | do_replace_actions_request (const std::string &a_command, const dripline::request_ptr_t a_request) |
void | execute (std::condition_variable &a_daq_control_ready_cv, std::mutex &a_daq_control_ready_mutex, bool a_run_forever=false) |
![]() | |
control_access () | |
virtual | ~control_access () |
Private Member Functions | |
void | do_an_action () |
Static Private Member Functions | |
static action_info | parse_action (const scarab::param_node &a_action) |
Private Attributes | |
std::shared_ptr< request_receiver > | f_request_receiver |
scarab::concurrent_queue< action_info > | f_action_queue |
scarab::param_node | f_condition_actions |
Additional Inherited Members | |
![]() | |
typedef std::shared_ptr< daq_control > | dc_ptr_t |
![]() | |
static void | set_daq_control (std::weak_ptr< daq_control > a_daq_control) |
![]() | |
dc_ptr_t | use_daq_control () |
bool | daq_control_expired () |
![]() | |
static std::weak_ptr< daq_control > | f_daq_control = std::weak_ptr< daq_control >() |
A class sequentially execute a list of actions, equivalent to a sequence of dripline requests.
batch_executor is a control component used to submit a pre-defined sequence of requests upon startup and in a non-interactive way. This allows submission of any request which would normally be sent via a dripline request. It can also supports (currently one) custom command (type = wait-for), which will poll the provided rks and wait for the return payload to not indicate a daq_status of running.
The actions taken are defined in the top-level param_node of psyllid's config file named "batch-actions", which must be of type array. Each element of the array is expected to be another param_node and have the following keys:
Definition at line 58 of file batch_executor.hh.
batch_executor | ( | ) |
Definition at line 31 of file batch_executor.cc.
batch_executor | ( | const scarab::param_node & | a_master_config, |
std::shared_ptr< request_receiver > | a_request_receiver | ||
) |
Definition at line 41 of file batch_executor.cc.
|
virtual |
Definition at line 67 of file batch_executor.cc.
void add_to_queue | ( | const scarab::param_node & | an_action | ) |
Definition at line 79 of file batch_executor.cc.
void add_to_queue | ( | const scarab::param_array & | actions_array | ) |
Definition at line 84 of file batch_executor.cc.
void add_to_queue | ( | const std::string & | a_batch_command_name | ) |
Definition at line 94 of file batch_executor.cc.
void clear_queue | ( | ) |
Definition at line 71 of file batch_executor.cc.
|
private |
Definition at line 189 of file batch_executor.cc.
dripline::reply_ptr_t do_batch_cmd_request | ( | const std::string & | a_command, |
const dripline::request_ptr_t | a_request | ||
) |
Definition at line 125 of file batch_executor.cc.
dripline::reply_ptr_t do_replace_actions_request | ( | const std::string & | a_command, |
const dripline::request_ptr_t | a_request | ||
) |
Definition at line 139 of file batch_executor.cc.
void execute | ( | std::condition_variable & | a_daq_control_ready_cv, |
std::mutex & | a_daq_control_ready_mutex, | ||
bool | a_run_forever = false |
||
) |
Definition at line 162 of file batch_executor.cc.
mv_referrable_const | ( | scarab::param_node | , |
batch_commands | |||
) |
|
staticprivate |
Definition at line 227 of file batch_executor.cc.
void replace_queue | ( | const scarab::param_node & | an_action | ) |
Definition at line 106 of file batch_executor.cc.
void replace_queue | ( | const scarab::param_array & | actions_array | ) |
Definition at line 112 of file batch_executor.cc.
void replace_queue | ( | const std::string & | a_batch_command_name | ) |
Definition at line 118 of file batch_executor.cc.
|
private |
Definition at line 83 of file batch_executor.hh.
|
private |
Definition at line 84 of file batch_executor.hh.
|
private |
Definition at line 82 of file batch_executor.hh.