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 AnalogSensorClient, AnalogWrapper, audioFromFileDevice, AudioPlayerWrapper, AudioRecorderWrapper, audioToFileDevice, BatteryClient, BatteryWrapper, BoschIMU, ControlBoardRemapper, ControlBoardWrapper, depthCameraDriver, DeviceGroup, DevicePipe, DynamixelAX12FtdiDriver, FakeAnalogSensor, FakeBattery, FakeBot, fakeDepthCameraDriver, FakeFrameGrabber, fakeIMU, FakeLaser, fakeLocalizer, fakeMicrophone, FakeMotionControl, FakeMotor, fakeNavigation, fakeSpeaker, FfmpegGrabber, FfmpegWriter, FrameTransformClient, FrameTransformServer, GenericSensorRosPublisher< ROS_MSG >, GenericSensorRosPublisher< yarp::rosmsg::geometry_msgs::PoseStamped >, GenericSensorRosPublisher< yarp::rosmsg::geometry_msgs::WrenchStamped >, GenericSensorRosPublisher< yarp::rosmsg::sensor_msgs::Imu >, GenericSensorRosPublisher< yarp::rosmsg::sensor_msgs::MagneticField >, GenericSensorRosPublisher< yarp::rosmsg::sensor_msgs::Temperature >, JoypadControlClient, JoypadControlServer, LaserFromDepth, LaserFromExternalPort, LaserFromPointCloud, LaserFromRosTopic, laserHokuyo, Localization2DClient, Localization2DServer, Map2DClient, Map2DServer, MultipleAnalogSensorsClient, MultipleAnalogSensorsRemapper, MultipleAnalogSensorsServer, Navigation2DClient, navigation2DServer, Nop, OpenCVGrabber, PortAudioPlayerDeviceDriver, PortAudioRecorderDeviceDriver, Rangefinder2DClient, Rangefinder2DWrapper, RemoteControlBoard, RemoteFrameGrabber, RGBDSensorClient, RGBDSensorFromRosTopic, RGBDSensorWrapper, RobotDescriptionClient, RobotDescriptionServer, RpLidar, RpLidar2, SDLJoypad, SegFault, SerialDeviceDriver, SerialServoBoard, ServerGrabber, ServerInertial, ServerSerial, StubDriver, UpowerBattery, USBCameraDriver, V4L_camera, VirtualAnalogWrapper, yarp::dev::DeprecatedDeviceDriver, yarp::dev::OVRHeadset, and yarp::dev::PolyDriver.

Public Member Functions

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

Detailed Description

Interface implemented by all device drivers.

Examples
dev/fake_motor/fake_motor.cpp.

Definition at line 37 of file DeviceDriver.h.

Constructor & Destructor Documentation

◆ ~DeviceDriver()

yarp::dev::DeviceDriver::~DeviceDriver ( )
overridedefault

Destructor.

Member Function Documentation

◆ close()

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

Close the DeviceDriver.

Returns
true/false on success/failure.

Reimplemented from yarp::os::IConfig.

Reimplemented in yarp::dev::PolyDriver, StubDriver, VirtualAnalogWrapper, V4L_camera, USBCameraDriver, UpowerBattery, FrameTransformServer, FrameTransformClient, SegFault, Nop, ServerSoundGrabber, ServerSerial, ServerInertial, ServerGrabber, ServerFrameGrabber, SerialServoBoard, SerialDeviceDriver, SDLJoypad, RpLidar2, RpLidar, RobotDescriptionServer, RobotDescriptionClient, RGBDSensorWrapper, RGBDSensorFromRosTopic, RGBDSensorClient, RemoteFrameGrabber, RemoteControlBoard, Rangefinder2DWrapper, Rangefinder2DClient, PortAudioRecorderDeviceDriver, PortAudioPlayerDeviceDriver, PortAudioDeviceDriver, OpenCVGrabber, navigation2DServer, Navigation2DClient, MultipleAnalogSensorsServer, GenericSensorRosPublisher< ROS_MSG >, GenericSensorRosPublisher< yarp::rosmsg::sensor_msgs::Temperature >, GenericSensorRosPublisher< yarp::rosmsg::geometry_msgs::WrenchStamped >, GenericSensorRosPublisher< yarp::rosmsg::geometry_msgs::PoseStamped >, GenericSensorRosPublisher< yarp::rosmsg::sensor_msgs::MagneticField >, GenericSensorRosPublisher< yarp::rosmsg::sensor_msgs::Imu >, MultipleAnalogSensorsRemapper, MultipleAnalogSensorsClient, Map2DServer, Map2DClient, Localization2DServer, Localization2DClient, laserHokuyo, LaserFromRosTopic, LaserFromPointCloud, LaserFromExternalPort, LaserFromDepth, JoypadControlServer, JoypadControlClient, BoschIMU, FfmpegWriter, FfmpegGrabber, fakeSpeaker, fakeNavigation, FakeMotor, FakeMotionControl, fakeMicrophone, fakeLocalizer, FakeLaser, fakeIMU, FakeFrameGrabber, fakeDepthCameraDriver, FakeBot, FakeBattery, FakeAnalogSensor, DynamixelAX12FtdiDriver, DevicePipe, DeviceGroup, depthCameraDriver, ControlBoardWrapper, RemoteControlBoardRemapper, ControlBoardRemapper, BatteryWrapper, BatteryClient, audioToFileDevice, AudioRecorderWrapper, AudioPlayerWrapper, audioFromFileDevice, AnalogWrapper, AnalogSensorClient, and yarp::dev::OVRHeadset.

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 yarp::dev::PolyDriver, and StubDriver.

Definition at line 101 of file DeviceDriver.h.

◆ open()

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 navigation2DServer, Localization2DServer, ControlBoardWrapper, RemoteControlBoardRemapper, ControlBoardRemapper, FrameTransformServer, RGBDSensorWrapper, Rangefinder2DWrapper, MultipleAnalogSensorsServer, GenericSensorRosPublisher< ROS_MSG >, GenericSensorRosPublisher< yarp::rosmsg::sensor_msgs::Temperature >, GenericSensorRosPublisher< yarp::rosmsg::geometry_msgs::WrenchStamped >, GenericSensorRosPublisher< yarp::rosmsg::geometry_msgs::PoseStamped >, GenericSensorRosPublisher< yarp::rosmsg::sensor_msgs::MagneticField >, GenericSensorRosPublisher< yarp::rosmsg::sensor_msgs::Imu >, Map2DServer, JoypadControlServer, BatteryWrapper, AudioPlayerWrapper, AnalogWrapper, FakeMotionControl, yarp::dev::PolyDriver, StubDriver, VirtualAnalogWrapper, V4L_camera, USBCameraDriver, UpowerBattery, FrameTransformClient, SegFault, Nop, ServerSoundGrabber, ServerInertial, ServerGrabber, ServerFrameGrabber, SerialDeviceDriver, SDLJoypad, RpLidar2, RpLidar, RobotDescriptionServer, RobotDescriptionClient, RGBDSensorFromRosTopic, RGBDSensorClient, RemoteFrameGrabber, Rangefinder2DClient, PortAudioRecorderDeviceDriver, PortAudioPlayerDeviceDriver, PortAudioDeviceDriver, OpenCVGrabber, Navigation2DClient, MultipleAnalogSensorsRemapper, MultipleAnalogSensorsClient, Map2DClient, Localization2DClient, laserHokuyo, LaserFromRosTopic, LaserFromPointCloud, LaserFromExternalPort, LaserFromDepth, JoypadControlClient, BoschIMU, FfmpegWriter, FfmpegGrabber, fakeSpeaker, fakeNavigation, TestMotor, FakeMotor, fakeMicrophone, fakeLocalizer, FakeLaser, fakeIMU, TestFrameGrabber, FakeFrameGrabber, fakeDepthCameraDriver, FakeBot, FakeBattery, FakeAnalogSensor, DynamixelAX12FtdiDriver, DevicePipe, DeviceGroup, depthCameraDriver, BatteryClient, audioToFileDevice, AudioRecorderWrapper, audioFromFileDevice, AnalogSensorClient, yarp::dev::OVRHeadset, ServerSerial, SerialServoBoard, and RemoteControlBoard.

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.

Definition at line 77 of file DeviceDriver.h.


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