1 #ifndef EUDAQ_INCLUDED_RunControl
2 #define EUDAQ_INCLUDED_RunControl
4 #include "eudaq/TransportServer.hh"
5 #include "eudaq/Logger.hh"
6 #include "eudaq/ConnectionState.hh"
7 #include "eudaq/Configuration.hh"
8 #include "eudaq/Platform.hh"
9 #include "eudaq/MachineState.hh"
22 explicit RunControl(
const std::string &listenaddress =
"");
24 void StartServer(
const std::string &listenaddress);
27 void Init(
const std::string &settings);
30 void Configure(
const std::string &settings,
33 void GetConnectionState();
34 virtual void StartRun(
const std::string &msg =
"");
35 virtual void StopRun(
bool listen =
true);
45 std::shared_ptr<ConnectionState>) {}
47 virtual void SendState(
int state){}
52 size_t NumConnections()
const {
return m_cmdserver->NumConnections(); }
54 return m_cmdserver->GetConnection(i);
57 int GetFSMState(){
return current_State.GetState();}
63 void SendCommand(
const std::string &cmd,
const std::string ¶m =
"",
66 SendReceiveCommand(
const std::string &cmd,
const std::string ¶m =
"",
79 std::unique_ptr<std::thread> m_thread;
80 size_t m_idata, m_ilog;
81 std::string m_logaddr;
82 std::map<size_t, std::string> m_dataaddr;
83 int64_t m_runsizelimit;
84 int64_t m_runeventlimit;
85 bool m_nextconfigonrunchange;
86 bool m_stopping, m_busy, m_producerbusy;
90 #endif // EUDAQ_INCLUDED_RunControl
Definition: TransportBase.hh:80
Definition: RunControl.hh:20
Definition: Configuration.hh:12
int32_t m_runnumber
The current run number.
Definition: RunControl.hh:77
Definition: MachineState.hh:13
TransportServer * m_cmdserver
Transport for sending commands.
Definition: RunControl.hh:78
Definition: TransportServer.hh:10
Definition: TransportBase.hh:22