IDatasourcesMgr2.AddNotificationClient (METH) ¶ METHOD AddNotificationClient : SysTypes.RTS_IEC_RESULT This method can be used to register an implementation of INotificationClient that will be notified about operations of the datasources. Note Please remark that the number of notification clients might be limited so at least if registering several clients the return value should be evaluated. Note The registered object can be removed using IDatasourcesMgr2.RemoveNotificationClient InOut: Scope Name Type Comment Return AddNotificationClient SysTypes.RTS_IEC_RESULT An error code that signals whether the registration was successful. Input client INotificationClient The object that will be notified about operations of the datasources.
IDatasourcesMgr2.CreatePersistantItemList (METH) ¶ METHOD CreatePersistantItemList : IDataItemListPersistant Creates an item list that will be registered automatically within the affected datasources after (re)connections of these datasources. An according list can be used in followup calls to IDatasourcesMgr.ReadItemsSync or IDatasourcesMgr.WriteItemsSync Important Having such lists might slow down the connection setup because the list has to be registered within the connected device! Important Using this method and the related ones working on the list requires according locking around using IDatasourcesMgr2.Lock and IDatasourcesMgr2.Unlock Note It is not supported to register several lists for the same usecase. Note Once the list is no longer necessary, it can be deleted using IDatasourcesMgr2.DeletePersistantItemList InOut: Scope Name Type Comment Return CreatePersistantItemList IDataItemListPersistant Input usage PersistantItemListUsage The usecase this list is intended for usageDetails WSTRING Some details of the usage. In case of PersistantItemListUsage.Recipes this will be the name of the recipe definition. udiInitialCapacity UDINT The initial capacity of this list (will be extended if it becomes larger) Output result SysTypes.RTS_IEC_RESULT An error code providing additional information in case of creation problems
IDatasourcesMgr2.DeletePersistantItemList (METH) ¶ METHOD DeletePersistantItemList Deletes a formerly created IDataItemListPersistant Important Using this method and the related ones working on the list requires according locking around using IDatasourcesMgr2.Lock and IDatasourcesMgr2.Unlock InOut: Scope Name Type Comment Input itemsList IDataItemListPersistant The list to delete
IDatasourcesMgr2.GetPersistantItemList (METH) ¶ METHOD GetPersistantItemList : IDataItemListPersistant Returns the nth IDataItemListPersistant managed by the current instance. Can be used for iterating over all lists. Important Using this method and the related ones working on the list requires according locking around using IDatasourcesMgr2.Lock and IDatasourcesMgr2.Unlock InOut: Scope Name Type Comment Return GetPersistantItemList IDataItemListPersistant Input listNr INT The number of the list to return
IDatasourcesMgr2.Lock (METH) ¶ METHOD Lock : SysTypes.RTS_IEC_RESULT This method locks the concurrent task for monitoring items and allows subsequent accesses to methods of the current instance. To unlock again afterwards, call IDatasourcesMgr2.Unlock InOut: Scope Name Type Comment Return Lock SysTypes.RTS_IEC_RESULT Returns a runtime system error code (see CmpErrors.library) or one of Errors Input xBlocking BOOL This variable signals the way to do the synchronization. TRUE: the call will be blocking FALSE: the call will be nonblocking and might faile with the error code Errors.ERR_DS_MULTITASKING_LOCKED
INotificationClient.ListOperationDone (METH) ¶ METHOD ListOperationDone This method will be called when an operation on a list of variables was executed (eg. IDatasourcesMgr.ReadItemsSync or IDatasourcesMgr.WriteItemsSync ) InOut: Scope Name Type Comment Input xWriting BOOL This value signals whether the current operation was a write operation. datasourceName ItemName The name of the datasource where the operation was executed. For details of the format of this parameter have a look at ItemName or ItemNameType result SysTypes.RTS_IEC_RESULT The result of the operation. In case of successful execution, this value will contain |CmpErrors.Errors.ERR_OK|
INotificationClient.ListOperationStart (METH) ¶ METHOD ListOperationStart This method will be called when an operation on a list of variables will be executed (eg. IDatasourcesMgr.ReadItemsSync or IDatasourcesMgr.WriteItemsSync ) InOut: Scope Name Type Comment Input xWriting BOOL This value signals whether the current operation will be a write operation. datasourceName ItemName The name of the datasource where the operation will be executed. For details of the format of this parameter have a look at ItemName or ItemNameType
INotificationClient.ListValueRead (METH) ¶ METHOD ListValueRead This method will be called when a variable was read as part of a list operation (see INotificationClient.ListOperationStart or INotificationClient.ListOperationDone ) InOut: Scope Name Type Comment Input remoteName ItemName The name of the variable as known by the connected device that was read. For details of the format of this parameter have a look at ItemName or ItemNameType pReadValue POINTER TO BYTE The address of the value containing the recently read value valueType IBaseLibrary.TypeClass The type information of the currently read value valueSize __UXINT The size in bytes of the currently read value
INotificationClient.ListValueWrite (METH) ¶ METHOD ListValueWrite This method will be called when a variable will be written as part of a list operation (see INotificationClient.ListOperationStart or INotificationClient.ListOperationDone ) Note Please remark that this method will be called before the write operation is sent to the connected device. For being sure about a successful execution the followup call of INotificationClient.ListOperationDone should be checked. InOut: Scope Name Type Comment Input remoteName ItemName The name of the variable as known by the connected device that was read. For details of the format of this parameter have a look at ItemName or ItemNameType pWriteValue POINTER TO BYTE The address of the value containing the value that will be written valueType IBaseLibrary.TypeClass The type information of the currently read value valueSize __UXINT The size in bytes of the currently read value
INotificationClient.ReadRequestDone (METH) ¶ METHOD ReadRequestDone This method will be called when a read operation on one or more variables was executed. InOut: Scope Name Type Comment Input datasourceName ItemName The name of the datasource where the operation was executed. For details of the format of this parameter have a look at ItemName or ItemNameType result SysTypes.RTS_IEC_RESULT The result of the operation. In case of successful execution, this value will contain |CmpErrors.Errors.ERR_OK|