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,9 @@
using DataPro.Common.Base;
namespace DataPro.Common.Interface
{
public interface IGroupTemplateInfoControlView : IBaseView
{
}
}

View File

@@ -0,0 +1,138 @@
using System;
using System.Collections.ObjectModel;
using System.ComponentModel;
namespace DTS.Common.RibbonControl
{
public class GroupData : ControlData
{
public GroupData(string header)
{
Label = header;
}
[DesignerSerializationVisibility(DesignerSerializationVisibility.Content)]
public ObservableCollection<ControlData> ControlDataCollection
{
get
{
if (_controlDataCollection == null)
{
_controlDataCollection = new ObservableCollection<ControlData>();
var smallImage = new Uri("/Common;component/RibbonControl/Images/Paste_16x16.png", UriKind.Relative);
var largeImage = new Uri("/Common;component/RibbonControl/Images/Paste_32x32.png", UriKind.Relative);
for (var i = 0; i < ViewModelData.ButtonCount; i++)
{
_controlDataCollection.Add(new ButtonData()
{
Label = "Button " + i,
SmallImage = smallImage,
LargeImage = largeImage,
ToolTipTitle = "ToolTip Title",
ToolTipDescription = "ToolTip Description",
ToolTipImage = smallImage,
Command = ViewModelData.DefaultCommand
});
}
for (var i = 0; i < ViewModelData.ToggleButtonCount; i++)
{
_controlDataCollection.Add(new ToggleButtonData()
{
Label = "ToggleButton " + i,
SmallImage = smallImage,
LargeImage = largeImage,
ToolTipTitle = "ToolTip Title",
ToolTipDescription = "ToolTip Description",
ToolTipImage = smallImage,
Command = ViewModelData.DefaultCommand
});
}
for (var i = 0; i < ViewModelData.RadioButtonCount; i++)
{
_controlDataCollection.Add(new RadioButtonData()
{
Label = "RadioButton " + i,
SmallImage = smallImage,
LargeImage = largeImage,
ToolTipTitle = "ToolTip Title",
ToolTipDescription = "ToolTip Description",
ToolTipImage = smallImage,
Command = ViewModelData.DefaultCommand
});
}
for (var i = 0; i < ViewModelData.CheckBoxCount; i++)
{
_controlDataCollection.Add(new CheckBoxData()
{
Label = "CheckBox " + i,
SmallImage = smallImage,
LargeImage = largeImage,
ToolTipTitle = "ToolTip Title",
ToolTipDescription = "ToolTip Description",
ToolTipImage = smallImage,
Command = ViewModelData.DefaultCommand
});
}
for (var i = 0; i < ViewModelData.TextBoxCount; i++)
{
_controlDataCollection.Add(new TextBoxData()
{
Label = "TextBox " + i,
SmallImage = smallImage,
LargeImage = largeImage,
ToolTipTitle = "ToolTip Title",
ToolTipDescription = "ToolTip Description",
ToolTipImage = smallImage,
Command = ViewModelData.DefaultCommand
});
}
for (var i = 0; i < ViewModelData.MenuButtonCount; i++)
{
_controlDataCollection.Add(new MenuButtonData()
{
Label = "MenuButton " + i,
SmallImage = smallImage,
LargeImage = largeImage,
ToolTipTitle = "ToolTip Title",
ToolTipDescription = "ToolTip Description",
ToolTipImage = smallImage,
Command = ViewModelData.DefaultCommand
});
}
for (var i = 0; i < ViewModelData.SplitButtonCount; i++)
{
_controlDataCollection.Add(new SplitButtonData()
{
Label = "SplitButton " + i,
SmallImage = smallImage,
LargeImage = largeImage,
ToolTipTitle = "ToolTip Title",
ToolTipDescription = "ToolTip Description",
ToolTipImage = smallImage,
Command = ViewModelData.DefaultCommand,
IsCheckable = true
});
}
for (var i = 0; i < ViewModelData.ComboBoxCount; i++)
{
_controlDataCollection.Add(new ComboBoxData()
{
Label = "ComboBox " + i,
SmallImage = smallImage,
LargeImage = largeImage,
ToolTipTitle = "ToolTip Title",
ToolTipDescription = "ToolTip Description",
ToolTipImage = smallImage,
Command = ViewModelData.DefaultCommand
});
}
}
return _controlDataCollection;
}
}
private ObservableCollection<ControlData> _controlDataCollection;
}
}

View File

@@ -0,0 +1,18 @@
using System.Collections.Generic;
using System.Net.NetworkInformation;
using System.Threading.Tasks;
using DTS.Common.Base;
using DTS.Common.Events;
namespace DTS.Common.Interface
{
public interface INetworkingViewModel : IBaseViewModel
{
INetworkingView View { get; set; }
string SLICE6MulticastAddress { get; set; }
bool SLICE6MulticastAddressHasError { get; }
int SLICE6MulticastCommandPort { get; set; }
int SLICE6MulticastResponsePort { get; set; }
void SetStatus(StatusInfo.StatusState status, string message = "", decimal percentage = -1, int processId = 0);
}
}

View File

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

View File

@@ -0,0 +1,212 @@
using DTS.Common.Enums;
using DTS.Common.Interface.Sensors;
using DTS.Common.Interface.Tags;
using DTS.Common.Utilities.Logging;
using System;
using System.Collections.Generic;
using System.Data;
namespace DTS.Common.Classes.Sensors
{
public class StreamOutputRecord : TagAwareBase, IStreamOutputRecord
{
public override TagTypes TagType => TagTypes.Sensors;
private int _id;
public int Id
{
get => _id;
set => SetProperty(ref _id, value, "Id");
}
private string _serialNumber;
public string SerialNumber
{
get => _serialNumber;
set => SetProperty(ref _serialNumber, value, "SerialNumber");
}
private DateTime _lastModified;
public DateTime LastModified
{
get => _lastModified;
set => SetProperty(ref _lastModified, value, "LastModified");
}
private string _lastUpdatedBy;
public string LastUpdatedBy
{
get => _lastUpdatedBy;
set => SetProperty(ref _lastUpdatedBy, value, "LastUpdatedBy");
}
private bool _doNotUse;
public bool DoNotUse
{
get => _doNotUse;
set => SetProperty(ref _doNotUse, value, "DoNotUse");
}
private bool _broken;
public bool Broken
{
get => _broken;
set => SetProperty(ref _broken, value, "Broken");
}
protected UDPStreamProfile _udpProfile = DEFAULT_UDP_PROFILE;
public const UDPStreamProfile DEFAULT_UDP_PROFILE = UDPStreamProfile.CH10_ANALOG_2HDR; //supported on both S6A & TSRAIR
public UDPStreamProfile StreamOutUDPProfile
{
get => _udpProfile;
set => SetProperty(ref _udpProfile, value, "StreamOutUDPProfile");
}
public const string DEFAULT_UDP_ADDRESS = "UDP://239.1.2.10:8400";
protected string _udpAddress = DEFAULT_UDP_ADDRESS;
public string StreamOutUDPAddress
{
get => _udpAddress;
set => SetProperty(ref _udpAddress, value, "StreamOutUDPAddress");
}
public const ushort MINIMUM_STREAMOUT_TIMECHANNELID = 10;
public const ushort MAXIMUM_STREAMOUT_TIMECHANNELID = 100;
public const ushort DEFAULT_UDP_TIME_CHANNEL_ID = 1;
protected ushort _udpTimeChannelId = DEFAULT_UDP_TIME_CHANNEL_ID;
public ushort StreamOutUDPTimeChannelId
{
get => _udpTimeChannelId;
set => SetProperty(ref _udpTimeChannelId, value, "StreamOutUDPTimeChannelId");
}
public const ushort MINIMUM_STREAMOUT_DATACHANNELID = 10;
public const ushort MAXIMUM_STREAMOUT_DATACHANNELID = 100;
public const ushort DEFAULT_UDP_DATA_CHANNEL_ID = 3;
protected ushort _udpDataChannelId = DEFAULT_UDP_DATA_CHANNEL_ID;
public ushort StreamOutUDPDataChannelId
{
get => _udpDataChannelId;
set => SetProperty(ref _udpDataChannelId, value, "StreamOutUDPDataChannelId");
}
public const string DEFAULT_UDPTMNS_CONFIG = "(1,6,60,0,0,0,0,0)";
protected string _udpTmNSConfig = DEFAULT_UDPTMNS_CONFIG;
public string StreamOutUDPTmNSConfig
{
get => _udpTmNSConfig;
set => SetProperty(ref _udpTmNSConfig, value, "StreamOutUDPTmNSConfig");
}
public const ushort MINIMUM_STREAMOUT_TDP_INTERVAL_MS = 10;
public const ushort MAXIMUM_STREAMOUT_TDP_INTERVAL_MS = 1000;
public const ushort DEFAULT_IRIG_TIME_DATA_PACKET_INTERVAL_MS = 500;
protected ushort _irigTimeDataPacketIntervalMs = DEFAULT_IRIG_TIME_DATA_PACKET_INTERVAL_MS;
public const ushort MINIMUM_STREAMOUT_TMATS_INTERVAL_MS = ushort.MinValue;
public const ushort MAXIMUM_STREAMOUT_TMATS_INTERVAL_MS = ushort.MaxValue;
private ushort _streamOutTMATSIntervalMs = DEFAULT_TMATS_INTERVAL_MS;
/// <summary>
/// time in MS between sending tmats information while streaming
/// http://manuscript.dts.local/f/cases/29987/Add-CG-DP-TMATS-interval-UI-support
/// </summary>
public ushort StreamOutTMATSIntervalMs
{
get => _streamOutTMATSIntervalMs;
set => SetProperty(ref _streamOutTMATSIntervalMs, value, "StreamOutTMATSIntervalMs");
}
public ushort StreamOutIRIGTimeDataPacketIntervalMs
{
get => _irigTimeDataPacketIntervalMs;
set => SetProperty(ref _irigTimeDataPacketIntervalMs, value, "StreamOutIRIGTimeDataPacketIntervalMs");
}
public StreamOutputRecord(ISensorData sd)
{
try
{
Id = sd.DatabaseId;
SerialNumber = sd.SerialNumber;
StreamOutUDPProfile = sd.StreamOutUDPProfile;
StreamOutUDPAddress = sd.StreamOutUDPAddress;
StreamOutUDPTimeChannelId = sd.StreamOutUDPTimeChannelId;
StreamOutUDPDataChannelId = sd.StreamOutUDPDataChannelId;
StreamOutUDPTmNSConfig = sd.StreamOutUDPTmNSConfig;
StreamOutIRIGTimeDataPacketIntervalMs = sd.StreamOutIRIGTimeDataPacketIntervalMs;
StreamOutTMATSIntervalMs = sd.StreamOutTMATSIntervalMs;
Broken = sd.Broken;
DoNotUse = sd.DoNotUse;
LastModified = sd.LastModified;
LastUpdatedBy = sd.LastUpdatedBy;
}
catch (Exception ex)
{
APILogger.Log("Failed to process: ", ex);
}
}
public StreamOutputRecord(IDataReader reader, int ClientDbVersion, int ConnectionDbVersion)
{
try
{
Id = Utility.GetInt(reader, "Id");
SerialNumber = Utility.GetString(reader, "SerialNumber");
StreamOutUDPProfile = (UDPStreamProfile)Enum.Parse(typeof(UDPStreamProfile),
Utility.GetString(reader, "StreamProfile"));
StreamOutUDPAddress = Utility.GetString(reader, "UDPAddress");
StreamOutUDPTimeChannelId = Utility.GetUShort(reader, "TimeChannelId");
StreamOutUDPDataChannelId = Utility.GetUShort(reader, "DataChannelId");
StreamOutUDPTmNSConfig = Utility.GetString(reader, "TmNSConfig");
StreamOutIRIGTimeDataPacketIntervalMs = Utility.GetUShort(reader, "IRIGTimeDataPacketIntervalMs");
Broken = Utility.GetBool(reader, "Broken");
DoNotUse = Utility.GetBool(reader, "DoNotUse");
LastModified = Utility.GetDateTime(reader, "LastModified", DateTime.MinValue);
LastUpdatedBy = Utility.GetString(reader, "LastModifiedBy");
//only try to retrieve this field if both client and db are high enough level
if (ClientDbVersion >= Constants.TMATS_INTERVAL_VERSION && ConnectionDbVersion >= Constants.TMATS_INTERVAL_VERSION)
{
StreamOutTMATSIntervalMs = Utility.GetUShort(reader, "TMATS_IntervalMS", StreamOutputRecord.DEFAULT_TMATS_INTERVAL_MS);
}
}
catch (Exception ex)
{
APILogger.Log("Failed to process: ", ex);
}
}
//28291 Reduce list of Stream profiles to choose from.
//Define this here so that it only needs to be changed in one place, if a change needs to be made in the future.
//30249 Add LTS behavior for case 30075 (ADC UART stream)
public static UDPStreamProfile[] AvailableUDPStreamProfiles(int ConnectionDbVersion, bool UseAdvancedStreamingProfiles)
{
var profiles = new List<UDPStreamProfile>();
if (UseAdvancedStreamingProfiles)
{
profiles.AddRange(
new UDPStreamProfile[]
{
UDPStreamProfile.CH10_ANALOG,
UDPStreamProfile.CH10_ANALOG_2HDR,
UDPStreamProfile.CH10_PCM128_MM,
UDPStreamProfile.CH10_PCM_128BIT_2HDR,
UDPStreamProfile.TMNS_PCM_STANDARD,
UDPStreamProfile.TMNS_PCM_SUPERCOM,
UDPStreamProfile.IENA_PTYPE_STREAM,
UDPStreamProfile.CH10_MANUAL_CONFIG
});
if (ConnectionDbVersion >= Constants.ADC_TO_UART_DB_VERSION)
{
profiles.Add(UDPStreamProfile.UART_STREAM);
}
}
else
{
// 31840 Basic / Advanced Streaming profiles
profiles.AddRange(
new UDPStreamProfile[]
{
UDPStreamProfile.CH10_ANALOG_2HDR,
UDPStreamProfile.CH10_PCM_128BIT_2HDR
});
}
return profiles.ToArray();
}
/// <summary>
/// the default interval between sending out tmats information while streaming
/// this is used if the value is not set or is null
/// http://manuscript.dts.local/f/cases/29987/Add-CG-DP-TMATS-interval-UI-support
/// </summary>
public const ushort DEFAULT_TMATS_INTERVAL_MS = 1000;
}
}

View File

@@ -0,0 +1,21 @@
using System.Collections.Generic;
using DTS.Common.Base;
using DTS.Common.Interface;
using Microsoft.Practices.Prism.Events;
// ReSharper disable CheckNamespace
namespace DTS.Common.Events
{
/// <summary>
/// The number of selected Tests changed event.
/// </summary>
public class GraphSelectedChannelsNotification : CompositePresentationEvent<GraphSelectedChannelsNotificationArg> { }
public class GraphSelectedChannelsNotificationArg
{
public List<ITestChannel> SelectedChannels { get; set; }
/// <summary>
/// 24417 start pulling apart viewer to allow reuse for PSD reports
/// </summary>
public IBaseViewModel ParentVM { get; set; }
}
}