/tinycbor-2.7.6/src/ |
D | cborparser.c | 166 static bool is_fixed_type(uint8_t type) in is_fixed_type() argument 168 return type != CborTextStringType && type != CborByteStringType && type != CborArrayType && in is_fixed_type() 169 type != CborMapType; in is_fixed_type() 175 it->type = CborInvalidType; in preparse_value() 182 uint8_t type = descriptor & MajorTypeMask; in preparse_value() local 183 it->type = type; in preparse_value() 189 return type == CborSimpleType ? CborErrorUnknownType : CborErrorIllegalNumber; in preparse_value() 190 if (likely(!is_fixed_type(type))) { in preparse_value() 193 it->type = type; in preparse_value() 196 return type == CborSimpleType ? CborErrorUnexpectedBreak : CborErrorIllegalNumber; in preparse_value() [all …]
|
D | cborvalidation.c | 294 static inline CborError validate_number(const CborValue *it, CborType type, int flags) in validate_number() argument 302 if (type >= CborHalfFloatType && type <= CborDoubleType) in validate_number() 327 CborType type = cbor_value_get_type(it); in validate_tag() local 362 if (type == CborIntegerType) in validate_tag() 363 type = (CborType)(type + 1); in validate_tag() 366 if ((uint8_t)(allowedTypes & 0xff) == type) in validate_tag() 378 static inline CborError validate_floating_point(CborValue *it, CborType type, int flags) in validate_floating_point() argument 385 if (type != CborDoubleType) { in validate_floating_point() 386 if (type == CborFloatType) { in validate_floating_point() 408 if (type == CborDoubleType) in validate_floating_point() [all …]
|
D | cbortojson.c | 173 static CborError value_to_json(FILE *out, CborValue *it, int flags, CborType type, ConversionStatus… 289 static CborError add_value_metadata(FILE *out, CborType type, const ConversionStatus *status) in add_value_metadata() argument 294 type = flags & FinalTypeMask; in add_value_metadata() 306 if (fprintf(out, "\"t\":%d", type) < 0) in add_value_metadata() 319 if (type == CborSimpleType) in add_value_metadata() 325 static CborError find_tagged_type(CborValue *it, CborTag *tag, CborType *type) in find_tagged_type() argument 328 *type = cbor_value_get_type(it); in find_tagged_type() 329 while (*type == CborTagType) { in find_tagged_type() 335 *type = cbor_value_get_type(it); in find_tagged_type() 354 CborType type = cbor_value_get_type(it); in tagged_value_to_json() local [all …]
|
D | parsetags.pl | 102 for my $type (@types) { 104 my $actualtype = "Cbor${type}Type"; 105 $actualtype = "($actualtype+1)" if $type eq "Integer";
|
D | cborpretty.c | 272 CborType type = cbor_value_get_type(it); in value_to_pretty() local 273 switch (type) { in value_to_pretty() 279 if (fprintf(out, type == CborArrayType ? "[" : "{") < 0) in value_to_pretty() 291 err = container_to_pretty(out, &recursed, type); in value_to_pretty() 300 if (fprintf(out, type == CborArrayType ? "]" : "}") < 0) in value_to_pretty()
|
D | cbor.dox | 87 * \value CborHalfFloatType Type is an IEEE 754 half precision (16-bit) floating point type 88 … \value CborFloatType Type is an IEEE 754 single precision (32-bit) floating point type 89 … \value CborDoubleType Type is an IEEE 754 double precision (64-bit) floating point type
|
/tinycbor-2.7.6/examples/ |
D | simplereader.c | 39 CborType type = cbor_value_get_type(it); in dumprecursive() local 42 switch (type) { in dumprecursive() 48 puts(type == CborArrayType ? "Array[" : "Map["); in dumprecursive() 101 uint8_t type; in dumprecursive() local 102 cbor_value_get_simple_type(it, &type); // can't fail in dumprecursive() 103 printf("simple(%u)\n", type); in dumprecursive()
|
/tinycbor-2.7.6/include/tinycbor/ |
D | cbor.h | 268 uint8_t type; member 280 { return it->type == CborArrayType || it->type == CborMapType; } in cbor_value_is_container() 292 { return value && value->type != CborInvalidType; } in cbor_value_is_valid() 294 { return (CborType)value->type; } in cbor_value_get_type() 298 { return value->type == CborNullType; } in cbor_value_is_null() 300 { return value->type == CborUndefinedType; } in cbor_value_is_undefined() 304 { return value->type == CborBooleanType; } in cbor_value_is_boolean() 314 { return value->type == CborSimpleType; } in cbor_value_is_simple_type() 324 { return value->type == CborIntegerType; } in cbor_value_is_integer() 370 { return value->type == CborTagType; } in cbor_value_is_tag() [all …]
|
/tinycbor-2.7.6/tests/encoder/ |
D | tst_encoder.cpp | 135 struct SimpleType { uint8_t type; }; member 179 int type = v.userType(); in encodeVariant() local 180 switch (type) { in encodeVariant() 215 if (type == qMetaTypeId<NegativeInteger>()) in encodeVariant() 217 if (type == qMetaTypeId<SimpleType>()) in encodeVariant() 218 return cbor_encode_simple_value(encoder, v.value<SimpleType>().type); in encodeVariant() 220 if (type == qMetaTypeId<Float16Standin>()) in encodeVariant() 223 if (type == qMetaTypeId<qfloat16>()) in encodeVariant() 226 if (type == qMetaTypeId<Tag>()) { in encodeVariant() 232 if (type == QVariant::List || type == qMetaTypeId<IndeterminateLengthArray>()) { in encodeVariant() [all …]
|
/tinycbor-2.7.6/tools/json2cbor/ |
D | json2cbor.c | 210 if (md == NULL || md->type != cJSON_Object) in parse_meta_data() 215 if (md->type != cJSON_String || sscanf(md->valuestring, "%" PRIu64, &result.tag) < 0) in parse_meta_data() 222 if (md->type == cJSON_Number) in parse_meta_data() 313 switch (json->type) { in decode_json() 316 return cbor_encode_boolean(encoder, json->type == cJSON_True); in decode_json()
|
/tinycbor-2.7.6/ |
D | TODO | 23 * (unlikely) Add API for checking the pairing of a tag and the tagged type
|
D | Doxyfile | 275 # or free formatted code, this is the default for Fortran type files), VHDL. For 332 # type. If this is not the case, or you want to show the methods anyway, you 346 # Set the SUBGROUPING tag to YES to allow class member groups of the same type 348 # type (e.g. under the Public Functions section). Set it to NO to prevent 580 # type resolution of all parameters of a function it will reject a match between 1596 # The PAPER_TYPE tag can be used to set the paper type that is used by the 2138 # number of items for each type to make the size more manageable. Set this to 0
|
/tinycbor-2.7.6/tests/parser/ |
D | tst_parser.cpp | 1269 QCOMPARE(int(element.type), int(CborTagType)); in mapFind() 1281 QCOMPARE(int(element.type), int(CborInvalidType)); in mapFind()
|