Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How do I define uint16? #459

Open
dwjbosman opened this issue Oct 15, 2024 · 0 comments · May be fixed by #466
Open

How do I define uint16? #459

dwjbosman opened this issue Oct 15, 2024 · 0 comments · May be fixed by #466
Labels
enhancement New feature or request

Comments

@dwjbosman
Copy link

I have an array of 6000 uint16 elements

SampleValue = 0..65535

MeasurementResponse = [
    samples: [1*6000 SampleValue] 
]

The generated C code

struct MeasurementResponse {
	uint32_t SampleValue_m[6000];
	size_t uint_count;
};

Over the wire, this is encoded reasonbly compact. But in memory uint32_t is used. Is possible somehow to indicate in the CDDL that uint16_t is to be used?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants