+
+
Go to the source code of this file.
+
+
+
+
◆ AO_SIGNAL
+
+
+
+
+Enumerator |
---|
INIT_SIG | |
+EXIT_SIG | |
+
+
+
+
+
+
+
+
+
diff --git a/event_8h__dep__incl.dot b/event_8h__dep__incl.dot
new file mode 100644
index 0000000..8a8d9ac
--- /dev/null
+++ b/event_8h__dep__incl.dot
@@ -0,0 +1,11 @@
+digraph "src/event/event.h"
+{
+ // LATEX_PDF_SIZE
+ edge [fontname="Helvetica",fontsize="10",labelfontname="Helvetica",labelfontsize="10"];
+ node [fontname="Helvetica",fontsize="10",shape=record];
+ Node1 [label="src/event/event.h",height=0.2,width=0.4,color="black", fillcolor="grey75", style="filled", fontcolor="black",tooltip=" "];
+ Node1 -> Node2 [dir="back",color="midnightblue",fontsize="10",style="solid",fontname="Helvetica"];
+ Node2 [label="src/event/event.c",height=0.2,width=0.4,color="black", fillcolor="white", style="filled",URL="$event_8c.html",tooltip=" "];
+ Node1 -> Node3 [dir="back",color="midnightblue",fontsize="10",style="solid",fontname="Helvetica"];
+ Node3 [label="src/main.c",height=0.2,width=0.4,color="black", fillcolor="white", style="filled",URL="$main_8c.html",tooltip=" "];
+}
diff --git a/event_8h_source.html b/event_8h_source.html
new file mode 100644
index 0000000..3905675
--- /dev/null
+++ b/event_8h_source.html
@@ -0,0 +1,99 @@
+
+
+
+
+
Here is a list of all files with brief descriptions:
+
+
+
+
+
diff --git a/folderclosed.png b/folderclosed.png
new file mode 100644
index 0000000..bb8ab35
Binary files /dev/null and b/folderclosed.png differ
diff --git a/folderopen.png b/folderopen.png
new file mode 100644
index 0000000..d6c7f67
Binary files /dev/null and b/folderopen.png differ
diff --git a/fsm_8c.html b/fsm_8c.html
new file mode 100644
index 0000000..c84c1dc
--- /dev/null
+++ b/fsm_8c.html
@@ -0,0 +1,85 @@
+
+
+
+
+
+
Template Finite State Machine.
+More...
+
#include <assert.h>
+
+
Go to the source code of this file.
+
+ |
+#define | DECLARE_FSM(ACTIVE_OBJECT_T, EVENT_T, STATE_T, eventsMax, statesMax) |
+ | Active Object FSM - A Hybrid of Mealy and Moore State Machines. More...
|
+ |
+#define | DECLARE_GUARD(ACTIVE_OBJECT_T, EVENT_T, CONDITION_FUNCTION, ON_TRUE_FUNCTION, ON_FALSE_FUNCTION) |
+ |
+#define | GUARD(CONDITION_FUNCTION, ON_TRUE_FUNCTION, ON_FALSE_FUNCTION) (GUARD_##CONDITION_FUNCTION##_##ON_TRUE_FUNCTION##_##ON_FALSE_FUNCTION) |
+ |
+
+
+
Template Finite State Machine.
+
- Version
- 0.0.1
+
- Author
- apolisskyi
+
+
+
◆ DECLARE_FSM
+
+
+
+
+
+ #define DECLARE_FSM |
+ ( |
+ |
+ ACTIVE_OBJECT_T, |
+
+
+ |
+ |
+ |
+ EVENT_T, |
+
+
+ |
+ |
+ |
+ STATE_T, |
+
+
+ |
+ |
+ |
+ eventsMax, |
+
+
+ |
+ |
+ |
+ statesMax |
+
+
+ |
+ ) |
+ | |
+
+
+
+
Value:\
+
typedef STATE_T (*EVENT_T##_HANDLE_F)(ACTIVE_OBJECT_T *const activeObject, EVENT_T event); \
+
typedef bool (*EVENT_T##_GUARD_F)(ACTIVE_OBJECT_T *const activeObject, EVENT_T event); \
+
typedef void (*STATE_T##_HANDLE_F)(ACTIVE_OBJECT_T *const activeObject, EVENT_T event); \\
+
STATE_T ACTIVE_OBJECT_T##_FSM_ProcessEventToNextState(\
+
ACTIVE_OBJECT_T *const activeObject, \
+
EVENT_T event, \
+
EVENT_T##_HANDLE_F transitionTable[statesMax][eventsMax] \
+
) { \
+
STATE_T currState = activeObject->state; \
+
EVENT_T##_HANDLE_F stateHandler = transitionTable[currState][event.sig]; \
+
\
+
assert(NULL != stateHandler); \
+
\
+
STATE_T nextState = stateHandler(activeObject, event); \
+
\
+
return nextState; \
+
}; \
+
+
Active Object FSM - A Hybrid of Mealy and Moore State Machines.
+
This Finite State Machine (FSM) implementation combines the elements of both Mealy and Moore models:
+
+- Moore Machine: The FSM provides an
enter
function for states. This function is executed as soon as a state is entered, which is characteristic of Moore machines where outputs (or actions in our case) depend solely on the current state.
+- Mealy Machine: The FSM processes events or inputs using functions like
run
. This behavior is reminiscent of Mealy machines where outputs (or actions) are dependent on both the current state and the input event.
+
+
By combining these elements, this FSM offers the flexibility of both models, allowing for actions on both state entry and based on events.
+
+
+
+
+
◆ DECLARE_GUARD
+
+
+
+
+
+ #define DECLARE_GUARD |
+ ( |
+ |
+ ACTIVE_OBJECT_T, |
+
+
+ |
+ |
+ |
+ EVENT_T, |
+
+
+ |
+ |
+ |
+ CONDITION_FUNCTION, |
+
+
+ |
+ |
+ |
+ ON_TRUE_FUNCTION, |
+
+
+ |
+ |
+ |
+ ON_FALSE_FUNCTION |
+
+
+ |
+ ) |
+ | |
+
+
+
+
Value: REQUEST_STATE GUARD_##CONDITION_FUNCTION##_##ON_TRUE_FUNCTION##_##ON_FALSE_FUNCTION(ACTIVE_OBJECT_T *const activeObject, EVENT_T event) { \
+
if (CONDITION_FUNCTION(activeObject, event)) return ON_TRUE_FUNCTION(activeObject, event); \
+
\
+
return ON_FALSE_FUNCTION(activeObject, event); \
+
};
+
+
+
+
+
◆ GUARD
+
+
+
+
+
+ #define GUARD |
+ ( |
+ |
+ CONDITION_FUNCTION, |
+
+
+ |
+ |
+ |
+ ON_TRUE_FUNCTION, |
+
+
+ |
+ |
+ |
+ ON_FALSE_FUNCTION |
+
+
+ |
+ ) |
+ | (GUARD_##CONDITION_FUNCTION##_##ON_TRUE_FUNCTION##_##ON_FALSE_FUNCTION) |
+
+
+
+
+
+
+
+
+
+
+
diff --git a/fsm_8h__dep__incl.dot b/fsm_8h__dep__incl.dot
new file mode 100644
index 0000000..042601c
--- /dev/null
+++ b/fsm_8h__dep__incl.dot
@@ -0,0 +1,9 @@
+digraph "src/fsm/fsm.h"
+{
+ // LATEX_PDF_SIZE
+ edge [fontname="Helvetica",fontsize="10",labelfontname="Helvetica",labelfontsize="10"];
+ node [fontname="Helvetica",fontsize="10",shape=record];
+ Node1 [label="src/fsm/fsm.h",height=0.2,width=0.4,color="black", fillcolor="grey75", style="filled", fontcolor="black",tooltip="Template Finite State Machine."];
+ Node1 -> Node2 [dir="back",color="midnightblue",fontsize="10",style="solid",fontname="Helvetica"];
+ Node2 [label="src/fsm/fsm.c",height=0.2,width=0.4,color="black", fillcolor="white", style="filled",URL="$fsm_8c.html",tooltip=" "];
+}
diff --git a/fsm_8h__incl.dot b/fsm_8h__incl.dot
new file mode 100644
index 0000000..ace866c
--- /dev/null
+++ b/fsm_8h__incl.dot
@@ -0,0 +1,9 @@
+digraph "src/fsm/fsm.h"
+{
+ // LATEX_PDF_SIZE
+ edge [fontname="Helvetica",fontsize="10",labelfontname="Helvetica",labelfontsize="10"];
+ node [fontname="Helvetica",fontsize="10",shape=record];
+ Node1 [label="src/fsm/fsm.h",height=0.2,width=0.4,color="black", fillcolor="grey75", style="filled", fontcolor="black",tooltip="Template Finite State Machine."];
+ Node1 -> Node2 [color="midnightblue",fontsize="10",style="solid",fontname="Helvetica"];
+ Node2 [label="assert.h",height=0.2,width=0.4,color="grey75", fillcolor="white", style="filled",tooltip=" "];
+}
diff --git a/fsm_8h_source.html b/fsm_8h_source.html
new file mode 100644
index 0000000..caeefe4
--- /dev/null
+++ b/fsm_8h_source.html
@@ -0,0 +1,129 @@
+
+
+
+
+
Here is a list of all class members with links to the classes they belong to:
+
+
+
+
+
diff --git a/functions_vars.html b/functions_vars.html
new file mode 100644
index 0000000..4f2c378
--- /dev/null
+++ b/functions_vars.html
@@ -0,0 +1,91 @@
+
+
+
+
+
Here is a list of all file members with links to the files they belong to:
+
+
+
+
+
diff --git a/globals_defs.html b/globals_defs.html
new file mode 100644
index 0000000..7572181
--- /dev/null
+++ b/globals_defs.html
@@ -0,0 +1,94 @@
+
+
+
+
+
This page explains how to interpret the graphs that are generated by doxygen.
+
Consider the following example:
+
class Invisible { };
+
+
+
class Truncated : public Invisible { };
+
+
+
class Undocumented { };
+
+
+
class PublicBase : public Truncated { };
+
+
+
template<class T> class Templ { };
+
+
+
class ProtectedBase { };
+
+
+
class PrivateBase { };
+
+
+
class Used { };
+
+
+
class Inherited : public PublicBase,
+
protected ProtectedBase,
+
private PrivateBase,
+
public Undocumented,
+
public Templ<int>
+
{
+
private:
+
Used *m_usedClass;
+
};
+
This will result in the following graph:
+
The boxes in the above graph have the following meaning:
+
+-
+A filled gray box represents the struct or class for which the graph is generated.
+-
+A box with a black border denotes a documented struct or class.
+-
+A box with a gray border denotes an undocumented struct or class.
+-
+A box with a red border denotes a documented struct or class forwhich not all inheritance/containment relations are shown. A graph is truncated if it does not fit within the specified boundaries.
+
+
The arrows have the following meaning:
+
+-
+A dark blue arrow is used to visualize a public inheritance relation between two classes.
+-
+A dark green arrow is used for protected inheritance.
+-
+A dark red arrow is used for private inheritance.
+-
+A purple dashed arrow is used if a class is contained or used by another class. The arrow is labelled with the variable(s) through which the pointed class or struct is accessible.
+-
+A yellow dashed arrow denotes a relation between a template instance and the template class it was instantiated from. The arrow is labelled with the template parameters of the instance.
+
+
+
+
+
+
diff --git a/index.html b/index.html
new file mode 100644
index 0000000..4527366
--- /dev/null
+++ b/index.html
@@ -0,0 +1,75 @@
+
+
+
+