artdaq
v3_07_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 (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 monitor_fhicl) override |
Send a register_monitor command over XMLRPC More... | |
std::string | send_unregister_monitor (std::string monitor_label) override |
Send an unregister_monitor command over XMLRPC More... | |
std::string | send_init (fhicl::ParameterSet, uint64_t, uint64_t) override |
Send an init command over XMLRPC More... | |
std::string | send_soft_init (fhicl::ParameterSet, uint64_t, uint64_t) override |
Send a soft_init command over XMLRPC More... | |
std::string | send_reinit (fhicl::ParameterSet, uint64_t, uint64_t) override |
Send a reinit command over XMLRPC More... | |
std::string | send_start (art::RunID, uint64_t, uint64_t) override |
Send a start command over XMLRPC More... | |
std::string | send_pause (uint64_t, uint64_t) override |
Send a pause command over XMLRPC More... | |
std::string | send_resume (uint64_t, uint64_t) override |
Send a resume command over XMLRPC More... | |
std::string | send_stop (uint64_t, uint64_t) override |
Send a stop command over XMLRPC More... | |
std::string | send_shutdown (uint64_t) 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) 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) override |
Send an send_trace_get command over XMLRPC More... | |
std::string | send_trace_set (std::string, std::string, uint64_t) override |
Send an send_trace_msgfacility_set command over XMLRPC More... | |
std::string | send_meta_command (std::string, std::string) override |
Send an send_meta_command command over XMLRPC More... | |
std::string | send_rollover_subrun (uint64_t, uint32_t) 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, std::string) |
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 | ( | 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 973 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.
Reimplemented from artdaq::CommanderInterface.
Definition at line 1358 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 1398 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
Reimplemented from artdaq::CommanderInterface.
Definition at line 1410 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.
Reimplemented from artdaq::CommanderInterface.
Definition at line 1374 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 1350 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.
Reimplemented from artdaq::CommanderInterface.
Definition at line 1366 of file xmlrpc_commander.cc.
|
overridevirtual |
Send a report command over XMLRPC
The report command returns the current value of the requested reportable quantity.
Reimplemented from artdaq::CommanderInterface.
Definition at line 1394 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.
Reimplemented from artdaq::CommanderInterface.
Definition at line 1378 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.
Reimplemented from artdaq::CommanderInterface.
Definition at line 1414 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.
Reimplemented from artdaq::CommanderInterface.
Definition at line 1386 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.
Reimplemented from artdaq::CommanderInterface.
Definition at line 1362 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.
Reimplemented from artdaq::CommanderInterface.
Definition at line 1370 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 1390 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.
Reimplemented from artdaq::CommanderInterface.
Definition at line 1382 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
Reimplemented from artdaq::CommanderInterface.
Definition at line 1402 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 i/$((0x1234)) # Use Bash to convert hex to dec
Reimplemented from artdaq::CommanderInterface.
Definition at line 1406 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 1354 of file xmlrpc_commander.cc.