4.1. Algorithm

Overview of included algorithms

The algorithm module provides the common execution framework for application-level algorithms. It is configuration-driven: individual algorithm functions are registered in the algo_algorithms table and executed by the central scheduler logic.

4.1.2. Execution Model

  • ALGO_MainFunction() is called periodically (tick: ALGO_TICK_ms).

  • Each configured algorithm is executed either: - cyclically when its cycle time elapses, or - as soon as possible if its cycle time is set to 0.

  • Algorithms transition through defined states

4.1.3. Initialization and Reinitialization

  • ALGO_UnlockInitialization() requests initialization handling.

  • During initialization, each registered algorithm is checked and optional initialization callbacks are executed.

  • Algorithms can request reinitialization via ALGO_MarkAsReinit(); the framework then schedules a new initialization cycle.

4.1.4. Runtime Monitoring

ALGO_MonitorExecutionTime() supervises algorithm execution duration. If an algorithm exceeds its configured maximum calculation time while in ALGO_RUNNING, it is set to ALGO_BLOCKED.

4.1.5. Configuration Note

The set of algorithms executed at runtime is defined in src/app/application/algorithm/config/algorithm_cfg.c. The documentation pages linked above describe available algorithm modules, while the active runtime set depends on the current configuration.