/************************************************************************************** * Copyright (c) 2016, Tomoaki Yamaguchi * * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * and Eclipse Distribution License v1.0 which accompany this distribution. * * The Eclipse Public License is available at * http://www.eclipse.org/legal/epl-v10.html * and the Eclipse Distribution License is available at * http://www.eclipse.org/org/documents/edl-v10.php. * * Contributors: * Tomoaki Yamaguchi - initial API and implementation and/or initial documentation **************************************************************************************/ #ifndef MQTTSNGWDEFINES_H_ #define MQTTSNGWDEFINES_H_ namespace MQTTSNGW { /*================================= * Log controls ==================================*/ //#define DEBUG // print out log for debug //#define RINGBUFFER // print out Packets log into shared memory //#define DEBUG_NWSTACK // print out SensorNetwork log /*================================= * MQTT-SN Parametrs ==================================*/ #define MAX_CLIENTS (100) // Number of Clients can be handled. #define MAX_CLIENTID_LENGTH (64) // Max length of clientID #define MAX_INFLIGHTMESSAGES (10) // Number of inflight messages #define MQTTSNGW_MAX_PACKET_SIZE (1024) // Max Packet size (5+2+TopicLen+PayloadLen) #define SIZE_OF_LOG_PACKET (500) // Length of the packet log in bytes /*================================= * Data Type ==================================*/ typedef unsigned char uint8_t; typedef unsigned short uint16_t; typedef unsigned int uint32_t; /*================================= * Macros ==================================*/ #ifdef DEBUG #define DEBUGLOG(...) printf(__VA_ARGS__) #undef RINGBUFFER #else #define DEBUGLOG(...) #endif } #endif /* MQTTSNGWDEFINES_H_ */