Skip to content

Does not detected duplicate field id cpp #597

Closed
@kdoherty2

Description

@kdoherty2

SBE Tool v1.7.9

Given the following SBE schema

<sbe:message name="MsgSBESample2" id="1024" semanticType="MsgSBESample2">
 <field name="field1" id="1" type="uint16" presence="required" semanticType="int" />
 <field name="field2" id="1" type="uint16" presence="required" semanticType="int" />
 </sbe:message>

the SBETool generates two fields in two offsets (0,2) with the same field id.

static SBE_CONSTEXPR std::uint16_t field1Id() SBE_NOEXCEPT
{ return 1; }
 static SBE_CONSTEXPR std::size_t field1EncodingOffset() SBE_NOEXCEPT
 { return 0; }

 static SBE_CONSTEXPR std::uint16_t field2Id() SBE_NOEXCEPT
 { return 1; } 
static SBE_CONSTEXPR std::size_t field2EncodingOffset() SBE_NOEXCEPT
{ return 2; } 

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions