Functionality for encoding SenML values as CBOR. More...
Functionality for encoding SenML values as CBOR.
Definition in file cbor.h.
#include <stddef.h>
#include <stdbool.h>
#include <stdint.h>
#include "senml.h"
#include "nanocbor/nanocbor.h"
Go to the source code of this file.
Enumerations | |
enum | senml_cbor_label_t { SENML_LABEL_BASE_VERSION = -1 , SENML_LABEL_BASE_NAME = -2 , SENML_LABEL_BASE_TIME = -3 , SENML_LABEL_BASE_UNIT = -4 , SENML_LABEL_BASE_VALUE = -5 , SENML_LABEL_BASE_SUM = -6 , SENML_LABEL_NAME = 0 , SENML_LABEL_UNIT = 1 , SENML_LABEL_VALUE = 2 , SENML_LABEL_STRING_VALUE = 3 , SENML_LABEL_BOOLEAN_VALUE = 4 , SENML_LABEL_SUM = 5 , SENML_LABEL_TIME = 6 , SENML_LABEL_UPDATE_TIME = 7 , SENML_LABEL_DATA_VALUE = 8 } |
SenML CBOR labels. More... | |
Functions | |
int | senml_encode_sum_cbor (nanocbor_encoder_t *enc, const senml_attr_t *attr) |
Encode senml_attr_t containing sum as CBOR. | |
int | senml_encode_bool_cbor (nanocbor_encoder_t *enc, const senml_bool_value_t *val) |
Encode senml_bool_value_t as CBOR. | |
int | senml_encode_value_cbor (nanocbor_encoder_t *enc, const senml_value_t *val) |
Encode senml_value_t as CBOR. | |
int | senml_encode_string_cbor (nanocbor_encoder_t *enc, const senml_string_value_t *val) |
Encode senml_string_value_t as CBOR. | |
int | senml_encode_data_cbor (nanocbor_encoder_t *enc, const senml_data_value_t *val) |
Encode senml_data_value_t as CBOR. | |