artdaq
v3_09_01
|
The xmlrpc_commander class serves as the XMLRPC server run in each artdaq application. More...
#include <artdaq/ExternalComms/xmlrpc_commander.hh>
Public Member Functions | |
xmlrpc_commander (const fhicl::ParameterSet &ps, artdaq::Commandable &commandable) | |
xmlrpc_commander Constructor More... | |
void | run_server () override |
Run the XMLRPC server. | |
std::string | send_register_monitor (std::string const &monitor_fhicl) override |
Send a register_monitor command over XMLRPC More... | |
std::string | send_unregister_monitor (std::string const &monitor_label) override |
Send an unregister_monitor command over XMLRPC More... | |
std::string | send_init (fhicl::ParameterSet const &ps, uint64_t timeout, uint64_t timestamp) override |
Send an init command over XMLRPC More... | |
std::string | send_soft_init (fhicl::ParameterSet const &ps, uint64_t timeout, uint64_t timestamp) override |
Send a soft_init command over XMLRPC More... | |
std::string | send_reinit (fhicl::ParameterSet const &ps, uint64_t timeout, uint64_t timestamp) override |
Send a reinit command over XMLRPC More... | |
std::string | send_start (art::RunID runNumber, uint64_t timeout, uint64_t timestamp) override |
Send a start command over XMLRPC More... | |
std::string | send_pause (uint64_t timeout, uint64_t timestamp) override |
Send a pause command over XMLRPC More... | |
std::string | send_resume (uint64_t timeout, uint64_t timestamp) override |
Send a resume command over XMLRPC More... | |
std::string | send_stop (uint64_t timeout, uint64_t timestamp) override |
Send a stop command over XMLRPC More... | |
std::string | send_shutdown (uint64_t timeout) override |
Send a shutdown command over XMLRPC More... | |
std::string | send_status () override |
Send a status command over XMLRPC More... | |
std::string | send_report (std::string const &what) override |
Send a report command over XMLRPC More... | |
std::string | send_legal_commands () override |
Send a legal_commands command over XMLRPC More... | |
std::string | send_trace_get (std::string const &name) override |
Send an send_trace_get command over XMLRPC More... | |
std::string | send_trace_set (std::string const &name, std::string const &type, std::string const &mask) override |
Send an send_trace_msgfacility_set command over XMLRPC More... | |
std::string | send_meta_command (std::string const &command, std::string const &argument) override |
Send an send_meta_command command over XMLRPC More... | |
std::string | send_rollover_subrun (uint64_t when, uint32_t sr) override |
Send a send_rollover_subrun command over XMLRPC More... | |
![]() | |
CommanderInterface (const fhicl::ParameterSet &ps, artdaq::Commandable &commandable) | |
CommanderInterface Constructor. More... | |
CommanderInterface (const CommanderInterface &)=delete | |
Copy Constructor is deleted. | |
CommanderInterface & | operator= (const CommanderInterface &)=delete |
Copy Assignment operator is deleted. More... | |
virtual | ~CommanderInterface () |
Default virtual Destructor. | |
bool | GetStatus () |
Determine whether the Commander plugin is ready to accept commands More... | |
virtual std::string | add_config_archive_entry (std::string const &key, std::string const &value) |
Using the transport mechanism, send an add_config_archive_entry command More... | |
virtual std::string | clear_config_archive () |
Using the transport mechanism, send a clear_config_archive command More... | |
Public Attributes | |
std::timed_mutex | mutex_ |
XMLRPC mutex. | |
std::unique_ptr < xmlrpc_c::serverAbyss > | server |
XMLRPC server. | |
![]() | |
artdaq::Commandable & | _commandable |
Reference to the Commandable that this Commander Commands. More... | |
Additional Inherited Members | |
![]() | |
using | Parameters = fhicl::WrappedTable< Config > |
Used for ParameterSet validation (if desired) | |
![]() | |
int | _id |
ID Number of this Commander. | |
std::atomic< bool > | running_ |
Whether the server is running and able to respond to requests. | |
The xmlrpc_commander class serves as the XMLRPC server run in each artdaq application.
Definition at line 16 of file xmlrpc_commander.hh.
artdaq::xmlrpc_commander::xmlrpc_commander | ( | const fhicl::ParameterSet & | ps, |
artdaq::Commandable & | commandable | ||
) |
xmlrpc_commander Constructor
ps | ParameterSet used for configuring xmlrpc_commander |
commandable | artdaq::Commandable object to send transition commands to |
xmlrpc_commander accepts the following Parameters: id: For XMLRPC, the ID should be the port to listen on server_url: When sending, location of XMLRPC server *
Definition at line 1072 of file xmlrpc_commander.cc.
|
overridevirtual |
Send an init command over XMLRPC
The init command is accepted by all artdaq processes that are in the booted state. It expects a ParameterSet for configuration, a timeout, and a timestamp.
ps | ParameterSet received with the init command |
timeout | Timeout for the command |
timestamp | Timestamp of the command |
Reimplemented from artdaq::CommanderInterface.
Definition at line 1484 of file xmlrpc_commander.cc.
|
overridevirtual |
Send a legal_commands command over XMLRPC
This will query the artdaq process, and it will return the list of allowed transition commands from its current state.
Reimplemented from artdaq::CommanderInterface.
Definition at line 1524 of file xmlrpc_commander.cc.
|
overridevirtual |
Send an send_meta_command command over XMLRPC
This will cause the receiver to run the given command with the given argument in user code
command | Command name to send |
argument | Argument for command |
Reimplemented from artdaq::CommanderInterface.
Definition at line 1536 of file xmlrpc_commander.cc.
|
overridevirtual |
Send a pause command over XMLRPC
The pause command pauses a Run. When the run resumes, the subrun number will be incremented. This command accepts a timeout parameter and a timestamp parameter.
timeout | Timeout for the command |
timestamp | Timestamp of the command |
Reimplemented from artdaq::CommanderInterface.
Definition at line 1500 of file xmlrpc_commander.cc.
|
overridevirtual |
Send a register_monitor command over XMLRPC
monitor_fhicl | FHiCL string contianing monitor configuration |
Reimplemented from artdaq::CommanderInterface.
Definition at line 1476 of file xmlrpc_commander.cc.
|
overridevirtual |
Send a reinit command over XMLRPC
The reinit command is accepted by all artdaq processes. It expects a ParameterSet for configuration, a timeout, and a timestamp.
ps | ParameterSet received with the reinit command |
timeout | Timeout for the command |
timestamp | Timestamp of the command |
Reimplemented from artdaq::CommanderInterface.
Definition at line 1492 of file xmlrpc_commander.cc.
|
overridevirtual |
Send a report command over XMLRPC
The report command returns the current value of the requested reportable quantity.
which | Reportable quantity to request |
Reimplemented from artdaq::CommanderInterface.
Definition at line 1520 of file xmlrpc_commander.cc.
|
overridevirtual |
Send a resume command over XMLRPC
The resume command resumes a paused Run. When the run resumes, the subrun number will be incremented. This command accepts a timeout parameter and a timestamp parameter.
timeout | Timeout for the command |
timestamp | Timestamp of the command |
Reimplemented from artdaq::CommanderInterface.
Definition at line 1504 of file xmlrpc_commander.cc.
|
overridevirtual |
Send a send_rollover_subrun command over XMLRPC
This will cause the receiver to rollover the subrun number at the given event. (Event with seqID == boundary will be in new subrun.) Should be sent to all EventBuilders before the given event is processed.
seq | Sequence ID of new subrun |
subrunNumber | Subrun number of the new subrun |
Reimplemented from artdaq::CommanderInterface.
Definition at line 1540 of file xmlrpc_commander.cc.
|
overridevirtual |
Send a shutdown command over XMLRPC
The shutdown command shuts down the artdaq process. This command accepts a timeout parameter.
timeout | Timeout for the command |
Reimplemented from artdaq::CommanderInterface.
Definition at line 1512 of file xmlrpc_commander.cc.
|
overridevirtual |
Send a soft_init command over XMLRPC
The soft_init command is accepted by all artdaq processes that are in the booted state. It expects a ParameterSet for configuration, a timeout, and a timestamp.
ps | ParameterSet received with the soft_init command |
timeout | Timeout for the command |
timestamp | Timestamp of the command |
Reimplemented from artdaq::CommanderInterface.
Definition at line 1488 of file xmlrpc_commander.cc.
|
overridevirtual |
Send a start command over XMLRPC
The start command starts a Run using the given run number. This command also accepts a timeout parameter and a timestamp parameter.
runNumber | Run number of the new run |
timeout | Timeout for the command |
timestamp | Timestamp of the command |
Reimplemented from artdaq::CommanderInterface.
Definition at line 1496 of file xmlrpc_commander.cc.
|
overridevirtual |
Send a status command over XMLRPC
The status command returns the current status of the artdaq process.
Reimplemented from artdaq::CommanderInterface.
Definition at line 1516 of file xmlrpc_commander.cc.
|
overridevirtual |
Send a stop command over XMLRPC
The stop command stops the current Run. This command accepts a timeout parameter and a timestamp parameter.
timeout | Timeout for the command |
timestamp | Timestamp of the command |
Reimplemented from artdaq::CommanderInterface.
Definition at line 1508 of file xmlrpc_commander.cc.
|
overridevirtual |
Send an send_trace_get command over XMLRPC
This will cause the receiver to get the TRACE level masks for the given name Use name == "ALL" to get ALL names
name | TRACE name to get the mask for ("ALL" to get all names) |
Reimplemented from artdaq::CommanderInterface.
Definition at line 1528 of file xmlrpc_commander.cc.
|
overridevirtual |
Send an send_trace_msgfacility_set command over XMLRPC
This will cause the receiver to set the given TRACE level mask for the given name to the given mask. Only the first character of the mask selection will be parsed, dial 'M' for Memory, or 'S' for Slow. Use name == "ALL" to set ALL names
EXAMPLE: xmlrpc http://localhost:5235/RPC2 daq.trace_msgfacility_set TraceLock i8/$((0x1234)) # Use Bash to convert hex to dec
name | TRACE name to set ("ALL" for all TRACE names) |
type | Type of mask to set ('M', 'S', or 'T') |
mask | 64-bit mask, in string form |
Reimplemented from artdaq::CommanderInterface.
Definition at line 1532 of file xmlrpc_commander.cc.
|
overridevirtual |
Send an unregister_monitor command over XMLRPC
monitor_label | Label of the monitor to unregister |
Reimplemented from artdaq::CommanderInterface.
Definition at line 1480 of file xmlrpc_commander.cc.