Class ISimulationRuntimeManager¶
ClassList > ISimulationRuntimeManager
#include <SimulationRuntimeApi.h>
Inherits the following classes: IBaseRuntimeManager
Public Functions¶
| Type | Name |
|---|---|
| virtual ERuntimeErrorCode | ClosePort () = 0 Closes the opened port and all open connections another Runtime Manager has established to the opened port. |
| virtual UINT32 | GetRegisteredInstancesCount () = 0 Returns the number of instances registered at the RuntimeManager. Returns 0 if the function fails. |
| virtual ERuntimeErrorCode | GetRemoteConnectionInfoAt (UINT32 in_Index, SConnectionInfo * out_ConnectionInfo) = 0 Returns the info about an open connection. |
| virtual UINT32 | GetRemoteConnectionsCount () = 0 Returns the amount of open remote connections. Returns 0 if the function fails. |
| virtual bool | IsInitialized () = 0 Returns a value indicating whether the API has been initialized successfully. |
| virtual bool | IsRuntimeManagerAvailable () = 0 The function returns false if the pipe connection to the RuntimeManager is lost. This only happens when the process of the RuntimeManager is closed. |
| virtual ERuntimeErrorCode | OpenPort (UINT16 in_Port) = 0 Opens a port another Runtime Manager can connect to. |
| virtual void | RegisterOnAutodiscoverCallback (EventCallback_SRRSI_AD in_CallbackFunction) = 0 When receiving the event the registered callback function will be called. The callback function runs in a separate thread. More callback functions can be registered to the event. |
| virtual void | RegisterOnConfigurationChangedCallback (EventCallback_SRCC_UINT32_UINT32_INT32 in_CallbackFunction) = 0 When receiving the event the registered callback function will be called. The callback function runs in a separate thread. More callback functions can be registered to the event. |
| virtual void | RegisterOnConfigurationChangedEvent () = 0 When receiving the event, the registered event object is set to signaled state. There can be only one event object registered to the event. Registering a new one will automatically unregister the previous one. |
| virtual void | RegisterOnConfigurationChangedEvent (HANDLE * in_Event) = 0 When receiving the event, the registered event object is set to signaled state. There can be only one event object registered to the event. Registering a new one will automatically unregister the previous one. |
| virtual void | RegisterOnRunTimeManagerLostCallback (EventCallback_VOID in_CallbackFunction) = 0 When receiving the event the registered callback function will be called. The callback function runs in a separate thread. More callback functions can be registered to the event. |
| virtual void | RegisterOnRunTimeManagerLostEvent () = 0 When receiving the event, the registered event object is set to signaled state. There can be only one event object registered to the event. Registering a new one will automatically unregister the previous one. |
| virtual void | RegisterOnRunTimeManagerLostEvent (HANDLE * in_Event) = 0 When receiving the event, the registered event object is set to signaled state. There can be only one event object registered to the event. Registering a new one will automatically unregister the previous one. |
| virtual ERuntimeErrorCode | RemoteConnect (UIP in_IP, UINT16 in_Port, IRemoteRuntimeManager ** out_RunTimeManagerInterface) = 0 Creates a new connection to a remote Runtime Manager or uses an already existing one to create an IRemoteRuntimeManager interface. |
| virtual ERuntimeErrorCode | RemoteConnect (UINT8 in_IP3, UINT8 in_IP2, UINT8 in_IP1, UINT8 in_IP0, UINT16 in_Port, IRemoteRuntimeManager ** out_RunTimeManagerInterface) = 0 Creates a new connection to a remote Runtime Manager or uses an already existing one to create an IRemoteRuntimeManager interface. |
| virtual ERuntimeErrorCode | RunAutodiscover (UINT32 in_Timeout=DAUTODISCOVER_DEFAULT_TIME) = 0 Starts searching for another RTMs on the network. Function RegisterOnAutodiscoverCallback should be set before for receiving events and data. |
| virtual ERuntimeErrorCode | Shutdown () = 0 Ends the communication with the Runtime Manager and cleans up the interfaces. |
| virtual void | UnregisterOnAutodiscoverCallback (EventCallback_SRRSI_AD in_CallbackFunction=nullptr) = 0 Unregisters specified callback function or the last registered one. When receiving the event no callback function will be called. |
| virtual void | UnregisterOnConfigurationChangedCallback (EventCallback_SRCC_UINT32_UINT32_INT32 in_CallbackFunction=nullptr) = 0 Unregisters specified callback function or the last registered one. When receiving the event no callback function will be called. |
| virtual void | UnregisterOnConfigurationChangedEvent () = 0 Unregisters the event object. |
| virtual void | UnregisterOnRunTimeManagerLostCallback (EventCallback_VOID in_CallbackFunction=nullptr) = 0 Unregisters specified callback function or the last registered one. When receiving the event no callback function will be called. |
| virtual void | UnregisterOnRunTimeManagerLostEvent () = 0 Unregisters the event object. |
| virtual bool | WaitForOnConfigurationChangedEvent () = 0 The function will block until the registered event object is in the signaled state or the timeout interval elapses. |
| virtual bool | WaitForOnConfigurationChangedEvent (UINT32 in_Time_ms) = 0 The function will block until the registered event object is in the signaled state or the timeout interval elapses. |
| virtual bool | WaitForOnRunTimeManagerLostEvent () = 0 The function will block until the registered event object is in the signaled state or the timeout interval elapses. |
| virtual bool | WaitForOnRunTimeManagerLostEvent (UINT32 in_Time_ms) = 0 The function will block until the registered event object is in the signaled state or the timeout interval elapses. |
Public Functions inherited from IBaseRuntimeManager¶
| Type | Name |
|---|---|
| virtual ERuntimeErrorCode | CreateInterface (INT32 in_InstanceID, IInstance ** out_InstanceInterface) = 0 Creates and returns an interface of an already registered virtual controller instance. |
| virtual ERuntimeErrorCode | CreateInterface (WCHAR * in_InstanceName, IInstance ** out_InstanceInterface) = 0 Creates and returns an interface of an already registered virtual controller instance. |
| virtual ERuntimeErrorCode | GetDefaultStoragePath (WCHAR * out_DefaultStoragePath) = 0 Get default storage path for instances. |
| virtual ERuntimeErrorCode | GetNetInterfaces (SNetInterfaceInfo * inout_InterfaceInfo, UINT * inout_InterfaceCount) = 0 Retrieve info about computer network interfaces, which can be used by the SetInterfaceMapping function |
| virtual ERuntimeErrorCode | GetNetworkMode (ENetworkMode * out_mode) = 0 Get the current network mode setting that will be used on the network adapter for distributed communication. |
| virtual UINT16 | GetPort () = 0 Returns the open port. Returns 0 if no port is open or if the function fails. |
| virtual ERuntimeErrorCode | GetRegisteredInstanceInfoAt (UINT32 in_Index, SInstanceInfo * out_InstanceInfo) = 0 Returns the info about an already registered instance. You can use its ID or name to create an interface of this instance. |
| virtual UINT32 | GetRegisteredInstancesCount () = 0 Returns the number of instances registered at the RuntimeManager. Returns 0 if the function fails. |
| virtual enum ERuntimeErrorCode | GetStrictMotionTiming (bool * enabled) = 0 Get the current default strict motion timing setting for newly created instances. |
| virtual UINT32 | GetVersion () = 0 Returns the version of the Runtime Manager. If the function fails, the version returned is 0. |
| virtual ERuntimeErrorCode | RegisterCustomInstance (WCHAR * in_VplcDll, IInstance ** out_InstanceInterface) = 0 Registers a new instance of a virtual controller at the Runtime Manager. Also creates and returns an interface of this instance. |
| virtual ERuntimeErrorCode | RegisterCustomInstance (WCHAR * in_VplcDll, WCHAR * in_InstanceName, IInstance ** out_InstanceInterface) = 0 Registers a new instance of a virtual controller at the Runtime Manager. Also creates and returns an interface of this instance. |
| virtual ERuntimeErrorCode | RegisterInstance (IInstance ** out_InstanceInterface) = 0 Registers a new instance of a virtual controller at the Runtime Manager. Also creates and returns an interface of this instance. |
| virtual ERuntimeErrorCode | RegisterInstance (WCHAR * in_InstanceName, IInstance ** out_InstanceInterface) = 0 Registers a new instance of a virtual controller at the Runtime Manager. Also creates and returns an interface of this instance. |
| virtual ERuntimeErrorCode | RegisterInstance (ECPUType in_CPUType, IInstance ** out_InstanceInterface) = 0 Registers a new instance of a virtual controller at the Runtime Manager. Also creates and returns an interface of this instance. |
| virtual ERuntimeErrorCode | RegisterInstance (ECPUType in_CPUType, WCHAR * in_InstanceName, IInstance ** out_InstanceInterface) = 0 Registers a new instance of a virtual controller at the Runtime Manager. Also creates and returns an interface of this instance. |
| virtual ERuntimeErrorCode | RegisterInstance (const WCHAR * in_ArticleNumber, const WCHAR * in_InstanceName, IInstance ** out_InstanceInterface) = 0 Registers a new instance of a virtual controller at the Runtime Manager. Also creates and returns an interface of this instance. |
| virtual ERuntimeErrorCode | ResetNetInterfaceBindings () = 0 Resets bindings to the default state. |
| virtual ERuntimeErrorCode | SetDefaultStoragePath (const WCHAR * in_DefaultStoragePath) = 0 Set the default storage path. |
| virtual ERuntimeErrorCode | SetNetInterfaceBindings (DWORD in_PCInterfaceIndex=0) = 0 Sets bindings of PLCSIM Virtual Switch to PC interfaces according to networking mode and network interface mapping configuration for the instance. This function must be called from an elevated session (admin mode). |
| virtual ERuntimeErrorCode | SetNetworkMode (const ENetworkMode in_mode) = 0 Set the network mode that will be used on the network adapter for distributed communication. User has to check if bindings on network interfaces are correct. |
| virtual enum ERuntimeErrorCode | SetStrictMotionTiming (bool enable) = 0 Enable or disable default strict motion timing for newly created instances. |
| virtual | ~IBaseRuntimeManager () |
Public Functions inherited from IBaseInterface¶
See IBaseInterface
| Type | Name |
|---|---|
| virtual | ~IBaseInterface () |
Public Functions Documentation¶
function ClosePort¶
Closes the opened port and all open connections another Runtime Manager has established to the opened port.
virtual ERuntimeErrorCode ISimulationRuntimeManager::ClosePort () = 0
function GetRegisteredInstancesCount¶
Returns the number of instances registered at the RuntimeManager. Returns 0 if the function fails.
virtual UINT32 ISimulationRuntimeManager::GetRegisteredInstancesCount () = 0
Implements IBaseRuntimeManager::GetRegisteredInstancesCount
function GetRemoteConnectionInfoAt¶
Returns the info about an open connection.
virtual ERuntimeErrorCode ISimulationRuntimeManager::GetRemoteConnectionInfoAt (
UINT32 in_Index,
SConnectionInfo * out_ConnectionInfo
) = 0
Parameters:
in_IndexThe index of the connection info to get.out_ConnectionInfoThe connection info at this index.
function GetRemoteConnectionsCount¶
Returns the amount of open remote connections. Returns 0 if the function fails.
virtual UINT32 ISimulationRuntimeManager::GetRemoteConnectionsCount () = 0
function IsInitialized¶
Returns a value indicating whether the API has been initialized successfully.
virtual bool ISimulationRuntimeManager::IsInitialized () = 0
function IsRuntimeManagerAvailable¶
The function returns false if the pipe connection to the RuntimeManager is lost. This only happens when the process of the RuntimeManager is closed.
virtual bool ISimulationRuntimeManager::IsRuntimeManagerAvailable () = 0
function OpenPort¶
Opens a port another Runtime Manager can connect to.
virtual ERuntimeErrorCode ISimulationRuntimeManager::OpenPort (
UINT16 in_Port
) = 0
Parameters:
in_PortThe port. Must be bigger than 1024.
function RegisterOnAutodiscoverCallback¶
When receiving the event the registered callback function will be called. The callback function runs in a separate thread. More callback functions can be registered to the event.
virtual void ISimulationRuntimeManager::RegisterOnAutodiscoverCallback (
EventCallback_SRRSI_AD in_CallbackFunction
) = 0
Parameters:
in_CallbackFunctionA callback function to subscribe to the event.
function RegisterOnConfigurationChangedCallback¶
When receiving the event the registered callback function will be called. The callback function runs in a separate thread. More callback functions can be registered to the event.
virtual void ISimulationRuntimeManager::RegisterOnConfigurationChangedCallback (
EventCallback_SRCC_UINT32_UINT32_INT32 in_CallbackFunction
) = 0
Parameters:
in_CallbackFunctionA callback function to subscribe to the event.
function RegisterOnConfigurationChangedEvent [½]¶
When receiving the event, the registered event object is set to signaled state. There can be only one event object registered to the event. Registering a new one will automatically unregister the previous one.
virtual void ISimulationRuntimeManager::RegisterOnConfigurationChangedEvent () = 0
function RegisterOnConfigurationChangedEvent [2/2]¶
When receiving the event, the registered event object is set to signaled state. There can be only one event object registered to the event. Registering a new one will automatically unregister the previous one.
virtual void ISimulationRuntimeManager::RegisterOnConfigurationChangedEvent (
HANDLE * in_Event
) = 0
Parameters:
in_EventThe handle to a user created event object. The event object will be registered.
function RegisterOnRunTimeManagerLostCallback¶
When receiving the event the registered callback function will be called. The callback function runs in a separate thread. More callback functions can be registered to the event.
virtual void ISimulationRuntimeManager::RegisterOnRunTimeManagerLostCallback (
EventCallback_VOID in_CallbackFunction
) = 0
Parameters:
in_CallbackFunctionA callback function to subscribe to the event.
function RegisterOnRunTimeManagerLostEvent [½]¶
When receiving the event, the registered event object is set to signaled state. There can be only one event object registered to the event. Registering a new one will automatically unregister the previous one.
virtual void ISimulationRuntimeManager::RegisterOnRunTimeManagerLostEvent () = 0
function RegisterOnRunTimeManagerLostEvent [2/2]¶
When receiving the event, the registered event object is set to signaled state. There can be only one event object registered to the event. Registering a new one will automatically unregister the previous one.
virtual void ISimulationRuntimeManager::RegisterOnRunTimeManagerLostEvent (
HANDLE * in_Event
) = 0
Parameters:
in_EventThe handle to a user created event object. The event object will be registered.
function RemoteConnect [½]¶
Creates a new connection to a remote Runtime Manager or uses an already existing one to create an IRemoteRuntimeManager interface.
virtual ERuntimeErrorCode ISimulationRuntimeManager::RemoteConnect (
UIP in_IP,
UINT16 in_Port,
IRemoteRuntimeManager ** out_RunTimeManagerInterface
) = 0
Parameters:
in_IPThe IP address of the remote PC.in_PortThe port open on the remote PC.out_RunTimeManagerInterfacePointer to a remote RuntimeManager interface pointer. The pointer must be initialized with NULL. The interface will be created inside the function.
function RemoteConnect [2/2]¶
Creates a new connection to a remote Runtime Manager or uses an already existing one to create an IRemoteRuntimeManager interface.
virtual ERuntimeErrorCode ISimulationRuntimeManager::RemoteConnect (
UINT8 in_IP3,
UINT8 in_IP2,
UINT8 in_IP1,
UINT8 in_IP0,
UINT16 in_Port,
IRemoteRuntimeManager ** out_RunTimeManagerInterface
) = 0
Parameters:
in_IP3The first part of the IP address of the remote PC.in_IP2The second part of the IP address of the remote PC.in_IP1The third part of the IP address of the remote PC.in_IP0The last part of the IP address of the remote PC.in_PortThe port open on the remote PC.out_RunTimeManagerInterfacePointer to a remote RuntimeManager interface pointer. The pointer must be initialized with NULL. The interface will be created inside the function.
function RunAutodiscover¶
Starts searching for another RTMs on the network. Function RegisterOnAutodiscoverCallback should be set before for receiving events and data.
virtual ERuntimeErrorCode ISimulationRuntimeManager::RunAutodiscover (
UINT32 in_Timeout=DAUTODISCOVER_DEFAULT_TIME
) = 0
Parameters:
in_TimeoutMaximum time to wait for answers. Default is 2000 ms.
function Shutdown¶
Ends the communication with the Runtime Manager and cleans up the interfaces.
virtual ERuntimeErrorCode ISimulationRuntimeManager::Shutdown () = 0
function UnregisterOnAutodiscoverCallback¶
Unregisters specified callback function or the last registered one. When receiving the event no callback function will be called.
virtual void ISimulationRuntimeManager::UnregisterOnAutodiscoverCallback (
EventCallback_SRRSI_AD in_CallbackFunction=nullptr
) = 0
function UnregisterOnConfigurationChangedCallback¶
Unregisters specified callback function or the last registered one. When receiving the event no callback function will be called.
virtual void ISimulationRuntimeManager::UnregisterOnConfigurationChangedCallback (
EventCallback_SRCC_UINT32_UINT32_INT32 in_CallbackFunction=nullptr
) = 0
function UnregisterOnConfigurationChangedEvent¶
Unregisters the event object.
virtual void ISimulationRuntimeManager::UnregisterOnConfigurationChangedEvent () = 0
function UnregisterOnRunTimeManagerLostCallback¶
Unregisters specified callback function or the last registered one. When receiving the event no callback function will be called.
virtual void ISimulationRuntimeManager::UnregisterOnRunTimeManagerLostCallback (
EventCallback_VOID in_CallbackFunction=nullptr
) = 0
function UnregisterOnRunTimeManagerLostEvent¶
Unregisters the event object.
virtual void ISimulationRuntimeManager::UnregisterOnRunTimeManagerLostEvent () = 0
function WaitForOnConfigurationChangedEvent [½]¶
The function will block until the registered event object is in the signaled state or the timeout interval elapses.
virtual bool ISimulationRuntimeManager::WaitForOnConfigurationChangedEvent () = 0
function WaitForOnConfigurationChangedEvent [2/2]¶
The function will block until the registered event object is in the signaled state or the timeout interval elapses.
virtual bool ISimulationRuntimeManager::WaitForOnConfigurationChangedEvent (
UINT32 in_Time_ms
) = 0
Parameters:
in_Time_msThe value for the timeout limit in milliseconds.
function WaitForOnRunTimeManagerLostEvent [½]¶
The function will block until the registered event object is in the signaled state or the timeout interval elapses.
virtual bool ISimulationRuntimeManager::WaitForOnRunTimeManagerLostEvent () = 0
function WaitForOnRunTimeManagerLostEvent [2/2]¶
The function will block until the registered event object is in the signaled state or the timeout interval elapses.
virtual bool ISimulationRuntimeManager::WaitForOnRunTimeManagerLostEvent (
UINT32 in_Time_ms
) = 0
Parameters:
in_Time_msThe value for the timeout limit in milliseconds.