YARP
Yet Another Robot Platform
 
Loading...
Searching...
No Matches
FakeDeviceWrapped.cpp
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#include "FakeDeviceWrapped.h"
7
8#include <yarp/os/Log.h>
10#include <yarp/os/LogStream.h>
11
12using namespace yarp::os;
13using namespace yarp::dev;
14
15namespace {
16 YARP_LOG_COMPONENT(FAKEDEVICEUNWRAPPED, "yarp.device.fakeDeviceWrapped")
17}
18
20{
21 yCInfo(FAKEDEVICEUNWRAPPED) << "testSetValue" << value;
22 m_value = value;
23 return ReturnValue_ok;
24}
25
27{
28 yCInfo(FAKEDEVICEUNWRAPPED) << "testGetValue" << m_value;
29 value = m_value;
30 return ReturnValue_ok;
31}
32
34{
35 yCInfo(FAKEDEVICEUNWRAPPED) << "FakeDeviceWrapped opened";
36 return true;
37}
38
40{
41 yCInfo(FAKEDEVICEUNWRAPPED) << "FakeDeviceWrapped closed";
42 return true;
43}
#define ReturnValue_ok
Definition ReturnValue.h:77
bool close() override
Close the DeviceDriver.
bool open(yarp::os::Searchable &config) override
Open the DeviceDriver.
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.
A mini-server for performing network communication in the background.
A base class for nested structures that can be searched.
Definition Searchable.h:31
#define yCInfo(component,...)
#define YARP_LOG_COMPONENT(name,...)
For streams capable of holding different kinds of content, check what they actually have.
An interface to the operating system, including Port based communication.