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

Interface implemented by all device drivers. More...

#include <yarp/dev/DeviceDriver.h>

Inherits yarp::os::IConfig.

Inherited by FakeLaser, LaserFromDepth, laserHokuyo, RpLidar, RpLidar2, SerialServoBoard, StubDriver, yarp::dev::AnalogSensorClient, yarp::dev::AnalogWrapper, yarp::dev::BatteryClient, yarp::dev::BatteryWrapper, yarp::dev::BoschIMU, yarp::dev::ControlBoardRemapper, yarp::dev::ControlBoardWrapper, yarp::dev::DeprecatedDeviceDriver, yarp::dev::depthCameraDriver, yarp::dev::DeviceGroup, yarp::dev::DevicePipe, yarp::dev::DynamixelAX12FtdiDriver, yarp::dev::FakeAnalogSensor, yarp::dev::FakeBot, yarp::dev::fakeDepthCameraDriver, yarp::dev::fakeIMU, yarp::dev::FakeMotionControl, yarp::dev::FfmpegGrabber, yarp::dev::FfmpegWriter, yarp::dev::FrameTransformClient, yarp::dev::FrameTransformServer, yarp::dev::JoypadControlClient, yarp::dev::JoypadControlServer, yarp::dev::Localization2DClient, yarp::dev::Map2DClient, yarp::dev::Map2DServer, yarp::dev::MultipleAnalogSensorsClient, yarp::dev::MultipleAnalogSensorsRemapper, yarp::dev::MultipleAnalogSensorsServer, yarp::dev::Navigation2DClient, yarp::dev::OpenCVGrabber, yarp::dev::OVRHeadset, yarp::dev::PolyDriver, yarp::dev::PortAudioDeviceDriver, yarp::dev::Rangefinder2DClient, yarp::dev::Rangefinder2DWrapper, yarp::dev::realsense2Driver, yarp::dev::RemoteControlBoard, yarp::dev::RemoteFrameGrabber, yarp::dev::RGBDSensorClient, yarp::dev::RGBDSensorWrapper, yarp::dev::RobotDescriptionClient, yarp::dev::RobotDescriptionServer, yarp::dev::SDLJoypad, yarp::dev::SerialDeviceDriver, yarp::dev::ServerFrameGrabber, yarp::dev::ServerGrabber, yarp::dev::ServerInertial, yarp::dev::ServerSerial, yarp::dev::ServerSoundGrabber, yarp::dev::TestFrameGrabber, yarp::dev::TestMotor, and yarp::dev::VirtualAnalogWrapper.

Detailed Description

Interface implemented by all device drivers.

Examples:
dev/fake_motor.cpp, and dev/file_grabber.cpp.

Definition at line 37 of file DeviceDriver.h.

Public Member Functions

virtual ~DeviceDriver ()
 Destructor. More...
 
virtual bool open (yarp::os::Searchable &config) override
 Open the DeviceDriver. More...
 
virtual bool close () override
 Close the DeviceDriver. 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...
 

Constructor & Destructor Documentation

◆ ~DeviceDriver()

virtual yarp::dev::DeviceDriver::~DeviceDriver ( )
inlinevirtual

Destructor.

Definition at line 43 of file DeviceDriver.h.

Member Function Documentation

◆ close()

virtual bool yarp::dev::DeviceDriver::close ( void  )
inlineoverridevirtual

Close the DeviceDriver.

Returns
true/false on success/failure.

Reimplemented from yarp::os::IConfig.

Reimplemented in yarp::dev::RemoteControlBoard, yarp::dev::RemoteFrameGrabber, yarp::dev::ControlBoardWrapper, yarp::dev::TestMotor, yarp::dev::FakeMotionControl, yarp::dev::ServerGrabber, yarp::dev::RGBDSensorWrapper, RpLidar, yarp::dev::FakeBot, yarp::dev::depthCameraDriver, yarp::dev::RGBDSensorClient, yarp::dev::ControlBoardRemapper, StubDriver, yarp::dev::BoschIMU, yarp::dev::AnalogWrapper, yarp::dev::DynamixelAX12FtdiDriver, yarp::dev::MultipleAnalogSensorsRemapper, yarp::dev::ServerInertial, SerialServoBoard, yarp::dev::RemoteControlBoardRemapper, FakeLaser, yarp::dev::ServerSoundGrabber, yarp::dev::ServerSerial, yarp::dev::realsense2Driver, yarp::dev::AnalogSensorClient, yarp::dev::FrameTransformClient, yarp::dev::ServerFrameGrabber, yarp::dev::PolyDriver, yarp::dev::SerialDeviceDriver, yarp::dev::Rangefinder2DClient, laserHokuyo, yarp::dev::PortAudioDeviceDriver, yarp::dev::MultipleAnalogSensorsClient, yarp::dev::BatteryClient, yarp::dev::MultipleAnalogSensorsServer, yarp::dev::JoypadControlServer, yarp::dev::VirtualAnalogWrapper, yarp::dev::FrameTransformServer, yarp::dev::JoypadControlClient, RpLidar2, LaserFromDepth, yarp::dev::Map2DServer, yarp::dev::SDLJoypad, yarp::dev::OpenCVGrabber, yarp::dev::FfmpegGrabber, yarp::dev::TestFrameGrabber, yarp::dev::FfmpegWriter, yarp::dev::Navigation2DClient, yarp::dev::RobotDescriptionServer, yarp::dev::Localization2DClient, yarp::dev::Rangefinder2DWrapper, yarp::dev::BatteryWrapper, yarp::dev::Map2DClient, yarp::dev::RobotDescriptionClient, yarp::dev::fakeIMU, yarp::dev::FakeAnalogSensor, yarp::dev::OVRHeadset, yarp::dev::fakeDepthCameraDriver, yarp::dev::DeviceGroup, and yarp::dev::DevicePipe.

Examples:
dev/file_grabber.cpp.

Definition at line 64 of file DeviceDriver.h.

◆ getImplementation()

virtual DeviceDriver* yarp::dev::DeviceDriver::getImplementation ( )
inlinevirtual

Some drivers are bureaucrats, pointing at others.

Such drivers override this method.

Returns
"real" device driver

Reimplemented in StubDriver, and yarp::dev::PolyDriver.

Definition at line 101 of file DeviceDriver.h.

◆ open()

virtual bool yarp::dev::DeviceDriver::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::os::IConfig.

Reimplemented in yarp::dev::RemoteControlBoard, yarp::dev::RemoteFrameGrabber, yarp::dev::ControlBoardWrapper, yarp::dev::ServerGrabber, yarp::dev::FakeMotionControl, yarp::dev::RGBDSensorWrapper, RpLidar, yarp::dev::ControlBoardRemapper, yarp::dev::depthCameraDriver, yarp::dev::RGBDSensorClient, StubDriver, yarp::dev::BoschIMU, yarp::dev::AnalogWrapper, yarp::dev::DynamixelAX12FtdiDriver, yarp::dev::MultipleAnalogSensorsRemapper, yarp::dev::ServerInertial, yarp::dev::ServerSerial, FakeLaser, yarp::dev::RemoteControlBoardRemapper, yarp::dev::ServerFrameGrabber, yarp::dev::realsense2Driver, yarp::dev::AnalogSensorClient, yarp::dev::FrameTransformClient, yarp::dev::SerialDeviceDriver, yarp::dev::Rangefinder2DClient, laserHokuyo, yarp::dev::MultipleAnalogSensorsClient, yarp::dev::BatteryClient, yarp::dev::MultipleAnalogSensorsServer, yarp::dev::JoypadControlServer, yarp::dev::TestFrameGrabber, yarp::dev::VirtualAnalogWrapper, yarp::dev::FrameTransformServer, yarp::dev::JoypadControlClient, RpLidar2, LaserFromDepth, SerialServoBoard, yarp::dev::ServerSoundGrabber, yarp::dev::Map2DServer, yarp::dev::SDLJoypad, yarp::dev::PolyDriver, yarp::dev::PortAudioDeviceDriver, yarp::dev::FakeBot, yarp::dev::OpenCVGrabber, yarp::dev::FfmpegGrabber, yarp::dev::TestMotor, yarp::dev::FfmpegWriter, yarp::dev::Navigation2DClient, yarp::dev::RobotDescriptionServer, yarp::dev::Localization2DClient, yarp::dev::Rangefinder2DWrapper, yarp::dev::BatteryWrapper, yarp::dev::Map2DClient, yarp::dev::RobotDescriptionClient, yarp::dev::fakeIMU, yarp::dev::FakeAnalogSensor, yarp::dev::OVRHeadset, yarp::dev::fakeDepthCameraDriver, yarp::dev::DeviceGroup, and yarp::dev::DevicePipe.

Examples:
dev/file_grabber.cpp.

Definition at line 58 of file DeviceDriver.h.

◆ view()

template<class T >
bool yarp::dev::DeviceDriver::view ( T *&  x)
inline

Get an interface to the device driver.

Parameters
xA pointer of type T which will be set to point to this object if that is possible.
Returns
true iff the desired interface is implemented by the device driver.
Examples:
cuda/cuda_gpu.cpp, dev/fake_motor.cpp, dev/file_grabber.cpp, dev/grabber_client.cpp, dev/motortest.cpp, portaudio/sound_receiver.cpp, and portaudio/sound_sender_mic.cpp.

Definition at line 77 of file DeviceDriver.h.


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