/zcbor-latest/tests/unit/test3_float16/src/ |
D | main.c | 51 for (int i = 0; i <= 0xFFFF; i++) { in ZTEST() local 52 uint16_t i_be = i; in ZTEST() 54 i_be = switch_bytes(i); in ZTEST() 71 if (isnan(fps[i])) { in ZTEST() 72 zassert_true(isnan(out), "Expected NaN (i = %d)\n", i); in ZTEST() 74 zassert_equal(payload_ne & ~F16_MANTISSA_MSK, i & ~F16_MANTISSA_MSK, in ZTEST() 75 "0x%04x != 0x%04x", payload_ne, i); in ZTEST() 79 zassert_equal(out, fps[i], "Failed i 0x%x (0x%x != 0x%x)\n", in ZTEST() 80 i, *(uint32_t *)&out, *(uint32_t *)&fps[i]); in ZTEST() 81 zassert_equal(payload_ne, i, in ZTEST() [all …]
|
/zcbor-latest/src/ |
D | zcbor_print.c | 39 for (size_t i = 0; i <= size / col_width; i++) { in zcbor_print_compare_strings() local 40 zcbor_do_print("line %zu (char %zu)\r\n", i, i*col_width); in zcbor_print_compare_strings() 41 zcbor_print_compare_lines(&str1[i*col_width], &str2[i*col_width], in zcbor_print_compare_strings() 42 MIN(col_width, (size - i*col_width))); in zcbor_print_compare_strings() 53 for (size_t i = 0; i <= size / col_width; i++) { in zcbor_print_compare_strings_diff() local 54 if (memcmp(&str1[i*col_width], &str2[i*col_width], MIN(col_width, (size - i*col_width))) != 0) { in zcbor_print_compare_strings_diff() 55 zcbor_do_print("line %zu (char %zu)\r\n", i, i*col_width); in zcbor_print_compare_strings_diff() 56 zcbor_print_compare_lines(&str1[i*col_width], &str2[i*col_width], in zcbor_print_compare_strings_diff() 57 MIN(col_width, (size - i*col_width))); in zcbor_print_compare_strings_diff()
|
D | zcbor_common.c | 35 size_t i = (state->constant_state->current_backup) - 1; in zcbor_new_backup() local 37 memcpy(&state->constant_state->backup_list[i], state, in zcbor_new_backup() 42 zcbor_log("New backup (level %zu)\n", i); in zcbor_new_backup() 61 size_t i = state->constant_state->current_backup - 1; in zcbor_process_backup() local 63 zcbor_log("Process backup (level %zu, flags 0x%x)\n", i, flags); in zcbor_process_backup() 67 if (state->constant_state->backup_list[i].payload_moved) { in zcbor_process_backup() 72 memcpy(state, &state->constant_state->backup_list[i], in zcbor_process_backup() 101 for (unsigned int i = 0; i < state->constant_state->current_backup; i++) { in update_backups() local 102 state->constant_state->backup_list[i].payload_end = new_payload_end; in update_backups() 103 state->constant_state->backup_list[i].payload_moved = true; in update_backups() [all …]
|
D | zcbor_decode.c | 99 for (size_t i = 0; i < src_len; i++) { in endian_copy() 100 dst[i] = src[src_len - 1 - i]; in endian_copy() 208 for (unsigned int i = 0; i < result_size; i++) { in val_to_int() local 209 result_uint8[i] = (uint8_t)~result_uint8[i]; in val_to_int() 1067 for (size_t i = 0; i < zcbor_flags_to_bytes(state->decode_state.map_elem_count); i++) { in zcbor_unordered_map_end_decode() local 1068 if (state->decode_state.map_search_elem_state[i] != 0) { in zcbor_unordered_map_end_decode() 1070 i, state->decode_state.map_search_elem_state[i]); in zcbor_unordered_map_end_decode() 1570 for (size_t i = 0; i < max_decode; i++) { in zcbor_multi_decode() local 1575 (uint8_t *)result + i*result_len)) { in zcbor_multi_decode() 1576 *num_decode = i; in zcbor_multi_decode() [all …]
|
D | zcbor_encode.c | 124 for (unsigned int i = 0; i < int_size; i++) { local 125 input_buf[i] = (uint8_t)~input_uint8[i]; 589 for (size_t i = 0; i < num_encode; i++) { local 590 if (!encoder(state, (const uint8_t *)input + i*result_len)) {
|
/zcbor-latest/samples/pet/src/ |
D | main.c | 16 for (int i = 0; i < pet->names_count; i++) { in print_pet() local 17 printf(" %.*s", (int)pet->names[i].len, pet->names[i].value); in print_pet() 20 for (int i = 0; i < pet->birthday.len; i++) { in print_pet() local 21 printf("%02x", pet->birthday.value[i]); in print_pet()
|
/zcbor-latest/tests/encode/test1_suit/src/ |
D | main.c | 266 for (uint32_t i = 0; i < sequence1.SUIT_Command_Sequence_union_count; i++) { in test_command_sequence() local 270 .SUIT_Command_Sequence_union[i] in test_command_sequence() 273 .SUIT_Command_Sequence_union[i] in test_command_sequence() 448 for(uint32_t i = 0; i < num_test_vectors; i++) { in ZTEST() local 449 test_manifest(test_vector[i], test_vector_len[i]); in ZTEST()
|
/zcbor-latest/tests/fuzz/ |
D | fuzz_manifest12.c | 18 for (int i = 0; i < result.SUIT_Envelope_suit_integrated_dependency_key_count; i++) { in fuzz_one_input() local 20 …result.SUIT_Envelope_suit_integrated_dependency_key[i].SUIT_Envelope_suit_integrated_dependency_ke… in fuzz_one_input() 21 …result.SUIT_Envelope_suit_integrated_dependency_key[i].SUIT_Envelope_suit_integrated_dependency_ke… in fuzz_one_input()
|
/zcbor-latest/tests/unit/test1_unit_tests/src/ |
D | main.c | 158 for (int i = 0; i < 1000; i++) { in ZTEST() local 159 large_string[i] = i % 256; in ZTEST() 160 large_payload[i + 9] = 0; in ZTEST() 162 for (size_t i = STR_SIZE - 1001; i < STR_SIZE; i++) { in ZTEST() local 163 large_string[i] = i % 256; in ZTEST() 164 large_payload[i + 9] = 0; in ZTEST() 473 for (int i = 1; i < 18; i++) { in ZTEST() local 475 zassert_false(zcbor_is_last_fragment(&output_frags[i - 1]), NULL); in ZTEST() 476 memcpy(frag_payload, &payload[11 * i + 2], 11); // + 2 because of the CBOR header in ZTEST() 478 zcbor_next_fragment(state_d, &output_frags[i - 1], &output_frags[i]); in ZTEST() [all …]
|
/zcbor-latest/tests/decode/test9_manifest14/ |
D | CMakeLists.txt | 49 -i ${CMAKE_CURRENT_LIST_DIR}/../../cases/manifest14_example0.cborhex
|
/zcbor-latest/zcbor/ |
D | zcbor.py | 109 def list_replace_if_not_null(lst, i, r): argument 111 if lst[i] == "NULL": 119 lst[i] = r 800 for i in range(range_types_regex.count("item")): 801 range_types_regex = range_types_regex.replace("item", "it%dem" % i, 1) 1524 values = tuple(self._flatten_list(names[i], values[i]) for i in range(len(values))) 1540 for i in range(len(obj)): 1541 if isinstance(obj[i], KeyTuple): 1543 self._add_if(retvals, obj[i]) 1544 obj[i] = self._construct_obj(retvals) [all …]
|
/zcbor-latest/samples/pet/ |
D | CMakeLists.txt | 31 -i ${CMAKE_CURRENT_LIST_DIR}/pet1.yml
|
/zcbor-latest/ |
D | README.md | 100 …cal` is true, ensure that the incoming data conforms to canonical encoding, i.e. no indefinite len… 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 …zcbor.py convert -c <CDDL description file> -t <which CDDL type to expect> -i <input data file> -o… 239 python3 <zcbor base>/zcbor/zcbor.py convert -c pet.cddl -t Pet -i mypet.yaml -o mypet.cbor 241 zcbor convert -c pet.cddl -t Pet -i mypet.yaml -o mypet.cbor 252 python3 <zcbor base>/zcbor/zcbor.py validate -c pet.cddl -t Pet --yaml-compatibility -i mypet.json 254 zcbor validate -c pet.cddl -t Pet --yaml-compatibility -i mypet.json 553 usage: zcbor validate [-h] -c CDDL [--no-prelude] [-v] -i INPUT [all …]
|
D | MIGRATION_GUIDE.md | 5 Instead, use the specific functions for the currently supported simple values, i.e.
|
D | ARCHITECTURE.md | 57 For container types, i.e `"LIST"`, `"MAP"`, `"GROUP"`, and `"UNION"`, `self.value` contains a list … 100 …- is_unambiguous(): Whether the type is completely specified, i.e. whether we know beforehand exac… 144 …- If the type is unambiguous (i.e. its value is predetermined, like in `Foo = 5`), the code will v… 146 …- If the type needs only a single member variable (i.e. no additional `foo_count` or `foo_key` etc…
|
D | LICENSE | 19 "control" means (i) the power, direct or indirect, to cause the
|
/zcbor-latest/tests/scripts/ |
D | test_zcbor.py | 41 p_test_vectors12 = tuple(Path(p_cases, f'manifest12_example{i}.cborhex') for i in range(6)) 42 p_test_vectors14 = tuple(Path(p_cases, f'manifest14_example{i}.cborhex') for i in range(6)) 43 p_test_vectors16 = tuple(Path(p_cases, f'manifest14_example{i}.cborhex') for i in range(6)) # Iden… 44 p_test_vectors20 = tuple(Path(p_cases, f'manifest20_example{i}.cborhex') for i in range(6))
|