7.1 KiB
source_files, generated_at, model, schema_version, sha256
| source_files | generated_at | model | schema_version | sha256 | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
2026-04-17T15:48:03.697947+00:00 | zai-org/GLM-5-FP8 | 1 | 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 valueLine(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 includingINI_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 windowEnd(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. Returnstrueon success,falseon failure.
INISmartBatteryThresholds
Parses the SmartBatteryThreshold section.
Properties:
Yellow(int) — Time in minutes for yellow battery warningRed(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 valueXMax(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 T0EndSeconds(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 numberMaxComSpeed(int) — Maximum speed of COM portMaxComPorts(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 interestROIStartSeconds(double) — Start of ROI in secondsROIEndSeconds(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 = 2SuppressExportCompletionDialog(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 toTSFRackDescriptionobject
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. DecrementsiCurLinebefore returning.
3. Invariants
- Number parsing: All numeric parsing uses
System.Globalization.NumberStyles.AnywithCultureInfo.InvariantCulture— INI files must use invariant culture formatting (period as decimal separator). - Delimiter: All parsing uses comma (
,) as the field delimiter vialine.Split(new char[] { ',' }). - Token count validation: Each parser enforces an exact token count; deviation results in failure.
- Error accumulation: The
errorslist 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:
SystemSystem.Collections.GenericSystem.Globalization(viaCultureInfo.InvariantCulture)System.LinqSystem.TextTDCINIFile— Static methodGetNextLineis called inINIRackInventory.ReadFromTSFRackDescription— Referenced inINIRackInventory.INIRackInfo.ToTSFRackDescription()
What depends on this module:
- Not determinable from source alone; consumers would include any code parsing TDC INI configuration files.
5. Gotchas
- Inconsistent
ReadFromsignatures: The method signature varies across classes:INIDataZeroTimeWindowSeconds.ReadFromtakes(string, ref List<TDCINIError>, int)— line number is third parameterTDCINARS232Info.ReadFromtakes `(string, ref List<TDCINIError