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 
20 class SegFault :
22  public yarp::os::Thread
23 {
24 public:
25  SegFault();
26  SegFault(const SegFault&) = delete;
27  SegFault(SegFault&&) = delete;
28  SegFault& operator=(const SegFault&) = delete;
29  SegFault& operator=(SegFault&&) = delete;
30 
31  ~SegFault() override;
32 
33  bool open(yarp::os::Searchable& config) override;
34  bool close() override;
35 
36  void run() override;
37 
38 private:
39  yarp::conf::float64_t delay{1.0};
40 };
41 
42 #endif // YARP_SEGFAULT_SEGFAULT_H
yarp::os::Searchable
A base class for nested structures that can be searched.
Definition: Searchable.h:69
SegFault::run
void run() override
Main body of the new thread.
Definition: SegFault.cpp:46
yarp::dev::DeviceDriver
Interface implemented by all device drivers.
Definition: DeviceDriver.h:38
yarp::os::Thread
An abstraction for a thread of execution.
Definition: Thread.h:25
SegFault::~SegFault
~SegFault() override
Definition: SegFault.cpp:24
SegFault::operator=
SegFault & operator=(SegFault &&)=delete
SegFault::open
bool open(yarp::os::Searchable &config) override
Open the DeviceDriver.
Definition: SegFault.cpp:28
SegFault
test_segfault: A test device that causes a segmentation fault.
Definition: SegFault.h:23
Thread.h
SegFault::SegFault
SegFault(SegFault &&)=delete
SegFault::operator=
SegFault & operator=(const SegFault &)=delete
SegFault::SegFault
SegFault(const SegFault &)=delete
yarp::conf::float64_t
double float64_t
Definition: numeric.h:51
SegFault::close
bool close() override
Close the DeviceDriver.
Definition: SegFault.cpp:41
SegFault::SegFault
SegFault()
Definition: SegFault.cpp:20
DeviceDriver.h