The recording capability of the Cameo Simulation Toolkit allows you to:

This section demonstrates how to record the signal, state change, operation call, and value change as a sequence diagram during a model simulation. The sample FlashingLight.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. An empty sequence diagram will be created.

Whenever you simulate a model (such as Flashing Light as shown in the figure above), Cameo Simulation Toolkit will:


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


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 SequenceDiagramGeneratorConfig


A SequenceDiagramGeneratorConfig element showing its parameters.

A 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 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. In the Containment tree, right-click the Model folder (root folder) and select Create Diagram.



  2. Do one of the following:
  3. From the Simulation Configuration Diagram palette, drag the Sequence Diagram Generator to the diagram pane.



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



  5. 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, such as RecordTimestamp.


  6. 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.