Real time code generation example with Envision UML-C++ ® by CASE-France Application : Multi Threads C++ Electronic Switch This example mainly shows states chart and multi threads (“do” activities) automatic code generation. Envision UML-C++ produces a running application
Use Cases views For analysis purpose only Not used by code generator
Deployment view For information only - Not used in his example Not used by code generator
Components view Components & Packages are used by code generator, if available, to create a physical design. Main Program object is used by code generator to create the main() function in order to make the application executable
Logical view This class diagram is used by code generator This class contains a States:/Tran sitions diagram To States chart
States/Transitions diagrams This is the first level states diagram of the class Used by code generator to create kernel algorithm This is a compound state See next slide
States/Transitions diagrams Hierarchical compound states diagrams Used by code generator From previous diagram
Code generated 4 bodies files (.cpp) with corresponding header files (.h) have been generated according to component views Those files once compiled with Borland C++ are executable. We mean, the application is running. A log file containing generation steps with various details, errors and warnings has been produced.
Code generated files structure Impulsi5.cpp (contains the main() function) SwitchC3.cpp and.h (the application) ClockCo2.cpp and.h (the timer class code) Borland4.cpp and.h (Borland declaration) Ask for the C++ source files and the project log file (ASCII)
Thank you Please fell free to call for more details