The Cayenne MQTT mbed Library provides functions to easily connect to the Cayenne IoT project builder.

Dependents:   Cayenne-ESP8266Interface Cayenne-WIZnet_Library Cayenne-WIZnetInterface Cayenne-X-NUCLEO-IDW01M1 ... more

Committer:
jburhenn
Date:
Wed Jan 25 11:10:39 2017 -0700
Branch:
feature/multivalue
Revision:
23:1a9aed5e77c9
Parent:
22:0dbabcc6e7b2
CayenneDataArray updates for multivalue support.

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 _CAYENNETYPES_h
jburhenn 0:09ef59d2d0f7 19 #define _CAYENNETYPES_h
jburhenn 0:09ef59d2d0f7 20
jburhenn 16:085bcf2e9a18 21 // Data types
jburhenn 22:0dbabcc6e7b2 22 #define TYPE_ACCELERATION "accel" // Acceleration
jburhenn 19:40c3421c72eb 23 #define TYPE_BAROMETRIC_PRESSURE "bp" // Barometric pressure
jburhenn 16:085bcf2e9a18 24 #define TYPE_BATTERY "batt" // Battery
jburhenn 22:0dbabcc6e7b2 25 #define TYPE_GPS "gps" // GPS data
jburhenn 16:085bcf2e9a18 26 #define TYPE_LUMINOSITY "lum" // Luminosity
jburhenn 16:085bcf2e9a18 27 #define TYPE_PROXIMITY "prox" // Proximity
jburhenn 18:ebec842bdda2 28 #define TYPE_RELATIVE_HUMIDITY "rel_hum" // Relative Humidity
jburhenn 16:085bcf2e9a18 29 #define TYPE_TEMPERATURE "temp" // Temperature
jburhenn 16:085bcf2e9a18 30 #define TYPE_VOLTAGE "voltage" // Voltage
jburhenn 0:09ef59d2d0f7 31
jburhenn 19:40c3421c72eb 32 #define MAX_TYPE_LENGTH 7
jburhenn 0:09ef59d2d0f7 33
jburhenn 19:40c3421c72eb 34 // Unit types
jburhenn 16:085bcf2e9a18 35 #define UNIT_UNDEFINED "null"
jburhenn 19:40c3421c72eb 36 #define UNIT_PASCAL "pa" // Pascal
jburhenn 19:40c3421c72eb 37 #define UNIT_HECTOPASCAL "hpa" // Hectopascal
jburhenn 16:085bcf2e9a18 38 #define UNIT_PERCENT "p" // % (0 to 100)
jburhenn 16:085bcf2e9a18 39 #define UNIT_RATIO "r" // Ratio
jburhenn 16:085bcf2e9a18 40 #define UNIT_VOLTS "v" // Volts
jburhenn 16:085bcf2e9a18 41 #define UNIT_LUX "lux" // Lux
jburhenn 16:085bcf2e9a18 42 #define UNIT_CENTIMETER "cm" // Centimeter
jburhenn 16:085bcf2e9a18 43 #define UNIT_METER "m" // Meter
jburhenn 19:40c3421c72eb 44 #define UNIT_DIGITAL "d" // Digital (0/1)
jburhenn 16:085bcf2e9a18 45 #define UNIT_FAHRENHEIT "f" // Fahrenheit
jburhenn 16:085bcf2e9a18 46 #define UNIT_CELSIUS "c" // Celsius
jburhenn 16:085bcf2e9a18 47 #define UNIT_KELVIN "k" // Kelvin
jburhenn 19:40c3421c72eb 48 #define UNIT_MILLIVOLTS "mv" // Millivolts
jburhenn 22:0dbabcc6e7b2 49 #define UNIT_GRAVITY "g" // Standard gravity
jburhenn 19:40c3421c72eb 50 #define MAX_UNIT_LENGTH 4
jburhenn 0:09ef59d2d0f7 51
jburhenn 16:085bcf2e9a18 52 #endif