$treeview $search $mathjax $extrastylesheet
artdaq
v3_04_00
$projectbrief
|
$projectbrief
|
$searchbox |
00001 /* DarkSide 50 DAQ program 00002 * This file add the xmlrpc commander as a client to the SC 00003 * Author: Alessandro Razeto <Alessandro.Razeto@ge.infn.it> 00004 */ 00005 #ifndef artdaq_ExternalComms_xmlrpc_commander_hh 00006 #define artdaq_ExternalComms_xmlrpc_commander_hh 00007 00008 #include <mutex> 00009 #include "artdaq/ExternalComms/CommanderInterface.hh" 00010 00011 namespace artdaq 00012 { 00013 00017 class xmlrpc_commander : public CommanderInterface 00018 { 00019 public: 00031 xmlrpc_commander(fhicl::ParameterSet ps, artdaq::Commandable& commandable); 00032 00036 void run_server() override; 00037 00043 std::string send_register_monitor(std::string monitor_fhicl) override; 00044 00050 std::string send_unregister_monitor(std::string monitor_label) override; 00051 00059 std::string send_init(fhicl::ParameterSet, uint64_t, uint64_t) override; 00060 00068 std::string send_soft_init(fhicl::ParameterSet, uint64_t, uint64_t) override; 00069 00077 std::string send_reinit(fhicl::ParameterSet, uint64_t, uint64_t) override; 00078 00086 std::string send_start(art::RunID, uint64_t, uint64_t) override; 00087 00095 std::string send_pause(uint64_t, uint64_t) override; 00096 00104 std::string send_resume(uint64_t, uint64_t) override; 00105 00113 std::string send_stop(uint64_t, uint64_t) override; 00114 00122 std::string send_shutdown(uint64_t) override; 00123 00130 std::string send_status() override; 00131 00138 std::string send_report(std::string) override; 00139 00146 std::string send_legal_commands() override; 00147 00155 std::string send_trace_get(std::string) override; 00156 00167 std::string send_trace_set(std::string, std::string, uint64_t) override; 00168 00175 std::string send_meta_command(std::string, std::string) override; 00176 00184 std::string send_rollover_subrun(uint64_t, uint32_t) override; 00185 00186 00187 private: 00188 xmlrpc_commander(const xmlrpc_commander&) = delete; 00189 00190 xmlrpc_commander(xmlrpc_commander&&) = delete; 00191 00192 int port_; 00193 std::string serverUrl_; 00194 00195 std::string send_command_(std::string command); 00196 std::string send_command_(std::string command, std::string arg); 00197 std::string send_command_(std::string command, fhicl::ParameterSet pset, uint64_t a, uint64_t b); 00198 std::string send_command_(std::string command, uint64_t a, uint64_t b); 00199 std::string send_command_(std::string command, art::RunID r, uint64_t a, uint64_t b); 00200 std::string send_command_(std::string, uint64_t); 00201 std::string send_command_(std::string, std::string, std::string); 00202 std::string send_command_(std::string, std::string, std::string, uint64_t); 00203 00204 public: 00205 std::timed_mutex mutex_; 00206 std::unique_ptr<xmlrpc_c::serverAbyss> server; 00207 }; 00208 00209 } 00210 00211 #endif /* artdaq_ExternalComms_xmlrpc_commander_hh */