YARP
Yet Another Robot Platform
 
Loading...
Searching...
No Matches

AudioRecorder_nws_yarp: A Wrapper which streams audio over the network, after grabbing it from a device. More...

#include <audioRecorder_nws_yarp/AudioRecorder_nws_yarp.h>

+ Inheritance diagram for AudioRecorder_nws_yarp:

Public Member Functions

 AudioRecorder_nws_yarp ()
 Constructor.
 
 AudioRecorder_nws_yarp (const AudioRecorder_nws_yarp &)=delete
 
 AudioRecorder_nws_yarp (AudioRecorder_nws_yarp &&)=delete
 
AudioRecorder_nws_yarpoperator= (const AudioRecorder_nws_yarp &)=delete
 
AudioRecorder_nws_yarpoperator= (AudioRecorder_nws_yarp &&)=delete
 
 ~AudioRecorder_nws_yarp () override
 
bool open (yarp::os::Searchable &config) override
 Initialize the object.
 
bool close () override
 Shut the object down.
 
bool attach (yarp::dev::PolyDriver *driver) override
 Attach to another object.
 
bool detach () override
 Detach the object (you must have first called attach).
 
bool read (yarp::os::ConnectionReader &connection) override
 Read this object from a network connection.
 
- Public Member Functions inherited from yarp::dev::DeviceDriver
 DeviceDriver ()
 
 DeviceDriver (const DeviceDriver &other)=delete
 
 DeviceDriver (DeviceDriver &&other) noexcept=delete
 
DeviceDriveroperator= (const DeviceDriver &other)=delete
 
DeviceDriveroperator= (DeviceDriver &&other) noexcept=delete
 
 ~DeviceDriver () override
 
bool open (yarp::os::Searchable &config) override
 Open the DeviceDriver.
 
bool close () override
 Close the DeviceDriver.
 
virtual std::string id () const
 Return the id assigned to the PolyDriver.
 
virtual void setId (const std::string &id)
 Set the id for this device.
 
template<class T >
bool view (T *&x)
 Get an interface to the device driver.
 
virtual DeviceDrivergetImplementation ()
 Some drivers are bureaucrats, pointing at others.
 
- Public Member Functions inherited from yarp::os::IConfig
virtual ~IConfig ()
 Destructor.
 
virtual bool configure (Searchable &config)
 Change online parameters.
 
- Public Member Functions inherited from yarp::dev::WrapperSingle
 ~WrapperSingle () override
 Destructor.
 
bool attachAll (const yarp::dev::PolyDriverList &drivers) final
 Attach to a list of objects.
 
bool detachAll () final
 Detach the object (you must have first called attach).
 
- Public Member Functions inherited from yarp::dev::IWrapper
virtual ~IWrapper ()
 Destructor.
 
- Public Member Functions inherited from yarp::dev::IMultipleWrapper
virtual ~IMultipleWrapper ()
 Destructor.
 
- Public Member Functions inherited from yarp::os::PortReader
virtual ~PortReader ()
 Destructor.
 
virtual Type getReadType () const
 

Friends

class AudioRecorderStatusThread
 
class AudioRecorderDataThread
 

Detailed Description

AudioRecorder_nws_yarp: A Wrapper which streams audio over the network, after grabbing it from a device.

Description of input parameters

Parameters required by this device are:

Parameter name SubParameter Type Units Default Value Required Description Notes
name - string - /audioRecorderWrapper No full name of the port opened by the device MUST start with a '/' character, xxx/audio:o and xxx/rpc suffixes are appended
period - int ms 20 No period of the internal thread, in ms default 20ms
debug - bool - - No developers use only
min_samples_over_network - int samples 11250 No 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 - int samples 11250 No 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 No timeout for sample collection the algorithm is implemented in AudioRecorderDeviceBase::getSound() method
start - bool - false No automatically activates the recording when the device is started if false, the recording is enabled via rpc port
send_sound_on_stop - bool - true No send the sound when the stop rpc is called, even if it does not met network size parameters it will not send empty sounds

See Audio in YARP for additional documentation on YARP audio.

Definition at line 50 of file AudioRecorder_nws_yarp.h.

Constructor & Destructor Documentation

◆ AudioRecorder_nws_yarp() [1/3]

AudioRecorder_nws_yarp::AudioRecorder_nws_yarp ( )

Constructor.

Definition at line 23 of file AudioRecorder_nws_yarp.cpp.

◆ AudioRecorder_nws_yarp() [2/3]

AudioRecorder_nws_yarp::AudioRecorder_nws_yarp ( const AudioRecorder_nws_yarp )
delete

◆ AudioRecorder_nws_yarp() [3/3]

AudioRecorder_nws_yarp::AudioRecorder_nws_yarp ( AudioRecorder_nws_yarp &&  )
delete

◆ ~AudioRecorder_nws_yarp()

AudioRecorder_nws_yarp::~AudioRecorder_nws_yarp ( )
override

Definition at line 32 of file AudioRecorder_nws_yarp.cpp.

Member Function Documentation

◆ attach()

bool AudioRecorder_nws_yarp::attach ( yarp::dev::PolyDriver driver)
overridevirtual

Attach to another object.

Parameters
driverthe polydriver that you want to attach to.
Returns
true/false on success failure.

Implements yarp::dev::IWrapper.

Definition at line 133 of file AudioRecorder_nws_yarp.cpp.

◆ close()

bool AudioRecorder_nws_yarp::close ( )
overridevirtual

Shut the object down.

You should override this.

Returns
true/false on success/failure.

Reimplemented from yarp::os::IConfig.

Definition at line 98 of file AudioRecorder_nws_yarp.cpp.

◆ detach()

bool AudioRecorder_nws_yarp::detach ( )
overridevirtual

Detach the object (you must have first called attach).

Returns
true/false on success failure.

Implements yarp::dev::IWrapper.

Definition at line 164 of file AudioRecorder_nws_yarp.cpp.

◆ open()

bool AudioRecorder_nws_yarp::open ( yarp::os::Searchable config)
overridevirtual

Initialize the object.

You should override this.

Parameters
configis a list of parameters for the object. Which parameters are effective for your object can vary.
Returns
true/false upon success/failure

Reimplemented from yarp::os::IConfig.

Definition at line 37 of file AudioRecorder_nws_yarp.cpp.

◆ operator=() [1/2]

AudioRecorder_nws_yarp & AudioRecorder_nws_yarp::operator= ( AudioRecorder_nws_yarp &&  )
delete

◆ operator=() [2/2]

AudioRecorder_nws_yarp & AudioRecorder_nws_yarp::operator= ( const AudioRecorder_nws_yarp )
delete

◆ read()

bool AudioRecorder_nws_yarp::read ( yarp::os::ConnectionReader reader)
overridevirtual

Read this object from a network connection.

Override this for your particular class.

Parameters
readeran interface to the network connection for reading
Returns
true iff the object is successfully read

Implements yarp::os::PortReader.

Definition at line 122 of file AudioRecorder_nws_yarp.cpp.

Friends And Related Symbol Documentation

◆ AudioRecorderDataThread

friend class AudioRecorderDataThread
friend

Definition at line 100 of file AudioRecorder_nws_yarp.h.

◆ AudioRecorderStatusThread

friend class AudioRecorderStatusThread
friend

Definition at line 99 of file AudioRecorder_nws_yarp.h.


The documentation for this class was generated from the following files: