21#ifndef PROTOCORE_OCIT_H
22#define PROTOCORE_OCIT_H
26#if PROTOCORE_ENABLE_OCIT
32#define OCIT_MSG_GET 0x01
33#define OCIT_MSG_SET 0x02
34#define OCIT_MSG_REPORT 0x03
35#define OCIT_MSG_ERROR 0x0F
38#define OCIT_TYPE_BOOL 0x01
39#define OCIT_TYPE_BYTE 0x02
40#define OCIT_TYPE_UINT16 0x03
41#define OCIT_TYPE_UINT32 0x04
42#define OCIT_TYPE_OCTETS 0x05
54size_t protocore_ocit_build(uint8_t msg_type, uint16_t object_type, uint16_t instance, uint8_t data_type,
55 const uint8_t *value,
size_t value_len, uint8_t *out,
size_t cap);
58size_t protocore_ocit_set_u16(uint16_t object_type, uint16_t instance, uint16_t value, uint8_t *out,
size_t cap);
72proto_bool protocore_ocit_parse(
const uint8_t *msg,
size_t len, OcitMsg *out);
75uint16_t protocore_ocit_value_u16(
const OcitMsg *m);
#define PROTOCORE_BEGIN_DECLS
Give a header's declarations C linkage, so their symbol names carry no parameter types.
_Bool proto_bool
The truth value.
#define PROTOCORE_END_DECLS