Belle II Software  release-05-02-19
RFServerBase.h
1 #ifndef SERVER_BASE_H
2 #define SERVER_BASE_H
3 //+
4 // File : RFServerBase.h
5 // Description : Base class to construct RFARM server applications
6 // The class can be fed to RFNSM to hook up functions
7 //
8 // Author : Ryosuke Itoh, IPNS, KEK
9 // Date : 24 - Jul - 2013
10 //-
11 
12 #include "daq/rfarm/manager/RfNodeInfo.h"
13 #include <nsm2/nsm2.h>
14 
15 namespace Belle2 {
20  class RFServerBase {
21  public:
22  RFServerBase() {};
23  ~RFServerBase() {};
24 
25  virtual int Configure(NSMmsg*, NSMcontext*) { return 0; };
26  virtual int UnConfigure(NSMmsg*, NSMcontext*) { return 0; };
27  virtual int Start(NSMmsg*, NSMcontext*) { return 0; };
28  virtual int Stop(NSMmsg*, NSMcontext*) { return 0; };
29  virtual int Pause(NSMmsg*, NSMcontext*) { return 0; };
30  virtual int Resume(NSMmsg*, NSMcontext*) { return 0; };
31  virtual int Restart(NSMmsg*, NSMcontext*) { return 0; };
32  virtual int Status(NSMmsg*, NSMcontext*) { return 0; };
33 
34  virtual void SetNodeInfo(RfNodeInfo* ptr)
35  {
36  m_nsmmem = ptr;
37  };
38 
39  virtual RfNodeInfo* GetNodeInfo()
40  {
41  return m_nsmmem;
42  };
43 
44  public:
45  static RFServerBase* s_instance;
46 
47  private:
48  RfNodeInfo* m_nsmmem;
49 
50  };
52 }
53 #endif
NSMmsg
Definition: nsm2.h:217
Belle2
Abstract base class for different kinds of events.
Definition: MillepedeAlgorithm.h:19
Belle2::RFServerBase
Definition: RFServerBase.h:20
Belle2::RfNodeInfo
Definition: RfNodeInfo.h:17
NSMcontext_struct
Definition: nsmlib2.h:66