![]() |
|
Uniot Core
|
| 0.8.1 |
#include <TaskScheduler.h>
Public Types | |
| using | TaskPtr = SharedPointer<SchedulerTask> |
| Shared pointer type for scheduler tasks. | |
| using | TaskInfoCallback = std::function<void(const char *, bool, uint64_t)> |
| Callback signature for task status reporting. | |
Public Member Functions | |
| TaskScheduler () | |
| Constructor. | |
| TaskScheduler & | push (const char *name, TaskPtr task) |
| Add a named task to the scheduler. | |
| TaskScheduler & | push (ISchedulerConnectionKit &connection) |
| Add connection kit components to the scheduler. | |
| void | loop () |
| Main execution loop for the scheduler. | |
| void | exportTasksInfo (TaskInfoCallback callback) const |
| Report information about all registered tasks. | |
| uint64_t | getTotalElapsedMs () const |
| Get the total execution time of the scheduler in milliseconds. | |
Static Public Member Functions | |
| static TaskPtr | make (SchedulerTask::SchedulerTaskCallback callback) |
| Static factory method to create a task with a callback. | |
| static TaskPtr | make (IExecutor &executor) |
| Static factory method to create a task from an IExecutor. | |