17.2.2.2.1. CacheChange_t

struct eprosima::fastrtps::rtps::CacheChange_t

Structure CacheChange_t, contains information on a specific CacheChange.

Public Functions

inline CacheChange_t()

Default constructor.

Creates an empty CacheChange_t.

inline CacheChange_t(uint32_t payload_size, bool is_untyped = false)

Constructor with payload size

Parameters
  • payload_size – Serialized payload size

  • is_untyped – Flag to mark the change as untyped.

inline 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.

Parameters

ch_ptr[in] Pointer to the change.

Returns

True if correct.

inline 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.

Parameters

ch_ptr[in] Pointer to the change.

inline uint32_t getFragmentCount() const

Get the number of fragments this change is split into.

Returns

number of fragments.

inline uint16_t getFragmentSize() const

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

Returns

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

inline bool is_fully_assembled()

Checks if all fragments have been received.

Returns

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

inline void get_missing_fragments(FragmentNumberSet_t &frag_sns)

Fills a FragmentNumberSet_t with the list of missing fragments.

Parameters

frag_sns[out] FragmentNumberSet_t where result is stored.

inline void setFragmentSize(uint16_t fragment_size, bool create_fragment_list = false)

Set fragment size for this change.

Remark

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

Parameters
  • 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 with 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.