Home
last modified time | relevance | path

Searched refs:value (Results 1 – 14 of 14) sorted by relevance

/tinycbor-2.7.6/include/tinycbor/
Dcbor.h189 CBOR_API CborError cbor_encode_uint(CborEncoder *encoder, uint64_t value);
190 CBOR_API CborError cbor_encode_int(CborEncoder *encoder, int64_t value);
192 CBOR_API CborError cbor_encode_simple_value(CborEncoder *encoder, uint8_t value);
201 …API CborError cbor_encode_floating_point(CborEncoder *encoder, CborType fpType, const void *value);
204 CBOR_INLINE_API CborError cbor_encode_boolean(CborEncoder *encoder, bool value) in cbor_encode_boolean() argument
205 { return cbor_encode_simple_value(encoder, (int)value - 1 + (CborBooleanType & 0x1f)); } in cbor_encode_boolean()
211 CBOR_INLINE_API CborError cbor_encode_half_float(CborEncoder *encoder, const void *value) in cbor_encode_half_float() argument
212 { return cbor_encode_floating_point(encoder, CborHalfFloatType, value); } in cbor_encode_half_float()
213 CBOR_INLINE_API CborError cbor_encode_float(CborEncoder *encoder, float value) in cbor_encode_float() argument
214 { return cbor_encode_floating_point(encoder, CborFloatType, &value); } in cbor_encode_float()
[all …]
Dcborjson.h50 CBOR_API CborError cbor_value_to_json_advance(FILE *out, CborValue *value, int flags);
51 CBOR_INLINE_API CborError cbor_value_to_json(FILE *out, const CborValue *value, int flags) in cbor_value_to_json() argument
53 CborValue copy = *value; in cbor_value_to_json()
/tinycbor-2.7.6/src/
Dcborparser.c305 uint64_t _cbor_value_decode_int64_internal(const CborValue *value) in _cbor_value_decode_int64_internal() argument
307 uint8_t val = value->parser->d->get8(value->parser->d, value->offset); in _cbor_value_decode_int64_internal()
309 assert(value->flags & CborIteratorFlag_IntegerValueTooLarge || in _cbor_value_decode_int64_internal()
310 value->type == CborFloatType || value->type == CborDoubleType); in _cbor_value_decode_int64_internal()
316 return value->parser->d->get32(value->parser->d, value->offset + 1); in _cbor_value_decode_int64_internal()
319 return value->parser->d->get64(value->parser->d, value->offset + 1); in _cbor_value_decode_int64_internal()
753 CborError cbor_value_get_int64_checked(const CborValue *value, int64_t *result) in cbor_value_get_int64_checked() argument
755 assert(cbor_value_is_integer(value)); in cbor_value_get_int64_checked()
756 uint64_t v = _cbor_value_extract_int64_helper(value); in cbor_value_get_int64_checked()
772 if (value->flags & CborIteratorFlag_NegativeInteger) in cbor_value_get_int64_checked()
[all …]
Dcbor.dox77 * \value CborIntegerType Type is an integer value, positive, negative or zero
78 * \value CborByteStringType Type is a string of arbitrary raw bytes
79 * \value CborTextStringType Type is a text string encoded in UTF-8
80 * \value CborArrayType Type is a CBOR array
81 …* \value CborMapType Type is a CBOR map (an associative container with key and value
82 …* \value CborTagType Type is a CBOR tag (a 64-bit integer describing the item that f…
83 * \value CborSimpleType Type is one of CBOR Simple Types
84 * \value CborBooleanType Type is a boolean (true or false)
85 * \value CborNullType Type encodes a null
86 * \value CborUndefinedType Type encodes an undefined value
[all …]
Dcborencoder.c294 CborError cbor_encode_uint(CborEncoder *encoder, uint64_t value) in cbor_encode_uint() argument
296 return encode_number(encoder, value, UnsignedIntegerType << MajorTypeShift); in cbor_encode_uint()
316 CborError cbor_encode_int(CborEncoder *encoder, int64_t value) in cbor_encode_int() argument
319 uint64_t ui = value >> 63; /* extend sign to whole length */ in cbor_encode_int()
321 ui ^= value; /* complement negatives */ in cbor_encode_int()
332 CborError cbor_encode_simple_value(CborEncoder *encoder, uint8_t value) in cbor_encode_simple_value() argument
336 if (value >= HalfPrecisionFloat && value <= Break) in cbor_encode_simple_value()
339 return encode_number(encoder, value, SimpleTypesType << MajorTypeShift); in cbor_encode_simple_value()
354 CborError cbor_encode_floating_point(CborEncoder *encoder, CborType fpType, const void *value) in cbor_encode_floating_point() argument
362 put64(buf + 1, *(const uint64_t*)value); in cbor_encode_floating_point()
[all …]
Dcborpretty_stdio.c62 CborError cbor_value_to_pretty_advance(FILE *out, CborValue *value) in cbor_value_to_pretty_advance() argument
64 return cbor_value_to_pretty_stream(cbor_fprintf, out, value, CborPrettyDefaultFlags); in cbor_value_to_pretty_advance()
81 CborError cbor_value_to_pretty_advance_flags(FILE *out, CborValue *value, int flags) in cbor_value_to_pretty_advance_flags() argument
83 return cbor_value_to_pretty_stream(cbor_fprintf, out, value, flags); in cbor_value_to_pretty_advance_flags()
Dcborparser_dup_string.c92 CborError _cbor_value_dup_string(const CborValue *value, void **buffer, size_t *buflen, CborValue *… in _cbor_value_dup_string() argument
97 CborError err = _cbor_value_copy_string(value, NULL, buflen, NULL); in _cbor_value_dup_string()
107 err = _cbor_value_copy_string(value, *buffer, buflen, next); in _cbor_value_dup_string()
Dcborvalidation.c297 uint64_t value; in validate_number() local
306 err = _cbor_value_extract_number(it->parser, &offset, &value); in validate_number()
312 if (value >= Value8Bit) in validate_number()
314 if (value > 0xffU) in validate_number()
316 if (value > 0xffffU) in validate_number()
318 if (value > 0xffffffffU) in validate_number()
663 CborValue value = *it; local
664 CborError err = validate_value(&value, flags, CBOR_PARSER_MAX_RECURSIONS);
Dcborpretty.c472 CborError cbor_value_to_pretty_advance(FILE *out, CborValue *value) in cbor_value_to_pretty_advance() argument
474 return value_to_pretty(out, value); in cbor_value_to_pretty_advance()
Dcbortojson.c687 CborError cbor_value_to_json_advance(FILE *out, CborValue *value, int flags) in cbor_value_to_json_advance() argument
690 return value_to_json(out, value, flags, cbor_value_get_type(value), &status); in cbor_value_to_json_advance()
/tinycbor-2.7.6/
DDoxyfile11 # TAG = value [value, ...]
13 # TAG += value [value, ...]
25 # The default value is: UTF-8.
33 # The default value is: My Project.
69 # The default value is: NO.
77 # The default value is: NO.
92 # The default value is: English.
99 # The default value is: YES.
108 # The default value is: YES.
126 # The default value is: NO.
[all …]
/tinycbor-2.7.6/tools/cbordump/
Dcbordump.c73 CborValue value; in dumpFile() local
74 CborError err = cbor_parser_init(buffer, buflen, 0, &parser, &value); in dumpFile()
77 err = cbor_value_to_json_advance(stdout, &value, flags); in dumpFile()
79 err = cbor_value_to_pretty_advance_flags(stdout, &value, flags); in dumpFile()
83 if (!err && value.offset != (int)buflen) in dumpFile()
/tinycbor-2.7.6/tests/parser/
Dtst_parser.cpp411 int64_t value; in integers() local
413 cbor_value_get_int64(&first, &value); in integers()
414 QCOMPARE(qint64(value), expectedValue); in integers()
417 err = cbor_value_get_int64_checked(&first, &value); in integers()
905 CborValue value; in chunkedStringTest() local
907 err = cbor_value_enter_container(&first, &value); in chunkedStringTest()
909 QVERIFY(cbor_value_is_byte_string(&value) || cbor_value_is_text_string(&value)); in chunkedStringTest()
911 CborValue copy = value; in chunkedStringTest()
915 err = parseOneChunk(&value, &decoded); in chunkedStringTest()
952 QVERIFY(!cbor_value_at_end(&value)); in chunkedStringTest()
[all …]
/tinycbor-2.7.6/tests/encoder/
Dtst_encoder.cpp216 return cbor_encode_negative_int(encoder, v.value<NegativeInteger>().abs); in encodeVariant()
218 return cbor_encode_simple_value(encoder, v.value<SimpleType>().type); in encodeVariant()
227 CborError err = cbor_encode_tag(encoder, v.value<Tag>().tag); in encodeVariant()
230 return static_cast<CborError>(err | encodeVariant(encoder, v.value<Tag>().tagged)); in encodeVariant()
238 list = v.value<IndeterminateLengthArray>(); in encodeVariant()
252 Map map = v.value<Map>(); in encodeVariant()
256 map = v.value<IndeterminateLengthMap>(); in encodeVariant()