|
L14-Click 1.0
STM32WLE5CC LoRaWAN Sensor Platform
|
Implements the Cayenne Low Power Protocol. More...
#include <stdint.h>Go to the source code of this file.
Functions | |
| void | CayenneLppInit (void) |
| void | CayenneLppReset (void) |
| uint8_t | CayenneLppGetSize (void) |
| uint8_t * | CayenneLppGetBuffer (void) |
| uint8_t | CayenneLppCopy (uint8_t *buffer) |
| uint8_t | CayenneLppAddDigitalInput (uint8_t channel, uint8_t value) |
| uint8_t | CayenneLppAddDigitalOutput (uint8_t channel, uint8_t value) |
| uint8_t | CayenneLppAddAnalogInput (uint8_t channel, float value) |
| uint8_t | CayenneLppAddAnalogOutput (uint8_t channel, float value) |
| uint8_t | CayenneLppAddLuminosity (uint8_t channel, uint16_t lux) |
| uint8_t | CayenneLppAddPresence (uint8_t channel, uint8_t value) |
| uint8_t | CayenneLppAddTemperature (uint8_t channel, float celsius) |
| uint8_t | CayenneLppAddRelativeHumidity (uint8_t channel, float rh) |
| uint8_t | CayenneLppAddAccelerometer (uint8_t channel, float x, float y, float z) |
| uint8_t | CayenneLppAddBarometricPressure (uint8_t channel, float hpa) |
| uint8_t | CayenneLppAddGyrometer (uint8_t channel, float x, float y, float z) |
| uint8_t | CayenneLppAddGps (uint8_t channel, float latitude, float longitude, float meters) |
| uint8_t | CayenneLppMaxBuffer () |
| uint8_t | CayenneLppAddConcentration (uint8_t channel, uint16_t ppm) |
| Add CO2 concentration data to the buffer. | |
| uint8_t | CayenneLppAddVoltage (uint8_t channel, float voltage) |
| Add voltage data to the buffer. | |
| uint8_t | CayenneLppAddParticulateMatter_1_0 (uint8_t channel, float concentration_1_0) |
| Add particulate matter of 1mm concentration data to the buffer. | |
| uint8_t | CayenneLppAddParticulateMatter_2_5 (uint8_t channel, float concentration_2_5) |
| Add particulate matter 2.5mm concentration data to the buffer. | |
| uint8_t | CayenneLppAddBatteryVoltage (uint8_t channel, float voltage) |
| Add battery voltage data to the buffer. | |
| uint8_t | CayenneLppAddTimeFromJoin (uint8_t channel, uint32_t timeOffset) |
| Add time offset from LoRa join to the buffer. | |
| uint8_t | CayenneLppAddMeasureInterval (uint8_t channel, uint16_t min10) |
| Add the measure interval in minutes *10 of data measuring. | |
Implements the Cayenne Low Power Protocol.
Definition in file CayenneLpp.h.
| uint8_t CayenneLppAddAccelerometer | ( | uint8_t | channel, |
| float | x, | ||
| float | y, | ||
| float | z ) |
Definition at line 299 of file CayenneLpp.c.
References CAYENNE_LPP_MAXBUFFER_SIZE, CayenneLppBuffer, CayenneLppCursor, LPP_ACCELEROMETER, and LPP_ACCELEROMETER_SIZE.
| uint8_t CayenneLppAddAnalogInput | ( | uint8_t | channel, |
| float | value ) |
Definition at line 183 of file CayenneLpp.c.
References CAYENNE_LPP_MAXBUFFER_SIZE, CayenneLppBuffer, CayenneLppCursor, LPP_ANALOG_INPUT, and LPP_ANALOG_INPUT_SIZE.
| uint8_t CayenneLppAddAnalogOutput | ( | uint8_t | channel, |
| float | value ) |
Definition at line 204 of file CayenneLpp.c.
References CAYENNE_LPP_MAXBUFFER_SIZE, CayenneLppBuffer, CayenneLppCursor, LPP_ANALOG_OUTPUT, and LPP_ANALOG_OUTPUT_SIZE.
| uint8_t CayenneLppAddBarometricPressure | ( | uint8_t | channel, |
| float | hpa ) |
Definition at line 326 of file CayenneLpp.c.
References CAYENNE_LPP_MAXBUFFER_SIZE, CayenneLppBuffer, CayenneLppCursor, LPP_BAROMETRIC_PRESSURE, and LPP_BAROMETRIC_PRESSURE_SIZE.
Referenced by sensors_CayennelFromBckData().
| uint8_t CayenneLppAddBatteryVoltage | ( | uint8_t | channel, |
| float | voltage ) |
Add battery voltage data to the buffer.
| channel | Data channel (30 for main battery, 31 for PA15) |
| voltage | Battery voltage in volts |
Definition at line 498 of file CayenneLpp.c.
References CayenneLppAddVoltage().
| uint8_t CayenneLppAddConcentration | ( | uint8_t | channel, |
| uint16_t | ppm ) |
Add CO2 concentration data to the buffer.
| channel | Data channel |
| ppm | CO2 concentration in parts per million (ppm) |
Definition at line 418 of file CayenneLpp.c.
References CAYENNE_LPP_MAXBUFFER_SIZE, CayenneLppBuffer, CayenneLppCursor, LPP_CONCENTRATION, and LPP_CONCENTRATION_SIZE.
Referenced by sensors_CayennelFromBckData().
| uint8_t CayenneLppAddDigitalInput | ( | uint8_t | channel, |
| uint8_t | value ) |
Definition at line 147 of file CayenneLpp.c.
References CAYENNE_LPP_MAXBUFFER_SIZE, CayenneLppBuffer, CayenneLppCursor, LPP_DIGITAL_INPUT, and LPP_DIGITAL_INPUT_SIZE.
| uint8_t CayenneLppAddDigitalOutput | ( | uint8_t | channel, |
| uint8_t | value ) |
Definition at line 165 of file CayenneLpp.c.
References CAYENNE_LPP_MAXBUFFER_SIZE, CayenneLppBuffer, CayenneLppCursor, LPP_DIGITAL_OUTPUT, and LPP_DIGITAL_OUTPUT_SIZE.
| uint8_t CayenneLppAddGps | ( | uint8_t | channel, |
| float | latitude, | ||
| float | longitude, | ||
| float | meters ) |
Definition at line 374 of file CayenneLpp.c.
References CAYENNE_LPP_MAXBUFFER_SIZE, CayenneLppBuffer, CayenneLppCursor, LPP_GPS, and LPP_GPS_SIZE.
| uint8_t CayenneLppAddGyrometer | ( | uint8_t | channel, |
| float | x, | ||
| float | y, | ||
| float | z ) |
Definition at line 347 of file CayenneLpp.c.
References CAYENNE_LPP_MAXBUFFER_SIZE, CayenneLppBuffer, CayenneLppCursor, LPP_GYROMETER, and LPP_GYROMETER_SIZE.
| uint8_t CayenneLppAddLuminosity | ( | uint8_t | channel, |
| uint16_t | lux ) |
Definition at line 224 of file CayenneLpp.c.
References CAYENNE_LPP_MAXBUFFER_SIZE, CayenneLppBuffer, CayenneLppCursor, LPP_LUMINOSITY, and LPP_LUMINOSITY_SIZE.
Referenced by sensors_CayennelFromBckData().
| uint8_t CayenneLppAddMeasureInterval | ( | uint8_t | channel, |
| uint16_t | min10 ) |
Add the measure interval in minutes *10 of data measuring.
| channel | Data channel |
| min10 | - minutes in *10 |
Definition at line 526 of file CayenneLpp.c.
References CAYENNE_LPP_MAXBUFFER_SIZE, CayenneLppBuffer, CayenneLppCursor, LPP_MEAUREINTERVAL_MIN, and LPP_MEAUREINTERVAL_MIN_SIZE.
Referenced by sensors_CayennelFromBckData().
| uint8_t CayenneLppAddParticulateMatter_1_0 | ( | uint8_t | channel, |
| float | concentration_1_0 ) |
Add particulate matter of 1mm concentration data to the buffer.
| channel | Data channel |
| concentration_1_0 | Particle concentration of 1mm in μg/m³ |
Definition at line 457 of file CayenneLpp.c.
References CAYENNE_LPP_MAXBUFFER_SIZE, CayenneLppBuffer, CayenneLppCursor, LPP_PARTICULATE_MATTER_1_0, and LPP_PARTICULATE_MATTER_SIZE.
Referenced by sensors_CayennelFromBckData().
| uint8_t CayenneLppAddParticulateMatter_2_5 | ( | uint8_t | channel, |
| float | concentration_2_5 ) |
Add particulate matter 2.5mm concentration data to the buffer.
| channel | Data channel |
| concentration_2_5 | Particle concentration of 2.5mm in μg/m³ |
Definition at line 477 of file CayenneLpp.c.
References CAYENNE_LPP_MAXBUFFER_SIZE, CayenneLppBuffer, CayenneLppCursor, LPP_PARTICULATE_MATTER_2_5, and LPP_PARTICULATE_MATTER_SIZE.
Referenced by sensors_CayennelFromBckData().
| uint8_t CayenneLppAddPresence | ( | uint8_t | channel, |
| uint8_t | value ) |
Definition at line 243 of file CayenneLpp.c.
References CAYENNE_LPP_MAXBUFFER_SIZE, CayenneLppBuffer, CayenneLppCursor, LPP_PRESENCE, and LPP_PRESENCE_SIZE.
| uint8_t CayenneLppAddRelativeHumidity | ( | uint8_t | channel, |
| float | rh ) |
Definition at line 281 of file CayenneLpp.c.
References CAYENNE_LPP_MAXBUFFER_SIZE, CayenneLppBuffer, CayenneLppCursor, LPP_RELATIVE_HUMIDITY, and LPP_RELATIVE_HUMIDITY_SIZE.
Referenced by sensors_CayennelFromBckData().
| uint8_t CayenneLppAddTemperature | ( | uint8_t | channel, |
| float | celsius ) |
Definition at line 261 of file CayenneLpp.c.
References CAYENNE_LPP_MAXBUFFER_SIZE, CayenneLppBuffer, CayenneLppCursor, LPP_TEMPERATURE, and LPP_TEMPERATURE_SIZE.
Referenced by sensors_CayennelFromBckData().
| uint8_t CayenneLppAddTimeFromJoin | ( | uint8_t | channel, |
| uint32_t | timeOffset ) |
Add time offset from LoRa join to the buffer.
| channel | Data channel |
| timeOffset | Time value in seconds (uint32_t). Can represent either:
|
Definition at line 511 of file CayenneLpp.c.
References CAYENNE_LPP_MAXBUFFER_SIZE, CayenneLppBuffer, CayenneLppCursor, LPP_UNIX_TIME, and LPP_UNIX_TIME_SIZE.
| uint8_t CayenneLppAddVoltage | ( | uint8_t | channel, |
| float | voltage ) |
Add voltage data to the buffer.
| channel | Data channel |
| voltage | Voltage in volts |
Definition at line 437 of file CayenneLpp.c.
References CAYENNE_LPP_MAXBUFFER_SIZE, CayenneLppBuffer, CayenneLppCursor, LPP_VOLTAGE, and LPP_VOLTAGE_SIZE.
Referenced by CayenneLppAddBatteryVoltage(), and sensors_CayennelFromBckData().
| uint8_t CayenneLppCopy | ( | uint8_t * | buffer | ) |
Definition at line 135 of file CayenneLpp.c.
References CayenneLppBuffer, and CayenneLppCursor.
| uint8_t * CayenneLppGetBuffer | ( | void | ) |
Definition at line 127 of file CayenneLpp.c.
References CayenneLppBuffer.
Referenced by sensors_CayennelFromBckData().
| uint8_t CayenneLppGetSize | ( | void | ) |
Definition at line 119 of file CayenneLpp.c.
References CayenneLppCursor.
Referenced by sensors_CayennelFromBckData().
| void CayenneLppInit | ( | void | ) |
Definition at line 103 of file CayenneLpp.c.
References CayenneLppCursor.
| uint8_t CayenneLppMaxBuffer | ( | ) |
| the | max number in bytes for CayenneLpp buffer |
Definition at line 407 of file CayenneLpp.c.
References CAYENNE_LPP_MAXBUFFER_SIZE.
Referenced by myLoraWan_LastDataSend().
| void CayenneLppReset | ( | void | ) |
Definition at line 111 of file CayenneLpp.c.
References CayenneLppCursor.
Referenced by sensors_CayennelFromBckData().