Home
last modified time | relevance | path

Searched refs:topic (Results 1 – 25 of 98) sorted by relevance

1234

/AliOS-Things-master/components/linkkit/dev_model/client/
A Ddm_client.h18 void dm_client_thing_model_down_raw(int fd, const char *topic,
21 void dm_client_thing_model_up_raw_reply(int fd, const char *topic,
27 void dm_client_thing_event_notify(int fd, const char *topic,
66 void dm_client_thing_service_request(int fd, const char *topic,
72 void dm_client_rrpc_request_wildcard(int fd, const char *topic,
84 void dm_client_thing_topo_add_notify(int fd, const char *topic,
93 void dm_client_thing_gateway_permit(int fd, const char *topic,
108 void dm_client_thing_topo_add_reply(int fd, const char *topic,
114 void dm_client_thing_topo_get_reply(int fd, const char *topic,
120 void dm_client_combine_login_reply(int fd, const char *topic,
[all …]
A Ddm_client.c236 source.uri = topic; in dm_client_thing_event_notify()
274 source.uri = topic; in dm_client_thing_model_down_raw()
290 source.uri = topic; in dm_client_thing_model_up_raw_reply()
315 source.uri = topic; in dm_client_thing_service_property_set()
364 source.uri = topic; in dm_client_thing_service_property_get()
387 source.uri = topic; in dm_client_thing_service_request()
403 source.uri = topic; in dm_client_thing_event_post_reply()
420 source.uri = topic; in dm_client_thing_property_desired_get_reply()
437 source.uri = topic; in dm_client_thing_property_desired_delete_reply()
455 source.uri = topic; in dm_client_thing_deviceinfo_update_reply()
[all …]
/AliOS-Things-master/components/linkkit/wifi_provision/dev_bind/
A Dawss_cmp_mqtt.c12 int awss_cmp_mqtt_register_cb(char *topic, void *cb) in awss_cmp_mqtt_register_cb() argument
14 if (topic == NULL) { in awss_cmp_mqtt_register_cb()
26 int awss_cmp_mqtt_unregister_cb(char *topic) in awss_cmp_mqtt_unregister_cb() argument
28 return IOT_MQTT_Unsubscribe(NULL, topic); in awss_cmp_mqtt_unregister_cb()
52 char topic[TOPIC_LEN_MAX] = { 0 }; in awss_cmp_online_init() local
60 memset(topic, 0, sizeof(topic)); in awss_cmp_online_init()
61 awss_build_topic(awss_online_couple[i].topic, topic, TOPIC_LEN_MAX); in awss_cmp_online_init()
74 char topic[TOPIC_LEN_MAX] = { 0 }; in awss_cmp_online_deinit() local
84 memset(topic, 0, sizeof(topic)); in awss_cmp_online_deinit()
85 awss_build_topic(awss_online_couple[i].topic, topic, TOPIC_LEN_MAX); in awss_cmp_online_deinit()
[all …]
A Dawss_cmp_coap.c110 int awss_cmp_coap_register_cb(char *topic, void *cb) in awss_cmp_coap_register_cb() argument
119 if (topic == NULL) { in awss_cmp_coap_register_cb()
123 CoAPServer_register(g_coap_ctx, (const char *)topic, in awss_cmp_coap_register_cb()
215 char topic[TOPIC_LEN_MAX] = { 0 }; in awss_cmp_local_init() local
223 memset(topic, 0, sizeof(topic)); in awss_cmp_local_init()
224 awss_build_topic(awss_local_couple[i].topic, topic, TOPIC_LEN_MAX); in awss_cmp_local_init()
225 awss_cmp_coap_register_cb(topic, awss_local_couple[i].cb); in awss_cmp_local_init()
A Dawss_cmp.h32 char *topic; member
53 int awss_cmp_coap_register_cb(char *topic, void *cb);
62 int awss_cmp_mqtt_register_cb(char *topic, void *cb);
63 int awss_cmp_mqtt_unregister_cb(char *topic);
64 int awss_cmp_mqtt_send(char *topic, void *pkt, int pkt_len, int qos);
/AliOS-Things-master/components/linksdk/components/data-model/
A Daiot_dm_api.c137 topic_mapping.topic = g_dm_recv_topic_mapping[i].topic; in _dm_setup_topic_mapping()
226 …return core_sprintf(dm_handle->sysdep, topic, g_dm_send_topic_mapping[msg->type].topic, src, src_c… in _dm_prepare_send_topic()
307 return _dm_send_alink_req(handle, topic, msg->data.event_post.params); in _dm_send_event_post()
370 if (topic[i] == '/') { in _dm_get_topic_level()
373 p_open = topic + i + 1; in _dm_get_topic_level()
377 p_close = topic + i; in _dm_get_topic_level()
386 p_close = topic + topic_len; in _dm_get_topic_level()
786 char *topic = NULL; in aiot_dm_send() local
802 res = _dm_prepare_send_topic(dm_handle, msg, &topic); in aiot_dm_send()
808 dm_handle->sysdep->core_sysdep_free(topic); in aiot_dm_send()
[all …]
/AliOS-Things-master/components/linkkit/wifi_provision/dev_bind/awss_reset/
A Dawss_dev_reset.c74 char *topic = NULL; in awss_report_reset_to_cloud() local
96 topic = (char *)devrst_malloc(topic_len + 1); in awss_report_reset_to_cloud()
97 if (topic == NULL) { in awss_report_reset_to_cloud()
100 memset(topic, 0, topic_len + 1); in awss_report_reset_to_cloud()
102 HAL_Snprintf(topic, topic_len, TOPIC_RESET_REPORT_REPLY, pk, dn); in awss_report_reset_to_cloud()
106 NULL, topic, IOTX_MQTT_QOS3_SUB_LOCAL, in awss_report_reset_to_cloud()
110 NULL, topic, IOTX_MQTT_QOS0, in awss_report_reset_to_cloud()
117 memset(topic, 0, topic_len + 1); in awss_report_reset_to_cloud()
118 HAL_Snprintf(topic, topic_len, TOPIC_RESET_REPORT, pk, dn); in awss_report_reset_to_cloud()
146 if (topic) { in awss_report_reset_to_cloud()
[all …]
/AliOS-Things-master/components/amp/example-js/
A Dgateway.js26 …var topic = '/sys/' + devInfo.productKey + '/' + devInfo.deviceName + '/thing/event/property/post';
35 topic: topic,
43 …var topic = '/sys/' + devInfo.productKey + '/' + devInfo.deviceName + '/thing/event/' + eventId + …
52 topic: topic,
86 var pk = res.topic.split('/')[2];
87 var dn = res.topic.split('/')[3];
89 console.log('mqtt topic is ' + res.topic);
A Diot.js8 var topic = '/sys/' + productKey + '/' + deviceName + '/user/haas/info'; variable
22 topic: topic,
27 topic: topic
31 topic: topic,
/AliOS-Things-master/components/linkkit/dev_model/
A Diotx_cm_coap.c64 static int _coap_unsub(const char *topic);
267 if (topic == NULL) { in _coap_response_default()
271 memset(topic, 0, topic_len); in _coap_response_default()
272 strncpy(topic, node->topic, topic_len); in _coap_response_default()
274 cm_free(node->topic); in _coap_response_default()
282 cm_free(topic); in _coap_response_default()
330 topic_len = strlen(topic) + 1; in _coap_publish()
332 if (node->topic == NULL) { in _coap_publish()
338 strncpy(node->topic, topic, topic_len); in _coap_publish()
366 static int _coap_unsub(const char *topic) in _coap_unsub() argument
[all …]
A Diotx_cm_mqtt.c9 static int _mqtt_publish(iotx_cm_ext_params_t *params, const char *topic,
11 static int _mqtt_sub(iotx_cm_ext_params_t *params, const char *topic,
14 static int _mqtt_unsub(const char *topic);
196 char *topic = NULL; in iotx_cloud_conn_mqtt_event_handle() local
208 topic = cm_malloc(topic_info->topic_len + 1); in iotx_cloud_conn_mqtt_event_handle()
209 if (topic == NULL) { in iotx_cloud_conn_mqtt_event_handle()
213 memset(topic, 0, topic_info->topic_len + 1); in iotx_cloud_conn_mqtt_event_handle()
219 cm_free(topic); in iotx_cloud_conn_mqtt_event_handle()
323 static int _mqtt_sub(iotx_cm_ext_params_t *ext, const char *topic, in _mqtt_sub() argument
331 if (_mqtt_conncection == NULL || topic == NULL || in _mqtt_sub()
[all …]
A Diotx_cm.h88 char *topic; member
94 typedef void (*iotx_cm_data_handle_cb)(int fd, const char *topic,
98 typedef void (*iotx_cm_data_handle_cb)(int fd, const char *topic,
132 int iotx_cm_sub(int fd, iotx_cm_ext_params_t *ext, const char *topic,
134 int iotx_cm_unsub(int fd, const char *topic);
135 int iotx_cm_pub(int fd, iotx_cm_ext_params_t *ext, const char *topic,
/AliOS-Things-master/components/amp/test/
A Dtest_mqtt.js22 topic: '/amp-test',
26 topic: '/amp-test',
51 topic: testTopic
53 mqttClient.on('message', function (topic, payload) { argument
55 …console.log('mqtt: [debug] mqtt on message, topic[' + topic + ']: ' + ArrayToString(payload) + ', …
57 if (!topic || typeof topic !== 'string' || !payload || typeof payload !== 'object') {
62 if (topic !== testTopic || ArrayToString(payload) !== defaultMessage) {
83 topic: testTopic,
/AliOS-Things-master/components/linkkit/dev_model/deprecated/
A Dimpl_ntp.c139 char *topic = NULL; in linkkit_ntp_time_request() local
148 topic = (char *)IMPL_NTP_MALLOC(topic_len + 1); in linkkit_ntp_time_request()
149 if (topic == NULL) { in linkkit_ntp_time_request()
152 memset(topic, 0, topic_len + 1); in linkkit_ntp_time_request()
154 HAL_Snprintf(topic, topic_len, TOPIC_NTP_REPLY, pk, dn); in linkkit_ntp_time_request()
157 NULL, topic, IOTX_MQTT_QOS3_SUB_LOCAL, in linkkit_ntp_time_request()
162 NULL, topic, IOTX_MQTT_QOS0, in linkkit_ntp_time_request()
170 memset(topic, 0, topic_len + 1); in linkkit_ntp_time_request()
171 HAL_Snprintf(topic, topic_len, TOPIC_NTP, pk, dn); in linkkit_ntp_time_request()
191 if (topic) { in linkkit_ntp_time_request()
[all …]
/AliOS-Things-master/components/linkkit/dev_reset/
A Ddev_reset.c49 char topic[IOTX_PRODUCT_KEY_LEN + IOTX_DEVICE_NAME_LEN + 30] = { 0 }; in IOT_DevReset_Report() local
57 memset(topic, 0, IOTX_PRODUCT_KEY_LEN + IOTX_DEVICE_NAME_LEN + 30); in IOT_DevReset_Report()
58 HAL_Snprintf(topic, IOTX_PRODUCT_KEY_LEN + IOTX_DEVICE_NAME_LEN + 30, in IOT_DevReset_Report()
64 res = IOT_MQTT_Subscribe_Sync(NULL, topic, IOTX_MQTT_QOS3_SUB_LOCAL, in IOT_DevReset_Report()
67 res = IOT_MQTT_Subscribe_Sync(NULL, topic, IOTX_MQTT_QOS0, in IOT_DevReset_Report()
76 memset(topic, 0, IOTX_PRODUCT_KEY_LEN + IOTX_DEVICE_NAME_LEN + 30); in IOT_DevReset_Report()
77 HAL_Snprintf(topic, IOTX_PRODUCT_KEY_LEN + IOTX_DEVICE_NAME_LEN + 30, in IOT_DevReset_Report()
83 res = IOT_MQTT_Publish_Simple(NULL, topic, IOTX_MQTT_QOS0, payload, in IOT_DevReset_Report()
/AliOS-Things-master/components/amp/libjs/lib/
A Dmqtt.js61 if (!this.mqttInstance || !options || !options.topic) {
70 …ret = __native.MQTT.subscribe(this.mqttInstance, options.topic, options.qos || 0, function(topic, … argument
71 this.emit('message', topic, payload);
87 if (!this.mqttInstance || !options || !options.topic) {
96 var ret = __native.MQTT.unsubscribe(this.mqttInstance, options.topic, function() {
112 if (!this.mqttInstance || !options || !options.topic || !options.message) {
121 …__native.MQTT.publish(this.mqttInstance, options.topic, options.message, options.qos || 0, functio…
126 this.emit('error', options.topic);
A Diot.js50 throw new Error('subscribe topic error', options.topic);
56 unsubscribe(topic, cb) { argument
57 … var ret = __native.AIOT_DEVICE.unsubscribe(this.IoTDeviceInstance, topic, cb || function() {});
59 throw new Error('unsubscribe topic error', topic);
68 throw new Error('publish topic info error', options.topic);
220 throw new Error('subscribe topic error', options.topic);
226 unsubscribe(topic, cb) { argument
227 … var ret = __native.AIOT_GATEWAY.unsubscribe(this.IoTGatewayInstance, topic, cb || function() {});
229 throw new Error('unsubscribe topic error', topic);
238 throw new Error('publish topic info error', options.topic);
/AliOS-Things-master/components/linkkit/dev_model/alcs/
A Dalcs_mqtt.c243 char *topic; in __alcs_mqtt_subscribe_callback() local
264 topic = (char *)ptopic_info->ptopic; in __alcs_mqtt_subscribe_callback()
496 char topic[ALCS_MQTT_TOPIC_MAX_LEN] = { 0 }; in alcs_mqtt_init() local
511 memset(topic, 0, ALCS_MQTT_TOPIC_MAX_LEN); in alcs_mqtt_init()
512 HAL_Snprintf(topic, ALCS_MQTT_TOPIC_MAX_LEN, in alcs_mqtt_init()
520 memset(topic, 0, ALCS_MQTT_TOPIC_MAX_LEN); in alcs_mqtt_init()
521 HAL_Snprintf(topic, ALCS_MQTT_TOPIC_MAX_LEN, in alcs_mqtt_init()
529 memset(topic, 0, ALCS_MQTT_TOPIC_MAX_LEN); in alcs_mqtt_init()
531 topic, ALCS_MQTT_TOPIC_MAX_LEN, in alcs_mqtt_init()
619 char topic[ALCS_MQTT_TOPIC_MAX_LEN] = { 0 }; in alcs_prefixkey_get() local
[all …]
/AliOS-Things-master/components/amp/jslib/src/
A Dmqtt.js48 this.emit('message', res.topic, res.payload); break;
55 if (!this.mqttInstance || !options || !options.topic) {
64 var ret = MQTT.subscribe(this.mqttInstance, options.topic, options.qos || 0);
79 if (!this.mqttInstance || !options || !options.topic) {
88 var ret = MQTT.unsubscribe(this.mqttInstance, options.topic);
103 if (!this.mqttInstance || !options || !options.topic || !options.message) {
112 … MQTT.publish(this.mqttInstance, options.topic, options.message, options.qos || 0, function (ret) {
117 this.emit('error', options.topic);
A Diot.js52 throw new Error('subscribe topic error', options.topic);
58 unsubscribe(topic, cb) { argument
59 var ret = this.IoTDeviceInstance.unsubscribe(topic, cb || function() {});
61 throw new Error('unsubscribe topic error', topic);
70 throw new Error('publish topic info error', options.topic);
237 throw new Error('subscribe topic error', options.topic);
243 unsubscribe(topic, cb) { argument
244 var ret = this.IoTGatewayInstance.unsubscribe(topic, cb || function() {});
246 throw new Error('unsubscribe topic error', topic);
255 throw new Error('publish topic info error', options.topic);
/AliOS-Things-master/components/ota/hal/
A Dota_hal_trans.c10 int ota_hal_mqtt_publish(void *mqtt_client, char *topic, int qos, void *data, int len) in ota_hal_mqtt_publish() argument
12 return aiot_mqtt_pub(mqtt_client, topic, data, len, qos); in ota_hal_mqtt_publish()
15 int ota_hal_mqtt_subscribe(void *mqtt_client, char *topic, void* cb, void *ctx) in ota_hal_mqtt_subscribe() argument
17 return aiot_mqtt_sub(mqtt_client, topic, cb, 0, ctx); in ota_hal_mqtt_subscribe()
/AliOS-Things-master/components/linksdk/core/
A Daiot_mqtt_api.c152 … if ((strlen(node->topic) == topic->len) && memcmp(node->topic, topic->buffer, topic->len) == 0) { in _core_mqtt_sublist_insert()
177 memset(node->topic, 0, topic->len + 1); in _core_mqtt_sublist_insert()
178 memcpy(node->topic, topic->buffer, topic->len); in _core_mqtt_sublist_insert()
201 … if ((strlen(node->topic) == topic->len) && memcmp(node->topic, topic->buffer, topic->len) == 0) { in _core_mqtt_topic_alias_list_insert()
221 memset(node->topic, 0, topic->len + 1); in _core_mqtt_topic_alias_list_insert()
222 memcpy(node->topic, topic->buffer, topic->len); in _core_mqtt_topic_alias_list_insert()
263 … if ((strlen(node->topic) == topic->len) && memcmp(node->topic, topic->buffer, topic->len) == 0) { in _core_mqtt_sublist_remove()
279 … if ((strlen(node->topic) == topic->len) && memcmp(node->topic, topic->buffer, topic->len) == 0) { in _core_mqtt_sublist_remove_handler()
2079 packet.data.pub.topic = topic_alias_node.topic; in _core_mqtt_pub_handler()
2898 if (memcmp(topic_alias_node->topic, topic->buffer, topic->len) == 0) { in _core_mqtt_tx_topic_alias_process()
[all …]
A Daiot_mqtt_api.h221 char *topic; member
345 char *topic; member
897 int32_t aiot_mqtt_pub(void *handle, char *topic, uint8_t *payload, uint32_t payload_len, uint8_t qo…
915 int32_t aiot_mqtt_sub(void *handle, char *topic, aiot_mqtt_recv_handler_t handler, uint8_t qos, voi…
927 int32_t aiot_mqtt_unsub(void *handle, char *topic);
1014 int32_t aiot_mqtt_pub_with_prop(void *handle, char *topic, uint8_t *payload, uint32_t payload_len, …
1060 int32_t aiot_mqtt_sub_with_prop(void *handle, char *topic, aiot_mqtt_recv_handler_t handler, uint8_…
1077 int32_t aiot_mqtt_unsub_with_prop(void *handle, char *topic, unsub_property_t *unsub_prop);
/AliOS-Things-master/components/amp/engine/quickjs_engine/addons/network/mqtt/
A Dmodule_mqtt.c39 char *topic; member
118 amp_free(param->topic); in aos_mqtt_notify()
168 param->topic = __amp_strdup(message->recv.topic); in aos_mqtt_message_cb()
303 const char *topic = NULL; in native_mqtt_subscribe() local
313 topic = JS_ToCString(ctx, argv[1]); in native_mqtt_subscribe()
321 JS_FreeCString(ctx, topic); in native_mqtt_subscribe()
332 const char *topic; in native_mqtt_unsubscribe() local
342 topic = JS_ToCString(ctx, argv[1]); in native_mqtt_unsubscribe()
350 JS_FreeCString(ctx, topic); in native_mqtt_unsubscribe()
361 const char *topic; in native_mqtt_publish() local
[all …]
/AliOS-Things-master/components/linksdk/components/logpost/
A Daiot_logpost_api.c63 char *topic = NULL; in _logpost_get_config() local
89 if (NULL == topic) { in _logpost_get_config()
100 logpost_handle->sysdep->core_sysdep_free(topic); in _logpost_get_config()
106 logpost_handle->sysdep->core_sysdep_free(topic); in _logpost_get_config()
296 topic_mapping.topic = LOGPOST_CONFIG_PUSH_TOPIC; in aiot_logpost_setopt()
339 char *topic = NULL; in aiot_logpost_send() local
385 if (NULL == topic) { in aiot_logpost_send()
412 logpost_handle->sysdep->core_sysdep_free(topic); in aiot_logpost_send()
418 logpost_handle->sysdep->core_sysdep_free(topic); in aiot_logpost_send()
449 topic_mapping.topic = LOGPOST_CONFIG_PUSH_TOPIC; in aiot_logpost_deinit()
[all …]

Completed in 212 milliseconds

1234