summaryrefslogtreecommitdiffstats
path: root/contrib/fsm-to-dot.py
Commit message (Collapse)AuthorAgeFilesLines
* contrib/fsm-to-dot.py: some tweaks that help with osmo-bsc's new FSMsNeels Hofmeyr2017-10-241-13/+40
| | | | | | | | | | | | | | | | | | | | | | Combine the C source file name and the string name into the fsm's internal name token, and use it in most places instead of the plain struct name: osmo-bsc's new FSMs have identical struct names in each static c context. Output in a file name that includes all of these more detailed name tokens. Also parse '(1 << EVENT)' as event names. Note that besides this patch, there are also some tweaks to the osmo-bsc patch that improve the fsm-to-dot experience... - call fsm-to-dot for single files to avoid name conflicts, or rename each struct as a unique name. - Add comments for the event name a callback is intended for, so that not all transitions are interpreted as TEARDOWN (because it is invoked in common error handling, which causes the script to interpret it as the causing event). (or change the event-checking if into a switch that names the valid event and has a default case for all others.) Change-Id: Ib60df7fd19efc99ba9fe797f14c0e3239c4bea20
* contrib: add fsm-to-dot.py to draw osmo_fsm dotty graphsNeels Hofmeyr2016-12-091-0/+710
Add a first version of a python script that tries to analyze .c source files to draw graphs of osmo_fsm implementations. So far it uses quick-and-dirty regexes. Change-Id: I155f57a608d600f59aedfd27ef66eb9772c124e7