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