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}
24
26{
27 yCInfo(FAKEDEVICEUNWRAPPED) << "testGetValue" << m_value;
28 value = m_value;
29}
30
32{
33 yCInfo(FAKEDEVICEUNWRAPPED) << "FakeDeviceWrapped opened";
34 return true;
35}
36
38{
39 yCInfo(FAKEDEVICEUNWRAPPED) << "FakeDeviceWrapped closed";
40 return true;
41}
bool close() override
Close the DeviceDriver.
void 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.
void testGetValue(int &value) override
This method is used to get a single value from a 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.
Definition jointData.cpp:13
An interface to the operating system, including Port based communication.