3.6 KiB
source_files, generated_at, model, schema_version, sha256
| source_files | generated_at | model | schema_version | sha256 | |||||
|---|---|---|---|---|---|---|---|---|---|
|
2026-04-17T15:35:29.267198+00:00 | zai-org/GLM-5-FP8 | 1 | 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
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
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
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
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
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