OTX-Runtime for Java  
OpenTestSystem.Otx.Runtime.Api.IRuntimeManager Interface Reference

Runs a PTX/PPX file directly. More...

Inherited by OpenTestSystem.Otx.Runtime.Api.RuntimeManagerBase.

Public Member Functions

boolean AddDiagConnectionStateChangedListener (DiagConnectionStateChangedListener listener)
 Add diagnostic connection state changed listener. More...
 
boolean AddInOutParameterValueChangedListener (InOutParameterValueChangedListener listener)
 Adds ProcedureInOutParameter value changed listener. More...
 
boolean AddProcedureAbortedListener (ProcedureAbortedListener listener)
 Adds procedure aborted listener. More...
 
boolean AddProcedureContinuedListener (ProcedureContinuedListener listener)
 Add procedure continued listener. More...
 
boolean AddProcedureFinishedListener (ProcedureFinishedListener listener)
 Adds procedure finished listener. More...
 
boolean AddProcedurePausedListener (ProcedurePausedListener listener)
 Adds procedure paused listener. More...
 
boolean AddProcedurePendingListener (ProcedurePendingListener listener)
 Add procedure pending listener. More...
 
boolean AddProcedureStartedListener (ProcedureStartedListener listener)
 Adds procedure started listener. More...
 
boolean AddProcedureStoppedListener (ProcedureStoppedListener listener)
 Adds procedure stopped listener. More...
 
boolean AddProcedureTimeoutListener (ProcedureTimeoutListener listener)
 Adds procedure timeout listener. More...
 
IRuntimeContext Execute (IProcedure procedure)
 Executes a procedure synchronously. More...
 
IRuntimeContext Execute (IProcedure procedure, long timeout)
 Executes a procedure synchronously. More...
 
IRuntimeContext Execute (String name, IProcedure procedure)
 Executes a procedure synchronously. More...
 
IRuntimeContext Execute (String name, IProcedure procedure, ExpectedState expectedConnectionState)
 Executes a procedure synchronously at an expected connection state. More...
 
IRuntimeContext Execute (String name, IProcedure procedure, ExpectedState expectedConnectionState, long timeout)
 Executes a procedure synchronously at an expected connection state. More...
 
IRuntimeContext Execute (String name, IProcedure procedure, long timeout)
 Executes a procedure synchronously. More...
 
IRuntimeContext ExecuteAsync (IProcedure procedure)
 Executes a procedure asynchronously. More...
 
IRuntimeContext ExecuteAsync (IProcedure procedure, long timeout)
 Executes a procedure asynchronously. More...
 
IRuntimeContext ExecuteAsync (String name, IProcedure procedure)
 Executes a procedure asynchronously. More...
 
IRuntimeContext ExecuteAsync (String name, IProcedure procedure, ExpectedState expectedConnectionState)
 Executes a procedure asynchronously at an expected connection state. More...
 
IRuntimeContext ExecuteAsync (String name, IProcedure procedure, ExpectedState expectedConnectionState, long timeout)
 Executes a procedure asynchronously at an expected connection state. More...
 
IRuntimeContext ExecuteAsync (String name, IProcedure procedure, long timeout)
 Executes a procedure asynchronously. More...
 
DiagConnectionState GetDiagConnectionState ()
 Get the diagnostic connection state. More...
 
String GetSearchPath ()
 Gets search path. More...
 
boolean IsProtected (String fileName)
 Checks if a PTX/PPX is signed and/or encrypted. More...
 
IPlayerProject LoadPpx (String fileName)
 Loads a PPX file. More...
 
IPlayerProject LoadPpx (String fileName, String password)
 Loads a protected PPX file. More...
 
IProject LoadPtx (String fileName)
 Loads a PTX file. More...
 
IProject LoadPtx (String fileName, String password)
 Loads a protected PTX file. More...
 
boolean RemoveDiagConnectionStateChangedListener (DiagConnectionStateChangedListener listener)
 Remove diagnostic connection state changed listener. More...
 
boolean RemoveInOutParameterValueChangedListener (InOutParameterValueChangedListener listener)
 Removes ProcedureInOutParameter value changed listener. More...
 
boolean RemoveProcedureAbortedListener (ProcedureAbortedListener listener)
 Removes procedure aborted listener. More...
 
boolean RemoveProcedureContinuedListener (ProcedureContinuedListener listener)
 Remove procedure continued listener. More...
 
boolean RemoveProcedureFinishedListener (ProcedureFinishedListener listener)
 Removes procedure finished listener. More...
 
boolean RemoveProcedurePausedListener (ProcedurePausedListener listener)
 Remove procedure paused listener. More...
 
boolean RemoveProcedurePendingListener (ProcedurePendingListener listener)
 Remove procedure pending listener. More...
 
boolean RemoveProcedureStartedListener (ProcedureStartedListener listener)
 Removes procedure started listener. More...
 
boolean RemoveProcedureStoppedListener (ProcedureStoppedListener listener)
 Removes procedure stopped listener. More...
 
boolean RemoveProcedureTimeoutListener (ProcedureTimeoutListener listener)
 Removes procedure timeout listener. More...
 
void SetCustomImplementation (IBasicScreenImplementation implementation)
 Sets BasicScreenImplementation. More...
 
void SetCustomImplementation (ICommonDialogsImplementation implementation)
 Sets ICommonDialogsImplementation. More...
 
void SetCustomImplementation (IContextVariableImplementation implementation)
 Sets IContextVariableImplementation. More...
 
void SetCustomImplementation (ICustomScreenImplementation implementation)
 Sets ICustomScreenImplementation. More...
 
void SetCustomImplementation (IExternalServiceProviderImplementation implementation)
 Sets IExternalServiceProviderImplementation. More...
 
void SetCustomImplementation (Ii18nImplementation implementation)
 Sets II18nImplementation. More...
 
void SetCustomImplementation (ILoggingImplementation implementation)
 Sets ILoggingImplementation. More...
 
void SetCustomImplementation (IMeasureImplementation implementation)
 Sets IMeasureImplementation. More...
 
void SetCustomImplementation (ISqlImplementation implementation)
 Sets ISqlImplementation. More...
 
void SetCustomImplementation (IStateVariableImplementation implementation)
 Sets IStateVariableImplementation. More...
 
boolean SetSearchPath (String searchPath)
 Sets search path. More...
 
void StopAll ()
 Stops all synchronous and asynchronous executing procedures of this RuntimeManager.
 

Detailed Description

Runs a PTX/PPX file directly.

Member Function Documentation

◆ AddDiagConnectionStateChangedListener()

boolean OpenTestSystem.Otx.Runtime.Api.IRuntimeManager.AddDiagConnectionStateChangedListener ( DiagConnectionStateChangedListener  listener)

Add diagnostic connection state changed listener.

Parameters
listenerA callback function which will be invoked after the ConnectionState was changed but only during the Procedure execution started with @expectedConnectionState@ not equal to @None.
Returns

◆ AddInOutParameterValueChangedListener()

boolean OpenTestSystem.Otx.Runtime.Api.IRuntimeManager.AddInOutParameterValueChangedListener ( InOutParameterValueChangedListener  listener)

Adds ProcedureInOutParameter value changed listener.

Parameters
listenerA callback function which will be invoked when ProcedureInOutParameter value changed from Otx-Runtime.
Returns
false if listener is null.

◆ AddProcedureAbortedListener()

boolean OpenTestSystem.Otx.Runtime.Api.IRuntimeManager.AddProcedureAbortedListener ( ProcedureAbortedListener  listener)

Adds procedure aborted listener.

Parameters
listenerA callback function which will be invoked when a procedure is stopped with an exception.
Returns
false if listener is null.

◆ AddProcedureContinuedListener()

boolean OpenTestSystem.Otx.Runtime.Api.IRuntimeManager.AddProcedureContinuedListener ( ProcedureContinuedListener  listener)

Add procedure continued listener.

Parameters
listenerA callback function which will be invoked after a Procedure is continued.
Returns
true

◆ AddProcedureFinishedListener()

boolean OpenTestSystem.Otx.Runtime.Api.IRuntimeManager.AddProcedureFinishedListener ( ProcedureFinishedListener  listener)

Adds procedure finished listener.

Parameters
listenerA callback function which will be invoked when a procedure finished without exception.
Returns
false if listener is null.

◆ AddProcedurePausedListener()

boolean OpenTestSystem.Otx.Runtime.Api.IRuntimeManager.AddProcedurePausedListener ( ProcedurePausedListener  listener)

Adds procedure paused listener.

Parameters
listenerA callback function which will be invoked before a Procedure is paused.
Returns
true

◆ AddProcedurePendingListener()

boolean OpenTestSystem.Otx.Runtime.Api.IRuntimeManager.AddProcedurePendingListener ( ProcedurePendingListener  listener)

Add procedure pending listener.

Parameters
listenerA callback function which will be invoked after a Procedure is executed but the Procedure is not really started.
Returns
true

◆ AddProcedureStartedListener()

boolean OpenTestSystem.Otx.Runtime.Api.IRuntimeManager.AddProcedureStartedListener ( ProcedureStartedListener  listener)

Adds procedure started listener.

Parameters
listenerA callback function which will be invoked when a procedure started.
Returns
false if listener is null.

◆ AddProcedureStoppedListener()

boolean OpenTestSystem.Otx.Runtime.Api.IRuntimeManager.AddProcedureStoppedListener ( ProcedureStoppedListener  listener)

Adds procedure stopped listener.

Parameters
listenerA callback function which will be invoked when a procedure stopped.
Returns
false if listener is null.

◆ AddProcedureTimeoutListener()

boolean OpenTestSystem.Otx.Runtime.Api.IRuntimeManager.AddProcedureTimeoutListener ( ProcedureTimeoutListener  listener)

Adds procedure timeout listener.

Parameters
listenerA callback function which will be invoked when a timeout expires.
Returns
true.

◆ Execute() [1/6]

IRuntimeContext OpenTestSystem.Otx.Runtime.Api.IRuntimeManager.Execute ( IProcedure  procedure)

Executes a procedure synchronously.

Parameters
procedureProcedure to execute.
Returns
A Runtime Context.

Examples
A sample which loads a PTX file and browses its structure.

package example;
import java.io.IOException;
public class Example {
public static void main(String[] args) throws IOException {
IRuntimeManager rt = RuntimeManagerFactory.CreateSocketRuntimeManager(1000);
IProject project = rt.LoadPtx("C:\\Sample.ptx");
IProcedure procedure = project.GetMainProcedure();
if (procedure.GetParameters().length > 0) {
IProcedureParameter parameter = procedure.GetParameters()[0];
if (parameter.GetDataType().equals("String") && parameter instanceof IProcedureInParameter) {
((IProcedureInParameter) parameter).SetValue("Hello World");
}
}
IRuntimeContext context = rt.Execute(procedure);
if (context.IsFinished()) {
// Procedure finished without Exception.
} else if (context.HasRuntimeException()) {
// Procedure was terminated an Runtime Exception.
}
}
}
Factory class for creating runtime managers, see IRuntimeManager.
Definition: RuntimeManagerFactory.java:10
Contains information of a Runner instance.
Definition: IRuntimeContext.java:14
Runs a PTX/PPX file directly.
Definition: IRuntimeManager.java:17
Represents an OTX Procedure.
Definition: IProcedure.java:6
Represents InParameter of a Procedure.
Definition: IProcedureInParameter.java:8
boolean SetValue(Object value)
Sets new value.
Represents base class for InParameter, OutParameter and InOutParameter of a Procedure.
Definition: IProcedureParameter.java:8
Contains Packages and settings.
Definition: IProject.java:15
Package for browsing at OTX data structure.
Definition: IContextVariable.java:1
Package containing main entries: IProject and IPlayerProject.
Definition: IPlayerProject.java:1
Package containing the programming interface for browsing and execution of OTX procedures in own appl...
Definition: ApiConstants.java:1
Package containing all objects for browsing and execution of OTX procedures.
Definition: opentestsystem.otx.runtime2.api/src/main/java/opentestsystem/otx/runtime/package-info.java:4
Package containing all objects which are standardized according to ISO 13209 (OTX)
Package containing all objects related to testing inside automotive industry.

◆ Execute() [2/6]

IRuntimeContext OpenTestSystem.Otx.Runtime.Api.IRuntimeManager.Execute ( IProcedure  procedure,
long  timeout 
)

Executes a procedure synchronously.

Parameters
procedureProcedure to execute.
timeoutThe procedure execution will be stopped when the timeout expires.
Returns
A Runtime Context.

Examples
A sample which loads a PTX file and browses its structure.

package example;
import java.io.IOException;
public class Example {
public static void main(String[] args) throws IOException {
IRuntimeManager rt = RuntimeManagerFactory.CreateSocketRuntimeManager(1000);
IProject project = rt.LoadPtx("C:\\Sample.ptx");
IProcedure procedure = project.GetMainProcedure();
if (procedure.GetParameters().length > 0) {
IProcedureParameter parameter = procedure.GetParameters()[0];
if (parameter.GetDataType().equals("String") && parameter instanceof IProcedureInParameter) {
((IProcedureInParameter) parameter).SetValue("Hello World");
}
}
IRuntimeContext context = rt.Execute(procedure);
if (context.IsFinished()) {
// Procedure finished without Exception.
} else if (context.HasRuntimeException()) {
// Procedure was terminated an Runtime Exception.
}
}
}

◆ Execute() [3/6]

IRuntimeContext OpenTestSystem.Otx.Runtime.Api.IRuntimeManager.Execute ( String  name,
IProcedure  procedure 
)

Executes a procedure synchronously.

Parameters
nameOptional name of the RuntimeContext. The name will be used for example to better distinguish the different OTX runners and/or clients of DiagManager inside the trace files. For the DiagManager the method SetClientName will be called internally.
procedureProcedure to execute.
Returns
A Runtime Context.

Examples
A sample which loads a PTX file and browses its structure.

package example;
import java.io.IOException;
public class Example {
public static void main(String[] args) throws IOException {
IRuntimeManager rt = RuntimeManagerFactory.CreateSocketRuntimeManager(1000);
IProject project = rt.LoadPtx("C:\\Sample.ptx");
IProcedure procedure = project.GetMainProcedure();
if (procedure.GetParameters().length > 0) {
IProcedureParameter parameter = procedure.GetParameters()[0];
if (parameter.GetDataType().equals("String") && parameter instanceof IProcedureInParameter) {
((IProcedureInParameter) parameter).SetValue("Hello World");
}
}
IRuntimeContext context = rt.Execute(procedure);
if (context.IsFinished()) {
// Procedure finished without Exception.
} else if (context.HasRuntimeException()) {
// Procedure was terminated an Runtime Exception.
}
}
}

◆ Execute() [4/6]

IRuntimeContext OpenTestSystem.Otx.Runtime.Api.IRuntimeManager.Execute ( String  name,
IProcedure  procedure,
ExpectedState  expectedConnectionState 
)

Executes a procedure synchronously at an expected connection state.

Parameters
nameOptional name of the RuntimeContext. The name will be used for example to better distinguish the different clients inside the trace file.
procedureProcedure to execute.
expectedConnectionStateThe expected connection state during the procedure execution:
  • None, the procedure will be executed normally without connection state handling
  • BatteryOn, the procedure is only started if the battery voltage is ON. The ignition state will be ignored (KL30 = On). The execution will be paused, as long as the battery voltage is not ON.
  • IgnitionOff, the procedure is only started if the battery voltage is ON and the ignition is OFF (KL30 = On AND (KL15 = Off OR KL15 = NotAvailable)). The execution will be paused, as long as the battery voltage is not ON or the ignition is ON.
  • IgnitionOn, the procedure is only started if the battery voltage is ON and the ignition is ON (KL30 = On AND KL15 = On). The execution will be paused, as long as the battery voltage is not ON or the ignition is not ON.
Returns
The RuntimeContext of the procedure execution.
Exceptions
OpenTestSystem.Otx.Runtime.Api.Exceptions.ConnectionStateExceptionThrows a ConnectionStateException if the expected state is greater BatteryOn, and the battery state is higher than BatteryOff and the ignition state cannot be determined by the underlying system.

Examples
A sample which loads a PTX file and browses its structure.

package example;
import java.io.IOException;
public class Example {
public static void main(String[] args) throws IOException {
IRuntimeManager rt = RuntimeManagerFactory.CreateSocketRuntimeManager(1000);
IProject project = rt.LoadPtx("C:\\Sample.ptx");
IProcedure procedure = project.GetMainProcedure();
if (procedure.GetParameters().length > 0) {
IProcedureParameter parameter = procedure.GetParameters()[0];
if (parameter.GetDataType().equals("String") && parameter instanceof IProcedureInParameter) {
((IProcedureInParameter) parameter).SetValue("Hello World");
}
}
IRuntimeContext context = rt.Execute(procedure);
if (context.IsFinished()) {
// Procedure finished without Exception.
} else if (context.HasRuntimeException()) {
// Procedure was terminated an Runtime Exception.
}
}
}

◆ Execute() [5/6]

IRuntimeContext OpenTestSystem.Otx.Runtime.Api.IRuntimeManager.Execute ( String  name,
IProcedure  procedure,
ExpectedState  expectedConnectionState,
long  timeout 
)

Executes a procedure synchronously at an expected connection state.

Parameters
nameOptional name of the RuntimeContext. The name will be used for example to better distinguish the different clients inside the trace file.
procedureProcedure to execute.
expectedConnectionStateThe expected connection state during the procedure execution:
  • None, the procedure will be executed normally without connection state handling
  • BatteryOn, the procedure is only started if the battery voltage is ON. The ignition state will be ignored (KL30 = On). The execution will be paused, as long as the battery voltage is not ON.
  • IgnitionOff, the procedure is only started if the battery voltage is ON and the ignition is OFF (KL30 = On AND (KL15 = Off OR KL15 = NotAvailable)). The execution will be paused, as long as the battery voltage is not ON or the ignition is ON.
  • IgnitionOn, the procedure is only started if the battery voltage is ON and the ignition is ON (KL30 = On AND KL15 = On). The execution will be paused, as long as the battery voltage is not ON or the ignition is not ON.
timeoutThe procedure execution will be stopped when the timeout expires.
Returns
The RuntimeContext of the procedure execution.
Exceptions
OpenTestSystem.Otx.Runtime.Api.Exceptions.ConnectionStateExceptionThrows a ConnectionStateException if the expected state is greater BatteryOn, and the battery state is higher than BatteryOff and the ignition state cannot be determined by the underlying system.

Examples
A sample which loads a PTX file and browses its structure.

package example;
import java.io.IOException;
public class Example {
public static void main(String[] args) throws IOException {
IRuntimeManager rt = RuntimeManagerFactory.CreateSocketRuntimeManager(1000);
IProject project = rt.LoadPtx("C:\\Sample.ptx");
IProcedure procedure = project.GetMainProcedure();
if (procedure.GetParameters().length > 0) {
IProcedureParameter parameter = procedure.GetParameters()[0];
if (parameter.GetDataType().equals("String") && parameter instanceof IProcedureInParameter) {
((IProcedureInParameter) parameter).SetValue("Hello World");
}
}
IRuntimeContext context = rt.Execute(procedure);
if (context.IsFinished()) {
// Procedure finished without Exception.
} else if (context.HasRuntimeException()) {
// Procedure was terminated an Runtime Exception.
}
}
}

◆ Execute() [6/6]

IRuntimeContext OpenTestSystem.Otx.Runtime.Api.IRuntimeManager.Execute ( String  name,
IProcedure  procedure,
long  timeout 
)

Executes a procedure synchronously.

Parameters
nameOptional name of the RuntimeContext. The name will be used for example to better distinguish the different OTX runners and/or clients of DiagManager inside the trace files. For the DiagManager the method SetClientName will be called internally.
procedureProcedure to execute.
timeoutThe procedure execution will be stopped when the timeout expires.
Returns
A Runtime Context.

Examples
A sample which loads a PTX file and browses its structure.

package example;
import java.io.IOException;
public class Example {
public static void main(String[] args) throws IOException {
IRuntimeManager rt = RuntimeManagerFactory.CreateSocketRuntimeManager(1000);
IProject project = rt.LoadPtx("C:\\Sample.ptx");
IProcedure procedure = project.GetMainProcedure();
if (procedure.GetParameters().length > 0) {
IProcedureParameter parameter = procedure.GetParameters()[0];
if (parameter.GetDataType().equals("String") && parameter instanceof IProcedureInParameter) {
((IProcedureInParameter) parameter).SetValue("Hello World");
}
}
IRuntimeContext context = rt.Execute(procedure);
if (context.IsFinished()) {
// Procedure finished without Exception.
} else if (context.HasRuntimeException()) {
// Procedure was terminated an Runtime Exception.
}
}
}

◆ ExecuteAsync() [1/6]

IRuntimeContext OpenTestSystem.Otx.Runtime.Api.IRuntimeManager.ExecuteAsync ( IProcedure  procedure)

Executes a procedure asynchronously.

Parameters
procedureProcedure to execute.
Returns
A Runtime Context.

◆ ExecuteAsync() [2/6]

IRuntimeContext OpenTestSystem.Otx.Runtime.Api.IRuntimeManager.ExecuteAsync ( IProcedure  procedure,
long  timeout 
)

Executes a procedure asynchronously.

Parameters
procedureProcedure to execute.
timeoutThe procedure execution will be stopped when the timeout expires.
Returns
A Runtime Context.

◆ ExecuteAsync() [3/6]

IRuntimeContext OpenTestSystem.Otx.Runtime.Api.IRuntimeManager.ExecuteAsync ( String  name,
IProcedure  procedure 
)

Executes a procedure asynchronously.

Parameters
nameOptional name of the RuntimeContext. The name will be used for example to better distinguish the different OTX runners and/or clients of DiagManager inside the trace files. For the DiagManager the method SetClientName will be called internally.
procedureProcedure to execute.
Returns
A Runtime Context.

◆ ExecuteAsync() [4/6]

IRuntimeContext OpenTestSystem.Otx.Runtime.Api.IRuntimeManager.ExecuteAsync ( String  name,
IProcedure  procedure,
ExpectedState  expectedConnectionState 
)

Executes a procedure asynchronously at an expected connection state.

Parameters
nameOptional name of the RuntimeContext. The name will be used for example to better distinguish the different clients inside the trace file.
procedureProcedure to execute.
expectedConnectionStateThe expected connection state during the procedure execution:
  • None, the procedure will be executed normally without connection state handling
  • BatteryOn, the procedure is only started if the battery voltage is ON. The ignition state will be ignored (KL30 = On). The execution will be paused, as long as the battery voltage is not ON.
  • IgnitionOff, the procedure is only started if the battery voltage is ON and the ignition is OFF (KL30 = On AND (KL15 = Off OR KL15 = NotAvailable)). The execution will be paused, as long as the battery voltage is not ON or the ignition is ON.
  • IgnitionOn, the procedure is only started if the battery voltage is ON and the ignition is ON (KL30 = On AND KL15 = On). The execution will be paused, as long as the battery voltage is not ON or the ignition is not ON.
Returns
The RuntimeContext of the procedure execution.
Exceptions
OpenTestSystem.Otx.Runtime.Api.Exceptions.ConnectionStateExceptionThrows a ConnectionStateException if the expected state is greater BatteryOn, and the battery state is higher than BatteryOff and the ignition state cannot be determined by the underlying system.

Examples
A sample which loads a PTX file and browses its structure.

package example;
import java.io.IOException;
public class Example {
public static void main(String[] args) throws IOException {
IRuntimeManager rt = RuntimeManagerFactory.CreateSocketRuntimeManager(1000);
IProject project = rt.LoadPtx("C:\\Sample.ptx");
IProcedure procedure = project.GetMainProcedure();
if (procedure.GetParameters().length > 0) {
IProcedureParameter parameter = procedure.GetParameters()[0];
if (parameter.GetDataType().equals("String") && parameter instanceof IProcedureInParameter) {
((IProcedureInParameter) parameter).SetValue("Hello World");
}
}
IRuntimeContext context = rt.Execute(procedure);
if (context.IsFinished()) {
// Procedure finished without Exception.
} else if (context.HasRuntimeException()) {
// Procedure was terminated an Runtime Exception.
}
}
}

◆ ExecuteAsync() [5/6]

IRuntimeContext OpenTestSystem.Otx.Runtime.Api.IRuntimeManager.ExecuteAsync ( String  name,
IProcedure  procedure,
ExpectedState  expectedConnectionState,
long  timeout 
)

Executes a procedure asynchronously at an expected connection state.

Parameters
nameOptional name of the RuntimeContext. The name will be used for example to better distinguish the different clients inside the trace file.
procedureProcedure to execute.
expectedConnectionStateThe expected connection state during the procedure execution:
  • None, the procedure will be executed normally without connection state handling
  • BatteryOn, the procedure is only started if the battery voltage is ON. The ignition state will be ignored (KL30 = On). The execution will be paused, as long as the battery voltage is not ON.
  • IgnitionOff, the procedure is only started if the battery voltage is ON and the ignition is OFF (KL30 = On AND (KL15 = Off OR KL15 = NotAvailable)). The execution will be paused, as long as the battery voltage is not ON or the ignition is ON.
  • IgnitionOn, the procedure is only started if the battery voltage is ON and the ignition is ON (KL30 = On AND KL15 = On). The execution will be paused, as long as the battery voltage is not ON or the ignition is not ON.
timeoutThe procedure execution will be stopped when the timeout expires.
Returns
The RuntimeContext of the procedure execution.
Exceptions
OpenTestSystem.Otx.Runtime.Api.Exceptions.ConnectionStateExceptionThrows a ConnectionStateException if the expected state is greater BatteryOn, and the battery state is higher than BatteryOff and the ignition state cannot be determined by the underlying system.

Examples
A sample which loads a PTX file and browses its structure.

package example;
import java.io.IOException;
public class Example {
public static void main(String[] args) throws IOException {
IRuntimeManager rt = RuntimeManagerFactory.CreateSocketRuntimeManager(1000);
IProject project = rt.LoadPtx("C:\\Sample.ptx");
IProcedure procedure = project.GetMainProcedure();
if (procedure.GetParameters().length > 0) {
IProcedureParameter parameter = procedure.GetParameters()[0];
if (parameter.GetDataType().equals("String") && parameter instanceof IProcedureInParameter) {
((IProcedureInParameter) parameter).SetValue("Hello World");
}
}
IRuntimeContext context = rt.Execute(procedure);
if (context.IsFinished()) {
// Procedure finished without Exception.
} else if (context.HasRuntimeException()) {
// Procedure was terminated an Runtime Exception.
}
}
}

◆ ExecuteAsync() [6/6]

IRuntimeContext OpenTestSystem.Otx.Runtime.Api.IRuntimeManager.ExecuteAsync ( String  name,
IProcedure  procedure,
long  timeout 
)

Executes a procedure asynchronously.

Parameters
nameOptional name of the RuntimeContext. The name will be used for example to better distinguish the different OTX runners and/or clients of DiagManager inside the trace files. For the DiagManager the method SetClientName will be called internally.
procedureProcedure to execute.
timeoutThe procedure execution will be stopped when the timeout expires.
Returns
A Runtime Context.

◆ GetDiagConnectionState()

DiagConnectionState OpenTestSystem.Otx.Runtime.Api.IRuntimeManager.GetDiagConnectionState ( )

Get the diagnostic connection state.

Returns

◆ GetSearchPath()

String OpenTestSystem.Otx.Runtime.Api.IRuntimeManager.GetSearchPath ( )

Gets search path.

Returns
Base directory.

◆ IsProtected()

boolean OpenTestSystem.Otx.Runtime.Api.IRuntimeManager.IsProtected ( String  fileName)

Checks if a PTX/PPX is signed and/or encrypted.

Parameters
fileNamePath of PTX/PPX file to check.
Returns
true if the PTX/PPX file is signed or encrypted; otherwise false.

Examples

package example;
import java.io.IOException;
public class Example {
public static void main(String[] args) throws IOException {
IRuntimeManager rt = RuntimeManagerFactory.CreateSocketRuntimeManager(1000);
if (rt.IsProtected("C:\\Sample.ptx")) {
rt.LoadPtx("C:\\Sample.ptx", "MyPassword");
} else {
rt.LoadPtx("C:\\Sample.ptx");
}
}
}
static IRuntimeManager CreateSocketRuntimeManager(int otxRunnerPort)
Creates SocketRuntimeManager without DiagManager.
Definition: RuntimeManagerFactory.java:32
IProject LoadPtx(String fileName)
Loads a PTX file.

◆ LoadPpx() [1/2]

IPlayerProject OpenTestSystem.Otx.Runtime.Api.IRuntimeManager.LoadPpx ( String  fileName)

Loads a PPX file.

The OTX-Runtime cannot compile OTX to binary format. Therefore the PTX file must contain the OTX binary format, which can be created inside the OTX Development Environment. Otherwise the project cannot be loaded.

Parameters
fileNamePath of PPX file to load.
Returns
A IPlayerProject which exposes Project, Package, Document, Parameters, etc.
Exceptions
OpenTestSystem.Otx.Runtime.Api.Exceptions.FileNotFoundExceptionThrown when the given file cannot be found.
OpenTestSystem.Otx.Runtime.Api.Exceptions.FileFormatExceptionThrow if PPX's format is invalid.
java.lang.RuntimeExceptionOther cases, such as loading ptx file without password or wrong password, etc

Examples
A sample which loads a PPX file and browses its structure.

package example;
import java.io.IOException;
public class Example {
public static void main(String[] args) throws IOException {
IRuntimeManager rt = RuntimeManagerFactory.CreateSocketRuntimeManager(1000);
IPlayerProject player = rt.LoadPpx("C:\\Sample.ppx");
for (int i = 0; i < player.GetProjects().length; i++) {
IProject project = player.GetProjects()[i];
for (int j = 0; j < project.GetPackages().length; j++) {
IPackage aPackage = project.GetPackages()[j];
for (int k = 0; k < aPackage.GetDocuments().length; k++) {
IDocument document = aPackage.GetDocuments()[k];
for (int m = 0; m < document.GetProcedures().length; m++) {
IProcedure procedure = document.GetProcedures()[m];
for (int n = 0; n < procedure.GetParameters().length; n++) {
IProcedureParameter parameter = procedure.GetParameters()[n];
}
}
}
}
}
}
}
Represents an OTX.
Definition: IDocument.java:10
Contains Documents and child Packages.
Definition: IPackage.java:8
Contains Projects.
Definition: IPlayerProject.java:10

◆ LoadPpx() [2/2]

IPlayerProject OpenTestSystem.Otx.Runtime.Api.IRuntimeManager.LoadPpx ( String  fileName,
String  password 
)

Loads a protected PPX file.

The OTX-Runtime cannot compile OTX to binary format. Therefore the PTX file must contain the OTX binary format, which can be created inside the OTX Development Environment. Otherwise the project cannot be loaded.

Parameters
fileNamePath of PPX file to load.
Returns
A IPlayerProject which exposes Project, Package, Document, Parameters, etc.
Exceptions
OpenTestSystem.Otx.Runtime.Api.Exceptions.FileNotFoundExceptionThrown when the given file cannot be found.
OpenTestSystem.Otx.Runtime.Api.Exceptions.FileFormatExceptionThrow if PPX's format is invalid.
java.lang.RuntimeExceptionOther cases, such as loading protected ptx file without password or wrong password, etc

◆ LoadPtx() [1/2]

IProject OpenTestSystem.Otx.Runtime.Api.IRuntimeManager.LoadPtx ( String  fileName)

Loads a PTX file.

The OTX-Runtime cannot compile OTX to binary format. Therefore the PTX file must contain the OTX binary format, which can be created inside the OTX Development Environment. Otherwise the project cannot be loaded.f

Parameters
fileNamePath of PTX file to load.
Returns
A IProject which exposes Package, Document, Parameters, etc.
Exceptions
OpenTestSystem.Otx.Runtime.Api.Exceptions.FileNotFoundExceptionThrown when the given file cannot be found.
OpenTestSystem.Otx.Runtime.Api.Exceptions.FileFormatExceptionThrow if PTX's format is invalid or PTX version is older than required or Runtime version is older than PTX's required RuntimeVersion
java.lang.RuntimeExceptionOther cases, such as loading ptx file without password or wrong password, etc

Examples
A sample which loads a PTX file and browses its structure.

package example;
import java.io.IOException;
public class Example {
public static void main(String[] args) throws IOException {
IRuntimeManager rt = RuntimeManagerFactory.CreateSocketRuntimeManager(1000);
IProject project = rt.LoadPtx("C:\\Sample.ptx");
for (int i = 0; i < project.GetPackages().length; i++) {
IPackage aPackage = project.GetPackages()[i];
for (int j = 0; j < aPackage.GetDocuments().length; j++) {
IDocument document = aPackage.GetDocuments()[j];
for (int k = 0; k < document.GetProcedures().length; k++) {
IProcedure procedure = document.GetProcedures()[k];
for (int m = 0; m < procedure.GetParameters().length; m++) {
IProcedureParameter parameter = procedure.GetParameters()[m];
}
}
}
}
}
}

◆ LoadPtx() [2/2]

IProject OpenTestSystem.Otx.Runtime.Api.IRuntimeManager.LoadPtx ( String  fileName,
String  password 
)

Loads a protected PTX file.

The OTX-Runtime cannot compile OTX to binary format. Therefore the PTX file must contain the OTX binary format, which can be created inside the OTX Development Environment. Otherwise the project cannot be loaded.

Parameters
fileNamePath of PTX file to load.
passwordPassword to decrypt the PTX file.
Returns
A IProject which exposes Package, Document, Parameters, etc.
Exceptions
OpenTestSystem.Otx.Runtime.Api.Exceptions.FileNotFoundExceptionThrown when the given file cannot be found.
OpenTestSystem.Otx.Runtime.Api.Exceptions.FileFormatExceptionThrow if PTX's format is invalid or PTX version is older than required or Runtime version is older than PTX's required RuntimeVersion
java.lang.RuntimeExceptionOther cases, such as loading ptx file without password or wrong password, etc

◆ RemoveDiagConnectionStateChangedListener()

boolean OpenTestSystem.Otx.Runtime.Api.IRuntimeManager.RemoveDiagConnectionStateChangedListener ( DiagConnectionStateChangedListener  listener)

Remove diagnostic connection state changed listener.

Parameters
listenerA callback function which will be invoked after the ConnectionState was changed but only during the Procedure execution started with @expectedConnectionState@ not equal to @None.
Returns

◆ RemoveInOutParameterValueChangedListener()

boolean OpenTestSystem.Otx.Runtime.Api.IRuntimeManager.RemoveInOutParameterValueChangedListener ( InOutParameterValueChangedListener  listener)

Removes ProcedureInOutParameter value changed listener.

Parameters
listenerA callback function which will be invoked when ProcedureInOutParameter value changed from Otx-Runtime.
Returns
true if this list contained the specified element.

◆ RemoveProcedureAbortedListener()

boolean OpenTestSystem.Otx.Runtime.Api.IRuntimeManager.RemoveProcedureAbortedListener ( ProcedureAbortedListener  listener)

Removes procedure aborted listener.

Parameters
listenerA callback function which will be invoked when a procedure is stopped with an exception.
Returns
true if this list contained the specified element.

◆ RemoveProcedureContinuedListener()

boolean OpenTestSystem.Otx.Runtime.Api.IRuntimeManager.RemoveProcedureContinuedListener ( ProcedureContinuedListener  listener)

Remove procedure continued listener.

Parameters
listenerA callback function which will be invoked after a Procedure is continued.
Returns
true if this list contained the specified element.

◆ RemoveProcedureFinishedListener()

boolean OpenTestSystem.Otx.Runtime.Api.IRuntimeManager.RemoveProcedureFinishedListener ( ProcedureFinishedListener  listener)

Removes procedure finished listener.

Parameters
listenerA callback function which will be invoked when a procedure finished without exception.
Returns
true if this list contained the specified element.

◆ RemoveProcedurePausedListener()

boolean OpenTestSystem.Otx.Runtime.Api.IRuntimeManager.RemoveProcedurePausedListener ( ProcedurePausedListener  listener)

Remove procedure paused listener.

Parameters
listenerA callback function which will be invoked before a Procedure is paused.
Returns
true if this list contained the specified element.

◆ RemoveProcedurePendingListener()

boolean OpenTestSystem.Otx.Runtime.Api.IRuntimeManager.RemoveProcedurePendingListener ( ProcedurePendingListener  listener)

Remove procedure pending listener.

Parameters
listenerA callback function which will be invoked after a Procedure was executed but the Procedure is not really started.
Returns
true if this list contained the specified element.

◆ RemoveProcedureStartedListener()

boolean OpenTestSystem.Otx.Runtime.Api.IRuntimeManager.RemoveProcedureStartedListener ( ProcedureStartedListener  listener)

Removes procedure started listener.

Parameters
listenerA callback function which will be invoked when a procedure started.
Returns
true if this list contained the specified element.

◆ RemoveProcedureStoppedListener()

boolean OpenTestSystem.Otx.Runtime.Api.IRuntimeManager.RemoveProcedureStoppedListener ( ProcedureStoppedListener  listener)

Removes procedure stopped listener.

Parameters
listenerA callback function which will be invoked when a procedure stopped.
Returns
true if this list contained the specified element.

◆ RemoveProcedureTimeoutListener()

boolean OpenTestSystem.Otx.Runtime.Api.IRuntimeManager.RemoveProcedureTimeoutListener ( ProcedureTimeoutListener  listener)

Removes procedure timeout listener.

Parameters
listenerA callback function which will be invoked when a timeout expires.
Returns
true if this list contained the specified element.

◆ SetCustomImplementation() [1/10]

void OpenTestSystem.Otx.Runtime.Api.IRuntimeManager.SetCustomImplementation ( IBasicScreenImplementation  implementation)

Sets BasicScreenImplementation.

Parameters
implementationAn implementation of IBasicScreenImplementation.

◆ SetCustomImplementation() [2/10]

void OpenTestSystem.Otx.Runtime.Api.IRuntimeManager.SetCustomImplementation ( ICommonDialogsImplementation  implementation)

Sets ICommonDialogsImplementation.

Parameters
implementationAn implementation of ICommonDialogsImplementation.

◆ SetCustomImplementation() [3/10]

void OpenTestSystem.Otx.Runtime.Api.IRuntimeManager.SetCustomImplementation ( IContextVariableImplementation  implementation)

Sets IContextVariableImplementation.

Parameters
implementationAn implementation of IContextVariableImplementation.

◆ SetCustomImplementation() [4/10]

void OpenTestSystem.Otx.Runtime.Api.IRuntimeManager.SetCustomImplementation ( ICustomScreenImplementation  implementation)

Sets ICustomScreenImplementation.

Parameters
implementationAn implementation of ICustomScreenImplementation.

◆ SetCustomImplementation() [5/10]

void OpenTestSystem.Otx.Runtime.Api.IRuntimeManager.SetCustomImplementation ( IExternalServiceProviderImplementation  implementation)

Sets IExternalServiceProviderImplementation.

Parameters
implementationAn implementation of IExternalServiceProviderImplementation.

◆ SetCustomImplementation() [6/10]

void OpenTestSystem.Otx.Runtime.Api.IRuntimeManager.SetCustomImplementation ( Ii18nImplementation  implementation)

Sets II18nImplementation.

Parameters
implementationAn implementation of II18nImplementation.

◆ SetCustomImplementation() [7/10]

void OpenTestSystem.Otx.Runtime.Api.IRuntimeManager.SetCustomImplementation ( ILoggingImplementation  implementation)

Sets ILoggingImplementation.

Parameters
implementationAn implementation of ILoggingImplementation.

◆ SetCustomImplementation() [8/10]

void OpenTestSystem.Otx.Runtime.Api.IRuntimeManager.SetCustomImplementation ( IMeasureImplementation  implementation)

Sets IMeasureImplementation.

Parameters
implementationAn implementation of IMeasureImplementation.

◆ SetCustomImplementation() [9/10]

void OpenTestSystem.Otx.Runtime.Api.IRuntimeManager.SetCustomImplementation ( ISqlImplementation  implementation)

Sets ISqlImplementation.

Parameters
implementationAn implementation of ISqlImplementation.

◆ SetCustomImplementation() [10/10]

void OpenTestSystem.Otx.Runtime.Api.IRuntimeManager.SetCustomImplementation ( IStateVariableImplementation  implementation)

Sets IStateVariableImplementation.

Parameters
implementationAn implementation of IStateVariableImplementation.

◆ SetSearchPath()

boolean OpenTestSystem.Otx.Runtime.Api.IRuntimeManager.SetSearchPath ( String  searchPath)

Sets search path.

The OTX search path (OTX-Home) determines the base directory to which all relative path specifications refer. It can contain several directories separated by semicolons (";") and the placeholders "?" (One arbitrary character) and "*" (any characters). You can also use the placeholder [ProjectDir] (e.g. [ProjectDir]/*) with the following semantic:

Scope Path which [ProjectDir] refers Sample path
Within OTF Directory of the project inside OTF solution C:/Users/[Current User]/Documents/Open Test Framework/OtxSolution1/OtxProject1
Runtime API uses PTX file Directory of PTX file location C:/Users/[Current User]/Documents/Open Test Framework
Runtime API uses OTX file Directory of OTX file location C:/Users/[Current User]/Documents/Open Test Framework
Runtime API uses binary file (DLL, JAR) Directory of the binary file location C:/Users/[Current User]/Documents/Open Test Framework

While file reading operations with relative paths, the runtime environment takes each directory starting from the left as a base for relative paths. If the file is found, the search is canceled.

For file writing operations with relative paths, the first directory is used. The first directory shall exists and shall not contain wildcards.

If no OTX search path is specified, the default value [ProjectDir];[ProjectDir]/.. is used.

Parameters
searchPathBase directory.
Returns
true if search path has changed.

The documentation for this interface was generated from the following file: