240 lines
15 KiB
C#
240 lines
15 KiB
C#
using System.Collections.Generic;
|
|
using DTS.Common.Enums;
|
|
|
|
namespace DTS.Common
|
|
{
|
|
public static class Constants
|
|
{
|
|
public const string ROI_TAG = "ROI";
|
|
public const string ALL_TAG = "ALL";
|
|
public const string DAS_TEST_SETUPS = "DASTestSetup";
|
|
public const int MINIMUM_VOLTAGE_INSERTION_RANGE_MV_SLICE = 10;
|
|
/// <summary>
|
|
/// The max zoom to apply to a graph if the data in the graph does not meet the zoom ranges. This is specified as % full scale
|
|
/// (of capacity)
|
|
/// so for 2400 EU if the graph is a flat line the max over or under of the plot would be 24 units.
|
|
/// http://manuscript.dts.local/f/cases/29416/Limit-view-of-TSR-AIR-data-to-2-of-full-scale-in-auto-range-mode
|
|
/// these variables already existed, I just abstracted them to a common spot from two disparate spots
|
|
/// </summary>
|
|
public const double GRAPH_MIN_AUTOZOOM = 0.01D;
|
|
/// <summary>
|
|
/// The max zoom to apply to a graph. This is specified as % full scale (of signal)
|
|
/// http://manuscript.dts.local/f/cases/29416/Limit-view-of-TSR-AIR-data-to-2-of-full-scale-in-auto-range-mode
|
|
/// these variables already existed, I just abstracted them to a common spot from two disparate spots
|
|
/// </summary>
|
|
public const double GRAPH_MAX_AUTOZOOM = 1.2D;
|
|
/// <summary>
|
|
/// whether to check status line while doing realtime polling
|
|
/// http://manuscript.dts.local/f/cases/27067/
|
|
/// </summary>
|
|
public static bool CheckStatusLinesInRealtime { get; set; } = true;
|
|
/// <summary>
|
|
/// sleep time between chart updates
|
|
/// http://manuscript.dts.local/f/cases/27067/
|
|
/// </summary>
|
|
public static int UpdateIntervalRealtimeCharts { get; set; } = 100;
|
|
public const string USB = "USB";
|
|
public const string BACKUP_HEADER_EXTENSION = ".header.bak";
|
|
public const string BACKUP_FILE_EXTENSION = ".bak";
|
|
public const string DAS_CONFIGS = "DASConfigs";
|
|
public const double UNUSED_START_TIME = 0;
|
|
public const int UNUSED_DATA_COLLECTION_LENGTH = 0;
|
|
public const int MAX_USER_CHANNEL_NAME_LENGTH = 100;
|
|
public const string REPORT_DIR_NAME = "Reports";
|
|
public const string REPORT_TEMPLATE_DIR_NAME = "ReportTemplates";
|
|
public const string TEMP_FILE_EXTENSION = ".tmp";
|
|
public const string UDP_STREAM_CH10_TF2 = "2HDR";
|
|
public const string EventNumber = "_Event Number";
|
|
public const string UseMeasuredExcitation = "UseMeasuredExcitation";
|
|
public const string ManualsFolder = "Manuals";
|
|
public const string WindowsExplorer = "explorer.exe";
|
|
|
|
//FB 23926 Moved to constants
|
|
public const string NoValue = "NOVALUE";
|
|
|
|
public const string ISO_CH_ONLY_PREFIX = "__ISO_CH_ONLY__";
|
|
|
|
//FB 25526 Moved from SLICE6AIR so they can be used by multiple classes
|
|
public const uint XML_HEADER_LENGTH = 8;
|
|
public readonly static byte[] XML_STORE_MAGIC_BYTES = new byte[] { 0xAA, 0x55, 0xA5, 0x5A };
|
|
public const ushort FILE_STORE_DSP_FILTER_ID = 104;
|
|
public const byte DEVICE_STREAMING_ONLY = 1;
|
|
|
|
/// <summary>
|
|
///FB 28107 Maximum value allowed for TDAS Tom Digital out duration
|
|
/// </summary>
|
|
public const double TDAS_TOM_DIGITAL_OUT_DURATION_MAX = 1600;
|
|
|
|
/// <summary>
|
|
/// bps = (32bit + 6x16bit) * sampling rate. Our PCM data payload is 128bit per minor frame
|
|
/// </summary>
|
|
public const int BITS_PER_MINOR_FRAME_S6A = 128;
|
|
//bps = (32 + 18*16)*sampling rate for TSR AIR - per EF
|
|
//[2:14 PM] Eric Fizer should be 18 * 16bit +32bit frame sync, no?
|
|
public const int BITS_PER_MINOR_FRAME_TSRAIR = 320;
|
|
|
|
/// <summary>
|
|
/// FB15339 DACs are 16-bit, so midpoint ADC value would be 2^15 - 1
|
|
/// </summary>
|
|
public const int ADC_MIDPOINT = 32767;
|
|
/// <summary>
|
|
/// timeout supplied to ping_ICMP
|
|
/// 14735 Updates for GM Process flow, time improvement and bug fix
|
|
/// max time in MS to wait for an individual ping attempt
|
|
/// </summary>
|
|
public static int PING_ICMP_TIMEOUT { get; set; } = 500;
|
|
/// <summary>
|
|
/// 14966 AAF Realtime rate if we're turning off AAFRealtime via the config file
|
|
/// </summary>
|
|
public const float SLICE2_NO_AAF_REALTIME_RATE = 100000F;
|
|
/// <summary>
|
|
/// FB15313 Configure S6A udp streaming
|
|
/// </summary>
|
|
public const int UDP_STREAMPROFILES_MAX = 15;
|
|
/// <summary>
|
|
/// FB15323 Restrict Sample Rates when in UART recording modes
|
|
/// </summary>
|
|
public const int UART_MODE_MAX_SAMPLERATE = 30000;
|
|
/// <summary>
|
|
/// FB30273 Implement 'Warning' Validation for Streaming sample rate greater than 10k when Digital Filtering is configured
|
|
/// </summary>
|
|
public const int SLICE6AIR_STREAMING_DIGITAL_FILTERING_MAX_SAMPLERATE = 10000;
|
|
public const int SLICE6AIR_STREAMING_DIGITAL_FILTERING_MAX_SAMPLERATE_20k = 20000;
|
|
public const int SLICE6AIR_20K_DIGITAL_FILTER_MIN_PROTOCOL = 46;
|
|
/// <summary>
|
|
/// max sample rate that digital filtering will reliably work for S6A F/W version 46 and beyond
|
|
/// http://manuscript.dts.local/f/cases/39106/Datapro-shouldnt-be-warning-about-digital-filter-availability-until-20k-sps
|
|
/// </summary>
|
|
public const decimal NANOS_PER_SECOND = 1000000000m;
|
|
public const double TEN_MILLIS_IN_SEC = 0.01D;
|
|
/// <summary>
|
|
/// Wait timeout for 3rd party executables
|
|
/// </summary>
|
|
public const int EXECUTABLE_TIMEOUT = 30000;
|
|
/// <summary>
|
|
/// FB15154 Restrict Clock Master & Clock Slave Test Setup Default profile selections
|
|
/// </summary>
|
|
public static readonly ClockSyncProfile[] MasterProfiles = { ClockSyncProfile.None,
|
|
ClockSyncProfile.Manual,
|
|
ClockSyncProfile.Master_E2E,
|
|
ClockSyncProfile.Master_E2E_PPS_OUT,
|
|
ClockSyncProfile.Master_E2E_IRIG,
|
|
ClockSyncProfile.IRIG_Master_E2E_PPS_OUT,
|
|
ClockSyncProfile.IRIG_PPS_OUT,
|
|
ClockSyncProfile.Master_E2E_IRIG_EXT_PPS,
|
|
ClockSyncProfile.Master_E2E_GPS_EXT_PPS,
|
|
ClockSyncProfile.Master_E2E_EXT_PPS,
|
|
ClockSyncProfile.IRIG,
|
|
ClockSyncProfile.IRIG_EXT_PPS,
|
|
ClockSyncProfile.GPS_EXT_PPS,
|
|
ClockSyncProfile.EXT_PPS,
|
|
//Combinations that are possible in UI, but no device supports
|
|
//30487: GPS only clock sync option should be removed
|
|
// also clean up available selections in TSD
|
|
/*ClockSyncProfile.PPS_OUT,
|
|
ClockSyncProfile.GPS,
|
|
ClockSyncProfile.GPS_PPS_OUT,
|
|
ClockSyncProfile.GPS_Master_E2E_PPS_OUT,
|
|
ClockSyncProfile.GPS_EXT_PPS_PPS_OUT,
|
|
ClockSyncProfile.GPS_EXT_PPS_Master_E2E_PPS_OUT,
|
|
ClockSyncProfile.EXT_PPS_PPS_OUT,
|
|
ClockSyncProfile.EXT_PPS_Master_E2E_PPS_OUT,
|
|
ClockSyncProfile.IRIG_EXT_PPS_PPS_OUT,
|
|
ClockSyncProfile.IRIG_EXT_PPS_Master_E2E_PPS_OUT,*/
|
|
};
|
|
public static readonly ClockSyncProfile[] SlaveProfiles = { ClockSyncProfile.None,
|
|
ClockSyncProfile.Manual,
|
|
ClockSyncProfile.Slave_E2E,
|
|
ClockSyncProfile.Slave_E2E_PPS_OUT,
|
|
//Combinations that are possible in UI, but no device supports
|
|
//30487: also clean up available selections in TSD
|
|
/*ClockSyncProfile.Auto_E2E,
|
|
ClockSyncProfile.Slave_E2E_Master_E2E_OUT,
|
|
ClockSyncProfile.Slave_E2E_Master_E2E_PPS_OUT,*/
|
|
};
|
|
public static readonly ClockSyncProfile[] OnePPSOutProfiles = { ClockSyncProfile.Slave_E2E_PPS_OUT,
|
|
ClockSyncProfile.Master_E2E_PPS_OUT,
|
|
ClockSyncProfile.IRIG_Master_E2E_PPS_OUT,
|
|
ClockSyncProfile.IRIG_PPS_OUT,
|
|
//Combinations that are possible in UI, but no device supports
|
|
ClockSyncProfile.PPS_OUT,
|
|
ClockSyncProfile.GPS_PPS_OUT,
|
|
ClockSyncProfile.GPS_Master_E2E_PPS_OUT,
|
|
ClockSyncProfile.GPS_EXT_PPS_PPS_OUT,
|
|
ClockSyncProfile.GPS_EXT_PPS_Master_E2E_PPS_OUT,
|
|
ClockSyncProfile.EXT_PPS_PPS_OUT,
|
|
ClockSyncProfile.EXT_PPS_Master_E2E_PPS_OUT,
|
|
ClockSyncProfile.IRIG_EXT_PPS_PPS_OUT,
|
|
ClockSyncProfile.IRIG_EXT_PPS_Master_E2E_PPS_OUT,
|
|
ClockSyncProfile.Slave_E2E_Master_E2E_PPS_OUT,
|
|
};
|
|
/// <summary>
|
|
/// FB15520 Restrict Recording Mode Test Setup Default selections to non-streaming
|
|
/// FB39190 Also restrict multiple-event variants of regular modes
|
|
/// FB39189 Add scheduled
|
|
/// </summary>
|
|
public static readonly RecordingModes[] NonStreamingRecordingModes = { RecordingModes.CircularBuffer, RecordingModes.CircularBufferPlusUART, RecordingModes.CircularBufferAndStreamSubSample,
|
|
RecordingModes.Recorder, RecordingModes.RecorderPlusUART, RecordingModes.RecorderAndStreamSubSample,
|
|
RecordingModes.HybridRecorder, RecordingModes.HybridAndStream, RecordingModes.ContinuousRecorder, RecordingModes.ContinuousRecorderPlusUART,
|
|
RecordingModes.RAMActive, RecordingModes.RecordOnBoot, RecordingModes.RecordOnBootPlusUART,
|
|
RecordingModes.Active, RecordingModes.Scheduled
|
|
};
|
|
/// <summary>
|
|
/// 17650 sanitize name output for certain exports
|
|
/// </summary>
|
|
public static readonly Dictionary<string, string> ExportNameFilters = new Dictionary<string, string> { { "(Voltage)", "Voltage" }, { "(Current)", "Current" } };
|
|
|
|
public const string DUMMY_MOD_DESCRIP_S6DB = "slice6db module";
|
|
public const string DUMMY_MOD_DESCRIP_POWERPRO = "powerpro module";
|
|
public const uint MaxAAFilterRateHz = 200000;
|
|
|
|
public const int PSD_DEFAULT_MAX_POW10 = 0;
|
|
public const int PSD_DEFAULT_MIN_POW10 = -12;
|
|
public const string ISOTestInfo = "_";
|
|
|
|
/// <summary>
|
|
/// 18361 NMEA data exports
|
|
/// 28173 NMEA additional data
|
|
/// </summary>
|
|
public const string NMEA_GPRMC_HEADER = "$GPRMC";
|
|
public const int NMEA_GPRMC_TIME_POSN = 1;
|
|
public const int NMEA_GPRMC_VALID_POSN= 2;
|
|
public const int NMEA_GPRMC_LAT_POSN = 3;
|
|
public const int NMEA_GPRMC_LAT_LEN = 9;
|
|
public const int NMEA_GPRMC_LATD_POSN = 4;
|
|
public const int NMEA_GPRMC_LONG_POSN = 5;
|
|
public const int NMEA_GPRMC_LONG_LEN = 10;
|
|
public const int NMEA_GPRMC_LONGD_POSN= 6;
|
|
public const int NMEA_GPRMC_VELO_POSN = 7;
|
|
public const int NMEA_GPRMC_DIR_POSN = 8;
|
|
public const int NMEA_GPRMC_DATE_POSN = 9;
|
|
public const string NMEA_GPGGA_HEADER = "$GPGGA";
|
|
public const int NMEA_GPGGA_TIME_POSN = 1;
|
|
public const int NMEA_GPGGA_VALID_POSN= 6;
|
|
public const int NMEA_GPGGA_ALT_POSN = 9;
|
|
public const int NMEA_GPGGA_ALTU_POSN = 10;
|
|
|
|
public const int ROITables_DB_VERSION = 92;
|
|
public const int EnableRepeat_DB_VERSION = 92;
|
|
public const int IgnoreShorted_DB_VERSION = 92;
|
|
public const int ONEPPS_OUT_DB_VERSION = 92;
|
|
public const int UNIX_EPOCH_TIME = 93;
|
|
//http://manuscript.dts.local/f/cases/29987/Add-CG-DP-TMATS-interval-UI-support
|
|
public const int TMATS_INTERVAL_VERSION = 93;
|
|
//FB 29978 Allowed directory & file name in Windows
|
|
public const int ALLOWED_DOWNLOAD_FILE_LENGTH = 260;
|
|
public const int ALLOWED_DOWNLOAD_DIRECTORY_LENGTH = 248;
|
|
public const int ADC_TO_UART_DB_VERSION = 93;
|
|
public const int SLICE6AIR_BR_DB_VERSION = 95;
|
|
public const int PTP_DOMAIN_ID_DB_VERSION = 95;
|
|
public const int BULK_GROUPCHANNELSETTINGS_GET_DB_VERSION = 95;
|
|
// 35514 Multiple-event UART support
|
|
public const int MULTIPLE_EVENT_UART_DB_VERSION = 96;
|
|
public const int RECORD_ON_BOOT_VERSION = 96;
|
|
/// <summary>
|
|
/// 38048 maximum points for a Viewer graph
|
|
/// </summary>
|
|
public const int MAX_VIEWER_POINTS = 45000000;
|
|
}
|
|
}
|