init
This commit is contained in:
257
docs/ai/DataPRO/Modules/TestSetups/Imports/TTS/Model.md
Normal file
257
docs/ai/DataPRO/Modules/TestSetups/Imports/TTS/Model.md
Normal file
@@ -0,0 +1,257 @@
|
||||
---
|
||||
source_files:
|
||||
- DataPRO/Modules/TestSetups/Imports/TTS/Model/WorkFunctionThreadData.cs
|
||||
- DataPRO/Modules/TestSetups/Imports/TTS/Model/SummaryChannel.cs
|
||||
- DataPRO/Modules/TestSetups/Imports/TTS/Model/ChannelSummary.cs
|
||||
- DataPRO/Modules/TestSetups/Imports/TTS/Model/DasSummary.cs
|
||||
- DataPRO/Modules/TestSetups/Imports/TTS/Model/HardwareSummaryRecord.cs
|
||||
- DataPRO/Modules/TestSetups/Imports/TTS/Model/TTSTestSetup.cs
|
||||
- DataPRO/Modules/TestSetups/Imports/TTS/Model/TTSLevelTriggerRecord.cs
|
||||
- DataPRO/Modules/TestSetups/Imports/TTS/Model/DASChannel.cs
|
||||
- DataPRO/Modules/TestSetups/Imports/TTS/Model/TTSChannelRecord.cs
|
||||
generated_at: "2026-04-17T15:50:30.197430+00:00"
|
||||
model: "zai-org/GLM-5-FP8"
|
||||
schema_version: 1
|
||||
sha256: "aa6e85661fc3946d"
|
||||
---
|
||||
|
||||
# TTS Import Model Documentation
|
||||
|
||||
## 1. Purpose
|
||||
|
||||
This module provides the data model layer for TTS (Toyota Test Setup) import functionality within the DataPRO test setup system. It contains model classes representing test configurations, channel records, hardware channel assignments, level triggers, and various summary records. These models implement `INotifyPropertyChanged` for WPF data binding, support serialization via `GetBytes()` methods for hash generation, and serve as the bridge between hardware abstraction layers and the UI for test setup import workflows.
|
||||
|
||||
---
|
||||
|
||||
## 2. Public Interface
|
||||
|
||||
### WorkFunctionThreadData
|
||||
**Namespace:** `TTSImport.Model`
|
||||
|
||||
Simple container for thread synchronization events.
|
||||
|
||||
| Member | Signature | Description |
|
||||
|--------|-----------|-------------|
|
||||
| Constructor | `WorkFunctionThreadData()` | Initializes `CancelEvent` and `DoneEvent` as non-signaled (`false`). |
|
||||
| CancelEvent | `ManualResetEvent { get; }` | Read-only event for signaling thread cancellation. |
|
||||
| DoneEvent | `ManualResetEvent { get; }` | Read-only event for signaling thread completion. |
|
||||
|
||||
---
|
||||
|
||||
### SummaryChannel
|
||||
**Namespace:** `TTSImport.Model`
|
||||
**Implements:** `ISummaryChannel`
|
||||
|
||||
| Member | Signature | Description |
|
||||
|--------|-----------|-------------|
|
||||
| ChannelType | `string { get; set; }` | Channel type identifier. Raises `PropertyChanged` on set. |
|
||||
| Assigned | `int { get; set; }` | Count of assigned channels. Raises `PropertyChanged` on set. |
|
||||
| Unassigned | `string { get; set; }` | Unassigned channel information. Raises `PropertyChanged` on set. |
|
||||
| PropertyChanged | `event PropertyChangedEventHandler` | Standard property changed event. |
|
||||
| OnPropertyChanged | `void OnPropertyChanged(string propertyName)` | Invokes `PropertyChanged` event if handlers are attached. |
|
||||
|
||||
---
|
||||
|
||||
### ChannelSummary
|
||||
**Namespace:** `TTSImport.Model`
|
||||
**Implements:** `IChannelSummary`
|
||||
|
||||
| Member | Signature | Description |
|
||||
|--------|-----------|-------------|
|
||||
| ChannelType | `string { get; set; }` | Channel type identifier. |
|
||||
| Requested | `int { get; set; }` | Number of requested channels. |
|
||||
| Assigned | `int { get; set; }` | Number of assigned channels. |
|
||||
| Unassigned | `int { get; set; }` | Number of unassigned channels. |
|
||||
| PropertyChanged | `event PropertyChangedEventHandler` | Property changed event. |
|
||||
| OnPropertyChanged | `void OnPropertyChanged(string propertyName)` | Raises `PropertyChanged` event. |
|
||||
|
||||
---
|
||||
|
||||
### DasSummary
|
||||
**Namespace:** `TTSImport.Model`
|
||||
**Implements:** `IDasSummary`
|
||||
|
||||
| Member | Signature | Description |
|
||||
|--------|-----------|-------------|
|
||||
| DASSerial | `string { get; set; }` | DAS device serial number. |
|
||||
| EIDFound | `string { get; set; }` | Electronic ID found status. |
|
||||
| BatteryVoltageStatus | `string { get; set; }` | Battery voltage status string. |
|
||||
| BatteryVoltageColor | `System.Windows.Media.SolidColorBrush { get; set; }` | Color indicator for battery voltage status. |
|
||||
| InputVoltageStatus | `string { get; set; }` | Input voltage status string. |
|
||||
| InputVoltageColor | `System.Windows.Media.SolidColorBrush { get; set; }` | Color indicator for input voltage status. |
|
||||
| PropertyChanged | `event PropertyChangedEventHandler` | Property changed event. |
|
||||
| OnPropertyChanged | `void OnPropertyChanged(string propertyName)` | Raises `PropertyChanged` event. |
|
||||
|
||||
---
|
||||
|
||||
### HardwareSummaryRecord
|
||||
**Namespace:** `TTSImport.Model`
|
||||
**Implements:** `IHardwareSummaryRecord`
|
||||
**Base:** `DTS.Common.Base.BasePropertyChanged`
|
||||
|
||||
| Member | Signature | Description |
|
||||
|--------|-----------|-------------|
|
||||
| DOut | `uint { get; set; }` | Digital output count. |
|
||||
| DIn | `uint { get; set; }` | Digital input count. |
|
||||
| Squib | `uint { get; set; }` | Squib channel count. |
|
||||
| Analog | `uint { get; set; }` | Analog channel count. |
|
||||
| SPS | `uint { get; set; }` | SPS device count. |
|
||||
| SPD | `uint { get; set; }` | SPD device count. |
|
||||
| SPT | `uint { get; set; }` | SPT device count. |
|
||||
| ECM | `uint { get; set; }` | ECM device count. |
|
||||
| Rack | `uint { get; set; }` | Rack count. |
|
||||
| G5 | `uint { get; set; }` | G5 device count. |
|
||||
| Total | `uint { get; }` | Sum of `Analog + Squib + DIn + DOut`. Private setter. |
|
||||
| UpdateTotal | `void UpdateTotal()` | Recalculates `Total` from component counts. |
|
||||
| Update | `void Update(uint analog, uint squib, uint din, uint dout, uint ecm, uint sps, uint spt, uint spd, uint g5, uint rack)` | Sets all counts and calls `UpdateTotal()`. |
|
||||
|
||||
---
|
||||
|
||||
### TTSTestSetup
|
||||
**Namespace:** `TTSImport.Model`
|
||||
**Implements:** `ITTSSetup`
|
||||
|
||||
| Member | Signature | Description |
|
||||
|--------|-----------|-------------|
|
||||
| SampleRate | `double { get; set; }` | Sample rate for recording. |
|
||||
| Mode | `RecordingModes { get; set; }` | Recording mode enum value. |
|
||||
| TestLength | `double { get; }` | Computed as `PreTrigger + PostTrigger`. |
|
||||
| PreTrigger | `double { get; set; }` | Pre-trigger duration. |
|
||||
| PostTrigger | `double { set; }` | Post-trigger duration. |
|
||||
| ROIStart | `double { get; set; }` | Region of interest start time. |
|
||||
| ROIEnd | `double { get; set; }` | Region of interest end time. |
|
||||
| Filename | `string { get; set; }` | Output filename. |
|
||||
| TestId | `string { get; set; }` | Test identifier. |
|
||||
| Line1–Line4 | `string { get; set; }` | First 4 lines of CSV file for recreation. |
|
||||
| DummyList | `string[] { get; set; }` | Array of 8 dummy strings. |
|
||||
| Channels | `ITTSChannelRecord[] { get; set; }` | Array of channel records. |
|
||||
| LevelTriggers | `ILevelTrigger[] { get; set; }` | Array of 6 level triggers. |
|
||||
| OriginalImportFile | `string { get; set; }` | Path to original import file. |
|
||||
| AllowAdvancedRecordingModes | `bool { get; set; }` | Enables HybridRecorder options. |
|
||||
| AllowActiveRecordingModes | `bool { get; set; }` | Enables Active RAM modes. |
|
||||
| AllowTSRAIRRecordingModes | `bool { get; set; }` | Enables TSRAIR recording modes. |
|
||||
| RequireEIDFound | `bool { get; set; }` | Whether EIDs must be found for sensor use. |
|
||||
| DefaultDigitalInputMode | `string { get; set; }` | Default digital input mode from config. |
|
||||
| SquibDefaults | `ISquibSettingDefaults { get; set; }` | Default squib settings. |
|
||||
| DefaultSquibFireDurationMs | `double { get; set; }` | Default squib fire duration from config. |
|
||||
| PreAssignedSensorIdAndHwId | `Tuple<string, string>[] { get; set; }` | Pre-existing sensor-to-hardware assignments from XML import. |
|
||||
| Constructor | `TTSTestSetup()` | Initializes `DummyList[8]`, empty `Channels`, and 6 `LevelTriggers`. |
|
||||
| GetHashCode | `new string GetHashCode()` | Returns SHA256 hash string of test setup state. **Note:** Uses `new` keyword to hide base method. |
|
||||
|
||||
---
|
||||
|
||||
### TTSLevelTriggerRecord
|
||||
**Namespace:** `TTSImport.Model`
|
||||
**Implements:** `ILevelTrigger`
|
||||
**Base:** `DTS.Common.Base.BasePropertyChanged`
|
||||
|
||||
| Member | Signature | Description |
|
||||
|--------|-----------|-------------|
|
||||
| Code | `string { get; }` | Channel code from associated channel, or empty string. |
|
||||
| JCode | `string { get; }` | JCODE from associated channel, or empty string. |
|
||||
| ValuePercent | `double { get; set; }` | Threshold as percentage of full scale. Triggers `RecalculateEUValue()`. |
|
||||
| ValueEU | `double { get; set; }` | Threshold in engineering units. Triggers `RecalculatePercent()`. |
|
||||
| EULabel | `string { get; }` | Engineering units label from associated channel. |
|
||||
| HWSerialNumber | `string { get; }` | Hardware channel display string. |
|
||||
| ChannelNumber | `int { get; }` | TTS channel number, or 0 if no channel. |
|
||||
| Channel | `ITTSChannelRecord { get; set; }` | Associated channel record. Setting triggers refresh of all other level triggers. |
|
||||
| TestSetup | `ITTSSetup { get; }` | Parent test setup (set via constructor). |
|
||||
| AvailableChannels | `ITTSChannelRecord[] { get; }` | Channels eligible for level trigger assignment. Enforces max 2 per G5, no duplicate codes/SIMs. |
|
||||
| IsActive | `bool { get; }` | True if `Channel` is set and not an empty record. |
|
||||
| IsModified | `bool { get; set; }` | Dirty flag for tracking changes. |
|
||||
| Constructor | `TTSLevelTriggerRecord(ITTSSetup setup)` | Sets `TestSetup` reference. |
|
||||
| GetBytes | `byte[] GetBytes()` | Serializes trigger state for hashing. Returns empty array if inactive. |
|
||||
| Refresh | `void Refresh()` | Updates `AvailableChannels` and validates current `Channel` assignment. Re-entrancy guarded. |
|
||||
| Add | `void Add(ITTSChannelRecord channel)` | Raises `AvailableChannels` property changed. |
|
||||
| Remove | `void Remove(ITTSChannelRecord channel)` | Unassigns `Channel` if matches parameter; raises `AvailableChannels` changed. |
|
||||
| ToString | `override string ToString()` | Returns `Code`. |
|
||||
|
||||
---
|
||||
|
||||
### DASChannel
|
||||
**Namespace:** `TTSImport.Model`
|
||||
**Base:** `System.Windows.DependencyObject`
|
||||
**Implements:** `INotifyPropertyChanged`
|
||||
|
||||
| Member | Signature | Description |
|
||||
|--------|-----------|-------------|
|
||||
| Disabled | `bool` (DependencyProperty) | Whether channel is disabled for test execution. |
|
||||
| HardwareChannel | `IHardwareChannel { get; }` | Wrapped hardware channel interface. |
|
||||
| TestSetup | `ITTSSetup { get; }` | Associated test setup (optional). |
|
||||
| Channel | `ITTSChannelRecord { get; private set; }` | Associated TTS channel record. |
|
||||
| DASChannelString | `string { get; }` | String representation of hardware channel. |
|
||||
| ToyotaCode | `string { get; set; }` | Channel code from `Channel.ChannelCode`. |
|
||||
| EID | `string { get; set; }` | Electronic ID on physical channel. |
|
||||
| Name | `string { get; set; }` | JCode or description from channel. |
|
||||
| SerialNumber | `string { get; }` | Sensor serial number. |
|
||||
| Sensitivity | `double { get; }` | Sensor sensitivity. |
|
||||
| SensitivityString | `string { get; }` | Sensitivity formatted to 12 decimal places. |
|
||||
| IsActive | `bool { get; }` | True if `Channel` is set (and for digital out, mode is not `NONE`). |
|
||||
| Capacity | `double { get; }` | Sensor capacity. |
|
||||
| Range | `double { get; set; }` | Channel range. |
|
||||
| CableMultiplier | `double { get; set; }` | Cable multiplier factor. |
|
||||
| Polarity | `string { get; set; }` | `"+"` or `"-"` based on `SensorPolarity`. |
|
||||
| DigitalOutputMode | `DigitalOutputModes { get; set; }` | Digital output mode; setting to/from `NONE` adds/removes from test setup. |
|
||||
| DigitalOutputDelayMs | `double { get; set; }` | Delay between trigger and output. |
|
||||
| DigitalOutputDurationMs | `double { get; set; }` | Output duration (default 100ms). |
|
||||
| SquibFireMode | `SquibFireMode { get; set; }` | Squib firing mode. |
|
||||
| SquibFireDelayMs | `double { get; set; }` | Delay before squib fire. |
|
||||
| SquibFireCurrent | `double { get; set; }` | Current limit in amps. |
|
||||
| SquibFireDurationMs | `double { get; set; }` | Squib fire duration. |
|
||||
| SquibFireResistanceLowOhm | `double { get; set; }` | Low resistance tolerance (default 1Ω). |
|
||||
| SquibFireResistanceHighOhm | `double { get; set; }` | High resistance tolerance (default 8Ω). |
|
||||
| LimitDuration | `bool { get; set; }` | Whether to limit squib fire duration. |
|
||||
| Constructor | `DASChannel(IHardwareChannel channel)` | Wraps hardware channel. |
|
||||
| Constructor | `DASChannel(IHardwareChannel channel, ITTSSetup setup)` | Wraps hardware channel with test setup reference. |
|
||||
| SetITTSChannelRecord | `void SetITTSChannelRecord(ITTSChannelRecord channel)` | Assigns/unassigns channel record to hardware. Updates all UI properties. |
|
||||
| Polarities | `IEnumerable<string>` | Returns `["+", "-"]`. |
|
||||
| SquibFireModes | `IEnumerable<SquibFireMode>` | Returns `[CAP, CONSTANT]`. |
|
||||
| OutputModes | `IEnumerable<DigitalOutputModes>` | Returns available digital output modes. |
|
||||
|
||||
---
|
||||
|
||||
### TTSChannelRecord
|
||||
**Namespace:** `TTSImport.Model`
|
||||
**Implements:** `ITTSChannelRecord`
|
||||
**Base:** `DTS.Common.Base.BasePropertyChanged`
|
||||
|
||||
| Member | Signature | Description |
|
||||
|--------|-----------|-------------|
|
||||
| ChannelNumber | `int { get; set; }` | TTS channel number. |
|
||||
| ChannelCode | `string { get; set; }` | Channel code identifier. |
|
||||
| JCodeOrDescription | `string { get; set; }` | J-code or description. Updates `IsJCodeValid` on set. |
|
||||
| ChannelRange | `double { get; set; }` | Channel range in EU. Updates `IsRangeValid` on set. |
|
||||
| ChannelRangeString | `string { get; set; }` | String representation of range. |
|
||||
| ChannelFilterHz | `int { get; set; }` | Filter frequency in Hz. Updates `IsFilterValid` on set. |
|
||||
| FilterString | `string { get; set; }` | String representation of filter. |
|
||||
| SensorSerialNumber | `string { get; set; }` | Sensor serial number. |
|
||||
| SensorEID | `string { get; set; }` | Sensor electronic ID. |
|
||||
| SensorSensitivity | `double { get; set; }` | Sensor sensitivity. |
|
||||
| SensorExcitationVolts | `double { get; set; }` | Excitation voltage. |
|
||||
| SensorCapacity | `double { get; set; }` | Sensor capacity. |
|
||||
| SensorEU | `string { get; set; }` | Engineering units. |
|
||||
| SensorPolarity | `bool { get; set; }` | Polarity flag. |
|
||||
| ChannelType | `ToyotaBridgeType { get; set; }` | Bridge type enum. |
|
||||
| Description | `string { get; set; }` | Channel description. |
|
||||
| ProportionalToExcitation | `bool { get; set; }` | Whether proportional to excitation. |
|
||||
| BridgeResistance | `double { get; set; }` | Bridge resistance. |
|
||||
| InitialOffsetVoltage | `double { get; set; }` | Initial offset voltage. |
|
||||
| InitialOffsetVoltageTolerance | `double { get; set; }` | Offset voltage tolerance. |
|
||||
| RemoveOffset | `bool { get; set; }` | Whether to remove offset. |
|
||||
| ZeroMethod | `ToyotaZeroMethods { get; set; }` | Zero method enum. |
|
||||
| CableMultiplier | `double { get; set; }` | Cable multiplier. |
|
||||
| InitialEUInMV | `double { get; set; }` | Initial EU in mV. |
|
||||
| InitialEUInEU | `double { get; set; }` | Initial EU value. |
|
||||
| IRTraccExponent | `double { get; set; }` | IRTracc exponent. |
|
||||
| PolynomialConstant | `double { get; set; }` | Polynomial constant term. |
|
||||
| PolynomialCoefficientA–C, Alpha | `double { get; set; }` | Polynomial coefficients. |
|
||||
| ISOCode | `string { get; set; }` | ISO code. |
|
||||
| ISODescription | `string { get; set; }` | ISO description. |
|
||||
| ISOPolarity | `string { get; set; }` | ISO polarity. |
|
||||
| IsSquib | `bool { get; set; }` | Whether this is a squib channel. |
|
||||
| IsDigitalInput | `bool { get; set; }` | Whether this is a digital input. |
|
||||
| IsDigitalOutput | `bool { get; set; }` | Whether this is a digital output. |
|
||||
| HardwareChannel | `IHardwareChannel { get; set; }` | Associated hardware channel. |
|
||||
| IsEmptyRecord | `bool { get; }` | True if `ChannelCode == "NONE"` and no serial number. |
|
||||
| IsChannelCodeValid | `bool { get; set; }` | Channel code validation state. |
|
||||
| IsJCodeValid | `bool { get; set; }`
|
||||
Reference in New Issue
Block a user