This is the documentation for the latest (main) development branch of the Infuse-IoT platform. If you are looking for the documentation of previous releases, use the drop-down menu on the left and select the desired version.

Application States

The application states API is a mechanism for collecting global boolean state into a single location such that is can be accessed through a single API and used by the Task Runner.

Boolean State Timeout

In addition to basic boolean state setting and querying, the application state API also allows for setting a state to true for a given number of seconds through infuse_state_set_timeout(). The maximum number of timeouts that can be active at one time is configured with CONFIG_INFUSE_APPLICATION_STATES_MAX_TIMEOUTS.

Note

Calling infuse_state_set() or infuse_state_set_to() on a state that has a pending timeout will cancel that timeout.

Iterating the state timeouts is performed by infuse_states_tick(), which is called automatically by task_runner_start_auto_iterate().

API Reference

Infuse-IoT application state APIs