OTX-Runtime for C++
|
|
Main class to load and execute an OTX project More...
#include <IRuntimeManager.h>
Public Member Functions | |
virtual bool | AddDiagConnectionStateChangedListener (std::shared_ptr< std::function< void(ClampState batteryState, ClampState ignitionState)>> listener)=0 |
Adds diagnostic connection state changed listener. More... | |
virtual bool | AddInOutParameterValueChangedListener (std::shared_ptr< std::function< void(const IRuntimeContext &, const IProcedureInOutParameter &)>> listener)=0 |
Adds ProcedureInOutParameter value changed listener. More... | |
virtual bool | AddProcedureAbortedListener (std::shared_ptr< std::function< void(const IRuntimeContext &)>> listener)=0 |
Adds procedure aborted listener. More... | |
virtual bool | AddProcedureContinuedListener (std::shared_ptr< std::function< void(const IRuntimeContext &)>> listener)=0 |
Adds procedure continued listener. More... | |
virtual bool | AddProcedureFinishedListener (std::shared_ptr< std::function< void(const IRuntimeContext &)>> listener)=0 |
Adds procedure finished listener. More... | |
virtual bool | AddProcedurePausedListener (std::shared_ptr< std::function< void(const IRuntimeContext &, ExecutionStateChangeReason)>> listener)=0 |
Adds procedure paused listener. More... | |
virtual bool | AddProcedurePendingListener (std::shared_ptr< std::function< void(const IRuntimeContext &)>> listener)=0 |
Adds procedure pending listener. More... | |
virtual bool | AddProcedureStartedListener (std::shared_ptr< std::function< void(const IRuntimeContext &)>> listener)=0 |
Adds procedure started listener. More... | |
virtual bool | AddProcedureStoppedListener (std::shared_ptr< std::function< void(const IRuntimeContext &)>> listener)=0 |
Adds procedure stopped listener. More... | |
virtual bool | AddProcedureTimeoutListener (std::shared_ptr< std::function< void(const IRuntimeContext &)>> listener)=0 |
Adds procedure timeout listener. More... | |
virtual std::shared_ptr< IRuntimeContext > | Execute (const std::string &name, std::shared_ptr< OpenTestSystem::Otx::Runtime::Api::Otx::IProcedure > procedure, ExpectedState expectedConnectionState, unsigned long long timeout=0)=0 |
Executes a procedure synchronously at an expected connection state. More... | |
virtual std::shared_ptr< IRuntimeContext > | Execute (const std::string &name, std::shared_ptr< OpenTestSystem::Otx::Runtime::Api::Otx::IProcedure > procedure, unsigned long long timeout=0)=0 |
Executes a procedure synchronously. More... | |
virtual std::shared_ptr< IRuntimeContext > | Execute (std::shared_ptr< OpenTestSystem::Otx::Runtime::Api::Otx::IProcedure > procedure, unsigned long long timeout=0)=0 |
Executes a procedure synchronously. More... | |
virtual std::shared_ptr< IRuntimeContext > | ExecuteAsync (const std::string &name, std::shared_ptr< OpenTestSystem::Otx::Runtime::Api::Otx::IProcedure > procedure, ExpectedState expectedConnectionState, unsigned long long timeout=0)=0 |
Executes a procedure asynchronously at an expected connection state. More... | |
virtual std::shared_ptr< IRuntimeContext > | ExecuteAsync (const std::string &name, std::shared_ptr< OpenTestSystem::Otx::Runtime::Api::Otx::IProcedure > procedure, unsigned long long timeout=0)=0 |
Executes a procedure asynchronously. More... | |
virtual std::shared_ptr< IRuntimeContext > | ExecuteAsync (std::shared_ptr< OpenTestSystem::Otx::Runtime::Api::Otx::IProcedure > procedure, unsigned long long timeout=0)=0 |
Executes a procedure asynchronously. More... | |
virtual std::shared_ptr< DiagConnectionState > | GetDiagConnectionState ()=0 |
Get the diagnostic connection state. More... | |
virtual std::string | GetSearchPath ()=0 |
Gets search path. More... | |
virtual bool | IsProtected (const std::string &fileName)=0 |
Checks if a PTX/PPX is signed and/or encrypted. More... | |
virtual std::shared_ptr< OpenTestSystem::Otx::Runtime::Api::Project::IPlayerProject > | LoadPpx (const std::string &fileName)=0 |
Loads a PPX file. More... | |
virtual std::shared_ptr< OpenTestSystem::Otx::Runtime::Api::Project::IPlayerProject > | LoadPpx (const std::string &fileName, const std::string &password)=0 |
Loads a protected PPX file. More... | |
virtual std::shared_ptr< OpenTestSystem::Otx::Runtime::Api::Project::IProject > | LoadPtx (const std::string &fileName)=0 |
Loads a PTX file. More... | |
virtual std::shared_ptr< OpenTestSystem::Otx::Runtime::Api::Project::IProject > | LoadPtx (const std::string &fileName, const std::string &password)=0 |
Loads a protected PTX file. More... | |
virtual bool | RemoveDiagConnectionStateChangedListener (std::shared_ptr< std::function< void(ClampState batteryState, ClampState ignitionState)>> listener)=0 |
Removes diagnostic connection state changed listener. More... | |
virtual bool | RemoveInOutParameterValueChangedListener (std::shared_ptr< std::function< void(const IRuntimeContext &, const IProcedureInOutParameter &)>> listener)=0 |
Removes ProcedureInOutParameter value changed listener. More... | |
virtual bool | RemoveProcedureAbortedListener (std::shared_ptr< std::function< void(const IRuntimeContext &)>> listener)=0 |
Removes procedure aborted listener. More... | |
virtual bool | RemoveProcedureContinuedListener (std::shared_ptr< std::function< void(const IRuntimeContext &)>> listener)=0 |
Removes procedure continued listener. More... | |
virtual bool | RemoveProcedureFinishedListener (std::shared_ptr< std::function< void(const IRuntimeContext &)>> listener)=0 |
Removes procedure finished listener. More... | |
virtual bool | RemoveProcedurePausedListener (std::shared_ptr< std::function< void(const IRuntimeContext &, ExecutionStateChangeReason)>> listener)=0 |
Removes procedure paused listener. More... | |
virtual bool | RemoveProcedurePendingListener (std::shared_ptr< std::function< void(const IRuntimeContext &)>> listener)=0 |
Removes procedure pending listener. More... | |
virtual bool | RemoveProcedureStartedListener (std::shared_ptr< std::function< void(const IRuntimeContext &)>> listener)=0 |
Removes procedure started listener. More... | |
virtual bool | RemoveProcedureStoppedListener (std::shared_ptr< std::function< void(const IRuntimeContext &)>> listener)=0 |
Removes procedure stopped listener. More... | |
virtual bool | RemoveProcedureTimeoutListener (std::shared_ptr< std::function< void(const IRuntimeContext &)>> listener)=0 |
Adds procedure timeout listener. More... | |
virtual void | SetCustomImplementation (std::shared_ptr< OpenTestSystem::Otx::Runtime::Api::Custom::IBasicScreenImplementation > implementation)=0 |
Sets BasicScreenImplementation. More... | |
virtual void | SetCustomImplementation (std::shared_ptr< OpenTestSystem::Otx::Runtime::Api::Custom::ICommonDialogsImplementation > implementation)=0 |
Sets ICommonDialogsImplementation. More... | |
virtual void | SetCustomImplementation (std::shared_ptr< OpenTestSystem::Otx::Runtime::Api::Custom::IContextVariableImplementation > implementation)=0 |
Sets IContextVariableImplementation. More... | |
virtual void | SetCustomImplementation (std::shared_ptr< OpenTestSystem::Otx::Runtime::Api::Custom::ICustomScreenImplementation > implementation)=0 |
Sets ICustomScreenImplementation. More... | |
virtual void | SetCustomImplementation (std::shared_ptr< OpenTestSystem::Otx::Runtime::Api::Custom::IExternalServiceProviderImplementation > implementation)=0 |
Sets IExternalServiceProviderImplementation. More... | |
virtual void | SetCustomImplementation (std::shared_ptr< OpenTestSystem::Otx::Runtime::Api::Custom::Ii18nImplementation > implementation)=0 |
Sets Ii18nImplementation. More... | |
virtual void | SetCustomImplementation (std::shared_ptr< OpenTestSystem::Otx::Runtime::Api::Custom::ILoggingImplementation > implementation)=0 |
Sets ILoggingImplementation. More... | |
virtual void | SetCustomImplementation (std::shared_ptr< OpenTestSystem::Otx::Runtime::Api::Custom::IMeasureImplementation > implementation)=0 |
Sets IMeasureImplementation. More... | |
virtual void | SetCustomImplementation (std::shared_ptr< OpenTestSystem::Otx::Runtime::Api::Custom::ISqlImplementation > implementation)=0 |
Sets ISqlImplementation. More... | |
virtual void | SetCustomImplementation (std::shared_ptr< OpenTestSystem::Otx::Runtime::Api::Custom::IStateVariableImplementation > implementation)=0 |
Sets IStateVariableImplementation. More... | |
virtual bool | SetSearchPath (const std::string &path)=0 |
Sets search path. More... | |
virtual void | StopAll ()=0 |
Stops all synchronous and asynchronous executing procedures of this RuntimeManager. More... | |
Main class to load and execute an OTX project
|
pure virtual |
Adds diagnostic connection state changed listener.
listener | A callback function which will be invoked when a diagnostic connection state changed. |
|
pure virtual |
Adds ProcedureInOutParameter value changed listener.
listener | A callback function which will be invoked when ProcedureInOutParameter value changed from Otx-Runtime. |
|
pure virtual |
Adds procedure aborted listener.
listener | A callback function which will be invoked when a Procedure is stopped with an exception. |
|
pure virtual |
Adds procedure continued listener.
listener | A callback function which will be invoked after a Procedure is continued. |
|
pure virtual |
Adds procedure finished listener.
listener | A callback function which will be invoked when a procedure finished without exception. |
|
pure virtual |
Adds procedure paused listener.
listener | A callback function which will be invoked before a Procedure is paused. |
|
pure virtual |
Adds procedure pending listener.
listener | A callback function which will be invoked after a Procedure is executed but the Procedure is not really started. |
|
pure virtual |
Adds procedure started listener.
listener | A callback function which will be invoked when a procedure started. |
|
pure virtual |
Adds procedure stopped listener.
listener | A callback function which will be invoked when a procedure stopped. |
|
pure virtual |
Adds procedure timeout listener.
listener | A callback function which will be invoked when a timeout expires. |
|
pure virtual |
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 | The procedure execution will be stopped when the timeout expires. |
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. |
|
pure virtual |
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 | The procedure execution will be stopped when the timeout expires. |
Examples
|
pure virtual |
Executes a procedure synchronously.
procedure | Procedure to execute. |
timeout | The procedure execution will be stopped when the timeout expires. |
Examples
|
pure virtual |
Executes a procedure asynchronously 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 | The procedure execution will be stopped when the timeout expires. |
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. |
|
pure virtual |
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 | The procedure execution will be stopped when the timeout expires. |
|
pure virtual |
Executes a procedure asynchronously.
procedure | Procedure to execute. |
timeout | The procedure execution will be stopped when the timeout expires. |
|
pure virtual |
Get the diagnostic connection state.
|
pure virtual |
Gets search path.
|
pure virtual |
Checks if a PTX/PPX is signed and/or encrypted.
fileName | Path of PTX/PPX file to check. |
Examples
|
pure virtual |
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. |
OpenTestSystem::Otx::Runtime::Api::Exceptions::FileNotFoundException | Thrown when the given file cannot be found. |
OpenTestSystem::Otx::Runtime::Api::Exceptions::FileFormatException | Throw if PPX's format is invalid |
OpenTestSystem::Otx::Runtime::Api::Exceptions::Exception | Thrown when loading protected PPX file without password or wrong password |
Examples
A sample which loads a PPX file and browses its structure.
|
pure virtual |
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. |
OpenTestSystem::Otx::Runtime::Api::Exceptions::FileNotFoundException | Thrown when the given file cannot be found. |
OpenTestSystem::Otx::Runtime::Api::Exceptions::FileFormatException | Throw if PPX's format is invalid |
OpenTestSystem::Otx::Runtime::Api::Exceptions::Exception | Thrown when loading protected PPX file without password or wrong password |
|
pure virtual |
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. |
OpenTestSystem::Otx::Runtime::Api::Exceptions::FileNotFoundException | Thrown when the given file cannot be found. |
OpenTestSystem::Otx::Runtime::Api::Exceptions::FileFormatException | Throw if PTX's format is invalid or PTX version is older than required or Runtime version is older than PTX's required RuntimeVersion |
OpenTestSystem::Otx::Runtime::Api::Exceptions::Exception | Thrown when loading protected PTX file without password or wrong password |
Examples
A sample which loads a PTX file and browses its structure.
|
pure virtual |
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. |
OpenTestSystem::Otx::Runtime::Api::Exceptions::FileNotFoundException | Thrown when the given file cannot be found. |
OpenTestSystem::Otx::Runtime::Api::Exceptions::FileFormatException | Throw if PTX's format is invalid or PTX version is older than required or Runtime version is older than PTX's required RuntimeVersion |
OpenTestSystem::Otx::Runtime::Api::Exceptions::Exception | Thrown when loading protected PTX file without password or wrong password |
|
pure virtual |
Removes diagnostic connection state changed listener.
listener | A callback function which will be invoked when a diagnostic connection state changed. |
|
pure virtual |
Removes ProcedureInOutParameter value changed listener.
listener | A callback function which will be invoked when ProcedureInOutParameter value changed from Otx-Runtime. |
|
pure virtual |
Removes procedure aborted listener.
listener | A callback function which will be invoked when a Procedure is stopped with an exception. |
|
pure virtual |
Removes procedure continued listener.
listener | A callback function which will be invoked after a Procedure is continued. |
|
pure virtual |
Removes procedure finished listener.
listener | A callback function which will be invoked when a procedure finished without exception. |
|
pure virtual |
Removes procedure paused listener.
listener | A callback function which will be invoked before a Procedure is paused. |
|
pure virtual |
Removes procedure pending listener.
listener | A callback function which will be invoked after a Procedure is executed but the Procedure is not really started. |
|
pure virtual |
Removes procedure started listener.
listener | A callback function which will be invoked when a procedure started. |
|
pure virtual |
Removes procedure stopped listener.
listener | A callback function which will be invoked when a procedure stopped. |
|
pure virtual |
Adds procedure timeout listener.
listener | A callback function which will be invoked when a timeout expires. |
|
pure virtual |
Sets BasicScreenImplementation.
implementation | An implementation of IBasicScreenImplementation. |
|
pure virtual |
Sets ICommonDialogsImplementation.
implementation | An implementation of ICommonDialogsImplementation. |
|
pure virtual |
Sets IContextVariableImplementation.
implementation | An implementation of IContextVariableImplementation. |
|
pure virtual |
Sets ICustomScreenImplementation.
implementation | An implementation of ICustomScreenImplementation. |
|
pure virtual |
Sets IExternalServiceProviderImplementation.
implementation | An implementation of IExternalServiceProviderImplementation. |
|
pure virtual |
Sets Ii18nImplementation.
implementation | An implementation of Ii18nImplementation. |
|
pure virtual |
Sets ILoggingImplementation.
implementation | An implementation of ILoggingImplementation. |
|
pure virtual |
Sets IMeasureImplementation.
implementation | An implementation of IMeasureImplementation. |
|
pure virtual |
Sets ISqlImplementation.
implementation | An implementation of ISqlImplementation. |
|
pure virtual |
Sets IStateVariableImplementation.
implementation | An implementation of IStateVariableImplementation. |
|
pure virtual |
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. |
|
pure virtual |
Stops all synchronous and asynchronous executing procedures of this RuntimeManager.