The chat responses are generated using Generative AI technology for intuitive search and may not be entirely accurate. They are not intended as professional advice. For full details, including our use rights, privacy practices and potential export control restrictions, please refer to our Generative AI Service Privacy Information. As this is a test version, please let us know if something irritating comes up. Like you get recommended a chocolate fudge ice cream instead of an energy managing application. If that occurs, please use the feedback button in our contact form!
Skip to content
SIMATIC S7-PLCSIM Advanced Share llms optimized content

Efficiently simulate SIMATIC S7 controllers with S7-PLCSIM Advanced. Test, debug, and optimize your control programs without using physical hardware.

Class ISimulationRuntimeManager

ClassList > ISimulationRuntimeManager

  • #include <SimulationRuntimeApi.h>

Inherits the following classes: IBaseRuntimeManager

Public Functions

TypeName
virtual ERuntimeErrorCodeClosePort () = 0
Closes the opened port and all open connections another Runtime Manager has established to the opened port.
virtual UINT32GetRegisteredInstancesCount () = 0
Returns the number of instances registered at the RuntimeManager. Returns 0 if the function fails.
virtual ERuntimeErrorCodeGetRemoteConnectionInfoAt (UINT32 in_Index, SConnectionInfo * out_ConnectionInfo) = 0
Returns the info about an open connection.
virtual UINT32GetRemoteConnectionsCount () = 0
Returns the amount of open remote connections. Returns 0 if the function fails.
virtual boolIsInitialized () = 0
Returns a value indicating whether the API has been initialized successfully.
virtual boolIsRuntimeManagerAvailable () = 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 ERuntimeErrorCodeOpenPort (UINT16 in_Port) = 0
Opens a port another Runtime Manager can connect to.
virtual voidRegisterOnAutodiscoverCallback (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 voidRegisterOnConfigurationChangedCallback (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 voidRegisterOnConfigurationChangedEvent () = 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 voidRegisterOnConfigurationChangedEvent (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 voidRegisterOnRunTimeManagerLostCallback (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 voidRegisterOnRunTimeManagerLostEvent () = 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 voidRegisterOnRunTimeManagerLostEvent (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 ERuntimeErrorCodeRemoteConnect (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 ERuntimeErrorCodeRemoteConnect (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 ERuntimeErrorCodeRunAutodiscover (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 ERuntimeErrorCodeShutdown () = 0
Ends the communication with the Runtime Manager and cleans up the interfaces.
virtual voidUnregisterOnAutodiscoverCallback (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 voidUnregisterOnConfigurationChangedCallback (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 voidUnregisterOnConfigurationChangedEvent () = 0
Unregisters the event object.
virtual voidUnregisterOnRunTimeManagerLostCallback (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 voidUnregisterOnRunTimeManagerLostEvent () = 0
Unregisters the event object.
virtual boolWaitForOnConfigurationChangedEvent () = 0
The function will block until the registered event object is in the signaled state or the timeout interval elapses.
virtual boolWaitForOnConfigurationChangedEvent (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 boolWaitForOnRunTimeManagerLostEvent () = 0
The function will block until the registered event object is in the signaled state or the timeout interval elapses.
virtual boolWaitForOnRunTimeManagerLostEvent (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

See IBaseRuntimeManager

TypeName
virtual ERuntimeErrorCodeCreateInterface (INT32 in_InstanceID, IInstance ** out_InstanceInterface) = 0
Creates and returns an interface of an already registered virtual controller instance.
virtual ERuntimeErrorCodeCreateInterface (WCHAR * in_InstanceName, IInstance ** out_InstanceInterface) = 0
Creates and returns an interface of an already registered virtual controller instance.
virtual ERuntimeErrorCodeGetDefaultStoragePath (WCHAR * out_DefaultStoragePath) = 0
Get default storage path for instances.
virtual ERuntimeErrorCodeGetNetInterfaces (SNetInterfaceInfo * inout_InterfaceInfo, UINT * inout_InterfaceCount) = 0
Retrieve info about computer network interfaces, which can be used by the SetInterfaceMapping function
virtual ERuntimeErrorCodeGetNetworkMode (ENetworkMode * out_mode) = 0
Get the current network mode setting that will be used on the network adapter for distributed communication.
virtual UINT16GetPort () = 0
Returns the open port. Returns 0 if no port is open or if the function fails.
virtual ERuntimeErrorCodeGetRegisteredInstanceInfoAt (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 UINT32GetRegisteredInstancesCount () = 0
Returns the number of instances registered at the RuntimeManager. Returns 0 if the function fails.
virtual enum ERuntimeErrorCodeGetStrictMotionTiming (bool * enabled) = 0
Get the current default strict motion timing setting for newly created instances.
virtual UINT32GetVersion () = 0
Returns the version of the Runtime Manager. If the function fails, the version returned is 0.
virtual ERuntimeErrorCodeRegisterCustomInstance (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 ERuntimeErrorCodeRegisterCustomInstance (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 ERuntimeErrorCodeRegisterInstance (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 ERuntimeErrorCodeRegisterInstance (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 ERuntimeErrorCodeRegisterInstance (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 ERuntimeErrorCodeRegisterInstance (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 ERuntimeErrorCodeRegisterInstance (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 ERuntimeErrorCodeResetNetInterfaceBindings () = 0
Resets bindings to the default state.
virtual ERuntimeErrorCodeSetDefaultStoragePath (const WCHAR * in_DefaultStoragePath) = 0
Set the default storage path.
virtual ERuntimeErrorCodeSetNetInterfaceBindings (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 ERuntimeErrorCodeSetNetworkMode (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 ERuntimeErrorCodeSetStrictMotionTiming (bool enable) = 0
Enable or disable default strict motion timing for newly created instances.
virtual~IBaseRuntimeManager ()

Public Functions inherited from IBaseInterface

See IBaseInterface

TypeName
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_Index The index of the connection info to get.
  • out_ConnectionInfo The 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_Port The 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_CallbackFunction A 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_CallbackFunction A 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_Event The 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_CallbackFunction A 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_Event The 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_IP The IP address of the remote PC.
  • in_Port The port open on the remote PC.
  • out_RunTimeManagerInterface Pointer 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_IP3 The first part of the IP address of the remote PC.
  • in_IP2 The second part of the IP address of the remote PC.
  • in_IP1 The third part of the IP address of the remote PC.
  • in_IP0 The last part of the IP address of the remote PC.
  • in_Port The port open on the remote PC.
  • out_RunTimeManagerInterface Pointer 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_Timeout Maximum 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_ms The 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_ms The value for the timeout limit in milliseconds.