init
This commit is contained in:
285
Common/DTS.Common/Constant/Constants.cs
Normal file
285
Common/DTS.Common/Constant/Constants.cs
Normal file
@@ -0,0 +1,285 @@
|
||||
using System.Collections.Generic;
|
||||
using DTS.Common.Enums;
|
||||
using DTS.Common.Enums.DASFactory;
|
||||
using DTS.Common.SharedResource.Strings;
|
||||
|
||||
namespace DTS.Common
|
||||
{
|
||||
public static class Constants
|
||||
{
|
||||
public const int GETARMSTATUS_TIMEOUT = 30000;
|
||||
public static readonly string[] ACCELERATION_UNITS = new[] { "g", "msec", "m/sec", "m/sec^2", "m/s^2" };
|
||||
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>
|
||||
/// Senstivity change tolerance percent default value
|
||||
/// </summary>
|
||||
public const double SENSITIVITY_CHANGE_TOLERANCE_PERCENT_DEFAULT = 5D;
|
||||
/// <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 CHANNEL_FILE_EXTENSION = ".chn";
|
||||
public const string BINARY_FILE_EXTENSION = ".bin";
|
||||
public const string BINARY = "Binary";
|
||||
public const string ALL = "ALL";
|
||||
public const string CURRENT_SUFFIX = "_CU";
|
||||
public const string MESSAGEBOXBUTTON_OK = "MessageBoxButton_OK";
|
||||
/// <summary>
|
||||
/// This is the string _ROI_PERIOD - I'm using it when calculating extra space that might be needed
|
||||
/// for downloading when you have multiple ROI
|
||||
/// </summary>
|
||||
public const string ROI_PERIOD = "_ROI Period";
|
||||
public const string UseMeasuredExcitation = "UseMeasuredExcitation";
|
||||
public const int TRACK_ANALOG_DIAGNOSTICS_DB_VERSION = 98;
|
||||
// http://manuscript.dts.local/f/cases/39470/Add-UI-for-configurable-option-to-allow-UDP-aligning-to-PPS
|
||||
public const int ALIGNUDPTOPPS_DB_VERSION = 98;
|
||||
public const string TrackAnalogDiagnostics = "TrackAnalogDiagnostics";
|
||||
public const string SensorAssembly = "SensorAssembly";
|
||||
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;
|
||||
public const int TSRAIR_GO_VERSION = 97;
|
||||
public const int ROIPERIODCHANNELS_CHANNELID_DB_VERSION = 98;
|
||||
public const int SENSOR_ASSEMBLY_DB_VERSION = 98;
|
||||
public const int ALLOW_INSPECT_BEFORE_USE_DB_VERSION = 98;
|
||||
public const int SLICE_TC_DB_VERSION = 99;
|
||||
public const int SLICE_PRO_CAN_FD_DB_VERSION = 100;
|
||||
/// <summary>
|
||||
/// 38048 maximum points for a Viewer graph
|
||||
/// </summary>
|
||||
public const int MAX_VIEWER_POINTS = 45000000;
|
||||
|
||||
public const double LOWEST_NONZERO_TSR_AIR_PRETRIGGER_SECONDS = 0.0128D;
|
||||
private static string scheduleStartTimeError = string.Format(StringResources.EditTestSetupPage_ScheduleMustBeInFuture, DFConstantsAndEnums.SCHEDULE_AHEAD_IN_MINUTES);
|
||||
public static string ScheduleStartTimeError
|
||||
{
|
||||
get => scheduleStartTimeError;
|
||||
}
|
||||
private static string intervalError = string.Format(StringResources.EditTestSetupPage_EventLengthTooLong, DFConstantsAndEnums.TIME_TO_REARM_SECONDS);
|
||||
public static string IntervalError
|
||||
{
|
||||
get => intervalError;
|
||||
}
|
||||
|
||||
//FB 44523 Define the min & max font size for Top-Level navigation Tabs and Page Buttons
|
||||
public const int TabAndPageButtonsFontSizeMin = 12;
|
||||
public const int TabAndPageButtonsFontSizeMax = 32;
|
||||
}
|
||||
}
|
||||
20
Common/DTS.Common/Constant/DASSpecific/PowerPRO.cs
Normal file
20
Common/DTS.Common/Constant/DASSpecific/PowerPRO.cs
Normal file
@@ -0,0 +1,20 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace DTS.Common.Constant.DASSpecific
|
||||
{
|
||||
public class PowerPRO
|
||||
{
|
||||
public const uint MaxAAFilterRateHz = 20000;
|
||||
|
||||
public const byte MIN_PROTOCOL_VER = 1;
|
||||
public const byte DIAGNOS_SHUNT_DAC = 2;
|
||||
// 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_MEASUREPOWERPROALLDIAGNOSTICCHANNEL = 12;
|
||||
}
|
||||
}
|
||||
13
Common/DTS.Common/Constant/DASSpecific/SLICE.cs
Normal file
13
Common/DTS.Common/Constant/DASSpecific/SLICE.cs
Normal file
@@ -0,0 +1,13 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace DTS.Common.Constant.DASSpecific
|
||||
{
|
||||
public class SLICE
|
||||
{
|
||||
public const uint MaxAAFilterRateHz = 30000;
|
||||
}
|
||||
}
|
||||
35
Common/DTS.Common/Constant/DASSpecific/SLICE1_5.cs
Normal file
35
Common/DTS.Common/Constant/DASSpecific/SLICE1_5.cs
Normal file
@@ -0,0 +1,35 @@
|
||||
using DTS.Common.Enums;
|
||||
|
||||
namespace DTS.Common.Constant.DASSpecific
|
||||
{
|
||||
public class SLICE1_5
|
||||
{
|
||||
public const uint MaxAAFilterRateHz = 40000;
|
||||
|
||||
public const byte MIN_PROTOCOL_VER = 1;
|
||||
public const int QUERY_ARM_AND_TRIGGER_STATUS_TIME_LEFT_IN_ARM = 2;
|
||||
public const int IGNORE_SHORTED_START_EVENT = 4;
|
||||
public const int START_REC_DELAY_IN_SECOND = 5;
|
||||
public const int MEASURE_INTERNAL_OFFSET = 6;
|
||||
public const int START_REALTIME_STREAM = 7;
|
||||
public const int BASE_PLUS_MIN_MULTIEVENT_HYBRID_PROTOCOL = 8;
|
||||
|
||||
public static bool IsRecordingModeSupported(RecordingModes mode, int protocolVersion)
|
||||
{
|
||||
switch (mode)
|
||||
{
|
||||
case RecordingModes.CircularBuffer:
|
||||
case RecordingModes.Recorder:
|
||||
case RecordingModes.MultipleEventCircularBuffer:
|
||||
case RecordingModes.MultipleEventRecorder:
|
||||
case RecordingModes.HybridRecorder:
|
||||
case RecordingModes.ContinuousRecorder:
|
||||
return true;
|
||||
case RecordingModes.MultipleEventHybridRecorder:
|
||||
return protocolVersion >= BASE_PLUS_MIN_MULTIEVENT_HYBRID_PROTOCOL;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
31
Common/DTS.Common/Constant/DASSpecific/SLICE2.cs
Normal file
31
Common/DTS.Common/Constant/DASSpecific/SLICE2.cs
Normal file
@@ -0,0 +1,31 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace DTS.Common.Constant.DASSpecific
|
||||
{
|
||||
public class SLICE2
|
||||
{
|
||||
public const uint MaxAAFilterRateHz = 200000;
|
||||
|
||||
public const int SLICE1_5_BASETYPE = 2;
|
||||
public const int SLICEPRO_DIM_BASETYPE = 3;
|
||||
public const int SLICEPRO_TOM_BASETYPE = 5;
|
||||
public const byte MIN_PROTOCOL_VER = 128;
|
||||
public const int FILE_DATA = 133;
|
||||
public const int MULTIPLE_EVENTS = 134;
|
||||
public const int STACK_SENSORS = 136;
|
||||
public const int STACK_FIRMWARE_UPDATE = 137;
|
||||
public const int DIAGNOSTIC_TWO_VOLT_EXCITATION = 138;
|
||||
public const int QUERY_ARM_AND_TRIGGER_STATUS_TIME_LEFT_IN_ARM = 139;
|
||||
public const byte MIN_PROTOCOL_VER_GEN3 = 140;
|
||||
public const int SLICE2_ONE_WIRE_ID = 142;
|
||||
public const int EVENT_ARM_ATTEMPTS = 145;
|
||||
public const int MEASURE_INTERNAL_OFFSET = 149;
|
||||
public const int START_REC_DELAY_IN_SECONDS = 150;
|
||||
public const int START_REALTIME_STREAM = 152;
|
||||
public const int HALF_BRIDGE_SIG_PLUS_SUPPORT = 154;
|
||||
}
|
||||
}
|
||||
35
Common/DTS.Common/Constant/DASSpecific/SLICE2_TOM.cs
Normal file
35
Common/DTS.Common/Constant/DASSpecific/SLICE2_TOM.cs
Normal file
@@ -0,0 +1,35 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using DTS.Common.Enums;
|
||||
|
||||
namespace DTS.Common.Constant.DASSpecific
|
||||
{
|
||||
public class SLICE2_TOM
|
||||
{
|
||||
public static bool IsRecordingModeSupported(RecordingModes mode, int protocolVersion)
|
||||
{
|
||||
var result = false;
|
||||
|
||||
switch (mode)
|
||||
{
|
||||
case RecordingModes.CircularBuffer:
|
||||
case RecordingModes.MultipleEventCircularBuffer:
|
||||
case RecordingModes.Recorder:
|
||||
case RecordingModes.MultipleEventRecorder:
|
||||
case RecordingModes.HybridRecorder:
|
||||
case RecordingModes.MultipleEventHybridRecorder:
|
||||
case RecordingModes.ContinuousRecorder:
|
||||
result = true;
|
||||
break;
|
||||
default:
|
||||
result = false;
|
||||
break;
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
}
|
||||
}
|
||||
72
Common/DTS.Common/Constant/DASSpecific/SLICE6.cs
Normal file
72
Common/DTS.Common/Constant/DASSpecific/SLICE6.cs
Normal file
@@ -0,0 +1,72 @@
|
||||
using DTS.Common.Enums;
|
||||
|
||||
namespace DTS.Common.Constant.DASSpecific
|
||||
{
|
||||
public class SLICE6
|
||||
{
|
||||
public const uint MaxAAFilterRateHz = 20000;
|
||||
|
||||
public const int MIN_PROTOCOL_VER = 1;
|
||||
public const int DIAGNOS_SHUNT_DAC = 2;
|
||||
public const int START_REC_DELAY_IN_SECONDS = 3;
|
||||
public const int IN_SLICE_TILT_SENSOR_ADC_PRE = 4;
|
||||
public const int STACK_SENSORS = 5;
|
||||
public const int START_REALTIME_STREAM = 11;
|
||||
public const int UDP_REALTIME_STREAM = 14;
|
||||
// Profiles as detailed in 29378
|
||||
public const int CLOCKSYNCPROFILE = 21;
|
||||
// minimum protocol version for PTP Domain ID per 30472
|
||||
public const int PTP_DOMAIN_ID_VER = 21;
|
||||
|
||||
public static bool IsRecordingModeSupported(RecordingModes mode, int protocolVersion)
|
||||
{
|
||||
switch (mode)
|
||||
{
|
||||
case RecordingModes.CircularBuffer:
|
||||
case RecordingModes.Recorder:
|
||||
case RecordingModes.MultipleEventCircularBuffer:
|
||||
case RecordingModes.MultipleEventRecorder:
|
||||
case RecordingModes.HybridRecorder:
|
||||
case RecordingModes.MultipleEventHybridRecorder:
|
||||
case RecordingModes.ContinuousRecorder:
|
||||
case RecordingModes.MultipleEventRAMActive:
|
||||
case RecordingModes.RAMActive:
|
||||
return true;
|
||||
//RecordingModes.S6A_DeviceStreamingOnly:
|
||||
//note: per Loc, S6 only supports udp streams in realtime, *not* as a streaming test mode (i.e. boot-and-stream)
|
||||
//result = protocolVersion >= UDP_REALTIME_STREAM;
|
||||
//break;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
public static bool IsStreamingProfileSupported(UDPStreamProfile profile, int protocolVersion)
|
||||
{
|
||||
switch (profile)
|
||||
{
|
||||
//note: per Loc, S6 only supports these in realtime, *not* as a streaming test mode (i.e. boot-and-stream)
|
||||
case UDPStreamProfile.RTCStreaming:
|
||||
case UDPStreamProfile.DTS_UDP:
|
||||
return true;
|
||||
default: return false;
|
||||
}
|
||||
}
|
||||
|
||||
public static bool IsClockSyncProfileSupported(ClockSyncProfile profile, int protocolVersion)
|
||||
{
|
||||
switch (profile)
|
||||
{
|
||||
case ClockSyncProfile.None:
|
||||
return true;
|
||||
case ClockSyncProfile.Manual:
|
||||
//per LP there should be no max protocol version for manual, just any protocol version > 1
|
||||
//http://manuscript.dts.local/f/cases/41798/Clock-slave-output-clock-type-setting-preventing-from-setting-clock-sync-in-manual-mode
|
||||
return protocolVersion > 1;
|
||||
case ClockSyncProfile.Slave_E2E:
|
||||
return protocolVersion >= CLOCKSYNCPROFILE;
|
||||
default: return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
245
Common/DTS.Common/Constant/DASSpecific/SLICE6AIR.cs
Normal file
245
Common/DTS.Common/Constant/DASSpecific/SLICE6AIR.cs
Normal file
@@ -0,0 +1,245 @@
|
||||
using DTS.Common.Enums;
|
||||
using DTS.Common.Enums.DASFactory;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace DTS.Common.Constant.DASSpecific
|
||||
{
|
||||
public class SLICE6AIR
|
||||
{
|
||||
public const uint IENA_PTYPE_STREAM_MIN_PROTOCOL = 39;
|
||||
public const uint UART_STREAM_MIN_PROTOCOL = 41;
|
||||
public const uint MaxAAFilterRateHz = 50000;
|
||||
public const uint MaxSampleRateHz = 400000;
|
||||
public const uint MaxSampleRateHz_OBRDDR = uint.MaxValue;
|
||||
public const uint UARTBitsPerSample = 96;
|
||||
|
||||
public const int MIN_PROTOCOL_VER = 1;
|
||||
public const int UDP_REALTIME_STREAM = MIN_PROTOCOL_VER;
|
||||
public const int SET_DSP_FILTER_SETTINGS = 28;
|
||||
public const int RECORD_AND_STREAM_SUBSAMPLE = 29;
|
||||
public const int UART_MULTIPLE_EVENT_MIN_PROTOCOL = 45;
|
||||
public const int RECORD_ON_BOOT_PROTOCOL = 46;
|
||||
public const int RECORD_ON_BOOT_PROTOCOL_S6A_ETHERNETRECORDER = 7;
|
||||
//http://manuscript.dts.local/f/cases/34261/FW-Implement-ContinuousRecorderMode-for-SLICE6-AIR-ST-ethernet-recorder#BugEvent.219995
|
||||
public const int CONTINUOUS_MODE_PROTOCOL_S6A_EDR = 5;
|
||||
//43618 Allow EDRs to record from a list of UDP Addresses.
|
||||
public const int MULTIPLE_UDP_ADDRESSES_S6A_ETHERNETRECORDER = 7;
|
||||
|
||||
public const int AUTOARM_RECORD_DELAY_PROTOCOL = 51;
|
||||
public const int AUTOARM_RECORD_DELAY_PROTOCOL_S6A_ETHERNETRECORDER = 6;
|
||||
public const int UDPALIGNONPPS_PROTOCOL = 49;
|
||||
/// <summary>
|
||||
/// protocol version that UART channel streaming was added
|
||||
/// http://manuscript.dts.local/f/cases/43623/SW-Implement-Sample-Per-Packet-setting-per-DAS-in-DataPRO
|
||||
/// </summary>
|
||||
public const int UART_CHANNEL_STREAMING = 53;
|
||||
/// <summary>
|
||||
/// minimum protocol version that S6A supports removing leap seconds
|
||||
/// http://manuscript.dts.local/f/cases/31747/Add-support-for-GPS-Time-leap-seconds
|
||||
/// </summary>
|
||||
public const int REMOVE_LEAP_SECONDS_VER = 42;
|
||||
/// <summary>
|
||||
/// minimum protocol version that S6A supports setting min packets per sample
|
||||
/// http://manuscript.dts.local/f/cases/31754/expose-number-of-ADC-samples-in-UDP-packet
|
||||
/// </summary>
|
||||
public const int ADC_SAMPLES_PER_PACKET_VER = 43;
|
||||
//minimum protocol version for attribute per Manuscript 18294
|
||||
public const int AC_COUPLER_ENABLE = 36;
|
||||
// minimum protocol version for PPS OUT clock types per Manuscript 29842
|
||||
public const int PPS_OUT_CLOCKS = 39;
|
||||
public static bool IsRecordingModeSupported_S6AIR(RecordingModes mode, int protocolVersion)
|
||||
{
|
||||
//43626 Since S6A_EthernetRecorder is really a SLICE6_AIR with different firmware
|
||||
//we use this SLICE6AIR class to avoid creating a new class for only a few features.
|
||||
switch (mode)
|
||||
{
|
||||
case RecordingModes.CircularBuffer:
|
||||
case RecordingModes.Recorder:
|
||||
case RecordingModes.MultipleEventCircularBuffer:
|
||||
case RecordingModes.MultipleEventRecorder:
|
||||
case RecordingModes.HybridRecorder:
|
||||
case RecordingModes.MultipleEventHybridRecorder:
|
||||
case RecordingModes.ContinuousRecorder:
|
||||
case RecordingModes.CircularBufferPlusUART:
|
||||
case RecordingModes.RecorderPlusUART:
|
||||
case RecordingModes.MultipleEventRAMActive:
|
||||
case RecordingModes.RAMActive:
|
||||
return true;
|
||||
case RecordingModes.MultipleEventCircularBufferAndStream:
|
||||
case RecordingModes.MultipleEventRecorderAndStream:
|
||||
case RecordingModes.CircularBufferAndStreamSubSample:
|
||||
case RecordingModes.HybridAndStream:
|
||||
case RecordingModes.MultipleEventHybridAndStream:
|
||||
case RecordingModes.RecorderAndStreamSubSample:
|
||||
return protocolVersion >= RECORD_AND_STREAM_SUBSAMPLE;
|
||||
case RecordingModes.S6A_DeviceStreamingOnly:
|
||||
return protocolVersion >= UDP_REALTIME_STREAM;
|
||||
case RecordingModes.ContinuousRecorderPlusUART:
|
||||
case RecordingModes.MultipleEventCircularBufferPlusUART:
|
||||
case RecordingModes.MultipleEventRecorderPlusUART:
|
||||
return protocolVersion >= UART_MULTIPLE_EVENT_MIN_PROTOCOL;
|
||||
case RecordingModes.RecordOnBoot:
|
||||
case RecordingModes.RecordOnBootPlusUART:
|
||||
return protocolVersion >= RECORD_ON_BOOT_PROTOCOL;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns True if UART channel streaming is supported on S6A device
|
||||
/// </summary>
|
||||
/// <param name="protocolVersion"></param>
|
||||
/// <returns></returns>
|
||||
public static bool IsUARTChannelStreamingSupported(int protocolVersion)
|
||||
{
|
||||
return protocolVersion >= UART_CHANNEL_STREAMING;
|
||||
}
|
||||
public static bool IsRecordingModeSupported_S6EDR(RecordingModes mode, int protocolVersion)
|
||||
{
|
||||
//43626 Since S6A_EthernetRecorder is really a SLICE6_AIR with different firmware
|
||||
//we use this SLICE6AIR class to avoid creating a new class for only a few features.
|
||||
switch (mode)
|
||||
{
|
||||
case RecordingModes.CircularBuffer:
|
||||
case RecordingModes.Recorder:
|
||||
case RecordingModes.MultipleEventCircularBuffer:
|
||||
case RecordingModes.MultipleEventRecorder:
|
||||
return true;
|
||||
case RecordingModes.RecordOnBoot:
|
||||
return protocolVersion >= RECORD_ON_BOOT_PROTOCOL_S6A_ETHERNETRECORDER;
|
||||
case RecordingModes.ContinuousRecorder:
|
||||
return protocolVersion >= CONTINUOUS_MODE_PROTOCOL_S6A_EDR;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
public static bool IsStreamingProfileSupported(UDPStreamProfile profile, int protocolVersion)
|
||||
{
|
||||
switch (profile)
|
||||
{
|
||||
case UDPStreamProfile.RTCStreaming:
|
||||
case UDPStreamProfile.DTS_UDP:
|
||||
case UDPStreamProfile.CH10_MANUAL_CONFIG:
|
||||
case UDPStreamProfile.CH10_PCM128_MM:
|
||||
case UDPStreamProfile.CH10_ANALOG:
|
||||
case UDPStreamProfile.CH10_PCM_STANDARD:
|
||||
case UDPStreamProfile.CH10_PCM_SUPERCOM:
|
||||
case UDPStreamProfile.CH10_PCM_128BIT_2HDR:
|
||||
case UDPStreamProfile.CH10_ANALOG_2HDR:
|
||||
case UDPStreamProfile.CH10_PCM_STANDARD_2HDR:
|
||||
case UDPStreamProfile.CH10_PCM_SUPERCOM_2HDR:
|
||||
case UDPStreamProfile.TMNS_PCM_STANDARD:
|
||||
case UDPStreamProfile.TMNS_PCM_SUPERCOM:
|
||||
return true;
|
||||
case UDPStreamProfile.IENA_PTYPE_STREAM:
|
||||
return protocolVersion >= IENA_PTYPE_STREAM_MIN_PROTOCOL;
|
||||
case UDPStreamProfile.UART_STREAM:
|
||||
return protocolVersion >= UART_STREAM_MIN_PROTOCOL;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
public static bool IsClockSyncProfileSupported(ClockSyncProfile profile, int protocolVersion)
|
||||
{
|
||||
switch (profile)
|
||||
{
|
||||
case ClockSyncProfile.PPS_OUT:
|
||||
case ClockSyncProfile.GPS_EXT_PPS_PPS_OUT:
|
||||
case ClockSyncProfile.GPS_EXT_PPS_Master_E2E_PPS_OUT:
|
||||
case ClockSyncProfile.IRIG_EXT_PPS_PPS_OUT:
|
||||
case ClockSyncProfile.IRIG_EXT_PPS_Master_E2E_PPS_OUT:
|
||||
case ClockSyncProfile.EXT_PPS_PPS_OUT:
|
||||
case ClockSyncProfile.EXT_PPS_Master_E2E_PPS_OUT:
|
||||
case ClockSyncProfile.Slave_E2E_Master_E2E_OUT:
|
||||
case ClockSyncProfile.Slave_E2E_Master_E2E_PPS_OUT:
|
||||
case ClockSyncProfile.Manual:
|
||||
//30487: GPS only clock sync option should be removed
|
||||
case ClockSyncProfile.GPS:
|
||||
case ClockSyncProfile.Master_E2E_GPS:
|
||||
case ClockSyncProfile.GPS_PPS_OUT:
|
||||
case ClockSyncProfile.GPS_Master_E2E_PPS_OUT:
|
||||
return false;
|
||||
case ClockSyncProfile.Slave_E2E_PPS_OUT:
|
||||
case ClockSyncProfile.Master_E2E_PPS_OUT:
|
||||
case ClockSyncProfile.IRIG_Master_E2E_PPS_OUT:
|
||||
case ClockSyncProfile.IRIG_PPS_OUT:
|
||||
return protocolVersion >= PPS_OUT_CLOCKS;
|
||||
default: return true;
|
||||
}
|
||||
}
|
||||
|
||||
// 39151 preliminary guesses via this and 15323, to be tested and filled in by 39201
|
||||
private static Dictionary<UartBaudRate, uint> MaxSampleRateHz_UART = new Dictionary<UartBaudRate, uint>()
|
||||
{
|
||||
[UartBaudRate._110] = 30000,
|
||||
[UartBaudRate._300] = 30000,
|
||||
[UartBaudRate._600] = 30000,
|
||||
[UartBaudRate._1200] = 30000,
|
||||
[UartBaudRate._2400] = 30000,
|
||||
[UartBaudRate._4800] = 30000,
|
||||
[UartBaudRate._9600] = 30000,
|
||||
[UartBaudRate._14400] = 10000,
|
||||
[UartBaudRate._19200] = 10000,
|
||||
[UartBaudRate._38400] = 10000,
|
||||
[UartBaudRate._57600] = 10000,
|
||||
[UartBaudRate._115200] = 10000,
|
||||
[UartBaudRate._230400] = 10000,
|
||||
[UartBaudRate._460800] = 10000,
|
||||
[UartBaudRate._921600] = 10000
|
||||
};
|
||||
|
||||
public static uint MaxSampleRateHzForRecordingMode(RecordingModes mode, bool isEthernetRecorder, int protocolVersion = 1, uint baudRate = 0)
|
||||
{
|
||||
//39151
|
||||
if (isEthernetRecorder) { return MaxSampleRateHz_OBRDDR; }
|
||||
// if we're not using a UART recording mode or we're not streaming to UART, return the model's Max Sample Rate
|
||||
if (!RecordingModeExtensions.IsAUartMode(mode) && !(RecordingModeExtensions.IsAStreamMode(mode) && baudRate != 0)) { return MaxSampleRateHz; }
|
||||
//33198
|
||||
if (RecordingModeExtensions.IsAStreamMode(mode))
|
||||
{
|
||||
//39224 Per LP, UART baud rate should be twice ADC bit rate
|
||||
// ex: 19200bps / (96bpsam * 2) = 100 sps max
|
||||
return baudRate / (UARTBitsPerSample * 2);
|
||||
}
|
||||
|
||||
//Per LP, sample rate limit is a function of baud rate:
|
||||
//30kHz rate from FB15323 was tested at <=9600bps GPS testing, 10kHz rate limit from this issue was found during 921kbps testing other rates
|
||||
switch (baudRate)
|
||||
{
|
||||
case var n when n >= (uint)UartBaudRate._921600:
|
||||
return MaxSampleRateHz_UART[UartBaudRate._921600];
|
||||
case var n when n >= (uint)UartBaudRate._460800:
|
||||
return MaxSampleRateHz_UART[UartBaudRate._460800];
|
||||
case var n when n >= (uint)UartBaudRate._230400:
|
||||
return MaxSampleRateHz_UART[UartBaudRate._230400];
|
||||
case var n when n >= (uint)UartBaudRate._115200:
|
||||
return MaxSampleRateHz_UART[UartBaudRate._115200];
|
||||
case var n when n >= (uint)UartBaudRate._57600:
|
||||
return MaxSampleRateHz_UART[UartBaudRate._57600];
|
||||
case var n when n >= (uint)UartBaudRate._38400:
|
||||
return MaxSampleRateHz_UART[UartBaudRate._38400];
|
||||
case var n when n >= (uint)UartBaudRate._19200:
|
||||
return MaxSampleRateHz_UART[UartBaudRate._19200];
|
||||
case var n when n >= (uint)UartBaudRate._14400:
|
||||
return MaxSampleRateHz_UART[UartBaudRate._14400];
|
||||
case var n when n >= (uint)UartBaudRate._9600:
|
||||
return MaxSampleRateHz_UART[UartBaudRate._9600];
|
||||
case var n when n >= (uint)UartBaudRate._4800:
|
||||
return MaxSampleRateHz_UART[UartBaudRate._4800];
|
||||
case var n when n >= (uint)UartBaudRate._2400:
|
||||
return MaxSampleRateHz_UART[UartBaudRate._2400];
|
||||
case var n when n >= (uint)UartBaudRate._1200:
|
||||
return MaxSampleRateHz_UART[UartBaudRate._1200];
|
||||
case var n when n >= (uint)UartBaudRate._600:
|
||||
return MaxSampleRateHz_UART[UartBaudRate._600];
|
||||
case var n when n >= (uint)UartBaudRate._300:
|
||||
return MaxSampleRateHz_UART[UartBaudRate._300];
|
||||
default:
|
||||
return MaxSampleRateHz_UART[UartBaudRate._110];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
73
Common/DTS.Common/Constant/DASSpecific/SLICE6AIRBR.cs
Normal file
73
Common/DTS.Common/Constant/DASSpecific/SLICE6AIRBR.cs
Normal file
@@ -0,0 +1,73 @@
|
||||
using DTS.Common.Enums;
|
||||
|
||||
namespace DTS.Common.Constant.DASSpecific
|
||||
{
|
||||
public class SLICE6AIRBR
|
||||
{
|
||||
public const int MIN_PROTOCOL_VER = 1;
|
||||
public const int ADC_SAMPLES_PER_PACKET_VER = 47;
|
||||
public const int UDPALIGNONPPS_PROTOCOL = 51;
|
||||
public const uint MaxAAFilterRateHz = 50000;
|
||||
public static bool IsRecordingModeSupported(RecordingModes mode, int protocolVersion)
|
||||
{
|
||||
switch (mode)
|
||||
{
|
||||
case RecordingModes.CircularBuffer:
|
||||
case RecordingModes.Recorder:
|
||||
case RecordingModes.MultipleEventCircularBuffer:
|
||||
case RecordingModes.MultipleEventRecorder:
|
||||
case RecordingModes.HybridRecorder:
|
||||
case RecordingModes.MultipleEventHybridRecorder:
|
||||
case RecordingModes.ContinuousRecorder:
|
||||
case RecordingModes.S6A_DeviceStreamingOnly:
|
||||
case RecordingModes.RAMActive:
|
||||
case RecordingModes.MultipleEventRAMActive:
|
||||
case RecordingModes.RecorderAndStreamSubSample:
|
||||
case RecordingModes.MultipleEventRecorderAndStream:
|
||||
case RecordingModes.CircularBufferAndStreamSubSample:
|
||||
case RecordingModes.MultipleEventCircularBufferAndStream:
|
||||
case RecordingModes.RecordOnBoot:
|
||||
case RecordingModes.RecordOnBootPlusUART:
|
||||
case RecordingModes.HybridAndStream:
|
||||
return true;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
public static bool IsStreamingProfileSupported(UDPStreamProfile profile, int protocolVersion)
|
||||
{
|
||||
switch (profile)
|
||||
{
|
||||
case UDPStreamProfile.RTCStreaming:
|
||||
case UDPStreamProfile.DTS_UDP:
|
||||
case UDPStreamProfile.CH10_MANUAL_CONFIG:
|
||||
case UDPStreamProfile.CH10_PCM128_MM:
|
||||
case UDPStreamProfile.CH10_ANALOG:
|
||||
case UDPStreamProfile.CH10_PCM_STANDARD:
|
||||
case UDPStreamProfile.CH10_PCM_SUPERCOM:
|
||||
case UDPStreamProfile.CH10_PCM_128BIT_2HDR:
|
||||
case UDPStreamProfile.CH10_ANALOG_2HDR:
|
||||
case UDPStreamProfile.CH10_PCM_STANDARD_2HDR:
|
||||
case UDPStreamProfile.CH10_PCM_SUPERCOM_2HDR:
|
||||
case UDPStreamProfile.TMNS_PCM_STANDARD:
|
||||
case UDPStreamProfile.TMNS_PCM_SUPERCOM:
|
||||
case UDPStreamProfile.IENA_PTYPE_STREAM:
|
||||
return true;
|
||||
default: return false;
|
||||
}
|
||||
}
|
||||
|
||||
public static bool IsClockSyncProfileSupported(ClockSyncProfile profile, int protocolVersion)
|
||||
{
|
||||
switch (profile)
|
||||
{
|
||||
case ClockSyncProfile.None:
|
||||
case ClockSyncProfile.Master_E2E:
|
||||
case ClockSyncProfile.Slave_E2E:
|
||||
return true;
|
||||
default: return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
75
Common/DTS.Common/Constant/DASSpecific/SLICE6AIRTC.cs
Normal file
75
Common/DTS.Common/Constant/DASSpecific/SLICE6AIRTC.cs
Normal file
@@ -0,0 +1,75 @@
|
||||
using DTS.Common.Enums;
|
||||
using static DTS.Common.Enums.DASFactory.DFConstantsAndEnums;
|
||||
|
||||
namespace DTS.Common.Constant.DASSpecific
|
||||
{
|
||||
#pragma warning disable S101 // Types should be named in PascalCase
|
||||
public static class SLICE6AIRTC
|
||||
#pragma warning restore S101 // Types should be named in PascalCase
|
||||
{
|
||||
public const int MIN_PROTOCOL_VER = 1;
|
||||
public const int ADC_SAMPLES_PER_PACKET_VER = 1;
|
||||
public const int MULTIPLE_CONFIGURATIONS_VER = 100;
|
||||
public const int ThermocouplersPerModule = 8;
|
||||
|
||||
public static bool IsRecordingModeSupported(RecordingModes mode)
|
||||
{
|
||||
switch (mode)
|
||||
{
|
||||
case RecordingModes.S6A_DeviceStreamingOnly:
|
||||
return true;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
}
|
||||
public static bool IsStreamingProfileSupported(UDPStreamProfile profile, int protocolVersion)
|
||||
{
|
||||
switch (profile)
|
||||
{
|
||||
case UDPStreamProfile.RTCStreaming:
|
||||
case UDPStreamProfile.DTS_UDP:
|
||||
case UDPStreamProfile.CH10_MANUAL_CONFIG:
|
||||
case UDPStreamProfile.CH10_PCM128_MM:
|
||||
case UDPStreamProfile.CH10_ANALOG:
|
||||
case UDPStreamProfile.CH10_PCM_STANDARD:
|
||||
case UDPStreamProfile.CH10_PCM_SUPERCOM:
|
||||
case UDPStreamProfile.CH10_PCM_128BIT_2HDR:
|
||||
case UDPStreamProfile.CH10_ANALOG_2HDR:
|
||||
case UDPStreamProfile.CH10_PCM_STANDARD_2HDR:
|
||||
case UDPStreamProfile.CH10_PCM_SUPERCOM_2HDR:
|
||||
case UDPStreamProfile.TMNS_PCM_STANDARD:
|
||||
case UDPStreamProfile.TMNS_PCM_SUPERCOM:
|
||||
case UDPStreamProfile.IENA_PTYPE_STREAM:
|
||||
return true;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
}
|
||||
public static bool IsClockSyncProfileSupported(ClockSyncProfile profile, int protocolVersion)
|
||||
{
|
||||
switch (profile)
|
||||
{
|
||||
case ClockSyncProfile.PPS_OUT:
|
||||
case ClockSyncProfile.GPS_EXT_PPS_PPS_OUT:
|
||||
case ClockSyncProfile.GPS_EXT_PPS_Master_E2E_PPS_OUT:
|
||||
case ClockSyncProfile.IRIG_EXT_PPS_PPS_OUT:
|
||||
case ClockSyncProfile.IRIG_EXT_PPS_Master_E2E_PPS_OUT:
|
||||
case ClockSyncProfile.EXT_PPS_PPS_OUT:
|
||||
case ClockSyncProfile.EXT_PPS_Master_E2E_PPS_OUT:
|
||||
case ClockSyncProfile.Slave_E2E_Master_E2E_OUT:
|
||||
case ClockSyncProfile.Slave_E2E_Master_E2E_PPS_OUT:
|
||||
case ClockSyncProfile.Manual:
|
||||
case ClockSyncProfile.Master_E2E_GPS:
|
||||
case ClockSyncProfile.GPS_PPS_OUT:
|
||||
case ClockSyncProfile.GPS_Master_E2E_PPS_OUT:
|
||||
return false;
|
||||
case ClockSyncProfile.GPS:
|
||||
case ClockSyncProfile.Slave_E2E_PPS_OUT:
|
||||
case ClockSyncProfile.Master_E2E_PPS_OUT:
|
||||
case ClockSyncProfile.IRIG_Master_E2E_PPS_OUT:
|
||||
case ClockSyncProfile.IRIG_PPS_OUT:
|
||||
default: return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
48
Common/DTS.Common/Constant/DASSpecific/SLICE6DB.cs
Normal file
48
Common/DTS.Common/Constant/DASSpecific/SLICE6DB.cs
Normal 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;
|
||||
}
|
||||
}
|
||||
}
|
||||
30
Common/DTS.Common/Constant/DASSpecific/SLICEDB.cs
Normal file
30
Common/DTS.Common/Constant/DASSpecific/SLICEDB.cs
Normal file
@@ -0,0 +1,30 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace DTS.Common.Constant.DASSpecific
|
||||
{
|
||||
public class SLICEDB
|
||||
{
|
||||
public const uint MaxAAFilterRateHz = 200000;
|
||||
|
||||
public const byte MIN_PROTOCOL_VER = 1;
|
||||
|
||||
public const byte MIN_PROTOCOL_ARM = 2;
|
||||
public const byte MIN_PROTOCOL_ENABLEFAULTCHECKING = MIN_PROTOCOL_ARM;
|
||||
|
||||
public const byte MIN_PROTOCOL_DIAGNOSTICS = 3;
|
||||
|
||||
public const byte MIN_PROTOCOL_ONOVERRIDE = 4;
|
||||
public const byte MIN_PROTOCOL_OMAP_GPIO = MIN_PROTOCOL_ONOVERRIDE;
|
||||
public const byte MIN_PROTOCOL_INITHARDWAREINPUTLINES = MIN_PROTOCOL_ONOVERRIDE;
|
||||
//FB 16049 Support ECM Caldate
|
||||
public const byte MIN_PROTOCOL_BASECALDATE = 5;
|
||||
// 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;
|
||||
}
|
||||
}
|
||||
66
Common/DTS.Common/Constant/DASSpecific/SliceProDB.cs
Normal file
66
Common/DTS.Common/Constant/DASSpecific/SliceProDB.cs
Normal file
@@ -0,0 +1,66 @@
|
||||
namespace DTS.Common.Constant.DASSpecific
|
||||
{
|
||||
public static class SliceProDB
|
||||
{
|
||||
/// <summary>
|
||||
/// The MINIMUM_VALID_INPUT_THRESHOLD is the minimum input reading we accept from a das, if it's below that we reject it
|
||||
/// The low value for this threshold is the minimum setting value we consider valid before we reject it and use
|
||||
/// MINIMUM_VALID_INPUT_THRESHOLD_VALUE as the default for the MINIMUM_VALID_INPUT_THRESHOLD
|
||||
/// </summary>
|
||||
public const double MINIMUM_VALID_INPUT_THRESHOLD_LOW = 30;
|
||||
/// <summary>
|
||||
/// The MINIMUM_VALID_INPUT_THRESHOLD is the minimum input reading we accept from a das, if it's below that we reject it
|
||||
/// The high value for this threshold is the max setting value we consider valid before we reject it and use
|
||||
/// MINIMUM_VALID_INPUT_THRESHOLD_VALUE as the default for the MINIMUM_VALID_INPUT_THRESHOLD
|
||||
/// </summary>
|
||||
public const double MINIMUM_VALID_INPUT_THRESHOLD_HIGH = 40;
|
||||
/// <summary>
|
||||
/// this is the default we'll use for the min valid input threshold if we reject the setting in the database
|
||||
/// </summary>
|
||||
public const double MINIMUM_VALID_INPUT_THRESHOLD_VALUE = 35;
|
||||
|
||||
/// <summary>
|
||||
/// the MAXIMIMUM_VALID_INPUT_THRESHOLD is the max input voltage reading from the DAS that we will accept, any readings above this value we
|
||||
/// reject
|
||||
/// The High value here is the maximum setting value we allow before rejecting the setting and using
|
||||
/// MAXIMUM_VALID_INPUT_THRESHOLD_VALUE as for the MAXIMUM_VALID_INPUT_THRESHOLD instead of the setting in the db
|
||||
/// </summary>
|
||||
public const double MAXIMUM_VALID_INPUT_THRESHOLD_HIGH = 60;
|
||||
/// <summary>
|
||||
/// the MAXIMIMUM_VALID_INPUT_THRESHOLD is the max input voltage reading from the DAS that we will accept, any readings above this value we
|
||||
/// reject
|
||||
/// The low value here is the min setting value we allow before rejecting the setting and using
|
||||
/// MAXIMUM_VALID_INPUT_THRESHOLD_VALUE as for the MAXIMUM_VALID_INPUT_THRESHOLD instead of the setting in the db
|
||||
/// </summary>
|
||||
public const double MAXIMUM_VALID_INPUT_THRESHOLD_LOW = 50;
|
||||
/// <summary>
|
||||
/// this is the default value for the maximum valid input threshold when resetting from what is in the database
|
||||
/// </summary>
|
||||
public const double MAXIMUM_VALID_INPUT_THRESHOLD_VALUE = 57;
|
||||
|
||||
/// <summary>
|
||||
/// this is the low value for the input low threshold before we decide the value is invalid and we use the default
|
||||
/// </summary>
|
||||
public const double INPUTLOWTHRESHOLD_LOW = 30;
|
||||
/// <summary>
|
||||
/// this is the high value for the input low threshold before we decide the value is invalid and we use the default
|
||||
/// </summary>
|
||||
public const double INPUTLOWTHRESHOLD_HIGH = 40;
|
||||
/// <summary>
|
||||
/// this is the default value that we use for the input low threshold if we need a default
|
||||
/// </summary>
|
||||
public const double INPUTLOWTHRESHOLD_DEFAULT = 36.5;
|
||||
/// <summary>
|
||||
/// this is the low value for the input high threshold before we decide the value is invalid and use the default
|
||||
/// </summary>
|
||||
public const double INPUTHIGHTHRESHOLD_LOW = 50;
|
||||
/// <summary>
|
||||
/// this is the high value for the input high threshold before we decide the value is invalid and use the default
|
||||
/// </summary>
|
||||
public const double INPUTHIGHTHRESHOLD_HIGH = 60;
|
||||
/// <summary>
|
||||
/// this is the default value for the input high threshold when we need a default
|
||||
/// </summary>
|
||||
public const double INPUTHIGHTHRESHOLD_DEFAULT = 56;
|
||||
}
|
||||
}
|
||||
13
Common/DTS.Common/Constant/DASSpecific/TDAS.cs
Normal file
13
Common/DTS.Common/Constant/DASSpecific/TDAS.cs
Normal file
@@ -0,0 +1,13 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace DTS.Common.Constant.DASSpecific
|
||||
{
|
||||
public class TDAS
|
||||
{
|
||||
public const uint MaxAAFilterRateHz = 4300;
|
||||
}
|
||||
}
|
||||
122
Common/DTS.Common/Constant/DASSpecific/TSRAIR.cs
Normal file
122
Common/DTS.Common/Constant/DASSpecific/TSRAIR.cs
Normal file
@@ -0,0 +1,122 @@
|
||||
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 ADC_SAMPLES_PER_PACKET_VER = 29;
|
||||
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
|
||||
*/
|
||||
}
|
||||
}
|
||||
38
Common/DTS.Common/Constant/DigitalInputs.cs
Normal file
38
Common/DTS.Common/Constant/DigitalInputs.cs
Normal 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;
|
||||
|
||||
}
|
||||
}
|
||||
99
Common/DTS.Common/Constant/EmbeddedSensors.cs
Normal file
99
Common/DTS.Common/Constant/EmbeddedSensors.cs
Normal file
@@ -0,0 +1,99 @@
|
||||
namespace DTS.Common.Constant
|
||||
{
|
||||
public static class EmbeddedSensors
|
||||
{
|
||||
//power management / wake up
|
||||
public const int MotionDetectInactivitySMaximum = 300; //five minutes
|
||||
|
||||
public const int MagnetTimeoutMsMaximum = 300000; //five minutes
|
||||
|
||||
//device triggers
|
||||
public const double EmbeddedLowGLinearAccelerometerRange = 8;
|
||||
public const double EmbeddedHighGLinearAccelerometerRange = 400;
|
||||
public const double EmbeddedAngularAccelerometerRange = 2000;
|
||||
public const double EmbeddedAngularRateSensorRange = 2000;
|
||||
public const double HumidityMinimum = 10;
|
||||
public const double HumidityMaximum = 100;
|
||||
public const double PressureMinimum = 5;
|
||||
public const double PressureMaximum = 15;
|
||||
public const double TemperatureMinimum = 0;
|
||||
public const double TemperatureMaximum = 65;
|
||||
public const double TimedIntervalEventDurationMsMinimum = 30;
|
||||
public const double TimedIntervalEventDurationMsMaximum = 300000; //five minutes
|
||||
public const double TimedIntervalNumberOfEventsMaximum = 100;
|
||||
public const int IntervalBetweenEventStartsMinutesMaximum = 1440; //24 hours
|
||||
|
||||
//embedded sensor sample rates, taken from device IC spec
|
||||
public const double EmbeddedLowGLinearAccelerometerSampleRateMinimum = 1;
|
||||
public const double EmbeddedLowGLinearAccelerometerSampleRateMaximum = 6400;
|
||||
public const double EmbeddedHighGLinearAccelerometerSampleRateMinimum = 1;
|
||||
public const double EmbeddedHighGLinearAccelerometerSampleRateMaximum = 5120;
|
||||
public const double EmbeddedAngularAccelerometerSampleRateMinimum = 1;
|
||||
public const double EmbeddedAngularAccelerometerSampleRateMaximum = 1600;
|
||||
public const double EmbeddedAngularAccelerometerAndRateSensorSampleRateMinimum = 1;
|
||||
public const double EmbeddedAngularAccelerometerAndRateSensorSampleRateMaximum = 5120;
|
||||
public const double EmbeddedAtmosphericSensorSampleRateMinimum = 1;
|
||||
public const double EmbeddedAtmosphericSensorSampleRateMaximum = 157;
|
||||
|
||||
//default values: max SR
|
||||
public const int DefaultEmbeddedLowGLinearAccelerometerSampleRate = 6400;
|
||||
public const int DefaultEmbeddedHighGLinearAccelerometerSampleRate = 5120;
|
||||
public const int DefaultEmbeddedAngularAccelerometerSampleRate = 1600;
|
||||
public const int DefaultEmbeddedAngularAccelerometerAndRateSensorSampleRate = 5120;
|
||||
public const int DefaultEmbeddedAtmosphericSensorSampleRate = 157;
|
||||
|
||||
public const uint BAUD_RATE_MIN = 96;
|
||||
public const uint BAUD_RATE_DEFAULT = 57600;
|
||||
public const uint BAUD_RATE_MAX = 921600;
|
||||
public static readonly uint[] BAUD_RATES = { 300, 600, 1200, 2400, 4800, 9600, 19200, 38400, 57600, 115200, 614400, 806400, 921600 };
|
||||
|
||||
//CAN
|
||||
public const bool CANISFD_DEFAULT = true;
|
||||
|
||||
//Arb/Base Bitrate
|
||||
public const int CANFD_ARB_BASE_BITRATE_MIN = 500000;
|
||||
public const int CANFD_ARB_BASE_BITRATE_MAX = 1000000;
|
||||
public const int CANFD_ARB_BASE_BITRATE_DEFAULT = 1000000;
|
||||
public static readonly int[] CANFD_ARBBASEBITRATE_VALUES = { CANFD_ARB_BASE_BITRATE_MIN, CANFD_ARB_BASE_BITRATE_MAX };
|
||||
|
||||
public const int NON_CANFD_ARB_BASE_BITRATE_MIN = 50000;
|
||||
public const int NON_CANFD_ARB_BASE_BITRATE_MAX = 500000;
|
||||
public const int NON_CANFD_ARB_BASE_BITRATE_DEFAULT = 500000;
|
||||
public static readonly int[] NON_CANFD_ARBBASEBITRATE_VALUES = { NON_CANFD_ARB_BASE_BITRATE_MIN, 62000, 83000, 100000, 125000, 250000, NON_CANFD_ARB_BASE_BITRATE_MAX };
|
||||
|
||||
|
||||
//Arb/Base SJW
|
||||
public const int CANFD_500000_ARB_BASE_SJW_DEFAULT = 8;
|
||||
public static readonly int[] CANFD_500000_ARBBASESJW_VALUES = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16 };
|
||||
|
||||
public const int CANFD_1000000_ARB_BASE_SJW_MAX = 8;
|
||||
public const int CANFD_1000000_ARB_BASE_SJW_DEFAULT = 1;
|
||||
public static readonly int[] CANFD_1000000_ARBBASESJW_VALUES = { 1, 2, 3, 4, 5, 6, 7, CANFD_1000000_ARB_BASE_SJW_MAX };
|
||||
|
||||
public const int NON_CANFD_50000_TO_125000_ARB_BASE_SJW_DEFAULT = 1;
|
||||
public static readonly int[] NON_CANFD_50000_TO_125000_ARBBASESJW_VALUES = { 1, 2, 3, 4 };
|
||||
|
||||
public const int NON_CANFD_250000_TO_500000_ARB_BASE_SJW_DEFAULT = 1;
|
||||
public static readonly int[] NON_CANFD_250000_TO_500000_ARBBASESJW_VALUES = { 1, 2 };
|
||||
|
||||
|
||||
//Data Bitrate
|
||||
public const int DATA_BITRATE_DEFAULT = 4000000;
|
||||
public static readonly int[] DATABITRATE_VALUES = { 500000, 1000000, 2000000, 4000000, 8000000 };
|
||||
|
||||
|
||||
//Data SJW
|
||||
public const int DATA_SJW_DEFAULT = 2;
|
||||
public const int DATA_SJW_MIN = 1;
|
||||
public static readonly int[] NON_CANFD_500000_DATASJW_VALUES = { DATA_SJW_MIN, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16 };
|
||||
public static readonly int[] NON_CANFD_1000000_DATASJW_VALUES = { DATA_SJW_MIN, 2, 3, 4, 5, 6, 7, 8 };
|
||||
public static readonly int[] NON_CANFD_2000000_DATASJW_VALUES = { DATA_SJW_MIN, 2, 3, 4 };
|
||||
public static readonly int[] NON_CANFD_4000000_DATASJW_VALUES = { DATA_SJW_MIN, 2 };
|
||||
public static readonly int[] NON_CANFD_8000000_DATASJW_VALUES = { DATA_SJW_MIN };
|
||||
|
||||
|
||||
//Filetype
|
||||
public const string FILETYPE_DEFAULT = "asc";
|
||||
public static readonly string[] FILETYPE_VALUES = { "asc", "blf" };
|
||||
}
|
||||
}
|
||||
29
Common/DTS.Common/Constant/XamlConstants.xaml
Normal file
29
Common/DTS.Common/Constant/XamlConstants.xaml
Normal file
@@ -0,0 +1,29 @@
|
||||
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
x:Class="DTS.Common.XamlConstants"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:system="clr-namespace:System;assembly=mscorlib">
|
||||
<system:Double x:Key="SQUIB_DELAY_MAX">99000</system:Double>
|
||||
<system:Double x:Key="SQUIB_DELAY_MIN">0.0</system:Double>
|
||||
<system:Double x:Key="SQUIB_DURATION_MAX">25.5</system:Double>
|
||||
<system:Double x:Key="SQUIB_DURATION_MIN">.2</system:Double>
|
||||
<system:Double x:Key="SQUIB_TOLERANCE_HIGH">8</system:Double>
|
||||
<system:Double x:Key="SQUIB_TOLERANCE_LOW">.1</system:Double>
|
||||
<system:Double x:Key="SQUIB_CURRENT_LOW">1</system:Double>
|
||||
<system:Double x:Key="SQUIB_CURRENT_HIGH">4</system:Double>
|
||||
<system:Double x:Key="DIGITALOUT_DELAY_MIN">0</system:Double>
|
||||
<system:Double x:Key="DIGITALOUT_DELAY_MAX">99000</system:Double>
|
||||
<system:Double x:Key="UART_DATA_BITS_MIN">5</system:Double>
|
||||
<system:Double x:Key="UART_DATA_BITS_MAX">9</system:Double>
|
||||
<system:Double x:Key="STREAMOUT_TIMECHANNELID_MIN">1</system:Double>
|
||||
<system:Double x:Key="STREAMOUT_TIMECHANNELID_MAX">65535</system:Double>
|
||||
<system:Double x:Key="STREAMOUT_DATACHANNELID_MIN">1</system:Double>
|
||||
<system:Double x:Key="STREAMOUT_DATACHANNELID_MAX">65535</system:Double>
|
||||
<system:Double x:Key="STREAMOUT_IRIG_TDP_MIN">0</system:Double>
|
||||
<system:Double x:Key="STREAMOUT_IRIG_TDP_MAX">1600</system:Double>
|
||||
<system:Double x:Key="STREAMOUT_TMAT_INTERVAL_MIN">0</system:Double>
|
||||
<system:Double x:Key="STREAMOUT_TMAT_INTERVAL_MAX">65535</system:Double>
|
||||
<system:Int32 x:Key="MIN_DB_VERSION_AC_COUPLING">92</system:Int32>
|
||||
<system:Int32 x:Key="TMATSIntervalDbVesion">93</system:Int32>
|
||||
<system:Int32 x:Key="MIN_DB_VERSION_UNIX_EPOCH_TIME">93</system:Int32>
|
||||
<system:Int32 x:Key="MIN_DB_VERSION_RECORD_ON_BOOT">96</system:Int32>
|
||||
</ResourceDictionary>
|
||||
7
Common/DTS.Common/Constant/XamlConstants.xaml.cs
Normal file
7
Common/DTS.Common/Constant/XamlConstants.xaml.cs
Normal file
@@ -0,0 +1,7 @@
|
||||
namespace DTS.Common.Constant
|
||||
{
|
||||
public partial class XamlConstants
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user