Go to the documentation of this file.
5 #ifndef UAVCAN_NODE_SCHEDULER_HPP_INCLUDED
6 #define UAVCAN_NODE_SCHEDULER_HPP_INCLUDED
25 : scheduler_(scheduler)
39 bool isRunning()
const;
65 enum { DefaultDeadlineResolutionMs = 5 };
66 enum { MinDeadlineResolutionMs = 1 };
67 enum { MaxDeadlineResolutionMs = 100 };
69 enum { DefaultCleanupPeriodMs = 1000 };
70 enum { MinCleanupPeriodMs = 10 };
71 enum { MaxCleanupPeriodMs = 10000 };
96 : dispatcher_(can_driver, allocator, sysclock)
100 , inside_spin_(false)
135 deadline_resolution_ = res;
149 cleanup_period_ = period;
155 #endif // UAVCAN_NODE_SCHEDULER_HPP_INCLUDED
MonotonicTime getDeadline() const
unsigned getNumHandlers() const
MonotonicDuration getCleanupPeriod() const
Implicitly convertible to/from uavcan.Timestamp.
MonotonicDuration getDeadlineResolution() const
unsigned getLength() const
LinkedListRoot< DeadlineHandler > handlers_
static MonotonicDuration fromMSec(int64_t ms)
ROSCPP_DECL void spinOnce()
void generateDeadlineImmediately()
static MonotonicTime fromUSec(uint64_t us)
const UAVCAN_EXPORT T & max(const T &a, const T &b)
const Dispatcher & getDispatcher() const
UtcTime getUtcTime() const
DeadlineHandler(Scheduler &scheduler)
MonotonicDuration cleanup_period_
const UAVCAN_EXPORT T & min(const T &a, const T &b)
DeadlineScheduler deadline_scheduler_
MonotonicTime getMonotonicTime() const
uavcan::MonotonicTime getMonotonic()
Scheduler(ICanDriver &can_driver, IPoolAllocator &allocator, ISystemClock &sysclock)
Dispatcher & getDispatcher()
virtual UtcTime getUtc() const =0
ISystemClock & getSystemClock()
InsideSpinSetter(Scheduler &o)
MonotonicDuration deadline_resolution_
void setDeadlineResolution(MonotonicDuration res)
virtual ~DeadlineHandler()
const ISystemClock & getSystemClock() const
DeadlineScheduler & getDeadlineScheduler()
void setCleanupPeriod(MonotonicDuration period)
Scheduler & getScheduler() const
MonotonicTime prev_cleanup_ts_
virtual MonotonicTime getMonotonic() const =0