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,20 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace DTS.Common.Constant.DASSpecific
{
public class PowerPRO
{
public const uint MaxAAFilterRateHz = 20000;
public const byte MIN_PROTOCOL_VER = 1;
public const byte DIAGNOS_SHUNT_DAC = 2;
// 10582 Implement auto-discover and monitor DAS status.
// firmware B0H3 first supported this according to documentation
public const byte MIN_PROTOCOL_QUERYMACTABLE = 9;
public const byte MIN_PROTOCOL_MEASUREPOWERPROALLDIAGNOSTICCHANNEL = 12;
}
}

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 597 B

View File

@@ -0,0 +1,60 @@
using System;
using System.Globalization;
using System.Windows.Data;
using DTS.Common.Enums;
namespace DTS.Common.Converters
{
public class TestDataToRegionOfInterestMaximumConverter : IMultiValueConverter
{
public object Convert(object[] values, Type targetType, object parameter, CultureInfo culture)
{
//values: dataStart, dataEnd, PreTrigger, PostTrigger, RecordingMode
if (values.Length == 5)
{
if (values[2] is double && values[3] is double postTrigger &&
values[4] is RecordingModes recordingMode)
{
switch (recordingMode)
{
case RecordingModes.CircularBuffer:
case RecordingModes.RAMActive:
case RecordingModes.MultipleEventRAMActive:
case RecordingModes.CircularBufferAndStreamSubSample:
case RecordingModes.CircularBufferPlusUART:
case RecordingModes.MultipleEventCircularBuffer:
case RecordingModes.MultipleEventCircularBufferPlusUART:
//maximum is PostTrigger
return postTrigger;
case RecordingModes.Recorder:
case RecordingModes.RecorderPlusUART:
case RecordingModes.MultipleEventRecorder:
case RecordingModes.MultipleEventRecorderPlusUART:
case RecordingModes.HybridRecorder:
case RecordingModes.HybridAndStream:
case RecordingModes.MultipleEventHybridAndStream:
case RecordingModes.MultipleEventHybridRecorder:
case RecordingModes.ContinuousRecorder:
case RecordingModes.ContinuousRecorderPlusUART:
case RecordingModes.RecordOnBoot:
case RecordingModes.RecordOnBootPlusUART:
case RecordingModes.RecorderAndStreamSubSample:
case RecordingModes.MultipleEventRecorderAndStream:
// FB16465: maximum is DataEnd. if it's currently unknown, return PostTrigger
// FB17991: could also be set to Max instead of unknown, same difference
case RecordingModes.Active:
case RecordingModes.MultipleEventActive:
// FB18333: max holds for Active too.
return values[1] is double end ? end < double.MaxValue ? end : postTrigger : postTrigger;
}
}
}
return double.PositiveInfinity;
}
public object[] ConvertBack(object value, Type[] targetTypes, object parameter, CultureInfo culture)
{
throw new NotImplementedException();
}
}
}

View File

@@ -0,0 +1,52 @@
using System;
using System.Windows.Data;
using System.Windows;
namespace DTS.Common.Converters
{
public class VisibilityToRowHeightConverter : DependencyObject, IValueConverter
{
/// <summary>
/// inverts the source prior to conversion
/// </summary>
public bool InvertSource
{
get => (bool) GetValue(InvertSourceProperty);
set => SetValue(InvertSourceProperty, value);
}
public static readonly DependencyProperty InvertSourceProperty =
DependencyProperty.Register("InvertSource", typeof(bool), typeof(VisibilityToRowHeightConverter), new PropertyMetadata(false));
public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
{
if (value is Visibility vis)
{
if (InvertSource)
{
switch (vis)
{
case Visibility.Visible:
vis = Visibility.Collapsed;
break;
case Visibility.Hidden:
case Visibility.Collapsed:
vis = Visibility.Visible;
break;
}
}
if (vis == Visibility.Collapsed)
{
return 0;
}
}
//return parameter;
return parameter ?? 0;
}
public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
{
return null;
}
}
}

View File

@@ -0,0 +1,4 @@
namespace DTS.Common.Interface
{
public delegate void SetReadCalcProgressValueDelegate(string message = "", double value = -1D);
}

View File

@@ -0,0 +1,28 @@
using System;
using System.ComponentModel;
using DTS.Common.Converters;
using DTS.Common.Utils;
using Xceed.Wpf.Toolkit.PropertyGrid.Attributes;
// ReSharper disable CheckNamespace
namespace DTS.Common.Enums.Viewer
{
[TypeConverter(typeof(EnumDescriptionTypeConverter))]
public enum FilterOptionEnum
{
[Description("Unfiltered")]
Unfiltered = 0,
[Description("Test Setup Default")]
TestSetupDefault = 1,
[Description("Custom")]
Custom = 2
}
public class FilterOptionEnumItemSource : IItemsSource
{
public ItemCollection GetValues()
{
return EnumUtil.GetValuesList<FilterOptionEnum>();
}
}
}

View File

@@ -0,0 +1,12 @@
using DTS.Common.Base;
namespace DTS.Common.Interface
{
public interface IStatsViewModel : IBaseViewModel
{
/// <summary>
/// Gets the Tab View.
/// </summary>
IStatsView View { get; }
}
}