]> rtime.felk.cvut.cz Git - boost-statechart-viewer.git/commitdiff
Update web page
authorPetr Silhavik <silhavik.p@gmail.com>
Fri, 5 Apr 2013 11:53:44 +0000 (13:53 +0200)
committerPetr Silhavik <silhavik.p@gmail.com>
Fri, 5 Apr 2013 11:53:44 +0000 (13:53 +0200)
www/big.png
www/camera.png
www/index.mdwn
www/small.png
www/stopWatch.png
www/test.cpp

index cacdbdccef97ae5781daa535296fb9f590d55025..19d2a564ceb2051fbc13682284aab443c94cfe0b 100644 (file)
Binary files a/www/big.png and b/www/big.png differ
index 22aa5b97366afd8562baf1f6b275f2e9bc821dc9..7cea5967da442830a33cc17e26a3e60e0d85cf13 100644 (file)
Binary files a/www/camera.png and b/www/camera.png differ
index 6c4bf13931b98ddaa486f6c6ea891bee3ca5d276..e1a07b17e6b8ca4f65d206785b5157f00d4746b6 100644 (file)
@@ -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]]  
index 25e8b155c2c3b1066bad7c25c66b66b3a03dafb3..51ecfdbc33127513e0c700ce66cce1c815a24114 100644 (file)
Binary files a/www/small.png and b/www/small.png differ
index 882b5ce73cdab176b19bd8b4144a4fd3b6846450..1aa5142617920da8076daf35c8af34be8897a51d 100644 (file)
Binary files a/www/stopWatch.png and b/www/stopWatch.png differ
index 3a0ec1184fe7476f66c21b8114ae8a6db093094a..8498130aea2a487fbe56ba865c19f042d3bbb104 100644 (file)
@@ -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;