SMACC2
st_second_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
33
34namespace sm_autoware_avp
35{
36// SMACC2 clases
37
40
41using namespace sm_autoware_avp::clients;
42
43// STATE DECLARATION
44struct StSecondPause : smacc2::SmaccState<StSecondPause, SmAutowareAvp>
45{
46 using SmaccState::SmaccState;
47
48 // TRANSITION TABLE
49 typedef boost::mpl::list<
50
52
53 >
55
56 // STATE FUNCTIONS
57 static void staticConfigure()
58 {
59 configure_orthogonal<OrTimer, CbTimerCountdownOnce>(5);
60 }
61
62 void runtimeConfigure() { RCLCPP_INFO(getLogger(), "Entering StSecondPause"); }
63
64 void onEntry() { RCLCPP_INFO(getLogger(), "On Entry!"); }
65
66 void onExit() { RCLCPP_INFO(getLogger(), "On Exit!"); }
67};
68} // namespace sm_autoware_avp
rclcpp::Logger getLogger()
Definition: smacc_state.hpp:36
boost::mpl::list< Transition< EvTimer< CbTimerCountdownOnce, OrTimer >, StNavigateWaypoint1, SUCCESS > > reactions