YARP
Yet Another Robot Platform
 
Loading...
Searching...
No Matches
FakeDeviceWrapper.h
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2024-2024 Istituto Italiano di Tecnologia (IIT)
3 * SPDX-License-Identifier: BSD-3-Clause
4 */
5
6#ifndef YARP_FAKEDEVICEWRAPPER_H
7#define YARP_FAKEDEVICEWRAPPER_H
8
10#include <yarp/dev/PolyDriver.h>
12
23{
24private:
26
27public:
28 FakeDeviceWrapper() = default;
33
34 ~FakeDeviceWrapper() override = default;
35
36 // yarp::dev::DeviceDriver
37 bool open(yarp::os::Searchable& config) override;
38 bool close() override;
39
40 // yarp::dev::WrapperSingle
41 bool detach() override;
42 bool attach(yarp::dev::PolyDriver* drv) override;
43
44 //interfaces
45 yarp::dev::ReturnValue testSetValue(int value) override;
46 yarp::dev::ReturnValue testGetValue(int& value) override;
47};
48
49#endif
FakeDeviceWrapper: A simple device for testing purposes.
bool detach() override
Detach the object (you must have first called attach).
FakeDeviceWrapper(FakeDeviceWrapper &&)=delete
FakeDeviceWrapper & operator=(const FakeDeviceWrapper &)=delete
bool close() override
Close the DeviceDriver.
FakeDeviceWrapper(const FakeDeviceWrapper &)=delete
yarp::dev::ReturnValue testGetValue(int &value) override
This method is used to get a single value from a test device.
~FakeDeviceWrapper() override=default
yarp::dev::ReturnValue testSetValue(int value) override
This method is used to set a single value inside the test device.
bool open(yarp::os::Searchable &config) override
Open the DeviceDriver.
bool attach(yarp::dev::PolyDriver *drv) override
Attach to another object.
FakeDeviceWrapper & operator=(FakeDeviceWrapper &&)=delete
FakeDeviceWrapper()=default
Interface implemented by all device drivers.
A container for a device driver.
Definition PolyDriver.h:23
Helper interface for an object that can wrap/or "attach" to a single other device.
A test interface used internally by continuous integration.
A base class for nested structures that can be searched.
Definition Searchable.h:31