8.7 KiB
source_files, generated_at, model, schema_version, sha256
| source_files | generated_at | model | schema_version | sha256 | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
2026-04-16T03:20:09.296204+00:00 | Qwen/Qwen3-Coder-Next-FP8 | 1 | 968ad729b3c9621d |
Documentation: DBExport Enumerations (DTS.Common.Enums.DBExport)
1. Purpose
This module defines a set of strongly-typed enumerations that represent field names used for mapping database records to XML export structures for various domain objects in the DTS (likely Data Transfer System) framework. Each enumeration corresponds to a specific type of database entity (e.g., TestObject, FineLocation1, FilterClass, PhysicalDimension) and enumerates the XML tag names (as string-equivalent identifiers) that should be used when serializing or deserializing instances of that entity during database export/import operations. These enums act as a contract between the data layer and the XML export pipeline, ensuring consistent field naming across the system.
2. Public Interface
All types in this module are public enums. No classes, methods, or properties are exposed.
| Enum Name | Field Values (in declaration order) | Notes |
|---|---|---|
TestObjectFields |
s_GUID, TEST_OBJECT, TEXT_L1, TEXT_L2, VERSION, DATE, REMARKS, EXPIRED, SORTKEY, LAST_CHANGE, LAST_CHANGE_TEXT, HISTORY |
Used for ISODll.TestObject. Note: s_GUID uses lowercase s_ prefix, unlike most others. |
CustomDirectionFields |
Direction, Expired, History, Last_Change, Last_Change_Text, Remarks, GUID, SortKey, Text_L1, Text_L2, Version |
Used for ISODll.MMEDirection. Direction maps to the primary identifier. |
CustomFinLoc1Fields |
Date, Expired, Fine_Loc_1, History, Last_Change, Last_Change_Text, Remarks, S_GUID, SortKey, Text_L1, Text_L2, Version |
Used for ISODll.FineLocation1. |
CustomFinLoc2Fields |
Date, Expired, Fine_Loc_2, History, Last_Change, Last_Change_Text, Remarks, S_GUID, SortKey, Text_L1, Text_L2, Version |
Used for ISODll.FineLocation2. |
CustomFinLoc3Fields |
Date, Expired, Fine_Loc_3, History, Last_Change, Last_Change_Text, Remarks, S_GUID, SortKey, Text_L1, Text_L2, Version |
Used for ISODll.MMEFineLocation3. |
CustomFilterFields |
Date, Expired, Filter_Class, History, Last_Change, Last_Change_Text, Remarks, S_GUID, SortKey, Text_L1, Text_L2, Version |
Used for ISODll.MME_FilterClass. |
PositionFields |
Date, Expired, History, Last_Change, Last_Change_Text, Position, RecordType, Remarks, S_GUID, SortKey, Text_L1, Text_L2, Version |
Used for ISODll.MMEPositions. Includes RecordType. |
MainLocationFields |
Date, Expired, History, Last_Change, Last_Change_Text, Picture_ShortName, Remarks, S_GUID, SortKey, Text_L1, Text_L2, Trans_Main_Loc, Type, Version |
Used for ISODll.MMETransducerMainLocation. Includes Picture_ShortName, Trans_Main_Loc, and Type. |
PhysicalDimensionFields |
Amount_Of_Substance_EXP, Date, Default_Unit, Electric_Current_EXP, Expired, History, Last_Change, Last_Change_Text, Length_EXP, Luminous_Intensity_Exp, Mass_EXP, Physical_Dimension, RecordType, Remarks, S_GUID, SortKey, Temperature_EXP, Text_L1, Text_L2, Time_EXP, Version |
Used for ISODll.MMEPhysicalDimension. Contains SI base unit exponent fields (e.g., Length_EXP, Time_EXP). |
TopLevelFields |
CustomerDetails, TestEngineerDetails, LabDetails, DASList, SensorModels, Sensors, Calibrations, CustomDirections, CustomFilterClasses, CustomTestObjects, CustomFinLoc1s, CustomFinLoc2s, CustomFinLoc3s, CustomMainLocs, CustomPhysicalDimensions, CustomPositions, CustomChannels, GroupTemplates, Groups, TestSetups, Users, GlobalSettings, SensorChangeHistory |
Represents top-level XML container tags. Includes a comment indicating SensorChangeHistory was introduced in V7. |
Note
: All enum values are declared in PascalCase (except
TestObjectFields.s_GUID, which usess_prefix), and use underscores (_) to separate words in multi-word identifiers (e.g.,Last_Change_Text,Fine_Loc_1).
3. Invariants
- Consistency within each enum: Each enum’s values represent the complete set of field names used for a specific entity type in the XML export schema. No field should be missing or duplicated within a single enum.
- Naming convention: Except for
TestObjectFields.s_GUID, all field names usePascalCasewith underscores (_) as word separators.s_GUIDis an exception (lowercases_prefix). - Common fields across most enums: Most enums include the following fields:
S_GUID(orGUID),DATE,VERSION,REMARKS,EXPIRED,SORTKEY,LAST_CHANGE,LAST_CHANGE_TEXT,HISTORY,TEXT_L1,TEXT_L2. The presence/absence ofRecordTypeand domain-specific fields (e.g.,Fine_Loc_1,Filter_Class,Position) distinguishes the enums. - Top-level enum scope:
TopLevelFieldsenumerates root XML elements only—not nested fields. It does not overlap with the other domain-specific field enums.
4. Dependencies
-
Internal dependencies:
- These enums are defined in the
DTS.Commonassembly (namespaceDTS.Common.Enums.DBExport). - They are referenced by code that handles XML serialization/deserialization of database entities, likely in modules dealing with
ISODll.*types (e.g.,ISODll.TestObject,ISODll.MME_FilterClass, etc.). - The
TopLevelFieldsenum likely drives the top-level structure of the export XML document.
- These enums are defined in the
-
External dependencies:
- The comments reference
ISODll.*types (e.g.,ISODll.MMEDirection,ISODll.FineLocation1), implying a dependency on theISODllnative or interop library (not included in this module). - No external .NET or third-party dependencies are declared in the source files.
- The comments reference
-
Depended upon by:
- XML export/import logic (not shown here) that maps database records to XML elements using these enum values as tag names.
- Possibly validation or schema-checking components that rely on these field names.
5. Gotchas
-
Inconsistent
GUIDnaming:TestObjectFieldsusess_GUID, while all other enums useS_GUID(uppercaseS_).CustomDirectionFieldsusesGUID(noS_prefix). This inconsistency may cause mismatches if field name mapping is case-sensitive or expects uniform prefixes.
-
S_GUIDvss_GUIDvsGUID:- The three variants (
s_GUID,S_GUID,GUID) across enums suggest possible legacy naming differences or evolving schema conventions. Care must be taken when writing generic export logic to handle these variations.
- The three variants (
-
TopLevelFieldsincludes pluralized names:- E.g.,
CustomFinLoc1s,CustomMainLocs,CustomFilterClasses. This implies the XML structure uses pluralized root tags for collections, but the corresponding field enums (e.g.,CustomFinLoc1Fields) use singular names for individual record fields. Confusing these could lead to incorrect XML generation.
- E.g.,
-
Missing
CustomChannelsfield enum:TopLevelFieldsincludesCustomChannels, but no correspondingCustomChannelFieldsenum is defined in the provided source files. This suggests either:- The enum is defined elsewhere,
- It is unused or deprecated, or
- It is an oversight in the codebase.
→ Unclear from source alone.
-
PhysicalDimensionFieldshas mixed casing in exponent fields:Luminous_Intensity_ExpusesExp(notEXPlike others:Length_EXP,Time_EXP). This may be intentional (e.g., legacy naming) or a typo—requires verification.
-
No validation or constraints:
- These are plain enums with no runtime validation. It is possible to assign arbitrary integer values or mix enums (e.g., cast
PositionFields.PositiontoTestObjectFields), which could lead to runtime errors if used incorrectly in XML mapping.
- These are plain enums with no runtime validation. It is possible to assign arbitrary integer values or mix enums (e.g., cast
-
No documentation for field semantics:
- While the enum names are clear, the meaning of each field (e.g., what
LAST_CHANGEvsLAST_CHANGE_TEXTrepresents) is not documented here. This must be inferred from the underlyingISODlltypes or database schema.
- While the enum names are clear, the meaning of each field (e.g., what