Example node for Yodiwo's Plegma API

Dependencies:   EthernetInterface FXOS8700Q HTTPClient HTTPD MQTTS SDFileSystem YodiwoPlegma mbed-rpc mbed-rtos mbed wolfSSL

mqtt_helpers.h

Committer:
mitsarionas
Date:
2015-09-28
Revision:
8:66d34592c1ad
Parent:
5:1ef168357347

File content as of revision 8:66d34592c1ad:

#ifndef __MQTT_HELPERS_H__
#define __MQTT_HELPERS_H__

#include "MQTTClient.h"
#include "MQTTSocket.h"

//#include "yodiwo_api.h"
#include <stdlib.h>

#define MAX_MSG_LEN 2500
#define MAX_TOPIC_LEN 150


int mqtt_init(char *hostname, int port, char *certfile, char *nodeKey, char *nodeSecret);
void on_mqtt_message(MQTT::MessageData &msg);

//typedef int (*portevent_handler_func)(Yodiwo_Plegma_PortEvent_t *event);

int publisher(char *msg, int msg_len, char *msg_type);

#endif /* __MQTT_HELPERS_H__ */