Searched refs:a (Results 1 – 15 of 15) sorted by relevance
15 …a = numpy.frombuffer(numpy.arange(num_start, num_end, dtype=numpy.ushort).tobytes(), dtype=numpy.f…17 f.write(a.astype("<f").tobytes() + a.astype(">f").tobytes())23 a = numpy.arange(num_start, num_end, dtype=numpy.uintc)24 b = numpy.frombuffer(a.tobytes(), dtype=numpy.float32).astype("<e") # <e is little endian float16
4 Since zcbor is a Python script that generates C code, this document is split into two sections:25 Each CddlParser object represents a CDDL type.26 Since CDDL types can contain other types, CddlParser recursively parses a CDDL string, and spawns n…28 `self.type` is a string representing the base CDDL type, the options are (corresponding CBOR types …46 `"OTHER"` means another type defined in the same document, and is used as a pointer to that type de…50 … different values are allowed, so in the following example, `Foo` will have a `self.value` of 5, a…57 For container types, i.e `"LIST"`, `"MAP"`, `"GROUP"`, and `"UNION"`, `self.value` contains a list …59 For `"OTHER"`, `self.value` is a string with the name of the type it refers to.71 3. Bar, which has `self.type = "LIST"`, and `self.value` is a python `list` containing the above ob…78 There is a member called `self.my_types`, which is a dict of all the types defined in the CDDL file.[all …]
4 After installing, zcbor can be invoked on the command line as `zcbor`, or included as a module via …9 2. Generating C code that decodes/encodes and validates CBOR data according to a schema.13 The PyPi package comes with a C library which is needed by the generated code.15 If zcbor is asked to generate a cmake file, the file will reference the C library, and if asked to …17 The C library also functions as a standalone CBOR C library, and is used in the [Zephyr RTOS](https…
4 zcbor is a low footprint [CBOR](https://en.wikipedia.org/wiki/CBOR) library in the C language (C++ …5 It comes with a schema-driven script tool that can validate your data, or even generate code.9 It can for example validate a YAML file against a schema and convert it into CBOR.14 The schema language used by zcbor is CDDL (Concise Data Definition Language) which is a powerful hu…23 …- As a low-footprint CBOR decoding/encoding library similar to TinyCBOR/QCBOR/NanoCBOR. The librar…26 - Validate a YAML/JSON file and translate it into CBOR e.g. for transmission.27 - Validate a YAML/JSON/CBOR file before processing it with some other tool29 - As part of a python script that processes YAML/JSON/CBOR files.31 - Do validation against a CDDL schema.32 - Create a read-only representation via named tuples (with names taken from the CDDL schema).[all …]
26 * Allow --file-header to accept a path to a file with header contents36 * MIGRATION_GUIDE.md: Add a migration guide file45 * Fix a few bugs in code generation to do with dereferencing47 * Fix a bug where empty groups and lists would give an error49 * Don't omit zcbor_union_elem_code() when there is a range check.51 * Fix a bug where some decoding function were not called54 * Fix a bug in CDDL parsing to do with nested brackets57 * Fix a bug with enforce_canonical (ZCBOR_CANONICAL) and floats58 * zcbor_encode.c: Fix a length bug in zcbor_bstr_end_decode()63 The following is a list of limitations and missing features:[all …]
32 transformation or translation of a Source form, including but37 Object form, made available under the License, as indicated by a44 represent, as a whole, an original work of authorship. For the purposes61 designated in writing by the copyright owner as "Not a Contribution."64 on behalf of whom a Contribution has been received by Licensor and68 this License, each Contributor hereby grants to You a perpetual,75 this License, each Contributor hereby grants to You a perpetual,83 institute patent litigation against any entity (including a84 cross-claim or counterclaim in a lawsuit) alleging that the Work85 or a Contribution incorporated within the Work constitutes direct[all …]
7 If a removed variant is strictly needed, add your own forward declaration in your code.14 …* A fix was made to the naming of bstr elements with a .size specifier, which might mean that thes…28 * All enum (choice) names have now gained a ``_c`` suffix, so the enum name no longer matches35 * The functions `zcbor_bstr_put_term` and `zcbor_tstr_put_term` have gained a new43 `zcbor_trace_file` and `zcbor_trace`, both of which take a ``state`` parameter.
61 #define MIN(a, b) (((a) < (b)) ? (a) : (b)) argument65 #define MAX(a, b) (((a) < (b)) ? (b) : (a)) argument
10 #define CONCAT_BYTE(a,b) a ## b argument
18 -t Pet # Create a public API for decoding/encoding the "Pet" type from pet.cddl27 # Convert the data in the pet1.yml file to CBOR and put the data in a header28 # file as a C array.
8 # Generated with a --default-max-qty of 3
4 This sample uses zcbor-generated code to decode 3 instances of a data
9 ; Comments are denoted with a semicolon
26 ; Comment out the counter signature since it creates a circular type.72 ; Comment out the recipient list since it creates a circular type.
207 (union_uint1: 5, "This is a five") //213 (5, "This is a five") //254 ? "{[a-z]}",