3755 lines
167 KiB
Plaintext
3755 lines
167 KiB
Plaintext
using System;
|
|
using System.Collections.Generic;
|
|
using DataPROWin7.DataModel;
|
|
using DataPROWin7.DataModel.BatteryAndInputVoltageDefaults;
|
|
using DTS.Common.Enums;
|
|
using DTS.Common.Enums.Sensors;
|
|
using DTS.Common.Classes.Hardware;
|
|
using DTS.DASLib.Service;
|
|
using DTS.Common.Settings;
|
|
using DTS.Common.Constant;
|
|
using DTS.Slice.Users.UserSettings;
|
|
using DTS.Common.DataModel;
|
|
using DTS.Common.Enums.Groups.GroupList;
|
|
using DTS.Slice.Users;
|
|
using DTS.Common.Storage;
|
|
using DTS.Common;
|
|
using DTS.Common.Classes.DSP;
|
|
using System.ComponentModel;
|
|
// ReSharper disable InconsistentNaming
|
|
|
|
namespace DataPROWin7.Common
|
|
{
|
|
public sealed class SerializedSettings
|
|
{
|
|
public enum Keys
|
|
{
|
|
IgnorePowerMode,
|
|
NumberRealtimeCharts,
|
|
UseCircBufTriggerCheck,
|
|
TriggerCheckPostRealtime,
|
|
DeriveROIFromAll,
|
|
|
|
// ReSharper disable once InconsistentNaming
|
|
CRIBCOM,
|
|
LastEventStartTime,
|
|
ExportINIFile,
|
|
ShowISOCodes,
|
|
ShowUserCodes,
|
|
UseMeterModeTable,
|
|
AutoArmDiagLevel,
|
|
AutoArmDiagDelayMS,
|
|
RealtimeSampleRates,
|
|
RealtimeSampleRate,
|
|
OverheadPercent,
|
|
AutozeroRealtime,
|
|
AllowCalculatedChannels,
|
|
AllowLevelTriggerUI,
|
|
TDASCalPeriod,
|
|
G5CalPeriod,
|
|
Slice1CalPeriod,
|
|
Slice1_5CalPeriod,
|
|
Slice2_CalPeriod,
|
|
CalWarningPeriod,
|
|
CalHWGracePeriod,
|
|
HardwareCalPolicy,
|
|
DefaultRecordingMode,
|
|
DefaultIsoChannelSensorCompatibilityLevel,
|
|
AllowAdvancedRecordingModes,
|
|
AllowTSRAIRRecordingModes,
|
|
IncludeGroupNameInISOExport,
|
|
WarnIfTestCancelledWithoutExport,
|
|
DiademChannelName200Option,
|
|
DiademUserComment201Option,
|
|
DiademReserved1_301Option,
|
|
DiademReserved2_302Option,
|
|
StartingTestSetup,
|
|
SensitivityDisplayFormat,
|
|
TriggerSecondsDisplayFormat,
|
|
NonLinearDisplayFormat,
|
|
CapacityRangeDisplayFormat,
|
|
TestSetupDefaultAutomaticMode,
|
|
CommonStatusLine,
|
|
AutomaticModeDelayMS,
|
|
TriggerCheckQuickMode,
|
|
Diagnostics_TDAS_TimeoutSec,
|
|
Diagnostics_SLICE_TimeoutSec,
|
|
ResolveChannels_TDAS_QueryDownloadTimeoutSec,
|
|
ResolveChannels_SLICE_QueryDownloadTimeoutSec,
|
|
ResolveChannels_TDAS_QueryConfigTimeoutSec,
|
|
ResolveChannels_SLICE_QueryConfigTimeoutSec,
|
|
SLICE_CONNECT_ALLOWED_SECONDS,
|
|
TDAS_CONNECT_ALLOWED_SECONDS,
|
|
TestSetup_AllowQuickTestSetup,
|
|
AllowQuickBuild,
|
|
AutoDiscoverDuringQuickBuild,
|
|
AutoRunTestDuringQuickBuild,
|
|
Graphs_PFSZoomValues,
|
|
AutoAdd_ArmChecklist,
|
|
TESTSETUP_WARNBATFAIL,
|
|
TESTSETUPDEFAULT_DONTALLOWOUTOFCALSENSOR,
|
|
SPSINDICE_COUNT,
|
|
TDAS_MAXAAFRATE,
|
|
G5_MAXAAFRATE,
|
|
DefaultDigitalOutMode,
|
|
DownloadMode,
|
|
SLICE_Distributor_PowerSetting,
|
|
TDAS_Pro_Rack_PowerSetting,
|
|
G5VDS_PowerSetting,
|
|
SLICE1_5_Nano_Base_PowerSetting,
|
|
SLICE_Micro_Base_PowerSetting,
|
|
SLICE_NANO_Base_PowerSetting,
|
|
SLICE2_SIM_PowerSetting,
|
|
SLICE2_DIM_PowerSetting,
|
|
SLICE2_TOM_PowerSetting,
|
|
G5INDUMMY_PowerSetting,
|
|
SLICE_EthernetController_PowerSetting,
|
|
SLICE1_5_Micro_Base_PowerSetting,
|
|
SLICE_LabEthernet_PowerSetting,
|
|
SLICE2_SLS_PowerSetting,
|
|
SLICE1_G5Stack_PowerSetting,
|
|
SLICE2_SLT_PowerSetting,
|
|
SLICE2_SLD_PowerSetting,
|
|
RealtimeSampleRateSliceUSB,
|
|
RealtimeSampleRateSliceIP,
|
|
RealtimeSampleRateTDASG5,
|
|
MaxParallelTDASDownloads,
|
|
UseTestSetupNameForTestIDHeaderInCSVExport,
|
|
UseFlatExportFolders,
|
|
TestIDPrefixSuffixValues,
|
|
SLICE6_PowerSetting,
|
|
SLICE6_CalPeriod,
|
|
SLICE6_AIR_PowerSetting,
|
|
WarnOnEIDPositionSwap,
|
|
AllowEIDSensorsOutOfPlace,
|
|
SLICE6MulticastResponsePort,
|
|
SLICE6MulticastCommandPort,
|
|
SLICE6MulticastAddress,
|
|
ClearDBBeforeTSFImport,
|
|
SLICE6Db_PowerSetting,
|
|
SLICE6Db_AIR_PowerSetting,
|
|
SLICE6Db_InDummy_PowerSetting,
|
|
UseLegacyTOMCFC,
|
|
UseLegacyTDCSoftwareFilterAdjustment,
|
|
AllowModify,
|
|
ApplyShiftT0ModsTestOnly,
|
|
ImportCreateDynamicGroups,
|
|
ShowISOStringBuilder,
|
|
ShowChannelCodeLookupHelper,
|
|
UniqueISOCodesRequired,
|
|
UseISOCodeFilterMapping,
|
|
AlwaysLoadFromDb, //deprecated, left here incase we use it again in the future not realizing we had used it in the past.
|
|
FireDigitalOutputsDuringDiagnostics,
|
|
AllowPushPullOfGroupModificationsToTestSetups,
|
|
RealtimeSampleRateSLICE6,
|
|
_24VPowerLow,
|
|
_24VPowerHigh,
|
|
IEPERangeLowLimitScalar,
|
|
IEPERangeHighLimitScalar,
|
|
SensorCalPolicy,
|
|
SensorCalWarningPeriodDays,
|
|
EnableRegionOfInterest,
|
|
VoltageInputBreakpoint,
|
|
ConstantCurrentInputBreakpoint,
|
|
DisplaySPDADC,
|
|
EnableClockSourceSelect,
|
|
DisplayEUOffset,
|
|
UseTestChannelOrder,
|
|
DisableAutoSense,
|
|
ActualRangeLowerLimit,
|
|
ActualRangeUpperLimit,
|
|
KeepMultipleEventsAndROIWithinTestFolder,
|
|
ShowSensorChannelUserValues,
|
|
AllowSensorPushAndPull,
|
|
PowerPRO_PowerSetting,
|
|
UseUDPStreaming,
|
|
RealtimeUDPStreamAddress,
|
|
UseUnixTimestamps,
|
|
UseUnixEpochTime,
|
|
RealtimeLevelTriggerPercentage,
|
|
RealtimeLevelTriggerBeepIntervalMS,
|
|
RealtimeLevelTriggerBeepCount,
|
|
RealtimeLevelTriggerAutoAdvance,
|
|
RealtimeLevelTriggerFreezeTimeSec,
|
|
RealtimeRequireLevelTriggerCheckCompletion,
|
|
RealtimeLevelTriggerOn,
|
|
RealtimeLevelTriggerQualifyingSamples,
|
|
RealtimeLevelTriggerBeepIdle,
|
|
RealtimeLevelTriggerBeepIdleInterval,
|
|
ExportActualRangeForISOMME,
|
|
ValidateTestPositionAndTestObject,
|
|
ISOPositions,
|
|
ISOTestObjects,
|
|
UseSensorFirstUseDate,
|
|
DontAllowDataCollectionIfOverused,
|
|
UsageRemainingForWarning,
|
|
DefaultMaxUsageAllowed,
|
|
EnableAAFRateEdit,
|
|
EnableStreamingWarnings,
|
|
AvailableSampleRates,
|
|
SLICE_Mini_Distributor_PowerSetting,
|
|
CombineDualSensitivityExports,
|
|
POWERPRO_CalPeriod,
|
|
SLICE6Air_CalPeriod,
|
|
SLICE6DB_CalPeriod,
|
|
TSRAir_CalPeriod,
|
|
SLICETC_CalPeriod,
|
|
StoreTestHistoryInDb,
|
|
StoreSensorTestHistoryInDb,
|
|
StoreTestSetupXmlInDb,
|
|
ConfirmChannelDeletes,
|
|
StreamDSPFilterType,
|
|
SLICE6Db3_PowerSetting,
|
|
EnableDynamicRealtimeOptimization,
|
|
AlwaysShowTSRAirSettings,
|
|
TSRAIR_PowerSetting,
|
|
SLICEPRODistributor_PowerSetting,
|
|
Falcon_PowerSetting,
|
|
DoNotShowExpiredLicense,
|
|
DoNotShowUnlicensed,
|
|
DoNotShowInvalidProductVersion,
|
|
AllowChannelDeletionFromFixedGroup,
|
|
ShowMMETestObjectsAndPositionsInTestSetup,
|
|
CustomerDetailsExpanded,
|
|
LabDetailsExpanded,
|
|
TestEngineerDetailsExpanded,
|
|
ShowGraphsSetupStep,
|
|
ShowISOExport,
|
|
ShowGroups,
|
|
LevelTriggerMaxPercentage,
|
|
LevelTriggerMinPercentage,
|
|
YubaExpectedBatteryLifeDays,
|
|
TemperatureLogTimeFormat,
|
|
TemperatureLogReadingFormat,
|
|
AllowedNoisePercentage,
|
|
CreateVoltageInputChannels,
|
|
SLICE6_AIR_BR_PowerSetting,
|
|
SLICE6AirBridge_CalPeriod,
|
|
RemoveLeapSeconds,
|
|
UICulture,
|
|
SaveSnapshotToClipboard,
|
|
ShowADCUnsigned,
|
|
SelectedGroupSort,
|
|
GroupSortAscending,
|
|
AddHardwareLineToCSV,
|
|
AutoConnectHardwareScan,
|
|
//user specific setting, just reserving the keyword here
|
|
AllowActiveRAMRecordingModes,
|
|
//FB 38039 Added Show checkout button setting
|
|
ShowCheckoutButton,
|
|
//FB 41821 Added Show CableMultiplier column
|
|
ShowCableMultiplier,
|
|
StreamDSPFilterTypeString,
|
|
StreamingFilterProfileString,
|
|
AutoArmRecordDelay,
|
|
TrackAnalogDiagnostics,
|
|
AllowInspectBeforeUse,
|
|
ManageClockSyncOutsideofDP
|
|
}
|
|
public const bool ManageClockSyncOutsideofDP_DEFAULT = false;
|
|
public static bool ManageClockSyncOutsideofDP
|
|
{
|
|
get => SettingsDB.GetGlobalValueBool(Keys.ManageClockSyncOutsideofDP.ToString(), ManageClockSyncOutsideofDP_DEFAULT);
|
|
set => SettingsDB.SetGlobalValue(Keys.ManageClockSyncOutsideofDP.ToString(), value.ToString());
|
|
}
|
|
public static string StreamFilterProfileString
|
|
{
|
|
get => SettingsDB.GetGlobalValue(Keys.StreamingFilterProfileString.ToString(), string.Empty);
|
|
set => SettingsDB.SetGlobalValue(Keys.StreamingFilterProfileString.ToString(), value);
|
|
}
|
|
public static string StreamDSPFilterTypeString
|
|
{
|
|
get => SettingsDB.GetGlobalValue(Keys.StreamDSPFilterTypeString.ToString(), string.Empty);
|
|
set => SettingsDB.SetGlobalValue(Keys.StreamDSPFilterTypeString.ToString(), value);
|
|
}
|
|
public const bool TRACK_ANALOG_DIAGNOSTICS_DEFAULT = false;
|
|
public static bool TrackAnalogDiagnostics
|
|
{
|
|
get => DTS.Common.Storage.DbOperations.GetConnectionDbVersion() >= DTS.Common.Constants.TRACK_ANALOG_DIAGNOSTICS_DB_VERSION && SettingsDB.GetGlobalValueBool(Keys.TrackAnalogDiagnostics.ToString(), TRACK_ANALOG_DIAGNOSTICS_DEFAULT);
|
|
set => SettingsDB.SetGlobalValueBoolean(Keys.TrackAnalogDiagnostics.ToString(), value);
|
|
}
|
|
public const int AUTOARMRECORDDELAY_SECONDS = 0;
|
|
/// <summary>
|
|
/// the amount of time to delay before arm/record with power on with auto arm enabled
|
|
/// http://manuscript.dts.local/f/cases/43048/Support-Delay-to-arm-record-with-power-on-with-autoarm-enabled
|
|
/// </summary>
|
|
public static int AutoArmRecordDelaySeconds
|
|
{
|
|
get => SettingsDB.GetGlobalValueInt(Keys.AutoArmRecordDelay.ToString(), AUTOARMRECORDDELAY_SECONDS);
|
|
set => SettingsDB.SetGlobalValueInt(Keys.AutoArmRecordDelay.ToString(), value);
|
|
}
|
|
public const bool AUTOCONNECTHARDWARESCAN_DEFAULT = true;
|
|
public static bool AutoConnectHardwareScan
|
|
{
|
|
get => SettingsDB.GetGlobalValueBool(Keys.AutoConnectHardwareScan.ToString(), AUTOCONNECTHARDWARESCAN_DEFAULT);
|
|
set => SettingsDB.SetGlobalValueBoolean(Keys.AutoConnectHardwareScan.ToString(), value);
|
|
}
|
|
/// <summary>
|
|
/// Default value for whether to add a line for hardware channel in CSV export or not
|
|
/// http://manuscript.dts.local/f/cases/35544/Internal-DataPRO-feature-reqsuest-CSV-export-add-a-line-for-DAS-serial-number-used-by-each-channel
|
|
/// </summary>
|
|
public const bool ADD_HARDWARE_LINE_TO_CSV_DEFAULT = false;
|
|
/// <summary>
|
|
/// Whether to add a line for hardware channel in CSV export or not
|
|
/// </summary>
|
|
public static bool AddHardwareLineToCSV
|
|
{
|
|
get => SettingsDB.GetGlobalValueBool(Keys.AddHardwareLineToCSV.ToString(), ADD_HARDWARE_LINE_TO_CSV_DEFAULT, false);
|
|
set => SettingsDB.SetGlobalValueBoolean(Keys.AddHardwareLineToCSV.ToString(), value);
|
|
}
|
|
/// <summary>
|
|
/// returns whether groups should be sorted in ascending or descending order
|
|
/// </summary>
|
|
public static bool GroupSortAscendingGet(User user)
|
|
{
|
|
if (null == user) { return true; }
|
|
var s = SettingsDB.GetUserValue(Keys.GroupSortAscending.ToString(), true.ToString(), user.UserName);
|
|
//if it's null or we can't parse it return the default (true)
|
|
//this weird conditional is what VS suggested for cleanup
|
|
return string.IsNullOrWhiteSpace(s) || !bool.TryParse(s, out bool b) || b;
|
|
}
|
|
/// <summary>
|
|
/// sets whether groups should be sorted in ascending or descending order
|
|
/// </summary>
|
|
/// <param name="user"></param>
|
|
/// <param name="bValue"></param>
|
|
public static void GroupSortAscendingSet(User user, bool bValue)
|
|
{
|
|
if (null == user) { return; }
|
|
SettingsDB.SetUserValue(Keys.GroupSortAscending.ToString(), bValue.ToString(), user.UserName);
|
|
}
|
|
/// <summary>
|
|
/// this is the default for what field of groups to use for sorting
|
|
/// </summary>
|
|
public const GroupFields SELECTED_GROUP_SORT_DEFAULT = GroupFields.DisplayName;
|
|
/// <summary>
|
|
/// returns the current field used to sort
|
|
/// </summary>
|
|
public static GroupFields SelectedGroupSortGet(User user)
|
|
{
|
|
if (null == user) { return SELECTED_GROUP_SORT_DEFAULT; }
|
|
var s = SettingsDB.GetUserValue(Keys.SelectedGroupSort.ToString(), SELECTED_GROUP_SORT_DEFAULT.ToString(), user.UserName);
|
|
if (!string.IsNullOrWhiteSpace(s) && Enum.TryParse(s, out GroupFields f))
|
|
{
|
|
return f;
|
|
}
|
|
return SELECTED_GROUP_SORT_DEFAULT;
|
|
}
|
|
/// <summary>
|
|
/// sets the current field used to sort
|
|
/// </summary>
|
|
/// <param name="user"></param>
|
|
/// <param name="groupField"></param>
|
|
public static void SelectedGroupSortSet(User user, GroupFields groupField)
|
|
{
|
|
if (null == user) { return; }
|
|
SettingsDB.SetUserValue(Keys.SelectedGroupSort.ToString(), groupField.ToString(), user.UserName);
|
|
}
|
|
/// <summary>
|
|
/// the DEFAULT value for whether to show ADC signed or unsigned.
|
|
/// by default we've always shown it signed
|
|
/// </summary>
|
|
public const bool SHOWADCUNSIGNED_DEFAULT = false;
|
|
/// <summary>
|
|
/// whether to show ADC signed or unsigned
|
|
/// http://manuscript.dts.local/f/cases/32992/Add-a-flag-to-show-ADC-in-0-64k-rather-than-32k-to-32k
|
|
/// </summary>
|
|
public static bool ShowADCUnsigned
|
|
{
|
|
get => SettingsDB.GetGlobalValueBool(Keys.ShowADCUnsigned.ToString(), SHOWADCUNSIGNED_DEFAULT);
|
|
set => SettingsDB.SetGlobalValueBoolean(Keys.ShowADCUnsigned.ToString(), value);
|
|
}
|
|
/// <summary>
|
|
/// default value for whether to save a snapshot to the clipboard instead of a CSV file
|
|
/// requested here:
|
|
/// http://manuscript.dts.local/f/cases/30112/
|
|
/// </summary>
|
|
public static bool SAVE_SNAPSHOT_TO_CLIPBOARD_DEFAULT = false;
|
|
/// <summary>
|
|
/// whether to save a snapshot to the clipboard instead of a CSV file
|
|
/// requested here:
|
|
/// http://manuscript.dts.local/f/cases/30112/
|
|
/// </summary>
|
|
public static bool SaveSnapshotToClipboard
|
|
{
|
|
get => SettingsDB.GetGlobalValueBool(Keys.SaveSnapshotToClipboard.ToString(), SAVE_SNAPSHOT_TO_CLIPBOARD_DEFAULT);
|
|
set => SettingsDB.SetGlobalValueBoolean(Keys.SaveSnapshotToClipboard.ToString(), value);
|
|
}
|
|
/// <summary>
|
|
/// The default for whether to remove leap seconds from streaming timestamps or not
|
|
/// 31747 Add support for GPS Time leap seconds
|
|
/// </summary>
|
|
public static bool REMOVE_LEAP_SECONDS_DEFAULT = false;
|
|
/// <summary>
|
|
/// whether to remove leap seconds from streaming timestamps or not
|
|
/// 31747 Add support for GPS Time leap seconds
|
|
/// </summary>
|
|
public static bool RemoveLeapSeconds
|
|
{
|
|
get => SettingsDB.GetGlobalValueBool(Keys.RemoveLeapSeconds.ToString(), REMOVE_LEAP_SECONDS_DEFAULT);
|
|
set => SettingsDB.SetGlobalValueBoolean(Keys.RemoveLeapSeconds.ToString(), value);
|
|
}
|
|
/// <summary>
|
|
/// the default for whether to create voltage input channels when dragging an analog channel onto a blank channel
|
|
/// http://manuscript.dts.local/f/cases/29764/Auto-Add-Voltage-Input-Analog-sensor-in-Test-Setup
|
|
/// </summary>
|
|
public static bool CREATE_VOLTAGE_INPUT_CHANNELS_DEFAULT = true;
|
|
/// <summary>
|
|
/// whether to create a voltage input channel when an analog hardware channel is dragged onto an empty channel
|
|
/// </summary>
|
|
public static bool CreateVoltageInputChannels
|
|
{
|
|
get => SettingsDB.GetGlobalValueBool(Keys.CreateVoltageInputChannels.ToString(), CREATE_VOLTAGE_INPUT_CHANNELS_DEFAULT);
|
|
set => SettingsDB.SetGlobalValueBoolean(Keys.CreateVoltageInputChannels.ToString(), value);
|
|
}
|
|
/// <summary>
|
|
/// the default for what percentage of full scale noise is allowed before a channel is failed in diagnostics
|
|
/// </summary>
|
|
public static double ALLOWED_NOISE_PERCENTAGE_DEFAULT = 1D;
|
|
/// <summary>
|
|
/// the percentage to check against when checking noise on a channel
|
|
/// http://manuscript.dts.local/f/cases/30274/Implement-AllowedNoisePercent-as-an-Application-setting-in-the-config-file-or-depricate-config-for-System-Setting-in-DB
|
|
/// </summary>
|
|
public static double AllowedNoisePercentage
|
|
{
|
|
get => SettingsDB.GetGlobalValueDouble(Keys.AllowedNoisePercentage.ToString(), ALLOWED_NOISE_PERCENTAGE_DEFAULT);
|
|
set => SettingsDB.SetGlobalValueDouble(Keys.AllowedNoisePercentage.ToString(), value);
|
|
}
|
|
/// <summary>
|
|
/// the default temperature log time format, this is the time format used in temperature log CSVs
|
|
/// 29554 YUBA - Download CSV
|
|
/// </summary>
|
|
public const string TEMPERATURE_LOG_TIME_FORMAT_DEFAULT = "MM-dd-yyyy HH:mm:ss";
|
|
/// <summary>
|
|
/// the format to use for time in temperature logs
|
|
/// http://manuscript.dts.local/f/cases/29554/YUBA-Download-CSV
|
|
/// </summary>
|
|
public static string TemperatureLogTimeFormat
|
|
{
|
|
get => SettingsDB.GetGlobalValue(Keys.TemperatureLogTimeFormat.ToString(), TEMPERATURE_LOG_TIME_FORMAT_DEFAULT);
|
|
set => SettingsDB.SetGlobalValue(Keys.TemperatureLogTimeFormat.ToString(), value);
|
|
}
|
|
/// <summary>
|
|
/// the default format to use for outputs in the temperature log
|
|
/// http://manuscript.dts.local/f/cases/29554/YUBA-Download-CSV
|
|
/// </summary>
|
|
public const string TEMPERATURE_LOG_READING_FORMAT_DEFAULT = "N2";
|
|
/// <summary>
|
|
/// the format to use for outputs in the temperature log
|
|
/// http://manuscript.dts.local/f/cases/29554/YUBA-Download-CSV
|
|
/// </summary>
|
|
public static string TemperatureLogReadingFormat
|
|
{
|
|
get => SettingsDB.GetGlobalValue(Keys.TemperatureLogReadingFormat.ToString(), TEMPERATURE_LOG_READING_FORMAT_DEFAULT);
|
|
set => SettingsDB.SetGlobalValue(Keys.TemperatureLogReadingFormat.ToString(), value);
|
|
}
|
|
/// <summary>
|
|
/// the default for the number of days the Yuba battery is expected to last
|
|
/// </summary>
|
|
public const int YUBA_EXPECTED_BATTERY_LIFE_DAYS = 1001;
|
|
/// <summary>
|
|
/// retrieves the life expectancy of yuba in days
|
|
/// </summary>
|
|
public static int YubaExpectedBatteryLifeDays
|
|
{
|
|
get => SettingsDB.GetGlobalValueInt(Keys.YubaExpectedBatteryLifeDays.ToString(), YUBA_EXPECTED_BATTERY_LIFE_DAYS);
|
|
set => SettingsDB.SetGlobalValueInt(Keys.YubaExpectedBatteryLifeDays.ToString(), value);
|
|
}
|
|
|
|
public const bool SHOW_GROUPS_DEFAULT = true;
|
|
/// <summary>
|
|
/// Controls whether groups are shown or hidden - includes home tab, edit test setups, channels, parameters
|
|
/// 26984 Hide Groups step in Edit Test Setup
|
|
/// </summary>
|
|
public static bool ShowGroups
|
|
{
|
|
get => SettingsDB.GetGlobalValueBool(Keys.ShowGroups.ToString(), SHOW_GROUPS_DEFAULT);
|
|
set => SettingsDB.SetGlobalValueBoolean(Keys.ShowGroups.ToString(), value);
|
|
}
|
|
public const bool SHOW_ISO_EXPORT_DEFAULT = true;
|
|
/// <summary>
|
|
/// Controls whether ISO export is shown in edit test setup nav and supported formats
|
|
/// Case 26982 Hide ISO export step in Edit Test Setup
|
|
/// Case 26983 Hide ISO from list of export formats in Export options in Info step of Edit Test Setup
|
|
/// </summary>
|
|
public static bool ShowISOExport
|
|
{
|
|
get => SettingsDB.GetGlobalValueBool(Keys.ShowISOExport.ToString(), SHOW_ISO_EXPORT_DEFAULT);
|
|
set => SettingsDB.SetGlobalValueBoolean(Keys.ShowISOExport.ToString(), value);
|
|
}
|
|
/// <summary>
|
|
/// The default value for whether to show graphs step in edit test setup
|
|
/// http://manuscript.dts.local/f/cases/26987/Hide-Graphs-step-in-Edit-Test-Setup
|
|
/// </summary>
|
|
public const bool SHOW_GRAPHS_SETUP_STEP_DEFAULT = true;
|
|
/// <summary>
|
|
/// controls whether graphs step should be displayed in edit test setup
|
|
/// http://manuscript.dts.local/f/cases/26987/Hide-Graphs-step-in-Edit-Test-Setup
|
|
/// </summary>
|
|
public static bool ShowGraphsSetupStep
|
|
{
|
|
get => SettingsDB.GetGlobalValueBool(Keys.ShowGraphsSetupStep.ToString(), SHOW_GRAPHS_SETUP_STEP_DEFAULT);
|
|
set => SettingsDB.SetGlobalValueBoolean(Keys.ShowGraphsSetupStep.ToString(), value);
|
|
}
|
|
/// <summary>
|
|
/// Whether lab details is expanded in EditTestSetup or not
|
|
/// 13735 Need the ability to add ISO metadata without an associated Group
|
|
/// </summary>
|
|
public static bool LabDetailsExpanded
|
|
{
|
|
get => SettingsDB.GetGlobalValueBool(Keys.LabDetailsExpanded.ToString(),
|
|
false);
|
|
set => SettingsDB.SetGlobalValueBoolean(Keys.LabDetailsExpanded.ToString(),
|
|
value);
|
|
}
|
|
/// <summary>
|
|
/// Whether customer details is expanded in EditTestSetup or not
|
|
/// 13735 Need the ability to add ISO metadata without an associated Group
|
|
/// </summary>
|
|
public static bool CustomerDetailsExpanded
|
|
{
|
|
get => SettingsDB.GetGlobalValueBool(Keys.CustomerDetailsExpanded.ToString(),
|
|
false);
|
|
set => SettingsDB.SetGlobalValueBoolean(Keys.CustomerDetailsExpanded.ToString(),
|
|
value);
|
|
}
|
|
/// <summary>
|
|
/// Whether test engineer details is expanded in EditTestSetup or not
|
|
/// 13735 Need the ability to add ISO metadata without an associated Group
|
|
/// </summary>
|
|
public static bool TestEngineerDetailsExpanded
|
|
{
|
|
get => SettingsDB.GetGlobalValueBool(Keys.TestEngineerDetailsExpanded.ToString(),
|
|
false);
|
|
set => SettingsDB.SetGlobalValueBoolean(Keys.TestEngineerDetailsExpanded.ToString(),
|
|
value);
|
|
}
|
|
|
|
public const bool SHOWMMETESTOBJECTSANDPOSITIONSINTESTSETUP_DEFAULT = false;
|
|
/// <summary>
|
|
/// Whether to show dropdowns for MME Test object and Position fields in Edit Test setup Groups
|
|
/// 17567 Option to bring back Test Object and Position drop down in Test Set up -> Groups.
|
|
/// </summary>
|
|
public static bool ShowMMETestObjectsAndPositionsInTestSetup
|
|
{
|
|
get => SettingsDB.GetGlobalValueBool(Keys.ShowMMETestObjectsAndPositionsInTestSetup.ToString(),
|
|
SHOWMMETESTOBJECTSANDPOSITIONSINTESTSETUP_DEFAULT);
|
|
set =>
|
|
SettingsDB.SetGlobalValueBoolean(Keys.ShowMMETestObjectsAndPositionsInTestSetup.ToString(),
|
|
value);
|
|
}
|
|
|
|
/// <summary>
|
|
/// the default for whether to show expired license warning or not
|
|
/// </summary>
|
|
public const bool DONOTSHOWEXPIREDLICENSE_DEFAULT = false;
|
|
public static bool DoNotShowExpiredLicense
|
|
{
|
|
get => SettingsDB.GetGlobalValueBool(Keys.DoNotShowExpiredLicense.ToString(),
|
|
DONOTSHOWEXPIREDLICENSE_DEFAULT);
|
|
set =>
|
|
SettingsDB.SetGlobalValueBoolean(Keys.DoNotShowExpiredLicense.ToString(),
|
|
value);
|
|
}
|
|
|
|
// FB 25725 show unlicensed message
|
|
/// <summary>
|
|
/// the default for whether to show unlicensed warning or not
|
|
/// </summary>
|
|
public const bool DONOTSHOWUNLICENSED_DEFAULT = false;
|
|
public static bool DoNotShowUnlicensed
|
|
{
|
|
get => SettingsDB.GetGlobalValueBool(Keys.DoNotShowUnlicensed.ToString(),
|
|
DONOTSHOWUNLICENSED_DEFAULT);
|
|
set =>
|
|
SettingsDB.SetGlobalValueBoolean(Keys.DoNotShowUnlicensed.ToString(),
|
|
value);
|
|
}
|
|
|
|
// FB 28089 major/minor version support
|
|
/// <summary>
|
|
/// the default for whether to show invalid product version warning or not
|
|
/// </summary>
|
|
public const bool DONOTSHOWINVALIDPRODUCTVERSION_DEFAULT = false;
|
|
public static bool DoNotShowInvalidProductVersion
|
|
{
|
|
get => SettingsDB.GetGlobalValueBool(Keys.DoNotShowInvalidProductVersion.ToString(),
|
|
DONOTSHOWINVALIDPRODUCTVERSION_DEFAULT);
|
|
set =>
|
|
SettingsDB.SetGlobalValueBoolean(Keys.DoNotShowInvalidProductVersion.ToString(),
|
|
value);
|
|
}
|
|
|
|
/// <summary>
|
|
/// the default for whether to always show TSR air settings in edit test setup or not
|
|
/// </summary>
|
|
public const bool ALWAYSSHOWTSRAIRSETTINGS_DEFAULT = false;
|
|
/// <summary>
|
|
/// whether to show TSR Air Settings in test setup always or not
|
|
/// 17983 Add Event Start Method (triggering) interface to TSR Air Settings step of Edit Test Setup
|
|
/// </summary>
|
|
public static bool AlwaysShowTSRAirSettings
|
|
{
|
|
get => SettingsDB.GetGlobalValueBool(Keys.AlwaysShowTSRAirSettings.ToString(),
|
|
ALWAYSSHOWTSRAIRSETTINGS_DEFAULT);
|
|
set =>
|
|
SettingsDB.SetGlobalValueBoolean(Keys.AlwaysShowTSRAirSettings.ToString(),
|
|
value);
|
|
}
|
|
|
|
/// <summary>
|
|
/// the default UI Culture
|
|
/// </summary>
|
|
public const UICultures UICULTURE_DEFAULT = UICultures.en_US;
|
|
/// <summary>
|
|
/// chosen UI Culture
|
|
/// 30281 Add a way to switch language resources on demand rather than by windows culture value
|
|
/// </summary>
|
|
public static UICultures UICulture
|
|
{
|
|
get =>
|
|
Enum.TryParse(SettingsDB.GetGlobalValue(Keys.UICulture.ToString(), UICULTURE_DEFAULT.ToString()), out UICultures culture) ? culture : UICULTURE_DEFAULT;
|
|
set =>
|
|
SettingsDB.SetGlobalValue(Keys.UICulture.ToString(), value.ToString());
|
|
}
|
|
/// <summary>
|
|
/// the default for whether to remember test affixes
|
|
/// 18028 Remember test id suffix drop down state
|
|
/// </summary>
|
|
public const bool REMEMBERTESTIDAFFIXES_DEFAULT = true;
|
|
/// <summary>
|
|
/// whether current user wants to remember test id affixes
|
|
/// note current user, not current viewer
|
|
/// 18028 Remember test id suffix drop down state
|
|
/// </summary>
|
|
public static bool RememberTestIdAffixes
|
|
{
|
|
get
|
|
{
|
|
if (null == ApplicationProperties.CurrentUser)
|
|
{
|
|
return REMEMBERTESTIDAFFIXES_DEFAULT;
|
|
}
|
|
return TestSetupDefaults.GetUserSettingValueBool(ApplicationProperties.CurrentUser.Id,
|
|
PropertyEnums.PropertyIds.StoreTestIdAffixes, REMEMBERTESTIDAFFIXES_DEFAULT);
|
|
}
|
|
set => TestSetupDefaults.SetUserSetting(ApplicationProperties.CurrentUser.Id,
|
|
PropertyEnums.PropertyIds.StoreTestIdAffixes, value);
|
|
}
|
|
/// <summary>
|
|
/// returns the test id suffix for the current user
|
|
/// note current user, not current viewer
|
|
/// 18028 Remember test id suffix drop down state
|
|
/// </summary>
|
|
public static string TestIdSuffix
|
|
{
|
|
get
|
|
{
|
|
if (null == ApplicationProperties.CurrentUser)
|
|
{
|
|
return null;
|
|
}
|
|
var id = ApplicationProperties.CurrentUser.Id;
|
|
return TestSetupDefaults.GetUserSettingValueString(id, PropertyEnums.PropertyIds.TestIdSuffix,
|
|
"TimeStamp");
|
|
}
|
|
set
|
|
{
|
|
if (null == ApplicationProperties.CurrentUser)
|
|
{
|
|
return;
|
|
}
|
|
var id = ApplicationProperties.CurrentUser.Id;
|
|
TestSetupDefaults.SetUserSetting(id, PropertyEnums.PropertyIds.TestIdSuffix, value);
|
|
}
|
|
}
|
|
/// <summary>
|
|
/// returns the test id prefix for the current user
|
|
/// note current user, not current viewer
|
|
/// 18028 Remember test id suffix drop down state
|
|
/// </summary>
|
|
public static string TestIdPrefix
|
|
{
|
|
get
|
|
{
|
|
if (null == ApplicationProperties.CurrentView)
|
|
{
|
|
return null;
|
|
}
|
|
var id = ApplicationProperties.CurrentView.Id;
|
|
return TestSetupDefaults.GetUserSettingValueString(id, PropertyEnums.PropertyIds.TestIdPrefix,
|
|
"None");
|
|
}
|
|
set
|
|
{
|
|
if (null == ApplicationProperties.CurrentView)
|
|
{
|
|
return;
|
|
}
|
|
var id = ApplicationProperties.CurrentView.Id;
|
|
TestSetupDefaults.SetUserSetting(id, PropertyEnums.PropertyIds.TestIdPrefix, value);
|
|
}
|
|
}
|
|
public const bool STORETESTHISTORYINDB_DEFAULT = false;
|
|
/// <summary>
|
|
/// Whether to store test execution history in the db or not
|
|
/// 3003 Attach Test History to Sensors
|
|
/// </summary>
|
|
public static bool StoreTestHistoryInDb
|
|
{
|
|
get => SettingsDB.GetGlobalValueBool(Keys.StoreTestHistoryInDb.ToString(), STORETESTHISTORYINDB_DEFAULT);
|
|
set => SettingsDB.SetGlobalValueBoolean(Keys.StoreTestHistoryInDb.ToString(), value);
|
|
}
|
|
|
|
public const bool STORESENSORTESTHISTORYINDB_DEFAULT = false;
|
|
/// <summary>
|
|
/// whether to store sensor test history in the db (requires that test history is stored)
|
|
/// 3003 Attach Test History to Sensors
|
|
/// </summary>
|
|
public static bool StoreSensorTestHistoryInDb
|
|
{
|
|
get => SettingsDB.GetGlobalValueBool(Keys.StoreSensorTestHistoryInDb.ToString(), STORESENSORTESTHISTORYINDB_DEFAULT);
|
|
set => SettingsDB.SetGlobalValueBoolean(Keys.StoreSensorTestHistoryInDb.ToString(), value);
|
|
}
|
|
|
|
public const bool STORETESTSETUPXML_DEFAULT = false;
|
|
/// <summary>
|
|
/// whether to store test setup xml in binary form in db (requires that test history is stored)
|
|
/// 3003 Attach Test History to Sensors
|
|
/// </summary>
|
|
public static bool StoreTestSetupXmlInDb
|
|
{
|
|
get => SettingsDB.GetGlobalValueBool(Keys.StoreTestSetupXmlInDb.ToString(), STORETESTSETUPXML_DEFAULT);
|
|
set => SettingsDB.SetGlobalValueBoolean(Keys.StoreTestSetupXmlInDb.ToString(), value);
|
|
}
|
|
|
|
/// <summary>
|
|
/// whether sensor calibration intervals start on calibration date or date of first use after calibration
|
|
/// 13065 Sensor "First Use" Date
|
|
/// </summary>
|
|
public static bool UseSensorFirstUseDate
|
|
{
|
|
get => SettingsDB.GetGlobalValueBool(Keys.UseSensorFirstUseDate.ToString(),
|
|
SensorConstants.SENSOR_FIRST_USE_DEFAULT, false);
|
|
set
|
|
{
|
|
SettingsDB.SetGlobalValueBoolean(Keys.UseSensorFirstUseDate.ToString(),
|
|
value);
|
|
SensorConstants.UseSensorFirstUseDate = value;
|
|
}
|
|
}
|
|
|
|
public static bool AllowInspectBeforeUse
|
|
{
|
|
get => SettingsDB.GetGlobalValueBool(Keys.AllowInspectBeforeUse.ToString(),
|
|
SensorConstants.ALLOW_INSPECT_BEFORE_USE_DEFAULT, false);
|
|
set
|
|
{
|
|
SettingsDB.SetGlobalValueBoolean(Keys.AllowInspectBeforeUse.ToString(),
|
|
value);
|
|
SensorConstants.AllowInspectBeforeUse = value;
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// Whether or not to display the related controls
|
|
/// </summary>
|
|
public static bool DontAllowDataCollectionIfOverused
|
|
{
|
|
get => (DbOperations.GetConnectionDbVersion() >= Constants.SENSOR_ASSEMBLY_DB_VERSION) &&
|
|
SettingsDB.GetGlobalValueBool(Keys.DontAllowDataCollectionIfOverused.ToString(), SensorConstants.SENSOR_OVERUSE_DEFAULT, false);
|
|
set
|
|
{
|
|
SettingsDB.SetGlobalValueBoolean(Keys.DontAllowDataCollectionIfOverused.ToString(),
|
|
value);
|
|
SensorConstants.DontAllowDataCollectionIfOverused = value;
|
|
}
|
|
}
|
|
/// <summary>
|
|
/// The number of uses remaining when a warning will be displayed
|
|
/// </summary>
|
|
public static int UsageRemainingForWarning
|
|
{
|
|
get => SettingsDB.GetGlobalValueInt(Keys.UsageRemainingForWarning.ToString(),
|
|
SensorConstants.SENSOR_USAGE_REMAINING_FOR_WARNING_DEFAULT);
|
|
set
|
|
{
|
|
SettingsDB.SetGlobalValueInt(Keys.UsageRemainingForWarning.ToString(),
|
|
value);
|
|
SensorConstants.UsageRemainingForWarning = value;
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// The default maximum number of uses for a newly-created sensor
|
|
/// </summary>
|
|
public static int DefaultMaxUsageAllowed
|
|
{
|
|
get => SettingsDB.GetGlobalValueInt(Keys.DefaultMaxUsageAllowed.ToString(),
|
|
SensorConstants.SENSOR_DEFAULT_MAX_USAGE_DEFAULT);
|
|
set
|
|
{
|
|
SettingsDB.SetGlobalValueInt(Keys.DefaultMaxUsageAllowed.ToString(),
|
|
value);
|
|
SensorConstants.DefaultMaxUsageAllowed = value;
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// all available positions from the iso database (default)
|
|
/// 15457 add error validation against valid ISO test object and position controlled by a site bool in system settings
|
|
/// </summary>
|
|
public const string ISO_POSITIONS_DEFAULT = "0,1,2,3,4,5,6,7,8,9,A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z";
|
|
/// <summary>
|
|
/// all available test objects from the iso database (default)
|
|
/// 15457 add error validation against valid ISO test object and position controlled by a site bool in system settings
|
|
/// </summary>
|
|
public const string ISO_TESTOBJECTS_DEFAULT = "0,1,2,3,4,5,6,7,8,9,B,C,D,H,M,P,S,T";
|
|
/// <summary>
|
|
/// gets all valid iso positions
|
|
/// 15457 add error validation against valid ISO test object and position controlled by a site bool in system settings
|
|
/// </summary>
|
|
/// <returns></returns>
|
|
public static string[] GetValidISOPositions()
|
|
{
|
|
return SettingsDB.GetGlobalValue(Keys.ISOPositions.ToString(), ISO_POSITIONS_DEFAULT)
|
|
.Split(new[] { ',' }, StringSplitOptions.RemoveEmptyEntries);
|
|
}
|
|
/// <summary>
|
|
/// gets all valid iso test objects
|
|
/// 15457 add error validation against valid ISO test object and position controlled by a site bool in system settings
|
|
/// </summary>
|
|
/// <returns></returns>
|
|
public static string[] GetValidISOTestObjects()
|
|
{
|
|
return SettingsDB.GetGlobalValue(Keys.ISOTestObjects.ToString(), ISO_TESTOBJECTS_DEFAULT)
|
|
.Split(new[] { ',' }, StringSplitOptions.RemoveEmptyEntries);
|
|
}
|
|
/// <summary>
|
|
/// the default value for whether to validate position and test object fields of an isocode as part of
|
|
/// test setup validation
|
|
/// 15457 add error validation against valid ISO test object and position controlled by a site bool in system settings
|
|
/// </summary>
|
|
public const bool VALIDATE_TEST_POSITION_AND_TEST_OBJECT_DEFAULT = false;
|
|
/// <summary>
|
|
/// Whether to validate the position and test object fields of channel isocodes as part of test setup validation
|
|
/// note this is only done if iso codes are shown in the first place
|
|
/// 15457 add error validation against valid ISO test object and position controlled by a site bool in system settings
|
|
/// </summary>
|
|
public static bool ValidateTestPositionAndTestObject
|
|
{
|
|
get => SettingsDB.GetGlobalValueBool(Keys.ValidateTestPositionAndTestObject.ToString(),
|
|
VALIDATE_TEST_POSITION_AND_TEST_OBJECT_DEFAULT);
|
|
set => SettingsDB.SetGlobalValueBoolean(Keys.ValidateTestPositionAndTestObject.ToString(), value);
|
|
}
|
|
|
|
/// <summary>
|
|
/// the default value for whether to export actual range or desired range when exporting ISO MME
|
|
/// 15392 Exported CAC in the MME file is the requested CAC not the actual CAC
|
|
/// </summary>
|
|
public const bool EXPORT_ACTUAL_RANGE_ISOMME_DEFAULT = false;
|
|
/// <summary>
|
|
/// the current value for whether to export actual range or desired range when exporting ISO MME
|
|
/// 15392 Exported CAC in the MME file is the requested CAC not the actual CAC
|
|
/// </summary>
|
|
public static bool ExportActualRangeISOMME
|
|
{
|
|
get => SettingsDB.GetGlobalValueBool(Keys.ExportActualRangeForISOMME.ToString(),
|
|
EXPORT_ACTUAL_RANGE_ISOMME_DEFAULT);
|
|
set => SettingsDB.SetGlobalValueBoolean(Keys.ExportActualRangeForISOMME.ToString(), value);
|
|
}
|
|
/// <summary>
|
|
/// the default value for the interval between beeps while waiting for level trigger
|
|
/// 15393 DataPRO Realtime Trigger, Freeze, Advance
|
|
/// </summary>
|
|
public const int REALTIME_LEVELTRIGGER_BEEP_IDLE_INTERVAL_MS_DEFAULT = 1000;
|
|
/// <summary>
|
|
/// the current value for the interval between beeps while waiting for level trigger (in ms)
|
|
/// Only valid when UseTestChannelOrder and LevelTriggerOn are true
|
|
/// 15393 DataPRO Realtime Trigger, Freeze, Advance
|
|
/// </summary>
|
|
public static int RealtimeLevelTriggerBeepIdleIntervalMS
|
|
{
|
|
get => SettingsDB.GetGlobalValueInt(Keys.RealtimeLevelTriggerBeepIdleInterval.ToString(),
|
|
REALTIME_LEVELTRIGGER_BEEP_IDLE_INTERVAL_MS_DEFAULT);
|
|
set => SettingsDB.SetGlobalValueInt(Keys.RealtimeLevelTriggerBeepIdleInterval.ToString(), value);
|
|
}
|
|
/// <summary>
|
|
/// the default value for whether to beep while waiting for level trigger
|
|
/// 15393 DataPRO Realtime Trigger, Freeze, Advance
|
|
/// </summary>
|
|
public const bool REALTIME_LEVELTRIGGER_BEEP_IDLE_DEFAULT = true;
|
|
/// <summary>
|
|
/// the current value for whether to beep while waiting for level trigger
|
|
/// only valid when UseTestChannelOrder and LevelTriggerOn are true
|
|
/// 15393 DataPRO Realtime Trigger, Freeze, Advance
|
|
/// </summary>
|
|
public static bool RealtimeLevelTriggerBeepIdle
|
|
{
|
|
get => SettingsDB.GetGlobalValueBool(Keys.RealtimeLevelTriggerBeepIdle.ToString(),
|
|
REALTIME_LEVELTRIGGER_BEEP_IDLE_DEFAULT);
|
|
set => SettingsDB.SetGlobalValueBoolean(Keys.RealtimeLevelTriggerBeepIdle.ToString(), value);
|
|
}
|
|
/// <summary>
|
|
/// the default value for how many samples must be across the level trigger before the trigger is recognized
|
|
/// 15393 DataPRO Realtime Trigger, Freeze, Advance
|
|
/// </summary>
|
|
public const int REALTIME_LEVELTRIGGER_QUALIFYING_SAMPLES_DEFAULT = 2;
|
|
/// <summary>
|
|
/// the current value for how many samples must be across the level trigger before the trigger is recognized
|
|
/// only valid when UsetTestChannelOrder and LevelTriggerOn are true
|
|
/// 15393 DataPRO Realtime Trigger, Freeze, Advance
|
|
/// </summary>
|
|
public static int RealtimeLevelTriggerQualifyingSamples
|
|
{
|
|
get => SettingsDB.GetGlobalValueInt(Keys.RealtimeLevelTriggerQualifyingSamples.ToString(),
|
|
REALTIME_LEVELTRIGGER_QUALIFYING_SAMPLES_DEFAULT);
|
|
set => SettingsDB.SetGlobalValueInt(Keys.RealtimeLevelTriggerQualifyingSamples.ToString(), value);
|
|
}
|
|
|
|
///// <summary>
|
|
///// default value for whether level triggers are used in realtime
|
|
///// 15393 DataPRO Realtime Trigger, Freeze, Advance
|
|
///// </summary>
|
|
//public const bool REALTIME_LEVELTRIGGER_ON_DEFAULT = false;
|
|
///// <summary>
|
|
///// current value for whether level triggers are used in realtime
|
|
///// only valid when UseTestChannelOrder is true
|
|
///// 15393 DataPRO Realtime Trigger, Freeze, Advance
|
|
///// </summary>
|
|
//public static bool RealtimeLevelTriggerOn
|
|
//{
|
|
// get => SettingsDB.GetGlobalValueBool(Keys.RealtimeLevelTriggerOn.ToString(),
|
|
// REALTIME_LEVELTRIGGER_ON_DEFAULT);
|
|
// set => SettingsDB.SetGlobalValueBoolean(Keys.RealtimeLevelTriggerOn.ToString(), value);
|
|
//}
|
|
|
|
/// <summary>
|
|
/// the default value for whether level trigger check is required for all channels in realtime
|
|
/// 15393 DataPRO Realtime Trigger, Freeze, Advance
|
|
/// </summary>
|
|
public const bool REALTIME_REQUIRE_LEVELTRIGGER_CHECK_COMPLETION_DEFAULT = true;
|
|
|
|
/// <summary>
|
|
/// the current value for whether level trigger check is required for all channels in realtime
|
|
/// only valid when UseTestChannelOrder and RealtimeLevelTriggerOn are true
|
|
/// 15393 DataPRO Realtime Trigger, Freeze, Advance
|
|
/// </summary>
|
|
public static bool RealtimeRequireLevelTriggerCheckCompletion
|
|
{
|
|
get => SettingsDB.GetGlobalValueBool(Keys.RealtimeRequireLevelTriggerCheckCompletion.ToString(),
|
|
REALTIME_REQUIRE_LEVELTRIGGER_CHECK_COMPLETION_DEFAULT);
|
|
set => SettingsDB.SetGlobalValueBoolean(Keys.RealtimeRequireLevelTriggerCheckCompletion.ToString(),
|
|
value);
|
|
}
|
|
|
|
/// <summary>
|
|
/// the default value for how to to freeze realtime when level trigger is crossed (secs)
|
|
/// 15393 DataPRO Realtime Trigger, Freeze, Advance
|
|
/// </summary>
|
|
public const int REALTIME_LEVELTRIGGER_FREEZETIME_SEC_DEFAULT = 2;
|
|
/// <summary>
|
|
/// the current value for how long to freeze realtime when level trigger is crossed (seconds)
|
|
/// Only valid when UseTestChannelOrder and RealtimeLevelTriggerOn are true
|
|
/// 15393 DataPRO Realtime Trigger, Freeze, Advance
|
|
/// </summary>
|
|
public static int RealtimeLevelTriggerFreezeTimeSec
|
|
{
|
|
get => SettingsDB.GetGlobalValueInt(Keys.RealtimeLevelTriggerFreezeTimeSec.ToString(), REALTIME_LEVELTRIGGER_FREEZETIME_SEC_DEFAULT);
|
|
set => SettingsDB.SetGlobalValueInt(Keys.RealtimeLevelTriggerFreezeTimeSec.ToString(), value);
|
|
}
|
|
|
|
/// <summary>
|
|
/// the default for whether to auto advance when level trigger is crossed
|
|
/// 15393 DataPRO Realtime Trigger, Freeze, Advance
|
|
/// </summary>
|
|
public const bool REALTIME_LEVELTRIGGER_AUTO_ADVANCE_DEFAULT = true;
|
|
/// <summary>
|
|
/// the current value for whether to auto advance when level trigger is crossed
|
|
/// only valid when UseTestChannelOrder and RealtimeLevelTriggerOn are true
|
|
/// 15393 DataPRO Realtime Trigger, Freeze, Advance
|
|
/// </summary>
|
|
public static bool RealtimeLevelTriggerAutoAdvance
|
|
{
|
|
get => SettingsDB.GetGlobalValueBool(Keys.RealtimeLevelTriggerAutoAdvance.ToString(),
|
|
REALTIME_LEVELTRIGGER_AUTO_ADVANCE_DEFAULT);
|
|
set => SettingsDB.SetGlobalValueBoolean(Keys.RealtimeLevelTriggerAutoAdvance.ToString(),
|
|
value);
|
|
}
|
|
|
|
/// <summary>
|
|
/// The default for how many beeps to do after level trigger is crossed
|
|
/// 15393 DataPRO Realtime Trigger, Freeze, Advance
|
|
/// </summary>
|
|
public const int REALTIME_LEVELTRIGGER_BEEP_COUNT_DEFAULT = 3;
|
|
/// <summary>
|
|
/// The current value for how many beeps to do after level trigger is crossed
|
|
/// only valid when UseTestChannelOrder and RealtimeLevelTriggerOn are true
|
|
/// a value of 0 means no beeps
|
|
/// 15393 DataPRO Realtime Trigger, Freeze, Advance
|
|
/// </summary>
|
|
public static int RealtimeLevelTriggerBeepCount
|
|
{
|
|
get => SettingsDB.GetGlobalValueInt(Keys.RealtimeLevelTriggerBeepCount.ToString(),
|
|
REALTIME_LEVELTRIGGER_BEEP_COUNT_DEFAULT);
|
|
set => SettingsDB.SetGlobalValueInt(Keys.RealtimeLevelTriggerBeepCount.ToString(), value);
|
|
}
|
|
/// <summary>
|
|
/// the default value for the interval between beeps when level trigger is crossed
|
|
/// 15393 DataPRO Realtime Trigger, Freeze, Advance
|
|
/// </summary>
|
|
public const int REALTIME_LEVELTRIGGER_BEEP_INTERVAL_DEFAULT = 0;
|
|
/// <summary>
|
|
/// the current value for the interval between beeps when level trigger is crossed
|
|
/// only valid when UseTestChannelOrder and RealtimeLevelTriggerOn are true
|
|
/// 15393 DataPRO Realtime Trigger, Freeze, Advance
|
|
/// </summary>
|
|
public static int RealtimeLevelTriggerBeepIntervalMS
|
|
{
|
|
get => SettingsDB.GetGlobalValueInt(Keys.RealtimeLevelTriggerBeepIntervalMS.ToString(),
|
|
REALTIME_LEVELTRIGGER_BEEP_INTERVAL_DEFAULT);
|
|
set => SettingsDB.SetGlobalValueInt(Keys.RealtimeLevelTriggerBeepIntervalMS.ToString(),
|
|
value);
|
|
}
|
|
/// <summary>
|
|
/// the default value in percentages of full scale that level trigger should be for
|
|
/// </summary>
|
|
public const double REALTIME_LEVELTRIGGER_PERCENTAGE_DEFAULT = 10D;
|
|
/// <summary>
|
|
/// the current value for the percentage of full scale that level trigger should be for
|
|
/// Only valid when UseTestChannelOrder and RealtimeLevelTriggerOn are true
|
|
/// 15393 DataPRO Realtime Trigger, Freeze, Advance
|
|
/// </summary>
|
|
public static double RealtimeLevelTriggerPercentage
|
|
{
|
|
get => SettingsDB.GetGlobalValueDouble(Keys.RealtimeLevelTriggerPercentage.ToString(), REALTIME_LEVELTRIGGER_PERCENTAGE_DEFAULT);
|
|
set => SettingsDB.SetGlobalValueDouble(Keys.RealtimeLevelTriggerPercentage.ToString(), value);
|
|
}
|
|
|
|
public const string REALTIME_UDP_STREAM_ADDRESS_DEFAULT = "UDP://239.1.2.10:8400";
|
|
public static string RealtimeUDPStreamAddress
|
|
{
|
|
get => SettingsDB.GetGlobalValue(Keys.RealtimeUDPStreamAddress.ToString(),
|
|
REALTIME_UDP_STREAM_ADDRESS_DEFAULT);
|
|
set => SettingsDB.SetGlobalValue(Keys.RealtimeUDPStreamAddress.ToString(), value);
|
|
}
|
|
public const bool USE_UDP_STREAMING_DEFAULT = false;
|
|
public static bool UseUDPStreaming
|
|
{
|
|
get => false;
|
|
}
|
|
/// <summary>
|
|
/// default for whether push and pull of sensors is allowed
|
|
/// 12723 Parent Case for Push/Pull of Sensor Parameters
|
|
/// </summary>
|
|
public const bool ALLOW_SENSOR_PUSH_AND_PULL_DEFAULT = false;
|
|
|
|
/// <summary>
|
|
/// Whether application allows pushing of sensor parameters to groups and test setups
|
|
/// 12723 Parent Case for Push/Pull of Sensor Parameters
|
|
/// </summary>
|
|
public static bool AllowSensorPushAndPull
|
|
{
|
|
get => SettingsDB.GetGlobalValueBool(Keys.AllowSensorPushAndPull.ToString(),
|
|
ALLOW_SENSOR_PUSH_AND_PULL_DEFAULT);
|
|
set => SettingsDB.SetGlobalValueBoolean(Keys.AllowSensorPushAndPull.ToString(), value);
|
|
}
|
|
|
|
/// <summary>
|
|
/// default for Actual range low limit for analog sensors, this is compared against the sensor desired range
|
|
/// </summary>
|
|
public const double ACTUAL_RANGE_LOWER_LIMIT_DEFAULT = 1.0D;
|
|
|
|
/// <summary>
|
|
/// the actual range low limit for analog sensors, this is compared against the sensor desired range
|
|
/// this is used to warn of unexpected gain situations
|
|
/// </summary>
|
|
public static double ActualRangeLowerLimit
|
|
{
|
|
get => SettingsDB.GetGlobalValueDouble(Keys.ActualRangeLowerLimit.ToString(),
|
|
ACTUAL_RANGE_LOWER_LIMIT_DEFAULT);
|
|
set => SettingsDB.SetGlobalValueDouble(Keys.ActualRangeLowerLimit.ToString(), value);
|
|
}
|
|
/// <summary>
|
|
/// default for actual range high limit for analog sensors, this is compared agains the sensor desired range with headroom/overhead
|
|
/// </summary>
|
|
public const double ACTUAL_RANGE_UPPER_LIMIT_DEFAULT = 2.5D;
|
|
/// <summary>
|
|
/// the actual range high limit for analog sensors, this is compared against the sensor desired range with headroom/overhead
|
|
/// this is used to warn of unexpected gain situations
|
|
/// </summary>
|
|
public static double ActualRangeUpperLimit
|
|
{
|
|
get => SettingsDB.GetGlobalValueDouble(Keys.ActualRangeUpperLimit.ToString(),
|
|
ACTUAL_RANGE_UPPER_LIMIT_DEFAULT);
|
|
set => SettingsDB.SetGlobalValueDouble(Keys.ActualRangeUpperLimit.ToString(), value);
|
|
}
|
|
|
|
/// <summary>
|
|
/// default for whether to disable auto detect or not
|
|
/// 14634 Implement enable/disable of the "SLICE PRO Auto-sense" feature
|
|
/// </summary>
|
|
public const bool DISABLE_AUTOSENSE_DEFAULT = false;
|
|
|
|
/// <summary>
|
|
/// Populates SensorConstants.DisableAutoSense by deserializing from the db
|
|
/// 14634 Implement enable/disable of the "SLICE PRO Auto-sense" feature
|
|
/// </summary>
|
|
public static void PopulateDisableAutoSense()
|
|
{
|
|
SensorConstants.DisableAutoSense = SettingsDB.GetGlobalValueBool(Keys.DisableAutoSense.ToString(), DISABLE_AUTOSENSE_DEFAULT);
|
|
}
|
|
/// <summary>
|
|
/// the default value for whether to show eu offsets or not (no, by default don't show)
|
|
/// </summary>
|
|
public const bool DISPLAY_EU_OFFSET_DEFAULT = false;
|
|
|
|
/// <summary>
|
|
/// the current setting value in the db to show eu offsets or not
|
|
/// </summary>
|
|
public static bool DisplayEUOffset
|
|
{
|
|
get => SettingsDB.GetGlobalValueBool(Keys.DisplayEUOffset.ToString(), DISPLAY_EU_OFFSET_DEFAULT);
|
|
set => SettingsDB.SetGlobalValueBoolean(Keys.DisplayEUOffset.ToString(), value);
|
|
}
|
|
/// <summary>
|
|
/// controls whether to display analog ADC for SLICE PRO Digital
|
|
/// </summary>
|
|
public static bool DisplaySPDADC
|
|
{
|
|
get => SettingsDB.GetGlobalValueBool(Keys.DisplaySPDADC.ToString(), DigitalInputs.DisplaySPDADCDefault);
|
|
set => SettingsDB.SetGlobalValueBoolean(Keys.DisplaySPDADC.ToString(), value);
|
|
}
|
|
|
|
/// <summary>
|
|
/// the breakpoint in ADC where transition is made from active/default state for digital inputs
|
|
/// This breakpoint is only valid for Transition High to Low (THL) or TLH
|
|
/// 14435 Store SPD data as analog, but show in viewers as digital, expose Digital break point
|
|
/// </summary>
|
|
public static double VoltageInputBreakpointADC
|
|
{
|
|
get => SettingsDB.GetGlobalValueDouble(Keys.VoltageInputBreakpoint.ToString(), DigitalInputs.VoltageInputBreakPointDefault);
|
|
set => SettingsDB.SetGlobalValueDouble(Keys.VoltageInputBreakpoint.ToString(), value);
|
|
}
|
|
/// <summary>
|
|
/// the breakpoint in ADC where transition is made from active/default state for digital inputs
|
|
/// This breakpoint is only valid for Constant Current Normal Open (CCNO) or Normaly Closed (CCNC)
|
|
/// 14435 Store SPD data as analog, but show in viewers as digital, expose Digital break point
|
|
/// </summary>
|
|
public static double ConstantCurrentInputBreakpointADC
|
|
{
|
|
get => SettingsDB.GetGlobalValueDouble(Keys.ConstantCurrentInputBreakpoint.ToString(),
|
|
DigitalInputs.ConstantCurrentBreakPointDefault);
|
|
set => SettingsDB.SetGlobalValueDouble(Keys.ConstantCurrentInputBreakpoint.ToString(), value);
|
|
}
|
|
|
|
public const double IEPE_RANGE_HIGH_LIMIT = 100D;
|
|
public const double IEPE_RANGE_LOW_LIMIT = 1D;
|
|
|
|
public static double IEPERangeHighLimitScalar
|
|
{
|
|
get => SettingsDB.GetGlobalValueDouble(Keys.IEPERangeHighLimitScalar.ToString(), IEPE_RANGE_HIGH_LIMIT);
|
|
set => SettingsDB.SetGlobalValueDouble(Keys.IEPERangeHighLimitScalar.ToString(), value);
|
|
}
|
|
|
|
public static double IEPERangeLowLimitScalar
|
|
{
|
|
get => SettingsDB.GetGlobalValueDouble(Keys.IEPERangeLowLimitScalar.ToString(), IEPE_RANGE_LOW_LIMIT);
|
|
set => SettingsDB.SetGlobalValueDouble(Keys.IEPERangeLowLimitScalar.ToString(), value);
|
|
}
|
|
|
|
public const double _24VPOWER_LOW_DEFAULT = 23D;
|
|
public const double _24VPOWER_HIGH_DEFAULT = 26.5D;
|
|
/// <summary>
|
|
/// returns the min value for an acceptable 24V power reading
|
|
/// </summary>
|
|
public static double _24VPowerLow
|
|
{
|
|
get => SettingsDB.GetGlobalValueDouble(Keys._24VPowerLow.ToString(), _24VPOWER_LOW_DEFAULT);
|
|
set => SettingsDB.SetGlobalValueDouble(Keys._24VPowerLow.ToString(), value);
|
|
}
|
|
/// <summary>
|
|
/// returns the max value for an acceptable 24V power reading
|
|
/// </summary>
|
|
public static double _24VPowerHigh
|
|
{
|
|
get => SettingsDB.GetGlobalValueDouble(Keys._24VPowerHigh.ToString(), _24VPOWER_HIGH_DEFAULT);
|
|
set => SettingsDB.SetGlobalValueDouble(Keys._24VPowerHigh.ToString(), value);
|
|
}
|
|
/// <summary>
|
|
/// the default for the property "AllowPushPullOfGroupModificationsToTestSetups"
|
|
/// </summary>
|
|
public const bool ALLOW_PUSH_PULL_OF_GROUP_MODIFICATIONS_TO_TEST_SETUPS_DEFAULT = false;
|
|
/// <summary>
|
|
/// controls whether modifications to static Groups can be pushed/pulled to Test Setups
|
|
/// </summary>
|
|
public static bool AllowPushPullOfGroupModificationsToTestSetups
|
|
{
|
|
get => SettingsDB.GetGlobalValueBool(Keys.AllowPushPullOfGroupModificationsToTestSetups.ToString(), ALLOW_PUSH_PULL_OF_GROUP_MODIFICATIONS_TO_TEST_SETUPS_DEFAULT);
|
|
set => SettingsDB.SetGlobalValueBoolean(Keys.AllowPushPullOfGroupModificationsToTestSetups.ToString(), value);
|
|
}
|
|
|
|
/// <summary>
|
|
/// the default for the property "HideRegionOfInterest"
|
|
/// </summary>
|
|
public const bool ENABLE_REGION_OF_INTEREST = true;
|
|
/// <summary>
|
|
/// controls whether to show the ROI or not
|
|
/// </summary>
|
|
public static bool EnableRegionOfInterest
|
|
{
|
|
get => SettingsDB.GetGlobalValueBool(Keys.EnableRegionOfInterest.ToString(), ENABLE_REGION_OF_INTEREST);
|
|
set => SettingsDB.SetGlobalValueBoolean(Keys.EnableRegionOfInterest.ToString(), value);
|
|
}
|
|
|
|
/// <summary>
|
|
/// the default for the property "HideClockSourceSelect"
|
|
/// </summary>
|
|
public const bool ENABLE_CLOCK_SOURCE_SELECT = false;
|
|
/// <summary>
|
|
/// controls whether to show the clock source options or not
|
|
/// </summary>
|
|
public static bool EnableClockSourceSelect
|
|
{
|
|
get => SettingsDB.GetGlobalValueBool(Keys.EnableClockSourceSelect.ToString(), ENABLE_CLOCK_SOURCE_SELECT);
|
|
set => SettingsDB.SetGlobalValueBoolean(Keys.EnableClockSourceSelect.ToString(), value);
|
|
}
|
|
|
|
/// <summary>
|
|
/// the default for the property "ShowSensorChannelUserValues"
|
|
/// </summary>
|
|
public const bool SHOW_SENSOR_CHANNEL_USER_VALUES = false;
|
|
/// <summary>
|
|
/// controls whether to show UserValueX or not
|
|
/// </summary>
|
|
public static bool ShowSensorChannelUserValues
|
|
{
|
|
get => SettingsDB.GetGlobalValueBool(Keys.ShowSensorChannelUserValues.ToString(), SHOW_SENSOR_CHANNEL_USER_VALUES);
|
|
set => SettingsDB.SetGlobalValueBoolean(Keys.ShowSensorChannelUserValues.ToString(), value);
|
|
}
|
|
|
|
/// <summary>
|
|
/// the default for the property "FireDigitalOutputsDuringDiagnostics"
|
|
/// </summary>
|
|
public const bool FIRE_DIGITAL_OUTPUTS_DURING_DIAGNOSTICS_DEFAULT = true;
|
|
/// <summary>
|
|
/// controls whether digital outputs are fired during diagnostics
|
|
/// </summary>
|
|
public static bool FireDigitalOutputsDuringDiagnostics
|
|
{
|
|
get => SettingsDB.GetGlobalValueBool(Keys.FireDigitalOutputsDuringDiagnostics.ToString(), FIRE_DIGITAL_OUTPUTS_DURING_DIAGNOSTICS_DEFAULT);
|
|
set => SettingsDB.SetGlobalValueBoolean(Keys.FireDigitalOutputsDuringDiagnostics.ToString(), value);
|
|
}
|
|
|
|
public const bool ALWAYS_LOAD_FROM_DB_DEFAULT = true;
|
|
/// <summary>
|
|
/// controls whether test setups are always loaded from the db during running or editing
|
|
/// DEPRECATED
|
|
/// </summary>
|
|
public static bool AlwaysLoadFromDb
|
|
{
|
|
get => SettingsDB.GetGlobalValueBool(Keys.AlwaysLoadFromDb.ToString(),
|
|
ALWAYS_LOAD_FROM_DB_DEFAULT);
|
|
set => SettingsDB.SetGlobalValueBoolean(Keys.AlwaysLoadFromDb.ToString(), value);
|
|
}
|
|
public const bool CSV_DYNAMIC_GROUPS_DEFAULT = true;
|
|
/// <summary>
|
|
/// controls whether groups are created by CSV Import should use static or dynamic groups
|
|
/// dynamic groups allow you to edit channels of the group in test setup, while static
|
|
/// groups let you use that group in multiple test setups
|
|
/// HMC should use static groups, MIRA should use dynamic at this time
|
|
/// </summary>
|
|
public static bool ImportCreateDynamicGroups
|
|
{
|
|
get => SettingsDB.GetGlobalValueBool(Keys.ImportCreateDynamicGroups.ToString(),
|
|
CSV_DYNAMIC_GROUPS_DEFAULT);
|
|
set => SettingsDB.SetGlobalValueBoolean(Keys.ImportCreateDynamicGroups.ToString(), value);
|
|
}
|
|
/// <summary>
|
|
/// the default for whether to allow "DAS" selection for "Shift T0" Test Modification (FB 11625)
|
|
/// </summary>
|
|
public const bool APPLY_SHIFT_T0_MODS_TEST_ONLY_DEFAULT = false;
|
|
|
|
/// <summary>
|
|
/// Whether to allow "DAS" selection for "Shift T0" Test Modification (FB 11625)
|
|
/// </summary>
|
|
public static bool ApplyShiftT0ModsTestOnly
|
|
{
|
|
get => SettingsDB.GetGlobalValueBool(Keys.ApplyShiftT0ModsTestOnly.ToString(), APPLY_SHIFT_T0_MODS_TEST_ONLY_DEFAULT);
|
|
set => SettingsDB.SetGlobalValueBoolean(Keys.ApplyShiftT0ModsTestOnly.ToString(), value);
|
|
}
|
|
|
|
/// <summary>
|
|
/// the default for whether to allow non-Admin/PowerUsers to modify Test Setup fields (FB 10503)
|
|
/// </summary>
|
|
public const bool ALLOW_MODIFY_DEFAULT = false;
|
|
|
|
/// <summary>
|
|
/// </summary>
|
|
public static bool AllowModify
|
|
{
|
|
get => SettingsDB.GetGlobalValueBool(Keys.AllowModify.ToString(), ALLOW_MODIFY_DEFAULT);
|
|
set => SettingsDB.SetGlobalValueBoolean(Keys.AllowModify.ToString(), value);
|
|
}
|
|
|
|
/// <summary>
|
|
/// the default for whether to adjust data by one sample after filtering
|
|
/// 8747
|
|
/// </summary>
|
|
public const bool USE_LEGACY_TDC_SOFTWARE_FILTER_ADJUSTMENT_DEFAULT = false;
|
|
|
|
/// <summary>
|
|
/// controls whether data is adjusted by one sample after filtering
|
|
/// TDC software filtering adjusts data by one sample, this lets the user
|
|
/// preserve that behavior if they want
|
|
/// </summary>
|
|
public static bool UseLegacyTDCSoftwareFilterAdjustment
|
|
{
|
|
get => SettingsDB.GetGlobalValueBool(Keys.UseLegacyTDCSoftwareFilterAdjustment.ToString(),
|
|
USE_LEGACY_TDC_SOFTWARE_FILTER_ADJUSTMENT_DEFAULT);
|
|
set
|
|
{
|
|
SettingsDB.SetGlobalValueBoolean(Keys.UseLegacyTDCSoftwareFilterAdjustment.ToString(), value);
|
|
DTS.Serialization.File.UseLegacyTDCSoftwareFiltering = value;
|
|
}
|
|
}
|
|
/// <summary>
|
|
/// default for whether to apply TDC legacy software filters to a squib channel
|
|
/// TDC ordinarily applys a CFC1000 filter to any squib data at > 8k sps
|
|
/// </summary>
|
|
public const bool USE_LEGACY_TOM_CFC_DEFAULT = false;
|
|
/// <summary>
|
|
/// controls whether a default CFC is set for squib channels using TDC norms
|
|
/// TDC ordinarily applies a CFC1000 filter to any squib data at > 8k sps
|
|
/// </summary>
|
|
public static bool UseLegacyTOMCFC
|
|
{
|
|
get => SettingsDB.GetGlobalValueBool(Keys.UseLegacyTOMCFC.ToString(), USE_LEGACY_TOM_CFC_DEFAULT);
|
|
set => SettingsDB.SetGlobalValueBoolean(Keys.UseLegacyTOMCFC.ToString(), value);
|
|
}
|
|
|
|
|
|
|
|
|
|
public const string SLICE6_MULTICAST_ADDRESS_DEFAULT = "239.1.2.3";
|
|
/// <summary>
|
|
/// SLICE6 multicast broadcast address, default 239.1.2.3
|
|
/// </summary>
|
|
public static string SLICE6MulticastAddress
|
|
{
|
|
get => SettingsDB.GetGlobalValue(Keys.SLICE6MulticastAddress.ToString(), SLICE6_MULTICAST_ADDRESS_DEFAULT);
|
|
set => SettingsDB.SetGlobalValue(Keys.SLICE6MulticastAddress.ToString(), value);
|
|
}
|
|
|
|
public const int SLICE6_MULTICAST_COMMAND_PORT_DEFAULT = 8501;
|
|
/// <summary>
|
|
/// SLICE6 multicast hello port, default 8501
|
|
/// </summary>
|
|
public static int SLICE6MulticastCommandPort
|
|
{
|
|
get => SettingsDB.GetGlobalValueInt(Keys.SLICE6MulticastCommandPort.ToString(), SLICE6_MULTICAST_COMMAND_PORT_DEFAULT);
|
|
set => SettingsDB.SetGlobalValueInt(Keys.SLICE6MulticastCommandPort.ToString(), value);
|
|
}
|
|
|
|
public const int SLICE6_MULTICAST_RESPONSE_PORT_DEFAULT = 8503;
|
|
/// <summary>
|
|
/// SLICE6 multicast response port, default 8503
|
|
/// </summary>
|
|
public static int SLICE6MulticastResponsePort
|
|
{
|
|
get => SettingsDB.GetGlobalValueInt(Keys.SLICE6MulticastResponsePort.ToString(),
|
|
SLICE6_MULTICAST_RESPONSE_PORT_DEFAULT);
|
|
set => SettingsDB.SetGlobalValueInt(Keys.SLICE6MulticastResponsePort.ToString(), value);
|
|
}
|
|
|
|
public const bool WARN_ON_EID_POSITION_SWAP_DEFAULT = false;
|
|
/// <summary>
|
|
/// http://fogbugz/fogbugz/default.asp?9524 - Warn on position swap of EID on DAS channel
|
|
/// this setting will warn the user when there is a EID in the wrong spot in check channels of run test
|
|
/// </summary>
|
|
public static bool WarnOnEIDPositionSwap
|
|
{
|
|
get => SettingsDB.GetGlobalValueBool(Keys.WarnOnEIDPositionSwap.ToString(),
|
|
WARN_ON_EID_POSITION_SWAP_DEFAULT);
|
|
set => SettingsDB.SetGlobalValueBoolean(Keys.WarnOnEIDPositionSwap.ToString(), value);
|
|
}
|
|
|
|
public const bool ALLOW_EID_SENSORS_OUT_OF_PLACE_DEFAULT = false;
|
|
/// <summary>
|
|
/// http://fogbugz/fogbugz/default.asp?9524 - Warn on position swap of EID on DAS channel
|
|
/// this setting will control whether the user is allowed to proceed when an EID is out of place
|
|
/// </summary>
|
|
public static bool AllowEIDSensorsOutOfPlace
|
|
{
|
|
get => SettingsDB.GetGlobalValueBool(Keys.AllowEIDSensorsOutOfPlace.ToString(),
|
|
ALLOW_EID_SENSORS_OUT_OF_PLACE_DEFAULT);
|
|
set => SettingsDB.SetGlobalValueBoolean(Keys.AllowEIDSensorsOutOfPlace.ToString(), value);
|
|
}
|
|
|
|
public const int MaxParallelTDASDownloadsDefault = 4;
|
|
/// <summary>
|
|
/// returns the max number of TDAS downloads to run in parallel when using download mode parallel by type
|
|
/// </summary>
|
|
public static int MaxParallelTDASDownloads
|
|
{
|
|
get => SettingsDB.GetGlobalValueInt(Keys.MaxParallelTDASDownloads.ToString(),
|
|
MaxParallelTDASDownloadsDefault);
|
|
set => SettingsDB.SetGlobalValueInt(Keys.MaxParallelTDASDownloads.ToString(), value);
|
|
}
|
|
|
|
#region PowerAndBattery
|
|
//public const string SLICE_Distributor_PowerSetting_Default = "7.8,9,6.8,9,10,15.3,6.5,15.3,4,4,9,19,8.4,7.9,12.7,10.9";
|
|
public static readonly DasBatteryInputSettings
|
|
SLICE_Distributor_PowerSetting_Default = new DasBatteryInputSettings()
|
|
{
|
|
BatteryLowDiagnosticsThreshold = 7.8,
|
|
BatteryHighDiagnosticsThreshold = 9,
|
|
BatteryLowArmedThreshold = 6.8,
|
|
BatteryHighArmedThreshold = 9,
|
|
InputLowDiagnosticsThreshold = 10,
|
|
InputHighDiagnosticsThreshold = 15.3,
|
|
InputLowArmedThreshold = 6.5,
|
|
InputHighArmedThreshold = 15.3,
|
|
MinimumValidBatteryThreshold = 4,
|
|
MinimumValidInputThreshold = 4,
|
|
MaximumValidBatteryThreshold = 9,
|
|
MaximumValidInputThreshold = 19,
|
|
BatteryMediumDiagnosticsThreshold = 8.0,
|
|
BatteryMediumArmedThreshold = 7.9,
|
|
InputMediumDiagnosticsThreshold = 12.7,
|
|
InputMediumArmedThreshold = 10.9,
|
|
};
|
|
|
|
public static readonly DasBatteryInputSettings
|
|
SLICE_Mini_Distributor_PowerSetting_Default = new DasBatteryInputSettings()
|
|
{
|
|
BatteryLowDiagnosticsThreshold = 7.8,
|
|
BatteryHighDiagnosticsThreshold = 9,
|
|
BatteryLowArmedThreshold = 6.8,
|
|
BatteryHighArmedThreshold = 9,
|
|
InputLowDiagnosticsThreshold = 10,
|
|
InputHighDiagnosticsThreshold = 15.3,
|
|
InputLowArmedThreshold = 6.5,
|
|
InputHighArmedThreshold = 15.3,
|
|
MinimumValidBatteryThreshold = 4,
|
|
MinimumValidInputThreshold = 4,
|
|
MaximumValidBatteryThreshold = 9,
|
|
MaximumValidInputThreshold = 19,
|
|
BatteryMediumDiagnosticsThreshold = 8.0,
|
|
BatteryMediumArmedThreshold = 7.9,
|
|
InputMediumDiagnosticsThreshold = 12.7,
|
|
InputMediumArmedThreshold = 10.9,
|
|
};
|
|
public static DasBatteryInputSettings SLICE_Distributor_PowerSetting
|
|
{
|
|
get
|
|
{
|
|
var s = SettingsDB.GetGlobalValue(Keys.SLICE_Distributor_PowerSetting.ToString(), SLICE_Distributor_PowerSetting_Default.ToSerializedString());
|
|
return new DasBatteryInputSettings(s);
|
|
}
|
|
set
|
|
{
|
|
var s = value.ToSerializedString();
|
|
SettingsDB.SetGlobalValue(Keys.SLICE_Distributor_PowerSetting.ToString(), s);
|
|
}
|
|
}
|
|
|
|
public static readonly DasBatteryInputSettings TDAS_Pro_Rack_PowerSetting_Default = new DasBatteryInputSettings()
|
|
{
|
|
BatteryLowDiagnosticsThreshold = 11.5,
|
|
BatteryHighDiagnosticsThreshold = 13.2,
|
|
BatteryLowArmedThreshold = 11.5,
|
|
BatteryHighArmedThreshold = 13.2,
|
|
InputLowDiagnosticsThreshold = 11.5,
|
|
InputHighDiagnosticsThreshold = 13.2,
|
|
InputLowArmedThreshold = 11.5,
|
|
InputHighArmedThreshold = 13.2,
|
|
MinimumValidBatteryThreshold = 4,
|
|
MinimumValidInputThreshold = 4,
|
|
MaximumValidBatteryThreshold = 16,
|
|
MaximumValidInputThreshold = 16,
|
|
BatteryMediumDiagnosticsThreshold = 12.5,
|
|
BatteryMediumArmedThreshold = 12.5,
|
|
InputMediumDiagnosticsThreshold = 12.5,
|
|
InputMediumArmedThreshold = 12.5
|
|
};
|
|
public static DasBatteryInputSettings TDAS_Pro_Rack_PowerSetting
|
|
{
|
|
get
|
|
{
|
|
var s = SettingsDB.GetGlobalValue(Keys.TDAS_Pro_Rack_PowerSetting.ToString(), TDAS_Pro_Rack_PowerSetting_Default.ToSerializedString());
|
|
return new DasBatteryInputSettings(s);
|
|
}
|
|
set
|
|
{
|
|
var s = value.ToSerializedString();
|
|
SettingsDB.SetGlobalValue(Keys.TDAS_Pro_Rack_PowerSetting.ToString(), s);
|
|
}
|
|
}
|
|
|
|
public static readonly DasBatteryInputSettings G5VDS_PowerSetting_Default = new DasBatteryInputSettings()
|
|
{
|
|
BatteryLowDiagnosticsThreshold = 10.9,
|
|
BatteryHighDiagnosticsThreshold = 13.2,
|
|
BatteryLowArmedThreshold = 10.9,
|
|
BatteryHighArmedThreshold = 13.2,
|
|
InputLowDiagnosticsThreshold = 10.9,
|
|
InputHighDiagnosticsThreshold = 13.2,
|
|
InputLowArmedThreshold = 10.9,
|
|
InputHighArmedThreshold = 13.2,
|
|
MinimumValidBatteryThreshold = 4,
|
|
MinimumValidInputThreshold = 4,
|
|
MaximumValidBatteryThreshold = 16,
|
|
MaximumValidInputThreshold = 16,
|
|
BatteryMediumDiagnosticsThreshold = 11.3,
|
|
BatteryMediumArmedThreshold = 11.3,
|
|
InputMediumDiagnosticsThreshold = 11.3,
|
|
InputMediumArmedThreshold = 11.3
|
|
};
|
|
public static DasBatteryInputSettings G5VDS_PowerSetting
|
|
{
|
|
get
|
|
{
|
|
var s = SettingsDB.GetGlobalValue(Keys.G5VDS_PowerSetting.ToString(), G5VDS_PowerSetting_Default.ToSerializedString());
|
|
return new DasBatteryInputSettings(s);
|
|
}
|
|
set
|
|
{
|
|
var s = value.ToSerializedString();
|
|
SettingsDB.SetGlobalValue(Keys.G5VDS_PowerSetting.ToString(), s);
|
|
}
|
|
}
|
|
|
|
public static readonly DasBatteryInputSettings SLICE1_5_Nano_Base_PowerSetting_Default = new DasBatteryInputSettings()
|
|
{
|
|
BatteryLowDiagnosticsThreshold = 7.8,
|
|
BatteryHighDiagnosticsThreshold = 9,
|
|
BatteryLowArmedThreshold = 6.8,
|
|
BatteryHighArmedThreshold = 9,
|
|
InputLowDiagnosticsThreshold = 10,
|
|
InputHighDiagnosticsThreshold = 15.3,
|
|
InputLowArmedThreshold = 6.5,
|
|
InputHighArmedThreshold = 15.3,
|
|
MinimumValidBatteryThreshold = 4,
|
|
MinimumValidInputThreshold = 4,
|
|
MaximumValidBatteryThreshold = 9,
|
|
MaximumValidInputThreshold = 19,
|
|
BatteryMediumDiagnosticsThreshold = 8.0,
|
|
BatteryMediumArmedThreshold = 7.9,
|
|
InputMediumDiagnosticsThreshold = 11.8,
|
|
InputMediumArmedThreshold = 10.9,
|
|
};
|
|
public static DasBatteryInputSettings SLICE1_5_Nano_Base_PowerSetting
|
|
{
|
|
get
|
|
{
|
|
var s = SettingsDB.GetGlobalValue(Keys.SLICE1_5_Nano_Base_PowerSetting.ToString(), SLICE1_5_Nano_Base_PowerSetting_Default.ToSerializedString());
|
|
return new DasBatteryInputSettings(s);
|
|
}
|
|
set
|
|
{
|
|
var s = value.ToSerializedString();
|
|
SettingsDB.SetGlobalValue(Keys.SLICE1_5_Nano_Base_PowerSetting.ToString(), s);
|
|
}
|
|
}
|
|
|
|
public static readonly DasBatteryInputSettings SLICE_Micro_Base_PowerSetting_Default = new DasBatteryInputSettings()
|
|
{
|
|
BatteryLowDiagnosticsThreshold = 7.8,
|
|
BatteryHighDiagnosticsThreshold = 9,
|
|
BatteryLowArmedThreshold = 6.8,
|
|
BatteryHighArmedThreshold = 9,
|
|
InputLowDiagnosticsThreshold = 10,
|
|
InputHighDiagnosticsThreshold = 15.3,
|
|
InputLowArmedThreshold = 6.5,
|
|
InputHighArmedThreshold = 15.3,
|
|
MinimumValidBatteryThreshold = 4,
|
|
MinimumValidInputThreshold = 4,
|
|
MaximumValidBatteryThreshold = 9,
|
|
MaximumValidInputThreshold = 19,
|
|
BatteryMediumDiagnosticsThreshold = 8.0,
|
|
BatteryMediumArmedThreshold = 7.9,
|
|
InputMediumDiagnosticsThreshold = 11.8,
|
|
InputMediumArmedThreshold = 10.9,
|
|
};
|
|
public static DasBatteryInputSettings SLICE_Micro_Base_PowerSetting
|
|
{
|
|
get
|
|
{
|
|
var s = SettingsDB.GetGlobalValue(Keys.SLICE_Micro_Base_PowerSetting.ToString(), SLICE_Micro_Base_PowerSetting_Default.ToSerializedString());
|
|
return new DasBatteryInputSettings(s);
|
|
}
|
|
set
|
|
{
|
|
var s = value.ToSerializedString();
|
|
SettingsDB.SetGlobalValue(Keys.SLICE_Micro_Base_PowerSetting.ToString(), s);
|
|
}
|
|
}
|
|
|
|
public static readonly DasBatteryInputSettings SLICE_NANO_Base_PowerSetting_Default = new DasBatteryInputSettings()
|
|
{
|
|
BatteryLowDiagnosticsThreshold = 7.8,
|
|
BatteryHighDiagnosticsThreshold = 9,
|
|
BatteryLowArmedThreshold = 6.8,
|
|
BatteryHighArmedThreshold = 9,
|
|
InputLowDiagnosticsThreshold = 10,
|
|
InputHighDiagnosticsThreshold = 15.3,
|
|
InputLowArmedThreshold = 6.5,
|
|
InputHighArmedThreshold = 15.3,
|
|
MinimumValidBatteryThreshold = 4,
|
|
MinimumValidInputThreshold = 4,
|
|
MaximumValidBatteryThreshold = 9,
|
|
MaximumValidInputThreshold = 19,
|
|
BatteryMediumDiagnosticsThreshold = 8.0,
|
|
BatteryMediumArmedThreshold = 7.9,
|
|
InputMediumDiagnosticsThreshold = 11.8,
|
|
InputMediumArmedThreshold = 10.9,
|
|
};
|
|
public static DasBatteryInputSettings SLICE_NANO_Base_PowerSetting
|
|
{
|
|
get
|
|
{
|
|
var s = SettingsDB.GetGlobalValue(Keys.SLICE_NANO_Base_PowerSetting.ToString(), SLICE_NANO_Base_PowerSetting_Default.ToSerializedString());
|
|
return new DasBatteryInputSettings(s);
|
|
}
|
|
set
|
|
{
|
|
var s = value.ToSerializedString();
|
|
SettingsDB.SetGlobalValue(Keys.SLICE_NANO_Base_PowerSetting.ToString(), s);
|
|
}
|
|
}
|
|
|
|
public static readonly DasBatteryInputSettings SLICE2_SIM_PowerSetting_Default = new DasBatteryInputSettings()
|
|
{
|
|
BatteryLowDiagnosticsThreshold = 7.8,
|
|
BatteryHighDiagnosticsThreshold = 9,
|
|
BatteryLowArmedThreshold = 6.8,
|
|
BatteryHighArmedThreshold = 9,
|
|
InputLowDiagnosticsThreshold = 7.6,
|
|
InputHighDiagnosticsThreshold = 15.3,
|
|
InputLowArmedThreshold = 6.5,
|
|
InputHighArmedThreshold = 15.3,
|
|
MinimumValidBatteryThreshold = 4,
|
|
MinimumValidInputThreshold = 4,
|
|
MaximumValidBatteryThreshold = 9,
|
|
MaximumValidInputThreshold = 19,
|
|
BatteryMediumDiagnosticsThreshold = 8.0,
|
|
BatteryMediumArmedThreshold = 7.9,
|
|
InputMediumDiagnosticsThreshold = 11.8,
|
|
InputMediumArmedThreshold = 10.9,
|
|
};
|
|
public static DasBatteryInputSettings SLICE2_SIM_PowerSetting
|
|
{
|
|
get
|
|
{
|
|
var s = SettingsDB.GetGlobalValue(Keys.SLICE2_SIM_PowerSetting.ToString(), SLICE2_SIM_PowerSetting_Default.ToSerializedString());
|
|
return new DasBatteryInputSettings(s);
|
|
}
|
|
set
|
|
{
|
|
var s = value.ToSerializedString();
|
|
SettingsDB.SetGlobalValue(Keys.SLICE2_SIM_PowerSetting.ToString(), s);
|
|
}
|
|
}
|
|
|
|
public static readonly DasBatteryInputSettings SLICE2_DIM_PowerSetting_Default = new DasBatteryInputSettings()
|
|
{
|
|
BatteryLowDiagnosticsThreshold = 7.8,
|
|
BatteryHighDiagnosticsThreshold = 9,
|
|
BatteryLowArmedThreshold = 6.8,
|
|
BatteryHighArmedThreshold = 9,
|
|
InputLowDiagnosticsThreshold = 7.6,
|
|
InputHighDiagnosticsThreshold = 15.3,
|
|
InputLowArmedThreshold = 6.5,
|
|
InputHighArmedThreshold = 15.3,
|
|
MinimumValidBatteryThreshold = 4,
|
|
MinimumValidInputThreshold = 4,
|
|
MaximumValidBatteryThreshold = 9,
|
|
MaximumValidInputThreshold = 19,
|
|
BatteryMediumDiagnosticsThreshold = 8.0,
|
|
BatteryMediumArmedThreshold = 7.9,
|
|
InputMediumDiagnosticsThreshold = 11.8,
|
|
InputMediumArmedThreshold = 10.9,
|
|
};
|
|
public static DasBatteryInputSettings SLICE2_DIM_PowerSetting
|
|
{
|
|
get
|
|
{
|
|
var s = SettingsDB.GetGlobalValue(Keys.SLICE2_DIM_PowerSetting.ToString(), SLICE2_DIM_PowerSetting_Default.ToSerializedString());
|
|
return new DasBatteryInputSettings(s);
|
|
}
|
|
set
|
|
{
|
|
var s = value.ToSerializedString();
|
|
SettingsDB.SetGlobalValue(Keys.SLICE2_DIM_PowerSetting.ToString(), s);
|
|
}
|
|
}
|
|
|
|
public static readonly DasBatteryInputSettings SLICE2_TOM_PowerSetting_Default = new DasBatteryInputSettings()
|
|
{
|
|
BatteryLowDiagnosticsThreshold = 7.8,
|
|
BatteryHighDiagnosticsThreshold = 9,
|
|
BatteryLowArmedThreshold = 6.8,
|
|
BatteryHighArmedThreshold = 9,
|
|
InputLowDiagnosticsThreshold = 7.6,
|
|
InputHighDiagnosticsThreshold = 15.3,
|
|
InputLowArmedThreshold = 6.5,
|
|
InputHighArmedThreshold = 15.3,
|
|
MinimumValidBatteryThreshold = 4,
|
|
MinimumValidInputThreshold = 4,
|
|
MaximumValidBatteryThreshold = 9,
|
|
MaximumValidInputThreshold = 19,
|
|
BatteryMediumDiagnosticsThreshold = 8.0,
|
|
BatteryMediumArmedThreshold = 7.9,
|
|
InputMediumDiagnosticsThreshold = 11.8,
|
|
InputMediumArmedThreshold = 10.9,
|
|
};
|
|
public static DasBatteryInputSettings SLICE2_TOM_PowerSetting
|
|
{
|
|
get
|
|
{
|
|
var s = SettingsDB.GetGlobalValue(Keys.SLICE2_TOM_PowerSetting.ToString(), SLICE2_TOM_PowerSetting_Default.ToSerializedString());
|
|
return new DasBatteryInputSettings(s);
|
|
}
|
|
set
|
|
{
|
|
var s = value.ToSerializedString();
|
|
SettingsDB.SetGlobalValue(Keys.SLICE2_TOM_PowerSetting.ToString(), s);
|
|
}
|
|
}
|
|
|
|
public static readonly DasBatteryInputSettings G5INDUMMY_PowerSetting_Default = new DasBatteryInputSettings()
|
|
{
|
|
BatteryLowDiagnosticsThreshold = 11.0,
|
|
BatteryHighDiagnosticsThreshold = 15,
|
|
BatteryLowArmedThreshold = 11.0,
|
|
BatteryHighArmedThreshold = 15,
|
|
InputLowDiagnosticsThreshold = 11.0,
|
|
InputHighDiagnosticsThreshold = 15,
|
|
InputLowArmedThreshold = 11.0,
|
|
InputHighArmedThreshold = 15,
|
|
MinimumValidBatteryThreshold = 4,
|
|
MinimumValidInputThreshold = 4,
|
|
MaximumValidBatteryThreshold = 16,
|
|
MaximumValidInputThreshold = 16,
|
|
BatteryMediumDiagnosticsThreshold = 11.5,
|
|
BatteryMediumArmedThreshold = 11.5,
|
|
InputMediumDiagnosticsThreshold = 11.5,
|
|
InputMediumArmedThreshold = 11.5
|
|
};
|
|
public static DasBatteryInputSettings G5INDUMMY_PowerSetting
|
|
{
|
|
get
|
|
{
|
|
var s = SettingsDB.GetGlobalValue(Keys.G5INDUMMY_PowerSetting.ToString(), G5INDUMMY_PowerSetting_Default.ToSerializedString());
|
|
return new DasBatteryInputSettings(s);
|
|
}
|
|
set
|
|
{
|
|
var s = value.ToSerializedString();
|
|
SettingsDB.SetGlobalValue(Keys.G5INDUMMY_PowerSetting.ToString(), s);
|
|
}
|
|
}
|
|
|
|
public static readonly DasBatteryInputSettings SLICE_EthernetController_PowerSetting_Default = new DasBatteryInputSettings()
|
|
{
|
|
BatteryLowDiagnosticsThreshold = 7.8,
|
|
BatteryHighDiagnosticsThreshold = 9,
|
|
BatteryLowArmedThreshold = 6.8,
|
|
BatteryHighArmedThreshold = 9,
|
|
InputLowDiagnosticsThreshold = 10,
|
|
InputHighDiagnosticsThreshold = 15.3,
|
|
InputLowArmedThreshold = 6.5,
|
|
InputHighArmedThreshold = 15.3,
|
|
MinimumValidBatteryThreshold = 4,
|
|
MinimumValidInputThreshold = 4,
|
|
MaximumValidBatteryThreshold = 9,
|
|
MaximumValidInputThreshold = 19,
|
|
BatteryMediumDiagnosticsThreshold = 8.0,
|
|
BatteryMediumArmedThreshold = 7.9,
|
|
InputMediumDiagnosticsThreshold = 12.7,
|
|
InputMediumArmedThreshold = 10.9,
|
|
};
|
|
|
|
public static readonly DasBatteryInputSettings SLICE6Db_PowerSetting_Default = new DasBatteryInputSettings
|
|
{
|
|
// ============ BATTERY ===================
|
|
// Extrema
|
|
MinimumValidBatteryThreshold = 3.5,
|
|
MaximumValidBatteryThreshold = 15.5,
|
|
|
|
// Diag
|
|
BatteryLowDiagnosticsThreshold = 11.25,
|
|
BatteryMediumDiagnosticsThreshold = 11.7,
|
|
BatteryHighDiagnosticsThreshold = 13,
|
|
|
|
// Arm
|
|
BatteryLowArmedThreshold = 11.25,
|
|
BatteryMediumArmedThreshold = 11.7,
|
|
BatteryHighArmedThreshold = 13,
|
|
|
|
|
|
// ============ INPUT ===================
|
|
// Extrema
|
|
MinimumValidInputThreshold = 11,
|
|
MaximumValidInputThreshold = 38,
|
|
|
|
// Diag
|
|
InputLowDiagnosticsThreshold = 17.0,
|
|
InputMediumDiagnosticsThreshold = 17.8,
|
|
InputHighDiagnosticsThreshold = 36.2,
|
|
|
|
// Arm
|
|
InputLowArmedThreshold = 17.0,
|
|
InputMediumArmedThreshold = 17.8,
|
|
InputHighArmedThreshold = 36.7
|
|
};
|
|
public static readonly DasBatteryInputSettings SLICE6Db3_PowerSetting_Default = new DasBatteryInputSettings
|
|
{
|
|
// ============ BATTERY ===================
|
|
// Extrema
|
|
MinimumValidBatteryThreshold = 3.5,
|
|
MaximumValidBatteryThreshold = 15.5,
|
|
|
|
// Diag
|
|
BatteryLowDiagnosticsThreshold = 7,
|
|
BatteryMediumDiagnosticsThreshold = 8,
|
|
BatteryHighDiagnosticsThreshold = 9,
|
|
|
|
// Arm
|
|
BatteryLowArmedThreshold = 7,
|
|
BatteryMediumArmedThreshold = 8,
|
|
BatteryHighArmedThreshold = 9,
|
|
|
|
|
|
// ============ INPUT ===================
|
|
// Extrema
|
|
MinimumValidInputThreshold = 9,
|
|
MaximumValidInputThreshold = 38,
|
|
|
|
// Diag
|
|
InputLowDiagnosticsThreshold = 13.5,
|
|
InputMediumDiagnosticsThreshold = 18.5,
|
|
InputHighDiagnosticsThreshold = 20.5,
|
|
|
|
// Arm
|
|
InputLowArmedThreshold = 13.5,
|
|
InputMediumArmedThreshold = 18.5,
|
|
InputHighArmedThreshold = 20.5
|
|
};
|
|
public static readonly DasBatteryInputSettings SLICE6Db_AIR_PowerSetting_Default = new DasBatteryInputSettings
|
|
{
|
|
// ============ BATTERY ===================
|
|
// Extrema
|
|
MinimumValidBatteryThreshold = 3.5,
|
|
MaximumValidBatteryThreshold = 15.5,
|
|
|
|
// Diag
|
|
BatteryLowDiagnosticsThreshold = 10,
|
|
BatteryMediumDiagnosticsThreshold = 11.8,
|
|
BatteryHighDiagnosticsThreshold = 13.75,
|
|
|
|
// Arm
|
|
BatteryLowArmedThreshold = 10,
|
|
BatteryMediumArmedThreshold = 11.8,
|
|
BatteryHighArmedThreshold = 13.75,
|
|
|
|
|
|
// ============ INPUT ===================
|
|
// Extrema
|
|
MinimumValidInputThreshold = 11,
|
|
MaximumValidInputThreshold = 38,
|
|
|
|
// Diag
|
|
InputLowDiagnosticsThreshold = 17,
|
|
InputMediumDiagnosticsThreshold = 17.8,
|
|
InputHighDiagnosticsThreshold = 36.2,
|
|
|
|
// Arm
|
|
InputLowArmedThreshold = 17,
|
|
InputMediumArmedThreshold = 17.8,
|
|
InputHighArmedThreshold = 36.7
|
|
};
|
|
|
|
public static readonly DasBatteryInputSettings SLICE6Db_InDummy_PowerSetting_Default = new DasBatteryInputSettings
|
|
{
|
|
// ============ BATTERY ===================
|
|
// Extrema
|
|
MinimumValidBatteryThreshold = 3.5,
|
|
MaximumValidBatteryThreshold = 10,
|
|
|
|
// Diag
|
|
BatteryLowDiagnosticsThreshold = 7.5,
|
|
BatteryMediumDiagnosticsThreshold = 7.8,
|
|
BatteryHighDiagnosticsThreshold = 8.6,
|
|
|
|
// Arm
|
|
BatteryLowArmedThreshold = 7.5,
|
|
BatteryMediumArmedThreshold = 7.8,
|
|
BatteryHighArmedThreshold = 8.6,
|
|
|
|
|
|
// ============ INPUT ===================
|
|
// Extrema
|
|
MinimumValidInputThreshold = 10,
|
|
MaximumValidInputThreshold = 38,
|
|
|
|
// Diag
|
|
InputLowDiagnosticsThreshold = 12.4,
|
|
InputMediumDiagnosticsThreshold = 12.8,
|
|
InputHighDiagnosticsThreshold = 16,
|
|
|
|
// Arm
|
|
InputLowArmedThreshold = 12.4,
|
|
InputMediumArmedThreshold = 12.8,
|
|
InputHighArmedThreshold = 16.5
|
|
};
|
|
|
|
public static DasBatteryInputSettings SLICE_EthernetController_PowerSetting
|
|
{
|
|
get
|
|
{
|
|
var s = SettingsDB.GetGlobalValue(Keys.SLICE_EthernetController_PowerSetting.ToString(), SLICE_EthernetController_PowerSetting_Default.ToSerializedString());
|
|
return new DasBatteryInputSettings(s);
|
|
}
|
|
set
|
|
{
|
|
var s = value.ToSerializedString();
|
|
SettingsDB.SetGlobalValue(Keys.SLICE_EthernetController_PowerSetting.ToString(), s);
|
|
}
|
|
}
|
|
|
|
public static DasBatteryInputSettings SLICE_Mini_Distributor_PowerSetting
|
|
{
|
|
get
|
|
{
|
|
var s = SettingsDB.GetGlobalValue(Keys.SLICE_Mini_Distributor_PowerSetting.ToString(), SLICE_Mini_Distributor_PowerSetting_Default.ToSerializedString());
|
|
return new DasBatteryInputSettings(s);
|
|
}
|
|
set
|
|
{
|
|
var s = value.ToSerializedString();
|
|
SettingsDB.SetGlobalValue(Keys.SLICE_Mini_Distributor_PowerSetting.ToString(), s);
|
|
}
|
|
}
|
|
|
|
public static readonly DasBatteryInputSettings SLICE6_PowerSetting_Default = new DasBatteryInputSettings()
|
|
{
|
|
BatteryLowDiagnosticsThreshold = 7,
|
|
BatteryHighDiagnosticsThreshold = 8.4,
|
|
BatteryLowArmedThreshold = 7,
|
|
BatteryHighArmedThreshold = 8.4,
|
|
InputLowDiagnosticsThreshold = 7,
|
|
InputHighDiagnosticsThreshold = 15.5,
|
|
InputLowArmedThreshold = 7,
|
|
InputHighArmedThreshold = 15.5,
|
|
MinimumValidBatteryThreshold = 4,
|
|
MinimumValidInputThreshold = 4,
|
|
MaximumValidBatteryThreshold = 9,
|
|
MaximumValidInputThreshold = 19,
|
|
BatteryMediumDiagnosticsThreshold = 8.4,
|
|
BatteryMediumArmedThreshold = 7.9,
|
|
InputMediumDiagnosticsThreshold = 11.8,
|
|
InputMediumArmedThreshold = 10.9,
|
|
};
|
|
|
|
public static DasBatteryInputSettings SLICE6_PowerSetting
|
|
{
|
|
get
|
|
{
|
|
var s = SettingsDB.GetGlobalValue(Keys.SLICE6_PowerSetting.ToString(), SLICE6_PowerSetting_Default.ToSerializedString());
|
|
return new DasBatteryInputSettings(s);
|
|
}
|
|
set
|
|
{
|
|
var s = value.ToSerializedString();
|
|
SettingsDB.SetGlobalValue(Keys.SLICE6_PowerSetting.ToString(), s);
|
|
}
|
|
}
|
|
|
|
public static readonly DasBatteryInputSettings SLICE6_AIR_PowerSetting_Default = new DasBatteryInputSettings()
|
|
{
|
|
BatteryLowDiagnosticsThreshold = 7,
|
|
BatteryHighDiagnosticsThreshold = 8.4,
|
|
BatteryLowArmedThreshold = 7,
|
|
BatteryHighArmedThreshold = 8.4,
|
|
InputLowDiagnosticsThreshold = 9,
|
|
InputHighDiagnosticsThreshold = 30,
|
|
InputLowArmedThreshold = 9,
|
|
InputHighArmedThreshold = 30,
|
|
MinimumValidBatteryThreshold = 4,
|
|
MinimumValidInputThreshold = 4,
|
|
MaximumValidBatteryThreshold = 9,
|
|
MaximumValidInputThreshold = 35,
|
|
BatteryMediumDiagnosticsThreshold = 8.4,
|
|
BatteryMediumArmedThreshold = 7.9,
|
|
InputMediumDiagnosticsThreshold = 11.8,
|
|
InputMediumArmedThreshold = 10.9,
|
|
};
|
|
|
|
public static DasBatteryInputSettings SLICE6_AIR_PowerSetting
|
|
{
|
|
get
|
|
{
|
|
var s = SettingsDB.GetGlobalValue(Keys.SLICE6_AIR_PowerSetting.ToString(), SLICE6_AIR_PowerSetting_Default.ToSerializedString());
|
|
return new DasBatteryInputSettings(s);
|
|
}
|
|
set
|
|
{
|
|
var s = value.ToSerializedString();
|
|
SettingsDB.SetGlobalValue(Keys.SLICE6_AIR_PowerSetting.ToString(), s);
|
|
}
|
|
}
|
|
|
|
public static readonly DasBatteryInputSettings SLICE6_AIR_BR_PowerSetting_Default = new DasBatteryInputSettings()
|
|
{
|
|
//39285 Change S6A-BR voltage defaults
|
|
//Hardware team: "just copy S6A but with minimum of 9V"
|
|
//CPB: "make input low diagnostics/armed 10V"
|
|
BatteryLowDiagnosticsThreshold = 7,
|
|
BatteryHighDiagnosticsThreshold = 8.4,
|
|
BatteryLowArmedThreshold = 7,
|
|
BatteryHighArmedThreshold = 8.4,
|
|
InputLowDiagnosticsThreshold = 10,
|
|
InputHighDiagnosticsThreshold = 30,
|
|
InputLowArmedThreshold = 10,
|
|
InputHighArmedThreshold = 30,
|
|
MinimumValidBatteryThreshold = 4,
|
|
MinimumValidInputThreshold = 9,
|
|
MaximumValidBatteryThreshold = 9,
|
|
MaximumValidInputThreshold = 35,
|
|
BatteryMediumDiagnosticsThreshold = 8.4,
|
|
BatteryMediumArmedThreshold = 7.9,
|
|
InputMediumDiagnosticsThreshold = 11.8,
|
|
InputMediumArmedThreshold = 10.9,
|
|
};
|
|
|
|
public static DasBatteryInputSettings SLICE6_AIR_BR_PowerSetting
|
|
{
|
|
get
|
|
{
|
|
var s = SettingsDB.GetGlobalValue(Keys.SLICE6_AIR_BR_PowerSetting.ToString(), SLICE6_AIR_BR_PowerSetting_Default.ToSerializedString());
|
|
return new DasBatteryInputSettings(s);
|
|
}
|
|
set
|
|
{
|
|
var s = value.ToSerializedString();
|
|
SettingsDB.SetGlobalValue(Keys.SLICE6_AIR_BR_PowerSetting.ToString(), s);
|
|
}
|
|
}
|
|
|
|
public static DasBatteryInputSettings SLICE6Db_PowerSetting
|
|
{
|
|
get
|
|
{
|
|
var s = SettingsDB.GetGlobalValue(Keys.SLICE6Db_PowerSetting.ToString(),
|
|
SLICE6Db_PowerSetting_Default.ToSerializedString());
|
|
return new DasBatteryInputSettings(s);
|
|
}
|
|
set
|
|
{
|
|
var s = value.ToSerializedString();
|
|
SettingsDB.SetGlobalValue(Keys.SLICE6Db_PowerSetting.ToString(), s);
|
|
}
|
|
}
|
|
public static DasBatteryInputSettings SLICE6Db3_PowerSetting
|
|
{
|
|
get
|
|
{
|
|
var s = SettingsDB.GetGlobalValue(Keys.SLICE6Db3_PowerSetting.ToString(),
|
|
SLICE6Db3_PowerSetting_Default.ToSerializedString());
|
|
return new DasBatteryInputSettings(s);
|
|
}
|
|
set
|
|
{
|
|
var s = value.ToSerializedString();
|
|
SettingsDB.SetGlobalValue(Keys.SLICE6Db3_PowerSetting.ToString(), s);
|
|
}
|
|
}
|
|
public static DasBatteryInputSettings SLICE6Db_AIR_PowerSetting
|
|
{
|
|
get
|
|
{
|
|
var s = SettingsDB.GetGlobalValue(Keys.SLICE6Db_AIR_PowerSetting.ToString(),
|
|
SLICE6Db_AIR_PowerSetting_Default.ToSerializedString());
|
|
return new DasBatteryInputSettings(s);
|
|
}
|
|
set
|
|
{
|
|
var s = value.ToSerializedString();
|
|
SettingsDB.SetGlobalValue(Keys.SLICE6Db_AIR_PowerSetting.ToString(), s);
|
|
}
|
|
}
|
|
|
|
public static DasBatteryInputSettings SLICE6Db_InDummy_PowerSetting
|
|
{
|
|
get
|
|
{
|
|
var s = SettingsDB.GetGlobalValue(Keys.SLICE6Db_InDummy_PowerSetting.ToString(),
|
|
SLICE6Db_InDummy_PowerSetting_Default.ToSerializedString());
|
|
return new DasBatteryInputSettings(s);
|
|
}
|
|
set
|
|
{
|
|
var s = value.ToSerializedString();
|
|
SettingsDB.SetGlobalValue(Keys.SLICE6Db_InDummy_PowerSetting.ToString(), s);
|
|
}
|
|
}
|
|
|
|
public static readonly DasBatteryInputSettings SLICE1_5_Micro_Base_PowerSetting_Default = new DasBatteryInputSettings()
|
|
{
|
|
BatteryLowDiagnosticsThreshold = 7.8,
|
|
BatteryHighDiagnosticsThreshold = 9,
|
|
BatteryLowArmedThreshold = 6.8,
|
|
BatteryHighArmedThreshold = 9,
|
|
InputLowDiagnosticsThreshold = 10,
|
|
InputHighDiagnosticsThreshold = 15.3,
|
|
InputLowArmedThreshold = 6.5,
|
|
InputHighArmedThreshold = 15.3,
|
|
MinimumValidBatteryThreshold = 4,
|
|
MinimumValidInputThreshold = 4,
|
|
MaximumValidBatteryThreshold = 9,
|
|
MaximumValidInputThreshold = 19,
|
|
BatteryMediumDiagnosticsThreshold = 8.4,
|
|
BatteryMediumArmedThreshold = 7.9,
|
|
InputMediumDiagnosticsThreshold = 11.8,
|
|
InputMediumArmedThreshold = 10.9,
|
|
};
|
|
public static DasBatteryInputSettings SLICE1_5_Micro_Base_PowerSetting
|
|
{
|
|
get
|
|
{
|
|
var s = SettingsDB.GetGlobalValue(Keys.SLICE1_5_Micro_Base_PowerSetting.ToString(), SLICE1_5_Micro_Base_PowerSetting_Default.ToSerializedString());
|
|
return new DasBatteryInputSettings(s);
|
|
}
|
|
set
|
|
{
|
|
var s = value.ToSerializedString();
|
|
SettingsDB.SetGlobalValue(Keys.SLICE1_5_Micro_Base_PowerSetting.ToString(), s);
|
|
}
|
|
}
|
|
|
|
public static readonly DasBatteryInputSettings SLICE_LabEthernet_PowerSetting_Default = new DasBatteryInputSettings()
|
|
{
|
|
BatteryLowDiagnosticsThreshold = 7.8,
|
|
BatteryHighDiagnosticsThreshold = 9,
|
|
BatteryLowArmedThreshold = 6.8,
|
|
BatteryHighArmedThreshold = 9,
|
|
InputLowDiagnosticsThreshold = 10,
|
|
InputHighDiagnosticsThreshold = 15.3,
|
|
InputLowArmedThreshold = 6.5,
|
|
InputHighArmedThreshold = 15.3,
|
|
MinimumValidBatteryThreshold = 4,
|
|
MinimumValidInputThreshold = 4,
|
|
MaximumValidBatteryThreshold = 9,
|
|
MaximumValidInputThreshold = 19,
|
|
BatteryMediumDiagnosticsThreshold = 8.4,
|
|
BatteryMediumArmedThreshold = 7.9,
|
|
InputMediumDiagnosticsThreshold = 12.7,
|
|
InputMediumArmedThreshold = 10.9,
|
|
};
|
|
public static DasBatteryInputSettings SLICE_LabEthernet_PowerSetting
|
|
{
|
|
get
|
|
{
|
|
var s = SettingsDB.GetGlobalValue(Keys.SLICE_LabEthernet_PowerSetting.ToString(), SLICE_LabEthernet_PowerSetting_Default.ToSerializedString());
|
|
return new DasBatteryInputSettings(s);
|
|
}
|
|
set
|
|
{
|
|
var s = value.ToSerializedString();
|
|
SettingsDB.SetGlobalValue(Keys.SLICE_LabEthernet_PowerSetting.ToString(), s);
|
|
}
|
|
}
|
|
|
|
public static readonly DasBatteryInputSettings SLICE2_SLS_PowerSetting_Default = new DasBatteryInputSettings()
|
|
{
|
|
BatteryLowDiagnosticsThreshold = 7.8,
|
|
BatteryHighDiagnosticsThreshold = 9,
|
|
BatteryLowArmedThreshold = 6.8,
|
|
BatteryHighArmedThreshold = 9,
|
|
InputLowDiagnosticsThreshold = 7.6,
|
|
InputHighDiagnosticsThreshold = 15.3,
|
|
InputLowArmedThreshold = 6.5,
|
|
InputHighArmedThreshold = 15.3,
|
|
MinimumValidBatteryThreshold = 4,
|
|
MinimumValidInputThreshold = 4,
|
|
MaximumValidBatteryThreshold = 9,
|
|
MaximumValidInputThreshold = 19,
|
|
BatteryMediumDiagnosticsThreshold = 8.0,
|
|
BatteryMediumArmedThreshold = 7.9,
|
|
InputMediumDiagnosticsThreshold = 11.8,
|
|
InputMediumArmedThreshold = 10.9,
|
|
};
|
|
public static DasBatteryInputSettings SLICE2_SLS_PowerSetting
|
|
{
|
|
get
|
|
{
|
|
var s = SettingsDB.GetGlobalValue(Keys.SLICE2_SLS_PowerSetting.ToString(), SLICE2_SLS_PowerSetting_Default.ToSerializedString());
|
|
return new DasBatteryInputSettings(s);
|
|
}
|
|
set
|
|
{
|
|
var s = value.ToSerializedString();
|
|
SettingsDB.SetGlobalValue(Keys.SLICE2_SLS_PowerSetting.ToString(), s);
|
|
}
|
|
}
|
|
|
|
public static readonly DasBatteryInputSettings SLICE1_G5Stack_PowerSetting_Default = new DasBatteryInputSettings()
|
|
{
|
|
BatteryLowDiagnosticsThreshold = 7.8,
|
|
BatteryHighDiagnosticsThreshold = 9,
|
|
BatteryLowArmedThreshold = 6.8,
|
|
BatteryHighArmedThreshold = 9,
|
|
InputLowDiagnosticsThreshold = 10,
|
|
InputHighDiagnosticsThreshold = 15.3,
|
|
InputLowArmedThreshold = 6.5,
|
|
InputHighArmedThreshold = 15.3,
|
|
MinimumValidBatteryThreshold = 4,
|
|
MinimumValidInputThreshold = 4,
|
|
MaximumValidBatteryThreshold = 9,
|
|
MaximumValidInputThreshold = 19,
|
|
BatteryMediumDiagnosticsThreshold = 8.4,
|
|
BatteryMediumArmedThreshold = 7.9,
|
|
InputMediumDiagnosticsThreshold = 11.8,
|
|
InputMediumArmedThreshold = 10.9,
|
|
};
|
|
public static DasBatteryInputSettings SLICE1_G5Stack_PowerSetting
|
|
{
|
|
get
|
|
{
|
|
var s = SettingsDB.GetGlobalValue(Keys.SLICE1_G5Stack_PowerSetting.ToString(), SLICE1_G5Stack_PowerSetting_Default.ToSerializedString());
|
|
return new DasBatteryInputSettings(s);
|
|
}
|
|
set
|
|
{
|
|
var s = value.ToSerializedString();
|
|
SettingsDB.SetGlobalValue(Keys.SLICE1_G5Stack_PowerSetting.ToString(), s);
|
|
}
|
|
}
|
|
|
|
public static readonly DasBatteryInputSettings SLICE2_SLT_PowerSetting_Default = new DasBatteryInputSettings()
|
|
{
|
|
BatteryLowDiagnosticsThreshold = 7.8,
|
|
BatteryHighDiagnosticsThreshold = 9,
|
|
BatteryLowArmedThreshold = 6.8,
|
|
BatteryHighArmedThreshold = 9,
|
|
InputLowDiagnosticsThreshold = 7.6,
|
|
InputHighDiagnosticsThreshold = 15.3,
|
|
InputLowArmedThreshold = 6.5,
|
|
InputHighArmedThreshold = 15.3,
|
|
MinimumValidBatteryThreshold = 4,
|
|
MinimumValidInputThreshold = 4,
|
|
MaximumValidBatteryThreshold = 9,
|
|
MaximumValidInputThreshold = 19,
|
|
BatteryMediumDiagnosticsThreshold = 8.0,
|
|
BatteryMediumArmedThreshold = 7.9,
|
|
InputMediumDiagnosticsThreshold = 11.8,
|
|
InputMediumArmedThreshold = 10.9,
|
|
};
|
|
public static DasBatteryInputSettings SLICE2_SLT_PowerSetting
|
|
{
|
|
get
|
|
{
|
|
var s = SettingsDB.GetGlobalValue(Keys.SLICE2_SLT_PowerSetting.ToString(), SLICE2_SLT_PowerSetting_Default.ToSerializedString());
|
|
return new DasBatteryInputSettings(s);
|
|
}
|
|
set
|
|
{
|
|
var s = value.ToSerializedString();
|
|
SettingsDB.SetGlobalValue(Keys.SLICE2_SLT_PowerSetting.ToString(), s);
|
|
}
|
|
}
|
|
|
|
public static readonly DasBatteryInputSettings SLICE2_SLD_PowerSetting_Default = new DasBatteryInputSettings()
|
|
{
|
|
BatteryLowDiagnosticsThreshold = 7.8,
|
|
BatteryHighDiagnosticsThreshold = 9,
|
|
BatteryLowArmedThreshold = 6.8,
|
|
BatteryHighArmedThreshold = 9,
|
|
InputLowDiagnosticsThreshold = 7.6,
|
|
InputHighDiagnosticsThreshold = 15.3,
|
|
InputLowArmedThreshold = 6.5,
|
|
InputHighArmedThreshold = 15.3,
|
|
MinimumValidBatteryThreshold = 4,
|
|
MinimumValidInputThreshold = 4,
|
|
MaximumValidBatteryThreshold = 9,
|
|
MaximumValidInputThreshold = 19,
|
|
BatteryMediumDiagnosticsThreshold = 8.0,
|
|
BatteryMediumArmedThreshold = 7.9,
|
|
InputMediumDiagnosticsThreshold = 11.8,
|
|
InputMediumArmedThreshold = 10.9,
|
|
};
|
|
public static DasBatteryInputSettings SLICE2_SLD_PowerSetting
|
|
{
|
|
get
|
|
{
|
|
var s = SettingsDB.GetGlobalValue(Keys.SLICE2_SLD_PowerSetting.ToString(), SLICE2_SLD_PowerSetting_Default.ToSerializedString());
|
|
return new DasBatteryInputSettings(s);
|
|
}
|
|
set
|
|
{
|
|
var s = value.ToSerializedString();
|
|
SettingsDB.SetGlobalValue(Keys.SLICE2_SLD_PowerSetting.ToString(), s);
|
|
}
|
|
}
|
|
public static DasBatteryInputSettings PowerPRO_PowerSetting
|
|
{
|
|
get
|
|
{
|
|
var s = SettingsDB.GetGlobalValue(Keys.PowerPRO_PowerSetting.ToString(), PowerPRO_PowerSetting_Default.ToSerializedString());
|
|
return new DasBatteryInputSettings(s);
|
|
}
|
|
set
|
|
{
|
|
var s = value.ToSerializedString();
|
|
SettingsDB.SetGlobalValue(Keys.PowerPRO_PowerSetting.ToString(), s);
|
|
}
|
|
}
|
|
public static readonly DasBatteryInputSettings PowerPRO_PowerSetting_Default = new DasBatteryInputSettings
|
|
{
|
|
// ============ BATTERY ===================
|
|
// Extrema
|
|
MinimumValidBatteryThreshold = 8.5,
|
|
MaximumValidBatteryThreshold = 14.0,
|
|
|
|
// Diag
|
|
BatteryLowDiagnosticsThreshold = 10.0,
|
|
BatteryMediumDiagnosticsThreshold = 10.8,
|
|
BatteryHighDiagnosticsThreshold = 13.0,
|
|
|
|
// Arm
|
|
BatteryLowArmedThreshold = 10.0,
|
|
BatteryMediumArmedThreshold = 10.8,
|
|
BatteryHighArmedThreshold = 13.0,
|
|
|
|
|
|
// ============ INPUT ===================
|
|
// Extrema
|
|
MinimumValidInputThreshold = 10.0,
|
|
MaximumValidInputThreshold = 39.0,
|
|
|
|
// Diag
|
|
InputLowDiagnosticsThreshold = 17.7,
|
|
InputMediumDiagnosticsThreshold = 20.0,
|
|
InputHighDiagnosticsThreshold = 36.3,
|
|
|
|
// Arm
|
|
InputLowArmedThreshold = 17.7,
|
|
InputMediumArmedThreshold = 20.0,
|
|
InputHighArmedThreshold = 36.3
|
|
};
|
|
|
|
public static DasBatteryInputSettings TSRAIR_PowerSetting
|
|
{
|
|
get
|
|
{
|
|
var s = SettingsDB.GetGlobalValue(Keys.TSRAIR_PowerSetting.ToString(), TSRAIR_PowerSetting_Default.ToSerializedString());
|
|
return new DasBatteryInputSettings(s);
|
|
}
|
|
set
|
|
{
|
|
var s = value.ToSerializedString();
|
|
SettingsDB.SetGlobalValue(Keys.TSRAIR_PowerSetting.ToString(), s);
|
|
}
|
|
}
|
|
public static readonly DasBatteryInputSettings TSRAIR_PowerSetting_Default = new DasBatteryInputSettings
|
|
{
|
|
// ============ BATTERY ===================
|
|
// Extrema
|
|
MinimumValidBatteryThreshold = 2,
|
|
MaximumValidBatteryThreshold = 4.5,
|
|
|
|
// Diag
|
|
BatteryLowDiagnosticsThreshold = 3.5,
|
|
BatteryMediumDiagnosticsThreshold = 3.6,
|
|
BatteryHighDiagnosticsThreshold = 4.45,
|
|
|
|
// Arm
|
|
BatteryLowArmedThreshold = 3.5,
|
|
BatteryMediumArmedThreshold = 3.6,
|
|
BatteryHighArmedThreshold = 4.45,
|
|
|
|
|
|
// ============ INPUT ===================
|
|
// Extrema
|
|
MinimumValidInputThreshold = 4,
|
|
MaximumValidInputThreshold = 35,
|
|
|
|
// Diag
|
|
InputLowDiagnosticsThreshold = 8.5,
|
|
InputMediumDiagnosticsThreshold = 8.95,
|
|
InputHighDiagnosticsThreshold = 30,
|
|
|
|
// Arm
|
|
InputLowArmedThreshold = 8.5,
|
|
InputMediumArmedThreshold = 8.95,
|
|
InputHighArmedThreshold = 30,
|
|
};
|
|
|
|
public static DasBatteryInputSettings SLICEPRODistributor_PowerSetting
|
|
{
|
|
get
|
|
{
|
|
var s = SettingsDB.GetGlobalValue(Keys.SLICEPRODistributor_PowerSetting.ToString(), SLICEPRODistributor_PowerSetting_Default.ToSerializedString());
|
|
var setting = new DasBatteryInputSettings(s);
|
|
//if the minimum is too low or the max is grossly too high, adjust to hardcode value
|
|
//this allows the user some wiggle room to adjust the settings but still correct the values when they are grossly off
|
|
//http://manuscript.dts.local/f/cases/43288/SPDB-Input-Voltage
|
|
if (setting.MinimumValidInputThreshold < DTS.Common.Constant.DASSpecific.SliceProDB.MINIMUM_VALID_INPUT_THRESHOLD_LOW
|
|
|| setting.MinimumValidInputThreshold > DTS.Common.Constant.DASSpecific.SliceProDB.MINIMUM_VALID_INPUT_THRESHOLD_HIGH)
|
|
{
|
|
setting.MinimumValidInputThreshold = DTS.Common.Constant.DASSpecific.SliceProDB.MINIMUM_VALID_INPUT_THRESHOLD_VALUE;
|
|
}
|
|
if (setting.MaximumValidInputThreshold > DTS.Common.Constant.DASSpecific.SliceProDB.MAXIMUM_VALID_INPUT_THRESHOLD_HIGH ||
|
|
setting.MaximumValidInputThreshold < DTS.Common.Constant.DASSpecific.SliceProDB.MAXIMUM_VALID_INPUT_THRESHOLD_LOW)
|
|
{
|
|
setting.MaximumValidInputThreshold = DTS.Common.Constant.DASSpecific.SliceProDB.MAXIMUM_VALID_INPUT_THRESHOLD_VALUE;
|
|
}
|
|
//if low is grossly wrong, correct it, we expect 36.5
|
|
var valuesReset = false;
|
|
if (setting.InputLowArmedThreshold > DTS.Common.Constant.DASSpecific.SliceProDB.INPUTLOWTHRESHOLD_HIGH ||
|
|
setting.InputLowArmedThreshold < DTS.Common.Constant.DASSpecific.SliceProDB.INPUTLOWTHRESHOLD_LOW)
|
|
{
|
|
setting.InputLowArmedThreshold = DTS.Common.Constant.DASSpecific.SliceProDB.INPUTLOWTHRESHOLD_DEFAULT;
|
|
setting.InputLowDiagnosticsThreshold = DTS.Common.Constant.DASSpecific.SliceProDB.INPUTLOWTHRESHOLD_DEFAULT;
|
|
valuesReset = true;
|
|
}
|
|
//if high setting is grossly less than the high we expect, correct it
|
|
if (setting.InputHighArmedThreshold < DTS.Common.Constant.DASSpecific.SliceProDB.INPUTHIGHTHRESHOLD_LOW ||
|
|
setting.InputHighArmedThreshold > DTS.Common.Constant.DASSpecific.SliceProDB.INPUTHIGHTHRESHOLD_HIGH)
|
|
{
|
|
setting.InputHighArmedThreshold = DTS.Common.Constant.DASSpecific.SliceProDB.INPUTHIGHTHRESHOLD_DEFAULT;
|
|
setting.InputHighDiagnosticsThreshold = DTS.Common.Constant.DASSpecific.SliceProDB.INPUTHIGHTHRESHOLD_DEFAULT;
|
|
}
|
|
if (valuesReset)
|
|
{
|
|
setting.InputMediumArmedThreshold = (setting.InputLowArmedThreshold + setting.InputHighArmedThreshold) / 2;
|
|
setting.InputMediumDiagnosticsThreshold = setting.InputMediumArmedThreshold;
|
|
}
|
|
|
|
return setting;
|
|
}
|
|
set
|
|
{
|
|
var s = value.ToSerializedString();
|
|
SettingsDB.SetGlobalValue(Keys.SLICEPRODistributor_PowerSetting.ToString(), s);
|
|
}
|
|
}
|
|
//http://manuscript.dts.local/f/cases/43288/SPDB-Input-Voltage
|
|
public static readonly DasBatteryInputSettings SLICEPRODistributor_PowerSetting_Default = new DasBatteryInputSettings
|
|
{
|
|
// ============ BATTERY ===================
|
|
// Extrema
|
|
MinimumValidBatteryThreshold = 8.5,
|
|
MaximumValidBatteryThreshold = 29.0,
|
|
|
|
// Diag
|
|
BatteryLowDiagnosticsThreshold = 10.0,
|
|
BatteryMediumDiagnosticsThreshold = 10.8,
|
|
BatteryHighDiagnosticsThreshold = 28.0,
|
|
|
|
// Arm
|
|
BatteryLowArmedThreshold = 10.0,
|
|
BatteryMediumArmedThreshold = 10.8,
|
|
BatteryHighArmedThreshold = 28.0,
|
|
|
|
|
|
// ============ INPUT ===================
|
|
// Extrema
|
|
MinimumValidInputThreshold = 35,
|
|
MaximumValidInputThreshold = 57,
|
|
|
|
// Diag
|
|
InputLowDiagnosticsThreshold = 36.5,
|
|
InputMediumDiagnosticsThreshold = 47,
|
|
InputHighDiagnosticsThreshold = 56.0,
|
|
|
|
// Arm
|
|
InputLowArmedThreshold = 36.5,
|
|
InputMediumArmedThreshold = 47,
|
|
InputHighArmedThreshold = 56.0,
|
|
};
|
|
|
|
public static DasBatteryInputSettings Falcon_PowerSetting
|
|
{
|
|
get
|
|
{
|
|
var s = SettingsDB.GetGlobalValue(Keys.Falcon_PowerSetting.ToString(), Falcon_PowerSetting_Default.ToSerializedString());
|
|
return new DasBatteryInputSettings(s);
|
|
}
|
|
set
|
|
{
|
|
var s = value.ToSerializedString();
|
|
SettingsDB.SetGlobalValue(Keys.Falcon_PowerSetting.ToString(), s);
|
|
}
|
|
}
|
|
public static readonly DasBatteryInputSettings Falcon_PowerSetting_Default = new DasBatteryInputSettings
|
|
{
|
|
// ============ BATTERY ===================
|
|
// Extrema
|
|
MinimumValidBatteryThreshold = 4,
|
|
MaximumValidBatteryThreshold = 9,
|
|
|
|
// Diag
|
|
BatteryLowDiagnosticsThreshold = 7,
|
|
BatteryMediumDiagnosticsThreshold = 8.4,
|
|
BatteryHighDiagnosticsThreshold = 8.4,
|
|
|
|
// Arm
|
|
BatteryLowArmedThreshold = 7,
|
|
BatteryMediumArmedThreshold = 7.9,
|
|
BatteryHighArmedThreshold = 8.4,
|
|
|
|
|
|
// ============ INPUT ===================
|
|
// Extrema
|
|
MinimumValidInputThreshold = 4,
|
|
MaximumValidInputThreshold = 35,
|
|
|
|
// Diag
|
|
InputLowDiagnosticsThreshold = 9,
|
|
InputMediumDiagnosticsThreshold = 11.8,
|
|
InputHighDiagnosticsThreshold = 30,
|
|
|
|
// Arm
|
|
InputLowArmedThreshold = 9,
|
|
InputMediumArmedThreshold = 10.9,
|
|
InputHighArmedThreshold = 30,
|
|
};
|
|
|
|
#endregion Power and Battery
|
|
|
|
public const DownloadService.DownloadParallelSettings DownloadModeDefault =
|
|
DownloadService.DownloadParallelSettings.AllParallel;
|
|
/// <summary>
|
|
/// controls the behavior of the download service
|
|
/// traditional sliceware and datapro is all in parallel, however some systems may need to be slowed down to prevent flooding
|
|
/// this comes in two flavors (all serial, or parallel for each type of das)
|
|
/// </summary>
|
|
public static DownloadService.DownloadParallelSettings DownloadMode
|
|
{
|
|
get
|
|
{
|
|
var s = SettingsDB.GetGlobalValue(Keys.DownloadMode.ToString(), DownloadModeDefault.ToString());
|
|
return Enum.TryParse(s, out DownloadService.DownloadParallelSettings setting) ? setting : DownloadModeDefault;
|
|
}
|
|
set => SettingsDB.SetGlobalValue(Keys.DownloadMode.ToString(), value.ToString());
|
|
}
|
|
|
|
|
|
//private const string IgnorePowerModeWarningKey = "IgnorePowerMode";
|
|
public const bool IgnorePowerModeWarningDefault = false;
|
|
/// <summary>
|
|
/// controls whether the power mode warning is supressed or not on startup
|
|
/// </summary>
|
|
public static bool IgnorePowerModeWarning
|
|
{
|
|
get => SettingsDB.GetGlobalValueBool(Keys.IgnorePowerMode.ToString(), IgnorePowerModeWarningDefault);
|
|
set => SettingsDB.SetGlobalValueBoolean(Keys.IgnorePowerMode.ToString(), value);
|
|
}
|
|
|
|
public const bool UseISOCodeFilterMappingDefault = true;
|
|
public static bool UseISOCodeFilterMapping
|
|
{
|
|
get => SettingsDB.GetGlobalValueBool(Keys.UseISOCodeFilterMapping.ToString(), UseISOCodeFilterMappingDefault);
|
|
set
|
|
{
|
|
SensorConstants.UseISOCodeFilterMapping = value;
|
|
SettingsDB.SetGlobalValueBoolean(Keys.UseISOCodeFilterMapping.ToString(), value);
|
|
}
|
|
}
|
|
|
|
//private const string NumberOfRealtimeChartsKey = "NumberRealtimeCharts";
|
|
public const int NumberOfRealtimeChartsDefault = 1;
|
|
public static int NumberOfRealtimeCharts
|
|
{
|
|
get => SettingsDB.GetGlobalValueInt(Keys.NumberRealtimeCharts.ToString(), NumberOfRealtimeChartsDefault);
|
|
set => SettingsDB.SetGlobalValueInt(Keys.NumberRealtimeCharts.ToString(), value);
|
|
}
|
|
|
|
|
|
//private const string UseCircularBufferForTriggerCheckKey = "UseCircBufTriggerCheck";
|
|
public const bool UseCircularBufferForTriggerCheckDefault = true;
|
|
public static bool UseCircularBufferForTriggerCheck
|
|
{
|
|
get => SettingsDB.GetGlobalValueBool(Keys.UseCircBufTriggerCheck.ToString(), UseCircularBufferForTriggerCheckDefault);
|
|
set => SettingsDB.SetGlobalValueBoolean(Keys.UseCircBufTriggerCheck.ToString(), value);
|
|
}
|
|
|
|
|
|
public const bool TriggerCheckPostRealtimeDefault = false;
|
|
public static bool TriggerCheckPostRealtime
|
|
{
|
|
get => SettingsDB.GetGlobalValueBool(Keys.TriggerCheckPostRealtime.ToString(), TriggerCheckPostRealtimeDefault);
|
|
set => SettingsDB.SetGlobalValueBoolean(Keys.TriggerCheckPostRealtime.ToString(), value);
|
|
}
|
|
|
|
|
|
public const bool DeriveROIFromAllDefault = false;
|
|
public static bool DeriveROIFromAll
|
|
{
|
|
get => SettingsDB.GetGlobalValueBool(Keys.DeriveROIFromAll.ToString(), DeriveROIFromAllDefault);
|
|
set => SettingsDB.SetGlobalValueBoolean(Keys.DeriveROIFromAll.ToString(), value);
|
|
}
|
|
|
|
|
|
public const string ControlSurfaceCOMPortDefault = "NONE";
|
|
/// <summary>
|
|
/// the control surface com port, the port to send com signals to
|
|
/// </summary>
|
|
public static string ControlSurfaceCOMPort
|
|
{
|
|
get => SettingsDB.GetGlobalValue(Keys.CRIBCOM.ToString(), ControlSurfaceCOMPortDefault);
|
|
set => SettingsDB.SetGlobalValue(Keys.CRIBCOM.ToString(), value);
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
/// the last time an event was recorded (as measured by entering basic info)
|
|
/// </summary>
|
|
public static DateTime LastEventStartTime
|
|
{
|
|
get
|
|
{
|
|
var s = SettingsDB.GetGlobalValue(Keys.LastEventStartTime.ToString(), "");
|
|
if (long.TryParse(s, System.Globalization.NumberStyles.Integer,
|
|
System.Globalization.CultureInfo.InvariantCulture, out var l))
|
|
{
|
|
var dt = new DateTime().AddTicks(l);
|
|
return dt;
|
|
}
|
|
return DateTime.Now;
|
|
}
|
|
set => SettingsDB.SetGlobalValue(Keys.LastEventStartTime.ToString(), value.Ticks.ToString());
|
|
}
|
|
|
|
|
|
public const string ExportINIFileDefault = "";
|
|
/// <summary>
|
|
/// the location of the export INI file in use.
|
|
/// This is used by GMMilford to control the directories of some export files
|
|
/// </summary>
|
|
public static string ExportINIFile
|
|
{
|
|
get => SettingsDB.GetGlobalValue(Keys.ExportINIFile.ToString(), ExportINIFileDefault);
|
|
set => SettingsDB.SetGlobalValue(Keys.ExportINIFile.ToString(), value);
|
|
}
|
|
|
|
public const string TestIDPrefixSuffixValuesDefault = "Run Test,Dry Run,Bench Test";
|
|
/// <summary>
|
|
/// the user defined comma seperated values that populate the testid prefix and suffix drop downs.
|
|
/// </summary>
|
|
public static string TestIDPrefixSuffixValues
|
|
{
|
|
get => SettingsDB.GetGlobalValue(Keys.TestIDPrefixSuffixValues.ToString(), TestIDPrefixSuffixValuesDefault);
|
|
set => SettingsDB.SetGlobalValue(Keys.TestIDPrefixSuffixValues.ToString(), value);
|
|
}
|
|
|
|
|
|
public const IsoViewMode ISOViewModeDefault = IsoViewMode.ISOOnly;
|
|
|
|
public static IsoViewMode ISOViewMode
|
|
{
|
|
get
|
|
{
|
|
var showISO = ShowISOCodes;
|
|
var showUser = ShowUserCodes;
|
|
|
|
if (showISO && showUser) { return IsoViewMode.ISOAndUserCode; }
|
|
|
|
if (!showISO && !showUser)
|
|
{
|
|
return IsoViewMode.ChannelNameOnly;
|
|
}
|
|
return showUser ? IsoViewMode.UserCodeOnly : IsoViewMode.ISOOnly;
|
|
}
|
|
set
|
|
{
|
|
switch (value)
|
|
{
|
|
case IsoViewMode.ISOAndUserCode:
|
|
SettingsDB.SetGlobalValueBoolean(Keys.ShowISOCodes.ToString(), true);
|
|
SettingsDB.SetGlobalValueBoolean(Keys.ShowUserCodes.ToString(), true);
|
|
break;
|
|
case IsoViewMode.ISOOnly:
|
|
SettingsDB.SetGlobalValueBoolean(Keys.ShowISOCodes.ToString(), true);
|
|
SettingsDB.SetGlobalValueBoolean(Keys.ShowUserCodes.ToString(), false);
|
|
break;
|
|
case IsoViewMode.UserCodeOnly:
|
|
SettingsDB.SetGlobalValueBoolean(Keys.ShowISOCodes.ToString(), false);
|
|
SettingsDB.SetGlobalValueBoolean(Keys.ShowUserCodes.ToString(), true);
|
|
break;
|
|
case IsoViewMode.ChannelNameOnly:
|
|
SettingsDB.SetGlobalValueBoolean(Keys.ShowISOCodes.ToString(), false);
|
|
SettingsDB.SetGlobalValueBoolean(Keys.ShowUserCodes.ToString(), false);
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
public const bool ShowISOCodesDefault = true;
|
|
/// <summary>
|
|
/// controls whether ISOCodes are shown when user is in ISO mode
|
|
/// some customers may run in ISO mode but still not care to see ISOCodes
|
|
/// </summary>
|
|
public static bool ShowISOCodes
|
|
{
|
|
get => SettingsDB.GetGlobalValueBool(Keys.ShowISOCodes.ToString(), ShowISOCodesDefault);
|
|
set => SettingsDB.SetGlobalValueBoolean(Keys.ShowISOCodes.ToString(), value);
|
|
}
|
|
public const bool ShowUserCodesDefault = false;
|
|
/// <summary>
|
|
/// controls whether User Codes are shown
|
|
/// </summary>
|
|
public static bool ShowUserCodes
|
|
{
|
|
get => SettingsDB.GetGlobalValueBool(Keys.ShowUserCodes.ToString(), ShowUserCodesDefault);
|
|
set => SettingsDB.SetGlobalValueBoolean(Keys.ShowUserCodes.ToString(), value);
|
|
}
|
|
|
|
public const bool ShowISOStringBuilderDefault = true;
|
|
public static bool ShowISOStringBuilder
|
|
{
|
|
get => SettingsDB.GetGlobalValueBool(Keys.ShowISOStringBuilder.ToString(), ShowISOStringBuilderDefault);
|
|
set => SettingsDB.SetGlobalValueBoolean(Keys.ShowISOStringBuilder.ToString(), value);
|
|
}
|
|
|
|
public const bool ShowChannelCodeLookupHelperDefault = true;
|
|
public static bool ShowChannelCodeLookupHelper
|
|
{
|
|
get => SettingsDB.GetGlobalValueBool(Keys.ShowChannelCodeLookupHelper.ToString(), ShowChannelCodeLookupHelperDefault);
|
|
set => SettingsDB.SetGlobalValueBoolean(Keys.ShowChannelCodeLookupHelper.ToString(), value);
|
|
}
|
|
|
|
public const bool UseMeterModeTableDefault = true;
|
|
/// <summary>
|
|
/// controls whether meter mode is done in gm style (with a drop down to select sensor tag, and polling done using SampleAverage)
|
|
/// this only applies when using meter mode
|
|
/// </summary>
|
|
public static bool UseMeterModeTable
|
|
{
|
|
get => SettingsDB.GetGlobalValueBool(Keys.UseMeterModeTable.ToString(), UseMeterModeTableDefault);
|
|
set => SettingsDB.SetGlobalValueBoolean(Keys.UseMeterModeTable.ToString(), value);
|
|
}
|
|
|
|
//public const bool UseTestChannelOrderDefault = false;
|
|
|
|
//public static bool UseTestChannelOrder
|
|
//{
|
|
// get => SettingsDB.GetGlobalValueBool(Keys.UseTestChannelOrder.ToString(), UseTestChannelOrderDefault);
|
|
// set => SettingsDB.SetGlobalValueBoolean(Keys.UseTestChannelOrder.ToString(), value);
|
|
//}
|
|
|
|
|
|
public const int AutoArmDiagDelayMSDefault = 30000;
|
|
/// <summary>
|
|
/// the delay in ms before diagnostics is run by an autoarmed das
|
|
/// </summary>
|
|
public static int AutoArmDiagDelayMS
|
|
{
|
|
get => SettingsDB.GetGlobalValueInt(Keys.AutoArmDiagDelayMS.ToString(), AutoArmDiagDelayMSDefault);
|
|
set => SettingsDB.SetGlobalValueInt(Keys.AutoArmDiagDelayMS.ToString(), value);
|
|
}
|
|
|
|
public static readonly double[] RealtimeSampleRatesDefault = new double[] { 120, 400, 500, 1000 };
|
|
public static double[] RealtimeSampleRates
|
|
{
|
|
get => SettingsDB.GetGlobalValueDoubleArray(Keys.RealtimeSampleRates.ToString(), RealtimeSampleRatesDefault);
|
|
set => SettingsDB.SetGlobalValueDoubleArray(Keys.RealtimeSampleRates.ToString(), value);
|
|
}
|
|
|
|
public static double RealtimeSampleRateDefault = 120D;
|
|
public static double RealtimeSampleRate
|
|
{
|
|
get => SettingsDB.GetGlobalValueDouble(Keys.RealtimeSampleRate.ToString(), RealtimeSampleRateDefault);
|
|
set => SettingsDB.SetGlobalValueDouble(Keys.RealtimeSampleRate.ToString(), value);
|
|
}
|
|
|
|
public const double DesiredRangeOverheadPercentDefault = 1.2D;
|
|
public static double DesiredRangeOverheadPercent
|
|
{
|
|
get => SettingsDB.GetGlobalValueDouble(Keys.OverheadPercent.ToString(), DesiredRangeOverheadPercentDefault);
|
|
set => SettingsDB.SetGlobalValueDouble(Keys.OverheadPercent.ToString(), value);
|
|
}
|
|
|
|
public static bool AutoZeroRealtimeDefault => false;
|
|
|
|
public static bool AllowCalculatedChannelsDefault => false;
|
|
|
|
public static bool AllowCalculatedChannels
|
|
{
|
|
get => SettingsDB.GetGlobalValueBool(Keys.AllowCalculatedChannels.ToString(), AllowCalculatedChannelsDefault);
|
|
set => SettingsDB.SetGlobalValueBoolean(Keys.AllowCalculatedChannels.ToString(), value);
|
|
}
|
|
|
|
|
|
public const bool AllowLevelTriggerUIDefault = false;
|
|
public static bool AllowLevelTriggerUI
|
|
{
|
|
get => SettingsDB.GetGlobalValueBool(Keys.AllowLevelTriggerUI.ToString(), AllowLevelTriggerUIDefault);
|
|
set => SettingsDB.SetGlobalValueBoolean(Keys.AllowLevelTriggerUI.ToString(), value);
|
|
}
|
|
|
|
|
|
public const int TDASCalPeriodDefault = 365;
|
|
public static int TDASCalPeriod
|
|
{
|
|
get => SettingsDB.GetGlobalValueInt(Keys.TDASCalPeriod.ToString(), TDASCalPeriodDefault);
|
|
set => SettingsDB.SetGlobalValueInt(Keys.TDASCalPeriod.ToString(), value);
|
|
}
|
|
|
|
|
|
public const int G5CalPeriodDefault = 365;
|
|
public static int G5CalPeriod
|
|
{
|
|
get => SettingsDB.GetGlobalValueInt(Keys.G5CalPeriod.ToString(), G5CalPeriodDefault);
|
|
set => SettingsDB.SetGlobalValueInt(Keys.G5CalPeriod.ToString(), value);
|
|
}
|
|
|
|
|
|
public const int Slice1CalPeriodDefault = 365;
|
|
public static int SLICE1CalPeriod
|
|
{
|
|
get => SettingsDB.GetGlobalValueInt(Keys.Slice1CalPeriod.ToString(), Slice1CalPeriodDefault);
|
|
set => SettingsDB.SetGlobalValueInt(Keys.Slice1CalPeriod.ToString(), value);
|
|
}
|
|
|
|
|
|
public const int Slice1_5CalPeriodDefault = 365;
|
|
public static int SLICE1_5CalPeriod
|
|
{
|
|
get => SettingsDB.GetGlobalValueInt(Keys.Slice1_5CalPeriod.ToString(), Slice1_5CalPeriodDefault);
|
|
set => SettingsDB.SetGlobalValueInt(Keys.Slice1_5CalPeriod.ToString(), value);
|
|
}
|
|
|
|
|
|
public const int Slice2_CalPeriodDefault = 365;
|
|
public static int SLICE2_CalPeriod
|
|
{
|
|
get => SettingsDB.GetGlobalValueInt(Keys.Slice2_CalPeriod.ToString(), Slice2_CalPeriodDefault);
|
|
set => SettingsDB.SetGlobalValueInt(Keys.Slice2_CalPeriod.ToString(), value);
|
|
}
|
|
|
|
public const int SLICE6_CalPeriodDefault = 365;
|
|
public static int SLICE6_CalPeriod
|
|
{
|
|
get => SettingsDB.GetGlobalValueInt(Keys.SLICE6_CalPeriod.ToString(), SLICE6_CalPeriodDefault);
|
|
set => SettingsDB.SetGlobalValueInt(Keys.SLICE6_CalPeriod.ToString(), value);
|
|
}
|
|
|
|
public const int POWERPRO_CalPeriodDefault = 365;
|
|
public static int POWERPRO_CalPeriod
|
|
{
|
|
get => SettingsDB.GetGlobalValueInt(Keys.POWERPRO_CalPeriod.ToString(), POWERPRO_CalPeriodDefault);
|
|
set => SettingsDB.SetGlobalValueInt(Keys.POWERPRO_CalPeriod.ToString(), value);
|
|
}
|
|
|
|
public const int SLICE6Air_CalPeriodDefault = 365;
|
|
public static int SLICE6Air_CalPeriod
|
|
{
|
|
get => SettingsDB.GetGlobalValueInt(Keys.SLICE6Air_CalPeriod.ToString(), SLICE6Air_CalPeriodDefault);
|
|
set => SettingsDB.SetGlobalValueInt(Keys.SLICE6Air_CalPeriod.ToString(), value);
|
|
}
|
|
|
|
public const int SLICE6AirBridge_CalPeriodDefault = 365;
|
|
public static int SLICE6AirBridge_CalPeriod
|
|
{
|
|
get => SettingsDB.GetGlobalValueInt(Keys.SLICE6AirBridge_CalPeriod.ToString(), SLICE6AirBridge_CalPeriodDefault);
|
|
set => SettingsDB.SetGlobalValueInt(Keys.SLICE6AirBridge_CalPeriod.ToString(), value);
|
|
}
|
|
|
|
public const int SLICE6DB_CalPeriodDefault = 365;
|
|
public static int SLICE6DB_CalPeriod
|
|
{
|
|
get => SettingsDB.GetGlobalValueInt(Keys.SLICE6DB_CalPeriod.ToString(), SLICE6DB_CalPeriodDefault);
|
|
set => SettingsDB.SetGlobalValueInt(Keys.SLICE6DB_CalPeriod.ToString(), value);
|
|
}
|
|
|
|
public const int TSRAir_CalPeriodDefault = 365;
|
|
public static int TSRAir_CalPeriod
|
|
{
|
|
get => SettingsDB.GetGlobalValueInt(Keys.TSRAir_CalPeriod.ToString(), TSRAir_CalPeriodDefault);
|
|
set => SettingsDB.SetGlobalValueInt(Keys.TSRAir_CalPeriod.ToString(), value);
|
|
}
|
|
|
|
public const int SLICETC_CalPeriodDefault = 365;
|
|
public static int SLICETC_CalPeriod
|
|
{
|
|
get => SettingsDB.GetGlobalValueInt(Keys.SLICETC_CalPeriod.ToString(), SLICETC_CalPeriodDefault);
|
|
set => SettingsDB.SetGlobalValueInt(Keys.SLICETC_CalPeriod.ToString(), value);
|
|
}
|
|
|
|
public const int CalWarningPeriodDefault = 30;
|
|
public static int CalWarningPeriod
|
|
{
|
|
get => SettingsDB.GetGlobalValueInt(Keys.CalWarningPeriod.ToString(), CalWarningPeriodDefault);
|
|
set => SettingsDB.SetGlobalValueInt(Keys.CalWarningPeriod.ToString(), value);
|
|
}
|
|
|
|
|
|
public const int CalHWGracePeriodDefault = 30;
|
|
public static int CalHWGracePeriodDays
|
|
{
|
|
get => SettingsDB.GetGlobalValueInt(Keys.CalHWGracePeriod.ToString(), CalHWGracePeriodDefault);
|
|
set => SettingsDB.SetGlobalValueInt(Keys.CalHWGracePeriod.ToString(), value);
|
|
}
|
|
|
|
public enum OVERDUE_HARDWARE_POLICIES
|
|
{
|
|
ALLOW_ALWAYS,
|
|
ALLOW_UPTO_GRACE_PERIOD,
|
|
DONT_ALLOW
|
|
}
|
|
|
|
public const OVERDUE_HARDWARE_POLICIES CALHWPolicyDefault = OVERDUE_HARDWARE_POLICIES.ALLOW_UPTO_GRACE_PERIOD;
|
|
public static OVERDUE_HARDWARE_POLICIES CalHWPolicy
|
|
{
|
|
get
|
|
{
|
|
var s = SettingsDB.GetGlobalValue(Keys.HardwareCalPolicy.ToString(), CALHWPolicyDefault.ToString());
|
|
return !Enum.TryParse(s, out OVERDUE_HARDWARE_POLICIES policy) ? CALHWPolicyDefault : policy;
|
|
}
|
|
set => SettingsDB.SetGlobalValue(Keys.HardwareCalPolicy.ToString(), value.ToString());
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
/// the configured cal policy for the install (allow, don't allow) wrt out of date sensors
|
|
/// </summary>
|
|
public static SensorConstants.SensorCalPolicy CalSensorPolicy
|
|
{
|
|
get
|
|
{
|
|
var s = SettingsDB.GetGlobalValue(Keys.SensorCalPolicy.ToString(), SensorConstants.CAL_SENSOR_POLICY_DEFAULT.ToString());
|
|
return !Enum.TryParse(s, out SensorConstants.SensorCalPolicy policy) ? SensorConstants.CAL_SENSOR_POLICY_DEFAULT : policy;
|
|
}
|
|
set => SettingsDB.SetGlobalValue(Keys.SensorCalPolicy.ToString(), value.ToString());
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
/// the installations period in days for sensor calibrations before out of date that a warning should be displayed
|
|
/// </summary>
|
|
public static int SensorCalWarningPeriodDays
|
|
{
|
|
get => SettingsDB.GetGlobalValueInt(Keys.SensorCalWarningPeriodDays.ToString(),
|
|
SensorConstants.CAL_SENSOR_POLICY_WARNING_DAYS_DEFAULT);
|
|
set => SettingsDB.SetGlobalValueInt(Keys.SensorCalWarningPeriodDays.ToString(), value);
|
|
}
|
|
|
|
public static IsoChannelSensorCompatibilityLevels IsoChannelSensorCompatibilityLevelDefault = IsoChannelSensorCompatibilityLevels.Warn;
|
|
public static IsoChannelSensorCompatibilityLevels IsoChannelSensorCompatibilityLevel
|
|
{
|
|
get
|
|
{
|
|
var s = SettingsDB.GetGlobalValue(Keys.DefaultIsoChannelSensorCompatibilityLevel.ToString(), IsoChannelSensorCompatibilityLevelDefault.ToString());
|
|
return !Enum.TryParse(s, out IsoChannelSensorCompatibilityLevels isoChannelSensorCompatibilityLevel) ? IsoChannelSensorCompatibilityLevelDefault : isoChannelSensorCompatibilityLevel;
|
|
}
|
|
set => SettingsDB.SetGlobalValue(Keys.DefaultIsoChannelSensorCompatibilityLevel.ToString(), value.ToString());
|
|
}
|
|
|
|
|
|
public static bool IncludeGroupNameInISOExportDefault = false;
|
|
public static bool IncludeGroupNameInISOExport
|
|
{
|
|
get => SettingsDB.GetGlobalValueBool(Keys.IncludeGroupNameInISOExport.ToString(), IncludeGroupNameInISOExportDefault);
|
|
set => SettingsDB.SetGlobalValueBoolean(Keys.IncludeGroupNameInISOExport.ToString(), value);
|
|
}
|
|
|
|
public static bool UseTestSetupNameForTestIDHeaderInCSVExportDefault = false;
|
|
public static bool UseTestSetupNameForTestIDHeaderInCSVExport
|
|
{
|
|
get => SettingsDB.GetGlobalValueBool(Keys.UseTestSetupNameForTestIDHeaderInCSVExport.ToString(), UseTestSetupNameForTestIDHeaderInCSVExportDefault);
|
|
set => SettingsDB.SetGlobalValueBoolean(Keys.UseTestSetupNameForTestIDHeaderInCSVExport.ToString(), value);
|
|
}
|
|
|
|
public static bool UseFlatExportFoldersDefault = false;
|
|
public static bool UseFlatExportFolders
|
|
{
|
|
get => SettingsDB.GetGlobalValueBool(Keys.UseFlatExportFolders.ToString(), UseFlatExportFoldersDefault);
|
|
set => SettingsDB.SetGlobalValueBoolean(Keys.UseFlatExportFolders.ToString(), value);
|
|
}
|
|
|
|
public static bool UseUnixTimestampsDefault = false;
|
|
public static bool UseUnixTimestamps
|
|
{
|
|
get => SettingsDB.GetGlobalValueBool(Keys.UseUnixTimestamps.ToString(), UseUnixTimestampsDefault);
|
|
set => SettingsDB.SetGlobalValueBoolean(Keys.UseUnixTimestamps.ToString(), value);
|
|
}
|
|
|
|
public static bool UseUnixEpochTimeDefault = false;
|
|
public static bool UseUnixEpochTime
|
|
{
|
|
get => SettingsDB.GetGlobalValueBool(Keys.UseUnixEpochTime.ToString(), UseUnixEpochTimeDefault);
|
|
set => SettingsDB.SetGlobalValueBoolean(Keys.UseUnixEpochTime.ToString(), value);
|
|
}
|
|
|
|
public static bool CombineDualSensitivityExportsDefault = false;
|
|
public static bool CombineDualSensitivityExports
|
|
{
|
|
get => SettingsDB.GetGlobalValueBool(Keys.CombineDualSensitivityExports.ToString(), CombineDualSensitivityExportsDefault);
|
|
set => SettingsDB.SetGlobalValueBoolean(Keys.CombineDualSensitivityExports.ToString(), value);
|
|
}
|
|
public static bool KeepMultipleEventsAndROIWithinTestFolderDefault = true;
|
|
public static bool KeepMultipleEventsAndROIWithinTestFolder
|
|
{
|
|
get => SettingsDB.GetGlobalValueBool(Keys.KeepMultipleEventsAndROIWithinTestFolder.ToString(), KeepMultipleEventsAndROIWithinTestFolderDefault);
|
|
set => SettingsDB.SetGlobalValueBoolean(Keys.KeepMultipleEventsAndROIWithinTestFolder.ToString(), value);
|
|
}
|
|
//FB 38039 Added Show checkout button setting
|
|
public const bool ShowCheckoutButtonDefault = false;
|
|
public static bool ShowCheckoutButton
|
|
{
|
|
get => SettingsDB.GetGlobalValueBool(Keys.ShowCheckoutButton.ToString(), ShowCheckoutButtonDefault);
|
|
set => SettingsDB.SetGlobalValueBoolean(Keys.ShowCheckoutButton.ToString(), value);
|
|
}
|
|
|
|
//FB 41821 Added Show CableMultiplier column setting
|
|
public const bool ShowCableMultiplierDefault = false;
|
|
public static bool ShowCableMultiplier
|
|
{
|
|
get => SettingsDB.GetGlobalValueBool(Keys.ShowCableMultiplier.ToString(), ShowCableMultiplierDefault);
|
|
set => SettingsDB.SetGlobalValueBoolean(Keys.ShowCableMultiplier.ToString(), value);
|
|
}
|
|
|
|
public static bool ClearDBBeforeTSFImportDefault = false;
|
|
public static bool ClearDBBeforeTSFImport
|
|
{
|
|
get => SettingsDB.GetGlobalValueBool(Keys.ClearDBBeforeTSFImport.ToString(), ClearDBBeforeTSFImportDefault);
|
|
set => SettingsDB.SetGlobalValueBoolean(Keys.ClearDBBeforeTSFImport.ToString(), value);
|
|
}
|
|
|
|
public static bool WarnIfTestCancelledWithoutExportDefault = true;
|
|
public static bool WarnIfTestCancelledWithoutExport
|
|
{
|
|
get => SettingsDB.GetGlobalValueBool(Keys.WarnIfTestCancelledWithoutExport.ToString(), WarnIfTestCancelledWithoutExportDefault);
|
|
set => SettingsDB.SetGlobalValueBoolean(Keys.WarnIfTestCancelledWithoutExport.ToString(), value);
|
|
}
|
|
|
|
// FB16225: change options to iso code, sensor serial, or (iso/user) name
|
|
public enum DIADEM_OPTIONS
|
|
{
|
|
NONE,
|
|
ISO_CODE,
|
|
SENSOR_SERIAL_NUMBER,
|
|
CHANNEL_NAME
|
|
}
|
|
|
|
// 43958 Add Group Name as a possibility instead of AAF Rate in Reserved 1
|
|
public enum DIADEM_RESERVED1_OPTIONS
|
|
{
|
|
[Description("None")] NONE,
|
|
[Description("AAF Rate")] AAF_RATE,
|
|
[Description("Group Name")] GROUP_NAME
|
|
}
|
|
|
|
// FB43958: Add Channel Sensitivity as a possibility in Reserved 2
|
|
public enum DIADEM_RESERVED2_OPTIONS
|
|
{
|
|
NONE,
|
|
CHANNEL_SENSITIVITY
|
|
}
|
|
|
|
public static DIADEM_OPTIONS DiademChannelName200OptionDefault = DIADEM_OPTIONS.ISO_CODE;
|
|
public static DIADEM_OPTIONS DiademChannelName200Option
|
|
{
|
|
get
|
|
{
|
|
if (DataModelSettings.UseISOCodeForDiadem200 == false) { DiademChannelName200OptionDefault = DIADEM_OPTIONS.SENSOR_SERIAL_NUMBER; }
|
|
var s = SettingsDB.GetGlobalValue(Keys.DiademChannelName200Option.ToString(), DiademChannelName200OptionDefault.ToString());
|
|
return !Enum.TryParse(s, out DIADEM_OPTIONS option) ? DiademChannelName200OptionDefault : option;
|
|
}
|
|
set => SettingsDB.SetGlobalValue(Keys.DiademChannelName200Option.ToString(), value.ToString());
|
|
}
|
|
|
|
// FB16225: remove "channel description", set to sensor serial instead
|
|
public const DIADEM_OPTIONS DiademUserComment201OptionDefault = DIADEM_OPTIONS.SENSOR_SERIAL_NUMBER;
|
|
public static DIADEM_OPTIONS DiademUserComment201Option
|
|
{
|
|
get
|
|
{
|
|
var s = SettingsDB.GetGlobalValue(Keys.DiademUserComment201Option.ToString(), DiademUserComment201OptionDefault.ToString());
|
|
return !Enum.TryParse(s, out DIADEM_OPTIONS option) ? DiademUserComment201OptionDefault : option;
|
|
}
|
|
set => SettingsDB.SetGlobalValue(Keys.DiademUserComment201Option.ToString(), value.ToString());
|
|
}
|
|
|
|
// 43958 Add Group Name as a possibility instead of AAF Rate in Reserved 1
|
|
public const DIADEM_RESERVED1_OPTIONS DiademReserved1_301OptionDefault = DIADEM_RESERVED1_OPTIONS.AAF_RATE;
|
|
public static DIADEM_RESERVED1_OPTIONS DiademReserved1_301Option
|
|
{
|
|
get
|
|
{
|
|
var s = SettingsDB.GetGlobalValue(Keys.DiademReserved1_301Option.ToString(), DiademReserved1_301OptionDefault.ToString());
|
|
return !Enum.TryParse(s, out DIADEM_RESERVED1_OPTIONS option) ? DiademReserved1_301OptionDefault : option;
|
|
}
|
|
set => SettingsDB.SetGlobalValue(Keys.DiademReserved1_301Option.ToString(), value.ToString());
|
|
}
|
|
|
|
// FB43958: Add Channel Sensitivity as a possibility in Reserved 2
|
|
public const DIADEM_RESERVED2_OPTIONS DiademReserved2_302OptionDefault = DIADEM_RESERVED2_OPTIONS.NONE;
|
|
public static DIADEM_RESERVED2_OPTIONS DiademReserved2_302Option
|
|
{
|
|
get
|
|
{
|
|
var s = SettingsDB.GetGlobalValue(Keys.DiademReserved2_302Option.ToString(), DiademReserved2_302OptionDefault.ToString());
|
|
return !Enum.TryParse(s, out DIADEM_RESERVED2_OPTIONS option) ? DiademReserved2_302OptionDefault : option;
|
|
}
|
|
set => SettingsDB.SetGlobalValue(Keys.DiademReserved2_302Option.ToString(), value.ToString());
|
|
}
|
|
|
|
public static string PersistentTestSetupName
|
|
{
|
|
get => SettingsDB.GetGlobalValue(Keys.StartingTestSetup.ToString(), "");
|
|
set => SettingsDB.SetGlobalValue(Keys.StartingTestSetup.ToString(), value);
|
|
}
|
|
|
|
|
|
public const string SensitivityDisplayFormatDefault = "N8";
|
|
public static string SensitivityDisplayFormat
|
|
{
|
|
get => SettingsDB.GetGlobalValue(Keys.SensitivityDisplayFormat.ToString(), SensitivityDisplayFormatDefault);
|
|
set => SettingsDB.SetGlobalValue(Keys.SensitivityDisplayFormat.ToString(), value);
|
|
}
|
|
|
|
|
|
public const string TriggerSecondsDisplayFormatDefault = "N4";
|
|
public static string TriggerSecondsDisplayFormat
|
|
{
|
|
get => SettingsDB.GetGlobalValue(Keys.TriggerSecondsDisplayFormat.ToString(), TriggerSecondsDisplayFormatDefault);
|
|
set => SettingsDB.SetGlobalValue(Keys.TriggerSecondsDisplayFormat.ToString(), value);
|
|
}
|
|
|
|
|
|
public const string NonLinearDisplayFormatDefault = "N8";
|
|
public static string NonLinearDisplayFormat
|
|
{
|
|
get => SettingsDB.GetGlobalValue(Keys.NonLinearDisplayFormat.ToString(), NonLinearDisplayFormatDefault);
|
|
set => SettingsDB.SetGlobalValue(Keys.NonLinearDisplayFormat.ToString(), value);
|
|
}
|
|
|
|
public const string CapacityRangeDisplayFormatDefault = "N2";
|
|
public static string CapacityRangeDisplayFormat
|
|
{
|
|
get => SettingsDB.GetGlobalValue(Keys.CapacityRangeDisplayFormat.ToString(), CapacityRangeDisplayFormatDefault);
|
|
set => SettingsDB.SetGlobalValue(Keys.CapacityRangeDisplayFormat.ToString(), value);
|
|
}
|
|
|
|
public enum ISOSupportLevels
|
|
{
|
|
ISO_ONLY, //channels named by iso
|
|
TRANSITORY, //UserValue1 for JCODE/Chimchim/etc, which takes the place of isocode in multiple places
|
|
NO_ISO //channels named by user only
|
|
}
|
|
|
|
public static bool UniqueISOCodesRequiredDefault = true;
|
|
public static bool UniqueISOCodesRequired
|
|
{
|
|
get => SettingsDB.GetGlobalValueBool(Keys.UniqueISOCodesRequired.ToString(), UniqueISOCodesRequiredDefault);
|
|
set => SettingsDB.SetGlobalValueBoolean(Keys.UniqueISOCodesRequired.ToString(), value);
|
|
}
|
|
/// <summary>
|
|
/// returns a dictionary of sensor type to iso physical dimension
|
|
/// </summary>
|
|
/// <returns></returns>
|
|
public static Dictionary<string, string> GetAllSensorTypeToDimensionMappings()
|
|
{
|
|
var d = new Dictionary<string, string>();
|
|
foreach (var m in AllSensorTypeToDimensions)
|
|
{
|
|
if (!d.ContainsKey(m.Code)) { d[m.Code] = m.Dimension; }
|
|
}
|
|
return d;
|
|
}
|
|
|
|
// key for how many mappings are present
|
|
private const string NUM_SENSORTYPE_MAPPINGS = "NUM_SENSORTYPE_MAPPINGS";
|
|
// key for each individual mapping
|
|
private const string SENSORTYPE_MAPPING_PRE = "SENSORTYPE_";
|
|
/// <summary>
|
|
/// returns all Sensor type to ISO physical dimension mappings
|
|
/// </summary>
|
|
public static SensorTypeToDimension[] AllSensorTypeToDimensions
|
|
{
|
|
get
|
|
{
|
|
var sMappings = SettingsDB.GetGlobalValue(NUM_SENSORTYPE_MAPPINGS, "7");
|
|
int.TryParse(sMappings, out var iMappings);
|
|
var mappings = new List<SensorTypeToDimension>();
|
|
for (var i = 0; i < iMappings; i++)
|
|
{
|
|
var s = GetSensorTypeMapping(i);
|
|
if (null != s) { mappings.Add(s); }
|
|
}
|
|
return mappings.ToArray();
|
|
}
|
|
set
|
|
{
|
|
for (var i = 0; i < value.Length; i++) { SetSensorTypeMapping(i, value[i]); }
|
|
SettingsDB.SetGlobalValue(NUM_SENSORTYPE_MAPPINGS, value.Length.ToString());
|
|
}
|
|
}
|
|
/// <summary>
|
|
/// stores one sensor type to iso physical dimension
|
|
/// used by AllSensorTypeToDimensions
|
|
/// </summary>
|
|
/// <param name="index"></param>
|
|
/// <param name="dim"></param>
|
|
private static void SetSensorTypeMapping(int index, SensorTypeToDimension dim)
|
|
{
|
|
var s = string.Format("{0}{1}{2}{1}{3}", dim.Code, (char)149, dim.Name, dim.Dimension);
|
|
SettingsDB.SetGlobalValue($"{SENSORTYPE_MAPPING_PRE}{index}", s);
|
|
}
|
|
private static SensorTypeToDimension GetSensorTypeMapping(int index)
|
|
{
|
|
switch (index)
|
|
{
|
|
case 0: return GetSensorTypeMapping(index, "D", "Acceleration", "AC");
|
|
case 1: return GetSensorTypeMapping(index, "F", "Force", "FO");
|
|
case 2: return GetSensorTypeMapping(index, "M", "Momentum", "MO");
|
|
case 3: return GetSensorTypeMapping(index, "S", "Displacement", "DS");
|
|
case 4: return GetSensorTypeMapping(index, "W", "Angular Acceleration", "AA");
|
|
case 5: return GetSensorTypeMapping(index, "A", "Angle", "AN");
|
|
case 6: return GetSensorTypeMapping(index, "B", "Voltage", "VO");
|
|
default: return GetSensorTypeMapping(index, "", "", "");
|
|
}
|
|
}
|
|
/// <summary>
|
|
/// retrieves an individual sensor type to iso code mapping (or null if there isn't such a mapping)
|
|
/// </summary>
|
|
/// <param name="index"></param>
|
|
/// <param name="code"></param>
|
|
/// <param name="name"></param>
|
|
/// <param name="dimension"></param>
|
|
/// <returns></returns>
|
|
private static SensorTypeToDimension GetSensorTypeMapping(int index, string code, string name, string dimension)
|
|
{
|
|
var s = SettingsDB.GetGlobalValue($"{SENSORTYPE_MAPPING_PRE}{index}", string.Format("{0}{1}{2}{1}{3}", code, (char)149, name, dimension));
|
|
var tokens = s.Split((char)149);
|
|
if (tokens.Length < 3) { return null; }
|
|
var s1 = tokens[0];
|
|
var s2 = tokens[1];
|
|
var s3 = tokens[2];
|
|
if (string.IsNullOrWhiteSpace(s1) || string.IsNullOrWhiteSpace(s2) || string.IsNullOrWhiteSpace(s3)) { return null; }
|
|
return new SensorTypeToDimension(code, name, dimension);
|
|
}
|
|
|
|
public class SensorTypeToDimension : Tuple<string, string, string>
|
|
{
|
|
public SensorTypeToDimension(string sensorType, string name, string dimension) : base(sensorType, name, dimension) { }
|
|
|
|
public string Code => Item1;
|
|
public string Name => Item2;
|
|
public string Dimension => Item3;
|
|
}
|
|
|
|
|
|
public const bool TestSetup_TriggerCheckQuickModeDefault = true;
|
|
public static bool TestSetup_TriggerCheckQuickMode
|
|
{
|
|
get => SettingsDB.GetGlobalValueBool(Keys.TriggerCheckQuickMode.ToString(), TestSetup_TriggerCheckQuickModeDefault);
|
|
set => SettingsDB.SetGlobalValueBoolean(Keys.TriggerCheckQuickMode.ToString(), value);
|
|
}
|
|
|
|
|
|
public const int Diagnostics_TDAS_TimeoutSecDefault = 480;
|
|
public static int Diagnostics_TDAS_TimeoutSec
|
|
{
|
|
get => SettingsDB.GetGlobalValueInt(Keys.Diagnostics_TDAS_TimeoutSec.ToString(), Diagnostics_TDAS_TimeoutSecDefault);
|
|
set => SettingsDB.SetGlobalValueInt(Keys.Diagnostics_TDAS_TimeoutSec.ToString(), value);
|
|
}
|
|
//FB 29417 leave default as it was hardcoded before
|
|
public const double LevelTriggerMaxPercentageDefault = 0.75D;
|
|
public static double LevelTriggerMaxPercentage
|
|
{
|
|
get => SettingsDB.GetGlobalValueDouble(Keys.LevelTriggerMaxPercentage.ToString(), LevelTriggerMaxPercentageDefault);
|
|
set => SettingsDB.SetGlobalValueDouble(Keys.LevelTriggerMaxPercentage.ToString(), value);
|
|
}
|
|
|
|
//FB 29417 leave default as it was hardcoded before
|
|
public const double LevelTriggerMinPercentageDefault = 0.005D;
|
|
public static double LevelTriggerMinPercentage
|
|
{
|
|
get => SettingsDB.GetGlobalValueDouble(Keys.LevelTriggerMinPercentage.ToString(), LevelTriggerMinPercentageDefault);
|
|
set => SettingsDB.SetGlobalValueDouble(Keys.LevelTriggerMinPercentage.ToString(), value);
|
|
}
|
|
|
|
|
|
public const int Diagnostics_Slice_TimeoutSecDefault = 240;
|
|
public static int Diagnostics_Slice_TimeoutSec
|
|
{
|
|
get => SettingsDB.GetGlobalValueInt(Keys.Diagnostics_SLICE_TimeoutSec.ToString(), Diagnostics_Slice_TimeoutSecDefault);
|
|
set => SettingsDB.SetGlobalValueInt(Keys.Diagnostics_SLICE_TimeoutSec.ToString(), value);
|
|
}
|
|
|
|
|
|
public const int ResolveChannels_TDAS_QueryDownloadTimeoutSecDefault = 240;
|
|
public static int ResolveChannels_TDAS_QueryDownloadTimeoutSec
|
|
{
|
|
get => SettingsDB.GetGlobalValueInt(Keys.ResolveChannels_TDAS_QueryDownloadTimeoutSec.ToString(), ResolveChannels_TDAS_QueryDownloadTimeoutSecDefault);
|
|
set => SettingsDB.SetGlobalValueInt(Keys.ResolveChannels_TDAS_QueryDownloadTimeoutSec.ToString(), value);
|
|
}
|
|
|
|
|
|
public const int ResolveChannels_SLICE_QueryDownloadTimeoutSecDefault = 120;
|
|
public static int ResolveChannels_SLICE_QueryDownloadTimeoutSec
|
|
{
|
|
get => SettingsDB.GetGlobalValueInt(Keys.ResolveChannels_SLICE_QueryDownloadTimeoutSec.ToString(), ResolveChannels_SLICE_QueryDownloadTimeoutSecDefault);
|
|
set => SettingsDB.SetGlobalValueInt(Keys.ResolveChannels_SLICE_QueryDownloadTimeoutSec.ToString(), value);
|
|
}
|
|
|
|
|
|
public const int ResolveChannels_TDAS_QueryConfigTimeoutSecDefault = 240;
|
|
public static int ResolveChannels_TDAS_QueryConfigTimeoutSec
|
|
{
|
|
get => SettingsDB.GetGlobalValueInt(Keys.ResolveChannels_TDAS_QueryConfigTimeoutSec.ToString(), ResolveChannels_TDAS_QueryConfigTimeoutSecDefault);
|
|
set => SettingsDB.SetGlobalValueInt(Keys.ResolveChannels_TDAS_QueryConfigTimeoutSec.ToString(), value);
|
|
}
|
|
|
|
|
|
public const int ResolveChannels_SLICE_QueryConfigTimeoutSecDefault = 120;
|
|
public static int ResolveChannels_SLICE_QueryConfigTimeoutSec
|
|
{
|
|
get => SettingsDB.GetGlobalValueInt(Keys.ResolveChannels_SLICE_QueryConfigTimeoutSec.ToString(), ResolveChannels_SLICE_QueryConfigTimeoutSecDefault);
|
|
set => SettingsDB.SetGlobalValueInt(Keys.ResolveChannels_SLICE_QueryConfigTimeoutSec.ToString(), value);
|
|
}
|
|
|
|
public const int SLICEConnectAllowedSecondsDefault = 120;
|
|
|
|
public static int SLICEConnectAllowedSeconds
|
|
{
|
|
get => SettingsDB.GetGlobalValueInt(Keys.SLICE_CONNECT_ALLOWED_SECONDS.ToString(), SLICEConnectAllowedSecondsDefault);
|
|
set => SettingsDB.SetGlobalValueInt(Keys.SLICE_CONNECT_ALLOWED_SECONDS.ToString(), value);
|
|
}
|
|
|
|
public const int TDASConnectAllowedSecondsDefault = 90;
|
|
|
|
public static int TDASConnectAllowedSeconds
|
|
{
|
|
get => SettingsDB.GetGlobalValueInt(Keys.TDAS_CONNECT_ALLOWED_SECONDS.ToString(), TDASConnectAllowedSecondsDefault);
|
|
set => SettingsDB.SetGlobalValueInt(Keys.TDAS_CONNECT_ALLOWED_SECONDS.ToString(), value);
|
|
}
|
|
|
|
public const bool TestSetupAllowQuickTestSetupDefault = false;
|
|
public static bool TestSetupAllowQuickTestSetup
|
|
{
|
|
get => SettingsDB.GetGlobalValueBool(Keys.TestSetup_AllowQuickTestSetup.ToString(), TestSetupAllowQuickTestSetupDefault);
|
|
set => SettingsDB.SetGlobalValueBoolean(Keys.TestSetup_AllowQuickTestSetup.ToString(), value);
|
|
}
|
|
|
|
public const bool AllowQuickBuildDefault = true;
|
|
public static bool AllowQuickBuild
|
|
{
|
|
get => SettingsDB.GetGlobalValueBool(Keys.AllowQuickBuild.ToString(), AllowQuickBuildDefault);
|
|
set => SettingsDB.SetGlobalValueBoolean(Keys.AllowQuickBuild.ToString(), value);
|
|
}
|
|
|
|
public const bool AutoDiscoverDuringQuickBuildDefault = false;
|
|
public static bool AutoDiscoverDuringQuickBuild
|
|
{
|
|
get => SettingsDB.GetGlobalValueBool(Keys.AutoDiscoverDuringQuickBuild.ToString(), AutoDiscoverDuringQuickBuildDefault);
|
|
set => SettingsDB.SetGlobalValueBoolean(Keys.AutoDiscoverDuringQuickBuild.ToString(), value);
|
|
}
|
|
|
|
public const bool AutoRunTestDuringQuickBuildDefault = false;
|
|
public static bool AutoRunTestDuringQuickBuild
|
|
{
|
|
get => SettingsDB.GetGlobalValueBool(Keys.AutoRunTestDuringQuickBuild.ToString(), AutoRunTestDuringQuickBuildDefault);
|
|
set => SettingsDB.SetGlobalValueBoolean(Keys.AutoRunTestDuringQuickBuild.ToString(), value);
|
|
}
|
|
|
|
public static readonly double[] Graphs_PFSZoomValuesDefault = new double[] { 200D, 100D, 50D, 20D, 10D, 5D, 1D, 0.1D };
|
|
public static double[] Graphs_PFSZoomValues
|
|
{
|
|
get => SettingsDB.GetGlobalValueDoubleArray(Keys.Graphs_PFSZoomValues.ToString(), Graphs_PFSZoomValuesDefault);
|
|
set => SettingsDB.SetGlobalValueDoubleArray(Keys.Graphs_PFSZoomValues.ToString(), value);
|
|
}
|
|
|
|
|
|
public const bool AutomaticallyAddArmChecklistWithTOMDefault = true;
|
|
public static bool AutoAddArmChecklist
|
|
{
|
|
get => SettingsDB.GetGlobalValueBool(Keys.AutoAdd_ArmChecklist.ToString(), AutomaticallyAddArmChecklistWithTOMDefault);
|
|
set => SettingsDB.SetGlobalValueBoolean(Keys.AutoAdd_ArmChecklist.ToString(), value);
|
|
}
|
|
|
|
|
|
public const bool EnableDynamicRealtimeOptimizationDefault = true;
|
|
public static bool EnableDynamicRealtimeOptimization
|
|
{
|
|
get => SettingsDB.GetGlobalValueBool(Keys.EnableDynamicRealtimeOptimization.ToString(), EnableDynamicRealtimeOptimizationDefault);
|
|
set => SettingsDB.SetGlobalValueBoolean(Keys.EnableDynamicRealtimeOptimization.ToString(), value);
|
|
}
|
|
|
|
public const bool ConfirmChannelDeletesDefault = false;
|
|
/// <summary>
|
|
/// 17753 Internal DataPro Feature Request - "are you sure" double confirmation on "delete"
|
|
/// </summary>
|
|
public static bool ConfirmChannelDeletes
|
|
{
|
|
get => SettingsDB.GetGlobalValueBool(Keys.ConfirmChannelDeletes.ToString(), ConfirmChannelDeletesDefault);
|
|
set => SettingsDB.SetGlobalValueBoolean(Keys.ConfirmChannelDeletes.ToString(), value);
|
|
}
|
|
|
|
/// <summary>
|
|
/// FB 18618 no one (inc admin) should be able to delete any channel from a fixed group that is added into a test setup
|
|
/// </summary>
|
|
public const bool AllowChannelDeletionFromFixedGroupDefault = true;
|
|
public static bool AllowChannelDeletionFromFixedGroup
|
|
{
|
|
get => SettingsDB.GetGlobalValueBool(Keys.AllowChannelDeletionFromFixedGroup.ToString(), AllowChannelDeletionFromFixedGroupDefault);
|
|
set => SettingsDB.SetGlobalValueBoolean(Keys.AllowChannelDeletionFromFixedGroup.ToString(), value);
|
|
}
|
|
|
|
private const int SampleRateIndiceCountDefault = 24;
|
|
public static int SampleRateIndiceCount
|
|
{
|
|
get => SettingsDB.GetGlobalValueInt(Keys.SPSINDICE_COUNT.ToString(), SampleRateIndiceCountDefault);
|
|
set => SettingsDB.SetGlobalValueInt(Keys.SPSINDICE_COUNT.ToString(), value);
|
|
}
|
|
|
|
|
|
public static int TDAS_MaxAAFRateDefault = 4300;
|
|
public static int MaxAAFRate_TDAS
|
|
{
|
|
get => SettingsDB.GetGlobalValueInt(Keys.TDAS_MAXAAFRATE.ToString(), TDAS_MaxAAFRateDefault);
|
|
set => SettingsDB.SetGlobalValueInt(Keys.TDAS_MAXAAFRATE.ToString(), value);
|
|
}
|
|
|
|
|
|
public static int G5_MaxAAFRateDefault = 3620;
|
|
public static int MaxAAFRate_G5
|
|
{
|
|
get => SettingsDB.GetGlobalValueInt(Keys.G5_MAXAAFRATE.ToString(), G5_MaxAAFRateDefault);
|
|
set => SettingsDB.SetGlobalValueInt(Keys.G5_MAXAAFRATE.ToString(), value);
|
|
}
|
|
|
|
/// <summary>
|
|
/// the default for the property "EnableAAFRateEdit"
|
|
/// </summary>
|
|
public const bool ENABLE_AAF_RATE_EDIT = false;
|
|
/// <summary>
|
|
/// controls whether to show the aaf rate editor in Edit Test Setup
|
|
/// </summary>
|
|
public static bool EnableAAFRateEdit
|
|
{
|
|
get => SettingsDB.GetGlobalValueBool(Keys.EnableAAFRateEdit.ToString(), ENABLE_AAF_RATE_EDIT);
|
|
set => SettingsDB.SetGlobalValueBoolean(Keys.EnableAAFRateEdit.ToString(), value);
|
|
}
|
|
|
|
/// <summary>
|
|
/// the default for the property "EnableStreamingWarnings"
|
|
/// </summary>
|
|
public const bool ENABLE_STREAMING_WARNINGS = false;
|
|
/// <summary>
|
|
/// controls whether to display packet size warnings in Edit Test Setup
|
|
/// </summary>
|
|
public static bool EnableStreamingWarnings
|
|
{
|
|
get => SettingsDB.GetGlobalValueBool(Keys.EnableStreamingWarnings.ToString(), ENABLE_STREAMING_WARNINGS);
|
|
set => SettingsDB.SetGlobalValueBoolean(Keys.EnableStreamingWarnings.ToString(), value);
|
|
}
|
|
|
|
public static int[] AvailableSampleRatesDefault = new int[]
|
|
{
|
|
5,
|
|
50,
|
|
100,
|
|
200,
|
|
250, //TDC rates start here, everything from here to next comment is in default TDC.ini
|
|
500,
|
|
1000,
|
|
2000,
|
|
2500,
|
|
5000,
|
|
8000,
|
|
10000,
|
|
12500,
|
|
20000,
|
|
25000,
|
|
40000,
|
|
50000,
|
|
60000,
|
|
75000,
|
|
100000,
|
|
150000,
|
|
300000, //TDC rates end here
|
|
400000,
|
|
500000,
|
|
1000000
|
|
};
|
|
private static readonly object MyLock = new object();
|
|
private const string SAMPLERATE_INDEX = "SPSINDEX_";
|
|
private static int[] _availableSampleRates;
|
|
public static int[] AvailableSampleRates
|
|
{
|
|
get
|
|
{
|
|
lock (MyLock)
|
|
{
|
|
if (null != _availableSampleRates) return _availableSampleRates;
|
|
var rates = new List<int>();
|
|
for (var i = 0; i < SampleRateIndiceCount; i++)
|
|
{
|
|
var defaultValue = -1;
|
|
if (i < AvailableSampleRatesDefault.Length) { defaultValue = AvailableSampleRatesDefault[i]; }
|
|
var value = SettingsDB.GetGlobalValueInt(SAMPLERATE_INDEX + i.ToString(System.Globalization.CultureInfo.InvariantCulture), defaultValue);
|
|
if (rates.Contains(value)) continue;
|
|
if (value > 0) { rates.Add(value); }
|
|
}
|
|
_availableSampleRates = rates.ToArray();
|
|
return _availableSampleRates;
|
|
}
|
|
}
|
|
set
|
|
{
|
|
lock (MyLock)
|
|
{
|
|
SampleRateIndiceCount = value.Length;
|
|
_availableSampleRates = value;
|
|
for (var i = 0; i < value.Length; i++)
|
|
{
|
|
SettingsDB.SetGlobalValueInt(SAMPLERATE_INDEX + i, value[i]);
|
|
}
|
|
SampleRateIndiceCount = value.Length;
|
|
}
|
|
}
|
|
}
|
|
|
|
public static IStreamingFilterProfile GetDefaultDSP()
|
|
{
|
|
var dspFilterCollection = DSPFilterCollection.GetDSPFilterCollection();
|
|
var filterProfileCollection = StreamingFilterProfileCollection.GetCollection();
|
|
var s = StreamDSPFilterTypeString;
|
|
var dspFilterType = dspFilterCollection.GetFilter(s);
|
|
//if filter is butterworth we have to check the filter profile as well
|
|
if (dspFilterType.EnumValue != DSPFilterCollection.BUTTERWORTH)
|
|
{
|
|
return dspFilterType;
|
|
}
|
|
s = StreamFilterProfileString;
|
|
var profile = filterProfileCollection.GetStreamingFilterProfile(s);
|
|
return profile;
|
|
}
|
|
|
|
/*
|
|
---- Corresponding Variable Filter Cutoffs (0 = PRO: No Adj Filter, G5: Max Adj
|
|
Filter) ----
|
|
,-1*/
|
|
|
|
private static readonly List<int> DefaultTDASAAFSPSIndicies = new List<int>(new[]
|
|
{
|
|
250,
|
|
500,
|
|
1000,
|
|
2000,
|
|
2500,
|
|
5000,
|
|
8000,
|
|
10000,
|
|
12500,
|
|
20000,
|
|
25000,
|
|
40000,
|
|
50000,
|
|
60000,
|
|
75000,
|
|
100000,
|
|
150000,
|
|
300000
|
|
});
|
|
|
|
private static readonly List<double> DefaultTDASAAFCutoffs = new List<double>(new double[]
|
|
{
|
|
50,
|
|
100,
|
|
200,
|
|
500,
|
|
500,
|
|
1000,
|
|
2000,
|
|
2900,
|
|
2900,
|
|
3620,
|
|
3620,
|
|
0,
|
|
0,
|
|
0,
|
|
0,
|
|
0,
|
|
0,
|
|
0
|
|
});
|
|
|
|
private static readonly List<int> DefaultADCSamplesPerPacketSPSIndicies = new List<int>(new[]
|
|
{
|
|
5,
|
|
50,
|
|
100,
|
|
200,
|
|
250,
|
|
500,
|
|
1000,
|
|
2000,
|
|
2500,
|
|
5000,
|
|
8000,
|
|
10000,
|
|
12500,
|
|
20000,
|
|
25000,
|
|
40000,
|
|
50000,
|
|
60000,
|
|
75000,
|
|
100000,
|
|
150000,
|
|
300000,
|
|
400000,
|
|
500000
|
|
});
|
|
|
|
private static readonly List<int> DefaultADCSamplesPerPackets = new List<int>(new[]
|
|
{
|
|
1,
|
|
5,
|
|
10,
|
|
20,
|
|
25,
|
|
50,
|
|
87,
|
|
87,
|
|
87,
|
|
87,
|
|
87,
|
|
87,
|
|
87,
|
|
87,
|
|
87,
|
|
87,
|
|
87,
|
|
87,
|
|
87,
|
|
87,
|
|
87,
|
|
87,
|
|
87,
|
|
87,
|
|
});
|
|
|
|
public static double GetAAFException(SerializableAAF.DAS_TYPE dasType, int sps)
|
|
{
|
|
var key = $"{(int)dasType}_x_{sps}";
|
|
var defaultValue = (double)sps / DataModelSettings.SampleRateAAFilterRatio;
|
|
// ReSharper disable once SwitchStatementMissingSomeCases
|
|
switch (dasType)
|
|
{
|
|
case SerializableAAF.DAS_TYPE.TDAS:
|
|
var index = DefaultTDASAAFSPSIndicies.IndexOf(sps);
|
|
if (index >= 0 && index < DefaultTDASAAFCutoffs.Count)
|
|
{
|
|
defaultValue = DefaultTDASAAFCutoffs[index];
|
|
}
|
|
break;
|
|
case SerializableAAF.DAS_TYPE.SLICE:
|
|
if (sps != 10000)
|
|
{
|
|
if (sps == 12500)
|
|
{
|
|
//28242 Change default AAF for SLICE products to 3k Hz
|
|
defaultValue = 3000;
|
|
}
|
|
}
|
|
else
|
|
{
|
|
//28242 Change default AAF for SLICE products to 3k Hz
|
|
defaultValue = 3000;
|
|
} //this is the only built in slice exception right now
|
|
break;
|
|
//this exception is because of
|
|
//https://support.dtsweb.com/hc/en-us/community/posts/208919368-DataPro-1-01-0425-default-AAF-setting?page=1#community_comment_213875877
|
|
}
|
|
return SettingsDB.GetGlobalValueDouble(key, defaultValue);
|
|
}
|
|
|
|
public static void SetAAFException(SerializableAAF.DAS_TYPE dasType, int sps, double value)
|
|
{
|
|
var key = $"{(int)dasType}_x_{sps}";
|
|
SettingsDB.SetGlobalValueDouble(key, value);
|
|
}
|
|
|
|
/// <summary>
|
|
/// sets the AAF exception to the default
|
|
/// note it makes use of Properties.Settings.Default.SampleRateAAFilterRatio to fill in
|
|
/// where it doesn't have values, however it doesn't have access to the original Ratio
|
|
/// and it might have been modified
|
|
/// </summary>
|
|
/// <param name="dasType"></param>
|
|
/// <param name="sps"></param>
|
|
public static void SetAAFException(SerializableAAF.DAS_TYPE dasType, int sps)
|
|
{
|
|
var key = $"{(int)dasType}_x_{sps}";
|
|
var defaultValue = (double)sps / DataModelSettings.SampleRateAAFilterRatio;
|
|
if (dasType != SerializableAAF.DAS_TYPE.TDAS)
|
|
{
|
|
if (dasType == SerializableAAF.DAS_TYPE.SLICE)
|
|
{
|
|
// ReSharper disable once SwitchStatementMissingSomeCases
|
|
switch (sps)
|
|
{
|
|
//28242 Change default AAF for SLICE products to 3k Hz
|
|
case 10000:
|
|
defaultValue = 3000;
|
|
break;
|
|
case 12500:
|
|
defaultValue = 3000;
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
else
|
|
{
|
|
var index = DefaultTDASAAFSPSIndicies.IndexOf(sps);
|
|
if (index >= 0 && index < DefaultTDASAAFCutoffs.Count)
|
|
{
|
|
defaultValue = DefaultTDASAAFCutoffs[index];
|
|
}
|
|
}
|
|
SettingsDB.SetGlobalValueDouble(key, defaultValue);
|
|
}
|
|
|
|
public static double GetSamplesPerPacket(int sps)
|
|
{
|
|
var key = $"SamplesPerPacket_x_{sps}";
|
|
var defaultValue = CalculateDefaultSamplesPerPacket(sps);
|
|
return SettingsDB.GetGlobalValueDouble(key, defaultValue);
|
|
}
|
|
|
|
public static void SetSamplesPerPacket(int sps, double value)
|
|
{
|
|
var key = $"SamplesPerPacket_x_{sps}";
|
|
SettingsDB.SetGlobalValueDouble(key, value);
|
|
}
|
|
|
|
public static void SetSamplesPerPacket(int sps)
|
|
{
|
|
var key = $"SamplesPerPacket_x_{sps}";
|
|
var defaultValue = CalculateDefaultSamplesPerPacket(sps);
|
|
SettingsDB.SetGlobalValueDouble(key, defaultValue);
|
|
}
|
|
|
|
private static int CalculateDefaultSamplesPerPacket(int sps)
|
|
{
|
|
var defaultValue = 100;
|
|
|
|
var index = DefaultADCSamplesPerPacketSPSIndicies.IndexOf(sps);
|
|
if (index >= 0 && index < DefaultADCSamplesPerPackets.Count)
|
|
{
|
|
defaultValue = DefaultADCSamplesPerPackets[index];
|
|
}
|
|
|
|
return defaultValue;
|
|
}
|
|
}
|
|
}
|