artdaq
v3_01_00
|
This interface defines the functions used to transfer data between artdaq applications. More...
#include <artdaq/ExternalComms/CommanderInterface.hh>
Public Member Functions | |
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. | |
virtual void | run_server ()=0 |
run_server is the main work loop for the Commander. More... | |
virtual std::string | send_init (fhicl::ParameterSet, uint64_t, uint64_t) |
Using the transport mechanism, send an init command More... | |
virtual std::string | send_soft_init (fhicl::ParameterSet, uint64_t, uint64_t) |
Using the transport mechanism, send a soft_init command More... | |
virtual std::string | send_reinit (fhicl::ParameterSet, uint64_t, uint64_t) |
Using the transport mechanism, send a reinit command More... | |
virtual std::string | send_start (art::RunID, uint64_t, uint64_t) |
Using the transport mechanism, send a start command More... | |
virtual std::string | send_pause (uint64_t, uint64_t) |
Using the transport mechanism, send a pause command More... | |
virtual std::string | send_resume (uint64_t, uint64_t) |
Using the transport mechanism, send a resume command More... | |
virtual std::string | send_stop (uint64_t, uint64_t) |
Using the transport mechanism, send a stop command More... | |
virtual std::string | send_shutdown (uint64_t) |
Using the transport mechanism, send a shutdown command More... | |
virtual std::string | send_status () |
Using the transport mechanism, send a status command More... | |
virtual std::string | send_report (std::string) |
Using the transport mechanism, send a report command More... | |
virtual std::string | send_legal_commands () |
Using the transport mechanism, send a legal_commands command More... | |
virtual std::string | send_register_monitor (std::string) |
Using the transport mechanism, send a register_monitor command More... | |
virtual std::string | send_unregister_monitor (std::string) |
Using the transport mechanism, send an unregister_monitor command More... | |
virtual std::string | send_trace_get (std::string) |
Using the transport mechanism, send an send_trace_get command More... | |
virtual std::string | send_trace_set (std::string, std::string, uint64_t) |
Using the transport mechanism, send an send_trace_msgfacility_set command More... | |
virtual std::string | send_meta_command (std::string, std::string) |
Using the transport mechanism, send an send_meta_command command More... | |
Public Attributes | |
artdaq::Commandable & | _commandable |
Reference to the Commandable that this Commander Commands. More... | |
Protected Attributes | |
int | _id |
ID Number of this Commander. | |
This interface defines the functions used to transfer data between artdaq applications.
Definition at line 15 of file CommanderInterface.hh.
|
inline |
CommanderInterface Constructor.
ps | ParameterSet used for configuring the CommanderInterface |
commandable | artdaq::Commandable object to send transition commands to |
* CommanderInterface accepts the following Parameters: "commanderPluginType": The type of Commander plugin to load "id": Integer ID number of this Commandable. May be constrained by plugin types (i.e. XMLRPC port number). *
Definition at line 31 of file CommanderInterface.hh.
|
delete |
Copy Assignment operator is deleted.
|
pure virtual |
run_server is the main work loop for the Commander.
This function is expected to block and persist for the entire run of the application. It should accept and handle the following commands (subject to state-machine constraints, see Commandable::legal_commands()): init soft_init reinit start pause resume stop shutdown status report legal_commands register_monitor unregister_monitor
See the send_* functions for more details on each command. Not all commands are valid for all applications/states. run_server should return a string indicating success or failure to the transport mechanism when it is done processing a command.
Implemented in artdaq::xmlrpc_commander.
|
inlinevirtual |
Using the transport mechanism, send an init command
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.
Definition at line 7 of file CommanderInterface.cc.
|
inlinevirtual |
Using the transport mechanism, send a legal_commands command
This will query the artdaq process, and it will return the list of allowed transition commands from its current state.
Definition at line 67 of file CommanderInterface.cc.
|
inlinevirtual |
Using the transport mechanism, send an send_meta_command command
This will cause the receiver to run the given command with the given argument in user code
Definition at line 97 of file CommanderInterface.cc.
|
inlinevirtual |
Using the transport mechanism, send a pause command
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.
Definition at line 31 of file CommanderInterface.cc.
|
inlinevirtual |
Using the transport mechanism, send a register_monitor command
This will cause a Dispatcher to start an art process with the given FHiCL configuration string
Reimplemented in artdaq::xmlrpc_commander.
Definition at line 73 of file CommanderInterface.cc.
|
inlinevirtual |
Using the transport mechanism, send a reinit command
The reinit command is accepted by all artdaq processes. It expects a ParameterSet for configuration, a timeout, and a timestamp.
Definition at line 19 of file CommanderInterface.cc.
|
inlinevirtual |
Using the transport mechanism, send a report command
The report command returns the current value of the requested reportable quantity.
Definition at line 61 of file CommanderInterface.cc.
|
inlinevirtual |
Using the transport mechanism, send a resume command
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.
Definition at line 37 of file CommanderInterface.cc.
|
inlinevirtual |
Using the transport mechanism, send a shutdown command
The shutdown command shuts down the artdaq process. This command accepts a timeout parameter.
Definition at line 49 of file CommanderInterface.cc.
|
inlinevirtual |
Using the transport mechanism, send a soft_init command
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.
Definition at line 13 of file CommanderInterface.cc.
|
inlinevirtual |
Using the transport mechanism, send a start command
The start command starts a Run using the given run number. This command also accepts a timeout parameter and a timestamp parameter.
Definition at line 25 of file CommanderInterface.cc.
|
inlinevirtual |
Using the transport mechanism, send a status command
The status command returns the current status of the artdaq process.
Definition at line 55 of file CommanderInterface.cc.
|
inlinevirtual |
Using the transport mechanism, send a stop command
The stop command stops the current Run. This command accepts a timeout parameter and a timestamp parameter.
Definition at line 43 of file CommanderInterface.cc.
|
inlinevirtual |
Using the transport mechanism, send an send_trace_get command
This will cause the receiver to get the TRACE level masks for the given name Use name == "ALL" to get ALL names
Definition at line 85 of file CommanderInterface.cc.
|
inlinevirtual |
Using the transport mechanism, send an send_trace_msgfacility_set command
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
Definition at line 91 of file CommanderInterface.cc.
|
inlinevirtual |
Using the transport mechanism, send an unregister_monitor command
This will cause a Dispatcher to stop sending data to the monitor identified by the given label
Reimplemented in artdaq::xmlrpc_commander.
Definition at line 79 of file CommanderInterface.cc.
artdaq::Commandable& artdaq::CommanderInterface::_commandable |
Reference to the Commandable that this Commander Commands.
Definition at line 223 of file CommanderInterface.hh.