YARP
Yet Another Robot Platform

pipe: Tries to connect the output of one device to the input of another. More...

#include <DevicePipe/DevicePipe.h>

+ Inheritance diagram for DevicePipe:

Public Member Functions

 DevicePipe ()=default
 
 DevicePipe (const DevicePipe &)=delete
 
 DevicePipe (DevicePipe &&)=delete
 
DevicePipeoperator= (const DevicePipe &)=delete
 
DevicePipeoperator= (DevicePipe &&)=delete
 
 ~DevicePipe () override=default
 
bool open (yarp::os::Searchable &config) override
 Open the DeviceDriver. More...
 
bool close () override
 Close the DeviceDriver. More...
 
bool startService () override
 Initiate the service, whatever it is. More...
 
bool stopService () override
 Shut down the service, whatever it is. More...
 
bool updateService () override
 Give the service the chance to run for a while. 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::dev::IService
virtual ~IService ()
 

Static Protected Member Functions

static bool open (const char *key, yarp::dev::PolyDriver &poly, yarp::os::Searchable &config, const char *comment)
 

Protected Attributes

yarp::dev::PolyDriver source
 
yarp::dev::PolyDriver sink
 

Detailed Description

pipe: Tries to connect the output of one device to the input of another.

Definition at line 22 of file DevicePipe.h.

Constructor & Destructor Documentation

◆ DevicePipe() [1/3]

DevicePipe::DevicePipe ( )
default

◆ DevicePipe() [2/3]

DevicePipe::DevicePipe ( const DevicePipe )
delete

◆ DevicePipe() [3/3]

DevicePipe::DevicePipe ( DevicePipe &&  )
delete

◆ ~DevicePipe()

DevicePipe::~DevicePipe ( )
overridedefault

Member Function Documentation

◆ close()

bool DevicePipe::close ( )
overridevirtual

Close the DeviceDriver.

Returns
true/false on success/failure.

Reimplemented from yarp::dev::DeviceDriver.

Definition at line 82 of file DevicePipe.cpp.

◆ open() [1/2]

bool DevicePipe::open ( const char *  key,
yarp::dev::PolyDriver poly,
yarp::os::Searchable config,
const char *  comment 
)
staticprotected

Definition at line 48 of file DevicePipe.cpp.

◆ open() [2/2]

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

Open the DeviceDriver.

Parameters
configis a list of parameters for the device. Which parameters are effective for your device can vary. See device invocation examples. If there is no example for your device, you can run the "yarpdev" program with the verbose flag set to probe what parameters the device is checking. If that fails too, you'll need to read the source code (please nag one of the yarp developers to add documentation for your device).
Returns
true/false upon success/failure

Reimplemented from yarp::dev::DeviceDriver.

Definition at line 27 of file DevicePipe.cpp.

◆ operator=() [1/2]

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

◆ operator=() [2/2]

DevicePipe& DevicePipe::operator= ( DevicePipe &&  )
delete

◆ startService()

bool DevicePipe::startService ( )
inlineoverridevirtual

Initiate the service, whatever it is.

The service should then run by itself, without any further interaction with its creator until stopService() is called.

Returns
true if the service started and needs no help running. If false is returned, the service expects updateService() to be called repeatedly until that function too returns false. This is useful for devices that don't want to manage their own service threads.

Reimplemented from yarp::dev::IService.

Definition at line 38 of file DevicePipe.h.

◆ stopService()

bool DevicePipe::stopService ( )
inlineoverridevirtual

Shut down the service, whatever it is.

Returns
true iff the service shut down ok.

Reimplemented from yarp::dev::IService.

Definition at line 44 of file DevicePipe.h.

◆ updateService()

bool DevicePipe::updateService ( )
overridevirtual

Give the service the chance to run for a while.

This is an alternative to calling startService(). It is more appropriate in a single-threaded environment.

Returns
true iff the service is willing to run some more. A return value of false means that the service would like to stop.

Reimplemented from yarp::dev::IService.

Definition at line 91 of file DevicePipe.cpp.

Member Data Documentation

◆ sink

yarp::dev::PolyDriver DevicePipe::sink
protected

Definition at line 53 of file DevicePipe.h.

◆ source

yarp::dev::PolyDriver DevicePipe::source
protected

Definition at line 52 of file DevicePipe.h.


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