cyclonedds-python
cyclonedds-python copied to clipboard
In the python language, the union type defaults to "keyless = False"
In the python language, the union type defaults to "keyless = False" https://github.com/eclipse-cyclonedds/cyclonedds-python/blob/48418490c76a15d01615403a2c11f4a10b7ef0e0/cyclonedds/idl/_builder.py#L324
But in C/C++ language, the union type does not have a key.
But in C/C++ language, the union type does not have a key.
... that may be so, but in the OMG DDS world ... it does optionally have a key, the discriminator. This has always been allowed by the DDS specs, an easy reference is the OMG DDS XTypes specification, wherein 7.2.2.4.4.4.8 "Key Members" states:
In a union type, only the discriminator is permitted to be a key member. The union discriminator is marked as a key by annotating the discriminator itself with the @key annotation [...]
I believe I am being quite generous when I say I think the decision to allow this was misguided ...