You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When generating code with zcbor code -c pet.cddl -d -e -t Pet --output-cmake ~/generated/pet any element of type any or cbor-any is ignored and missing in the generated struct. zcbor doesn't generate a warning about this
That's the current way "any" works. Representing a decoded "any" object in code is complex so this hasn't been done yet. There's some work looking into this, so I will update here when that is merged.
In a pinch you can use a union with all the possible types.
When generating code with
zcbor code -c pet.cddl -d -e -t Pet --output-cmake ~/generated/pet
any element of typeany
orcbor-any
is ignored and missing in the generated struct. zcbor doesn't generate a warning about thispet.cddl:
pet_types.h:
The text was updated successfully, but these errors were encountered: