6 #ifndef FLEXIVRDK_SCHEDULER_HPP_
7 #define FLEXIVRDK_SCHEDULER_HPP_
73 void addTask(std::function<
void(
void)>&& callback,
74 const std::string& taskName,
int interval,
int priority,
75 int cpuAffinity = -1);
121 std::unique_ptr<Impl> m_pimpl;
Real-time scheduler that can simultaneously run multiple periodic tasks. Parameters for each task are...
size_t numTasks() const
[Non-blocking] Get number of tasks added to the scheduler.
void stop()
[Blocking] Stop all added tasks. The periodic execution will stop and all task threads will be closed...
void addTask(std::function< void(void)> &&callback, const std::string &taskName, int interval, int priority, int cpuAffinity=-1)
[Non-blocking] Add a new periodic task to the scheduler's task pool. Each task in the pool is assigne...
Scheduler()
[Blocking] Create a flexiv::Scheduler instance and initialize the real-time scheduler.
void start()
[Blocking] Start all added tasks. A dedicated thread will be created for each added task and the peri...
int minPriority() const
[Non-blocking] Get minimum available priority for user tasks.
int maxPriority() const
[Non-blocking] Get maximum available priority for user tasks.