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,65 @@
using System;
using System.Text;
namespace DTS.Common.Classes.Sensors
{
/// <summary>
/// helper class for the calmode in SIFs which is actually a 3 character sequence for shunt/bridge/filter
/// </summary>
public class CalMode
{
public bool ShuntCheck { get; set; }
public bool FullBridge { get; set; }
public bool Filter { get; set; }
public CalMode(string value)
{
switch (value[0])
{
case 'S':
ShuntCheck = true;
break;
case 'I':
ShuntCheck = false;
break;
default:
throw new NotSupportedException("TDAS::CalMode Invalid calmode position 0: " + value);
}
switch (value[1])
{
case 'D':
FullBridge = true;
break;
case 'S':
FullBridge = false;
break;
default:
throw new NotSupportedException("TDAS::CalMode Invalid calmode position 1: " + value);
}
switch (value[2])
{
case 'F':
Filter = true;
break;
case 'B':
Filter = false;
break;
default:
throw new NotSupportedException("TDAS::CalMode Invalid calmode position 2: " + value);
}
}
public CalMode() { }
public override string ToString()
{
var sb = new StringBuilder();
sb.Append(ShuntCheck ? 'S' : 'I');
sb.Append(FullBridge ? 'D' : 'S');
sb.Append(Filter ? 'F' : 'B');
return sb.ToString();
}
}
}

View File

@@ -0,0 +1,131 @@
using DTS.Common.Base.Classes;
using DTS.Common.Interface.TestMetaData;
using DTS.Common.Utilities.Logging;
using System;
using System.ComponentModel;
using System.Data;
using System.IO;
using System.Xml;
using System.Xml.Serialization;
namespace DTS.Common.Classes.TestEngineerDetails
{
public class TestEngineerDetailsDbRecord : Base.BasePropertyChanged, ITestEngineerDetailsDbRecord
{
private int _testEngineerId = -1;
[Browsable(false)]
[ReadOnly(true)]
public int TestEngineerId
{
get => _testEngineerId;
set => SetProperty(ref _testEngineerId, value, "TestEngineerId");
}
private string _name = "";
[Browsable(false)]
[ReadOnly(true)]
public string Name
{
get => _name;
set => SetProperty(ref _name, value, "Name");
}
private string _testEngineerName = "NOVALUE";
[DisplayResource("TestEngineerName")]
public string TestEngineerName
{
get => _testEngineerName;
set => SetProperty(ref _testEngineerName, value, "TestEngineerName");
}
private string _testEngineerPhone = "NOVALUE";
[DisplayResource("TestEngineerPhone")]
public string TestEngineerPhone
{
get => _testEngineerPhone;
set => SetProperty(ref _testEngineerPhone, value, "TestEngineerPhone");
}
private string _testEngineerFax = "NOVALUE";
[DisplayResource("TestEngineerFax")]
public string TestEngineerFax
{
get => _testEngineerFax;
set => SetProperty(ref _testEngineerFax, value, "TestEngineerFax");
}
private string _testEngineerEmail = "NOVALUE";
[DisplayResource("TestEngineerEmail")]
public string TestEngineerEmail
{
get => _testEngineerEmail;
set => SetProperty(ref _testEngineerEmail, value, "TestEngineerEmail");
}
private bool _localOnly = false;
[Browsable(false)]
[ReadOnly(true)]
public bool LocalOnly
{
get => _localOnly;
set => SetProperty(ref _localOnly, value, "LocalOnly");
}
private DateTime _lastModified = DateTime.MinValue;
[Browsable(false)]
[ReadOnly(true)]
public DateTime LastModified
{
get => _lastModified;
set => SetProperty(ref _lastModified, value, "LastModified");
}
private string _lastModifiedBy = "";
[Browsable(false)]
[ReadOnly(true)]
public string LastModifiedBy
{
get => _lastModifiedBy;
set => SetProperty(ref _lastModifiedBy, value, "LastModifiedBy");
}
private int _version = -1;
[Browsable(false)]
[ReadOnly(true)]
public int Version
{
get => _version;
set => SetProperty(ref _version, value, "Version");
}
public TestEngineerDetailsDbRecord(ITestEngineerDetailsDbRecord testEngineerDetailsDbRecord)
{
Name = testEngineerDetailsDbRecord.Name;
TestEngineerName = testEngineerDetailsDbRecord.TestEngineerName;
TestEngineerPhone = testEngineerDetailsDbRecord.TestEngineerPhone;
TestEngineerFax = testEngineerDetailsDbRecord.TestEngineerFax;
TestEngineerEmail = testEngineerDetailsDbRecord.TestEngineerEmail;
LastModified = testEngineerDetailsDbRecord.LastModified;
Version = testEngineerDetailsDbRecord.Version;
LastModifiedBy = testEngineerDetailsDbRecord.LastModifiedBy;
LocalOnly = testEngineerDetailsDbRecord.LocalOnly;
}
public TestEngineerDetailsDbRecord() { }
public TestEngineerDetailsDbRecord(IDataReader reader)
{
Name = Utility.GetString(reader, "Name");
TestEngineerName = Utility.GetString(reader, "TestEngineerName");
TestEngineerPhone = Utility.GetString(reader, "TestEngineerPhone");
TestEngineerFax = Utility.GetString(reader, "TestEngineerFax");
TestEngineerEmail = Utility.GetString(reader, "TestEngineerEmail");
LastModified = Utility.GetDateTime(reader, "LastModified", DateTime.MinValue);
Version = Utility.GetInt(reader, "Version");
LastModifiedBy = Utility.GetString(reader, "LastModifiedBy");
LocalOnly = Utility.GetBool(reader, "LocalOnly");
}
public bool IsInvalidBlank()
{
return string.IsNullOrWhiteSpace(Name);
}
}
}

View File

@@ -0,0 +1,48 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace DTS.Common.Constant.DASSpecific
{
public class SLICE6DB
{
public const uint MaxAAFilterRateHz = 200000;
public const byte MIN_PROTOCOL_VER = 1;
public const byte MIN_PROTOCOL_QUERYTEMPLOGFILE = 8;
// 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_TILT = 14;
public const int CLOCKSYNCPROFILE = 18;
// minimum protocol version for PTP Domain ID per 30472
public const int PTP_DOMAIN_ID_VER = 18;
public static bool IsClockSyncProfileSupported(ClockSyncProfile profile, int protocolVersion)
{
var result = false;
switch (profile)
{
case ClockSyncProfile.None:
result = true;
break;
case ClockSyncProfile.Manual:
if (protocolVersion < CLOCKSYNCPROFILE)
{
result = true;
}
break;
case ClockSyncProfile.Master_E2E:
case ClockSyncProfile.Slave_E2E:
if (protocolVersion >= CLOCKSYNCPROFILE)
{
result = true;
}
break;
}
return result;
}
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

View File

@@ -0,0 +1,93 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Media;
namespace DTS.Common.Interface
{
/// <summary>
/// this interface describes a UI page, specifically datapro pages
/// </summary>
public interface IDataPROPage : INotifyPropertyChanged
{
Visibility TestSetupChangeButtonVisible { get; set; }
Visibility AutomaticModeStatusVisible { get; set; }
string PageName { get; set; }
ImageSource PageImage { get; set; }
bool IsAdd { get; set; }
bool UsesModifyEnhancements { get; set; }
string EditIDString { get; set; }
string AddIDString { get; set; }
string ModifiedObjectName { get; set; }
bool AutomaticProgression { get; set; }
bool RecoveryDownloadMode { get; set; }
string UniqueId { get; }
string GetName();
long GetID();
void SetID(long id);
Color TileColor { get; }
void SetTileColor(Color c);
void SavePage(object obj);
string CurrentSearchTerm { get; set; }
void ClearSearchTerm();
void SetEnabled(bool bEnable);
bool UsesNAVControl { get; set; }
bool UsesSearchControl { get; set; }
bool UsesSelectControl { get; set; }
void VerifyProgress(object o);
void SaveAndExit();
void RefreshButtonPressed();
void SetDoneButtonIsEnabled(bool bEnabled);
void SetBackButtonIsEnabled(bool bEnabled);
void DoneButtonPress();
bool HasBackButton { get; set; }
bool HasRefreshButton { get; set; }
bool HasCancelButton { get; set; }
bool HasSaveButton { get; set; }
void SetCancelEnabled(bool bEnabled);
bool HasNextButton { get; set; }
Color ContentBackgroundColor { get; set; }
object MainContent { get; set; }
ContentControl GetMainContentControl();
void SetReturning();
bool Validate(ref List<string> errors, ref List<string> warnings, bool displayWindow);
bool OKToProceed();
void FormClosing(Action OnComplete = null);
bool ControlInOnSetActive { get; set; }
void OnSetActive();
void UnSet();
void SetCurrentItem(object o);
void SetupPageAvailable();
}
/// <summary>
/// these are properties on the datapro page that change and may need to be acted on
/// </summary>
public enum DataProPageProperties
{
UsesModifyEnhancements,
TestSetupChangeButtonVisible,
AutomaticModeStatusVisible,
PageName,
PageImage,
IsAdd,
EditIDString,
AddIDString,
ModifiedObjectName,
AutomaticProgression,
RecoveryDownloadMode,
UsesNAVControl,
UsesSearchControl,
UsesSelectControl,
HasBackButton,
HasRefreshButton,
HasCancelButton,
HasSaveButton,
HasNextButton,
ContentBackgroundColor,
MainContent,
GenerateReportsVisible
}
}