YARP
Yet Another Robot Platform
 
Loading...
Searching...
No Matches
Nop.cpp
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2006-2021 Istituto Italiano di Tecnologia (IIT)
3 * SPDX-License-Identifier: BSD-3-Clause
4 */
5
6#include "Nop.h"
7
8#include <yarp/os/Log.h>
9#include <yarp/os/LogStream.h>
10#include <yarp/os/Time.h>
11
12
13namespace {
14YARP_LOG_COMPONENT(NOP, "yarp.device.test_nop")
15}
16
18 PeriodicThread(1.0)
19{
20}
21
23{
24}
25
27{
28 if (!this->parseParams(config)) { return false; }
29
31
32 yCInfo(NOP) << "Starting thread";
33 start();
34 yCInfo(NOP) << "Thread started";
35
36 return true;
37}
38
40{
41 return true;
42}
43
45{
46 yCInfo(NOP) << "Doing nothing";
47}
bool parseParams(const yarp::os::Searchable &config) override
Parse the DeviceDriver parameters.
void run() override
Loop function.
Definition Nop.cpp:44
bool open(yarp::os::Searchable &config) override
Open the DeviceDriver.
Definition Nop.cpp:26
bool close() override
Close the DeviceDriver.
Definition Nop.cpp:39
~Nop() override
Definition Nop.cpp:22
Nop()
Definition Nop.cpp:17
bool setPeriod(double period)
Set the (new) period of the thread.
bool start()
Call this to start the thread.
A base class for nested structures that can be searched.
Definition Searchable.h:31
#define yCInfo(component,...)
#define YARP_LOG_COMPONENT(name,...)