The Scenario Plugin allows to save or replay the communication between an User Application and a Cockpit Display System. This Plugin can be used in both the J661 Server, the J661 Client, or the Editor Embedded Server.
In the Editor
The Scenario Plugin is available in the Editor when using the Editor Embedded Server
In the Server
The Scenario Plugin is available in the Server if the following configuration property
- "server.menus": must be set to true (the Server has a ToolBar and a Menubar)
In the Client
The Scenario Plugin is always available in the Client.
The Scenario Plugin is integrated in the Server or Client console, and provides:
The Plugin will save or replay the communication between a UA and a CDS (in both directions) in an XML file, in a Base64 or Hexadecimal encoding. For example (here in base 64):
<scenario type="ua" desc="Generated by Scenario plugin 1.6 for Client 1.6">
<binaryEvent time="50" type="output" size="32" data="sDgAAAAAACDKAgAUADMAALSQAAhDSEFOR0VEANAAAAA=" />
<binaryEvent time="100" type="output" size="24" data="sDgAAAAAABjKAgAMAGQAALHgAADQAAAA" />
To record the communication, you will have to:
- New Scenario: Select the file on which the scenario will be recorded
- Start Record: Start the recording
Now all the comunications between the UA and the CDS will be recorded and saved in the selected XML file. Note that the recording is streamed, so there is no limit to the size of the recorded scenario except the size of the file system.
During the recording,, the toolbar interface will look like:
To stop the recording, ou will have to:
- Pause Record: If you want to pause the recording but be able to continue to record later
- Stop Record: To stop the recording. Note that you will need to stop the recording for the end of the scenario file to be flushed
Note that the recording records both the inputs and the outputs.
To replay a scenario, you will have to:
- Open Scenario: Open the scenario you want to replay
- Play Scenario: Play the scenario
During the replay, the toolbar interface will look like:
You will be able at any moment during the replay to:
- Pause Scenario: Pause the replay
- Stop Scenario: Stop the replay
Note that the replay is streamed, so there is no limit to the size of the scenario for the replay except the size of the file system.
It is possible to use indifferently a Scenario recorded by the Client or the Server. By default the replay will use the appropriate events (inputs or outputs) depending on where the scenario has been recorded and where it is replayed.
For example by default if a scenario has been recorded by a Client, and replayed in a Server, the outputs of this scenario will be used as inputs for the Server.
The Scenario offers several options:
- Replay inputs or outputs: By default, the replay uses the most appropriate direction of events (inputs or outputs) considering where the scenario has been recorded, but it is possible to change the direction
- Hexadecimal: Used to specify if the recording if a scenario should be in hexadecimal (default is Base64)
- Skip beginning: Used to specify if the replay should skip directly to the beginning of the events
- Speed: Used to specify if the replay should occur at the same speed as the recording, or if the replay speed should be smaller or quicker
The Scenario Plugin used in the Client or the Server is configurable through a few configuration
- "scenario.autoStart": will start the recording of the scenario as soon as the Client or Server is connected. This is very important not to lose any communication between the UA and the CDS at start. The value of this property is the file where the scenario will be recorded
- "scenario.readerAutoStart": will start the reading of the scenario as soon as the Client or Server is connected. The value of this property is the file where the scenario will be replayed
- "scenario.format": if set to "hexa", the format of the recording will be in hexadecimal
For example, the following properties will start the recording of the scenario as soon as the Server is connected: