libosmocore[master]: contrib: add fsm-to-dot.py to draw osmo_fsm dotty graphs

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

Neels Hofmeyr gerrit-no-reply at lists.osmocom.org
Thu Dec 8 12:24:52 UTC 2016


Patch Set 1:

> I think it would be much better to do it other way around and
 > generate .c code (and corresponding documentation) from .dot files.

To a degree this is possible, i.e. generate the state array definitions, but you will not be able to generate the contents of each state's action functions.

Take a closer look at http://kleinekatze.de/quooXai5/ and see that functions like lu_fsm_wait_lu_compl() are featured in the graphs, and transitions to other FSMs are indicated.

In http://kleinekatze.de/quooXai5/vlr_lu_fsm.dot.png a whole chain of states is managed by functions that merely happen to exist, not even mentioned in the FSM definition arrays.

This code scans the action functions and figures out what other functions send events to it. It shows what the C code actually does, and the C code can decide to do anything in arbitrary complexity. This will simply not work in reverse.

-- 
To view, visit https://gerrit.osmocom.org/1367
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I155f57a608d600f59aedfd27ef66eb9772c124e7
Gerrit-PatchSet: 1
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Owner: Neels Hofmeyr <nhofmeyr at sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Max <msuraev at sysmocom.de>
Gerrit-Reviewer: Neels Hofmeyr <nhofmeyr at sysmocom.de>
Gerrit-HasComments: No



More information about the gerrit-log mailing list