Home
last modified time | relevance | path

Searched refs:js_cb_ref (Results 1 – 25 of 58) sorted by relevance

123

/AliOS-Things-master/components/py_engine/modules/network/tcp/
A Dmodule_tcp.c21 int js_cb_ref; member
26 int js_cb_ref; member
31 int js_cb_ref; member
37 int js_cb_ref; member
42 int js_cb_ref; member
48 int js_cb_ref; member
59 be_push_ref(ctx, p->js_cb_ref); in tcp_create_notify()
65 be_unref(ctx, p->js_cb_ref); in tcp_create_notify()
91 p->js_cb_ref = create_param->js_cb_ref; in tcp_create_routine()
201 p->js_cb_ref = send_param->js_cb_ref; in tcp_send_routine()
[all …]
/AliOS-Things-master/components/amp/engine/duktape_engine/addons/network/tcp/
A Dmodule_tcp.c21 int js_cb_ref; member
26 int js_cb_ref; member
31 int js_cb_ref; member
37 int js_cb_ref; member
42 int js_cb_ref; member
48 int js_cb_ref; member
59 be_push_ref(ctx, p->js_cb_ref); in tcp_create_notify()
65 be_unref(ctx, p->js_cb_ref); in tcp_create_notify()
91 p->js_cb_ref = create_param->js_cb_ref; in tcp_create_routine()
203 p->js_cb_ref = send_param->js_cb_ref; in tcp_send_routine()
[all …]
/AliOS-Things-master/components/py_engine/modules/mqtt/
A Dmodule_mqtt.c161 int js_cb_ref = 0; in native_mqtt_subscribe() local
188 js_cb_ref = be_ref(ctx); in native_mqtt_subscribe()
190 amp_mqtt_handle->js_cb_ref[MQTT_JSCALLBACK_SCRIBE_TOPIC_REF] = js_cb_ref; in native_mqtt_subscribe()
209 int js_cb_ref = 0; in native_mqtt_unsubscribe() local
226 js_cb_ref = be_ref(ctx); in native_mqtt_unsubscribe()
228 amp_mqtt_handle->js_cb_ref[MQTT_JSCALLBACK_UNSCRIBE_TOPIC_REF] = js_cb_ref; in native_mqtt_unsubscribe()
251 int js_cb_ref = 0; in native_mqtt_publish() local
282 js_cb_ref = be_ref(ctx); in native_mqtt_publish()
284 amp_mqtt_handle->js_cb_ref[MQTT_JSCALLBACK_PUBLISH_REF] = js_cb_ref; in native_mqtt_publish()
303 int js_cb_ref = 0; in native_mqtt_close() local
[all …]
/AliOS-Things-master/components/amp/engine/duktape_engine/addons/network/mqtt/
A Dmodule_mqtt.c156 int js_cb_ref = 0; in native_mqtt_subscribe() local
183 js_cb_ref = be_ref(ctx); in native_mqtt_subscribe()
185 amp_mqtt_handle->js_cb_ref[MQTT_JSCALLBACK_SCRIBE_TOPIC_REF] = js_cb_ref; in native_mqtt_subscribe()
204 int js_cb_ref = 0; in native_mqtt_unsubscribe() local
220 js_cb_ref = be_ref(ctx); in native_mqtt_unsubscribe()
222 amp_mqtt_handle->js_cb_ref[MQTT_JSCALLBACK_UNSCRIBE_TOPIC_REF] = js_cb_ref; in native_mqtt_unsubscribe()
245 int js_cb_ref = 0; in native_mqtt_publish() local
275 js_cb_ref = be_ref(ctx); in native_mqtt_publish()
277 amp_mqtt_handle->js_cb_ref[MQTT_JSCALLBACK_PUBLISH_REF] = js_cb_ref; in native_mqtt_publish()
294 int js_cb_ref = 0; in native_mqtt_close() local
[all …]
/AliOS-Things-master/components/amp/engine/quickjs_engine/addons/network/tcp/
A Dmodule_tcp.c28 JSValue js_cb_ref; member
33 JSValue js_cb_ref; member
38 JSValue js_cb_ref; member
44 JSValue js_cb_ref; member
49 JSValue js_cb_ref; member
55 JSValue js_cb_ref; member
74 JS_FreeValue(ctx, p->js_cb_ref); in tcp_create_notify()
99 p->js_cb_ref = create_param->js_cb_ref; in tcp_create_routine()
172 JS_FreeValue(ctx, p->js_cb_ref); in tcp_send_notify()
198 p->js_cb_ref = send_param->js_cb_ref; in tcp_send_routine()
[all …]
/AliOS-Things-master/components/amp/engine/duktape_engine/addons/advanced/ota/
A Dmodule_appota.c25 int js_cb_ref; member
57 int js_cb_ref; in ota_install_handler() local
82 int js_cb_ref; in native_ota_upgrade() local
110 ota_package_info->js_cb_ref = js_cb_ref; in native_ota_upgrade()
146 int js_cb_ref; in ota_verify_handler() local
167 int js_cb_ref; in native_ota_verify() local
197 ota_package_info->js_cb_ref = js_cb_ref; in native_ota_verify()
240 int js_cb_ref; in ota_download_handler() local
257 int js_cb_ref; in native_ota_download() local
282 ota_package_info->js_cb_ref = js_cb_ref; in native_ota_download()
[all …]
/AliOS-Things-master/components/amp/engine/duktape_engine/addons/utils/systimer/
A Dmodule_systimer.c21 int js_cb_ref; member
46 be_push_ref(ctx, t->js_cb_ref); in timer_action()
54 be_unref(ctx, t->js_cb_ref); in timer_action()
60 static timer_wrap_t *setup_timer(int js_cb_ref, long ms, int repeat) in setup_timer() argument
65 t->js_cb_ref = js_cb_ref; in setup_timer()
110 be_unref(ctx, t->js_cb_ref); in clear_timer()
124 int js_cb_ref = be_ref(ctx); in native_setTimeout() local
126 timer_wrap_t *t = setup_timer(js_cb_ref, ms, 0); in native_setTimeout()
148 int js_cb_ref = be_ref(ctx); in native_setInterval() local
150 timer_wrap_t *t = setup_timer(js_cb_ref, ms, 1); in native_setInterval()
/AliOS-Things-master/components/py_engine/modules/network/udp/
A Dmodule_udp.c33 int js_cb_ref; member
38 int js_cb_ref; member
44 int js_cb_ref; member
52 int js_cb_ref; member
138 be_push_ref(ctx, p->js_cb_ref); in udp_send_notify()
144 be_unref(ctx, p->js_cb_ref); in udp_send_notify()
173 p->js_cb_ref = send_param->js_cb_ref; in udp_send_routine()
279 send_param->js_cb_ref = be_ref(ctx); in native_udp_sendto()
299 be_push_ref(ctx, p->js_cb_ref); in udp_recv_notify()
319 be_unref(ctx, p->js_cb_ref); in udp_recv_notify()
[all …]
/AliOS-Things-master/components/amp/engine/duktape_engine/addons/network/udp/
A Dmodule_udp.c33 int js_cb_ref; member
38 int js_cb_ref; member
44 int js_cb_ref; member
52 int js_cb_ref; member
138 be_push_ref(ctx, p->js_cb_ref); in udp_send_notify()
144 be_unref(ctx, p->js_cb_ref); in udp_send_notify()
172 p->js_cb_ref = send_param->js_cb_ref; in udp_send_routine()
277 send_param->js_cb_ref = be_ref(ctx); in native_udp_sendto()
296 be_push_ref(ctx, p->js_cb_ref); in udp_recv_notify()
316 be_unref(ctx, p->js_cb_ref); in udp_recv_notify()
[all …]
/AliOS-Things-master/components/amp/engine/quickjs_engine/addons/utils/systimer/
A Dmodule_systimer.c22 JSValue js_cb_ref; member
41 JSValue fun = t->js_cb_ref; in timer_action()
51 fun = JS_DupValue(ctx, t->js_cb_ref); in timer_action()
70 static timer_wrap_t *setup_timer(JSValue js_cb_ref, long ms, int repeat) in setup_timer() argument
76 t->js_cb_ref = js_cb_ref; in setup_timer()
131 JS_FreeValue(ctx, t->js_cb_ref); in clear_timer()
146 JSValue js_cb_ref = JS_DupValue(ctx, irq_cb); in native_setTimeout() local
150 timer_wrap_t *t = setup_timer(js_cb_ref, ms, 0); in native_setTimeout()
174 JSValue js_cb_ref = JS_DupValue(ctx, irq_cb); in native_setInterval() local
178 timer_wrap_t *t = setup_timer(js_cb_ref, ms, 1); in native_setInterval()
/AliOS-Things-master/components/amp/engine/duktape_engine/addons/hardware/gpio/
A Dmodule_gpio.c177 int js_cb_ref; member
187 be_push_ref(ctx, param->js_cb_ref); in gpio_irq_notify()
211 int js_cb_ref = (int)priv->js_cb_ref; in gpio_irq() local
212 if (js_cb_ref <= 0) { in gpio_irq()
227 notify->js_cb_ref = js_cb_ref; in gpio_irq()
275 int js_cb_ref = be_ref(ctx); in native_gpio_on() local
276 priv->js_cb_ref = (void *)js_cb_ref; in native_gpio_on()
/AliOS-Things-master/components/amp/engine/duktape_engine/addons/hardware/uart/
A Dmodule_uart.c24 int js_cb_ref; member
30 int js_cb_ref; member
57 be_push_ref(ctx, notify->js_cb_ref); in uart_recv_notify()
101 notify->js_cb_ref = module->js_cb_ref; in uart_recv_callback()
105 static int uart_add_recv(uart_dev_t *uart, uint32_t item_handle, int js_cb_ref) in uart_add_recv() argument
113 module->js_cb_ref = js_cb_ref; in uart_add_recv()
120 be_unref(ctx, module->js_cb_ref); in uart_add_recv()
136 be_unref(ctx, m->js_cb_ref); in uart_del_recv()
324 int js_cb_ref = be_ref(ctx); in native_uart_on() local
325 ret = uart_add_recv(uart_device, uart_handle.handle, js_cb_ref); in native_uart_on()
[all …]
/AliOS-Things-master/components/amp/engine/quickjs_engine/addons/hardware/uart/
A Dmodule_uart.c34 JSValue js_cb_ref; member
40 JSValue js_cb_ref; member
117 notify->js_cb_ref = module->js_cb_ref; in uart_recv_callback()
130 module->js_cb_ref = js_cb_ref; in uart_add_recv()
137 JS_FreeValue(ctx, module->js_cb_ref); in uart_add_recv()
153 JS_FreeValue(ctx, m->js_cb_ref); in uart_del_recv()
413 JSValue js_cb_ref = JS_DupValue(ctx, irq_cb); in native_uart_on() local
421 if (!JS_IsFunction(ctx, js_cb_ref)) { in native_uart_on()
425 module->js_cb_ref = js_cb_ref; in native_uart_on()
432 JS_FreeValue(ctx, module->js_cb_ref); in native_uart_on()
[all …]
/AliOS-Things-master/components/amp/engine/quickjs_engine/addons/network/mqtt/
A Dmodule_mqtt.c43 JSValue js_cb_ref; member
93 JSValue val = JS_Call(ctx, param->js_cb_ref, JS_UNDEFINED, 1, &obj); in aos_mqtt_notify()
148 param->js_cb_ref = param->aos_mqtt_handle->js_cb_ref[MQTT_JSCALLBACK_START_CLIENT_REF]; in aos_mqtt_message_cb()
231 JSValue js_cb_ref; in native_mqtt_start() local
282 js_cb_ref = JS_DupValue(ctx, cb); in native_mqtt_start()
283 aos_mqtt_handle->js_cb_ref[MQTT_JSCALLBACK_START_CLIENT_REF] = js_cb_ref; in native_mqtt_start()
289 JS_FreeValue(ctx, js_cb_ref); in native_mqtt_start()
305 int js_cb_ref = 0; in native_mqtt_subscribe() local
334 int js_cb_ref = 0; in native_mqtt_unsubscribe() local
365 int js_cb_ref = 0; in native_mqtt_publish() local
[all …]
/AliOS-Things-master/components/amp/engine/quickjs_engine/addons/network/udp/
A Dmodule_udp.c34 JSValue js_cb_ref; member
39 JSValue js_cb_ref; member
45 JSValue js_cb_ref; member
53 JSValue js_cb_ref; member
140 JSValue val = JS_Call(ctx, notify->js_cb_ref, JS_UNDEFINED, 1, &args); in udp_send_notify()
149 JS_FreeValue(ctx, notify->js_cb_ref); in udp_send_notify()
177 p->js_cb_ref = send_param->js_cb_ref; in udp_send_routine()
289 send_param->js_cb_ref = JS_DupValue(ctx, argv[2]); in native_udp_sendto()
366 p->js_cb_ref = recv_param->js_cb_ref; in udp_recv_routine()
386 JS_FreeValue(ctx, recv_param->js_cb_ref); in udp_recv_routine()
[all …]
/AliOS-Things-master/components/py_engine/modules/network/cellular/
A Dmodule_cellular.c17 int js_cb_ref; member
176 be_push_ref(ctx, p->js_cb_ref); in network_status_notify()
188 int js_cb_ref = (int)args; in network_status_callback() local
194 be_unref(ctx, js_cb_ref); in network_status_callback()
199 p->js_cb_ref = js_cb_ref; in network_status_callback()
207 int js_cb_ref; in native_cellular_onconnect() local
215 js_cb_ref = be_ref(ctx); in native_cellular_onconnect()
217 ret = aos_network_status_registercb(network_status_callback, js_cb_ref); in native_cellular_onconnect()
220 be_unref(ctx, js_cb_ref); in native_cellular_onconnect()
/AliOS-Things-master/components/amp/engine/duktape_engine/addons/hardware/timer/
A Dmodule_timer.c85 int js_cb_ref = (int)args; in native_timer_timeout_handler() local
88 be_push_ref(ctx, js_cb_ref); in native_timer_timeout_handler()
107 int js_cb_ref; in native_timer_setTimeout() local
131 js_cb_ref = be_ref(ctx); in native_timer_setTimeout()
138 timer_device->config.arg = js_cb_ref; in native_timer_setTimeout()
187 int js_cb_ref = (int *)arg; in native_timer_interval_handler() local
190 be_push_ref(ctx, js_cb_ref); in native_timer_interval_handler()
210 int js_cb_ref; in native_timer_setInterval() local
234 js_cb_ref = be_ref(ctx); in native_timer_setInterval()
241 timer_device->config.arg = js_cb_ref; in native_timer_setInterval()
/AliOS-Things-master/components/amp/engine/duktape_engine/addons/network/cellular/
A Dmodule_cellular.c18 int js_cb_ref; member
177 be_push_ref(ctx, p->js_cb_ref); in network_status_notify()
189 int js_cb_ref = (int)args; in network_status_callback() local
194 be_unref(ctx, js_cb_ref); in network_status_callback()
199 p->js_cb_ref = js_cb_ref; in network_status_callback()
207 int js_cb_ref; in native_cellular_onconnect() local
215 js_cb_ref = be_ref(ctx); in native_cellular_onconnect()
217 ret = aos_network_status_registercb(network_status_callback, js_cb_ref); in native_cellular_onconnect()
220 be_unref(ctx, js_cb_ref); in native_cellular_onconnect()
/AliOS-Things-master/components/amp/engine/duktape_engine/addons/advanced/aiot/
A Dmodule_aiot_dynreg.c25 int js_cb_ref = 0; in aiot_app_dynreg_recv_handler() local
35 int js_cb_ref = (int *)userdata; in aiot_app_dynreg_recv_handler() local
37 be_push_ref(ctx, js_cb_ref); in aiot_app_dynreg_recv_handler()
42 be_unref(ctx, js_cb_ref); in aiot_app_dynreg_recv_handler()
48 int32_t aiot_dynreg_http(int js_cb_ref) in aiot_dynreg_http() argument
121 aiot_dynreg_setopt(dynreg_handle, AIOT_DYNREGOPT_USERDATA, js_cb_ref); in aiot_dynreg_http()
A Dmodule_aiot.h147 int js_cb_ref[AIOT_DEV_JSCALLBACK_INVALID_CODE]; member
156 int js_cb_ref[AIOT_SUBDEV_JSCALLBACK_INVALID_CODE]; member
161 int js_cb_ref; member
213 int32_t aiot_dynreg_http(int js_cb_ref);
A Dmodule_aiot_gateway.c28 int js_cb_ref; member
119 be_push_ref(ctx, param->js_cb_ref); in aiot_subdev_notify()
166 be_unref(ctx, param->js_cb_ref); in aiot_subdev_notify()
233 param->js_cb_ref = iot_gateway_handle->js_cb_ref[AIOT_SUBDEV_JSCALLBACK_ADD_TOPO_REF]; in aiot_subdev_recv_handler()
238 … param->js_cb_ref = iot_gateway_handle->js_cb_ref[AIOT_SUBDEV_JSCALLBACK_REMOVE_TOPO_REF]; in aiot_subdev_recv_handler()
244 param->js_cb_ref = iot_gateway_handle->js_cb_ref[AIOT_SUBDEV_JSCALLBACK_GET_TOPO_REF]; in aiot_subdev_recv_handler()
249 param->js_cb_ref = iot_gateway_handle->js_cb_ref[AIOT_SUBDEV_JSCALLBACK_LOGIN_REF]; in aiot_subdev_recv_handler()
254 param->js_cb_ref = iot_gateway_handle->js_cb_ref[AIOT_SUBDEV_JSCALLBACK_LOGOUT_REF]; in aiot_subdev_recv_handler()
260 … param->js_cb_ref = iot_gateway_handle->js_cb_ref[AIOT_SUBDEV_JSCALLBACK_REGISTER_SUBDEV_REF]; in aiot_subdev_recv_handler()
369 param->js_cb_ref = iot_gateway_handle->js_cb_ref[AIOT_SUBDEV_JSCALLBACK_CREATE_GATEWAY_REF]; in aiot_gateway_connect()
[all …]
/AliOS-Things-master/components/amp/engine/quickjs_engine/addons/advanced/aiot/
A Dmodule_aiot_device.c41 JSValue js_cb_ref; member
182 param->js_cb_ref = iot_device_handle->js_cb_ref[AIOT_DEV_JSCALLBACK_ONPROPS_REF]; in aiot_app_dm_recv_handler()
215 param->js_cb_ref = iot_device_handle->js_cb_ref[AIOT_DEV_JSCALLBACK_ONSERVICE_REF]; in aiot_app_dm_recv_handler()
370 param->js_cb_ref = param->iot_device_handle->js_cb_ref[AIOT_DEV_JSCALLBACK_CREATE_DEV_REF]; in aiot_mqtt_message_cb()
484 JSValue js_cb_ref; in native_aiot_create_device() local
534 js_cb_ref = JS_DupValue(ctx, cb); in native_aiot_create_device()
547 iot_device_handle->js_cb_ref[AIOT_DEV_JSCALLBACK_CREATE_DEV_REF] = js_cb_ref; in native_aiot_create_device()
553 JS_FreeValue(ctx, js_cb_ref); in native_aiot_create_device()
641 JSValue js_cb_ref = JS_DupValue(ctx, argv[1]); in native_aiot_dynreg() local
643 res = aiot_dynreg_http(&js_cb_ref); in native_aiot_dynreg()
[all …]
A Dmodule_aiot_dynreg.c24 JSValue *js_cb_ref = (JSValue *)userdata; in aiot_app_dynreg_recv_handler() local
33 JSValue val = JS_Call(ctx, *js_cb_ref, JS_UNDEFINED, 1, &sec); in aiot_app_dynreg_recv_handler()
36 JS_FreeValue(ctx, *js_cb_ref); in aiot_app_dynreg_recv_handler()
41 int32_t aiot_dynreg_http(JSValue *js_cb_ref) in aiot_dynreg_http() argument
101 aiot_dynreg_setopt(dynreg_handle, AIOT_DYNREGOPT_USERDATA, js_cb_ref); in aiot_dynreg_http()
/AliOS-Things-master/components/amp/engine/quickjs_engine/addons/advanced/ota/
A Dmodule_appota.c27 JSValue js_cb_ref; member
52 JS_FreeValue(ctx, ota_package_info->js_cb_ref); in ota_release_notify()
78 JS_FreeValue(ctx, ota_package_info->js_cb_ref); in ota_install_notify()
134 ota_package_info->js_cb_ref = JS_DupValue(ctx, argv[1]); in native_ota_upgrade()
141 JS_FreeValue(ctx, ota_package_info->js_cb_ref); in native_ota_upgrade()
175 JS_FreeValue(ctx, ota_package_info->js_cb_ref); in ota_verify_notify()
242 JS_FreeValue(ctx, ota_package_info->js_cb_ref); in native_ota_verify()
279 JS_FreeValue(ctx, ota_package_info->js_cb_ref); in ota_download_notify()
286 int js_cb_ref; in ota_download_handler() local
330 JS_FreeValue(ctx, ota_package_info->js_cb_ref); in native_ota_download()
[all …]
/AliOS-Things-master/components/amp/engine/duktape_engine/addons/network/wifi/
A Dmodule_wifi.c24 int js_cb_ref = (int)pdata; in js_cb_wifi_conn_status() local
33 be_push_ref(ctx, js_cb_ref); in js_cb_wifi_conn_status()
43 be_unref(ctx, js_cb_ref); in js_cb_wifi_conn_status()
90 int js_cb_ref = be_ref(ctx); in native_wifi_connect() local
92 …xt(&wifi_connect_task, "wifi connect task", wifi_check_ip_task, (void *)js_cb_ref, 1024 * 2, ADDON… in native_wifi_connect()
96 be_unref(ctx, js_cb_ref); in native_wifi_connect()

Completed in 42 milliseconds

123