C# Class GSF.Historian.Files.ArchiveDataBlock

Represents a block of ArchiveDataPoints in an ArchiveFile.
显示文件 Open project: GridProtectionAlliance/gsf Class Usage Examples

Public Methods

Method Description
Read ( ) : IEnumerable

Reads existing ArchiveDataPoints from the ArchiveDataBlock.

Reset ( ) : void

Resets the ArchiveDataBlock by overwriting existing ArchiveDataPoints with empty ArchiveDataPoints.

Write ( IDataPoint dataPoint, Exception &exception ) : bool

Writes the dataPoint to the ArchiveDataBlock.

Write ( IDataPoint dataPoint, bool suppressExceptions = false ) : bool

Writes the dataPoint to the ArchiveDataBlock.

If suppressExceptions is false, the default value, any encountered exception will be thrown on the call stack.

Protected Methods

Method Description
OnDataReadException ( Exception ex ) : void

Raises the DataReadException event.

OnDataWriteException ( Exception ex ) : void

Raises the DataWriteException event.

Private Methods

Method Description
ArchiveDataBlock ( ArchiveFile parent, int index, int historianID, bool preRead = true ) : System

Initializes a new instance of the ArchiveDataBlock class.

Method Details

OnDataReadException() protected method

Raises the DataReadException event.
protected OnDataReadException ( Exception ex ) : void
ex System.Exception to send to event.
return void

OnDataWriteException() protected method

Raises the DataWriteException event.
protected OnDataWriteException ( Exception ex ) : void
ex System.Exception to send to event.
return void

Read() public method

Reads existing ArchiveDataPoints from the ArchiveDataBlock.
public Read ( ) : IEnumerable
return IEnumerable

Reset() public method

Resets the ArchiveDataBlock by overwriting existing ArchiveDataPoints with empty ArchiveDataPoints.
public Reset ( ) : void
return void

Write() public method

Writes the dataPoint to the ArchiveDataBlock.
public Write ( IDataPoint dataPoint, Exception &exception ) : bool
dataPoint IDataPoint to write.
exception System.Exception Any that may have been encountered while writing.
return bool

Write() public method

Writes the dataPoint to the ArchiveDataBlock.
If suppressExceptions is false, the default value, any encountered exception will be thrown on the call stack.
public Write ( IDataPoint dataPoint, bool suppressExceptions = false ) : bool
dataPoint IDataPoint to write.
suppressExceptions bool Set to true to suppress write exceptions; defaults to false.
return bool