113 lines
4.4 KiB
C#
113 lines
4.4 KiB
C#
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
|
|
*/
|
|
}
|
|
}
|