OTX-Runtime for DotNet
|
|
Main class to load and execute an OTX project More...
Inherited by OpenTestSystem.Otx.Runtime.Api.RuntimeManagerBase.
Public Member Functions | |
IRuntimeContext | Execute (IProcedure procedure, ulong timeout=0) |
Executes a procedure synchronously. More... | |
IRuntimeContext | Execute (string name, IProcedure procedure, ExpectedState expectedConnectionState, ulong timeout=0) |
Executes a procedure synchronously at an expected connection state. More... | |
IRuntimeContext | Execute (string name, IProcedure procedure, ulong timeout=0) |
Executes a procedure synchronously. More... | |
IRuntimeContext | ExecuteAsync (IProcedure procedure, ulong timeout=0) |
Executes a procedure asynchronously. More... | |
IRuntimeContext | ExecuteAsync (string name, IProcedure procedure, ExpectedState expectedConnectionState, ulong timeout=0) |
Executes a procedure asynchronously. More... | |
IRuntimeContext | ExecuteAsync (string name, IProcedure procedure, ulong timeout=0) |
Executes a procedure asynchronously. More... | |
bool | 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... | |
void | SetCustomImplementation (IBasicScreenImplementation basicScreenImplementation) |
Sets BasicScreenImplementation. More... | |
void | SetCustomImplementation (ICommonDialogsImplementation commonDialogsImplementation) |
Sets ICommonDiaglogImplementation. More... | |
void | SetCustomImplementation (IContextVariableImplementation contextVariableImplementation) |
Sets IContextVariableImplementation. More... | |
void | SetCustomImplementation (ICustomScreenImplementation customScreenImplementation) |
Sets ICustomScreenImplementation. More... | |
void | SetCustomImplementation (IExternalServiceProviderImplementation externalServiceProvider) |
Sets IExternalServiceProviderImplementation. More... | |
void | SetCustomImplementation (Ii18nImplementation implementation) |
Sets II18nImplementation. More... | |
void | SetCustomImplementation (ILoggingImplementation loggingImplementation) |
Sets ILoggingImplementation. More... | |
void | SetCustomImplementation (IMeasureImplementation measureImplementation) |
Sets IMeasureImplementation. More... | |
void | SetCustomImplementation (ISqlImplementation implementation) |
Sets ISqlImplementation. More... | |
void | SetCustomImplementation (IStateVariableImplementation stateVariableImplementation) |
Sets IStateVariableImplementation. More... | |
void | StopAll () |
Stops all synchronous and asynchronous executing procedures of this RuntimeManager. More... | |
Properties | |
DiagConnectionState | DiagConnectionState [get] |
The diagnostic connection state. More... | |
string | SearchPath [get, set] |
Gets search path. More... | |
Events | |
DiagConnectionStateChangedHandler | DiagConnectionStateChanged |
Occurs after the ConnectionState was changed but only during the Procedure execution started with @expectedConnectionState@ not equal to @None. More... | |
InOutParameterValueChangedHandler | InOutParameterValueChanged |
Occurs when a ProcedureInOutParameter value changed from Otx-Runtime. More... | |
ProcedureAbortedHandler | ProcedureAborted |
Occurs when a Procedure is stopped with an exception. More... | |
ProcedureContinuedHandler | ProcedureContinued |
Occurs after a Procedure is continued. More... | |
ProcedureFinishedHandler | ProcedureFinished |
Occurs when a procedure completed running. More... | |
ProcedurePausedHandler | ProcedurePaused |
Occurs before a Procedure is paused. More... | |
ProcedurePendingHandler | ProcedurePending |
Occurs after a Procedure is executed but the Procedure is not really started. More... | |
ProcedureStartedHandler | ProcedureStarted |
Occurs when a Procedure was started. More... | |
ProcedureStoppedHandler | ProcedureStopped |
Occurs when a Procedure was stopped. More... | |
ProcedureTimeoutHandler | ProcedureTimeout |
Occurs when a timeout expires. More... | |
Main class to load and execute an OTX project
IRuntimeContext OpenTestSystem.Otx.Runtime.Api.IRuntimeManager.Execute | ( | IProcedure | procedure, |
ulong | timeout = 0 |
||
) |
Executes a procedure synchronously.
procedure | Procedure to execute. |
timeout | Timeout for procedure execution in milliseconds. The default value 0 means without timeout. If a timeout expires, the procedure is stopped, the the ExecutionState is Timeout and the ProcedureTimeout event occurs. The timeout timer is only counted when the procedure is really running. This means only while the ExecutionState is Running. |
Examples
IRuntimeContext OpenTestSystem.Otx.Runtime.Api.IRuntimeManager.Execute | ( | string | name, |
IProcedure | procedure, | ||
ExpectedState | expectedConnectionState, | ||
ulong | timeout = 0 |
||
) |
Executes a procedure synchronously at an expected connection state.
name | Optional name of the RuntimeContext. The name will be used for example to better distinguish the different clients inside the trace file. |
procedure | Procedure to execute. |
expectedConnectionState | The expected connection state during the procedure execution:
|
timeout | Timeout for procedure execution in milliseconds. The default value 0 means without timeout. If a timeout expires, the procedure is stopped, the the ExecutionState is Timeout and the ProcedureTimeout event occurs. The timeout timer is only counted when the procedure is really running. This means only while the ExecutionState is Running. |
Exceptions.ConnectionStateException | Throws 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. |
IRuntimeContext OpenTestSystem.Otx.Runtime.Api.IRuntimeManager.Execute | ( | string | name, |
IProcedure | procedure, | ||
ulong | timeout = 0 |
||
) |
Executes a procedure synchronously.
name | Optional 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. |
procedure | Procedure to execute. |
timeout | Timeout for procedure execution in milliseconds. The default value 0 means without timeout. If a timeout expires, the procedure is stopped, the the ExecutionState is Timeout and the ProcedureTimeout event occurs. The timeout timer is only counted when the procedure is really running. This means only while the ExecutionState is Running. |
Examples
IRuntimeContext OpenTestSystem.Otx.Runtime.Api.IRuntimeManager.ExecuteAsync | ( | IProcedure | procedure, |
ulong | timeout = 0 |
||
) |
Executes a procedure asynchronously.
procedure | Procedure to execute. |
timeout | Timeout for procedure execution in milliseconds. The default value 0 means without timeout. If a timeout expires, the procedure is stopped, the the ExecutionState is Timeout and the ProcedureTimeout event occurs. The timeout timer is only counted when the procedure is really running. This means only while the ExecutionState is Running. |
IRuntimeContext OpenTestSystem.Otx.Runtime.Api.IRuntimeManager.ExecuteAsync | ( | string | name, |
IProcedure | procedure, | ||
ExpectedState | expectedConnectionState, | ||
ulong | timeout = 0 |
||
) |
Executes a procedure asynchronously.
name | Optional name of the RuntimeContext. The name will be used for example to better distinguish the different clients inside the trace file. |
procedure | Procedure to execute. |
expectedConnectionState | is the 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. |
timeout | Timeout for procedure execution in milliseconds. The default value 0 means without timeout. If a timeout expires, the procedure is stopped, the the ExecutionState is Timeout and the ProcedureTimeout event occurs. The timeout timer is only counted when the procedure is really running. This means only while the ExecutionState is Running. |
Exceptions.ConnectionStateException | Throws 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. |
IRuntimeContext OpenTestSystem.Otx.Runtime.Api.IRuntimeManager.ExecuteAsync | ( | string | name, |
IProcedure | procedure, | ||
ulong | timeout = 0 |
||
) |
Executes a procedure asynchronously.
name | Optional 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. |
procedure | Procedure to execute. |
timeout | Timeout for procedure execution in milliseconds. The default value 0 means without timeout. If a timeout expires, the procedure is stopped, the the ExecutionState is Timeout and the ProcedureTimeout event occurs. The timeout timer is only counted when the procedure is really running. This means only while the ExecutionState is Running. |
bool OpenTestSystem.Otx.Runtime.Api.IRuntimeManager.IsProtected | ( | string | fileName | ) |
Checks if a PTX/PPX is signed and/or encrypted.
fileName | Path of PTX/PPX file to check. |
Examples
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.
fileName | Path of PPX file to load. |
Exceptions.FileNotFoundException | Throw when the given file cannot be found. |
Exceptions.FileFormatException | Throw when PPX file is invalid |
Exceptions.Exception | Throw if password is wrong or empty. |
Examples
A sample which loads a PPX file and browses its structure.
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.
fileName | Path of PPX file to load. |
password | Password to decrypt the PPX file. |
Exceptions.FileNotFoundException | Throw when the given file cannot be found. |
Exceptions.FileFormatException | Throw when PPX file is invalid |
Exceptions.Exception | Throw if password is wrong or empty. |
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.
fileName | Path of PTX file to load. |
Exceptions.FileNotFoundException | Throw when the given file cannot be found. |
Exceptions.FileFormatException | Throw when PTX file is invalid, or when PTX version is older than required, or Runtime version is older than the version PTX required. |
Exceptions.Exception | Throw if password is wrong or empty. |
Examples
A sample which loads a PTX file and browses its structure.
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.
fileName | Path of PTX file to load. |
password | Password to decrypt the PTX file. |
Exceptions.FileNotFoundException | Throw when the given file cannot be found. |
Exceptions.FileFormatException | Throw when PTX file is invalid, or when PTX version is older than required, or Runtime version is older than the version PTX required. |
Exceptions.Exception | Throw if password is wrong or empty. |
void OpenTestSystem.Otx.Runtime.Api.IRuntimeManager.SetCustomImplementation | ( | IBasicScreenImplementation | basicScreenImplementation | ) |
Sets BasicScreenImplementation.
implementation | An implementation of IBasicScreenImplementation. |
void OpenTestSystem.Otx.Runtime.Api.IRuntimeManager.SetCustomImplementation | ( | ICommonDialogsImplementation | commonDialogsImplementation | ) |
Sets ICommonDiaglogImplementation.
implementation | An implementation of ISqlImplementation. |
void OpenTestSystem.Otx.Runtime.Api.IRuntimeManager.SetCustomImplementation | ( | IContextVariableImplementation | contextVariableImplementation | ) |
Sets IContextVariableImplementation.
implementation | An implementation of IContextVariableImplementation. |
void OpenTestSystem.Otx.Runtime.Api.IRuntimeManager.SetCustomImplementation | ( | ICustomScreenImplementation | customScreenImplementation | ) |
Sets ICustomScreenImplementation.
implementation | An implementation of ICustomScreenImplementation. |
void OpenTestSystem.Otx.Runtime.Api.IRuntimeManager.SetCustomImplementation | ( | IExternalServiceProviderImplementation | externalServiceProvider | ) |
Sets IExternalServiceProviderImplementation.
implementation | An implementation of IExternalServiceProviderImplementation. |
void OpenTestSystem.Otx.Runtime.Api.IRuntimeManager.SetCustomImplementation | ( | Ii18nImplementation | implementation | ) |
Sets II18nImplementation.
implementation | An implementation of II18nImplementation. |
void OpenTestSystem.Otx.Runtime.Api.IRuntimeManager.SetCustomImplementation | ( | ILoggingImplementation | loggingImplementation | ) |
Sets ILoggingImplementation.
implementation | An implementation of ILoggingImplementation. |
void OpenTestSystem.Otx.Runtime.Api.IRuntimeManager.SetCustomImplementation | ( | IMeasureImplementation | measureImplementation | ) |
Sets IMeasureImplementation.
implementation | An implementation of IMeasureImplementation. |
void OpenTestSystem.Otx.Runtime.Api.IRuntimeManager.SetCustomImplementation | ( | ISqlImplementation | implementation | ) |
Sets ISqlImplementation.
implementation | An implementation of ISqlImplementation. |
void OpenTestSystem.Otx.Runtime.Api.IRuntimeManager.SetCustomImplementation | ( | IStateVariableImplementation | stateVariableImplementation | ) |
Sets IStateVariableImplementation.
implementation | An implementation of IStateVariableImplementation. |
void OpenTestSystem.Otx.Runtime.Api.IRuntimeManager.StopAll | ( | ) |
Stops all synchronous and asynchronous executing procedures of this RuntimeManager.
|
get |
The diagnostic connection state.
|
getset |
Gets search path.
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.
path | Base directory. |
DiagConnectionStateChangedHandler OpenTestSystem.Otx.Runtime.Api.IRuntimeManager.DiagConnectionStateChanged |
Occurs after the ConnectionState was changed but only during the Procedure execution started with @expectedConnectionState@ not equal to @None.
InOutParameterValueChangedHandler OpenTestSystem.Otx.Runtime.Api.IRuntimeManager.InOutParameterValueChanged |
Occurs when a ProcedureInOutParameter value changed from Otx-Runtime.
ProcedureAbortedHandler OpenTestSystem.Otx.Runtime.Api.IRuntimeManager.ProcedureAborted |
Occurs when a Procedure is stopped with an exception.
ProcedureContinuedHandler OpenTestSystem.Otx.Runtime.Api.IRuntimeManager.ProcedureContinued |
Occurs after a Procedure is continued.
ProcedureFinishedHandler OpenTestSystem.Otx.Runtime.Api.IRuntimeManager.ProcedureFinished |
Occurs when a procedure completed running.
ProcedurePausedHandler OpenTestSystem.Otx.Runtime.Api.IRuntimeManager.ProcedurePaused |
Occurs before a Procedure is paused.
ProcedurePendingHandler OpenTestSystem.Otx.Runtime.Api.IRuntimeManager.ProcedurePending |
Occurs after a Procedure is executed but the Procedure is not really started.
ProcedureStartedHandler OpenTestSystem.Otx.Runtime.Api.IRuntimeManager.ProcedureStarted |
Occurs when a Procedure was started.
This event is fired once after the Procedure.Execute Method, after the initialization of the OTX Runtime and direct before the first action of the related Procedure is executed.
ProcedureStoppedHandler OpenTestSystem.Otx.Runtime.Api.IRuntimeManager.ProcedureStopped |
Occurs when a Procedure was stopped.
ProcedureTimeoutHandler OpenTestSystem.Otx.Runtime.Api.IRuntimeManager.ProcedureTimeout |
Occurs when a timeout expires.