LoRa-BLE-Sensor
|
A library to manage sensor applications. Working between power configurations, data configurations, and scheduling for sensor reading. As well as LoRaWAN initialization, scheduling, and data transmission. This library also handles the BLE services for the device, sensor, and LoRaWAN. More...
Go to the source code of this file.
Classes | |
struct | sensor_app_config_t |
Structure for the sensor app configuration. This is used to store the sensor configuration and state. More... | |
Macros | |
#define | SENSOR_VOLTAGE_NAME_LENGTH 20 |
#define | SENSOR_TYPE_NAME_LENGTH 20 |
Enumerations | |
enum | sensor_app_state { SENSOR_APP_STATE_CONFIGURATION , SENSOR_APP_STATE_RUNNING , SENSOR_APP_STATE_ERROR } |
Enum for the sensor app state. This is used to track the state of the sensor app. | |
enum | sensor_nvs_address { SENSOR_NVS_ADDRESS_DEVICE_NAME , SENSOR_NVS_ADDRESS_APP_STATE , SENSOR_NVS_ADDRESS_LORAWAN_ENABLED , SENSOR_NVS_ADDRESS_LORAWAN_FREQUENCY , SENSOR_NVS_ADDRESS_LORAWAN_DEV_EUI , SENSOR_NVS_ADDRESS_LORAWAN_JOIN_EUI , SENSOR_NVS_ADDRESS_LORAWAN_APP_KEY , SENSOR_NVS_ADDRESS_LORAWAN_DEV_NONCE , SENSOR_NVS_ADDRESS_LORAWAN_JOIN_ATTEMPTS , SENSOR_NVS_ADDRESS_LORAWAN_SEND_ATTEMPTS , SENSOR_NVS_ADDRESS_SENSOR_1_ENABLED , SENSOR_NVS_ADDRESS_SENSOR_1_POWER , SENSOR_NVS_ADDRESS_SENSOR_1_TYPE , SENSOR_NVS_ADDRESS_SENSOR_1_FREQUENCY , SENSOR_NVS_ADDRESS_SENSOR_2_ENABLED , SENSOR_NVS_ADDRESS_SENSOR_2_POWER , SENSOR_NVS_ADDRESS_SENSOR_2_TYPE , SENSOR_NVS_ADDRESS_SENSOR_2_FREQUENCY , SENSOR_NVS_ADDRESS_LIMIT } |
Enum for the NVS addresses for the sensor app. This is used to store the sensor app configuration in NVS. | |
Functions | |
int | sensor_app_init (sensor_app_config_t *config) |
Initialize the sensor app, handle anything that needs to be initialized for the app such as timers, nvs, etc. | |
int | sensor_app_configuration_state (void) |
Execute the sensor app configuration state. | |
int | sensor_app_running_state (void) |
Execute the sensor app running state. | |
int | sensor_app_error_state (void) |
Execute the sensor app error state. | |
int | sensor_app_ble_start (void) |
Start the BLE advertising and services. | |
A library to manage sensor applications. Working between power configurations, data configurations, and scheduling for sensor reading. As well as LoRaWAN initialization, scheduling, and data transmission. This library also handles the BLE services for the device, sensor, and LoRaWAN.
int sensor_app_ble_start | ( | void | ) |
Start the BLE advertising and services.
int sensor_app_configuration_state | ( | void | ) |
Execute the sensor app configuration state.
int sensor_app_error_state | ( | void | ) |
Execute the sensor app error state.
int sensor_app_init | ( | sensor_app_config_t * | config | ) |
Initialize the sensor app, handle anything that needs to be initialized for the app such as timers, nvs, etc.
int sensor_app_running_state | ( | void | ) |
Execute the sensor app running state.