otsdaq_prepmodernization  v2_05_02_indev
FENIMPlusInterface.h
1 #ifndef _ots_FENIMPlusInterface_h_
2 #define _ots_FENIMPlusInterface_h_
3 
4 //#include "otsdaq-components/FEInterfaces/FEOtsUDPHardwareBaseInterface.h"
5 #include <bitset>
6 #include "otsdaq-components/FEInterfaces/FEOtsUDPTemplateInterface.h"
7 
8 namespace ots
9 {
10 class FEInterfaceTableBase;
11 class FENIMPlusInterfaceConfiguration;
12 
13 class FENIMPlusInterface : public FEOtsUDPTemplateInterface
14 {
15  public:
16  FENIMPlusInterface(const std::string& interfaceUID,
17  const ConfigurationTree& theXDAQContextConfigree,
18  const std::string& interfaceConfigurationPath);
19  virtual ~FENIMPlusInterface(void);
20 
21  void configure(void) override;
22  void halt(void) override;
23  void pause(void) override;
24  void resume(void) override;
25  void start(std::string runNumber) override;
26  bool running(void) override;
27  void stop(void) override;
28 
29  void changeDACLevelv1(const std::string& channelName, unsigned int value);
30  void changeDACLevelv2(const std::string& channelName, unsigned int value);
31  void initDAC(void);
32 
34  // start declaration of FE Macros
35 
36  void FEMacroGenerateTriggers(__ARGS__);
37 
38  // end declaration of FE Macros
40 
41  private:
42  std::string runNumber_;
43  uint64_t sel_ctl_register_;
44  uint64_t addrOffset = 0;
45  // bitsets for enables and resets
46  std::bitset<16> nimResets_, nimEnables_;
47 };
48 }
49 
50 #endif