YARP
Yet Another Robot Platform
 
Loading...
Searching...
No Matches
FakeDeviceWrapped.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_FAKEDEVICEWRAPPED_H
7#define YARP_FAKEDEVICEWRAPPED_H
8
10#include <yarp/dev/PolyDriver.h>
11
22{
23protected:
24 int m_value = { 0 };
25
26public:
27 FakeDeviceWrapped() = default;
32
33 ~FakeDeviceWrapped() override = default;
34
35 // yarp::dev::DeviceDriver
36 bool open(yarp::os::Searchable& config) override;
37 bool close() override;
38
39 //interfaces
40 yarp::dev::ReturnValue testSetValue(int value) override;
41 yarp::dev::ReturnValue testGetValue(int& value) override;
42};
43
44#endif
FakeDeviceWrapped: A simple device for testing purposes.
FakeDeviceWrapped(FakeDeviceWrapped &&)=delete
bool close() override
Close the DeviceDriver.
FakeDeviceWrapped & operator=(const FakeDeviceWrapped &)=delete
FakeDeviceWrapped()=default
bool open(yarp::os::Searchable &config) override
Open the DeviceDriver.
FakeDeviceWrapped & operator=(FakeDeviceWrapped &&)=delete
yarp::dev::ReturnValue testGetValue(int &value) override
This method is used to get a single value from a test device.
yarp::dev::ReturnValue testSetValue(int value) override
This method is used to set a single value inside the test device.
~FakeDeviceWrapped() override=default
FakeDeviceWrapped(const FakeDeviceWrapped &)=delete
Interface implemented by all device drivers.
A test interface used internally by continuous integration.
A base class for nested structures that can be searched.
Definition Searchable.h:31