struct eprosima::fastrtps::rtps::CacheChange_t

Structure CacheChange_t, contains information on a specific CacheChange.

Public Functions

CacheChange_t() = default

Default constructor.

Creates an empty CacheChange_t.

CacheChange_t(uint32_t payload_size, bool is_untyped = false)

Constructor with payload size

  • payload_size: Serialized payload size

  • is_untyped: Flag to mark the change as untyped.

bool copy(const CacheChange_t *ch_ptr)

Copy a different change into this one.

All the elements are copied, included the data, allocating new memory.


True if correct.

  • [in] ch_ptr: Pointer to the change.

void copy_not_memcpy(const CacheChange_t *ch_ptr)

Copy information form a different change into this one.

All the elements are copied except data.

  • [in] ch_ptr: Pointer to the change.

uint32_t getFragmentCount() const

Get the number of fragments this change is split into.


number of fragments.

uint16_t getFragmentSize() const

Get the size of each fragment this change is split into.


size of fragment (0 means change is not fragmented).

bool is_fully_assembled()

Checks if all fragments have been received.


true when change is fully assembled (i.e. no missing fragments).

void get_missing_fragments(FragmentNumberSet_t &frag_sns)

Fills a FragmentNumberSet_t with the list of missing fragments.

  • [out] frag_sns: FragmentNumberSet_t where result is stored.

void setFragmentSize(uint16_t fragment_size, bool create_fragment_list = false)

Set fragment size for this change.


Parameter create_fragment_list should only be true when receiving the first fragment of a change.

  • fragment_size: Size of fragments.

  • create_fragment_list: Whether to create missing fragments list or not.

Public Members

ChangeKind_t kind = ALIVE

Kind of change, default value ALIVE.

GUID_t writerGUID

GUID_t of the writer that generated this change.

InstanceHandle_t instanceHandle

Handle of the data associated wiht this change.

SequenceNumber_t sequenceNumber

SequenceNumber of the change.

SerializedPayload_t serializedPayload

Serialized Payload associated with the change.

bool isRead = false

Indicates if the cache has been read (only used in READERS)

Time_t sourceTimestamp

Source TimeStamp (only used in Readers)

Time_t receptionTimestamp

Reception TimeStamp (only used in Readers)