SMACC2
smacc2_sm_reference_library
sm_autoware_avp
include
sm_autoware_avp
states
st_first_pause.hpp
Go to the documentation of this file.
1
// Copyright 2021 MyName/MyCompany Inc.
2
// Copyright 2021 RobosoftAI Inc. (template)
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
* Authors: Pablo Inigo Blasco, Brett Aldrich
19
*
20
******************************************************************************************************************/
21
22
#pragma once
23
24
#include "rclcpp/rclcpp.hpp"
25
#include "
smacc2/smacc.hpp
"
26
27
// CLIENTS
28
#include "ros_timer_client/cl_ros_timer.hpp"
29
#include "ros_timer_client/client_behaviors/cb_timer_countdown_once.hpp"
30
31
// ORTHOGONALS
32
#include "
sm_autoware_avp/orthogonals/or_autoware_auto.hpp
"
33
34
namespace
sm_autoware_avp
35
{
36
// SMACC2 clases
37
38
using
smacc2::Transition
;
39
using
smacc2::default_transition_tags::SUCCESS
;
40
41
using namespace
sm_autoware_avp::clients
;
42
43
// STATE DECLARATION
44
struct
StFirstPause
:
smacc2::SmaccState
<StFirstPause, SmAutowareAvp>
45
{
46
using
SmaccState::SmaccState;
47
48
// TRANSITION TABLE
49
typedef
boost::mpl::list<
50
51
Transition<EvTimer<CbTimerCountdownOnce, OrTimer>
,
StNavigateWaypoint2
,
SUCCESS
>
52
53
>
54
reactions
;
55
56
// STATE FUNCTIONS
57
static
void
staticConfigure
()
58
{
59
configure_orthogonal<OrTimer, CbTimerCountdownOnce>(12);
60
}
61
62
void
runtimeConfigure
() { RCLCPP_INFO(
getLogger
(),
"Entering StFirstPause"
); }
63
64
void
onEntry
() { RCLCPP_INFO(
getLogger
(),
"On Entry!"
); }
65
66
void
onExit
() { RCLCPP_INFO(
getLogger
(),
"On Exit!"
); }
67
};
68
}
// namespace sm_autoware_avp
smacc2::ISmaccState::getLogger
rclcpp::Logger getLogger()
Definition:
smacc_state.hpp:36
smacc2::SmaccState
Definition:
smacc_state_base.hpp:41
smacc2::Transition
Definition:
smacc_transition.hpp:32
sm_autoware_avp::clients
Definition:
cl_autoware.hpp:35
sm_autoware_avp
Definition:
cl_autoware.hpp:33
or_autoware_auto.hpp
smacc.hpp
sm_autoware_avp::StFirstPause
Definition:
st_first_pause.hpp:45
sm_autoware_avp::StFirstPause::staticConfigure
static void staticConfigure()
Definition:
st_first_pause.hpp:57
sm_autoware_avp::StFirstPause::onExit
void onExit()
Definition:
st_first_pause.hpp:66
sm_autoware_avp::StFirstPause::onEntry
void onEntry()
Definition:
st_first_pause.hpp:64
sm_autoware_avp::StFirstPause::runtimeConfigure
void runtimeConfigure()
Definition:
st_first_pause.hpp:62
sm_autoware_avp::StFirstPause::reactions
boost::mpl::list< Transition< EvTimer< CbTimerCountdownOnce, OrTimer >, StNavigateWaypoint2, SUCCESS > > reactions
Definition:
st_first_pause.hpp:54
sm_autoware_avp::StNavigateWaypoint2
Definition:
st_navigate_waypoint_2.hpp:47
smacc2::default_transition_tags::SUCCESS
Definition:
smacc_types.hpp:72
Generated by
1.9.4