This class is the parameters parser for class AudioFromFileDevice. More...
#include <audioFromFileDevice/AudioFromFileDevice_ParamsParser.h>
Classes | |
struct | parser_version_type |
Public Member Functions | |
AudioFromFileDevice_ParamsParser () | |
~AudioFromFileDevice_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. | |
![]() | |
virtual | ~IDeviceDriverParams () |
Public Attributes | |
const std::string | m_device_classname = {"AudioFromFileDevice"} |
const std::string | m_device_name = {"audioFromFileDevice"} |
bool | m_parser_is_strict = false |
const parser_version_type | m_parser_version = {} |
const std::string | m_use_params_from_file_defaultValue = {"true"} |
const std::string | m_file_name_defaultValue = {"audio.wav"} |
const std::string | m_period_defaultValue = {"0.010"} |
const std::string | m_driver_frame_size_defaultValue = {"512"} |
const std::string | m_reset_on_stop_defaultValue = {"false"} |
bool | m_use_params_from_file = {true} |
std::string | m_file_name = {"audio.wav"} |
double | m_period = {0.010} |
int | m_driver_frame_size = {512} |
bool | m_reset_on_stop = {false} |
This class is the parameters parser for class AudioFromFileDevice.
These are the used parameters:
Group name | Parameter name | Type | Units | Default Value | Required | Description | Notes |
---|---|---|---|---|---|---|---|
- | use_params_from_file | bool | - | true | 0 | If set to true, recording params (e.g. channels, freq etc. are taken from file. Otherwise are AUDIO_BASE parameters are used and the file is converted to the specified format | - |
- | file_name | string | - | audio.wav | 0 | The name of the file opened by the module | Only .wav files supported |
- | period | double | s | 0.010 | 0 | the period of thread which processes the file | On each iteration xxx samples are processed |
- | driver_frame_size | int | samples | 512 | 0 | the number of samples to process on each iteration of the thread | - |
- | reset_on_stop | bool | - | false | 0 | if enabled, the file is played back from the beginning every stop. Otherwise on start the previous position is resumed | - |
The device can be launched by yarpdev using one of the following examples (with and without all optional parameters):
Definition at line 45 of file AudioFromFileDevice_ParamsParser.h.
AudioFromFileDevice_ParamsParser::AudioFromFileDevice_ParamsParser | ( | ) |
Definition at line 23 of file AudioFromFileDevice_ParamsParser.cpp.
|
overridedefault |
|
inlineoverridevirtual |
Get the name of the DeviceDriver class.
Implements yarp::dev::IDeviceDriverParams.
Definition at line 75 of file AudioFromFileDevice_ParamsParser.h.
|
inlineoverridevirtual |
Get the name of the device (i.e.
the plugin name).
Implements yarp::dev::IDeviceDriverParams.
Definition at line 76 of file AudioFromFileDevice_ParamsParser.h.
|
overridevirtual |
Get the documentation of the DeviceDriver's parameters.
Implements yarp::dev::IDeviceDriverParams.
Definition at line 149 of file AudioFromFileDevice_ParamsParser.cpp.
|
overridevirtual |
Return a list of all params used by the device.
Implements yarp::dev::IDeviceDriverParams.
Definition at line 28 of file AudioFromFileDevice_ParamsParser.cpp.
|
overridevirtual |
Parse the DeviceDriver parameters.
Implements yarp::dev::IDeviceDriverParams.
Definition at line 40 of file AudioFromFileDevice_ParamsParser.cpp.
const std::string AudioFromFileDevice_ParamsParser::m_device_classname = {"AudioFromFileDevice"} |
Definition at line 52 of file AudioFromFileDevice_ParamsParser.h.
const std::string AudioFromFileDevice_ParamsParser::m_device_name = {"audioFromFileDevice"} |
Definition at line 53 of file AudioFromFileDevice_ParamsParser.h.
int AudioFromFileDevice_ParamsParser::m_driver_frame_size = {512} |
Definition at line 71 of file AudioFromFileDevice_ParamsParser.h.
const std::string AudioFromFileDevice_ParamsParser::m_driver_frame_size_defaultValue = {"512"} |
Definition at line 65 of file AudioFromFileDevice_ParamsParser.h.
std::string AudioFromFileDevice_ParamsParser::m_file_name = {"audio.wav"} |
Definition at line 69 of file AudioFromFileDevice_ParamsParser.h.
const std::string AudioFromFileDevice_ParamsParser::m_file_name_defaultValue = {"audio.wav"} |
Definition at line 63 of file AudioFromFileDevice_ParamsParser.h.
bool AudioFromFileDevice_ParamsParser::m_parser_is_strict = false |
Definition at line 54 of file AudioFromFileDevice_ParamsParser.h.
const parser_version_type AudioFromFileDevice_ParamsParser::m_parser_version = {} |
Definition at line 60 of file AudioFromFileDevice_ParamsParser.h.
double AudioFromFileDevice_ParamsParser::m_period = {0.010} |
Definition at line 70 of file AudioFromFileDevice_ParamsParser.h.
const std::string AudioFromFileDevice_ParamsParser::m_period_defaultValue = {"0.010"} |
Definition at line 64 of file AudioFromFileDevice_ParamsParser.h.
bool AudioFromFileDevice_ParamsParser::m_reset_on_stop = {false} |
Definition at line 72 of file AudioFromFileDevice_ParamsParser.h.
const std::string AudioFromFileDevice_ParamsParser::m_reset_on_stop_defaultValue = {"false"} |
Definition at line 66 of file AudioFromFileDevice_ParamsParser.h.
bool AudioFromFileDevice_ParamsParser::m_use_params_from_file = {true} |
Definition at line 68 of file AudioFromFileDevice_ParamsParser.h.
const std::string AudioFromFileDevice_ParamsParser::m_use_params_from_file_defaultValue = {"true"} |
Definition at line 62 of file AudioFromFileDevice_ParamsParser.h.