From: Petr Silhavik Date: Fri, 5 Apr 2013 11:53:44 +0000 (+0200) Subject: Update web page X-Git-Url: http://rtime.felk.cvut.cz/gitweb/boost-statechart-viewer.git/commitdiff_plain/f63e1dc8b72fc644c2acaaa12a0860d4ca33be37 Update web page --- diff --git a/www/big.png b/www/big.png index cacdbdc..19d2a56 100644 Binary files a/www/big.png and b/www/big.png differ diff --git a/www/camera.png b/www/camera.png index 22aa5b9..7cea596 100644 Binary files a/www/camera.png and b/www/camera.png differ diff --git a/www/index.mdwn b/www/index.mdwn index 6c4bf13..e1a07b1 100644 --- a/www/index.mdwn +++ b/www/index.mdwn @@ -16,8 +16,8 @@ is released under the GNU GPL license. NEWS ----- +- 2013-04-05 The program is working with LLVM and Clang version 3.0 or higher - 2012-07-11 We have got a new [mailing list][list]. -- 2011-08-11 Added support for orthogonal states. Authors -------- @@ -30,29 +30,24 @@ Petr Silhavik, Michal Sojka. You can contact us using a Status ------- -- The program can found states and transitions in the source code. Now it also supports orthogonal states. -- The program understands all options and flags as the compilers (gcc, clang, ...). +- The program can found states and transitions in the source code. +- The program understands all options and flags as the compilers (gcc, clang, ...). The syntax analysis is done by compiler clang. - State machines can be defined in more than one file. -- The state machine can be inside many namespaces, but not inside templates. +- Program provides diagnostics of state machines eg. event usage, missing typedefs for reactions. For compiling and correctly working program it is necessary to have -LLVM and clang version 2.9. We are currently trying to update it for -LLVM 3.1. +LLVM and clang version 3.0 or higher. Usage ------ -The program can be used almost the same way as a C compiler. You will -typically need to specify locations for all header files except of the -files stored in system folder(in Linux: /usr/...) using `-I` option. -Of course you can specify the output filename (`-o` option). Program -displays all diagnostic messages like compilers. If an error occurs -the program stops. +The program is plugin for compiler clang. The produced output file has the same name as the input file with source code. +It is also possible to use script that also produces the state diagram in format pdf. It can be also found in repository. ####Example of command line invocation: - ./visualizer main.cpp -o graph.dot -I /home/petr/install/ + clang++ -Xclang -load -Xclang visualizer.so -Xclang -plugin -Xclang visualize-statechart -c file.cpp The output file can be transformed into the picture using classical [dot][graphviz] commands (e.g. `dot -Tpng graph.dot -o graph.png`) . The initial @@ -83,8 +78,10 @@ Gallery [[Source code|StopWatch.cpp]] ### Camera + - Camera example from boost statechart library + - State Storing is red because it has no typedef for reactions and it can be error produced by programmer [[camera.png]] -[[Source code|StopWatch.cpp]] +[[Source code|camera.tar.gz]] ### Big [[big.png]] diff --git a/www/small.png b/www/small.png index 25e8b15..51ecfdb 100644 Binary files a/www/small.png and b/www/small.png differ diff --git a/www/stopWatch.png b/www/stopWatch.png index 882b5ce..1aa5142 100644 Binary files a/www/stopWatch.png and b/www/stopWatch.png differ diff --git a/www/test.cpp b/www/test.cpp index 3a0ec11..8498130 100644 --- a/www/test.cpp +++ b/www/test.cpp @@ -18,8 +18,8 @@ struct state_1; // definice stavu struct state_2; // definice stavu struct state_3; // definice stavu struct state_4; // definice stavu -struct EvA : sc::event< EvA > {};//stisteno A -struct EvN : sc::event< EvN > {};//stisteno N +struct EvYes : sc::event< EvYes > {};//stisteno A +struct EvNo : sc::event< EvNo > {};//stisteno N struct EvTimer : sc::event< EvTimer > {};//vyprsel cas struct DU : sc::state_machine< DU, state_1 > {};//Nastaveni inicializacniho stavu @@ -39,8 +39,8 @@ struct state_1 : sc::simple_state< state_1, DU> // stav state_1() { cout<<"Chcete zformatovat vas disk (a/n) ? \n";}//FSM_Entry ~state_1() {}//FSM_Exit typedef mpl::list< // reakce na udalosti - sc::transition< EvA, state_4 >, - sc::transition< EvN, state_2 > > reactions; + sc::transition< EvYes, state_4 >, + sc::transition< EvNo, state_2 > > reactions; }; struct state_2 : sc::simple_state< state_2, DU > { @@ -81,7 +81,7 @@ struct state_3 : sc::simple_state< state_3, DU > } ~state_3() {} typedef mpl::list< - sc::transition< EvN, state_1 >, + sc::transition< EvNo, state_1 >, sc::transition< EvTimer, state_4 > > reactions; }; struct state_4 : sc::simple_state< state_4, DU > @@ -111,8 +111,8 @@ void *nacitani (void * ptr) while(1) { cin >> s; - if (s == "n") Zm.process_event (EvN()); - if (s == "a") Zm.process_event (EvA()); + if (s == "n") Zm.process_event (EvNo()); + if (s == "a") Zm.process_event (EvYes()); if (s == "exit") break; } return NULL;