Thunderbots Project
Loading...
Searching...
No Matches
halt_play_fsm.h
1#pragma once
2
3#include "proto/parameters.pb.h"
4#include "shared/constants.h"
5#include "software/ai/hl/stp/play/play_fsm.h"
6#include "software/ai/hl/stp/tactic/halt/halt_tactic.h"
7#include "software/logger/logger.h"
8
10{
12 {
13 };
14 class HaltState;
15
16 DEFINE_PLAY_UPDATE_STRUCT_WITH_CONTROL_AND_COMMON_PARAMS
17
23 explicit HaltPlayFSM(TbotsProto::AiConfig ai_config);
24
30 void updateStop(const Update& event);
31
32
33 auto operator()()
34 {
35 using namespace boost::sml;
36
37 DEFINE_SML_STATE(HaltState)
38
39 DEFINE_SML_EVENT(Update)
40
41 DEFINE_SML_ACTION(updateStop)
42
43 return make_transition_table(
44 // src_state + event [guard] / action = dest_state
45 *HaltState_S + Update_E / updateStop_A = HaltState_S,
46
47 X + Update_E / updateStop_A = X);
48 }
49
50 private:
51 PriorityTacticVector halt_tactics;
52};
Definition halt_play_fsm.h:12
Definition halt_play_fsm.h:10
void updateStop(const Update &event)
Definition halt_play_fsm.cpp:13