init
This commit is contained in:
48
docs/ai/DataPRO/SensorDB/Properties.md
Normal file
48
docs/ai/DataPRO/SensorDB/Properties.md
Normal file
@@ -0,0 +1,48 @@
|
||||
---
|
||||
source_files:
|
||||
- DataPRO/SensorDB/Properties/AssemblyInfo.cs
|
||||
generated_at: "2026-04-17T16:13:55.386816+00:00"
|
||||
model: "zai-org/GLM-5-FP8"
|
||||
schema_version: 1
|
||||
sha256: "35bc57816caf45d9"
|
||||
---
|
||||
|
||||
# Properties
|
||||
|
||||
### Purpose
|
||||
This module contains assembly metadata for the `DPInstallWrapper2` assembly, which appears to be a driver installer wrapper component within the DataPRO installation system. The file configures assembly identity, version information, and COM visibility settings using standard .NET assembly attributes. It exists to provide build-time metadata for the compiled assembly.
|
||||
|
||||
### Public Interface
|
||||
No public functions, classes, or methods are defined in this module. This file contains only assembly-level attribute declarations:
|
||||
|
||||
- `AssemblyTitle("DPInstallWrapper2")` - Sets the assembly title
|
||||
- `AssemblyDescription("")` - Empty description
|
||||
- `AssemblyConfiguration("")` - Empty configuration
|
||||
- `AssemblyCompany("")` - Empty company name
|
||||
- `AssemblyProduct("DPInstallWrapper2")` - Product name
|
||||
- `AssemblyCopyright("Copyright © 2019")` - Copyright notice
|
||||
- `AssemblyTrademark("")` - Empty trademark
|
||||
- `AssemblyCulture("")` - Neutral culture
|
||||
- `ComVisible(false)` - Types not visible to COM components
|
||||
- `Guid("bb0e5961-d169-4dab-ac55-72e1e71c1ef9")` - COM type library identifier
|
||||
- `AssemblyVersion("1.0.0.0")` - Assembly version
|
||||
- `AssemblyFileVersion("1.0.0.0")` - File version
|
||||
|
||||
### Invariants
|
||||
- The GUID `bb0e5961-d169-4dab-ac55-72e1e71c1ef9` uniquely identifies this assembly's COM type library if exposed.
|
||||
- `ComVisible(false)` ensures types are not exposed to COM by default.
|
||||
- Version numbers are fixed at `1.0.0.0` for both assembly and file versions.
|
||||
|
||||
### Dependencies
|
||||
**Imports:**
|
||||
- `System.Reflection`
|
||||
- `System.Runtime.CompilerServices`
|
||||
- `System.Runtime.InteropServices`
|
||||
|
||||
**Consumers:** Unknown from this file alone - would be any project referencing the DPInstallWrapper2 assembly.
|
||||
|
||||
### Gotchas
|
||||
- The `AssemblyDescription`, `AssemblyCompany`, `AssemblyConfiguration`, and `AssemblyTrademark` attributes are all empty strings, which may indicate incomplete metadata configuration.
|
||||
- The copyright year (2019) differs from other modules in the system, suggesting this component was created or updated later in the project lifecycle.
|
||||
|
||||
---
|
||||
190
docs/ai/DataPRO/SensorDB/TDCINI.md
Normal file
190
docs/ai/DataPRO/SensorDB/TDCINI.md
Normal file
@@ -0,0 +1,190 @@
|
||||
---
|
||||
source_files:
|
||||
- DataPRO/SensorDB/TDCINI/INIDataZeroTimeWindowSeconds.cs
|
||||
- DataPRO/SensorDB/TDCINI/INISmartBatteryThresholds.cs
|
||||
- DataPRO/SensorDB/TDCINI/INIViewerROI.cs
|
||||
- DataPRO/SensorDB/TDCINI/TSFINIRegionOfInterest.cs
|
||||
- DataPRO/SensorDB/TDCINI/TDCINIRS232Info.cs
|
||||
- DataPRO/SensorDB/TDCINI/INIIIHSExport.cs
|
||||
- DataPRO/SensorDB/TDCINI/INIRackInventory.cs
|
||||
- DataPRO/SensorDB/TDCINI/TDCINIError.cs
|
||||
- DataPRO/SensorDB/TDCINI/INIISOExportParameters.cs
|
||||
generated_at: "2026-04-17T15:48:03.697947+00:00"
|
||||
model: "zai-org/GLM-5-FP8"
|
||||
schema_version: 1
|
||||
sha256: "507c2abf21a4f505"
|
||||
---
|
||||
|
||||
# TDCINI Module Documentation
|
||||
|
||||
## 1. Purpose
|
||||
|
||||
This module provides a collection of helper classes for parsing configuration data from INI files within the `DTS.SensorDB.TDCINI` namespace. Each class corresponds to a specific INI section, responsible for deserializing comma-delimited text lines into strongly-typed properties. The module centralizes error handling through the `TDCINIError` class, enabling consistent validation and error reporting across all configuration sections.
|
||||
|
||||
---
|
||||
|
||||
## 2. Public Interface
|
||||
|
||||
### TDCINIError
|
||||
Error container class for INI parsing failures.
|
||||
|
||||
**Properties:**
|
||||
- `Error` (`INIErrors`) — The error type enum value
|
||||
- `Line` (`int`) — Line number where error occurred (default: -1)
|
||||
- `ExtraInfo` (`string`) — Additional context (e.g., the problematic line or token)
|
||||
|
||||
**Constructors:**
|
||||
- `TDCINIError(INIErrors error)`
|
||||
- `TDCINIError(INIErrors error, string extraInfo)`
|
||||
- `TDCINIError(INIErrors error, string extraInfo, int currentLine)`
|
||||
|
||||
**Nested Enum:**
|
||||
- `INIErrors` — Contains 60+ error codes including `INI_FILE_NOT_FOUND`, `INI_COMINFO_INVALID`, `INI_ROI_INVALID`, `INI_RACKINVENTORY_INVALID`, `INI_ISOEXPORTPARAMETERS_INVALID`, `INI_IIHSExport_INVALID`, etc.
|
||||
|
||||
---
|
||||
|
||||
### INIDataZeroTimeWindowSeconds
|
||||
Parses the DataZeroTimeWindow section.
|
||||
|
||||
**Properties:**
|
||||
- `Start` (`double`) — Start of data zero window
|
||||
- `End` (`double`) — End of data zero window
|
||||
|
||||
**Methods:**
|
||||
- `bool ReadFrom(string line, ref List<TDCINIError> errors, int iCurrentLine)` — Parses a comma-delimited line with exactly 2 double values. Returns `true` on success, `false` on failure.
|
||||
|
||||
---
|
||||
|
||||
### INISmartBatteryThresholds
|
||||
Parses the SmartBatteryThreshold section.
|
||||
|
||||
**Properties:**
|
||||
- `Yellow` (`int`) — Time in minutes for yellow battery warning
|
||||
- `Red` (`int`) — Time in minutes for red battery warning
|
||||
|
||||
**Methods:**
|
||||
- `bool ReadFrom(string line, int curLine, ref List<TDCINIError> errors)` — Parses a comma-delimited line with exactly 2 integer values.
|
||||
|
||||
---
|
||||
|
||||
### INIViewerROI
|
||||
Parses the ViewerROI section.
|
||||
|
||||
**Properties:**
|
||||
- `XMin` (`double`) — X minimum value
|
||||
- `XMax` (`double`) — X maximum value
|
||||
|
||||
**Methods:**
|
||||
- `bool ReadFrom(string line, int curLine, ref List<TDCINIError> errors)` — Parses a comma-delimited line with exactly 2 double values.
|
||||
|
||||
---
|
||||
|
||||
### TSFINIRegionOfInterest
|
||||
Parses the RegionOfInterest section.
|
||||
|
||||
**Properties:**
|
||||
- `StartSeconds` (`double`) — Start of ROI relative to T0
|
||||
- `EndSeconds` (`double`) — End of ROI relative to T0
|
||||
|
||||
**Methods:**
|
||||
- `bool ReadFrom(string line, int currentLine, ref List<TDCINIError> errors)` — Parses a comma-delimited line with exactly 2 double values.
|
||||
|
||||
---
|
||||
|
||||
### TDCINIRS232Info
|
||||
Parses the RS232 section.
|
||||
|
||||
**Properties:**
|
||||
- `ComPortNumber` (`int`) — Communication port number
|
||||
- `MaxComSpeed` (`int`) — Maximum speed of COM port
|
||||
- `MaxComPorts` (`int`) — Maximum number of ports
|
||||
|
||||
**Methods:**
|
||||
- `bool ReadFrom(string line, ref List<TDCINIError> errors)` — Parses a comma-delimited line with exactly 3 integer values. Note: No line number parameter.
|
||||
|
||||
---
|
||||
|
||||
### INIIIHSExport
|
||||
Parses the IIHS Export section.
|
||||
|
||||
**Properties:**
|
||||
- `ApplyROI` (`bool`) — Whether to apply region of interest
|
||||
- `ROIStartSeconds` (`double`) — Start of ROI in seconds
|
||||
- `ROIEndSeconds` (`double`) — End of ROI in seconds
|
||||
|
||||
**Methods:**
|
||||
- `bool ReadFrom(string line, int curLine, ref List<TDCINIError> errors)` — Parses a comma-delimited line with exactly 3 values. First token is parsed as boolean (accepts "0"/"F"/"N" for false, "1"/"T"/"Y" for true).
|
||||
|
||||
---
|
||||
|
||||
### INIISOExportParameters
|
||||
Parses the ISO Export section.
|
||||
|
||||
**Properties:**
|
||||
- `AutomaticISOExportOnDownload` (`bool`)
|
||||
- `MMEHeaderTemplateFilename` (`string`)
|
||||
- `PromptUserForMMETemplateFilename` (`bool`)
|
||||
- `ChannelHeaderTemplateFilename` (`string`)
|
||||
- `PromptUserForChannelHeaderFilename` (`bool`)
|
||||
- `FilterOutput` (`FilterOutputOptions`) — Enum with values: `UnFiltered = 0`, `Filtered = 1`, `PromptUser = 2`
|
||||
- `SuppressExportCompletionDialog` (`bool`)
|
||||
- `DummyTemplateFilename` (`string`)
|
||||
- `PromptUserForDummyTemplateFilename` (`bool`)
|
||||
|
||||
**Methods:**
|
||||
- `bool ReadFrom(string line, int curLine, ref List<TDCINIError> errors)` — Parses a comma-delimited line with exactly 9 tokens. Boolean tokens accept "0"/"F"/"N" for false and "1"/"T"/"Y" for true.
|
||||
|
||||
---
|
||||
|
||||
### INIRackInventory
|
||||
Parses the RackInventory section (multi-line).
|
||||
|
||||
**Nested Class: INIRackInfo**
|
||||
- `Number` (`int`)
|
||||
- `SerialNumber` (`string`)
|
||||
- `Size` (`int`)
|
||||
- `IPAddress` (`string`)
|
||||
- `bool ReadFrom(string line, ref List<TDCINIError> errors)` — Parses single rack entry (4 tokens)
|
||||
- `TSFRackDescription ToTSFRackDescription()` — Converts to `TSFRackDescription` object
|
||||
|
||||
**Properties:**
|
||||
- `Racks` (`INIRackInfo[]`) — Array of rack information entries
|
||||
|
||||
**Methods:**
|
||||
- `bool ReadFrom(string[] lines, ref int iCurLine, ref List<TDCINIError> errors)` — Reads multiple lines until a line starting with `"----"` is encountered. Decrements `iCurLine` before returning.
|
||||
|
||||
---
|
||||
|
||||
## 3. Invariants
|
||||
|
||||
- **Number parsing**: All numeric parsing uses `System.Globalization.NumberStyles.Any` with `CultureInfo.InvariantCulture` — INI files must use invariant culture formatting (period as decimal separator).
|
||||
- **Delimiter**: All parsing uses comma (`,`) as the field delimiter via `line.Split(new char[] { ',' })`.
|
||||
- **Token count validation**: Each parser enforces an exact token count; deviation results in failure.
|
||||
- **Error accumulation**: The `errors` list passed by reference accumulates errors; callers must provide a non-null list.
|
||||
- **Boolean encoding**: Boolean fields accept multiple string representations: `"0"`, `"F"`, `"N"` → `false`; `"1"`, `"T"`, `"Y"` → `true`.
|
||||
- **FilterOutputOptions encoding**: Accepts string values `"0"`, `"1"`, `"2"` mapping to respective enum values.
|
||||
- **RackInventory termination**: Multi-line rack inventory must terminate with a line starting with `"----"`.
|
||||
|
||||
---
|
||||
|
||||
## 4. Dependencies
|
||||
|
||||
**This module depends on:**
|
||||
- `System`
|
||||
- `System.Collections.Generic`
|
||||
- `System.Globalization` (via `CultureInfo.InvariantCulture`)
|
||||
- `System.Linq`
|
||||
- `System.Text`
|
||||
- `TDCINIFile` — Static method `GetNextLine` is called in `INIRackInventory.ReadFrom`
|
||||
- `TSFRackDescription` — Referenced in `INIRackInventory.INIRackInfo.ToTSFRackDescription()`
|
||||
|
||||
**What depends on this module:**
|
||||
- Not determinable from source alone; consumers would include any code parsing TDC INI configuration files.
|
||||
|
||||
---
|
||||
|
||||
## 5. Gotchas
|
||||
|
||||
1. **Inconsistent `ReadFrom` signatures**: The method signature varies across classes:
|
||||
- `INIDataZeroTimeWindowSeconds.ReadFrom` takes `(string, ref List<TDCINIError>, int)` — line number is third parameter
|
||||
- `TDCINARS232Info.ReadFrom` takes `(string, ref List<TDCINIError
|
||||
117
docs/ai/DataPRO/SensorDB/TDM.md
Normal file
117
docs/ai/DataPRO/SensorDB/TDM.md
Normal file
@@ -0,0 +1,117 @@
|
||||
---
|
||||
source_files:
|
||||
- DataPRO/SensorDB/TDM/TDMCSVImport.cs
|
||||
generated_at: "2026-04-17T15:59:59.064474+00:00"
|
||||
model: "zai-org/GLM-5-FP8"
|
||||
schema_version: 1
|
||||
sha256: "163b7877035d65a4"
|
||||
---
|
||||
|
||||
# TDMCSVImport Documentation
|
||||
|
||||
## 1. Purpose
|
||||
|
||||
`TDMCSVImport` is a parser that converts TDM (Test Data Management) CSV sensor configuration files into `DTS.SensorDB.SensorData` objects. It handles the mapping between CSV column labels and internal system enums, performs data validation, applies default values for missing/invalid fields, and transforms measurement types, filter settings, and calibration parameters into the system's sensor data model. The class exists to support legacy TDM CSV file formats in the sensor database import workflow.
|
||||
|
||||
---
|
||||
|
||||
## 2. Public Interface
|
||||
|
||||
### Enum: `TDMCSVImport.TAGS`
|
||||
Defines all recognized CSV column identifiers used in TDM sensor import files.
|
||||
|
||||
**Values:**
|
||||
- `SENSOR_CSV_LABEL_SERIAL_NO`, `SENSOR_CSV_LABEL_COMMENT`, `SENSOR_CSV_LABEL_EID`, `SENSOR_CSV_LABEL_CALDATE`, `SENSOR_CSV_LABEL_MANUFACTURER`, `SENSOR_CSV_LABEL_SENSOR_TYPE`, `SENSOR_CSV_LABEL_UNITS`, `SENSOR_CSV_LABEL_CAPACITY_EU`, `SENSOR_CSV_LABEL_MEASUREMENT_TYPE`, `SENSOR_CSV_LABEL_EXCITATION_VOLTS`, `SENSOR_CSV_LABEL_SENSITIVITY`, `SENSOR_CSV_LABEL_SENSITIVITY_UNITS`, `SENSOR_CSV_LABEL_INVERT`, `SENSOR_CSV_LABEL_USE_SHUNT_CAL`, `SENSOR_CSV_LABEL_BRIDGE_RESISTANCE_OHMS`, `SENSOR_CSV_LABEL_ZMO_MV`, `SENSOR_CSV_LABEL_ZMO_UPDATE_MV`, `SENSOR_CSV_LABEL_ZMO_TOLERANCE_MV`, `SENSOR_CSV_LABEL_REMOVE_ZMO_OFFSET`, `SENSOR_CSV_LABEL_TEST_DEVICE`, `SENSOR_CSV_LABEL_TEST_DEVICE_TYPE`, `SENSOR_CSV_LABEL_CODE`, `SENSOR_CSV_LABEL_JCODE`, `SENSOR_CSV_LABEL_FILTER_TYPE`, `SENSOR_CSV_LABEL_FILTER_FREQUENCY`, `SENSOR_CSV_LABEL_RANGE_0`, `SENSOR_CSV_LABEL_RANGE_1`, `SENSOR_CSV_LABEL_RANGE_2`, `SENSOR_CSV_LABEL_RANGE_3`, `SENSOR_CSV_LABEL_TOYOTA_CALC_1`, `SENSOR_CSV_LABEL_TOYOTA_CALC_2`, `SENSOR_CSV_LABEL_TOYOTA_CALC_3`, `SENSOR_CSV_LABEL_ZERO_METHOD`, `SENSOR_CSV_LABEL_ZERO_INITIAL_EU`, `SENSOR_CSV_LABEL_ZERO_TIME_START_MSEC`, `SENSOR_CSV_LABEL_ZERO_TIME_END_MSEC`, `SENSOR_CSV_LABEL_FLAGS`, `UNKNOWN`
|
||||
|
||||
---
|
||||
|
||||
### Method: `LabelToTag`
|
||||
```csharp
|
||||
public static TAGS LabelToTag(string label)
|
||||
```
|
||||
Converts a CSV column header string to its corresponding `TAGS` enum value. Throws `NotSupportedException` for unrecognized labels.
|
||||
|
||||
---
|
||||
|
||||
### Method: `GetSensor`
|
||||
```csharp
|
||||
public static DTS.SensorDB.SensorData GetSensor(
|
||||
string[] tokens,
|
||||
TAGS[] tagOrder,
|
||||
ref List<string> errors,
|
||||
Dictionary<string, string> sensorTypeToDimension)
|
||||
```
|
||||
Parses a single CSV row into a `SensorData` object.
|
||||
|
||||
**Parameters:**
|
||||
- `tokens` - Array of string values from a single CSV row
|
||||
- `tagOrder` - Array of `TAGS` indicating which column each token corresponds to (must be parallel to `tokens`)
|
||||
- `errors` - Reference to a list that will collect parsing error/warning messages
|
||||
- `sensorTypeToDimension` - Dictionary mapping sensor type strings to physical dimension strings
|
||||
|
||||
**Returns:** A populated `SensorData` object with `Calibration` initialized.
|
||||
|
||||
**Behavior:**
|
||||
- Iterates through tokens in parallel with `tagOrder`
|
||||
- Strips leading `=` and surrounding `"` characters from token values
|
||||
- Parses each field according to its tag type
|
||||
- Applies default values for missing/invalid capacity (defaults to 1) and units (defaults to "g")
|
||||
- Sets `UUID` to the serial number value
|
||||
|
||||
---
|
||||
|
||||
## 3. Invariants
|
||||
|
||||
1. **Parallel Array Assumption**: `tokens` and `tagOrder` arrays must have corresponding indices; iteration stops at the shorter length (`i < tokens.Length && i < tagOrder.Length`).
|
||||
|
||||
2. **Invariant Culture Parsing**: All numeric parsing uses `CultureInfo.InvariantCulture` except for `SENSOR_CSV_LABEL_SENSITIVITY` which uses current culture.
|
||||
|
||||
3. **Calibration Initialization**: The returned `SensorData` always has `sd.Calibration` initialized to a new `SensorCalibration` instance.
|
||||
|
||||
4. **UUID Assignment**: `sd.UUID` is always set equal to `sd.SerialNumber` at the end of parsing.
|
||||
|
||||
5. **Minimum Capacity**: If `Capacity < 1`, it is forced to `1` with an error message added.
|
||||
|
||||
6. **Default Display Unit**: If `DisplayUnit` is null or whitespace, it defaults to `"g"` with an error message added.
|
||||
|
||||
7. **Excitation Voltage Default**: An excitation voltage of `0` is treated as `5.0` (for "Voltage Insertion" mode).
|
||||
|
||||
---
|
||||
|
||||
## 4. Dependencies
|
||||
|
||||
### This Module Depends On:
|
||||
- `DTS.Common.Classes.Sensors` - Provides `SensorConstants`
|
||||
- `DTS.Common.DAS.Concepts` - Provides `ExcitationVoltageOptions`, `FilterClass`, `FilterClassType`, `NonLinearStyles`, `InitialOffsets`, `InitialOffset`
|
||||
- `DTS.Common.Enums` - Provides `ShuntMode`
|
||||
- `DTS.Common.Enums.Sensors` - Provides `ZeroMethodType`
|
||||
- `DTS.SensorDB` - Provides `SensorData`, `SensorCalibration`
|
||||
- `System.Data.SqlTypes` - Used for `SqlDateTime.MinValue` as fallback date
|
||||
|
||||
### What Depends On This Module:
|
||||
- **Unclear from source alone** - No direct consumers are visible in this file.
|
||||
|
||||
---
|
||||
|
||||
## 5. Gotchas
|
||||
|
||||
1. **Misleading Class Name/Comment**: The class is named `TDMCSVImport` but the XML doc comment states it "handles logic of TDM CSV export" — this appears to be a documentation error.
|
||||
|
||||
2. **FIR100 Filter Not Supported**: `FILTERTYPE_FIR100` is converted to `FilterClassType.CFC180` with an error message added; the comment notes "FIR100 not supported by SLICE code currently?"
|
||||
|
||||
3. **Unused Fields**: Several fields are parsed but not utilized:
|
||||
- `SENSOR_CSV_LABEL_ZMO_MV` - Parsed but no action taken
|
||||
- `SENSOR_CSV_LABEL_ZMO_UPDATE_MV` - Parsed but no action taken
|
||||
- `SENSOR_CSV_LABEL_TEST_DEVICE` - Marked "not currently used"
|
||||
- `SENSOR_CSV_LABEL_TEST_DEVICE_TYPE` - Marked "not currently used"
|
||||
- `SENSOR_CSV_LABEL_RANGE_3` - Case body is commented out entirely
|
||||
|
||||
4. **Inconsistent Date Parsing**: Dates with `/` separator expect `MM/DD/YYYY` format, while dates with `-` separator expect `YYYY-MM-DD` format. Double-slash `//` is replaced with single `/`.
|
||||
|
||||
5. **Sensitivity Parsing Inconsistency**: `SENSOR_CSV_LABEL_SENSITIVITY` uses `double.TryParse(sItem.Trim(), out d)` without specifying `NumberStyles` or `CultureInfo`, unlike all other numeric fields which use `InvariantCulture`.
|
||||
|
||||
6. **Quarter Bridge Not Supported**: The XML comment notes "the existing TDM code doesn't appear to consider 1/4 bridge."
|
||||
|
||||
7. **Toyota Calc Values**: `calc1`, `calc2`, `calc3` are concatenated into `UserValue3` using the invariant culture's list separator, but the purpose is unclear from this file alone.
|
||||
|
||||
8. **IRTRACC Special Handling**: `MEASTYPE_IRTRACC` triggers special calibration setup including `NonLinear = true` and specific polynomial coefficients (`LinearizationExponent = -75D / 175D`, `MMPerV = 1000D / dSensitivity`), and sets sensitivity to 0.
|
||||
261
docs/ai/DataPRO/SensorDB/TSF.md
Normal file
261
docs/ai/DataPRO/SensorDB/TSF.md
Normal file
@@ -0,0 +1,261 @@
|
||||
---
|
||||
source_files:
|
||||
- DataPRO/SensorDB/TSF/TSFChannel.cs
|
||||
- DataPRO/SensorDB/TSF/G5DigitalInputChannelTSFEntry.cs
|
||||
- DataPRO/SensorDB/TSF/TSFCalculatedChannelEntry.cs
|
||||
- DataPRO/SensorDB/TSF/TSFTCFSection.cs
|
||||
- DataPRO/SensorDB/TSF/TSFSquibFireEntry.cs
|
||||
- DataPRO/SensorDB/TSF/TSFDigitalChannel.cs
|
||||
- DataPRO/SensorDB/TSF/TSFDIMEntry.cs
|
||||
- DataPRO/SensorDB/TSF/TSFSensorEntry.cs
|
||||
- DataPRO/SensorDB/TSF/TSFCalibrationInformation.cs
|
||||
- DataPRO/SensorDB/TSF/TSFSamplingInformationSection.cs
|
||||
- DataPRO/SensorDB/TSF/TSFModuleDescription.cs
|
||||
- DataPRO/SensorDB/TSF/TSFOutputChannelDescription.cs
|
||||
- DataPRO/SensorDB/TSF/TSFInputChannelDescription.cs
|
||||
- DataPRO/SensorDB/TSF/TSFRackInformationSection.cs
|
||||
- DataPRO/SensorDB/TSF/TSFSystemDescription.cs
|
||||
- DataPRO/SensorDB/TSF/TSFModuleInformationSection.cs
|
||||
generated_at: "2026-04-17T15:45:32.064653+00:00"
|
||||
model: "zai-org/GLM-5-FP8"
|
||||
schema_version: 1
|
||||
sha256: "183a641a3ddd29ec"
|
||||
---
|
||||
|
||||
# TSF Module Documentation
|
||||
|
||||
## 1. Purpose
|
||||
|
||||
This module provides data structures and parsing logic for Test Setup Files (TSF) used in the DTS SensorDB/DataPRO data acquisition system. It defines channel entry types for various hardware configurations (analog sensors, digital I/O, squib fire channels, calculated channels), section parsers for TSF file structure (sampling information, rack/module information, TCF sections), and hardware description classes for system configuration. The TSF format serves as a configuration file format for data acquisition hardware including SIMs (Sensor Input Modules), TOMs (Trigger/Output Modules), and G5 modules.
|
||||
|
||||
---
|
||||
|
||||
## 2. Public Interface
|
||||
|
||||
### TSFChannel (abstract class)
|
||||
Base class providing a unified indexing mechanism for all channel types.
|
||||
|
||||
| Member | Signature | Description |
|
||||
|--------|-----------|-------------|
|
||||
| `NOT_ASSIGNED` | `const int = -1` | Constant indicating an unassigned channel number |
|
||||
| `TestChannelNumber` | `int { get; set; }` | Unified channel index for all channel types, defaults to `NOT_ASSIGNED` |
|
||||
|
||||
---
|
||||
|
||||
### G5DigtalInputChannelTSFEntry : TSFChannel
|
||||
Represents an entry in the G5 Digital Input Channels section.
|
||||
|
||||
| Member | Signature | Description |
|
||||
|--------|-----------|-------------|
|
||||
| `DataChan` | `int { get; set; }` | Data channel number |
|
||||
| `Rack` | `int { get; set; }` | Rack identifier |
|
||||
| `Module` | `int { get; set; }` | Module identifier |
|
||||
| `Chan` | `int { get; set; }` | Channel number |
|
||||
| `Descripton` | `string { get; set; }` | Channel description (note: typo in property name) |
|
||||
| `ISOCode` | `string { get; set; }` | ISO code identifier |
|
||||
| `Scale` | `double { get; set; }` | Scaling factor |
|
||||
| `Invert` | `bool { get; set; }` | Inversion flag |
|
||||
| `Fields` | `enum` | Enum values: `datachan, rack, mod, chan, descrip, ISOCode, scale, invert` |
|
||||
|
||||
---
|
||||
|
||||
### TSFCalculatedChannelEntry : TSFChannel
|
||||
Represents a calculated channel section entry.
|
||||
|
||||
| Member | Signature | Description |
|
||||
|--------|-----------|-------------|
|
||||
| `Chan` | `int { get; set; }` | Channel number |
|
||||
| `Description` | `string { get; set; }` | Channel description |
|
||||
| `ProcessType` | `int { get; set; }` | Processing type identifier |
|
||||
| `FirstChan`, `SecondChan`, `ThirdChan` | `int { get; set; }` | Source channel references |
|
||||
| `Value` | `double { get; set; }` | Constant value |
|
||||
| `EU` | `string { get; set; }` | Engineering units label |
|
||||
| `ExpMaxRange` | `double { get; set; }` | Expected maximum range |
|
||||
| `Progress2`, `Progress3` | `double { get; set; }` | Progress values |
|
||||
| `Fields` | `enum` | Enum values: `chan, descrip, processtype, firstchan, secondchan, thirdchan, value, EU, expmaxrange, progress2, progress3` |
|
||||
|
||||
---
|
||||
|
||||
### TSFTCFSection
|
||||
Handles the TCF (Test Configuration File) section of a TSF.
|
||||
|
||||
| Member | Signature | Description |
|
||||
|--------|-----------|-------------|
|
||||
| `TCFPath` | `string { get; set; }` | Path to the TCF file |
|
||||
| `ReadFrom` | `void ReadFrom(List<string> lines, ref int currentLine, ref List<ReadTSFError> errors)` | Parses the TCF section from TSF lines; expects `currentLine` to point to section start |
|
||||
|
||||
---
|
||||
|
||||
### TSFSquibFireEntry : TSFChannel
|
||||
Represents an entry in the TOM Squib Fire Channels section.
|
||||
|
||||
| Member | Signature | Description |
|
||||
|--------|-----------|-------------|
|
||||
| `Rack`, `Module`, `Chan` | `int { get; set; }` | Hardware location identifiers |
|
||||
| `Description` | `string { get; set; }` | Channel description |
|
||||
| `Id` | `string { get; set; }` | Identifier; setter converts "none" (case-insensitive) to empty string |
|
||||
| `Type` | `int { get; set; }` | Squib type identifier |
|
||||
| `Current` | `double { get; set; }` | Current value |
|
||||
| `Delay` | `double { get; set; }` | Delay time |
|
||||
| `DurationOn` | `bool { get; set; }` | Duration enabled flag |
|
||||
| `Duration` | `double { get; set; }` | Duration value |
|
||||
| `OhmLow`, `OhmHigh` | `double { get; set; }` | Resistance tolerance range |
|
||||
| `ISOcode` | `string { get; set; }` | ISO code identifier |
|
||||
| `Fields` | `enum` | Enum values: `rack, module, chan, descrip, id, type, current, delay, durationON, duration, OhmLow, OhmHigh, ISOcode` |
|
||||
|
||||
---
|
||||
|
||||
### TSFTOMDigitalOutputChannel : TSFChannel
|
||||
Represents an entry in the TOM Digital Channels (output) section.
|
||||
|
||||
| Member | Signature | Description |
|
||||
|--------|-----------|-------------|
|
||||
| `Rack`, `Module`, `Chan` | `int { get; set; }` | Hardware location identifiers |
|
||||
| `Type` | `DigitalOutputTypes { get; set; }` | Output type; defaults to `NONE` |
|
||||
| `Delay` | `double { get; set; }` | Delay time |
|
||||
| `DurationOn` | `bool { get; set; }` | Duration enabled flag |
|
||||
| `Duration` | `double { get; set; }` | Duration value |
|
||||
| `Description` | `string { get; set; }` | Channel description; defaults to "N/A" |
|
||||
| `DigitalOutputTypes` | `enum` | Values: `NONE = 0, FiveVLH = 1, FiveVHL = 2, CCNO = 3, CCNC = 4` |
|
||||
| `GetDigitalOutputMode` | `static DigitalOutputModes GetDigitalOutputMode(DigitalOutputTypes outputType)` | Converts `DigitalOutputTypes` to `DigitalOutputModes` enum |
|
||||
| `Fields` | `enum` | Enum values: `rack, module, chan, type, delay, durationON, duration` |
|
||||
|
||||
---
|
||||
|
||||
### TSFDIMEntry : TSFChannel
|
||||
Represents an entry in the DIM (Digital Input Module) Begin section.
|
||||
|
||||
| Member | Signature | Description |
|
||||
|--------|-----------|-------------|
|
||||
| `DataChan` | `int { get; set; }` | Data channel number |
|
||||
| `Rack`, `Module`, `Chan` | `int { get; set; }` | Hardware location identifiers |
|
||||
| `Description` | `string { get; set; }` | Channel description |
|
||||
| `SerialNumber` | `string { get; set; }` | Serial number |
|
||||
| `Mode` | `string { get; set; }` | Mode setting |
|
||||
| `Inverted` | `int { get; set; }` | Inversion flag (integer) |
|
||||
| `EID` | `string { get; set; }` | Event identifier |
|
||||
| `FileName` | `string { get; set; }` | Associated filename |
|
||||
| `Scale` | `double { get; set; }` | Scaling factor |
|
||||
| `FilterMode` | `int { get; set; }` | Filter mode setting |
|
||||
| `FilterThreshold` | `double { get; set; }` | Filter threshold value |
|
||||
| `ISOCode` | `string { get; set; }` | ISO code identifier |
|
||||
| `CableTest` | `int { get; set; }` | Cable test setting |
|
||||
| `Fields` | `enum` | Enum values: `Datachan, Rack, Module, Chan, Description, SerialNo, Mode, Inverted, EID, Filename, Scale, FilterMode, FilterThreshold, ISOCODE, CableTest` |
|
||||
|
||||
---
|
||||
|
||||
### TSFSensorEntry : TSFChannel
|
||||
Represents an entry in the Sensor Channel Information section (analog sensor channels).
|
||||
|
||||
| Member | Signature | Description |
|
||||
|--------|-----------|-------------|
|
||||
| `DataChan`, `Rack`, `Module`, `Chan` | `int { get; set; }` | Hardware location identifiers |
|
||||
| `Description` | `string { get; set; }` | Channel description |
|
||||
| `SerialNumber` | `string { get; set; }` | Sensor serial number |
|
||||
| `OffsetLow`, `OffsetHigh` | `double { get; set; }` | Offset range values |
|
||||
| `RemoveOffset` | `bool { get; set; }` | Offset removal flag; defaults to `true` |
|
||||
| `CalMode` | `CalMode { get; set; }` | Calibration mode object |
|
||||
| `CalStep`, `ShuntValue` | `double { get; set; }` | Calibration parameters |
|
||||
| `ProportionalToExcitation` | `bool { get; set; }` | Excitation proportionality flag |
|
||||
| `Sensitivity`, `Gain`, `ExtVolt` | `double { get; set; }` | Signal conditioning parameters |
|
||||
| `EU` | `string { get; set; }` | Engineering units label |
|
||||
| `Filter` | `double { get; set; }` | Filter setting |
|
||||
| `Invert` | `bool { get; set; }` | Inversion flag |
|
||||
| `ZeroRef` | `ZeroRef { get; set; }` | Zero reference configuration |
|
||||
| `DesiredMaxRange` | `double { get; set; }` | Desired maximum range |
|
||||
| `CommentField` | `string { get; set; }` | Comment text |
|
||||
| `CalDate` | `DateTime { get; set; }` | Calibration date |
|
||||
| `Offset` | `bool { get; set; }` | Offset flag |
|
||||
| `InitialEU` | `double { get; set; }` | Initial engineering units value |
|
||||
| `SensorId` | `string { get; set; }` | Sensor identifier; setter converts "none" to empty string |
|
||||
| `ISOCode` | `string { get; set; }` | ISO code identifier |
|
||||
| `IRTRACCexponent` | `double { get; set; }` | IRTRACC exponent value |
|
||||
| `SensorCategory` | `SensorInformationFile.TDCSensorCategory { get; set; }` | Sensor category; defaults to `Normal` |
|
||||
| `DesiredMaxRangeScaling` | `double { get; set; }` | Max range scaling factor |
|
||||
| `C0` through `C6` | `double { get; set; }` | Polynomial coefficients |
|
||||
| `Fields` | `enum` | Enum with 32 field identifiers for TSF parsing |
|
||||
|
||||
---
|
||||
|
||||
### TSFCalibrationInformation
|
||||
Handles calibration information for a channel.
|
||||
|
||||
| Member | Signature | Description |
|
||||
|--------|-----------|-------------|
|
||||
| `Version` | `int { get; set; }` | Version number |
|
||||
| `Parent` | `TSFChannelDescription { get; set; }` | Parent channel reference |
|
||||
| `Source` | `int { get; set; }` | Source identifier |
|
||||
| `CRC32` | `ulong { get; set; }` | CRC32 checksum |
|
||||
| `CalibrationValid`, `CalPass` | `bool { get; set; }` | Calibration validity flags |
|
||||
| `CalGainErrorPercent`, `CalShuntErrorPercent` | `double { get; set; }` | Error percentages |
|
||||
| `CalMeasuredScaleFactorMV` | `double { get; set; }` | Measured scale factor in mV |
|
||||
| `CalExcitationVolts` | `double { get; set; }` | Excitation voltage |
|
||||
| `CalChannelOffsetADC`, `CalChannelZeroADC` | `int { get; set; }` | ADC offset values |
|
||||
| `CalNaturalSensorOffsetMV` | `double { get; set; }` | Natural sensor offset in mV |
|
||||
| `CalNaturalFloorADC` | `int { get; set; }` | Natural floor ADC value |
|
||||
| `CalInputRangeMV` | `double { get; set; }` | Input range in mV |
|
||||
| `CalNoiseFloorADC`, `CalNoiseAtRangeADC` | `double { get; set; }` | Noise measurements |
|
||||
| `TSFCalibrationInformation()` | Constructor | Default constructor |
|
||||
| `TSFCalibrationInformation(TSFCalibrationInformation copy, TSFChannelDescription channel)` | Constructor | Copy constructor with new parent reference |
|
||||
|
||||
---
|
||||
|
||||
### TSFSamplingInformationSection
|
||||
Handles the sampling information section of a TSF.
|
||||
|
||||
| Member | Signature | Description |
|
||||
|--------|-----------|-------------|
|
||||
| `SampleRateHz` | `double { get; set; }` | Sample rate in Hz |
|
||||
| `PreTriggerSeconds` | `double { get; set; }` | Pre-trigger time in seconds (always positive) |
|
||||
| `PostTriggerSeconds` | `double { get; set; }` | Post-trigger time in seconds (always positive) |
|
||||
| `AAF` | `double { get; set; }` | Adjustable anti-aliasing filter frequency in Hz |
|
||||
| `PostCalTimeSeconds` | `double { get; set; }` | Post-calibration time in seconds |
|
||||
| `TSFSamplingInformationSection(List<string> lines, ref int currentLine)` | Constructor | Parses sampling section from TSF lines; throws `EndOfStreamException` or `InvalidDataException` on errors |
|
||||
|
||||
---
|
||||
|
||||
### TSFModuleDescription
|
||||
Describes a hardware module (derived from HLAPI).
|
||||
|
||||
| Member | Signature | Description |
|
||||
|--------|-----------|-------------|
|
||||
| `Version` | `int { get; set; }` | Version number |
|
||||
| `Type` | `int { get; set; }` | Module type (see HLAPI_MODULE_TYPE_) |
|
||||
| `Parent` | `TSFRackDescription { get; set; }` | Parent rack reference |
|
||||
| `Source` | `int { get; set; }` | Source identifier |
|
||||
| `Slot` | `int { get; set; }` | Slot position |
|
||||
| `CRC32` | `ulong { get; set; }` | CRC32 checksum |
|
||||
| `HardwareInfoValid` | `bool { get; set; }` | Hardware info validity flag |
|
||||
| `HWSerialNumber` | `string { get; set; }` | Hardware serial number |
|
||||
| `HWTOMTriggerType` | `int { get; set; }` | TOM trigger type (see HLAPI_MODULE_TOM_TRIGGER_) |
|
||||
| `HWRackPosition` | `int { get; set; }` | Rack position |
|
||||
| `HWChannelCount` | `int { get; set; }` | Number of channels |
|
||||
| `HWChannelList` | `TSFChannelDescription[] { get; set; }` | Array of channel descriptions |
|
||||
| `DownloadDescriptionValid`, `DownloadTriggerDetected` | `bool { get; set; }` | Download status flags |
|
||||
| `DownloadDataFlag` | `char { get; set; }` | Download data flag |
|
||||
| `DownloadBeginSeconds`, `DownloadEndSeconds` | `double { get; set; }` | Download time range |
|
||||
| `ModuleBatteryVolts` | `double { get; set; }` | Battery voltage |
|
||||
| `TSFModuleDescription()` | Constructor | Default constructor |
|
||||
| `TSFModuleDescription(TSFModuleDescription copy, TSFRackDescription rack)` | Constructor | Copy constructor with new parent reference |
|
||||
|
||||
---
|
||||
|
||||
### TSFOutputChannelDescription
|
||||
Describes an output channel (derived from HLAPI).
|
||||
|
||||
| Member | Signature | Description |
|
||||
|--------|-----------|-------------|
|
||||
| `Version`, `Source` | `int { get; set; }` | Version and source identifiers |
|
||||
| `Parent` | `TSFChannelDescription { get; set; }` | Parent channel reference |
|
||||
| `CRC32` | `ulong { get; set; }` | CRC32 checksum |
|
||||
| `SquibInfoValid` | `bool { get; set; }` | Squib info validity flag |
|
||||
| `SquibFireMode` | `char { get; set; }` | Fire mode (see HLAPI_OUTPUT_FIRE_MODE) |
|
||||
| `SquibMeasurementType` | `char { get; set; }` | Measurement type (see HLAPI_OUTPUT_MEASUREMENT_TYPE) |
|
||||
| `SquibBypassCurrentFilter`, `SquibBypassVoltageFilter` | `bool { get; set; }` | Filter bypass flags |
|
||||
| `SquibToleranceLow`, `SquibToleranceHigh` | `double { get; set; }` | Tolerance range |
|
||||
| `SquibOutputCurrent` | `double { get; set; }` | Output current |
|
||||
| `DigitalInfoValid` | `bool { get; set; }` | Digital info validity flag |
|
||||
| `DigitalOutputMode` | `char { get; set; }` | Digital output mode (see HLAPI_OUTPUT_DIGITAL_MODE) |
|
||||
| `SquibMeasurementValid` | `bool { get; set; }` | Measurement validity flag |
|
||||
| `SquibMeasuredOhms` | `double { get; set; }` | Measured resistance |
|
||||
| `SquibFireValid`, `Squib
|
||||
Reference in New Issue
Block a user