MQTT C Client Libraries Internals
Macros | Functions | Variables
Messages.c File Reference

Trace messages. More...

#include "Messages.h"
#include "Log.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "Heap.h"
Include dependency graph for Messages.c:

Macros

#define ARRAY_SIZE(a)   (sizeof(a) / sizeof(a[0]))
 
#define max_msg_len   120
 

Functions

const char * Messages_get (int index, enum LOG_LEVELS log_level)
 Get a log message by its index. More...
 

Variables

static const char * protocol_message_list []
 
static const char * trace_message_list []
 

Detailed Description

Trace messages.

Function Documentation

◆ Messages_get()

const char* Messages_get ( int  index,
enum LOG_LEVELS  log_level 
)

Get a log message by its index.

Parameters
indexthe integer index
log_levelthe log level, used to determine which message list to use
Returns
the message format string

Variable Documentation

◆ trace_message_list

const char* trace_message_list[]
static
Initial value:
=
{
"Failed to remove client from bstate->clients",
"Removed client %s from bstate->clients, socket %d",
"Packet_Factory: unhandled packet type %d",
"Packet %s received from client %s for message identifier %d, but no record of that message identifier found",
"Packet %s received from client %s for message identifier %d, but message is wrong QoS, %d",
"Packet %s received from client %s for message identifier %d, but message is in wrong state",
"%s received from client %s for message id %d - removing publication",
"Trying %s again for client %s, socket %d, message identifier %d",
"",
"(%lu) %*s(%d)> %s:%d",
"(%lu) %*s(%d)< %s:%d",
"(%lu) %*s(%d)< %s:%d (%d)",
"Storing unsent QoS 0 message",
}