L14-Click 1.0
STM32WLE5CC LoRaWAN Sensor Platform
Loading...
Searching...
No Matches
mems_DataBlock_t Struct Reference

Sensor data record stored as one element in the flash circular queue. More...

#include <mymems.h>

Data Fields

char Sign [3]
mems_DataType_t Type
uint8_t Size
uint8_t Data [(sizeof(uint16_t)+sizeof(tmphm_sht45_t)+sizeof(amb_tsl2591_t)+sizeof(bar_ils22qs_t)+sizeof(bar_bmp585_t)+sizeof(scd41_t)+sizeof(sps30_t))]

Detailed Description

Sensor data record stored as one element in the flash circular queue.

New sensor readings are appended at the tail; when the queue is full the oldest records are silently overwritten (circular / ring-buffer behaviour). The total size of one record is fixed at SZ_DATABLOCK bytes; changing the set of active sensors changes this size and forces a memory reset.

Definition at line 77 of file mymems.h.

Field Documentation

◆ Data

uint8_t mems_DataBlock_t::Data[( sizeof(uint16_t)+sizeof(tmphm_sht45_t)+sizeof(amb_tsl2591_t)+sizeof(bar_ils22qs_t)+sizeof(bar_bmp585_t)+sizeof(scd41_t)+sizeof(sps30_t))]

Packed sensor payload; layout depends on which sensors are enabled

Definition at line 82 of file mymems.h.

Referenced by sensors_ReadToBckFromDataBlock(), and sensors_WriteFromBckToDataBlock().

◆ Sign

char mems_DataBlock_t::Sign[3]

3-byte signature; checked when reading back to verify block integrity

Definition at line 79 of file mymems.h.

◆ Size

uint8_t mems_DataBlock_t::Size

Number of valid bytes written into Data[] (≤ SENSORS_DATASIZE)

Definition at line 81 of file mymems.h.

Referenced by sensors_WriteFromBckToDataBlock().

◆ Type

mems_DataType_t mems_DataBlock_t::Type

Payload type identifier (see mems_DataType_t)

Definition at line 80 of file mymems.h.

Referenced by sensors_ReadToBckFromDataBlock(), and sensors_WriteFromBckToDataBlock().


The documentation for this struct was generated from the following file: