diff options
Diffstat (limited to 'analysis/rtt/src/mqtt_client.h')
| -rw-r--r-- | analysis/rtt/src/mqtt_client.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/analysis/rtt/src/mqtt_client.h b/analysis/rtt/src/mqtt_client.h new file mode 100644 index 0000000..781e742 --- /dev/null +++ b/analysis/rtt/src/mqtt_client.h | |||
| @@ -0,0 +1,16 @@ | |||
| 1 | |||
| 2 | #ifndef MQTT_CLIENT_H | ||
| 3 | #define MQTT_CLIENT_H | ||
| 4 | |||
| 5 | #include <mosquitto.h> | ||
| 6 | |||
| 7 | typedef struct { | ||
| 8 | struct mosquitto *mosq; | ||
| 9 | } mqtt_client_t; | ||
| 10 | |||
| 11 | int mqtt_client_init(mqtt_client_t *client, const char *broker_address, | ||
| 12 | int port, const char *topic); | ||
| 13 | void mqtt_client_cleanup(mqtt_client_t *client); | ||
| 14 | void mqtt_client_loop(mqtt_client_t *client); | ||
| 15 | |||
| 16 | #endif // MQTT_CLIENT_H | ||
