C# Class GSF.Historian.Files.ArchiveFileAllocationTable

Represents the File Allocation Table of an ArchiveFile.
Inheritance: ISupportBinaryImage
Mostrar archivo Open project: GridProtectionAlliance/gsf Class Usage Examples

Private Properties

Property Type Description
ArchiveFileAllocationTable System
RequestDataBlock ArchiveDataBlock

Public Methods

Method Description
Extend ( ) : void

Extends the ArchiveFile by one ArchiveDataBlock.

Extend ( int dataBlocksToAdd ) : void

Extends the ArchiveFile by the specified number of ArchiveDataBlocks.

FindDataBlock ( int historianID, bool preRead = true ) : ArchiveDataBlock

Returns the first ArchiveDataBlock in the ArchiveFile for the specified historianID.

FindDataBlocks ( int historianID, TimeTag startTime, TimeTag endTime, bool preRead = true ) : List

Returns all ArchiveDataBlocks in the ArchiveFile for the specified historianID with ArchiveDataPoints between the specified startTime and endTime.

FindDataBlocks ( int historianID, TimeTag startTime, bool preRead = true ) : List

Returns all ArchiveDataBlocks in the ArchiveFile for the specified historianID with ArchiveDataPoint points later than the specified startTime.

FindDataBlocks ( int historianID, bool preRead = true ) : List

Returns all ArchiveDataBlocks in the ArchiveFile for the specified historianID.

FindLastDataBlock ( int historianID, bool preRead = true ) : ArchiveDataBlock

Returns the last ArchiveDataBlock in the ArchiveFile for the specified historianID.

GenerateBinaryImage ( byte buffer, int startIndex ) : int

Generates binary image of the ArchiveFileAllocationTable and copies it into the given buffer, for BinaryLength bytes.

ParseBinaryImage ( byte buffer, int startIndex, int length ) : int

Initializes object by parsing the specified buffer containing a binary image.

This method is never used since constructor parses the point allocation table.

Save ( bool forceFlush = false ) : void

Saves the ArchiveFileAllocationTable data to the ArchiveFile.

Private Methods

Method Description
ArchiveFileAllocationTable ( ArchiveFile parent ) : System

Initializes a new instance of the ArchiveFileAllocationTable class.

RequestDataBlock ( int historianID, TimeTag dataTime, int blockIndex ) : ArchiveDataBlock

Returns an ArchiveDataBlock for writing ArchiveDataPoints for the specified historianID.

Method Details

Extend() public method

Extends the ArchiveFile by one ArchiveDataBlock.
public Extend ( ) : void
return void

Extend() public method

Extends the ArchiveFile by the specified number of ArchiveDataBlocks.
public Extend ( int dataBlocksToAdd ) : void
dataBlocksToAdd int Number of s to add to the .
return void

FindDataBlock() public method

Returns the first ArchiveDataBlock in the ArchiveFile for the specified historianID.
public FindDataBlock ( int historianID, bool preRead = true ) : ArchiveDataBlock
historianID int Historian identifier whose is to be retrieved.
preRead bool true to pre-read data to locate write cursor.
return ArchiveDataBlock

FindDataBlocks() public method

Returns all ArchiveDataBlocks in the ArchiveFile for the specified historianID with ArchiveDataPoints between the specified startTime and endTime.
public FindDataBlocks ( int historianID, TimeTag startTime, TimeTag endTime, bool preRead = true ) : List
historianID int Historian identifier.
startTime TimeTag Start .
endTime TimeTag End .
preRead bool true to pre-read data to locate write cursor.
return List

FindDataBlocks() public method

Returns all ArchiveDataBlocks in the ArchiveFile for the specified historianID with ArchiveDataPoint points later than the specified startTime.
public FindDataBlocks ( int historianID, TimeTag startTime, bool preRead = true ) : List
historianID int Historian identifier.
startTime TimeTag Start .
preRead bool true to pre-read data to locate write cursor.
return List

FindDataBlocks() public method

Returns all ArchiveDataBlocks in the ArchiveFile for the specified historianID.
public FindDataBlocks ( int historianID, bool preRead = true ) : List
historianID int Historian identifier.
preRead bool true to pre-read data to locate write cursor.
return List

FindLastDataBlock() public method

Returns the last ArchiveDataBlock in the ArchiveFile for the specified historianID.
public FindLastDataBlock ( int historianID, bool preRead = true ) : ArchiveDataBlock
historianID int Historian identifier.
preRead bool true to pre-read data to locate write cursor.
return ArchiveDataBlock

GenerateBinaryImage() public method

Generates binary image of the ArchiveFileAllocationTable and copies it into the given buffer, for BinaryLength bytes.
is null. /// or is less than 0 -or- /// and will exceed length. ///
public GenerateBinaryImage ( byte buffer, int startIndex ) : int
buffer byte Buffer used to hold generated binary image of the source object.
startIndex int 0-based starting index in the to start writing.
return int

ParseBinaryImage() public method

Initializes object by parsing the specified buffer containing a binary image.
This method is never used since constructor parses the point allocation table.
public ParseBinaryImage ( byte buffer, int startIndex, int length ) : int
buffer byte Buffer containing binary image to parse.
startIndex int 0-based starting index in the to start parsing.
length int Valid number of bytes within to read from .
return int

Save() public method

Saves the ArchiveFileAllocationTable data to the ArchiveFile.
public Save ( bool forceFlush = false ) : void
forceFlush bool Forces an immediate disk flush for save.
return void