DABC (Data Acquisition Backbone Core)  2.9.9
Public Types | Public Member Functions
verbs::ContextRef Class Reference

Reference to verbs::Context More...

#include <verbs/Context.h>

Inheritance diagram for verbs::ContextRef:
dabc::Reference

Public Types

enum  MulticastActions {
  mcst_Error = 0 , mcst_Ok , mcst_Register , mcst_Query ,
  mcst_Init , mcst_Unregister
}
 

Public Member Functions

struct ibv_context * context () const
 
struct ibv_ah * CreateAH (uint32_t dest_lid)
 
struct ibv_ah * CreateMAH (ibv_gid &mgid, uint32_t mlid)
 
int GetGidIndex (ibv_gid *lookgid)
 
int IbPort () const
 
bool IsMulticast () const
 
uint16_t lid () const
 
int ManageMulticast (int action, ibv_gid &mgid, uint16_t &mlid)
 
unsigned max_sge () const
 
ibv_mtu mtu () const
 
bool OpenVerbs (bool withmulticast=false, const char *devicename=0, int ibport=-1)
 
struct ibv_pd * pd () const
 
dabc::Reference RegisterPool (dabc::MemoryPool *pool)
 
- Public Member Functions inherited from dabc::Reference
bool AddChild (Object *obj)
 Add child to list of object children. More...
 
const char * ClassName () const
 Return class name of referenced object, if object not assigned, returns "---". More...
 
void Destroy () throw ()
 Release reference and starts destroyment of referenced object. More...
 
Reference FindChild (const char *name) const
 Searches for child in referenced object. More...
 
bool GetAllChildRef (ReferencesVector *vect) const
 Return references for all childs. More...
 
Reference GetChild (unsigned n) const
 Return reference on child n. More...
 
Reference GetFolder (const std::string &name, bool force=false) throw ()
 Return folder of specified name, no special symbols are allowed. More...
 
const char * GetName () const
 Return name of referenced object, if object not assigned, returns "---". More...
 
ObjectGetObject () const
 Return pointer on the object. More...
 
ObjectGetParent () const
 Returns pointer on parent object. More...
 
Reference GetParentRef () const
 Returns reference on parent object. More...
 
bool IsName (const char *name) const
 Returns true if object name is the same as specified one. More...
 
std::string ItemName (bool compact=true) const
 Produce string, which can be used as name argument in dabc::mgr.FindItem(name) call. More...
 
bool null () const
 Returns true if reference contains nullptr. More...
 
unsigned NumChilds () const
 Return number of childs in referenced object. More...
 
unsigned NumReferences () const
 Returns number of references on the object. More...
 
bool operator! () const
 Returns true if reference contains nullptr. More...
 
bool operator!= (const Reference &src) const
 Compare operator - return true if references refer to different object. More...
 
bool operator!= (Object *obj) const
 Compare operator - return true if reference refer to different objects. More...
 
Objectoperator() () const
 Return pointer on the object. More...
 
Referenceoperator<< (Reference &src) throw ()
 Move operator - reference moved from source to target. More...
 
Referenceoperator= (const Reference &src) throw ()
 Assignment operator - copy reference. More...
 
Referenceoperator= (Object *obj) throw ()
 Assignment operator - copy reference. More...
 
bool operator== (const Reference &src) const
 Compare operator - return true if references refer to same object. More...
 
bool operator== (Object *obj) const
 Compare operator - return true if reference refer to same object. More...
 
void Print (int lvl=0, const char *from=0) const
 Show on debug output content of reference. More...
 
 Reference (const Reference &src) throw ()
 Copy constructor, if source is transient than source reference will be emptied. More...
 
 Reference (Object *obj=nullptr)
 Constructor, creates reference on the object. More...
 
std::string RelativeName (const dabc::Reference &topitem)
 Produce name, which can be used to find item, calling topitem.FindChild(). More...
 
void Release () throw ()
 Releases reference on the object. More...
 
bool RemoveChild (const char *name, bool cleanup=true)
 Remove child with given name and return reference on that child. More...
 
bool RemoveChilds (bool cleanup=true)
 Remove all childs in referenced object If cleanup true (default) and object is owner, all objects will be destroyed. More...
 
void SetAutoDestroy (bool on=true)
 Set autodestroy flag for the object Once enabled, object will be destroyed when last reference will be cleared. More...
 
void SetObject (Object *obj, bool withmutex=true)
 Direct set of object to reference. More...
 
Reference Take ()
 Copy reference to output object. More...
 
virtual ~Reference ()
 Destructor, releases reference on the object. More...
 

Additional Inherited Members

- Protected Member Functions inherited from dabc::Reference
bool AcquireRefWithoutMutex (Reference &ref)
 Special method, which allows to generate new reference when object mutex is locked. More...
 
void Assign (const Reference &src)
 Method used in copy constructor and assigned operations. More...
 
MutexObjectMutex () const
 
template<class T >
bool verify_object (Object *src, T *&tgt)
 Method used in reference constructor/assignments to verify is object is suitable. More...
 
- Protected Attributes inherited from dabc::Reference
ObjectfObj
 pointer on the object More...
 

Detailed Description

Reference to verbs::Context

Definition at line 74 of file Context.h.

Member Enumeration Documentation

◆ MulticastActions

Enumerator
mcst_Error 
mcst_Ok 
mcst_Register 
mcst_Query 
mcst_Init 
mcst_Unregister 

Definition at line 80 of file Context.h.

Member Function Documentation

◆ OpenVerbs()

bool verbs::ContextRef::OpenVerbs ( bool  withmulticast = false,
const char *  devicename = 0,
int  ibport = -1 
)

Definition at line 294 of file Context.cxx.

◆ IbPort()

int verbs::ContextRef::IbPort ( ) const
inline

Definition at line 84 of file Context.h.

◆ IsMulticast()

bool verbs::ContextRef::IsMulticast ( ) const
inline

Definition at line 85 of file Context.h.

◆ pd()

struct ibv_pd* verbs::ContextRef::pd ( ) const
inline

Definition at line 86 of file Context.h.

◆ context()

struct ibv_context* verbs::ContextRef::context ( ) const
inline

Definition at line 87 of file Context.h.

◆ lid()

uint16_t verbs::ContextRef::lid ( ) const
inline

Definition at line 88 of file Context.h.

◆ mtu()

ibv_mtu verbs::ContextRef::mtu ( ) const
inline

Definition at line 89 of file Context.h.

◆ max_sge()

unsigned verbs::ContextRef::max_sge ( ) const
inline

Definition at line 90 of file Context.h.

◆ RegisterPool()

dabc::Reference verbs::ContextRef::RegisterPool ( dabc::MemoryPool pool)

Definition at line 403 of file Context.cxx.

◆ GetGidIndex()

int verbs::ContextRef::GetGidIndex ( ibv_gid *  lookgid)

Definition at line 431 of file Context.cxx.

◆ CreateAH()

struct ibv_ah * verbs::ContextRef::CreateAH ( uint32_t  dest_lid)

Definition at line 357 of file Context.cxx.

◆ ManageMulticast()

int verbs::ContextRef::ManageMulticast ( int  action,
ibv_gid &  mgid,
uint16_t &  mlid 
)

Definition at line 316 of file Context.cxx.

◆ CreateMAH()

struct ibv_ah * verbs::ContextRef::CreateMAH ( ibv_gid &  mgid,
uint32_t  mlid 
)

Definition at line 374 of file Context.cxx.


The documentation for this class was generated from the following files: