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();
Interface adapter to provide logging facilities.
virtual void executeCommand(PLEXIL::Command *cmd)
Perform given command.
virtual bool start()
Start adapter.
virtual bool initialize()
Initialize adapter.
virtual ~GlobalStatePlexilAdapter()
Destructor.
virtual void subscribe(const PLEXIL::State &state)
Subscribe to updates for given state.
virtual void unsubscribe(const PLEXIL::State &state)
Unsubscribe from updates.
virtual bool stop()
Stop adapter.
virtual bool shutdown()
Shut adapter down.
virtual bool reset()
Reset adapter.
GlobalStatePlexilAdapter(PLEXIL::AdapterExecInterface &execInterface)
Constructor.
virtual void invokeAbort(PLEXIL::Command *cmd)
Abort currently running execution.
virtual void lookupNow(PLEXIL::State const &state, PLEXIL::StateCacheEntry &cache_entry)
Immediate lookup of value.
Interface for configuration handling.