#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <stdint.h>
#include <time.h>
#include "MQTTAsync.h"
#include <unistd.h>
Go to the source code of this file.
Macros | |
#define | ADDRESS "tcp://localhost:1883" |
#define | CLIENTID "ExampleClientTimePub" |
#define | QOS 1 |
#define | SAMPLE_PERIOD 10L |
#define | TIMEOUT 10000L |
#define | TOPIC "data/time" |
Functions | |
void | connlost (void *context, char *cause) |
int64_t | getTime (void) |
int | main (int argc, char *argv[]) |
int | messageArrived (void *context, char *topicName, int topicLen, MQTTAsync_message *m) |
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 | onSend (void *context, MQTTAsync_successData *response) |
void | onSendFailure (void *context, MQTTAsync_failureData *response) |
Variables | |
volatile int | connected = 0 |
volatile int | finished = 0 |
#define ADDRESS "tcp://localhost:1883" |
Definition at line 47 of file MQTTAsync_publish_time.c.
#define CLIENTID "ExampleClientTimePub" |
Definition at line 49 of file MQTTAsync_publish_time.c.
#define QOS 1 |
Definition at line 51 of file MQTTAsync_publish_time.c.
#define SAMPLE_PERIOD 10L |
Definition at line 53 of file MQTTAsync_publish_time.c.
#define TIMEOUT 10000L |
Definition at line 52 of file MQTTAsync_publish_time.c.
#define TOPIC "data/time" |
Definition at line 50 of file MQTTAsync_publish_time.c.
void connlost | ( | void * | context, |
char * | cause | ||
) |
Definition at line 58 of file MQTTAsync_publish_time.c.
int64_t getTime | ( | void | ) |
Definition at line 131 of file MQTTAsync_publish_time.c.
int main | ( | int | argc, |
char * | argv[] | ||
) |
Definition at line 144 of file MQTTAsync_publish_time.c.
int messageArrived | ( | void * | context, |
char * | topicName, | ||
int | topicLen, | ||
MQTTAsync_message * | m | ||
) |
Definition at line 125 of file MQTTAsync_publish_time.c.
void onConnect | ( | void * | context, |
MQTTAsync_successData * | response | ||
) |
Definition at line 119 of file MQTTAsync_publish_time.c.
void onConnectFailure | ( | void * | context, |
MQTTAsync_failureData * | response | ||
) |
Definition at line 112 of file MQTTAsync_publish_time.c.
void onDisconnect | ( | void * | context, |
MQTTAsync_successData * | response | ||
) |
Definition at line 83 of file MQTTAsync_publish_time.c.
void onDisconnectFailure | ( | void * | context, |
MQTTAsync_failureData * | response | ||
) |
Definition at line 77 of file MQTTAsync_publish_time.c.
void onSend | ( | void * | context, |
MQTTAsync_successData * | response | ||
) |
Definition at line 106 of file MQTTAsync_publish_time.c.
void onSendFailure | ( | void * | context, |
MQTTAsync_failureData * | response | ||
) |
Definition at line 89 of file MQTTAsync_publish_time.c.
volatile int connected = 0 |
Definition at line 56 of file MQTTAsync_publish_time.c.
volatile int finished = 0 |
Definition at line 55 of file MQTTAsync_publish_time.c.