Context
If an XTCE definition contains enum parameter types mapping numeric values to string labels, SPP converts those numeric values to strings in its output. This is fine and it does follow the strict interpretation of the XTCE packet definition, but some users may find it more desirable to get the numeric representations for enum fields for downstream reasons.
For example, if an enum field is encoded as a uint8 in binary, but expanded to a 32 char string, we have just created a 32x data volume increase to store that string, in addition to all the additional fragility that comes with storing string values in data products (are they ASCII? Unicode? Fixed length? What's the max length? etc).
Driving Requirements
Enable create_dataset to generate its output Dataset containing the numeric values for EnumeratedParameterType fields instead of strings.
Implementation Requirements
- kwarg to create_dataset for
disable_enum_labels
- Think about how to reliably use the raw_value for enum parameters (they come out as StringParameter objects) when creating the xarray dataset and determining the correct numpy dtype.
Context
If an XTCE definition contains enum parameter types mapping numeric values to string labels, SPP converts those numeric values to strings in its output. This is fine and it does follow the strict interpretation of the XTCE packet definition, but some users may find it more desirable to get the numeric representations for enum fields for downstream reasons.
For example, if an enum field is encoded as a uint8 in binary, but expanded to a 32 char string, we have just created a 32x data volume increase to store that string, in addition to all the additional fragility that comes with storing string values in data products (are they ASCII? Unicode? Fixed length? What's the max length? etc).
Driving Requirements
Enable
create_datasetto generate its output Dataset containing the numeric values for EnumeratedParameterType fields instead of strings.Implementation Requirements
disable_enum_labels