|
Internal Interface Wrap
API reference
|
Abstract base class for periodic timer operations. More...
#include <BasePeriodicTimer.h>
Protected Member Functions | |
| BasePeriodicTimer (hf_timer_callback_t callback, void *user_data=nullptr) noexcept | |
| Protected constructor with callback specification. | |
| void | SetInitialized (bool initialized) noexcept |
| Set the initialized state. | |
| void | SetRunning (bool running) noexcept |
| Set the running state. | |
| void | ExecuteCallback () noexcept |
| Execute the timer callback (called by implementations). | |
| bool | HasValidCallback () const noexcept |
| Check if callback is valid. | |
Protected Attributes | |
| hf_timer_callback_t | callback_ |
| Timer callback function. | |
| void * | user_data_ |
| User data passed to callback. | |
| bool | initialized_ |
| Initialization state flag. | |
| bool | running_ |
| Running state flag. | |
| hf_timer_statistics_t | statistics_ |
| Timer operation statistics. | |
| hf_timer_diagnostics_t | diagnostics_ |
| Timer diagnostic information. | |
Abstract base class for periodic timer operations.
This class provides a consistent interface for periodic timer functionality across different hardware platforms and timer implementations. It supports high-resolution timing, callback-based notifications, and precise period control.
Key Features:
|
virtualdefaultnoexcept |
Virtual destructor to ensure proper cleanup.
|
delete |
|
inlineexplicitprotectednoexcept |
Protected constructor with callback specification.
| callback | Timer callback function |
| user_data | User data passed to callback |
|
pure virtualnoexcept |
Deinitialize the timer and free resources.
Implemented in EspPeriodicTimer, and StmPeriodicTimer.
|
inlineprotectednoexcept |
Execute the timer callback (called by implementations).
Get description of this timer implementation.
Implemented in EspPeriodicTimer, and StmPeriodicTimer.
|
inlinevirtualnoexcept |
Get timer diagnostic information.
| diagnostics | Reference to store diagnostics data |
Reimplemented in EspPeriodicTimer, and StmPeriodicTimer.
Get minimum supported timer period.
Implemented in EspPeriodicTimer, and StmPeriodicTimer.
Get maximum supported timer period.
Implemented in EspPeriodicTimer, and StmPeriodicTimer.
|
pure virtualnoexcept |
Get the current timer period.
| period_us | Reference to store the current period |
Implemented in EspPeriodicTimer, and StmPeriodicTimer.
Get timer resolution.
Implemented in EspPeriodicTimer, and StmPeriodicTimer.
|
inlinevirtualnoexcept |
Get timer operation statistics.
| statistics | Reference to store statistics data |
Reimplemented in EspPeriodicTimer, and StmPeriodicTimer.
|
pure virtualnoexcept |
Get timer statistics and status information.
| callback_count | Number of callbacks executed |
| missed_callbacks | Number of missed callbacks (if supported) |
| last_error | Last error that occurred |
Implemented in EspPeriodicTimer, and StmPeriodicTimer.
|
inlinenoexcept |
Get current user data pointer.
|
inlineprotectednoexcept |
Check if callback is valid.
|
pure virtualnoexcept |
Initialize the timer hardware/resources.
Implemented in EspPeriodicTimer, and StmPeriodicTimer.
|
inlinenoexcept |
Check if timer is initialized.
|
inlinenoexcept |
Check if timer is currently running.
|
delete |
|
inlinevirtualnoexcept |
Reset timer diagnostic information.
|
inlinevirtualnoexcept |
Reset timer operation statistics.
|
pure virtualnoexcept |
Reset timer statistics.
Implemented in EspPeriodicTimer, and StmPeriodicTimer.
|
inlinenoexcept |
Set new callback function.
| callback | New callback function |
| user_data | New user data |
Set the initialized state.
| initialized | New initialization state |
|
pure virtualnoexcept |
Change the timer period while running.
| period_us | New timer period in microseconds |
Implemented in EspPeriodicTimer, and StmPeriodicTimer.
Set the running state.
| running | New running state |
|
pure virtualnoexcept |
Start the periodic timer with specified period.
| period_us | Timer period in microseconds |
Implemented in EspPeriodicTimer, and StmPeriodicTimer.
|
pure virtualnoexcept |
Stop the periodic timer.
Implemented in EspPeriodicTimer, and StmPeriodicTimer.
|
protected |
Timer callback function.
|
protected |
Timer diagnostic information.
|
protected |
Initialization state flag.
|
protected |
Running state flag.
|
protected |
Timer operation statistics.
|
protected |
User data passed to callback.