|
infinite_state_machine 1.0.0
Infinite State Machine Library
|
Core definitions for the infinite (unbounded topology and depth albeit limited by memory resources) hierarchical state machine. More...

Go to the source code of this file.
Classes | |
| struct | infinite_state |
| The state structure for the infinite state. This structure represents a state in the infinite state machine. It contains information about the state's parent, composite enter action, and composite exit action. More... | |
Functions | |
| struct infinite_state ** | infinite_state_topology (struct infinite_state *state, int depth, struct infinite_state **topology) |
| Get the topology of the infinite state machine. | |
Core definitions for the infinite (unbounded topology and depth albeit limited by memory resources) hierarchical state machine.
Declares the infinite_state structure (a node in a singly-linked ancestry chain via its super pointer) and a helper to build a forward topology (outer to inner). The enter and exit callbacks are optional (being NULL if unused) and are invoked after push (enter) and after final removal (exit) respectively.
Definition in file infinite_state.h.
| struct infinite_state ** infinite_state_topology | ( | struct infinite_state * | state, |
| int | depth, | ||
| struct infinite_state ** | topology | ||
| ) |
Get the topology of the infinite state machine.
Compute a state's forward topological vector. This function fills the topology vector with the state's sub-states in "forward" order (from the outer state down to the inner). The function returns a pointer to the end of the filled vector.
This is a recursive implementation limited in depth.
| state | The current state. |
| depth | The current depth. |
| topology | The topology array to fill. |
Definition at line 32 of file infinite_state.c.