MCPcopy Create free account
hub / github.com/botbotrobotics/BotBrain / update

Method update

botbrain_ws/src/bot_state_machine/src/state_controller.cpp:13–42  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

11StateController::~StateController(){}
12
13void StateController::update()
14{
15 const auto s = state_.load(std::memory_order_relaxed);
16 switch (s)
17 {
18 case State::BRINGUP:
19 if (running_.test_and_set()) return;
20 bring_up();
21 running_.clear();
22 break;
23 case State::BRINGDOWN:
24 if (running_.test_and_set()) return;
25 bring_down();
26 running_.clear();
27 break;
28 case State::RESTARTING:
29 if (running_.test_and_set()) return;
30 restarting();
31 running_.clear();
32 break;
33 case State::AUTONOMOUS:
34 break;
35 case State::ERROR:
36 break;
37 case State::IDLE:
38 break;
39 default:
40 break;
41 }
42}
43
44std::optional<lifecycle_msgs::msg::State> StateController::get_node_state(const std::string& node_name)
45{

Callers 15

update_callbackMethod · 0.80
handleSaveEditFunction · 0.80
updatePresetFunction · 0.80
constructorMethod · 0.80
updateCameraPositionMethod · 0.80
Class · 0.80
_toggleFullscreenFunction · 0.80
handleSaveEditFunction · 0.80
saveEditFunction · 0.80
updateMissionMethod · 0.80
setActiveMissionMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected