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()) )
63 std::string cfg_prefix = prefix + cfg_name +
"/";
67 " argument strings, but got %s for %s",
73 active = config->
get_bool((cfg_prefix +
"active").c_str());
78 cfg_name, cfg_prefix));
79 configs.insert(cfg_name);
82 ignored_configs.insert(cfg_name);
90 throw Exception(
"No cameras have been set for fvretriever");
95 PLUGIN_DESCRIPTION(
"Reads images from cameras and stores them in shared memory")
FvRetrieverPlugin(fawkes::Configuration *config)
Constructor.
FireVision retriever thread.
virtual const char * type() const =0
Type of value.
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.
virtual bool is_string() const =0
Check if current value is a string.
Base class for exceptions in Fawkes.
ThreadList thread_list
Thread list member.
virtual std::string get_string() const =0
Get string value.
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.