23 #ifndef __LUA_INTERFACEIMPORTER_H_ 24 #define __LUA_INTERFACEIMPORTER_H_ 26 #include <lua/context_watcher.h> 28 #include <core/utils/lock_map.h> 29 #include <blackboard/interface_observer.h> 52 const char *type,
const char *id_pattern);
54 virtual void bb_interface_created(
const char *type,
const char *
id)
throw();
58 std::string __varname;
95 void open_interfaces(std::string &prefix, InterfaceMap &imap,
bool write);
97 void push_interfaces_varname(
LuaContext *context, InterfaceMap &imap);
98 void push_interfaces_uid(
LuaContext *context, InterfaceMap &imap);
99 void push_multi_interfaces_varname(
LuaContext *context, InterfaceListMap &imap);
101 void add_observed_interface(std::string varname,
102 const char *type,
const char *
id);
112 InterfaceMap __reading_ifs;
113 InterfaceListMap __reading_multi_ifs;
114 InterfaceMap __writing_ifs;
115 ObserverMap __observers;
117 InterfaceMap __ext_rifs;
118 InterfaceMap __ext_wifs;
120 bool __interfaces_pushed;
LuaInterfaceImporter::InterfaceMap & reading_interfaces()
Get interface map of reading interfaces.
LuaInterfaceImporter(LuaContext *__context, BlackBoard *blackboard, Configuration *config, Logger *logger)
Constructor.
Fawkes library namespace.
void read_to_buffer()
Read from all reading interfaces into a buffer.
Base class for all Fawkes BlackBoard interfaces.
void open_writing_interfaces(std::string &prefix)
Open interfaces for writing.
void close_reading_interfaces()
Close interfaces for reading.
~LuaInterfaceImporter()
Destructor.
fawkes::LockMap< std::string, fawkes::Interface * > InterfaceMap
Map of varname to interface instance.
void open_reading_interfaces(std::string &prefix)
Open interfaces for reading.
void read_from_buffer()
Update interfaces from internal buffers.
void add_interface(std::string varname, Interface *interface)
Add a single interface to be pushed to the context.
BlackBoard interface observer.
void read()
Read from all reading interfaces.
LuaInterfaceImporter::InterfaceMap & writing_interfaces()
Get interface map of writing interfaces.
void close_writing_interfaces()
Close interfaces for writing.
fawkes::LockMap< std::string, std::list< fawkes::Interface * > > InterfaceListMap
Map of varname to list of interfaces.
void write()
Write all writing interfaces.
The BlackBoard abstract class.
Interface for configuration handling.
void lua_restarted(LuaContext *context)
Lua restart event.
void push_interfaces()
Push interfaces to Lua environment.