Skip to content

Possible name conflict #13

Description

@pavel-kirienko

Implementation-specific fields of CompoundValue such as mode, is_union, etc. may conflict with DSDL-defined fields.

A possible solution is to prefix these fields with underscore (a regular DSDL field always starts with a letter character so this rules out a conflict), and implement global accessors available via package namespace uavcan., e.g.:

def get_data_type_id(obj):
    return obj._data_type_id

def set_data_type_id(obj, data_type_id):
    obj._data_type_id = data_type_id

def is_union(obj):
    return obj._is_union

def get_union_field(obj):
    return obj._union_field

def set_union_field(obj, name):
    obj._union_field = name

As for CompoundType.mode, it does not seem to be used anywhere outside constructor, and if so it should be removed.

@bendyer do you think this is a sensible idea?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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