OTX-Runtime Converter  
OTX-Runtime Converter API

The OTX-Runtime Converter API is a programming interface for the easy, fast and reliable validation and compilation of OTX procedures in own applications. It works independently even without the OTX Development Environment and is available for Windows and Linux. The API is available for DotNet. It works on Window via Net Framework and on Linux via Net6.0 or higher.

Table of Contents

Overview

The OTX-Runtime Converter API can be integrated into own applications. The API supports

Usage

  1. Sample Program is a console application. It can be used on both Windows and Linux.
  2. Builder-Checker is a GUI application. It can be used on Windows only.

Checker rules for DiagCom

  1. DiagManager must be started before validation. The validation gets DiagCom objects from the DiagManager via IPC (Socket or Pipe).
  2. OpenTestSystem.Otx.RuntimeConverter.Api.IRuntimeConverter.
  3. DiagValidationGroups is a part of checker rules for DiagCom. DiagValidationGroups can be set manually or by importing a *.xml file.

Code Example

How the OTX-Runtime Converter API is used can be seen in the source code of the Runtime Converter API Sample program. The basic proceeding how the OTX-Runtime Converter API can be used is described in the following pseudo code example. The example loads, validates and exports a PTX file with build-in CppOutput.

// Generally applicable Pseudo-Code example
// ========================================
void main()
{
// Set license
// ==========================================
// Set tracelevel to ALL
// ==========================================
// Create RuntimeConverter
// ==========================================
// Load a ptx file with a password
// ==========================================
runtimeConverter.LoadPtx("D:\\Sample.ptx", "This is a password");
// Import DiagValidationGroups.
// ==========================================
runtimeConverter.DiagValidationGroups.Import("D:\\DiagValidationGroups1.xml");
// Set XmlDb Port.
// ==========================================
runtimeConverter.XmlDbPort = 1984
// Validate the ptx
// ==========================================
OpenTestSystem.Otx.RuntimeConverter.Api.Validator.IError[] errors = runtimeConverter.Validate();
if (errors.Length > 0)
{
Console.WriteLine("*** Errors and warnings:");
{
Console.Write("[SeverityType]");
Console.Write(error.SeverityType);
Console.Write(" [Description]");
Console.Write(error.Description);
Console.Write(" [ScopeId]");
Console.Write(error.ScopeId);
Console.Write(" [ScopeName]");
Console.Write(error.ScopeName);
Console.Write(" [ElementType]");
Console.Write(error.ElementType);
Console.Write(" [ErrorCode]");
Console.Write(error.ErrorCode);
Console.Write(" [Procedure]");
Console.Write(error.Procedure);
Console.Write(" [Document]");
Console.Write(error.Document);
Console.Write(" [Package]");
Console.Write(error.Package);
Console.Write(" [Project]");
Console.WriteLine(error.Project);
Console.WriteLine();
}
if (errors.FirstOrDefault(err => err.SeverityType == OpenTestSystem.Otx.RuntimeConverter.Api.Validator.SeverityTypes.Critical) != null)
{
Console.WriteLine("*** The ptx cannot be compiled because it has {0} errors.", errors.Count(err => err.SeverityType == OpenTestSystem.Otx.RuntimeConverter.Api.Validator.SeverityTypes.Critical));
return;
}
}
// Compile the ptx
// ==========================================
runtimeConverter.Compile("D:\\CompiledSample.ptx");
}
OpenTestSystem.Otx.RuntimeConverter.Api.RuntimeConverterFactory.CreateSocketRuntimeConverter
static IRuntimeConverter CreateSocketRuntimeConverter(ushort port)
Creates a Socket Runtime Converter instance.
Definition: RuntimeConverterFactory.cs:36
OpenTestSystem.Otx.RuntimeConverter.Api.Config.TraceLevel
static TraceLevels TraceLevel
Gets or sets TraceLevel. Default is TraceLevels.ERROR.
Definition: Config.cs:105
OpenTestSystem.Otx.RuntimeConverter.Api.Validator
Namespace containing all objects for validation.
Definition: IError.cs:11
OpenTestSystem.Otx.RuntimeConverter.Api.IRuntimeConverter
Represents a checker and a compiler.
Definition: IRuntimeConverter.cs:35
OpenTestSystem.Otx.RuntimeConverter.Api.License.LicenseManager
Class to manage the OTX-Runtime Converter licenses.
Definition: LicenseManager.cs:21
OpenTestSystem.Otx.RuntimeConverter.Api
Namespace containing the programming interface for for validation and compilation of PTX,...
Definition: Config.cs:8
OpenTestSystem.Otx.RuntimeConverter.Api.License
Namespace containing all objects related to licensing
Definition: LicenseManager.cs:16
OpenTestSystem.Otx.RuntimeConverter.Api.RuntimeConverterFactory
Factory class for creating RuntimeConverter, see IRuntimeConverter
Definition: RuntimeConverterFactory.cs:16
OpenTestSystem.Otx.RuntimeConverter.Api.IRuntimeConverter.LoadPtx
void LoadPtx(string fileName)
Loads a PTX file.
OpenTestSystem.Otx
Namespace containing all objects which are standardized according to ISO 13209 (OTX)
OpenTestSystem.Otx.RuntimeConverter
Namespace containing all objects for validation and compilation of PTX, PPX, PROJECT
Definition: Config.cs:8
OpenTestSystem.Otx.RuntimeConverter.Api.Config
Configuration class to modify global settings.
Definition: Config.cs:20
OpenTestSystem.Otx.RuntimeConverter.Api.License.LicenseManager.SetLicenseKey
static void SetLicenseKey(string licenseKey)
Sets a valid license key to release the API.
Definition: LicenseManager.cs:47
OpenTestSystem.Otx.RuntimeConverter.Api.Validator.IError
Represents an error or a warning.
Definition: IError.cs:16
OpenTestSystem
Namespace containing all objects related to testing inside automotive industry