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:

Defines

#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.

Variables

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

Detailed Description

Trace messages.


Function Documentation

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

Get a log message by its index.

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

Variable Documentation

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", 
}
 All Data Structures Files Functions Variables Typedefs Defines

Generated on 2 Jun 2018 for MQTT C Client Libraries Internals by  doxygen 1.6.1