--- source_files: - DataPRO/Modules/DatabaseImporter/DatabaseImport/DASConcepts/Test.Module.Channel.Sensor.SensorUnits.cs - DataPRO/Modules/DatabaseImporter/DatabaseImport/DASConcepts/Test.Module.Channel.Sensor.Bridge.cs - DataPRO/Modules/DatabaseImporter/DatabaseImport/DASConcepts/DigitalInputScaleMultiplier.cs - DataPRO/Modules/DatabaseImporter/DatabaseImport/DASConcepts/LinearizationFormula.cs generated_at: "2026-04-16T04:29:46.893362+00:00" model: "Qwen/Qwen3-Coder-Next-FP8" schema_version: 1 sha256: "50ada406a17a3727" --- # Documentation: Sensor & Linearization Concepts Module ## 1. Purpose This module defines core data structures and enumerations used to represent sensor configuration and signal linearization behavior within the DatabaseImporter subsystem of the DTS DataPRO system. It provides strongly-typed representations of sensor sensitivity units (`SensUnits`), bridge configurations (`BridgeType`), digital input scaling (`DigitalInputScaleMultiplier`), and various linearization formulae (`LinearizationFormula`)—all derived from legacy database serialization formats. These constructs enable consistent interpretation and persistence of sensor metadata during database import operations, bridging historical DTS-specific formats with modern .NET type safety. ## 2. Public Interface ### `Test.Module.Channel.Sensor.SensUnits` (enum) - **Definition**: `public enum SensUnits` - **Values**: - `NONE = 0` → Polynomial sensor with no sensitivity units. - `mV = 1` → Sensitivity in millivolts at full-scale (Capacity EU). - `mVperV = 2` → Excitation-proportional sensitivity in mV/V at full-scale. - `mVperVperEU = 3` → Excitation-proportional sensitivity per engineering unit (mV/V/EU). - `mVperEU = 4` → Sensitivity in mV per engineering unit. - **Behavior**: Encodes the unit type for sensor sensitivity; used to interpret sensitivity values in configuration. ### `Test.Module.Channel.Sensor.BridgeType` (enum) - **Definition**: `public enum BridgeType` - **Values** (bitmask flags): - `IEPE = 1 << 0` → IEPE (Integrated Electronics Piezo Electric) sensor setup. - `QuarterBridge = 1 << 1` → Quarter-bridge configuration. - `HalfBridge = 1 << 2` → Half-bridge configuration. - `FullBridge = 1 << 3` → Full-bridge configuration. - `DigitalInput = 1 << 4` → Digital input mode. - `SQUIB = 1 << 5` → Squib (pyrotechnic) output setup. - `TOMDigital = 1 << 6` → TOM (Test Output Module) digital output. - `HalfBridge_SigPlus = 1 << 7` → G5 half-bridge with signal-plus wiring. - **Behavior**: Represents physical bridge/wiring topology; supports bitwise combinations. ### `DigitalInputScaleMultiplier` (class) - **Definition**: `public class DigitalInputScaleMultiplier` - **Properties**: - `Form`: `Forms` enum; currently only `ArbitraryLowAndHigh` supported. - `DefaultValue`: `double`; value displayed when digital input = 0 (OFF). - `ActiveValue`: `double`; value displayed when digital input = 1 (ON); defaults to `1.0`. - **Constructors**: - `DigitalInputScaleMultiplier()` → Initializes `DefaultValue = 0.0`. - `DigitalInputScaleMultiplier(DigitalInputScaleMultiplier copy)` → Copy constructor. - **Methods**: - `void FromDbSerializeString(string s)` → Parses serialized string (e.g., `"ArbitraryLowAndHigh,0.0,5.0"`) into object state. - Throws `NotSupportedException` on malformed input or unsupported format. - Uses `InvariantCulture` for numeric parsing. ### `LinearizationFormula` (class) - **Definition**: `public class LinearizationFormula` - **Properties**: - `NonLinearStyle`: `NonLinearStyles` (not defined in provided files; inferred from usage). - `PolynomialSensitivity`: `double`; sensitivity for polynomial models. - `LinearizationExponent`: `double`; exponent in power-law models. - `MMPerV`: `double`; millimeters per volt (note: comment indicates variable name is inaccurate). - `MVAt0MM`: `double`; millivolts at zero millimeters. - `Slope`, `Intercept`: `double`; linear model parameters. - `CalibrationFactor`: `double`; calibration coefficient. - `ZeroPositionIntercept`: `double`; intercept at zero position. - `UsemVOverVForPolys`: `bool`; flag for polynomial unit preference (default `true`). - **Constructors**: - `LinearizationFormula()` → Initializes default state (e.g., `_coefficients = [0,0,0,0]`, `_exponents = [0,1,2,3]`). - `LinearizationFormula(LinearizationFormula copy)` → Copy constructor. - **Methods**: - `void MarkValid(bool bValid)` → Sets internal `_bIsValid` flag (no getter exposed). - `void FromSerializeString(string s, CultureInfo culture)` → Parses serialized format: `