YARP
Yet Another Robot Platform
SegFault.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_SEGFAULT_SEGFAULT_H
10 #define YARP_SEGFAULT_SEGFAULT_H
11 
12 #include <yarp/os/Thread.h>
13 #include <yarp/dev/DeviceDriver.h>
14 
15 
16 class SegFault :
18  public yarp::os::Thread
19 {
20 public:
21  SegFault();
22  SegFault(const SegFault&) = delete;
23  SegFault(SegFault&&) = delete;
24  SegFault& operator=(const SegFault&) = delete;
25  SegFault& operator=(SegFault&&) = delete;
26 
27  ~SegFault() 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 delay{1.0};
36 };
37 
38 #endif // YARP_SEGFAULT_SEGFAULT_H
bool close() override
Close the DeviceDriver.
Definition: SegFault.cpp:41
bool open(yarp::os::Searchable &config) override
Open the DeviceDriver.
Definition: SegFault.cpp:28
SegFault & operator=(const SegFault &)=delete
SegFault(SegFault &&)=delete
void run() override
Main body of the new thread.
Definition: SegFault.cpp:46
SegFault()
Definition: SegFault.cpp:20
~SegFault() override
Definition: SegFault.cpp:24
SegFault & operator=(SegFault &&)=delete
SegFault(const SegFault &)=delete
Interface implemented by all device drivers.
Definition: DeviceDriver.h:38
A base class for nested structures that can be searched.
Definition: Searchable.h:69
An abstraction for a thread of execution.
Definition: Thread.h:25
double float64_t
Definition: numeric.h:51