# Simulator generation

The simulator generator allows to generate a simulator for a CommaSuite model. With this simulator you can walk through the various states of your CommaSuite model via its user interface.

To enable simulator generation add the following to the `.prj` file, e.g. using content assist (ctrl + space):

    import "Camera.interface"

    Project Camera {

    	Generate Simulator {
    	    Simulator_ICamera for interface ICamera
    	    {
                // Input parameters for the interface (only required when interface commands/signals have in parameters)
    	        params: "ICamera.params"
    	    }
    	}
    }

To generate the simulator, run the `.prj` (right click on the `.prj` file → Run As → Run generators). To also execute it select Generate and execute simulator instead. Alternatively the simulator can be started by executing the generated `.jar` in the `src-gen/simulator` folder.

Once the simulator started you will see a window like below:

The client and server section allow to execute actions. The client section contains all the commands and signals, the server section all the replies and notifications. Greyed out actions cannot be executed in the current state. To execute an action click on an enabled action. The possible transitions or clauses will now be shown in the actions section, click on one to execute it. Notice that the executed actions are added to the log section. The controls section allows to i.a. log the current variable values and step back to previous states.