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
ITrendStorageWriter2.GetStatistics (METH) ¶ METHOD GetStatistics This method is used to access the statistics of the writing InOut: Scope Name Type Comment Output tAvgWriteTime TIME Returns the average time, that is needed to write to the trend storage tAvgCycleTime TIME Returns the average cycle time, when data is written to the trend storage
TrendFbTrendStorageWriterReader.Initialize (METH) ¶ METHOD Initialize This method has to be called once before using the current instance InOut: Scope Name Type Comment Input udiCountSamples UDINT The maximum number of samples, that have to be read and passed to the attached ITraceMgrPacketReaderClient instance. itfTraceMgrPacketReaderClient ITraceMgrPacketReaderClient The ITraceMgrPacketReaderClient instance, that processes the data read from the trend storage. traceMgrPacket VisuStructTraceMgrPacket A VisuStructTraceMgrPacket variable, where the description of the ITraceMgrPacket and its variables read from the trend storage will be stored and passed to ITraceMgrPacketReaderClient instance. itfTrendRootPageManager ITrendRootPageManager An already initialized instance of ITrendRootPageManager, that is able to provide the root pages for tables and indexes
TrendFbTrendStorageWriterReader.Read (METH) ¶ METHOD Read : STO.ERROR Reads data from the trend storage and passes it to the ITraceMgrPacketReaderClient instance. Returns the error code of the underlying CAA storage database layer. InOut: Scope Name Type Comment Return Read STO.ERROR Input sPacketName STRING The name of the packet, that has been stored in the trend storage liTimestampFrom LINT The absolute timestamp of the 1st sample liTimestampTo LINT The absolute timestamp of the last sample liAbsPacketStartTime LINT The absolute start time of the 1st trace mgr packet, only if this parameter contains a value != 0. In this case both timestamp parameters are relative timestamps. If this parameter is 0 both timestamp parameters are absolute timestamps. xCloseTableAndStorage BOOL A flag indicating, whether the database and the table have to be kept open after reading the data (FALSE) or have to be closed (TRUE). The target visualization can leave the table and the storage open to have better performance.
TrendFbTrendStorageWriterReader.ReleaseDB (METH) ¶ METHOD ReleaseDB : STO.ERROR Method to call when it’s necessary to release the DB: close table, release handle InOut: Scope Name Type Return ReleaseDB STO.ERROR
TrendFbTrendStorageWriterReader.ShrinkMemory (METH) ¶ METHOD ShrinkMemory