/zcbor-3.5.0-3.4.0/src/ |
D | zcbor_encode.c | 92 static size_t get_result_len(const void *const input, size_t max_result_len) argument 94 uint8_t *u8_result = (uint8_t *)input; 112 static const void *get_result(const void *const input, size_t max_result_len, argument 116 return &((uint8_t *)input)[max_result_len - (result_len ? result_len : 1)]; 120 return input; 137 const void *const input, size_t max_result_len) argument 141 size_t result_len = get_result_len(input, max_result_len); 142 const void *const result = get_result(input, max_result_len, result_len); 154 const uint8_t *input = input_int; local 171 input = input_buf; [all …]
|
/zcbor-3.5.0-3.4.0/include/ |
D | zcbor_encode.h | 36 bool zcbor_int32_put(zcbor_state_t *state, int32_t input); 37 bool zcbor_int64_put(zcbor_state_t *state, int64_t input); 38 bool zcbor_uint32_put(zcbor_state_t *state, uint32_t input); 39 bool zcbor_uint64_put(zcbor_state_t *state, uint64_t input); 40 bool zcbor_size_put(zcbor_state_t *state, size_t input); 47 bool zcbor_int32_encode(zcbor_state_t *state, const int32_t *input); 48 bool zcbor_int64_encode(zcbor_state_t *state, const int64_t *input); 50 bool zcbor_uint32_encode(zcbor_state_t *state, const uint32_t *input); 51 bool zcbor_uint64_encode(zcbor_state_t *state, const uint64_t *input); 52 bool zcbor_size_encode(zcbor_state_t *state, const size_t *input); [all …]
|
/zcbor-3.5.0-3.4.0/samples/pet/src/ |
D | pet_encode.c | 22 static bool encode_Pet(zcbor_state_t *state, const struct Pet *input); 26 zcbor_state_t *state, const struct Pet *input) in encode_Pet() argument 30 …& ((zcbor_multi_encode_minmax(1, 3, &(*input).names_count, (zcbor_encoder_t *)zcbor_tstr_encode, s… in encode_Pet() 31 && (((((((*input).birthday.len >= 8) in encode_Pet() 32 …&& ((*input).birthday.len <= 8)) || (zcbor_error(state, ZCBOR_ERR_WRONG_RANGE), false))) || (zcbor… in encode_Pet() 33 && (zcbor_bstr_encode(state, (&(*input).birthday)))) in encode_Pet() 34 && ((((*input).species_choice == _Pet_species_cat) ? ((zcbor_uint32_put(state, (1)))) in encode_Pet() 35 : (((*input).species_choice == _Pet_species_dog) ? ((zcbor_uint32_put(state, (2)))) in encode_Pet() 36 : (((*input).species_choice == _Pet_species_other) ? ((zcbor_uint32_put(state, (3)))) in encode_Pet() 49 const struct Pet *input, in cbor_encode_Pet() argument [all …]
|
/zcbor-3.5.0-3.4.0/tests/encode/test3_corner_cases/src/ |
D | main.c | 125 struct TaggedUnion_ input; in ZTEST() local 126 input.TaggedUnion_choice = _TaggedUnion_bool; in ZTEST() 127 input._bool = true; in ZTEST() 130 sizeof(output), &input, &encode_len), "%d\r\n"); in ZTEST() 135 input.TaggedUnion_choice = _TaggedUnion_uint; in ZTEST() 136 input.uint = 0x10; in ZTEST() 139 sizeof(output), &input, &encode_len), NULL); in ZTEST() 411 struct Simples input; in ZTEST() local 415 input.boolval = false; in ZTEST() 416 …zassert_equal(ZCBOR_SUCCESS, cbor_encode_Simple2(output, sizeof(output), &input, &len_encode), NUL… in ZTEST() [all …]
|
/zcbor-3.5.0-3.4.0/tests/decode/test3_simple/src/ |
D | main.c | 436 uint8_t input[] = { in ZTEST() local 440 zassert_equal(ZCBOR_SUCCESS, cbor_decode_Pet(input, sizeof(input), &pet, &decode_len), ""); in ZTEST() 441 zassert_equal(sizeof(input), decode_len, NULL); in ZTEST()
|
/zcbor-3.5.0-3.4.0/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_print("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-3.5.0-3.4.0/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
|
/zcbor-3.5.0-3.4.0/tests/encode/test4_senml/src/ |
D | main.c | 35 struct lwm2m_senml input = { in ZTEST() local 61 …zassert_equal(ZCBOR_SUCCESS, cbor_encode_lwm2m_senml(payload, sizeof(payload), &input, &encode_len… in ZTEST()
|
/zcbor-3.5.0-3.4.0/tests/unit/test2_cpp/src/ |
D | main.cpp | 112 uint8_t input[] = { in main() local 116 int int_ret = cbor_decode_Pet(input, sizeof(input), &pet, NULL); in main()
|
/zcbor-3.5.0-3.4.0/samples/pet/include/ |
D | pet_encode.h | 31 const struct Pet *input,
|
/zcbor-3.5.0-3.4.0/ |
D | README.md | 119 zcbor validate -c <CDDL description file> -t <which CDDL type to expect> -i <input data file> 120 zcbor convert -c <CDDL description file> -t <which CDDL type to expect> -i <input data file> -o <ou… 126 …or/zcbor.py validate -c <CDDL description file> -t <which CDDL type to expect> -i <input data file> 127 ….py convert -c <CDDL description file> -t <which CDDL type to expect> -i <input data file> -o <out… 188 The generated code will validate the input, which means that it will check all the restriction set … 427 contains typedefs for all the types specified in the cddl input file, as well 430 the types in the CDDL input file. All types are validated as they are xcoded. 442 -c CDDL, --cddl CDDL Path to one or more input CDDL file(s). Passing 530 [--input-as {yaml,json,cbor,cborhex}] -t ENTRY_TYPE 539 -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 | 136 …* Make it easier to initialize zcbor_state_t objects: Allow single states as input to zcbor_new_st…
|
/zcbor-3.5.0-3.4.0/tests/scripts/ |
D | test_repo_files.py | 64 def popen_test(self, args, input='', exp_retcode=0, **kwargs): argument 66 stdout0, stderr0 = call0.communicate(input)
|
D | test_zcbor.py | 549 def popen_test(self, args, input="", exp_retcode=0): argument 551 stdout0, stderr0 = call0.communicate(input) 557 def get_std_args(self, input, cmd="convert"): argument 558 …return ["zcbor", cmd, "--cddl", str(p_manifest12), "--input", str(input), "-t", "SUIT_Envelope_Tag…
|
/zcbor-3.5.0-3.4.0/zcbor/ |
D | zcbor.py | 3113 _, in_file_ext = path.splitext(args.input) 3116 f = sys.stdin if args.input == "-" else open(args.input, "r") 3119 f = sys.stdin if args.input == "-" else open(args.input, "r") 3122 f = sys.stdin if args.input == "-" else open(args.input, "r") 3126 f = sys.stdin.buffer if args.input == "-" else open(args.input, "rb")
|