Go to the documentation of this file.
5 #if ((FASTCDR_VERSION_MAJOR < 2))
6 #define get_buffer_pointer() getBufferPointer()
7 #define get_current_position() getCurrentPosition()
18 return deserialize<bool>();
20 return deserialize<char>();
23 return deserialize<uint8_t>();
25 return deserialize<uint16_t>();
27 return deserialize<uint32_t>();
29 return deserialize<uint64_t>();
32 return deserialize<int8_t>();
34 return deserialize<int16_t>();
36 return deserialize<int32_t>();
38 return deserialize<int64_t>();
41 return deserialize<float>();
43 return deserialize<double>();
48 tmp.
sec = deserialize<uint32_t>();
49 tmp.
nsec = deserialize<uint32_t>();
54 std::runtime_error(
"ROS_Deserializer: type not recognized");
62 uint32_t string_size = deserialize<uint32_t>();
66 throw std::runtime_error(
"Buffer overrun in ROS_Deserializer::deserializeString");
75 const char* buffer_ptr =
reinterpret_cast<const char*
>(
_ptr);
76 dst.assign(buffer_ptr, string_size);
84 return deserialize<uint32_t>();
89 uint32_t vect_size = deserialize<uint32_t>();
92 throw std::runtime_error(
"Buffer overrun in "
93 "ROS_Deserializer::deserializeByteSequence");
113 throw std::runtime_error(
"Buffer overrun");
127 template <
typename T>
140 return Deserialize<bool>(*
_cdr);
142 return Deserialize<char>(*
_cdr);
145 return Deserialize<uint8_t>(*
_cdr);
147 return Deserialize<uint16_t>(*
_cdr);
149 return Deserialize<uint32_t>(*
_cdr);
151 return Deserialize<uint64_t>(*
_cdr);
154 return Deserialize<int8_t>(*
_cdr);
156 return Deserialize<int16_t>(*
_cdr);
158 return Deserialize<int32_t>(*
_cdr);
160 return Deserialize<int64_t>(*
_cdr);
163 return Deserialize<float>(*
_cdr);
165 return Deserialize<double>(*
_cdr);
170 tmp.
sec = Deserialize<uint32_t>(*
_cdr);
171 tmp.
nsec = Deserialize<uint32_t>(*
_cdr);
176 throw std::runtime_error(
"FastCDR_Deserializer: type not recognized");
189 return Deserialize<uint32_t>(*
_cdr);
198 uint32_t seqLength = 0;
199 _cdr->deserialize(seqLength);
202 auto*
ptr =
_cdr->get_current_position();
207 _cdr->jump(seqLength - 1);
208 return {
reinterpret_cast<const uint8_t*
>(
ptr), seqLength };
213 return reinterpret_cast<const uint8_t*
>(
_cdr->get_buffer_pointer());
225 char* buffer_ptr =
reinterpret_cast<char*
>(
const_cast<uint8_t*
>(
_buffer.data()));
229 _cdr->read_encapsulation();
@ DDS_CDR
DDS CDR serialization.
std::shared_ptr< eprosima::fastcdr::FastBuffer > _cdr_buffer
void jump(size_t bytes) override
virtual void reset() override
uint32_t deserializeUInt32() override
const uint8_t * getCurrentPtr() const override
static T Deserialize(eprosima::fastcdr::Cdr &cdr)
void deserializeString(std::string &dst) override
This class offers an interface to serialize/deserialize some basic types using CDR protocol inside an...
Span< const uint8_t > deserializeByteSequence() override
const uint8_t * getCurrentPtr() const override
void jump(size_t bytes) override
Span< const uint8_t > _buffer
std::shared_ptr< eprosima::fastcdr::Cdr > _cdr
uint32_t deserializeUInt32() override
Variant deserialize(BuiltinType type) override
Span< const uint8_t > deserializeByteSequence() override
Cdr & deserialize(_T &value)
Decodes the value of a type from the buffer.
void deserializeString(std::string &dst) override
plotjuggler
Author(s): Davide Faconti
autogenerated on Mon Nov 11 2024 03:23:44