Files
DP44/enriched-qwen3-coder-next/DataPRO/Modules/DatabaseImporter/DatabaseImport/Classes.md
2026-04-17 14:55:32 -04:00

4.9 KiB
Raw Blame History

source_files, generated_at, model, schema_version, sha256
source_files generated_at model schema_version sha256
DataPRO/Modules/DatabaseImporter/DatabaseImport/Classes/Constants.cs
DataPRO/Modules/DatabaseImporter/DatabaseImport/Classes/Enums.cs
2026-04-16T04:29:22.195029+00:00 Qwen/Qwen3-Coder-Next-FP8 1 7d0744f20dc3772b

Classes

Documentation: DatabaseImport Module Constants and Enums


1. Purpose

This module provides foundational type definitions and symbolic constants used throughout the DatabaseImport subsystem, primarily to support test configuration, channel handling, and recording behavior in the DataPRO test framework. It centralizes string literals for non-ISO test object metadata and defines strongly-typed enumerations for recording modes, ISO channel compatibility policies, and test template metadata tags—enabling consistent interpretation of test setup data imported from external databases or configuration sources.


2. Public Interface

Constants (DatabaseImport.Constants)

  • NON_ISO_TESTOBJECT_CHANNEL_TYPE (public const string)
    String value: "x_NonISOTestObjectType_x". Used as a channel type identifier for non-ISO test objects during import.
  • NON_ISO_TESTOBJECT_NAME (public const string)
    String value: "x_NonISOTestObjectName_x". Used as a channel name identifier for non-ISO test objects during import.

Enumerations

  • RecordingModes (public enum)
    Represents supported data acquisition recording strategies.

    • CircularBuffer: "RecordingModes_CircularBuffer"
    • Recorder: "RecordingModes_Recorder"
    • HybridRecorder: "RecordingModes_HybridRecorder"
      Note: Uses [TypeConverter(typeof(EnumDescriptionTypeConverter))] for localized description resolution.
  • IsoChannelSensorCompatibilityLevels (public enum)
    Defines policy for handling non-ISO sensors attached to ISO channels:

    • DontWarn: No warning or restriction.
    • Warn: Issue warning but allow operation.
    • DontAllow: Block operation if non-ISO sensor detected.
  • TestTemplateTags (public enum)
    Contains 103 named constants representing keys for test template metadata fields (e.g., "UploadData", "RecordingMode", "PreTriggerSeconds"). Used to serialize/deserialize test configuration properties from structured data (e.g., XML, JSON, or database rows).
    Note: Includes both high-level flags (AllowMissingSensors, AutomaticProgression) and granular settings (AutomaticProgressionDelayMS, AutoVerifyDelaySeconds).

  • StrictLevel (public enum)
    Controls validation strictness during import:

    • Strict: Enforce strict schema/data validation.
    • UpdateTable: Allow schema updates or relaxed validation (e.g., for backward compatibility).

3. Invariants

  • All TestTemplateTags enum values are string-identifiable keys—their underlying integer values are irrelevant; only their symbolic names matter for lookup.
  • RecordingModes enum values are exhaustive and mutually exclusive—a test configuration must specify exactly one mode.
  • IsoChannelSensorCompatibilityLevels values define a strict ordering of enforcement: DontWarnWarnDontAllow.
  • Constants values are fixed string literals—no runtime modification or localization is performed within this module.

4. Dependencies

  • Depends on:
    • System (for TypeConverter, DescriptionAttribute)
    • System.ComponentModel (for TypeConverter and DescriptionAttribute)
  • Used by:
    • Other modules in DatabaseImport (e.g., importers, validators, test template processors) that parse test configurations or validate channel/sensor compatibility.
    • Likely consumed by UI layers (via TypeConverter) for localized enum descriptions.

5. Gotchas

  • Non-ISO identifiers are placeholder strings: The values "x_NonISOTestObjectType_x" and "x_NonISOTestObjectName_x" are not standardized—they are internal markers. Do not assume they match external schema names.
  • TestTemplateTags enum is exhaustive but not self-documenting: The enum names map directly to string keys (e.g., TestTemplateTags.RecordingMode"RecordingMode"), but the meaning of each key is defined elsewhere (e.g., in schema docs or template parsers).
  • RecordingModes descriptions are resource keys: The [Description(...)] attributes contain resource keys (e.g., "RecordingModes_CircularBuffer"), not literal descriptions. Actual display text requires resource resolution via EnumDescriptionTypeConverter.
  • StrictLevel.UpdateTable implies leniency: This may bypass validation that would otherwise fail imports (e.g., missing required fields), risking data inconsistency if misused.
  • No validation logic in this module: These types define what can be configured, not how—validation rules reside in other modules (e.g., importers, validators).

None identified beyond the above.