Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/weirdnox/generic-grafcet
Generic Grafcet implementation, in C, using metaprogramming.
https://github.com/weirdnox/generic-grafcet
c generic grafcet macros metaprogramming preprocessor system
Last synced: 23 days ago
JSON representation
Generic Grafcet implementation, in C, using metaprogramming.
- Host: GitHub
- URL: https://github.com/weirdnox/generic-grafcet
- Owner: weirdNox
- License: other
- Created: 2018-05-15T23:23:16.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2018-05-19T11:47:32.000Z (over 6 years ago)
- Last Synced: 2024-10-29T18:30:57.113Z (2 months ago)
- Topics: c, generic, grafcet, macros, metaprogramming, preprocessor, system
- Language: C
- Size: 74.2 KB
- Stars: 5
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.org
- License: LICENSE.org
Awesome Lists containing this project
README
* Generic Grafcet
This is a program that implements generic Grafcet systems with the help of very simple
macros. It is not provided as a library, but it should be easy to adapt it and embed it in
other programs.It works by having the source be fed to a preprocessor, which generates custom functions
and enums in another file (preprocessor_output.h) that will be included by the original
one. This is a technique called [[https://en.wikipedia.org/wiki/Metaprogramming][metaprogramming]].[[https://youtu.be/t8XrhOiZT2E][Watch a screencast here!]]
** Features
- Generic grafcet system, with a variable number of grafcets, states and transitions
- Customizable inputs and outputs
- With rising and falling edges
- Colorful, automatic debug information
- State timers
- Supervising
- Hierarchy (grafcets with lower index are updated first)
- Grafcet freeze function** The preprocessor
It was based on the simple preprocessor made on [[https://handmadehero.org/][Handmade Hero]] (which is a huge inspiration
for me!). It uses a pseudo [[https://en.wikipedia.org/wiki/Recursive_descent_parser][Recursive Descent]] which only parses some tokens of interest,
from all that are scanned.** Some things missing
- Grafcet reset utility (set it to the starting point)
- Grafcet pausing** License
This is made available in the MIT License, with some third party code documented as such.