This commit is contained in:
2026-04-17 14:55:32 -04:00
commit bc3ac1d4c9
18017 changed files with 4371742 additions and 0 deletions

View File

@@ -0,0 +1,6 @@
using DTS.Common.Base;
namespace DTS.Common.Interface.TestSetups.Imports.TTS
{
public interface IAnalogChannelsView : IBaseView { }
}

View File

@@ -0,0 +1,10 @@
using DTS.Common.Base;
namespace DTS.Common.Interface.TestSetups.Imports.TTS
{
public interface IAnalogChannelsViewModel : IBaseViewModel
{
IAnalogChannelsView View { get; set; }
string Validate();
}
}

View File

@@ -0,0 +1,6 @@
using DTS.Common.Base;
namespace DTS.Common.Interface.TestSetups.Imports.TTS.DIChannels
{
public interface IDigitalInputChannelsView : IBaseView { }
}

View File

@@ -0,0 +1,9 @@
using DTS.Common.Base;
namespace DTS.Common.Interface.TestSetups.Imports.TTS.DIChannels
{
public interface IDigitalInputChannelsViewModel : IBaseViewModel
{
IDigitalInputChannelsView View { get; set; }
}
}

View File

@@ -0,0 +1,6 @@
using DTS.Common.Base;
namespace DTS.Common.Interface.TestSetups.Imports.TTS.DOChannels
{
public interface IDigitalOutputChannelsView : IBaseView { }
}

View File

@@ -0,0 +1,9 @@
using DTS.Common.Base;
namespace DTS.Common.Interface.TestSetups.Imports.TTS.DOChannels
{
public interface IDigitalOutputChannelsViewModel : IBaseViewModel
{
IDigitalOutputChannelsView View { get; set; }
}
}

View File

@@ -0,0 +1,6 @@
using DTS.Common.Base;
namespace DTS.Common.Interface.TestSetups.Imports.TTS
{
public interface IEditFileView : IBaseView { }
}

View File

@@ -0,0 +1,29 @@
using DTS.Common.Base;
using DTS.Common.Interface.TestSetups.Imports.TTS.ReadFile;
namespace DTS.Common.Interface.TestSetups.Imports.TTS
{
public interface IEditFileViewModel : IBaseViewModel
{
IEditFileView View { get; set; }
bool Validate();
/// <summary>
/// validates changes on page
/// if record is passed in, also makes sure there are no
/// RequiredChannels with identical channel codes
/// </summary>
/// <param name="record">null, or record being changed</param>
/// <returns></returns>
bool ValidateChange(ITTSChannelRecord record = null);
bool ChangeValidationIsNeeded { get; set; }
/// <summary>
/// Initializes components in View UI
/// </summary>
void InitializeView();
/// <summary>
/// filters the available sensors by the given text
/// </summary>
/// <param name="text"></param>
void Search(string text);
}
}

View File

@@ -0,0 +1,12 @@
using DTS.Common.Base;
namespace DTS.Common.Interface
{
public interface IChannelSummary : IBaseClass
{
string ChannelType { get; set; }
int Requested { get; set; }
int Assigned { get; set; }
int Unassigned { get; set; }
}
}

View File

@@ -0,0 +1,14 @@
using DTS.Common.Base;
namespace DTS.Common.Interface
{
public interface IDasSummary : IBaseClass
{
string DASSerial { get; set; }
string EIDFound { get; set; }
string BatteryVoltageStatus { get; set; }
System.Windows.Media.SolidColorBrush BatteryVoltageColor { get; set; }
string InputVoltageStatus { get; set; }
System.Windows.Media.SolidColorBrush InputVoltageColor { get; set; }
}
}

View File

@@ -0,0 +1,6 @@
using DTS.Common.Base;
namespace DTS.Common.Interface
{
public interface IHardwareScanView : IBaseView { }
}

View File

@@ -0,0 +1,25 @@
using System.Collections.Generic;
using DTS.Common.Base;
using DTS.Common.Interface.TestSetups.Imports.TTS.HardwareScan;
using DTS.Common.Interface.TestSetups.Imports.TTS.ReadFile;
using DTS.Common.Utils;
namespace DTS.Common.Interface
{
public interface IHardwareScanViewModel : IBaseViewModel
{
IHardwareScanView View { get; set; }
IHardwareSummaryRecord[] HardwareRecords { get; }
void SetStatus(string status);
void SetProgress(double progress);
void HardwareScan();
void SetChannelSummaryList(ITTSChannelRecord[] channelRecords);
}
/// <summary>
/// delegate to scan hardware
/// </summary>
public delegate void HardwareScanDelegate();
}

View File

@@ -0,0 +1,21 @@
namespace DTS.Common.Interface.TestSetups.Imports.TTS.HardwareScan
{
public interface IHardwareSummaryRecord
{
uint DOut { get; set; }
uint DIn { get; set; }
uint Squib { get; set; }
uint Analog { get; set; }
uint Total { get; }
uint SPS { get; set; }
uint SPD { get; set; }
uint SPT { get; set; }
uint ECM { get; set; }
uint Rack { get; set; }
uint G5 { get; set; }
void UpdateTotal();
void Update(uint analog, uint squib, uint din, uint dout, uint ecm, uint sps, uint spt, uint spd, uint g5,
uint rack);
}
}

View File

@@ -0,0 +1,40 @@
using DTS.Common.Interface.TestSetups.Imports.TTS.ReadFile;
namespace DTS.Common.Interface.TestSetups.Imports.TTS.LevelTrigger
{
public interface ILevelTrigger
{
string Code { get; }
string JCode { get; }
double ValuePercent { get; set; }
double ValueEU { get; set; }
string EULabel { get; }
string HWSerialNumber { get; }
int ChannelNumber { get; }
ITTSChannelRecord Channel { get; set; }
ITTSSetup TestSetup { get; }
ITTSChannelRecord[] AvailableChannels { get; }
bool IsActive { get; }
/// <summary>
/// updates available channels and Channel
/// </summary>
void Refresh();
/// <summary>
/// adds the channel as a possible channel for level trigger
/// </summary>
/// <param name="channel"></param>
void Add(ITTSChannelRecord channel);
/// <summary>
/// removes the channel as a possible channel for level trigger,
/// unassigns channel if currently assigned
/// </summary>
/// <param name="channel"></param>
void Remove(ITTSChannelRecord channel);
bool IsModified { get; set; }
/// <summary>
/// returns a sequence of bytes representing this level trigger suitable to base a hash on
/// </summary>
/// <returns></returns>
byte[] GetBytes();
}
}

View File

@@ -0,0 +1,6 @@
using DTS.Common.Base;
namespace DTS.Common.Interface
{
public interface ILevelTriggerView : IBaseView { }
}

View File

@@ -0,0 +1,12 @@
using System.Collections.Generic;
using DTS.Common.Base;
using DTS.Common.Utils;
namespace DTS.Common.Interface
{
public interface ILevelTriggerViewModel : IBaseViewModel
{
ILevelTriggerView View { get; set; }
}
}

View File

@@ -0,0 +1,6 @@
using DTS.Common.Base;
namespace DTS.Common.Interface
{
public interface IReadFileView : IBaseView { }
}

View File

@@ -0,0 +1,23 @@
using DTS.Common.Base;
using DTS.Common.Enums;
using DTS.Common.Interface.Sensors;
namespace DTS.Common.Interface
{
public interface IReadFileViewModel : IBaseViewModel
{
IReadFileView View { get; set; }
void SetStatus(string status);
void SetStatus(string status, string error);
void SetProgress(double progress);
string FileToImport { get; set; }
void ReadFile(string fileName, double defaultSampleRate, RecordingModes defaultMode, double defaultTTSPreTrigger, double defaultTTSPostTrigger,
double defaultTTSROIStart, double defaultTTSROIEnd, bool defaultRequireEIDFound, string defaultDigitalInputMode, ISquibSettingDefaults squibDefaults);
}
/// <summary>
/// delegate to read a TTS import file
/// </summary>
/// <param name="importFile">file to be used for import</param>
public delegate void ReadFileDelegate(string importFile);
}

View File

@@ -0,0 +1,129 @@
using System.Windows;
using DTS.Common.Base;
using DTS.Common.Enums;
using DTS.Common.Enums.TTS;
using DTS.Common.Interface.DataRecorders;
namespace DTS.Common.Interface.TestSetups.Imports.TTS.ReadFile
{
/// <summary>
/// represents a single record in a TTS Import
/// </summary>
public interface ITTSChannelRecord : IBaseClass
{
int ChannelNumber { get; set; }
string ChannelCode { get; set; }
string JCodeOrDescription { get; set; }
double ChannelRange { get; set; }
int ChannelFilterHz { get; set; }
string SensorEID { get; set; }
string SensorSerialNumber { get; set; }
double SensorSensitivity { get; set; }
double SensorExcitationVolts { get; set; }
double SensorCapacity { get; set; }
string SensorEU { get; set; }
bool SensorPolarity { get; set; }
ToyotaBridgeType ChannelType { get; set; }
string Description { get; set; }
bool ProportionalToExcitation { get; set; }
double BridgeResistance { get; set; }
double InitialOffsetVoltage { get; set; }
double InitialOffsetVoltageTolerance { get; set; }
bool RemoveOffset { get; set; }
ToyotaZeroMethods ZeroMethod { get; set; }
double CableMultiplier { get; set; }
double InitialEUInMV { get; set; }
double InitialEUInEU { get; set; }
double IRTraccExponent { get; set; }
double PolynomialConstant { get; set; }
double PolynomialCoefficientC { get; set; }
double PolynomialCoefficentB { get; set; }
double PolynomialCoefficientA { get; set; }
double PolynomialCoefficientAlpha { get; set; }
string ISOCode { get; set; }
string ISODescription { get; set; }
string ISOPolarity { get; set; }
bool IsSquib { get; set; }
bool IsDigitalInput { get; set; }
bool IsDigitalOutput { get; set; }
/// <summary>
/// returns true if the record is empty (no channel code and no sensor serial number)
/// </summary>
bool IsEmptyRecord { get; }
IHardwareChannel HardwareChannel { get; set; }
/// <summary>
/// returns whether the channelcode is valid or not
/// </summary>
bool IsChannelCodeValid { get; set; }
bool IsJCodeValid { get; set; }
bool IsRangeValid { get; set; }
bool IsFilterValid { get; set; }
/// <summary>
/// disabled channels are channels which are in the test setup, but aren't used during run test
/// </summary>
bool Disabled { get; set; }
/// <summary>
/// for squibs, what firemode to use
/// </summary>
SquibFireMode SquibFireMode { get; set; }
/// <summary>
/// the delay in ms between trigger and squib fire
/// </summary>
double SquibFireDelayMs { get; set; }
/// <summary>
/// whether to limit the duration or not of squib fire
/// </summary>
bool LimitDuration { get; set; }
/// <summary>
/// the duration of the squib fire in ms from the start of firing
/// (if limiting duration)
/// </summary>
double SquibFireDurationMs { get; set; }
/// <summary>
/// the limit for current (amps)
/// </summary>
double SquibFireCurrent { get; set; }
/// <summary>
/// the squib resistance tolerance low value (ohms)
/// </summary>
double SquibFireResistanceLowOhm { get; set; }
/// <summary>
/// the squib resistance tolerance high value (ohms)
/// </summary>
double SquibFireResistanceHighOhm { get; set; }
/// <summary>
/// the digital input mode (if relevant)
/// </summary>
DigitalInputModes DigitalInputMode { get; set; }
/// <summary>
/// the digital output mode (if relevant)
/// </summary>
DigitalOutputModes DigitalOutputMode { get; set; }
/// <summary>
/// the delay between trigger and output (if relevant)
/// </summary>
double DigitalOutputDelay { get; set; }
/// <summary>
/// the duration of output after output started (if relevant)
/// </summary>
double DigitalOutputDuration { get; set; }
IEditFileViewModel Parent { get; set; }
//bool ValidationNeeded { get; set; }
ITTSChannelRecord Copy();
Visibility RangeVisible { get; }
Visibility FilterVisible { get; }
bool OriginallyRequestedChannel { get; set; }
/// <summary>
/// controls whether the channel should be marked as diagnostics mode or not
/// note that diagnostics mode is only used when the configuration supports diagnostics mode
/// even if the sensor has diagnosticsmode set to true
/// </summary>
bool DiagnosticsMode { get; set; }
bool IsModified { get; set; }
/// <summary>
/// returns an array of bytes to represent the channel, for use in CRC and hashing
/// </summary>
/// <returns>array of bytes representing the channel</returns>
byte[] GetBytes();
}
}

View File

@@ -0,0 +1,65 @@
using DTS.Common.Enums;
using DTS.Common.Interface.TestSetups.Imports.TTS.LevelTrigger;
using System;
namespace DTS.Common.Interface.TestSetups.Imports.TTS.ReadFile
{
public interface ITTSSetup
{
string Filename { get; set; }
string TestId { get; set; }
/// <summary>
/// The first 4 lines of the .csv file which may be needed to create a new .csv file in Edit File
/// </summary>
string Line1 { get; set; }
string Line2 { get; set; }
string Line3 { get; set; }
string Line4 { get; set; }
string[] DummyList { get; set; }
double SampleRate { get; set; }
RecordingModes Mode { get; set; }
double TestLength { get; }
double PreTrigger { get; set; }
double PostTrigger { get; set; }
double ROIStart { get; set; }
double ROIEnd { get; set; }
ITTSChannelRecord[] Channels { get; set; }
ILevelTrigger[] LevelTriggers { get; set; }
string OriginalImportFile { get; set; }
/// <summary>
/// The global default setting for Test Setups.
/// If True, HybridRecorder is added to CircularBuffer and Recorder.
/// </summary>
bool AllowAdvancedRecordingModes { get; set; }
/// <summary>
/// the global default setting for Test Setups
/// if true Active Ram and Active Ram Multiple Events recording modes
/// are allowed
/// http://manuscript.dts.local/f/cases/31841/Add-support-for-Active-RAM-mode
/// </summary>
bool AllowActiveRecordingModes { get; set; }
bool AllowTSRAIRRecordingModes { get; set; }
/// <summary>
/// allows consumers to specify whether EIDs must be found for sensors to be used
/// </summary>
bool RequireEIDFound { get; set; }
/// <summary>
/// The value from DataPRO.config.exe
/// </summary>
string DefaultDigitalInputMode { get; set; }
/// <summary>
/// The value from DataPRO.config.exe
/// </summary>
double DefaultSquibFireDurationMs { get; set; }
string GetHashCode();
/// <summary>
/// Holds sensors that should be assigned to hardware channels
/// this can only happen through the XML import, where hardware and sensors are already assigned
/// these persist until the assignment is made
/// once the assignment has been made it's no longer necessary to remember the assignment since it has already been made
/// this is necessary because readfile for the xml import happens before hardware is scanned
/// and the hardware scan might not find all hardware
/// </summary>
Tuple<string, string>[] PreAssignedSensorIdAndHwId { get; set; }
}
}

View File

@@ -0,0 +1,11 @@
using DTS.Common.Base;
namespace DTS.Common.Interface
{
public interface ISummaryChannel : IBaseClass
{
string ChannelType { get; set; }
int Assigned { get; set; }
string Unassigned { get; set; }
}
}

View File

@@ -0,0 +1,11 @@
using DTS.Common.Base;
namespace DTS.Common.Interface
{
public interface ISummaryView : IBaseView
{
void UpdateTestIds(string[] serializedValues);
string GetTestId();
void SetTestName(string testName);
}
}

View File

@@ -0,0 +1,28 @@
using System.Collections.Generic;
using DTS.Common.Base;
using DTS.Common.Enums;
using DTS.Common.Interface.TestSetups.Imports.TTS.ReadFile;
namespace DTS.Common.Interface
{
public interface ISummaryViewModel : IBaseViewModel
{
ISummaryView View { get; set; }
void SetStatus(string status, string error = default(string));
void SetProgress(double progress);
bool TestSetupComplete { get; set; }
string ImportFileName { get; }
string TestSetupName { get; }
double SampleRate { get; }
RecordingModes RecordingMode { get; }
string PreTrigger { get; }
string PostTrigger { get; }
void SetChannelList();
void UpdateUI();
void SetSerializedTestIdValues(string[] values);
void SetAvailableSampleRates(int[] values);
string GetTestId();
void SetAAFExceptions(Dictionary<double, List<double>> values);
}
}

View File

@@ -0,0 +1,6 @@
using DTS.Common.Base;
namespace DTS.Common.Interface.TestSetups.Imports.TTS
{
public interface ITOMChannelsView : IBaseView { }
}

View File

@@ -0,0 +1,9 @@
using DTS.Common.Base;
namespace DTS.Common.Interface.TestSetups.Imports.TTS
{
public interface ITOMChannelsViewModel : IBaseViewModel
{
ITOMChannelsView View { get; set; }
}
}