Main Page
+
Namespaces
Namespace List
+
Namespace Members
+
All
a
c
d
e
f
g
i
l
m
n
o
p
r
s
t
w
+
Functions
a
c
d
g
i
l
n
o
p
r
s
t
w
Typedefs
Enumerations
+
Enumerator
c
e
p
r
s
+
Classes
Class List
Class Hierarchy
+
Class Members
+
All
a
b
c
d
e
f
g
i
j
l
m
n
o
p
r
s
t
u
v
w
~
+
Functions
a
b
c
d
e
f
g
i
j
l
m
n
o
p
r
s
t
u
v
w
~
+
Variables
a
c
d
e
f
i
m
p
s
t
u
v
+
Typedefs
a
b
c
d
e
f
i
o
p
r
s
v
Enumerations
+
Enumerator
a
b
c
d
e
f
g
i
l
m
n
o
p
r
s
t
u
w
Related Functions
+
Files
File List
+
File Members
+
All
_
b
c
d
f
h
i
l
m
n
p
r
s
t
u
w
+
Functions
c
d
f
h
i
m
n
p
r
s
t
w
Variables
Typedefs
Enumerations
+
Enumerator
d
m
s
Macros
src
tools
WatchdogTimer.cpp
Go to the documentation of this file.
1
// WatchdogTimer.cpp
2
// Copyright (c) SICK AG
3
// created: 06.06.2011, Willhoeft
4
5
#include "
WatchdogTimer.hpp
"
6
#include "
Timer.hpp
"
7
8
14
WatchdogTimer::WatchdogTimer
()
15
{
16
m_timeoutInterval
.
m_duration
= 0.0;
17
m_nextElapseTime
=
Time::now
() +
m_timeoutInterval
;
18
}
19
20
WatchdogTimer::~WatchdogTimer
()
21
{
22
}
23
24
28
void
WatchdogTimer::start
(
const
TimeDuration
interval)
29
{
30
m_timeoutInterval
= interval;
31
reset
();
32
}
33
37
bool
WatchdogTimer::isElapsed
()
38
{
39
if
(
Time::now
() >=
m_nextElapseTime
)
40
{
41
// Timer ist abgelaufen
42
return
true
;
43
}
44
45
// Timer ist noch nicht abgelaufen
46
return
false
;
47
}
48
52
void
WatchdogTimer::reset
()
53
{
54
// Naechste Ablaufzeit setzen
55
m_nextElapseTime
=
Time::now
() +
m_timeoutInterval
;
56
}
57
WatchdogTimer::isElapsed
bool isElapsed()
Definition:
WatchdogTimer.cpp:37
TimeDuration
Definition:
Time.hpp:16
WatchdogTimer::reset
void reset()
Definition:
WatchdogTimer.cpp:52
WatchdogTimer::~WatchdogTimer
virtual ~WatchdogTimer()
Destructor.
Definition:
WatchdogTimer.cpp:20
WatchdogTimer::start
void start(UINT32 seconds)
Restarts the timer. Call this as "ok" signal.
TimeDuration::m_duration
double m_duration
Definition:
Time.hpp:26
WatchdogTimer.hpp
WatchdogTimer::m_nextElapseTime
Time m_nextElapseTime
Definition:
WatchdogTimer.hpp:35
WatchdogTimer::WatchdogTimer
WatchdogTimer()
Constructor.
Definition:
WatchdogTimer.cpp:14
Timer.hpp
Time::now
static Time now()
Definition:
Time.cpp:168
WatchdogTimer::m_timeoutInterval
TimeDuration m_timeoutInterval
Definition:
WatchdogTimer.hpp:36
libsick_ldmrs
Author(s): SICK AG
, Martin Günther
, Jochen Sprickerhof
autogenerated on Wed Oct 26 2022 02:08:38