Home
Categories
Dictionary
Glossary
Download
Project Details
Changes Log
What Links Here
FAQ
License

Player Application



player
Function replay a recorder scenario defined in an XML file
Distribution scenarioEngine-bin-.zip
Jar files playerEngine.jar
Modules player
Provided services none
Required services none
Optional properties scenario
scenarios
speed
bufferSize
autoStart
autoAdjust
guiPosition

Image playerpanelthumb
The built-in Player application allows to replay a scenario recorded by a recorder Application or a External Communication module.

Application properties

The application configuration has the following properties, all optional:
  • "scenario": the optional path of the XML scenario to replay. It is possible to set the scenario to replay during runtime
  • "scenarios": the optional path of a list of XML scenarios to replay
  • "autoStart": true if the playing autostarts at the start of the framework (false by default)
  • "autoAdjust": true if the playing starts at the first record of the recording, regardless of the time of the first record is (false by default)
  • "speed": the speed of trh replay (1 by default,, which means that the replay has the same speeed as the initial record)
  • "bufferSize": the size of the internal byte buffer used to encode the values (default is 5000)
  • "guiPosition": the x and position of the player window. The format is <x position;>;<y position;

Specification

See:

Required services

The recorder will replay all the services for which the recorder module is a provider.

For example here the acDatas and fuelState services will be replayed:
      <interfaces>
         <subscribed service="acDatas"/>
         <eventReceived service="fuelState"/>
      </interfaces>

File format


Usage

You just have to put the player in your configuration, and subscribe to the services you want to record. The following window allows to control the player:
playerpanel
It is possible to change the speed of the player by going to File => Settings.

Execution heartRate

The scenarioHeart icon will show each time a record is received:
scenarioPanelHeart

Using more than one scenario in one player

It is possible to define more than one scenario to be played at the same time by the player. It allows to manage the speed at the same time and consistently for all the scenarios. For example supposr that we want to replay two scenarios. We could use two players, such as:
      <application name="player">
         <module name="replay1">
            <moduleProperty value="true" key="autoStart"/>
            <moduleProperty key="scenario" value="recordedSystem.xml"/>
            <moduleProperty value="10000" key="bufferSize"/>
         </module>
         <module name="replay2">
            <moduleProperty value="true" key="autoStart"/>
            <moduleProperty key="scenario" value="recordedClock.xml"/>
            <moduleProperty value="10000" key="bufferSize"/>
         </module>
      </application>
Or only one player playing the two scenarios which will allow to manage the speed consistently for the two scenarios:
      <application name="player">
         <module name="replay">
            <moduleProperty value="true" key="autoStart"/>
            <moduleArrayProperty key="scenarios">
               <value value="recordedSystem.xml" />
               <value value="recordedClock.xml" />
            </moduleArrayProperty>
            <moduleProperty value="10000" key="bufferSize"/>
         </module>
      </application>

Example

For the configuration defined for the first tutorial:
      <applications>
         <application name="eventAppli" >
            <deployment>
               <lib url="samples1Event.jar" />
            </deployment>
            <modules>
               <module name="EventModule" >
                  <implementation path="org.da.samples.protoframework.event.EventModule" >
                     <initEntryPoint method="init" />
                     <defaultReceiveEntryPoint method="subscribe" />
                  </implementation>
                  <interfaces>
                     <eventSend service="event" attach="attach"/>
                     <subscribe service="published" />
                  </interfaces>
               </module>
            </modules>
         </application>
         <application name="publishAppli" >
            <deployment>
               <lib url="samples1Publish.jar" />
            </deployment>
            <modules>
               <module name="PublishModule" >
                  <implementation path="org.da.samples.protoframework.publish.PublishModule" >
                     <initEntryPoint method="init" />
                     <defaultReceiveEntryPoint method="subscribe" />
                     <defaultSendEntryPoint method="publish" />
                  </implementation>
                  <interfaces>
                     <eventReceived service="event"/>
                     <cyclic service="published" frequency="200ms" attach="attach"/>
                  </interfaces>
               </module>
            </modules>
         </application>
      </applications>
Suppose that we have recorded a scenario using the recorder application. We can for example replace the publishAppli by the player to get the published service:
      <applications>
         <application name="eventAppli" >
            <deployment>
               <lib url="samples1Event.jar" />
            </deployment>
            <modules>
               <module name="EventModule" >
                  <implementation path="org.da.samples.protoframework.event.EventModule" >
                     <initEntryPoint method="init" />
                     <defaultReceiveEntryPoint method="subscribe" />
                  </implementation>
                  <interfaces>
                     <eventSend service="event" attach="attach"/>
                     <subscribe service="published" />
                  </interfaces>
               </module>
            </modules>
         </application>
         <application name="player" >
            <deployment>
               <lib url="playerEngine.jar" />
            </deployment>
            <modules>
               <module name="player" >
                  <interfaces>
                     <push service="published" />
                  </interfaces>
               </module>
            </modules>
         </application>
      </applications>

See also


Categories: builtin-applis

Copyright 2017-2020 Dassault Aviation. All Rights Reserved. Documentation and source under the LGPL v3 licence