Konstanty
This commit is contained in:
parent
3d7bb3d6ea
commit
de1d288bb3
51
ETCPLPP.h
51
ETCPLPP.h
@ -3,46 +3,43 @@
|
|||||||
// Copyright © 2017 The Things Network
|
// Copyright © 2017 The Things Network
|
||||||
// Use of this source code is governed by the MIT license that can be found in the LICENSE file.
|
// Use of this source code is governed by the MIT license that can be found in the LICENSE file.
|
||||||
|
|
||||||
#ifndef _CAYENNE_LPP_H_
|
#ifndef _EASYTHERM_LPP_H_
|
||||||
#define _CAYENNE_LPP_H_
|
#define _EASYTHERM_LPP_H_
|
||||||
|
|
||||||
#include <Arduino.h>
|
#include <Arduino.h>
|
||||||
|
|
||||||
//LPP_BATTERY = // TODO Unsupported in IPSO Smart Object
|
#define LPP_DIGITAL_INPUT 0x00 // input, 1 byte
|
||||||
//LPP_PROXIMITY = // TODO Unsupported in IPSO Smart Object
|
#define LPP_DIGITAL_OUTPUT 0x01 // output, 1 byte
|
||||||
|
#define LPP_ANALOG_INPUT 0x02 // input, 2 bytes, 0.01 signed
|
||||||
#define LPP_DIGITAL_INPUT 0 // 1 byte
|
#define LPP_ANALOG_OUTPUT 0x03 // output, 2 bytes, 0.01 signed
|
||||||
#define LPP_DIGITAL_OUTPUT 1 // 1 byte
|
#define LPP_TEMPERATURE 0x04 // input, 2 bytes, 0.1°C signed
|
||||||
#define LPP_ANALOG_INPUT 2 // 2 bytes, 0.01 signed
|
#define LPP_RELATIVE_HUMIDITY 0x05 // input, 1 byte, 0.5% unsigned
|
||||||
#define LPP_ANALOG_OUTPUT 3 // 2 bytes, 0.01 signed
|
#define LPP_ACCELERATION 0x06 // input, 2 bytes, 0.001G
|
||||||
#define LPP_LUMINOSITY 101 // 2 bytes, 1 lux unsigned
|
#define LPP_BAROMETRIC_PRESSURE 0x07// input, 2 bytes 0.1 hPa unsigned
|
||||||
#define LPP_PRESENCE 102 // 1 byte, 1
|
#define LPP_ANGLE_VELOCITY 0x08 // input, 2 bytes, 0.01 °/s
|
||||||
#define LPP_TEMPERATURE 103 // 2 bytes, 0.1°C signed
|
#define LPP_LUMINOSITY 0x09 // input, 2 bytes, 1 lux unsigned
|
||||||
#define LPP_RELATIVE_HUMIDITY 104 // 1 byte, 0.5% unsigned
|
#define LPP_BATTERY_VOLTAGE 0x0A // input, 2 bytes, 1mV unsigned
|
||||||
#define LPP_ACCELEROMETER 113 // 2 bytes per axis, 0.001G
|
#define LPP_BATTERY_STATUS 0x0B // input, 1 byte 1%, 255 == unknown
|
||||||
#define LPP_BAROMETRIC_PRESSURE 115 // 2 bytes 0.1 hPa Unsigned
|
|
||||||
#define LPP_GYROMETER 134 // 2 bytes per axis, 0.01 °/s
|
|
||||||
#define LPP_GPS 136 // 3 byte lon/lat 0.0001 °, 3 bytes alt 0.01 meter
|
|
||||||
|
|
||||||
// Data ID + Data Type + Data Size
|
// Data ID + Data Type + Data Size
|
||||||
#define LPP_DIGITAL_INPUT_SIZE 3 // 1 byte
|
#define LPP_DIGITAL_INPUT_SIZE 3 // 1 byte
|
||||||
#define LPP_DIGITAL_OUTPUT_SIZE 3 // 1 byte
|
#define LPP_DIGITAL_OUTPUT_SIZE 3 // 1 byte
|
||||||
#define LPP_ANALOG_INPUT_SIZE 4 // 2 bytes, 0.01 signed
|
#define LPP_ANALOG_INPUT_SIZE 4 // 2 bytes, 0.01 signed
|
||||||
#define LPP_ANALOG_OUTPUT_SIZE 4 // 2 bytes, 0.01 signed
|
#define LPP_ANALOG_OUTPUT_SIZE 4 // 2 bytes, 0.01 signed
|
||||||
|
#define LPP_TEMPERATURE_SIZE 4 // input, 2 bytes, 0.1°C signed
|
||||||
|
#define LPP_RELATIVE_HUMIDITY_SIZE 3 // input, 1 byte, 0.5% unsigned
|
||||||
|
#define LPP_ACCELERATION_SIZE 4 // input, 2 bytes, 0.001G
|
||||||
|
#define LPP_BAROMETRIC_PRESSURE 4 // input, 2 bytes 0.1 hPa unsigned
|
||||||
|
#define LPP_ANGLE_VELOCITY 4 // input, 2 bytes, 0.01 °/s
|
||||||
#define LPP_LUMINOSITY_SIZE 4 // 2 bytes, 1 lux unsigned
|
#define LPP_LUMINOSITY_SIZE 4 // 2 bytes, 1 lux unsigned
|
||||||
#define LPP_PRESENCE_SIZE 3 // 1 byte, 1
|
#define LPP_BATTERY_VOLTAGE_SIZE 4 // 2 bytes, 1mV unsigned
|
||||||
#define LPP_TEMPERATURE_SIZE 4 // 2 bytes, 0.1°C signed
|
#define LPP_BATTERY_STATUS_SIZE 3 // 1 byte 1%
|
||||||
#define LPP_RELATIVE_HUMIDITY_SIZE 3 // 1 byte, 0.5% unsigned
|
|
||||||
#define LPP_ACCELEROMETER_SIZE 8 // 2 bytes per axis, 0.001G
|
|
||||||
#define LPP_BAROMETRIC_PRESSURE_SIZE 4 // 2 bytes 0.1 hPa Unsigned
|
|
||||||
#define LPP_GYROMETER_SIZE 8 // 2 bytes per axis, 0.01 °/s
|
|
||||||
#define LPP_GPS_SIZE 11 // 3 byte lon/lat 0.0001 °, 3 bytes alt 0.01 meter
|
|
||||||
|
|
||||||
class CayenneLPP
|
class ETCPLPP
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
CayenneLPP(uint8_t size);
|
ETCPLPP(uint8_t size);
|
||||||
~CayenneLPP();
|
~ETCPLPP();
|
||||||
|
|
||||||
void reset(void);
|
void reset(void);
|
||||||
uint8_t getSize(void);
|
uint8_t getSize(void);
|
||||||
|
Loading…
Reference in New Issue
Block a user