19 YARP_LOG_COMPONENT(AudioRecorder_nwc_yarpParamsCOMPONENT,
"yarp.device.AudioRecorder_nwc_yarp")
30 std::vector<std::string> params;
31 params.push_back(
"local");
32 params.push_back(
"remote");
33 params.push_back(
"carrier");
34 params.push_back(
"useStream");
41 if (paramName ==
"local")
46 if (paramName ==
"remote")
51 if (paramName ==
"carrier")
56 if (paramName ==
"useStream")
59 else paramValue =
"false";
63 yError() <<
"parameter '" << paramName <<
"' was not found";
82 if (config.
check(
"help"))
91 if (config.
check(
"local"))
94 yCInfo(AudioRecorder_nwc_yarpParamsCOMPONENT) <<
"Parameter 'local' using value:" <<
m_local;
98 yCError(AudioRecorder_nwc_yarpParamsCOMPONENT) <<
"Mandatory parameter 'local' not found!";
99 yCError(AudioRecorder_nwc_yarpParamsCOMPONENT) <<
"Description of the parameter: Full port name opened by the audioRecoder_nwc_yarp device.";
102 prop_check.
unput(
"local");
107 if (config.
check(
"remote"))
110 yCInfo(AudioRecorder_nwc_yarpParamsCOMPONENT) <<
"Parameter 'remote' using value:" <<
m_remote;
114 yCError(AudioRecorder_nwc_yarpParamsCOMPONENT) <<
"Mandatory parameter 'remote' not found!";
115 yCError(AudioRecorder_nwc_yarpParamsCOMPONENT) <<
"Description of the parameter: Full port name of the port opened on the server side, to which the audioRecoder_nwc_yarp connects to.";
118 prop_check.
unput(
"remote");
123 if (config.
check(
"carrier"))
126 yCInfo(AudioRecorder_nwc_yarpParamsCOMPONENT) <<
"Parameter 'carrier' using value:" <<
m_carrier;
130 yCInfo(AudioRecorder_nwc_yarpParamsCOMPONENT) <<
"Parameter 'carrier' using DEFAULT value:" <<
m_carrier;
132 prop_check.
unput(
"carrier");
137 if (config.
check(
"useStream"))
140 yCInfo(AudioRecorder_nwc_yarpParamsCOMPONENT) <<
"Parameter 'useStream' using value:" <<
m_useStream;
144 yCInfo(AudioRecorder_nwc_yarpParamsCOMPONENT) <<
"Parameter 'useStream' using DEFAULT value:" <<
m_useStream;
146 prop_check.
unput(
"useStream");
181 doc = doc + std::string(
"\n=============================================\n");
182 doc = doc + std::string(
"This is the help for device: AudioRecorder_nwc_yarp\n");
183 doc = doc + std::string(
"\n");
184 doc = doc + std::string(
"This is the list of the parameters accepted by the device:\n");
185 doc = doc + std::string(
"'local': Full port name opened by the audioRecoder_nwc_yarp device.\n");
186 doc = doc + std::string(
"'remote': Full port name of the port opened on the server side, to which the audioRecoder_nwc_yarp connects to.\n");
187 doc = doc + std::string(
"'carrier': The carrier used for the streaming connection with the server.\n");
188 doc = doc + std::string(
"'useStream': If true, enables a streaming connection with the server. Otherwise only rpc is used\n");
189 doc = doc + std::string(
"\n");
190 doc = doc + std::string(
"Here are some examples of invocation command with yarpdev, with all params:\n");
191 doc = doc +
" yarpdev --device audioRecorder_nwc_yarp --local <mandatory_value> --remote <mandatory_value> --carrier fast_tcp --useStream false\n";
192 doc = doc + std::string(
"Using only mandatory params:\n");
193 doc = doc +
" yarpdev --device audioRecorder_nwc_yarp --local <mandatory_value> --remote <mandatory_value>\n";
194 doc = doc + std::string(
"=============================================\n\n");
return doc;
bool parseParams(const yarp::os::Searchable &config) override
Parse the DeviceDriver parameters.
std::string getConfiguration() const override
Return the configuration of the device.
std::vector< std::string > getListOfParams() const override
Return a list of all params used by the device.
std::string m_provided_configuration
AudioRecorder_nwc_yarp_ParamsParser()
std::string getDocumentationOfDeviceParams() const override
Get the documentation of the DeviceDriver's parameters.
bool getParamValue(const std::string ¶mName, std::string ¶mValue) const override
Return the value (represented as a string) of the requested parameter.
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,...)