1 #ifndef OpenTestSystem_Otx_Runtime_Api_IRuntimeManager_H
2 #define OpenTestSystem_Otx_Runtime_Api_IRuntimeManager_H
6 #include "TraceLevels.h"
8 #include "ExecutionStateChangeReason.h"
9 #include "ClampState.h"
10 #include "ExpectedState.h"
17 namespace OpenTestSystem {
namespace Otx {
namespace Runtime {
namespace Api {
namespace Otx {
23 namespace OpenTestSystem {
namespace Otx {
namespace Runtime {
namespace Api {
namespace Project {
28 namespace OpenTestSystem {
namespace Otx {
namespace Runtime {
namespace Api {
namespace DataTypes {
32 namespace OpenTestSystem {
namespace Otx {
namespace Runtime {
namespace Api {
namespace Custom {
45 namespace OpenTestSystem {
namespace Otx {
namespace Runtime {
namespace Api {
103 virtual std::shared_ptr<OpenTestSystem::Otx::Runtime::Api::Project::IProject>
LoadPtx(
const std::string& fileName) = 0;
121 virtual std::shared_ptr<OpenTestSystem::Otx::Runtime::Api::Project::IProject>
LoadPtx(
const std::string& fileName,
const std::string& password)= 0;
142 virtual std::shared_ptr<OpenTestSystem::Otx::Runtime::Api::Project::IPlayerProject>
LoadPpx(
const std::string& fileName) = 0;
160 virtual std::shared_ptr<OpenTestSystem::Otx::Runtime::Api::Project::IPlayerProject>
LoadPpx(
const std::string& fileName,
const std::string& password) = 0;
170 virtual std::shared_ptr<IRuntimeContext>
Execute(std::shared_ptr<OpenTestSystem::Otx::Runtime::Api::Otx::IProcedure> procedure,
unsigned long long timeout = 0) = 0;
181 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;
197 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;
205 virtual std::shared_ptr<IRuntimeContext>
ExecuteAsync(std::shared_ptr<OpenTestSystem::Otx::Runtime::Api::Otx::IProcedure> procedure,
unsigned long long timeout = 0) = 0;
214 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;
230 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;
236 virtual void SetCustomImplementation(std::shared_ptr<OpenTestSystem::Otx::Runtime::Api::Custom::IBasicScreenImplementation> implementation) = 0;
242 virtual void SetCustomImplementation(std::shared_ptr<OpenTestSystem::Otx::Runtime::Api::Custom::ICustomScreenImplementation> implementation) = 0;
248 virtual void SetCustomImplementation(std::shared_ptr<OpenTestSystem::Otx::Runtime::Api::Custom::IMeasureImplementation> implementation) = 0;
254 virtual void SetCustomImplementation(std::shared_ptr<OpenTestSystem::Otx::Runtime::Api::Custom::ILoggingImplementation> implementation) = 0;
260 virtual void SetCustomImplementation(std::shared_ptr<OpenTestSystem::Otx::Runtime::Api::Custom::Ii18nImplementation> implementation) = 0;
266 virtual void SetCustomImplementation(std::shared_ptr<OpenTestSystem::Otx::Runtime::Api::Custom::IContextVariableImplementation> implementation) = 0;
272 virtual void SetCustomImplementation(std::shared_ptr<OpenTestSystem::Otx::Runtime::Api::Custom::IStateVariableImplementation> implementation) = 0;
278 virtual void SetCustomImplementation(std::shared_ptr<OpenTestSystem::Otx::Runtime::Api::Custom::IExternalServiceProviderImplementation> implementation) = 0;
284 virtual void SetCustomImplementation(std::shared_ptr<OpenTestSystem::Otx::Runtime::Api::Custom::ICommonDialogsImplementation> implementation) = 0;
290 virtual void SetCustomImplementation(std::shared_ptr<OpenTestSystem::Otx::Runtime::Api::Custom::ISqlImplementation> implementation) = 0;
Allows users to implement their own basic Screens, consisting of ConfirmDialog, InputDialog,...
Definition: IBasicScreenImplementation.h:63
Allows users to implement their own common Dialogs, consisting of FileOpenDialog, FileSaveDialog,...
Definition: ICommonDialogsImplementation.h:20
Allows users to implement their own ContextVariables.
Definition: IContextVariableImplementation.h:29
Allows users to implement their own Screens.
Definition: ICustomScreenImplementation.h:33
Allows users to implement their own ExternalServiceProvider extension.
Definition: IExternalServiceProviderImplementation.h:47
Allows users to implement their own Logging extension.
Definition: ILoggingImplementation.h:92
Allows users to implement their own Measure extension.
Definition: IMeasureImplementation.h:23
Allows users to implement their own Sql extension.
Definition: ISqlImplementation.h:32
Allows users to implement their own StateVariables.
Definition: IStateVariableImplementation.h:32
Allows users to implement their own I18n extension.
Definition: Ii18nImplementation.h:22
Represents base of OTX DataTypes.
Definition: Object.h:17
The diagnostic connection state describes conditions how a procedure can be executed.
Definition: DiagConnectionState.h:21
Contains information of a Runner instance.
Definition: IRuntimeContext.h:30
Main class to load and execute an OTX project
Definition: IRuntimeManager.h:72
virtual bool AddProcedureStartedListener(std::shared_ptr< std::function< void(const IRuntimeContext &)>> listener)=0
Adds procedure started listener.
virtual bool RemoveProcedureTimeoutListener(std::shared_ptr< std::function< void(const IRuntimeContext &)>> listener)=0
Adds procedure timeout listener.
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.
virtual std::string GetSearchPath()=0
Gets search path.
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.
virtual void SetCustomImplementation(std::shared_ptr< OpenTestSystem::Otx::Runtime::Api::Custom::Ii18nImplementation > implementation)=0
Sets Ii18nImplementation.
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.
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.
virtual bool RemoveProcedureAbortedListener(std::shared_ptr< std::function< void(const IRuntimeContext &)>> listener)=0
Removes procedure aborted listener.
virtual void SetCustomImplementation(std::shared_ptr< OpenTestSystem::Otx::Runtime::Api::Custom::ISqlImplementation > implementation)=0
Sets ISqlImplementation.
virtual bool RemoveDiagConnectionStateChangedListener(std::shared_ptr< std::function< void(ClampState batteryState, ClampState ignitionState)>> listener)=0
Removes diagnostic connection state changed listener.
virtual void SetCustomImplementation(std::shared_ptr< OpenTestSystem::Otx::Runtime::Api::Custom::IMeasureImplementation > implementation)=0
Sets IMeasureImplementation.
virtual void SetCustomImplementation(std::shared_ptr< OpenTestSystem::Otx::Runtime::Api::Custom::IExternalServiceProviderImplementation > implementation)=0
Sets IExternalServiceProviderImplementation.
virtual void SetCustomImplementation(std::shared_ptr< OpenTestSystem::Otx::Runtime::Api::Custom::ILoggingImplementation > implementation)=0
Sets ILoggingImplementation.
virtual void SetCustomImplementation(std::shared_ptr< OpenTestSystem::Otx::Runtime::Api::Custom::IBasicScreenImplementation > implementation)=0
Sets BasicScreenImplementation.
virtual void SetCustomImplementation(std::shared_ptr< OpenTestSystem::Otx::Runtime::Api::Custom::IStateVariableImplementation > implementation)=0
Sets IStateVariableImplementation.
virtual void SetCustomImplementation(std::shared_ptr< OpenTestSystem::Otx::Runtime::Api::Custom::IContextVariableImplementation > implementation)=0
Sets IContextVariableImplementation.
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.
virtual bool RemoveProcedureFinishedListener(std::shared_ptr< std::function< void(const IRuntimeContext &)>> listener)=0
Removes procedure finished listener.
virtual std::shared_ptr< DiagConnectionState > GetDiagConnectionState()=0
Get the diagnostic connection state.
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.
virtual bool AddProcedurePendingListener(std::shared_ptr< std::function< void(const IRuntimeContext &)>> listener)=0
Adds procedure pending listener.
virtual bool AddProcedureStoppedListener(std::shared_ptr< std::function< void(const IRuntimeContext &)>> listener)=0
Adds procedure stopped listener.
virtual bool RemoveProcedureStartedListener(std::shared_ptr< std::function< void(const IRuntimeContext &)>> listener)=0
Removes procedure started listener.
virtual bool RemoveProcedurePausedListener(std::shared_ptr< std::function< void(const IRuntimeContext &, ExecutionStateChangeReason)>> listener)=0
Removes procedure paused listener.
virtual void SetCustomImplementation(std::shared_ptr< OpenTestSystem::Otx::Runtime::Api::Custom::ICustomScreenImplementation > implementation)=0
Sets ICustomScreenImplementation.
virtual bool AddProcedureAbortedListener(std::shared_ptr< std::function< void(const IRuntimeContext &)>> listener)=0
Adds procedure aborted listener.
virtual void SetCustomImplementation(std::shared_ptr< OpenTestSystem::Otx::Runtime::Api::Custom::ICommonDialogsImplementation > implementation)=0
Sets ICommonDialogsImplementation.
virtual bool AddInOutParameterValueChangedListener(std::shared_ptr< std::function< void(const IRuntimeContext &, const IProcedureInOutParameter &)>> listener)=0
Adds ProcedureInOutParameter value changed listener.
virtual bool SetSearchPath(const std::string &path)=0
Sets search path.
virtual bool AddProcedureContinuedListener(std::shared_ptr< std::function< void(const IRuntimeContext &)>> listener)=0
Adds procedure continued listener.
virtual bool RemoveInOutParameterValueChangedListener(std::shared_ptr< std::function< void(const IRuntimeContext &, const IProcedureInOutParameter &)>> listener)=0
Removes ProcedureInOutParameter value changed listener.
virtual bool AddDiagConnectionStateChangedListener(std::shared_ptr< std::function< void(ClampState batteryState, ClampState ignitionState)>> listener)=0
Adds diagnostic connection state changed listener.
virtual std::shared_ptr< OpenTestSystem::Otx::Runtime::Api::Project::IProject > LoadPtx(const std::string &fileName)=0
Loads a PTX file.
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.
virtual bool IsProtected(const std::string &fileName)=0
Checks if a PTX/PPX is signed and/or encrypted.
virtual bool AddProcedurePausedListener(std::shared_ptr< std::function< void(const IRuntimeContext &, ExecutionStateChangeReason)>> listener)=0
Adds procedure paused listener.
virtual bool RemoveProcedurePendingListener(std::shared_ptr< std::function< void(const IRuntimeContext &)>> listener)=0
Removes procedure pending listener.
virtual bool AddProcedureFinishedListener(std::shared_ptr< std::function< void(const IRuntimeContext &)>> listener)=0
Adds procedure finished listener.
virtual std::shared_ptr< OpenTestSystem::Otx::Runtime::Api::Project::IPlayerProject > LoadPpx(const std::string &fileName)=0
Loads a PPX file.
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.
virtual bool AddProcedureTimeoutListener(std::shared_ptr< std::function< void(const IRuntimeContext &)>> listener)=0
Adds procedure timeout listener.
virtual bool RemoveProcedureStoppedListener(std::shared_ptr< std::function< void(const IRuntimeContext &)>> listener)=0
Removes procedure stopped listener.
virtual bool RemoveProcedureContinuedListener(std::shared_ptr< std::function< void(const IRuntimeContext &)>> listener)=0
Removes procedure continued listener.
virtual void StopAll()=0
Stops all synchronous and asynchronous executing procedures of this RuntimeManager.
Represents an OTX Procedure.
Definition: IProcedure.h:15
Represents InOutParameter of a Procedure. The parameter is identical to a related parameter in OTX st...
Definition: IProcedureInOutParameter.h:17
Contains Projects.
Definition: IPlayerProject.h:24
The Project is the root element of the OTX Data Structure. It mainly contains the Packages and the Pr...
Definition: IProject.h:41
Namespace for browsing at OTX data structure.
Definition: IRuntimeContext.h:12
ExecutionStateChangeReason
Reason, why a procedure execution state was changed, e.g. Paused or Running
Definition: ExecutionStateChangeReason.h:12
ClampState
Contains the state of a clamp
Definition: ClampState.h:12
ExpectedState
Contains the expected state of the diagnostic connection
Definition: ExpectedState.h:12
Namespace containing all objects related to testing inside automotive industry