EMS/kit/kit_mqtt_sub.h

21 lines
775 B
C
Raw Permalink Normal View History

2024-11-22 09:44:21 +08:00
#ifndef __KIT_MQTT_SUB_H_
#define __KIT_MQTT_SUB_H_
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "libpaho-mqtt/include/MQTTAsync.h"
2024-11-22 16:44:38 +08:00
#include "libcjson/include/cjson/cJSON.h"
2024-11-22 09:44:21 +08:00
void connlost(void *context, char *cause);
int msgarrvd(void *context, char *topicName, int topicLen, MQTTAsync_message *message);
void onDisconnectFailure(void* context, MQTTAsync_failureData* response);
void onDisconnect1(void* context, MQTTAsync_successData* response);
void onSubscribe(void* context, MQTTAsync_successData* response);
void onSubscribeFailure1(void* context, MQTTAsync_failureData* response);
void onConnectFailure1(void* context, MQTTAsync_failureData* response);
void onConnect1(void* context, MQTTAsync_successData* response);
int subClient();
# endif