Files
DP44/enriched-qwen3-coder-next/Common/DTS.Common/Interface/Sensors.md
2026-04-17 14:55:32 -04:00

15 KiB

source_files, generated_at, model, schema_version, sha256
source_files generated_at model schema_version sha256
Common/DTS.Common/Interface/Sensors/IZeroMethods.cs
Common/DTS.Common/Interface/Sensors/IInitialOffsets.cs
Common/DTS.Common/Interface/Sensors/ISensorDbRecord.cs
Common/DTS.Common/Interface/Sensors/IStreamInputSettingDefaults.cs
Common/DTS.Common/Interface/Sensors/ISoftwareFilter.cs
Common/DTS.Common/Interface/Sensors/ICanSettingDefaults.cs
Common/DTS.Common/Interface/Sensors/IDigitalOutDbRecord.cs
Common/DTS.Common/Interface/Sensors/IThermocouplerRecord.cs
Common/DTS.Common/Interface/Sensors/IStreamInputRecord.cs
Common/DTS.Common/Interface/Sensors/IDigitalOutDefaults.cs
Common/DTS.Common/Interface/Sensors/IDigitalInputDefaults.cs
Common/DTS.Common/Interface/Sensors/IDigitalInputScaleMultiplier.cs
Common/DTS.Common/Interface/Sensors/ICANRecord.cs
Common/DTS.Common/Interface/Sensors/IUartSettingDefaults.cs
Common/DTS.Common/Interface/Sensors/ISensorChange.cs
Common/DTS.Common/Interface/Sensors/IUARTRecord.cs
Common/DTS.Common/Interface/Sensors/IStreamOutputSettingDefaults.cs
Common/DTS.Common/Interface/Sensors/ISensorCalDbRecord.cs
Common/DTS.Common/Interface/Sensors/IAnalogDefaults.cs
Common/DTS.Common/Interface/Sensors/ISensorCalibration.cs
Common/DTS.Common/Interface/Sensors/IStreamOutputRecord.cs
Common/DTS.Common/Interface/Sensors/ICalibrationRecord.cs
Common/DTS.Common/Interface/Sensors/IIEPESensorDefaults.cs
Common/DTS.Common/Interface/Sensors/ISquibDbRecord.cs
Common/DTS.Common/Interface/Sensors/ISensorAggregate.cs
Common/DTS.Common/Interface/Sensors/ISensorBase.cs
Common/DTS.Common/Interface/Sensors/ISquibSettingDefaults.cs
Common/DTS.Common/Interface/Sensors/IDigitalInDbRecord.cs
Common/DTS.Common/Interface/Sensors/ISensorData.cs
Common/DTS.Common/Interface/Sensors/IAnalogDbRecord.cs
2026-04-16T02:59:08.742572+00:00 Qwen/Qwen3-Coder-Next-FP8 1 b192568695e02b80

Documentation: DTS.Common.Interface.Sensors Namespace

1. Purpose

This module defines a set of interfaces that collectively model sensor metadata, configuration, calibration, and database record structures for a test and data acquisition system (DTS). It serves as the foundational abstraction layer between the data layer (e.g., ORM/database) and the application logic, enabling consistent handling of diverse sensor types—such as analog, digital input/output, squib, thermocouple, CAN, UART, and streaming (UDP) sensors—within the system. These interfaces standardize how sensor properties (e.g., serial number, calibration, tolerances, communication settings) are represented, validated, persisted, and consumed across modules responsible for configuration, diagnostics, data collection, and reporting.

2. Public Interface

Interfaces (No implementation classes provided; only interface definitions exist)

IZeroMethods

  • Purpose: Marker interface; no members. Likely intended for future extension or tagging (e.g., for calibration zeroing method metadata).

IInitialOffsets

  • Purpose: Marker interface; no members. Likely intended for future extension (e.g., for initial offset configuration metadata).

ISensorDbRecord

  • Properties:
    • int id { get; set; } — Primary key.
    • short SensorType { get; set; } — Sensor type identifier.
    • string SerialNumber { get; set; } — Required, max 50 chars.

IStreamInputSettingDefaults

  • Properties:
    • string UDPAddress { get; set; } — UDP address for the channel.
  • Methods:
    • bool Validate() — Validates the defaults.

ISoftwareFilter

  • Properties:
    • int Id { get; set; }
    • char ISOCode { get; set; }
    • string Description { get; set; }
    • double Frequency { get; set; }
    • DateTime LastModified { get; set; }
    • string LastModifiedBy { get; set; }
    • bool IsDefault { get; set; }
  • Methods:
    • bool IsBlank() — Checks if the filter is empty/unconfigured.
    • void Delete() — Deletes the filter.
    • void Commit(bool updateDateTime = true, string user = "") — Persists changes.

ICanSettingDefaults

  • Properties:
    • bool IsFD { get; set; }
    • int ArbBaseBitrate { get; set; }
    • int ArbBaseSJW { get; set; }
    • int DataBitrate { get; set; }
    • int DataSJW { get; set; }
    • string FileType { get; set; }
  • Methods:
    • bool Validate() — Validates the defaults.

IDigitalOutDbRecord

  • Properties:
    • int DatabaseId { get; set; }
    • string SerialNumber { get; set; }
    • double DODelay { get; set; }
    • double DODuration { get; set; }
    • string ModifiedBy { get; set; }
    • DateTime LastModified { get; set; }
    • string ISOCode { get; set; }
    • string ISOChannelName { get; set; }
    • string UserCode { get; set; }
    • string UserChannelName { get; set; }
    • bool Broken { get; set; }
    • bool DoNotUse { get; set; }
    • DigitalOutputModes DOMode { get; set; }
    • bool LimitDuration { get; set; }
    • int Version { get; set; }
    • byte[] TagsBlobBytes { get; set; }

IThermocouplerRecord

  • Properties:
    • int Id { get; set; } — Primary key.
    • string SerialNumber { get; set; } — Required, max 50 chars.
    • DateTime LastModified { get; set; }
    • string LastUpdatedBy { get; set; }
    • byte[] TagsBlobBytes { get; set; }
    • bool DoNotUse { get; set; }
    • bool Broken { get; set; }

IStreamInputRecord

  • Properties:
    • int Id { get; set; } — Primary key.
    • string SerialNumber { get; set; } — Required, max 50 chars.
    • DateTime LastModified { get; set; }
    • string LastUpdatedBy { get; set; }
    • byte[] TagsBlobBytes { get; set; }
    • bool DoNotUse { get; set; }
    • bool Broken { get; set; }
    • string StreamInUDPAddress { get; set; }

IDigitalOutDefaults

  • Properties:
    • DigitalOutputModes OutputMode { get; set; }
    • double DelayMS { get; set; }
    • bool LimitDuration { get; set; }
    • double DurationMS { get; set; }

IDigitalInputDefaults

  • Properties:
    • double ConstantCurrentBreakpointADC { get; set; }
    • double VoltageBreakpointADC { get; set; }
    • bool DisplaySPDADC { get; set; }
  • Methods:
    • bool Validate() — Validates the defaults.

IDigitalInputScaleMultiplier

  • Properties:
    • Forms Form { get; set; }enum Forms { ArbitraryLowAndHigh }
    • double DefaultValue { get; set; }
    • double ActiveValue { get; set; }
  • Methods:
    • bool SimpleEquals(IDigitalInputScaleMultiplier rhs)
    • string ToSerializeDbString()
    • void FromDbSerializeString(string s)

ICANRecord

  • Properties:
    • int Id { get; set; } — Primary key.
    • string SerialNumber { get; set; } — Required, max 50 chars.
    • DateTime LastModified { get; set; }
    • string LastUpdatedBy { get; set; }
    • byte[] TagsBlobBytes { get; set; }
    • bool DoNotUse { get; set; }
    • bool Broken { get; set; }
    • bool CanIsFD { get; set; }
    • int CanArbBaseBitrate { get; set; }
    • int CanArbBaseSJW { get; set; }
    • int CanDataBitrate { get; set; }
    • int CanDataSJW { get; set; }
    • string CanFileType { get; set; }

IUartSettingDefaults

  • Properties:
    • uint BaudRate { get; set; }
    • uint DataBits { get; set; }
    • StopBits StopBits { get; set; }
    • Parity Parity { get; set; }
    • Handshake FlowControl { get; } — Read-only.
    • UartDataFormat DataFormat { get; set; }
  • Methods:
    • bool Validate() — Validates the defaults.

ISensorChangeRecord

  • Properties:
    • int RecordId { get; }
    • int SensorId { get; }
    • DateTime TimeStamp { get; }
    • string UserName { get; }

ISensorChange

  • Extends: ISensorChangeRecord
  • Properties:
    • SensorChangeTypes ChangeType { get; }
    • string Value1 { get; }
    • string Value2 { get; }
    • string Value3 { get; }
    • string Value4 { get; }

IOffsetToleranceChange

  • Extends: ISensorChange
  • Properties:
    • double LowMvValue { get; }
    • double HighMvValue { get; }
    • double LowEUValue { get; }
    • double HighEUValue { get; }

IUARTRecord

  • Properties:
    • int Id { get; set; } — Primary key.
    • string SerialNumber { get; set; } — Required, max 50 chars.
    • uint UartBaudRate { get; set; }
    • uint UartDataBits { get; set; }
    • StopBits UartStopBits { get; set; } — Max 50 chars (stringified enum).
    • Handshake UartFlowControl { get; } — Read-only.
    • UartDataFormat UartDataFormat { get; set; } — Max 50 chars (stringified enum).
    • Parity UartParity { get; set; }
    • DateTime LastModified { get; set; }
    • string LastUpdatedBy { get; set; }
    • byte[] TagsBlobBytes { get; set; }
    • bool DoNotUse { get; set; }
    • bool Broken { get; set; }

IStreamOutputSettingDefaults

  • Properties:
    • UDPStreamProfile Profile { get; set; }
    • string UDPAddress { get; set; }
    • ushort TimeChannelId { get; set; }
    • ushort DataChannelId { get; set; }
    • string TmNSConfig { get; set; }
    • ushort IRIGTimeDataPacketIntervalMs { get; set; }
    • bool UseAdvancedUDPStreamProfiles { get; set; }
  • Methods:
    • bool Validate() — Validates the defaults.

ISensorCalDbRecord

  • Properties:
    • int? CalibrationId { get; set; } — Primary key (nullable).
    • string SerialNumber { get; set; }
    • DateTime CalibrationDate { get; set; }
    • string Username { get; set; } — Required, max 50 chars.
    • bool LocalOnly { get; set; }
    • bool NonLinear { get; set; }
    • ICalibrationRecords Records { get; set; } — Required, max 255 chars (serialized).
    • DateTime ModifyDate { get; set; }
    • bool IsProportional { get; set; }
    • bool RemoveOffset { get; set; }
    • ZeroMethods ZeroMethods { get; set; } — Required, max 255 chars (serialized).
    • string[] CertificationDocuments { get; set; } — Required, max 2048 chars (serialized).
    • InitialOffsets InitialOffsets { get; set; }
    • bool LinearAdded { get; } — Read-only.
    • SensitivityInspectionType SensitivityInspection { get; set; }
    • string CalibrationNote { get; set; } — Max 2048 chars.
    • int UsageCount { get; set; }

IAnalogDefaults

  • Properties:
    • IFilterClass SelectedFilterOption { get; set; }
    • List<IFilterClass> FilterOptions { get; }
    • bool UseMeasuredExcitation { get; set; }
    • bool TrackAnalogDiagnosticsEnabled { get; }
    • bool TrackAnalogDiagnostics { get; set; }
  • Methods:
    • bool Validate()
    • void Save()
    • void ReadXML(XmlElement root)
    • void WriteXML(ref XmlWriter writer)

ISensorCalibration

  • Extends: ISensorCalDbRecord
  • Properties:
    • string EngineeringUnits { get; }
    • long CalVersion { get; set; }
    • string UUID { get; set; }
    • string DocumentID { get; set; }
    • NonLinearStyles IRTraccCalculationType { get; set; }
  • Methods:
    • double GetPolynomialEU(double inputmV, double excitation)
    • string ToSerializedString()
    • void FromSerializedString(string s)
    • string ToDisplayString(ExcitationVoltageOption excitation, string linearFormat, string nonlinearFormat, bool iepe)
    • string ToLinearDisplayString(ExcitationVoltageOption excitation, string linearFormat, bool iepe)
    • string ToNonLinearDisplayString(string nonlinearFormat, bool iepe)
    • void ReadXML(XmlElement root)
    • void WriteXML(ref XmlWriter writer)
    • bool IsCompatibleWithIEPE() — Returns true if calibration is linear and non-proportional.
    • void CopyValues(ISensorCalibration copy)

IStreamOutputRecord

  • Properties:
    • int Id { get; set; } — Primary key.
    • string SerialNumber { get; set; } — Required, max 50 chars.
    • DateTime LastModified { get; set; }
    • string LastUpdatedBy { get; set; }
    • byte[] TagsBlobBytes { get; set; }
    • bool DoNotUse { get; set; }
    • bool Broken { get; set; }
    • UDPStreamProfile StreamOutUDPProfile { get; set; }
    • string StreamOutUDPAddress { get; set; }
    • ushort StreamOutUDPTimeChannelId { get; set; }
    • ushort StreamOutUDPDataChannelId { get; set; }
    • string StreamOutUDPTmNSConfig { get; set; }
    • ushort StreamOutIRIGTimeDataPacketIntervalMs { get; set; }
    • ushort StreamOutTMATSIntervalMs { get; set; }

ICalibrationRecord

  • Properties:
    • bool AtCapacity { get; set; }
    • double CapacityOutputIsBasedOn { get; set; }
    • string EngineeringUnits { get; set; }
    • ExcitationVoltageOption Excitation { get; set; }
    • string ISOCode { get; set; }
    • LinearizationFormula Poly { get; set; }
    • double Sensitivity { get; set; }
    • SensUnits SensitivityUnits { get; set; }
    • double ZeroPoint { get; set; }
  • Methods:
    • string ToDisplayString(ISensorCalibration sc, ICalibrationRecord previous, ISensorCalibration sc2, string linearFormat, string nonlinearFormat)
    • string ToSerializedString(ISensorCalDbRecord sc)
    • bool IsEqual(object obj, ISensorCalibration sc)

ICalibrationRecords

  • Properties:
    • ICalibrationRecord[] Records { get; set; }
  • Methods:
    • void FromSerializedString(string s)
    • bool IsEqual(object obj, ISensorCalibration sc)
    • string ToDisplayString(ISensorCalibration sc, ISensorCalibration previous, string linearFormat, string nonlinearFormat)
    • string ToSerializedString(ISensorCalDbRecord sc)

IIEPESensorDefaults

  • Properties:
    • double _24VPowerLow { get; set; }
    • double _24VPowerHigh { get; set; }
    • double RangeLowLimitScalar { get; set; }
    • double RangeHighLimitScalar { get; set; }
    • bool RangeToleranceValid { get; }
    • bool ToleranceValid { get; }
    • bool DisableAutoSense { get; set; }
  • Methods:
    • bool Validate()
    • void ReadXML(XmlElement root)
    • void WriteXML(ref XmlWriter writer)

ISquibDbRecord

  • Properties:
    • string SerialNumber { get; set; }
    • int Id { get; set; } — Primary key.
    • bool BypassCurrentFilter { get; set; }
    • bool BypassVoltageFilter { get; set; }
    • double DelayMs { get; set; } — Mapped to column "DelayMS".
    • double DurationMs { get; set; } — Mapped to column "DurationMS".
    • SquibFireMode FireMode { get; set; }
    • string IsoCode { get; set; } — Required, max 50 chars.
    • string IsoChannelName { get; set; } — Required, max 255 chars.
    • string UserCode { get; set; } — Required, max 50 chars.
    • string UserChannelName { get; set; } — Required, max 255 chars.
    • SquibMeasurementType MeasurementType { get; set; }
    • double SquibOutputCurrent { get; set; }
    • double SquibToleranceLow { get; set; }
    • double SquibToleranceHigh { get; set; }
    • bool LimitDuration { get; set; }
    • string ArticleId { get; set; } — Required, max 50 chars.
    • int Version { get; set; }
    • DateTime LastModified { get; set; }
    • string LastModifiedBy { get; set; } — Required, max 50 chars.
    • string UserValue1 { get; set; } — Max 255 chars.
    • string UserValue2 { get; set; } — Max 255 chars.
    • string UserValue3 { get; set; } — Max 255 chars.
    • `byte[] UserTags { get; set