C# Класс GSF.Historian.Files.ArchiveFile

Наследование: System.ComponentModel.Component, IArchive, ISupportLifecycle, ISupportInitialize, IProvideStatus, IPersistSettings
Показать файл Открыть проект Примеры использования класса

Private Properties

Свойство Тип Описание
BeginInit void
BuildHistoricFileList void
CloseStream void
ConserveMemoryTimer_Elapsed void
CurrentDataQueue_ProcessException void
DeleteFile void
EndInit void
FileWatcher_Created void
FileWatcher_Deleted void
FileWatcher_Renamed void
FindHistoricArchiveFileForRead bool
FindHistoricArchiveFileForWrite bool
GetHistoricFileInfo Info
HistoricDataQueue_ProcessException void
InsertInCurrentArchiveFile void
IsNewHistoricArchiveFile bool
MaintainMaximumNumberOfHistoricFiles void
MetadataFile_FileModified void
MoveFile void
OffloadHistoricFiles void
OffloadMaxAgedFiles void
OpenStream void
OutOfSequenceDataQueue_ProcessException void
PrepareForRollover void
ReOpen void
ReadData IEnumerable
SyncStateFile void
WriteToCurrentArchiveFile void
WriteToHistoricArchiveFile void

Открытые методы

Метод Описание
ArchiveFile ( ) : System

Initializes a new instance of the ArchiveFile class.

ArchiveFile ( IContainer container ) : System

Initializes a new instance of the ArchiveFile class.

Close ( ) : void

Closes the ArchiveFile if it IsOpen.

Initialize ( ) : void

Initializes the ArchiveFile.

Initialize() is to be called by user-code directly only if the ArchiveFile is not consumed through the designer surface of the IDE.

LoadSettings ( ) : void

Loads saved settings for the ArchiveFile from the config file if the PersistSettings property is set to true.

MaximumDataBlocks ( double fileSize, int blockSize ) : int

Returns the number of ArchiveDataBlocks an ArchiveFile can have.

Open ( ) : void

Opens the ArchiveFile for use.

ReadData ( IEnumerable historianIDs, DateTime startTime, DateTime endTime, bool timeSorted = true ) : IEnumerable

Reads ArchiveDataPoints from the ArchiveFile.

ReadData ( IEnumerable historianIDs, DateTime startTime, bool timeSorted = true ) : IEnumerable

Reads ArchiveDataPoints from the ArchiveFile.

ReadData ( IEnumerable historianIDs, TimeTag startTime, TimeTag endTime, bool timeSorted = true ) : IEnumerable

Reads ArchiveDataPoints from the ArchiveFile.

ReadData ( IEnumerable historianIDs, TimeTag startTime, bool timeSorted = true ) : IEnumerable

Reads ArchiveDataPoints from the ArchiveFile.

ReadData ( IEnumerable historianIDs, bool timeSorted = true ) : IEnumerable

Reads all ArchiveDataPoints from the ArchiveFile for the specified historianIDs.

ReadData ( IEnumerable historianIDs, string startTime, bool timeSorted = true ) : IEnumerable

Reads ArchiveDataPoints from the ArchiveFile.

ReadData ( IEnumerable historianIDs, string startTime, string endTime, bool timeSorted = true ) : IEnumerable

Reads ArchiveDataPoints from the ArchiveFile.

ReadData ( int historianID, DateTime startTime, DateTime endTime, bool timeSorted = true ) : IEnumerable

Reads ArchiveDataPoints from the ArchiveFile.

ReadData ( int historianID, DateTime startTime, bool timeSorted = true ) : IEnumerable

Reads ArchiveDataPoints from the ArchiveFile.

ReadData ( int historianID, TimeTag startTime, TimeTag endTime, bool timeSorted = true ) : IEnumerable

Reads ArchiveDataPoints from the ArchiveFile.

ReadData ( int historianID, TimeTag startTime, bool timeSorted = true ) : IEnumerable

Reads ArchiveDataPoints from the ArchiveFile.

ReadData ( int historianID, bool timeSorted = true ) : IEnumerable

Reads all ArchiveDataPoints from the ArchiveFile for the specified historianID.

ReadData ( int historianID, string startTime, bool timeSorted = true ) : IEnumerable

Reads ArchiveDataPoints from the ArchiveFile.

ReadData ( int historianID, string startTime, string endTime, bool timeSorted = true ) : IEnumerable

Reads ArchiveDataPoints from the ArchiveFile.

ReadMetaData ( int historianID ) : byte[]

Reads MetadataRecord for the specified historianID.

ReadMetaDataSummary ( int historianID ) : byte[]

Reads MetadataRecordSummary for the specified historianID.

ReadStateData ( int historianID ) : byte[]

Reads StateRecord for the specified historianID.

ReadStateDataSummary ( int historianID ) : byte[]

Reads StateRecordSummary for the specified historianID.

Rollover ( ) : void

Performs rollover of active ArchiveFile to a new ArchiveFile.

Save ( ) : void

Saves the ArchiveFile.

SaveSettings ( ) : void

Saves settings for the ArchiveFile to the config file if the PersistSettings property is set to true.

SynchronizeStateFile ( ) : void

Requests a resynchronization of the state file.

WriteData ( IDataPoint dataPoint ) : void

Writes the specified dataPoint to the ArchiveFile.

WriteData ( IEnumerable dataPoints ) : void

Writes the specified dataPoints to the ArchiveFile.

WriteMetaData ( int historianID, byte metadata ) : void

Writes metadata for the specified historianID.

WriteStateData ( int historianID, byte statedata ) : void

Writes statedata for the specified historianID.

Защищенные методы

Метод Описание
Dispose ( bool disposing ) : void

Releases the unmanaged resources used by the ArchiveFile and optionally releases the managed resources.

OnDataReadException ( Exception ex ) : void

Raises the DataReadException event.

OnDataWriteException ( Exception ex ) : void

Raises the DataWriteException event.

OnFileFull ( ) : void

Raises the FileFull event.

OnFutureDataReceived ( IDataPoint dataPoint ) : void

Raises the FutureDataReceived event.

OnHistoricDataReceived ( IDataPoint dataPoint ) : void

Raises the HistoricDataReceived event.

OnHistoricFileListBuildComplete ( ) : void

Raises the HistoricFileListBuildComplete event.

OnHistoricFileListBuildException ( Exception ex ) : void

Raise the HistoricFileListBuildException event.

OnHistoricFileListBuildStart ( ) : void

Raises the HistoricFileListBuildStart event.

OnHistoricFileListUpdated ( ) : void

Raises the HistoricFileListUpdated event.

OnMetadataUpdated ( ) : void

Raises the MetadataUpdated event.

OnOffloadComplete ( ) : void

Raises the OffloadComplete event.

OnOffloadException ( Exception ex ) : void

Raises the OffloadException event.

OnOffloadProgress ( ProcessProgress offloadProgress ) : void

Raises the OffloadProgress event.

OnOffloadStart ( ) : void

Raises the OffloadStart event.

OnOrphanDataReceived ( IDataPoint dataPoint ) : void

Raises the OrphanDataReceived event.

OnOutOfSequenceDataReceived ( IDataPoint dataPoint ) : void

Raises the OutOfSequenceDataReceived event.

OnProcessAlarmNotification ( StateRecord pointState ) : void

Raises the ProcessAlarmNotification event.

OnRolloverComplete ( ) : void

Raises the RolloverComplete event.

OnRolloverException ( Exception ex ) : void

Raises the RolloverException event.

OnRolloverPreparationComplete ( ) : void

Raises the RolloverPreparationComplete event.

OnRolloverPreparationException ( Exception ex ) : void

Raises the RolloverPreparationException event.

OnRolloverPreparationStart ( ) : void

Raises the RolloverPreparationStart event.

OnRolloverStart ( ) : void

Raises the RolloverStart event.

WaitForReadersRelease ( ) : bool

Waits for all readers to relinquish read locks on active file.

Приватные методы

Метод Описание
BeginInit ( ) : void
BuildHistoricFileList ( ) : void
CloseStream ( ) : void
ConserveMemoryTimer_Elapsed ( object sender, System.Timers.ElapsedEventArgs e ) : void
CurrentDataQueue_ProcessException ( object sender, EventArgs e ) : void
DeleteFile ( string fileName ) : void
EndInit ( ) : void
FileWatcher_Created ( object sender, FileSystemEventArgs e ) : void
FileWatcher_Deleted ( object sender, FileSystemEventArgs e ) : void
FileWatcher_Renamed ( object sender, RenamedEventArgs e ) : void
FindHistoricArchiveFileForRead ( System.ComponentModel.Info fileInfo, TimeTag startTime, TimeTag endTime ) : bool
FindHistoricArchiveFileForWrite ( System.ComponentModel.Info fileInfo, TimeTag searchTime ) : bool
GetHistoricFileInfo ( string fileName ) : Info
HistoricDataQueue_ProcessException ( object sender, EventArgs e ) : void
InsertInCurrentArchiveFile ( IDataPoint items ) : void
IsNewHistoricArchiveFile ( Info fileInfo, string fileName ) : bool
MaintainMaximumNumberOfHistoricFiles ( ) : void
MetadataFile_FileModified ( object sender, EventArgs e ) : void
MoveFile ( string sourceFileName, string destinationFileName ) : void
OffloadHistoricFiles ( ) : void
OffloadMaxAgedFiles ( ) : void
OpenStream ( ) : void
OutOfSequenceDataQueue_ProcessException ( object sender, EventArgs e ) : void
PrepareForRollover ( ) : void
ReOpen ( ) : void
ReadData ( IEnumerable historianIDs, TimeTag startTime, TimeTag endTime, IDataPoint resumeFrom, bool timeSorted ) : IEnumerable
SyncStateFile ( object state ) : void
WriteToCurrentArchiveFile ( IDataPoint items ) : void
WriteToHistoricArchiveFile ( IDataPoint items ) : void

Описание методов

ArchiveFile() публичный Метод

Initializes a new instance of the ArchiveFile class.
public ArchiveFile ( ) : System
Результат System

ArchiveFile() публичный Метод

Initializes a new instance of the ArchiveFile class.
public ArchiveFile ( IContainer container ) : System
container IContainer object that contains the .
Результат System

Close() публичный Метод

Closes the ArchiveFile if it IsOpen.
public Close ( ) : void
Результат void

Dispose() защищенный Метод

Releases the unmanaged resources used by the ArchiveFile and optionally releases the managed resources.
protected Dispose ( bool disposing ) : void
disposing bool true to release both managed and unmanaged resources; false to release only unmanaged resources.
Результат void

Initialize() публичный Метод

Initializes the ArchiveFile.
Initialize() is to be called by user-code directly only if the ArchiveFile is not consumed through the designer surface of the IDE.
public Initialize ( ) : void
Результат void

LoadSettings() публичный Метод

Loads saved settings for the ArchiveFile from the config file if the PersistSettings property is set to true.
has a value of null or empty string.
public LoadSettings ( ) : void
Результат void

MaximumDataBlocks() публичный статический Метод

Returns the number of ArchiveDataBlocks an ArchiveFile can have.
public static MaximumDataBlocks ( double fileSize, int blockSize ) : int
fileSize double Size (in MB) of the .
blockSize int Size (in KB) of the s in the .
Результат int

OnDataReadException() защищенный Метод

Raises the DataReadException event.
protected OnDataReadException ( Exception ex ) : void
ex Exception to send to event.
Результат void

OnDataWriteException() защищенный Метод

Raises the DataWriteException event.
protected OnDataWriteException ( Exception ex ) : void
ex Exception to send to event.
Результат void

OnFileFull() защищенный Метод

Raises the FileFull event.
protected OnFileFull ( ) : void
Результат void

OnFutureDataReceived() защищенный Метод

Raises the FutureDataReceived event.
protected OnFutureDataReceived ( IDataPoint dataPoint ) : void
dataPoint IDataPoint to send to event.
Результат void

OnHistoricDataReceived() защищенный Метод

Raises the HistoricDataReceived event.
protected OnHistoricDataReceived ( IDataPoint dataPoint ) : void
dataPoint IDataPoint to send to event.
Результат void

OnHistoricFileListBuildComplete() защищенный Метод

Raises the HistoricFileListBuildComplete event.
protected OnHistoricFileListBuildComplete ( ) : void
Результат void

OnHistoricFileListBuildException() защищенный Метод

Raise the HistoricFileListBuildException event.
protected OnHistoricFileListBuildException ( Exception ex ) : void
ex Exception to send to event.
Результат void

OnHistoricFileListBuildStart() защищенный Метод

Raises the HistoricFileListBuildStart event.
protected OnHistoricFileListBuildStart ( ) : void
Результат void

OnHistoricFileListUpdated() защищенный Метод

Raises the HistoricFileListUpdated event.
protected OnHistoricFileListUpdated ( ) : void
Результат void

OnMetadataUpdated() защищенный Метод

Raises the MetadataUpdated event.
protected OnMetadataUpdated ( ) : void
Результат void

OnOffloadComplete() защищенный Метод

Raises the OffloadComplete event.
protected OnOffloadComplete ( ) : void
Результат void

OnOffloadException() защищенный Метод

Raises the OffloadException event.
protected OnOffloadException ( Exception ex ) : void
ex Exception to send to event.
Результат void

OnOffloadProgress() защищенный Метод

Raises the OffloadProgress event.
protected OnOffloadProgress ( ProcessProgress offloadProgress ) : void
offloadProgress ProcessProgress to send to event.
Результат void

OnOffloadStart() защищенный Метод

Raises the OffloadStart event.
protected OnOffloadStart ( ) : void
Результат void

OnOrphanDataReceived() защищенный Метод

Raises the OrphanDataReceived event.
protected OnOrphanDataReceived ( IDataPoint dataPoint ) : void
dataPoint IDataPoint to send to event.
Результат void

OnOutOfSequenceDataReceived() защищенный Метод

Raises the OutOfSequenceDataReceived event.
protected OnOutOfSequenceDataReceived ( IDataPoint dataPoint ) : void
dataPoint IDataPoint to send to event.
Результат void

OnProcessAlarmNotification() защищенный Метод

Raises the ProcessAlarmNotification event.
protected OnProcessAlarmNotification ( StateRecord pointState ) : void
pointState StateRecord to send to event.
Результат void

OnRolloverComplete() защищенный Метод

Raises the RolloverComplete event.
protected OnRolloverComplete ( ) : void
Результат void

OnRolloverException() защищенный Метод

Raises the RolloverException event.
protected OnRolloverException ( Exception ex ) : void
ex Exception to send to event.
Результат void

OnRolloverPreparationComplete() защищенный Метод

Raises the RolloverPreparationComplete event.
protected OnRolloverPreparationComplete ( ) : void
Результат void

OnRolloverPreparationException() защищенный Метод

Raises the RolloverPreparationException event.
protected OnRolloverPreparationException ( Exception ex ) : void
ex Exception to send to event.
Результат void

OnRolloverPreparationStart() защищенный Метод

Raises the RolloverPreparationStart event.
protected OnRolloverPreparationStart ( ) : void
Результат void

OnRolloverStart() защищенный Метод

Raises the RolloverStart event.
protected OnRolloverStart ( ) : void
Результат void

Open() публичный Метод

Opens the ArchiveFile for use.
One or all of the , or properties are not set.
public Open ( ) : void
Результат void

ReadData() публичный Метод

Reads ArchiveDataPoints from the ArchiveFile.
public ReadData ( IEnumerable historianIDs, DateTime startTime, DateTime endTime, bool timeSorted = true ) : IEnumerable
historianIDs IEnumerable Historian identifiers for which s are to be retrieved.
startTime DateTime Start (in UTC) for the s to be retrieved.
endTime DateTime End (in UTC) for the s to be retrieved.
timeSorted bool Indicates whether the data retrieved from the archive should be time sorted.
Результат IEnumerable

ReadData() публичный Метод

Reads ArchiveDataPoints from the ArchiveFile.
public ReadData ( IEnumerable historianIDs, DateTime startTime, bool timeSorted = true ) : IEnumerable
historianIDs IEnumerable Historian identifiers for which s are to be retrieved.
startTime DateTime Start (in UTC) for the s to be retrieved.
timeSorted bool Indicates whether the data retrieved from the archive should be time sorted.
Результат IEnumerable

ReadData() публичный Метод

Reads ArchiveDataPoints from the ArchiveFile.
public ReadData ( IEnumerable historianIDs, TimeTag startTime, TimeTag endTime, bool timeSorted = true ) : IEnumerable
historianIDs IEnumerable Historian identifiers for which s are to be retrieved.
startTime TimeTag Start (in UTC) for the s to be retrieved.
endTime TimeTag End (in UTC) for the s to be retrieved.
timeSorted bool Indicates whether the data retrieved from the archive should be time sorted.
Результат IEnumerable

ReadData() публичный Метод

Reads ArchiveDataPoints from the ArchiveFile.
public ReadData ( IEnumerable historianIDs, TimeTag startTime, bool timeSorted = true ) : IEnumerable
historianIDs IEnumerable Historian identifiers for which s are to be retrieved.
startTime TimeTag Start (in UTC) for the s to be retrieved.
timeSorted bool Indicates whether the data retrieved from the archive should be time sorted.
Результат IEnumerable

ReadData() публичный Метод

Reads all ArchiveDataPoints from the ArchiveFile for the specified historianIDs.
public ReadData ( IEnumerable historianIDs, bool timeSorted = true ) : IEnumerable
historianIDs IEnumerable Historian identifiers for which s are to be retrieved.
timeSorted bool Indicates whether the data retrieved from the archive should be time sorted.
Результат IEnumerable

ReadData() публичный Метод

Reads ArchiveDataPoints from the ArchiveFile.
public ReadData ( IEnumerable historianIDs, string startTime, bool timeSorted = true ) : IEnumerable
historianIDs IEnumerable Historian identifiers for which s are to be retrieved.
startTime string representation of the start time (in UTC) for the s to be retrieved.
timeSorted bool Indicates whether the data retrieved from the archive should be time sorted.
Результат IEnumerable

ReadData() публичный Метод

Reads ArchiveDataPoints from the ArchiveFile.
public ReadData ( IEnumerable historianIDs, string startTime, string endTime, bool timeSorted = true ) : IEnumerable
historianIDs IEnumerable Historian identifiers for which s are to be retrieved.
startTime string representation of the start time (in UTC) for the s to be retrieved.
endTime string representation of the end time (in UTC) for the s to be retrieved.
timeSorted bool Indicates whether the data retrieved from the archive should be time sorted.
Результат IEnumerable

ReadData() публичный Метод

Reads ArchiveDataPoints from the ArchiveFile.
public ReadData ( int historianID, DateTime startTime, DateTime endTime, bool timeSorted = true ) : IEnumerable
historianID int Historian identifier for which s are to be retrieved.
startTime DateTime Start (in UTC) for the s to be retrieved.
endTime DateTime End (in UTC) for the s to be retrieved.
timeSorted bool Indicates whether the data retrieved from the archive should be time sorted.
Результат IEnumerable

ReadData() публичный Метод

Reads ArchiveDataPoints from the ArchiveFile.
public ReadData ( int historianID, DateTime startTime, bool timeSorted = true ) : IEnumerable
historianID int Historian identifier for which s are to be retrieved.
startTime DateTime Start (in UTC) for the s to be retrieved.
timeSorted bool Indicates whether the data retrieved from the archive should be time sorted.
Результат IEnumerable

ReadData() публичный Метод

Reads ArchiveDataPoints from the ArchiveFile.
public ReadData ( int historianID, TimeTag startTime, TimeTag endTime, bool timeSorted = true ) : IEnumerable
historianID int Historian identifier for which s are to be retrieved.
startTime TimeTag Start (in UTC) for the s to be retrieved.
endTime TimeTag End (in UTC) for the s to be retrieved.
timeSorted bool Indicates whether the data retrieved from the archive should be time sorted.
Результат IEnumerable

ReadData() публичный Метод

Reads ArchiveDataPoints from the ArchiveFile.
public ReadData ( int historianID, TimeTag startTime, bool timeSorted = true ) : IEnumerable
historianID int Historian identifier for which s are to be retrieved.
startTime TimeTag Start (in UTC) for the s to be retrieved.
timeSorted bool Indicates whether the data retrieved from the archive should be time sorted.
Результат IEnumerable

ReadData() публичный Метод

Reads all ArchiveDataPoints from the ArchiveFile for the specified historianID.
public ReadData ( int historianID, bool timeSorted = true ) : IEnumerable
historianID int Historian identifier for which s are to be retrieved.
timeSorted bool Indicates whether the data retrieved from the archive should be time sorted.
Результат IEnumerable

ReadData() публичный Метод

Reads ArchiveDataPoints from the ArchiveFile.
public ReadData ( int historianID, string startTime, bool timeSorted = true ) : IEnumerable
historianID int Historian identifier for which s are to be retrieved.
startTime string representation of the start time (in UTC) for the s to be retrieved.
timeSorted bool Indicates whether the data retrieved from the archive should be time sorted.
Результат IEnumerable

ReadData() публичный Метод

Reads ArchiveDataPoints from the ArchiveFile.
public ReadData ( int historianID, string startTime, string endTime, bool timeSorted = true ) : IEnumerable
historianID int Historian identifier for which s are to be retrieved.
startTime string representation of the start time (in UTC) for the s to be retrieved.
endTime string representation of the end time (in UTC) for the s to be retrieved.
timeSorted bool Indicates whether the data retrieved from the archive should be time sorted.
Результат IEnumerable

ReadMetaData() публичный Метод

Reads MetadataRecord for the specified historianID.
public ReadMetaData ( int historianID ) : byte[]
historianID int Historian identifier.
Результат byte[]

ReadMetaDataSummary() публичный Метод

Reads MetadataRecordSummary for the specified historianID.
public ReadMetaDataSummary ( int historianID ) : byte[]
historianID int Historian identifier.
Результат byte[]

ReadStateData() публичный Метод

Reads StateRecord for the specified historianID.
public ReadStateData ( int historianID ) : byte[]
historianID int Historian identifier.
Результат byte[]

ReadStateDataSummary() публичный Метод

Reads StateRecordSummary for the specified historianID.
public ReadStateDataSummary ( int historianID ) : byte[]
historianID int Historian identifier.
Результат byte[]

Rollover() публичный Метод

Performs rollover of active ArchiveFile to a new ArchiveFile.
is not .
public Rollover ( ) : void
Результат void

Save() публичный Метод

Saves the ArchiveFile.
is not open.
public Save ( ) : void
Результат void

SaveSettings() публичный Метод

Saves settings for the ArchiveFile to the config file if the PersistSettings property is set to true.
has a value of null or empty string.
public SaveSettings ( ) : void
Результат void

SynchronizeStateFile() публичный Метод

Requests a resynchronization of the state file.
public SynchronizeStateFile ( ) : void
Результат void

WaitForReadersRelease() защищенный Метод

Waits for all readers to relinquish read locks on active file.
protected WaitForReadersRelease ( ) : bool
Результат bool

WriteData() публичный Метод

Writes the specified dataPoint to the ArchiveFile.
public WriteData ( IDataPoint dataPoint ) : void
dataPoint IDataPoint to be written.
Результат void

WriteData() публичный Метод

Writes the specified dataPoints to the ArchiveFile.
public WriteData ( IEnumerable dataPoints ) : void
dataPoints IEnumerable points to be written.
Результат void

WriteMetaData() публичный Метод

Writes metadata for the specified historianID.
public WriteMetaData ( int historianID, byte metadata ) : void
historianID int Historian identifier.
metadata byte data.
Результат void

WriteStateData() публичный Метод

Writes statedata for the specified historianID.
public WriteStateData ( int historianID, byte statedata ) : void
historianID int Historian identifier.
statedata byte data.
Результат void