The simulator generator allows to generate a simulator for a CommaSuite model. It can be generated for a single interface and for a component. For the interfaces that contain triggers with parameters, replies and notifications with variables or any (*) value parameter files are required.

To enable simulator generation add a task to the .prj file, e.g. using content assist (ctrl + space). See the next example of the Imaging Component Example which generates a simulator for a single interface IImage and for component Supervision.

import "Supervision.component"

Project ImagingProject {

    Generate Simulator {
        Simulator_IImage for interface IImage
        {
            params: "IImage/IImage.params"
        }
        Simulator_Supervision for component Supervision
        {
            params: "IImage/IImage.params"
                    "ITemperature/ITemperature.params"
                    "IAcq/IAcq.params"
        }
    }
}

To generate the simulator, run the .prj (right click on the .prj file → Run AsRun generators). By selecting Run AsGenerate and execute simulator the generated simulators are started after generation. A simulator can also be started to executing the start.bat file in the generated folder in src-gen/simulator.

Execution the simulator for the IImage interface leads to the following user interface:

image

The client and server section allow to execute actions:

Notice that the executed actions are added to the log and sequence (visualization) section.

The controls section allows to

The save button in the top left corner allows to save the log to a text file or as a recording that can be used in the test application. Moreover, the sequence visualization can be saved as a png picture.

Limitations: