DABC (Data Acquisition Backbone Core)  2.9.9
Worker.h
Go to the documentation of this file.
1 /************************************************************
2  * The Data Acquisition Backbone Core (DABC) *
3  ************************************************************
4  * Copyright (C) 2009 - *
5  * GSI Helmholtzzentrum fuer Schwerionenforschung GmbH *
6  * Planckstr. 1, 64291 Darmstadt, Germany *
7  * Contact: http://dabc.gsi.de *
8  ************************************************************
9  * This software can be used under the GPL license *
10  * agreements as stated in LICENSE.txt file *
11  * which is part of the distribution. *
12  ************************************************************/
13 
14 #ifndef VERBS_Worker
15 #define VERBS_Worker
16 
17 #ifndef DABC_Worker
18 #include "dabc/Worker.h"
19 #endif
20 
21 #include <cstdint>
22 
23 struct ibv_ah;
24 
25 namespace dabc {
26  class ConnectionObject;
27 }
28 
29 namespace verbs {
30 
31  class QueuePair;
32  class ComplQueue;
33  class MemoryPool;
34  class Thread;
35  class Device;
36 
39  class WorkerAddon : public dabc::WorkerAddon {
40 
41  friend class verbs::Thread;
42 
43  protected:
44 
46 
47  public:
48 
53  evntVerbsLast // from this event user can specified it own events
54  };
55 
57 
58  virtual ~WorkerAddon();
59 
60  virtual std::string RequiredThrdClass() const;
61 
62  void SetQP(QueuePair* qp);
63  inline QueuePair* QP() const { return fQP; }
64  QueuePair* TakeQP();
65 
66  virtual void ProcessEvent(const dabc::EventId&);
67 
68  virtual void VerbsProcessSendCompl(uint32_t) {}
69  virtual void VerbsProcessRecvCompl(uint32_t) {}
70  virtual void VerbsProcessOperError(uint32_t) {}
71 
72  void CloseQP();
73 
74  virtual const char* ClassName() const { return "verbs::WorkerAddon"; }
75  };
76 
77 }
78 
79 #endif
Generic addon for dabc::Worker.
Definition: Worker.h:49
@ evntFirstAddOn
Definition: Worker.h:201
Represent VERBS queue pair functionality.
Definition: QueuePair.h:37
VERBS thread.
Definition: Thread.h:46
Addon for VERBS thread
Definition: Worker.h:39
virtual void VerbsProcessRecvCompl(uint32_t)
Definition: Worker.h:69
void SetQP(QueuePair *qp)
Definition: Worker.cxx:50
virtual void VerbsProcessOperError(uint32_t)
Definition: Worker.h:70
QueuePair * TakeQP()
Definition: Worker.cxx:64
virtual ~WorkerAddon()
Definition: Worker.cxx:40
QueuePair * QP() const
Definition: Worker.h:63
virtual std::string RequiredThrdClass() const
Definition: Worker.cxx:45
WorkerAddon(QueuePair *qp)
Definition: Worker.cxx:34
virtual void ProcessEvent(const dabc::EventId &)
Definition: Worker.cxx:72
virtual void VerbsProcessSendCompl(uint32_t)
Definition: Worker.h:68
virtual const char * ClassName() const
Returns class name of the object instance.
Definition: Worker.h:74
QueuePair * fQP
Definition: Worker.h:45
Event manipulation API.
Definition: api.h:23
Support of InfiniBand verbs.
Definition: Device.cxx:54
Event structure, exchanged between DABC threads.
Definition: Thread.h:70