Click or drag to resize

Res1DStreamBridge Class

Bridge for reading .res1d files.

This class supports reading files from a .NET stream.

Inheritance Hierarchy

Namespace:  DHI.Mike1D.ResultDataAccess
Assembly:  DHI.Mike1D.ResultDataAccess (in DHI.Mike1D.ResultDataAccess.dll) Version: 19.0.0.0 (11.1.1.1111)
Syntax
public class Res1DStreamBridge : IResultReadWriteBridge, 
	IResultReadBridge, IResultBridge, IResultWriteBridge

The Res1DStreamBridge type exposes the following members.

Constructors
  NameDescription
Protected methodRes1DStreamBridge(IResultData)
Initializes a new instance of the Res1DStreamBridge class
Public methodRes1DStreamBridge(IResultData, Stream)
Constructor
Top
Properties
  NameDescription
Public propertyConnection
Public propertyFilter
Specifies what data to load. Must be set before any call to the open and read methods.
Public propertyNumberOfTimeSteps
Return the number of time steps in the storage
Public propertySecondsBetweenFileFlush
Seconds between flush to file. Set this lower if you need to read the result file while your calculations are running.

Set to zero to disable file flushing.

Default value is 10 seconds.

Top
Methods
  NameDescription
Protected methodCloseDfsFile
Public methodConnect
Connects to storage
Protected methodCreateDynamicItemInfos
Protected methodCreateDynamicItemInfosOld
Protected methodStatic memberCreateResultDirectory
Create result directory and check if file already exists that it can be overwritten.
Public methodEquals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Protected methodFinalize
Release ressources allocated by the bridge.
(Overrides ObjectFinalize.)
Public methodFinish
Public methodFlush
Write the contained time steps into the res11 file
Public methodStatic memberFromDfs
Protected methodStatic memberGetFloat
Get a float from the static item at the given index
Public methodGetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Protected methodOpenDfsFile
Protected methodPeakStaticItemNameNext
Peak the next static item.
Protected methodPeakStaticItemNext
Peak the next static item.
Public methodPrepare
Prepare bridge, create the file, add dynamic and static items.
Public methodRead
Reads in the data specified by _specification and _filePath and populates _resultData.
Public methodReadData
Reads in the data from persistant storage and populates the associated resultdata object.

You can not load the data without having loaded the header, hence it can be assumed that ReadHeader(IDiagnostics) has already been called.

Public methodReadHeader(IDiagnostics)
Reads in the header data from persistant storage and populates the associated resultdata object.
Public methodReadHeader(IDiagnostics, Boolean)
Protected methodReadStaticItemNext
Reads the next static item, depending on the _readMode.
Protected methodRewindTime
Override this method to support rewinding of time when running simulation. This stream version does not support rewinding.
Public methodSave
Writes the content of the _resultDataAccess into a Res1d file
Public methodStatic memberToDfs
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Protected methodTriggerTimeStepReadEvent
Method to trigger when a new time step has been read.
Public methodWrite
write everything in a file, closing and finalizing file.
Top
Events
  NameDescription
Public eventTimeStepReadEvent
Event triggered everytime a time step has been read
Top
Fields
  NameDescription
Protected field_connection
Protected field_contained
Table to indicate which items to read. Determined by the filter in ReadDynamicDataHeader()
Protected field_dfsFile
Protected field_dfsFileStream
Protected field_dynamicItems
List of same size as the dynamic items in the dfs file.
Protected field_lastTime
Last time when the data was outputted.
Protected field_predefItemData
Predefined DFS item data, used when reading, for performance.
Protected field_resultData
Protected field_useUbgUnits
Flag indicating whether file is being read in Ubg user units. Not used when writing
Protected fieldStatic memberRES1D_VERSION
Version of the MIKE 1D file format

The integer part is the major version number and the fractional part is the minor version number.

If only the minor version number differs, bridge should be backward and forward compatible, forward compatible meaning that older bridge can read newer files, though it will usually miss the new functionality

If the major version number differs, bridge will only be backward compatible.

Top
See Also