The following datatype does not work anymore with the changes from #323.
Because of that its currently not possible to execute cyclonedds-insight with the latest cyclonedds-python.
Error:
Traceback (most recent call last):
File "/Users/sventrittler/workspace/forks/cyclonedds-insight/./src/main.py", line 59, in <module>
from models.shapes_demo_model import ShapesDemoModel
File "/Users/sventrittler/workspace/forks/cyclonedds-insight/src/models/shapes_demo_model.py", line 26, in <module>
from dds_access.datatypes import ishape
File "/Users/sventrittler/workspace/forks/cyclonedds-insight/src/dds_access/datatypes/ishape.py", line 42, in <module>
class ShapeTypeExtended(ShapeType, typename="ShapeType"):
fillKind: 'ShapeFillKind'
angle: types.float32
File "/Users/sventrittler/workspace/forks/cyclonedds-insight/deps/cyclonedds-python/cyclonedds/idl/_main.py", line 320, in __new__
raise TypeError(f"Members {unknown_members} for {name} not defined.")
TypeError: Members ['color'] for ShapeTypeExtended not defined.
Type definition:
from dataclasses import dataclass
import cyclonedds.idl as idl
import cyclonedds.idl.annotations as annotate
import cyclonedds.idl.types as types
from enum import auto
@dataclass
@annotate.appendable
@annotate.autoid("sequential")
class ShapeType(idl.IdlStruct, typename="ShapeTypeBase"):
color: str
annotate.key("color")
x: types.int32
y: types.int32
shapesize: types.int32
@annotate.appendable
class ShapeFillKind(idl.IdlEnum, typename="ShapeFillKind", default="SOLID_FILL"):
SOLID_FILL = auto()
TRANSPARENT_FILL = auto()
HORIZONTAL_HATCH_FILL = auto()
VERTICAL_HATCH_FILL = auto()
@dataclass
@annotate.appendable
@annotate.autoid("sequential")
class ShapeTypeExtended(ShapeType, typename="ShapeType"):
fillKind: 'ShapeFillKind'
angle: types.float32
@eboasson could you have a look?
The following datatype does not work anymore with the changes from #323.
Because of that its currently not possible to execute cyclonedds-insight with the latest cyclonedds-python.
Error:
Type definition:
@eboasson could you have a look?