Mbed OS Reference
Loading...
Searching...
No Matches
_QCBORItem Struct Reference

QCBORItem holds the type, value and other info for a decoded item returned by GetNextItem(). More...

#include <qcbor.h>

Data Fields

uint8_t uNestingLevel
 Tells what element of the val union to use.
 
uint8_t uLabelType
 How deep the nesting from arrays and maps are.
 
uint8_t uDataAlloc
 Tells what element of the label union to use.
 
uint8_t uLabelAlloc
 1 if allocated with string allocator, 0 if not.
 
uint8_t uNextNestLevel
 Like uDataAlloc, but for label.
 
union { 
 
   uint64_t   uint64 
 The value for uDataType QCBOR_TYPE_INT64. More...
 
   UsefulBufC   string 
 The value for uDataType QCBOR_TYPE_UINT64. More...
 
   uint16_t   uCount 
 The value for uDataType QCBOR_TYPE_BYTE_STRING and QCBOR_TYPE_TEXT_STRING. More...
 
   double   dfnum 
 The "value" for uDataType QCBOR_TYPE_ARRAY or QCBOR_TYPE_MAP – the number of items in the array or map UINT16_MAX when decoding indefinite lengths maps and arrays. More...
 
   struct { 
 
   }   epochDate 
 The value for uDataType QCBOR_TYPE_DOUBLE. More...
 
   UsefulBufC   dateString 
 The value for uDataType QCBOR_TYPE_DATE_EPOCH. More...
 
   UsefulBufC   bigNum 
 The value for uDataType QCBOR_TYPE_DATE_STRING. More...
 
   uint8_t   uSimple 
 The value for uDataType QCBOR_TYPE_BIGNUM. More...
 
   uint64_t   uTagV 
 The integer value for unknown simple types. More...
 
val 
 If not equal to uNestingLevel, this item closed out at least one map/array.
 
union { 
 
   int64_t   int64 
 The label for uLabelType QCBOR_TYPE_BYTE_STRING and QCBOR_TYPE_TEXT_STRING. More...
 
   uint64_t   uint64 
 The label for uLabelType for QCBOR_TYPE_INT64. More...
 
label 
 The union holding the item's value.
 
uint64_t uTagBits
 Union holding the different label types selected based on uLabelType.
 

Detailed Description

QCBORItem holds the type, value and other info for a decoded item returned by GetNextItem().

Definition at line 724 of file qcbor.h.

Field Documentation

◆ uNestingLevel

uint8_t uNestingLevel

Tells what element of the val union to use.

One of QCBOR_TYPE_XXXX

Definition at line 726 of file qcbor.h.

◆ uLabelType

uint8_t uLabelType

How deep the nesting from arrays and maps are.

0 is the top level with no arrays or maps entered

Definition at line 727 of file qcbor.h.

◆ uDataAlloc

uint8_t uDataAlloc

Tells what element of the label union to use.

Definition at line 728 of file qcbor.h.

◆ uLabelAlloc

uint8_t uLabelAlloc

1 if allocated with string allocator, 0 if not.

See QCBORDecode_MakeMallocStringAllocator()

Definition at line 729 of file qcbor.h.

◆ uNextNestLevel

uint8_t uNextNestLevel

Like uDataAlloc, but for label.

Definition at line 730 of file qcbor.h.

◆ int64

int64_t int64

The label for uLabelType QCBOR_TYPE_BYTE_STRING and QCBOR_TYPE_TEXT_STRING.

Definition at line 733 of file qcbor.h.

◆ uint64

uint64_t uint64

The value for uDataType QCBOR_TYPE_INT64.

The label for uLabelType for QCBOR_TYPE_INT64.

Definition at line 734 of file qcbor.h.

◆ string

UsefulBufC string

The value for uDataType QCBOR_TYPE_UINT64.

Definition at line 736 of file qcbor.h.

◆ uCount

uint16_t uCount

The value for uDataType QCBOR_TYPE_BYTE_STRING and QCBOR_TYPE_TEXT_STRING.

Definition at line 737 of file qcbor.h.

◆ dfnum

double dfnum

The "value" for uDataType QCBOR_TYPE_ARRAY or QCBOR_TYPE_MAP – the number of items in the array or map UINT16_MAX when decoding indefinite lengths maps and arrays.

Definition at line 739 of file qcbor.h.

◆ [struct]

struct { ... } epochDate

The value for uDataType QCBOR_TYPE_DOUBLE.

◆ dateString

UsefulBufC dateString

The value for uDataType QCBOR_TYPE_DATE_EPOCH.

Definition at line 744 of file qcbor.h.

◆ bigNum

UsefulBufC bigNum

The value for uDataType QCBOR_TYPE_DATE_STRING.

Definition at line 745 of file qcbor.h.

◆ uSimple

uint8_t uSimple

The value for uDataType QCBOR_TYPE_BIGNUM.

Definition at line 746 of file qcbor.h.

◆ uTagV

uint64_t uTagV

The integer value for unknown simple types.

Definition at line 747 of file qcbor.h.

◆ [union]

union { ... } val

If not equal to uNestingLevel, this item closed out at least one map/array.

◆ [union]

union { ... } label

The union holding the item's value.

Select union member based on uDataType

◆ uTagBits

uint64_t uTagBits

Union holding the different label types selected based on uLabelType.

Definition at line 757 of file qcbor.h.