init
This commit is contained in:
76
docs/ai/Common/DTS.Common.Storage/Classes.md
Normal file
76
docs/ai/Common/DTS.Common.Storage/Classes.md
Normal file
@@ -0,0 +1,76 @@
|
||||
---
|
||||
source_files:
|
||||
- Common/DTS.Common.Storage/Classes/NoDBAccessException.cs
|
||||
- Common/DTS.Common.Storage/Classes/DigitalInputSettings.cs
|
||||
- Common/DTS.Common.Storage/Classes/DbTypeAttr.cs
|
||||
- Common/DTS.Common.Storage/Classes/DAS.cs
|
||||
- Common/DTS.Common.Storage/Classes/MMETables.cs
|
||||
generated_at: "2026-04-17T15:35:29.267198+00:00"
|
||||
model: "zai-org/GLM-5-FP8"
|
||||
schema_version: 1
|
||||
sha256: "c24664278ad7693a"
|
||||
---
|
||||
|
||||
# DTS.Common.Storage Module Documentation
|
||||
|
||||
## 1. Purpose
|
||||
|
||||
This module provides data transfer objects, constants, and metadata definitions for the DTS storage layer. It defines database table schemas through string constants and enum-based field definitions, custom attributes for database type mapping, and a specialized exception for database access failures. The module serves as a central schema reference for persistent storage operations across the DTS system, particularly for Data Acquisition Systems (DAS), Digital Input Settings, and MME (Measurement/Monitoring Equipment) configuration tables.
|
||||
|
||||
---
|
||||
|
||||
## 2. Public Interface
|
||||
|
||||
### NoDBAccessException
|
||||
```csharp
|
||||
public class NoDBAccessException : Exception
|
||||
{
|
||||
public NoDBAccessException(Exception ex)
|
||||
}
|
||||
```
|
||||
Wraps an existing exception to indicate a database access failure. Preserves the original exception's message and maintains it as the inner exception.
|
||||
|
||||
### DbTypeAttr
|
||||
```csharp
|
||||
public class DbTypeAttr : Attribute
|
||||
{
|
||||
public string DbType { get; private set; }
|
||||
internal DbTypeAttr(string attr)
|
||||
public static string GetDbType(object o)
|
||||
}
|
||||
```
|
||||
An attribute for annotating enum members with database type information. The constructor is `internal`, restricting instantiation to within the assembly. The static `GetDbType(object o)` method uses reflection to retrieve the `DbType` value from an enum member decorated with this attribute; returns `null` if the object is null, has no members, or lacks the attribute.
|
||||
|
||||
### DigitalInputSettings
|
||||
```csharp
|
||||
public class DigitalInputSettings
|
||||
{
|
||||
public const string Table = "tblDigitalInputSetting";
|
||||
public enum Fields { SettingName, SettingMode, ScaleMultiplier, LastModified, LastModifiedBy, SensorId, UserValue1, UserValue2, UserValue3, UserTags }
|
||||
}
|
||||
```
|
||||
Defines the table name and field enumeration for digital input configuration storage.
|
||||
|
||||
### DAS
|
||||
```csharp
|
||||
public class DAS
|
||||
{
|
||||
public const string Table = "tblDAS";
|
||||
public const string TableDASChannels = "tblDASChannels";
|
||||
public enum Fields { SerialNumber, Type, MaxModules, MaxMemory, MaxSampleRate, MinSampleRate, FirmwareVersion, CalDate, ProtocolVersion, LastModified, LastModifiedBy, Version, LocalOnly, LastUsed, LastUsedBy, Connection, Channels, Position, ChannelTypes, Reprogramable, Reconfigurable, IsModule }
|
||||
public enum DASChannelFields { HardwareId, ChannelIdx, SupportedBridges, SupportedExcitations, DASDisplayOrder, LocalOnly, SupportedDigitalInputModes, SupportedSquibFireModes, SupportedDigitalOutputModes, ModuleSerialNumber, ModuleArrayIndex }
|
||||
// 26 prototype constant strings (see Invariants)
|
||||
}
|
||||
```
|
||||
Defines schema for Data Acquisition System hardware and channel configuration. Contains 26 public string constants for prototype hardware identifiers (e.g., `SLICE1_PROTOTYPE`, `G5_VDSPROTOTYPE`, `TDASPRO_8MRack`, etc.).
|
||||
|
||||
### MMETables
|
||||
```csharp
|
||||
public class MMETables
|
||||
{
|
||||
public const string MyType = "MyType";
|
||||
public const string CustomChannelType = "CustomChannelType";
|
||||
public const string Id = "Id";
|
||||
public const string MMEPossibleChannelsTable = "tblMMEPossibleChannels";
|
||||
public const string MMEDirectionsTable = "tblMMEDirections";
|
||||
public const string MMEFilterClassesTable = "tblM
|
||||
119
docs/ai/Common/DTS.Common.Storage/Classes/Abstract.md
Normal file
119
docs/ai/Common/DTS.Common.Storage/Classes/Abstract.md
Normal file
@@ -0,0 +1,119 @@
|
||||
---
|
||||
source_files:
|
||||
- Common/DTS.Common.Storage/Classes/Abstract/MMEPossibleChannels.cs
|
||||
- Common/DTS.Common.Storage/Classes/Abstract/DbVersions.cs
|
||||
- Common/DTS.Common.Storage/Classes/Abstract/Settings.cs
|
||||
- Common/DTS.Common.Storage/Classes/Abstract/VersionTable.cs
|
||||
- Common/DTS.Common.Storage/Classes/Abstract/TestObjectChannelSettings.cs
|
||||
- Common/DTS.Common.Storage/Classes/Abstract/Tags.cs
|
||||
- Common/DTS.Common.Storage/Classes/Abstract/DigitalOutputSettings.cs
|
||||
- Common/DTS.Common.Storage/Classes/Abstract/LabratoryDetails.cs
|
||||
- Common/DTS.Common.Storage/Classes/Abstract/Squib.cs
|
||||
- Common/DTS.Common.Storage/Classes/Abstract/CalculatedChannels.cs
|
||||
- Common/DTS.Common.Storage/Classes/Abstract/Users.cs
|
||||
- Common/DTS.Common.Storage/Classes/Abstract/LevelTriggers.cs
|
||||
- Common/DTS.Common.Storage/Classes/Abstract/SensorDB.cs
|
||||
- Common/DTS.Common.Storage/Classes/Abstract/TestSetups.cs
|
||||
generated_at: "2026-04-17T15:29:31.320582+00:00"
|
||||
model: "zai-org/GLM-5-FP8"
|
||||
schema_version: 1
|
||||
sha256: "4094b0b2b65e3c70"
|
||||
---
|
||||
|
||||
# Documentation: DTS.Common.Storage Schema Definitions
|
||||
|
||||
## 1. Purpose
|
||||
|
||||
This module provides abstract class definitions that serve as database schema constants for a data acquisition and testing system (DTS). Each class encapsulates table names and field enumerations for specific domain entities, enabling type-safe field references throughout the codebase. The classes act as schema metadata containers rather than data models, providing a centralized definition of table and column identifiers used in database operations.
|
||||
|
||||
---
|
||||
|
||||
## 2. Public Interface
|
||||
|
||||
### MMEPossibleChannels
|
||||
**Namespace:** `DTS.Storage`
|
||||
```csharp
|
||||
public abstract class MMEPossibleChannels
|
||||
```
|
||||
- `const string Table` — Value: `"tblMMEPossibleChannels"`. Defines the table name for MME possible channels.
|
||||
|
||||
---
|
||||
|
||||
### DbVersions
|
||||
**Namespace:** `Storage.Classes.Abstract`
|
||||
```csharp
|
||||
public abstract class DbVersions
|
||||
```
|
||||
- `enum DbVersionFields` — Fields: `Version`, `Step`, `Date`, `Remarks`, `UserField`.
|
||||
|
||||
---
|
||||
|
||||
### Settings
|
||||
**Namespace:** `DTS.Storage`
|
||||
```csharp
|
||||
public abstract class Settings
|
||||
```
|
||||
- `const string Table` — Value: `"tblSettings"`.
|
||||
- `enum UserFields` — Fields: `PropertyId`, `PropertyType`, `PropertyValue`, `UserId`.
|
||||
|
||||
---
|
||||
|
||||
### VersionTable
|
||||
**Namespace:** `DTS.Storage`
|
||||
```csharp
|
||||
public abstract class VersionTable
|
||||
```
|
||||
- `const string TableName` — Value: `"tblDataPRODbVersion"`.
|
||||
- `enum Fields` — Fields: `Version`, `Step`, `Date`, `Remarks`, `UserField`.
|
||||
|
||||
---
|
||||
|
||||
### TestObjectChannelSettings
|
||||
**Namespace:** `DTS.Storage`
|
||||
```csharp
|
||||
public abstract class TestObjectChannelSettings
|
||||
```
|
||||
- `const string TableName` — Value: `"tblTestObjectChannelSettings"`.
|
||||
- `enum Fields` — Fields: `TestObjectSerial`, `ChannelId`, `Setting`, `SensorSerial`.
|
||||
|
||||
---
|
||||
|
||||
### Tags
|
||||
**Namespace:** `DTS.Storage`
|
||||
```csharp
|
||||
public abstract class Tags
|
||||
```
|
||||
- `const string Table` — Value: `"tblTags"`.
|
||||
- `enum TagFields` — Fields: `TagId`, `TagText`, `Obsolete`.
|
||||
- `const string TAGASSIGNMENTS_TABLE` — Value: `"TagAssignments"`.
|
||||
- `enum TagAssignmentFields` — Fields: `ObjectID`, `ObjectType`, `TagID`.
|
||||
|
||||
---
|
||||
|
||||
### DigitalOutputSettings
|
||||
**Namespace:** `DTS.Storage`
|
||||
```csharp
|
||||
public abstract class DigitalOutputSettings
|
||||
```
|
||||
- `const string Table` — Value: `"tblTOMDigitalChannels"`.
|
||||
- `enum Fields` — Fields: `ChannelDescription`, `DelayMS`, `DurationMS`, `OutputMode`, `LimitDuration`, `LastModified`, `LastModifiedBy`, `Version`, `LocalOnly`, `DurationMSFloat`, `UserTags`.
|
||||
|
||||
---
|
||||
|
||||
### LabratoryDetails
|
||||
**Namespace:** `DTS.Storage`
|
||||
```csharp
|
||||
public abstract class LabratoryDetails
|
||||
```
|
||||
- `const string Table` — Value: `"tblLabratoryDetails"`.
|
||||
- `enum LabratoryDetailsFields` — Fields: `Name`, `LabratoryName`, `LabratoryContactName`, `LabratoryContactPhone`, `LabratoryContactFax`, `LabratoryContactEmail`, `LabratoryTestRefNumber`, `LabratoryProjectRefNumber`, `LastModified`, `LastModifiedBy`, `LocalOnly`, `Version`.
|
||||
|
||||
---
|
||||
|
||||
### Squib
|
||||
**Namespace:** `DTS.Storage`
|
||||
```csharp
|
||||
public abstract class Squib
|
||||
```
|
||||
- `const string Table` — Value: `"tblTOMSquibChannels"`.
|
||||
- `enum Fields
|
||||
40
docs/ai/Common/DTS.Common.Storage/Classes/Static.md
Normal file
40
docs/ai/Common/DTS.Common.Storage/Classes/Static.md
Normal file
@@ -0,0 +1,40 @@
|
||||
---
|
||||
source_files:
|
||||
- Common/DTS.Common.Storage/Classes/Static/CustomChannelFieldSizeAttribute.cs
|
||||
generated_at: "2026-04-17T16:38:14.601225+00:00"
|
||||
model: "zai-org/GLM-5-FP8"
|
||||
schema_version: 1
|
||||
sha256: "b80f469f3a04031c"
|
||||
---
|
||||
|
||||
# Documentation: CustomChannelFieldSizeAttribute.cs
|
||||
|
||||
## 1. Purpose
|
||||
|
||||
This module provides a mechanism for associating size metadata with enum values, specifically for the `MMETables.MMEPossibleChannelsFields` enum. It defines a custom attribute `CustomChannelFieldSizeAttribute` to store integer size values, and supplies extension methods for retrieving both this specific attribute and generic attributes from enum values via reflection. This enables declarative configuration of field sizes directly on enum members.
|
||||
|
||||
---
|
||||
|
||||
## 2. Public Interface
|
||||
|
||||
### `CustomChannelFieldSizeAttribute` (Class)
|
||||
A custom attribute that stores an integer size value.
|
||||
|
||||
| Member | Signature | Description |
|
||||
|--------|-----------|-------------|
|
||||
| Constructor | `internal CustomChannelFieldSizeAttribute(int size)` | Creates an instance with the specified size. **Note:** Constructor is internal. |
|
||||
| Property | `public int Size { get; private set; }` | Read-only property returning the size value. |
|
||||
|
||||
### `CustomChannelFieldSizeExtensions` (Static Class)
|
||||
Provides extension methods for retrieving field size from enum values.
|
||||
|
||||
| Method | Signature | Description |
|
||||
|--------|-----------|-------------|
|
||||
| `GetFieldSize` | `public static int GetFieldSize(MMETables.MMEPossibleChannelsFields field)` | Retrieves the `Size` value from the `CustomChannelFieldSizeAttribute` applied to the given enum value. |
|
||||
|
||||
### `EnumExtensions` (Static Class)
|
||||
Provides a generic extension method for retrieving attributes from enum values.
|
||||
|
||||
| Method | Signature | Description |
|
||||
|--------|-----------|-------------|
|
||||
| `GetAttribute<TAttribute>` | `public static TAttribute GetAttribute<TAttribute>(this Enum value) where TAttribute : Attribute` | Retrieves a single attribute of type `TAttribute` from the given enum value using
|
||||
43
docs/ai/Common/DTS.Common.Storage/Properties.md
Normal file
43
docs/ai/Common/DTS.Common.Storage/Properties.md
Normal file
@@ -0,0 +1,43 @@
|
||||
---
|
||||
source_files:
|
||||
- Common/DTS.Common.Storage/Properties/AssemblyInfo.cs
|
||||
generated_at: "2026-04-17T16:38:14.589876+00:00"
|
||||
model: "zai-org/GLM-5-FP8"
|
||||
schema_version: 1
|
||||
sha256: "28a1d1349a34e26a"
|
||||
---
|
||||
|
||||
# Documentation: DTS.Common.Storage Assembly Configuration
|
||||
|
||||
## 1. Purpose
|
||||
This file provides assembly-level metadata and configuration for the `DTS.Common.Storage` assembly. It defines the assembly's identity, versioning information, and COM visibility settings using standard .NET attributes. As a `Properties/AssemblyInfo.cs` file, it exists to embed manifest information into the compiled binary, ensuring the assembly is correctly identified and versioned within the larger system.
|
||||
|
||||
## 2. Public Interface
|
||||
This file does not contain public classes, methods, or functions. It defines the following assembly-level attributes:
|
||||
|
||||
* **`AssemblyTitle`**: Set to `"Storage"`.
|
||||
* **`AssemblyDescription`**: Set to an empty string.
|
||||
* **`AssemblyConfiguration`**: Set to an empty string.
|
||||
* **`AssemblyCompany`**: Set to an empty string.
|
||||
* **`AssemblyProduct`**: Set to `"Storage"`.
|
||||
* **`AssemblyCopyright`**: Set to `"Copyright © 2012"`.
|
||||
* **`AssemblyTrademark`**: Set to an empty string.
|
||||
* **`AssemblyCulture`**: Set to an empty string (indicates the assembly is culture-neutral).
|
||||
* **`ComVisible`**: Set to `false`. Prevents types within this assembly from being visible to COM components by default.
|
||||
* **`Guid`**: Set to `"b62ab8e0-42f4-4a11-bad5-0add30baad84"`. Specifies the type library ID if the assembly is exposed to COM.
|
||||
* **`AssemblyVersion`**: Set to `"1.0.0.0"`.
|
||||
* **`AssemblyFileVersion`**: Set to `"1.0.0.0"`.
|
||||
|
||||
## 3. Invariants
|
||||
* **COM Visibility:** All types in this assembly are inherently invisible to COM components unless specifically overridden by attributes on individual types, due to `[assembly: ComVisible(false)]`.
|
||||
* **Versioning:** Both the assembly version and file version are fixed at `1.0.0.0`. The automatic versioning wildcard syntax (commented out in the source) is not active.
|
||||
* **Culture:** The assembly is culture-neutral; satellite assemblies would be required for localization.
|
||||
|
||||
## 4. Dependencies
|
||||
**Internal Dependencies:**
|
||||
* `System.Reflection`
|
||||
* `System.Runtime.CompilerServices`
|
||||
* `System.Runtime.InteropServices`
|
||||
|
||||
**External Dependents:**
|
||||
* Any project or solution configuration tools
|
||||
Reference in New Issue
Block a user