CRINSA-team2025 V1
Documentation du Club Robot INSA Rennes 2025
Chargement...
Recherche...
Aucune correspondance
StateMachine.h
1//
2// Created by awing on 09/05/2026.
3//
4
5#ifndef TEAM2026_STATEMACHINE_H
6#define TEAM2026_STATEMACHINE_H
7#include <deque>
8#include <memory_resource>
9
10#include "Node.h"
11namespace Grafcet {
12 class StateMachine {
13 public:
14 StateMachine() = default;
15 explicit StateMachine(Node *startingNode) : startingNode(startingNode) {}
16
21 void setStartingNode(Node *startingNode) {this->startingNode = startingNode;}
22
28 void execute();
29 protected:
30 Node* startingNode = nullptr;
31 std::deque<Node*> activeNodes = {};
32 };
33}
34#endif //TEAM2026_STATEMACHINE_H
Definition Node.h:14
void execute()
Execute the grafcet Uses a queue (activeNodes) to keep track of which node are enabled,...
Definition StateMachine.cpp:9
void setStartingNode(Node *startingNode)
Set the starting node of the grafcet.
Definition StateMachine.h:21