$darkmode
engine::Coordinator Class Reference

#include <coordinator.hpp>

Public Member Functions

 Coordinator (sol::state_view lua, cloe::DataBroker *db)
 
const std::vector< HistoryTrigger > & history () const
 
void register_action (const std::string &key, cloe::ActionFactoryPtr &&af)
 
void register_event (const std::string &key, cloe::EventFactoryPtr &&ef, std::shared_ptr< cloe::Callback > storage)
 
sol::table register_lua_table (const std::string &field)
 
cloe::DataBrokerdata_broker () const
 
std::shared_ptr< cloe::TriggerRegistrartrigger_registrar (cloe::Source s)
 
void enroll (cloe::Registrar &r)
 
cloe::Logger logger () const
 
std::map< std::string, fable::Jsontrigger_action_schemas () const
 
std::map< std::string, fable::Jsontrigger_event_schemas () const
 
cloe::Duration process (const cloe::Sync &)
 
size_t process_pending_lua_triggers (const cloe::Sync &sync)
 
size_t process_pending_web_triggers (const cloe::Sync &sync)
 
void insert_trigger_from_lua (const cloe::Sync &sync, const sol::object &obj)
 
void execute_action_from_lua (const cloe::Sync &sync, const sol::object &obj)
 

Protected Member Functions

cloe::ActionPtr make_action (const sol::object &lua) const
 
cloe::ActionPtr make_action (const cloe::Conf &c) const
 
cloe::EventPtr make_event (const cloe::Conf &c) const
 
cloe::TriggerPtr make_trigger (cloe::Source s, const cloe::Conf &c) const
 
cloe::TriggerPtr make_trigger (const sol::table &tbl) const
 
void queue_trigger (cloe::Source s, const cloe::Conf &c)
 
void queue_trigger (cloe::TriggerPtr &&tp)
 
void store_trigger (cloe::TriggerPtr &&tp, const cloe::Sync &sync)
 
cloe::CallbackResult execute_trigger (cloe::TriggerPtr &&tp, const cloe::Sync &sync)
 

Protected Attributes

friend TriggerRegistrar
 

Detailed Description

Coordinator manages the set of available triggers as well as the concrete list of active trigger events.

Before it can be configured, it is important that all simulators, components, controllers, etc. have registered their triggers and actions.

Member Function Documentation

◆ process()

Duration engine::Coordinator::process ( const cloe::Sync sync)

Process any incoming triggers, clear the buffer, and trigger time-based events.

Here is the call graph for this function:

◆ trigger_action_schemas()

std::map< std::string, fable::Json > engine::Coordinator::trigger_action_schemas ( ) const

Return a list of names of all available actions that have been enrolled.

◆ trigger_event_schemas()

std::map< std::string, fable::Json > engine::Coordinator::trigger_event_schemas ( ) const

Return a list of names of all available events that have been enrolled.


The documentation for this class was generated from the following files: