File SimulationRuntimeApi.h¶
FileList > headers > SimulationRuntimeApi.h
#include <stdint.h>#include <Windows.h>#include <Objidl.h>#include <Shlwapi.h>#include <wchar.h>
Classes¶
| Type | Name |
|---|---|
| class | IBaseInterface |
| class | IBaseRuntimeManager |
| class | IInstance |
| class | IRemoteRuntimeManager |
| class | ISimulationRuntimeManager |
| struct | SAutodiscoverData |
| struct | SConfiguredProcessEvents |
| struct | SConnectionInfo |
| struct | SDVBNI |
| struct | SDataRecordInfo |
| struct | SDataValue |
| struct | SDataValueByAddress |
| struct | SDataValueByAddressWithCheck |
| struct | SDataValueByName |
| struct | SDataValueByNameWithCheck |
| struct | SDiagExtChannelDescription |
| struct | SDimension |
| struct | SDisplayData |
| struct | SDisplayFormat |
| struct | SILD |
| struct | SILS |
| struct | SIPSuite4 |
| struct | SInstanceInfo |
| struct | SMACAddress |
| struct | SNetInterfaceInfo |
| struct | SOnDisplayDataChangedParameter Additional parameter given on display data changed event. |
| struct | SOnSoftwareConfigChangedParameter Additional parameter given on changed software event. |
| struct | SOnSyncPointReachedResult |
| struct | STagInfo |
Public Types¶
| Type | Name |
|---|---|
| typedef ERuntimeErrorCode(* | ApiEntry_DestroyInterface This is the type of the DestroyInterface entry point. |
| typedef ERuntimeErrorCode(* | ApiEntry_Initialize This is the type of the API DLL main entry point. |
| enum | EArea This enumeration contains all PLC areas that contain the available PLC tags. |
| enum | EAutodiscoverType This enumeration is used in the Autodiscover Callback function. |
| enum | ECPUType This enumeration contains all CPU types that can be loaded in a simulated PLC instance. |
| enum | ECommunicationInterface Communication interface |
| enum | ECycleTimeMonitoringMode This enumeration contains the sources of the timer for the maximum cycle time monitoring. |
| enum | EDataType This enumeration contains all the PLC data types (STEP 7). |
| enum | EDiagProperty This enumeration contains the incoming/outgoing information of the diagnostic alarm. |
| enum | EDiagSeverity This enumeration contains the severity of the diagnostic alarm (error, maintenance demanded, maintenance required). |
| enum | EDirection This enumeration contains properties of the diagnostic alarm. |
| enum | EDisplayKey |
| enum uint8_t | EDisplayPixelFormat |
| enum | ELEDMode This enumeration contains the LEDs of a simulated PLC instance. |
| enum | ELEDType This enumeration contains the types of LEDs for a simulated PLC instance. |
| enum | ENetworkMode This enumeration contains the communication modes of a simulated PLC instance. |
| enum | EOperatingMode This enumeration contains the operating modes of a simulated PLC instance. |
| enum | EOperatingState This enumeration contains the operating states of a simulated PLC instance. |
| enum | EPLCInterface Use enum class in new implementations |
| enum | EPrimitiveDataType This list contains all the primitive data types that are used by the I/O access functions. |
| enum | EProcessEventType This enumeration contains predefined types of process events for S7 modules. |
| enum | EPullOrPlugEventType This enumeration contains predefined types of pull/plug events for S7 modules. |
| enum | ERackOrStationFaultType This enumeration contains predefined types of pull/plug events for S7 modules. |
| enum | ERuntimeConfigChanged This list contains all possible causes of an OnSoftwareConfigurationChanged event that the Runtime Manager sends. |
| enum | ERuntimeErrorCode This enumeration contains all error codes used by the SimulationRuntime API. Most API functions will return one of these error codes. If these functions succeed, their return value will always be SREC_OK. Errors are represented by negative values, warnings by positive values. |
| enum uint8_t | ESoftwareConfigChanged Software changed event types. |
| enum | ETagListDetails This list contains all PLC areas that can be used as a filter to update the tag table. |
| typedef void(* | EventCallback_II_SREC_ST |
| typedef void(* | EventCallback_II_SREC_ST_SDRI |
| typedef void(* | EventCallback_II_SREC_ST_SDRI_BYTE |
| typedef void(* | EventCallback_II_SREC_ST_SRLT_SRLM |
| typedef void(* | EventCallback_II_SREC_ST_SROS_SROS |
| typedef void(* | EventCallback_II_SREC_ST_UINT32 |
| typedef void(* | EventCallback_II_SREC_ST_UINT32_EPPET_UINT32 |
| typedef void(* | EventCallback_II_SREC_ST_UINT32_ERSFET |
| typedef void(* | EventCallback_II_SREC_ST_UINT32_INT64_INT64_UINT32 |
| typedef void(* | EventCallback_II_SREC_ST_UINT32_UINT32 |
| typedef void(* | EventCallback_II_SREC_ST_UINT32_UINT32_EPET_UINT32 |
| typedef void(* | EventCallback_II_SREC_ST_UINT8_SIP |
| typedef void(* | EventCallback_II_SSCCP |
| typedef void(* | EventCallback_IRRTM |
| typedef void(* | EventCallback_SRCC_UINT32_UINT32_INT32 |
| typedef void(* | EventCallback_SRRSI_AD |
| typedef void(* | EventCallback_VOID |
| union | UDataValue |
| union | UIP |
Public Static Attributes¶
| Type | Name |
|---|---|
| ApiEntry_DestroyInterface | _DestroyInterface = NULL |
| HMODULE | _SimulationRuntimeApiDllHandle = NULL |
Public Functions¶
| Type | Name |
|---|---|
| ERuntimeErrorCode | DestroyInterface (IBaseInterface * in_Interface) Deletes an interface of the Runtime API. |
| ERuntimeErrorCode | FreeApi () Frees the library of the Runtime API. |
| const WCHAR * | GetNameOfAreaSection (EArea in_AreaSection) Returns the name of the enumeration entry. |
| const WCHAR * | GetNameOfAutodiscoverType (EAutodiscoverType in_AutodiscoverType) Returns the name of the enumeration entry. |
| const WCHAR * | GetNameOfCPUType (ECPUType in_CPUType) Returns the name of the enumeration entry. |
| const WCHAR * | GetNameOfCommunicationInterface (ECommunicationInterface in_CommunicationInterface) Returns the name of the enumeration entry. |
| const WCHAR * | GetNameOfCycleTimeMonitoringMode (ECycleTimeMonitoringMode in_CycleTimeMonitoringMode) Returns the name of the enumeration entry. |
| const WCHAR * | GetNameOfDataType (EDataType in_DataType) Returns the name of the enumeration entry. |
| const WCHAR * | GetNameOfDiagProperty (EDiagProperty in_DiagProperty) Returns the name of the enumeration entry. |
| const WCHAR * | GetNameOfDiagSeverity (EDiagSeverity in_DiagSeverity) Returns the name of the enumeration entry. |
| const WCHAR * | GetNameOfDirection (EDirection in_Direction) Returns the name of the enumeration entry. |
| const WCHAR * | GetNameOfErrorCode (ERuntimeErrorCode in_ErrorCode) Returns the name of the enumeration entry. |
| const WCHAR * | GetNameOfLEDMode (ELEDMode in_LEDMode) Returns the name of the enumeration entry. |
| const WCHAR * | GetNameOfLEDType (ELEDType in_LEDType) Returns the name of the enumeration entry. |
| const WCHAR * | GetNameOfNetworkMode (ENetworkMode in_NetworkMode) Returns the name of the virtual switch network mode |
| const WCHAR * | GetNameOfOperatingMode (EOperatingMode in_OperatingMode) Returns the name of the enumeration entry. |
| const WCHAR * | GetNameOfOperatingState (EOperatingState in_OperatingState) Returns the name of the enumeration entry. |
| const WCHAR * | GetNameOfPrimitiveDataType (EPrimitiveDataType in_DataType) Returns the name of the enumeration entry. |
| const WCHAR * | GetNameOfProcessEventType (EProcessEventType in_ProcessEventType) Returns the name of the enumeration entry. |
| const WCHAR * | GetNameOfPullOrPlugEventType (EPullOrPlugEventType in_PullOrPlugEventType) Returns the name of the enumeration entry. |
| const WCHAR * | GetNameOfRackOrStationFaultType (ERackOrStationFaultType in_RackOrStationFaultType) Returns the name of the enumeration entry. |
| const WCHAR * | GetNameOfRuntimeConfigChanged (ERuntimeConfigChanged in_RuntimeConfigChanged) Returns the name of the enumeration entry. |
| const WCHAR * | GetNameOfSoftwareConfigChanged (const ESoftwareConfigChanged in_SoftwareConfigChanged) Returns the enum value as a wide string. |
| const WCHAR * | GetNameOfTagListDetails (ETagListDetails in_TagListDetails) Returns the name of the enumeration entry. |
| ERuntimeErrorCode | InitializeApi (ISimulationRuntimeManager ** inout_SimulationRuntimeManagerInterface) Loads "Siemens.Simatic.PlcSim.Advanced.Api.dll" and initializes the API. |
| ERuntimeErrorCode | InitializeApi (WCHAR * in_SimulationRuntimeApiDllPath, ISimulationRuntimeManager ** inout_SimulationRuntimeManagerInterface) Loads "Siemens.Simatic.PlcSim.Advanced.Api.dll" and initializes the API. |
| ERuntimeErrorCode | SetCycleTimeMonitoringMode (ECycleTimeMonitoringMode in_CycleTimeMonitoringMode, INT64 in_MaxCycleTime_ns) Sets the max cycle time based on the ECycleTimeMonitoringMode value |
| ERuntimeErrorCode | ShutdownAndFreeApi (ISimulationRuntimeManager * in_SimulationRuntimeManagerInterface) Shuts down the Runtime API, destroys the IRuntimeManager interface and frees the library of the Runtime API. |
Macros¶
Public Types Documentation¶
typedef ApiEntry_DestroyInterface¶
This is the type of the DestroyInterface entry point.
typedef ERuntimeErrorCode(* ApiEntry_DestroyInterface) (IBaseInterface *in_Interface);
typedef ApiEntry_Initialize¶
This is the type of the API DLL main entry point.
typedef ERuntimeErrorCode(* ApiEntry_Initialize) (ISimulationRuntimeManager **out_RuntimeManagerInterface, UINT32 in_InterfaceVersion);
enum EArea¶
This enumeration contains all PLC areas that contain the available PLC tags.
enum EArea {
SRA_INVALID_AREA = 0,
SRA_INPUT = 1,
SRA_MARKER = 2,
SRA_OUTPUT = 3,
SRA_COUNTER = 4,
SRA_TIMER = 5,
SRA_DATABLOCK = 6,
SRA_ENUMERATION_SIZE = 7
};
enum EAutodiscoverType¶
This enumeration is used in the Autodiscover Callback function.
enum EAutodiscoverType {
SRRSI_DISCOVER_STARTED = 0,
SRRSI_DISCOVER_DATA = 1,
SRRSI_DISCOVER_FINISHED = 2
};
enum ECPUType¶
This enumeration contains all CPU types that can be loaded in a simulated PLC instance.
enum ECPUType {
SRCT_1500_Unspecified = 0x000005DC,
SRCT_1511 = 0x000005E7,
SRCT_1513 = 0x000005E9,
SRCT_1515 = 0x000005EB,
SRCT_1516 = 0x000005EC,
SRCT_1517 = 0x000005ED,
SRCT_1518 = 0x000005EE,
SRCT_1511C = 0x000405E7,
SRCT_1512C = 0x000405E8,
SRCT_1511F = 0x000105E7,
SRCT_1513F = 0x000105E9,
SRCT_1515F = 0x000105EB,
SRCT_1516F = 0x000105EC,
SRCT_1517F = 0x000105ED,
SRCT_1518F = 0x000105EE,
SRCT_1511T = 0x000805E7,
SRCT_1515T = 0x000805EB,
SRCT_1516T = 0x000805EC,
SRCT_1517T = 0x000805ED,
SRCT_1511TF = 0x000905E7,
SRCT_1515TF = 0x000905EB,
SRCT_1516TF = 0x000905EC,
SRCT_1517TF = 0x000905ED,
SRCT_1518ODK = 0x001005EE,
SRCT_1518FODK = 0x001105EE,
SRCT_1518MFP = 0x004005EE,
SRCT_1518FMFP = 0x004105EE,
SRCT_1518T = 0x000805EE,
SRCT_1518TF = 0x000905EE,
SRCT_1504DTF = 0x000905E0,
SRCT_1507DTF = 0x000905E3,
SRCT_ET200SP_Unspecified = 0x000205DC,
SRCT_1510SP = 0x000205E6,
SRCT_1512SP = 0x000205E8,
SRCT_1514SP = 0x000205E7,
SRCT_1514SPT = 0x000205E9,
SRCT_1510SPF = 0x000305E6,
SRCT_1512SPF = 0x000305E8,
SRCT_1514SPF = 0x000305E7,
SRCT_1514SPTF = 0x000305E9,
SRCT_1514PA = 0x000305EB,
SRCT_1500_RH_Unspecified = 0x008005DC,
SRCT_1513R = 0x008005E9,
SRCT_1515R = 0x008005EB,
SRCT_1517H = 0x008005ED,
SRCT_1518HF = 0x008105EE,
SRCT_ET200PRO_Unspecified = 0x002005DC,
SRCT_1513PRO = 0x002005E9,
SRCT_1513PROF = 0x002105E9,
SRCT_1516PRO = 0x002005EC,
SRCT_1516PROF = 0x002105EC,
SRCT_1500_SW_OC_Unspecified = 0x010005DC,
SRCT_1507S = 0x010005E3,
SRCT_1507SF = 0x010105E3,
SRCT_1508S = 0x010005E4,
SRCT_1508SF = 0x010105E4,
SRCT_1508ST = 0x010805E4,
SRCT_1508STF = 0x010905E4,
SRCT_1505SP = 0x010005E1,
SRCT_1505SPF = 0x010105E1,
SRCT_1505SPT = 0x010805E1,
SRCT_1505SPTF = 0x010905E1,
SRCT_SINUMERIK_Unspecified = 0x020005DC,
SRCT_SINUMERIK_MCU1720 = 0x021105E2,
SRCT_SINUMERIK_NCU1740 = 0x021105E4,
SRCT_SINUMERIK_NCU1750 = 0x021105E5,
SRCT_SINUMERIK_NCU1760 = 0x021105E6,
SRCT_SINUMERIK_PPU1740 = 0x021105E7
};
enum ECommunicationInterface¶
Communication interface
enum ECommunicationInterface {
SRCI_NONE = 0,
SRCI_SOFTBUS = 1,
SRCI_TCPIP = 2,
SRCI_ENUMERATION_SIZE = 3
};
enum ECycleTimeMonitoringMode¶
This enumeration contains the sources of the timer for the maximum cycle time monitoring.
enum ECycleTimeMonitoringMode {
SRCTMM_DOWNLOADED = 0,
SRCTMM_IGNORED = 1,
SRCTMM_SPECIFIED = 2
};
enum EDataType¶
This enumeration contains all the PLC data types (STEP 7).
enum EDataType {
SRDT_UNKNOWN = 0,
SRDT_BOOL = 1,
SRDT_BYTE = 2,
SRDT_CHAR = 3,
SRDT_WORD = 4,
SRDT_INT = 5,
SRDT_DWORD = 6,
SRDT_DINT = 7,
SRDT_REAL = 8,
SRDT_DATE = 9,
SRDT_TIME_OF_DAY = 10,
SRDT_TIME = 11,
SRDT_S5TIME = 12,
SRDT_DATE_AND_TIME = 14,
SRDT_STRUCT = 17,
SRDT_STRING = 19,
SRDT_COUNTER = 28,
SRDT_TIMER = 29,
SRDT_IEC_Counter = 30,
SRDT_IEC_Timer = 31,
SRDT_LREAL = 48,
SRDT_ULINT = 49,
SRDT_LINT = 50,
SRDT_LWORD = 51,
SRDT_USINT = 52,
SRDT_UINT = 53,
SRDT_UDINT = 54,
SRDT_SINT = 55,
SRDT_WCHAR = 61,
SRDT_WSTRING = 62,
SRDT_LTIME = 64,
SRDT_LTIME_OF_DAY = 65,
SRDT_LDT = 66,
SRDT_DTL = 67,
SRDT_IEC_LTimer = 68,
SRDT_IEC_SCounter = 69,
SRDT_IEC_DCounter = 70,
SRDT_IEC_LCounter = 71,
SRDT_IEC_UCounter = 72,
SRDT_IEC_USCounter = 73,
SRDT_IEC_UDCounter = 74,
SRDT_IEC_ULCounter = 75,
SRDT_ERROR_STRUCT = 97,
SRDT_NREF = 98,
SRDT_CREF = 101,
SRDT_AOM_IDENT = 128,
SRDT_EVENT_ANY = 129,
SRDT_EVENT_ATT = 130,
SRDT_EVENT_HWINT = 131,
SRDT_HW_ANY = 144,
SRDT_HW_IOSYSTEM = 145,
SRDT_HW_DPMASTER = 146,
SRDT_HW_DEVICE = 147,
SRDT_HW_DPSLAVE = 148,
SRDT_HW_IO = 149,
SRDT_HW_MODULE = 150,
SRDT_HW_SUBMODULE = 151,
SRDT_HW_HSC = 152,
SRDT_HW_PWM = 153,
SRDT_HW_PTO = 154,
SRDT_HW_INTERFACE = 155,
SRDT_HW_IEPORT = 156,
SRDT_OB_ANY = 160,
SRDT_OB_DELAY = 161,
SRDT_OB_TOD = 162,
SRDT_OB_CYCLIC = 163,
SRDT_OB_ATT = 164,
SRDT_CONN_ANY = 168,
SRDT_CONN_PRG = 169,
SRDT_CONN_OUC = 170,
SRDT_CONN_R_ID = 171,
SRDT_PORT = 173,
SRDT_RTM = 174,
SRDT_PIP = 175,
SRDT_OB_PCYCLE = 192,
SRDT_OB_HWINT = 193,
SRDT_OB_DIAG = 195,
SRDT_OB_TIMEERROR = 196,
SRDT_OB_STARTUP = 197,
SRDT_DB_ANY = 208,
SRDT_DB_WWW = 209,
SRDT_DB_DYN = 210,
SRDT_DB = 257
};
enum EDiagProperty¶
This enumeration contains the incoming/outgoing information of the diagnostic alarm.
enum EDiagProperty {
SRP_DIAG_APPEAR = 1,
SRP_DIAG_DISAPPEAR = 2
};
enum EDiagSeverity¶
This enumeration contains the severity of the diagnostic alarm (error, maintenance demanded, maintenance required).
enum EDiagSeverity {
SRDS_SEVERITY_FAILURE = 0,
SRDS_SEVERITY_MAINTENANCE_DEMANDED = 1,
SRDS_SEVERITY_MAINTENANCE_REQUIRED = 2
};
enum EDirection¶
This enumeration contains properties of the diagnostic alarm.
enum EDirection {
SRD_DIRECTION_INPUT = 0,
SRD_DIRECTION_OUTPUT = 1
};
enum EDisplayKey¶
enum EDisplayKey {
SRFK_UP,
SRFK_DOWN,
SRFK_LEFT,
SRFK_RIGHT,
SRFK_OK,
SRFK_ESC,
SRFK_LONGESC
};
enum EDisplayPixelFormat¶
enum EDisplayPixelFormat {
SRFFPF_UNKNOWN,
SRFFPF_RGB888,
SRFFPF_RGB565,
SRFFPF_RGB233,
SRFFPF_RGB332
};
enum ELEDMode¶
This enumeration contains the LEDs of a simulated PLC instance.
enum ELEDMode {
SRLM_OFF = 0,
SRLM_ON = 1,
SRLM_FLASH_FAST = 2,
SRLM_FLASH_SLOW = 3,
SRLM_INVALID = 4
};
enum ELEDType¶
This enumeration contains the types of LEDs for a simulated PLC instance.
enum ELEDType {
SRLT_STOP = 0,
SRLT_RUN = 1,
SRLT_ERROR = 2,
SRLT_MAINT = 3,
SRLT_REDUND = 4,
SRLT_FORCE = 5,
SRLT_BUSF1 = 6,
SRLT_BUSF2 = 7,
SRLT_BUSF3 = 8,
SRLT_BUSF4 = 9,
SRLT_ENUMERATION_SIZE = 10
};
enum ENetworkMode¶
This enumeration contains the communication modes of a simulated PLC instance.
enum ENetworkMode {
UNKNOWN_STATE = -1,
TCPIP_MULTIPLE_ADAPTER = 0,
TCPIP_SINGLE_ADAPTER = 1,
SOFTBUS = 2
};
enum EOperatingMode¶
This enumeration contains the operating modes of a simulated PLC instance.
enum EOperatingMode {
SROM_DEFAULT = 0,
SROM_SINGLE_STEP_C = 1,
SROM_SINGLE_STEP_CT = 2,
SROM_TIMESPAN_SYNCHRONIZED_C = 3,
SROM_SINGLE_STEP_P = 4,
SROM_TIMESPAN_SYNCHRONIZED_P = 5,
SROM_SINGLE_STEP_CP = 6,
SROM_SINGLE_STEP_CPT = 7,
SROM_TIMESPAN_SYNCHRONIZED_CP = 8,
SROM_SINGLE_STEP_BUS = 9
};
enum EOperatingState¶
This enumeration contains the operating states of a simulated PLC instance.
enum EOperatingState {
SROS_INVALID_OPERATING_STATE = 0,
SROS_OFF = 1,
SROS_BOOTING = 2,
SROS_STOP = 3,
SROS_STARTUP = 4,
SROS_RUN = 5,
SROS_FREEZE = 6,
SROS_SHUTTING_DOWN = 7,
SROS_HOLD = 8,
SROS_ENUMERATION_SIZE = 9
};
enum EPLCInterface¶
Use enum class in new implementations
enum EPLCInterface {
IE1 = 0,
IE2,
IE3
};
enum EPrimitiveDataType¶
This list contains all the primitive data types that are used by the I/O access functions.
enum EPrimitiveDataType {
SRPDT_UNSPECIFIC = 0,
SRPDT_STRUCT = 1,
SRPDT_BOOL = 2,
SRPDT_INT8 = 3,
SRPDT_INT16 = 4,
SRPDT_INT32 = 5,
SRPDT_INT64 = 6,
SRPDT_UINT8 = 7,
SRPDT_UINT16 = 8,
SRPDT_UINT32 = 9,
SRPDT_UINT64 = 10,
SRPDT_FLOAT = 11,
SRPDT_DOUBLE = 12,
SRPDT_CHAR = 13,
SRPDT_WCHAR = 14
};
enum EProcessEventType¶
This enumeration contains predefined types of process events for S7 modules.
enum EProcessEventType {
SR_PET_UNDEFINED = 0,
SR_PET_RISING_EDGE = 1,
SR_PET_FALLING_EDGE = 2,
SR_PET_LIMIT1_UNDERRUN = 3,
SR_PET_LIMIT1_OVERRUN = 4,
SR_PET_LIMIT2_UNDERRUN = 5,
SR_PET_LIMIT2_OVERRUN = 6
};
enum EPullOrPlugEventType¶
This enumeration contains predefined types of pull/plug events for S7 modules.
enum EPullOrPlugEventType {
SR_PPE_UNDEFINED = 0,
SR_PPE_PULL_EVENT = 1,
SR_PPE_PLUG_EVENT,
SR_PPE_PLUG_EVENT_ERROR_REMAINS,
SR_PPE_PLUG_WRONG_MODULE_EVENT
};
enum ERackOrStationFaultType¶
This enumeration contains predefined types of pull/plug events for S7 modules.
enum ERackOrStationFaultType {
SR_RSF_FAULT = 0,
SR_RSF_RETURN = 1
};
enum ERuntimeConfigChanged¶
This list contains all possible causes of an OnSoftwareConfigurationChanged event that the Runtime Manager sends.
enum ERuntimeConfigChanged {
SRCC_INSTANCE_REGISTERED = 0,
SRCC_INSTANCE_UNREGISTERED = 1,
SRCC_CONNECTION_OPENED = 2,
SRCC_CONNECTION_CLOSED = 3,
SRCC_PORT_OPENED = 4,
SRCC_PORT_CLOSED = 5,
SRCC_NETWORK_MODE_CHANGED = 6,
SRCC_STRICT_MOTION_CHANGED = 7
};
enum ERuntimeErrorCode¶
This enumeration contains all error codes used by the SimulationRuntime API. Most API functions will return one of these error codes. If these functions succeed, their return value will always be SREC_OK. Errors are represented by negative values, warnings by positive values.
enum ERuntimeErrorCode {
SREC_OK = 0,
SREC_INVALID_ERROR_CODE = -1,
SREC_NOT_IMPLEMENTED = -2,
SREC_INDEX_OUT_OF_RANGE = -3,
SREC_DOES_NOT_EXIST = -4,
SREC_ALREADY_EXISTS = -5,
SREC_UNKNOWN_MESSAGE_TYPE = -6,
SREC_INVALID_MESSAGE_ID = -7,
SREC_WRONG_ARGUMENT = -8,
SREC_WRONG_PIPE = -9,
SREC_CONNECTION_ERROR = -10,
SREC_TIMEOUT = -11,
SREC_MESSAGE_CORRUPT = -12,
SREC_WRONG_VERSION = -13,
SREC_INSTANCE_NOT_RUNNING = -14,
SREC_INTERFACE_REMOVED = -15,
SREC_SHARED_MEMORY_NOT_INITIALIZED = -16,
SREC_API_NOT_INITIALIZED = -17,
SREC_WARNING_ALREADY_EXISTS = 18,
SREC_NOT_SUPPORTED = -19,
SREC_WARNING_INVALID_CALL = 20,
SREC_ERROR_LOADING_DLL = -21,
SREC_SIGNAL_NAME_DOES_NOT_EXIST = -22,
SREC_SIGNAL_TYPE_MISMATCH = -23,
SREC_SIGNAL_CONFIGURATION_ERROR = -24,
SREC_NO_SIGNAL_CONFIGURATION_LOADED = -25,
SREC_CONFIGURED_CONNECTION_NOT_FOUND = -26,
SREC_CONFIGURED_DEVICE_NOT_FOUND = -27,
SREC_INVALID_CONFIGURATION = -28,
SREC_TYPE_MISMATCH = -29,
SREC_LICENSE_NOT_FOUND = -30,
SREC_NO_LICENSE_AVAILABLE = -31,
SREC_WRONG_COMMUNICATION_INTERFACE = -32,
SREC_LIMIT_REACHED = -33,
SREC_NO_STORAGE_PATH_SET = -34,
SREC_STORAGE_PATH_ALREADY_IN_USE = -35,
SREC_MESSAGE_INCOMPLETE = -36,
SREC_ARCHIVE_STORAGE_FAILED = -37,
SREC_RETRIEVE_STORAGE_FAILURE = -38,
SREC_INVALID_OPERATING_STATE = -39,
SREC_INVALID_ARCHIVE_PATH = -40,
SREC_DELETE_EXISTING_STORAGE_FAILED = -41,
SREC_CREATE_DIRECTORIES_FAILED = -42,
SREC_NOT_ENOUGH_MEMORY = -43,
SREC_WARNING_TRIAL_MODE_ACTIVE = 44,
SREC_NOT_RUNNING = -45,
SREC_NOT_EMPTY = -46,
SREC_NOT_UP_TO_DATE = -47,
SREC_COMMUNICATION_INTERFACE_NOT_AVAILABLE = -48,
SREC_WARNING_NOT_COMPLETE = 49,
SREC_VIRTUAL_SWITCH_MISCONFIGURED = -50,
SREC_RUNTIME_NOT_AVAILABLE = -51,
SREC_IS_EMPTY = -52,
SREC_WRONG_MODULE_STATE = -53,
SREC_WRONG_MODULE_TYPE = -54,
SREC_NOT_SUPPORTED_BY_MODULE = -55,
SREC_INTERNAL_ERROR = -56,
SREC_STORAGE_TRANSFER_ERROR = -57,
SREC_ANOTHER_VARIANT_OF_PLCSIM_RUNNING = -58,
SREC_ACCESS_DENIED = -59,
SREC_NOT_ALLOWED_DURING_DOWNLOAD = -60,
SREC_AUTODISCOVER_ALREADY_RUNNING = -61,
SREC_INVALID_STORAGE = -62,
SREC_WARNING_UNSUPPORTED_PCAP_DRIVER = 63,
SREC_WARNING_RUNNING_ON_TIA_PORTAL_TEST_SUITE = 64,
SREC_PCAP_DRIVER_NOT_RUNNING = -65,
SREC_UNSUPPORTED_PCAP_DRIVER = -66,
SREC_CONFIG_FILE_ERROR = -67,
SREC_WARNING_PASSWORD_PROTECTION_ERROR = 68,
SREC_BUFFER_OVERFLOW = -69,
SREC_NOT_ALLOWED = -70,
SREC_WARNING_NO_EXTERNAL_COMMUNICATION = 71,
SREC_INSTANCE_ALREADY_RUNNING = -72,
SREC_OUT_OF_MEMORY = -73
};
enum ESoftwareConfigChanged¶
Software changed event types.
enum ESoftwareConfigChanged {
SRSCC_SOFTWARE_CHANGED_IN_STOP,
SRSCC_SOFTWARE_CHANGED_IN_RUN
};
enum ETagListDetails¶
This list contains all PLC areas that can be used as a filter to update the tag table.
enum ETagListDetails {
SRTLD_NONE = 0,
SRTLD_IO = 1,
SRTLD_M = 2,
SRTLD_IOM = 3,
SRTLD_CT = 4,
SRTLD_IOCT = 5,
SRTLD_MCT = 6,
SRTLD_IOMCT = 7,
SRTLD_DB = 8,
SRTLD_IODB = 9,
SRTLD_MDB = 10,
SRTLD_IOMDB = 11,
SRTLD_CTDB = 12,
SRTLD_IOCTDB = 13,
SRTLD_MCTDB = 14,
SRTLD_IOMCTDB = 15
};
typedef EventCallback_II_SREC_ST¶
typedef void(* EventCallback_II_SREC_ST) (IInstance *in_Sender, ERuntimeErrorCode in_ErrorCode, SYSTEMTIME in_SystemTime);
typedef EventCallback_II_SREC_ST_SDRI¶
typedef void(* EventCallback_II_SREC_ST_SDRI) (IInstance *in_Sender, ERuntimeErrorCode in_ErrorCode, SYSTEMTIME in_SystemTime, SDataRecordInfo in_DataRecordInfo);
typedef EventCallback_II_SREC_ST_SDRI_BYTE¶
typedef void(* EventCallback_II_SREC_ST_SDRI_BYTE) (IInstance *in_Sender, ERuntimeErrorCode in_ErrorCode, SYSTEMTIME in_SystemTime, SDataRecordInfo in_DataRecordInfo, const BYTE *in_Data);
typedef EventCallback_II_SREC_ST_SRLT_SRLM¶
typedef void(* EventCallback_II_SREC_ST_SRLT_SRLM) (IInstance *in_Sender, ERuntimeErrorCode in_ErrorCode, SYSTEMTIME in_SystemTime, ELEDType in_LEDType, ELEDMode in_LEDMode);
typedef EventCallback_II_SREC_ST_SROS_SROS¶
typedef void(* EventCallback_II_SREC_ST_SROS_SROS) (IInstance *in_Sender, ERuntimeErrorCode in_ErrorCode, SYSTEMTIME in_SystemTime, EOperatingState in_PrevState, EOperatingState in_OperatingState);
typedef EventCallback_II_SREC_ST_UINT32¶
typedef void(* EventCallback_II_SREC_ST_UINT32) (IInstance *in_Sender, ERuntimeErrorCode in_ErrorCode, SYSTEMTIME in_SystemTime, UINT32 in_HardwareIdentifier);
typedef EventCallback_II_SREC_ST_UINT32_EPPET_UINT32¶
typedef void(* EventCallback_II_SREC_ST_UINT32_EPPET_UINT32) (IInstance *in_Sender, ERuntimeErrorCode in_ErrorCode, SYSTEMTIME in_SystemTime, UINT32 in_HardwareIdentifier, EPullOrPlugEventType in_PullOrPlugEventType, UINT32 in_SequenceNumber);
typedef EventCallback_II_SREC_ST_UINT32_ERSFET¶
typedef void(* EventCallback_II_SREC_ST_UINT32_ERSFET) (IInstance *in_Sender, ERuntimeErrorCode in_ErrorCode, SYSTEMTIME in_SystemTime, UINT32 in_HardwareIdentifier, ERackOrStationFaultType out_RackOrStationFaultType);
typedef EventCallback_II_SREC_ST_UINT32_INT64_INT64_UINT32¶
typedef void(* EventCallback_II_SREC_ST_UINT32_INT64_INT64_UINT32) (IInstance *in_Sender, ERuntimeErrorCode in_ErrorCode, SYSTEMTIME in_SystemTime, UINT32 in_Id, INT64 in_TimeSinceSameSyncPoint_ns, INT64 in_TimeSinceAnySyncPoint_ns, UINT32 in_SyncPointCount);
typedef EventCallback_II_SREC_ST_UINT32_UINT32¶
typedef void(* EventCallback_II_SREC_ST_UINT32_UINT32) (IInstance *in_Sender, ERuntimeErrorCode in_ErrorCode, SYSTEMTIME in_SystemTime, UINT32 in_HardwareIdentifier, UINT32 in_SequenceNumber);
typedef EventCallback_II_SREC_ST_UINT32_UINT32_EPET_UINT32¶
typedef void(* EventCallback_II_SREC_ST_UINT32_UINT32_EPET_UINT32) (IInstance *in_Sender, ERuntimeErrorCode in_ErrorCode, SYSTEMTIME in_SystemTime, UINT32 in_HardwareIdentifier, UINT32 in_Channel, EProcessEventType in_ProcessEventType, UINT32 in_SequenceNumber);
typedef EventCallback_II_SREC_ST_UINT8_SIP¶
typedef void(* EventCallback_II_SREC_ST_UINT8_SIP) (IInstance *in_Sender, ERuntimeErrorCode in_ErrorCode, SYSTEMTIME in_SystemTime, UINT8 in_InterfaceId, const SIPSuite4 &in_SIP);
typedef EventCallback_II_SSCCP¶
typedef void(* EventCallback_II_SSCCP) (IInstance &instance, const SOnSoftwareConfigChangedParameter &event_param);
typedef EventCallback_IRRTM¶
typedef void(* EventCallback_IRRTM) (IRemoteRuntimeManager *in_Sender);
typedef EventCallback_SRCC_UINT32_UINT32_INT32¶
typedef void(* EventCallback_SRCC_UINT32_UINT32_INT32) (ERuntimeConfigChanged in_RuntimeConfigChanged, UINT32 in_Param1, UINT32 in_Param2, INT32 in_Param3);
typedef EventCallback_SRRSI_AD¶
typedef void(* EventCallback_SRRSI_AD) (EAutodiscoverType in_AutodiscoverMsg, SAutodiscoverData in_AutodiscoverData);
typedef EventCallback_VOID¶
typedef void(* EventCallback_VOID) ();
union UDataValue¶
union UIP¶
Public Static Attributes Documentation¶
variable _DestroyInterface¶
ApiEntry_DestroyInterface _DestroyInterface;
variable _SimulationRuntimeApiDllHandle¶
HMODULE _SimulationRuntimeApiDllHandle;
Public Functions Documentation¶
function DestroyInterface¶
Deletes an interface of the Runtime API.
inline ERuntimeErrorCode DestroyInterface (
IBaseInterface * in_Interface
)
function FreeApi¶
Frees the library of the Runtime API.
inline ERuntimeErrorCode FreeApi ()
function GetNameOfAreaSection¶
Returns the name of the enumeration entry.
inline const WCHAR * GetNameOfAreaSection (
EArea in_AreaSection
)
Parameters:
in_AreaSectionThe enumeration entry.
function GetNameOfAutodiscoverType¶
Returns the name of the enumeration entry.
inline const WCHAR * GetNameOfAutodiscoverType (
EAutodiscoverType in_AutodiscoverType
)
Parameters:
in_AutodiscoverTypeThe enumeration entry.
function GetNameOfCPUType¶
Returns the name of the enumeration entry.
inline const WCHAR * GetNameOfCPUType (
ECPUType in_CPUType
)
Parameters:
in_CPUTypeThe enumeration entry.
function GetNameOfCommunicationInterface¶
Returns the name of the enumeration entry.
inline const WCHAR * GetNameOfCommunicationInterface (
ECommunicationInterface in_CommunicationInterface
)
Parameters:
in_CommunicationInterfaceThe enumeration entry.
function GetNameOfCycleTimeMonitoringMode¶
Returns the name of the enumeration entry.
inline const WCHAR * GetNameOfCycleTimeMonitoringMode (
ECycleTimeMonitoringMode in_CycleTimeMonitoringMode
)
Parameters:
in_CycleTimeMonitoringModeThe enumeration entry.
function GetNameOfDataType¶
Returns the name of the enumeration entry.
inline const WCHAR * GetNameOfDataType (
EDataType in_DataType
)
Parameters:
in_DataTypeThe enumeration entry.
function GetNameOfDiagProperty¶
Returns the name of the enumeration entry.
inline const WCHAR * GetNameOfDiagProperty (
EDiagProperty in_DiagProperty
)
Parameters:
in_DiagPropertyThe enumeration entry.
function GetNameOfDiagSeverity¶
Returns the name of the enumeration entry.
inline const WCHAR * GetNameOfDiagSeverity (
EDiagSeverity in_DiagSeverity
)
Parameters:
in_DiagSeverityThe enumeration entry.
function GetNameOfDirection¶
Returns the name of the enumeration entry.
inline const WCHAR * GetNameOfDirection (
EDirection in_Direction
)
Parameters:
in_DirectionThe enumeration entry.
function GetNameOfErrorCode¶
Returns the name of the enumeration entry.
inline const WCHAR * GetNameOfErrorCode (
ERuntimeErrorCode in_ErrorCode
)
Parameters:
in_ErrorCodeThe enumeration entry.
function GetNameOfLEDMode¶
Returns the name of the enumeration entry.
inline const WCHAR * GetNameOfLEDMode (
ELEDMode in_LEDMode
)
Parameters:
in_LEDModeThe enumeration entry.
function GetNameOfLEDType¶
Returns the name of the enumeration entry.
inline const WCHAR * GetNameOfLEDType (
ELEDType in_LEDType
)
Parameters:
in_LEDTypeThe enumeration entry.
function GetNameOfNetworkMode¶
Returns the name of the virtual switch network mode
inline const WCHAR * GetNameOfNetworkMode (
ENetworkMode in_NetworkMode
)
Parameters:
in_NetworkModeThe enumeration entry
function GetNameOfOperatingMode¶
Returns the name of the enumeration entry.
inline const WCHAR * GetNameOfOperatingMode (
EOperatingMode in_OperatingMode
)
Parameters:
in_OperatingModeThe enumeration entry.
function GetNameOfOperatingState¶
Returns the name of the enumeration entry.
inline const WCHAR * GetNameOfOperatingState (
EOperatingState in_OperatingState
)
Parameters:
in_OperatingStateThe enumeration entry.
function GetNameOfPrimitiveDataType¶
Returns the name of the enumeration entry.
inline const WCHAR * GetNameOfPrimitiveDataType (
EPrimitiveDataType in_DataType
)
Parameters:
in_DataTypeThe enumeration entry.
function GetNameOfProcessEventType¶
Returns the name of the enumeration entry.
inline const WCHAR * GetNameOfProcessEventType (
EProcessEventType in_ProcessEventType
)
Parameters:
in_ProcessEventTypeThe enumeration entry.
function GetNameOfPullOrPlugEventType¶
Returns the name of the enumeration entry.
inline const WCHAR * GetNameOfPullOrPlugEventType (
EPullOrPlugEventType in_PullOrPlugEventType
)
Parameters:
in_PullOrPlugEventTypeThe enumeration entry.
function GetNameOfRackOrStationFaultType¶
Returns the name of the enumeration entry.
inline const WCHAR * GetNameOfRackOrStationFaultType (
ERackOrStationFaultType in_RackOrStationFaultType
)
Parameters:
in_RackOrStationFaultTypeThe enumeration entry.
function GetNameOfRuntimeConfigChanged¶
Returns the name of the enumeration entry.
inline const WCHAR * GetNameOfRuntimeConfigChanged (
ERuntimeConfigChanged in_RuntimeConfigChanged
)
Parameters:
in_RuntimeConfigChangedThe enumeration entry.
function GetNameOfSoftwareConfigChanged¶
Returns the enum value as a wide string.
inline const WCHAR * GetNameOfSoftwareConfigChanged (
const ESoftwareConfigChanged in_SoftwareConfigChanged
)
Parameters:
in_SoftwareConfigChanged[in]: Enum value.
function GetNameOfTagListDetails¶
Returns the name of the enumeration entry.
inline const WCHAR * GetNameOfTagListDetails (
ETagListDetails in_TagListDetails
)
Parameters:
in_TagListDetailsThe enumeration entry.
function InitializeApi¶
Loads "Siemens.Simatic.PlcSim.Advanced.Api.dll" and initializes the API.
inline ERuntimeErrorCode InitializeApi (
ISimulationRuntimeManager ** inout_SimulationRuntimeManagerInterface
)
Parameters:
inout_SimulationRuntimeManagerInterfacePointer to a RuntimeManager interface pointer. The Pointer must be initialized with NULL. The interface will be created inside the function.
function InitializeApi¶
Loads "Siemens.Simatic.PlcSim.Advanced.Api.dll" and initializes the API.
inline ERuntimeErrorCode InitializeApi (
WCHAR * in_SimulationRuntimeApiDllPath,
ISimulationRuntimeManager ** inout_SimulationRuntimeManagerInterface
)
Parameters:
in_SimulationRuntimeApiDllPathThe path to the Runtime API library (DLL).inout_SimulationRuntimeManagerInterfacePointer to a RuntimeManager interface pointer. The Pointer must be initialized with NULL. The interface will be created inside the function.
function SetCycleTimeMonitoringMode¶
Sets the max cycle time based on the ECycleTimeMonitoringMode value
ERuntimeErrorCode SetCycleTimeMonitoringMode (
ECycleTimeMonitoringMode in_CycleTimeMonitoringMode,
INT64 in_MaxCycleTime_ns
)
Parameters:
in_CycleTimeMonitoringModeThe CycleMonitoringMode mode of the virtual controller.in_MaxCycleTime_nsThe maximum cycle value in nano seconds.
function ShutdownAndFreeApi¶
Shuts down the Runtime API, destroys the IRuntimeManager interface and frees the library of the Runtime API.
inline ERuntimeErrorCode ShutdownAndFreeApi (
ISimulationRuntimeManager * in_SimulationRuntimeManagerInterface
)
Parameters:
in_SimulationRuntimeManagerInterfaceThe interface of the Runtime Manager to be destroyed.
Macro Definition Documentation¶
define DALARM_NOTIFICATION_MAX_DIAG_EVENTS¶
#define DALARM_NOTIFICATION_MAX_DIAG_EVENTS `100`
define DAPI_DLL_INTERFACE_VERSION¶
#define DAPI_DLL_INTERFACE_VERSION `0x00080000`
define DAPI_DLL_NAME_X64¶
#define DAPI_DLL_NAME_X64 `L"Siemens.Simatic.Simulation.Runtime.Api.x64.dll"`
define DAPI_DLL_NAME_X86¶
#define DAPI_DLL_NAME_X86 `L"Siemens.Simatic.Simulation.Runtime.Api.x86.dll"`
define DAPI_DLL_PATH_REGISTRY_KEY_NAME¶
#define DAPI_DLL_PATH_REGISTRY_KEY_NAME `L"SOFTWARE\\Wow6432Node\\Siemens\\Shared Tools\\PLCSIMADV_SimRT\\"`
define DAPI_DLL_PATH_REGISTRY_VALUE_NAME¶
#define DAPI_DLL_PATH_REGISTRY_VALUE_NAME `L"Path"`
define DAPI_DLL_PATH_VERSION_SUBDIRECTORY¶
#define DAPI_DLL_PATH_VERSION_SUBDIRECTORY `L"API\\8.0"`
define DAPI_ENTRY_DESTROY_INTERFACE¶
#define DAPI_ENTRY_DESTROY_INTERFACE `"RuntimeApiEntry_DestroyInterface"`
define DAPI_ENTRY_INITIALIZE¶
#define DAPI_ENTRY_INITIALIZE `"RuntimeApiEntry_Initialize"`
define DAUTODISCOVER_DEFAULT_TIME¶
#define DAUTODISCOVER_DEFAULT_TIME `2000`
define DCONTROLLER_NAME_MAX_LENGTH¶
#define DCONTROLLER_NAME_MAX_LENGTH `128`
define DCONTROLLER_SHORT_DESIGNATION_MAX_LENGTH¶
#define DCONTROLLER_SHORT_DESIGNATION_MAX_LENGTH `32`
define DDATABLOCK_FILTER_LIST_MAX_LENGTH¶
#define DDATABLOCK_FILTER_LIST_MAX_LENGTH `32000`
define DDATARECORD_MAX_SIZE¶
#define DDATARECORD_MAX_SIZE `64000`
define DINSTANCE_NAME_MAX_LENGTH¶
#define DINSTANCE_NAME_MAX_LENGTH `64`
define DINSTANCE_NAME_MIN_LENGTH¶
#define DINSTANCE_NAME_MIN_LENGTH `3`
define DMAC_ADDRESS_LEN¶
#define DMAC_ADDRESS_LEN `6`
define DMODULE_STATE_ERROR¶
#define DMODULE_STATE_ERROR `1`
define DMODULE_STATE_MAINT_DEMANDED¶
#define DMODULE_STATE_MAINT_DEMANDED `2`
define DMODULE_STATE_MAINT_REQUIRED¶
#define DMODULE_STATE_MAINT_REQUIRED `4`
define DMODULE_STATE_OK¶
#define DMODULE_STATE_OK `0`
define DPROCESS_EVENTS_MAX_ITEMS¶
#define DPROCESS_EVENTS_MAX_ITEMS `256`
define DPROCESS_EVENT_NAME_MAX_LENGTH¶
#define DPROCESS_EVENT_NAME_MAX_LENGTH `123`
define DPRODUCT_VERSION¶
#define DPRODUCT_VERSION `0x08000000`
define DSTORAGE_PATH_MAX_LENGTH¶
#define DSTORAGE_PATH_MAX_LENGTH `130`
define DSTORAGE_PATH_MIN_LENGTH¶
#define DSTORAGE_PATH_MIN_LENGTH `4`
define DSTRING_MAX_LENGTH¶
#define DSTRING_MAX_LENGTH `(254)`
define DTAG_ARRAY_DIMENSION¶
#define DTAG_ARRAY_DIMENSION `6`
define DTAG_NAME_MAX_LENGTH¶
#define DTAG_NAME_MAX_LENGTH `300`
define DWSTRING_MAX_LENGTH¶
#define DWSTRING_MAX_LENGTH `(16382)`
define HWDB_B1_ORDER_ID_LEN¶
#define HWDB_B1_ORDER_ID_LEN `20`
define MAX_SIZE_DISPLAY_DATA¶
#define MAX_SIZE_DISPLAY_DATA `153666`