diff options
author | Harald Welte <laforge@gnumonks.org> | 2019-01-13 23:05:58 +0100 |
---|---|---|
committer | Harald Welte <laforge@gnumonks.org> | 2019-01-13 23:05:58 +0100 |
commit | 8739776233f7d593e26c2f8860c70aa648a6d035 (patch) | |
tree | 1cc5923b1d5f95f1766305484babe9ca5c12d3a4 | |
parent | 66858d15a7916d6978eddcce96ac813ea6594cb8 (diff) |
Define 'record of' USB_StandardDescriptor
This is quite handy for decoding e.g. a configuration descriptor, which
is typically concatenated with interface descriptors, endpoint
descriptors, etc.
-rw-r--r-- | src/USB_Types.ttcn | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/USB_Types.ttcn b/src/USB_Types.ttcn index 33274c2..38956a5 100644 --- a/src/USB_Types.ttcn +++ b/src/USB_Types.ttcn @@ -239,5 +239,12 @@ external function enc_USB_StandardDescriptor(in USB_StandardDescriptor desc) ret external function dec_USB_StandardDescriptor(in octetstring stream) return USB_StandardDescriptor with { extension "prototype(convert) decode(RAW)" }; +type record of USB_StandardDescriptor USB_StandardDescriptors; +external function enc_USB_StandardDescriptors(in USB_StandardDescriptors desc) return octetstring + with { extension "prototype(convert) encode(RAW)" }; +external function dec_USB_StandardDescriptors(in octetstring stream) return USB_StandardDescriptors + with { extension "prototype(convert) decode(RAW)" }; + + } with { encode "RAW"; variant "FIELDORDER(msb)" }; |