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");
42 if (config.
check(
"help"))
47 std::string config_string = config.
toString();
53 if (sectionp.
check(
"end_point_name"))
62 prop_check.
unput(
"ENVS::end_point_name");
69 if (sectionp.
check(
"deployment_id_name"))
78 prop_check.
unput(
"ENVS::deployment_id_name");
85 if (sectionp.
check(
"api_key_name"))
94 prop_check.
unput(
"ENVS::api_key_name");
101 if (sectionp.
check(
"api_version_name"))
110 prop_check.
unput(
"ENVS::api_version_name");
145 doc = doc + std::string(
"\n=============================================\n");
146 doc = doc + std::string(
"This is the help for device: WhisperDevice\n");
147 doc = doc + std::string(
"\n");
148 doc = doc + std::string(
"This is the list of the parameters accepted by the device:\n");
149 doc = doc + std::string(
"'ENVS::end_point_name': The name of the environmental variable that stores the APIs endpoint\n");
150 doc = doc + std::string(
"'ENVS::deployment_id_name': The name of the environmental variable that stores the deployment ID\n");
151 doc = doc + std::string(
"'ENVS::api_key_name': The name of the environmental variable that stores the APIs access key\n");
152 doc = doc + std::string(
"'ENVS::api_version_name': The name of the environmental variable that stores the APIs version used\n");
153 doc = doc + std::string(
"\n");
154 doc = doc + std::string(
"Here are some examples of invocation command with yarpdev, with all params:\n");
155 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";
156 doc = doc + std::string(
"Using only mandatory params:\n");
157 doc = doc +
" yarpdev --device whisperDevice\n";
158 doc = doc + std::string(
"=============================================\n\n");
return doc;
std::string m_ENVS_end_point_name
std::string m_ENVS_api_key_name
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.
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,...)