Class astutedds::rtps::ShmPort
ClassList > astutedds > rtps > ShmPort
Represents a communication endpoint in shared memory.
#include <shm_transport.hpp>
Public Functions
| Type | Name |
|---|---|
| ShmPort (uint32_t domain_id, uint32_t participant_id) Create a shared memory port. |
|
| ShmPort (const ShmPort &) = delete |
|
| void | close () Close port. |
| bool | has_data () const Check if data is available. |
| bool | init () Initialize port. |
| bool | is_open () const Check if port is open. |
| Locator_t | locator () const Get locator for this port. |
| ShmPort & | operator= (const ShmPort &) = delete |
| uint32_t | port_id () const Get port identifier. |
| bool | receive (GuidPrefix_t & sender, std::vector< uint8_t > & data) Receive data (non-blocking) |
| bool | send (uint32_t dest_port_id, const GuidPrefix_t & sender, const std::vector< uint8_t > & data) Send data to another port. |
| ~ShmPort () |
Public Functions Documentation
function ShmPort [1/2]
Create a shared memory port.
astutedds::rtps::ShmPort::ShmPort (
uint32_t domain_id,
uint32_t participant_id
)
Parameters:
domain_idDDS domain IDparticipant_idParticipant ID within domain
function ShmPort [2/2]
astutedds::rtps::ShmPort::ShmPort (
const ShmPort &
) = delete
function close
Close port.
void astutedds::rtps::ShmPort::close ()
function has_data
Check if data is available.
bool astutedds::rtps::ShmPort::has_data () const
function init
Initialize port.
bool astutedds::rtps::ShmPort::init ()
Returns:
true if successful
function is_open
Check if port is open.
inline bool astutedds::rtps::ShmPort::is_open () const
function locator
Get locator for this port.
Locator_t astutedds::rtps::ShmPort::locator () const
function operator=
ShmPort & astutedds::rtps::ShmPort::operator= (
const ShmPort &
) = delete
function port_id
Get port identifier.
inline uint32_t astutedds::rtps::ShmPort::port_id () const
function receive
Receive data (non-blocking)
bool astutedds::rtps::ShmPort::receive (
GuidPrefix_t & sender,
std::vector< uint8_t > & data
)
Parameters:
senderOutput: sender prefixdataOutput: message data
Returns:
true if message received
function send
Send data to another port.
bool astutedds::rtps::ShmPort::send (
uint32_t dest_port_id,
const GuidPrefix_t & sender,
const std::vector< uint8_t > & data
)
Parameters:
dest_port_idDestination port IDsenderSender prefixdataMessage data
Returns:
true if sent
function ~ShmPort
astutedds::rtps::ShmPort::~ShmPort ()
The documentation for this class was generated from the following file include/astutedds/rtps/shm_transport.hpp