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
{
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; }
}
}