--- source_files: - Common/DTS.Common.DAS.Concepts/Test/Module/Channel/Sensor/SensorUnits.cs - Common/DTS.Common.DAS.Concepts/Test/Module/Channel/Sensor/ExcitationVoltage.cs generated_at: "2026-04-17T15:40:36.715938+00:00" model: "zai-org/GLM-5-FP8" schema_version: 1 sha256: "383041d9dd8bd8c1" --- # Documentation: Test.Module.Channel.Sensor (SensorUnits & ExcitationVoltage) ## 1. Purpose This module defines sensor-related enumerations and conversion utilities within the `DTS.Common.DAS.Concepts` namespace. It provides the `SensUnits` enumeration for specifying sensitivity unit types (e.g., mV, mV/V, mV/V/EU) used in sensor configurations, and offers static helper methods for converting between `ExcitationVoltageOptions.ExcitationVoltageOption` enum values and their associated numeric voltage magnitudes. This is part of a larger partial class hierarchy modeling test module channel configurations. --- ## 2. Public Interface ### Enum: `Test.Module.Channel.Sensor.SensUnits` Defined in `SensorUnits.cs`: | Member | Value | Description Attribute | Purpose | |--------|-------|----------------------|---------| | `NONE` | 0 | "NONE" | No Sensitivity Units (Polynomial Sensor) | | `mV` | 1 | "mV" | Sensitivity expressed in mV with output at Capacity EU | | `mVperV` | 2 | "mV/V" | Excitation proportional sensitivity expressed in mV/V with output at Capacity EU | | `mVperVperEU` | 3 | "mV/V/EU" | Excitation proportional sensitivity expressed in mV/V/EU | | `mVperEU` | 4 | "mV/EU" | Sensitivity expressed in mV/EU | --- ### Static Methods (defined in `ExcitationVoltage.cs`) #### `GetExcitationVoltageMagnitudeFromEnum` ```csharp public static double GetExcitationVoltageMagnitudeFromEnum( ExcitationVoltageOptions.ExcitationVoltageOption target) ``` Converts an `ExcitationVoltageOptions.ExcitationVoltageOption` enum value to its associated numeric voltage magnitude (in volts). Uses `ExcitationVoltageOptions.VoltageMagnitudeAttributeCoder.DecodeAttributeValue()` internally. **Returns:** The `double` magnitude associated with the specified voltage option. **Throws:** `ArgumentException` with message "encountered problem attempting to get excitation voltage magnitude from enum" if decoding fails. --- #### `GetExcitationVoltageEnumFromMagnitude` ```csharp public static ExcitationVoltageOptions.ExcitationVoltageOption GetExcitationVoltageEnumFromMagnitude( double magnitude) ``` Converts a numeric voltage magnitude to the corresponding `ExcitationVoltageOptions.ExcitationVoltageOption