YARP
Yet Another Robot Platform

ServerSoundGrabber: Export a microphone device streaming sound samples More...

#include <ServerSoundGrabber/ServerSoundGrabber.h>

+ Inheritance diagram for ServerSoundGrabber:

Public Member Functions

 ServerSoundGrabber ()
 
 ServerSoundGrabber (const ServerSoundGrabber &)=delete
 
 ServerSoundGrabber (ServerSoundGrabber &&)=delete
 
ServerSoundGrabberoperator= (const ServerSoundGrabber &)=delete
 
ServerSoundGrabberoperator= (ServerSoundGrabber &&)=delete
 
 ~ServerSoundGrabber () override
 
bool open (yarp::os::Searchable &config) override
 Configure with a set of options. More...
 
bool close () override
 Close the DeviceDriver. More...
 
void run () override
 Main body of the new thread. More...
 
bool read (yarp::os::ConnectionReader &connection) override
 Read this object from a network connection. More...
 
- Public Member Functions inherited from yarp::dev::DeviceDriver
 ~DeviceDriver () override=default
 Destructor. More...
 
template<class T >
bool view (T *&x)
 Get an interface to the device driver. More...
 
virtual DeviceDrivergetImplementation ()
 Some drivers are bureaucrats, pointing at others. More...
 
- Public Member Functions inherited from yarp::os::IConfig
virtual ~IConfig ()
 Destructor. More...
 
virtual bool configure (Searchable &config)
 Change online parameters. More...
 
- Public Member Functions inherited from yarp::os::PortReader
virtual ~PortReader ()
 Destructor. More...
 
virtual Type getReadType () const
 

Detailed Description

ServerSoundGrabber: Export a microphone device streaming sound samples

Definition at line 24 of file ServerSoundGrabber.h.

Constructor & Destructor Documentation

◆ ServerSoundGrabber() [1/3]

ServerSoundGrabber::ServerSoundGrabber ( )

Definition at line 22 of file ServerSoundGrabber.cpp.

◆ ServerSoundGrabber() [2/3]

ServerSoundGrabber::ServerSoundGrabber ( const ServerSoundGrabber )
delete

◆ ServerSoundGrabber() [3/3]

ServerSoundGrabber::ServerSoundGrabber ( ServerSoundGrabber &&  )
delete

◆ ~ServerSoundGrabber()

ServerSoundGrabber::~ServerSoundGrabber ( )
override

Definition at line 29 of file ServerSoundGrabber.cpp.

Member Function Documentation

◆ close()

bool ServerSoundGrabber::close ( )
overridevirtual

Close the DeviceDriver.

Returns
true/false on success/failure.

Reimplemented from yarp::dev::DeviceDriver.

Definition at line 103 of file ServerSoundGrabber.cpp.

◆ open()

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

Configure with a set of options.

These are:

subdevice Common name of device to wrap (e.g. "fakeFrameGrabber").
name Port name to assign to this server (default /grabber).
Parameters
configThe options to use
Returns
true iff the object could be configured.

Reimplemented from yarp::dev::DeviceDriver.

Definition at line 46 of file ServerSoundGrabber.cpp.

◆ operator=() [1/2]

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

◆ operator=() [2/2]

ServerSoundGrabber& ServerSoundGrabber::operator= ( ServerSoundGrabber &&  )
delete

◆ read()

bool ServerSoundGrabber::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 161 of file ServerSoundGrabber.cpp.

◆ run()

void ServerSoundGrabber::run ( )
overridevirtual

Main body of the new thread.

Override this method to do what you want. After Thread::start is called, this method will start running in a separate thread. It is important that this method either keeps checking Thread::isStopping to see if it should stop, or you override the Thread::onStop method to interact with it in some way to shut the new thread down. There is no really reliable, portable way to stop a thread cleanly unless that thread cooperates.

Implements yarp::os::Thread.

Definition at line 119 of file ServerSoundGrabber.cpp.


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