SMACC
Loading...
Searching...
No Matches
smacc_client_library
ros_timer_client
src
ros_timer_client
cb_timer_countdown_loop.cpp
Go to the documentation of this file.
1
#include <
ros_timer_client/client_behaviors/cb_timer_countdown_loop.h
>
2
3
namespace
cl_ros_timer
4
{
5
6
CbTimerCountdownLoop::CbTimerCountdownLoop
(uint64_t triggerTickCount)
7
: tickTriggerCount_(triggerTickCount),
8
tickCounter_(0)
9
{
10
}
11
12
void
CbTimerCountdownLoop::onClientTimerTickCallback
()
13
{
14
tickCounter_
++;
15
16
if
(
tickCounter_
%
tickTriggerCount_
== 0)
17
{
18
onTimerTick_
();
19
postCountDownEvent_
();
20
}
21
}
22
23
void
CbTimerCountdownLoop::onEntry
()
24
{
25
this->
requiresClient
(
timerClient_
);
26
timerClient_
->
onTimerTick
(&
CbTimerCountdownLoop::onClientTimerTickCallback
,
this
);
27
}
28
29
void
CbTimerCountdownLoop::onExit
()
30
{
31
}
32
}
// namespace cl_ros_timer
cb_timer_countdown_loop.h
cl_ros_timer::CbTimerCountdownLoop::tickCounter_
uint64_t tickCounter_
Definition:
cb_timer_countdown_loop.h:32
cl_ros_timer::CbTimerCountdownLoop::onExit
virtual void onExit() override
Definition:
cb_timer_countdown_loop.cpp:29
cl_ros_timer::CbTimerCountdownLoop::CbTimerCountdownLoop
CbTimerCountdownLoop(uint64_t triggerTickCount)
Definition:
cb_timer_countdown_loop.cpp:6
cl_ros_timer::CbTimerCountdownLoop::tickTriggerCount_
uint64_t tickTriggerCount_
Definition:
cb_timer_countdown_loop.h:33
cl_ros_timer::CbTimerCountdownLoop::onTimerTick_
smacc::SmaccSignal< void()> onTimerTick_
Definition:
cb_timer_countdown_loop.h:37
cl_ros_timer::CbTimerCountdownLoop::onEntry
virtual void onEntry() override
Definition:
cb_timer_countdown_loop.cpp:23
cl_ros_timer::CbTimerCountdownLoop::postCountDownEvent_
std::function< void()> postCountDownEvent_
Definition:
cb_timer_countdown_loop.h:36
cl_ros_timer::CbTimerCountdownLoop::onClientTimerTickCallback
void onClientTimerTickCallback()
Definition:
cb_timer_countdown_loop.cpp:12
cl_ros_timer::CbTimerCountdownLoop::timerClient_
ClRosTimer * timerClient_
Definition:
cb_timer_countdown_loop.h:35
cl_ros_timer::ClRosTimer::onTimerTick
boost::signals2::connection onTimerTick(void(T::*callback)(), T *object)
Definition:
cl_ros_timer.h:34
smacc::ISmaccClientBehavior::requiresClient
void requiresClient(SmaccClientType *&storage)
Definition:
smacc_client_behavior_impl.h:54
cl_ros_timer
Definition:
cl_ros_timer.h:8
Generated by
1.9.5