Rtos API example

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers mqtt_opts.h Source File

mqtt_opts.h

Go to the documentation of this file.
00001 /**
00002  * @file
00003  * MQTT client options
00004  */
00005 
00006 /*
00007  * Copyright (c) 2016 Erik Andersson
00008  * All rights reserved.
00009  *
00010  * Redistribution and use in source and binary forms, with or without modification,
00011  * are permitted provided that the following conditions are met:
00012  *
00013  * 1. Redistributions of source code must retain the above copyright notice,
00014  *    this list of conditions and the following disclaimer.
00015  * 2. Redistributions in binary form must reproduce the above copyright notice,
00016  *    this list of conditions and the following disclaimer in the documentation
00017  *    and/or other materials provided with the distribution.
00018  * 3. The name of the author may not be used to endorse or promote products
00019  *    derived from this software without specific prior written permission.
00020  *
00021  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
00022  * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
00023  * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
00024  * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
00025  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
00026  * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
00027  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
00028  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
00029  * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
00030  * OF SUCH DAMAGE.
00031  *
00032  * This file is part of the lwIP TCP/IP stack.
00033  *
00034  * Author: Erik Andersson
00035  *
00036  */
00037 #ifndef LWIP_HDR_APPS_MQTT_OPTS_H
00038 #define LWIP_HDR_APPS_MQTT_OPTS_H
00039 
00040 #include "lwip/opt.h"
00041 
00042 #ifdef  __cplusplus
00043 extern "C" {
00044 #endif
00045 
00046 /**
00047  * @defgroup mqtt_opts Options
00048  * @ingroup mqtt
00049  * @{
00050  */
00051 
00052 /**
00053  * Output ring-buffer size, must be able to fit largest outgoing publish message topic+payloads
00054  */
00055 #ifndef MQTT_OUTPUT_RINGBUF_SIZE
00056 #define MQTT_OUTPUT_RINGBUF_SIZE 256
00057 #endif
00058 
00059 /**
00060  * Number of bytes in receive buffer, must be at least the size of the longest incoming topic + 8
00061  * If one wants to avoid fragmented incoming publish, set length to max incoming topic length + max payload length + 8
00062  */
00063 #ifndef MQTT_VAR_HEADER_BUFFER_LEN
00064 #define MQTT_VAR_HEADER_BUFFER_LEN 128
00065 #endif
00066 
00067 /**
00068  * Maximum number of pending subscribe, unsubscribe and publish requests to server .
00069  */
00070 #ifndef MQTT_REQ_MAX_IN_FLIGHT
00071 #define MQTT_REQ_MAX_IN_FLIGHT 4
00072 #endif
00073 
00074 /**
00075  * Seconds between each cyclic timer call.
00076  */
00077 #ifndef MQTT_CYCLIC_TIMER_INTERVAL
00078 #define MQTT_CYCLIC_TIMER_INTERVAL 5
00079 #endif
00080 
00081 /**
00082  * Publish, subscribe and unsubscribe request timeout in seconds.
00083  */
00084 #ifndef MQTT_REQ_TIMEOUT
00085 #define MQTT_REQ_TIMEOUT 30
00086 #endif
00087 
00088 /**
00089  * Seconds for MQTT connect response timeout after sending connect request
00090  */
00091 #ifndef MQTT_CONNECT_TIMOUT
00092 #define MQTT_CONNECT_TIMOUT 100
00093 #endif
00094 
00095 /**
00096  * @}
00097  */
00098 
00099 #ifdef __cplusplus
00100 }
00101 #endif
00102 
00103 #endif /* LWIP_HDR_APPS_MQTT_OPTS_H */