DABC (Data Acquisition Backbone Core)  2.9.9
Monitor.h
Go to the documentation of this file.
1 // $Id: Monitor.h 3862 2018-05-11 10:06:18Z 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 FESA_Monitor
17 #define FESA_Monitor
18 
19 #ifndef MBS_MonitorSlowControl
20 #include "mbs/MonitorSlowControl.h"
21 #endif
22 
23 class rdaDeviceHandle;
24 class rdaRDAService;
25 class rdaDabcHandler;
26 class rdaData;
27 
28 namespace fesa {
29 
39  protected:
41 
42  std::string fServerName;
43  std::string fDeviceName;
44  std::string fCycle;
45 
46  rdaRDAService* fRDAService;
47  rdaDeviceHandle* fDevice;
48  std::vector<rdaDabcHandler*> fHandlers;
49 
50  bool fBlockRec;
51 
52  double doGet(const std::string &service, const std::string &field);
53 
54  virtual unsigned GetRecRawSize();
55  virtual unsigned WriteRecRawData(void* ptr, unsigned maxsize);
56 
57  public:
58 
59  Monitor(const std::string &name, dabc::Command cmd = nullptr);
60  virtual ~Monitor();
61 
62  void ReportServiceChanged(const std::string &name, const rdaData* v);
63 
64  void ReportServiceError(const std::string &name, const std::string &err);
65 
66  };
67 }
68 
69 
70 #endif
Represents command with its arguments.
Definition: Command.h:99
Represents objects hierarchy of remote (or local) DABC process.
Definition: Hierarchy.h:285
Monitor for of FESA data.
Definition: Monitor.h:38
virtual unsigned WriteRecRawData(void *ptr, unsigned maxsize)
Definition: Monitor.cxx:350
std::string fCycle
cycle parameter
Definition: Monitor.h:44
Monitor(const std::string &name, dabc::Command cmd=nullptr)
Definition: Monitor.cxx:99
rdaRDAService * fRDAService
Definition: Monitor.h:46
virtual unsigned GetRecRawSize()
Definition: Monitor.cxx:342
std::string fServerName
FESA server name.
Definition: Monitor.h:42
std::vector< rdaDabcHandler * > fHandlers
Definition: Monitor.h:48
void ReportServiceError(const std::string &name, const std::string &err)
Definition: Monitor.cxx:159
double doGet(const std::string &service, const std::string &field)
virtual ~Monitor()
Definition: Monitor.cxx:145
dabc::Hierarchy fHierarchy
Definition: Monitor.h:40
std::string fDeviceName
FESA device name.
Definition: Monitor.h:43
bool fBlockRec
when true, slow-control record cannot be updated
Definition: Monitor.h:50
rdaDeviceHandle * fDevice
Definition: Monitor.h:47
void ReportServiceChanged(const std::string &name, const rdaData *v)
Definition: Monitor.cxx:172
Base class for monitoring of slow control data.
Support for FESA - the control system of GSI/FAIR accelerator.
Definition: Factory.h:25