2021-07-18 17:26:17 +00:00
|
|
|
#ifndef USER_MQTT_IMPL_H
|
|
|
|
#define USER_MQTT_IMPL_H
|
|
|
|
|
|
|
|
#include <stdint.h>
|
|
|
|
#include <mosquitto.h>
|
|
|
|
|
|
|
|
#include "mqtt_influx.h"
|
|
|
|
|
|
|
|
typedef struct {
|
2021-07-26 17:14:56 +00:00
|
|
|
struct mosquitto *mosq;
|
2021-07-28 16:11:32 +00:00
|
|
|
char topic[32];
|
2021-07-18 17:26:17 +00:00
|
|
|
} user_mqtt_impl_t;
|
|
|
|
|
2021-07-25 18:11:36 +00:00
|
|
|
int user_mqtt_impl_init(user_mqtt_impl_t *handle);
|
|
|
|
int user_mqtt_impl_deinit(user_mqtt_impl_t *handle);
|
2021-07-18 17:26:17 +00:00
|
|
|
mqtt_influx_ret_t user_mqtt_get_nsec_timestamp_cb(user_mqtt_impl_t *handle, char *timestamp_string);
|
|
|
|
mqtt_influx_ret_t user_mqtt_publish_message_cb(user_mqtt_impl_t *handle, char *data);
|
|
|
|
|
|
|
|
#endif
|