YARP
Yet Another Robot Platform
 
Loading...
Searching...
No Matches
RobotDescriptionStorage Class Reference

RobotDescription_nws_yarp: This device is a storage which contains a list of the currently opened device drivers. More...

#include <robotDescriptionStorage/RobotDescriptionStorage.h>

+ Inheritance diagram for RobotDescriptionStorage:

Public Member Functions

 RobotDescriptionStorage ()=default
 
virtual ~RobotDescriptionStorage ()=default
 
bool open (yarp::os::Searchable &params) override
 Open the DeviceDriver.
 
bool close () override
 Close the DeviceDriver.
 
bool detachAll () override
 Detach the object (you must have first called attach).
 
bool attachAll (const yarp::dev::PolyDriverList &l) override
 Attach to a list of objects.
 
yarp::dev::ReturnValue getAllDevices (std::vector< yarp::dev::DeviceDescription > &dev_list) override
 Ask the complete list of all yarp device drivers registered by a robot description server.
 
yarp::dev::ReturnValue getAllDevicesByType (const std::string &type, std::vector< yarp::dev::DeviceDescription > &dev_list) override
 Ask a list of all registered yarp device drivers whose type corresponds to the given param.
 
yarp::dev::ReturnValue registerDevice (const yarp::dev::DeviceDescription &dev) override
 Register a new running yarp device into a robot description server.
 
yarp::dev::ReturnValue unregisterDevice (const std::string &device_name) override
 Unregister a running yarp device from a robot description server.
 
yarp::dev::ReturnValue unregisterAll () override
 Unregister all the devices.
 
- 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
 
virtual ~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::dev::IRobotDescription
virtual ~IRobotDescription ()
 Destructor.
 
- Public Member Functions inherited from yarp::dev::IMultipleWrapper
virtual ~IMultipleWrapper ()
 Destructor.
 

Detailed Description

RobotDescription_nws_yarp: This device is a storage which contains a list of the currently opened device drivers.

yarprobotinterface might adds/removes devices to the storage using attachAll()/detachAll() methods.

This device does not accepts parameters

Definition at line 26 of file RobotDescriptionStorage.h.

Constructor & Destructor Documentation

◆ RobotDescriptionStorage()

RobotDescriptionStorage::RobotDescriptionStorage ( )
default

◆ ~RobotDescriptionStorage()

virtual RobotDescriptionStorage::~RobotDescriptionStorage ( )
virtualdefault

Member Function Documentation

◆ attachAll()

bool RobotDescriptionStorage::attachAll ( const yarp::dev::PolyDriverList drivers)
overridevirtual

Attach to a list of objects.

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

Implements yarp::dev::IMultipleWrapper.

Definition at line 89 of file RobotDescriptionStorage.cpp.

◆ close()

bool RobotDescriptionStorage::close ( )
inlineoverridevirtual

Close the DeviceDriver.

Returns
true/false on success/failure.

Reimplemented from yarp::dev::DeviceDriver.

Definition at line 42 of file RobotDescriptionStorage.h.

◆ detachAll()

bool RobotDescriptionStorage::detachAll ( )
overridevirtual

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

Returns
true/false on success failure.

Implements yarp::dev::IMultipleWrapper.

Definition at line 142 of file RobotDescriptionStorage.cpp.

◆ getAllDevices()

yarp::dev::ReturnValue RobotDescriptionStorage::getAllDevices ( std::vector< yarp::dev::DeviceDescription > &  dev_list)
overridevirtual

Ask the complete list of all yarp device drivers registered by a robot description server.

Implements yarp::dev::IRobotDescription.

Definition at line 19 of file RobotDescriptionStorage.cpp.

◆ getAllDevicesByType()

yarp::dev::ReturnValue RobotDescriptionStorage::getAllDevicesByType ( const std::string &  type,
std::vector< yarp::dev::DeviceDescription > &  dev_list 
)
overridevirtual

Ask a list of all registered yarp device drivers whose type corresponds to the given param.

Implements yarp::dev::IRobotDescription.

Definition at line 25 of file RobotDescriptionStorage.cpp.

◆ open()

bool RobotDescriptionStorage::open ( yarp::os::Searchable config)
inlineoverridevirtual

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 41 of file RobotDescriptionStorage.h.

◆ registerDevice()

yarp::dev::ReturnValue RobotDescriptionStorage::registerDevice ( const yarp::dev::DeviceDescription dev)
overridevirtual

Register a new running yarp device into a robot description server.

Implements yarp::dev::IRobotDescription.

Definition at line 38 of file RobotDescriptionStorage.cpp.

◆ unregisterAll()

yarp::dev::ReturnValue RobotDescriptionStorage::unregisterAll ( )
overridevirtual

Unregister all the devices.

Implements yarp::dev::IRobotDescription.

Definition at line 54 of file RobotDescriptionStorage.cpp.

◆ unregisterDevice()

yarp::dev::ReturnValue RobotDescriptionStorage::unregisterDevice ( const std::string &  device_name)
overridevirtual

Unregister a running yarp device from a robot description server.

Implements yarp::dev::IRobotDescription.

Definition at line 46 of file RobotDescriptionStorage.cpp.


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