ME910 support

Dependents:   5_Dragonfly_Cayenne_Sprint_IKS01A1

Fork of Cayenne-MQTT-mbed-MTSAS by Peter Ferland

Committer:
pferland
Date:
Thu Sep 07 16:10:53 2017 +0000
Revision:
25:4bae4d3efe12
Parent:
20:996a5c660063
Replaced domain name with ip address

Who changed what in which revision?

UserRevisionLine numberNew contents of line
jburhenn 0:09ef59d2d0f7 1 /*
jburhenn 0:09ef59d2d0f7 2 The MIT License(MIT)
jburhenn 0:09ef59d2d0f7 3
jburhenn 0:09ef59d2d0f7 4 Cayenne MQTT Client Library
jburhenn 0:09ef59d2d0f7 5 Copyright (c) 2016 myDevices
jburhenn 0:09ef59d2d0f7 6
jburhenn 0:09ef59d2d0f7 7 Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
jburhenn 0:09ef59d2d0f7 8 documentation files(the "Software"), to deal in the Software without restriction, including without limitation
jburhenn 0:09ef59d2d0f7 9 the rights to use, copy, modify, merge, publish, distribute, sublicense, and / or sell copies of the Software,
jburhenn 0:09ef59d2d0f7 10 and to permit persons to whom the Software is furnished to do so, subject to the following conditions :
jburhenn 0:09ef59d2d0f7 11 The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
jburhenn 0:09ef59d2d0f7 12 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
jburhenn 0:09ef59d2d0f7 13 WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.IN NO EVENT SHALL THE AUTHORS OR
jburhenn 0:09ef59d2d0f7 14 COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
jburhenn 0:09ef59d2d0f7 15 ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
jburhenn 0:09ef59d2d0f7 16 */
jburhenn 0:09ef59d2d0f7 17
jburhenn 0:09ef59d2d0f7 18 #ifndef _CAYENNEDEFINES_h
jburhenn 0:09ef59d2d0f7 19 #define _CAYENNEDEFINES_h
jburhenn 0:09ef59d2d0f7 20
jburhenn 0:09ef59d2d0f7 21 #define CAYENNE_VERSION "v1"
pferland 25:4bae4d3efe12 22 //#define CAYENNE_DOMAIN "mqtt.mydevices.com"
pferland 25:4bae4d3efe12 23 #define CAYENNE_DOMAIN "52.205.152.120"
jburhenn 0:09ef59d2d0f7 24 #define CAYENNE_PORT 1883
jburhenn 0:09ef59d2d0f7 25 #define CAYENNE_TLS_PORT 8883
jburhenn 0:09ef59d2d0f7 26
jburhenn 0:09ef59d2d0f7 27 #ifndef CAYENNE_MAX_MESSAGE_SIZE
jburhenn 20:996a5c660063 28 #define CAYENNE_MAX_MESSAGE_SIZE 134 // Redefine this for different message size
jburhenn 0:09ef59d2d0f7 29 #endif
jburhenn 0:09ef59d2d0f7 30
jburhenn 0:09ef59d2d0f7 31 #ifndef CAYENNE_MAX_MESSAGE_HANDLERS
jburhenn 0:09ef59d2d0f7 32 #define CAYENNE_MAX_MESSAGE_HANDLERS 5 /* Redefine to change number of handlers */
jburhenn 0:09ef59d2d0f7 33 #endif
jburhenn 0:09ef59d2d0f7 34
jburhenn 0:09ef59d2d0f7 35 #ifndef CAYENNE_MAX_MESSAGE_VALUES
jburhenn 0:09ef59d2d0f7 36 #define CAYENNE_MAX_MESSAGE_VALUES 4 /* Redefine to change max number of values in a message, must be at least 1 */
jburhenn 0:09ef59d2d0f7 37 #endif
jburhenn 0:09ef59d2d0f7 38
jburhenn 0:09ef59d2d0f7 39 //Comment this out to prevent digital and analog specific code from being compiled. If you only need to send
jburhenn 0:09ef59d2d0f7 40 //and receive standard channel data you can comment this out to decrease the program size.
jburhenn 8:aec9cfdd4c8e 41 //#define DIGITAL_AND_ANALOG_SUPPORT
jburhenn 0:09ef59d2d0f7 42
jburhenn 0:09ef59d2d0f7 43 //Comment this out if you don't need to subscribe to data or system info payloads.
jburhenn 0:09ef59d2d0f7 44 //#define PARSE_INFO_PAYLOADS
jburhenn 0:09ef59d2d0f7 45
jburhenn 0:09ef59d2d0f7 46 //Some defines for AVR microcontrollers to allow easier usage of memory in program space.
jburhenn 8:aec9cfdd4c8e 47 #if defined(__AVR__) || defined(ARDUINO_ARCH_SAM)
jburhenn 0:09ef59d2d0f7 48 #include <avr/pgmspace.h>
jburhenn 0:09ef59d2d0f7 49 #define CAYENNE_USING_PROGMEM
jburhenn 0:09ef59d2d0f7 50 #define CAYENNE_PROGMEM PROGMEM
jburhenn 0:09ef59d2d0f7 51 #define CAYENNE_PSTR(s) PSTR(s)
jburhenn 0:09ef59d2d0f7 52 #define CAYENNE_STRLEN(s) strlen_P(s)
jburhenn 0:09ef59d2d0f7 53 #define CAYENNE_STRCAT(s1, s2) strcat_P(s1, s2)
jburhenn 0:09ef59d2d0f7 54 #define CAYENNE_STRNCMP(s1, s2, n) strncmp_P(s1, s2, n)
jburhenn 0:09ef59d2d0f7 55 #define CAYENNE_MEMCPY(s1, s2, n) memcpy_P(s1, s2, n)
jburhenn 0:09ef59d2d0f7 56 #define CAYENNE_READ_BYTE(b) pgm_read_byte(b);
jburhenn 0:09ef59d2d0f7 57 #else
jburhenn 0:09ef59d2d0f7 58 #define CAYENNE_PROGMEM
jburhenn 0:09ef59d2d0f7 59 #define CAYENNE_PSTR(s) s
jburhenn 0:09ef59d2d0f7 60 #define CAYENNE_STRLEN(s) strlen(s)
jburhenn 0:09ef59d2d0f7 61 #define CAYENNE_STRCAT(s1, s2) strcat(s1, s2)
jburhenn 0:09ef59d2d0f7 62 #define CAYENNE_STRNCMP(s1, s2, n) strncmp(s1, s2, n)
jburhenn 0:09ef59d2d0f7 63 #define CAYENNE_MEMCPY(s1, s2, n) memcpy(s1, s2, n)
jburhenn 0:09ef59d2d0f7 64 #define CAYENNE_READ_BYTE(b) *b;
jburhenn 0:09ef59d2d0f7 65 #endif
jburhenn 0:09ef59d2d0f7 66
jburhenn 0:09ef59d2d0f7 67 #include "CayenneTypes.h"
jburhenn 0:09ef59d2d0f7 68 #include "CayenneTopics.h"
jburhenn 0:09ef59d2d0f7 69
jburhenn 0:09ef59d2d0f7 70 #endif