SMACC2
Loading...
Searching...
No Matches
smacc2_client_library
ros_timer_client
include
include
ros_timer_client
client_behaviors
cb_ros_timer.hpp
Go to the documentation of this file.
1
// Copyright 2021 RobosoftAI Inc.
2
//
3
// Licensed under the Apache License, Version 2.0 (the "License");
4
// you may not use this file except in compliance with the License.
5
// You may obtain a copy of the License at
6
//
7
// http://www.apache.org/licenses/LICENSE-2.0
8
//
9
// Unless required by applicable law or agreed to in writing, software
10
// distributed under the License is distributed on an "AS IS" BASIS,
11
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
// See the License for the specific language governing permissions and
13
// limitations under the License.
14
15
#pragma once
16
17
#include <ros_timer_client/cl_ros_timer.hpp>
18
#include <
smacc2/smacc.hpp
>
19
20
namespace
cl_ros_timer
21
{
22
class
CbTimer
:
public
smacc2::SmaccClientBehavior
23
{
24
public
:
25
void
onEntry
()
override
;
26
void
onEntry
()
override
;
27
28
template
<
typename
TOrthogonal,
typename
TSourceObject>
29
void
onOrthogonalAllocation
()
30
{
31
this->
postTimerEvent_
= [=]()
32
{ this->
template
postEvent<EvTimer<TSourceObject, TOrthogonal>>(); };
33
}
34
35
void
onClientTimerTickCallback
();
36
37
private
:
38
ClRosTimer
*
timerClient_
;
39
std::function<void()>
postTimerEvent_
;
40
boost::signals2::scoped_connection
c_
;
41
};
42
}
// namespace cl_ros_timer
cl_ros_timer::CbTimer
Definition:
cb_ros_timer.hpp:23
cl_ros_timer::CbTimer::timerClient_
ClRosTimer * timerClient_
Definition:
cb_ros_timer.hpp:38
cl_ros_timer::CbTimer::c_
boost::signals2::scoped_connection c_
Definition:
cb_ros_timer.hpp:40
cl_ros_timer::CbTimer::onOrthogonalAllocation
void onOrthogonalAllocation()
Definition:
cb_ros_timer.hpp:29
cl_ros_timer::CbTimer::postTimerEvent_
std::function< void()> postTimerEvent_
Definition:
cb_ros_timer.hpp:39
cl_ros_timer::CbTimer::onClientTimerTickCallback
void onClientTimerTickCallback()
Definition:
cb_timer.cpp:26
cl_ros_timer::CbTimer::onEntry
void onEntry() override
Definition:
cb_timer.cpp:19
cl_ros_timer::ClRosTimer
Definition:
cl_ros_timer.hpp:40
smacc2::SmaccClientBehavior
Definition:
smacc_client_behavior.hpp:27
cl_ros_timer
Definition:
cl_ros_timer.hpp:23
smacc.hpp
Generated by
1.9.5