DABC (Data Acquisition Backbone Core)  2.9.9
TerminalModule.h
Go to the documentation of this file.
1 // $Id: TerminalModule.h 3963 2018-05-28 12:45:10Z linev $
2 
3 /************************************************************
4  * The Data Acquisition Backbone Core (DABC) *
5  ************************************************************
6  * Copyright (C) 2009 - *
7  * GSI Helmholtzzentrum fuer Schwerionenforschung GmbH *
8  * Planckstr. 1, 64291 Darmstadt, Germany *
9  * Contact: http://dabc.gsi.de *
10  ************************************************************
11  * This software can be used under the GPL license *
12  * agreements as stated in LICENSE.txt file *
13  * which is part of the distribution. *
14  ************************************************************/
15 
16 #ifndef HADAQ_TerminalModule
17 #define HADAQ_TerminalModule
18 
19 #ifndef DABC_ModuleAsync
20 #include "dabc/ModuleAsync.h"
21 #endif
22 
23 #include <vector>
24 
25 namespace hadaq {
26 
33  protected:
34 
35  struct CalibrRect {
36  long unsigned lastrecv;
38  unsigned trb;
39  std::vector<uint64_t> tdcs;
40  int progress;
41  std::string state;
42  CalibrRect() : lastrecv(0), send_request(false), trb(0), tdcs(), progress(0), state() {}
43  };
44 
46  uint64_t fTotalRecvBytes;
47  uint64_t fTotalDiscEvents;
49 
50  bool fDoClear;
51  bool fDoShow;
53  std::vector<CalibrRect> fCalibr;
54  int fServPort;
57  int fFilePort;
60  int fRingSize;
61 
62  std::string fModuleName;
63 
64  std::string rate_to_str(double r);
65 
66  virtual bool ReplyCommand(dabc::Command cmd);
67 
68  public:
69 
70  TerminalModule(const std::string &name, dabc::Command cmd = nullptr);
71 
72  virtual void BeforeModuleStart();
73 
74  virtual void ProcessTimerEvent(unsigned timer);
75  };
76 }
77 
78 
79 #endif
Represents command with its arguments.
Definition: Command.h:99
Base class for user-derived code, implementing event-processing.
Definition: ModuleAsync.h:32
Terminal for HADAQ event builder.
std::vector< CalibrRect > fCalibr
virtual bool ReplyCommand(dabc::Command cmd)
Reimplement this method to react on command reply Return true if command can be destroyed by framewor...
std::string fModuleName
name of hadaq combiner module
bool fServReqRunning
is file request running
virtual void ProcessTimerEvent(unsigned timer)
Method called by framework when timer event is produced.
virtual void BeforeModuleStart()
TerminalModule(const std::string &name, dabc::Command cmd=nullptr)
dabc::Command fLastFileCmd
last received data from file transport
bool fFileReqRunning
is file request running
bool fDoShow
perform output
int fRingSize
number of last IDs shown
dabc::TimeStamp fLastTm
std::string rate_to_str(double r)
bool fDoClear
clear terminal when start module
dabc::Command fLastServCmd
last received data from file transport
Support for HADAQ - HADES DAQ
Definition: api.h:27
Class for acquiring and holding timestamps.
Definition: timing.h:40
std::vector< uint64_t > tdcs