nasa / EdsLib

CCSDS SOIS Electronic Data Sheet Tool and Library
Apache License 2.0
31 stars 12 forks source link

Structure generator uses "buffer" type for entry even if base type is equivalent #8

Closed jphickey closed 2 years ago

jphickey commented 2 years ago

When rendering C structs for containers that contain other container base types as entries (i.e. entries that refer to a type in EDS which is used as the base for other containers), a "buffer" type is used to allocate extra space for the largest possible derivative to be stored in that entry.

However, there are a number of cases where a container type is defined in EDS as a wrapper type that does not actually extend the container. In this case, when that base type is used as an entry in another container, the normal base type can be used, because it was not actually extended.