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

Recorder Application



recorder
Function record in an xml file
Distribution scenarioEngine-bin-.zip
Jar files recorderEngine.jar
Modules recorder
Provided services none
Required services none
Optional properties scenario
writeSimpleValues
bufferSize
autoStart
guiPosition
format
splitFiles
includeAllServices
splitNamePattern
splitGroups
splitIndexName
splitTimeName

Image recorderpanelthumb
The built-in Recorder application allows to record in a XML file the content of one or several services subscribed by the application. Ntoe that the record can be replayed by the player Application.

Application properties

The application configuration has the following properties, all optional:
  • "scenario": the optional path of the XML scenario to record. It is possible to set the scenario to record during runtime[1]
    If the "splitFiles" property is true, then the path is the path of the directory which will contain the files
  • "autoStart": true if the recording autostarts at the start of the framework (false by default)
  • "writeSimpleValues": true if simple values are recorded with readable values (by default the values are recorded with their hexadecimal values) (true by default)
  • "bufferSize": the size of the internal byte buffer used to encode the values (default is 5000)
  • "guiPosition": the x and position of the recorder window. The format is <x position;>;<y position;
  • "format": the format of the output. The default format is xml, but it can also be the json format
  • "splitFiles": true if the recorded scenario will be splitted, with one file per sercvice reception. If will only be used if the format is the json format

Specific properties for splitted files


THe following properties are used only if the format property is json and splitFiles is true:
  • "includeAllServices": true if all services should be included in each recorder event
  • "splitNamePattern": the pattern of splitted files
  • "includeAllServices": true if all services should be included in each recorder event
  • "splitIndexName": the name for the index element in splitted files
  • "splitTimeName": the name for the time and absolut time elements in splitted files
  • "splitGroups": the specification of the groups of services to consider for splitted files

Specification

See:

Required services

The recorder will record all the services for which the recorder module is a subscriber.

For example here the acDatas and fuelState services will be recorded:
      <interfaces>
         <push service="acDatas"/>
         <eventSend service="fuelState"/>
      </interfaces>

File format


The file format of the recorder is specified by the "format" property:
  • The "xml" format (the default format) specifies that the output format of the recorder is the XML file format. This format can be also read by the player Application
  • The "json" format specifies that the output format of the recorder is the JSON file format

The following properties are only used by the "json" file format:
  • "splitFiles": true if the recorded scenario will be splitted, with one file per sercvice reception. If will only be used if the format is the json format
  • "splitNamePattern": the pattern of splitted files, only used if splitFiles is true
  • "includeAllServices": true if all services should be included in each recorder event, only used if splitFiles is true

Usage

You just have to put the recorder in your configuration, and subscribe to the services you want to record. The following window allows to control the recorder:
recorderpanel

Execution heartRate

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

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>
We can add a recorder module in the configuration and make it listen to the two event and published services:
      <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>
         <application name="recorder" >
            <deployment>
               <lib url="recorderEngine.jar" />
            </deployment>
            <modules>
               <module name="recorder" >
                  <interfaces>
                     <listen service="event"/>
                     <listen service="published"/>
                  </interfaces>
               </module>
            </modules>
         </application>
      </applications>

Notes

  1. ^ If the "splitFiles" property is true, then the path is the path of the directory which will contain the files

See also


Categories: builtin-applis

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