init
This commit is contained in:
@@ -0,0 +1,80 @@
|
||||
---
|
||||
source_files:
|
||||
- Common/DTS.CommonCore/Enums/Sensors/SensorsList/DigitalInputFields.cs
|
||||
- Common/DTS.CommonCore/Enums/Sensors/SensorsList/DigitalOutFields.cs
|
||||
- Common/DTS.CommonCore/Enums/Sensors/SensorsList/SensorListTabs.cs
|
||||
- Common/DTS.CommonCore/Enums/Sensors/SensorsList/UartSettingFields.cs
|
||||
- Common/DTS.CommonCore/Enums/Sensors/SensorsList/SquibFields.cs
|
||||
- Common/DTS.CommonCore/Enums/Sensors/SensorsList/StreamInSettingFields.cs
|
||||
- Common/DTS.CommonCore/Enums/Sensors/SensorsList/StreamOutSettingFields.cs
|
||||
- Common/DTS.CommonCore/Enums/Sensors/SensorsList/CACOption.cs
|
||||
- Common/DTS.CommonCore/Enums/Sensors/SensorsList/AnalogSensorFields.cs
|
||||
generated_at: "2026-04-16T02:45:01.449243+00:00"
|
||||
model: "Qwen/Qwen3-Coder-Next-FP8"
|
||||
schema_version: 1
|
||||
sha256: "ee886777e1e8fa53"
|
||||
---
|
||||
|
||||
# SensorsList
|
||||
|
||||
## Documentation: Sensor Field Enumerations
|
||||
|
||||
---
|
||||
|
||||
### 1. Purpose
|
||||
|
||||
This module defines a set of strongly-typed enumerations that specify the *editable or displayable fields* for various sensor configuration types within the system (e.g., analog sensors, digital inputs/outputs, squibs, UART, stream in/out). Each enum lists the valid field identifiers that can be used for operations such as UI binding, data serialization/deserialization, or field-level validation—ensuring consistency across components that interact with sensor metadata. These enums do not contain logic or behavior themselves; they serve as *metadata contracts* for structured sensor data.
|
||||
|
||||
---
|
||||
|
||||
### 2. Public Interface
|
||||
|
||||
All types are `public enum`s under the namespace `DTS.Common.Enums.Sensors.SensorsList`. No classes, methods, or properties are exposed.
|
||||
|
||||
| Enum Name | Fields (in order declared) | Notes |
|
||||
|-----------|----------------------------|-------|
|
||||
| `DigitalInputFields` | `Included`, `SerialNumber`, `Description`, `Mode`, `ModifiedBy`, `LastModified` | Represents fields for digital input sensors. |
|
||||
| `DigitalOutFields` | `Included`, `SerialNumber`, `Description`, `Delay`, `Duration`, `ModifiedBy`, `LastModified` | Represents fields for digital output sensors. |
|
||||
| `SensorListTabs` | `ANALOG = 0`, `SQUIB = 1`, `DIGITAL_IN = 2`, `DIGITAL_OUT = 3`, `UART = 4`, `STREAM_IN = 5`, `STREAM_OUT = 6` | Defines tab identifiers for UI navigation; values are explicit integers. |
|
||||
| `UartSettingFields` | `Included`, `SerialNumber`, `BaudRate`, `DataBits`, `StopBits`, `Parity`, `FlowControl`, `DataFormat`, `LastModifiedBy`, `LastModified` | Represents UART configuration fields. |
|
||||
| `SquibFields` | `Included`, `SerialNumber`, `Description`, `ResistanceLow`, `ResistanceHigh`, `Id`, `Mode`, `Delay`, `Current`, `Duration`, `ModifiedBy`, `LastModified` | Represents squib (explosive device) sensor fields. |
|
||||
| `StreamInSettingFields` | `Included`, `SerialNumber`, `Description`, `LastModifiedBy`, `LastModified`, `UDPAddress` | Represents stream input (e.g., UDP) configuration fields. |
|
||||
| `StreamOutSettingFields` | `Included`, `SerialNumber`, `Description`, `LastModifiedBy`, `LastModified`, `UDPProfile`, `UDPAddress`, `UDPTimeChannelId`, `UDPDataChannelId`, `UDPTmNSConfig`, `IRIGTimeDataPacketIntervalMs`, `TMATSIntervalMs` | Represents stream output configuration fields. |
|
||||
| `AnalogSensorFields` | `Included`, `SerialNumber`, `Description`, `Manufacturer`, `Model`, `Capacity`, `CalInterval`, `Sensitivity`, `LinearSensitivity`, `Resistance`, `Excitation`, `Units`, `Id`, `CalDate`, `CalDueDate`, `ModifiedBy`, `LastModified`, `IEPE`, `OutOfDate`, `InWarningPeriod`, `NonLinearCalucationType`, `ZeroMethod`, `ZeroMethodStart`, `ZeroMethodEnd`, `FirstUseDate`, `UserValue1`, `UserValue2`, `UserValue3` | Represents comprehensive analog sensor fields. **Note**: `NonLinearCalucationType` appears to be a typo for *CalculationType* (see *Gotchas*). |
|
||||
| `CACOption` | `Manual`, `Capacity`, `RangeHigh`, `RangeMedium`, `RangeLow` | Represents calibration/characterization options. Each value is decorated with `[DescriptionResourceAttribute]` referencing external resource keys (e.g., `"CAC_Manual"`). |
|
||||
|
||||
---
|
||||
|
||||
### 3. Invariants
|
||||
|
||||
- **Field naming consistency**: All enums (except `CACOption` and `SensorListTabs`) begin with `Included`, `SerialNumber`, and `Description`. This suggests a common baseline for sensor metadata.
|
||||
- **Audit fields**: All sensor-related enums (except `SensorListTabs` and `CACOption`) include `ModifiedBy` and `LastModified` (or `LastModifiedBy` in some cases). `StreamInSettingFields` and `StreamOutSettingFields` use `LastModifiedBy`, while others use `ModifiedBy`—this is inconsistent but intentional per source.
|
||||
- **`SensorListTabs` is exhaustive**: The enum values cover all known sensor tab types (`ANALOG`, `SQUIB`, `DIGITAL_IN`, `DIGITAL_OUT`, `UART`, `STREAM_IN`, `STREAM_OUT`), with no gaps or extras.
|
||||
- **`CACOption` values are fixed**: Only five options exist, each annotated with `[DescriptionResourceAttribute]`. The enum itself does not define behavior—only labels.
|
||||
- **No overlap between enums**: Each enum represents a distinct sensor *type* or *category*; no field name appears in multiple enums with conflicting semantics (e.g., `Delay` exists in `DigitalOutFields` and `SquibFields`, but contextually appropriate).
|
||||
|
||||
---
|
||||
|
||||
### 4. Dependencies
|
||||
|
||||
- **Internal dependencies**:
|
||||
- `DTS.Common.Base.Classes` (for `DescriptionResourceAttribute` used in `CACOption.cs`).
|
||||
- `System.*` namespaces (`System`, `System.Collections.Generic`, etc.) are imported in `StreamInSettingFields.cs` but unused—likely legacy or auto-generated.
|
||||
- **Consumers (inferred)**:
|
||||
- UI layers (e.g., tab management via `SensorListTabs`, field binding via other enums).
|
||||
- Data persistence or serialization modules (e.g., mapping JSON/XML fields to enum values).
|
||||
- Validation or configuration editors that operate on sensor metadata.
|
||||
- **No external (non-.NET) dependencies** are evident.
|
||||
|
||||
---
|
||||
|
||||
### 5. Gotchas
|
||||
|
||||
- **Typo in `AnalogSensorFields`**: The field `NonLinearCalucationType` is misspelled (`Calucation` instead of `Calculation`). This is likely a historical bug that must be preserved for backward compatibility.
|
||||
- **Inconsistent audit field naming**: Most enums use `ModifiedBy` and `LastModified`, but `UartSettingFields`, `StreamInSettingFields`, and `StreamOutSettingFields` use `LastModifiedBy` instead of `ModifiedBy`. This may cause mismatches in generic processing logic if field names are assumed uniform.
|
||||
- **`CACOption` requires resource resolution**: The enum values have no intrinsic string representation—`DescriptionResourceAttribute` implies runtime lookup via a resource manager (e.g., `ResourceManager`). Consumers must handle localization or fallback.
|
||||
- **`StreamInSettingFields` has unused imports**: The file imports `System.*` namespaces but does not use them. May indicate incomplete cleanup or future expansion.
|
||||
- **No `Included` semantics defined**: While all sensor enums include `Included`, its meaning (e.g., `true`/`false`, `0`/`1`, or presence/absence flag) is not specified here—it is context-dependent and must be inferred from usage.
|
||||
- **`FirstUseDate` comment**: The comment `//13065 Sensor "First Use" Date` suggests a legacy ticket/issue ID; its relevance or validation rules are not documented here.
|
||||
|
||||
None identified beyond the above.
|
||||
Reference in New Issue
Block a user