Files
DP44/docs/ai/Common/DTS.Common/Classes/DASFactory.md
2026-04-17 14:55:32 -04:00

3.9 KiB

source_files, generated_at, model, schema_version, sha256
source_files generated_at model schema_version sha256
Common/DTS.Common/Classes/DASFactory/DiagnosticMessageRow.cs
Common/DTS.Common/Classes/DASFactory/TCDiagnosticResult.cs
Common/DTS.Common/Classes/DASFactory/CanDiagnostics.cs
Common/DTS.Common/Classes/DASFactory/TemperatureConfig.cs
Common/DTS.Common/Classes/DASFactory/TMSNConfig.cs
2026-04-17T15:36:22.888936+00:00 zai-org/GLM-5-FP8 1 cf619de901da9b9c

DTS.Common.Classes.DASFactory Module Documentation

1. Purpose

This module provides data structures and configuration classes for the Data Acquisition System (DAS) factory components. It encapsulates diagnostic results for hardware channels (thermocouple and CAN bus), temperature logging configuration, and TMNS (Telemetry) streaming configuration. The classes serve as data transfer objects and configuration containers that bridge hardware diagnostics with the application layer, implementing property change notification for UI binding scenarios.


2. Public Interface

DiagnosticMessageRow

A simple data container class for diagnostic message rows, currently used for CAN BIST (Built-In Self-Test) results.

Constructor:

public DiagnosticMessageRow(string field, string value, string verdict)

Properties:

  • string Field { get; set; } - The field name being diagnosed
  • string Value { get; set; } - The diagnostic value
  • string Verdict { get; set; } - The pass/fail verdict

Methods:

  • override string ToString() - Returns formatted string: "Field: {Field}, Value: {Value}, Verdict: {Verdict}"

TCDiagnosticResult

Implements ITCDiagnosticResult to hold thermocouple channel diagnostic results with property change notification.

Properties:

  • string ChannelName { get; set; } - Name of the channel (default: empty string)
  • int ChannelIndex { get; set; } - Index of the channel (default: 0)
  • double? CurrentReading { get; set; } - Nullable current reading value (default: null)
  • DiagnosticStatus Status { get; set; } - Diagnostic status (default: DiagnosticStatus.Untested)
  • ConnectionStatuses ConnectionStatus { get; set; } - Connection status (default: ConnectionStatuses.NotTested)

Methods:

  • void Copy(ITCDiagnosticResult source) - Copies ChannelName, CurrentReading, Status, and ConnectionStatus from source. Does not copy ChannelIndex.

CanDiagnostics

Implements ICanDiagnosticResult to hold CAN bus diagnostic information with property change notification.

Properties:

  • bool Active { get; set; } - Whether the CAN channel is active (default: false)
  • int ChannelIndex { get; set; } - Index of the channel (default: -1)
  • int Data { get; set; } - Data value (default: 0)
  • int ErrorFrame { get; set; } - Error frame count (default: 0); setting triggers OnPropertyChanged("Errors")
  • double Load { get; set; } - Bus load value
  • int Overruns { get; set; } - Overrun count (default: 0); setting triggers OnPropertyChanged("Errors")
  • DateTime LastUpdate { get; set; } - Timestamp of last update (default: DateTime.MinValue)
  • int Errors { get; } - Computed property: returns 1 + Overruns if ErrorFrame != 0, otherwise returns Overruns
  • string ChannelName { get; set; } - Name of the channel (default: empty string)

Methods:

  • void Copy(ICanDiagnosticResult source) - Copies all properties except Errors from source

TemperatureConfig

Configuration class for temperature logging channels, using a BitArray internally to track enabled channels.

Constructors:

public TemperatureConfig()
public TemperatureConfig(ushort[] ushortArray)

Properties:

  • ushort LogEnable { get; set; } - Logging enable flag
  • ushort LogIntervalSec { get; set; } - Logging interval in seconds
  • ushort Channels { get; set; } - Bitmask of enabled channels (backed by internal BitArray)
  • const ushort Reserved = 0 - Reserved field constant
  • `bool