30 std::vector<std::string> params;
31 params.push_back(
"wrapper_device");
32 params.push_back(
"attached_device");
33 params.push_back(
"doNotAttach");
41 if (config.
check(
"help"))
46 std::string config_string = config.
toString();
50 if (config.
check(
"wrapper_device"))
57 yCError(DeviceBundlerParamsCOMPONENT) <<
"Mandatory parameter 'wrapper_device' not found!";
58 yCError(DeviceBundlerParamsCOMPONENT) <<
"Description of the parameter: Name of the wrapper device";
61 prop_check.
unput(
"wrapper_device");
66 if (config.
check(
"attached_device"))
73 yCError(DeviceBundlerParamsCOMPONENT) <<
"Mandatory parameter 'attached_device' not found!";
74 yCError(DeviceBundlerParamsCOMPONENT) <<
"Description of the parameter: Name of the subdevice that will be attached to the wrapper device";
77 prop_check.
unput(
"attached_device");
82 if (config.
check(
"doNotAttach"))
85 yCInfo(DeviceBundlerParamsCOMPONENT) <<
"Parameter 'doNotAttach' using value:" <<
m_doNotAttach;
89 yCInfo(DeviceBundlerParamsCOMPONENT) <<
"Parameter 'doNotAttach' using DEFAULT value:" <<
m_doNotAttach;
91 prop_check.
unput(
"doNotAttach");
126 doc = doc + std::string(
"\n=============================================\n");
127 doc = doc + std::string(
"This is the help for device: DeviceBundler\n");
128 doc = doc + std::string(
"\n");
129 doc = doc + std::string(
"This is the list of the parameters accepted by the device:\n");
130 doc = doc + std::string(
"'wrapper_device': Name of the wrapper device\n");
131 doc = doc + std::string(
"'attached_device': Name of the subdevice that will be attached to the wrapper device\n");
132 doc = doc + std::string(
"'doNotAttach': If set to true, the two devices are opened, but not attached\n");
133 doc = doc + std::string(
"\n");
134 doc = doc + std::string(
"Here are some examples of invocation command with yarpdev, with all params:\n");
135 doc = doc +
" yarpdev --device deviceBundler --wrapper_device device_name1 --attached_device device_name2 --doNotAttach false\n";
136 doc = doc + std::string(
"Using only mandatory params:\n");
137 doc = doc +
" yarpdev --device deviceBundler --wrapper_device device_name1 --attached_device device_name2\n";
138 doc = doc + std::string(
"=============================================\n\n");
return doc;
DeviceBundler_ParamsParser()
std::string m_wrapper_device
bool parseParams(const yarp::os::Searchable &config) override
Parse the DeviceDriver parameters.
std::string m_attached_device
std::vector< std::string > getListOfParams() const override
Return a list of all params used by the device.
std::string getDocumentationOfDeviceParams() const override
Get the documentation of the DeviceDriver's parameters.
A class for storing options and configuration information.
void unput(const std::string &key)
Remove the association from the given key to a value, if present.
A base class for nested structures that can be searched.
virtual bool check(const std::string &key) const =0
Check if there exists a property of the given name.
virtual std::string toString() const =0
Return a standard text representation of the content of the object.
virtual Value & find(const std::string &key) const =0
Gets a value corresponding to a given keyword.
#define yCInfo(component,...)
#define yCError(component,...)
#define YARP_LOG_COMPONENT(name,...)