Lines Matching refs:buf

109 	BT_MESH_MODEL_BUF_DEFINE(buf, OP_ONOFF_STATUS, 3);  in onoff_status_send()
110 bt_mesh_model_msg_init(&buf, OP_ONOFF_STATUS); in onoff_status_send()
122 net_buf_simple_add_u8(&buf, !onoff.val); in onoff_status_send()
123 net_buf_simple_add_u8(&buf, onoff.val); in onoff_status_send()
124 net_buf_simple_add_u8(&buf, model_time_encode(remaining)); in onoff_status_send()
126 net_buf_simple_add_u8(&buf, onoff.val); in onoff_status_send()
129 return bt_mesh_model_send(model, ctx, &buf, NULL, NULL); in onoff_status_send()
155 struct net_buf_simple *buf) in gen_onoff_get() argument
163 struct net_buf_simple *buf) in gen_onoff_set_unack() argument
165 uint8_t val = net_buf_simple_pull_u8(buf); in gen_onoff_set_unack()
166 uint8_t tid = net_buf_simple_pull_u8(buf); in gen_onoff_set_unack()
170 if (buf->len) { in gen_onoff_set_unack()
171 trans = model_time_decode(net_buf_simple_pull_u8(buf)); in gen_onoff_set_unack()
172 delay = net_buf_simple_pull_u8(buf) * 5; in gen_onoff_set_unack()
206 struct net_buf_simple *buf) in gen_onoff_set() argument
208 (void)gen_onoff_set_unack(model, ctx, buf); in gen_onoff_set()
225 struct net_buf_simple *buf) in gen_onoff_status() argument
227 uint8_t present = net_buf_simple_pull_u8(buf); in gen_onoff_status()
229 if (buf->len) { in gen_onoff_status()
230 uint8_t target = net_buf_simple_pull_u8(buf); in gen_onoff_status()
232 model_time_decode(net_buf_simple_pull_u8(buf)); in gen_onoff_status()
317 BT_MESH_MODEL_BUF_DEFINE(buf, OP_ONOFF_SET_UNACK, 2); in gen_onoff_send()
318 bt_mesh_model_msg_init(&buf, OP_ONOFF_SET_UNACK); in gen_onoff_send()
319 net_buf_simple_add_u8(&buf, val); in gen_onoff_send()
320 net_buf_simple_add_u8(&buf, tid++); in gen_onoff_send()
324 return bt_mesh_model_send(&models[3], &ctx, &buf, NULL, NULL); in gen_onoff_send()