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 GenericSensorRosPublisher< yarp::rosmsg::geometry_msgs::WrenchStamped >, GenericSensorRosPublisher< yarp::rosmsg::sensor_msgs::Temperature >, GenericSensorRosPublisher< yarp::rosmsg::geometry_msgs::PoseStamped >, GenericSensorRosPublisher< yarp::rosmsg::sensor_msgs::MagneticField >, GenericSensorRosPublisher< yarp::rosmsg::sensor_msgs::Imu >, AnalogSensorClient, AnalogWrapper, AudioPlayerWrapper, AudioRecorderWrapper, BatteryClient, BatteryWrapper, BoschIMU, ControlBoardRemapper, ControlBoardWrapper, ControlBoard_nws_ros, ControlBoard_nws_yarp, DeviceGroup, DevicePipe, DynamixelAX12FtdiDriver, FakeAnalogSensor, FakeBattery, FakeFrameGrabber [virtual], FakeLaser, FakeMotionControl, FakeOdometry, FakePositionSensor, FfmpegGrabber, FfmpegWriter, FrameGrabberCropper, FrameGrabber_nwc_yarp, FrameGrabber_nws_ros, FrameGrabber_nws_yarp, FrameTransformClient, FrameTransformGetMultiplexer, FrameTransformGet_nwc_ros, FrameTransformGet_nwc_yarp, FrameTransformGet_nws_yarp, FrameTransformServer, FrameTransformSetMultiplexer, FrameTransformSet_nwc_ros, FrameTransformSet_nwc_yarp, FrameTransformSet_nws_yarp, FrameTransformStorage, GenericSensorRosPublisher< ROS_MSG >, JoypadControlClient, JoypadControlServer, LaserFromDepth, LaserFromExternalPort, LaserFromPointCloud, LaserFromRosTopic, Localization2DClient, Localization2DServer, Localization2D_nwc_yarp, Localization2D_nws_ros, Localization2D_nws_yarp, Map2DClient, Map2DServer, Map2DStorage, Map2D_nwc_yarp, Map2D_nws_ros, Map2D_nws_yarp, MobileBaseVelocityControl_nwc_yarp, MobileBaseVelocityControl_nws_ros, MobileBaseVelocityControl_nws_yarp, MultipleAnalogSensorsClient, MultipleAnalogSensorsRemapper, MultipleAnalogSensorsServer, Navigation2DClient, Navigation2D_nwc_yarp, Nop, Odometry2D_nws_ros, Odometry2D_nws_yarp, OpenCVGrabber, PortAudioPlayerDeviceDriver, PortAudioRecorderDeviceDriver, RGBDSensorClient, RGBDSensorFromRosTopic, RGBDSensorWrapper, RGBDToPointCloudSensor_nws_ros, Rangefinder2DClient, Rangefinder2DWrapper, Rangefinder2D_nws_ros, Rangefinder2D_nws_yarp, RemoteControlBoard, RemoteFrameGrabber, RgbdSensor_nws_ros, RgbdSensor_nws_yarp, RobotDescriptionClient, RobotDescriptionServer, RpLidar, RpLidar2, RpLidar3, SDLJoypad, SegFault, SerialDeviceDriver, SerialServoBoard, ServerGrabber, ServerInertial, ServerSerial, StubDriver, TransformClient, TransformServer, USBCameraDriver, UpowerBattery, V4L_camera, VirtualAnalogWrapper, audioFromFileDevice, audioToFileDevice, depthCameraDriver, fakeDepthCameraDriver, fakeIMU, fakeLocalizer, fakeMicrophone, fakeNavigation, fakeSpeaker, laserHokuyo, navigation2DServer, navigation2D_nws_yarp, yarp::dev::DeprecatedDeviceDriver [virtual], and yarp::dev::PolyDriver.

Classes

class  Private
 

Public Member Functions

 DeviceDriver ()
 
 DeviceDriver (const DeviceDriver &other)=delete
 
 DeviceDriver (DeviceDriver &&other) noexcept=delete
 
DeviceDriveroperator= (const DeviceDriver &other)=delete
 
DeviceDriveroperator= (DeviceDriver &&other) noexcept=delete
 
 ~DeviceDriver () override
 
bool open (yarp::os::Searchable &config) override
 Open the DeviceDriver. More...
 
bool close () override
 Close the DeviceDriver. More...
 
virtual std::string id () const
 Return the id assigned to the PolyDriver. More...
 
virtual void setId (const std::string &id)
 Set the id for this device. 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 29 of file DeviceDriver.h.

Constructor & Destructor Documentation

◆ DeviceDriver() [1/3]

DeviceDriver::DeviceDriver ( )
Examples
dev/fake_motor/fake_motor.cpp.

Definition at line 28 of file DeviceDriver.cpp.

◆ DeviceDriver() [2/3]

yarp::dev::DeviceDriver::DeviceDriver ( const DeviceDriver other)
delete

◆ DeviceDriver() [3/3]

yarp::dev::DeviceDriver::DeviceDriver ( DeviceDriver &&  other)
deletenoexcept

◆ ~DeviceDriver()

DeviceDriver::~DeviceDriver ( )
override

Definition at line 33 of file DeviceDriver.cpp.

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, TransformServer, TransformClient, SegFault, Nop, ServerSoundGrabber, ServerSerial, ServerInertial, ServerGrabber, FrameGrabber_nws_yarp, FrameGrabber_nws_ros, ServerFrameGrabber, SerialServoBoard, SerialDeviceDriver, SDLJoypad, RpLidar3, RpLidar2, RpLidar, RobotDescriptionServer, RobotDescriptionClient, RGBDToPointCloudSensor_nws_ros, RGBDSensorWrapper, RgbdSensor_nws_yarp, RgbdSensor_nws_ros, RGBDSensorFromRosTopic, RGBDSensorClient, RemoteFrameGrabber, FrameGrabber_nwc_yarp, RemoteControlBoard, Rangefinder2DWrapper, Rangefinder2D_nws_yarp, Rangefinder2D_nws_ros, Rangefinder2DClient, PortAudioRecorderDeviceDriver, PortAudioPlayerDeviceDriver, PortAudioDeviceDriver, OpenCVGrabber, Odometry2D_nws_yarp, Odometry2D_nws_ros, navigation2DServer, navigation2D_nws_yarp, Navigation2DClient, Navigation2D_nwc_yarp, MultipleAnalogSensorsServer, GenericSensorRosPublisher< ROS_MSG >, GenericSensorRosPublisher< yarp::rosmsg::geometry_msgs::WrenchStamped >, GenericSensorRosPublisher< yarp::rosmsg::sensor_msgs::Temperature >, GenericSensorRosPublisher< yarp::rosmsg::geometry_msgs::PoseStamped >, GenericSensorRosPublisher< yarp::rosmsg::sensor_msgs::MagneticField >, GenericSensorRosPublisher< yarp::rosmsg::sensor_msgs::Imu >, MultipleAnalogSensorsRemapper, MultipleAnalogSensorsClient, MobileBaseVelocityControl_nws_yarp, MobileBaseVelocityControl_nws_ros, MobileBaseVelocityControl_nwc_yarp, Map2DStorage, Map2DServer, Map2D_nws_yarp, Map2D_nws_ros, Map2DClient, Map2D_nwc_yarp, Localization2DServer, Localization2D_nws_yarp, Localization2D_nws_ros, Localization2DClient, Localization2D_nwc_yarp, laserHokuyo, LaserFromRosTopic, LaserFromPointCloud, LaserFromExternalPort, LaserFromDepth, JoypadControlServer, JoypadControlClient, BoschIMU, FrameTransformStorage, FrameTransformSetMultiplexer, FrameTransformSet_nws_yarp, FrameTransformSet_nwc_yarp, FrameTransformSet_nwc_ros, FrameTransformServer, FrameTransformGetMultiplexer, FrameTransformGet_nws_yarp, FrameTransformGet_nwc_yarp, FrameTransformGet_nwc_ros, FrameTransformClient, FrameGrabberCropper, FfmpegWriter, FfmpegGrabber, fakeSpeaker, FakePositionSensor, FakeOdometry, fakeNavigation, FakeMotor, FakeMotionControl, fakeMicrophone, fakeLocalizer, FakeLaser, fakeIMU, FakeFrameGrabber, fakeDepthCameraDriver, FakeBot, FakeBattery, FakeAnalogSensor, DynamixelAX12FtdiDriver, DevicePipe, DeviceGroup, depthCameraDriver, ControlBoardWrapper, ControlBoard_nws_yarp, ControlBoard_nws_ros, RemoteControlBoardRemapper, ControlBoardRemapper, BatteryWrapper, BatteryClient, audioToFileDevice, AudioRecorderWrapper, AudioPlayerWrapper, audioFromFileDevice, AnalogWrapper, and AnalogSensorClient.

Definition at line 59 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 112 of file DeviceDriver.h.

◆ id()

std::string DeviceDriver::id ( ) const
virtual

Return the id assigned to the PolyDriver.

If no name was assigned, returns the name of the device (if set) or an empty string. The value can be set by passing the id option when opening the device or with the setId() method.

Returns
the id for this device.

Reimplemented in StubDriver.

Definition at line 43 of file DeviceDriver.cpp.

◆ 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, navigation2D_nws_yarp, Localization2DServer, Localization2D_nws_yarp, Localization2D_nws_ros, ControlBoardWrapper, ControlBoard_nws_yarp, ControlBoard_nws_ros, RemoteControlBoardRemapper, ControlBoardRemapper, TransformServer, RGBDToPointCloudSensor_nws_ros, RGBDSensorWrapper, RgbdSensor_nws_yarp, RgbdSensor_nws_ros, Rangefinder2DWrapper, Rangefinder2D_nws_yarp, Rangefinder2D_nws_ros, Odometry2D_nws_yarp, Odometry2D_nws_ros, MultipleAnalogSensorsServer, GenericSensorRosPublisher< ROS_MSG >, GenericSensorRosPublisher< yarp::rosmsg::geometry_msgs::WrenchStamped >, GenericSensorRosPublisher< yarp::rosmsg::sensor_msgs::Temperature >, GenericSensorRosPublisher< yarp::rosmsg::geometry_msgs::PoseStamped >, GenericSensorRosPublisher< yarp::rosmsg::sensor_msgs::MagneticField >, GenericSensorRosPublisher< yarp::rosmsg::sensor_msgs::Imu >, Map2DStorage, Map2DServer, Map2D_nws_yarp, Map2D_nws_ros, JoypadControlServer, FrameTransformGet_nws_yarp, FrameTransformGet_nwc_yarp, BatteryWrapper, AudioPlayerWrapper, AnalogWrapper, FakeMotionControl, yarp::dev::PolyDriver, StubDriver, VirtualAnalogWrapper, V4L_camera, USBCameraDriver, UpowerBattery, TransformClient, SegFault, Nop, ServerSoundGrabber, ServerInertial, ServerGrabber, FrameGrabber_nws_yarp, FrameGrabber_nws_ros, ServerFrameGrabber, SerialDeviceDriver, SDLJoypad, RpLidar3, RpLidar2, RpLidar, RobotDescriptionServer, RobotDescriptionClient, RGBDSensorFromRosTopic, RGBDSensorClient, RemoteFrameGrabber, FrameGrabber_nwc_yarp, Rangefinder2DClient, PortAudioRecorderDeviceDriver, PortAudioPlayerDeviceDriver, PortAudioDeviceDriver, OpenCVGrabber, Navigation2DClient, Navigation2D_nwc_yarp, MultipleAnalogSensorsRemapper, MultipleAnalogSensorsClient, MobileBaseVelocityControl_nws_yarp, MobileBaseVelocityControl_nws_ros, MobileBaseVelocityControl_nwc_yarp, Map2DClient, Map2D_nwc_yarp, Localization2DClient, Localization2D_nwc_yarp, laserHokuyo, LaserFromRosTopic, LaserFromPointCloud, LaserFromExternalPort, LaserFromDepth, JoypadControlClient, BoschIMU, FrameTransformStorage, FrameTransformSetMultiplexer, FrameTransformSet_nws_yarp, FrameTransformSet_nwc_yarp, FrameTransformSet_nwc_ros, FrameTransformServer, FrameTransformGetMultiplexer, FrameTransformGet_nwc_ros, FrameTransformClient, FrameGrabberCropper, FfmpegWriter, FfmpegGrabber, fakeSpeaker, FakePositionSensor, FakeOdometry, fakeNavigation, TestMotor, FakeMotor, fakeMicrophone, fakeLocalizer, FakeLaser, fakeIMU, FakeFrameGrabber, fakeDepthCameraDriver, FakeBot, FakeBattery, FakeAnalogSensor, DynamixelAX12FtdiDriver, DevicePipe, DeviceGroup, depthCameraDriver, BatteryClient, audioToFileDevice, AudioRecorderWrapper, audioFromFileDevice, AnalogSensorClient, ServerSerial, SerialServoBoard, and RemoteControlBoard.

Definition at line 53 of file DeviceDriver.h.

◆ operator=() [1/2]

DeviceDriver& yarp::dev::DeviceDriver::operator= ( const DeviceDriver other)
delete

◆ operator=() [2/2]

DeviceDriver& yarp::dev::DeviceDriver::operator= ( DeviceDriver &&  other)
deletenoexcept

◆ setId()

void DeviceDriver::setId ( const std::string &  id)
virtual

Set the id for this device.

Reimplemented in StubDriver.

Definition at line 38 of file DeviceDriver.cpp.

◆ 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
dev/grabber_crop/grabber_crop.cpp.

Definition at line 88 of file DeviceDriver.h.


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