init
This commit is contained in:
@@ -0,0 +1,221 @@
|
||||
---
|
||||
source_files:
|
||||
- Common/DTS.Common/Interface/Viewer/TestDefinition/ITestMetadata.cs
|
||||
- Common/DTS.Common/Interface/Viewer/TestDefinition/ITestGraphs.cs
|
||||
- Common/DTS.Common/Interface/Viewer/TestDefinition/ITestSetupMetadata.cs
|
||||
- Common/DTS.Common/Interface/Viewer/TestDefinition/ITestSummary.cs
|
||||
- Common/DTS.Common/Interface/Viewer/TestDefinition/ITestRunMetadata.cs
|
||||
- Common/DTS.Common/Interface/Viewer/TestDefinition/ITestModule.cs
|
||||
- Common/DTS.Common/Interface/Viewer/TestDefinition/ITestChannel.cs
|
||||
- Common/DTS.Common/Interface/Viewer/TestDefinition/ITestCalculatedChannel.cs
|
||||
generated_at: "2026-04-16T03:10:18.283412+00:00"
|
||||
model: "Qwen/Qwen3-Coder-Next-FP8"
|
||||
schema_version: 1
|
||||
sha256: "89d15132aeb4469a"
|
||||
---
|
||||
|
||||
# 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 component. These interfaces provide a structured, strongly-typed representation of test metadata—including runs, setups, modules, channels (both physical and calculated), and graphs—enabling consistent data exchange and UI binding across the system. They serve as the foundational data contracts for test result visualization, reporting, and analysis workflows, decoupling the UI layer from concrete data implementations while preserving fidelity to the underlying acquisition schema.
|
||||
|
||||
## 2. Public Interface
|
||||
|
||||
### `ITestMetadata`
|
||||
- **Namespace**: `DTS.Common.Interface.TestDefinition`
|
||||
- **Properties**:
|
||||
- `ITestRunMetadata TestRun { get; set; }` – Metadata about the test run (e.g., identifiers, software, fault flags).
|
||||
- `ITestSetupMetadata TestSetup { get; set; }` – Metadata about the test setup (e.g., date, name, associated graphs).
|
||||
|
||||
### `ITestGraphs`
|
||||
- **Namespace**: `DTS.Common.Interface`
|
||||
- **Properties**:
|
||||
- `string Name { get; set; }` – Graph name.
|
||||
- `string HardwareChannelName { get; set; }` – Name of the hardware channel associated with the graph.
|
||||
- `List<string> ChannelId { get; set; }` – Ordered list of channel IDs represented in the graph.
|
||||
|
||||
### `ITestSetupMetadata`
|
||||
- **Namespace**: `DTS.Common.Interface`
|
||||
- **Properties**:
|
||||
- `string Name { get; set; }` – Setup name.
|
||||
- `DateTime TestDate { get; set; }` – Date of the test.
|
||||
- `DateTime TimeStamp { get; set; }` – Timestamp of metadata creation/update.
|
||||
- `List<ITestGraphs> TestGraphs { get; set; }` – List of graphs associated with this setup.
|
||||
|
||||
### `ITestSummary`
|
||||
- **Namespace**: `DTS.Common.Interface.TestDefinition`
|
||||
- **Inherits**: `IBaseClass` (not defined in provided sources)
|
||||
- **Properties**:
|
||||
- `string Id { get; set; }` – Unique identifier for the test.
|
||||
- `string Name { get; set; }` – Human-readable test name.
|
||||
- `string Description { get; set; }` – Test description.
|
||||
- `int ChannelCount { get; set; }` – Total number of channels (physical + calculated).
|
||||
- `DateTime TestDate { get; set; }` – Date of test execution.
|
||||
- `string DataType { get; set; }` – Type of data collected (e.g., "raw", "processed").
|
||||
- `bool IsSelected { get; set; }` – UI selection state.
|
||||
- `List<ITestGraphs> Graphs { get; set; }` – Graphs associated with the test.
|
||||
- `List<ITestChannel> Channels { get; set; }` – Physical channels used in the test.
|
||||
- `List<ITestChannel> CalculatedChannels { get; set; }` – Channels derived via calculation.
|
||||
- `IBaseViewModel Parent { get; set; }` – Parent view model (type `IBaseViewModel` not defined in sources).
|
||||
|
||||
### `ITestRunMetadata`
|
||||
- **Namespace**: `DTS.Common.Interface`
|
||||
- **Inherits**: `INotifyPropertyChanged`
|
||||
- **Properties**:
|
||||
- `string Id { get; set; }` – Unique run identifier.
|
||||
- `string Description { get; set; }` – Run description.
|
||||
- `bool InlineSerializedData { get; set; }` – Indicates if raw data is embedded inline.
|
||||
- `string TestGuid { get; set; }` – Globally unique test identifier.
|
||||
- `int FaultFlags { get; set; }` – Bitmask of fault conditions during the test.
|
||||
- `string Software { get; set; }` – Software name used for acquisition.
|
||||
- `string SoftwareVersion { get; set; }` – Version of acquisition software.
|
||||
- `string DataType { get; set; }` – Data type (e.g., "raw", "calibrated").
|
||||
- `List<ITestModule> Modules { get; set; }` – List of acquisition modules used.
|
||||
- `List<ITestChannel> Channels { get; set; }` – Physical channels in the run.
|
||||
- `List<ITestChannel> CalculatedChannels { get; set; }` – Calculated channels in the run.
|
||||
|
||||
### `ITestModule`
|
||||
- **Namespace**: `DTS.Common.Interface`
|
||||
- **Inherits**: `INotifyPropertyChanged`
|
||||
- **Properties**:
|
||||
- `string SerialNumber { get; set; }` – Module serial number.
|
||||
- `string BaseSerialNumber { get; set; }` – Base/parent module serial number (for daisy chains).
|
||||
- `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; }` – Requested post-trigger time (s).
|
||||
- `double RequestedPreTriggerSeconds { get; set; }` – Requested pre-trigger time (s).
|
||||
- `double PostTriggerSeconds { get; set; }` – Actual post-trigger time (s).
|
||||
- `double PreTriggerSeconds { get; set; }` – Actual pre-trigger time (s).
|
||||
- `string RecordingMode { get; set; }` – e.g., "continuous", "triggered".
|
||||
- `int SampleRateHz { get; set; }` – Effective sample rate (Hz) after subsampling.
|
||||
- `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 PTP (Precision Time Protocol) master sync status.
|
||||
- `int TiltSensorAxisX/Y/ZDegreesPre/Post { get; set; }` – Tilt sensor readings (pre/post test).
|
||||
- `int TemperatureLocation1/2/3/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; }` – Channel/sensor serial number.
|
||||
- `string ChannelId { get; set; }` – Unique channel identifier.
|
||||
- `string Description { get; set; }` – Human-readable description.
|
||||
- `string ChannelGroupName { get; set; }` – Logical group name (e.g., "Strain", "Temperature").
|
||||
- `string ChannelType { get; set; }` – e.g., "analog", "digital", "calculated".
|
||||
- `int Number { get; set; }` – Channel index within module.
|
||||
- `string DigitalMultiplier { get; set; }` – Digital scaling multiplier.
|
||||
- `string DigitalMode { get; set; }` – Digital input mode (e.g., "counter", "encoder").
|
||||
- `DateTime Start { get; set; }` – Channel start time.
|
||||
- `string Bridge { get; set; }` – Bridge configuration (e.g., "quarter", "full").
|
||||
- `double BridgeResistanceOhms { get; set; }` – Bridge resistance (Ω).
|
||||
- `double ZeroPoint { get; set; }` – Zero-point offset (e.g., mV).
|
||||
- `string ChannelDescriptionString { get; set; }` – Raw 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., "moving average").
|
||||
- `bool ProportionalToExcitation { get; set; }` – Whether output is proportional to excitation.
|
||||
- `bool IsInverted { get; set; }` – Inversion flag.
|
||||
- `string LinearizationFormula { get; set; }` – Formula used for linearization.
|
||||
- `bool IsSubsampled { get; set; }` – Whether data was subsampled.
|
||||
- `int AbsoluteDisplayOrder { get; set; }` – Display order across all channels.
|
||||
- `DateTime LastCalibrationDate { get; set; }` – Last calibration date.
|
||||
- `string SensorId { get; set; }` – Sensor ID.
|
||||
- `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.
|
||||
- `string ExcitationVoltage { get; set; }` – Excitation voltage setting (e.g., "2.5V").
|
||||
- `string Eu { get; set; }` – Engineering units (e.g., "psi", "°C").
|
||||
- `bool CalSignalEnabled { get; set; }` – Calibration signal enabled.
|
||||
- `bool ShuntEnabled { get; set; }` – Shunt calibration enabled.
|
||||
- `bool VoltageInsertionCheckEnabled { get; set; }` – Voltage insertion check enabled.
|
||||
- `bool RemoveOffset { get; set; }` – Whether to remove offset.
|
||||
- `string ZeroMethod { get; set; }` – Zeroing method (e.g., "manual", "auto").
|
||||
- `double ZeroAverageWindowBegin { get; set; }` – Start of zeroing window (s).
|
||||
- `double ZeroAverageWindowEnd { get; set; }` – End of zeroing window (s).
|
||||
- `int InitialEu { get; set; }` – Initial engineering unit value.
|
||||
- `string InitialOffset { get; set; }` – Initial offset value.
|
||||
- `int UnsubsampledSampleRateHz { get; set; }` – Sample rate before subsampling (Hz).
|
||||
- `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; }` – Time of first sample (seconds).
|
||||
- `int Multiplier { get; set; }` – Scaling 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 is at full-scale capacity.
|
||||
- `int CapacityOutputIsBasedOn { get; set; }` – Reference for capacity calculation.
|
||||
- `string SourceChannelNumber { get; set; }` – Source channel index (for calculated channels).
|
||||
- `string SourceModuleNumber { get; set; }` – Source module index (for calculated channels).
|
||||
- `string SourceModuleSerialNumber { get; set; }` – Source module serial (for calculated channels).
|
||||
- `string Calculation { get; set; }` – Calculation expression (for calculated channels).
|
||||
- `int SampleRateHz { get; set; }` – Effective sample rate (Hz).
|
||||
- `string SensitivityUnits { get; set; }` – Units for sensitivity (e.g., "mV/V/lb").
|
||||
- `int SensorCapacity { get; set; }` – Sensor full-scale capacity.
|
||||
|
||||
### `ITestCalculatedChannel`
|
||||
- **Namespace**: `DTS.Common.Interface`
|
||||
- **Inherits**: `INotifyPropertyChanged`
|
||||
- **Properties**:
|
||||
- Identical to `ITestChannel` *except* for the following type differences:
|
||||
- `BridgeResistanceOhms` is `int` (vs. `double` in `ITestChannel`).
|
||||
- `ExcitationVoltage` is `int` (vs. `string` in `ITestChannel`).
|
||||
- All other properties match `ITestChannel` in name, type, and semantics.
|
||||
|
||||
> **Note**: `ITestCalculatedChannel` appears to be a duplicate of `ITestChannel` with minor type inconsistencies (likely legacy or oversight). Use with caution—prefer `ITestChannel` unless specifically required.
|
||||
|
||||
## 3. Invariants
|
||||
|
||||
- **`ITestRunMetadata` and `ITestSetupMetadata`**: Both implement `INotifyPropertyChanged`, indicating they support data binding and must raise `PropertyChanged` events on property changes.
|
||||
- **`ITestModule` and `ITestChannel`**: Both implement `INotifyPropertyChanged`; changes to module/channel properties must notify listeners.
|
||||
- **`ITestSummary`**: Inherits `IBaseClass`, implying it participates in a base view model hierarchy (exact contract unknown from source).
|
||||
- **Channel Lists**:
|
||||
- `ITestRunMetadata.Channels` and `ITestRunMetadata.CalculatedChannels` are distinct lists; channels are not duplicated across them.
|
||||
- `ITestSummary` mirrors this separation (`Channels` vs. `CalculatedChannels`).
|
||||
- **`ITestGraphs.ChannelId`**: List order likely corresponds to display order or data series order.
|
||||
- **`ITestModule.Number` and `ITestChannel.Number`**: Both are 0-based indices within their parent context (module list or channel list).
|
||||
- **Timestamps**:
|
||||
- `StartRecordTimestampSec/NanoSec` and `TriggerTimestampSec/NanoSec` in `ITestModule` represent high-resolution timestamps.
|
||||
- `TimeOfFirstSample` in `ITestChannel` is in seconds (likely relative to test start).
|
||||
- **`IsSubsampled`**: When `true`, `SampleRateHz` < `UnsubsampledSampleRateHz`.
|
||||
|
||||
## 4. Dependencies
|
||||
|
||||
### Dependencies *of* this module:
|
||||
- **`System.Collections.Generic`** – Used for `List<T>` properties.
|
||||
- **`System.ComponentModel`** – Used for `INotifyPropertyChanged`.
|
||||
- **`System`** – Used for `DateTime`, `List<T>`, etc.
|
||||
- **`DTS.Common.Base`** – Referenced by `ITestSummary` for `IBaseClass`.
|
||||
- **`DTS.Common.Interface`** – Cross-referenced by `ITestRunMetadata`, `ITestSetupMetadata`, `ITestModule`, `ITestChannel`, `ITestCalculatedChannel`, and `ITestGraphs`.
|
||||
|
||||
### Dependencies *on* this module:
|
||||
- **UI/Viewer Layer**: All interfaces are named with `ITest*` and reside in `DTS.Common.Interface.TestDefinition`, strongly suggesting usage in a viewer or analysis UI (e.g., WPF, WinForms).
|
||||
- **Serialization Layer**: Properties like `InlineSerializedData` imply integration with data serialization/deserialization logic (not visible here).
|
||||
- **Data Acquisition Layer**: Interfaces model raw acquisition metadata (e.g., `SampleRateHz`, `TriggerTimestamp*`, `TiltSensor*`), indicating use by acquisition or post-processing modules.
|
||||
|
||||
## 5. Gotchas
|
||||
|
||||
- **`ITestCalculatedChannel` vs. `ITestChannel`**:
|
||||
- `BridgeResistanceOhms` is `int` in `ITestCalculatedChannel` but `double` in `ITestChannel`.
|
||||
- `ExcitationVoltage` is `int` in `ITestCalculatedChannel` but `string` in `ITestChannel`.
|
||||
- This inconsistency suggests a possible legacy design flaw or incomplete refactoring. Prefer `ITestChannel` unless legacy code *requires* `ITestCalculatedChannel`.
|
||||
- **Missing `ITestCalculatedChannel` usage in `ITestSummary`**:
|
||||
- `ITestSummary` uses `List<ITestChannel> CalculatedChannels`, not `List<ITestCalculatedChannel>`. This implies calculated channels are *also* represented via `ITestChannel`, despite having a separate interface.
|
||||
- **`ITestGraphs` namespace**:
|
||||
- `ITestGraphs` resides in `DTS.Common.Interface` (not `DTS.Common.Interface.TestDefinition`), unlike other test definition interfaces. This may indicate historical grouping or accidental misplacement.
|
||||
- **`ITestSummary.Parent`**:
|
||||
- Type `IBaseViewModel` is referenced but not defined in the provided sources—its contract is unknown.
|
||||
- **`ChannelId` vs. `HardwareChannelName`**:
|
||||
- Both `ITestChannel` and `ITestGraphs` expose `ChannelId` and `HardwareChannelName`. Ensure consistency in how these are populated (e.g., `ChannelId` may be logical, `HardwareChannelName` physical).
|
||||
- **`Data
|
||||
@@ -0,0 +1,55 @@
|
||||
---
|
||||
source_files:
|
||||
- Common/DTS.Common/Interface/Viewer/TestModule/ITestModuleView.cs
|
||||
- Common/DTS.Common/Interface/Viewer/TestModule/ITestModuleViewModel.cs
|
||||
generated_at: "2026-04-16T03:09:37.044241+00:00"
|
||||
model: "Qwen/Qwen3-Coder-Next-FP8"
|
||||
schema_version: 1
|
||||
sha256: "ef011ba1e3c50d25"
|
||||
---
|
||||
|
||||
# TestModule
|
||||
|
||||
## 1. Purpose
|
||||
This module defines the foundational view and view-model interfaces for a *Test Module* within the application’s viewer architecture. It serves as a contract layer enabling separation of concerns between UI presentation logic and business/test-specific concerns—specifically, managing a list of assemblies relevant to testing (e.g., test assemblies to be loaded, scanned, or executed). It extends the base `IBaseView` and `IBaseViewModel` interfaces, integrating into a larger MVVM (Model-View-ViewModel) or similar architectural pattern used across the codebase.
|
||||
|
||||
## 2. Public Interface
|
||||
|
||||
### `ITestModuleView`
|
||||
```csharp
|
||||
public interface ITestModuleView : IBaseView { }
|
||||
```
|
||||
- **Behavior**: A marker interface representing the *view* layer for the Test Module. It inherits from `IBaseView`, implying it adheres to a common view contract (e.g., lifecycle management, data binding support), though the specific members of `IBaseView` are not visible in this source. No additional API surface is defined here.
|
||||
|
||||
### `ITestModuleViewModel`
|
||||
```csharp
|
||||
public interface ITestModuleViewModel : IBaseViewModel
|
||||
{
|
||||
List<Assembly> AssemblyList { get; set; }
|
||||
}
|
||||
```
|
||||
- **Behavior**: Represents the *view-model* for the Test Module. It exposes a single property, `AssemblyList`, which holds a list of `System.Reflection.Assembly` instances—likely representing test assemblies to be processed (e.g., loaded for test discovery, execution, or analysis). Inherits from `IBaseViewModel`, implying standard view-model responsibilities (e.g., property change notification via `INotifyPropertyChanged`), though concrete members of `IBaseViewModel` are not shown here.
|
||||
|
||||
## 3. Invariants
|
||||
- `AssemblyList` must be a non-null `List<Assembly>` when accessed (enforced by the property’s `{ get; set; }` semantics), though null assignment is *syntactically* allowed by the interface. Implementation classes are expected to initialize it (e.g., to `new List<Assembly>()`) to avoid `NullReferenceException`.
|
||||
- `ITestModuleView` and `ITestModuleViewModel` must be used in conjunction per the MVVM pattern—i.e., a concrete view should bind to a concrete view-model implementing `ITestModuleViewModel`.
|
||||
- The `AssemblyList` is intended to hold *test-related* assemblies, though the interface does not enforce validation (e.g., no check for `Assembly.IsDynamic`, `Assembly.FullName`, or test-specific attributes). Implementation responsibility.
|
||||
|
||||
## 4. Dependencies
|
||||
- **Depends on**:
|
||||
- `DTS.Common.Base` (specifically `IBaseView`, `IBaseViewModel`)
|
||||
- `System.Collections.Generic` (`List<T>`)
|
||||
- `System.Reflection` (`Assembly`)
|
||||
- **Depended on by**:
|
||||
- Concrete implementations of `ITestModuleView` (e.g., WPF/WinForms/Xamarin views)
|
||||
- Concrete implementations of `ITestModuleViewModel` (e.g., test module logic classes)
|
||||
- Likely used by a DI container or view-model locator to resolve dependencies for the test module UI.
|
||||
*(Exact consumers cannot be determined from this source alone.)*
|
||||
|
||||
## 5. Gotchas
|
||||
- **No null-safety guarantee**: While `AssemblyList` is a read-write property, the interface does not enforce initialization. Consumers must ensure it is initialized before use.
|
||||
- **No test-assembly validation**: The `AssemblyList` accepts *any* `Assembly` instances; invalid or non-test assemblies may be added silently. Validation (e.g., checking for test attributes or naming conventions) is not part of this interface.
|
||||
- **No lifecycle or mutation notifications**: The interface does not expose events or methods to signal changes to `AssemblyList` (e.g., add/remove). If `IBaseViewModel` does not provide change notification, consumers may need to manually trigger updates.
|
||||
- **Ambiguity of `IBaseView`/`IBaseViewModel`**: Without access to those base interfaces, the full contract (e.g., required methods, event handlers) remains unclear.
|
||||
- **No threading guarantees**: `List<Assembly>` is not thread-safe; concurrent modifications require external synchronization (not specified here).
|
||||
- **None identified from source alone.**
|
||||
Reference in New Issue
Block a user