16#define CRTX_MQTT_EVT_CONNECT "mqtt.connect"
17#define CRTX_MQTT_EVT_DISCONNECT "mqtt.disconnect"
18#define CRTX_MQTT_EVT_MSG "mqtt.msg"
19#define CRTX_MQTT_EVT_LOG "mqtt.log"
21#define CRTX_MQTT_EVT_CONNECT_ID (1<<0)
22#define CRTX_MQTT_EVT_DISCONNECT_ID (1<<1)
23#define CRTX_MQTT_EVT_MSG_ID (1<<2)
24#define CRTX_MQTT_EVT_LOG_ID (1<<3)
29 struct mosquitto *mosq;
34 unsigned int keepalive;
36 char clientid_allocated;
39 void (*connect_cb)(
struct mosquitto *mosq,
void *obj,
int rc);
40 void (*disconnect_cb)(
struct mosquitto *mosq,
void *obj,
int rc);
41 void (*log_cb)(
struct mosquitto *,
void *userdata,
int level,
const char *msg);
42 void (*msg_cb)(
struct mosquitto *mosq,
void *obj,
const struct mosquitto_message *message);
47CRTX_DECLARE_CALLOC_FUNCTION(mqtt)
50void crtx_mqtt_finish();
The core definitions of libcortex.
base structure of a listener
Definition core.h:186