15#ifndef BT_MESH_SILVAIR_ENOCEAN_SRV_H__
16#define BT_MESH_SILVAIR_ENOCEAN_SRV_H__
19#include <zephyr/bluetooth/addr.h>
20#include <zephyr/sys/slist.h>
26#define BT_MESH_COMPANY_ID_SILVAIR 0x0136
27#define BT_MESH_MODEL_ID_SILVAIR_ENOCEAN_SRV 0x0001
28#define BT_MESH_SILVAIR_ENOCEAN_PROXY_BUTTONS 2
32extern const struct bt_mesh_model_op _bt_mesh_silvair_enocean_srv_op[];
33extern const struct bt_mesh_model_cb _bt_mesh_silvair_enocean_srv_cb;
35#define BT_MESH_SILVAIR_ENOCEAN_PROXY_OP BT_MESH_MODEL_OP_3(0xF4, \
36 BT_MESH_COMPANY_ID_SILVAIR)
38#define BT_MESH_SILVAIR_ENOCEAN_PROXY_MSG_MINLEN 1
39#define BT_MESH_SILVAIR_ENOCEAN_PROXY_MSG_MAXLEN 23
83 struct bt_mesh_model_pub
pub;
88 BT_MESH_SILVAIR_ENOCEAN_PROXY_OP,
89 BT_MESH_SILVAIR_ENOCEAN_PROXY_MSG_MAXLEN)];
91 const struct bt_mesh_model *
mod;
102#define BT_MESH_MODEL_SILVAIR_ENOCEAN_SRV(_srv) \
103 BT_MESH_MODEL_VND_CB(BT_MESH_COMPANY_ID_SILVAIR, \
104 BT_MESH_MODEL_ID_SILVAIR_ENOCEAN_SRV, \
105 _bt_mesh_silvair_enocean_srv_op, &(_srv)->pub, \
106 BT_MESH_MODEL_USER_DATA( \
107 struct bt_mesh_silvair_enocean_srv, _srv), \
108 &_bt_mesh_silvair_enocean_srv_cb)
122#define BT_MESH_MODEL_SILVAIR_ENOCEAN_BUTTON(_srv, _idx) \
123 BT_MESH_MODEL_LVL_CLI(&(_srv)->buttons[_idx].lvl), \
124 BT_MESH_MODEL_ONOFF_CLI(&(_srv)->buttons[_idx].onoff)
#define BT_MESH_SILVAIR_ENOCEAN_PROXY_BUTTONS
Definition silvair_enocean_srv.h:28
bt_mesh_silvair_enocean_state
Definition silvair_enocean_srv.h:43
@ BT_MESH_SILVAIR_ENOCEAN_STATE_PHASE_A
Definition silvair_enocean_srv.h:49
@ BT_MESH_SILVAIR_ENOCEAN_STATE_PHASE_B
Definition silvair_enocean_srv.h:51
@ BT_MESH_SILVAIR_ENOCEAN_STATE_WAIT
Definition silvair_enocean_srv.h:47
@ BT_MESH_SILVAIR_ENOCEAN_STATE_PHASE_C
Definition silvair_enocean_srv.h:53
@ BT_MESH_SILVAIR_ENOCEAN_STATE_IDLE
Definition silvair_enocean_srv.h:45
@ BT_MESH_SILVAIR_ENOCEAN_STATE_PHASE_D
Definition silvair_enocean_srv.h:55
Definition gen_lvl_cli.h:54
Definition gen_onoff_cli.h:54
uint8_t pub_data[BT_MESH_MODEL_BUF_LEN(BT_MESH_SILVAIR_ENOCEAN_PROXY_OP, BT_MESH_SILVAIR_ENOCEAN_PROXY_MSG_MAXLEN)]
Definition silvair_enocean_srv.h:89
struct bt_mesh_model_pub pub
Definition silvair_enocean_srv.h:83
sys_snode_t entry
Definition silvair_enocean_srv.h:93
struct net_buf_simple pub_buf
Definition silvair_enocean_srv.h:85
struct bt_mesh_silvair_enocean_srv::bt_mesh_silvair_enocean_button buttons[2]
const struct bt_mesh_model * mod
Definition silvair_enocean_srv.h:91
bt_addr_le_t addr
Definition silvair_enocean_srv.h:81
Definition silvair_enocean_srv.h:59