--- 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