Logical
|
public class LogicalParser : IDisposable
The LogicalParser type exposes the following members.
Name | Description | |
---|---|---|
LogicalParser(String) | Creates a new instance of the LogicalParser class. | |
LogicalParser(Stream, Boolean) | Creates a new instance of the LogicalParser class. |
Name | Description | |
---|---|---|
ContainerRecord | Gets the container record from the PQDIF file. This is parsed as soon as the parser is Opened. | |
DataSourceRecords | Gets a list of all DataSource records from the PQDIF file. This is parsed when passing throug the observation records NextObservationRecorded. | |
FileName | Obsolete. Gets or sets the file path (not just the name) of the PQDIF file to be parsed. Obsolete in favor of FilePath. | |
FilePath | Gets or sets the file path of the PQDIF file to be parsed. |
Name | Description | |
---|---|---|
Close | Closes the PQDIF file. | |
Dispose | Releases resources held by the parser. | |
Equals | Determines whether the specified object is equal to the current object. (Inherited from Object) | |
Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object) | |
GetHashCode | Serves as the default hash function. (Inherited from Object) | |
GetType | Gets the Type of the current instance. (Inherited from Object) | |
HasNextObservationRecord | Determines whether there are any more ObservationRecords to be read from the PQDIF file. | |
MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object) | |
NextObservationRecord | Gets the next observation record from the PQDIF file. | |
Open | Opens the parser and parses the ContainerRecord. | |
Open(Stream, Boolean) | Opens the parser and parses the ContainerRecord. | |
Reset | Resets the parser to the beginning of the PQDIF file. | |
ToString | Returns a string that represents the current object. (Inherited from Object) |
Name | Description | |
---|---|---|
GetEnumValueOrDefault |
Gets the enumeration constant for value, if defined in the enumeration, or a default value.
(Defined by EnumExtensions) | |
GetEnumValueOrDefaultT |
Gets the enumeration constant for this value, if defined in the enumeration, or a default value.
(Defined by EnumExtensions) |
This class makes the data from PQD files readily available to applications and defines several redundant properties throughout the logical hierarchy of the PQDIF file to also facilitate the association of definitions with instances within the logical structure. The following list enumerates some of the more useful associations within the hierarchy.
Usage consists of iterating through observations (ObservationRecord) to examine each of the the measurements recorded in the file. As was noted in the list above, the data source (DataSourceRecord) and settings for the monitor (MonitorSettingsRecord) associated with each observation is exposed as a property on the observation record. Note that the same data source and monitor settings records may be referenced by multiple observation records in the file.
The following example demonstrates how to read all observation records from a PQDIF file using the logical parser.
ContainerRecord containerRecord; List<ObservationRecord> observationRecords = new List<ObservationRecord>(); string fileName = args[0]; using (LogicalParser parser = new LogicalParser(fileName)) { parser.Open(); containerRecord = parser.ContainerRecord; while (parser.HasNextObservationRecord()) observationRecords.Add(parser.NextObservationRecord()); }