13 KiB
13 KiB
source_files, generated_at, model, schema_version, sha256
| source_files | generated_at | model | schema_version | sha256 | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
2026-04-16T04:29:31.413854+00:00 | Qwen/Qwen3-Coder-Next-FP8 | 1 | fd925eaa489a9345 |
Documentation: ISO Database Import Module Classes
1. Purpose
This module provides data transfer objects (DTOs) for importing and exporting ISO-compliant test data from a database. It encapsulates structured representations of test configurations—including templates, zones, regions, channels, triggers, calculated values, and metadata—enabling serialization/deserialization between database rows and in-memory objects. These classes serve as intermediaries between the database layer and higher-level application logic, supporting data migration, configuration management, and ISO standard compliance for crash testing systems.
2. Public Interface
TemplateZone
TemplateName(string, read-only)
Name of the template this zone belongs to.ZoneName(string)
Name of the zone; defaults to"Default zone"if null in database.Picture(string, read/write)
Path or identifier for an associated picture.Description(string)
Zone description; defaults to empty string if null in database.TemplateRegions(TemplateRegion[], read/write)
Array of regions associated with this zone; populated viaTemplateRegion.GetAllRegions()in theDataRowconstructor.
CalculatedValueClass
Id(int)
Unique identifier; defaults to-1.Operation(Operationsenum)
Operation type:SUM,AVERAGE,IRTRACC3D,IRTRACC3D_ABDOMEN,IRTRACC3D_LOWERTHORAX. Defaults toSUM.CalculatedValueCode(string)
Code string; defaults to"???????????????X".InputChannelIds(string[], read/write)
Array of input channel IDs; backed byInputChannelIdsBlob.InputChannelIdsBlob(byte[], read/write)
UTF-8 encoded blob of channel IDs joined byCultureInfo.InvariantCulture.TextInfo.ListSeparator.CFCForInputChannels(string)
Filter class for input channels; defaults to"".ChannelFilterClassForOutput(string)
Filter class for output; defaults to"".TestSetupName,Name(string)
Test setup and calculated channel names.
LevelTriggerChannel
TestSetupName,GroupSerialNumber,TestObjectChannelId,HardwareChannelId,SensorSerialNumber(string)
Identifiers for test context and hardware.GreaterThanEnabled(bool)
Whether high-threshold triggering is enabled; defaults totrue.GreaterThanThresholdEU,LessThanThresholdEU(double)
High and low threshold values in engineering units.LessThanEnabled(bool)
Whether low-threshold triggering is enabled.TriggerBetweenBounds,TriggerOutsideBounds(bool)
Bounds-triggering modes.InsideUpperLevelEU,InsideLowerLevelEU,OutsideUpperLevelEU,OutsideLowerLevelEU(double)
Upper/lower bounds for inside/outside triggering.
TestObjectChannel
Disabled(bool)
Whether the channel is excluded from data collection.ChannelIdx(int)
Channel index;CHANNEL_IDX_UNKNOWN = -1if unset.SensorSerialNumber,HardwareId(string)
Sensor and hardware channel identifiers;HardwareIdsetter normalizes format (e.g., stripsxseparators).SquibChannelType(SquibChannelTypesenum)
Channel type:None,Voltage, orCurrent.TestObject(ISO.TestObject)
Parent test object instance.CompareTo(TestObjectChannel)(int)
Comparison for sorting: byDisplayOrder, thenName, thenTestObject.SerialNumberOrOriginalSerialNumber.GetGraphId(),GetId(),GetIdWithSpecificChannelId(long)(string)
Generate unique channel identifiers;GetGraphId()appendsDTS.Common.Constants.CURRENT_SUFFIXfor current-type squib channels.
TemplateRegion
TemplateName,TemplateZone(string, read-only)
Template and zone names.RegionNumber,RegionName,RegionDescription(int,string)
Region metadata.TestObject,Position,MainLocation,FineLocation1–3,PhysicalDimension,Direction,FilterClass(string)
Spatial and classification attributes.LocalOnly(bool, read-only)
Whether region is local-only.UpperLeft,LowerRight(System.Drawing.Point)
Bounding box coordinates.GetAllRegions(string templateName, string zoneName)(TemplateRegion[], internal static)
Fetches regions from database via stored proceduresp_TemplateRegionsGet.
IsoCode
StringRepresentation(string, read/write)
16-character ISO code string; pads with'?'if shorter, truncates if longer.GetString(MMEPossibleChannels, bool careAboutTestTimeFields)(string, static)
Generates ISO code from channel metadata; masksTest_ObjectandDefault_Filter_Classwith'?'ifcareAboutTestTimeFieldsisfalse.GetString(...)(string, static)
Direct concatenation of ISO components.
TestEngineerDetails
TestEngineerName,TestEngineerPhone,TestEngineerFax,TestEngineerEmail(string)
Contact info; setters ignore empty strings.LocalOnly(bool)
Scope flag.Name,LastModified,LastModifiedBy,Version(string,DateTime,string,int)
Metadata fields.DeleteAllTestEngineerDetails(),GetAllTestEngineerDetails()(void,TestEngineerDetails[], static)
Database CRUD operations.
TestSetting
Id,Value,DefaultValue(string)
Setting identifier, current value, and default value.ToSerializeString()(string)
Serializes asId=SEPARATOR=SEPARATOR=Value.TryParse(string, out TestSetting)(bool, static)
Parses serialized string; setsDefaultValue = Valueon success.
TestSettingDictionary
GetValue(string id, string defaultValue)(string)
ReturnsValueif present, elseDefaultValue.SetValue(TestSetting, string),SetValue(TestSetting),SetValue(string, string)(void)
Updates or adds settings.ToSerializeString(),LoadSettings(string)(string,void)
Serializes/deserializes settings usingListSeparatoras delimiter.
HardwareChannel
ParentDAS(Hardware)
Parent data acquisition system.SupportedBridges,SupportedExcitations,SupportedDigitalInputModes,SupportedDigitalOutputModes,SupportedSquibFireModes(int)
Hardware capabilities.ChannelIdx,DASDisplayOrder,ModuleSerialNumber,ModuleArrayIndex(int,int,string,int)
Channel identification and positioning.LocalOnly(bool)
Scope flag.PhysicalCompare(HardwareChannel, HardwareChannel)(int, static)
Compares byChannelIdx.
TestObjectMetaData, TestSetupMetaData
TestObject(char)
Test object identifier (e.g.,'?').Version(double)
Schema version (1.06).NOVALUE(const string)
Placeholder for unset values ("NOVALUE").SetProperty(MetaData)(void)
Adds/updates metadata properties.MetaDataName,IsOptional,Value,Version(string,bool,string,double)- Represents a single metadata field.
CustomerDetails
CustomerName,CustomerTestRefNumber,ProjectRefNumber,CustomerOrderNumber,CustomerCostUnit(string)
Customer-related identifiers; setters ignore empty strings for non-required fields.LocalOnly,Name,LastModified,LastModifiedBy,Version(bool,string,DateTime,string,int)
Metadata fields.ReadXML(XmlElement),WriteXML(ref XmlWriter),DeleteCustomerDetails(string)(CustomerDetails,void,void, static)
XML persistence and deletion.
LabratoryDetails
LabratoryName,LabratoryContactName,LabratoryContactPhone,LabratoryContactFax,LabratoryContactEmail,LabratoryTestRefNumber,LabratoryProjectRefNumber(string)
Laboratory contact and reference data.Name,LocalOnly,LastModified,LastModifiedBy,Version(string,bool,DateTime,string,int)
Metadata fields.ReadXML(XmlElement),DeleteLabratoryDetails()(LabratoryDetails,void, static)
XML persistence and deletion.
3. Invariants
TemplateZone.ZoneName: Defaults to"Default zone"if databaseZoneNameisDBNull.TemplateZone.Description: Defaults to""if databaseZoneDescriptionisDBNull.CalculatedValueClass.InputChannelIds: Stored as abyte[]blob usingCultureInfo.InvariantCulture.TextInfo.ListSeparatoras delimiter; deserialization splits on this separator.TestObjectChannel.HardwareId: Setter enforces formatprefix_number(e.g., stripsxseparators beyond the first two segments).IsoCode.StringRepresentation: Always exactly 16 characters; missing characters padded with'?', excess truncated.TestSettingDictionary: PreservesDefaultValuefrom existing settings duringLoadSettings; only updatesValue.TestEngineerDetails,CustomerDetails,LabratoryDetails: Contact fields (Phone,Fax,Email) ignore empty-string assignments.LevelTriggerChannel: Constructor silently ignores exceptions during field parsing (commented logging).TemplateRegion.GetAllRegions: Returns empty array on failure; logs exceptions (commented).HardwareChannel: ImplementsINotifyPropertyChanged;SetPropertyraisesPropertyChangedonly on change.
4. Dependencies
- Database Layer:
DbOperations,DbOperationsEnum.StoredProcedure,DTS.Common.Storage.DbOperations(e.g.,TestEngineerDetailsGet,CustomerDetailsDelete,LabratoryDetailsDelete,sp_TemplateRegionsGet).System.Data,System.Data.SqlClient(ADO.NET types).
- Core Types:
DTS.Common.Constants.CURRENT_SUFFIX(used inTestObjectChannel.GetGraphId()).DTS.Common.Interface.TestMetaData.ITestEngineerDetailsDbRecord(used inTestEngineerDetailsconstructor).System.Drawing.Point(used inTemplateRegion).
- Serialization:
System.Xml(XML persistence inCustomerDetails,LabratoryDetails).System.Text.Encoding,System.Globalization.CultureInfo(used inCalculatedValueClassandTestSetting).
- Inheritance/Usage:
TestObjectChannelextendsTestObjectTemplateChanneland implementsIComparable<TestObjectChannel>.HardwareChannelimplementsINotifyPropertyChanged.
5. Gotchas
TemplateRegion.GetAllRegions: Usesinternalaccess and database calls; not testable without database connectivity.LevelTriggerChannelconstructor: Swallows all exceptions during deserialization (commented logging); may silently fail to populate fields.CalculatedValueClass.InputChannelIdsBlob: UsesCultureInfo.InvariantCulture.TextInfo.ListSeparator(typically','), but this may conflict with IDs containing commas.TestObjectChannel.HardwareIdsetter: Normalizes input by strippingxseparators beyond the first two segments; may alter expected values unexpectedly.IsoCode: MasksTest_ObjectandDefault_Filter_Classwith'?'whencareAboutTestTimeFieldsisfalse, but does not validate input strings (e.g., null/emptyDirectionmay causeIndexOutOfRangeException).TestSettingDictionary.ToSerializeString: UsesListSeparatoras delimiter between settings, but escapes=withSEPARATOR = "_x_"or"_X_"; mismatched separators inLoadSettingscould cause parsing errors.TestEngineerDetails,CustomerDetails,LabratoryDetails: Contact fields ignore empty strings, butNOVALUEis used as default—this may cause confusion ifNOVALUEis stored in the database.TemplateZone:TemplateRegionsis populated only in theDataRowconstructor; the parameterized constructor does not initialize regions.TestObjectMetaData/TestSetupMetaData:NOVALUEis used as default, butTestSetupMetaDatareplacesNOVALUEwithstring.Emptyfor specific fields whenrequireXCrashCompatibilityForISOExportsistrue.