1 /* 2 * Copyright (c) 2023 Nordic Semiconductor ASA 3 * 4 * SPDX-License-Identifier: Apache-2.0 5 * 6 * Generated using zcbor version 0.8.1 7 * https://github.com/zephyrproject-rtos/zcbor 8 * Generated with a --default-max-qty of 99 9 */ 10 11 #ifndef LWM2M_SENML_CBOR_TYPES_H__ 12 #define LWM2M_SENML_CBOR_TYPES_H__ 13 14 #include <stdint.h> 15 #include <stdbool.h> 16 #include <stddef.h> 17 #include <zcbor_common.h> 18 19 #ifdef __cplusplus 20 extern "C" { 21 #endif 22 23 enum lwm2m_senml_cbor_key { 24 lwm2m_senml_cbor_key_bn = -2, 25 lwm2m_senml_cbor_key_bt = -3, 26 lwm2m_senml_cbor_key_n = 0, 27 lwm2m_senml_cbor_key_t = 6, 28 lwm2m_senml_cbor_key_vi = 2, 29 lwm2m_senml_cbor_key_vf = 2, 30 lwm2m_senml_cbor_key_vs = 3, 31 lwm2m_senml_cbor_key_vb = 4, 32 lwm2m_senml_cbor_key_vd = 8, 33 }; 34 35 struct record_bn { 36 struct zcbor_string record_bn; 37 }; 38 39 struct record_bt { 40 int64_t record_bt; 41 }; 42 43 struct record_n { 44 struct zcbor_string record_n; 45 }; 46 47 struct record_t { 48 int64_t record_t; 49 }; 50 51 struct record_union_r { 52 union { 53 struct { 54 int64_t union_vi; 55 }; 56 struct { 57 double union_vf; 58 }; 59 struct { 60 struct zcbor_string union_vs; 61 }; 62 struct { 63 bool union_vb; 64 }; 65 struct { 66 struct zcbor_string union_vd; 67 }; 68 struct { 69 struct zcbor_string union_vlo; 70 }; 71 }; 72 enum { 73 union_vi_c, 74 union_vf_c, 75 union_vs_c, 76 union_vb_c, 77 union_vd_c, 78 union_vlo_c, 79 } record_union_choice; 80 }; 81 82 struct value_r { 83 union { 84 struct zcbor_string value_tstr; 85 struct zcbor_string value_bstr; 86 int64_t value_int; 87 double value_float; 88 bool value_bool; 89 }; 90 enum { 91 value_tstr_c, 92 value_bstr_c, 93 value_int_c, 94 value_float_c, 95 value_bool_c, 96 } value_choice; 97 }; 98 99 struct key_value_pair { 100 int32_t key_value_pair_key; 101 struct value_r key_value_pair; 102 }; 103 104 struct record_key_value_pair_m { 105 struct key_value_pair record_key_value_pair_m; 106 }; 107 108 struct record { 109 struct record_bn record_bn; 110 bool record_bn_present; 111 struct record_bt record_bt; 112 bool record_bt_present; 113 struct record_n record_n; 114 bool record_n_present; 115 struct record_t record_t; 116 bool record_t_present; 117 struct record_union_r record_union; 118 bool record_union_present; 119 struct record_key_value_pair_m record_key_value_pair_m[5]; 120 size_t record_key_value_pair_m_count; 121 }; 122 123 struct lwm2m_senml { 124 struct record lwm2m_senml_record_m[CONFIG_LWM2M_RW_SENML_CBOR_RECORDS]; 125 size_t lwm2m_senml_record_m_count; 126 }; 127 128 #ifdef __cplusplus 129 } 130 #endif 131 132 #endif /* LWM2M_SENML_CBOR_TYPES_H__ */ 133