Buffer and threshold options

Asset Tracker Template

tags
Asset Tracker Template

To set the buffer size and the number of records per data type, set the following options in prj.conf:

CONFIG_APP_STORAGE_MAX_RECORDS_PER_TYPE=8      # Records per data type
CONFIG_APP_STORAGE_BATCH_BUFFER_SIZE=256       # Batch buffer size
CONFIG_APP_STORAGE_INITIAL_THRESHOLD=4         # Number of records to trigger cloud update

The storage_threshold runtime parameter controls when the device sends buffered data to the cloud. Setting it to 1 means that the device sends data immediately after each sample. Higher values buffer more samples before sending.

For a minimal storage configuration, which keeps a single record per data type and sends a message for every sample, include the app/overlay-storage-minimal.conf overlay.