State diagram

Asset Tracker Template

tags
Asset Tracker Template

The Storage module implements a state machine with the following states and transitions:

Storage module state diagram

The module implements the following states:

  • RUNNING (parent): Initializes the backend and handles the STORAGE_CLEAR, STORAGE_FLUSH, STORAGE_STATS, and STORAGE_SET_THRESHOLD admin commands.
  • STATE_BUFFER_IDLE: Stores incoming data and waits for commands. Transitions to STATE_BUFFER_PIPE_ACTIVE on STORAGE_BATCH_REQUEST.
  • STATE_BUFFER_PIPE_ACTIVE: Actively serves batch data through the batch interface. Transitions back to STATE_BUFFER_IDLE when the batch session ends.