Hi there. Recently I've been using DDS writecdr a lot. Our middleware prepares a std::vector<std::byte> which contains a CDR-serialized message(plus the four bytes CDR headers), then calls dds_writecdr
const ddsrt_iovec_t data_iovec{send_msg_data.data(), send_msg_data.size()};
auto* serdata = ddsi_serdata_from_ser_iov(sertype, SDK_DATA, 1U, &data_iovec, send_msg_data.size());
const auto write_ret = dds_writecdr(writer, serdata);
My understanding is that CycloneDDS will skip the CDR serialization step, as we already did it using our framework. Just curious will CycloneDDS have extra copy over this buffer before it's sent to the network device?
From me tracing the code all the way to deliver_data_network and to write_sample, the sample will be written to a WHC. And I guess this is the only copy. Just to confirm my understanding is correct. Thanks!