Skip to content

Commit

Permalink
more
Browse files Browse the repository at this point in the history
  • Loading branch information
rotu committed Apr 11, 2020
1 parent a489c34 commit 9e54e77
Showing 1 changed file with 25 additions and 1 deletion.
26 changes: 25 additions & 1 deletion rmw_cyclonedds_cpp/src/CDR.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,22 +11,46 @@
#include "bytewise.hpp"
namespace rmw_cyclonedds_cpp
{

enum class EncodingVersion
{
CDR_Legacy,
CDR1,
CDR2,
XML,
};

enum class EncapsulationIdentifier{
CDR_BE = 0x00,
CDR_LE = 0x01,
PL_CDR_BE = 0x02,
PL_CDR_LE = 0x03,
CDR2_BE = 0x06,
CDR2_LE = 0x07,
D_CDR2_BE = 0x08,
D_CDR2_LE = 0x09,
PL_CDR2_BE = 0x0a,
PL_CDR2_lE = 0x0b,
XML = 0x04,
};

/// aka ENC_HEADER
struct EncapsulationHeader
{
/// stream endianness
endian m_endian = native_endian();
endian m_endian;
/// encoding version
EncodingVersion m_eversion;
/// encoding options
std::array<byte, 2> m_options;

static EncapsulationHeader from_bytes(byte * b){
EncodingVersion =
endian m_endian = b[0]
return EncapsulationHeader{

};
}
};

/// aka DHEADER
Expand Down

0 comments on commit 9e54e77

Please sign in to comment.