Skip to content

Default header version member is still IGTL_HEADER_VERSION_1 #200

@djromberg

Description

@djromberg

I am using the new meta data system that is "activated" via compiler switch ("#ifdef IGTL_HEADER_VERSION >= 2") by default when building the current version. However, when doing the Pack(), "send-pack", InitBuffer(), "read-header", AllocateBuffer(), "read-rest" stuff, I realized that my meta data is missing. It took me quite a while to find out that the default value for the m_HeaderVersion member is still set to IGTL_HEADER_VERSION_1 which lets the Packing omit the meta data. When setting it to IGTL_HEADER_VERSION_2 after message creation, things work as expected.
This issue is rather meant for clarification than as bug report. I would like to know whether this was just forgotten to update or whether it would be a backwards-compatibility problem when messages with the new version are received by a system that still uses the old protocol (and structures) and therefore intended to use it explicitly if wanted. If so, however, I think the SetMetaDataElement methods should somehow fail or raise an exception in order to make it clear that the data won't make it into the buffer.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions