Skip to content

Emit min/max size as constants #517

@bryceschober

Description

@bryceschober

Currently, it is impossible at compile time to get the size of sized bstr/tstr objects. Their sizes are encoded in the validation code generated, but nowhere else.

For the fixed-sized arrays of objects, we can use the standard C preprocessor tricks to get the number of elements, but anything field that gets handled as a zcbor_string would need to be encoded separately.

It seems like it could be relatively simple to emil #defines for every validated size. Or even every validated limit, regardless.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions