ITrendStorageWriterSupportsBufferClients (ITF) ¶ INTERFACE ITrendStorageWriterSupportsBufferClients This interface can optionally be implemented by implementations of ITrendStorageWriter if they supports clients accessing that want to be notified about buffer modifications. Methods: AttachBufferClient DetachBufferClient Structure: AttachBufferClient (Method) DetachBufferClient (Method)
ITrendStorageWriterSupportsBufferClients.AttachBufferClient (METH) ¶ METHOD AttachBufferClient : ETrendStorageReaderErrors Attaches an ITrendStorageWriterBufferClient instance. InOut: Scope Name Type Comment Return AttachBufferClient ETrendStorageReaderErrors A ETrendStorageReaderErrors value indicating, whether the processing has been completed successfully or not: ETrendStorageReaderErrors.NoError: Completed successfully ETrendStorageReaderErrors.WrongParameter: If the ITrendStorageWriterBufferClient instance is invalid ETrendStorageReaderErrors.NoMemory: If the ITrendStorageWriterBufferClient instance cannot be stored, because no memory available Input itfBufferClient ITrendStorageWriterBufferClient The ITrendStorageWriterListener instance to add
ITrendStorageWriterSupportsBufferClients.DetachBufferClient (METH) ¶ METHOD DetachBufferClient : ETrendStorageReaderErrors Removes an ITrendStorageWriterBufferClient instance. InOut: Scope Name Type Comment Return DetachBufferClient ETrendStorageReaderErrors A ETrendStorageReaderErrors value indicating, whether the processing has been completed successfully or not: ETrendStorageReaderErrors.NoError: Completed successfully ETrendStorageReaderErrors.WrongParameter: If the ITrendStorageWriterBufferClient instance is invalid ETrendStorageReaderErrors.NoObject: If the ITrendStorageWriterBufferClient instance cannot be removed, because was not found, i.e. has not been added with method AttachBufferClient Input itfBufferClient ITrendStorageWriterBufferClient The ITrendStorageWriterBufferClient instance to add
TrendFbDatabaseAccessErrorHandler (FB) ¶ FUNCTION_BLOCK TrendFbDatabaseAccessErrorHandler This function block performs the error handling for all access to the underlying SQLite database InOut: Scope Name Type Comment Input m_uiDiskFullDatabaseAccessSuspendTime UINT This member defines the behaviour of access to the underlying SQLite database in case of a ‘disk full’ event (normally indicated by an error code SQLITE_IOERR). 0: Starting from the first occurrence of an error code SQLITE_IOERR no more database access will be performed A positive value N: Starting from the first occurrence of an error code SQLITE_IOERR no more database access will be performed for N seconds Methods: ErrorHandling IsDatabaseAccessEnabled SQLiteErrorHandling prvGetActionName prvGetErrorDescription prvGetFunctionName Structure: ErrorHandling (Method) IsDatabaseAccessEnabled (Method) SQLiteErrorHandling (Method) private prvGetActionName (Method) prvGetErrorDescription (Method) prvGetFunctionName (Method)
TrendFbDatabaseAccessErrorHandler.ErrorHandling (METH) ¶ METHOD ErrorHandling This method is used to do the error processing. It writes an error message with an error code to the console. InOut: Scope Name Type Comment Input iFunction INT An int describing the method or function, where the error occurred iErrCode INT The error code describing, what failed
ITrendStorageWriter.GetMinMaxTimestamps (METH) ¶ METHOD GetMinMaxTimestamps : STO.ERROR This method is an optimization for a functionality, that is normally provided by a function block, that reads the trend storage. It is possible, because an ITrendStorageWriter knows both the minimum and maximum timestamp, that has been written in the trend storage. Rem.: This is not quite correct. The maximum timestamp is always available, because during writing to the trend storage the maximum timestamp can be determined easily. For the minimum timestamp is more logic available. - If no cicurlar trend storage is in use the minimum timestamp has to be set once by calling method SetMinTimestamp. In case of a circular trend storage the minimum timestamp will be determined during deleting the oldest records Before using this method the method InitializeGetMinMaxTimestamps has to be called. The return value of the method indicates, whether the processing was successful. Normally always STO.ERROR.NO_ERROR will be returned. If the previous call to InitializeGetMinMaxTimestamps is missing ERR_NOTINITIALIZED will be returned InOut: Scope Name Type Comment Return GetMinMaxTimestamps STO.ERROR Output liMinTimestamp LINT Returns minimum timestamp liMaxTimestamp LINT Returns maximum timestamp liAbsPacketStartTime LINT Returns the absolute start time of the 1st trace mgr packet
ITrendStorageWriter.Initialize (METH) ¶ METHOD Initialize This method performs some initialization. InOut: Scope Name Type Comment Input udiRecordingTimespan UDINT The configured timespan between two recordings udiCountCyclesToStore UDINT The number of cycles, that have to stored in the temporary buffer before writing the data to the trend storage udiMaxRecordCount UDINT If this parameter has a value != 0 it indicates the maximum number of records, that will be stored in the trend storage. In case of 0 no limit exists itfTrendRootPageManager ITrendRootPageManager An already initialized instance of ITrendRootPageManager, that is able to provide the root pages for tables and indexes
ITrendStorageWriter.InitializeGetMinMaxTimestamps (METH) ¶ METHOD InitializeGetMinMaxTimestamps This method has to be called before method GetMinMaxTimestamps can be used. It provides some initial values for this method. InOut: Scope Name Type Comment Input liMinTimestamp LINT The minimum timestamp to set liAbsPacketStartTime LINT Sets the absolute start time of the 1st trace mgr packet
ITrendStorageWriter2 (ITF) ¶ INTERFACE ITrendStorageWriter2 EXTENDS ITrendStorageWriter Extension of interface to retrieve statistics about the writing process and to support notification about new data written to the trend storage. Methods: AddTrendStorageWriterListener GetStatistics RemoveTrendStorageWriterListener CanProvideMinMaxTimestamps , inherited from ITrendStorageWriter CreateTrendStorageMetaDataFile , inherited from ITrendStorageWriter GetMinMaxTimestamps , inherited from ITrendStorageWriter Initialize , inherited from ITrendStorageWriter InitializeGetMinMaxTimestamps , inherited from ITrendStorageWriter Structure: AddTrendStorageWriterListener (Method) GetStatistics (Method) RemoveTrendStorageWriterListener (Method)
ITrendStorageWriter2.AddTrendStorageWriterListener (METH) ¶ METHOD AddTrendStorageWriterListener : ETrendStorageReaderErrors Adds an ITrendStorageWriterListener instance. InOut: Scope Name Type Comment Return AddTrendStorageWriterListener ETrendStorageReaderErrors A ETrendStorageReaderErrors value indicating, whether the processing has been completed successfully or not: ETrendStorageReaderErrors.NoError: Completed successfully ETrendStorageReaderErrors.WrongParameter: If the ITrendStorageWriterListener instance is invalid ETrendStorageReaderErrors.NoMemory: If the ITrendStorageWriterListener instance cannot be stored, because no memory available Input itfTrendStorageWriterListener ITrendStorageWriterListener The ITrendStorageWriterListener instance to add