convenient templated base class for supervisor, which owns (stores) all it's child-actors More...
#include <supervisor.hpp>
Public Member Functions | |
| template<size_t ChildIndex> | |
| auto | get_child () |
Public Member Functions inherited from rotor_light::SupervisorBase | |
| SupervisorBase (char *backends, size_t backends_count, ActorBase **actors, details::ChildState *states, size_t actors_count) | |
| QueueBase * | get_queue () |
| void | initialize () override |
| void | start (bool poll_timer=false) |
| starts all actors (initialize, wait confirmation etc.) More... | |
| virtual void | bind (Context &context, ActorId value=0) |
| uint8_t | bind (ActorId initial_value, SupervisorBase *supervisor, Context &context) override |
| void | process () |
| void | advance_init () override |
| void | advance_start () override |
| void | advance_stop () override |
| PlannerBase * | get_planner () |
Public Member Functions inherited from rotor_light::ActorBase | |
| ActorBase (const ActorBase &)=delete | |
| ActorBase (ActorBase &&)=delete | |
| virtual void | initialize () |
| virtual uint8_t | bind (ActorId initial_value, SupervisorBase *supervisor, Context &context) |
| ActorId | get_id () const |
| State | get_state () const |
| FailPolicy | get_fail_policy () const |
| void | set_fail_policy (FailPolicy value) |
| void | stop () |
| template<typename Ctx > | |
| EventId | add_event (Duration delta, Callback callback, void *data) |
| void | cancel_event (EventId event_id) |
| template<typename Ctx , typename MessageType , typename... Args> | |
| bool | send (size_t queue_index, Args... args) |
| emplaces new message into appropriate queue More... | |
| template<typename Method > | |
| void | subscribe (Method method) |
Protected Types | |
| using | ActorsList = std::tuple< Actors... > |
Protected Attributes | |
| ActorsList | children |
| ActorBase::Handler | backends [HandlersCount] |
| ActorBase * | actors [children_count+1] |
| details::ChildState | children_states_holder [children_count+1] |
Protected Attributes inherited from rotor_light::SupervisorBase | |
| ActorBase ** | actors |
| details::ChildState * | states |
| size_t | actors_count |
| QueueBase * | queue |
| PlannerBase * | planner |
| NowFunction | now |
Protected Attributes inherited from rotor_light::ActorBase | |
| ActorId | id |
| ActorId | mask |
| State | state = State::off |
| SupervisorBase * | supervisor |
| FailPolicy | fail_policy |
Static Protected Attributes | |
| static constexpr size_t | children_count = std::tuple_size_v<ActorsList> |
Additional Inherited Members | |
Public Types inherited from rotor_light::SupervisorBase | |
| using | Parent = ActorBase |
Public Types inherited from rotor_light::ActorBase | |
| using | GenericMethod = void(ActorBase::*)(Message &) |
| alias for generic message handler | |
| using | MethodEntry = void(*)(Message &, ActorBase &, Handler &) |
| alias for method entry, enough to actually perfrom message delivery | |
Static Public Attributes inherited from rotor_light::SupervisorBase | |
| static constexpr size_t | min_handlers_amount |
Static Public Attributes inherited from rotor_light::ActorBase | |
| static constexpr size_t | min_handlers_amount = 1 |
Protected Member Functions inherited from rotor_light::SupervisorBase | |
| virtual void | on_refhesh_timer (message::RefreshTime &) |
Protected Member Functions inherited from rotor_light::ActorBase | |
| ActorBase (char *backends, size_t backends_count) | |
| virtual void | advance_init () |
| virtual void | advance_start () |
| virtual void | advance_stop () |
convenient templated base class for supervisor, which owns (stores) all it's child-actors
|
protected |
heterogenious / type-friendly container for child actors (type)
|
inline |
returns child actor by indes
|
protected |
pointers to actors, including self. Needed to be processed uniformly
|
protected |
message handlers storage
|
protected |
heterogenious / type-friendly container for child actors
|
staticconstexprprotected |
count of child actors
|
protected |
child actors states, including self