OTX-Runtime for DotNet  
Configuration

The OTX-Runtime API has the following different categories of configuration:

  1. API Runtime Configuration Properties
  2. Runtime Manager Properties
  3. Project Content
  4. Project Settings
  5. Settings of Diagnostic Communication
  6. Settings of Custom Implementations

API Runtime Configuration Properties

The following settings are global settings, see RuntimeConfig.

Setting Data Type Get Set Default Value Description
MinBinVersion String x Gets the minimum version (Major.Minor.Branch.Revision) of the binary file that the OTX Runtime can handle
Version String x Gets the version of the API (Major.Minor.Branch.Revision)
OutputFolder String x x Windows: "[Current User]/AppData/Roaming/OpenTestSystem/OTX-Runtime/",
Linux: "[home]/OpenTestSystem/OTX-Runtime API/"
Gets or sets the folder where all temporary files which are created by the OTX-Runtime are stored
TraceFolder String x x Windows: "[Current User]/AppData/Roaming/OpenTestSystem/OTX-Runtime/Tracing/",
Linux: "[home]/OpenTestSystem/[API Short Version]/OTX-Runtime API/Tracing/"
Gets or sets the OTX-Runtime trace file folder
TraceLevel TraceLevels x x ERROR Gets or sets the OTX-Runtime trace Level. The Tracing is the internal logging of the API.
TraceFileMaxCount Integer x x 10 Gets or sets the OTX-Runtime max number of trace files.
TraceFileMaxSize Integer x x 100 Gets or sets the OTX-Runtime max size of a trace file (in MB).

Runtime Manager Properties

The following settings are valid for each runtime manager instance, see RuntimeManager.

Setting Data Type Get Set Default Value Description
SearchPath String x x [ProjectDir];[ProjectDir]/.. Gets or sets the search path which all relative path specifications inside OTX refer

Project Content

After a Project was loaded from an PTX file, see LoadPtx, the following content of the project will be updated.

Setting Data Type Get Set Description
Name String x Gets the name of the project
Version String x Gets the version of the project
Packages Package x Gets all root packages of the project, see also OTX Browsing
StartupDocument Document x Gets the startup document of the project, see also OTX Browsing
MainProcedure Procedure x Gets the main procedure of the project, see also OTX Browsing

Project Settings

Each project has ProjectSettings. The project settings are grouped into the following categories:

  1. DiagComSettings
  2. i18nSettings
  3. LoggingSettings
  4. QuantitiesSettings
  5. RuntimeSettings
  6. TestResultHandlingSettings

Note: Dependent how an PTX was exported inside the OTX Development Environment, the project settings can be transported via a PTX or PPX file.

The value of the project settings will be overwritten in the following order:

  1. Default value of the setting
  2. Project settings transported inside PTX, see Project
  3. Project settings transported inside PPX, see PlayerProject

    Note: A PPX file contains one or more PTX files, see Projects.

    4. Setting set via the OTX-Runtime API, see ProjectSettings

The project settings can be get or set as single values, see ProjectSettings e.g. ExternalAppPath or LoggingOn or as a block of settings inside a map via

or in C++ and Java

  • SetSettings Method
  • GetSettings Method

Note: The key of the map is the full name of the related project setting, see table below.

Note: The block handling of project settings is a little bit faster then the handling of single values.

The project settings can also contains Settings of Custom Implementations. Each customer implementation can extent this list by new settings. The settings can be distinguished be the full name. The full name contains the Path and the Name of the setting concatenate with a dot ('.').

The following table gives an overview about the project settings, see also ProjectSettings.

Full Name Extension Data Type Get Set Default Value Description
Settings.Logging.Directory Logging String x x Null Name of the directory where the log files stored
Settings.Logging.FileName Logging String x x Name of logging file
Settings.Logging.FileSize Logging Integer x x 10 Size of logging file
Settings.Logging.MaxFileNumber Logging Integer x x 3 Maximum number of total files
Settings.Logging.HeaderFormat Logging String x x Within Header and Message format placeholders can be used. These will be replaced at runtime with the current values​​.
Settings.Logging.MessageFormat Logging String x x Within Header and Message format placeholders can be used. These will be replaced at runtime with the current values​​.
Settings.Logging.LogCommunicationTrace Logging Boolean x x FALSE State of Logging Communication Trace at Runtime
Settings.Logging.LogVariableTrace Logging Boolean x x FALSE State of Logging Variable at Runtime
Settings.Logging.LogOtxException Logging Boolean x x FALSE State of Logging Otx Exception at Runtime
Settings.Logging.LogCommunicationTraceSeverityLevel Logging TraceLevels x x TRACE Log level of LogCommunitionTrace
Settings.Logging.LogVariableTraceSeverityLevel Logging TraceLevels x x TRACE Log level of LogVariableTrace
Settings.Logging.LogOtxExceptionSeverityLevel Logging TraceLevels x x TRACE Log level of LogOtxException
Settings.Logging.WriteId Logging Boolean x x FALSE State of Logging Otx Id at Runtime
Settings.Logging.WriteIdSeverityLevel Logging TraceLevels x x TRACE State of Logging OtxID at Runtime
Settings.Logging.LoggingTargetResolving Logging Boolean x x FALSE This is useful only for exchange of PTX-containers with other tool environments
Settings.Logging.LoggingLevelDefault Logging TraceLevels x x ALL Log level of Logging Extension
Settings.Logging.LoggingOn Logging Boolean x x TRUE State of Logging Runtime
Settings.I18n.Folder I18n String x x Null Directory where the language files stored
Settings.I18n.DefaultLanguage I18n String x x Null Default language of i18n
Settings.Quantity.UnitSpecFiles Quantities String x Null The path of .odx file
Settings.DiagCom.Project DiagCom String x Null The project name of DiagCom
Settings.DiagCom.Vehicle DiagCom String x Null The vehicleInfo of DiagCom
Settings.TestResultHandling.DataModelFile TestResultHandling String x x Null Data model file
Settings.TestResultHandling.TestResultHandlingFileName TestResultHandling String x x "TestResults_???.xml" Test result file name
Settings.TestResultHandling.TestResultHandlingDirectory TestResultHandling String x x Null Directory name
Settings.TestResultHandling.TestResultHandlingLevel TestResultHandling TestResultHandlingLevels x x TRACK The result handling level of the OTX-Runtime
Settings.TestResultHandling.TestResultHandlingOn TestResultHandling Boolean x x TRUE The test result status
Settings.Runtime.ExternalAppPath Runtime Boolean x x TRUE Gets or sets external application path is used
Settings.Runtime.OtxMappings Runtime List<String> x Empty Gets all OTX mapping files, which contained in the project
Settings.Runtime.OtxMapping Runtime String x x Empty Gets or sets the OTX-Mapping filename
Settings.Runtime.ResourceMappings Runtime List<String> x Empty Gets all resource mapping files, which contained in the project
Settings.Runtime.ResourceMapping Runtime String x x Empty Gets or sets the Resource-Mapping filename

Settings of Diagnostic Communication

The settings for diagnostic communication must be set via the DiagManager. To set the settings for diagnostic communication the McdProject and after that the DbVehicleInformation of that project must be selected. This can be done in two ways:

When instantiating the DiagRuntimeSystem

See DiagRuntimeSystem constructor. For this way no DiagManager Client is needed.

// Creates an instance of the VW-MCD with the given project and vehicle name
OpenTestSystem.Otx.DiagManager.Common.IDiagRuntimeSystem diagRuntimeSystem = new OpenTestSystem.Otx.DiagManager.DiagRuntimeSystem.VwMcd90DiagRuntimeSystem("918S_1_23", "CAN");
Namespace containing all common methods for the DiagManage
Definition: Command.cs:9
Namespace containing all objects for the communication to various, interchangeable diagnostic runtime...
Definition: Api2PbTypeConverter.cs:8
Namespace containing all objects which are standardized according to ISO 13209 (OTX)
Namespace containing all objects related to testing inside automotive industry

Dynamically via DiagConfiguration

See DiagConfiguration OTX extension. For this way a DiagManager Client is needed.

// Sets a valid license key to active the DiagManager Server
// Creates a DiagManager client
// Set the settings of diagnostic communication
OpenTestSystem.Otx.DiagManager.OtxDiagApi.IDiagConfiguration diagConfiguration = diagManager.GetDiagConfiguration();
diagConfiguration.SelectProject("918S_1_23");
diagConfiguration.SelectVehicleInformation("CAN");
Factory class for creating the DiagOtxApi
Definition: OtxDiagFactory.cs:38
static IOtxDiag CreateSocketOtxDiag(ushort port=DefaultPort)
Creates a OtxDiag instance inside a separate process with inter process communication
Definition: OtxDiagFactory.cs:80
Class for general utils
Definition: OpenTestSystem.OtxDiagManager.SystemApi/Util.cs:24
static void SetLicenseKey(ushort port, string licenseKey)
Sets a valid license key to active DiagManagerServer
Definition: OpenTestSystem.OtxDiagManager.SystemApi/Util.cs:99
The class is identical to an extension in OTX standard ISO 13209. A detailed specification can be fou...
Definition: IDiagConfiguration.cs:15
void SelectProject(string projectName)
Identical to an action or term in the OTX standard ISO 13209. A detailed specification can be found t...
The class is identical to an extension in OTX standard ISO 13209. A detailed specification can be fou...
Definition: IOtxDiag.cs:15
Namespace covering all actions and terms of all diagnostic related OTX extension by an identical meth...
Definition: Api2PbTypeConverter.cs:8
Namespace containing all commands that are not standardized in OTX and are generally required,...
Definition: SocketServerChecker.cs:11

Note: Please note, that an exception will be thrown, if the DiagRuntimeSystem is not in the right state, e.g. it is connected to the VCI.

Note: Please note, that the change of the settings can have an influence to other clients which are maybe connected.

Settings of Custom Implementations

The settings of all custom implementations are handled via the Project Settings.

Data Type Conversion

In certain situations values with complex data types, e.g. Map<Enumeration> must be handled, e.g. project settings or parameter values. To simplify this, the following two conversion methods are provided.

Note for all settings: To convert an arbitrary complex value to and from a string literal, the following methods can be used: