30 std::vector<std::string> params;
31 params.push_back(
"ENVS::end_point_name");
32 params.push_back(
"ENVS::deployment_id_name");
33 params.push_back(
"ENVS::api_key_name");
34 params.push_back(
"ENVS::api_version_name");
41 if (paramName ==
"ENVS::end_point_name")
46 if (paramName ==
"ENVS::deployment_id_name")
51 if (paramName ==
"ENVS::api_key_name")
56 if (paramName ==
"ENVS::api_version_name")
62 yError() <<
"parameter '" << paramName <<
"' was not found";
81 if (config.
check(
"help"))
92 if (sectionp.
check(
"end_point_name"))
101 prop_check.
unput(
"ENVS::end_point_name");
108 if (sectionp.
check(
"deployment_id_name"))
117 prop_check.
unput(
"ENVS::deployment_id_name");
124 if (sectionp.
check(
"api_key_name"))
133 prop_check.
unput(
"ENVS::api_key_name");
140 if (sectionp.
check(
"api_version_name"))
149 prop_check.
unput(
"ENVS::api_version_name");
184 doc = doc + std::string(
"\n=============================================\n");
185 doc = doc + std::string(
"This is the help for device: WhisperDevice\n");
186 doc = doc + std::string(
"\n");
187 doc = doc + std::string(
"This is the list of the parameters accepted by the device:\n");
188 doc = doc + std::string(
"'ENVS::end_point_name': The name of the environmental variable that stores the APIs endpoint\n");
189 doc = doc + std::string(
"'ENVS::deployment_id_name': The name of the environmental variable that stores the deployment ID\n");
190 doc = doc + std::string(
"'ENVS::api_key_name': The name of the environmental variable that stores the APIs access key\n");
191 doc = doc + std::string(
"'ENVS::api_version_name': The name of the environmental variable that stores the APIs version used\n");
192 doc = doc + std::string(
"\n");
193 doc = doc + std::string(
"Here are some examples of invocation command with yarpdev, with all params:\n");
194 doc = doc +
" yarpdev --device whisperDevice --ENVS::end_point_name AZURE_ENDPOINT --ENVS::deployment_id_name DEPLOYMENT_WHISPER_ID --ENVS::api_key_name AZURE_API_KEY --ENVS::api_version_name AZURE_API_VERSION_TTS\n";
195 doc = doc + std::string(
"Using only mandatory params:\n");
196 doc = doc +
" yarpdev --device whisperDevice\n";
197 doc = doc + std::string(
"=============================================\n\n");
return doc;
std::string m_ENVS_end_point_name
std::string m_ENVS_api_key_name
std::string m_provided_configuration
bool getParamValue(const std::string ¶mName, std::string ¶mValue) const override
Return the value (represented as a string) of the requested parameter.
bool parseParams(const yarp::os::Searchable &config) override
Parse the DeviceDriver parameters.
std::string m_ENVS_api_version_name
std::string getDocumentationOfDeviceParams() const override
Get the documentation of the DeviceDriver's parameters.
std::string getConfiguration() const override
Return the configuration of the device.
WhisperDevice_ParamsParser()
std::string m_ENVS_deployment_id_name
std::vector< std::string > getListOfParams() const override
Return a list of all params used by the device.
A simple collection of objects that can be described and transmitted in a portable way.
bool check(const std::string &key) const override
Check if there exists a property of the given name.
Value & find(const std::string &key) const override
Gets a value corresponding to a given keyword.
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 Bottle & findGroup(const std::string &key) const =0
Gets a list corresponding to a given keyword.
virtual std::string asString() const
Get string value.
#define yCInfo(component,...)
#define YARP_LOG_COMPONENT(name,...)