struct 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

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


ch_ptr[in] Pointer to the change.


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.


ch_ptr[in] Pointer to the change.

inline uint32_t getFragmentCount() const

Get the number of fragments this change is split into.


number of fragments.

inline uint16_t getFragmentSize() const

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


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

inline bool is_fully_assembled()

Checks if all fragments have been received.


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

inline bool contains_first_fragment()

Checks if the first fragment is present.


true when it contains the first fragment. In other case, false.

inline void get_missing_fragments(FragmentNumberSet_t &frag_sns)

Fills a FragmentNumberSet_t with the list of missing fragments.


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.


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 with this change.

SequenceNumber_t sequenceNumber = {}

SequenceNumber of the change.

SerializedPayload_t serializedPayload = {}

Serialized Payload associated with the change.

SerializedPayload_t inline_qos = {}

CDR serialization of inlined QoS for this change.

bool isRead = false

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

Time_t sourceTimestamp = {}

Source TimeStamp.