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,25 @@
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 TimeUnitTypeEnum
{
[Description("ms")]
MS = 0,
[Description("Seconds")]
Seconds = 1,
}
public class TimeUnitTypeItemSource : IItemsSource
{
public ItemCollection GetValues()
{
return EnumUtil.GetValuesList<TimeUnitTypeEnum>();
}
}
}

View File

@@ -0,0 +1,11 @@
using Prism.Events;
namespace DTS.Common.Events.TSRAIRGo
{
public class DownloadEvent : PubSubEvent<DownloadArg> { }
public class DownloadArg
{
}
}

View File

@@ -0,0 +1,84 @@
using DTS.Common.Enums.DASFactory;
using System;
using System.Collections.Generic;
namespace DTS.Common.Interface.DASFactory.Config
{
public interface IInfoResultModule
{
/// <summary>
/// Serial number of this module
/// </summary>
string SerialNumber { get; set; }
/// <summary>
/// Firmware version in this module
/// </summary>
string FirmwareVersion { get; set; }
/// <summary>
/// who does this module belong to?
/// </summary>
//public InfoResult OwningInfoResult { get; set; }
/// <summary>
/// The number of this Module as it would be indexed in an array of Modules.
/// </summary>
int ModuleArrayIndex { get; set; }
/// <summary>
/// How many channels are connected to this Module.
/// </summary>
uint NumberOfChannels { get; set; }
/// <summary>
/// What sample rates does it support (in samples per second).
/// </summary>
uint[] SupportedSampleRates { get; set; }
/// <summary>
/// An associative list (Dictionary) of sample rates and corresponding
/// Anti-Aliasing filter frequencies.
/// </summary>
Dictionary<uint, float> SampleRate2AAFrequency { get; set; }
/// <summary>
/// How many bytes of sample storage is available in this module? This is null
/// if it's specified per DAS instead.
/// </summary>
ulong? MaxEventStorageSpaceInBytes { get; set; }
/// <summary>
/// How many bytes are stored for all channels at each sample interval? This is
/// null if it's specified per DAS instead.
/// </summary>
uint? NumberOfBytesPerSampleClock { get; set; }
/// <summary>
/// How many samples can you record in this module?
/// </summary>
double MaxRecordingSamples { get; set; }
/// <summary>
/// The <see cref="System.DateTime"/> of this module's last calibration.
/// </summary>
DateTime? CalibrationDate { get; set; }
/// <summary>
/// True if a TDAS rack is armed and doesn't respond to some queries.
/// </summary>
bool RackIsUnreadable { get; set; }
/// <summary>
/// What type of module is this?
/// </summary>
DFConstantsAndEnums.ModuleType TypeOfModule { get; set; }
/// <summary>
/// What recording modes does this Module support.
/// </summary>
DFConstantsAndEnums.RecordingMode[] SupportedModes { get; set; }
bool IsProgrammable { get; set; }
}
}

View File

@@ -0,0 +1,50 @@
G\PN:{NAME OF PROGRAM};
G\TA:{TEST ID}_{DAS SERIAL NUMBER};
G\106:17;
G\DSI\N:1;
G\DSI-1:{TEST ID};
G\DST-1:DRS;
G\DSC-1\U;
G\SC\U;
G\COM:--- file irig106_SampleTmats.tmt. All DST-1 are saved as RF by NetView 2.1.1.3392 -----;
R-1\ID:{TEST ID};
R-1\RID:TSRAIR;
R-1\N:2;
R-1\NSB:3;
R-1\RI1:DTS;
R-1\RI2:TSRAIR;
R-1\RI3:Y;
R-1\RI4:{CREATE DATE};
R-1\COM:Ver-17;
V-1\ID:{TEST ID};
V-1\VN:DTS;
V-1\DTS\STREAMCH10;
R-1\EV\E:F;
R-1\IDX\E:F;
R-1\IDX\IT:F;
R-1\COM:--- Channel '1', ID: 0x0001, TIME Data Packet Format ---------------;
R-1\DSI-1:{UDP STREAM TIME CHANNEL ID};
R-1\TK1-1:{UDP STREAM TIME CHANNEL ID};
R-1\TK2-1:OTHER;
R-1\TK3-1:FWD;
R-1\TK4-1:{UDP STREAM TIME CHANNEL ID};
R-1\CHE-1:T;
R-1\CDT-1:TIMEIN;
R-1\TTF-1:{STREAM TIME FORMAT};
R-1\TFMT-1:B;
R-1\TSRC-1:E;
R-1\SHTF-1:1;
R-1\COM:--------------------- Main Analog Channel Description --------------;
R-1\DSI-2:{UDP STREAM DATA CHANNEL ID};
R-1\TK1-2:{UDP STREAM DATA CHANNEL ID};
R-1\TK3-2:FWD;
R-1\TK4-2:{UDP STREAM DATA CHANNEL ID};
R-1\CHE-2:T;
R-1\CDLN-2:{DAS SERIAL NUMBER};
R-1\CDT-2:ANAIN;
R-1\ATF-2:1;
R-1\ACH\N-2:{NUMBER OF STREAMED CHANNELS};
R-1\ADP-2:NO;
R-1\ASR-2:{DAS SAMPLE RATE};
R-1\SHTF-2:1;
R-1\RT\N:0;

View File

@@ -0,0 +1,545 @@
using DTS.Common.Attributes;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
namespace DTS.Common.Enums.Sensors
{
/// <summary>
/// holds information for all CSV import/export fields and their versions
/// </summary>
public abstract class CSVImportTags
{
public const int MIN_VALID_VERSION = 0;
public const int MAX_VALID_VERSION = 6;
private static readonly object MY_LOCK = new object();
private static HashSet<int> _SensorTagsVersions = new HashSet<int>()
{
0, 2, 3, 4
};
public static bool IsSensorTag(int version)
{
return _SensorTagsVersions.Contains(version);
}
private static string TagToDisplayString(Tags tag)
{
var enumType = tag.GetType();
var name = Enum.GetName(enumType, tag);
if (string.IsNullOrEmpty(name)) { return string.Empty; }
var fieldInfo = enumType.GetField(name);
if (null == fieldInfo || !fieldInfo.CustomAttributes.Any()) { return string.Empty; }
var attributes = fieldInfo.GetCustomAttributes(false).OfType<DisplayAttribute>();
if (null == attributes || !attributes.Any()) { return string.Empty; }
return attributes.FirstOrDefault().Name;
}
private static int TagToVersion(Tags tag)
{
var enumType = tag.GetType();
var name = Enum.GetName(enumType, tag);
if (string.IsNullOrEmpty(name)) { return int.MaxValue; }
var fieldInfo = enumType.GetField(name);
if (null == fieldInfo || !fieldInfo.CustomAttributes.Any()) { return int.MaxValue; }
var attributes = fieldInfo.GetCustomAttributes(false).OfType<VersionAttribute>();
if (null == attributes || !attributes.Any()) { return int.MaxValue; }
return attributes.FirstOrDefault().Version;
}
/// <summary>
/// gets all tags for a given version of import
/// </summary>
/// <param name="version"></param>
/// <returns></returns>
public static Tags[] GetVersionTags(int version)
{
lock (MY_LOCK)
{
if (null == _versionToTags) { PopulateLookups(); }
return _versionToTags.ContainsKey(version) ? _versionToTags[version].ToArray() : new Tags[0];
}
}
private static Dictionary<string, Tags> _stringToTag = null;
private static Dictionary<Tags, string> _tagToString = null;
private static Dictionary<int, List<Tags>> _versionToTags = null;
private static Dictionary<Tags, int> _tagToVersion = null;
/// <summary>
/// gets a display string given a tag
/// </summary>
/// <param name="tag"></param>
/// <returns></returns>
public static string GetStringForTag(Tags tag)
{
lock (MY_LOCK)
{
if (null == _tagToString) { PopulateLookups(); }
return _tagToString.ContainsKey(tag) ? _tagToString[tag] : string.Empty;
}
}
/// <summary>
/// returns a tag given a display string
/// </summary>
/// <param name="s"></param>
/// <returns></returns>
public static Tags GetTagForString(string s)
{
lock (MY_LOCK)
{
if (null == _stringToTag) { PopulateLookups(); }
return _stringToTag.ContainsKey(s) ? _stringToTag[s] : Tags.Unknown;
}
}
/// <summary>
/// returns a version the tag was used in given a tag
/// </summary>
/// <param name="t"></param>
/// <returns></returns>
public static int GetVersionForTag(Tags t)
{
lock (MY_LOCK)
{
if (null == _tagToVersion) { PopulateLookups(); }
return _tagToVersion.ContainsKey(t) ? _tagToVersion[t] : int.MaxValue;
}
}
private static void PopulateLookups()
{
var lookup1 = new Dictionary<string, Tags>();
var lookup2 = new Dictionary<Tags, string>();
var lookup3 = new Dictionary<int, List<Tags>>();
var lookup4 = new Dictionary<Tags, int>();
var allTags = Enum.GetValues(typeof(Tags)).Cast<Tags>().ToArray();
foreach (var tag in allTags)
{
var s = TagToDisplayString(tag);
var version = TagToVersion(tag);
lookup1[s] = tag;
lookup2[tag] = s;
if (!lookup3.ContainsKey(version))
{
lookup3.Add(version, new List<Tags>());
}
lookup3[version].Add(tag);
lookup4[tag] = version;
}
lock (MY_LOCK)
{
_stringToTag = lookup1;
_tagToString = lookup2;
_versionToTags = lookup3;
_tagToVersion = lookup4;
}
}
public enum Tags
{
[Display(Name = "Database Reference Number")]
[Version(0)]
DatabaseReferenceNumber,
[Display(Name = "Sensor SN")]
[Version(0)]
SensorSN,
[Display(Name = "Channel Name")]
[Version(0)]
ChannelName,
[Display(Name = "Location")]
[Version(0)]
Location,
[Display(Name = "Laboratory Code")]
[Version(0)]
LaboratoryCode,
[Display(Name = "Customer Code")]
[Version(0)]
CustomerCode,
[Display(Name = "Partial ISO Code")]
[Version(0)]
PartialISOCode,
[Display(Name = "Comment Field")]
[Version(0)]
CommentField,
[Display(Name = "Sensor Type")]
[Version(0)]
SensorType,
[Display(Name = "Manufacturer")]
[Version(0)]
Manufacturer,
[Display(Name = "Model")]
[Version(0)]
Model,
[Display(Name = "Axis (X, Y, Z)")]
[Version(0)]
Axis,
[Display(Name = "Dimension")]
[Version(0)]
Dimension,
[Display(Name = "EU")]
[Version(0)]
EU,
[Display(Name = "Full Scale (EU)")]
[Version(0)]
FullScale,
[Display(Name = "Exc (VDC)")]
[Version(0)]
Exc,
[Display(Name = "Output @ EXC & FS (mV)")]
[Version(0)]
OutputAtEXCFSmV,
[Display(Name = "Sensitivity (mV/V/EU)")]
[Version(0)]
Sensitivity,
[Display(Name = "Output Proportional to EXC? (Yes, No)")]
[Version(0)]
Proportional,
[Display(Name = "Desired Range (EU)")]
[Version(0)]
DesiredRange,
[Display(Name = "BRIDGE (Full, Half)")]
[Version(0)]
BRIDGE,
[Display(Name = "Use Shunt Cal? (Yes, No)")]
[Version(0)]
UseShuntCal,
[Display(Name = "Bridge Res. (Ohm)")]
[Version(0)]
BridgeResistance,
[Display(Name = "Shunt Resistor Value (Ohms)")]
[Version(0)]
ShuntResistorValue,
[Display(Name = "Equivalent EU for Shunt Resistor")]
[Version(0)]
EquivalentEUShuntResistor,
[Display(Name = "Bypass AA Filter? (Yes, No)")]
[Version(0)]
BypassAAFilter,
[Display(Name = "Invert Signal? (Yes, No)")]
[Version(0)]
InvertSignal,
[Display(Name = "Remove Sensor Offset? (Yes, No)")]
[Version(0)]
RemoveOffset,
[Display(Name = "Sensor Offset Low (mV)")]
[Version(0)]
OffsetToleranceLow,
[Display(Name = "Sensor Offset High (mV)")]
[Version(0)]
OffsetToleranceHigh,
[Display(Name = "SAE Filter Class")]
[Version(0)]
FilterClass,
[Display(Name = "Software Zero Reference (Pre, Avg, 0mV)")]
[Version(0)]
SoftwareZeroReference,
[Display(Name = "Software Zero Equivalent EU")]
[Version(0)]
SoftwareZeroEquivalentEU,
[Display(Name = "16 Byte Dallas Sensor ID")]
[Version(0)]
SensorID,
[Display(Name = "Received")]
[Version(0)]
Received,
[Display(Name = "Last Cal")]
[Version(0)]
LastCal,
[Display(Name = "Due Cal")]
[Version(0)]
DueCal,
[Display(Name = "Due")]
[Version(0)]
Due,
[Display(Name = "Tech")]
[Version(0)]
Tech,
[Display(Name = "Group 1")]
[Version(0)]
Group1,
[Display(Name = "Group 2")]
[Version(0)]
Group2,
[Display(Name = "Group 3")]
[Version(0)]
Group3,
[Display(Name = "Group 4")]
[Version(0)]
Group4,
[Display(Name = "Group 5")]
[Version(0)]
Group5,
[Display(Name = "Category")]
[Version(0)]
Category,
[Display(Name = "IRTRACC Exponent")]
[Version(0)]
IRTRACCExponent,
[Display(Name = "unknown")]
[Version(0)]
Unknown,
[Display(Name = "Version")]
[Version(1)]
Version,
[Display(Name = "Test Setup Name")]
[Version(1)]
TestSetupName,
[Display(Name = "Test Setup Description")]
[Version(1)]
TestSetupDescription,
[Display(Name = "Recording Mode")]
[Version(1)]
RecordingMode,
[Display(Name = "SampleRate")]
[Version(1)]
SampleRate,
[Display(Name = "PreTriggerSec")]
[Version(1)]
PreTriggerSec,
[Display(Name = "PostTriggerSec")]
[Version(1)]
PostTriggerSec,
[Display(Name = "Tags")]
[Version(1)]
Tags,
[Display(Name = "Two Volt Exc.")]
[Version(2)]
TwoVoltExcSensitivity,
[Display(Name = "Five Volt Exc.")]
[Version(2)]
FiveVoltExcSensitivity,
[Display(Name = "Ten Volt Exc.")]
[Version(2)]
TenVoltExcSensitivity,
[Display(Name = "Range Low")]
[Version(2)]
RangeLow,
[Display(Name = "Range Medium")]
[Version(2)]
RangeMedium,
[Display(Name = "Range High")]
[Version(2)]
RangeHigh,
[Display(Name = "Supported Excitation")]
[Version(2)]
SupportedExcitation,
[Display(Name = "Bridge Type")]
[Version(2)]
BridgeType,
[Display(Name = "Unipolar")]
[Version(2)]
Unipolar,
[Display(Name = "Axis Number")]
[Version(2)]
AxisNumber,
[Display(Name = "Number of Axes")]
[Version(2)]
NumberOfAxes,
[Display(Name = "Cal Interval")]
[Version(2)]
CalInterval,
[Display(Name = "Polarity")]
[Version(2)]
Polarity,
[Display(Name = "Physical Dimension")]
[Version(2)]
PhysicalDimension,
[Display(Name = "Direction")]
[Version(2)]
Direction,
[Display(Name = "InitialOffset")]
[Version(2)]
InitialOffset,
[Display(Name = "NonLinear")]
[Version(2)]
NonLinear,
[Display(Name = "Software Zero Method")]
[Version(2)]
ZeroMethod,
[Display(Name = "Zero Averaging Window Start")]
[Version(2)]
ZeroMethodStart,
[Display(Name = "Zero Averaging Window End")]
[Version(2)]
ZeroMethodEnd,
[Display(Name = "Bridge Leg Mode")]
[Version(2)]
BridgeLegMode,
[Display(Name = "Created")]
[Version(2)]
Created,
[Display(Name = "Times Used")]
[Version(2)]
TimesUsed,
[Display(Name = "IEPE Coupling Mode")]
[Version(2)]
CouplingMode,
[Display(Name = "DelayMS")]
[Version(2)]
DelayMS,
[Display(Name = "DigitalOutputDelayMS")]
[Version(2)]
DigitalOutputDelayMS,
[Display(Name = "DurationMS")]
[Version(2)]
DurationMS,
[Display(Name = "DigitalOutputDurationMS")]
[Version(2)]
DigitalOutputDurationMS,
[Display(Name = "Digital Output Mode")]
[Version(2)]
DigitalOutputMode,
[Display(Name = "LimitDuration")]
[Version(2)]
LimitDuration,
[Display(Name = "Squib Fire Mode")]
[Version(2)]
SquibFireMode,
[Display(Name = "Squib Measurement Type")]
[Version(2)]
SquibMeasurementType,
[Display(Name = "Squib Output Current")]
[Version(2)]
SquibOutputCurrent,
[Display(Name = "Digital Scale Multiplier")]
[Version(2)]
DigitalScaleMultiplier,
[Display(Name = "Digital Input Mode")]
[Version(2)]
DigitalInputMode,
[Display(Name = "NonLinear Cal")]
[Version(2)]
NonLinearCalibration,
[Display(Name = "DisplayUnits")]
[Version(2)]
DisplayUnits,
[Display(Name = "At Capacity")]
[Version(2)]
AtCapacity,
[Display(Name = "Capacity Ouptut Is Based On")]
[Version(2)]
CapacityOutputIsBasedOn,
[Display(Name = "Sensitivity Units")]
[Version(2)]
SensitivityUnits,
[Display(Name = "CheckOffset")]
[Version(2)]
CheckOffset,
[Display(Name = "Broken")]
[Version(2)]
Broken,
[Display(Name = "Do Not Use")]
[Version(2)]
DoNotUse,
[Display(Name = "ISOChannelName")]
[Version(2)]
ISOChannelName,
[Display(Name = "UserCode")]
[Version(2)]
UserCode,
[Display(Name = "UserChannelName")]
[Version(2)]
UserChannelName,
[Display(Name = "Addl Linear Sensitivity")]
[Version(2)]
AdditionalLinearSensitivity,
[Display(Name = "Addl Linear Zero Method")]
[Version(2)]
AdditionalLinearZeroMethod,
[Display(Name = "Addl Linear Zero Method Start")]
[Version(2)]
AdditionalLinearZeroMethodStart,
[Display(Name = "Addl Linear Zero Method End")]
[Version(2)]
AdditionalLinearZeroMethodEnd,
[Display(Name = "Addl Initial Offsets")]
[Version(2)]
AdditionalInitialOffsets,
[Display(Name = "Group Name")]
[Version(3)]
GroupName,
[Display(Name = "Group Type")]
[Version(3)]
GroupType,
[Display(Name = "DAS serial number")]
[Version(4)]
DASSerialNumber,
[Display(Name = "DAS channel index")]
[Version(4)]
DASChannelIndex,
[Display(Name = "Stream profile")]
[Version(4)]
StreamProfile,
[Display(Name = "UDP address")]
[Version(4)]
UDPAddress,
[Display(Name = "Time channel Id")]
[Version(4)]
TimeChannelId,
[Display(Name = "Data channel Id")]
[Version(4)]
DataChannelId,
[Display(Name = "Stream output configuration")]
[Version(4)]
TmNSConfig,
[Display(Name = "IRIG time packet interval ms")]
[Version(4)]
IRIGTimeDataPacketIntervalMS,
[Display(Name = "TMATS packet interval ms")]
[Version(4)]
TMATSIntervalMS,
[Display(Name = "Baud rate")]
[Version(4)]
BaudRate,
[Display(Name = "Data bits")]
[Version(4)]
DataBits,
[Display(Name = "Stop bits")]
[Version(4)]
StopBits,
[Display(Name = "Parity")]
[Version(4)]
Parity,
[Display(Name = "Data format")]
[Version(4)]
DataFormat,
[Display(Name = "Test user code")]
[Version(4)]
TestUserCode,
[Display(Name = "Test user channel name")]
[Version(4)]
TestUserChannelName,
[Display(Name = "Test isocode")]
[Version(4)]
TestIsoCode,
[Display(Name = "Test iso channel name")]
[Version(4)]
TestIsoChannelName,
[Display(Name = "Clock master input type")]
[Version(5)]
ClockMasterInputType,
[Display(Name = "Clock master output type")]
[Version(5)]
ClockMasterOutputType,
[Display(Name = "Manage master clocks outside of DP")]
[Version(5)]
ManageClocksOutsideDPMaster,
[Display(Name = "Manage slave clocks outside of DP")]
[Version(5)]
ManageClocksOutsideDPSlave,
[Display(Name = "Clock slave input type")]
[Version(5)]
ClockSlaveInputType,
[Display(Name = "Clock slave output type")]
[Version(5)]
ClockSlaveOutputType,
[Display(Name = "DAS serial")]
[Version(6)]
DASSerial,
[Display(Name = "DAS sample rate")]
[Version(6)]
DASSampleRate,
[Display(Name = "PTP domain id")]
[Version(6)]
PTPDomainId,
[Display(Name = "Clock master")]
[Version(6)]
ClockMaster
}
}
}

View File

@@ -0,0 +1,7 @@
using Prism.Events;
// ReSharper disable CheckNamespace
namespace DTS.Common.Events
{
public class CalibrationBehaviorSettingChangedEvent : PubSubEvent<DTS.Common.Enums.Sensors.CalibrationBehaviors> { }
}

View File

@@ -0,0 +1,55 @@
using DTS.Common.Base;
using System.Windows.Controls;
namespace DTS.Common.Interface.Menu.HamburgerMenu
{
/// <summary>
/// this class describes the view module for the group import module
/// this handles interaction betweens the views and the application, as well as
/// the logic and intermediate data for the module
/// </summary>
public interface IHamburgerMenuViewModel : IBaseViewModel
{
IHamburgerMenuView View { get; set; }
/// <summary>
/// any work that needs to be done when a view is loaded
/// </summary>
void OnSetActive();
/// <summary>
/// any work that needs to be done when view is unloaded
/// </summary>
void Unset();
/// <summary>
/// returns the menu for the hamburger menu
/// </summary>
/// <returns></returns>
ContextMenu GetContextMenu();
/// <summary>
/// sets the menu items for the hamburger menu
/// </summary>
/// <param name="items"></param>
void SetMenuItems(string[] items);
/// <summary>
/// clear the menu items
/// </summary>
void ClearMenuItems();
/// <summary>
/// handler for when items are pressed
/// </summary>
MenuItemPressedDelegate MenuItemPressed { get; set; }
//15324 Warning dialog displayed on every tab change once admin user tries to view another users view
/// <summary>
/// Hamburger menu is enabled or disabled
/// </summary>
bool IsEnabled { get; }
/// <summary>
/// Enable or disable HamburgerMenu
/// </summary>
/// <param name="enable"></param>
void EnableMenu(bool enable);
}
public delegate void MenuItemPressedDelegate(string command);
}