Gazebo Sim
API Reference
7.9.0
insert_drive_file
Tutorials
library_books
Classes
toc
Namespaces
insert_drive_file
Files
launch
Gazebo Website
Index
List
Hierarchy
Members: All
Members: Functions
Members: Variables
Members: Typedefs
Members: Enumerations
Members: Enumerator
List
Members
Functions
Typedefs
Variables
Enumerations
Enumerator
src
gz-sim
src
systems
elevator
utils
DoorTimer.hh
Go to the documentation of this file.
1
/*
2
* Copyright (C) 2021 Open Source Robotics Foundation
3
*
4
* Licensed under the Apache License, Version 2.0 (the "License");
5
* you may not use this file except in compliance with the License.
6
* You may obtain a copy of the License at
7
*
8
* http://www.apache.org/licenses/LICENSE-2.0
9
*
10
* Unless required by applicable law or agreed to in writing, software
11
* distributed under the License is distributed on an "AS IS" BASIS,
12
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
* See the License for the specific language governing permissions and
14
* limitations under the License.
15
*
16
*/
17
18
/*
19
* \author Nick Lamprianidis <nlamprian@gmail.com>
20
* \date January 2021
21
*/
22
23
#ifndef GZ_SIM_SYSTEMS_DOOR_TIMER_HH_
24
#define GZ_SIM_SYSTEMS_DOOR_TIMER_HH_
25
26
#include <chrono>
27
#include <functional>
28
#include <memory>
29
30
#include <
gz/sim/System.hh
>
31
32
namespace
gz
33
{
34
namespace
sim
35
{
36
// Inline bracket to help doxygen filtering
37
inline
namespace
GZ_SIM_VERSION_NAMESPACE {
38
namespace
systems
39
{
40
// Data forward declaration
41
class
DoorTimerPrivate;
42
48
class
DoorTimer
49
{
52
public
:
DoorTimer
(
const
std::chrono::steady_clock::duration &_waitDuration);
53
55
public
: ~
DoorTimer
();
56
61
public
:
void
Configure(
const
std::chrono::steady_clock::duration &_startTime,
62
const
std::function
<
void
()> &_timeoutCallback);
63
68
public
:
void
Update(
const
UpdateInfo
&_info,
bool
_isDoorwayBlocked);
69
71
private
:
std::unique_ptr<DoorTimerPrivate>
dataPtr;
72
};
73
74
}
// namespace systems
75
}
// namespace GZ_SIM_VERSION_NAMESPACE
76
}
// namespace sim
77
}
// namespace gz
78
79
#endif // GZ_SIM_SYSTEMS_DOOR_TIMER_HH_