19#include <zephyr/sys/ring_buffer.h>
21#define MAX_DATA_BUFFER_SIZE 100
46 struct ring_buf data_ring_buf;
48 struct ring_buf timestamp_ring_buf;
54 size_t timestamp_size;
int sensor_data_clear(sensor_data_t *sensor_data)
Clear the sensor data.
Definition sensor_data.c:328
int sensor_data_setup(sensor_data_t *sensor_data, enum sensor_types type, enum sensor_voltage voltage_enum)
Setup the sensor data. If the sensor chosen has continuous power, the power will be turned on when th...
Definition sensor_data.c:87
int sensor_data_format_for_lorawan(sensor_data_t *sensor_data, uint8_t *data, uint8_t *data_len)
Format the sensor data for LoRaWAN, this breaks the data into a uint8_t array.
Definition sensor_data.c:353
int sensor_data_print_data(sensor_data_t *sensor_data)
Print the sensor data from data and timestamp ring buffers. Displaying it from the oldest to newest.
Definition sensor_data.c:256
sensor_data_type
Types of data that can be stored in the sensor data buffer. Currently unused, plans to keep it for fu...
Definition sensor_data.h:27
int sensor_data_read(sensor_data_t *sensor_data, int timestamp)
Read the sensor data, and store the data in the buffer. It adds a tinestamp to the data buffer.
Definition sensor_data.c:190
This is a library to keep track of sensor ids and sensor power ids. As well as the configuration for ...
sensor_id
Sensor identifiers.
Definition sensor_id.h:20
sensor_power_id
Sensor power identifiers.
Definition sensor_id.h:45
sensor_types
Types of sensors that can be configured.
Definition sensor_id.h:29
sensor_voltage
Voltage levels for sensor power.
Definition sensor_id.h:54
Structure for the sensor data. This is used to store the sensor data and timestamp for each sensor.
Definition sensor_data.h:40