60 eprosima::fastcdr::FastBuffer fastbuffer(
reinterpret_cast<char*
>(payload->data), payload->max_size);
62 eprosima::fastcdr::Cdr ser(fastbuffer, eprosima::fastcdr::Cdr::DEFAULT_ENDIAN, eprosima::fastcdr::Cdr::DDS_CDR);
63 payload->encapsulation = ser.endianness() == eprosima::fastcdr::Cdr::BIG_ENDIANNESS ? CDR_BE : CDR_LE;
65 ser.serialize_encapsulation();
68 payload->length =
static_cast<uint32_t
>(ser.getSerializedDataLength());
80 eprosima::fastcdr::FastBuffer fastbuffer(
reinterpret_cast<char*
>(payload->data), payload->length);
83 eprosima::fastcdr::Cdr deser(fastbuffer, eprosima::fastcdr::Cdr::DEFAULT_ENDIAN, eprosima::fastcdr::Cdr::DDS_CDR);
86 deser.read_encapsulation();
87 payload->encapsulation = deser.endianness() == eprosima::fastcdr::Cdr::BIG_ENDIANNESS ? CDR_BE : CDR_LE;