rotor_light
real-time C++ actor micro-framework for embedded systems, supervisable
rotor_light::PlannerBase Struct Reference

bookeeper of future events More...

#include <planner.hpp>

Inheritance diagram for rotor_light::PlannerBase:
rotor_light::Planner< TimeEventsCount >

Public Member Functions

 PlannerBase (TimeEvent *events, int32_t events_count)
 
 PlannerBase (const PlannerBase &)=delete
 
 PlannerBase (PlannerBase &&)=delete
 
template<typename Ctx >
EventId add_event (TimePoint when, Callback callback, void *data)
 records the new event More...
 
void remove_event (EventId event_id)
 
EventConsumer consume (TimePoint deadline)
 
TimePoint next_event ()
 

Friends

struct EventConsumer
 

Detailed Description

bookeeper of future events

Constructor & Destructor Documentation

◆ PlannerBase()

rotor_light::PlannerBase::PlannerBase ( TimeEvent events,
int32_t  events_count 
)

records events storage pointer and maximum amount of events

Member Function Documentation

◆ add_event()

template<typename Ctx >
EventId rotor_light::PlannerBase::add_event ( TimePoint  when,
Callback  callback,
void *  data 
)
inline

records the new event

the contextt is either ctx::thread (mask interrupts) or ctx::interrupt (do not mask interrupts).

returns cancellable event_id

◆ consume()

EventConsumer rotor_light::PlannerBase::consume ( TimePoint  deadline)

returns expired event iterator upto the deadline

◆ next_event()

TimePoint rotor_light::PlannerBase::next_event ( )

returns timepoint of the next event

◆ remove_event()

void rotor_light::PlannerBase::remove_event ( EventId  event_id)

cancels (removes) the specified event


The documentation for this struct was generated from the following file: