Class astutedds::rtps::FragmentedSample

ClassList > astutedds > rtps > FragmentedSample

Tracks fragments for a single sample being assembled.

  • #include <fragmentation.hpp>

Public Functions

Type Name
FragmentedSample (uint32_t sample_size, uint32_t fragment_size)
bool add_fragment (FragmentNumber_t starting_num, const std::vector< uint8_t > & data)
Add a fragment.
const std::vector< uint8_t > & data () const
Get assembled sample (only valid when complete)
std::vector< FragmentNumber_t > get_missing_fragments () const
Get missing fragment numbers.
bool is_complete () const
Check if sample is complete.
uint32_t received_count () const
Get received fragment count.
uint32_t total_fragments () const
Get total expected fragments.

Public Functions Documentation

function FragmentedSample

astutedds::rtps::FragmentedSample::FragmentedSample (
    uint32_t sample_size,
    uint32_t fragment_size
) 

function add_fragment

Add a fragment.

bool astutedds::rtps::FragmentedSample::add_fragment (
    FragmentNumber_t starting_num,
    const std::vector< uint8_t > & data
) 

Parameters:

  • starting_num Starting fragment number (1-based)
  • data Fragment data

Returns:

true if sample is now complete


function data

Get assembled sample (only valid when complete)

inline const std::vector< uint8_t > & astutedds::rtps::FragmentedSample::data () const


function get_missing_fragments

Get missing fragment numbers.

std::vector< FragmentNumber_t > astutedds::rtps::FragmentedSample::get_missing_fragments () const


function is_complete

Check if sample is complete.

bool astutedds::rtps::FragmentedSample::is_complete () const


function received_count

Get received fragment count.

inline uint32_t astutedds::rtps::FragmentedSample::received_count () const


function total_fragments

Get total expected fragments.

inline uint32_t astutedds::rtps::FragmentedSample::total_fragments () const



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