tdaq-develop-2025-02-12
FECommanderInterface.h
1 #ifndef _ots_FECommanderInterface_h_
2 #define _ots_FECommanderInterface_h_
3 
4 #include "otsdaq/FECore/FEVInterface.h"
5 #include "otsdaq/NetworkUtilities/TransceiverSocket.h"
6 
7 namespace ots
8 {
9 class FECommanderInterface : public FEVInterface, public TransceiverSocket
10 {
11  public:
12  FECommanderInterface(const std::string& interfaceUID,
13  const ConfigurationTree& theXDAQContextConfigTree,
14  const std::string& interfaceConfigurationPath);
15  virtual ~FECommanderInterface(void);
16 
17  void configure(void);
18  void halt(void);
19  void pause(void);
20  void resume(void);
21  void start(std::string runNumber = "");
22  void stop(void);
23  // bool running (void);
24 
25  void universalRead(char* address, char* returnValue) override { __FE_SS__ << "Universal read not defined (addressPtr=" << (address?'1':'0') << "returnPtr=" << (returnValue?'1':'0') << __E__; __FE_SS_THROW__; }
26  void universalWrite(char* address, char* writeValue) override { __FE_SS__ << "Universal write not defined (addressPtr=" << (address?'1':'0') << "writePtr=" << (writeValue?'1':'0') << __E__; __FE_SS_THROW__; }
27 
28 
29  virtual std::string getStatusProgressDetail(void) override;
30 
31 private:
32 
33  void send (std::string buffer);
34  static void AppStatusWorkLoop (FECommanderInterface* fePtr);
35 
36 
37  Socket interfaceSocket_;
38  std::string stateMachineName_;
39  std::string configurationAlias_;
40  bool onlyRunTransitions_;
41  bool expectTransitionAck_;
42  bool monitorRemoteAppStatus_;
43  std::mutex remoteAppStatusMutex_;
44  std::string remoteAppStatus_;
45  std::atomic<bool> halted_;
46 
47  bool inRun_;
48 };
49 }
50 
51 #endif
virtual std::string getStatusProgressDetail(void) override
overriding VStateMachine::getStatusProgressDetail