1 #ifndef _ots_FEVInterfacesManager_h_
2 #define _ots_FEVInterfacesManager_h_
9 #include "otsdaq/Configurable/Configurable.h"
10 #include "otsdaq/FECore/FEVInterface.h"
11 #include "otsdaq/FiniteStateMachine/VStateMachine.h"
27 void createInterfaces(
void);
30 virtual void configure(
void)
override;
31 virtual void halt(
void)
override;
32 virtual void pause(
void)
override;
33 virtual void resume(
void)
override;
34 virtual void start(std::string runNumber)
override;
35 virtual void stop(
void)
override;
36 virtual std::string getStatusProgressDetail(
void)
override;
38 void universalRead(
const std::string& interfaceID,
char* address,
40 void universalWrite(
const std::string& interfaceID,
char* address,
42 std::string getFEListString(
const std::string& supervisorLid);
43 std::string getFEMacrosString(
const std::string& supervisorName,
44 const std::string& supervisorLid);
45 void runFEMacro(
const std::string& interfaceID,
47 const std::string& inputArgs,
48 std::string& outputArgs);
49 void runFEMacro(
const std::string& interfaceID,
50 const std::string& feMacroName,
51 const std::string& inputArgs,
52 std::string& outputArgs);
53 void runMacro(
const std::string& interfaceID,
54 const std::string& macroObjectString,
55 const std::string& inputArgs,
56 std::string& outputArgs);
57 void runFEMacroByFE(
const std::string& callingInterfaceID,
58 const std::string& interfaceID,
59 const std::string& feMacroName,
60 const std::string& inputArgs,
61 std::string& outputArgs);
62 void startFEMacroMultiDimensional(
const std::string& requester,
63 const std::string& interfaceID,
64 const std::string& feMacroName,
65 const bool enableSavingOutput,
66 const std::string& outputFilePath,
67 const std::string& outputFileRadix,
68 const std::string& inputArgs);
70 const std::string& interfaceID,
71 const std::string& macroName,
72 const std::string& macroString,
73 const bool enableSavingOutput,
74 const std::string& outputFilePath,
75 const std::string& outputFileRadix,
76 const std::string& inputArgs);
77 bool checkMacroMultiDimensional(
const std::string& interfaceID,
78 const std::string& macroName);
80 unsigned int getInterfaceUniversalAddressSize(
const std::string& interfaceID);
81 unsigned int getInterfaceUniversalDataSize(
const std::string& interfaceID);
82 bool allFEWorkloopsAreDone(
void);
83 const FEVInterface& getFEInterface(
const std::string& interfaceID)
const;
85 const std::map<std::string , std::unique_ptr<FEVInterface> >& getFEInterfaces(
void)
const {
return theFEInterfaces_; }
86 FEVInterface* getFEInterfaceP(
const std::string& interfaceID);
89 std::mutex frontEndCommunicationReceiveMutex_;
90 std::map<std::string ,
92 std::map<std::string , std::queue<std::string > > >
93 frontEndCommunicationReceiveBuffer_;
96 std::mutex macroMultiDimensionalDoneMutex_;
97 std::map<std::string ,
100 macroMultiDimensionalStatusMap_;
103 std::map<std::string , std::unique_ptr<FEVInterface> > theFEInterfaces_;
104 std::vector<std::string > theFENamesByPriority_;
107 std::map<std::string ,
bool > stateMachinesIterationDone_;
108 unsigned int stateMachinesIterationWorkCount_;
109 unsigned int subIterationWorkStateMachineIndex_;
110 void preStateMachineExecution(
unsigned int i,
const std::string& transitionName);
111 bool postStateMachineExecution(
unsigned int i);
112 void preStateMachineExecutionLoop(
void);
113 void postStateMachineExecutionLoop(
void);
void startMacroMultiDimensional(const std::string &requester, const std::string &interfaceID, const std::string ¯oName, const std::string ¯oString, const bool enableSavingOutput, const std::string &outputFilePath, const std::string &outputFileRadix, const std::string &inputArgs)