MCPcopy Create free account
hub / github.com/OpenDDS/OpenDDS / copy_data

Method copy_data

dds/DCPS/transport/framework/ReceivedDataSample.cpp:92–105  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

90}
91
92DDS::OctetSeq ReceivedDataSample::copy_data() const
93{
94 DDS::OctetSeq dst;
95 dst.length(static_cast<unsigned int>(data_length()));
96 unsigned char* out_iter = dst.get_buffer();
97 for (size_t i = 0; i < blocks_.size(); ++i) {
98 const MessageBlock& element = blocks_[i];
99 const unsigned int len = static_cast<unsigned int>(element.len());
100 const char* const data = element.rd_ptr();
101 std::memcpy(out_iter, data, len);
102 out_iter += len;
103 }
104 return dst;
105}
106
107unsigned char ReceivedDataSample::peek(size_t offset) const
108{

Callers 3

decode_payloadMethod · 0.80
TESTFunction · 0.80
TESTFunction · 0.80

Calls 3

lengthMethod · 0.45
get_bufferMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected