$treeview $search $mathjax $extrastylesheet
artdaq  v3_04_01
$projectbrief
$projectbrief
$searchbox

artdaq::xmlrpc_commander Class Reference

The xmlrpc_commander class serves as the XMLRPC server run in each artdaq application. More...

#include <artdaq/ExternalComms/xmlrpc_commander.hh>

Inheritance diagram for artdaq::xmlrpc_commander:
artdaq::CommanderInterface

List of all members.

Public Member Functions

 xmlrpc_commander (fhicl::ParameterSet ps, artdaq::Commandable &commandable)
 xmlrpc_commander Constructor
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.
std::string send_unregister_monitor (std::string monitor_label) override
 Send an unregister_monitor command over XMLRPC.
std::string send_init (fhicl::ParameterSet, uint64_t, uint64_t) override
 Send an init command over XMLRPC.
std::string send_soft_init (fhicl::ParameterSet, uint64_t, uint64_t) override
 Send a soft_init command over XMLRPC.
std::string send_reinit (fhicl::ParameterSet, uint64_t, uint64_t) override
 Send a reinit command over XMLRPC.
std::string send_start (art::RunID, uint64_t, uint64_t) override
 Send a start command over XMLRPC.
std::string send_pause (uint64_t, uint64_t) override
 Send a pause command over XMLRPC.
std::string send_resume (uint64_t, uint64_t) override
 Send a resume command over XMLRPC.
std::string send_stop (uint64_t, uint64_t) override
 Send a stop command over XMLRPC.
std::string send_shutdown (uint64_t) override
 Send a shutdown command over XMLRPC.
std::string send_status () override
 Send a status command over XMLRPC.
std::string send_report (std::string) override
 Send a report command over XMLRPC.
std::string send_legal_commands () override
 Send a legal_commands command over XMLRPC.
std::string send_trace_get (std::string) override
 Send an send_trace_get command over XMLRPC.
std::string send_trace_set (std::string, std::string, uint64_t) override
 Send an send_trace_msgfacility_set command over XMLRPC.
std::string send_meta_command (std::string, std::string) override
 Send an send_meta_command command over XMLRPC.
std::string send_rollover_subrun (uint64_t, uint32_t) override
 Send a send_rollover_subrun command over XMLRPC.

Public Attributes

std::timed_mutex mutex_
 XMLRPC mutex.
std::unique_ptr
< xmlrpc_c::serverAbyss > 
server
 XMLRPC server.

Detailed Description

The xmlrpc_commander class serves as the XMLRPC server run in each artdaq application.

Definition at line 17 of file xmlrpc_commander.hh.


Constructor & Destructor Documentation

artdaq::xmlrpc_commander::xmlrpc_commander ( fhicl::ParameterSet  ps,
artdaq::Commandable commandable 
)

xmlrpc_commander Constructor

Parameters:
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 981 of file xmlrpc_commander.cc.


Member Function Documentation

std::string artdaq::xmlrpc_commander::send_init ( fhicl::ParameterSet  ps,
uint64_t  a,
uint64_t  b 
) [override, virtual]

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.

Returns:
Command result: "SUCCESS" if succeeded

Reimplemented from artdaq::CommanderInterface.

Definition at line 1376 of file xmlrpc_commander.cc.

std::string artdaq::xmlrpc_commander::send_legal_commands (  )  [override, virtual]

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.

Returns:
Command result: a list of allowed transition commands from its current state

Reimplemented from artdaq::CommanderInterface.

Definition at line 1416 of file xmlrpc_commander.cc.

std::string artdaq::xmlrpc_commander::send_meta_command ( std::string  command,
std::string  arg 
) [override, virtual]

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

Returns:
Command result: "SUCCESS" if succeeded

Reimplemented from artdaq::CommanderInterface.

Definition at line 1428 of file xmlrpc_commander.cc.

std::string artdaq::xmlrpc_commander::send_pause ( uint64_t  a,
uint64_t  b 
) [override, virtual]

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.

Returns:
Command result: "SUCCESS" if succeeded

Reimplemented from artdaq::CommanderInterface.

Definition at line 1392 of file xmlrpc_commander.cc.

std::string artdaq::xmlrpc_commander::send_register_monitor ( std::string  monitor_fhicl  )  [override, virtual]

Send a register_monitor command over XMLRPC.

Parameters:
monitor_fhicl FHiCL string contianing monitor configuration
Returns:
Return status from XMLRPC

Reimplemented from artdaq::CommanderInterface.

Definition at line 1368 of file xmlrpc_commander.cc.

std::string artdaq::xmlrpc_commander::send_reinit ( fhicl::ParameterSet  ps,
uint64_t  a,
uint64_t  b 
) [override, virtual]

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.

Returns:
Command result: "SUCCESS" if succeeded

Reimplemented from artdaq::CommanderInterface.

Definition at line 1384 of file xmlrpc_commander.cc.

std::string artdaq::xmlrpc_commander::send_report ( std::string  what  )  [override, virtual]

Send a report command over XMLRPC.

The report command returns the current value of the requested reportable quantity.

Returns:
Command result: current value of the requested reportable quantity

Reimplemented from artdaq::CommanderInterface.

Definition at line 1412 of file xmlrpc_commander.cc.

std::string artdaq::xmlrpc_commander::send_resume ( uint64_t  a,
uint64_t  b 
) [override, virtual]

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.

Returns:
Command result: "SUCCESS" if succeeded

Reimplemented from artdaq::CommanderInterface.

Definition at line 1396 of file xmlrpc_commander.cc.

std::string artdaq::xmlrpc_commander::send_rollover_subrun ( uint64_t  when,
uint32_t  sr 
) [override, virtual]

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.

Returns:
Command result: "SUCCESS" if succeeded

Reimplemented from artdaq::CommanderInterface.

Definition at line 1432 of file xmlrpc_commander.cc.

std::string artdaq::xmlrpc_commander::send_shutdown ( uint64_t  a  )  [override, virtual]

Send a shutdown command over XMLRPC.

The shutdown command shuts down the artdaq process. This command accepts a timeout parameter.

Returns:
Command result: "SUCCESS" if succeeded

Reimplemented from artdaq::CommanderInterface.

Definition at line 1404 of file xmlrpc_commander.cc.

std::string artdaq::xmlrpc_commander::send_soft_init ( fhicl::ParameterSet  ps,
uint64_t  a,
uint64_t  b 
) [override, virtual]

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.

Returns:
Command result: "SUCCESS" if succeeded

Reimplemented from artdaq::CommanderInterface.

Definition at line 1380 of file xmlrpc_commander.cc.

std::string artdaq::xmlrpc_commander::send_start ( art::RunID  r,
uint64_t  a,
uint64_t  b 
) [override, virtual]

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.

Returns:
Command result: "SUCCESS" if succeeded

Reimplemented from artdaq::CommanderInterface.

Definition at line 1388 of file xmlrpc_commander.cc.

std::string artdaq::xmlrpc_commander::send_status (  )  [override, virtual]

Send a status command over XMLRPC.

The status command returns the current status of the artdaq process.

Returns:
Command result: current status of the artdaq process

Reimplemented from artdaq::CommanderInterface.

Definition at line 1408 of file xmlrpc_commander.cc.

std::string artdaq::xmlrpc_commander::send_stop ( uint64_t  a,
uint64_t  b 
) [override, virtual]

Send a stop command over XMLRPC.

The stop command stops the current Run. This command accepts a timeout parameter and a timestamp parameter.

Returns:
Command result: "SUCCESS" if succeeded

Reimplemented from artdaq::CommanderInterface.

Definition at line 1400 of file xmlrpc_commander.cc.

std::string artdaq::xmlrpc_commander::send_trace_get ( std::string  name  )  [override, virtual]

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

Returns:
Command result: "SUCCESS" if succeeded

Reimplemented from artdaq::CommanderInterface.

Definition at line 1420 of file xmlrpc_commander.cc.

std::string artdaq::xmlrpc_commander::send_trace_set ( std::string  name,
std::string  which,
uint64_t  mask 
) [override, virtual]

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

Returns:
Command result: "SUCCESS" if succeeded

Reimplemented from artdaq::CommanderInterface.

Definition at line 1424 of file xmlrpc_commander.cc.

std::string artdaq::xmlrpc_commander::send_unregister_monitor ( std::string  monitor_label  )  [override, virtual]

Send an unregister_monitor command over XMLRPC.

Parameters:
monitor_label Label of the monitor to unregister
Returns:
Return status from XMLRPC

Reimplemented from artdaq::CommanderInterface.

Definition at line 1372 of file xmlrpc_commander.cc.


The documentation for this class was generated from the following files:

Generated on 28 Mar 2019 for artdaq by  doxygen 1.6.1