C# Class GSF.IO.FileStructure.IndexParser

This class provides passthrough properties for the IndexMapper class as well follows the directions of the Index Mapper to find the data cluster that contains the point in question.
Inheritance: IndexMapper
Afficher le fichier Open project: GridProtectionAlliance/openHistorian Class Usage Examples

Protected Properties

Свойство Type Description
DataClusterAddress uint
FirstIndirectBlockAddress uint
FourthIndirectBlockAddress uint
SecondIndirectBlockAddress uint
ThirdIndirectBlockAddress uint

Méthodes publiques

Méthode Description
ClearIndexCache ( IndexParser mostRecentParser ) : void

Resets the index cache with the information from the supplied mostRecentParser

IndexParser ( SubFileDiskIoSessionPool ioSessions ) : GSF.IO.FileStructure.Media

Creates a new instance of this class.

SetPositionAndLookup ( uint positionIndex ) : void

Determines if the current sector contains the position passed. If not, it updates the current sector to the one that contains the passed position.

VirtualToPhysical ( uint positionIndex ) : uint

This function will also call IndexMapper.MapPosition so after it returns, the current block data will be updated.

Private Methods

Méthode Description
GetBlockIndexValue ( uint blockIndex, int offset, BlockType blockType, uint blockBaseIndex ) : uint

This uses the (blockIndex,offset) values to determine what the next block index is. This also has consistency checks to determine if the file is inconsistent (potentially corruption)

UpdateBlockInformation ( ) : void

Looks up the physical/virtual block positions for the address given.

Method Details

ClearIndexCache() public méthode

Resets the index cache with the information from the supplied mostRecentParser
public ClearIndexCache ( IndexParser mostRecentParser ) : void
mostRecentParser IndexParser
Résultat void

IndexParser() public méthode

Creates a new instance of this class.
public IndexParser ( SubFileDiskIoSessionPool ioSessions ) : GSF.IO.FileStructure.Media
ioSessions SubFileDiskIoSessionPool IoSessions to use to read from this disk
Résultat GSF.IO.FileStructure.Media

SetPositionAndLookup() public méthode

Determines if the current sector contains the position passed. If not, it updates the current sector to the one that contains the passed position.
public SetPositionAndLookup ( uint positionIndex ) : void
positionIndex uint The position to navigate to indexed to the block data block size.
Résultat void

VirtualToPhysical() public méthode

This function will also call IndexMapper.MapPosition so after it returns, the current block data will be updated.
public VirtualToPhysical ( uint positionIndex ) : uint
positionIndex uint The virtual index address.
Résultat uint

Property Details

DataClusterAddress protected_oe property

The address of the first block of the data cluster.
protected uint DataClusterAddress
Résultat uint

FirstIndirectBlockAddress protected_oe property

The address of the first indirect block
protected uint FirstIndirectBlockAddress
Résultat uint

FourthIndirectBlockAddress protected_oe property

The address of the third indirect block
protected uint FourthIndirectBlockAddress
Résultat uint

SecondIndirectBlockAddress protected_oe property

The address of the second indirect block
protected uint SecondIndirectBlockAddress
Résultat uint

ThirdIndirectBlockAddress protected_oe property

The address of the third indirect block
protected uint ThirdIndirectBlockAddress
Résultat uint