DABC (Data Acquisition Backbone Core)  2.9.9
OpenSM.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_OpenSM
15 #define VERBS_OpenSM
16 
17 #define OSM_GUID_ARRAY_SIZE 10
18 
19 #define OSM_VENDOR_INTF_OPENIB
20 
21 #include <infiniband/vendor/osm_vendor_api.h>
22 #include <infiniband/vendor/osm_vendor_sa_api.h>
23 
24 namespace verbs {
25 
28  class OpenSM {
29  public:
30  OpenSM();
31  virtual ~OpenSM();
32 
33  bool Init();
34  bool Close();
35 
36  void SetResult(osmv_query_res_t* res) { fLastResult = *res; }
37 
38  bool ManageMultiCastGroup(bool isadd,
39  uint8_t* mgid,
40  uint16_t* mlid);
41 
42  bool QueryMyltucastGroup(uint8_t* mgid, uint16_t& mlid);
43 
44  bool PrintAllMulticasts();
45 
46  protected:
47 
48  bool BindPort();
49 
50  bool Query_SA(osmv_query_type_t query_type,
51  uint64_t comp_mask,
52  ib_member_rec_t *mc_req,
53  ib_sa_mad_t *res);
54 
55 
56  osm_vendor_t* f_vendor;
57  osm_log_t* f_log;
58  ib_port_attr_t f_local_port;
59  osm_bind_handle_t f_bind_handle;
60  osm_mad_pool_t f_mad_pool;
61 
62  osmv_query_res_t fLastResult; // used in call back function to store result
63  };
64 }
65 
66 #endif
Interface class to opensm.
Definition: OpenSM.h:28
void SetResult(osmv_query_res_t *res)
Definition: OpenSM.h:36
bool QueryMyltucastGroup(uint8_t *mgid, uint16_t &mlid)
Definition: OpenSM.cxx:425
bool Init()
Definition: OpenSM.cxx:95
virtual ~OpenSM()
Definition: OpenSM.cxx:91
osm_bind_handle_t f_bind_handle
Definition: OpenSM.h:59
osm_mad_pool_t f_mad_pool
Definition: OpenSM.h:60
bool Query_SA(osmv_query_type_t query_type, uint64_t comp_mask, ib_member_rec_t *mc_req, ib_sa_mad_t *res)
Definition: OpenSM.cxx:193
bool PrintAllMulticasts()
Definition: OpenSM.cxx:347
osmv_query_res_t fLastResult
Definition: OpenSM.h:62
osm_vendor_t * f_vendor
Definition: OpenSM.h:56
osm_log_t * f_log
Definition: OpenSM.h:57
bool BindPort()
Definition: OpenSM.cxx:142
bool ManageMultiCastGroup(bool isadd, uint8_t *mgid, uint16_t *mlid)
Definition: OpenSM.cxx:253
bool Close()
Definition: OpenSM.cxx:181
ib_port_attr_t f_local_port
Definition: OpenSM.h:58
Support of InfiniBand verbs.
Definition: Device.cxx:54