/zcbor-latest/src/ |
D | zcbor_encode.c | 89 const void *const input, size_t max_result_len) in value_encode() argument 93 size_t result_len = zcbor_header_len_ptr(input, max_result_len) - 1; in value_encode() 94 const void *result = input; in value_encode() 97 result = (uint8_t *)input + max_result_len - (result_len ? result_len : 1); in value_encode() 110 const uint8_t *input = input_int; local 127 input = input_buf; 132 if (!value_encode(state, major_type, input, int_size)) { 150 bool zcbor_int32_encode(zcbor_state_t *state, const int32_t *input) argument 152 return zcbor_int_encode(state, input, sizeof(*input)); 156 bool zcbor_int64_encode(zcbor_state_t *state, const int64_t *input) argument [all …]
|
D | zcbor_common.c | 354 float zcbor_float16_to_32(uint16_t input) in zcbor_float16_to_32() argument 356 uint32_t sign = input >> F16_SIGN_OFFS; in zcbor_float16_to_32() 357 uint32_t expo = (input >> F16_EXPO_OFFS) & F16_EXPO_MSK; in zcbor_float16_to_32() 358 uint32_t mantissa = input & F16_MANTISSA_MSK; in zcbor_float16_to_32() 375 uint16_t zcbor_float32_to_16(float input) in zcbor_float32_to_16() argument 377 uint32_t value32 = *(uint32_t *)&input; in zcbor_float32_to_16()
|
/zcbor-latest/include/ |
D | zcbor_encode.h | 62 bool zcbor_int32_put(zcbor_state_t *state, int32_t input); /* pint/nint */ 63 bool zcbor_int64_put(zcbor_state_t *state, int64_t input); /* pint/nint */ 64 bool zcbor_uint32_put(zcbor_state_t *state, uint32_t input); /* pint */ 65 bool zcbor_uint64_put(zcbor_state_t *state, uint64_t input); /* pint */ 66 bool zcbor_size_put(zcbor_state_t *state, size_t input); /* pint */ 68 bool zcbor_bool_put(zcbor_state_t *state, bool input); /* boolean CBOR simple value */ 71 bool zcbor_float16_put(zcbor_state_t *state, float input); /* IEEE754 float16 */ 72 bool zcbor_float16_bytes_put(zcbor_state_t *state, uint16_t input); /* IEEE754 float16 raw bytes */ 73 bool zcbor_float32_put(zcbor_state_t *state, float input); /* IEEE754 float32 */ 74 bool zcbor_float64_put(zcbor_state_t *state, double input); /* IEEE754 float64 */ [all …]
|
D | zcbor_common.h | 498 float zcbor_float16_to_32(uint16_t input); 506 uint16_t zcbor_float32_to_16(float input);
|
/zcbor-latest/samples/pet/src/ |
D | pet_encode.c | 32 static bool encode_Pet(zcbor_state_t *state, const struct Pet *input); 36 zcbor_state_t *state, const struct Pet *input) in encode_Pet() argument 40 …& ((zcbor_multi_encode_minmax(1, 3, &(*input).names_count, (zcbor_encoder_t *)zcbor_tstr_encode, s… in encode_Pet() 41 …&& (((((((*input).birthday.len == 8)) || (zcbor_error(state, ZCBOR_ERR_WRONG_RANGE), false))) || (… in encode_Pet() 42 && (zcbor_bstr_encode(state, (&(*input).birthday)))) in encode_Pet() 43 && ((((*input).species_choice == Pet_species_cat_c) ? ((zcbor_uint32_put(state, (1)))) in encode_Pet() 44 : (((*input).species_choice == Pet_species_dog_c) ? ((zcbor_uint32_put(state, (2)))) in encode_Pet() 45 : (((*input).species_choice == Pet_species_other_c) ? ((zcbor_uint32_put(state, (3)))) in encode_Pet() 56 const struct Pet *input, in cbor_encode_Pet() argument 61 return zcbor_entry_function(payload, payload_len, (void *)input, payload_len_out, states, in cbor_encode_Pet()
|
/zcbor-latest/tests/encode/test3_corner_cases/src/ |
D | main.c | 119 struct TaggedUnion_r input; in ZTEST() local 120 input.TaggedUnion_choice = TaggedUnion_bool_c; in ZTEST() 121 input.Bool = true; in ZTEST() 124 sizeof(output), &input, &encode_len), "%d\r\n"); in ZTEST() 129 input.TaggedUnion_choice = TaggedUnion_uint_c; in ZTEST() 130 input.uint = 0x10; in ZTEST() 133 sizeof(output), &input, &encode_len), NULL); in ZTEST() 405 struct Simples input; in ZTEST() local 409 input.boolval = false; in ZTEST() 410 …zassert_equal(ZCBOR_SUCCESS, cbor_encode_Simple2(output, sizeof(output), &input, &len_encode), NUL… in ZTEST() [all …]
|
/zcbor-latest/tests/fuzz/ |
D | CMakeLists.txt | 33 --input ${CMAKE_CURRENT_LIST_DIR}/../cases/pet0.yaml 60 --input ${CMAKE_CURRENT_LIST_DIR}/../cases/manifest12_example${n}.cborhex 62 --output ${PROJECT_BINARY_DIR}/fuzz_input/input${n}.cbor 86 --input ${CMAKE_CURRENT_LIST_DIR}/../cases/everything_example${n}.yaml 89 --output ${PROJECT_BINARY_DIR}/fuzz_input/input${n}.cbor
|
/zcbor-latest/tests/decode/test3_simple/src/ |
D | main.c | 435 uint8_t input[] = { in ZTEST() local 439 zassert_equal(ZCBOR_SUCCESS, cbor_decode_Pet(input, sizeof(input), &pet, &decode_len), ""); in ZTEST() 440 zassert_equal(sizeof(input), decode_len, NULL); in ZTEST()
|
/zcbor-latest/tests/encode/test1_suit/src/ |
D | main.c | 313 void test_manifest(const uint8_t *input, uint32_t len) in test_manifest() argument 341 zcbor_log("test_vector at: 0x%zx\r\n", (size_t)input); in test_manifest() 343 ((size_t)input) + len); in test_manifest() 344 res = cbor_decode_SUIT_Outer_Wrapper(input, len, &outerwrapper1, NULL); in test_manifest() 443 zassert_mem_equal(input, output, len, NULL); in test_manifest()
|
/zcbor-latest/tests/encode/test4_senml/src/ |
D | main.c | 17 struct lwm2m_senml input = { in ZTEST() local 43 …zassert_equal(ZCBOR_SUCCESS, cbor_encode_lwm2m_senml(payload, sizeof(payload), &input, &encode_len… in ZTEST()
|
/zcbor-latest/tests/unit/test2_cpp/src/ |
D | main.cpp | 110 uint8_t input[] = { in main() local 114 int int_ret = cbor_decode_Pet(input, sizeof(input), &pet, NULL); in main()
|
/zcbor-latest/samples/pet/include/ |
D | pet_encode.h | 31 const struct Pet *input,
|
/zcbor-latest/ |
D | README.md | 125 zcbor validate -c <CDDL description file> -t <which CDDL type to expect> -i <input data file> 126 zcbor convert -c <CDDL description file> -t <which CDDL type to expect> -i <input data file> -o <ou… 132 …or/zcbor.py validate -c <CDDL description file> -t <which CDDL type to expect> -i <input data file> 133 ….py convert -c <CDDL description file> -t <which CDDL type to expect> -i <input data file> -o <out… 192 The generated code will validate the input, which means that it will check all the restriction set … 449 contains typedefs for all the types specified in the cddl input file, as well 452 the types in the CDDL input file. All types are validated as they are xcoded. 464 -c CDDL, --cddl CDDL Path to one or more input CDDL file(s). Passing 554 [--input-as {yaml,json,cbor,cborhex}] -t ENTRY_TYPE 563 -c CDDL, --cddl CDDL Path to one or more input CDDL file(s). Passing [all …]
|
D | ARCHITECTURE.md | 84 The expressions consume a number of characters from the input string, and also capture a substring …
|
D | RELEASE_NOTES.md | 318 …* Make it easier to initialize zcbor_state_t objects: Allow single states as input to zcbor_new_st…
|
/zcbor-latest/tests/scripts/ |
D | test_repo_files.py | 66 def popen_test(self, args, input='', exp_retcode=0, **kwargs): argument 68 stdout0, stderr0 = call0.communicate(input)
|
D | test_zcbor.py | 555 def popen_test(self, args, input="", exp_retcode=0): argument 557 stdout0, stderr0 = call0.communicate(input) 563 def get_std_args(self, input, cmd="convert"): argument 564 …return ["zcbor", cmd, "--cddl", str(p_manifest12), "--input", str(input), "-t", "SUIT_Envelope_Tag…
|
/zcbor-latest/zcbor/ |
D | zcbor.py | 3303 _, in_file_ext = path.splitext(args.input) 3306 f = sys.stdin if args.input == "-" else open(args.input, "r", encoding="utf-8") 3309 f = sys.stdin if args.input == "-" else open(args.input, "r", encoding="utf-8") 3312 f = sys.stdin if args.input == "-" else open(args.input, "r", encoding="utf-8") 3316 f = sys.stdin.buffer if args.input == "-" else open(args.input, "rb", encoding="utf-8")
|
/zcbor-latest/tests/unit/test1_unit_tests/src/ |
D | main.c | 877 bool zcbor_simple_put(zcbor_state_t *state, uint8_t input); 878 bool zcbor_simple_encode(zcbor_state_t *state, uint8_t *input);
|