init
This commit is contained in:
@@ -0,0 +1,229 @@
|
||||
---
|
||||
source_files:
|
||||
- Common/DTS.CommonCore/Interface/Viewer/TestDefinition/ITestMetadata.cs
|
||||
- Common/DTS.CommonCore/Interface/Viewer/TestDefinition/ITestGraphs.cs
|
||||
- Common/DTS.CommonCore/Interface/Viewer/TestDefinition/ITestSetupMetadata.cs
|
||||
- Common/DTS.CommonCore/Interface/Viewer/TestDefinition/ITestSummary.cs
|
||||
- Common/DTS.CommonCore/Interface/Viewer/TestDefinition/ITestRunMetadata.cs
|
||||
- Common/DTS.CommonCore/Interface/Viewer/TestDefinition/ITestModule.cs
|
||||
- Common/DTS.CommonCore/Interface/Viewer/TestDefinition/ITestChannel.cs
|
||||
- Common/DTS.CommonCore/Interface/Viewer/TestDefinition/ITestCalculatedChannel.cs
|
||||
generated_at: "2026-04-16T02:35:18.903149+00:00"
|
||||
model: "Qwen/Qwen3-Coder-Next-FP8"
|
||||
schema_version: 1
|
||||
sha256: "2b62dbe801084083"
|
||||
---
|
||||
|
||||
# Documentation: Test Definition Interfaces
|
||||
|
||||
## 1. Purpose
|
||||
This module defines a set of interfaces that model metadata for test execution and data capture within the DTS (presumably Data Acquisition and Test System) viewer framework. It establishes a structured contract for representing hierarchical test metadata—from high-level test summaries down to individual channels and modules—including run-level configuration, setup details, graph definitions, and channel-specific calibration and acquisition parameters. These interfaces serve as the foundational data model for test result visualization, analysis, and reporting components, enabling consumers to access metadata without coupling to concrete implementations.
|
||||
|
||||
## 2. Public Interface
|
||||
|
||||
### `ITestMetadata`
|
||||
- **Namespace**: `DTS.Common.Interface.TestDefinition`
|
||||
- **Properties**:
|
||||
- `ITestRunMetadata TestRun { get; set; }` – Top-level metadata for a specific test run (e.g., execution context, modules, channels).
|
||||
- `ITestSetupMetadata TestSetup { get; set; }` – Metadata describing the physical setup and environment at test start (e.g., date, graphs, setup name).
|
||||
|
||||
### `ITestGraphs`
|
||||
- **Namespace**: `DTS.Common.Interface`
|
||||
- **Properties**:
|
||||
- `string Name { get; set; }` – Human-readable name of the graph.
|
||||
- `string HardwareChannelName { get; set; }` – Name of the hardware channel associated with this graph.
|
||||
- `List<string> ChannelId { get; set; }` – Ordered list of channel IDs included in this graph.
|
||||
|
||||
### `ITestSetupMetadata`
|
||||
- **Namespace**: `DTS.Common.Interface`
|
||||
- **Properties**:
|
||||
- `string Name { get; set; }` – Name of the test setup.
|
||||
- `DateTime TestDate { get; set; }` – Date the test was performed.
|
||||
- `DateTime TimeStamp { get; set; }` – Timestamp of setup metadata creation/update.
|
||||
- `List<ITestGraphs> TestGraphs { get; set; }` – Collection of graph definitions associated with this setup.
|
||||
|
||||
### `ITestSummary`
|
||||
- **Namespace**: `DTS.Common.Interface.TestDefinition`
|
||||
- **Inherits**: `IBaseClass` (not defined in provided source)
|
||||
- **Properties**:
|
||||
- `string Id { get; set; }` – Unique identifier for the test summary.
|
||||
- `string Name { get; set; }` – Human-readable test name.
|
||||
- `string Description { get; set; }` – Free-form description of the test.
|
||||
- `int ChannelCount { get; set; }` – Total number of channels (including calculated).
|
||||
- `DateTime TestDate { get; set; }` – Date/time of the test.
|
||||
- `string DataType { get; set; }` – Type of data collected (e.g., "Raw", "Processed").
|
||||
- `bool IsSelected { get; set; }` – Flag indicating if this test summary is selected in UI.
|
||||
- `List<ITestGraphs> Graphs { get; set; }` – Graphs associated with this summary.
|
||||
- `List<ITestChannel> Channels { get; set; }` – Physical channels captured during the test.
|
||||
- `List<ITestChannel> CalculatedChannels { get; set; }` – Channels derived via calculation (note: type is `ITestChannel`, not `ITestCalculatedChannel`).
|
||||
- `IBaseViewModel Parent { get; set; }` – Parent view model (requires `IBaseViewModel` definition).
|
||||
|
||||
### `ITestRunMetadata`
|
||||
- **Namespace**: `DTS.Common.Interface`
|
||||
- **Inherits**: `INotifyPropertyChanged`
|
||||
- **Properties**:
|
||||
- `string Id { get; set; }` – Unique identifier for the test run.
|
||||
- `string Description { get; set; }` – Description of the test run.
|
||||
- `bool InlineSerializedData { get; set; }` – Indicates if raw data is embedded inline in metadata (vs. external file).
|
||||
- `string TestGuid { get; set; }` – Globally unique identifier for the test.
|
||||
- `int FaultFlags { get; set; }` – Bitmask of fault conditions encountered during test.
|
||||
- `string Software { get; set; }` – Name of software used for acquisition.
|
||||
- `string SoftwareVersion { get; set; }` – Version of acquisition software.
|
||||
- `string DataType { get; set; }` – Data type identifier (e.g., "Raw", "Processed").
|
||||
- `List<ITestModule> Modules { get; set; }` – List of hardware modules used in the test.
|
||||
- `List<ITestChannel> Channels { get; set; }` – Physical channels in the test.
|
||||
- `List<ITestChannel> CalculatedChannels { get; set; }` – Calculated channels (note: type is `ITestChannel`, not `ITestCalculatedChannel`).
|
||||
|
||||
### `ITestModule`
|
||||
- **Namespace**: `DTS.Common.Interface`
|
||||
- **Inherits**: `INotifyPropertyChanged`
|
||||
- **Properties**:
|
||||
- `string SerialNumber { get; set; }` – Unique serial number of the module.
|
||||
- `string BaseSerialNumber { get; set; }` – Base serial number (e.g., chassis ID).
|
||||
- `int AaFilterRateHz { get; set; }` – Anti-aliasing filter rate in Hz.
|
||||
- `int Number { get; set; }` – Module number/index.
|
||||
- `int NumberOfSamples { get; set; }` – Number of samples *after* subsampling.
|
||||
- `int UnsubsampledNumberOfSamples { get; set; }` – Number of samples *before* subsampling.
|
||||
- `double RequestedPostTriggerSeconds { get; set; }` – User-requested post-trigger time.
|
||||
- `double RequestedPreTriggerSeconds { get; set; }` – User-requested pre-trigger time.
|
||||
- `double PostTriggerSeconds { get; set; }` – Actual post-trigger time (may differ from requested).
|
||||
- `double PreTriggerSeconds { get; set; }` – Actual pre-trigger time.
|
||||
- `string RecordingMode { get; set; }` – e.g., "Continuous", "Event".
|
||||
- `int SampleRateHz { get; set; }` – Effective sample rate (post-subsample).
|
||||
- `int StartRecordSampleNumber { get; set; }` – Sample index where recording started.
|
||||
- `int NumberOfChannels { get; set; }` – Number of active channels on this module.
|
||||
- `bool InlineSerializedData { get; set; }` – Indicates if raw data is embedded inline.
|
||||
- `int StartRecordTimestampSec { get; set; }` – Start record timestamp (seconds).
|
||||
- `int StartRecordTimestampNanoSec { get; set; }` – Start record timestamp (nanoseconds).
|
||||
- `int TriggerTimestampSec { get; set; }` – Trigger timestamp (seconds).
|
||||
- `int TriggerTimestampNanoSec { get; set; }` – Trigger timestamp (nanoseconds).
|
||||
- `bool PTPMasterSync { get; set; }` – Indicates if Precision Time Protocol master sync was used.
|
||||
- `int TiltSensorAxisX/Y/ZDegreesPre/Post { get; set; }` – Tilt sensor readings (pre/post test).
|
||||
- `int TemperatureLocation1-4Pre/Post { get; set; }` – Temperature readings (pre/post test).
|
||||
- `List<ITestChannel> TestChannels { get; set; }` – Channels assigned to this module.
|
||||
|
||||
### `ITestChannel`
|
||||
- **Namespace**: `DTS.Common.Interface`
|
||||
- **Inherits**: `INotifyPropertyChanged`
|
||||
- **Properties**:
|
||||
- `string SerialNumber { get; set; }` – Serial number of the sensor/module.
|
||||
- `string ChannelId { get; set; }` – Unique channel identifier (e.g., "CH1").
|
||||
- `string Description { get; set; }` – Human-readable description.
|
||||
- `string ChannelGroupName { get; set; }` – Group name for channel organization.
|
||||
- `string ChannelType { get; set; }` – e.g., "Strain", "Voltage", "Temperature".
|
||||
- `int Number { get; set; }` – Channel index.
|
||||
- `string DigitalMultiplier { get; set; }` – Multiplier for digital channels.
|
||||
- `string DigitalMode { get; set; }` – e.g., "Counter", "Encoder".
|
||||
- `DateTime Start { get; set; }` – Start time of channel recording.
|
||||
- `string Bridge { get; set; }` – Bridge configuration (e.g., "Full", "Half").
|
||||
- `double BridgeResistanceOhms { get; set; }` – Bridge resistance in ohms.
|
||||
- `double ZeroPoint { get; set; }` – Zero-point offset.
|
||||
- `string ChannelDescriptionString { get; set; }` – Full description string.
|
||||
- `string ChannelName2 { get; set; }` – Alternate channel name.
|
||||
- `string HardwareChannelName { get; set; }` – Hardware-level channel name.
|
||||
- `double DesiredRange { get; set; }` – Desired measurement range.
|
||||
- `double Sensitivity { get; set; }` – Sensor sensitivity (e.g., mV/V).
|
||||
- `string SoftwareFilter { get; set; }` – Applied software filter (e.g., "MovingAverage").
|
||||
- `bool ProportionalToExcitation { get; set; }` – Whether output is proportional to excitation.
|
||||
- `bool IsInverted { get; set; }` – Whether signal is inverted.
|
||||
- `string LinearizationFormula { get; set; }` – Formula used for linearization.
|
||||
- `bool IsSubsampled { get; set; }` – Whether data was subsampled.
|
||||
- `int AbsoluteDisplayOrder { get; set; }` – Display order index.
|
||||
- `DateTime LastCalibrationDate { get; set; }` – Last calibration timestamp.
|
||||
- `string SensorId { get; set; }` – Sensor identifier.
|
||||
- `int OffsetToleranceLowMv { get; set; }` – Low tolerance for offset check (mV).
|
||||
- `int OffsetToleranceHighMv { get; set; }` – High tolerance for offset check (mV).
|
||||
- `int DataFlag { get; set; }` – Data quality flag (bitmask).
|
||||
- `string ExcitationVoltage { get; set; }` – Excitation voltage setting (e.g., "2.5V").
|
||||
- `string Eu { get; set; }` – Engineering units (e.g., "lbf", "°C").
|
||||
- `bool CalSignalEnabled { get; set; }` – Whether calibration signal was enabled.
|
||||
- `bool ShuntEnabled { get; set; }` – Whether shunt calibration was enabled.
|
||||
- `bool VoltageInsertionCheckEnabled { get; set; }` – Whether voltage insertion check was active.
|
||||
- `bool RemoveOffset { get; set; }` – Whether offset removal was applied.
|
||||
- `string ZeroMethod { get; set; }` – Method used for zeroing (e.g., "Average", "Manual").
|
||||
- `double ZeroAverageWindowBegin { get; set; }` – Start time of zero averaging window.
|
||||
- `double ZeroAverageWindowEnd { get; set; }` – End time of zero averaging window.
|
||||
- `int InitialEu { get; set; }` – Initial engineering unit value.
|
||||
- `string InitialOffset { get; set; }` – Initial offset value (string format).
|
||||
- `int UnsubsampledSampleRateHz { get; set; }` – Sample rate before subsampling.
|
||||
- `double MeasuredShuntDeflectionMv { get; set; }` – Measured shunt deflection (mV).
|
||||
- `double TargetShuntDeflectionMv { get; set; }` – Target shunt deflection (mV).
|
||||
- `double MeasuredExcitationVoltage { get; set; }` – Actual measured excitation voltage.
|
||||
- `double FactoryExcitationVoltage { get; set; }` – Factory-set excitation voltage.
|
||||
- `double TimeOfFirstSample { get; set; }` – Timestamp of first sample (seconds).
|
||||
- `int Multiplier { get; set; }` – Channel-specific multiplier.
|
||||
- `int UserOffsetEu { get; set; }` – User-defined offset in engineering units.
|
||||
- `int UnitConversion { get; set; }` – Unit conversion type/index.
|
||||
- `bool AtCapacity { get; set; }` – Whether channel was at full-scale capacity.
|
||||
- `int CapacityOutputIsBasedOn { get; set; }` – Reference for capacity calculation.
|
||||
- `string SourceChannelNumber { get; set; }` – Source channel number (for calculated channels).
|
||||
- `string SourceModuleNumber { get; set; }` – Source module number.
|
||||
- `string SourceModuleSerialNumber { get; set; }` – Source module serial number.
|
||||
- `string Calculation { get; set; }` – Formula/expression for calculated channels.
|
||||
- `int SampleRateHz { get; set; }` – Effective sample rate.
|
||||
- `string SensitivityUnits { get; set; }` – Units for sensitivity (e.g., "mV/V/lbf").
|
||||
- `int SensorCapacity { get; set; }` – Sensor full-scale capacity.
|
||||
|
||||
### `ITestCalculatedChannel`
|
||||
- **Namespace**: `DTS.Common.Interface`
|
||||
- **Inherits**: `INotifyPropertyChanged`
|
||||
- **Properties**:
|
||||
- Identical to `ITestChannel` *except*:
|
||||
- `int BridgeResistanceOhms { get; set; }` (vs. `double` in `ITestChannel`).
|
||||
- `int ExcitationVoltage { get; set; }` (vs. `string` in `ITestChannel`).
|
||||
- **Note**: Despite its name, this interface is *not* used in `ITestRunMetadata.CalculatedChannels` or `ITestSummary.CalculatedChannels`, which both declare `List<ITestChannel>`.
|
||||
|
||||
## 3. Invariants
|
||||
|
||||
- **`ITestRunMetadata` and `ITestSummary`**:
|
||||
- `Channels` and `CalculatedChannels` are declared as `List<ITestChannel>` in both interfaces, implying calculated channels are *not* typed as `ITestCalculatedChannel` in the current model.
|
||||
- `DataType` appears in both `ITestRunMetadata` and `ITestSummary`, but its value may be inconsistent across levels (no enforcement of consistency).
|
||||
- **`ITestModule`**:
|
||||
- `StartRecordTimestampSec/NanoSec` and `TriggerTimestampSec/NanoSec` are separate; no combined timestamp is defined.
|
||||
- Pre/post tilt/temperature readings are stored as integers (likely in °C or °F), but units are not specified.
|
||||
- **`ITestChannel` vs `ITestCalculatedChannel`**:
|
||||
- `BridgeResistanceOhms` is `double` in `ITestChannel` but `int` in `ITestCalculatedChannel`—a type mismatch for the same logical property.
|
||||
- `ExcitationVoltage` is `string` in `ITestChannel` but `int` in `ITestCalculatedChannel`.
|
||||
- **`ITestSummary`**:
|
||||
- `CalculatedChannels` is declared as `List<ITestChannel>`, not `List<ITestCalculatedChannel>`, suggesting calculated channels are stored using the base `ITestChannel` interface.
|
||||
|
||||
## 4. Dependencies
|
||||
|
||||
### This module depends on:
|
||||
- `System.Collections.Generic` (for `List<T>`)
|
||||
- `System.ComponentModel` (for `INotifyPropertyChanged`)
|
||||
- `System` (for `DateTime`, `string`, `int`, `double`, `bool`)
|
||||
- `DTS.Common.Base` (for `IBaseClass` and `IBaseViewModel`, referenced but not provided)
|
||||
|
||||
### This module is depended upon by:
|
||||
- Any consumer of test metadata (e.g., UI viewers, analysis tools, serialization layers).
|
||||
- Concrete implementations of these interfaces (not provided in source).
|
||||
- Likely used by modules handling test data export, reporting, and visualization.
|
||||
|
||||
## 5. Gotchas
|
||||
|
||||
- **Type Mismatch in `BridgeResistanceOhms` and `ExcitationVoltage`**:
|
||||
`ITestChannel` uses `double` for `BridgeResistanceOhms` and `string` for `ExcitationVoltage`, while `ITestCalculatedChannel` uses `int` for both. This inconsistency may cause runtime errors or require explicit casting/conversion in implementations.
|
||||
|
||||
- **`ITestCalculatedChannel` is unused in public interfaces**:
|
||||
Despite defining `ITestCalculatedChannel`, both `ITestRunMetadata.CalculatedChannels` and `ITestSummary.CalculatedChannels` are declared as `List<ITestChannel>`. This suggests either:
|
||||
(a) Calculated channels are stored as `ITestChannel` with a `Calculation` property, or
|
||||
(b) The interface is legacy/unused.
|
||||
|
||||
- **Ambiguous timestamp handling**:
|
||||
Timestamps are split into `Sec` and `NanoSec` fields (e.g., `TriggerTimestampSec`, `TriggerTimestampNanoSec`), but no combined `DateTime` or `TimeSpan` is provided. Consumers must manually reconstruct timestamps.
|
||||
|
||||
- **No validation or null-safety guarantees**:
|
||||
All properties are read/write with no explicit null checks or validation rules. Implementations must handle missing data (e.g., empty `List<T>` vs `null`).
|
||||
|
||||
- **`HardwareChannelName` appears in multiple interfaces**:
|
||||
Defined in `ITestGraphs`, `ITestChannel`, and `ITestCalculatedChannel`—but not guaranteed to be consistent across them.
|
||||
|
||||
- **`InitialOffset` is `string`**:
|
||||
Despite other offset-related fields being numeric, `InitialOffset` is a string (e.g., "0.5"), requiring parsing for numeric operations.
|
||||
|
||||
- **No explicit ordering guarantees**:
|
||||
`List<T>` properties (e.g., `Modules`, `Channels`, `TestGraphs`) have no documented ordering semantics. Consumers should not assume order unless validated by implementation.
|
||||
|
||||
- **`SensorCapacity` vs `CapacityOutputIsBasedOn`**:
|
||||
The meaning of `
|
||||
@@ -0,0 +1,44 @@
|
||||
---
|
||||
source_files:
|
||||
- Common/DTS.CommonCore/Interface/Viewer/TestModule/ITestModuleView.cs
|
||||
- Common/DTS.CommonCore/Interface/Viewer/TestModule/ITestModuleViewModel.cs
|
||||
generated_at: "2026-04-16T02:34:29.141077+00:00"
|
||||
model: "Qwen/Qwen3-Coder-Next-FP8"
|
||||
schema_version: 1
|
||||
sha256: "4507faea757f83cb"
|
||||
---
|
||||
|
||||
# TestModule
|
||||
|
||||
## 1. Purpose
|
||||
This module defines the foundational view and view-model interfaces for a *Test Module* within the application’s viewer layer. It serves as a contract for UI components responsible for displaying and managing test-related functionality—specifically, operations involving .NET `Assembly` inspection or loading. The interfaces `ITestModuleView` and `ITestModuleViewModel` extend base abstractions (`IBaseView`, `IBaseViewModel`) to integrate into a larger MVVM (Model-View-ViewModel) architecture, enabling separation of UI presentation logic from business or test execution concerns.
|
||||
|
||||
## 2. Public Interface
|
||||
- **`ITestModuleView`**
|
||||
- *Signature*: `public interface ITestModuleView : IBaseView`
|
||||
- *Behavior*: A marker interface indicating a UI view (e.g., a WPF `UserControl`, WinForms `Form`, or equivalent) that hosts the test module’s UI. It inherits from `IBaseView`, implying it adheres to a common view contract (e.g., lifecycle management, data context binding), though the specifics of `IBaseView` are not provided here.
|
||||
|
||||
- **`ITestModuleViewModel`**
|
||||
- *Signature*: `public interface ITestModuleViewModel : IBaseViewModel`
|
||||
- *Behavior*: Defines the data and commands exposed to the `ITestModuleView`. It exposes a single property:
|
||||
- `AssemblyList`: A `List<Assembly>` (read-write) representing a collection of loaded .NET assemblies—likely those under test or available for test discovery/execution. The view model is responsible for populating and updating this list, and the view binds to it for display or interaction.
|
||||
|
||||
## 3. Invariants
|
||||
- `ITestModuleView` must be implemented by a concrete UI component that can bind to an `ITestModuleViewModel` instance (via `IBaseView`’s contract, assumed to include a `DataContext` or similar mechanism).
|
||||
- `ITestModuleViewModel.AssemblyList` must be non-null after initialization (implied by its read-write property definition), though the source does not specify whether it is initialized by default.
|
||||
- The `AssemblyList` property is expected to hold *loaded* `Assembly` instances (e.g., via `Assembly.Load*`), but the source does not define thread-safety, mutation semantics, or lifecycle constraints (e.g., whether assemblies may be unloaded or modified externally).
|
||||
|
||||
## 4. Dependencies
|
||||
- **Depends on**:
|
||||
- `DTS.Common.Base` namespace (specifically `IBaseView` and `IBaseViewModel`—behavior inferred but not defined here).
|
||||
- `System.Collections.Generic` (for `List<T>`).
|
||||
- `System.Reflection` (for `Assembly`).
|
||||
- **Depended on by**:
|
||||
- Concrete implementations of `ITestModuleView` (e.g., a WPF view class) and `ITestModuleViewModel` (e.g., a view model class handling test assembly management).
|
||||
- Likely consumed by a DI container or module loader in the `DTS.Common.Interface` layer to wire up test module UI components.
|
||||
|
||||
## 5. Gotchas
|
||||
- **Ambiguity in `AssemblyList` semantics**: The interface does not specify whether `AssemblyList` is *owned* by the view model (e.g., populated internally) or *observed* from an external source (e.g., shared state). This could lead to confusion about responsibility for assembly loading/unloading.
|
||||
- **No mutability guarantees**: The property is read-write, but there is no indication of whether changes to the list (e.g., `AssemblyList.Add(...)`) trigger UI updates (e.g., via `INotifyPropertyChanged`). If `IBaseViewModel` does not enforce change notification, consumers may need to manually raise events.
|
||||
- **No versioning or compatibility notes**: Given the proprietary context, future changes to `AssemblyList` (e.g., replacing `List<Assembly>` with `ImmutableArray<Assembly>`) could break implementations without warning.
|
||||
- **None identified from source alone** for other aspects (e.g., no obvious threading or disposal requirements).
|
||||
Reference in New Issue
Block a user