SMACC2
sm_atomic_24hr.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#include <smacc2/smacc.hpp>
16
17// CLIENTS
18#include <ros_timer_client/cl_ros_timer.hpp>
19
20//CLIENT BEHAVIORS
21#include <ros_timer_client/client_behaviors/cb_timer_countdown_loop.hpp>
22#include <ros_timer_client/client_behaviors/cb_timer_countdown_once.hpp>
23
24// ORTHOGONALS
25#include "orthogonals/or_timer.hpp"
26
27using namespace boost;
28using namespace smacc2;
29
30namespace sm_atomic_24hr
31{
32//STATE
33class State1;
34class State2;
35
36//--------------------------------------------------------------------
37//STATE_MACHINE
38struct SmAtomic24Hr : public smacc2::SmaccStateMachineBase<SmAtomic24Hr, State1>
39{
40 using SmaccStateMachineBase::SmaccStateMachineBase;
41
42 virtual void onInitialize() override { this->createOrthogonal<OrTimer>(); }
43};
44
45} // namespace sm_atomic_24hr
46
47#include "states/st_state_1.hpp"
48#include "states/st_state_2.hpp"
virtual void onInitialize() override
this function should be implemented by the user to create the orthogonals