CRINSA-team2025 V1
Documentation du Club Robot INSA Rennes 2025
Chargement...
Recherche...
Aucune correspondance
ActionNode.h
1//
2// Created by awing on 09/05/2026.
3//
4
5#ifndef TEAM2026_ACTIONNODE_H
6#define TEAM2026_ACTIONNODE_H
7#include <functional>
8
9#include "Node.h"
10
11namespace Grafcet {
12 class ActionNode : public Node {
13 public:
18 bool enabled() override {return active;}
19
23 void action() override {
24 if (!active) {
26 active = true;
27 }
28 }
29
30 std::function<void()> actionFunction = nullptr;
31 };
32}
33#endif //TEAM2026_ACTIONNODE_H
Definition ActionNode.h:12
void action() override
execute the actionFunction on raising front
Definition ActionNode.h:23
std::function< void()> actionFunction
std::function pointing to the action to realize
Definition ActionNode.h:30
bool enabled() override
An action node is enabled if active.
Definition ActionNode.h:18
bool active
true if the node is currently active
Definition Node.h:35