5.3 KiB
5.3 KiB
source_files, generated_at, model, schema_version, sha256
| source_files | generated_at | model | schema_version | sha256 | |
|---|---|---|---|---|---|
|
2026-04-16T03:31:47.934438+00:00 | Qwen/Qwen3-Coder-Next-FP8 | 1 | a8986c49f9eaee26 |
Classes
Documentation: DTS.Common.DataModel/Classes/Enums.cs
1. Purpose
This module defines core enumerations used throughout the DataPROWin7.DataModel namespace to enforce type safety and semantic clarity for key configuration and interoperability concerns. Specifically, it standardizes:
IsoChannelSensorCompatibilityLevels: Controls warning/error behavior when validating compatibility between ISO channels and sensors (e.g., during data import/export).SupportedExportFormats: Lists all export formats supported by the system, with[Description]attributes mapping enum values to user-facing format names (e.g.,"csv" → "CSV").StrictLevel: Defines operational modes for data validation and checkout workflows, ranging from strict enforcement (Strict) to permissive or expedited modes (QuickCheckout).
The module exists to centralize these constants, avoiding magic strings/numbers and ensuring consistent interpretation across the codebase.
2. Public Interface
IsoChannelSensorCompatibilityLevels
public enum IsoChannelSensorCompatibilityLevels
{
DontWarn,
Warn,
DontAllow
}
- Purpose: Specifies the severity level for ISO channel-sensor compatibility mismatches.
- Values:
DontWarn: Mismatches are silently ignored.Warn: Mismatches trigger a warning (e.g., UI alert, log entry).DontAllow: Mismatches block the operation (e.g., import/export fails).
SupportedExportFormats
public enum SupportedExportFormats
{
[Description("CSV")] csv,
[Description("Diadem")] diadem,
[Description("ISO")] iso,
[Description("SOMAT")] somat,
[Description("TDAS")] tdas,
[Description("TSV")] tsv,
[Description("TTS")] tts,
[Description("RDF")] rdf,
[Description("TDMS")] tdms,
[Description("DDAS")] ddas,
[Description("HDF5")] hdf,
[Description("XLSX")] xlsx,
[Description("Chapter10")] chapter10, // DataPRO 3.3, IRIG 106 Chapter 10
[Description("ASC")] asc
}
- Purpose: Represents all export formats supported by the application.
- Behavior:
- Each value has a
[Description]attribute specifying its display name (e.g.,csv→"CSV"). chapter10is explicitly annotated as supporting IRIG 106 Chapter 10 (a telemetry data format standard).- Note:
xlsxuses// ReSharper disable once InconsistentNamingto suppress naming convention warnings (likely due to casing mismatch with PascalCase guidelines).
- Each value has a
StrictLevel
public enum StrictLevel
{
Strict,
UpdateTable,
CheckoutOnly,
QuickCheckout
}
- Purpose: Configures the rigor of data validation and checkout operations.
- Values:
Strict: Full validation enforced; non-compliant data rejected.UpdateTable: Validation performed, but table schemas may be updated to accommodate data.CheckoutOnly: Validation skipped; only checkout (e.g., file locking, metadata update) occurs.QuickCheckout: Minimal validation; optimized for speed (e.g., bulk operations).
3. Invariants
IsoChannelSensorCompatibilityLevels:- Values must be used consistently in validation logic (e.g.,
DontAllowmust prevent operations, not just log warnings).
- Values must be used consistently in validation logic (e.g.,
SupportedExportFormats:- The
[Description]attribute value for each enum member is the canonical string representation used in UI/file dialogs. chapter10is reserved for IRIG 106 Chapter 10 exports (per inline comment).
- The
StrictLevel:Strictis the most restrictive mode;QuickCheckoutis the least.- No two modes may have identical behavior in validation/checkout logic.
4. Dependencies
- Depends on:
System.ComponentModel(for[Description]attribute).
- Depended upon:
- Other modules in
DataPROWin7.DataModel(inferred from namespace usage). - Likely used by export pipelines (e.g., format selection), ISO data validation components, and checkout workflows.
- Not directly referenced in source, but usage is implied by the enum’s purpose and naming.
- Other modules in
5. Gotchas
xlsxenum member:- Uses
// ReSharper disable once InconsistentNamingto override PascalCase convention (likely due to legacy naming or external format specification requiring lowercase). This may cause confusion if developers expect consistent casing.
- Uses
chapter10naming:- The enum value
chapter10(lowercase) maps to"Chapter10"(PascalCase) via[Description]. Developers must useDescriptionAttributeto retrieve the display name, notToString().
- The enum value
- Ambiguity in
StrictLevelsemantics:- The exact behavior differences between
UpdateTable,CheckoutOnly, andQuickCheckoutare not specified in this file. Implementation details (e.g., howUpdateTablemodifies schemas) must be verified in dependent modules.
- The exact behavior differences between
- No validation of enum usage:
- The enums themselves contain no runtime validation. Invalid combinations (e.g.,
DontAllowwithQuickCheckout) must be handled by calling code.
- The enums themselves contain no runtime validation. Invalid combinations (e.g.,
None identified beyond the above.