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,15 @@
namespace DTS.Common.RibbonControl
{
public class ApplicationMenuItemData : MenuItemData
{
public ApplicationMenuItemData()
: this(false)
{
}
public ApplicationMenuItemData(bool isApplicationMenu)
: base(isApplicationMenu)
{
}
}
}

View File

@@ -0,0 +1,121 @@
using DTS.Common.Enums;
namespace DTS.Common.Constant.DASSpecific
{
public class TSRAIR
{
public const uint MaxAAFilterRateHz = 200000;
public const byte MIN_PROTOCOL_VER = 1;
public const int VOLTAGE_INSERTION = 2;
public const int START_REC_DELAY_IN_SECONDS = 3;
public const int STACK_SENSORS = 5;
public const int WAKEUP_MOTION_TIMEOUT = 10;
public const int IRIG_GPS_PPSIN_SYNC = 25;
public const int DISABLE_STREAMING_FEATURE = 25;
public const int TSRAIR_MIN_PRE_TRIGGER_SAMPLES = 256;
public const int TSRAIR_MAX_PRE_TRIGGER_SAMPLES = 512;
public const int EXTENDED_FAULTS_VER = 27;
public const int PROTOCOL_VERSION_CIRCULAR_UART = 29;
public const int PROTOCOL_VERSION_CIRCULAR = int.MaxValue;
public const int PROTOCOL_VERSION_RECORDER_UART = 30;
public const int PROTOCOL_VERSION_RECORDER = int.MaxValue;
public const int PROTOCOL_VERSION_SCHEDULED_EVENTCOUNT = 35;
public static bool IsRecordingModeSupported(RecordingModes mode, int protocolVersion)
{
switch (mode)
{
case RecordingModes.CircularBufferPlusUART:
case RecordingModes.MultipleEventCircularBufferPlusUART:
return protocolVersion >= PROTOCOL_VERSION_CIRCULAR_UART;
case RecordingModes.CircularBuffer:
case RecordingModes.MultipleEventCircularBuffer:
return protocolVersion >= PROTOCOL_VERSION_CIRCULAR;
case RecordingModes.Recorder:
case RecordingModes.MultipleEventRecorder:
return protocolVersion >= PROTOCOL_VERSION_RECORDER;
case RecordingModes.MultipleEventRecorderPlusUART:
case RecordingModes.RecorderPlusUART:
return protocolVersion >= PROTOCOL_VERSION_RECORDER_UART;
case RecordingModes.Active:
case RecordingModes.MultipleEventActive:
case RecordingModes.Streaming:
case RecordingModes.S6A_DeviceStreamingOnly:
//26783: Since the "Set DAS to Streaming" checkbox is used for both
//TSR AIR and SLICE6Air, the recording mode may correspond to the
//"other" hardware if the DAS is switched from one to the other
case RecordingModes.Scheduled:
case RecordingModes.Interval:
return true;
default:
return false;
}
}
public static bool IsStreamingProfileSupported(UDPStreamProfile profile, int protocolVersion)
{
var result = false;
switch (profile)
{
case UDPStreamProfile.DTS_UDP:
case UDPStreamProfile.CH10_ANALOG_2HDR:
//FB 30035 Added other supported profiles for TSRAIR
case UDPStreamProfile.CH10_ANALOG:
case UDPStreamProfile.CH10_PCM_128BIT_2HDR:
case UDPStreamProfile.CH10_PCM128_MM:
result = true;
break;
}
return result;
}
public static bool IsClockSyncProfileSupported(ClockSyncProfile profile, int protocolVersion, bool master)
{
var result = false;
switch (profile)
{
case ClockSyncProfile.IRIG_EXT_PPS:
return false;
case ClockSyncProfile.EXT_PPS:
//master EXT_PPS not supported at this time for TSR AIR
//http://manuscript.dts.local/f/cases/34280/
if (protocolVersion >= IRIG_GPS_PPSIN_SYNC && !master)
{
result = true;
}
break;
case ClockSyncProfile.None:
result = true;
break;
case ClockSyncProfile.Master_E2E:
case ClockSyncProfile.Slave_E2E:
result = true;
break;
case ClockSyncProfile.GPS_EXT_PPS:
case ClockSyncProfile.Master_E2E_GPS_EXT_PPS:
case ClockSyncProfile.Master_E2E_EXT_PPS:
case ClockSyncProfile.IRIG:
case ClockSyncProfile.Master_E2E_IRIG:
case ClockSyncProfile.Master_E2E_IRIG_EXT_PPS:
// 30430 per EF and LP / 30704: everything but 1PPS out is legal with protocol 25
if (protocolVersion >= IRIG_GPS_PPSIN_SYNC)
{
result = true;
}
break;
case ClockSyncProfile.GPS:
case ClockSyncProfile.Master_E2E_GPS:
result = false;
// 30487: Leave this alone, GPS only clock sync option should be removed
break;
}
return result;
}
/* 39151 Leaving a note here in TSRAIR for when it inevitably gets UART recording
* copy/paste the implemented MaxSampleRateHz_UART dictionary and MaxSampleRateHzForRecordingMode function from SLICE6AIR
*/
}
}

View File

@@ -0,0 +1,59 @@
namespace DTS.Common.Interface.DASFactory.Config
{
public interface IConfiguration
{
/// <summary>
/// path on pc the IConfiguration device is storing test information to
/// </summary>
string TestDirectory { get; set; }
/// <summary>
/// returns true if the unit supports discovering channel type [bridge/IEPE]
/// </summary>
bool SupportsAutoDetect { get; }
/// <summary>
/// directly query (if possible) if there are any devices connected to this unit
/// </summary>
void QueryConnectedDevices();
/// <summary>
/// ConfigData object containing the pre-test setup and configuration
/// of all modules and channels in the hardware. The object is updated
/// when <see cref="ConfigurationService">ConfigurationService.Configure(...)</see> is called, and the properties
/// of the entire DAS unit can be inspected.
/// </summary>
IConfigurationData ConfigData { get; set; }
/// <summary>
/// DASClockSyncProfile object containing the profile for clock sync for the hardware
/// The data is updated
/// when <see cref="ConfigurationService">ConfigurationService.Configure(...)</see> is called, and is only
/// applied to units that support the value
/// </summary>
ClockSyncProfile DASClockSyncProfile { get; set; }
/// <summary>
/// get the display order of this das
/// allows a das to be display before or after other das
/// default display order is -1
/// </summary>
/// <returns>display order (-1 default)</returns>
int GetDASDisplayOrder();
/// <summary>
/// gets the display order of channels in this das
/// allows channels to have a different order in display UIs
///
/// </summary>
/// <returns></returns>
int[] GetChannelDisplayOrder();
/// <summary>
/// sets the order of the das to be displayed in UIs
/// should only be called really from FWTU
/// </summary>
/// <param name="order"></param>
void SetDASDisplayOrder(int order);
/// <summary>
/// sets the order of channels to be displayed in UIs
/// should only be called really from FWTU
/// </summary>
/// <param name="order"></param>
void SetChannelDisplayOrder(int[] order);
}
}

View File

@@ -0,0 +1,38 @@
namespace DTS.Common.Constant
{
public static class DigitalInputs
{
/// <summary>
/// magic number from CPB
/// a transition across 19005 flips the bit
/// UPDATE:
/// Currently the plan for the DIM thresholds is:
///1. Voltage input: 19661 (1.5V with sig- grounded)
///2. Contact Closure: 19005 (stays the same as what it used to be)
///VoltageInput should be used for digital modes THL and TLH
/// </summary>
public const double ConstantCurrentBreakPointDefault = 19005D;
public const double VoltageInputBreakPointDefault = 19661D;
/// <summary>
/// the default value for whether to display SLICE PRO Digital ADC or not
/// </summary>
public const bool DisplaySPDADCDefault = false;
/// <summary>
/// the current constant current break point
/// does not query value from storage, only holds value static and relies on value being set separately
/// </summary>
public static double ConstantCurrentBreakPoint { get; set; } = ConstantCurrentBreakPointDefault;
/// <summary>
/// the voltage input break point
/// does not query value from storage, only holds value static and relies on value being set separately
/// </summary>
public static double VoltageInputBreakPoint { get; set; } = VoltageInputBreakPointDefault;
/// <summary>
/// controls whether to display SLICE Pro Digital analog ADC
/// does not query value from storage, only holds value static and relies on value being set separately
/// </summary>
public static bool DisplaySPDADC { get; set; } = DisplaySPDADCDefault;
}
}

View File

@@ -0,0 +1,35 @@
namespace DTS.Common.Classes.Groups
{
// ReSharper disable once InconsistentNaming
/// <summary>
/// this class encapsulates and enumerates all possible errors while importing a .GRP file
/// </summary>
public class GroupGRPImportError
{
public enum Errors
{
FileEmpty,
InvalidISOCodeInput,
InvalidFullScaleInput,
InvalidSensorInput,
InvalidInvertInput,
SensorNotFound,
InvalidInputMode,
InvalidDefaultValue,
InvalidActiveValue,
InvalidFireMode,
InvalidDelay,
InvalidLimitDuration,
InvalidDuration,
InvalidCurrent
}
public Errors ErrorCode { get; set; }
public string File { get; set; }
public int Line { get; set; }
public string ExtraInfo { get; set; }
public override string ToString()
{
return ExtraInfo;
}
}
}