This class is the parameters parser for class AudioRecorder_nws_yarp. More...
#include <networkWrappers/audioRecorder_nws_yarp/AudioRecorder_nws_yarp_ParamsParser.h>
Classes | |
struct | parser_version_type |
Public Member Functions | |
AudioRecorder_nws_yarp_ParamsParser () | |
~AudioRecorder_nws_yarp_ParamsParser () override=default | |
bool | parseParams (const yarp::os::Searchable &config) override |
Parse the DeviceDriver parameters. | |
std::string | getDeviceClassName () const override |
Get the name of the DeviceDriver class. | |
std::string | getDeviceName () const override |
Get the name of the device (i.e. | |
std::string | getDocumentationOfDeviceParams () const override |
Get the documentation of the DeviceDriver's parameters. | |
std::vector< std::string > | getListOfParams () const override |
Return a list of all params used by the device. | |
Public Member Functions inherited from yarp::dev::IDeviceDriverParams | |
virtual | ~IDeviceDriverParams () |
Public Attributes | |
const std::string | m_device_classname = {"AudioRecorder_nws_yarp"} |
const std::string | m_device_name = {"audioRecorder_nws_yarp"} |
bool | m_parser_is_strict = false |
const parser_version_type | m_parser_version = {} |
const std::string | m_name_defaultValue = {"/audioRecorder_nws"} |
const std::string | m_period_defaultValue = {"0.02"} |
const std::string | m_debug_defaultValue = {"false"} |
const std::string | m_min_samples_over_network_defaultValue = {"11250"} |
const std::string | m_max_samples_over_network_defaultValue = {"11250"} |
const std::string | m_getSound_timeout_defaultValue = {"1.0"} |
const std::string | m_start_defaultValue = {"false"} |
const std::string | m_send_sound_on_stop_defaultValue = {"true"} |
std::string | m_name = {"/audioRecorder_nws"} |
float | m_period = {0.02} |
bool | m_debug = {false} |
size_t | m_min_samples_over_network = {11250} |
size_t | m_max_samples_over_network = {11250} |
float | m_getSound_timeout = {1.0} |
bool | m_start = {false} |
bool | m_send_sound_on_stop = {true} |
This class is the parameters parser for class AudioRecorder_nws_yarp.
These are the used parameters:
Group name | Parameter name | Type | Units | Default Value | Required | Description | Notes |
---|---|---|---|---|---|---|---|
- | name | string | - | /audioRecorder_nws | 0 | full name of the port opened by the device | MUST start with a '/' character, xxx/audio:o and xxx/rpc suffixes are appended |
- | period | float | s | 0.02 | 0 | period of the internal thread, in ms | default 20ms |
- | debug | bool | - | false | 0 | developers use only | - |
- | min_samples_over_network | size_t | samples | 11250 | 0 | sends the network packet ifs n samples are collected AND the timeout is expired | the algorithm is implemented in AudioRecorderDeviceBase::getSound() method |
- | max_samples_over_network | size_t | samples | 11250 | 0 | sends the network packet as soon as n samples have been collected | the algorithm is implemented in AudioRecorderDeviceBase::getSound() method |
- | max_samples_timeout | float | s | 1.0 | 0 | timeout for sample collection | the algorithm is implemented in AudioRecorderDeviceBase::getSound() method |
- | start | bool | - | false | 0 | automatically activates the recording when the device is started | if false, the recording is enabled via rpc port |
- | send_sound_on_stop | bool | - | true | 0 | send the sound when the stop rpc is called, even if it does not met network size parameters | it will not send empty sounds |
The device can be launched by yarpdev using one of the following examples (with and without all optional parameters):
Definition at line 48 of file AudioRecorder_nws_yarp_ParamsParser.h.
AudioRecorder_nws_yarp_ParamsParser::AudioRecorder_nws_yarp_ParamsParser | ( | ) |
Definition at line 23 of file AudioRecorder_nws_yarp_ParamsParser.cpp.
|
overridedefault |
|
inlineoverridevirtual |
Get the name of the DeviceDriver class.
Implements yarp::dev::IDeviceDriverParams.
Definition at line 84 of file AudioRecorder_nws_yarp_ParamsParser.h.
|
inlineoverridevirtual |
Get the name of the device (i.e.
the plugin name).
Implements yarp::dev::IDeviceDriverParams.
Definition at line 85 of file AudioRecorder_nws_yarp_ParamsParser.h.
|
overridevirtual |
Get the documentation of the DeviceDriver's parameters.
Implements yarp::dev::IDeviceDriverParams.
Definition at line 194 of file AudioRecorder_nws_yarp_ParamsParser.cpp.
|
overridevirtual |
Return a list of all params used by the device.
Implements yarp::dev::IDeviceDriverParams.
Definition at line 28 of file AudioRecorder_nws_yarp_ParamsParser.cpp.
|
overridevirtual |
Parse the DeviceDriver parameters.
Implements yarp::dev::IDeviceDriverParams.
Definition at line 43 of file AudioRecorder_nws_yarp_ParamsParser.cpp.
bool AudioRecorder_nws_yarp_ParamsParser::m_debug = {false} |
Definition at line 76 of file AudioRecorder_nws_yarp_ParamsParser.h.
const std::string AudioRecorder_nws_yarp_ParamsParser::m_debug_defaultValue = {"false"} |
Definition at line 67 of file AudioRecorder_nws_yarp_ParamsParser.h.
const std::string AudioRecorder_nws_yarp_ParamsParser::m_device_classname = {"AudioRecorder_nws_yarp"} |
Definition at line 55 of file AudioRecorder_nws_yarp_ParamsParser.h.
const std::string AudioRecorder_nws_yarp_ParamsParser::m_device_name = {"audioRecorder_nws_yarp"} |
Definition at line 56 of file AudioRecorder_nws_yarp_ParamsParser.h.
float AudioRecorder_nws_yarp_ParamsParser::m_getSound_timeout = {1.0} |
Definition at line 79 of file AudioRecorder_nws_yarp_ParamsParser.h.
const std::string AudioRecorder_nws_yarp_ParamsParser::m_getSound_timeout_defaultValue = {"1.0"} |
Definition at line 70 of file AudioRecorder_nws_yarp_ParamsParser.h.
size_t AudioRecorder_nws_yarp_ParamsParser::m_max_samples_over_network = {11250} |
Definition at line 78 of file AudioRecorder_nws_yarp_ParamsParser.h.
const std::string AudioRecorder_nws_yarp_ParamsParser::m_max_samples_over_network_defaultValue = {"11250"} |
Definition at line 69 of file AudioRecorder_nws_yarp_ParamsParser.h.
size_t AudioRecorder_nws_yarp_ParamsParser::m_min_samples_over_network = {11250} |
Definition at line 77 of file AudioRecorder_nws_yarp_ParamsParser.h.
const std::string AudioRecorder_nws_yarp_ParamsParser::m_min_samples_over_network_defaultValue = {"11250"} |
Definition at line 68 of file AudioRecorder_nws_yarp_ParamsParser.h.
std::string AudioRecorder_nws_yarp_ParamsParser::m_name = {"/audioRecorder_nws"} |
Definition at line 74 of file AudioRecorder_nws_yarp_ParamsParser.h.
const std::string AudioRecorder_nws_yarp_ParamsParser::m_name_defaultValue = {"/audioRecorder_nws"} |
Definition at line 65 of file AudioRecorder_nws_yarp_ParamsParser.h.
bool AudioRecorder_nws_yarp_ParamsParser::m_parser_is_strict = false |
Definition at line 57 of file AudioRecorder_nws_yarp_ParamsParser.h.
const parser_version_type AudioRecorder_nws_yarp_ParamsParser::m_parser_version = {} |
Definition at line 63 of file AudioRecorder_nws_yarp_ParamsParser.h.
float AudioRecorder_nws_yarp_ParamsParser::m_period = {0.02} |
Definition at line 75 of file AudioRecorder_nws_yarp_ParamsParser.h.
const std::string AudioRecorder_nws_yarp_ParamsParser::m_period_defaultValue = {"0.02"} |
Definition at line 66 of file AudioRecorder_nws_yarp_ParamsParser.h.
bool AudioRecorder_nws_yarp_ParamsParser::m_send_sound_on_stop = {true} |
Definition at line 81 of file AudioRecorder_nws_yarp_ParamsParser.h.
const std::string AudioRecorder_nws_yarp_ParamsParser::m_send_sound_on_stop_defaultValue = {"true"} |
Definition at line 72 of file AudioRecorder_nws_yarp_ParamsParser.h.
bool AudioRecorder_nws_yarp_ParamsParser::m_start = {false} |
Definition at line 80 of file AudioRecorder_nws_yarp_ParamsParser.h.
const std::string AudioRecorder_nws_yarp_ParamsParser::m_start_defaultValue = {"false"} |
Definition at line 71 of file AudioRecorder_nws_yarp_ParamsParser.h.