22 #ifndef __PLUGINS_PLEXIL_GLOBALS_ADAPTER_H_ 23 #define __PLUGINS_PLEXIL_GLOBALS_ADAPTER_H_ 25 #include <config/config.h> 26 #include <logging/logger.h> 28 #include <InterfaceAdapter.hh> 55 virtual void subscribe(
const PLEXIL::State &state);
56 virtual void unsubscribe(
const PLEXIL::State &state);
61 virtual void lookupNow(PLEXIL::State
const &state, PLEXIL::StateCacheEntry &cache_entry);
64 void global_set_value(PLEXIL::Command *cmd, PLEXIL::ValueType value_type);
65 void global_print_all(PLEXIL::Command *cmd);
71 bool cfg_default_adapter_;
73 std::map<std::string, std::function<void(PLEXIL::Command *)>> commands_;
75 std::map<PLEXIL::State, std::pair<PLEXIL::ValueType, PLEXIL::Value>> values_;
76 std::set<PLEXIL::State> subscribed_states_;
80 void initGlobalState();
virtual void lookupNow(PLEXIL::State const &state, PLEXIL::StateCacheEntry &cache_entry)
Immediate lookup of value.
virtual bool shutdown()
Shut adapter down.
virtual void subscribe(const PLEXIL::State &state)
Subscribe to updates for given state.
virtual bool start()
Start adapter.
virtual bool stop()
Stop adapter.
virtual bool reset()
Reset adapter.
virtual ~GlobalStatePlexilAdapter()
Destructor.
Interface adapter to provide logging facilities.
virtual void unsubscribe(const PLEXIL::State &state)
Unsubscribe from updates.
virtual bool initialize()
Initialize adapter.
virtual void invokeAbort(PLEXIL::Command *cmd)
Abort currently running execution.
GlobalStatePlexilAdapter(PLEXIL::AdapterExecInterface &execInterface)
Constructor.
Interface for configuration handling.
virtual void executeCommand(PLEXIL::Command *cmd)
Perform given command.