Struct CacheChange_t

Struct Documentation

struct CacheChange_t

Structure CacheChange_t, contains information on a specific CacheChange.

Public Functions

inline CacheChange_t()

Default constructor. Creates an empty CacheChange_t.

CacheChange_t(const CacheChange_t&) = delete
const CacheChange_t &operator=(const CacheChange_t&) = delete
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 virtual ~CacheChange_t()
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 bool contains_first_fragment()

Checks if the first fragment is present.

Returns:

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.

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.

inline bool add_fragments(const SerializedPayload_t &incoming_data, uint32_t fragment_starting_num, uint32_t fragments_in_submessage)
inline IPayloadPool const *payload_owner() const
inline IPayloadPool *payload_owner()
inline void payload_owner(IPayloadPool *owner)

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.

fastdds::rtps::VendorId_t vendor_id = c_VendorId_Unknown

Vendor Id of the writer that generated this change.

CacheChangeReaderInfo_t reader_info
CacheChangeWriterInfo_t writer_info
union eprosima::fastrtps::rtps::CacheChange_t
WriteParams write_params = {}
bool is_untyped_ = true