OTX-Runtime for DotNet  

The OTX-Runtime API can be used to browse inside the OTX data structure. Main use cases are:


Before browsing the following preconditions must be met:

  1. A valid license key must be entered, see LicenseManager
  2. An instance of a RuntimeManager must be created

    Note: A RuntimeManager instance can be created inside the main thread or inside a new thread.

    3. A PTX or PPX file must be loaded, see LoadPtx

    Note: The PTX file must contain the executable binary format, which can be created inside the OTX Development Environment.

Main OTX Data Structure

The following diagram shows the main OTX data structure. The root element is the OTX Project. The project must contain one or more Packages. A package can contain another package in an arbitrary depth or it can contain one or more Documents. A document contains the Procedures and all global declarations like StateVariables and/or ContextVariables. A procedure can have one or more ProcedureParameters.

Note: One Document inside a Project is marked as IsStartup. This Document can contain a Main-Procedure. This main procedure can get quickly via the Project method GetMainProcedure.

Main OTX data structure

Code Example

// Pseudo-Code example to execute each procedure inside a PTX file recursively
// ===========================================================================
// Please note that the exact syntax of C++, DotNet and Java is different!
void main(string ptxFilename)
// Create the RuntimeManager and connect it to DiagManager
OpenTestSystem.Otx.Runtime.Api.IRuntimeManager runtimeManager = null;
// Load PTX file and browse OTX data structure
OpenTestSystem.Otx.Runtime.Api.Project.IProject project = runtimeManager.LoadPtx(ptxFilename);
ExecuteAll(project, runtimeManager);
void ExecuteAll(OpenTestSystem.Otx.Runtime.Api.Project.IProject project, IRuntimeManager runtimeManager)
foreach (OpenTestSystem.Otx.Runtime.Api.Otx.IPackage package in project.GetPackages())
ExecutePackage(package, runtimeManager);
void ExecutePackage(OpenTestSystem.Otx.Runtime.Api.Otx.IPackage package, IRuntimeManager runtimeManager)
foreach (OpenTestSystem.Otx.Runtime.Api.Otx.IDocument document in package.GetDocuments())
ExecuteDocument(document, runtimeManager);
foreach (OpenTestSystem.Otx.Runtime.Api.Otx.IPackage subPackage in package.GetPackages())
ExecutePackage(subPackage, runtimeManager);
void ExecuteDocument(OpenTestSystem.Otx.Runtime.Api.Otx.IDocument document, IRuntimeManager runtimeManager)
foreach (OpenTestSystem.Otx.Runtime.Api.Otx.IProcedure procedure in document.GetProcedures())
ExecuteProcedure(procedure, runtimeManager);
void ExecuteProcedure(OpenTestSystem.Otx.Runtime.Api.Otx.IProcedure procedure, IRuntimeManager runtimeManager)
Factory class for creating runtime managers, see IRuntimeManager
Definition: RuntimeManagerFactory.cs:13
static IRuntimeManager CreateSocketRuntimeManager(ushort otxRunnerPort)
Creates SocketRuntimeManager without DiagManager.
Definition: RuntimeManagerFactory.cs:31
Main class to load and execute an OTX project
Definition: IRuntimeManager.cs:30
Represents an OTX.
Definition: IDocument.cs:12
Contains Documents and child Packages.
Definition: IPackage.cs:10
Represents an OTX Procedure.
Definition: IProcedure.cs:8
The Project is the root element of the OTX Data Structure. It mainly contains the Packages and the Pr...
Definition: IProject.cs:15
Namespace for browsing at OTX data structure.
Definition: IContextVariable.cs:5
Namespace containing main entries: IProject and IPlayerProject.
Definition: IPlayerProject.cs:5
Namespace containing the programming interface for browsing and execution of OTX procedures in own ap...
Definition: ApiConstants.cs:5
Namespace containing all objects for browsing and execution of OTX procedures
Definition: ApiConstants.cs:5
Namespace containing all objects which are standardized according to ISO 13209 (OTX)
Namespace containing all objects related to testing inside automotive industry