|
BresserWeatherSensorLW
Bresser 868 MHz Weather Sensor Radio Receiver based on ESP32/RP2040 and SX1262/SX1276/LR1121 - sends data to a LoRaWAN Network
|
LoRaWAN node application layer. More...
#include <AppLayer.h>


Public Member Functions | |
| AppLayer (SystemContext *sysCtx) | |
| Constructor. | |
| void | begin (void) |
| AppLayer initialization. | |
| uint8_t | decodeDownlink (uint8_t port, uint8_t *payload, size_t size) |
| Decode app layer specific downlink messages. | |
| void | genPayload (uint8_t port, LoraEncoder &encoder) |
| Generate payload (by emulation). | |
| void | getPayloadStage1 (uint8_t &port, LoraEncoder &encoder) |
| Prepare / get payload at startup. | |
| void | getPayloadStage2 (uint8_t &port, LoraEncoder &encoder) |
| Get payload before uplink. | |
| void | getConfigPayload (uint8_t cmd, uint8_t &port, LoraEncoder &encoder) |
| Get configuration data for uplink. | |
| uint8_t | getAppStatusUplinkInterval (void) |
| Get sensor status message uplink interval. | |
| void | setAppPayloadCfg (uint8_t *bytes, uint8_t size) |
| bool | getAppPayloadCfg (uint8_t *bytes, uint8_t size) |
| Public Member Functions inherited from PayloadBresser | |
| PayloadBresser (SystemContext *sysCtx) | |
| Constructor. | |
| void | begin (void) |
| Bresser sensors startup code. | |
| void | scanBresser (uint8_t ws_scantime, LoraEncoder &encoder) |
| Scan for Bresser sensors. | |
| void | encodeBresser (uint8_t *appPayloadCfg, uint8_t *appStatus, LoraEncoder &encoder) |
| Encode Bresser sensor data for LoRaWAN transmission. | |
Additional Inherited Members | |
| Public Attributes inherited from PayloadBresser | |
| WeatherSensor | weatherSensor |
| Bresser Weather Sensor Receiver. | |
| uint8_t | ws_scantime = 0 |
| Weather Sensor Scan Request. | |
| uint8_t | ws_postproc_interval = 0 |
| Weather Sensor Post-Processing Update Rate (0: auto, 1..255: minutes). | |
| const uint8_t | payloadSize [16] |
| Payload size in bytes per sensor type. | |
| const char * | sensorTypes [16] |
| Map sensor type ID to name. | |
| RainGauge | rainGauge |
| Rain data statistics. | |
| Lightning | lightningProc |
| Lightning sensor post-processing. | |
LoRaWAN node application layer.
Contains all device specific methods and attributes
|
inline |
Constructor.
| sysCtx | System Context object |

| uint8_t AppLayer::decodeDownlink | ( | uint8_t | port, |
| uint8_t * | payload, | ||
| size_t | size ) |
Decode app layer specific downlink messages.
| port | downlink message port |
| payload | downlink message payload |
| size | payload size in bytes |

| void AppLayer::genPayload | ( | uint8_t | port, |
| LoraEncoder & | encoder ) |
Generate payload (by emulation).
| port | LoRaWAN port |
| encoder | uplink encoder object |
| bool AppLayer::getAppPayloadCfg | ( | uint8_t * | bytes, |
| uint8_t | size ) |
Get AppLayer payload config from Preferences
| bytes | buffer |
| size | buffer size in bytes |
|
inline |
Get sensor status message uplink interval.
| void AppLayer::getConfigPayload | ( | uint8_t | cmd, |
| uint8_t & | port, | ||
| LoraEncoder & | encoder ) |
Get configuration data for uplink.
Get the configuration data requested in a downlink command and prepare it as payload in an uplink response.
| cmd | command |
| port | uplink port |
| encoder | uplink data encoder object |

| void AppLayer::getPayloadStage1 | ( | uint8_t & | port, |
| LoraEncoder & | encoder ) |
Prepare / get payload at startup.
Use this if
| port | LoRaWAN port |
| encoder | uplink encoder object |

| void AppLayer::getPayloadStage2 | ( | uint8_t & | port, |
| LoraEncoder & | encoder ) |
Get payload before uplink.
Use this if
| port | LoRaWAN port |
| encoder | uplink encoder object |
| void AppLayer::setAppPayloadCfg | ( | uint8_t * | bytes, |
| uint8_t | size ) |
Set AppLayer payload config in Preferences
| bytes | buffer |
| size | buffer size in bytes |