init
This commit is contained in:
57
docs/ai/Common/DTS.Common.Serialization/TestSetup/Graph.md
Normal file
57
docs/ai/Common/DTS.Common.Serialization/TestSetup/Graph.md
Normal file
@@ -0,0 +1,57 @@
|
||||
---
|
||||
source_files:
|
||||
- Common/DTS.Common.Serialization/TestSetup/Graph/Graph.cs
|
||||
- Common/DTS.Common.Serialization/TestSetup/Graph/Channel.cs
|
||||
generated_at: "2026-04-17T16:26:22.110592+00:00"
|
||||
model: "zai-org/GLM-5-FP8"
|
||||
schema_version: 1
|
||||
sha256: "1596815b04ddd43d"
|
||||
---
|
||||
|
||||
# Graph
|
||||
|
||||
### Purpose
|
||||
This module defines the data structure for a `TestSetup.Graph` and its nested `Channel` objects. It serves as a serialization-compatible model for test configurations, wrapping properties in a custom `Property` construct (likely for change tracking or validation) and exposing metadata about test channels, hardware associations, and versioning. It acts as a bridge between raw test module definitions and serialized storage formats.
|
||||
|
||||
### Public Interface
|
||||
|
||||
**Class: `TestSetup.Graph`**
|
||||
* `Graph()` - Constructor. Initializes `Name` to null, `Version` to "1.0.0.0", and generates a new `Identifier`.
|
||||
* `void UnSet()` - No-op implementation in current source.
|
||||
* `List<Channel> Channels` - Gets or sets the list of channels associated with this graph.
|
||||
* `string Name` - Gets or sets the name of the graph.
|
||||
* `string HardwareChannelName` - Gets or sets the hardware channel name.
|
||||
* `string DisplayName` - Read-only. Returns `_Name.Value + "_" + _HardwareChannelName.Value`.
|
||||
* `string Version` - Gets or sets the version string.
|
||||
* `bool IsSingleChannelGraph` - (XmlIgnore) Returns true if `Channels` is not null and contains exactly one channel.
|
||||
* `Channel FirstChannel` - (XmlIgnore) Returns the first channel in the `Channels` list.
|
||||
* `Test.Module.Channel FirstTestChannel` - (XmlIgnore) Returns the `TestChannel` property of the first channel in the list.
|
||||
* `Guid Identifier` - (XmlIgnore) Gets a unique identifier for this graph instance; set privately by constructor.
|
||||
|
||||
**Class: `TestSetup.Graph.Channel`**
|
||||
* `Channel(Test.Module.Channel channel)` - Constructor. Initializes the channel from a `Test.Module.Channel` object.
|
||||
* `Channel(string channelId)` - Constructor. Initializes with a specific string ID; sets `ParentTestModule` and `TestChannel` to null.
|
||||
* `Channel(long groupChannelId)` - Constructor. Initializes with a long ID converted to string; sets `ParentTestModule` and `TestChannel` to null.
|
||||
* `string ChannelId` - Gets or sets the unique ID for the logical channel.
|
||||
* `string ChannelGroupName` - Gets or sets the group name.
|
||||
* `string Name` - Read-only. Returns `TestChannel.ChannelDescriptionString` or "Not Set".
|
||||
* `string SensorName` - (XmlIgnore) Returns `TestChannel.ChannelDescriptionString` or "Not Set".
|
||||
* `string AxisUnit` - (XmlIgnore) Returns engineering units if `TestChannel` is an `AnalogInputChannel`, otherwise "EU".
|
||||
* `string SerialNumber` - (XmlIgnore) Returns `ParentTestModule.SerialNumber` or "Not Set".
|
||||
* `Test.Module ParentTestModule` - (XmlIgnore) Field holding a reference to the parent test module.
|
||||
* `Test.Module.Channel TestChannel` - (XmlIgnore) Field holding a reference to the underlying test channel.
|
||||
|
||||
### Invariants
|
||||
* `Graph.Identifier` is immutable after construction (private setter).
|
||||
* `Graph.Version` defaults to "1.0.0.0" upon instantiation.
|
||||
* `Channel` has a private parameterless constructor, enforcing that instances must be created via one of the public constructors providing data.
|
||||
* `Channel.Name`, `SensorName`, `AxisUnit`, and `SerialNumber` all return "Not Set" (or "EU" for units) if `TestChannel` is null.
|
||||
|
||||
### Dependencies
|
||||
* **Depends on**: `System`, `System.Collections.Generic`, `DTS.Common.Utilities`, `DTS.Common.Utilities.DotNetProgrammingConstructs`, `Test.Module` (referenced in `Channel` constructors and properties).
|
||||
* **Dependents**: Unknown from source alone, but likely serialization logic or test setup management components.
|
||||
|
||||
### Gotchas
|
||||
* **Indexing Risks**: The properties `FirstChannel` and `FirstTestChannel` access `Channels[0]` directly without bounds checking. If `Channels` is null or empty, this will throw an exception.
|
||||
* **DisplayName Format**: `DisplayName` concatenates values with an underscore. If `_Name.Value` is null (the default), the result will start with an underscore (e.g., `_HardwareName`).
|
||||
* **Internal Property Wrappers**: Public properties are backed by `Property` objects. The behavior of these wrappers (e.g., validation logic) is defined in `DTS.Common.Utilities.DotNetProgrammingConstructs` and is not visible here.
|
||||
@@ -0,0 +1,84 @@
|
||||
---
|
||||
source_files:
|
||||
- Common/DTS.Common.Serialization/TestSetup/TestObject/Channel.cs
|
||||
- Common/DTS.Common.Serialization/TestSetup/TestObject/DASHardware.cs
|
||||
- Common/DTS.Common.Serialization/TestSetup/TestObject/DASHardware.DASChannel.cs
|
||||
- Common/DTS.Common.Serialization/TestSetup/TestObject/TestObject.cs
|
||||
generated_at: "2026-04-17T15:38:31.613238+00:00"
|
||||
model: "zai-org/GLM-5-FP8"
|
||||
schema_version: 1
|
||||
sha256: "91ab4a5415c6a0dd"
|
||||
---
|
||||
|
||||
# Documentation: DTS.Serialization TestObject Module
|
||||
|
||||
## 1. Purpose
|
||||
|
||||
This module defines a hierarchical data model for test setup configuration within the DTS (presumably Data Test System) serialization framework. It models physical test objects and their associated Data Acquisition System (DAS) hardware configurations, including channels, sensors, and measurement parameters. The classes are designed as nested partial classes under the `TestSetup` root, all inheriting from `Exceptional`, and use a custom `Property<T>` wrapper for property storage—likely to support serialization tracking, change notification, or validation.
|
||||
|
||||
---
|
||||
|
||||
## 2. Public Interface
|
||||
|
||||
### `TestSetup.TestObject` (partial class)
|
||||
|
||||
**Constructor:**
|
||||
- `TestObject()` — Initializes all string properties to `null`, list properties to empty lists, and `Version` to `"1.0.0.0"`.
|
||||
|
||||
**Properties:**
|
||||
|
||||
| Property | Type | Description |
|
||||
|----------|------|-------------|
|
||||
| `BarrierHeight` | `string` | Barrier height value. |
|
||||
| `BarrierWidth` | `string` | Barrier width value. |
|
||||
| `Channels` | `List<TOChannel>` | Collection of channel configurations. Initialized to empty list. |
|
||||
| `ClassOfTestObject` | `string` | Classification of the test object. |
|
||||
| `CodeOfTestObject` | `string` | Code identifier for the test object. |
|
||||
| `Comment1`, `Comment2`, `Comment3` | `string` | Free-form comment fields. |
|
||||
| `DASHardwares` | `List<DASHardware>` | Collection of DAS hardware configurations. Initialized to empty list. |
|
||||
| `DriverPositionObject` | `string` | Driver position identifier. |
|
||||
| `ExcitationWarmupMS` | `string` | Excitation warmup time in milliseconds. |
|
||||
| `ExtraProperties` | `List<ExtraProperty>` | Collection of additional properties. Initialized to empty list. |
|
||||
| `ImpactSideTestObject` | `string` | Impact side designation. |
|
||||
| `Location` | `string` | Location identifier. |
|
||||
| `MassOfTestObject` | `string` | Mass of the test object. |
|
||||
| `NameOfTestObject` | `string` | Name of the test object. |
|
||||
| `NumberOfLoadCells` | `string` | Number of load cells. |
|
||||
| `Offset` | `string` | Offset value. |
|
||||
| `OriginX`, `OriginY`, `OriginZ` | `string` | 3D origin coordinates. |
|
||||
| `ReferenceSystem` | `string` | Reference system identifier. |
|
||||
| `RefNumberOfTestObject` | `string` | Reference number for the test object. |
|
||||
| `SerialNumber` | `string` | Serial number. |
|
||||
| `TargetSampleRate` | `string` | Target sample rate. |
|
||||
| `Velocity` | `string` | Velocity value. |
|
||||
| `VelocityMeasurementUnit` | `string` | Unit for velocity measurement. |
|
||||
| `Version` | `string` | Version string, defaults to `"1.0.0.0"`. |
|
||||
| `YawAngle` | `string` | Yaw angle value. |
|
||||
|
||||
**Note:** `TypeOfTestObject` is commented out in the source and is not available.
|
||||
|
||||
---
|
||||
|
||||
### `TestSetup.TestObject.TOChannel` (partial class)
|
||||
|
||||
**Constructor:**
|
||||
- `TOChannel()` — Initializes `Name` and `SensorName` to `null`, `Version` to `"1.0.0.0"`.
|
||||
|
||||
**Properties:**
|
||||
|
||||
| Property | Type | Description |
|
||||
|----------|------|-------------|
|
||||
| `Name` | `string` | Channel name. |
|
||||
| `SensorName` | `string` | Associated sensor name. |
|
||||
| `Version` | `string` | Version string, defaults to `"1.0.0.0"`. |
|
||||
|
||||
---
|
||||
|
||||
### `TestSetup.TestObject.DASHardware` (partial class)
|
||||
|
||||
**Constructor:**
|
||||
- `DASHardware()` — Initializes `SampleRate` and `SerialNumber` to `null`, `Version` to `"1.0.0.0"`. `DASChannels` initialized to empty list.
|
||||
|
||||
**Properties:**
|
||||
|
||||
|
|
||||
Reference in New Issue
Block a user