Class IBaseRuntimeManager¶
ClassList > IBaseRuntimeManager
#include <SimulationRuntimeApi.h>
Inherits the following classes: IBaseInterface
Inherited by the following classes: IRemoteRuntimeManager, ISimulationRuntimeManager
Public Functions¶
| 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 CreateInterface [½]¶
Creates and returns an interface of an already registered virtual controller instance.
virtual ERuntimeErrorCode IBaseRuntimeManager::CreateInterface (
INT32 in_InstanceID,
IInstance ** out_InstanceInterface
) = 0
Parameters:
in_InstanceIDThe name of the registered instance you would like to get the interface from.out_InstanceInterfaceThe ID of the registered instance you would like to get the interface from.
function CreateInterface [2/2]¶
Creates and returns an interface of an already registered virtual controller instance.
virtual ERuntimeErrorCode IBaseRuntimeManager::CreateInterface (
WCHAR * in_InstanceName,
IInstance ** out_InstanceInterface
) = 0
Parameters:
in_InstanceNameThe name of the registered instance you would like to get the interface from.out_InstanceInterfacePointer to a SimulationRuntime interface pointer. The pointer must be initialized with NULL. The interface will be created inside the function.
function GetDefaultStoragePath¶
Get default storage path for instances.
virtual ERuntimeErrorCode IBaseRuntimeManager::GetDefaultStoragePath (
WCHAR * out_DefaultStoragePath
) = 0
Parameters:
out_DefaultStoragePathOutput parameter which is filled with the default storage path
function GetNetInterfaces¶
Retrieve info about computer network interfaces, which can be used by the SetInterfaceMapping function.
virtual ERuntimeErrorCode IBaseRuntimeManager::GetNetInterfaces (
SNetInterfaceInfo * inout_InterfaceInfo,
UINT * inout_InterfaceCount
) = 0
Parameters:
inout_InterfaceInfoAddress of first item of SNetInterfaceInfo array, which will get information about computer network adapters. Or NULL if only number of network adapters is requested.inout_InterfaceCountAt input, number of SNetInterfaceInfo items allocated by user, at the output real number of computer adapters (array items).
Returns:
SREC_OK or SREC_INDEX_OUT_OF_RANGE if number of array items provided is lower than number of computer adapters.
function GetNetworkMode¶
Get the current network mode setting that will be used on the network adapter for distributed communication.
virtual ERuntimeErrorCode IBaseRuntimeManager::GetNetworkMode (
ENetworkMode * out_mode
) = 0
Parameters:
out_modeType of network communication mode to set
function GetPort¶
Returns the open port. Returns 0 if no port is open or if the function fails.
virtual UINT16 IBaseRuntimeManager::GetPort () = 0
function GetRegisteredInstanceInfoAt¶
Returns the info about an already registered instance. You can use its ID or name to create an interface of this instance.
virtual ERuntimeErrorCode IBaseRuntimeManager::GetRegisteredInstanceInfoAt (
UINT32 in_Index,
SInstanceInfo * out_InstanceInfo
) = 0
Parameters:
in_IndexIndex of the created instance you want to get the info from. Must be smaller than the value you get from calling GetRegisteredInstanceCount().out_InstanceInfoThe info of the instance containing its name and ID.
function GetRegisteredInstancesCount¶
Returns the number of instances registered at the RuntimeManager. Returns 0 if the function fails.
virtual UINT32 IBaseRuntimeManager::GetRegisteredInstancesCount () = 0
function GetStrictMotionTiming¶
Get the current default strict motion timing setting for newly created instances.
virtual enum ERuntimeErrorCode IBaseRuntimeManager::GetStrictMotionTiming (
bool * enabled
) = 0
Parameters:
enabledtrue for enabled, false for disabled.
Returns:
ERuntimeErrorCode::SREC\_OK - Success. #ERuntimeErrorCode::SREC\_CONFIG\_FILE\_ERROR - Could not load the value from the configuration file UserInterfaceConfiguration.xml
function GetVersion¶
Returns the version of the Runtime Manager. If the function fails, the version returned is 0.
virtual UINT32 IBaseRuntimeManager::GetVersion () = 0
function RegisterCustomInstance [½]¶
Registers a new instance of a virtual controller at the Runtime Manager. Also creates and returns an interface of this instance.
virtual ERuntimeErrorCode IBaseRuntimeManager::RegisterCustomInstance (
WCHAR * in_VplcDll,
IInstance ** out_InstanceInterface
) = 0
Parameters:
in_VplcDllThe complete path to the DLL of the virtual controller the Siemens.Simatic.Simulation.Runtime.Instance.exe will load when powering on.out_InstanceInterfacePointer to a SimulationRuntime interface pointer. The Pointer must be initialized with NULL. The interface will be created inside the function.
function RegisterCustomInstance [2/2]¶
Registers a new instance of a virtual controller at the Runtime Manager. Also creates and returns an interface of this instance.
virtual ERuntimeErrorCode IBaseRuntimeManager::RegisterCustomInstance (
WCHAR * in_VplcDll,
WCHAR * in_InstanceName,
IInstance ** out_InstanceInterface
) = 0
Parameters:
in_VplcDllThe complete path to the DLL of the virtual controller the Siemens.Simatic.Simulation.Runtime.Instance.exe will load when powering on.in_InstanceNameThis will be the name of the instance. Each instance must have a unique name. If no name is given when registering a new instance, the instance is named "Instance_#" where # is the ID of the instance.
If this name already exists, the name will be "Instance_#.#" where the second # is a counter that will be increased until the name is unique. The length of the name must be smaller thanDINSTANCE_NAME_LENGTH.out_InstanceInterfacePointer to a SimulationRuntime interface pointer. The Pointer must be initialized with NULL. The interface will be created inside the function.
function RegisterInstance [⅕]¶
Registers a new instance of a virtual controller at the Runtime Manager. Also creates and returns an interface of this instance.
virtual ERuntimeErrorCode IBaseRuntimeManager::RegisterInstance (
IInstance ** out_InstanceInterface
) = 0
Parameters:
out_InstanceInterfacePointer to a SimulationRuntime interface pointer. The Pointer must be initialized with NULL. The interface will be created inside the function.
function RegisterInstance [⅖]¶
Registers a new instance of a virtual controller at the Runtime Manager. Also creates and returns an interface of this instance.
virtual ERuntimeErrorCode IBaseRuntimeManager::RegisterInstance (
WCHAR * in_InstanceName,
IInstance ** out_InstanceInterface
) = 0
Parameters:
in_InstanceNameThis will be the name of the instance. Each instance must have a unique name. If no name is given when registering a new instance, the instance is named "Instance_#" where # is the ID of the instance.
If this name already exists, the name will be "Instance_#.#" where the second # is a counter that will be increased until the name is unique. The length of the name must be smaller thanDINSTANCE_NAME_LENGTH.out_InstanceInterfacePointer to a SimulationRuntime interface pointer. The Pointer must be initialized with NULL. The interface will be created inside the function.
function RegisterInstance [⅗]¶
Registers a new instance of a virtual controller at the Runtime Manager. Also creates and returns an interface of this instance.
virtual ERuntimeErrorCode IBaseRuntimeManager::RegisterInstance (
ECPUType in_CPUType,
IInstance ** out_InstanceInterface
) = 0
Parameters:
in_CPUTypeDefines which type of CPU will be simulated when starting the instance. The default value is "SRCT_1500_Unspecified".out_InstanceInterfacePointer to a SimulationRuntime interface pointer. The Pointer must be initialized with NULL. The interface will be created inside the function.
function RegisterInstance [⅘]¶
Registers a new instance of a virtual controller at the Runtime Manager. Also creates and returns an interface of this instance.
virtual ERuntimeErrorCode IBaseRuntimeManager::RegisterInstance (
ECPUType in_CPUType,
WCHAR * in_InstanceName,
IInstance ** out_InstanceInterface
) = 0
Parameters:
in_CPUTypeDefines which type of CPU will be simulated when starting the instance. The default value is "SRCT_1500_Unspecified".in_InstanceNameThis will be the name of the instance. Each instance must have a unique name. If no name is given when registering a new instance, the instance is named "Instance_#" where # is the ID of the instance.
If this name already exists, the name will be "Instance_#.#" where the second # is a counter that will be increased until the name is unique. The length of the name must be smaller thanDINSTANCE_NAME_LENGTH.out_InstanceInterfacePointer to a SimulationRuntime interface pointer. The Pointer must be initialized with NULL. The interface will be created inside the function.
function RegisterInstance [5/5]¶
Registers a new instance of a virtual controller at the Runtime Manager. Also creates and returns an interface of this instance.
virtual ERuntimeErrorCode IBaseRuntimeManager::RegisterInstance (
const WCHAR * in_ArticleNumber,
const WCHAR * in_InstanceName,
IInstance ** out_InstanceInterface
) = 0
Parameters:
in_ArticleNumberDefines which article number CPU will be simulated when starting the instance. The default value is "6ES7 SIM-01500-APLC".in_InstanceNameThis will be the name of the instance. Each instance must have a unique name. If no name is given when registering a new instance, the instance is named "Instance_#" where # is the ID of the instance.
If this name already exists, the name will be "Instance_#.#" where the second # is a counter that will be increased until the name is unique. The length of the name must be smaller thanDINSTANCE_NAME_LENGTH.out_InstanceInterfacePointer to a SimulationRuntime interface pointer. The Pointer must be initialized with NULL. The interface will be created inside the function.
function ResetNetInterfaceBindings¶
Resets bindings to the default state.
virtual ERuntimeErrorCode IBaseRuntimeManager::ResetNetInterfaceBindings () = 0
function SetDefaultStoragePath¶
Set the default storage path.
virtual ERuntimeErrorCode IBaseRuntimeManager::SetDefaultStoragePath (
const WCHAR * in_DefaultStoragePath
) = 0
Parameters:
in_DefaultStoragePathInput parameter which specifies the default storage path
function SetNetInterfaceBindings¶
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 IBaseRuntimeManager::SetNetInterfaceBindings (
DWORD in_PCInterfaceIndex=0
) = 0
Parameters:
in_PCInterfaceIndexIf promiscuous mode is set, then PC interface index can be specified, which will be used for communication over the network. To enable only local PC communication, provide zero (0) value. In non-promiscuous mode, this parameter is ignored and binding is set according to configured interface mappings.
function SetNetworkMode¶
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 ERuntimeErrorCode IBaseRuntimeManager::SetNetworkMode (
const ENetworkMode in_mode
) = 0
Parameters:
in_modeType of network communication mode to set
function SetStrictMotionTiming¶
Enable or disable default strict motion timing for newly created instances.
virtual enum ERuntimeErrorCode IBaseRuntimeManager::SetStrictMotionTiming (
bool enable
) = 0
Parameters:
enabletrue to enable, false to disable.
Returns:
ERuntimeErrorCode::SREC\_OK - Success. #ERuntimeErrorCode::SREC\_ALREADY\_EXISTS - An instance is already registered. Remove all instances before calling this method. #ERuntimeErrorCode::SREC\_ACCESS\_DENIED - Missing write permission for the configuration file. #ERuntimeErrorCode::SREC\_CONFIG\_FILE\_ERROR - Could not save the value into the configuration file UserInterfaceConfiguration.xml
function ~IBaseRuntimeManager¶
inline virtual IBaseRuntimeManager::~IBaseRuntimeManager ()