Lines Matching refs:elem

2275 						       struct bt_mesh_comp_p0_elem *elem)  in bt_mesh_comp_p0_elem_pull()  argument
2284 elem->loc = net_buf_simple_pull_le16(page->_buf); in bt_mesh_comp_p0_elem_pull()
2285 elem->nsig = net_buf_simple_pull_u8(page->_buf); in bt_mesh_comp_p0_elem_pull()
2286 elem->nvnd = net_buf_simple_pull_u8(page->_buf); in bt_mesh_comp_p0_elem_pull()
2288 modlist_size = elem->nsig * 2 + elem->nvnd * 4; in bt_mesh_comp_p0_elem_pull()
2295 elem->_buf = net_buf_simple_pull_mem(page->_buf, modlist_size); in bt_mesh_comp_p0_elem_pull()
2297 return elem; in bt_mesh_comp_p0_elem_pull()
2300 uint16_t bt_mesh_comp_p0_elem_mod(struct bt_mesh_comp_p0_elem *elem, int idx) in bt_mesh_comp_p0_elem_mod() argument
2302 CHECKIF(idx >= elem->nsig) { in bt_mesh_comp_p0_elem_mod()
2306 return sys_get_le16(&elem->_buf[idx * 2]); in bt_mesh_comp_p0_elem_mod()
2309 struct bt_mesh_mod_id_vnd bt_mesh_comp_p0_elem_mod_vnd(struct bt_mesh_comp_p0_elem *elem, int idx) in bt_mesh_comp_p0_elem_mod_vnd() argument
2311 CHECKIF(idx >= elem->nvnd) { in bt_mesh_comp_p0_elem_mod_vnd()
2315 size_t offset = elem->nsig * 2 + idx * 4; in bt_mesh_comp_p0_elem_mod_vnd()
2317 .company = sys_get_le16(&elem->_buf[offset]), in bt_mesh_comp_p0_elem_mod_vnd()
2318 .id = sys_get_le16(&elem->_buf[offset + 2]), in bt_mesh_comp_p0_elem_mod_vnd()
2325 struct bt_mesh_comp_p1_elem *elem) in bt_mesh_comp_p1_elem_pull() argument
2336 elem->nsig = net_buf_simple_pull_u8(buf); in bt_mesh_comp_p1_elem_pull()
2337 elem->nvnd = net_buf_simple_pull_u8(buf); in bt_mesh_comp_p1_elem_pull()
2338 for (i = 0; i < elem->nsig + elem->nvnd; i++) { in bt_mesh_comp_p1_elem_pull()
2363 net_buf_simple_init_with_data(elem->_buf, in bt_mesh_comp_p1_elem_pull()
2366 return elem; in bt_mesh_comp_p1_elem_pull()
2370 struct bt_mesh_comp_p1_elem *elem, struct bt_mesh_comp_p1_model_item *item) in bt_mesh_comp_p1_item_pull() argument
2372 if (elem->_buf->len < 1) { in bt_mesh_comp_p1_item_pull()
2377 elem->nsig, elem->nvnd, elem->_buf->len, in bt_mesh_comp_p1_item_pull()
2378 bt_hex(elem->_buf->data, elem->_buf->len)); in bt_mesh_comp_p1_item_pull()
2383 header = net_buf_simple_pull_u8(elem->_buf); in bt_mesh_comp_p1_item_pull()
2389 if (elem->_buf->len < 1) { in bt_mesh_comp_p1_item_pull()
2394 item->cor_id = net_buf_simple_pull_u8(elem->_buf); in bt_mesh_comp_p1_item_pull()
2397 if (elem->_buf->len < item_size) { in bt_mesh_comp_p1_item_pull()
2403 net_buf_simple_pull_mem(elem->_buf, item_size), in bt_mesh_comp_p1_item_pull()