316 lines
16 KiB
C#
316 lines
16 KiB
C#
using DTS.Common.Interface.DASFactory.Config;
|
|
|
|
namespace DTS.Common.Enums
|
|
{
|
|
/// <summary>
|
|
/// different variables to optimize or change the behavior of das factory based on whether a test
|
|
/// is currently executing or not
|
|
/// </summary>
|
|
public abstract class RunTestVariables
|
|
{
|
|
public static bool TestSetupIdPrefill { get; set; } = false;
|
|
public static bool IsTSRAIRGo { get; set; } = false;
|
|
/// <summary>
|
|
/// the delay in seconds before arm/record in auto arm recording modes
|
|
/// http://manuscript.dts.local/f/cases/43048/Support-Delay-to-arm-record-with-power-on-with-autoarm-enabled
|
|
/// </summary>
|
|
public static int AutoArmRecordDelaySeconds { get; set; } = 1;
|
|
public static string DbName { get; set; } = "DataPRO";
|
|
/// <summary>
|
|
/// whether to show ADC unsigned or not
|
|
/// This is just a property to hold the value during run test
|
|
/// http://manuscript.dts.local/f/cases/33110/Eliminate-DB-communication-while-in-realtime
|
|
/// </summary>
|
|
public static bool ShowADCUnsigned { get; set; } = false;
|
|
/// <summary>
|
|
/// The realtime sample rate for TDAS
|
|
/// This is just a property to hold the value during run test
|
|
/// http://manuscript.dts.local/f/cases/33110/Eliminate-DB-communication-while-in-realtime
|
|
/// </summary>
|
|
public static double RealtimeSampleRateTDAS { get; set; } = 1000;
|
|
/// <summary>
|
|
/// The default udp stream time channel id
|
|
/// This is just a property to hold the value during run test
|
|
/// http://manuscript.dts.local/f/cases/33110/Eliminate-DB-communication-while-in-realtime
|
|
/// </summary>
|
|
public static int DefaultUDPStreamTimeChannelId { get; set; } = 1;
|
|
/// <summary>
|
|
/// the default udp stream data channel id
|
|
/// This is just a property to hold the value during run test
|
|
/// http://manuscript.dts.local/f/cases/33110/Eliminate-DB-communication-while-in-realtime
|
|
/// </summary>
|
|
public static int DefaultUDPStreamDataChannelId { get; set; } = 3;
|
|
/// <summary>
|
|
/// the default irig time data packet interval in ms
|
|
/// This is just a property to hold the value during run test
|
|
/// http://manuscript.dts.local/f/cases/33110/Eliminate-DB-communication-while-in-realtime
|
|
/// </summary>
|
|
public static int DefaultIRIGTimeDataPacketIntervalMs { get; set; } = 1000;
|
|
/// <summary>
|
|
/// the default udp stream tmns config property as a string
|
|
/// This is just a property to hold the value during run test
|
|
/// http://manuscript.dts.local/f/cases/33110/Eliminate-DB-communication-while-in-realtime
|
|
/// </summary>
|
|
public static string DefaultUDPStreamTmNSConfig { get; set; } = "";
|
|
/// <summary>
|
|
/// The ISO view mode
|
|
/// This is just a property to hold the value during run test
|
|
/// http://manuscript.dts.local/f/cases/33110/Eliminate-DB-communication-while-in-realtime
|
|
/// </summary>
|
|
public static IsoViewMode ISOViewMode { get; set; } = IsoViewMode.ISOOnly;
|
|
/// <summary>
|
|
/// the realtime level trigger percentage
|
|
/// This is just a property to hold the value during run test
|
|
/// http://manuscript.dts.local/f/cases/33110/Eliminate-DB-communication-while-in-realtime
|
|
/// </summary>
|
|
public static double RealtimeLevelTriggerPercentage { get; set; } = 100;
|
|
/// <summary>
|
|
/// the realtime level trigger beep interval in ms
|
|
/// This is just a property to hold the value during run test
|
|
/// http://manuscript.dts.local/f/cases/33110/Eliminate-DB-communication-while-in-realtime
|
|
/// </summary>
|
|
public static int RealtimeLevelTriggerBeepIntervalMS { get; set; } = 10;
|
|
/// <summary>
|
|
/// the realtime level trigger beep count
|
|
/// This is just a property to hold the value during run test
|
|
/// http://manuscript.dts.local/f/cases/33110/Eliminate-DB-communication-while-in-realtime
|
|
/// </summary>
|
|
public static int RealtimeLevelTriggerBeepCount { get; set; } = 10;
|
|
/// <summary>
|
|
/// whether to auto advance in realtime level trigger
|
|
/// This is just a property to hold the value during run test
|
|
/// http://manuscript.dts.local/f/cases/33110/Eliminate-DB-communication-while-in-realtime
|
|
/// </summary>
|
|
public static bool RealtimeLevelTriggerAutoAdvance { get; set; } = false;
|
|
/// <summary>
|
|
/// how long to freeze after a level trigger in realtime in seconds
|
|
/// This is just a property to hold the value during run test
|
|
/// http://manuscript.dts.local/f/cases/33110/Eliminate-DB-communication-while-in-realtime
|
|
/// </summary>
|
|
public static int RealtimeLevelTriggerFreezeTimeSec { get; set; } = 3;
|
|
/// <summary>
|
|
/// whether to require completion of realtime level trigger checks or not
|
|
/// This is just a property to hold the value during run test
|
|
/// http://manuscript.dts.local/f/cases/33110/Eliminate-DB-communication-while-in-realtime
|
|
/// </summary>
|
|
public static bool RealtimeLevelTriggerRequireCheckCompletion { get; set; } = false;
|
|
/// <summary>
|
|
/// realtime level trigger qualifying number of samples for a level trigger
|
|
/// This is just a property to hold the value during run test
|
|
/// http://manuscript.dts.local/f/cases/33110/Eliminate-DB-communication-while-in-realtime
|
|
/// </summary>
|
|
public static int RealtimeLevelTriggerQualifyingSamples { get; set; } = 5;
|
|
/// <summary>
|
|
/// whether to beep in realtime level trigger while idle
|
|
/// This is just a property to hold the value during run test
|
|
/// http://manuscript.dts.local/f/cases/33110/Eliminate-DB-communication-while-in-realtime
|
|
/// </summary>
|
|
public static bool RealtimeLevelTriggerIdleBeep { get; set; } = false;
|
|
/// <summary>
|
|
/// realtime level trigger idle beep interval in ms
|
|
/// This is just a property to hold the value during run test
|
|
/// http://manuscript.dts.local/f/cases/33110/Eliminate-DB-communication-while-in-realtime
|
|
/// </summary>
|
|
public static int RealtimeLevelTriggerIdleBeepIntervalMS { get; set; } = 1000;
|
|
/// <summary>
|
|
/// whether to use realtime in metermode table mode
|
|
/// This is just a property to hold the value during run test
|
|
/// http://manuscript.dts.local/f/cases/33110/Eliminate-DB-communication-while-in-realtime
|
|
/// </summary>
|
|
public static bool UseMeterModeTable { get; set; } = false;
|
|
/// <summary>
|
|
/// whether to save realtime snapshots to clipboard or not
|
|
/// This is just a property to hold the value during run test
|
|
/// http://manuscript.dts.local/f/cases/33110/Eliminate-DB-communication-while-in-realtime
|
|
/// </summary>
|
|
public static bool SaveSnapshotToClipboard { get; set; } = false;
|
|
/// <summary>
|
|
/// the default UDP stream address
|
|
/// This is just a property to hold the value during run test
|
|
/// http://manuscript.dts.local/f/cases/33110/Eliminate-DB-communication-while-in-realtime
|
|
/// </summary>
|
|
public static string RealtimeUDPStreamAddress { get; set; } = "";
|
|
/// <summary>
|
|
/// whether to use UDP for realtime streaming
|
|
/// This is just a property to hold the value during run test
|
|
/// http://manuscript.dts.local/f/cases/33110/Eliminate-DB-communication-while-in-realtime
|
|
/// </summary>
|
|
public static bool UseUDPStreaming { get; set; } = false;
|
|
/// <summary>
|
|
/// the number of realtime charts to show
|
|
/// This is just a property to hold the value during run test
|
|
/// http://manuscript.dts.local/f/cases/33110/Eliminate-DB-communication-while-in-realtime
|
|
/// </summary>
|
|
public static int NumberOfRealtimeCharts { get; set; } = 6;
|
|
/// <summary>
|
|
/// realtime sample rate for SLICE6
|
|
/// This is just a property to hold the value during run test
|
|
/// http://manuscript.dts.local/f/cases/33110/Eliminate-DB-communication-while-in-realtime
|
|
/// </summary>
|
|
public static double RealtimeSampleRateSLICE6 { get; set; } = 1000;
|
|
/// <summary>
|
|
/// realtime sample rate
|
|
/// This is just a property to hold the value during run test
|
|
/// http://manuscript.dts.local/f/cases/33110/Eliminate-DB-communication-while-in-realtime
|
|
/// </summary>
|
|
public static double RealtimeSampleRate { get; set; } = 1000;
|
|
/// <summary>
|
|
/// realtime sample rate for USB SLICE
|
|
/// This is just a property to hold the value during run test
|
|
/// http://manuscript.dts.local/f/cases/33110/Eliminate-DB-communication-while-in-realtime
|
|
/// </summary>
|
|
public static double RealtimeSampleRateUSBSLICE { get; set; } = 1000;
|
|
public static double RealtimeSampleRateEthSLICE { get; set; } = 120;
|
|
/// <summary>
|
|
/// default realtime chart width in seconds
|
|
/// This is just a property to hold the value during run test
|
|
/// http://manuscript.dts.local/f/cases/33110/Eliminate-DB-communication-while-in-realtime
|
|
/// </summary>
|
|
public static double ChartWidthInSeconds { get; set; } = 2;
|
|
/// <summary>
|
|
/// whether to enable dynamic realtime optimization
|
|
/// This is just a property to hold the value during run test
|
|
/// http://manuscript.dts.local/f/cases/33110/Eliminate-DB-communication-while-in-realtime
|
|
/// </summary>
|
|
public static bool EnableDynamicRealtimeOptimization { get; set; } = false;
|
|
/// <summary>
|
|
/// the number of ADC samples per data packet
|
|
/// http://manuscript.dts.local/f/cases/31754/
|
|
/// </summary>
|
|
public static int ADCSamplesPerPacket { get; set; } = 100;
|
|
/// <summary>
|
|
/// whether to remove leap seconds from streaming timestamps
|
|
/// note that this property does not retrieve the setting from the database, and only holds the value
|
|
/// between operations, it must be updated separately
|
|
/// </summary>
|
|
public static bool RemoveLeapSeconds { get; set; } = false;
|
|
/// <summary>
|
|
/// whether to output reports in XLSM format or XLSX
|
|
/// 20152 DataPRO Test Summary Preview - .xlsm support
|
|
/// note that Test Summary is the only one requested so far, so that's the only one we do
|
|
/// </summary>
|
|
public static bool OutputXLSMReports { get; set; } = false;
|
|
/// <summary>
|
|
/// 43731 [SW] NFR - DataPRO - Allow users to turn off sensor ID reading
|
|
/// this property controls whether EIDs are disabled in run test tabs
|
|
/// It does not retrieve the setting, only holds the property between processes
|
|
/// </summary>
|
|
public static bool DisableEIDs { get; set; } = false;
|
|
public static bool BypassEIDRead
|
|
{
|
|
get => DisableEIDs && InRunTest;
|
|
}
|
|
|
|
/// <summary>
|
|
/// controls whether to mask EU meta data when streaming
|
|
/// 25597 Add option in System Settings to populate TMATs without offset values or scalefactors; "Stream without EU Metadata in TMATs"
|
|
/// does not query setting, only holds the setting in memory for use
|
|
/// across modules
|
|
/// </summary>
|
|
public static bool MaskEUMetaData { get; set; } = false;
|
|
/// <summary>
|
|
/// the protocol version S6 are assumed to be when running a test (protocol version not queried)
|
|
/// </summary>
|
|
public static byte AssumedProtocolVersionForSlice6InRunTest { get; set; } = 0;
|
|
/// <summary>
|
|
/// whether to query cal date when running a test
|
|
/// </summary>
|
|
public static bool QueryCalDateInRunTest { get; set; } = false;
|
|
/// <summary>
|
|
/// whether currently running a test or not
|
|
/// </summary>
|
|
public static bool InRunTest { get; set; } = false;
|
|
/// <summary>
|
|
/// whether to query connected devices when running a test or not
|
|
/// </summary>
|
|
public static bool QueryConnectedDevicesInRunTest { get; set; } = false;
|
|
/// <summary>
|
|
/// the minimum time between different ATDs when connecting
|
|
/// </summary>
|
|
public static int PerBucketOffsetMS { get; set; } = 2000;
|
|
/// <summary>
|
|
/// the maximum time variance within the bucket itself for an ATD (so 2000, 1000 means all units in ATD2 should have their chance to start between 2 and 3s)
|
|
/// </summary>
|
|
public static int BucketVariance { get; set; } = 1000;
|
|
/// <summary>
|
|
/// performance improvement possibility, skip QueryProtocolVersion in RunTest and just
|
|
/// assume the protocol version of devices
|
|
/// a value of -1 means the version will still be queried
|
|
/// </summary>
|
|
public static byte Assumed_S6DB_ProtocolVersion = 13;
|
|
/// <summary>
|
|
/// performance improvement, skip QueryBaseHardwareRevision and use this assumed value in RunTest
|
|
/// a value of -1 means it will be queried anyhow
|
|
/// </summary>
|
|
public static int AssumedBaseHardwareRevisionSLICE6 = 0;
|
|
/// <summary>
|
|
/// performance improvement, skip QueryBaseType in RunTest for S6 and just use this value as the
|
|
/// assumed base type, a value of -1 means it will be queried anyhow
|
|
/// </summary>
|
|
public static int AssumeBaseTypeSLICE6 = 6;
|
|
/// <summary>
|
|
/// performance improvement, skip QueryEventData in run test or not
|
|
/// </summary>
|
|
public static bool OptimizeQueryEventData = true;
|
|
/// <summary>
|
|
/// performance improvement, skip setting polarity in run test
|
|
/// </summary>
|
|
public static bool DontSetPolarityInRunTest = false;
|
|
/// <summary>
|
|
/// performance improvement, whether to cache voltage settings in runtest
|
|
/// rather than always retrieving from db
|
|
/// </summary>
|
|
public static bool CacheVoltageSettingsInRunTest = true;
|
|
/// <summary>
|
|
/// performance improvment, skip getting TiltSensorScaleFactor from S6
|
|
/// as they aren't currently calibrated and use the same scalefactor
|
|
/// </summary>
|
|
public static float TiltSensorScaleFactor = 0.0009765625F;
|
|
/// <summary>
|
|
/// performance improvment, whether to check for autoarmed in runtest or not
|
|
/// </summary>
|
|
public static bool CheckForAutoArmedInRunTest = true;
|
|
/// <summary>
|
|
/// performance, whether to avoid executing PrepareDataCollection when arming
|
|
/// [per LP since arming does same work]
|
|
/// </summary>
|
|
public static bool EliminatePrepareForDataCollection = true;
|
|
/// <summary>
|
|
/// performance improvement, whether to check hardware first use date in run test
|
|
/// </summary>
|
|
public static bool CheckHardwareFirstUseDateInRunTest = true;
|
|
|
|
/// <summary>
|
|
/// The current value for how long to wait for excitation warmup for a TOM
|
|
/// http://manuscript.dts.local/f/cases/39396/TOM-diagnostic-delay-not-being-observed
|
|
/// </summary>
|
|
public static int TOMExcitationWarmupTimeMS = TOM_EXCITATIONWARMUPTIME_MS;
|
|
/// <summary>
|
|
/// default value for TOM excitation warmup time in ms
|
|
/// </summary>
|
|
public const int TOM_EXCITATIONWARMUPTIME_MS = 20000;
|
|
|
|
public static int IEPEExcitationWamupTimeMS = IEPE_EXCITATIONWARMUPTIME_MS;
|
|
public const int IEPE_EXCITATIONWARMUPTIME_MS = 30000;
|
|
|
|
/// <summary>
|
|
/// initiales all channels to have no EIDs
|
|
/// </summary>
|
|
/// <param name="configData"></param>
|
|
public static void BlankIds(IConfigurationData configData)
|
|
{
|
|
if (null == configData) { return; }
|
|
if (null == configData.Modules || 0 == configData.Modules.Length) { return; }
|
|
foreach (var module in configData.Modules)
|
|
{
|
|
if (null == module.Channels || 0 == module.Channels.Length) { continue; }
|
|
foreach (var channel in module.Channels)
|
|
{
|
|
channel.IDs = new IEID[0];
|
|
}
|
|
}
|
|
}
|
|
|
|
}
|
|
}
|