Home
last modified time | relevance | path

Searched full:model (Results 1 – 25 of 76) sorted by relevance

1234

/nrf52832-nimble/packages/NimBLE-latest/nimble/host/mesh/src/
H A Dmodel_srv.c14 static void gen_onoff_status(struct bt_mesh_model *model, in gen_onoff_status() argument
17 struct bt_mesh_gen_onoff_srv_cb *cb = model->user_data; in gen_onoff_status()
24 cb->get(model, state); in gen_onoff_status()
29 if (bt_mesh_model_send(model, ctx, msg, NULL, NULL)) { in gen_onoff_status()
36 static void gen_onoff_get(struct bt_mesh_model *model, in gen_onoff_get() argument
42 gen_onoff_status(model, ctx); in gen_onoff_get()
45 static void gen_onoff_set_unack(struct bt_mesh_model *model, in gen_onoff_set_unack() argument
49 struct bt_mesh_gen_onoff_srv_cb *cb = model->user_data; in gen_onoff_set_unack()
57 cb->set(model, state); in gen_onoff_set_unack()
61 static void gen_onoff_set(struct bt_mesh_model *model, in gen_onoff_set() argument
[all …]
H A Dhealth_srv.c103 static void health_fault_get(struct bt_mesh_model *model, in health_fault_get() argument
114 health_get_registered(model, company_id, sdu); in health_fault_get()
116 if (bt_mesh_model_send(model, ctx, sdu, NULL, NULL)) { in health_fault_get()
123 static void health_fault_clear_unrel(struct bt_mesh_model *model, in health_fault_clear_unrel() argument
127 struct bt_mesh_health_srv *srv = model->user_data; in health_fault_clear_unrel()
135 srv->cb->fault_clear(model, company_id); in health_fault_clear_unrel()
139 static void health_fault_clear(struct bt_mesh_model *model, in health_fault_clear() argument
144 struct bt_mesh_health_srv *srv = model->user_data; in health_fault_clear()
152 srv->cb->fault_clear(model, company_id); in health_fault_clear()
155 health_get_registered(model, company_id, sdu); in health_fault_clear()
[all …]
H A Dcfg_srv.c43 static void hb_send(struct bt_mesh_model *model) in hb_send() argument
46 struct bt_mesh_cfg_srv *cfg = model->user_data; in hb_send()
61 .src = bt_mesh_model_elem(model)->addr, in hb_send()
166 static void dev_comp_data_get(struct bt_mesh_model *model, in dev_comp_data_get() argument
191 if (bt_mesh_model_send(model, ctx, sdu, NULL, NULL)) { in dev_comp_data_get()
243 static u8_t _mod_pub_set(struct bt_mesh_model *model, u16_t pub_addr, in _mod_pub_set() argument
247 if (!model->pub) { in _mod_pub_set()
255 if (!model->pub->update && period) { in _mod_pub_set()
260 if (model->pub->addr == BT_MESH_ADDR_UNASSIGNED) { in _mod_pub_set()
264 model->pub->addr = BT_MESH_ADDR_UNASSIGNED; in _mod_pub_set()
[all …]
H A Daccess.c34 int (*const init)(struct bt_mesh_model *model, bool primary);
62 struct bt_mesh_model *model = &elem->models[j]; in bt_mesh_model_foreach() local
64 func(model, elem, false, i == 0, user_data); in bt_mesh_model_foreach()
68 struct bt_mesh_model *model = &elem->vnd_models[j]; in bt_mesh_model_foreach() local
70 func(model, elem, true, i == 0, user_data); in bt_mesh_model_foreach()
263 BT_ERR("Invalid vendor model index %u", mod_idx); in bt_mesh_model_get()
270 BT_ERR("Invalid SIG model index %u", mod_idx); in bt_mesh_model_get()
373 struct bt_mesh_model *model; in bt_mesh_elem_find_group() local
378 model = &elem->models[i]; in bt_mesh_elem_find_group()
380 match = bt_mesh_model_find_group(model, group_addr); in bt_mesh_elem_find_group()
[all …]
H A Dlight_model.c17 int light_model_gen_onoff_get(struct bt_mesh_model *model, u8_t *state) in light_model_gen_onoff_get() argument
23 int light_model_gen_onoff_set(struct bt_mesh_model *model, u8_t state) in light_model_gen_onoff_set() argument
30 int light_model_gen_level_get(struct bt_mesh_model *model, s16_t *level) in light_model_gen_level_get() argument
36 int light_model_gen_level_set(struct bt_mesh_model *model, s16_t level) in light_model_gen_level_set() argument
49 int light_model_light_lightness_get(struct bt_mesh_model *model, s16_t *lightness) in light_model_light_lightness_get() argument
51 return light_model_gen_level_get(model, lightness); in light_model_light_lightness_get()
54 int light_model_light_lightness_set(struct bt_mesh_model *model, s16_t lightness) in light_model_light_lightness_set() argument
56 return light_model_gen_level_set(model, lightness); in light_model_light_lightness_set()
H A Dmodel_cli.c28 static void gen_onoff_status(struct bt_mesh_model *model, in gen_onoff_status() argument
32 struct bt_mesh_gen_model_cli *cli = model->user_data; in gen_onoff_status()
60 static void gen_level_status(struct bt_mesh_model *model, in gen_level_status() argument
64 struct bt_mesh_gen_model_cli *cli = model->user_data; in gen_level_status()
136 err = bt_mesh_model_send(gen_onoff_cli.model, &ctx, msg, NULL, NULL); in bt_mesh_gen_onoff_get()
172 err = bt_mesh_model_send(gen_onoff_cli.model, &ctx, msg, NULL, NULL); in bt_mesh_gen_onoff_set()
205 err = bt_mesh_model_send(gen_level_cli.model, &ctx, msg, NULL, NULL); in bt_mesh_gen_level_get()
241 err = bt_mesh_model_send(gen_level_cli.model, &ctx, msg, NULL, NULL); in bt_mesh_gen_level_set()
257 int bt_mesh_gen_model_cli_init(struct bt_mesh_model *model, bool primary) in bt_mesh_gen_model_cli_init() argument
259 struct bt_mesh_gen_model_cli *cli = model->user_data; in bt_mesh_gen_model_cli_init()
[all …]
H A Dhealth_cli.c37 static void health_fault_status(struct bt_mesh_model *model, in health_fault_status() argument
83 static void health_current_status(struct bt_mesh_model *model, in health_current_status() argument
87 struct bt_mesh_health_cli *cli = model->user_data; in health_current_status()
113 static void health_period_status(struct bt_mesh_model *model, in health_period_status() argument
139 static void health_attention_status(struct bt_mesh_model *model, in health_attention_status() argument
228 err = bt_mesh_model_send(health_cli->model, &ctx, msg, NULL, NULL); in bt_mesh_health_attention_get()
269 err = bt_mesh_model_send(health_cli->model, &ctx, msg, NULL, NULL); in bt_mesh_health_attention_set()
309 err = bt_mesh_model_send(health_cli->model, &ctx, msg, NULL, NULL); in bt_mesh_health_period_get()
350 err = bt_mesh_model_send(health_cli->model, &ctx, msg, NULL, NULL); in bt_mesh_health_period_set()
401 err = bt_mesh_model_send(health_cli->model, &ctx, msg, NULL, NULL); in bt_mesh_health_fault_test()
[all …]
H A Dcfg_cli.c33 static void comp_data_status(struct bt_mesh_model *model, in comp_data_status() argument
58 static void state_status_u8(struct bt_mesh_model *model, in state_status_u8() argument
81 static void beacon_status(struct bt_mesh_model *model, in beacon_status() argument
85 state_status_u8(model, ctx, buf, OP_BEACON_STATUS); in beacon_status()
88 static void ttl_status(struct bt_mesh_model *model, in ttl_status() argument
92 state_status_u8(model, ctx, buf, OP_DEFAULT_TTL_STATUS); in ttl_status()
95 static void friend_status(struct bt_mesh_model *model, in friend_status() argument
99 state_status_u8(model, ctx, buf, OP_FRIEND_STATUS); in friend_status()
102 static void gatt_proxy_status(struct bt_mesh_model *model, in gatt_proxy_status() argument
106 state_status_u8(model, ctx, buf, OP_GATT_PROXY_STATUS); in gatt_proxy_status()
[all …]
H A Dlight_model.h12 int light_model_gen_onoff_get(struct bt_mesh_model *model, u8_t *state);
13 int light_model_gen_onoff_set(struct bt_mesh_model *model, u8_t state);
14 int light_model_gen_level_get(struct bt_mesh_model *model, s16_t *level);
15 int light_model_gen_level_set(struct bt_mesh_model *model, s16_t level);
16 int light_model_light_lightness_get(struct bt_mesh_model *model, s16_t *lightness);
17 int light_model_light_lightness_set(struct bt_mesh_model *model, s16_t lightness);
H A Dtesting.c45 void bt_test_mesh_model_bound(u16_t addr, struct bt_mesh_model *model, in bt_test_mesh_model_bound() argument
52 cb->mesh_model_bound(addr, model, key_idx); in bt_test_mesh_model_bound()
57 void bt_test_mesh_model_unbound(u16_t addr, struct bt_mesh_model *model, in bt_test_mesh_model_unbound() argument
64 cb->mesh_model_unbound(addr, model, key_idx); in bt_test_mesh_model_unbound()
167 int bt_test_bind_app_key_to_model(struct bt_mesh_model *model, u16_t key_idx, u16_t id) in bt_test_bind_app_key_to_model() argument
171 found_model = bt_mesh_model_find(bt_mesh_model_elem(model), id); in bt_test_bind_app_key_to_model()
/nrf52832-nimble/packages/NimBLE-latest/apps/blemesh_models_example_2/src/
H A Ddevice_composition.c152 static void gen_onoff_get(struct bt_mesh_model *model, in gen_onoff_get() argument
157 struct generic_onoff_state *state = model->user_data; in gen_onoff_get()
169 if (bt_mesh_model_send(model, ctx, msg, NULL, NULL)) { in gen_onoff_get()
174 static bool gen_onoff_setunack(struct bt_mesh_model *model, in gen_onoff_setunack() argument
180 struct os_mbuf *msg = model->pub->msg; in gen_onoff_setunack()
181 struct generic_onoff_state *state = model->user_data; in gen_onoff_setunack()
225 if (bt_mesh_model_elem(model)->addr == elements[0].addr) { in gen_onoff_setunack()
228 } else if (bt_mesh_model_elem(model)->addr == elements[1].addr) { in gen_onoff_setunack()
233 if (model->pub->addr != BT_MESH_ADDR_UNASSIGNED) { in gen_onoff_setunack()
239 err = bt_mesh_model_publish(model); in gen_onoff_setunack()
[all …]
/nrf52832-nimble/packages/NimBLE-latest/nimble/host/mesh/include/mesh/
H A Dhealth_srv.h2 * @brief Bluetooth Mesh Health Server Model APIs.
14 * @brief Mesh Bluetooth Mesh Health Server Model
22 int (*fault_get_cur)(struct bt_mesh_model *model, u8_t *test_id,
27 int (*fault_get_reg)(struct bt_mesh_model *model, u16_t company_id,
32 int (*fault_clear)(struct bt_mesh_model *model, u16_t company_id);
35 int (*fault_test)(struct bt_mesh_model *model, u8_t test_id,
39 void (*attn_on)(struct bt_mesh_model *model);
42 void (*attn_off)(struct bt_mesh_model *model);
56 /** Mesh Health Server Model Context */
58 struct bt_mesh_model *model; member
[all …]
H A Daccess.h68 /* Models from the Mesh Model Specification */
154 void (*const func)(struct bt_mesh_model *model,
167 /** Helper to define an empty model array */
204 * values of the configuration model data.
237 * values of the configuration model data.
262 /** Model publication context. */
264 /** The model the context belongs to. Initialized by the stack. */
300 * When set to NULL, the model is assumed not to support
306 * @param mod The Model the Publication Context belogs to.
316 /** Abstraction that describes a Mesh Model instance */
[all …]
H A Dmodel_srv.h11 int (*get)(struct bt_mesh_model *model, u8_t *state);
12 int (*set)(struct bt_mesh_model *model, u8_t state);
22 int (*get)(struct bt_mesh_model *model, s16_t *level);
23 int (*set)(struct bt_mesh_model *model, s16_t level);
33 int (*get)(struct bt_mesh_model *model, s16_t *level);
34 int (*set)(struct bt_mesh_model *model, s16_t level);
H A Dtesting.h38 void (*mesh_model_bound)(u16_t addr, struct bt_mesh_model *model,
40 void (*mesh_model_unbound)(u16_t addr, struct bt_mesh_model *model,
60 u8_t mod_bind(struct bt_mesh_model *model, u16_t key_idx);
61 u8_t mod_unbind(struct bt_mesh_model *model, u16_t key_idx, bool store);
65 int bt_test_bind_app_key_to_model(struct bt_mesh_model *model, u16_t key_idx, u16_t id);
H A Dhealth_cli.h2 * @brief Bluetooth Mesh Health Client Model APIs.
15 * @defgroup bt_mesh_health_cli Bluetooth Mesh Health Client Model
20 /** Mesh Health Client Model Context */
22 struct bt_mesh_model *model; member
39 int bt_mesh_health_cli_set(struct bt_mesh_model *model);
H A Dcfg_srv.h2 * @brief Bluetooth Mesh Configuration Server Model APIs.
15 * @defgroup bt_mesh_cfg_srv Bluetooth Mesh Configuration Server Model
20 /** Mesh Configuration Server Model Context */
22 struct bt_mesh_model *model; member
/nrf52832-nimble/packages/NimBLE-latest/apps/blemesh/src/
H A Dmain.c68 fault_get_cur(struct bt_mesh_model *model, in fault_get_cur() argument
88 fault_get_reg(struct bt_mesh_model *model, in fault_get_reg() argument
115 fault_clear(struct bt_mesh_model *model, uint16_t company_id) in fault_clear() argument
127 fault_test(struct bt_mesh_model *model, uint8_t test_id, uint16_t company_id) in fault_test() argument
139 bt_mesh_fault_update(bt_mesh_model_elem(model)); in fault_test()
169 static void gen_onoff_status(struct bt_mesh_model *model, in gen_onoff_status() argument
181 if (bt_mesh_model_send(model, ctx, msg, NULL, NULL)) { in gen_onoff_status()
188 static void gen_onoff_get(struct bt_mesh_model *model, in gen_onoff_get() argument
194 gen_onoff_status(model, ctx); in gen_onoff_get()
197 static void gen_onoff_set(struct bt_mesh_model *model, in gen_onoff_set() argument
[all …]
/nrf52832-nimble/packages/NimBLE-latest/apps/blemesh_models_example_1/src/
H A Dmain.c46 /* Model Operation Codes */
52 static void gen_onoff_set(struct bt_mesh_model *model,
56 static void gen_onoff_set_unack(struct bt_mesh_model *model,
60 static void gen_onoff_get(struct bt_mesh_model *model,
64 static void gen_onoff_status(struct bt_mesh_model *model,
169 * The mesh stack dispatches a message to the first model in an element
176 * OnOff Model Server Op Dispatch Table
188 * OnOff Model Client Op Dispatch Table
216 * Element Model Declarations
265 * Button to Client Model Assignments
[all …]
/nrf52832-nimble/packages/NimBLE-latest/apps/blemesh_shell/src/
H A Dmain.c45 static void model_bound_cb(u16_t addr, struct bt_mesh_model *model, in model_bound_cb() argument
48 console_printf("Model bound: remote addr 0x%04x key_idx 0x%04x model %p\n", in model_bound_cb()
49 addr, key_idx, model); in model_bound_cb()
52 static void model_unbound_cb(u16_t addr, struct bt_mesh_model *model, in model_unbound_cb() argument
55 console_printf("Model unbound: remote addr 0x%04x key_idx 0x%04x " in model_unbound_cb()
56 "model %p\n", addr, key_idx, model); in model_unbound_cb()
/nrf52832-nimble/packages/NimBLE-latest/apps/blemesh_light/src/
H A Dmain.c39 static void model_bound_cb(u16_t addr, struct bt_mesh_model *model, in model_bound_cb() argument
44 console_printf("Model bound: remote addr 0x%04x key_idx 0x%04x model %p\n", in model_bound_cb()
45 addr, key_idx, model); in model_bound_cb()
47 if (model->id != BT_MESH_MODEL_ID_GEN_LEVEL_SRV) { in model_bound_cb()
52 rc = bt_test_bind_app_key_to_model(model, key_idx, in model_bound_cb()
56 console_printf("Failed to bind light lightness srv model to app_key"); in model_bound_cb()
58 console_printf("Successfuly bound light lightness srv model to app_key"); in model_bound_cb()
H A Dlight_model.h29 int light_model_gen_onoff_get(struct bt_mesh_model *model, u8_t *state);
30 int light_model_gen_onoff_set(struct bt_mesh_model *model, u8_t state);
31 int light_model_gen_level_get(struct bt_mesh_model *model, s16_t *level);
32 int light_model_gen_level_set(struct bt_mesh_model *model, s16_t level);
33 int light_model_light_lightness_get(struct bt_mesh_model *model, s16_t *lightness);
34 int light_model_light_lightness_set(struct bt_mesh_model *model, s16_t lightness);
H A Dlight_model.c102 int light_model_gen_onoff_get(struct bt_mesh_model *model, u8_t *state) in light_model_gen_onoff_get() argument
108 int light_model_gen_onoff_set(struct bt_mesh_model *model, u8_t state) in light_model_gen_onoff_set() argument
115 int light_model_gen_level_get(struct bt_mesh_model *model, s16_t *level) in light_model_gen_level_get() argument
121 int light_model_gen_level_set(struct bt_mesh_model *model, s16_t level) in light_model_gen_level_set() argument
134 int light_model_light_lightness_get(struct bt_mesh_model *model, s16_t *lightness) in light_model_light_lightness_get() argument
136 return light_model_gen_level_get(model, lightness); in light_model_light_lightness_get()
139 int light_model_light_lightness_set(struct bt_mesh_model *model, s16_t lightness) in light_model_light_lightness_set() argument
141 return light_model_gen_level_set(model, lightness); in light_model_light_lightness_set()
/nrf52832-nimble/packages/NimBLE-latest/apps/blemesh_models_example_2/
H A DREADME.md22 - Vendor Model
38 For the nRF52840-PDK board, these are the model associations:
41 * LED2 is associated with Vendor Model which is part of Root element
44 * Button1 and Button2 are associated with gen. OnOff Client or Vendor Model which is part of Root e…
47 States of Servers are bounded as per Bluetooth SIG Mesh Model Specification v1.0
92 address as it is the only one that has a configuration server model. If
96 The meshctl utility also supports a onoff model client that can be used to
99 that has that LED's model and issuing the onoff command.
/nrf52832-nimble/packages/NimBLE-latest/apps/blemesh_models_example_1/
H A DREADME.md1 ### Bluetooth: Mesh OnOff Model
8 model which controls one of the 4 sets of buttons and LEDs .
70 configuration server model.
75 The meshctl utility also supports a onoff model client that can be used to
78 that has that LED's model and issuing the onoff command.

1234