Class astutedds::rtps::ShmTransport
ClassList > astutedds > rtps > ShmTransport
High-performance shared memory transport. More...
#include <shm_transport.hpp>
Classes
| Type | Name |
|---|---|
| struct | Config Configuration for shared memory transport. |
| struct | Stats Get transport statistics. |
Public Functions
| Type | Name |
|---|---|
| ShmTransport (uint32_t domain_id, uint32_t participant_id) Create shared memory transport. |
|
| ShmTransport (uint32_t domain_id, uint32_t participant_id, const Config & config) Create shared memory transport. |
|
| ShmTransport (const ShmTransport &) = delete |
|
| size_t | broadcast (const std::vector< uint8_t > & data) Broadcast to all local participants. |
| std::vector< uint32_t > | discover_local_participants () Discover local participants. |
| Locator_t | get_local_locator () const Get local locator. |
| Stats | get_stats () const |
| bool | init () Initialize transport. |
| bool | is_running () const Check if transport is running. |
| ShmTransport & | operator= (const ShmTransport &) = delete |
| bool | send (const Locator_t & locator, const std::vector< uint8_t > & data) Send data to locator. |
| bool | send_to_participant (const GuidPrefix_t & dest_prefix, const std::vector< uint8_t > & data) Send to specific participant. |
| void | set_receive_callback (ShmReceiveCallback callback) Set receive callback. |
| void | shutdown () Shutdown transport. |
| ~ShmTransport () |
Public Static Functions
| Type | Name |
|---|---|
| bool | is_shm_locator (const Locator_t & locator) Check if locator is shared memory. |
Detailed Description
Provides zero-copy data transfer between participants on the same host.
Public Functions Documentation
function ShmTransport [1/3]
Create shared memory transport.
astutedds::rtps::ShmTransport::ShmTransport (
uint32_t domain_id,
uint32_t participant_id
)
Parameters:
domain_idDDS domain IDparticipant_idParticipant ID
function ShmTransport [2/3]
Create shared memory transport.
astutedds::rtps::ShmTransport::ShmTransport (
uint32_t domain_id,
uint32_t participant_id,
const Config & config
)
Parameters:
domain_idDDS domain IDparticipant_idParticipant IDconfigConfiguration
function ShmTransport [3/3]
astutedds::rtps::ShmTransport::ShmTransport (
const ShmTransport &
) = delete
function broadcast
Broadcast to all local participants.
size_t astutedds::rtps::ShmTransport::broadcast (
const std::vector< uint8_t > & data
)
Parameters:
dataData to send
Returns:
Number of successful sends
function discover_local_participants
Discover local participants.
std::vector< uint32_t > astutedds::rtps::ShmTransport::discover_local_participants ()
Returns:
List of discovered participant port IDs
function get_local_locator
Get local locator.
Locator_t astutedds::rtps::ShmTransport::get_local_locator () const
function get_stats
Stats astutedds::rtps::ShmTransport::get_stats () const
function init
Initialize transport.
bool astutedds::rtps::ShmTransport::init ()
Returns:
true if successful
function is_running
Check if transport is running.
inline bool astutedds::rtps::ShmTransport::is_running () const
function operator=
ShmTransport & astutedds::rtps::ShmTransport::operator= (
const ShmTransport &
) = delete
function send
Send data to locator.
bool astutedds::rtps::ShmTransport::send (
const Locator_t & locator,
const std::vector< uint8_t > & data
)
Parameters:
locatorDestination (must be SHM locator)dataData to send
Returns:
true if sent
function send_to_participant
Send to specific participant.
bool astutedds::rtps::ShmTransport::send_to_participant (
const GuidPrefix_t & dest_prefix,
const std::vector< uint8_t > & data
)
Parameters:
dest_prefixDestination participant prefixdataData to send
Returns:
true if sent
function set_receive_callback
Set receive callback.
void astutedds::rtps::ShmTransport::set_receive_callback (
ShmReceiveCallback callback
)
function shutdown
Shutdown transport.
void astutedds::rtps::ShmTransport::shutdown ()
function ~ShmTransport
astutedds::rtps::ShmTransport::~ShmTransport ()
Public Static Functions Documentation
function is_shm_locator
Check if locator is shared memory.
static bool astutedds::rtps::ShmTransport::is_shm_locator (
const Locator_t & locator
)
The documentation for this class was generated from the following file include/astutedds/rtps/shm_transport.hpp