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

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers CayenneTypes.h Source File

CayenneTypes.h

00001 /*
00002 The MIT License(MIT)
00003 
00004 Cayenne MQTT Client Library
00005 Copyright (c) 2016 myDevices
00006 
00007 Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
00008 documentation files(the "Software"), to deal in the Software without restriction, including without limitation
00009 the rights to use, copy, modify, merge, publish, distribute, sublicense, and / or sell copies of the Software,
00010 and to permit persons to whom the Software is furnished to do so, subject to the following conditions :
00011 The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
00012 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
00013 WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.IN NO EVENT SHALL THE AUTHORS OR
00014 COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
00015 ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
00016 */
00017 
00018 #ifndef _CAYENNETYPES_h
00019 #define _CAYENNETYPES_h
00020 
00021 // Data types
00022 #define TYPE_ACCELERATION "accel" // Acceleration
00023 #define TYPE_BAROMETRIC_PRESSURE "bp" // Barometric pressure
00024 #define TYPE_BATTERY "batt" // Battery
00025 #define TYPE_GPS "gps" // GPS data
00026 #define TYPE_LUMINOSITY "lum" // Luminosity
00027 #define TYPE_PROXIMITY "prox" // Proximity
00028 #define TYPE_RELATIVE_HUMIDITY "rel_hum" // Relative Humidity
00029 #define TYPE_TEMPERATURE "temp" // Temperature
00030 #define TYPE_VOLTAGE "voltage" // Voltage
00031 
00032 #define MAX_TYPE_LENGTH 7
00033 
00034 // Unit types
00035 #define UNIT_UNDEFINED "null"
00036 #define UNIT_PASCAL "pa" // Pascal
00037 #define UNIT_HECTOPASCAL "hpa" // Hectopascal
00038 #define UNIT_PERCENT "p" // % (0 to 100)
00039 #define UNIT_RATIO "r" // Ratio
00040 #define UNIT_VOLTS "v" // Volts
00041 #define UNIT_LUX "lux" // Lux
00042 #define UNIT_CENTIMETER "cm" // Centimeter
00043 #define UNIT_METER "m" // Meter
00044 #define UNIT_DIGITAL "d" // Digital (0/1)
00045 #define UNIT_FAHRENHEIT "f" // Fahrenheit
00046 #define UNIT_CELSIUS "c" // Celsius
00047 #define UNIT_KELVIN "k" // Kelvin
00048 #define UNIT_MILLIVOLTS "mv" // Millivolts
00049 #define UNIT_GRAVITY "g" // Standard gravity
00050 #define MAX_UNIT_LENGTH 4
00051 
00052 #endif