Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/awetzel/exfsm
Simple elixir library to define a static FSM.
https://github.com/awetzel/exfsm
elixir fsm transition
Last synced: 3 days ago
JSON representation
Simple elixir library to define a static FSM.
- Host: GitHub
- URL: https://github.com/awetzel/exfsm
- Owner: kbrw
- License: mit
- Created: 2014-08-11T09:17:47.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2024-02-19T16:11:51.000Z (10 months ago)
- Last Synced: 2024-04-14T04:08:03.408Z (8 months ago)
- Topics: elixir, fsm, transition
- Language: Elixir
- Size: 32.2 KB
- Stars: 10
- Watchers: 5
- Forks: 5
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- freaking_awesome_elixir - Elixir - Simple elixir library to define a static FSM. (Algorithms and Data structures)
- fucking-awesome-elixir - exfsm - Simple elixir library to define a static FSM. (Algorithms and Data structures)
README
# ExFSM #
[![Build Status](https://travis-ci.org/kbrw/exfsm.svg?branch=master)](https://travis-ci.org/kbrw/exfsm)
Simple elixir library to define composable FSM as function
(not related at all with `:gen_fsm`, no state/process management).- define FSM with handler modules defining each transition as a simple function but using a
macro `deftrans` which creates a function `fsm` returning the fsm transition map for this handler module.
- `deftrans` has the same semantic as [erlang in memory FSM gen_fsm](http://www.erlang.org/doc/man/gen_fsm.html)
- combine together multiple fsm handlers to create a "meta" FSM.
- send event with the function `event` which simply find the right
handler, execute the handler function.## Usage ##
See in [in code documentation](http://hexdocs.pm/exfsm)
# CONTRIBUTING
Hi, and thank you for wanting to contribute.
Please refer to the centralized informations available at: https://github.com/kbrw\#contributing