choice generation bug
- Dominant language
- Python
- Stars
- 69
- Forks
- 36
- Avg merge
- 3h 30m
- Merged PRs (30d)
- 1
Description
### Describe the bug
From my understanding: For any element which is marked as "choice" in xsd, the generated c structure should look like:
`typedef struct mainType
{
union
{
typeA elementA;
typeB elementB;
...
};
int elementA_isUsed:1;
int elementB_isUsed:1;
...
};
`
currently all elements are added to the structure directly instead.
This is very inefficient in memory usage and can easily lead to en/decoding errors.
### To Reproduce
This happens for all din, iso-2 and -20 types.
In multiple structures, e.g. in ParameterSetType -> ParameterType, where the parameter could be one of type per standard:
bool, byte, short, int, physical, or string, but never multiple at once.
### Anything else?
The general functionality of union seems to be there.
The PGPData a union is generated, but in completely wrong way which overwrites itself.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.