no-OS
Macros | Enumerations | Functions
iot_sample_common.h File Reference
#include <stdbool.h>
#include <stddef.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <azure/az_core.h>
Include dependency graph for iot_sample_common.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define IOT_SAMPLE_LOG_ERROR(...)
 
#define IOT_SAMPLE_LOG_SUCCESS(...)
 
#define IOT_SAMPLE_LOG(...)
 

Enumerations

enum  iot_sample_type {
  PAHO_IOT_HUB,
  PAHO_IOT_PROVISIONING
}
 

Functions

void iot_sample_create_mqtt_endpoint (iot_sample_type type, char *endpoint, size_t endpoint_size)
 

Macro Definition Documentation

◆ IOT_SAMPLE_LOG

#define IOT_SAMPLE_LOG (   ...)
Value:
do \
{ \
(void)printf("\t\t"); \
(void)printf(__VA_ARGS__); \
(void)printf("\n"); \
} while (0)

◆ IOT_SAMPLE_LOG_ERROR

#define IOT_SAMPLE_LOG_ERROR (   ...)
Value:
do \
{ \
(void)fprintf(stderr, "ERROR:\t\t%s:%s():%d: ", __FILE__, __func__, __LINE__); \
(void)fprintf(stderr, __VA_ARGS__); \
(void)fprintf(stderr, "\n"); \
fflush(stdout); \
fflush(stderr); \
} while (0)

◆ IOT_SAMPLE_LOG_SUCCESS

#define IOT_SAMPLE_LOG_SUCCESS (   ...)
Value:
do \
{ \
(void)printf("SUCCESS:\t"); \
(void)printf(__VA_ARGS__); \
(void)printf("\n"); \
} while (0)

Enumeration Type Documentation

◆ iot_sample_type

Enumerator
PAHO_IOT_HUB 
PAHO_IOT_PROVISIONING 

Function Documentation

◆ iot_sample_create_mqtt_endpoint()

void iot_sample_create_mqtt_endpoint ( iot_sample_type  type,
char *  endpoint,
size_t  endpoint_size 
)
Here is the caller graph for this function: