Functions | Variables
paho_c_pub.c File Reference
#include "MQTTAsync.h"
#include "pubsub_opts.h"
#include <stdio.h>
#include <signal.h>
#include <string.h>
#include <stdlib.h>
#include <unistd.h>
#include <sys/time.h>
Include dependency graph for paho_c_pub.c:

Go to the source code of this file.

Functions

void cfinish (int sig)
 
int main (int argc, char **argv)
 
int messageArrived (void *context, char *topicName, int topicLen, MQTTAsync_message *m)
 
void myconnect (MQTTAsync client)
 
int mypublish (MQTTAsync client, int datalen, char *data)
 
void mysleep (int ms)
 
void onConnect (void *context, MQTTAsync_successData *response)
 
void onConnect5 (void *context, MQTTAsync_successData5 *response)
 
void onConnectFailure (void *context, MQTTAsync_failureData *response)
 
void onConnectFailure5 (void *context, MQTTAsync_failureData5 *response)
 
void onDisconnect (void *context, MQTTAsync_successData *response)
 
void onDisconnect5 (void *context, MQTTAsync_successData5 *response)
 
static unsigned int onPSKAuth (const char *hint, char *identity, unsigned int max_identity_len, unsigned char *psk, unsigned int max_psk_len, void *context)
 
void onPublish (void *context, MQTTAsync_successData *response)
 
void onPublish5 (void *context, MQTTAsync_successData5 *response)
 
void onPublishFailure (void *context, MQTTAsync_failureData *response)
 
void onPublishFailure5 (void *context, MQTTAsync_failureData5 *response)
 
static int onSSLError (const char *str, size_t len, void *context)
 
void trace_callback (enum MQTTASYNC_TRACE_LEVELS level, char *message)
 

Variables

static int connected = 0
 
static int disconnected = 0
 
struct pubsub_opts opts
 
MQTTProperty property
 
MQTTProperties props = MQTTProperties_initializer
 
MQTTAsync_responseOptions pub_opts = MQTTAsync_responseOptions_initializer
 
static int published = 0
 
volatile int toStop = 0
 

Function Documentation

void cfinish ( int  sig)

Definition at line 66 of file paho_c_pub.c.

int main ( int  argc,
char **  argv 
)

Definition at line 363 of file paho_c_pub.c.

int messageArrived ( void *  context,
char *  topicName,
int  topicLen,
MQTTAsync_message m 
)

Definition at line 73 of file paho_c_pub.c.

void myconnect ( MQTTAsync  client)

Definition at line 274 of file paho_c_pub.c.

int mypublish ( MQTTAsync  client,
int  datalen,
char *  data 
)

Definition at line 342 of file paho_c_pub.c.

void mysleep ( int  ms)

Definition at line 57 of file paho_c_pub.c.

void onConnect ( void *  context,
MQTTAsync_successData response 
)

Definition at line 145 of file paho_c_pub.c.

void onConnect5 ( void *  context,
MQTTAsync_successData5 response 
)

Definition at line 116 of file paho_c_pub.c.

void onConnectFailure ( void *  context,
MQTTAsync_failureData response 
)

Definition at line 107 of file paho_c_pub.c.

void onConnectFailure5 ( void *  context,
MQTTAsync_failureData5 response 
)

Definition at line 97 of file paho_c_pub.c.

void onDisconnect ( void *  context,
MQTTAsync_successData response 
)

Definition at line 87 of file paho_c_pub.c.

void onDisconnect5 ( void *  context,
MQTTAsync_successData5 response 
)

Definition at line 82 of file paho_c_pub.c.

static unsigned int onPSKAuth ( const char *  hint,
char *  identity,
unsigned int  max_identity_len,
unsigned char *  psk,
unsigned int  max_psk_len,
void *  context 
)
static

Definition at line 225 of file paho_c_pub.c.

void onPublish ( void *  context,
MQTTAsync_successData response 
)

Definition at line 207 of file paho_c_pub.c.

void onPublish5 ( void *  context,
MQTTAsync_successData5 response 
)

Definition at line 194 of file paho_c_pub.c.

void onPublishFailure ( void *  context,
MQTTAsync_failureData response 
)

Definition at line 186 of file paho_c_pub.c.

void onPublishFailure5 ( void *  context,
MQTTAsync_failureData5 response 
)

Definition at line 177 of file paho_c_pub.c.

static int onSSLError ( const char *  str,
size_t  len,
void *  context 
)
static

Definition at line 219 of file paho_c_pub.c.

void trace_callback ( enum MQTTASYNC_TRACE_LEVELS  level,
char *  message 
)

Definition at line 357 of file paho_c_pub.c.

Variable Documentation

int connected = 0
static

Definition at line 93 of file paho_c_pub.c.

int disconnected = 0
static

Definition at line 80 of file paho_c_pub.c.

struct pubsub_opts opts
Initial value:
=
{
1, 0, 0, 0, "\n", 100,
NULL, NULL, 1, 0, 0,
MQTTVERSION_DEFAULT, NULL, "paho-c-pub", 0, 0, NULL, NULL, "localhost", "1883", NULL, 10,
NULL, NULL, 0, 0,
0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
0, {NULL, NULL},
}
#define MQTTVERSION_DEFAULT
Definition: MQTTAsync.h:195

Definition at line 42 of file paho_c_pub.c.

MQTTProperty property

Definition at line 53 of file paho_c_pub.c.

Definition at line 54 of file paho_c_pub.c.

Definition at line 52 of file paho_c_pub.c.

int published = 0
static

Definition at line 175 of file paho_c_pub.c.

volatile int toStop = 0

Definition at line 40 of file paho_c_pub.c.



plotjuggler
Author(s): Davide Faconti
autogenerated on Sun Dec 6 2020 04:02:49