#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "MQTTAsync.h"
#include <unistd.h>
Go to the source code of this file.
Macros | |
#define | ADDRESS "tcp://mqtt.eclipse.org:1883" |
#define | CLIENTID "ExampleClientSub" |
#define | PAYLOAD "Hello World!" |
#define | QOS 1 |
#define | TIMEOUT 10000L |
#define | TOPIC "MQTT Examples" |
Functions | |
void | connlost (void *context, char *cause) |
int | main (int argc, char *argv[]) |
int | msgarrvd (void *context, char *topicName, int topicLen, MQTTAsync_message *message) |
void | onConnect (void *context, MQTTAsync_successData *response) |
void | onConnectFailure (void *context, MQTTAsync_failureData *response) |
void | onDisconnect (void *context, MQTTAsync_successData *response) |
void | onDisconnectFailure (void *context, MQTTAsync_failureData *response) |
void | onSubscribe (void *context, MQTTAsync_successData *response) |
void | onSubscribeFailure (void *context, MQTTAsync_failureData *response) |
Variables | |
int | disc_finished = 0 |
int | finished = 0 |
int | subscribed = 0 |
#define ADDRESS "tcp://mqtt.eclipse.org:1883" |
Definition at line 32 of file MQTTAsync_subscribe.c.
#define CLIENTID "ExampleClientSub" |
Definition at line 33 of file MQTTAsync_subscribe.c.
#define PAYLOAD "Hello World!" |
Definition at line 35 of file MQTTAsync_subscribe.c.
#define QOS 1 |
Definition at line 36 of file MQTTAsync_subscribe.c.
#define TIMEOUT 10000L |
Definition at line 37 of file MQTTAsync_subscribe.c.
#define TOPIC "MQTT Examples" |
Definition at line 34 of file MQTTAsync_subscribe.c.
void connlost | ( | void * | context, |
char * | cause | ||
) |
Definition at line 43 of file MQTTAsync_subscribe.c.
int main | ( | int | argc, |
char * | argv[] | ||
) |
Definition at line 127 of file MQTTAsync_subscribe.c.
int msgarrvd | ( | void * | context, |
char * | topicName, | ||
int | topicLen, | ||
MQTTAsync_message * | message | ||
) |
Definition at line 64 of file MQTTAsync_subscribe.c.
void onConnect | ( | void * | context, |
MQTTAsync_successData * | response | ||
) |
Definition at line 106 of file MQTTAsync_subscribe.c.
void onConnectFailure | ( | void * | context, |
MQTTAsync_failureData * | response | ||
) |
Definition at line 99 of file MQTTAsync_subscribe.c.
void onDisconnect | ( | void * | context, |
MQTTAsync_successData * | response | ||
) |
Definition at line 80 of file MQTTAsync_subscribe.c.
void onDisconnectFailure | ( | void * | context, |
MQTTAsync_failureData * | response | ||
) |
Definition at line 74 of file MQTTAsync_subscribe.c.
void onSubscribe | ( | void * | context, |
MQTTAsync_successData * | response | ||
) |
Definition at line 86 of file MQTTAsync_subscribe.c.
void onSubscribeFailure | ( | void * | context, |
MQTTAsync_failureData * | response | ||
) |
Definition at line 92 of file MQTTAsync_subscribe.c.
int disc_finished = 0 |
Definition at line 39 of file MQTTAsync_subscribe.c.
int finished = 0 |
Definition at line 41 of file MQTTAsync_subscribe.c.
int subscribed = 0 |
Definition at line 40 of file MQTTAsync_subscribe.c.