Home
last modified time | relevance | path

Searched refs:p_elem (Results 1 – 20 of 20) sorted by relevance

/AliOS-Things-master/components/genie_service/core/src/sig_models/
A Dsig_model_event.c19 k_timer_start(&p_elem->state.delay_timer, p_elem->state.delay * 5); in sig_model_event_handle_delay_start()
30 p_elem->state.delay = 0; in sig_model_event_handle_delay_end()
33 if (p_elem->state.trans == 0 || cur_time >= p_elem->state.trans_end_time) in sig_model_event_handle_delay_end()
91 if (p_elem->state.trans || p_elem->state.delay) in sig_model_event_handle_analyze_msg()
112 if (p_elem->state.onoff[TYPE_PRESENT] != p_elem->state.onoff[TYPE_TARGET]) in sig_model_handle_action_done()
114 p_elem->state.onoff[TYPE_PRESENT] = p_elem->state.onoff[TYPE_TARGET]; in sig_model_handle_action_done()
124 p_elem->state.lightness[TYPE_PRESENT] = p_elem->state.lightness[TYPE_TARGET]; in sig_model_handle_action_done()
142 if (p_elem->state.scene[TYPE_PRESENT] != p_elem->state.scene[TYPE_TARGET]) in sig_model_handle_action_done()
144 p_elem->state.scene[TYPE_PRESENT] = p_elem->state.scene[TYPE_TARGET]; in sig_model_handle_action_done()
163 if (p_elem == NULL) in sig_model_handle_indicate()
[all …]
A Dsig_model_lightness_srv.c74 sig_model_element_state_t *p_elem = NULL; in _lightness_analyze() local
79 p_elem = p_model->user_data; in _lightness_analyze()
119 p_elem->powerup.last_lightness = p_elem->state.lightness[TYPE_TARGET]; in _lightness_analyze()
123 p_elem->state.trans = trans; in _lightness_analyze()
124 p_elem->state.delay = delay; in _lightness_analyze()
125 if (p_elem->state.trans) in _lightness_analyze()
127p_elem->state.trans_start_time = k_uptime_get() + p_elem->state.delay * 5; // delay is in 5 millis… in _lightness_analyze()
128p_elem->state.trans_end_time = p_elem->state.trans_start_time + sig_model_transition_get_transitio… in _lightness_analyze()
130 BT_DBG("trans(0x%02x) delay(0x%02x)", p_elem->state.trans, p_elem->state.delay); in _lightness_analyze()
133 if (p_elem->state.lightness[TYPE_PRESENT] != p_elem->state.lightness[TYPE_TARGET]) in _lightness_analyze()
[all …]
A Dsig_model_onoff_srv.c76 sig_model_element_state_t *p_elem = NULL; in _gen_onoff_analyze() local
83 p_elem = p_model->user_data; in _gen_onoff_analyze()
128 p_elem->state.onoff[TYPE_TARGET] = onoff; in _gen_onoff_analyze()
129 …BT_DBG("onoff cur(%d) tar(%d)", p_elem->state.onoff[TYPE_PRESENT], p_elem->state.onoff[TYPE_TARGET… in _gen_onoff_analyze()
131 p_elem->state.trans = trans; in _gen_onoff_analyze()
132 p_elem->state.delay = delay; in _gen_onoff_analyze()
133 if (p_elem->state.trans) in _gen_onoff_analyze()
135 p_elem->state.trans_start_time = k_uptime_get() + p_elem->state.delay * 5; in _gen_onoff_analyze()
136p_elem->state.trans_end_time = p_elem->state.trans_start_time + sig_model_transition_get_transitio… in _gen_onoff_analyze()
138 BT_DBG("trans(0x%02x) delay(0x%02x)", p_elem->state.trans, p_elem->state.delay); in _gen_onoff_analyze()
[all …]
A Dsig_model_light_ctl_srv.c78 sig_model_element_state_t *p_elem = NULL; in _ctl_analyze() local
83 p_elem = p_model->user_data; in _ctl_analyze()
132 p_elem->powerup.last_color_temperature = p_elem->state.color_temperature[TYPE_TARGET]; in _ctl_analyze()
136 p_elem->state.trans = trans; in _ctl_analyze()
137 p_elem->state.delay = delay; in _ctl_analyze()
138 if (p_elem->state.trans) in _ctl_analyze()
140p_elem->state.trans_start_time = k_uptime_get() + p_elem->state.delay * 5; // delay is in 5 millis… in _ctl_analyze()
141p_elem->state.trans_end_time = p_elem->state.trans_start_time + sig_model_transition_get_transitio… in _ctl_analyze()
143 BT_DBG("trans(0x%02x) delay(0x%02x)", p_elem->state.trans, p_elem->state.delay); in _ctl_analyze()
147 … if (p_elem->state.color_temperature[TYPE_PRESENT] != p_elem->state.color_temperature[TYPE_TARGET]) in _ctl_analyze()
[all …]
A Dsig_model_bind_ops.c13 u16_t sig_model_generic_onoff_bind_ops(sig_model_element_state_t *p_elem) in sig_model_generic_onoff_bind_ops() argument
16 sig_model_lightness_update_by_onoff(p_elem); in sig_model_generic_onoff_bind_ops()
20 sig_model_light_ctl_update_by_onoff(p_elem); in sig_model_generic_onoff_bind_ops()
28 u16_t sig_model_generic_lightness_bind_ops(sig_model_element_state_t *p_elem, u8_t type) in sig_model_generic_lightness_bind_ops() argument
31 sig_model_onoff_update_by_lightness(p_elem, type); in sig_model_generic_lightness_bind_ops()
39 u16_t sig_model_generic_color_temperature_bind_ops(sig_model_element_state_t *p_elem) in sig_model_generic_color_temperature_bind_ops() argument
42 sig_model_onoff_update_by_color_temperature(p_elem); in sig_model_generic_color_temperature_bind_ops()
A Dsig_model_scene_srv.c50 sig_model_element_state_t *p_elem = NULL; in _scene_analyze() local
55 p_elem = p_model->user_data; in _scene_analyze()
66 if (genie_transport_check_tid(src_addr, tid, p_elem->element_id) != MESH_SUCCESS) in _scene_analyze()
73 if (p_elem->state.scene[TYPE_TARGET] != scene) in _scene_analyze()
75 genie_model_scene_changed(p_elem->state.scene[TYPE_TARGET], scene); in _scene_analyze()
76 p_elem->state.scene[TYPE_TARGET] = scene; in _scene_analyze()
84 GENIE_LOG_INFO("light sence(0x%02x)", p_elem->state.scene); in _scene_analyze()
A Dsig_model_transition.c23 void sig_model_transition_timer_stop(sig_model_element_state_t *p_elem) in sig_model_transition_timer_stop() argument
25 k_timer_stop(&p_elem->state.delay_timer); in sig_model_transition_timer_stop()
26 k_timer_stop(&p_elem->state.trans_timer); in sig_model_transition_timer_stop()
29 void sig_model_transition_state_reset(sig_model_element_state_t *p_elem) in sig_model_transition_state_reset() argument
31 p_elem->state.trans = 0; in sig_model_transition_state_reset()
32 p_elem->state.trans_start_time = 0; in sig_model_transition_state_reset()
33 p_elem->state.trans_end_time = 0; in sig_model_transition_state_reset()
39 uint8_t sig_model_transition_update(sig_model_element_state_t *p_elem) in sig_model_transition_update() argument
44 sig_model_state_t *p_state = &p_elem->state; in sig_model_transition_update()
/AliOS-Things-master/components/ble_mesh/bt_mesh/mesh_models/common/
A Dmodel_bind_ops.c10 typedef u16_t (*BIND_OPS_HANDLER)(S_ELEM_STATE *p_elem, u8_t type);
15 static u16_t _gen_onoff_operation(S_ELEM_STATE *p_elem, u8_t type);
16 static u16_t _gen_onpowerup_operation(S_ELEM_STATE *p_elem, u8_t type);
18 static u16_t _gen_level_operation(S_ELEM_STATE *p_elem, u8_t type);
19 static u16_t _gen_power_actual_operation(S_ELEM_STATE *p_elem, u8_t type);
20 static u16_t _gen_lightness_linear_operation(S_ELEM_STATE *p_elem, u8_t type);
22 static u16_t _gen_power_range_operation(S_ELEM_STATE *p_elem, u8_t type);
59 LOGD(TAG, "bind ops - id: %d, ele:%p\n", id, p_elem); in model_bind_operation()
61 if (id <= B_OPS_START_ID || id >= B_OPS_END_ID || !p_elem) { in model_bind_operation()
70 return p_func ? p_func(p_elem, type) : -1; in model_bind_operation()
[all …]
A Dmesh_model.c50 S_ELEM_STATE *p_elem = (S_ELEM_STATE *)args; in _mesh_delay_timer_cb() local
52 _mesh_timer_stop(&p_elem->state); in _mesh_delay_timer_cb()
58 S_ELEM_STATE *p_elem = (S_ELEM_STATE *)args; in _mesh_trans_timer_cycle() local
61 _mesh_timer_stop(&p_elem->state); in _mesh_trans_timer_cycle()
64 if (cur_time >= p_elem->state.trans_end_time) { in _mesh_trans_timer_cycle()
68 k_timer_start(&p_elem->state.trans_timer, MESH_TRNSATION_CYCLE); in _mesh_trans_timer_cycle()
/AliOS-Things-master/solutions/genie_mesh_demo/light_ctl/
A Dlight.c78 sig_model_transition_timer_stop(p_elem); in _mesh_delay_timer_cb()
87 sig_model_state_t *p_state = &p_elem->state; in _mesh_trans_timer_cycle()
89 sig_model_transition_timer_stop(p_elem); in _mesh_trans_timer_cycle()
221 p_elem->powerup.last_lightness = p_elem->state.lightness[TYPE_PRESENT]; in light_save_state()
222 light_powerup[p_elem->element_id].last_lightness = p_elem->state.lightness[TYPE_PRESENT]; in light_save_state()
225 p_elem->powerup.last_color_temperature = p_elem->state.color_temperature[TYPE_PRESENT]; in light_save_state()
226 …light_powerup[p_elem->element_id].last_color_temperature = p_elem->state.color_temperature[TYPE_PR… in light_save_state()
228 p_elem->powerup.last_onoff = p_elem->state.onoff[TYPE_PRESENT]; in light_save_state()
229 light_powerup[p_elem->element_id].last_onoff = p_elem->state.onoff[TYPE_PRESENT]; in light_save_state()
421 light_update(p_elem); in light_ctl_event_handler()
[all …]
/AliOS-Things-master/components/genie_service/core/inc/sig_models/
A Dsig_model_bind_ops.h9 u16_t sig_model_generic_onoff_bind_ops(sig_model_element_state_t *p_elem);
13 u16_t sig_model_generic_lightness_bind_ops(sig_model_element_state_t *p_elem, u8_t type);
17 u16_t sig_model_generic_color_temperature_bind_ops(sig_model_element_state_t *p_elem);
A Dsig_model_transition.h22 void sig_model_transition_timer_stop(sig_model_element_state_t *p_elem);
28 void sig_model_transition_state_reset(sig_model_element_state_t *p_elem);
30 uint8_t sig_model_transition_update(sig_model_element_state_t *p_elem);
A Dsig_model_onoff_srv.h30 void sig_model_onoff_update_by_lightness(sig_model_element_state_t *p_elem, E_VALUE_TYPE type);
33 void sig_model_onoff_update_by_color_temperature(sig_model_element_state_t *p_elem);
A Dsig_model_lightness_srv.h18 void sig_model_lightness_update_by_onoff(sig_model_element_state_t *p_elem);
A Dsig_model_light_ctl_srv.h20 void sig_model_light_ctl_update_by_onoff(sig_model_element_state_t *p_elem);
/AliOS-Things-master/hardware/chip/rtl872xd/sdk/component/common/bluetooth/realtek/sdk/inc/os/
A Dos_queue.h117 void os_queue_in(T_OS_QUEUE *p_queue, void *p_elem);
251 void os_queue_insert(T_OS_QUEUE *p_queue, void *p_elem, void *p_new_elem);
305 bool os_queue_delete(T_OS_QUEUE *p_queue, void *p_elem);
/AliOS-Things-master/components/genie_service/core/src/
A Dgenie_transport.c127 …struct bt_mesh_model *p_model = bt_mesh_model_find_vnd(p_model_msg->p_elem, CONFIG_MESH_VENDOR_COM… in genie_transport_model_send()
132 BT_ERR("cannot find vendor model server %p\n", p_model_msg->p_elem); in genie_transport_model_send()
149 ctx.app_idx = bt_mesh_model_get_appkey_id(p_model_msg->p_elem, p_model); in genie_transport_model_send()
150 ctx.net_idx = bt_mesh_model_get_netkey_id(p_model_msg->p_elem); in genie_transport_model_send()
410 transport_model_param.p_elem = genie_mesh_get_primary_element(); in genie_transport_send_payload()
A Dgenie_vendor_model.c77 sig_model_element_state_t *p_elem = NULL; in genie_model_analyze() local
88 p_elem = p_model->user_data; in genie_model_analyze()
95 if (genie_transport_check_tid(p_ctx->addr, msg.tid, p_elem->element_id) != MESH_SUCCESS) in genie_model_analyze()
/AliOS-Things-master/components/genie_service/core/inc/
A Dgenie_transport.h73 struct bt_mesh_elem *p_elem; member
/AliOS-Things-master/components/genie_service/sal/src/
A Dgenie_sal_ble.c135 request_msg.p_elem = p_element; in genie_sal_ble_send_msg()

Completed in 17 milliseconds