/vendor/hisilicon/hispark_pegasus/demo/iottencent_demo/ |
H A D | iot_main.c | 63 const char *topic; member 78 /* Tencent iot cloud topic */ 85 static int MsgRcvCallBack(char *context, char *topic, int topicLen, MQTTClient_message *message) in MsgRcvCallBack() argument 93 topiLen = strlen(topic); in MsgRcvCallBack() 103 (void)memcpy_s(buf, bufSize, topic, topiLen); in MsgRcvCallBack() 105 msg->topic = buf; in MsgRcvCallBack() 111 IOT_LOG_DEBUG("RCVMSG:QOS:%d TOPIC:%s PAYLOAD:%s\r\n", msg->qos, msg->topic, msg->payload); in MsgRcvCallBack() 119 MQTTClient_free(topic); in MsgRcvCallBack() 140 ret = MQTTClient_publishMessage(client, msg->topic, &pubMsg, &gIoTAppCb.tocken); in MqttProcessQueueMsg() 149 gIoTAppCb.msgCallBack(msg->qos, msg->topic, ms in MqttProcessQueueMsg() 282 IotSendMsg(int qos, const char *topic, const char *payload) IotSendMsg() argument [all...] |
H A D | iot_main.h | 19 typedef void (*fnMsgCallBack)(int qos, const char *topic, const char *payload); 34 * @param topic: the iot mqtt topic 42 int IotSendMsg(int qos, const char *topic, const char *payload);
|
H A D | iot_profile.c | 161 // < use this function to make a topic to publish 317 char *topic; in IoTProfilePropertyReport() local 323 topic = MakeTopic(CN_PROFILE_TOPICFMT_TOPIC, deviceID, NULL); in IoTProfilePropertyReport() 324 if (topic == NULL) { in IoTProfilePropertyReport() 328 if ((topic != NULL) && (msg != NULL)) { in IoTProfilePropertyReport() 329 ret = IotSendMsg(0, topic, msg); in IoTProfilePropertyReport() 332 hi_free(0, topic); in IoTProfilePropertyReport()
|
H A D | app_demo_iot.c | 79 static void DemoMsgRcvCallBack(int qos, const char *topic, const char *payload) in DemoMsgRcvCallBack() argument 81 IOT_LOG_DEBUG("RCVMSG:QOS:%d TOPIC:%s PAYLOAD:%s\r\n", qos, topic, payload); in DemoMsgRcvCallBack()
|
/vendor/hisilicon/hispark_pegasus/demo/mqtt_demo/ |
H A D | iot_main.c | 63 const char *topic; member 78 /* Tencent iot cloud topic */ 85 static int MsgRcvCallBack(char *context, char *topic, int topicLen, MQTTClient_message *message) in MsgRcvCallBack() argument 93 topiLen = strlen(topic); in MsgRcvCallBack() 103 (void)memcpy_s(buf, bufSize, topic, topiLen); in MsgRcvCallBack() 105 msg->topic = buf; in MsgRcvCallBack() 111 IOT_LOG_DEBUG("RCVMSG:QOS:%d TOPIC:%s PAYLOAD:%s\r\n", msg->qos, msg->topic, msg->payload); in MsgRcvCallBack() 119 MQTTClient_free(topic); in MsgRcvCallBack() 140 ret = MQTTClient_publishMessage(client, msg->topic, &pubMsg, &gIoTAppCb.tocken); in MqttProcessQueueMsg() 149 gIoTAppCb.msgCallBack(msg->qos, msg->topic, ms in MqttProcessQueueMsg() 282 IotSendMsg(int qos, const char *topic, const char *payload) IotSendMsg() argument [all...] |
H A D | iot_main.h | 19 typedef void (*fnMsgCallBack)(int qos, const char *topic, const char *payload); 34 * @param topic: the iot mqtt topic 42 int IotSendMsg(int qos, const char *topic, const char *payload);
|
H A D | iot_profile.c | 161 // < use this function to make a topic to publish 317 char *topic; in IoTProfilePropertyReport() local 323 topic = MakeTopic(CN_PROFILE_TOPICFMT_TOPIC, deviceID, NULL); in IoTProfilePropertyReport() 324 if (topic == NULL) { in IoTProfilePropertyReport() 328 if ((topic != NULL) && (msg != NULL)) { in IoTProfilePropertyReport() 329 ret = IotSendMsg(0, topic, msg); in IoTProfilePropertyReport() 332 hi_free(0, topic); in IoTProfilePropertyReport()
|
H A D | app_demo_iot.c | 79 static void DemoMsgRcvCallBack(int qos, const char *topic, const char *payload) in DemoMsgRcvCallBack() argument 81 IOT_LOG_DEBUG("RCVMSG:QOS:%d TOPIC:%s PAYLOAD:%s\r\n", qos, topic, payload); in DemoMsgRcvCallBack()
|
/vendor/hisilicon/hispark_pegasus/demo/coap_demo/ |
H A D | iot_main.c | 59 const char *topic; member 84 static int MsgRcvCallBack(unsigned char *context, char *topic, int topicLen, MQTTClient_message *message) in MsgRcvCallBack() argument 93 topicLength = strlen(topic); in MsgRcvCallBack() 103 ret = memcpy_s(buf, bufSize, topic, topicLength); in MsgRcvCallBack() 108 msg->topic = buf; in MsgRcvCallBack() 117 IOT_LOG_DEBUG("RCVMSG:QOS:%d TOPIC:%s PAYLOAD:%s\r\n", msg->qos, msg->topic, msg->payload); in MsgRcvCallBack() 125 MQTTClient_free(topic); in MsgRcvCallBack() 145 ret = MQTTClient_publishMessage(client, msg->topic, &pubmsg, &g_ioTAppCb.tocken); in IoTMsgProcess() 154 g_ioTAppCb.msgCallBack(msg->qos, msg->topic, msg->payload); in IoTMsgProcess() 220 IOT_LOG_ERROR("Subscribe the default topic faile in MqttProcess() 314 IotSendMsg(int qos, const char *topic, const char *payload) IotSendMsg() argument [all...] |
H A D | iot_main.h | 19 typedef void (*FnMsgCallBack)(int qos, const char *topic, const char *payload); 37 * @param topic: the iot mqtt topic 43 int IotSendMsg(int qos, const char *topic, const char *payload);
|
H A D | iot_profile.c | 160 // use this function to make a topic to publish 240 const char *topic; in IoTProfileCmdResp() local 247 topic = MakeTopic(CN_PROFILE_TOPICFMT_CMDRESP, deviceID, payload->requestID); in IoTProfileCmdResp() 248 if (topic == NULL) { in IoTProfileCmdResp() 252 if ((topic != NULL) && (msg != NULL)) { in IoTProfileCmdResp() 253 ret = IotSendMsg(0, topic, msg); in IoTProfileCmdResp() 256 hi_free(0, topic); in IoTProfileCmdResp() 292 char *topic; in IoTProfilePropertyReport() local 298 topic = MakeTopic(CN_PROFILE_TOPICFMT_PROPERTYREPORT, deviceID, NULL); in IoTProfilePropertyReport() 299 if (topic in IoTProfilePropertyReport() [all...] |
H A D | app_demo_iot.c | 34 static void DemoMsgRcvCallBack(int qos, const char *topic, const char *payload) in DemoMsgRcvCallBack() argument 39 IOT_LOG_DEBUG("RCVMSG:QOS:%d TOPIC:%s PAYLOAD:%s\r\n", qos, topic, payload); in DemoMsgRcvCallBack() 41 tmp = strstr(topic, CN_COMMAND_INDEX); in DemoMsgRcvCallBack()
|
/vendor/hisilicon/hispark_pegasus/demo/oc_demo/ |
H A D | iot_main.c | 60 const char *topic; member 85 static int MsgRcvCallBack(unsigned char *context, char *topic, int topicLen, MQTTClient_message *message) in MsgRcvCallBack() argument 93 topicLength = strlen(topic); in MsgRcvCallBack() 103 (void)memcpy_s(buf, bufSize, topic, topicLength); in MsgRcvCallBack() 105 msg->topic = buf; in MsgRcvCallBack() 111 IOT_LOG_DEBUG("RCVMSG:QOS:%d TOPIC:%s PAYLOAD:%s\r\n", msg->qos, msg->topic, msg->payload); in MsgRcvCallBack() 119 MQTTClient_free(topic); in MsgRcvCallBack() 139 ret = MQTTClient_publishMessage(client, msg->topic, &pubmsg, &g_ioTAppCb.tocken); in IoTMsgProcess() 148 g_ioTAppCb.msgCallBack(msg->qos, msg->topic, msg->payload); in IoTMsgProcess() 213 IOT_LOG_ERROR("Subscribe the default topic faile in MqttProcess() 303 IotSendMsg(int qos, const char *topic, const char *payload) IotSendMsg() argument [all...] |
H A D | iot_main.h | 19 typedef void (*FnMsgCallBack)(int qos, const char *topic, const char *payload); 37 * @param topic: the iot mqtt topic 43 int IotSendMsg(int qos, const char *topic, const char *payload);
|
H A D | iot_profile.c | 154 // use this function to make a topic to publish 240 const char *topic; in IoTProfileCmdResp() local 247 topic = MakeTopic(CN_PROFILE_TOPICFMT_CMDRESP, deviceID, payload->requestID); in IoTProfileCmdResp() 248 if (topic == NULL) { in IoTProfileCmdResp() 252 if ((topic != NULL) && (msg != NULL)) { in IoTProfileCmdResp() 253 ret = IotSendMsg(0, topic, msg); in IoTProfileCmdResp() 256 hi_free(0, topic); in IoTProfileCmdResp() 292 char *topic; in IoTProfilePropertyReport() local 298 topic = MakeTopic(CN_PROFILE_TOPICFMT_PROPERTYREPORT, deviceID, NULL); in IoTProfilePropertyReport() 299 if (topic in IoTProfilePropertyReport() [all...] |
H A D | app_demo_iot.c | 129 static void DemoMsgRcvCallBack(int qos, const char *topic, char *payload) in DemoMsgRcvCallBack() argument 134 IOT_LOG_DEBUG("RCVMSG:QOS:%d TOPIC:%s PAYLOAD:%s\r\n", qos, topic, payload); in DemoMsgRcvCallBack() 137 tmp = strstr(topic, CN_COMMAND_INDEX); in DemoMsgRcvCallBack()
|