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

FakeDeviceWrapped: A simple device for testing purposes. More...

#include <fake/fakeDeviceWrapped/FakeDeviceWrapped.h>

+ Inheritance diagram for FakeDeviceWrapped:

Public Member Functions

 FakeDeviceWrapped ()=default
 
 FakeDeviceWrapped (const FakeDeviceWrapped &)=delete
 
 FakeDeviceWrapped (FakeDeviceWrapped &&)=delete
 
FakeDeviceWrappedoperator= (const FakeDeviceWrapped &)=delete
 
FakeDeviceWrappedoperator= (FakeDeviceWrapped &&)=delete
 
 ~FakeDeviceWrapped () override=default
 
bool open (yarp::os::Searchable &config) override
 Open the DeviceDriver.
 
bool close () override
 Close the DeviceDriver.
 
void testSetValue (int value) override
 This method is used to set a single value inside the test device.
 
void testGetValue (int &value) override
 This method is used to get a single value from a test device.
 
- 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::test::IFakeDeviceInterfaceTest
virtual ~IFakeDeviceInterfaceTest ()
 

Protected Attributes

int m_value = { 0 }
 

Detailed Description

FakeDeviceWrapped: A simple device for testing purposes.

It is automatically wrapped by FakeDeviceWrapper via deviceBundler device. See also FakeDeviceUnwrapped for an identical device without automatic wrapping.

Definition at line 19 of file FakeDeviceWrapped.h.

Constructor & Destructor Documentation

◆ FakeDeviceWrapped() [1/3]

FakeDeviceWrapped::FakeDeviceWrapped ( )
default

◆ FakeDeviceWrapped() [2/3]

FakeDeviceWrapped::FakeDeviceWrapped ( const FakeDeviceWrapped )
delete

◆ FakeDeviceWrapped() [3/3]

FakeDeviceWrapped::FakeDeviceWrapped ( FakeDeviceWrapped &&  )
delete

◆ ~FakeDeviceWrapped()

FakeDeviceWrapped::~FakeDeviceWrapped ( )
overridedefault

Member Function Documentation

◆ close()

bool FakeDeviceWrapped::close ( )
overridevirtual

Close the DeviceDriver.

Returns
true/false on success/failure.

Reimplemented from yarp::dev::DeviceDriver.

Definition at line 37 of file FakeDeviceWrapped.cpp.

◆ open()

bool FakeDeviceWrapped::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 31 of file FakeDeviceWrapped.cpp.

◆ operator=() [1/2]

FakeDeviceWrapped & FakeDeviceWrapped::operator= ( const FakeDeviceWrapped )
delete

◆ operator=() [2/2]

FakeDeviceWrapped & FakeDeviceWrapped::operator= ( FakeDeviceWrapped &&  )
delete

◆ testGetValue()

void FakeDeviceWrapped::testGetValue ( int value)
overridevirtual

This method is used to get a single value from a test device.

Implements yarp::dev::test::IFakeDeviceInterfaceTest.

Definition at line 25 of file FakeDeviceWrapped.cpp.

◆ testSetValue()

void FakeDeviceWrapped::testSetValue ( int  value)
overridevirtual

This method is used to set a single value inside the test device.

Implements yarp::dev::test::IFakeDeviceInterfaceTest.

Definition at line 19 of file FakeDeviceWrapped.cpp.

Member Data Documentation

◆ m_value

int FakeDeviceWrapped::m_value = { 0 }
protected

Definition at line 24 of file FakeDeviceWrapped.h.


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