6.9 KiB
6.9 KiB
source_files, generated_at, model, schema_version, sha256
| source_files | generated_at | model | schema_version | sha256 | ||||||
|---|---|---|---|---|---|---|---|---|---|---|
|
2026-04-16T03:21:56.552310+00:00 | Qwen/Qwen3-Coder-Next-FP8 | 1 | d809c3870c3acf47 |
Documentation: Test Metadata Enumerations
1. Purpose
This module defines a set of strongly-typed enumerations used to represent field names and groupings within test metadata structures in the DTS Viewer system. These enums serve as standardized keys for accessing, serializing, deserializing, and querying hierarchical test data—such as test runs, modules, channels, graphs, and calculated channels—across the application. They ensure consistency in data contract definitions (e.g., for JSON serialization, UI binding, or database mapping) by decoupling field identifiers from string literals, thereby reducing typos, enabling refactoring safety, and improving code readability.
2. Public Interface
ChannelGroups
- Namespace:
DTS.Common.Enums.Viewer - Values:
ChannelGraphCalculatedChannel
- Purpose: Represents high-level logical groupings of channel-like entities in test metadata. Used to categorize or filter channels by type.
TestGraphsFields
- Namespace:
DTS.Common.Enums.Viewer - Values:
NameHardwareChannelNameChannelsChannelChannelId
- Purpose: Defines the set of valid field names for objects representing a graph in test metadata (e.g., a named aggregation of channels for visualization or analysis).
TestSetupMetadataFields
- Namespace:
DTS.Common.Enums.Viewer - Values:
NameDateOfTheTestGraphsTimestampCalibrationBehavior
- Purpose: Specifies top-level metadata fields for a test setup, typically describing static configuration or context of a test session.
TestRunMetadataFields
- Namespace:
DTS.Common.Enums.Viewer - Values:
Id,Description,InlineSerializedData,Guid,FaultFlags,Software,SoftwareVersion,DataType,FileDate,FilePath,Modules,Module,Channels,CalculatedChannels,CalculatedChannel
- Purpose: Represents the top-level fields of a test run—a single execution instance containing modules, channels, and calculated channels.
TestModuleFields
- Namespace:
DTS.Common.Enums.Viewer - Values: 44 fields including:
SerialNumber,BaseSerialNumber,Number,SampleRateHz,NumberOfChannels,RecordingMode,RequestedPreTriggerSeconds,PostTriggerSeconds,TriggerTimestampSec,TriggerTimestampNanoSec,StartRecordSampleNumber,UnsubsampledNumberOfSamples,PTPMasterSync,TiltSensorAxisXDegreesPre/Post,TemperatureLocation1Pre/Post,InlineSerializedData, etc.
- Purpose: Defines all known fields for a test module, representing a physical acquisition device (e.g., a data logger) involved in the test.
TestChannelFields
- Namespace:
DTS.Common.Enums.Viewer - Values: 71 fields including:
SerialNumber,ChannelId,Description,ChannelGroupName,ChannelType,Number,HardwareChannelName,Sensitivity,ExcitationVoltage,ZeroMethod,IsSubsampled,AbsoluteDisplayOrder,LastCalibrationDate,CalSignalEnabled,ShuntEnabled,LinearizationFormula,SourceModuleSerialNumber,Calculation,IsoCode,UserCode,UserChannelName,SensorPolarity,HIC,UseEUScaler,ScaleFactorEU,T1,T2, etc.
- Purpose: Enumerates all possible fields for a test channel, representing a single measured or computed signal (e.g., voltage, strain, temperature) during a test.
Note
: All enums are plain
public enumtypes with no methods, properties, or attributes defined in the source.
3. Invariants
- No overlap between enum namespaces: Each enum belongs to a distinct semantic domain (e.g.,
TestModuleFieldsvsTestChannelFields), and field names may be duplicated across enums (e.g.,Channels,Module,Channel) but refer to different contexts. - Field names are case-sensitive: All enum values use PascalCase (e.g.,
HardwareChannelName,RequestedPreTriggerSeconds). - No validation or runtime enforcement: These are metadata keys, not validators; the enums themselves do not enforce presence, type, or consistency of corresponding data.
- No versioning: Enums are not versioned; adding/removing values may break downstream consumers expecting specific keys.
4. Dependencies
- Depends on: None (self-contained; no external references in the provided source).
- Used by:
- Likely consumed by serialization/deserialization logic (e.g., JSON converters, DTO mappers) in higher layers (e.g.,
DTS.Viewer,DTS.Data). - Likely referenced in UI binding layers (e.g., to populate dropdowns or column headers).
- Likely used in query/filter APIs (e.g.,
Where(x => x[TestChannelFields.ChannelGroupName] == ChannelGroups.Channel.ToString())).
- Likely consumed by serialization/deserialization logic (e.g., JSON converters, DTO mappers) in higher layers (e.g.,
- Inferred consumers: Any module that handles test metadata serialization, UI rendering, or data querying (not visible in source, but implied by naming and usage patterns).
5. Gotchas
- Ambiguous field names across enums:
Channelsappears inTestRunMetadataFields(plural, likely a collection) andTestGraphsFields(singular, possibly a reference or collection).ModuleandCalculatedChannelappear inTestRunMetadataFields(singular), whileModules,CalculatedChannels(plural) also exist—suggesting inconsistent naming for collections vs. references.
- Redundant or overlapping fields:
ChannelandChannelsappear in bothTestRunMetadataFieldsandTestGraphsFields, but their semantics differ (e.g., one may be a single channel object, the other a list).ChannelGroupNameinTestChannelFieldsmaps to values inChannelGroups, but no compile-time linkage exists.
- Missing grouping for calculated channels: While
CalculatedChannelis aTestRunMetadataFieldskey,CalculatedChannels(plural) also exists—suggesting possible inconsistency in how collections are named. - No documentation comments: All enums lack XML documentation; field meanings must be inferred from naming alone (e.g.,
T1,T2inTestChannelFieldsare undefined). - Historical field bloat:
TestChannelFieldshas 71 values—indicating possible technical debt from incremental additions without cleanup. - None identified from source alone for behavioral quirks (e.g., null handling, default values), as enums are pure identifiers.