init
This commit is contained in:
43
docs/ai/DataPRO/Modules/Hardware/AddEditHardware/Model.md
Normal file
43
docs/ai/DataPRO/Modules/Hardware/AddEditHardware/Model.md
Normal file
@@ -0,0 +1,43 @@
|
||||
---
|
||||
source_files:
|
||||
- DataPRO/Modules/Hardware/AddEditHardware/Model/DASModule.cs
|
||||
generated_at: "2026-04-17T15:57:30.628257+00:00"
|
||||
model: "zai-org/GLM-5-FP8"
|
||||
schema_version: 1
|
||||
sha256: "22ac148f69b9c507"
|
||||
---
|
||||
|
||||
# Documentation: DASModule.cs
|
||||
|
||||
## 1. Purpose
|
||||
|
||||
`DASModule` is a model class representing a Data Acquisition System (DAS) hardware module within the hardware configuration system. It serves as a data-bound view model for the Add/Edit Hardware feature, managing module metadata including type identification, bridge configuration, serial numbers, and visual representation. The class implements property change notification to support WPF data binding and automatically resolves appropriate hardware images based on module configuration.
|
||||
|
||||
---
|
||||
|
||||
## 2. Public Interface
|
||||
|
||||
### Class: `DASModule`
|
||||
**Namespace:** `HardwareList.Model`
|
||||
**Inheritance:** `BasePropertyChanged`
|
||||
**Implements:** `IAddEditHardwareDASModule`
|
||||
|
||||
#### Properties
|
||||
|
||||
| Property | Type | Default | Description |
|
||||
|----------|------|---------|-------------|
|
||||
| `Disabled` | `bool` | `false` | Flag indicating whether the module is disabled. |
|
||||
| `SLICEBridgeType` | `SLICEBridgeTypes` | `SLICEBridgeTypes.Bridge` | The bridge type for SLICE modules. Setter triggers `SetImage()`. |
|
||||
| `ModuleType` | `HardwareTypes` | `HardwareTypes.UNDEFINED` | The hardware module type. Setter triggers `SetImage()`. |
|
||||
| `SerialNumber` | `string` | `""` | The serial number of the module. |
|
||||
| `DASImage` | `ImageSource` | `null` | The visual representation of the module as a WPF image source. |
|
||||
| `AvailableNanoBridges` | `SLICEBridgeTypes[]` | `static readonly` | Array of bridge types available for Nano hardware: `[Bridge, IEPE]`. |
|
||||
| `AvailableMicroBridges` | `SLICEBridgeTypes[]` | `static readonly` | Array of bridge types available for Micro hardware: `[Bridge, IEPE, ARS, ACC]`. |
|
||||
| `AvailableRACKModules` | `HardwareTypes[]` | `static readonly` | Array of available rack module types: `[UNDEFINED, SIM, TOM, DIM]`. |
|
||||
| `OwningHardware` | `IAddEditHardwareHardware` | N/A | Reference to the parent hardware object. |
|
||||
|
||||
#### Methods
|
||||
|
||||
**`GetSerialNumberPrefix()`**
|
||||
- **Signature:** `public string GetSerialNumberPrefix()`
|
||||
- **Returns:** A string prefix corresponding to the module type for serial number formatting.
|
||||
@@ -0,0 +1,63 @@
|
||||
---
|
||||
source_files:
|
||||
- DataPRO/Modules/Hardware/AddEditHardware/Properties/Settings.Designer.cs
|
||||
- DataPRO/Modules/Hardware/AddEditHardware/Properties/AssemblyInfo.cs
|
||||
generated_at: "2026-04-17T16:44:59.120131+00:00"
|
||||
model: "zai-org/GLM-5-FP8"
|
||||
schema_version: 1
|
||||
sha256: "5f8154fbe79383b1"
|
||||
---
|
||||
|
||||
# Documentation: AddEditHardware Module Properties
|
||||
|
||||
## 1. Purpose
|
||||
|
||||
This module provides the property and assembly configuration infrastructure for the `AddEditHardware` component within the DataPRO system. The `Settings.Designer.cs` file defines a strongly-typed settings class for persisting application configuration, while `AssemblyInfo.cs` establishes the assembly's identity, version, and COM visibility metadata. These files represent the configuration layer rather than the core business logic of hardware add/edit operations.
|
||||
|
||||
---
|
||||
|
||||
## 2. Public Interface
|
||||
|
||||
### `AddEditHardware.Properties.Settings` (class)
|
||||
|
||||
**Signature:**
|
||||
```csharp
|
||||
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase
|
||||
```
|
||||
|
||||
**Description:** A thread-safe singleton class that provides access to application-scoped and user-scoped settings for the AddEditHardware module. This class is auto-generated by Visual Studio's Settings Designer.
|
||||
|
||||
**Members:**
|
||||
|
||||
| Member | Signature | Description |
|
||||
|--------|-----------|-------------|
|
||||
| `Default` | `public static Settings Default { get; }` | Static property that returns the singleton instance of the `Settings` class. The instance is synchronized for thread-safe access. |
|
||||
|
||||
---
|
||||
|
||||
## 3. Invariants
|
||||
|
||||
- **Singleton Pattern:** The `Settings` class maintains exactly one instance via the `defaultInstance` field, created through `ApplicationSettingsBase.Synchronized()`.
|
||||
- **Thread Safety:** The default instance is created using `Synchronized()`, ensuring thread-safe access to settings.
|
||||
- **Auto-generation:** The `Settings.Designer.cs` file is machine-generated (Runtime Version: 4.0.30319.42000, Generator Version: 17.10.0.0) and will be overwritten on regeneration.
|
||||
- **Internal Visibility:** The `Settings` class is marked `internal`, restricting access to within the `AddEditHardware` assembly.
|
||||
- **COM Invisibility:** The assembly has `ComVisible(false)`, meaning types are not exposed to COM components by default.
|
||||
|
||||
---
|
||||
|
||||
## 4. Dependencies
|
||||
|
||||
### This module depends on:
|
||||
- `System.Configuration.ApplicationSettingsBase` — Base class providing settings persistence and synchronization infrastructure.
|
||||
- `System.Reflection` — For assembly metadata attributes.
|
||||
- `System.Runtime.CompilerServices` — For `CompilerGeneratedAttribute`.
|
||||
- `System.Runtime.InteropServices` — For `ComVisible` and GUID attributes.
|
||||
|
||||
### What depends on this module:
|
||||
- **Cannot be determined from source alone.** The `AddEditHardware` assembly (identified by GUID `79856d8f-191f-4528-b78f-892283e21e7b`) is presumably consumed by other DataPRO components, but the specific consumers are not visible in these files.
|
||||
|
||||
---
|
||||
|
||||
## 5. Gotchas
|
||||
|
||||
- **Auto-generated Code:** The `Settings.Designer.cs` file contains
|
||||
@@ -0,0 +1,20 @@
|
||||
---
|
||||
source_files:
|
||||
- DataPRO/Modules/Hardware/AddEditHardware/Resources/TranslateExtension.cs
|
||||
- DataPRO/Modules/Hardware/AddEditHardware/Resources/StringResources.Designer.cs
|
||||
generated_at: "2026-04-17T16:13:00.122317+00:00"
|
||||
model: "zai-org/GLM-5-FP8"
|
||||
schema_version: 1
|
||||
sha256: "209c67de8aede7be"
|
||||
---
|
||||
|
||||
# Resources
|
||||
|
||||
### 1. Purpose
|
||||
This module provides localization support for the `AddEditHardware` assembly. It contains a WPF markup extension for declarative XAML binding to string resources and an auto-generated strongly-typed resource class that wraps access to culture-specific strings such as UI labels, error messages, and hardware configuration names.
|
||||
|
||||
### 2. Public Interface
|
||||
**Class: `TranslateExtension`**
|
||||
* **Signature:** `public class TranslateExtension : MarkupExtension`
|
||||
* **Constructor:** `TranslateExtension(string key)` — Initializes the extension with the resource key to look up.
|
||||
* **Method:** `public override object ProvideValue(IServiceProvider serviceProvider)` — Retrieves the localized string for the stored `_key`. Returns `#stringnotfound#
|
||||
23
docs/ai/DataPRO/Modules/Hardware/AddEditHardware/View.md
Normal file
23
docs/ai/DataPRO/Modules/Hardware/AddEditHardware/View.md
Normal file
@@ -0,0 +1,23 @@
|
||||
---
|
||||
source_files:
|
||||
- DataPRO/Modules/Hardware/AddEditHardware/View/AddEditHardwareView.xaml.cs
|
||||
generated_at: "2026-04-17T16:00:07.079272+00:00"
|
||||
model: "zai-org/GLM-5-FP8"
|
||||
schema_version: 1
|
||||
sha256: "6e5b358ea40be28e"
|
||||
---
|
||||
|
||||
# Documentation: AddEditHardwareView
|
||||
|
||||
## 1. Purpose
|
||||
|
||||
`AddEditHardwareView` is a WPF code-behind file that serves as the view component for adding and editing hardware configurations in a Data Acquisition System (DAS). It implements `IAddEditHardwareView` and `INotifyPropertyChanged` to provide data binding support. The view manages hardware type selection based on database version compatibility, handles module addition/removal within hardware configurations, and notifies the underlying view model of user modifications through various UI event handlers.
|
||||
|
||||
---
|
||||
|
||||
## 2. Public Interface
|
||||
|
||||
### Properties
|
||||
|
||||
| Signature | Description |
|
||||
|-----------
|
||||
@@ -0,0 +1,24 @@
|
||||
---
|
||||
source_files:
|
||||
- DataPRO/Modules/Hardware/AddEditHardware/ViewModel/AddEditHardwareViewModel.cs
|
||||
generated_at: "2026-04-17T16:00:07.067031+00:00"
|
||||
model: "zai-org/GLM-5-FP8"
|
||||
schema_version: 1
|
||||
sha256: "9a47572c9293f8ae"
|
||||
---
|
||||
|
||||
# AddEditHardwareViewModel Documentation
|
||||
|
||||
## 1. Purpose
|
||||
|
||||
`AddEditHardwareViewModel` is a Prism-based ViewModel that manages the UI logic for adding and editing hardware devices within the DTS application. It serves as the intermediary between the `IAddEditHardwareView` and the underlying hardware data models, handling validation, persistence, SLICE6 database associations, and event-based communication with other modules. The class is designed as a shared singleton (via MEF `CreationPolicy.Shared`) and integrates with the application's event aggregation, region management, and dependency injection systems.
|
||||
|
||||
---
|
||||
|
||||
## 2. Public Interface
|
||||
|
||||
### Properties
|
||||
|
||||
| Name | Type | Description |
|
||||
|------|------|-------------|
|
||||
| `AllowStandin` | `bool
|
||||
Reference in New Issue
Block a user