Class astutedds::rtps::ShmSegment

ClassList > astutedds > rtps > ShmSegment

Manages a single shared memory segment.

  • #include <shm_transport.hpp>

Public Functions

Type Name
ShmSegment (const std::string & name, size_t size, bool create)
Create or open a shared memory segment.
ShmSegment (const ShmSegment &) = delete
void * base_ptr ()
Get base pointer.
const void * base_ptr () const
ShmSegmentHeader * header ()
Get segment header.
const ShmSegmentHeader * header () const
bool is_valid () const
Check if segment is valid.
const std::string & name () const
Get segment name.
ShmSegment & operator= (const ShmSegment &) = delete
size_t size () const
Get segment size.
~ShmSegment ()

Public Static Functions

Type Name
void unlink (const std::string & name)
Unlink segment (remove from filesystem)

Public Functions Documentation

function ShmSegment [1/2]

Create or open a shared memory segment.

astutedds::rtps::ShmSegment::ShmSegment (
    const std::string & name,
    size_t size,
    bool create
) 

Parameters:

  • name Segment name (will be prefixed with /astutedds_)
  • size Segment size (ignored when opening existing)
  • create Create new segment vs open existing

function ShmSegment [2/2]

astutedds::rtps::ShmSegment::ShmSegment (
    const ShmSegment &
) = delete

function base_ptr [1/2]

Get base pointer.

inline void * astutedds::rtps::ShmSegment::base_ptr () 


function base_ptr [2/2]

inline const void * astutedds::rtps::ShmSegment::base_ptr () const

function header [1/2]

Get segment header.

ShmSegmentHeader * astutedds::rtps::ShmSegment::header () 


function header [2/2]

const ShmSegmentHeader * astutedds::rtps::ShmSegment::header () const

function is_valid

Check if segment is valid.

inline bool astutedds::rtps::ShmSegment::is_valid () const


function name

Get segment name.

inline const std::string & astutedds::rtps::ShmSegment::name () const


function operator=

ShmSegment & astutedds::rtps::ShmSegment::operator= (
    const ShmSegment &
) = delete

function size

Get segment size.

inline size_t astutedds::rtps::ShmSegment::size () const


function ~ShmSegment

astutedds::rtps::ShmSegment::~ShmSegment () 

Public Static Functions Documentation

Unlink segment (remove from filesystem)

static void astutedds::rtps::ShmSegment::unlink (
    const std::string & name
) 



The documentation for this class was generated from the following file include/astutedds/rtps/shm_transport.hpp