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,23 @@
<UserControl x:Class="DTS.Common.Controls.TestIdControl"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
mc:Ignorable="d" d:DesignWidth="800" x:Name="TestIdInfo" d:DesignHeight="703">
<UserControl.Resources>
<Style TargetType="TextBox" BasedOn="{StaticResource PageContentTextBoxStyle}" />
<Style TargetType="TextBlock" BasedOn="{StaticResource PageContentTextStyle}" />
<Style TargetType="CheckBox" BasedOn="{StaticResource PageContentCheckBoxStyle}" />
<Style TargetType="PasswordBox" BasedOn="{StaticResource PageContentPasswordBoxStyle}" />
<Style TargetType="Button" BasedOn="{StaticResource PageContentButton}" />
</UserControl.Resources>
<StackPanel Orientation="Horizontal" AutomationProperties.AutomationId="StackPanelTestIdBuilder" DataContext="{Binding ElementName=TestIdInfo}">
<ComboBox ItemsSource="{Binding AllTestIdPrefixSuffixValues}" Width="200" SelectedItem="{Binding SelectedTestIdPrefixValueItem}"
AutomationProperties.AutomationId="TestIdPrefixComboBox"/>
<TextBlock Text="{Binding TestSetupLabel, FallbackValue='Awesome Sauce'}" Visibility="{Binding TestSetupLabelVisibility, FallbackValue=Collapsed}" AutomationProperties.AutomationId="TestIdTextBox"/>
<TextBox Text="{Binding TestIdEditableText}" Width="150" Style="{StaticResource PageContentTextBoxStyleId}"
AutomationProperties.AutomationId="TestIdTextBox"/>
<ComboBox ItemsSource="{Binding AllTestIdPrefixSuffixValues}" Width="200" SelectedItem="{Binding SelectedTestIdSuffixValueItem}"
AutomationProperties.AutomationId="TestIdSuffixComboBox"/>
</StackPanel>
</UserControl>

View File

@@ -0,0 +1,372 @@
using DTS.Common.Interface.DataRecorders;
using DTS.Common.Interface.Sensors.SensorsList;
using System;
using System.Windows.Input;
using DTS.Common.Interface.Groups.GroupList;
using DTS.Common.Enums;
using DTS.Common.Interface.Sensors;
using DTS.Common.Enums.Sensors;
using DTS.Common.Enums.Sensors.SensorsList;
using DTS.Common.Classes.ChannelCodes;
using DTS.Common.Classes.Sensors;
using DTS.Common.Interface.Sensors.SoftwareFilters;
using System.IO.Ports;
namespace DTS.Common.Interface.Channels
{
public interface IGroupChannel : IComparable<IGroupChannel>, IChannelDbRecord
{
SensorConstants.AvailableRangesLowG RangeLowG { get; set; }
/// <summary>
/// whether the channel has a calibration less voltage measurement channel
/// </summary>
bool VoltageInsertionSensor { get; }
/// <summary>
/// Whether the channel has an embedded range modifiable low g sensor
/// </summary>
bool RangeModifiableSensorLowG { get; }
/// <summary>
/// whether the channel has an embedded range modifiable ars sensor
/// </summary>
bool RangeModifiableSensorARS { get; }
/// <summary>
/// available initial offsets for this channel
/// dependent on a sensor w/ a sensor calibration being assigned
/// </summary>
InitialOffset [] AvailableInitialOffsets { get; set; }
/// <summary>
/// current support for IEPE by channel
/// if there is a sensor assigned, value is depedent on sensor bridge
/// if there is no sensor but hardware is assigned, is dependent on hardwarechannel support
/// if neither is assigned, IEPE Is available to be assigned to the channel
/// </summary>
string IEPESupport { get; }
/// <summary>
/// the group the channel belongs to
/// </summary>
IGroup Group { get; set; }
/// <summary>
/// the name of the group (DisplayName) the channel belongs to
/// </summary>
string GroupName { get; set; }
/// <summary>
/// whether the group name is valid or not
/// </summary>
bool GroupNameValid{ get; set; }
/// <summary>
/// whether the isocode is set or not [does not examine iso code validity]
/// </summary>
bool IsoCodeValid { get; set; }
/// <summary>
/// whether the iso channel name is set or not
/// </summary>
bool IsoChannelNameValid { get; set; }
/// <summary>
/// whether the user code is set or not
/// </summary>
bool UserCodeValid { get; set; }
/// <summary>
/// whether the user channel name is set or not
/// </summary>
bool UserChannelNameValid { get; set; }
/// <summary>
/// whether the hardware has been set or not
/// </summary>
bool HardwareValid { get; }
/// <summary>
/// this is the old identifier for the hardware channel assigned
/// it's something in the form of [das serial]:[channel index]
/// I'm not sure why we have two hardware ids around and why this one is still around...
/// </summary>
string HardwareId { get; set; }
/// <summary>
/// stores the sample rate of the DAS associated with this channel
/// </summary>
double TestSampleRate { get; set; }
/// <summary>
/// whether the sensor has been set or not
/// </summary>
bool SensorValid { get; }
/// <summary>
/// whether the channel should be used for collecting data or not
/// </summary>
bool IsDisabled { get; set; }
void SetHardwareChannel(IHardwareChannel hardwareChannel);
void SetSensor(IDragAndDropItem sensor, IChannelSetting [] channelDefaults, bool applySensorDataToBlankChannels);
bool CompareValue(string property);
bool SetDifferent(string property);
void SetNotDifferent();
void SetRange(CACOption option);
bool CanMoveUp { get; set; }
bool CanMoveDown { get; set; }
bool DeleteShouldBeEnabled { get; set; }
System.Windows.Visibility RemoveSensorVisibility { get; set; }
/// <summary>
/// indicates whether the channel is a new non edited channel
/// </summary>
/// <returns></returns>
bool IsBlank();
/// <summary>
/// clears hardware and sensor assignments for channel
/// </summary>
void Clear();
/// <summary>
/// return true if channel contains the given term
/// </summary>
/// <param name="term"></param>
/// <returns></returns>
bool Filter(string term);
/// <summary>
/// what to do when something is pasted to the channel
/// </summary>
ICommand PasteCommand { get; set; }
/// <summary>
/// settings (range/polarity/ etc) for channel
/// </summary>
IChannelSetting [] ChannelSettings { get; set; }
/// <summary>
/// returns a channel name for channel based on view mode
/// </summary>
/// <param name="isoViewMode"></param>
/// <returns></returns>
string GetChannelName(IsoViewMode isoViewMode);
/// <summary>
/// returns a code for channel based on view mode
/// </summary>
/// <param name="isoViewMode"></param>
/// <returns></returns>
string GetChannelCode(IsoViewMode isoViewMode);
/// <summary>
/// creates a memory copy of channel
/// </summary>
/// <param name="groupChannel"></param>
void Copy(IGroupChannel groupChannel);
/// <summary>
/// string to display in UI for hardware
/// </summary>
string Hardware { get; set; }
/// <summary>
/// string to display in UI for sensor
/// </summary>
string Sensor { get; }
ISensorData SensorData{ get; }
IHardwareChannel HardwareChannel{ get; }
IDragAndDropItem DragAndDropItem { get; }
ISensorCalibration SensorCalibration{ get; }
void SetSensorCalibration(ISensorCalibration calibration);
void SetSensorData(ISensorData sensorData, IDragAndDropItem dragAndDropItem, bool decideSettings=false);
bool HasEID { get; }
/// <summary>
/// whether channel has an analog sensor assigned
/// if no sensor is assigned but the channel is not blank, returns true
/// returns false if channel is blank
/// </summary>
bool IsAnalog { get; }
/// <summary>
/// whether the channel has a squib sensor assigned
/// if no sensor is assigned but the channel is not blank, returns true
/// returns false if channel is blank
/// </summary>
bool IsSquib { get; }
/// <summary>
/// whether the channel has a digital input sensor assigned
/// if no sensor is assigned but the channel is not blank, returns true
/// returns false if channel is blank
/// </summary>
bool IsDigitalIn { get; }
/// <summary>
/// whether the channel has a digital output sensor assigned
/// if no sensor is assigned but the channel is not blank, returns true
/// returns false if channel is blank
/// </summary>
bool IsDigitalOut { get; }
/// <summary>
/// whether the channel is from a RTC module
/// returns false if channel is a normal phyiscal measurement channel
/// </summary>
bool IsClock { get; }
/// <summary>
/// whether the channel is from a UART module
/// returns false if channel is a normal phyiscal measurement channel
/// </summary>
bool IsUart { get; }
/// <summary>
/// whether the channel is from a stream in module
/// returns false if channel is a normal phyiscal measurement channel
/// </summary>
bool IsStreamIn { get; }
/// <summary>
/// whether the channel is from a stream out module
/// returns false if channel is a normal phyiscal measurement channel
/// </summary>
bool IsStreamOut { get; }
/// <summary>
/// range setting value for the channel
/// </summary>
double Range { get; set; }
/// <summary>
/// the capacity of the sensor on the channel
/// </summary>
double Capacity { get; }
/// <summary>
/// FB 13120 filter class setting value for the channel
/// </summary>
IFilterClass FilterClass { get; set; }
/// <summary>
/// polarity setting value for the channel
/// </summary>
string Polarity { get; set; }
string Units { get; }
ZeroMethodType ZeroMethod { get; set; }
double ZeroMethodStart { get; set; }
double ZeroMethodEnd { get; set; }
string Sensitivity { get; }
InitialOffset InitialOffset { get; set; }
bool SquibLimitDuration { get; set; }
double SquibDuration { get; set; }
//14623 SquibDelay is nullable for UI perpose
double? SquibDelay { get; set; }
double SquibCurrent { get; set; }
bool DigitalOutLimitDuration { get; set; }
double DigitalOutDuration { get; set; }
//FB 28107 Define max value allowed for digital out duration
double DigitalOutDurationMax { get; set; }
double DigitalOutDelay { get; set; }
/// <summary>
/// output mode setting value for the channel
/// </summary>
DigitalOutputModes DigitalOutputMode { get; set; }
/// <summary>
/// fire mode setting value for the channel
/// </summary>
SquibFireMode SquibFireMode { get; set; }
/// <summary>
/// digital input mode setting value for the channel
/// </summary>
DigitalInputModes DigitalInputMode { get; set; }
/// <summary>
/// active value setting value for the channel
/// </summary>
string ActiveValue { get; set; }
/// <summary>
/// default value setting value for the channel
/// </summary>
string DefaultValue { get; set; }
///<summary>
/// baud rate setting value for the channel
///</summary>
uint UartBaudRate { get; set; }
///<summary>
/// data bits setting value for the channel
///</summary>
uint UartDataBits { get; set; }
///<summary>
/// stop bits setting value for the channel
///</summary>
StopBits UartStopBits { get; set; }
///<summary>
/// parity setting value for the channel
///</summary>
Parity UartParity { get; set; }
///<summary>
/// flow control setting value for the channel FB 30486 removed set, it's always NONE
///</summary>
Handshake UartFlowControl { get; }
///<summary>
/// data format setting value for the channel
///</summary>
UartDataFormat UartDataFormat { get; set; }
///<summary>
/// udp address setting value for the channel
///</summary>
string StreamInUDPAddress { get; set; }
///<summary>
/// udp profile setting value for the channel
///</summary>
UDPStreamProfile StreamOutUDPProfile { get; set; }
///<summary>
/// udp address setting value for the channel
///</summary>
string StreamOutUDPAddress { get; set; }
///<summary>
/// time channel id setting value for the channel
///</summary>
ushort StreamOutUDPTimeChannelId { get; set; }
///<summary>
/// data channel id setting value for the channel
///</summary>
ushort StreamOutUDPDataChannelId { get; set; }
///<summary>
/// tmns config setting value for the channel
///</summary>
string StreamOutUDPTmNSConfig { get; set; }
///<summary>
/// irig data packet interval setting value for the channel
///</summary>
ushort StreamOutIRIGTimeDataPacketIntervalMs { get; set; }
/// <summary>
/// time in ms between sending out TMATS information while streaming
/// http://manuscript.dts.local/f/cases/29987/Add-CG-DP-TMATS-interval-UI-support
/// </summary>
ushort StreamOutTMATSIntervalMs { get; set; }
/// <summary>
/// FB 15574 FB 13120
/// get the current FilterClass from the current isocode
/// </summary>
/// <param name="filters"></param>
/// <param name="isoCode"></param>
/// <returns></returns>
IFilterClass GetFilterClassFromISOCode(ISoftwareFilter[] filters, string isoCode);
/// <summary>
/// gets a function that will perform coercion on isocodes if needed
/// </summary>
CoerceISOCodeDelegate CoerceISOCodeFunc { get; }
/// <summary>
/// returns the status of the channel considering IsComplete and sensor cal status
/// </summary>
UIItemStatus ChannelStatus { get; }
/// <summary>
/// sets the channel settings based on a sensor's settings
/// </summary>
/// <param name="sd"></param>
void SetSettingsFromSensor(ISensorData sd);
/// <summary>
/// returns a list of sensor parameter differences from sensor vs channel
/// returns empty string if there aren't any
/// </summary>
/// <param name="sensor"></param>
/// <returns></returns>
string GetChangeList(ISensorData sensor);
bool IsRangeDifferent { get; set; }
bool IsFilterClassDifferent { get; set; }
bool IsPolarityDifferent { get; set; }
bool IsZeroMethodDifferent { get; set; }
bool IsZeroMethodStartDifferent { get; set; }
bool IsZeroMethodEndDifferent { get; set; }
bool IsInitialOffsetDifferent { get; set; }
bool IsSquibFireModeDifferent { get; set; }
bool IsSquibDelayDifferent { get; set; }
bool IsSquibLimitDurationDifferent { get; set; }
bool IsSquibDurationDifferent { get; set; }
bool IsSquibCurrentDifferent { get; set; }
bool IsDigitalOutputModeDifferent { get; set; }
bool IsDigitalOutDelayDifferent { get; set; }
bool IsDigitalOutLimitDurationDifferent { get; set; }
bool IsDigitalOutDurationDifferent { get; set; }
bool IsDigitalInputModeDifferent { get; set; }
bool IsDefaultValueDifferent { get; set; }
bool IsActiveValueDifferent { get; set; }
bool BorderShouldShowOutOfDate { get; set; }
}
}

View File

@@ -0,0 +1,14 @@
using DTS.Common.Interface.TestSetups.Imports.TTS.ReadFile;
using Microsoft.Practices.Prism.Events;
namespace DTS.Common.Events
{
/// <summary>
/// The TTSImportSummaryRunTestEvent event.
/// </summary>
///
/// <remarks>This event is used by the Summary step to tell the page to run the test.</remarks>
///
public class TTSImportSummaryRunTestEvent : CompositePresentationEvent<ITTSSetup> { }
}

View File

@@ -0,0 +1,34 @@
using System;
using System.Windows.Data;
using System.Windows.Media;
namespace DTS.Common.Converters
{
public class ColorToSolidColorBrushConverter : IValueConverter
{
public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
{
// For a more sophisticated converter, check also the targetType and react accordingly..
if (value is Color color)
{
return new SolidColorBrush(color);
}
return null;
// You can support here more source types if you wish
// For the example I throw an exception
//var type = value.GetType();
//throw new InvalidOperationException("Unsupported type [" + type.Name + "]");
}
public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
{
// If necessary, here you can convert back. Check if which brush it is (if its one),
// get its Color-value and return it.
throw new NotImplementedException();
}
}
}

View File

@@ -0,0 +1,14 @@
using System.Windows.Controls;
using DTS.Common.Base;
namespace DTS.Common.Interface
{
public interface IMainViewerView : IBaseView
{
//StackPanel MainShell { get; set; }
//ContentControl MainRegion { get; set; }
//ContentControl NavigationRegion { get; set; }
//ContentControl HorizontalTabRegion { get; set; }
//ContentControl VerticalTabRegion { get; set; }
}
}