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?
Implementation-specific fields of
CompoundValuesuch asmode,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.: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?