init
This commit is contained in:
239
Common/DTS.CommonCore/Constant/Constants.cs
Normal file
239
Common/DTS.CommonCore/Constant/Constants.cs
Normal file
@@ -0,0 +1,239 @@
|
||||
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;
|
||||
}
|
||||
}
|
||||
20
Common/DTS.CommonCore/Constant/DASSpecific/PowerPRO.cs
Normal file
20
Common/DTS.CommonCore/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.CommonCore/Constant/DASSpecific/SLICE.cs
Normal file
13
Common/DTS.CommonCore/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.CommonCore/Constant/DASSpecific/SLICE1_5.cs
Normal file
35
Common/DTS.CommonCore/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.CommonCore/Constant/DASSpecific/SLICE2.cs
Normal file
31
Common/DTS.CommonCore/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.CommonCore/Constant/DASSpecific/SLICE2_TOM.cs
Normal file
35
Common/DTS.CommonCore/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;
|
||||
}
|
||||
}
|
||||
}
|
||||
70
Common/DTS.CommonCore/Constant/DASSpecific/SLICE6.cs
Normal file
70
Common/DTS.CommonCore/Constant/DASSpecific/SLICE6.cs
Normal file
@@ -0,0 +1,70 @@
|
||||
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:
|
||||
return protocolVersion < CLOCKSYNCPROFILE;
|
||||
case ClockSyncProfile.Slave_E2E:
|
||||
return protocolVersion >= CLOCKSYNCPROFILE;
|
||||
default: return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
189
Common/DTS.CommonCore/Constant/DASSpecific/SLICE6AIR.cs
Normal file
189
Common/DTS.CommonCore/Constant/DASSpecific/SLICE6AIR.cs
Normal file
@@ -0,0 +1,189 @@
|
||||
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 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;
|
||||
/// <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(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.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;
|
||||
}
|
||||
}
|
||||
|
||||
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._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 = 9600)
|
||||
{
|
||||
//39151
|
||||
if (isEthernetRecorder) { return MaxSampleRateHz_OBRDDR; }
|
||||
if (!RecordingModeExtensions.IsAUartMode(mode)) { return MaxSampleRateHz; }
|
||||
//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];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
62
Common/DTS.CommonCore/Constant/DASSpecific/SLICE6AIRBR.cs
Normal file
62
Common/DTS.CommonCore/Constant/DASSpecific/SLICE6AIRBR.cs
Normal file
@@ -0,0 +1,62 @@
|
||||
using DTS.Common.Enums;
|
||||
|
||||
namespace DTS.Common.Constant.DASSpecific
|
||||
{
|
||||
public class SLICE6AIRBR
|
||||
{
|
||||
public const int MIN_PROTOCOL_VER = 1;
|
||||
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:
|
||||
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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
48
Common/DTS.CommonCore/Constant/DASSpecific/SLICE6DB.cs
Normal file
48
Common/DTS.CommonCore/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.CommonCore/Constant/DASSpecific/SLICEDB.cs
Normal file
30
Common/DTS.CommonCore/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;
|
||||
}
|
||||
}
|
||||
13
Common/DTS.CommonCore/Constant/DASSpecific/TDAS.cs
Normal file
13
Common/DTS.CommonCore/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;
|
||||
}
|
||||
}
|
||||
112
Common/DTS.CommonCore/Constant/DASSpecific/TSRAIR.cs
Normal file
112
Common/DTS.CommonCore/Constant/DASSpecific/TSRAIR.cs
Normal file
@@ -0,0 +1,112 @@
|
||||
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 START_REALTIME_STREAM = 11;
|
||||
//public const int UDP_REALTIME_STREAM = 14;
|
||||
public const int IRIG_GPS_PPSIN_SYNC = 25;
|
||||
public const int DISABLE_STREAMING_FEATURE = 25;
|
||||
|
||||
public static bool IsRecordingModeSupported(RecordingModes mode, int protocolVersion)
|
||||
{
|
||||
var result = false;
|
||||
|
||||
switch (mode)
|
||||
{
|
||||
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:
|
||||
result = true;
|
||||
break;
|
||||
//case RecordingModes.S6A_DeviceStreamingOnly:
|
||||
// result = protocolVersion >= UDP_REALTIME_STREAM;
|
||||
// break;
|
||||
default:
|
||||
result = false;
|
||||
break;
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
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.CommonCore/Constant/DigitalInputs.cs
Normal file
38
Common/DTS.CommonCore/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;
|
||||
|
||||
}
|
||||
}
|
||||
45
Common/DTS.CommonCore/Constant/EmbeddedSensors.cs
Normal file
45
Common/DTS.CommonCore/Constant/EmbeddedSensors.cs
Normal file
@@ -0,0 +1,45 @@
|
||||
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;
|
||||
}
|
||||
}
|
||||
29
Common/DTS.CommonCore/Constant/XamlConstants.xaml
Normal file
29
Common/DTS.CommonCore/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.CommonCore/Constant/XamlConstants.xaml.cs
Normal file
7
Common/DTS.CommonCore/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