Skip to content
This repository was archived by the owner on Dec 21, 2023. It is now read-only.

ADBeveridge/finite-state-machine

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Finite State Machine

The finite state machine (FSM) is an machine that can be in exactly one of a finite number of states at any given time. In these implementations, the machine is represented by the C/C++ function construct.

fsm-struct.c is a implemetation of a FSM where everything is inside of a struct, including the function pointer itself. If you have data, such as a string or integer that is needed, it goes into the struct.

fsm-arg.c is a FSM where you pass data to each function individually. If you have a string or integer to parse through, you have to add it to the function prototypes and definitions.

About

An example of a finite state machine

Topics

Resources

License

Stars

Watchers

Forks

Languages