The friendly Operating System for the Internet of Things
cbor_stream_t Struct Reference

Struct containing CBOR-encoded data. More...

Detailed Description

A typical usage of CBOR looks like:

unsigned char data[1024];
cbor_init(&stream, data, sizeof(data));
cbor_serialize_int(&stream, 5);
(...)
<data contains CBOR encoded items now>
cbor_destroy(&stream);
See also
cbor_init
cbor_clear
cbor_destroy

Definition at line 136 of file cbor.h.

#include <cbor.h>

Data Fields

unsigned char * data
 Array containing CBOR encoded data.
 
size_t size
 Size of the array.
 
size_t pos
 Index to the next free byte.
 

The documentation for this struct was generated from the following file: