Data operations (handled by parent RUNNING state):
-
STORAGE_SET_THRESHOLD: Set the threshold for triggering
STORAGE_THRESHOLD_REACHED. If threshold is1, every sample triggers a message. Higher values enable buffering until the threshold is reached. -
STORAGE_FLUSH: Flushes stored data one item at a time as individual
STORAGE_DATAmessages. Data is sent in FIFO order per type. Available in both operational modes. -
STORAGE_BATCH_REQUEST: Requests access to stored data through batch interface. Responds with
STORAGE_BATCH_AVAILABLE,STORAGE_BATCH_EMPTY,STORAGE_BATCH_BUSY, orSTORAGE_BATCH_ERROR. Available in both operational modes. -
STORAGE_BATCH_CONSUME: Confirms that the head item of an active batch session has been processed (for example, successfully sent to the cloud). The
session_idmust match the active session anddata_typemust identify the type of the item just read withstorage_batch_read(). Storage removes the item from the backend and makes the next item available in the pipe. An unknown or mismatcheddata_typeaborts the session. -
STORAGE_BATCH_CLOSE: Ends a batch session. Must be sent for every session, including sessions that received
STORAGE_BATCH_EMPTYorSTORAGE_BATCH_ERROR. -
STORAGE_CLEAR: Clears all stored data from the backend. Available in both operational modes.
Diagnostics (handled by parent RUNNING state):
- STORAGE_STATS : Requests storage statistics (requires
CONFIG_APP_STORAGE_SHELL_STATS). Statistics are logged to the console. Available in both operational modes.