YARP
Yet Another Robot Platform
yarp::dev::DeviceGroup Class Reference

Lets you make a bunch of devices as a group. More...

#include <DeviceGroup/DeviceGroup.h>

+ Inheritance diagram for yarp::dev::DeviceGroup:

Detailed Description

Lets you make a bunch of devices as a group.

Definition at line 29 of file DeviceGroup.h.

Public Member Functions

 DeviceGroup ()
 
virtual ~DeviceGroup ()
 
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
virtual ~DeviceDriver ()
 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 ()
 

Constructor & Destructor Documentation

◆ DeviceGroup()

yarp::dev::DeviceGroup::DeviceGroup ( )
inline

Definition at line 33 of file DeviceGroup.h.

◆ ~DeviceGroup()

DeviceGroup::~DeviceGroup ( )
virtual

Definition at line 205 of file DeviceGroup.cpp.

Member Function Documentation

◆ close()

bool yarp::dev::DeviceGroup::close ( void  )
inlineoverridevirtual

Close the DeviceDriver.

Returns
true/false on success/failure.

Reimplemented from yarp::dev::DeviceDriver.

Definition at line 41 of file DeviceGroup.h.

◆ open()

bool DeviceGroup::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 126 of file DeviceGroup.cpp.

◆ startService()

bool DeviceGroup::startService ( )
overridevirtual

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 194 of file DeviceGroup.cpp.

◆ stopService()

bool yarp::dev::DeviceGroup::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 47 of file DeviceGroup.h.

◆ updateService()

bool DeviceGroup::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 199 of file DeviceGroup.cpp.


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