File tree Expand file tree Collapse file tree 3 files changed +17
-7
lines changed
Expand file tree Collapse file tree 3 files changed +17
-7
lines changed Original file line number Diff line number Diff line change 44#ifndef ROS2_MASTER_CDR_HPP
55#define ROS2_MASTER_CDR_HPP
66
7+ #include < array>
78#include < cstddef>
89#include < cstdint>
10+
11+ #include " bytewise.hpp"
912namespace rmw_cyclonedds_cpp
1013{
1114enum class EncodingVersion {
Original file line number Diff line number Diff line change 1515
1616#include " CDR.hpp"
1717#include " CDRCursor.hpp"
18+
1819namespace rmw_cyclonedds_cpp
1920{
2021class CDRReader : public AbstractCDRReader
2122{
2223protected:
24+ std::unique_ptr<StructValueType> m_value_type;
2325 CDREncodingInfo m_cdr;
2426
2527public:
2628 explicit CDRReader (std::unique_ptr<StructValueType> value_type)
27- : m_cdr{EncodingVersion::CDR_Legacy}
28- {
29- std::ignore = (value_type); // todo
30- }
29+ : m_cdr{EncodingVersion::CDR_Legacy},
30+ m_value_type{ std::move (value_type)}
31+ { }
3132
3233 void deserialize_top_level (
33- void * destination_object, const void * data, const StructValueType * ts);
34+ void * destination_object, const void * data, const StructValueType * ts) {
35+
36+ }
3437
3538 uint32_t read_u32 (CDRReadCursor * data_cursor)
3639 {
Original file line number Diff line number Diff line change 1414#ifndef ROS2_MASTER_DESERIALIZATION_HPP
1515#define ROS2_MASTER_DESERIALIZATION_HPP
1616
17+ #include " CDR.hpp"
1718#include " TypeSupport2.hpp"
1819#include " serdata.hpp"
1920namespace rmw_cyclonedds_cpp
2021{
2122
22- void deserialize_top_level (
23- void * destination_object, const void * data, const StructValueType * ts);
23+ void deserialize_top_level (void * destination_object, const void * data, const StructValueType * ts) {
24+ EncapsulationHeader enc_hdr; // todo
25+ // todo: create deserialization stream using the encapsulation header (endian, eversion)
26+ // todo: pull data out of that stream, structurally recursing on data and types
27+ }
2428
2529class AbstractCDRReader
2630{
You can’t perform that action at this time.
0 commit comments