artdaq  v3_00_03
xmlrpc_commander.hh
1 /* DarkSide 50 DAQ program
2  * This file add the xmlrpc commander as a client to the SC
3  * Author: Alessandro Razeto <Alessandro.Razeto@ge.infn.it>
4  */
5 #ifndef artdaq_ExternalComms_xmlrpc_commander_hh
6 #define artdaq_ExternalComms_xmlrpc_commander_hh
7 
8 #include <mutex>
9 #include "artdaq/ExternalComms/CommanderInterface.hh"
10 
11 namespace artdaq
12 {
13 
18 {
19 public:
31  xmlrpc_commander(fhicl::ParameterSet ps, artdaq::Commandable& commandable);
32 
36  void run_server() override;
37 
43  std::string send_register_monitor(std::string monitor_fhicl) override;
44 
50  std::string send_unregister_monitor(std::string monitor_label) override;
51 
52 private:
53  xmlrpc_commander(const xmlrpc_commander&) = delete;
54 
56 
57  int port_;
58  std::string serverUrl_;
59 
60 public:
61  std::mutex mutex_;
62  std::unique_ptr<xmlrpc_c::serverAbyss> server;
63 };
64 
65 }
66 
67 #endif /* artdaq_ExternalComms_xmlrpc_commander_hh */
This interface defines the functions used to transfer data between artdaq applications.
std::string send_unregister_monitor(std::string monitor_label) override
Send an unregister_monitor command over XMLRPC
std::string send_register_monitor(std::string monitor_fhicl) override
Send a register_monitor command over XMLRPC
Commandable is the base class for all artdaq components which implement the artdaq state machine...
Definition: Commandable.hh:20
xmlrpc_commander(fhicl::ParameterSet ps, artdaq::Commandable &commandable)
xmlrpc_commander Constructor
The xmlrpc_commander class serves as the XMLRPC server run in each artdaq application.
void run_server() override
Run the XMLRPC server.
std::unique_ptr< xmlrpc_c::serverAbyss > server
XMLRPC server.
std::mutex mutex_
XMLRPC mutex.