lcls2
C++ API: public headers of xtcdata, psalg, psdaq and psana
Loading...
Searching...
No Matches
Pds::Fabrics::LocalAddress Class Reference

Local buffer (pointer and length) with an optional MemoryRegion; its first two fields are reinterpreted as a struct iovec by iovec(). More...

#include <Endpoint.hh>

Public Member Functions

 LocalAddress ()
 Construct with a null buffer, zero length and no memory region.
 
 LocalAddress (void *buf, size_t len, MemoryRegion *mr=NULL)
 Construct from a buffer pointer, its length and an optional MemoryRegion.
 
void * buf () const
 Return the buffer pointer.
 
size_t len () const
 Return the buffer length.
 
MemoryRegion * mr () const
 Return the associated MemoryRegion, or NULL if none is set.
 
const struct iovec * iovec () const
 Return this object reinterpreted as a const struct iovec pointer (relies on _buf and _len being the first members).
 

Public Attributes

void * _buf
 Buffer pointer (the iovec iov_base field).
 
size_t _len
 Buffer length (the iovec iov_len field).
 
MemoryRegion * _mr
 Associated memory region or NULL; set by Fabric::register_memory(LocalAddress*).
 

Detailed Description

Local buffer (pointer and length) with an optional MemoryRegion; its first two fields are reinterpreted as a struct iovec by iovec().

Constructor & Destructor Documentation

◆ LocalAddress() [1/2]

Pds::Fabrics::LocalAddress::LocalAddress ( )

Construct with a null buffer, zero length and no memory region.

◆ LocalAddress() [2/2]

Pds::Fabrics::LocalAddress::LocalAddress ( void *  buf,
size_t  len,
MemoryRegion *  mr = NULL 
)

Construct from a buffer pointer, its length and an optional MemoryRegion.

Member Function Documentation

◆ buf()

void * Pds::Fabrics::LocalAddress::buf ( ) const

Return the buffer pointer.

◆ iovec()

const struct iovec * Pds::Fabrics::LocalAddress::iovec ( ) const

Return this object reinterpreted as a const struct iovec pointer (relies on _buf and _len being the first members).

◆ len()

size_t Pds::Fabrics::LocalAddress::len ( ) const

Return the buffer length.

◆ mr()

MemoryRegion * Pds::Fabrics::LocalAddress::mr ( ) const

Return the associated MemoryRegion, or NULL if none is set.

Member Data Documentation

◆ _buf

void* Pds::Fabrics::LocalAddress::_buf

Buffer pointer (the iovec iov_base field).

◆ _len

size_t Pds::Fabrics::LocalAddress::_len

Buffer length (the iovec iov_len field).

◆ _mr

MemoryRegion* Pds::Fabrics::LocalAddress::_mr

Associated memory region or NULL; set by Fabric::register_memory(LocalAddress*).


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