YARP
Yet Another Robot Platform
Nop.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2006-2020 Istituto Italiano di Tecnologia (IIT)
3  * All rights reserved.
4  *
5  * This software may be modified and distributed under the terms of the
6  * BSD-3-Clause license. See the accompanying LICENSE file for details.
7  */
8 
9 #ifndef YARP_NOP_NOP_H
10 #define YARP_NOP_NOP_H
11 
12 #include <yarp/os/PeriodicThread.h>
13 #include <yarp/dev/DeviceDriver.h>
14 
15 
16 class Nop :
19 {
20 public:
21  Nop();
22  Nop(const Nop&) = delete;
23  Nop(Nop&&) = delete;
24  Nop& operator=(const Nop&) = delete;
25  Nop& operator=(Nop&&) = delete;
26 
27  ~Nop() override;
28 
29  bool open(yarp::os::Searchable& config) override;
30  bool close() override;
31 
32  void run() override;
33 
34 private:
35  yarp::conf::float64_t period{1.0};
36 };
37 
38 #endif // YARP_NOP_NOP_H
Definition: Nop.h:19
Nop(const Nop &)=delete
void run() override
Loop function.
Definition: Nop.cpp:48
bool open(yarp::os::Searchable &config) override
Open the DeviceDriver.
Definition: Nop.cpp:29
bool close() override
Close the DeviceDriver.
Definition: Nop.cpp:43
~Nop() override
Definition: Nop.cpp:25
Nop(Nop &&)=delete
Nop & operator=(Nop &&)=delete
Nop()
Definition: Nop.cpp:20
Nop & operator=(const Nop &)=delete
Interface implemented by all device drivers.
Definition: DeviceDriver.h:38
An abstraction for a periodic thread.
A base class for nested structures that can be searched.
Definition: Searchable.h:69
double float64_t
Definition: numeric.h:51