head 1.1;
branch 1.1.1;
access;
symbols
netbsd-11-0-RC4:1.1.1.1
netbsd-11-0-RC3:1.1.1.1
netbsd-11-0-RC2:1.1.1.1
netbsd-11-0-RC1:1.1.1.1
perseant-exfatfs-base-20250801:1.1.1.1
netbsd-11:1.1.1.1.0.12
netbsd-11-base:1.1.1.1
netbsd-10-1-RELEASE:1.1.1.1
perseant-exfatfs-base-20240630:1.1.1.1
perseant-exfatfs:1.1.1.1.0.10
perseant-exfatfs-base:1.1.1.1
netbsd-10-0-RELEASE:1.1.1.1
netbsd-10-0-RC6:1.1.1.1
netbsd-10-0-RC5:1.1.1.1
netbsd-10-0-RC4:1.1.1.1
netbsd-10-0-RC3:1.1.1.1
netbsd-10-0-RC2:1.1.1.1
netbsd-10-0-RC1:1.1.1.1
netbsd-10:1.1.1.1.0.8
netbsd-10-base:1.1.1.1
cjep_sun2x-base1:1.1.1.1
cjep_sun2x:1.1.1.1.0.6
cjep_sun2x-base:1.1.1.1
cjep_staticlib_x-base1:1.1.1.1
cjep_staticlib_x:1.1.1.1.0.4
cjep_staticlib_x-base:1.1.1.1
phil-wifi-20200421:1.1.1.1
phil-wifi:1.1.1.1.0.2
phil-wifi-20200411:1.1.1.1
phil-wifi-20200406:1.1.1.1
libcbor-3b41770ab0ca408d242041dddb3b75811345573f:1.1.1.1
PJK:1.1.1;
locks; strict;
comment @# @;
1.1
date 2020.03.03.00.34.29; author christos; state Exp;
branches
1.1.1.1;
next ;
commitid CsDukytrNgtSbTYB;
1.1.1.1
date 2020.03.03.00.34.29; author christos; state Exp;
branches
1.1.1.1.2.1;
next ;
commitid CsDukytrNgtSbTYB;
1.1.1.1.2.1
date 2020.03.03.00.34.29; author martin; state dead;
branches;
next 1.1.1.1.2.2;
commitid X01YhRUPVUDaec4C;
1.1.1.1.2.2
date 2020.04.13.08.02.25; author martin; state Exp;
branches;
next ;
commitid X01YhRUPVUDaec4C;
desc
@@
1.1
log
@Initial revision
@
text
@
#include <stdlib.h>
#include <stddef.h>
#include <stdint.h>
#include <stdbool.h>
Go to the source code of this file.
|
| enum | cbor_type {
CBOR_TYPE_UINT,
CBOR_TYPE_NEGINT,
CBOR_TYPE_BYTESTRING,
CBOR_TYPE_STRING,
CBOR_TYPE_ARRAY,
CBOR_TYPE_MAP,
CBOR_TYPE_TAG,
CBOR_TYPE_FLOAT_CTRL
} |
| | Specifies the Major type of cbor_item_t. More...
|
| |
| enum | cbor_error_code {
CBOR_ERR_NONE,
CBOR_ERR_NOTENOUGHDATA,
CBOR_ERR_NODATA,
CBOR_ERR_MALFORMATED,
CBOR_ERR_MEMERROR,
CBOR_ERR_SYNTAXERROR
} |
| | Possible decoding errors. More...
|
| |
| enum | cbor_int_width { CBOR_INT_8,
CBOR_INT_16,
CBOR_INT_32,
CBOR_INT_64
} |
| | Possible widths of CBOR_TYPE_UINT items. More...
|
| |
| enum | cbor_float_width { CBOR_FLOAT_0,
CBOR_FLOAT_16,
CBOR_FLOAT_32,
CBOR_FLOAT_64
} |
| | Possible widths of CBOR_TYPE_FLOAT_CTRL items. More...
|
| |
| enum | _cbor_dst_metadata { _CBOR_METADATA_DEFINITE,
_CBOR_METADATA_INDEFINITE
} |
| | Metadata for dynamically sized types. More...
|
| |
| enum | _cbor_ctrl {
CBOR_CTRL_NONE = 0,
CBOR_CTRL_FALSE = 20,
CBOR_CTRL_TRUE = 21,
CBOR_CTRL_NULL = 22,
CBOR_CTRL_UNDEF = 23
} |
| | Semantic mapping for CTRL simple values. More...
|
| |
| enum | cbor_decoder_status { CBOR_DECODER_FINISHED,
CBOR_DECODER_NEDATA,
CBOR_DECODER_EBUFFER,
CBOR_DECODER_ERROR
} |
| | Streaming decoder result - status. More...
|
| |
§ cbor_data
§ cbor_item_t
§ cbor_mutable_data
§ cbor_type
§ _cbor_ctrl
Semantic mapping for CTRL simple values.
| Enumerator |
|---|
| CBOR_CTRL_NONE | |
| CBOR_CTRL_FALSE | |
| CBOR_CTRL_TRUE | |
| CBOR_CTRL_NULL | |
| CBOR_CTRL_UNDEF | |
Definition at line 68 of file data.h.
§ _cbor_dst_metadata
Metadata for dynamically sized types.
| Enumerator |
|---|
| _CBOR_METADATA_DEFINITE | |
| _CBOR_METADATA_INDEFINITE | |
Definition at line 62 of file data.h.
§ cbor_decoder_status
Streaming decoder result - status.
| Enumerator |
|---|
| CBOR_DECODER_FINISHED | OK, finished.
|
| CBOR_DECODER_NEDATA | Not enough data - mismatch with MTB.
|
| CBOR_DECODER_EBUFFER | Buffer manipulation problem.
|
| CBOR_DECODER_ERROR | Malformed or reserved MTB/value.
|
Definition at line 193 of file data.h.
§ cbor_error_code
Possible decoding errors.
| Enumerator |
|---|
| CBOR_ERR_NONE | |
| CBOR_ERR_NOTENOUGHDATA | |
| CBOR_ERR_NODATA | |
| CBOR_ERR_MALFORMATED | |
| CBOR_ERR_MEMERROR | Memory error - item allocation failed.
Is it too big for your allocator?
|
| CBOR_ERR_SYNTAXERROR | Stack parsing algorithm failed.
|
Definition at line 36 of file data.h.
§ cbor_float_width
Possible widths of CBOR_TYPE_FLOAT_CTRL items.
| Enumerator |
|---|
| CBOR_FLOAT_0 | Internal use - ctrl and special values.
|
| CBOR_FLOAT_16 | Half float.
|
| CBOR_FLOAT_32 | Single float.
|
| CBOR_FLOAT_64 | Double.
|
Definition at line 54 of file data.h.
§ cbor_int_width
Possible widths of CBOR_TYPE_UINT items.
| Enumerator |
|---|
| CBOR_INT_8 | |
| CBOR_INT_16 | |
| CBOR_INT_32 | |
| CBOR_INT_64 | |
Definition at line 46 of file data.h.
§ cbor_type
Specifies the Major type of cbor_item_t.
| Enumerator |
|---|
| CBOR_TYPE_UINT | 0 - positive integers
|
| CBOR_TYPE_NEGINT | 1 - negative integers
|
| CBOR_TYPE_BYTESTRING | 2 - byte strings
|
| CBOR_TYPE_STRING | 3 - strings
|
| CBOR_TYPE_ARRAY | 4 - arrays
|
| CBOR_TYPE_MAP | 5 - maps
|
| CBOR_TYPE_TAG | 6 - tags
|
| CBOR_TYPE_FLOAT_CTRL | 7 - decimals and special values (true, false, nil, ...)
|
Definition at line 24 of file data.h.
@
1.1.1.1
log
@Import libcbor from: https://github.com/PJK/libcbor.git
@
text
@@
1.1.1.1.2.1
log
@file data_8h.html was added on branch phil-wifi on 2020-04-13 08:02:25 +0000
@
text
@d1 479
@
1.1.1.1.2.2
log
@Mostly merge changes from HEAD upto 20200411
@
text
@a0 479
#include <stdlib.h>
#include <stddef.h>
#include <stdint.h>
#include <stdbool.h>
Go to the source code of this file.
|
| enum | cbor_type {
CBOR_TYPE_UINT,
CBOR_TYPE_NEGINT,
CBOR_TYPE_BYTESTRING,
CBOR_TYPE_STRING,
CBOR_TYPE_ARRAY,
CBOR_TYPE_MAP,
CBOR_TYPE_TAG,
CBOR_TYPE_FLOAT_CTRL
} |
| | Specifies the Major type of cbor_item_t. More...
|
| |
| enum | cbor_error_code {
CBOR_ERR_NONE,
CBOR_ERR_NOTENOUGHDATA,
CBOR_ERR_NODATA,
CBOR_ERR_MALFORMATED,
CBOR_ERR_MEMERROR,
CBOR_ERR_SYNTAXERROR
} |
| | Possible decoding errors. More...
|
| |
| enum | cbor_int_width { CBOR_INT_8,
CBOR_INT_16,
CBOR_INT_32,
CBOR_INT_64
} |
| | Possible widths of CBOR_TYPE_UINT items. More...
|
| |
| enum | cbor_float_width { CBOR_FLOAT_0,
CBOR_FLOAT_16,
CBOR_FLOAT_32,
CBOR_FLOAT_64
} |
| | Possible widths of CBOR_TYPE_FLOAT_CTRL items. More...
|
| |
| enum | _cbor_dst_metadata { _CBOR_METADATA_DEFINITE,
_CBOR_METADATA_INDEFINITE
} |
| | Metadata for dynamically sized types. More...
|
| |
| enum | _cbor_ctrl {
CBOR_CTRL_NONE = 0,
CBOR_CTRL_FALSE = 20,
CBOR_CTRL_TRUE = 21,
CBOR_CTRL_NULL = 22,
CBOR_CTRL_UNDEF = 23
} |
| | Semantic mapping for CTRL simple values. More...
|
| |
| enum | cbor_decoder_status { CBOR_DECODER_FINISHED,
CBOR_DECODER_NEDATA,
CBOR_DECODER_EBUFFER,
CBOR_DECODER_ERROR
} |
| | Streaming decoder result - status. More...
|
| |
§ cbor_data
§ cbor_item_t
§ cbor_mutable_data
§ cbor_type
§ _cbor_ctrl
Semantic mapping for CTRL simple values.
| Enumerator |
|---|
| CBOR_CTRL_NONE | |
| CBOR_CTRL_FALSE | |
| CBOR_CTRL_TRUE | |
| CBOR_CTRL_NULL | |
| CBOR_CTRL_UNDEF | |
Definition at line 68 of file data.h.
§ _cbor_dst_metadata
Metadata for dynamically sized types.
| Enumerator |
|---|
| _CBOR_METADATA_DEFINITE | |
| _CBOR_METADATA_INDEFINITE | |
Definition at line 62 of file data.h.
§ cbor_decoder_status
Streaming decoder result - status.
| Enumerator |
|---|
| CBOR_DECODER_FINISHED | OK, finished.
|
| CBOR_DECODER_NEDATA | Not enough data - mismatch with MTB.
|
| CBOR_DECODER_EBUFFER | Buffer manipulation problem.
|
| CBOR_DECODER_ERROR | Malformed or reserved MTB/value.
|
Definition at line 193 of file data.h.
§ cbor_error_code
Possible decoding errors.
| Enumerator |
|---|
| CBOR_ERR_NONE | |
| CBOR_ERR_NOTENOUGHDATA | |
| CBOR_ERR_NODATA | |
| CBOR_ERR_MALFORMATED | |
| CBOR_ERR_MEMERROR | Memory error - item allocation failed.
Is it too big for your allocator?
|
| CBOR_ERR_SYNTAXERROR | Stack parsing algorithm failed.
|
Definition at line 36 of file data.h.
§ cbor_float_width
Possible widths of CBOR_TYPE_FLOAT_CTRL items.
| Enumerator |
|---|
| CBOR_FLOAT_0 | Internal use - ctrl and special values.
|
| CBOR_FLOAT_16 | Half float.
|
| CBOR_FLOAT_32 | Single float.
|
| CBOR_FLOAT_64 | Double.
|
Definition at line 54 of file data.h.
§ cbor_int_width
Possible widths of CBOR_TYPE_UINT items.
| Enumerator |
|---|
| CBOR_INT_8 | |
| CBOR_INT_16 | |
| CBOR_INT_32 | |
| CBOR_INT_64 | |
Definition at line 46 of file data.h.
§ cbor_type
Specifies the Major type of cbor_item_t.
| Enumerator |
|---|
| CBOR_TYPE_UINT | 0 - positive integers
|
| CBOR_TYPE_NEGINT | 1 - negative integers
|
| CBOR_TYPE_BYTESTRING | 2 - byte strings
|
| CBOR_TYPE_STRING | 3 - strings
|
| CBOR_TYPE_ARRAY | 4 - arrays
|
| CBOR_TYPE_MAP | 5 - maps
|
| CBOR_TYPE_TAG | 6 - tags
|
| CBOR_TYPE_FLOAT_CTRL | 7 - decimals and special values (true, false, nil, ...)
|
Definition at line 24 of file data.h.
@