The recording capability of Cameo Simulation Toolkit allows you to:

This section demonstrates how to record signal, state change, operation call, and value change as a sequence diagram during a model simulation. The sample StereoSystem.mdzip, located in the <md.install.dir>/samples/simulation/ directory, will be used throughout this section. 
 

To record signals sent from and to a runtime object and subsequent state/value changes of the related objects as a sequence diagram 


  1. In the Variables pane, select and right-click a runtime object.
  2. Click Create Sequence Diagram on the context menu (see the following figure). An empty sequence diagram will be created.

Creating an Empty Sequence Diagram
Shortcut menu that can be accessed from the simulation console.

 

Whenever you simulate a model (for example, Stereo System as shown in the figure above, Cameo Simulation Toolkit will


StateInvariants are designated by yellow rounded rectangle symbols. See the following figure for examples.


Stereo Systemin StereoSystem.mdzip Sample Project
A sequence diagram depicting call messages running between lifelines.


To see what connector a signal or an operation call is sent through 


 

To see the values of arguments sent with a signal or an operation call


  1. Either double-click a message or right-click it and select Specification to open the specification window.
  2. Select Arguments in the tree on the left-hand side of the specification dialog to see the value of each argument. 

You can customize recorded messages (signals) and lifelines using a SequenceDiagramGeneratorConfig

Using SequenceDiagramGeneratorConfig to Customize Recorded Messages (Signals) and Lifelines
A SequenceDiagramGeneratorConfig element showing its parameters.


SequenceDiagramGeneratorConfig is a stereotype that is inherited from an ExecutionListener stereotype. It contains the following six tag definitions: 

You can specify the default values of recordStateChange, recordValueChange, and recordTimestamp through the Project Options dialog. The values in the project options will be used instead if the tagged values of the sequence diagram generator are not specified. The default values of these project options are true, true, and false (see the following figure). True means all values will be recorded by default.

Options in the Sequence Diagram Generator group in the Project Options dialog.

To customize a Sequence diagram recording  


  1. Create a Simulation Configuration Diagram by doing one of the following:

    Under the Simulation group, choose Simulation Configuration Diagram.





  2. From the Simulation Configuration Diagram palette, drag Sequence Diagram Generator to the diagram.



  3. Right-click the newly created SequenceDiagramGeneratorConfig and select Specification to open its Specification dialog.



  4. Specify the value(s) of the tag definition(s) of the config, e.g., Name.



    You can specify Represents and Value to be captured by the SequenceDiagramGeneratorConfig along with other settings, e.g., RecordTimestamp.


  5. Drag the configured SequenceDiagramGeneratorConfig to the SimulationConfig element (see SimulationConfig stereotype). The executionListeners tag of the SimulationConfig will be shown with the specified name of the SequenceDiagramGeneratorConfig as shown below.