Namespace astutedds::rtps
Namespace List > astutedds > rtps
Namespaces
| Type | Name |
|---|---|
| namespace | PID |
Classes
| Type | Name |
|---|---|
| struct | CacheChange Represents a single sample in the history cache. |
| struct | DataFragSubmessage DATA_FRAG submessage for fragmented data. |
| struct | DiscoveredParticipant Discovered participant info from SPDP. |
| struct | DiscoveredReader Discovered reader info from SEDP. |
| struct | DiscoveredWriter Discovered writer info from SEDP. |
| struct | DiscoveryConfig |
| class | DiscoveryConfigLoader |
| struct | DiscoveryInterfaceConfig |
| struct | DiscoveryPeerConfig |
| struct | DiscoveryRuntimeInfo |
| struct | EntityId_t |
| struct | FragmentKey Key for tracking fragmented samples. |
| struct | FragmentNumberSet Bitmap for tracking fragment reception. |
| class | FragmentationManager Manages fragmentation for a reader. |
| class | FragmentedSample Tracks fragments for a single sample being assembled. |
| struct | GUID_t |
| struct | GuidPrefix_t |
| struct | HeartbeatFragSubmessage HEARTBEAT_FRAG submessage for fragment availability. |
| struct | Locator_t |
| struct | NackFragSubmessage NACK_FRAG submessage for requesting missing fragments. |
| struct | Parameter |
| struct | ParameterId_t |
| class | ParameterListBuilder Helper class for building parameter lists in little-endian CDR. |
| struct | ParsedTypeLookupReply |
| struct | ParsedTypeLookupRequest |
| struct | ProtocolVersion_t |
| class | ReaderHistoryCache History cache for a DataReader. |
| struct | ReaderProxy Model for a DDS DataReader endpoint to be announced via SEDP. |
| class | ReliabilityManagerReader Manages reliability protocol for a DataReader. |
| class | ReliabilityManagerWriter Manages reliability protocol for a DataWriter. |
| class | RtpsUdpTransport RTPS UDP transport with full discovery and reliable delivery. |
| struct | SequenceNumber_t |
| class | ShmPort Represents a communication endpoint in shared memory. |
| class | ShmRingBuffer Lock-free ring buffer in shared memory. |
| class | ShmSegment Manages a single shared memory segment. |
| struct | ShmSegmentHeader Header at the start of each shared memory segment. |
| struct | ShmSlotHeader Header for each message slot in the ring buffer. |
| class | ShmTransport High-performance shared memory transport. |
| struct | SubmessageHeader |
| class | TCPConnection Represents a single TCP connection. |
| struct | TCPMessageHeader TCP message frame header. |
| class | TCPServer TCP server listening for incoming connections. |
| class | TCPTransport Manages TCP connections for RTPS. |
| struct | Time_t |
| struct | VendorId_t |
| class | WriterHistoryCache History cache for a DataWriter. |
| struct | WriterProxy Model for a DDS DataWriter endpoint to be announced via SEDP. |
Public Types
| Type | Name |
|---|---|
| enum uint32_t | ChangeKind_t |
| typedef int32_t | Count_t |
| typedef std::function< void(const std::string &topicName, const std::vector< uint8_t > &data, const GUID_t &writerGuid, const SequenceNumber_t &sequenceNumber)> | DataReceivedCallback Callback types for DCPS integration. |
| typedef Time_t | Duration_t |
| typedef std::function< void(const GUID_t &writer_guid, const SequenceNumber_t &seq_num, std::vector< uint8_t > &&data)> | FragmentAssemblyCallback Callback when a complete sample is assembled. |
| typedef std::function< void(const GUID_t &writer_guid, const SequenceNumber_t &seq_num, const std::vector< FragmentNumber_t > &missing)> | FragmentNackCallback Callback when missing fragments should be NACKed. |
| typedef uint32_t | FragmentNumber_t Fragment starting number (1-based per RTPS spec) |
| enum int32_t | LocatorKind_t |
| typedef std::vector< Locator_t > | LocatorList_t |
| enum | LogLevel Log severity levels (increasing verbosity). |
| typedef std::vector< Parameter > | ParameterList |
| typedef std::function< void(const GuidPrefix_t &guidPrefix)> | ParticipantDiscoveredCallback |
| typedef std::function< void(const DiscoveredReader &reader)> | ReaderDiscoveredCallback |
| typedef std::function< void(const GuidPrefix_t &sender, const std::vector< uint8_t > &data)> | ShmReceiveCallback Callback for received data. |
| enum uint8_t | SubmessageKind |
| typedef std::function< void(std::shared_ptr< TCPConnection >)> | TCPAcceptCallback Callback for new connections. |
| enum | TCPConnectionMode TCP connection mode. |
| enum | TCPConnectionState TCP connection states. |
| typedef std::function< void(const std::vector< uint8_t > &data)> | TCPReceiveCallback Callback for received data. |
| typedef std::function< void(TCPConnectionState state)> | TCPStateCallback Callback for connection state changes. |
| typedef std::function< void(const DiscoveredWriter &writer)> | WriterDiscoveredCallback |
Public Attributes
| Type | Name |
|---|---|
| constexpr uint32_t | DEFAULT_FRAGMENT_SIZE = 1344Default maximum fragment size (fits in standard MTU with headers) |
| constexpr size_t | DEFAULT_RING_BUFFER_SLOTS = 256Default ring buffer slot count. |
| constexpr size_t | DEFAULT_SHM_SEGMENT_SIZE = 16 \* 1024 \* 1024Default shared memory segment size (16 MB) |
| constexpr int32_t | LOCATOR_KIND_SHM = 16Extended locator kind for shared memory. |
| constexpr int32_t | LOCATOR_KIND_TCPv4 = 4Extended locator kind for TCP. |
| constexpr int32_t | LOCATOR_KIND_TCPv6 = 5 |
| constexpr uint32_t | MAX_FRAGMENT_NUMBER = 0xFFFFFFMaximum fragment number (24-bit field) |
| constexpr size_t | MAX_SHM_MESSAGE_SIZE = 1024 \* 1024Maximum message size in shared memory (1 MB) |
Public Static Attributes
| Type | Name |
|---|---|
| constexpr uint8_t | ASTUTEDDS_VENDOR_ID = {0x01, 0x21} |
| constexpr uint16_t | CDR_BE = 0x0000 |
| constexpr uint16_t | CDR_LE = 0x0001 |
| constexpr uint16_t | PL_CDR_BE = 0x0002 |
| constexpr uint16_t | PL_CDR_LE = 0x0003 |
| constexpr const char * | RTPS_DEFAULT_USER_MULTICAST_ADDRESS = "239.255.0.2" |
| constexpr const char * | RTPS_DISCOVERY_MULTICAST_ADDRESS = "239.255.0.1" |
| constexpr uint16_t | RTPS_DOMAIN_GAIN = 250 |
| constexpr uint8_t | RTPS_MAGIC = {'R', 'T', 'P', 'S'} |
| constexpr uint16_t | RTPS_PARTICIPANT_GAIN = 2 |
| constexpr uint16_t | RTPS_PORT_BASE = 7400 |
| constexpr uint8_t | RTPS_VERSION_MAJOR = 2 |
| constexpr uint8_t | RTPS_VERSION_MINOR = 5 |
Public Functions
| Type | Name |
|---|---|
| size_t | align4 (size_t offset) Helper to align an offset to a 4-byte boundary. |
| uint32_t | calculate_fragment_size (uint32_t mtu=1500, bool include_security_overhead=false) Calculate optimal fragment size for network conditions. |
| void | cleanup_shm_domain (uint32_t domain_id) Cleanup shared memory resources for a domain. |
| void | enableLogging (const char * path) Enable logging to the specified file. |
| bool | extract_complete_type_id_hash_from_type_information (const uint8_t * data, size_t len, std::array< uint8_t, 14 > & outHash) |
| std::vector< DataFragSubmessage > | fragment_sample (const std::vector< uint8_t > & sample, const EntityId_t & writer_id, const EntityId_t & reader_id, const SequenceNumber_t & seq_num, uint32_t fragment_size=DEFAULT_FRAGMENT_SIZE) Fragment a large sample into DATA_FRAG submessages. |
| bool | is_tcp_locator (const Locator_t & locator) Check if locator is TCP. |
| std::string | locator_to_address (const Locator_t & locator) Get address string from locator. |
| void | log_message (LogLevel level, const char * format, ...) Emit a timestamped log line when logging is enabled and level is within the active log level. |
| bool | lookup_type_information_hash (const std::string & typeName, xtypes::EquivalenceHash & outHash) |
| bool | lookup_type_name_by_hash (const xtypes::EquivalenceHash & hash, std::string & outTypeName) |
| bool | lookup_type_schema_fields (const std::string & typeName, std::vector< std::string > & outFields) |
| Locator_t | make_shm_locator (uint32_t domain_id, uint32_t participant_id) Create shared memory locator. |
| Locator_t | make_tcp_locator (const std::string & address, uint16_t port) Create TCP locator from address and port. |
| bool | needs_fragmentation (size_t data_size, size_t max_message_size=DEFAULT_FRAGMENT_SIZE) Check if data needs fragmentation. |
| void | parse_shm_locator (const Locator_t & locator, uint32_t & domain_id, uint32_t & participant_id) Extract domain and participant ID from SHM locator. |
| bool | parse_type_lookup_reply_payload (const uint8_t * data, size_t len, ParsedTypeLookupReply & out) |
| bool | parse_type_lookup_request_payload (const uint8_t * data, size_t len, ParsedTypeLookupRequest & out) |
| void | register_type_information_hash (const std::string & typeName, const xtypes::EquivalenceHash & hash) |
| void | register_type_schema_fields (const std::string & typeName, const std::vector< std::string > & fields) |
| void | setLogLevel (LogLevel level) Set the minimum log level that will be emitted. |
| std::map< xtypes::EquivalenceHash, std::string > & | type_info_hash_alias_map () |
| std::map< std::string, xtypes::EquivalenceHash > & | type_info_registry_map () |
| std::mutex & | type_info_registry_mutex () |
| std::map< std::string, std::vector< std::string > > & | type_schema_registry_map () |
Public Types Documentation
enum ChangeKind_t
enum astutedds::rtps::ChangeKind_t {
ALIVE = 0,
ALIVE_FILTERED = 1,
NOT_ALIVE_DISPOSED = 2,
NOT_ALIVE_UNREGISTERED = 3
};
typedef Count_t
using astutedds::rtps::Count_t = typedef int32_t;
typedef DataReceivedCallback
Callback types for DCPS integration.
using astutedds::rtps::DataReceivedCallback = typedef std::function<void( const std::string &topicName, const std::vector<uint8_t> &data, const GUID_t &writerGuid, const SequenceNumber_t &sequenceNumber)>;
typedef Duration_t
using astutedds::rtps::Duration_t = typedef Time_t;
typedef FragmentAssemblyCallback
Callback when a complete sample is assembled.
using astutedds::rtps::FragmentAssemblyCallback = typedef std::function<void(const GUID_t& writer_guid, const SequenceNumber_t& seq_num, std::vector<uint8_t>&& data)>;
typedef FragmentNackCallback
Callback when missing fragments should be NACKed.
using astutedds::rtps::FragmentNackCallback = typedef std::function<void(const GUID_t& writer_guid, const SequenceNumber_t& seq_num, const std::vector<FragmentNumber_t>& missing)>;
typedef FragmentNumber_t
Fragment starting number (1-based per RTPS spec)
using astutedds::rtps::FragmentNumber_t = typedef uint32_t;
enum LocatorKind_t
enum astutedds::rtps::LocatorKind_t {
LOCATOR_KIND_INVALID = -1,
LOCATOR_KIND_RESERVED = 0,
LOCATOR_KIND_UDPv4 = 1,
LOCATOR_KIND_UDPv6 = 2
};
typedef LocatorList_t
using astutedds::rtps::LocatorList_t = typedef std::vector<Locator_t>;
enum LogLevel
Log severity levels (increasing verbosity).
enum astutedds::rtps::LogLevel {
ERROR = 0,
WARN = 1,
INFO = 2,
DEBUG = 3,
TRACE = 4
};
Only messages whose level is ≤ the active log level are emitted. The active level defaults to DEBUG; set ASTUTEDDS_LOG_LEVEL to change it.
typedef ParameterList
using astutedds::rtps::ParameterList = typedef std::vector<Parameter>;
typedef ParticipantDiscoveredCallback
using astutedds::rtps::ParticipantDiscoveredCallback = typedef std::function<void( const GuidPrefix_t &guidPrefix)>;
typedef ReaderDiscoveredCallback
using astutedds::rtps::ReaderDiscoveredCallback = typedef std::function<void( const DiscoveredReader &reader)>;
typedef ShmReceiveCallback
Callback for received data.
using astutedds::rtps::ShmReceiveCallback = typedef std::function<void(const GuidPrefix_t& sender, const std::vector<uint8_t>& data)>;
enum SubmessageKind
enum astutedds::rtps::SubmessageKind {
PAD = 0x01,
ACKNACK = 0x06,
HEARTBEAT = 0x07,
GAP = 0x08,
INFO_TS = 0x09,
INFO_SRC = 0x0c,
INFO_REPLY_IP4 = 0x0d,
INFO_DST = 0x0e,
INFO_REPLY = 0x0f,
NACK_FRAG = 0x12,
HEARTBEAT_FRAG = 0x13,
DATA = 0x15,
DATA_FRAG = 0x16
};
typedef TCPAcceptCallback
Callback for new connections.
using astutedds::rtps::TCPAcceptCallback = typedef std::function<void(std::shared_ptr<TCPConnection>)>;
enum TCPConnectionMode
TCP connection mode.
enum astutedds::rtps::TCPConnectionMode {
CLIENT,
SERVER
};
enum TCPConnectionState
TCP connection states.
enum astutedds::rtps::TCPConnectionState {
DISCONNECTED,
CONNECTING,
CONNECTED,
CLOSING,
ERRORED
};
typedef TCPReceiveCallback
Callback for received data.
using astutedds::rtps::TCPReceiveCallback = typedef std::function<void(const std::vector<uint8_t>& data)>;
typedef TCPStateCallback
Callback for connection state changes.
using astutedds::rtps::TCPStateCallback = typedef std::function<void(TCPConnectionState state)>;
typedef WriterDiscoveredCallback
using astutedds::rtps::WriterDiscoveredCallback = typedef std::function<void( const DiscoveredWriter &writer)>;
Public Attributes Documentation
variable DEFAULT_FRAGMENT_SIZE
Default maximum fragment size (fits in standard MTU with headers)
constexpr uint32_t astutedds::rtps::DEFAULT_FRAGMENT_SIZE;
variable DEFAULT_RING_BUFFER_SLOTS
Default ring buffer slot count.
constexpr size_t astutedds::rtps::DEFAULT_RING_BUFFER_SLOTS;
variable DEFAULT_SHM_SEGMENT_SIZE
Default shared memory segment size (16 MB)
constexpr size_t astutedds::rtps::DEFAULT_SHM_SEGMENT_SIZE;
variable LOCATOR_KIND_SHM
Extended locator kind for shared memory.
constexpr int32_t astutedds::rtps::LOCATOR_KIND_SHM;
variable LOCATOR_KIND_TCPv4
Extended locator kind for TCP.
constexpr int32_t astutedds::rtps::LOCATOR_KIND_TCPv4;
variable LOCATOR_KIND_TCPv6
constexpr int32_t astutedds::rtps::LOCATOR_KIND_TCPv6;
variable MAX_FRAGMENT_NUMBER
Maximum fragment number (24-bit field)
constexpr uint32_t astutedds::rtps::MAX_FRAGMENT_NUMBER;
variable MAX_SHM_MESSAGE_SIZE
Maximum message size in shared memory (1 MB)
constexpr size_t astutedds::rtps::MAX_SHM_MESSAGE_SIZE;
Public Static Attributes Documentation
variable ASTUTEDDS_VENDOR_ID
constexpr uint8_t astutedds::rtps::ASTUTEDDS_VENDOR_ID[2];
variable CDR_BE
constexpr uint16_t astutedds::rtps::CDR_BE;
variable CDR_LE
constexpr uint16_t astutedds::rtps::CDR_LE;
variable PL_CDR_BE
constexpr uint16_t astutedds::rtps::PL_CDR_BE;
variable PL_CDR_LE
constexpr uint16_t astutedds::rtps::PL_CDR_LE;
variable RTPS_DEFAULT_USER_MULTICAST_ADDRESS
constexpr const char* astutedds::rtps::RTPS_DEFAULT_USER_MULTICAST_ADDRESS;
variable RTPS_DISCOVERY_MULTICAST_ADDRESS
constexpr const char* astutedds::rtps::RTPS_DISCOVERY_MULTICAST_ADDRESS;
variable RTPS_DOMAIN_GAIN
constexpr uint16_t astutedds::rtps::RTPS_DOMAIN_GAIN;
variable RTPS_MAGIC
constexpr uint8_t astutedds::rtps::RTPS_MAGIC[4];
variable RTPS_PARTICIPANT_GAIN
constexpr uint16_t astutedds::rtps::RTPS_PARTICIPANT_GAIN;
variable RTPS_PORT_BASE
constexpr uint16_t astutedds::rtps::RTPS_PORT_BASE;
variable RTPS_VERSION_MAJOR
constexpr uint8_t astutedds::rtps::RTPS_VERSION_MAJOR;
variable RTPS_VERSION_MINOR
constexpr uint8_t astutedds::rtps::RTPS_VERSION_MINOR;
Public Functions Documentation
function align4
Helper to align an offset to a 4-byte boundary.
inline size_t astutedds::rtps::align4 (
size_t offset
)
function calculate_fragment_size
Calculate optimal fragment size for network conditions.
uint32_t astutedds::rtps::calculate_fragment_size (
uint32_t mtu=1500,
bool include_security_overhead=false
)
Parameters:
mtuNetwork MTUinclude_security_overheadWhether to account for security headers
Returns:
Recommended fragment size
function cleanup_shm_domain
Cleanup shared memory resources for a domain.
void astutedds::rtps::cleanup_shm_domain (
uint32_t domain_id
)
Parameters:
domain_idDomain to cleanup
function enableLogging
Enable logging to the specified file.
void astutedds::rtps::enableLogging (
const char * path
)
If path is nullptr or empty, log output goes to stderr. May be called before the first DomainParticipant is created. Calling multiple times reopens the file.
Parameters:
pathAbsolute or relative path for the output log file.
function extract_complete_type_id_hash_from_type_information
bool astutedds::rtps::extract_complete_type_id_hash_from_type_information (
const uint8_t * data,
size_t len,
std::array< uint8_t, 14 > & outHash
)
function fragment_sample
Fragment a large sample into DATA_FRAG submessages.
std::vector< DataFragSubmessage > astutedds::rtps::fragment_sample (
const std::vector< uint8_t > & sample,
const EntityId_t & writer_id,
const EntityId_t & reader_id,
const SequenceNumber_t & seq_num,
uint32_t fragment_size=DEFAULT_FRAGMENT_SIZE
)
Parameters:
sampleFull sample datawriter_idWriter entity IDreader_idReader entity ID (or ENTITYID_UNKNOWN for multicast)seq_numSequence numberfragment_sizeSize of each fragment
Returns:
Vector of DATA_FRAG submessages
function is_tcp_locator
Check if locator is TCP.
inline bool astutedds::rtps::is_tcp_locator (
const Locator_t & locator
)
function locator_to_address
Get address string from locator.
inline std::string astutedds::rtps::locator_to_address (
const Locator_t & locator
)
function log_message
Emit a timestamped log line when logging is enabled and level is within the active log level.
void astutedds::rtps::log_message (
LogLevel level,
const char * format,
...
)
Parameters:
levelSeverity of the message.formatprintf-style format string.
function lookup_type_information_hash
inline bool astutedds::rtps::lookup_type_information_hash (
const std::string & typeName,
xtypes::EquivalenceHash & outHash
)
function lookup_type_name_by_hash
inline bool astutedds::rtps::lookup_type_name_by_hash (
const xtypes::EquivalenceHash & hash,
std::string & outTypeName
)
function lookup_type_schema_fields
inline bool astutedds::rtps::lookup_type_schema_fields (
const std::string & typeName,
std::vector< std::string > & outFields
)
function make_shm_locator
Create shared memory locator.
inline Locator_t astutedds::rtps::make_shm_locator (
uint32_t domain_id,
uint32_t participant_id
)
Parameters:
domain_idDomain IDparticipant_idParticipant ID
Returns:
SHM locator
function make_tcp_locator
Create TCP locator from address and port.
inline Locator_t astutedds::rtps::make_tcp_locator (
const std::string & address,
uint16_t port
)
function needs_fragmentation
Check if data needs fragmentation.
inline bool astutedds::rtps::needs_fragmentation (
size_t data_size,
size_t max_message_size=DEFAULT_FRAGMENT_SIZE
)
Parameters:
data_sizeSize of data to sendmax_message_sizeMaximum message size (typically MTU - headers)
Returns:
true if fragmentation is needed
function parse_shm_locator
Extract domain and participant ID from SHM locator.
inline void astutedds::rtps::parse_shm_locator (
const Locator_t & locator,
uint32_t & domain_id,
uint32_t & participant_id
)
function parse_type_lookup_reply_payload
bool astutedds::rtps::parse_type_lookup_reply_payload (
const uint8_t * data,
size_t len,
ParsedTypeLookupReply & out
)
function parse_type_lookup_request_payload
bool astutedds::rtps::parse_type_lookup_request_payload (
const uint8_t * data,
size_t len,
ParsedTypeLookupRequest & out
)
function register_type_information_hash
inline void astutedds::rtps::register_type_information_hash (
const std::string & typeName,
const xtypes::EquivalenceHash & hash
)
function register_type_schema_fields
inline void astutedds::rtps::register_type_schema_fields (
const std::string & typeName,
const std::vector< std::string > & fields
)
function setLogLevel
Set the minimum log level that will be emitted.
void astutedds::rtps::setLogLevel (
LogLevel level
)
Messages with a level above level are suppressed. The default is LogLevel::DEBUG (all messages except TRACE).
Parameters:
levelMaximum level to emit.
function type_info_hash_alias_map
inline std::map< xtypes::EquivalenceHash , std::string > & astutedds::rtps::type_info_hash_alias_map ()
function type_info_registry_map
inline std::map< std::string, xtypes::EquivalenceHash > & astutedds::rtps::type_info_registry_map ()
function type_info_registry_mutex
inline std::mutex & astutedds::rtps::type_info_registry_mutex ()
function type_schema_registry_map
inline std::map< std::string, std::vector< std::string > > & astutedds::rtps::type_schema_registry_map ()
The documentation for this class was generated from the following file include/astutedds/rtps/discovery_config.hpp