init
This commit is contained in:
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
|
||||
*/
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user