init
This commit is contained in:
@@ -0,0 +1,40 @@
|
||||
---
|
||||
source_files:
|
||||
- Common/DTS.Common/XMLUtils/TestSetupExportXML/TestSetups/TestSetupsXMLClass.cs
|
||||
generated_at: "2026-04-16T03:22:24.832330+00:00"
|
||||
model: "Qwen/Qwen3-Coder-Next-FP8"
|
||||
schema_version: 1
|
||||
sha256: "c4cccfbedc3ecc94"
|
||||
---
|
||||
|
||||
# TestSetups
|
||||
|
||||
1. **Purpose**
|
||||
This module defines the root XML serialization contract for a collection of test setup configurations. Specifically, `TestSetupsXMLClass` serves as the top-level container class used by the .NET `XmlSerializer` to serialize or deserialize a list of `TestSetup` elements into/from an XML document. It exists to enable structured persistence and interchange of test setup data in a standardized XML format, likely for test configuration export/import functionality within the DTS (Device Test System) platform.
|
||||
|
||||
2. **Public Interface**
|
||||
- **`TestSetupsXMLClass`**
|
||||
- **Properties**:
|
||||
- `TestSetupXMLClass[] TestSetups { get; set; }`
|
||||
Gets or sets an array of `TestSetupXMLClass` objects. This property is decorated with `[XmlElement("TestSetup")]`, meaning each element in the array will be serialized as a `<TestSetup>` XML element under the root `<TestSetups>` element.
|
||||
|
||||
3. **Invariants**
|
||||
- The `TestSetups` property may be `null` or an empty array; no explicit non-null or non-empty invariant is enforced by this class.
|
||||
- XML element names are fixed: the root element must be `<TestSetups>`, and child elements must be `<TestSetup>`.
|
||||
- The class relies on `System.Xml.Serialization` semantics: serialization/deserialization behavior is determined entirely by the `[XmlRoot]` and `[XmlElement]` attributes, and no custom validation or transformation logic is present in this class.
|
||||
|
||||
4. **Dependencies**
|
||||
- **Internal dependencies**:
|
||||
- `DTS.Common.XMLUtils.TestSetupXMLClass` — referenced as the element type of the `TestSetups` array. Its structure and serialization attributes (not shown here) are critical to the overall XML schema.
|
||||
- **External dependencies**:
|
||||
- `System.Xml.Serialization` (via `System.Xml.XmlSerializer`) — used at runtime for actual XML processing.
|
||||
- Standard .NET types: `System`, `System.Collections.Generic`, `System.Linq`, `System.Text`, `System.Threading.Tasks` — imported but unused in this file.
|
||||
- **Depended upon by**:
|
||||
- Any code that serializes/deserializes test setup collections (e.g., export/import services), though specific consumers are not visible in this source.
|
||||
|
||||
5. **Gotchas**
|
||||
- The class is *only* a data contract for XML serialization; it contains no business logic, validation, or helper methods.
|
||||
- The `using` statements for `System.Collections.Generic`, `System.Linq`, `System.Text`, and `System.Threading.Tasks` are present but unused — may indicate legacy or boilerplate code.
|
||||
- The `TestSetups` property uses an array (`TestSetupXMLClass[]`); if deserialized from XML, a missing `<TestSetup>` element will result in `null`, not an empty array — consumers must handle null explicitly.
|
||||
- No documentation comments (`/// <summary>`) are present, reducing discoverability of intent.
|
||||
- None identified from source alone.
|
||||
@@ -0,0 +1,63 @@
|
||||
---
|
||||
source_files:
|
||||
- Common/DTS.Common/XMLUtils/TestSetupExportXML/TestSetups/TestSetup/TestSetupXMLClass.cs
|
||||
generated_at: "2026-04-16T03:22:38.732412+00:00"
|
||||
model: "Qwen/Qwen3-Coder-Next-FP8"
|
||||
schema_version: 1
|
||||
sha256: "149921c2940be328"
|
||||
---
|
||||
|
||||
# TestSetup
|
||||
|
||||
## 1. Purpose
|
||||
This module defines the `TestSetupXMLClass`, a data contract class used for serializing and deserializing test setup configurations to/from XML. It serves as the root object model in the XML export/import pipeline for test setup data within the DTS system, capturing core structural elements such as identifiers, device abstraction sets (`DASList`), groupings, field definitions, hardware inclusions, level triggers, and metadata. Its primary role is to provide a strongly-typed representation aligned with a specific XML schema used for test setup persistence and interchange.
|
||||
|
||||
## 2. Public Interface
|
||||
- **`TestSetupXMLClass()`**
|
||||
Parameterless constructor (implicitly provided by C#; required for `XmlSerializer`).
|
||||
|
||||
- **`string Id { get; set; }`**
|
||||
Gets or sets the unique identifier for the test setup. Serialized as a top-level XML element named `<Id>` (default element name derived from property name).
|
||||
|
||||
- **`List<DASListXMLClass> DASList { get; set; }`**
|
||||
Gets or sets a list of device abstraction set definitions. Serialized as a top-level XML element named `<DASList>` (due to `[XmlElement("DASList")]` attribute). May be `null` or empty.
|
||||
|
||||
- **`List<GroupsXMLClass> Groups { get; set; }`**
|
||||
Gets or sets a list of group definitions. Serialized as a top-level XML element named `<Groups>`. May be `null` or empty.
|
||||
|
||||
- **`FieldsXMLClass Fields { get; set; }`**
|
||||
Gets or sets a container for field definitions. Serialized as a top-level XML element named `<Fields>`. May be `null`.
|
||||
|
||||
- **`string HardwareIncludes { get; set; }`**
|
||||
Gets or sets a string representing hardware inclusion criteria (e.g., comma-separated IDs or paths). Serialized as a top-level XML element named `<HardwareIncludes>` (default element name). May be `null` or empty.
|
||||
|
||||
- **`LevelTriggersXMLClass LevelTriggers { get; set; }`**
|
||||
Gets or sets configuration for level-triggered events. Serialized as a top-level XML element named `<LevelTriggers>`. May be `null`.
|
||||
|
||||
- **`MetaDatasXMLClass MetaDatas { get; set; }`**
|
||||
Gets or sets a container for metadata entries. Serialized as a top-level XML element named `<MetaDatas>`. May be `null`.
|
||||
|
||||
## 3. Invariants
|
||||
- **XML Serialization Compatibility**: All public properties must be serializable by `System.Xml.Serialization.XmlSerializer`. This requires:
|
||||
- Public parameterless constructor (satisfied by default).
|
||||
- Public read-write properties (all meet this).
|
||||
- Collection properties (`List<T>`) must be initialized before adding items to avoid `NullReferenceException` during serialization.
|
||||
- **Element Naming**: Element names in the resulting XML are explicitly controlled via `[XmlElement]` attributes for `DASList`, `Groups`, `LevelTriggers`, and `MetaDatas`; others use default naming (`Id`, `Fields`, `HardwareIncludes`).
|
||||
- **Null Handling**: `XmlSerializer` omits `null` reference properties from the output XML. Non-null but empty collections (e.g., `new List<T>()`) will serialize as empty elements (e.g., `<DASList />`).
|
||||
|
||||
## 4. Dependencies
|
||||
- **Internal Dependencies**:
|
||||
- `DASListXMLClass`, `GroupsXMLClass`, `FieldsXMLClass`, `LevelTriggersXMLClass`, `MetaDatasXMLClass` — referenced as property types; their definitions are required for correct serialization/deserialization but not included in this source file.
|
||||
- **External Dependencies**:
|
||||
- `System.Xml.Serialization` — used for XML serialization attributes and runtime.
|
||||
- `System.Collections.Generic`, `System.Linq`, `System.Text`, `System.Threading.Tasks`, `System` — standard .NET namespaces used implicitly (e.g., `List<T>`, LINQ methods).
|
||||
- **Consumers**: This class is likely consumed by XML export/import utilities (e.g., classes responsible for writing/reading test setup XML files), though such consumers are not visible in this file.
|
||||
|
||||
## 5. Gotchas
|
||||
- **Missing `[XmlElement]` on `Id` and `HardwareIncludes`**: These properties serialize with element names matching their property names (`Id`, `HardwareIncludes`). If the XML schema expects different casing or naming (e.g., `<ID>` or `<HardwareInclude>`), this will cause deserialization failures.
|
||||
- **No validation or business logic**: The class is a pure data container; no validation occurs on property values (e.g., `Id` could be empty, `DASList` could contain null items). Consumers must enforce constraints.
|
||||
- **Collection initialization not guaranteed**: `XmlSerializer` does not automatically initialize `List<T>` properties. If deserializing into a pre-existing instance, `DASList`, `Groups`, `Fields`, `LevelTriggers`, and `MetaDatas` may remain `null` unless explicitly initialized in code.
|
||||
- **No inheritance or interface constraints visible**: The class is sealed in behavior (no virtual members, interfaces, or inheritance hierarchy shown), limiting extensibility patterns.
|
||||
- **No documentation on nested types**: Behavior of `FieldsXMLClass`, `LevelTriggersXMLClass`, etc., is unknown from this file alone; their structure may impose additional invariants (e.g., required child elements).
|
||||
|
||||
None identified beyond the above.
|
||||
@@ -0,0 +1,38 @@
|
||||
---
|
||||
source_files:
|
||||
- Common/DTS.Common/XMLUtils/TestSetupExportXML/TestSetups/TestSetup/DASList/DASListXMLClass.cs
|
||||
generated_at: "2026-04-16T03:22:46.951119+00:00"
|
||||
model: "Qwen/Qwen3-Coder-Next-FP8"
|
||||
schema_version: 1
|
||||
sha256: "cc3a8cf3c903f6c6"
|
||||
---
|
||||
|
||||
# DASList
|
||||
|
||||
## 1. Purpose
|
||||
This module defines a serializable data container (`DASListXMLClass`) used to represent a collection of DAS (Data Acquisition System) hardware configurations in XML format. It serves as the root object for XML serialization/deserialization of DAS hardware lists, enabling structured persistence and exchange of DAS configuration data within the DTS (Data Transfer System) ecosystem.
|
||||
|
||||
## 2. Public Interface
|
||||
- **`DASListXMLClass`**
|
||||
- **`[XmlElement("DASList")] public List<DASHardwareXMLClass> DASList { get; set; }`**
|
||||
A public property that holds a list of `DASHardwareXMLClass` objects. When serialized to XML, this property will be represented as a `<DASList>` element containing zero or more child elements (each representing a `DASHardwareXMLClass` instance). The property is nullable and mutable; callers may assign a new `List<DASHardwareXMLClass>` or modify the existing list in-place.
|
||||
|
||||
## 3. Invariants
|
||||
- The `DASList` property may be `null` (no explicit initialization in the source).
|
||||
- The list contents must consist solely of `DASHardwareXMLClass` instances (enforced by the generic type `List<DASHardwareXMLClass>`).
|
||||
- XML serialization will produce a root element named `<DASListXMLClass>` (default class name), containing a single child element `<DASList>`, which in turn contains the serialized items.
|
||||
- No validation is performed on the list contents (e.g., no duplicate checks, no required fields within `DASHardwareXMLClass` items) — this is inferred from absence of validation logic.
|
||||
|
||||
## 4. Dependencies
|
||||
- **Depends on**:
|
||||
- `System.Collections.Generic.List<T>` (standard .NET library)
|
||||
- `System.Xml.Serialization` (for `[XmlElement]` attribute)
|
||||
- `DASHardwareXMLClass` (referenced type; assumed defined elsewhere in `DTS.Common.XMLUtils` namespace, though not provided in source)
|
||||
- **Depended on by**:
|
||||
- Likely consumed by XML serialization/deserialization logic elsewhere in the codebase (e.g., export/import utilities), though no direct callers are visible in this file.
|
||||
|
||||
## 5. Gotchas
|
||||
- The class name (`DASListXMLClass`) is misleading: it does *not* represent a list itself, but a wrapper object *containing* a list property named `DASList`. This may cause confusion during XML schema interpretation (e.g., expecting `<DASListXMLClass>` as root, not `<DASList>`).
|
||||
- No constructor initializes the `DASList` property; deserialization will leave it `null` unless the XML contains at least one `<DASList>` element. Callers must handle `null` or initialize the list before use.
|
||||
- The `[XmlElement("DASList")]` attribute applies to the *property*, meaning the list itself is serialized as a `<DASList>` element (not as repeated `<DASList>` elements per item). This is standard for `List<T>` with `XmlElement`, but the naming may obscure the structure.
|
||||
- No documentation comments are present in the source; behavior relies entirely on attribute semantics and naming conventions.
|
||||
@@ -0,0 +1,48 @@
|
||||
---
|
||||
source_files:
|
||||
- Common/DTS.Common/XMLUtils/TestSetupExportXML/TestSetups/TestSetup/DASList/DASHardware/DASHardwareXMLClass.cs
|
||||
generated_at: "2026-04-16T03:23:15.402289+00:00"
|
||||
model: "Qwen/Qwen3-Coder-Next-FP8"
|
||||
schema_version: 1
|
||||
sha256: "7f9dcd586215190b"
|
||||
---
|
||||
|
||||
# DASHardware
|
||||
|
||||
## 1. Purpose
|
||||
This module defines a data transfer object (`DASHardwareXMLClass`) used for serializing and deserializing hardware configuration data related to Data Acquisition System (DAS) hardware components into/from XML format. It exists to provide a strongly-typed, XML-serializable representation of key hardware attributes—specifically serial number, sampling rate, and clock master status—enabling interoperability with external systems or persistent storage that consume or produce XML-based hardware configuration data.
|
||||
|
||||
## 2. Public Interface
|
||||
The class exposes only public properties; no methods are defined.
|
||||
|
||||
- **`string SerialNumber { get; set; }`**
|
||||
Stores the hardware’s serial number as a string. Intended to hold a unique manufacturer-assigned identifier.
|
||||
|
||||
- **`string SamplesPerSecond { get; set; }`**
|
||||
Stores the hardware’s sampling rate as a string (e.g., `"1000"`, `"500.5"`). *Note:* Despite representing a numeric quantity, it is stored as a string, not a numeric type.
|
||||
|
||||
- **`string IsClockMaster { get; set; }`**
|
||||
Stores a boolean-like flag indicating whether this hardware acts as the clock master for synchronization. Stored as a string (e.g., `"True"`/`"False"` or `"1"`/`"0"`), not a `bool`.
|
||||
|
||||
All properties are auto-implemented and public, making the class suitable for use with `System.Xml.Serialization.XmlSerializer`.
|
||||
|
||||
## 3. Invariants
|
||||
- **No validation is enforced** on property values (e.g., `SerialNumber` may be `null` or empty; `SamplesPerSecond` may be non-numeric; `IsClockMaster` may be any string, not just `"True"`/`"False"`).
|
||||
- **No ordering guarantees** exist for XML element serialization—property order in the generated XML depends on `XmlSerializer`’s default behavior (typically alphabetical by property name, but not guaranteed by the class itself).
|
||||
- **No runtime constraints** are documented or enforced in code; all validation (e.g., ensuring `SamplesPerSecond` is parseable) must occur elsewhere.
|
||||
|
||||
## 4. Dependencies
|
||||
- **Depends on:**
|
||||
- `System.Xml.Serialization` (for `XmlSerializer` compatibility; though not explicitly used here, the class is designed for it).
|
||||
- Standard .NET libraries (`System`, `System.Collections.Generic`, `System.Linq`, `System.Text`, `System.Threading.Tasks`).
|
||||
|
||||
- **Depended on by (inferred):**
|
||||
- Other classes in the `DTS.Common.XMLUtils` namespace (e.g., parent XML classes for test setup export, such as `TestSetupXMLClass` or container collections) are implied by the file path (`TestSetupExportXML/TestSetups/TestSetup/DASList/DASHardware/...`) but not visible in this snippet.
|
||||
- External consumers of XML configuration data (e.g., export/import tools, UI layers) that deserialize this type.
|
||||
|
||||
## 5. Gotchas
|
||||
- **String-typed numeric/boolean fields:** `SamplesPerSecond` and `IsClockMaster` are stored as `string`, not `double`/`decimal` and `bool`, respectively. Consumers must parse these values explicitly, risking `FormatException` or ambiguity (e.g., `"true"` vs `"True"` vs `"1"`).
|
||||
- **No null-safety guarantees:** Properties may be `null`; deserialization of incomplete XML may leave fields unset.
|
||||
- **No versioning or extensibility hooks:** The class lacks attributes (e.g., `[XmlIgnore]`, `[XmlElement(Order = ...)]`) or version fields, limiting future evolution without breaking existing XML contracts.
|
||||
- **No documentation on expected XML element name:** By default, `XmlSerializer` will use the property names (`SerialNumber`, `SamplesPerSecond`, `IsClockMaster`) as element names—verify against actual XML schema if strict compliance is required.
|
||||
- **None identified from source alone.**
|
||||
@@ -0,0 +1,132 @@
|
||||
---
|
||||
source_files:
|
||||
- Common/DTS.Common/XMLUtils/TestSetupExportXML/TestSetups/TestSetup/Fields/FieldsXMLClass.cs
|
||||
generated_at: "2026-04-16T03:23:35.267864+00:00"
|
||||
model: "Qwen/Qwen3-Coder-Next-FP8"
|
||||
schema_version: 1
|
||||
sha256: "5d62bfce4b670b8f"
|
||||
---
|
||||
|
||||
# Fields
|
||||
|
||||
### **Purpose**
|
||||
The `FieldsXMLClass` serves as a data container for serializing and deserializing test setup configuration metadata to/from XML format within the DTS system. It encapsulates a comprehensive set of properties representing user-configurable settings for test execution—such as trigger behavior, recording parameters, diagnostics, export options, and metadata—without implementing any business logic itself. Its role is purely structural: to act as a Plain Old CLR Object (POCO) that mirrors the schema of XML elements used in test setup persistence, enabling round-trip conversion between in-memory configuration and XML representation.
|
||||
|
||||
---
|
||||
|
||||
### **Public Interface**
|
||||
All members are public auto-implemented properties of type `string`. No methods, constructors, or events are defined.
|
||||
|
||||
| Property Name | Type | Description |
|
||||
|---------------|------|-------------|
|
||||
| `SetupName` | `string` | Name of the test setup. |
|
||||
| `SetupDescription` | `string` | Human-readable description of the test setup. |
|
||||
| `AutomaticTestProgression` | `string` | Indicates whether automatic progression between test steps is enabled. |
|
||||
| `AutomaticProgressionDelayMS` | `string` | Delay (in milliseconds) before automatic progression after a step completes. |
|
||||
| `InvertTrigger` | `string` | Whether the trigger signal is logically inverted. |
|
||||
| `InvertStart` | `string` | Whether the start signal is logically inverted. |
|
||||
| `IgnoreShortedStart` | `string` | Whether to ignore start events caused by a shorted start input. |
|
||||
| `IgnoreShortedTrigger` | `string` | Whether to ignore trigger events caused by a shorted trigger input. |
|
||||
| `ViewDiagnostics` | `string` | Whether diagnostics are displayed during test execution. |
|
||||
| `VerifyChannels` | `string` | Whether channel verification is enabled. |
|
||||
| `AutoVerifyChannels` | `string` | Whether channel verification runs automatically. |
|
||||
| `VerifyChannelsDelayMS` | `string` | Delay (in ms) before channel verification begins. |
|
||||
| `RecordingMode` | `string` | Mode of data acquisition (e.g., continuous, event-triggered). |
|
||||
| `SamplesPerSecond` | `string` | Sampling rate for data acquisition. |
|
||||
| `PreTriggerSeconds` | `string` | Duration (in seconds) of data recorded *before* a trigger event. |
|
||||
| `PostTriggerSeconds` | `string` | Duration (in seconds) of data recorded *after* a trigger event. |
|
||||
| `NumberOfEvents` | `string` | Maximum number of events to record per test. |
|
||||
| `WakeUpMotionTimeout` | `string` | Timeout (in seconds) for motion-based wake-up. |
|
||||
| `ScheduledStartDateTime` | `string` | ISO 8601 or similar formatted datetime string for scheduled test start. |
|
||||
| `IntervalBetweenEventStartsMinutes` | `string` | Minimum interval (in minutes) between consecutive event starts. |
|
||||
| `StartWithEvent` | `string` | Whether the test starts automatically upon the first event. |
|
||||
| `WakeUpWithMotion` | `string` | Whether motion detection is used to wake the system. |
|
||||
| `StrictDiagnostics` | `string` | Whether diagnostics failures should halt test execution. |
|
||||
| `RequireConfirmationOnErrors` | `string` | Whether operator confirmation is required before proceeding after an error. |
|
||||
| `ROIDownload` | `string` | Whether Regions of Interest (ROI) are included in downloads. |
|
||||
| `ViewROIDownload` | `string` | Whether ROI download settings are visible in the UI. |
|
||||
| `DownloadAll` | `string` | Whether all data (not just ROI) is downloaded. |
|
||||
| `ViewRealtime` | `string` | Whether real-time plotting is enabled. |
|
||||
| `RealtimePlotCount` | `string` | Number of channels to display in real-time plots. |
|
||||
| `ROIStart` | `string` | Start time (in seconds) of the ROI window relative to trigger. |
|
||||
| `ROIEnd` | `string` | End time (in seconds) of the ROI window relative to trigger. |
|
||||
| `ViewDownloadAll` | `string` | Whether the “Download All” option is visible in the UI. |
|
||||
| `Export` | `string` | Whether post-test export is enabled. |
|
||||
| `ExportFormat` | `string` | Format identifier for exported data (e.g., CSV, HDF5). |
|
||||
| `LabDetails` | `string` | Serialized lab metadata (e.g., JSON string or XML fragment). |
|
||||
| `UseLabDetails` | `string` | Whether lab details are included in reports. |
|
||||
| `CustomerDetails` | `string` | Serialized customer metadata. |
|
||||
| `UseCustomerDetails` | `string` | Whether customer details are included in reports. |
|
||||
| `AllowMissingSensors` | `string` | Whether the test may proceed if some sensors are missing. |
|
||||
| `AllowSensorIdToBlankChannel` | `string` | Whether a sensor ID may be assigned to an unconfigured (blank) channel. |
|
||||
| `ExcitationWarmupTimeMS` | `string` | Warm-up delay (in ms) for excitation circuits before measurement. |
|
||||
| `LocalOnly` | `string` | Whether the test runs without network connectivity. |
|
||||
| `LastModified` | `string` | Timestamp of last modification (ISO 8601 format expected). |
|
||||
| `LastModifiedBy` | `string` | User identifier of the last modifier. |
|
||||
| `TurnOffExcitation` | `string` | Whether excitation is disabled after test completion. |
|
||||
| `TriggerCheckRealtime` | `string` | Whether trigger validation occurs in real time. |
|
||||
| `TriggerCheckStep` | `string` | Whether trigger validation occurs at a specific step. |
|
||||
| `PostTestDiagnostics` | `string` | Whether diagnostics run after test completion. |
|
||||
| `ExportFolder` | `string` | Directory path for exported files. |
|
||||
| `DownloadFolder` | `string` | Directory path for downloaded data. |
|
||||
| `CommonStatusLine` | `string` | Shared status message displayed across UI components. |
|
||||
| `SameAsDownloadFolder` | `string` | Whether export folder is identical to download folder. |
|
||||
| `UploadData` | `string` | Whether acquired data is uploaded post-test. |
|
||||
| `UploadDataFolder` | `string` | Remote path or identifier for data upload destination. |
|
||||
| `UploadExportsOnly` | `string` | Whether only exported files (not raw data) are uploaded. |
|
||||
| `Settings` | `string` | Arbitrary serialized settings (e.g., JSON or XML). |
|
||||
| `WarnOnBatteryFail` | `string` | Whether to warn if battery voltage drops below threshold. |
|
||||
| `Dirty` | `string` | Whether the setup has unsaved changes. |
|
||||
| `Complete` | `string` | Whether the test setup is fully configured and ready to run. |
|
||||
| `ErrorMessage` | `string` | Last recorded error message. |
|
||||
| `TestEngineerDetails` | `string` | Serialized test engineer metadata. |
|
||||
| `UseTestEngineerDetails` | `string` | Whether test engineer details are included in reports. |
|
||||
| `UserTags` | `string` | User-defined tags (e.g., comma-separated list or JSON array). |
|
||||
| `DoAutoArm` | `string` | Whether auto-arming is enabled (e.g., for squib circuits). |
|
||||
| `DoEnableRepeat` | `string` | Whether repeated test execution is enabled. |
|
||||
| `DoStreaming` | `string` | Whether streaming mode is active. |
|
||||
| `CheckoutMode` | `string` | Whether the system is in checkout/verification mode. |
|
||||
| `QuitTestWithoutWarning` | `string` | Whether to suppress warnings when exiting a test prematurely. |
|
||||
| `SuppressMissingSensorsWarning` | `string` | Whether to suppress warnings about missing sensors. |
|
||||
| `ISFFile` | `string` | Path or identifier for the ISF (Instrument Setup File). |
|
||||
| `NotAllChannelsRealTime` | `string` | Whether not all channels support real-time monitoring. |
|
||||
| `NotAllChannelsViewer` | `string` | Whether not all channels are visible in the viewer. |
|
||||
| `CalibrationBehavior` | `string` | Strategy for handling calibration data (e.g., “UseStored”, “Prompt”). |
|
||||
| `ClockSyncProfileMaster` | `string` | Identifier for the clock synchronization profile used by master devices. |
|
||||
| `ClockSyncProfileSlave` | `string` | Identifier for the clock synchronization profile used by slave devices. |
|
||||
| `ExtraProperties` | `string` | Additional custom properties (e.g., JSON object). |
|
||||
| `MeasureSquibResistancesStep` | `string` | Step index or name where squib resistance measurement occurs. |
|
||||
| `TestSetupUniqueId` | `string` | Globally unique identifier (GUID) for the test setup instance. |
|
||||
|
||||
> **Note**: All properties are declared as `string`, even those that conceptually represent booleans, numbers, or structured data. This implies that serialization/deserialization logic (outside this class) is responsible for parsing and validating values.
|
||||
|
||||
---
|
||||
|
||||
### **Invariants**
|
||||
No explicit invariants are enforced by this class. However, based on naming conventions and typical usage patterns in XML serialization contexts:
|
||||
|
||||
- **All properties are nullable**: Since they are auto-properties without initialization, any property may be `null`.
|
||||
- **No semantic validation**: The class does not validate values (e.g., `AutomaticProgressionDelayMS` may contain non-numeric strings).
|
||||
- **No ordering guarantees**: Property order in XML serialization depends on the serializer (e.g., `System.Xml.Serialization.XmlSerializer` typically preserves declaration order, but this is not guaranteed by the class itself).
|
||||
- **No cross-property consistency checks**: For example, `ExportFolder` and `SameAsDownloadFolder` are independent; the class does not enforce that `ExportFolder == DownloadFolder` when `SameAsDownloadFolder == "true"`.
|
||||
|
||||
---
|
||||
|
||||
### **Dependencies**
|
||||
- **Dependencies *of* this module**:
|
||||
- `System`, `System.Collections.Generic`, `System.Linq`, `System.Text`, `System.Threading.Tasks` (standard .NET libraries).
|
||||
- No external or project-specific dependencies are imported in this file.
|
||||
|
||||
- **Dependencies *on* this module**:
|
||||
- The commented-out line `//public RegionsOfInterestXMLClass RegionsOfInterest { get; set; }` suggests a former or planned relationship with `RegionsOfInterestXMLClass`, implying that other parts of the codebase likely reference this type.
|
||||
- Given the namespace `DTS.Common.XMLUtils`, this class is almost certainly used by XML serialization/deserialization utilities (e.g., a `TestSetupSerializer` class) elsewhere in the `DTS.Common.XMLUtils` namespace or related modules.
|
||||
|
||||
---
|
||||
|
||||
### **Gotchas**
|
||||
- **All values are strings**: Critical business logic (e.g., parsing `AutomaticProgressionDelayMS` as an integer, interpreting `Dirty`/`Complete` as booleans) must be handled externally. This increases the risk of runtime parsing errors if the consumer assumes a specific format.
|
||||
- **No validation or default values**: Consumers must handle missing or malformed data (e.g., `SamplesPerSecond = "NaN"`).
|
||||
- **Commented-out property**: The commented-out `RegionsOfInterest` property indicates incomplete or deprecated functionality. Its removal may have been intentional (e.g., refactoring), but its presence in source could confuse developers about current data model scope.
|
||||
- **Ambiguous boolean/numeric representation**: Properties like `Dirty`, `Complete`, `AllowMissingSensors` are strings—consumers must agree on expected values (e.g., `"true"/"false"`, `"1"/"0"`, `"Yes"/"No"`).
|
||||
- **No documentation on expected formats**: For fields like `ScheduledStartDateTime`, `LastModified`, or `TestSetupUniqueId`, the expected string format (e.g., ISO 8601, ticks, GUID) is not specified in this class and must be inferred from usage elsewhere.
|
||||
- **No immutability or encapsulation**: Public setters and lack of constructor initialization make accidental mutation or inconsistent state easy.
|
||||
@@ -0,0 +1,38 @@
|
||||
---
|
||||
source_files:
|
||||
- Common/DTS.Common/XMLUtils/TestSetupExportXML/TestSetups/TestSetup/Groups/GroupsXMLClass.cs
|
||||
generated_at: "2026-04-16T03:23:05.467827+00:00"
|
||||
model: "Qwen/Qwen3-Coder-Next-FP8"
|
||||
schema_version: 1
|
||||
sha256: "1c1730c950d85ff2"
|
||||
---
|
||||
|
||||
# Groups
|
||||
|
||||
1. **Purpose**
|
||||
This module defines the `GroupsXMLClass`, a data contract class used for XML serialization/deserialization of a collection of test group configurations. It serves as the root container object when exporting or importing test setup group data in XML format, specifically within the DTS (likely “Device Test System” or similar) framework. Its role is to map a list of `GroupXMLClass` instances to an XML structure where each group is represented as a `<Group>` element under a root element (implicitly named `Groups` by convention, though not explicitly declared here).
|
||||
|
||||
2. **Public Interface**
|
||||
- **`GroupsXMLClass`**
|
||||
- **Property**: `public List<GroupXMLClass> Group { get; set; }`
|
||||
- **Behavior**: Gets or sets the list of test group definitions. When serialized to XML, each item in this list is serialized as a `<Group>` element (due to the `[XmlElement("Group")]` attribute). The property is nullable and may be `null` or an empty list; no explicit initialization is performed in the class itself.
|
||||
|
||||
3. **Invariants**
|
||||
- The `Group` property must be a `List<GroupXMLClass>` (or `null`) to be compatible with the `[XmlElement("Group")]` attribute; using an `IEnumerable<GroupXMLClass>` or array may cause unexpected serialization behavior (though `List<T>` is the standard expectation for `XmlElement` collections).
|
||||
- Each element in the `Group` list is expected to be an instance of `GroupXMLClass`, but no runtime validation is enforced by this class. Invalid or null entries in the list may serialize as empty `<Group />` elements or cause exceptions during serialization depending on `XmlSerializer` behavior.
|
||||
- The class itself has no constructor or initialization logic, so consumers must manually instantiate and populate the `Group` list before serialization.
|
||||
|
||||
4. **Dependencies**
|
||||
- **Internal Dependencies**:
|
||||
- `DTS.Common.XMLUtils.GroupXMLClass` (referenced as `GroupXMLClass` in the `Group` property type). This type is not provided in the source, but its existence and structure are required for correct serialization.
|
||||
- **External Dependencies**:
|
||||
- `System.Xml.Serialization` (for `[XmlElement]` and `XmlSerializer`).
|
||||
- Standard .NET types: `System.Collections.Generic.List<T>`, `System.Linq`, `System.Threading.Tasks`, `System.Text` (though the latter three are unused in this file).
|
||||
- **Consumers**: This class is likely used by XML export/import utilities (e.g., methods in `TestSetupExportXML` or related classes in the same namespace) to persist or load test group configurations. Its usage is inferred from the namespace path (`DTS.Common.XMLUtils.TestSetupExportXML.TestSetups.TestSetup.Groups`).
|
||||
|
||||
5. **Gotchas**
|
||||
- **Missing root element name**: The class has no `[XmlRoot]` attribute, so the root XML element name during serialization will default to the class name (`GroupsXMLClass`), not `Groups`. If the intended XML root is `<Groups>`, this is inconsistent with common naming expectations and may cause deserialization mismatches if consumers expect `<Groups>` as the root.
|
||||
- **No null-safety or initialization**: The `Group` property is not auto-initialized (e.g., via constructor or property initializer), so attempting to serialize a `GroupsXMLClass` instance with `Group == null` will result in no `<Group>` elements being written, but attempting to *add* to the list without initializing it first will throw `NullReferenceException`.
|
||||
- **Ambiguous naming**: The property name `Group` (singular) holds a list, which is unconventional and may confuse developers expecting a single item. This is likely intentional to satisfy XML schema requirements (e.g., matching a schema where the element name is `Group` but occurs multiple times), but it is counterintuitive in C#.
|
||||
- **No validation or business logic**: The class is a pure DTO; it does not enforce any constraints on the contents of the `Group` list (e.g., uniqueness, non-empty names, etc.). Such validation, if required, must be handled elsewhere.
|
||||
- **No documentation comments**: The source provides no XML documentation (`///`), making the intent and expected usage unclear beyond the code structure.
|
||||
@@ -0,0 +1,80 @@
|
||||
---
|
||||
source_files:
|
||||
- Common/DTS.Common/XMLUtils/TestSetupExportXML/TestSetups/TestSetup/Groups/Group/GroupXMLClass.cs
|
||||
generated_at: "2026-04-16T03:23:39.376658+00:00"
|
||||
model: "Qwen/Qwen3-Coder-Next-FP8"
|
||||
schema_version: 1
|
||||
sha256: "962edca5954a813a"
|
||||
---
|
||||
|
||||
# Group
|
||||
|
||||
## 1. Purpose
|
||||
`GroupXMLClass` is a data transfer object (DTO) used to serialize and deserialize test group definitions to/from XML within the DTS (Device Test System) framework. It represents a logical grouping of test hardware and channels in a test setup, enabling structured persistence and exchange of test configuration data. The class is specifically tailored for XML serialization via `System.Xml.Serialization`, supporting round-trip conversion between in-memory objects and XML documents conforming to the expected schema for test setups.
|
||||
|
||||
## 2. Public Interface
|
||||
|
||||
- **`GroupXMLClass()`**
|
||||
Parameterless constructor. Initializes `HardwareList` to a new `HardwareListXMLClass` instance and `Channel` to a new empty `List<ChannelXMLClass>`. Required for XML deserialization.
|
||||
|
||||
- **`string Name { get; set; }`**
|
||||
Internal identifier for the group. Serialized as `<Name>` element.
|
||||
|
||||
- **`string DisplayName { get; set; }`**
|
||||
Human-readable label for UI display. Serialized as `<DisplayName>` element.
|
||||
|
||||
- **`string Description { get; set; }`**
|
||||
Optional descriptive text for the group. Serialized as `<Description>` element.
|
||||
|
||||
- **`string TestSetupName { get; set; }`**
|
||||
Name of the parent test setup this group belongs to. Serialized as `<TestSetupName>` element.
|
||||
|
||||
- **`string DisplayOrder { get; set; }`**
|
||||
String-based ordering hint (e.g., "1", "2", "A", "B") to determine display sequence. Serialized as `<DisplayOrder>` element.
|
||||
|
||||
- **`string Position { get; set; }`**
|
||||
Physical or logical position indicator (e.g., "Top", "Bottom", "1.2"). Serialized as `<Position>` element.
|
||||
|
||||
- **`string TestObjectType { get; set; }`**
|
||||
Type of test object associated with this group (e.g., "Device", "Fixture"). Serialized as `<TestObjectType>` element.
|
||||
|
||||
- **`string Id { get; set; }`**
|
||||
Unique identifier for the group instance. Serialized as `<Id>` element.
|
||||
|
||||
- **`string StaticGroupId { get; set; }`**
|
||||
Identifier linking to a static template or base group definition. Serialized as `<StaticGroupId>` element.
|
||||
|
||||
- **`HardwareListXMLClass HardwareList { get; set; }`**
|
||||
Container for hardware-related metadata (e.g., device connections, power supplies). Serialized as `<HardwareList>` element. Never null after construction.
|
||||
|
||||
- **`List<ChannelXMLClass> Channel { get; set; }`**
|
||||
Ordered list of channel definitions associated with this group. Serialized as repeated `<Channel>` elements. Initialized to an empty list by the constructor; may be empty but not null.
|
||||
|
||||
## 3. Invariants
|
||||
|
||||
- `HardwareList` is **never null** after construction (ensured by constructor).
|
||||
- `Channel` is **never null** after construction (ensured by constructor), though it may be empty.
|
||||
- All string properties (`Name`, `DisplayName`, etc.) may be `null` or empty unless constrained by higher-level validation logic (not enforced in this class).
|
||||
- XML element names are strictly controlled via `[XmlElement]` attributes: `HardwareList` and `Channel` map directly to those element names; all other properties serialize as elements named after the property (e.g., `<Name>`, `<Channel>`).
|
||||
- The class assumes `ChannelXMLClass` and `HardwareListXMLClass` are serializable types (not validated here, but required for successful XML round-trip).
|
||||
|
||||
## 4. Dependencies
|
||||
|
||||
- **Internal dependencies (from source):**
|
||||
- `HardwareListXMLClass` (used as a property type; must be defined elsewhere in the codebase).
|
||||
- `ChannelXMLClass` (used as a list element type; must be defined elsewhere).
|
||||
- `System.Xml.Serialization` (for `[XmlElement]` attribute usage).
|
||||
|
||||
- **External dependencies (inferred):**
|
||||
- `DTS.Common.XMLUtils` namespace (contains related XML DTOs like `TestSetupXMLClass`, `ChannelXMLClass`, etc.).
|
||||
- Likely consumed by XML serialization/deserialization utilities (e.g., `XmlSerializer`) and higher-level test setup management classes (e.g., `TestSetupXMLClass` would contain a list of `GroupXMLClass`).
|
||||
|
||||
## 5. Gotchas
|
||||
|
||||
- **String-based ordering fields:** `DisplayOrder` and `Position` are stored as `string`, not numeric types, despite implying ordering/position semantics. Consumers must handle parsing and comparison logic (e.g., lexicographic ordering may not match intended numeric order if values like "1", "2", "10" are used).
|
||||
- **No validation:** The class performs no runtime validation of property values (e.g., `Id` uniqueness, required fields like `Name`). Validation is expected to occur at a higher layer.
|
||||
- **Constructor-only initialization:** The `Channel` list is initialized *only* in the parameterless constructor. If an instance is created via reflection or deserialization without invoking the constructor (e.g., `FormatterServices.GetUninitializedObject`), `Channel` may be `null`—though `XmlSerializer` always calls the parameterless constructor, this is a risk if the class is instantiated manually.
|
||||
- **No inheritance or interfaces:** The class is a plain DTO with no interfaces or extensibility hooks; modifications require direct changes.
|
||||
- **No documentation on semantics:** The meaning of fields like `StaticGroupId` or `TestObjectType` is not clarified in this file; their usage depends on external documentation or schema.
|
||||
|
||||
None identified beyond the above.
|
||||
@@ -0,0 +1,78 @@
|
||||
---
|
||||
source_files:
|
||||
- Common/DTS.Common/XMLUtils/TestSetupExportXML/TestSetups/TestSetup/Groups/Group/Channel/ChannelXMLClass.cs
|
||||
generated_at: "2026-04-16T03:23:54.057890+00:00"
|
||||
model: "Qwen/Qwen3-Coder-Next-FP8"
|
||||
schema_version: 1
|
||||
sha256: "664ac61411c95d4f"
|
||||
---
|
||||
|
||||
# Channel
|
||||
|
||||
## 1. Purpose
|
||||
This module defines the `ChannelXMLClass`, a data transfer object (DTO) used to serialize and deserialize channel configuration data for test setups in XML format. It serves as the structured representation of a single channel within a test setup hierarchy (nested under `Group` → `Channel`), capturing both standardized (ISO) and user-defined naming, status (enabled/disabled), and hardware mapping information (e.g., sensor, DAS, channel index). The class is specifically designed for use with `System.Xml.Serialization` to support export/import of test setup configurations.
|
||||
|
||||
## 2. Public Interface
|
||||
All members are public instance properties; no methods or nested types are defined.
|
||||
|
||||
- **`ChannelXMLClass()`**
|
||||
Parameterless constructor. Initializes the `Settings` property to a new `SettingsXMLClass` instance.
|
||||
|
||||
- **`string ISOChannelName { get; set; }`**
|
||||
Gets or sets the standardized (ISO-compliant) channel name.
|
||||
|
||||
- **`string ISOCode { get; set; }`**
|
||||
Gets or sets the standardized (ISO) channel code.
|
||||
|
||||
- **`string UserChannelName { get; set; }`**
|
||||
Gets or sets the user-defined (custom) channel name.
|
||||
|
||||
- **`string UserCode { get; set; }`**
|
||||
Gets or sets the user-defined (custom) channel code.
|
||||
|
||||
- **`string Disabled { get; set; }`**
|
||||
Gets or sets a string value indicating whether the channel is disabled. *Note: The type is `string` (not `bool`), implying serialization of `"true"`/`"false"`, `"1"`/`"0"`, or similar—exact semantics depend on usage context.*
|
||||
|
||||
- **`SettingsXMLClass Settings { get; set; }`**
|
||||
Gets or sets the channel’s settings object. Marked with `[XmlElement("Settings")]`, meaning it will be serialized as a nested `<Settings>` element (not an attribute or wrapper element).
|
||||
|
||||
- **`string SensorId { get; set; }`**
|
||||
Gets or sets the identifier for the sensor associated with this channel.
|
||||
|
||||
- **`string DASId { get; set; }`**
|
||||
Gets or sets the identifier for the Data Acquisition System (DAS) device.
|
||||
|
||||
- **`string DASChannelIdx { get; set; }`**
|
||||
Gets or sets the channel index *within* the DAS device (0-based or 1-based—context-dependent).
|
||||
|
||||
- **`string TestSetupOrder { get; set; }`**
|
||||
Gets or sets the order/index of this channel within the full test setup (likely for ordering/sorting).
|
||||
|
||||
- **`string GroupOrder { get; set; }`**
|
||||
Gets or sets the order/index of this channel *within its parent group*.
|
||||
|
||||
## 3. Invariants
|
||||
- The `Settings` property is guaranteed to be non-null *after construction* due to initialization in the constructor. However, it may be reassigned to `null` externally (no null-checking is present in the class).
|
||||
- All properties are of type `string`, including logically boolean (`Disabled`) and numeric (`DASChannelIdx`, `TestSetupOrder`, `GroupOrder`) fields. This suggests values are stored as strings in XML and may require parsing/conversion at usage boundaries.
|
||||
- The `[XmlElement("Settings")]` attribute enforces that `Settings` is serialized as a direct child element named `"Settings"` (not nested under a `"Channel"` wrapper or as an attribute).
|
||||
- No validation rules are enforced in the class itself (e.g., no null/empty checks, no format validation on codes or IDs).
|
||||
|
||||
## 4. Dependencies
|
||||
- **Direct Dependencies (from imports):**
|
||||
- `System` (core types: `string`, `object`, etc.)
|
||||
- `System.Collections.Generic`, `System.Linq`, `System.Text`, `System.Threading.Tasks` (likely unused in this file but included by default)
|
||||
- `System.Xml.Serialization` (for `[XmlElement]` attribute)
|
||||
- **Type Dependencies (from property types):**
|
||||
- `SettingsXMLClass` (used in `Settings` property; defined elsewhere in the same namespace `DTS.Common.XMLUtils`).
|
||||
- **Inferred Usage:**
|
||||
- This class is part of a larger XML serialization hierarchy (e.g., `TestSetup`, `Group`, `Channel`), as indicated by the file path and namespace. It is consumed by XML serialization/deserialization logic elsewhere in the codebase.
|
||||
|
||||
## 5. Gotchas
|
||||
- **`Disabled` is a `string`, not a `bool`**: This is error-prone. Consumers must handle parsing (e.g., case-insensitive `"true"`, `"false"`, `"1"`, `"0"`) and decide how to interpret unexpected values (e.g., `null`, `"yes"`, `"disabled"`).
|
||||
- **Numeric fields (`DASChannelIdx`, `TestSetupOrder`, `GroupOrder`) are `string`**: Requires parsing before arithmetic or comparison. No validation ensures these are numeric strings.
|
||||
- **No null-safety**: Properties like `ISOChannelName`, `UserChannelName`, or `Settings` may be `null` after deserialization if absent in the XML (unless constrained by schema/consumer logic).
|
||||
- **Order fields (`TestSetupOrder`, `GroupOrder`) lack semantics**: Their meaning (0-based vs. 1-based index, sort key, etc.) is not defined in this class and must be inferred from usage.
|
||||
- **No documentation on XML schema**: The class assumes a specific XML structure (e.g., `<Channel>...</Channel>`), but the expected element/attribute layout (beyond `Settings`) is not self-evident.
|
||||
- **No immutability or validation**: Designed purely as a DTO; not suitable for direct business logic without additional layers.
|
||||
|
||||
*None identified from source alone.*
|
||||
@@ -0,0 +1,44 @@
|
||||
---
|
||||
source_files:
|
||||
- Common/DTS.Common/XMLUtils/TestSetupExportXML/TestSetups/TestSetup/Groups/Group/Channel/Settings/SettingsXMLClass.cs
|
||||
generated_at: "2026-04-16T03:24:01.382044+00:00"
|
||||
model: "Qwen/Qwen3-Coder-Next-FP8"
|
||||
schema_version: 1
|
||||
sha256: "24437ea76542151b"
|
||||
---
|
||||
|
||||
# Settings
|
||||
|
||||
## 1. Purpose
|
||||
The `SettingsXMLClass` is a data transfer object (DTO) used to serialize and deserialize channel-specific configuration settings for test setups in the DTS system. It acts as a structured container for XML persistence of channel parameters—such as filter class, polarity, range, zeroing method, and associated offsets—enabling consistent storage and retrieval of hardware or signal conditioning settings during test setup export/import workflows.
|
||||
|
||||
## 2. Public Interface
|
||||
All members are public read-write properties of type `string`. No methods are defined.
|
||||
|
||||
- **`FilterClass`** (`string`): Represents the classification or type of filter applied to the channel (e.g., "LowPass", "HighPass").
|
||||
- **`Polarity`** (`string`): Indicates the signal polarity setting (e.g., "AC", "DC", "AC+DC").
|
||||
- **`Range`** (`string`): Specifies the measurement or output range (e.g., "±10V", "0–5A").
|
||||
- **`ZeroMethod`** (`string`): Defines the zeroing approach used (e.g., "Auto", "Manual", "None").
|
||||
- **`ZeroMethodStart`** (`string`): Specifies the zeroing method applied at the start of a measurement sequence.
|
||||
- **`ZeroMethodEnd`** (`string`): Specifies the zeroing method applied at the end of a measurement sequence.
|
||||
- **`InitialOffset`** (`string`): Holds the initial offset value (e.g., "0.001", "-0.5").
|
||||
- **`UserValue1`**, **`UserValue2`**, **`UserValue3`** (`string`): Generic user-defined string fields for extensible configuration (purpose not documented in source).
|
||||
|
||||
## 3. Invariants
|
||||
- All properties are nullable (`null` is a valid value) and have no enforced non-null constraints in the class definition.
|
||||
- No validation, normalization, or formatting rules are enforced on property values (e.g., `Range` could be any arbitrary string).
|
||||
- The class assumes a fixed set of 11 string-typed fields; no dynamic or extensible schema is present.
|
||||
- Ordering of properties in XML serialization is not guaranteed by the class itself (depends on serializer behavior, e.g., `XmlSerializer` typically uses declaration order).
|
||||
|
||||
## 4. Dependencies
|
||||
- **Dependencies**: None (only uses `System.*` namespaces; no external project or library references).
|
||||
- **Depended upon**: Inferred from namespace (`DTS.Common.XMLUtils`) and class name—likely consumed by XML serialization/deserialization logic elsewhere in the `DTS.Common.XMLUtils` module (e.g., methods that convert between `SettingsXMLClass` and XML elements). Exact consumers are not visible in this file.
|
||||
|
||||
## 5. Gotchas
|
||||
- **No validation or business logic**: Values are stored as raw strings; downstream consumers must interpret and validate semantics (e.g., `ZeroMethod` values like `"Auto"` vs `"Manual"` are not enforced).
|
||||
- **Ambiguous `UserValue*` fields**: The purpose of `UserValue1`, `UserValue2`, and `UserValue3` is undocumented—consumers may rely on implicit conventions (e.g., `UserValue1` = gain, `UserValue2` = coupling), risking fragility.
|
||||
- **String-based typed data**: Numerical or enum-like values (e.g., `Range`, `InitialOffset`) are stored as strings, increasing risk of parsing errors or typos (e.g., `"±10V"` vs `"+/-10V"`).
|
||||
- **No versioning or backward/forward compatibility handling**: Changes to the schema (e.g., adding/removing fields) may break XML round-trips without additional logic.
|
||||
- **No XML-specific attributes**: The class lacks `[XmlElement]`, `[XmlAttribute]`, or `[DataContract]` annotations—behavior during XML serialization depends on default .NET serializer conventions (e.g., property names map directly to element names).
|
||||
|
||||
None identified beyond the above.
|
||||
@@ -0,0 +1,49 @@
|
||||
---
|
||||
source_files:
|
||||
- Common/DTS.Common/XMLUtils/TestSetupExportXML/TestSetups/TestSetup/Groups/Group/HardwareList/HardwareListXMLClass.cs
|
||||
generated_at: "2026-04-16T03:23:43.663947+00:00"
|
||||
model: "Qwen/Qwen3-Coder-Next-FP8"
|
||||
schema_version: 1
|
||||
sha256: "ab08dc04bffd8487"
|
||||
---
|
||||
|
||||
# HardwareList
|
||||
|
||||
## 1. Purpose
|
||||
This module defines a data contract class (`HardwareListXMLClass`) used for serializing and deserializing hardware list data to/from XML within the DTS system. It serves as a structured container for a collection of hardware identifiers (represented as strings), enabling interoperability with XML-based export/import workflows—specifically in the context of test setup configuration data under the `TestSetups/TestSetup/Groups/Group/HardwareList` path.
|
||||
|
||||
## 2. Public Interface
|
||||
- **`HardwareListXMLClass()`**
|
||||
Parameterless constructor. Initializes the `Hardware` property to an empty `List<string>`.
|
||||
|
||||
- **`List<string> Hardware { get; set; }`**
|
||||
Public property annotated with `[XmlElement("Hardware")]`. Holds the list of hardware identifiers. During XML serialization/deserialization, each string in this list is serialized as a `<Hardware>` element (not wrapped in a container element).
|
||||
|
||||
Example XML output for `Hardware = ["HW001", "HW002"]`:
|
||||
```xml
|
||||
<HardwareListXMLClass>
|
||||
<Hardware>HW001</Hardware>
|
||||
<Hardware>HW002</Hardware>
|
||||
</HardwareListXMLClass>
|
||||
```
|
||||
|
||||
## 3. Invariants
|
||||
- The `Hardware` list is **never null** after construction (guaranteed by the constructor initializing it to `new List<string>()`).
|
||||
- All elements in the `Hardware` list are of type `string`.
|
||||
- XML serialization uses `System.Xml.Serialization.XmlSerializer`; element names are strictly `"Hardware"` per the `[XmlElement("Hardware")]` attribute.
|
||||
- No validation is performed on the contents of the `Hardware` list (e.g., no uniqueness, format, or non-empty checks enforced by this class).
|
||||
|
||||
## 4. Dependencies
|
||||
- **Dependencies on other modules**:
|
||||
- `System.Xml.Serialization` (via `XmlElementAttribute`)
|
||||
- Standard .NET libraries (`System.Collections.Generic`, `System.Linq`, etc.)
|
||||
- **Dependencies *of* this module**:
|
||||
- This class is part of the `DTS.Common.XMLUtils` namespace, implying it is used in XML utility pipelines (e.g., test setup export).
|
||||
- Likely consumed by higher-level XML serialization logic (e.g., a serializer/deserializer for `TestSetup` objects), though no direct references to other types in this file are present.
|
||||
|
||||
## 5. Gotchas
|
||||
- The class name `HardwareListXMLClass` is generic and non-descriptive; its purpose is only clear from its usage context (e.g., file path `.../HardwareList/HardwareListXMLClass.cs`).
|
||||
- No explicit XML root element name is defined (e.g., via `[XmlRoot]`), so the root element during serialization will default to the class name (`HardwareListXMLClass`). This may conflict with expected XML schema if the consumer expects a different root tag (e.g., `<HardwareList>`).
|
||||
- The `[XmlElement("Hardware")]` attribute applies to the *list items*, not the container—this is correct for flattening the list into repeated elements, but could be misinterpreted if expecting a wrapper element.
|
||||
- No error handling or null-safety is implemented beyond constructor initialization; external code must ensure thread-safety if used concurrently.
|
||||
- None identified from source alone.
|
||||
@@ -0,0 +1,40 @@
|
||||
---
|
||||
source_files:
|
||||
- Common/DTS.Common/XMLUtils/TestSetupExportXML/TestSetups/TestSetup/Groups/Group/HardwareList/Hardware/HardwareXMLClass.cs
|
||||
generated_at: "2026-04-16T03:23:50.939100+00:00"
|
||||
model: "Qwen/Qwen3-Coder-Next-FP8"
|
||||
schema_version: 1
|
||||
sha256: "3cfe73099bdaf1e6"
|
||||
---
|
||||
|
||||
# Hardware
|
||||
|
||||
1. **Purpose**
|
||||
This module defines a simple data transfer object (DTO) class, `HardwareXMLClass`, used for serializing/deserializing hardware identifiers within XML-based test setup export/import workflows. It resides in the `DTS.Common.XMLUtils` namespace and serves as a structured container for a single hardware name string, likely used in XML serialization contexts (e.g., as part of a collection in a larger XML document representing test setups).
|
||||
|
||||
2. **Public Interface**
|
||||
- `public class HardwareXMLClass`
|
||||
A public class with one auto-implemented property:
|
||||
- `public string Hardware { get; set; }`
|
||||
Gets or sets the hardware identifier (e.g., a hardware name or model string). This property is intended to hold the value that will be serialized to or deserialized from an XML element or attribute named `Hardware`.
|
||||
|
||||
3. **Invariants**
|
||||
- The `Hardware` property may be `null` or an empty string; no validation or non-null enforcement is present in the class itself.
|
||||
- No ordering, uniqueness, or semantic constraints are enforced by this class (e.g., duplicate hardware names are not prevented).
|
||||
- The class is a pure data container with no behavior beyond property accessors.
|
||||
|
||||
4. **Dependencies**
|
||||
- **Dependencies on external modules**:
|
||||
- `System` (core runtime types: `string`, `System.*` namespaces used implicitly via `using` directives).
|
||||
- Standard .NET libraries (`System.Collections.Generic`, `System.Linq`, etc.) are imported but unused in this file.
|
||||
- **Used by**:
|
||||
- Inferred to be consumed by XML serialization logic elsewhere in `DTS.Common.XMLUtils` (e.g., `XmlSerializer` usage in related classes like `TestSetupXMLClass`, `GroupXMLClass`, etc.).
|
||||
- Likely part of a hierarchy under `TestSetups/TestSetup/Groups/Group/HardwareList/Hardware/` in XML documents (based on file path and namespace).
|
||||
- **Depends on**: Nothing beyond base .NET types.
|
||||
|
||||
5. **Gotchas**
|
||||
- The class name `HardwareXMLClass` is generic and non-descriptive; it does not clarify its specific role (e.g., `HardwareEntry` or `HardwareItem` might be clearer).
|
||||
- No XML serialization attributes (e.g., `[XmlElement]`, `[DataContract]`) are present in this file—serialization behavior depends on how this class is used in *other* types (e.g., via properties in parent classes decorated with attributes).
|
||||
- The property name `Hardware` (same as the class name sans `Class`) may cause confusion in XML output (e.g., `<Hardware>...</Hardware>`), but this is consistent with typical DTO patterns.
|
||||
- No null-safety or defensive copying is implemented; consumers must handle potential `null` values.
|
||||
- None identified from source alone.
|
||||
@@ -0,0 +1,39 @@
|
||||
---
|
||||
source_files:
|
||||
- Common/DTS.Common/XMLUtils/TestSetupExportXML/TestSetups/TestSetup/LevelTriggers/LevelTriggersXMLClass.cs
|
||||
generated_at: "2026-04-16T03:23:04.686420+00:00"
|
||||
model: "Qwen/Qwen3-Coder-Next-FP8"
|
||||
schema_version: 1
|
||||
sha256: "815665b01b3a50dc"
|
||||
---
|
||||
|
||||
# LevelTriggers
|
||||
|
||||
## 1. Purpose
|
||||
This module defines the XML serialization contract for serializing and deserializing a collection of level triggers in the DTS system. Specifically, `LevelTriggersXMLClass` serves as the root container object for a list of `LevelTriggerXMLClass` instances, enabling structured persistence (e.g., to/from XML files) of level-trigger configurations used in test setup workflows. It exists to bridge in-memory test setup data structures with a standardized XML representation, ensuring interoperability and configuration portability.
|
||||
|
||||
## 2. Public Interface
|
||||
- **`LevelTriggersXMLClass`**
|
||||
- **Property**: `public List<LevelTriggerXMLClass> LevelTriggers { get; set; }`
|
||||
- **Behavior**: Holds the collection of level trigger definitions. When serialized using `XmlSerializer`, each item in this list will be serialized as an XML element named `<LevelTrigger>`, due to the `[XmlElement("LevelTrigger")]` attribute. The property is nullable by default (no explicit initialization in the class); callers must ensure it is instantiated (e.g., via constructor or assignment) before use to avoid `NullReferenceException` during serialization/deserialization.
|
||||
|
||||
## 3. Invariants
|
||||
- The `LevelTriggers` property must be a non-null `List<LevelTriggerXMLClass>` before serialization or enumeration to prevent runtime exceptions.
|
||||
- The XML element name for each list item is strictly `"LevelTrigger"` (case-sensitive), as enforced by the `[XmlElement("LevelTrigger")]` attribute.
|
||||
- The class itself is a pure data container with no business logic; it relies entirely on `System.Xml.Serialization` for correct behavior.
|
||||
- No validation is performed on the contents of `LevelTriggers` (e.g., no duplicate checks, no required fields enforced at this level).
|
||||
|
||||
## 4. Dependencies
|
||||
- **Depends on**:
|
||||
- `System.Xml.Serialization` (for `[XmlElement]` attribute and `XmlSerializer` usage)
|
||||
- `DTS.Common.XMLUtils.LevelTriggerXMLClass` (referenced as the generic type argument in `List<LevelTriggerXMLClass>`)
|
||||
- **Depended on by**:
|
||||
- Presumably higher-level XML export/import utilities (e.g., classes responsible for serializing entire test setups) that consume or produce `LevelTriggersXMLClass` instances.
|
||||
- The exact consumers are not visible in this file but would be in modules handling test setup persistence (e.g., classes in `TestSetupExportXML` or similar namespaces).
|
||||
|
||||
## 5. Gotchas
|
||||
- **No default constructor or initialization**: The `LevelTriggers` property is not auto-initialized; it will be `null` unless explicitly set. Callers must instantiate it (e.g., `new LevelTriggersXMLClass { LevelTriggers = new List<LevelTriggerXMLClass>() }`) before adding items or serializing.
|
||||
- **No validation or immutability**: The class provides no safeguards against null items in the list or inconsistent trigger states. Validation must occur at a higher layer.
|
||||
- **Assumes `LevelTriggerXMLClass` is serializable**: If `LevelTriggerXMLClass` lacks proper XML serialization attributes (e.g., `[XmlRoot]`, public properties with getters/setters), deserialization may fail silently or produce incomplete data.
|
||||
- **No versioning or schema awareness**: The class does not include version fields or schema validation logic; changes to `LevelTriggerXMLClass` may break backward compatibility without explicit handling elsewhere.
|
||||
- **None identified from source alone** for behavioral quirks beyond the above—no comments, legacy attributes, or non-standard patterns are present.
|
||||
@@ -0,0 +1,62 @@
|
||||
---
|
||||
source_files:
|
||||
- Common/DTS.Common/XMLUtils/TestSetupExportXML/TestSetups/TestSetup/LevelTriggers/LevelTrigger/LevelTriggerXMLClass.cs
|
||||
generated_at: "2026-04-16T03:24:08.238330+00:00"
|
||||
model: "Qwen/Qwen3-Coder-Next-FP8"
|
||||
schema_version: 1
|
||||
sha256: "0d387ec11db220dd"
|
||||
---
|
||||
|
||||
# LevelTrigger
|
||||
|
||||
### **Purpose**
|
||||
This module defines a data contract class (`LevelTriggerXMLClass`) used for serializing and deserializing level trigger configuration data to and from XML, specifically within the context of test setup export/import workflows. It serves as a structured representation of threshold-based trigger conditions (e.g., high/low limits, range/zone triggers) associated with a specific sensor channel, enabling persistence and exchange of trigger settings in a human-readable, standards-compliant XML format.
|
||||
|
||||
---
|
||||
|
||||
### **Public Interface**
|
||||
All members are public properties annotated with `[XmlAttribute]`, meaning they serialize as XML attributes (not elements) on the root `<LevelTrigger>` element.
|
||||
|
||||
| Property | Type | Description |
|
||||
|---------|------|-------------|
|
||||
| `GroupChannelId` | `string` | Identifier for the logical group of channels (e.g., a subsystem or test station group). |
|
||||
| `HardwareChannelId` | `string` | Identifier for the physical hardware channel the trigger is associated with. |
|
||||
| `SensorSerialNumber` | `string` | Serial number of the sensor linked to this trigger. |
|
||||
| `GreaterThanEnabled` | `string` | Boolean string (`"true"`/`"false"`) indicating if the *greater than* threshold is active. |
|
||||
| `GreaterThanValue` | `string` | String representation of the numeric threshold value for the *greater than* condition. |
|
||||
| `LessThanEnabled` | `string` | Boolean string (`"true"`/`"false"`) indicating if the *less than* threshold is active. |
|
||||
| `LessThanValue` | `string` | String representation of the numeric threshold value for the *less than* condition. |
|
||||
| `TriggerInside` | `string` | Boolean string (`"true"`/`"false"`) indicating if the trigger fires when the sensor reading is *inside* a specified range. |
|
||||
| `TriggerOutside` | `string` | Boolean string (`"true"`/`"false"`) indicating if the trigger fires when the sensor reading is *outside* a specified range. |
|
||||
| `InsideLowerEU` | `string` | Lower bound (in engineering units) of the "inside" range. |
|
||||
| `InsideUpperEU` | `string` | Upper bound (in engineering units) of the "inside" range. |
|
||||
| `OutsideLowerEU` | `string` | Lower bound (in engineering units) of the "outside" range. |
|
||||
| `OutsideUpperEU` | `string` | Upper bound (in engineering units) of the "outside" range. |
|
||||
|
||||
> **Note**: All properties are `string`-typed (not `bool`/`double`/`decimal`) to support XML serialization/deserialization without type conversion errors. Consumers must parse values as needed.
|
||||
|
||||
---
|
||||
|
||||
### **Invariants**
|
||||
- **No cross-property validation is enforced in this class.** The class is a pure data container; consistency rules (e.g., `TriggerInside` and `TriggerOutside` must not both be `"true"`, or `InsideLowerEU` ≤ `InsideUpperEU`) are expected to be validated by higher-level logic (e.g., during XML import/export or in domain services).
|
||||
- **Order of attributes in XML is not guaranteed.** Since all properties use `[XmlAttribute]`, their serialization order depends on the `XmlSerializer` implementation and may vary.
|
||||
- **Empty or null string values are permitted.** The class does not enforce non-nullability or format validation (e.g., numeric strings for `GreaterThanValue`).
|
||||
|
||||
---
|
||||
|
||||
### **Dependencies**
|
||||
- **Depends on**:
|
||||
- `System.Xml.Serialization` (for `[XmlAttribute]` and `XmlSerializer` support).
|
||||
- Standard .NET libraries (`System`, `System.Collections.Generic`, etc.) — but no custom or external dependencies.
|
||||
- **Used by**:
|
||||
- Likely consumed by XML import/export utilities in `DTS.Common.XMLUtils` (e.g., classes handling `TestSetup` serialization).
|
||||
- Implied integration with test setup configuration systems (e.g., `TestSetup` classes in the same namespace or parent modules), though no direct references are visible in this file.
|
||||
|
||||
---
|
||||
|
||||
### **Gotchas**
|
||||
- **String-typed booleans and numerics**: Consumers must manually parse `GreaterThanEnabled`, `LessThanEnabled`, `TriggerInside`, `TriggerOutside` as `bool` (e.g., `bool.Parse(value)`), and numeric fields (e.g., `GreaterThanValue`, `InsideLowerEU`) as `double`/`decimal`. Failure to handle culture-specific formatting (e.g., decimal separators) may cause runtime errors.
|
||||
- **Ambiguous trigger semantics**: The coexistence of `GreaterThan/LessThan` (point thresholds) and `TriggerInside/TriggerOutside` (range-based) suggests multiple trigger modes, but their mutual exclusivity or precedence is *not defined here*. Conflicts (e.g., both `GreaterThanEnabled="true"` and `TriggerInside="true"`) are possible without external validation.
|
||||
- **No versioning or extensibility markers**: The class lacks `[XmlRoot]`, `[XmlElement]`, or version attributes. Adding/removing fields in future versions may break backward/forward compatibility.
|
||||
- **No validation on EU range ordering**: `InsideLowerEU` > `InsideUpperEU` or `OutsideLowerEU` > `OutsideUpperEU` are syntactically valid but likely semantically invalid. This must be enforced elsewhere.
|
||||
- **None identified from source alone.** (Note: The above are inferred from common pitfalls with this pattern, but the source provides no explicit guidance.)
|
||||
@@ -0,0 +1,38 @@
|
||||
---
|
||||
source_files:
|
||||
- Common/DTS.Common/XMLUtils/TestSetupExportXML/TestSetups/TestSetup/MetaDatas/MetaDatasXMLClass.cs
|
||||
generated_at: "2026-04-16T03:22:54.729886+00:00"
|
||||
model: "Qwen/Qwen3-Coder-Next-FP8"
|
||||
schema_version: 1
|
||||
sha256: "cb93eb977a3f9421"
|
||||
---
|
||||
|
||||
# MetaDatas
|
||||
|
||||
### 1. Purpose
|
||||
This module defines a serializable data structure (`MetaDatasXMLClass`) for representing a collection of metadata entries in XML format, specifically intended for export during test setup serialization. It serves as a top-level container in the XML serialization pipeline for `MetaDataXMLClass` objects, enabling structured persistence and reconstruction of metadata associated with test setups.
|
||||
|
||||
### 2. Public Interface
|
||||
- **`MetaDatasXMLClass`**
|
||||
- **`List<MetaDataXMLClass> MetaDatas { get; set; }`**
|
||||
A public property annotated with `[XmlElement("MetaData")]`. When serialized to XML, each element in this list will be serialized as a `<MetaData>` element (not wrapped in a container element). The property supports both get and set, allowing deserialization and programmatic population.
|
||||
|
||||
### 3. Invariants
|
||||
- The `MetaDatas` property may be `null` (default value); no explicit initialization is performed.
|
||||
- The list contents must consist solely of `MetaDataXMLClass` instances (or `null` entries if added manually, though this would cause serialization failure).
|
||||
- XML element names for list items are strictly `"MetaData"` (case-sensitive), per the `[XmlElement("MetaData")]` attribute.
|
||||
- No validation is performed on the contents of `MetaDatas` (e.g., duplicate keys, required fields); this is left to downstream logic or `MetaDataXMLClass` itself.
|
||||
|
||||
### 4. Dependencies
|
||||
- **Depends on**:
|
||||
- `System.Collections.Generic` (for `List<T>`)
|
||||
- `System.Xml.Serialization` (for `XmlElementAttribute`)
|
||||
- **Depends on `MetaDataXMLClass`** (referenced as `List<MetaDataXMLClass>`), though its definition is not provided in this file.
|
||||
- **Used by**: Likely consumed by XML serialization/deserialization logic in the broader `DTS.Common.XMLUtils` namespace (e.g., exporters/importers for test setups), but no direct usage is visible in this snippet.
|
||||
|
||||
### 5. Gotchas
|
||||
- **Null list handling**: If `MetaDatas` is `null`, serialization will produce no `<MetaData>` elements (no container element is emitted). This may be intentional, but consumers expecting an empty list to be represented as `<MetaDatas />` or similar will be surprised.
|
||||
- **No constructor initialization**: The property is not auto-initialized (e.g., in a constructor), so callers must explicitly instantiate the list before adding items to avoid `NullReferenceException` during population.
|
||||
- **No documentation on `MetaDataXMLClass`**: Behavior of the list items (e.g., required fields, serialization format) is unknown without its definition.
|
||||
- **Ambiguous naming**: The class name `MetaDatasXMLClass` (plural) vs. property name `MetaDatas` (also plural) may cause confusion—ensure consistency with naming conventions elsewhere in the codebase.
|
||||
- **No validation or immutability**: The class is a simple POCO with no guards against invalid state (e.g., duplicate metadata IDs, malformed values).
|
||||
@@ -0,0 +1,56 @@
|
||||
---
|
||||
source_files:
|
||||
- Common/DTS.Common/XMLUtils/TestSetupExportXML/TestSetups/TestSetup/MetaDatas/MetaData/MetaDataXMLClass.cs
|
||||
generated_at: "2026-04-16T03:23:25.026751+00:00"
|
||||
model: "Qwen/Qwen3-Coder-Next-FP8"
|
||||
schema_version: 1
|
||||
sha256: "d682dbe3a35b977c"
|
||||
---
|
||||
|
||||
# MetaData
|
||||
|
||||
## 1. Purpose
|
||||
This module defines a data transfer object (`MetaDataXMLClass`) used for serializing and deserializing metadata associated with test setups in XML format. It serves as a structured representation of metadata attributes—such as the test object being configured, the setup name, property name, property value, optional flag, and version—enabling persistence and interchange of test configuration metadata in a standardized XML schema.
|
||||
|
||||
## 2. Public Interface
|
||||
The class exposes only a parameterless constructor (implicitly defined by C#) and six public properties, all decorated with `[XmlAttribute]` for XML serialization:
|
||||
|
||||
- **`string TestObject { get; set; }`**
|
||||
Represents the name or identifier of the test object to which the metadata applies. Serialized as an XML attribute.
|
||||
|
||||
- **`string SetupName { get; set; }`**
|
||||
Represents the name of the test setup context. Serialized as an XML attribute.
|
||||
|
||||
- **`string PropName { get; set; }`**
|
||||
Represents the name of the property being described by this metadata entry. Serialized as an XML attribute.
|
||||
|
||||
- **`string PropValue { get; set; }`**
|
||||
Represents the value assigned to the property (`PropName`). Serialized as an XML attribute.
|
||||
|
||||
- **`string Optional { get; set; }`**
|
||||
Indicates whether the property is optional (e.g., `"true"` or `"false"` as a string). Serialized as an XML attribute. *Note: Stored as string, not boolean.*
|
||||
|
||||
- **`string Version { get; set; }`**
|
||||
Represents the version associated with this metadata entry. Serialized as an XML attribute.
|
||||
|
||||
## 3. Invariants
|
||||
- All properties are nullable (`string`) and may be `null` unless constrained by external logic (e.g., XML schema validation or consumer expectations).
|
||||
- All properties are serialized as XML attributes (not elements), per the `[XmlAttribute]` attributes.
|
||||
- No validation is performed within the class itself (e.g., no null checks, format validation, or cross-property consistency enforcement).
|
||||
- The class is intended for use with `System.Xml.Serialization.XmlSerializer`; behavior is undefined if used with other serializers without explicit configuration.
|
||||
|
||||
## 4. Dependencies
|
||||
- **Depends on**:
|
||||
- `System.Xml.Serialization` (for `[XmlAttribute]` attribute)
|
||||
- Standard .NET libraries (`System`, `System.Collections.Generic`, `System.Linq`, `System.Text`, `System.Threading.Tasks`)
|
||||
- **Used by**:
|
||||
- Presumably other components in `DTS.Common.XMLUtils` (e.g., XML export/import logic for test setups), though no direct references are visible in the provided source.
|
||||
- Any code that consumes or produces XML representations of test setup metadata.
|
||||
|
||||
## 5. Gotchas
|
||||
- **String-typed boolean**: The `Optional` property is a `string`, not a `bool`. Consumers must manually parse `"true"`/`"false"` (case-sensitive or culture-invariant parsing may be required).
|
||||
- **No default values**: Properties default to `null`; XML serialization will omit attributes for `null` values (unless `XmlSerializer` is configured otherwise), which may lead to missing attributes in output.
|
||||
- **No validation or normalization**: Values like `PropValue` or `Version` are stored as-is; no validation for format (e.g., semantic versioning) or content (e.g., reserved keywords) is performed.
|
||||
- **Ambiguous semantics**: The meaning of `TestObject`, `SetupName`, and `Version` is not self-evident from this class alone (e.g., is `TestObject` a class name, instance ID, or test type?). External documentation or usage context is required.
|
||||
- **No immutability or copy semantics**: The class is mutable; changes to properties after serialization may not be reflected in persisted data unless re-serialized.
|
||||
- **None identified from source alone.**
|
||||
Reference in New Issue
Block a user