libuav original
Dependents: UAVCAN UAVCAN_Subscriber
Scheduler Class Reference
This class distributes processing time between library components (IO handling, deadline callbacks, ...). More...
#include <scheduler.hpp>
Inherits uavcan::Noncopyable.
Public Member Functions | |
int | spin (MonotonicTime deadline) |
Spin until the deadline, or until some error occurs. | |
int | spinOnce () |
Non-blocking version of spin() - spins until all pending frames and events are processed, or until some error occurs. | |
MonotonicDuration | getDeadlineResolution () const |
Worst case deadline callback resolution. | |
MonotonicDuration | getCleanupPeriod () const |
How often the scheduler will run cleanup (listeners, outgoing transfer registry, ...). |
Detailed Description
This class distributes processing time between library components (IO handling, deadline callbacks, ...).
Definition at line 63 of file scheduler.hpp.
Member Function Documentation
MonotonicDuration getCleanupPeriod | ( | ) | const |
How often the scheduler will run cleanup (listeners, outgoing transfer registry, ...).
Cleanup execution time grows linearly with number of listeners and number of items in the Outgoing Transfer ID registry. Lower period increases CPU usage.
Definition at line 144 of file scheduler.hpp.
MonotonicDuration getDeadlineResolution | ( | ) | const |
Worst case deadline callback resolution.
Higher resolution increases CPU usage.
Definition at line 130 of file scheduler.hpp.
int spin | ( | MonotonicTime | deadline ) |
Spin until the deadline, or until some error occurs.
This function will return strictly when the deadline is reached, even if there are unprocessed frames. Returns negative error code.
Definition at line 155 of file uc_scheduler.cpp.
int spinOnce | ( | ) |
Non-blocking version of spin() - spins until all pending frames and events are processed, or until some error occurs.
If there's nothing to do, returns immediately. Returns negative error code.
Definition at line 186 of file uc_scheduler.cpp.
Generated on Tue Jul 12 2022 17:17:37 by 1.7.2