Integrations (PTC products, 3rd party products and code) > Code integration (Ada, ARINC 653, C, C#, C++, IDL, Java, SQL and VB) > System generation for simulation - C, C++ and Java code > Class model and state diagram definition > Overview of class model and state diagram definition (system simulation)
  
Overview of class model and state diagram definition (system simulation)
Through Modeler, you can create Class Diagrams and Composite Structure Diagrams to define Classes and their relationships with one another. You can then define the behavior of specific Classes through State Diagrams.
Before generating state machine code for a State Diagram, you should check that the diagram is valid. You do this by right-clicking the State Diagram, pointing to Report, and then clicking Consistency. The report is generated to the Output pane, and it lists errors and warnings:
Errors—indicate that ACS for C, C++ or Java may fail to produce working code from the State Diagram.
Warnings—indicate that the code produced by ACS for C, C++ or Java may not work as expected.
Rectify the problems that are causing the errors and warnings, and then repeat the consistency checks. When you are satisfied that the State Diagrams are defined correctly, you can generate code for them through ACS.
You can set up a State Diagram's owning Class so that ACS does not generate state machine code the State Diagram.