MQTT Server: D:/my_data/GIT/network_apps/netapps/mqtt/server/server_core.h File Reference

MQTT Server Package

D:/my_data/GIT/network_apps/netapps/mqtt/server/server_core.h File Reference
#include "server_pkts.h"

Go to the source code of this file.

Classes

struct  mqtt_server_app_cbs
struct  mqtt_server_app_cfg

Functions

i32 mqtt_server_topic_enroll (const void *app_hnd, const struct utf8_string *topic, enum mqtt_qos qos)
i32 mqtt_server_topic_disenroll (const void *app_hnd, const struct utf8_string *topic)
i32 mqtt_server_app_pub_send (const struct utf8_string *topic, const u8 *data_buf, u32 data_len, enum mqtt_qos qos, bool retain)
void * mqtt_server_app_register (const struct mqtt_server_app_cbs *cbs, const i8 *name)
i32 mqtt_server_init (const struct mqtt_server_lib_cfg *lib_cfg, const struct mqtt_server_app_cfg *app_cfg)

Detailed Description

The MQTT server daemon, a task, provisions the high level abstractions for the smart applicaltions. This is an intelligent layer that utilizes the services of the MQTT Server Packet Library and is responsible for the functions of the topic management, the client management and support of multiple server applications.

The light-weight server enables the services of the MQTT protocol for an application to either extend and / or control the existing functions to suit the deployment specific scenario. These applications in practice are the plug-ins / add-ons to the core server functionalities. Specifically, these applications, among others capabilities, can be used for analyzing and approving the credentials of the remote clients, acting as a bridge between a MQTT external client and the server, and a snooper to learn about all the data transactions to / from the server.

The server is targeted to conform to MQTT 3.1.1 specification.

The services of the server are multi-task safe. Platform specific atomicity constructs are used, through abstractions, by the server to maintain data coherency and synchronization.

The server offers the following compile line configurable parameters (-D opt)

  • CFG_SR_MAX_MQP_TX_LEN: the constant buffer length allocated for a TX.

  • CFG_SR_MAX_SUBTOP_LEN: the maximum buffer size to hold a sub-topic. For e.g., in the topic /x/y/z, the phrase /x, /y and z are sub-topics.

  • CFG_SR_MAX_TOPIC_NODE: the maximum number of topic nodes in server. For e.g., in the topic /x/y/z, there are three nodes (/x, /y and z).

  • CFG_SR_MAX_CL_ID_SIZE: the maximum length of the client-id string.

  • CFG_SR_MAX_NUM_CLIENT: the maximum number of clients to be managed. Note this is different from the maximum number of 'contexts'. A large number of clients can be managed using fewer number of 'contexts' (connections).

Note:
Any future extensions & development must follow the following guidelines. A new API or an extension to the existing API a) must be rudimentary b) must not imply a rule or policy (including a state machine) b) must ensure simple design and implementation
Generated on Mon Nov 17 2014 12:12:08 for MQTT Server by  doxygen 1.7.4