This commit is contained in:
2026-04-17 14:55:32 -04:00
commit bc3ac1d4c9
18017 changed files with 4371742 additions and 0 deletions

View File

@@ -0,0 +1,545 @@
using DTS.Common.Attributes;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
namespace DTS.Common.Enums.Sensors
{
/// <summary>
/// holds information for all CSV import/export fields and their versions
/// </summary>
public abstract class CSVImportTags
{
public const int MIN_VALID_VERSION = 0;
public const int MAX_VALID_VERSION = 6;
private static readonly object MY_LOCK = new object();
private static HashSet<int> _SensorTagsVersions = new HashSet<int>()
{
0, 2, 3, 4
};
public static bool IsSensorTag(int version)
{
return _SensorTagsVersions.Contains(version);
}
private static string TagToDisplayString(Tags tag)
{
var enumType = tag.GetType();
var name = Enum.GetName(enumType, tag);
if (string.IsNullOrEmpty(name)) { return string.Empty; }
var fieldInfo = enumType.GetField(name);
if (null == fieldInfo || !fieldInfo.CustomAttributes.Any()) { return string.Empty; }
var attributes = fieldInfo.GetCustomAttributes(false).OfType<DisplayAttribute>();
if (null == attributes || !attributes.Any()) { return string.Empty; }
return attributes.FirstOrDefault().Name;
}
private static int TagToVersion(Tags tag)
{
var enumType = tag.GetType();
var name = Enum.GetName(enumType, tag);
if (string.IsNullOrEmpty(name)) { return int.MaxValue; }
var fieldInfo = enumType.GetField(name);
if (null == fieldInfo || !fieldInfo.CustomAttributes.Any()) { return int.MaxValue; }
var attributes = fieldInfo.GetCustomAttributes(false).OfType<VersionAttribute>();
if (null == attributes || !attributes.Any()) { return int.MaxValue; }
return attributes.FirstOrDefault().Version;
}
/// <summary>
/// gets all tags for a given version of import
/// </summary>
/// <param name="version"></param>
/// <returns></returns>
public static Tags[] GetVersionTags(int version)
{
lock (MY_LOCK)
{
if (null == _versionToTags) { PopulateLookups(); }
return _versionToTags.ContainsKey(version) ? _versionToTags[version].ToArray() : new Tags[0];
}
}
private static Dictionary<string, Tags> _stringToTag = null;
private static Dictionary<Tags, string> _tagToString = null;
private static Dictionary<int, List<Tags>> _versionToTags = null;
private static Dictionary<Tags, int> _tagToVersion = null;
/// <summary>
/// gets a display string given a tag
/// </summary>
/// <param name="tag"></param>
/// <returns></returns>
public static string GetStringForTag(Tags tag)
{
lock (MY_LOCK)
{
if (null == _tagToString) { PopulateLookups(); }
return _tagToString.ContainsKey(tag) ? _tagToString[tag] : string.Empty;
}
}
/// <summary>
/// returns a tag given a display string
/// </summary>
/// <param name="s"></param>
/// <returns></returns>
public static Tags GetTagForString(string s)
{
lock (MY_LOCK)
{
if (null == _stringToTag) { PopulateLookups(); }
return _stringToTag.ContainsKey(s) ? _stringToTag[s] : Tags.Unknown;
}
}
/// <summary>
/// returns a version the tag was used in given a tag
/// </summary>
/// <param name="t"></param>
/// <returns></returns>
public static int GetVersionForTag(Tags t)
{
lock (MY_LOCK)
{
if (null == _tagToVersion) { PopulateLookups(); }
return _tagToVersion.ContainsKey(t) ? _tagToVersion[t] : int.MaxValue;
}
}
private static void PopulateLookups()
{
var lookup1 = new Dictionary<string, Tags>();
var lookup2 = new Dictionary<Tags, string>();
var lookup3 = new Dictionary<int, List<Tags>>();
var lookup4 = new Dictionary<Tags, int>();
var allTags = Enum.GetValues(typeof(Tags)).Cast<Tags>().ToArray();
foreach (var tag in allTags)
{
var s = TagToDisplayString(tag);
var version = TagToVersion(tag);
lookup1[s] = tag;
lookup2[tag] = s;
if (!lookup3.ContainsKey(version))
{
lookup3.Add(version, new List<Tags>());
}
lookup3[version].Add(tag);
lookup4[tag] = version;
}
lock (MY_LOCK)
{
_stringToTag = lookup1;
_tagToString = lookup2;
_versionToTags = lookup3;
_tagToVersion = lookup4;
}
}
public enum Tags
{
[Display(Name = "Database Reference Number")]
[Version(0)]
DatabaseReferenceNumber,
[Display(Name = "Sensor SN")]
[Version(0)]
SensorSN,
[Display(Name = "Channel Name")]
[Version(0)]
ChannelName,
[Display(Name = "Location")]
[Version(0)]
Location,
[Display(Name = "Laboratory Code")]
[Version(0)]
LaboratoryCode,
[Display(Name = "Customer Code")]
[Version(0)]
CustomerCode,
[Display(Name = "Partial ISO Code")]
[Version(0)]
PartialISOCode,
[Display(Name = "Comment Field")]
[Version(0)]
CommentField,
[Display(Name = "Sensor Type")]
[Version(0)]
SensorType,
[Display(Name = "Manufacturer")]
[Version(0)]
Manufacturer,
[Display(Name = "Model")]
[Version(0)]
Model,
[Display(Name = "Axis (X, Y, Z)")]
[Version(0)]
Axis,
[Display(Name = "Dimension")]
[Version(0)]
Dimension,
[Display(Name = "EU")]
[Version(0)]
EU,
[Display(Name = "Full Scale (EU)")]
[Version(0)]
FullScale,
[Display(Name = "Exc (VDC)")]
[Version(0)]
Exc,
[Display(Name = "Output @ EXC & FS (mV)")]
[Version(0)]
OutputAtEXCFSmV,
[Display(Name = "Sensitivity (mV/V/EU)")]
[Version(0)]
Sensitivity,
[Display(Name = "Output Proportional to EXC? (Yes, No)")]
[Version(0)]
Proportional,
[Display(Name = "Desired Range (EU)")]
[Version(0)]
DesiredRange,
[Display(Name = "BRIDGE (Full, Half)")]
[Version(0)]
BRIDGE,
[Display(Name = "Use Shunt Cal? (Yes, No)")]
[Version(0)]
UseShuntCal,
[Display(Name = "Bridge Res. (Ohm)")]
[Version(0)]
BridgeResistance,
[Display(Name = "Shunt Resistor Value (Ohms)")]
[Version(0)]
ShuntResistorValue,
[Display(Name = "Equivalent EU for Shunt Resistor")]
[Version(0)]
EquivalentEUShuntResistor,
[Display(Name = "Bypass AA Filter? (Yes, No)")]
[Version(0)]
BypassAAFilter,
[Display(Name = "Invert Signal? (Yes, No)")]
[Version(0)]
InvertSignal,
[Display(Name = "Remove Sensor Offset? (Yes, No)")]
[Version(0)]
RemoveOffset,
[Display(Name = "Sensor Offset Low (mV)")]
[Version(0)]
OffsetToleranceLow,
[Display(Name = "Sensor Offset High (mV)")]
[Version(0)]
OffsetToleranceHigh,
[Display(Name = "SAE Filter Class")]
[Version(0)]
FilterClass,
[Display(Name = "Software Zero Reference (Pre, Avg, 0mV)")]
[Version(0)]
SoftwareZeroReference,
[Display(Name = "Software Zero Equivalent EU")]
[Version(0)]
SoftwareZeroEquivalentEU,
[Display(Name = "16 Byte Dallas Sensor ID")]
[Version(0)]
SensorID,
[Display(Name = "Received")]
[Version(0)]
Received,
[Display(Name = "Last Cal")]
[Version(0)]
LastCal,
[Display(Name = "Due Cal")]
[Version(0)]
DueCal,
[Display(Name = "Due")]
[Version(0)]
Due,
[Display(Name = "Tech")]
[Version(0)]
Tech,
[Display(Name = "Group 1")]
[Version(0)]
Group1,
[Display(Name = "Group 2")]
[Version(0)]
Group2,
[Display(Name = "Group 3")]
[Version(0)]
Group3,
[Display(Name = "Group 4")]
[Version(0)]
Group4,
[Display(Name = "Group 5")]
[Version(0)]
Group5,
[Display(Name = "Category")]
[Version(0)]
Category,
[Display(Name = "IRTRACC Exponent")]
[Version(0)]
IRTRACCExponent,
[Display(Name = "unknown")]
[Version(0)]
Unknown,
[Display(Name = "Version")]
[Version(1)]
Version,
[Display(Name = "Test Setup Name")]
[Version(1)]
TestSetupName,
[Display(Name = "Test Setup Description")]
[Version(1)]
TestSetupDescription,
[Display(Name = "Recording Mode")]
[Version(1)]
RecordingMode,
[Display(Name = "SampleRate")]
[Version(1)]
SampleRate,
[Display(Name = "PreTriggerSec")]
[Version(1)]
PreTriggerSec,
[Display(Name = "PostTriggerSec")]
[Version(1)]
PostTriggerSec,
[Display(Name = "Tags")]
[Version(1)]
Tags,
[Display(Name = "Two Volt Exc.")]
[Version(2)]
TwoVoltExcSensitivity,
[Display(Name = "Five Volt Exc.")]
[Version(2)]
FiveVoltExcSensitivity,
[Display(Name = "Ten Volt Exc.")]
[Version(2)]
TenVoltExcSensitivity,
[Display(Name = "Range Low")]
[Version(2)]
RangeLow,
[Display(Name = "Range Medium")]
[Version(2)]
RangeMedium,
[Display(Name = "Range High")]
[Version(2)]
RangeHigh,
[Display(Name = "Supported Excitation")]
[Version(2)]
SupportedExcitation,
[Display(Name = "Bridge Type")]
[Version(2)]
BridgeType,
[Display(Name = "Unipolar")]
[Version(2)]
Unipolar,
[Display(Name = "Axis Number")]
[Version(2)]
AxisNumber,
[Display(Name = "Number of Axes")]
[Version(2)]
NumberOfAxes,
[Display(Name = "Cal Interval")]
[Version(2)]
CalInterval,
[Display(Name = "Polarity")]
[Version(2)]
Polarity,
[Display(Name = "Physical Dimension")]
[Version(2)]
PhysicalDimension,
[Display(Name = "Direction")]
[Version(2)]
Direction,
[Display(Name = "InitialOffset")]
[Version(2)]
InitialOffset,
[Display(Name = "NonLinear")]
[Version(2)]
NonLinear,
[Display(Name = "Software Zero Method")]
[Version(2)]
ZeroMethod,
[Display(Name = "Zero Averaging Window Start")]
[Version(2)]
ZeroMethodStart,
[Display(Name = "Zero Averaging Window End")]
[Version(2)]
ZeroMethodEnd,
[Display(Name = "Bridge Leg Mode")]
[Version(2)]
BridgeLegMode,
[Display(Name = "Created")]
[Version(2)]
Created,
[Display(Name = "Times Used")]
[Version(2)]
TimesUsed,
[Display(Name = "IEPE Coupling Mode")]
[Version(2)]
CouplingMode,
[Display(Name = "DelayMS")]
[Version(2)]
DelayMS,
[Display(Name = "DigitalOutputDelayMS")]
[Version(2)]
DigitalOutputDelayMS,
[Display(Name = "DurationMS")]
[Version(2)]
DurationMS,
[Display(Name = "DigitalOutputDurationMS")]
[Version(2)]
DigitalOutputDurationMS,
[Display(Name = "Digital Output Mode")]
[Version(2)]
DigitalOutputMode,
[Display(Name = "LimitDuration")]
[Version(2)]
LimitDuration,
[Display(Name = "Squib Fire Mode")]
[Version(2)]
SquibFireMode,
[Display(Name = "Squib Measurement Type")]
[Version(2)]
SquibMeasurementType,
[Display(Name = "Squib Output Current")]
[Version(2)]
SquibOutputCurrent,
[Display(Name = "Digital Scale Multiplier")]
[Version(2)]
DigitalScaleMultiplier,
[Display(Name = "Digital Input Mode")]
[Version(2)]
DigitalInputMode,
[Display(Name = "NonLinear Cal")]
[Version(2)]
NonLinearCalibration,
[Display(Name = "DisplayUnits")]
[Version(2)]
DisplayUnits,
[Display(Name = "At Capacity")]
[Version(2)]
AtCapacity,
[Display(Name = "Capacity Ouptut Is Based On")]
[Version(2)]
CapacityOutputIsBasedOn,
[Display(Name = "Sensitivity Units")]
[Version(2)]
SensitivityUnits,
[Display(Name = "CheckOffset")]
[Version(2)]
CheckOffset,
[Display(Name = "Broken")]
[Version(2)]
Broken,
[Display(Name = "Do Not Use")]
[Version(2)]
DoNotUse,
[Display(Name = "ISOChannelName")]
[Version(2)]
ISOChannelName,
[Display(Name = "UserCode")]
[Version(2)]
UserCode,
[Display(Name = "UserChannelName")]
[Version(2)]
UserChannelName,
[Display(Name = "Addl Linear Sensitivity")]
[Version(2)]
AdditionalLinearSensitivity,
[Display(Name = "Addl Linear Zero Method")]
[Version(2)]
AdditionalLinearZeroMethod,
[Display(Name = "Addl Linear Zero Method Start")]
[Version(2)]
AdditionalLinearZeroMethodStart,
[Display(Name = "Addl Linear Zero Method End")]
[Version(2)]
AdditionalLinearZeroMethodEnd,
[Display(Name = "Addl Initial Offsets")]
[Version(2)]
AdditionalInitialOffsets,
[Display(Name = "Group Name")]
[Version(3)]
GroupName,
[Display(Name = "Group Type")]
[Version(3)]
GroupType,
[Display(Name = "DAS serial number")]
[Version(4)]
DASSerialNumber,
[Display(Name = "DAS channel index")]
[Version(4)]
DASChannelIndex,
[Display(Name = "Stream profile")]
[Version(4)]
StreamProfile,
[Display(Name = "UDP address")]
[Version(4)]
UDPAddress,
[Display(Name = "Time channel Id")]
[Version(4)]
TimeChannelId,
[Display(Name = "Data channel Id")]
[Version(4)]
DataChannelId,
[Display(Name = "Stream output configuration")]
[Version(4)]
TmNSConfig,
[Display(Name = "IRIG time packet interval ms")]
[Version(4)]
IRIGTimeDataPacketIntervalMS,
[Display(Name = "TMATS packet interval ms")]
[Version(4)]
TMATSIntervalMS,
[Display(Name = "Baud rate")]
[Version(4)]
BaudRate,
[Display(Name = "Data bits")]
[Version(4)]
DataBits,
[Display(Name = "Stop bits")]
[Version(4)]
StopBits,
[Display(Name = "Parity")]
[Version(4)]
Parity,
[Display(Name = "Data format")]
[Version(4)]
DataFormat,
[Display(Name = "Test user code")]
[Version(4)]
TestUserCode,
[Display(Name = "Test user channel name")]
[Version(4)]
TestUserChannelName,
[Display(Name = "Test isocode")]
[Version(4)]
TestIsoCode,
[Display(Name = "Test iso channel name")]
[Version(4)]
TestIsoChannelName,
[Display(Name = "Clock master input type")]
[Version(5)]
ClockMasterInputType,
[Display(Name = "Clock master output type")]
[Version(5)]
ClockMasterOutputType,
[Display(Name = "Manage master clocks outside of DP")]
[Version(5)]
ManageClocksOutsideDPMaster,
[Display(Name = "Manage slave clocks outside of DP")]
[Version(5)]
ManageClocksOutsideDPSlave,
[Display(Name = "Clock slave input type")]
[Version(5)]
ClockSlaveInputType,
[Display(Name = "Clock slave output type")]
[Version(5)]
ClockSlaveOutputType,
[Display(Name = "DAS serial")]
[Version(6)]
DASSerial,
[Display(Name = "DAS sample rate")]
[Version(6)]
DASSampleRate,
[Display(Name = "PTP domain id")]
[Version(6)]
PTPDomainId,
[Display(Name = "Clock master")]
[Version(6)]
ClockMaster
}
}
}

View File

@@ -0,0 +1,17 @@
using System;
using System.ComponentModel;
using DTS.Common.Converters;
namespace DTS.Common.Enums.Sensors
{
[TypeConverter(typeof(EnumDescriptionTypeConverter))]
public enum CalibrationBehaviors
{
[Description("CalibrationBehaviors_LinearIfAvailable")]
LinearIfAvailable,
[Description("CalibrationBehaviors_NonLinearIfAvailable")]
NonLinearIfAvailable,
[Description("CalibrationBehaviors_UseBothIfAvailable")]
UseBothIfAvailable
}
}

View File

@@ -0,0 +1,17 @@
using System;
using System.ComponentModel;
using DTS.Common.Converters;
namespace DTS.Common.Enums.Sensors
{
[TypeConverter(typeof(EnumDescriptionTypeConverter))]
public enum CalibrationEnforcement
{
[Description("CalibrationEnforcement_None")]
None,
[Description("CalibrationEnforcement_NonLinear")]
NonLinear,
[Description("CalibrationEnforcement_Linear")]
Linear
}
}

View File

@@ -0,0 +1,25 @@
using DTS.Common.Base.Classes;
using DTS.Common.Converters;
using System.ComponentModel;
namespace DTS.Common.Enums.Sensors
{
[TypeConverter(typeof(EnumDescriptionTypeConverter))]
public enum FilterClassType
{
[DescriptionResource("FilterClassType_None")]
None = 0, //Code = P unless UseZeroForUnfiltered is True, then Code = 0
AdHoc = -1,
[DescriptionResource("FilterClassType_Unfiltered")]
Unfiltered = -2, // Code = 0
CFC10 = 17, // 17 Hz
[DescriptionResource("FilterClassType_CFC60")]
CFC60 = 100, // 100 Hz; Code = D
[DescriptionResource("FilterClassType_CFC180")]
CFC180 = 300, // 300 Hz; Code = C
[DescriptionResource("FilterClassType_CFC600")]
CFC600 = 1000, // 1000 Hz; Code = B
[DescriptionResource("FilterClassType_CFC1000")]
CFC1000 = 1650 // 1650 Hz; Code = A
}
}

View File

@@ -0,0 +1,25 @@
using DTS.Common.Converters;
using System.ComponentModel;
namespace DTS.Common.Enums.Sensors
{
/// <summary>
/// the format Initial Offset is in
/// </summary>
[TypeConverter(typeof(EnumDescriptionTypeConverter))]
public enum InitialOffsetTypes
{
[Description("InitialOffsetType_None")]
None = 0,
[Description("InitialOffsetType_EU")]
EU = 1,
[Description("InitialOffsetType_EUAtMV")]
EUAtMV = 2,
[Description("InitialOffsetType_LHS")]
LHS = 3,
[Description("InitialOffsetType_RHS")]
RHS = 4,
[Description("InitialOffsetType_FRONTAL")]
FRONTAL = 5
}
}

View File

@@ -0,0 +1,20 @@
namespace DTS.Common.Enums.Sensors
{
public enum NonLinearStyles
{
IRTraccManual,
IRTraccDiagnosticsZero,
IRTraccZeroMMmV,
IRTraccAverageOverTime,
Polynomial,
IRTraccCalFactor
}
public enum NonLinearSLICEWareStyles
{
Manual,
DiagnosticZeroMMmV,
ZeroMMmV,
AverageOverTime,
Polynomial
}
}

View File

@@ -0,0 +1,18 @@
namespace DTS.Common.Enums.Sensors
{
/// <summary>
/// describes different ways of filtering channels and sensors by type
/// </summary>
public enum PossibleFilters
{
All,
Analog,
Squib,
DigitalIn,
DigitalOut,
UART,
StreamOut,
StreamIn,
CAN
}
}

View File

@@ -0,0 +1,16 @@
using DTS.Common.Converters;
using System.ComponentModel;
namespace DTS.Common.Enums.Sensors
{
[TypeConverter(typeof(EnumDescriptionTypeConverter))]
public enum SensitivityInspectionType
{
[Description("SensitivityInspection_NotSet")]
NotSet = 0,
[Description("SensitivityInspection_Required")]
Required = 1,
[Description("SensitivityInspection_Cleared")]
Cleared = 2
}
}

View File

@@ -0,0 +1,7 @@
namespace DTS.Common.Enums.Sensors
{
public enum SensorChangeTypes
{
OffsetTolerance
}
}

View File

@@ -0,0 +1,748 @@
using DTS.Common.Converters;
using System;
using System.ComponentModel;
using System.IO.Ports;
namespace DTS.Common.Enums.Sensors
{
public abstract class SensorConstants
{
/// <summary>
/// Whether TOM squibs should record initiation signal or voltage
/// http://manuscript.dts.local/f/cases/44299/SW-Re-Implement-GM-ISF-Style-Real-Time-tags-for-EQX-import
/// does not populate value, only holds the value between processes
/// </summary>
public static bool UseInitSignalTOM { get; set; } = false;
public const string VOLTAGE_INSERTION_UNIT = "mV";
public const string TSRAIR_ACCEL_UNIT = "g";
public const string TSRAIR_ARS_UNIT = "deg/sec";
public const string TSRAIR_TEMPERATURE_UNIT = "C";
public const string TSRAIR_HUMIDITY_UNIT = "%";
public const string TSRAIR_PRESSURE_UNIT = "PSI";
//these are 3D IR-TRACC values for equations
//taken originally from config file for
//http://manuscript.dts.local/f/cases/29720/config-file-properties-not-being-used-in-view-3D-IRTRACC-channel-add
public static double δThorax { get; set; } = 15.65;
public static double δAbdomen { get; set; } = 0;
public static double D0Thorax { get; set; } = 141.8;
public static double D0Abdomen { get; set; } = 150.9;
public static double δThoraxLower { get; set; } = -15.65;
public static double D0ThoraxLower { get; set; } = 141.8;
//EU string for degrees
public const string DEGREES = "deg";
//EUstring for degrees used by GM
public const string DEGREE_ANGLE = "deg-ang";
/// <summary>
/// these are the units we accept when filtering channels for add calculated channel
/// 25513 GM requests option to filter channels available for pots for 3d-IR TRACC to include sensors with "deg-ang"
/// </summary>
public static readonly string[] POTUnits = new[] { DEGREES, DEGREE_ANGLE };
public const double MIN_BRIDGE_RESISTANCE_OHMS = 1;
public const double MAX_BRIDGE_RESISTANCE_OHMS = 32000;
/// <summary>
/// the DEFAULT value for whether sensor calibrations intervals start after calibration or first use
/// </summary>
public const bool SENSOR_FIRST_USE_DEFAULT = false;
public const bool ALLOW_INSPECT_BEFORE_USE_DEFAULT = false;
/// <summary>
/// The DEFAULT value for whether or not to keep track of, and validate a Test Setup based on, sensor use.
/// </summary>
public const bool SENSOR_OVERUSE_DEFAULT = false;
/// <summary>
/// The DEFAULT value for when a warning will be displayed if a sensor's usage is within this amount of its maximum.
/// </summary>
public const int SENSOR_USAGE_REMAINING_FOR_WARNING_DEFAULT = 5;
/// <summary>
/// The DEFAULT value for the default maximum number of uses for sensors
/// </summary>
public const int SENSOR_DEFAULT_MAX_USAGE_DEFAULT = 2500;
/// <summary>
/// the current value for whether sensor calibration intervals start after calibration or first use
/// note does not query the value, just holds the value between different modules
/// </summary>
public static bool UseSensorFirstUseDate { get; set; } = false;
/// <summary>
/// The current value for whether or not to keep track of, and validate Test Setups based on, sensor use.
/// </summary>
public static bool DontAllowDataCollectionIfOverused { get; set; } = false;
/// <summary>
/// The current value for whether or not allow Inspect before use feature
/// </summary>
public static bool AllowInspectBeforeUse { get; set; } = false;
/// <summary>
/// A warning will be displayed if a sensor's usage is within this amount of its maximum.
/// </summary>
public static int UsageRemainingForWarning { get; set; }
/// <summary>
/// The default maximum number of uses for sensors
/// </summary>
public static int DefaultMaxUsageAllowed { get; set; }
/// <summary>
/// a cached indicator of whether to use isocode filter mapping or not
/// is updated whenever the setting is updated by the application, and on startup
/// </summary>
public static bool UseISOCodeFilterMapping { get; set; } = true;
/// <summary>
/// FB12764 a cached value for default zero method type
/// is updated whenever the setting is updated by the application, and on startup
/// </summary>
public static ZeroMethodType DefaultZeroMethodType { get; set; } = ZeroMethodType.AverageOverTime;
/// <summary>
/// FB12764 a cached value for default window start time, if zero method type is Average Over Time
/// is updated whenever the setting is updated by the application, and on startup
/// </summary>
public static double DefaultZeroMethodStart { get; set; } = -0.05D;
/// <summary>
/// FB12764 a cached value for default window end time, if zero method type is Average Over Time
/// is updated whenever the setting is updated by the application, and on startup
/// </summary>
public static double DefaultZeroMethodEnd { get; set; } = -0.02D;
/// <summary>
/// 29759 the default range for TSR AIR HiG channels
/// </summary>
public static double DefaultRangeHiG { get; set; } = 400D;
/// <summary>
/// 29759 the default range for TSR AIR LowG channels
/// </summary>
public static double DefaultRangeLowG { get; set; } = 64D;
public static double DefaultRangeLowGDisplay { get; set; } = 50D;
///
/// 29759 the default range for TSR AIR ARS channels
///
public static double DefaultRangeARS { get; set; } = 2000D;
/// <summary>
/// 29917 the default range for the TSR AIR Temperature channel
/// </summary>
public static double DefaultRangeTemperature { get; set; } = 85D;
/// <summary>
/// 29917 the default range for the TSR AIR Humidity channel
/// </summary>
public static double DefaultRangeHumidity { get; set; } = 100D;
/// <summary>
/// 29917 the default range for the TSR AIR Pressure channel
/// </summary>
public static double DefaultRangePressure { get; set; } = 16D; //Actually 15.95 PSI (1100 hPa x 0.0145)
/// <summary>
/// represents the _original_ default for SQUIB DELAY in ms (not the default in the db)
/// used for restoring defaults
/// 13677 Restore defaults page button not functional for sensor settings nav step in system settings tile.
/// </summary>
public const double SQUIB_DELAY_CONSTANT = 0D;
/// <summary>
/// represents the _original_ default for whether to limit squib output (not the default in the db)
/// used for restoring defaults
/// 13677 Restore defaults page button not functional for sensor settings nav step in system settings tile.
/// </summary>
public const bool SQUIB_LIMIT_DURATION_CONSTANT = true;
/// <summary>
/// represents the _original_ default for squib output duration (not the default in the db)
/// used for restoring defaults
/// 13677 Restore defaults page button not functional for sensor settings nav step in system settings tile.
/// </summary>
public const double SQUIB_DURATION_CONSTANT = 10D;
/// <summary>
/// represents the _original_ default for squib low tolerance (not the default in the db)
/// used for restoring defaults
/// 13677 Restore defaults page button not functional for sensor settings nav step in system settings tile.
/// </summary>
public const double SQUIB_LOW_TOLERANCE_CONSTANT = 1D;
/// <summary>
/// represents the _original_ default for squib high tolerance (not the default in the db)
/// used for restoring defaults
/// 13677 Restore defaults page button not functional for sensor settings nav step in system settings tile.
/// 26826 Max Squib Resistance Limit needs to be raised from 8.0 ohms to 10.0 ohms
/// </summary>
public const double SQUIB_HIGH_TOLERANCE_CONSTANT = 10D;
/// <summary>
/// represents the _original_ default for squib fire mode (not the default in the db)
/// used for restoring defaults
/// 13677 Restore defaults page button not functional for sensor settings nav step in system settings tile.
/// </summary>
public const SquibFireMode SQUIB_FIREMODE_CONSTANT = SquibFireMode.CAP;
/// <summary>
/// represents the _original_ default for squib output current (not the default in the db)
/// used for restoring defaults
/// 13677 Restore defaults page button not functional for sensor settings nav step in system settings tile.
/// </summary>
public const double SQUIB_CURRENT_CONSTANT = 1.5D;
/// <summary>
/// represents the _original_ default for digital output mode (not the default in the db)
/// used for restoring defaults
/// 13677 Restore defaults page button not functional for sensor settings nav step in system settings tile.
/// </summary>
public const DigitalOutputModes DIGITALOUT_MODE_CONSTANT = DigitalOutputModes.FVLH;
/// <summary>
/// represents the _original_ default for digital output delay (not the default in the db)
/// used for restoring defaults
/// 13677 Restore defaults page button not functional for sensor settings nav step in system settings tile.
/// </summary>
public const double DIGITALOUT_DELAY_CONSTANT = 0D;
/// <summary>
/// represents the _original_ default for digital output limit duration (not the default in the db)
/// used for restoring defaults
/// 13677 Restore defaults page button not functional for sensor settings nav step in system settings tile.
/// </summary>
public const bool DIGITALOUT_LIMITDURATION_CONSTANT = true;
/// <summary>
/// represents the _original_ default for digital output duration (not the default in the db)
/// used for restoring defaults
/// 13677 Restore defaults page button not functional for sensor settings nav step in system settings tile.
/// </summary>
public const double DIGITALOUT_DURATION_CONSTANT = 10D;
/// <summary>
/// represents the _original_ default for uart data bits (not the default in the db)
/// used for restoring defaults
/// </summary>
public const uint UART_DATABITS_CONSTANT = 8;
/// <summary>
/// represents the _original_ default for uart stop bits (not the default in the db)
/// used for restoring defaults
/// </summary>
public const StopBits UART_STOPBITS_CONSTANT = StopBits.One;
/// <summary>
/// represents the _original_ default for uart parity (not the default in the db)
/// used for restoring defaults
/// </summary>
public const Parity UART_PARITY_CONSTANT = Parity.None;
/// <summary>
/// represents the _original_ default for uart flow control (not the default in the db)
/// used for restoring defaults
/// </summary>
public const Handshake UART_FLOWCONTROL_CONSTANT = Handshake.None;
/// <summary>
/// represents the _original_ default for uart data format (not the default in the db)
/// used for restoring defaults
/// </summary>
public const UartDataFormat UART_DATAFORMAT_CONSTANT = UartDataFormat.Binary;
/// <summary>
/// represents the _original_ default for stream input udp address (not the default in the db)
/// used for restoring defaults
/// </summary>
public const string STREAMIN_ADDRESS_CONSTANT = "UDP://239.1.2.10:8400";
/// <summary>
/// represents the _original_ default for stream output udp profile (not the default in the db)
/// used for restoring defaults
/// </summary>
public const UDPStreamProfile STREAMOUT_PROFILE_CONSTANT = UDPStreamProfile.CH10_PCM_128BIT_2HDR;
/// <summary>
/// represents the _original_ default for stream output udp address (not the default in the db)
/// used for restoring defaults
/// </summary>
public const string STREAMOUT_ADDRESS_CONSTANT = "UDP://239.1.2.10:8400";
/// <summary>
/// represents the _original_ default for stream output time channel id (not the default in the db)
/// used for restoring defaults
/// </summary>
public const ushort STREAMOUT_TIME_CHID_CONSTANT = 1;
/// <summary>
/// represents the _original_ default for stream output data channel id (not the default in the db)
/// used for restoring defaults
/// </summary>
public const ushort STREAMOUT_DATA_CHID_CONSTANT = 3;
/// <summary>
/// represents the _original_ default for stream output TmNS configuration (not the default in the db)
/// used for restoring defaults
/// </summary>
public const string STREAMOUT_TMNS_CONFIG_CONSTANT = "(1,6,60,0,0,0,0,0)";
/// <summary>
/// represents the _original_ default for stream output irig time data packet interval (in milliseconds) (not the default in the db)
/// used for restoring defaults
/// </summary>
public const ushort STREAMOUT_IRIG_TDP_INTERVAL_CONSTANT = 500;
public const string TEST_SPECIFIC_DOUT = "TSD_";
public const string TEST_SPECIFIC_SQUIB = "TSQ_";
public const string TEST_SPECIFIC_DIN = "TSI_";
public const string TEST_SPECIFIC_EMB = "TSA_";
public const string TEST_SPECIFIC_THERMO = "TST_";
public const string TEST_SPECIFIC_EMB_CLK = "TSC_";
public const string TEST_SPECIFIC_UART = "TSU_";
public const string TEST_SPECIFIC_STREAM_OUT = "TSS_";
public const string TEST_SPECIFIC_STREAM_IN = "TSN_";
public const string TEST_SPECIFIC_CAN = "TSF_";
public const string TEST_SPECIFIC_DIGITAL_IN_SERIAL = "TSI_TestSpecific";
public const string TEST_SPECIFIC_DIGITAL_OUT_SERIAL = "TSD_TestSpecific";
public const string TEST_SPECIFIC_SQUIB_SERIAL = "TSQ_TestSpecific";
public const string TEST_SPECIFIC_ANALOG_SERIAL = "TSA_Embedded";
public const string TEST_SPECIFIC_CLOCK_SERIAL = "TSC_Embedded";
public const string TEST_SPECIFIC_UART_SERIAL = "TSU_TestSpecific";
public const string TEST_SPECIFIC_STREAM_OUT_SERIAL = "TSS_TestSpecific";
public const string TEST_SPECIFIC_STREAM_IN_SERIAL = "TSN_TestSpecific";
public const string VOLTAGE_INPUT = "Voltage input";
public const string TEST_SPECIFIC_THERMOCOUPLER = "TST_TestSpecific";
public const string TEST_SPECIFIC_CAN_SERIAL = "TSF_TestSpecific";
public static bool IsTestSpecificDigitalOut(string sn)
{
if (string.IsNullOrWhiteSpace(sn))
{
return false;
}
if (!sn.StartsWith(TEST_SPECIFIC_DOUT)) return false;
return true;
}
public static bool IsTestSpecificSquib(string sn)
{
if (string.IsNullOrWhiteSpace(sn))
{
return false;
}
if (!sn.StartsWith(TEST_SPECIFIC_SQUIB)) return false;
return true;
}
/// <summary>
/// returns true if the serial number belongs to a test specific digital input
/// </summary>
public static bool IsTestSpecificDigitalIn(string sn)
{
if (string.IsNullOrWhiteSpace(sn))
{
return false;
}
if (!sn.StartsWith(TEST_SPECIFIC_DIN)) return false;
return true;
}
public static bool IsTestSpecificEmbedded(string sn)
{
if (string.IsNullOrWhiteSpace(sn))
{
return false;
}
if (!sn.StartsWith(TEST_SPECIFIC_EMB)) { return false; }
return true;
}
public static bool IsTestSpecificThermoCouple(string sn)
{
if (string.IsNullOrWhiteSpace(sn))
{
return false;
}
if (!sn.StartsWith(TEST_SPECIFIC_THERMO)) { return false; }
return true;
}
public static bool IsTestSpecificEmbeddedClock(string sn)
{
if (string.IsNullOrWhiteSpace(sn))
{
return false;
}
if (!sn.StartsWith(TEST_SPECIFIC_EMB_CLK)) return false;
return true;
}
public static bool IsTestSpecificStreamOut(string sn)
{
if (string.IsNullOrWhiteSpace(sn))
{
return false;
}
if (!sn.StartsWith(TEST_SPECIFIC_STREAM_OUT)) return false;
return true;
}
public static bool IsTestSpecificStreamIn(string sn)
{
if (string.IsNullOrWhiteSpace(sn))
{
return false;
}
if (!sn.StartsWith(TEST_SPECIFIC_STREAM_IN)) return false;
return true;
}
public static bool IsTestSpecificUart(string sn)
{
if (string.IsNullOrWhiteSpace(sn))
{
return false;
}
if (!sn.StartsWith(TEST_SPECIFIC_UART)) return false;
return true;
}
public static bool IsTestSpecificThermocoupler(string sn)
{
if (string.IsNullOrWhiteSpace(sn))
{
return false;
}
if (!sn.StartsWith(TEST_SPECIFIC_THERMOCOUPLER)) return false;
return true;
}
public static bool IsTestSpecificCAN(string sn)
{
if (string.IsNullOrWhiteSpace(sn))
{
return false;
}
if (!sn.StartsWith(TEST_SPECIFIC_CAN)) return false;
return true;
}
public const string EditObjectSensorChannelDragFormat = "EditObjectSensorsChannelTable.UserData []";
public enum SensorSettings
{
Range,
CFC,
Polarity,
Position,
LimitDuration, //deprecated in 2.1
Duration, //deprecated in 2.1
Delay, //deprecated in 2.1
OutputMode,
SQMode,
DIMode,
DefaultValue,
ActiveValue, //12 LAST value in V2.0 settings
//new in 2.1
SquibLimitDuration,
SquibDuration,
SquibDelay,
DigitalOutLimitDuration,
DigitalOutDuration,
DigitalOutDelay,
SquibCurrent,
//new in 3.0
ZeroMethod,
ZeroMethodStart,
ZeroMethodEnd,
UserValue1,
UserValue2,
UserValue3,
InitialOffset,
//FB 13120 added filter class
FilterClass,
//new in 4.0
//18363 Uart Channels
UartBaudRate,
UartDataBits,
UartStopBits,
UartParity,
UartFlowControl,
UartDataFormat,
//18364 Stream Out Channels
StreamOutUDPProfile,
StreamOutUDPAddress,
StreamOutUDPTimeChannelId,
StreamOutUDPDataChannelId,
StreamOutUDPTmNSConfig,
StreamOutIRIGTimeDataPacketIntervalMs,
//26828 Stream In Channels
StreamInUDPAddress,
//29760 Implement ACCoupleEnable
ACCouplingEnabled,
//33145 Voltage insertion channel should be half-bridge
BridgeType
}
public enum SensorType
{
Analog,
DigitalIn,
DigitalOut,
Squib,
Clock,
UART,
StreamOut,
StreamIn,
Thermocoupler
}
/// <summary>
/// Separator for encoding an added linear calibration with a non-linear calibrated sensor
/// </summary>
public const string LinearValuesSeparator = "||";
/// <summary>
/// used to convert between different formats and SensivityUnits
/// 14448 Error when trying to import sensors.
/// </summary>
public abstract class SensUnitStringConverter
{
public static SensUnits ConvertFromString(string s)
{
s = s.Trim().ToLower();
switch (s)
{
case "none": return SensUnits.NONE;
case "mv": return SensUnits.mV;
case "mv/v":
case "mvperv":
return SensUnits.mVperV;
case "mv/v/eu":
case "mvpervpereu":
return SensUnits.mVperVperEU;
case "mv/eu":
case "mvpereu":
return SensUnits.mVperEU;
default: throw new InvalidCastException($"Can't convert {s} to SensUnits");
}
}
}
/// <summary>
/// All available Sensitivity Unit types.
/// </summary>
public enum SensUnits
{
/// <summary>
/// No Sensitivity Units (Polynomial Sensor)
/// </summary>
[Description("NONE")] NONE = 0,
/// <summary>
/// Sensitivity expressed in mV with output at Capacity EU
/// </summary>
[Description("mV")] mV = 1,
/// <summary>
/// Excitation proportional sensitivity expressed in mV/V with output at Capacity EU
/// </summary>
[Description("mV/V")] mVperV = 2,
/// <summary>
/// Excitation proportional sensitivity expressed in mV/V/EU
/// </summary>
[Description("mV/V/EU")] mVperVperEU = 3,
/// <summary>
/// Sensitivity expressed in mV/EU
/// </summary>
[Description("mV/EU")] mVperEU = 4
}
/// <summary>
/// All available bridge types.
/// </summary>
public enum BridgeType
{
/// <summary>
/// sensor uses IEPE setup
/// </summary>
[Description("IEPE")] IEPE = 1 << 0,
/// <summary>
/// sensor uses quarter bridge setup
/// </summary>
[Description("Quarter")] QuarterBridge = 1 << 1,
/// <summary>
/// sensor uses half bridge setup
/// </summary>
[Description("Bridge-Half")] HalfBridge = 1 << 2,
/// <summary>
/// sensor has a full bridge setup
/// </summary>
[Description("Bridge-Full")] FullBridge = 1 << 3,
/// <summary>
/// digital input setup
/// </summary>
[Description("DigitalInput")] DigitalInput = 1 << 4,
/// <summary>
/// squib output setup
/// </summary>
[Description("SQUIB")] SQUIB = 1 << 5,
/// <summary>
/// digital output setup
/// </summary>
[Description("TOMDigital")] TOMDigital = 1 << 6,
/// <summary>
/// sensor uses a G5 (signal plus) half bridge setup
/// </summary>
[Description("Bridge-Half SigPlus")] HalfBridge_SigPlus = 1 << 7,
/// <summary>
/// not a "sensor" but encoding the RTC
/// </summary>
[Description("RTC")] RTC = 1 << 8,
/// <summary>
/// not a "sensor" but values recorded on UART
/// </summary>
[Description("UART")] UART = 1 << 9,
/// <summary>
/// not a "sensor" but values sent out via stream
/// </summary>
[Description("StreamOut")] StreamOut = 1 << 10,
/// <summary>
/// not a "sensor" but values received via stream
/// </summary>
[Description("StreamIn")] StreamIn = 1 << 11,
///
/// thermocoupler sensor
///
[Description("Thermocoupler")] Thermocoupler = 1 << 12,
///
/// not a "sensor" but values recorded on CAN
///
[Description("CAN")] CAN = 1 << 13
}
public static BridgeType ConvertIntToBridgeType(int bridge)
{
switch (bridge)
{
case 0: return BridgeType.IEPE;
case 4: return BridgeType.HalfBridge_SigPlus;
case 3: return BridgeType.FullBridge;
case 2: return BridgeType.HalfBridge;
case 1: return BridgeType.QuarterBridge;
case 8: return BridgeType.RTC;
default: return BridgeType.FullBridge;
}
}
/// <summary>
/// this is apparently needed for historical reasons
/// as the sensor db apparently doesn't use the bitmask value for storage?
/// </summary>
/// <param name="bridge"></param>
/// <returns></returns>
public static int ConvertBridgeToInt(BridgeType bridge)
{
switch (bridge)
{
case BridgeType.IEPE: return 0;
case BridgeType.QuarterBridge: return 1;
case BridgeType.HalfBridge: return 2;
case BridgeType.FullBridge: return 3;
case BridgeType.HalfBridge_SigPlus: return 4;
case BridgeType.RTC: return 8;
default: return 3;
}
}
/// <summary>
/// how to handle sensor calibrations that are out of date
/// 1) always allow sensors in a data collection, just warn
/// 2) don't allow sensors which are out of date, warn if near out of date
/// </summary>
[TypeConverter(typeof(EnumDescriptionTypeConverter))]
public enum SensorCalPolicy
{
[Description("SENSOR_CAL_POLICY_ALLOW_ALWAYS")]
AllowAlways,
[Description("SENSOR_CAL_POLICY_DONT_ALLOW")]
DONT_ALLOW
}
/// <summary>
/// allows for this field to be cached without having to be retrieved when processing a lot of channels
/// </summary>
public static int SensorCalOutOfDateWarningPeriodDays = 14;
public static SensorCalPolicy SensorCalPolicyCurrent = SensorCalPolicy.DONT_ALLOW;
/// <summary>
/// the default policy for sensors is to not allow out of cal sensors
/// </summary>
public const SensorCalPolicy CAL_SENSOR_POLICY_DEFAULT = SensorCalPolicy.DONT_ALLOW;
/// <summary>
/// default warning period for sensors for calibration (in days)
/// </summary>
public const int CAL_SENSOR_POLICY_WARNING_DAYS_DEFAULT = 14;
public enum CouplingModes
{
AC = 0,
DC
}
/// <summary>
/// signifies whether autosense for IEPE/analog will be performed
/// this variable only holds the value for the property, it does not
/// serialize, deserialize, the property must be set by any using
/// applications first
/// </summary>
public static bool DisableAutoSense { get; set; }
// FB16524: diagnostic result should include the resting voltage of an IEPE sensor
// http://manuscript.dts.local/f/cases/16524/diagnostic-result-should-include-the-resting-voltage-of-an-IEPE-sensor
public static double DefaultBridgeOffsetMVTolLow { get; set; } = -100;
public static double DefaultBridgeOffsetMVTolHigh { get; set; } = 100;
public static double DefaultIEPEOffsetMVTolLow { get; set; } = -2000;
public static double DefaultIEPEOffsetMVTolHigh { get; set; } = 2000;
//ARS valid ranges for TSR AIR
public const int ARS2000 = 2000;
//LowG valid ranges for TSR AIR
public const int LowG64 = 64;
[TypeConverter(typeof(EnumDescriptionTypeConverter))]
public enum AvailableRangesLowG
{
[Description("TSRAIR_LOW_g_64")]
LowG64D = LowG64
};
public enum AvailableRangesARS
{
ARS2000D = ARS2000,
};
public const string HighG = "-High g";
public const string LowG = "-Low g";
public const string ARS = "-ARS";
public const string Atm = "-Atm";
public const int TSRAirTemperatureChannel = 9;
public const int TSRAirHumidityChannel = 10;
public const int TSRAirPressureChannel = 11;
public static bool IsTSRAirHighGChannel(string moduleSerialNumber)
{
if (moduleSerialNumber.EndsWith(HighG))
{
return true;
}
return false;
}
public static bool IsTSRAirLowGChannel(string moduleSerialNumber)
{
if (moduleSerialNumber.EndsWith(LowG))
{
return true;
}
return false;
}
public static bool IsTSRAirARSChannel(string moduleSerialNumber)
{
if (moduleSerialNumber.EndsWith(ARS))
{
return true;
}
return false;
}
public static bool IsTSRAirAtmChannel(string moduleSerialNumber)
{
if (moduleSerialNumber.EndsWith(Atm))
{
return true;
}
return false;
}
public static bool IsTSRAirHumidityChannel(string moduleSerialNumber, int channelNumber)
{
return IsTSRAirAtmChannel(moduleSerialNumber) && (channelNumber == TSRAirHumidityChannel);
}
}
}

View File

@@ -0,0 +1,11 @@
namespace DTS.Common.Enums.Sensors
{
public enum SensorStatus
{
Available,
InUse,
OutForService,
OutForCalibration,
Retired
}
}

View File

@@ -0,0 +1,40 @@
namespace DTS.Common.Enums.Sensors.SensorsList
{
public enum AnalogSensorFields
{
Included,
SerialNumber,
Description,
Manufacturer,
Model,
Capacity,
CalInterval,
Sensitivity,
LinearSensitivity,
Resistance,
Excitation,
Units,
Id,
CalDate,
CalDueDate,
ModifiedBy,
LastModified,
IEPE,
OutOfDate,
InWarningPeriod,
UsageMaximized,
InUsageWarningPeriod,
NonLinearCalucationType,
ZeroMethod,
ZeroMethodStart,
ZeroMethodEnd,
//13065 Sensor "First Use" Date
FirstUseDate,
UserValue1,
UserValue2,
UserValue3,
Assembly,
UsageCount,
MaximumUsage
}
}

View File

@@ -0,0 +1,18 @@
using DTS.Common.Base.Classes;
namespace DTS.Common.Enums.Sensors.SensorsList
{
public enum CACOption
{
[DescriptionResourceAttribute("CAC_Manual")]
Manual,
[DescriptionResourceAttribute("CAC_Capacity")]
Capacity,
[DescriptionResourceAttribute("CAC_RangeHigh")]
RangeHigh,
[DescriptionResourceAttribute("CAC_RangeMedium")]
RangeMedium,
[DescriptionResourceAttribute("CAC_RangeLow")]
RangeLow,
}
}

View File

@@ -0,0 +1,12 @@
namespace DTS.Common.Enums.Sensors.SensorsList
{
public enum CanSettingFields
{
CanIsFD,
CanArbBaseBitrate,
CanArbBaseSJW,
CanDataBitrate,
CanDataSJW,
CanFileType
}
}

View File

@@ -0,0 +1,12 @@
namespace DTS.Common.Enums.Sensors.SensorsList
{
public enum DigitalInputFields
{
Included,
SerialNumber,
Description,
Mode,
ModifiedBy,
LastModified
}
}

View File

@@ -0,0 +1,13 @@
namespace DTS.Common.Enums.Sensors.SensorsList
{
public enum DigitalOutFields
{
Included,
SerialNumber,
Description,
Delay,
Duration,
ModifiedBy,
LastModified
}
}

View File

@@ -0,0 +1,13 @@
namespace DTS.Common.Enums.Sensors.SensorsList
{
public enum SensorListTabs
{
ANALOG = 0,
SQUIB = 1,
DIGITAL_IN = 2,
DIGITAL_OUT = 3,
UART = 4,
STREAM_IN = 5,
STREAM_OUT = 6
}
}

View File

@@ -0,0 +1,18 @@
namespace DTS.Common.Enums.Sensors.SensorsList
{
public enum SquibFields
{
Included,
SerialNumber,
Description,
ResistanceLow,
ResistanceHigh,
Id,
Mode,
Delay,
Current,
Duration,
ModifiedBy,
LastModified
}
}

View File

@@ -0,0 +1,18 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace DTS.Common.Enums.Sensors.SensorsList
{
public enum StreamInSettingFields
{
Included,
SerialNumber,
Description,
LastModifiedBy,
LastModified,
UDPAddress,
}
}

View File

@@ -0,0 +1,18 @@
namespace DTS.Common.Enums.Sensors.SensorsList
{
public enum StreamOutSettingFields
{
Included,
SerialNumber,
Description,
LastModifiedBy,
LastModified,
UDPProfile,
UDPAddress,
UDPTimeChannelId,
UDPDataChannelId,
UDPTmNSConfig,
IRIGTimeDataPacketIntervalMs,
TMATSIntervalMs
}
}

View File

@@ -0,0 +1,16 @@
namespace DTS.Common.Enums.Sensors.SensorsList
{
public enum UartSettingFields
{
Included,
SerialNumber,
BaudRate,
DataBits,
StopBits,
Parity,
FlowControl,
DataFormat,
LastModifiedBy,
LastModified
}
}

View File

@@ -0,0 +1,51 @@
using System.ComponentModel;
using DTS.Common.Converters;
namespace DTS.Common.Enums.Sensors
{
[TypeConverter(typeof(EnumDescriptionTypeConverter))]
public enum ZeroMethodType
{
// Lots of legacy compatibility (e.g. importing GM ISF) depends on the order/value of this enum.
// also 14906 Can the parameter names in the test match the sensors tile names?
/// <summary>
/// calculate electrical zero using an average over time
/// </summary>
[Description("ZeroMethod_AverageOverTime")]
AverageOverTime = 0,
/// <summary>
/// calculate zero using time in pre-event
/// </summary>
//[Description("Use Diagnostics Zero")]
[Description("ZeroMethod_DiagnosticLevel")]
UsePreEventDiagnosticsZero = 1,
/// <summary>
/// calculate zero using injected value
/// </summary>
//[Description("Absolute Zero")]
[Description("ZeroMethod_None")]
None = 2
}
/// <summary>
/// Original version of all available zero method types.
/// </summary>
public enum OriginalZeroMethodType
{
/// <summary>
/// calculate electrical zero using an average over time
/// </summary>
//[Description("Average Over Time")]
AverageOverTime,
/// <summary>
/// calculate zero using time in pre-event
/// </summary>
//[Description("Use Diagnostics Zero")]
UsePreCalZero,
/// <summary>
/// calculate zero using injected value
/// </summary>
//[Description("Absolute Zero")]
None
}
}