23 #include "fvretriever_plugin.h" 24 #include "retriever_thread.h" 26 #include <core/exceptions/software.h> 48 std::set<std::string> configs;
49 std::set<std::string> ignored_configs;
51 std::string prefix =
"/firevision/retriever/camera/";
56 std::string cfg_name = std::string(vi->
path()).substr(prefix.length());
57 cfg_name = cfg_name.substr(0, cfg_name.find(
"/"));
59 if ( (configs.find(cfg_name) == configs.end()) &&
60 (ignored_configs.find(cfg_name) == ignored_configs.end()) )
62 std::string cfg_prefix = prefix + cfg_name +
"/";
66 active = config->
get_bool((cfg_prefix +
"active").c_str());
68 std::string cam_string = config->
get_string((cfg_prefix +
"string").c_str());
72 cfg_name, cfg_prefix));
73 configs.insert(cfg_name);
76 ignored_configs.insert(cfg_name);
84 throw Exception(
"No cameras have been set for fvretriever");
89 PLUGIN_DESCRIPTION(
"Reads images from cameras and stores them in shared memory")
FvRetrieverPlugin(fawkes::Configuration *config)
Constructor.
FireVision retriever thread.
Fawkes library namespace.
virtual bool get_bool(const char *path)=0
Get value from configuration which is of type bool.
virtual ValueIterator * search(const char *path)=0
Iterator with search results.
virtual bool next()=0
Check if there is another element and advance to this if possible.
Base class for exceptions in Fawkes.
ThreadList thread_list
Thread list member.
virtual const char * path() const =0
Path of value.
void push_back(Thread *thread)
Add thread to the end.
Iterator interface to iterate over config values.
Interface for configuration handling.
FireVision Retriever Plugin.
virtual std::string get_string(const char *path)=0
Get value from configuration which is of type string.