7.1 KiB
source_files, generated_at, model, schema_version, sha256
| source_files | generated_at | model | schema_version | sha256 | |||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
2026-04-16T11:35:02.794204+00:00 | zai-org/GLM-5-FP8 | 1 | 8371f072462a5521 |
Documentation: DTS.Common.ISO
1. Purpose
The DTS.Common.ISO namespace provides data structures and utilities for managing test configuration entities, specifically adhering to ISO 13499 (MME - Measurement of Mechanical Effects) standards. It serves as a bridge between raw database records (accessed via OLE DB/SQL) and domain objects used in the application's test setup and execution logic. The module handles the serialization of test settings, definition of hardware and calculated channels, and parsing of ISO metadata such as filter classes, positions, and fine locations.
2. Public Interface
AbstractOLEDbWrapper
An abstract base class providing helper methods for safe database value retrieval.
protected static long GetLong(IDataReader reader, string field): Returnslong.MinValueif the database field isDBNull, otherwise converts the value tolong.protected static DateTime GetDate(IDataReader reader, string field): ReturnsDateTime.MinValueif the database field isDBNull, otherwise casts toDateTime.
HardwareChannel
Represents a physical hardware channel, inheriting from DASChannelDBRecord.
public Hardware ParentDAS: Gets or sets the parent hardware device.public static int PhysicalCompare(HardwareChannel left, HardwareChannel right): Comparison function based onChannelIdx. Handles nulls.public void Insert(): Inserts the record into the database viaDbOperations.DASChannelsInsert.public bool IsSupported(SensorConstants.BridgeType bridge): Checks if a specific bridge type is supported using bitwise comparison againstSupportedBridges.
IsoCodeStatics
Static helper class for generating ISO code strings.
public static string GetString(MMEPossibleChannels channel, MMETestObjects container, MMEPositions position, MMEFilterClasses fc): Constructs an ISO code string from various metadata objects.public static string GetString(MMEPossibleChannels channel, bool careAboutTestTimeFields): Constructs an ISO code string, optionally masking "test time" fields (TestObject, FilterClass) with placeholder characters.public static string GetString(string testObject, string position, string main, string floc1, string floc2, string floc3, string physdim, string dir, string fc): Constructs an ISO code string from raw string components.
TestObjectChannel
Represents a channel within a test object, implementing IComparable<TestObjectChannel> and IGroupChannel.
public bool Disabled: Determines if the channel is used in data collection.public int ChannelIdx: Index of the channel, defaults toCHANNEL_IDX_UNKNOWN(-1).public string SensorSerialNumber: Serial number of the associated sensor.public string HardwareId: Physical hardware channel ID. The setter parses and reformats strings containing underscores.public string GetGraphId(): Returns the ID, appendingConstants.CURRENT_SUFFIXifSquibChannelTypeisCurrent.public string GetId(): Returns a composite ID string (SerialNumber_ChannelType_Id).public string GetDASId(): Extracts the DAS ID portion fromHardwareId.public int CompareTo(TestObjectChannel right): Sorts byDisplayOrder, thenName, thenTestObjectserial number.
CalculatedValueClass
Represents a calculated/derived channel (e.g., HIC, IRTRACC), inheriting from CalculatedChannelRecord.
public bool SupportsRealtime: Returns true ifViewInRealtimeis true.public bool IsValid(Dictionary<string, bool> channelIdLookup): Validates that the channel has a name and allInputChannelIdsexist in the provided lookup.public bool ViewInRealtime: Getter returnsfalsefor specific operations (IRTRACC3D,HIC), regardless of the backing field value.public bool CanChangeViewInRealtime: Returnsfalsefor operations that forceViewInRealtimeto false.public void ReplaceInputChannelIdAtIndex(int index, string newId): Modifies the input channel ID array at a specific index.
LevelTriggerChannel
Defines trigger conditions based on signal levels.
public LevelTriggerChannel(System.Data.DataRow dr): Constructs the object by parsing fields from a database row usingDbOperations.LevelTriggers.Fields.public string LevelTriggerText: Getter that generates a human-readable description of the trigger logic (e.g., "Less than X", "Trigger Inside [X, Y]").
TestSetting & TestSettingDictionary
Manages test configuration settings.
TestSettingpublic string ToSerializeString(): Serializes the setting to "Id=Value" format, escaping equals signs.public static bool TryParse(string s, out TestSetting ts): Parses a serialized string back into aTestSetting.
TestSettingDictionarypublic string GetValue(int id, string defaultValue): Retrieves a value or returns the default.public void SetValue(TestSetting setting): Initializes a setting in the dictionary.public void SetValue(int id, string value): Sets a value, creating a newTestSettingif the ID doesn't exist.public void LoadSettings(string s): Deserializes a string of settings into the dictionary.
MMEFilterClasses, MMEPositions, MMEFineLocations2
Classes mapping to ISO 13499 metadata database tables.
public static [Type][] Get[Types](): Static method (e.g.,GetFilterClasses,GetPositions) that queries the database usingDbOperations.GetISOCommand()and returns an array of objects.public static [Type] ReadXML(XmlElement node): Static method to instantiate the object from an XML node attribute mapping.
TestObjectTemplate
Wrapper for group templates.
public bool IsISOMode(): ReturnstrueifTestObjectTypedoes not contain specific non-ISO constants.public static TestObjectTemplate GetTemplate(ref ISO13499FileDb db, string name): Currently returns null.
3. Invariants
- Database Null Handling:
AbstractOLEDbWrapperderivatives guarantee thatDBNullvalues are converted tolong.MinValueorDateTime.MinValue, never throwing conversion exceptions for null fields. - Realtime Calculation Constraints: For
CalculatedValueClass, if theOperationisIRTRACC3D,IRTRACC3D_ABDOMEN,IRTRACC3D_LOWERTHORAX, orHIC,ViewInRealtimewill always returnfalseandCanChangeViewInRealtimewill always returnfalse. - HardwareChannel Comparison: `HardwareChannel.Physical