Home
last modified time | relevance | path

Searched refs:input (Results 1 – 19 of 19) sorted by relevance

/zcbor-latest/src/
Dzcbor_encode.c89 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 …]
Dzcbor_common.c354 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/
Dzcbor_encode.h62 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 …]
Dzcbor_common.h498 float zcbor_float16_to_32(uint16_t input);
506 uint16_t zcbor_float32_to_16(float input);
/zcbor-latest/samples/pet/src/
Dpet_encode.c32 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/
Dmain.c119 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/
DCMakeLists.txt33 --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/
Dmain.c435 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/
Dmain.c313 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/
Dmain.c17 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/
Dmain.cpp110 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/
Dpet_encode.h31 const struct Pet *input,
/zcbor-latest/
DREADME.md125 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 …]
DARCHITECTURE.md84 The expressions consume a number of characters from the input string, and also capture a substring …
DRELEASE_NOTES.md318 …* Make it easier to initialize zcbor_state_t objects: Allow single states as input to zcbor_new_st…
/zcbor-latest/tests/scripts/
Dtest_repo_files.py66 def popen_test(self, args, input='', exp_retcode=0, **kwargs): argument
68 stdout0, stderr0 = call0.communicate(input)
Dtest_zcbor.py555 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/
Dzcbor.py3303 _, 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/
Dmain.c877 bool zcbor_simple_put(zcbor_state_t *state, uint8_t input);
878 bool zcbor_simple_encode(zcbor_state_t *state, uint8_t *input);