thermferm/mqtt.h

Mon, 02 May 2016 16:15:37 +0200

author
Michiel Broek <mbroek@mbse.eu>
date
Mon, 02 May 2016 16:15:37 +0200
changeset 499
602d9968960f
child 504
862de87f9f89
permissions
-rw-r--r--

Created mqtt sourcefiles. Use flags to trigger publish messages. The main source does not know and does not care if MQTT messages will be sent. Version 0.5.5

#ifndef	_MQTT_H
#define	_MQTT_H

#ifdef HAVE_MOSQUITTO_H

#define STATUS_CONNECTING 0
#define STATUS_CONNACK_RECVD 1
#define STATUS_WAITING 2

#endif

/*
 * Public functions
 */
void mqtt_connect(void);
void mqtt_disconnect(void);
void mqtt_publish_int(char *, char *, int);
void mqtt_publish_float(char *, char *, float, int);
void mqtt_publish_str(char *, char *, char *);

#endif

mercurial