Skip to content
This repository has been archived by the owner on Feb 6, 2023. It is now read-only.

cddl extensions as non-singletons #187

Open
nedmsmith opened this issue Aug 9, 2022 · 1 comment
Open

cddl extensions as non-singletons #187

nedmsmith opened this issue Aug 9, 2022 · 1 comment

Comments

@nedmsmith
Copy link
Collaborator

this may be a cddl tooling issue more than corim schema.

Corim has several map-based extension points. A singleton extension contains exactly one additional code point / statement to the parent map. E.g.:

my-map = {
 thing-A => a-type
 thing-B => b-type
 **my-map-extension
}
$$my-map-extension //= (
  thing-C => c-type
)

It would be convenient to the extension could allow multiples. E.g.:

$$my-map-extension //= (
  thing-C => c-type
  thing-D => d-type
)
@thomas-fossati
Copy link
Collaborator

thomas-fossati commented Sep 8, 2022

one can do that:

tcp-header = {seq: uint, ack: uint, * $$tcp-option}

; later, in a different file

$$tcp-option //= (
  sack: [+(left: uint, right: uint)]
)

; and, maybe in another file

$$tcp-option //= (
  sack-permitted: true,
  sack-notpermitted: false,
)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants