init
This commit is contained in:
315
Common/DTS.CommonCore/Interface/Sensors/IAnalogDbRecord.cs
Normal file
315
Common/DTS.CommonCore/Interface/Sensors/IAnalogDbRecord.cs
Normal file
@@ -0,0 +1,315 @@
|
||||
using DTS.Common.Classes.Sensors;
|
||||
using DTS.Common.Enums;
|
||||
using DTS.Common.Enums.Sensors;
|
||||
using DTS.Common.Interface.Sensors.SoftwareFilters;
|
||||
using System;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace DTS.Common.Interface.Sensors
|
||||
{
|
||||
/// <summary>
|
||||
/// describes the a record of an analog sensor in the db
|
||||
/// </summary>
|
||||
public interface IAnalogDbRecord
|
||||
{
|
||||
/// <summary>
|
||||
/// the database id of the sensor
|
||||
/// </summary>
|
||||
[Key]
|
||||
int Id { get; set; }
|
||||
/// <summary>
|
||||
/// Serial number of sensor
|
||||
/// [required to be unique]
|
||||
/// </summary>
|
||||
[Required]
|
||||
[StringLength(50)]
|
||||
string SerialNumber { get; set; }
|
||||
/// <summary>
|
||||
/// deprecated
|
||||
/// which axis the record is for when the sensor is multi-axis
|
||||
/// </summary>
|
||||
short AxisNumber { get; set; }
|
||||
/// <summary>
|
||||
/// deprecated
|
||||
/// </summary>
|
||||
short BridgeLegMode { get; set; }
|
||||
/// <summary>
|
||||
/// the expected resistance in Ohms if applicable for the sensor
|
||||
/// </summary>
|
||||
double BridgeResistance { get; set; }
|
||||
/// <summary>
|
||||
/// the type of bridge or sensor
|
||||
/// [DO NOT USE BITMASK VALUE WHEN READING/WRITING TO DB]
|
||||
/// </summary>
|
||||
SensorConstants.BridgeType Bridge { get; set; }
|
||||
/// <summary>
|
||||
/// Whether the sensor has been marked as broken by a user
|
||||
/// </summary>
|
||||
bool Broken { get; set; }
|
||||
/// <summary>
|
||||
/// whether the sensor has it's own filtering or should otherwise bypass
|
||||
/// hardware filters when collecting data
|
||||
/// (not supported on all hardware)
|
||||
/// </summary>
|
||||
bool BypassFilter { get; set; }
|
||||
/// <summary>
|
||||
/// deprecated?
|
||||
/// </summary>
|
||||
bool CalibrationSignal { get; set; }
|
||||
/// <summary>
|
||||
/// calibration interval in days, used in determining when sensor is out of cal
|
||||
/// </summary>
|
||||
int CalInterval { get; set; }
|
||||
/// <summary>
|
||||
/// capacity of the sensor in EU
|
||||
/// </summary>
|
||||
double Capacity { get; set; }
|
||||
/// <summary>
|
||||
/// Whether to check the sensor output in mV against thresholds in diagnostics
|
||||
/// </summary>
|
||||
bool CheckOffset { get; set; }
|
||||
/// <summary>
|
||||
/// user supplied descriptive comment on sensor
|
||||
/// </summary>
|
||||
[Required]
|
||||
[StringLength(50)]
|
||||
string Comment { get; set; }
|
||||
/// <summary>
|
||||
/// IEPE coupling mode to use for data collection if applicable
|
||||
/// </summary>
|
||||
SensorConstants.CouplingModes CouplingMode { get; set; }
|
||||
/// <summary>
|
||||
/// date sensor record was created (if available)
|
||||
/// </summary>
|
||||
[Column(TypeName = "datetime")]
|
||||
DateTime Created { get; set; }
|
||||
/// <summary>
|
||||
/// Whether this sensor should only record internal resistance and record no external signal
|
||||
/// [generally only useful for testing purposes]
|
||||
/// </summary>
|
||||
bool DiagnosticsMode { get; set; }
|
||||
/// <summary>
|
||||
/// Engineering units for sensor
|
||||
/// (deprecated, db value not used)
|
||||
/// </summary>
|
||||
string DisplayUnit { get; set; }
|
||||
/// <summary>
|
||||
/// whether this sensor has been marked not to be used by user
|
||||
/// </summary>
|
||||
bool DoNotUse { get; set; }
|
||||
/// <summary>
|
||||
/// Electronic Identification tag
|
||||
/// [DALLAS or TEDS ID TAG]
|
||||
/// if present required to be unique
|
||||
/// </summary>
|
||||
[Required]
|
||||
[Column("eId")]
|
||||
[StringLength(50)]
|
||||
string EId { get; set; }
|
||||
/// <summary>
|
||||
/// TDAS supports external resistance when measuring shunt resistance
|
||||
/// this is the value of external resistance applied
|
||||
/// </summary>
|
||||
double ExternalShuntResistance { get; set; }
|
||||
/// <summary>
|
||||
/// The default software filter class to apply to data channel when viewing
|
||||
/// filtered EU data
|
||||
/// </summary>
|
||||
IFilterClass Filter { get; set; }
|
||||
/// <summary>
|
||||
/// Amount of EU to add in when EU is calculated
|
||||
/// Used to offset EU readings by a specific amount
|
||||
/// Note that analog sensor calibration records
|
||||
/// can contain a more sophisticated EU offset
|
||||
/// </summary>
|
||||
[Column("InitialEU")]
|
||||
[Required]
|
||||
[StringLength(50)]
|
||||
double? InitialEu { get; set; }
|
||||
/// <summary>
|
||||
/// TDAS supports performing external and internal resistance when measuring shunt resistance
|
||||
/// This is the value to use when internal shunt resistance is used
|
||||
/// </summary>
|
||||
double InternalShuntResistance { get; set; }
|
||||
/// <summary>
|
||||
/// whether output of the sensor in EU should be inverted or not
|
||||
/// </summary>
|
||||
bool Invert { get; set; }
|
||||
/// <summary>
|
||||
/// ISO 13499 channel name to apply to a data channel when a data channel is
|
||||
/// created using the sensor
|
||||
/// </summary>
|
||||
[Required]
|
||||
[StringLength(255)]
|
||||
string ISOChannelName { get; set; }
|
||||
/// <summary>
|
||||
/// ISO 13499 code to apply to a data channel when a data channel is created
|
||||
/// using the sensor
|
||||
/// </summary>
|
||||
[Required]
|
||||
[StringLength(50)]
|
||||
string ISOCode { get; set; }
|
||||
/// <summary>
|
||||
/// when the sensor was last modified
|
||||
/// </summary>
|
||||
[Column(TypeName = "datetime")]
|
||||
DateTime LastModified { get; set; }
|
||||
/// <summary>
|
||||
/// deprecated, used to determine which sensors should not propagate up to central database
|
||||
/// </summary>
|
||||
bool LocalOnly { get; set; }
|
||||
/// <summary>
|
||||
/// Maker of sensor
|
||||
/// </summary>
|
||||
[StringLength(50)]
|
||||
string Manufacturer { get; set; }
|
||||
/// <summary>
|
||||
/// model of sensor
|
||||
/// </summary>
|
||||
[StringLength(50)]
|
||||
string Model { get; set; }
|
||||
/// <summary>
|
||||
/// who last modified the sensor record
|
||||
/// </summary>
|
||||
[Required]
|
||||
[StringLength(50)]
|
||||
string ModifiedBy { get; set; }
|
||||
/// <summary>
|
||||
/// deprecated/reserved
|
||||
/// number of axes associated with this serial number
|
||||
/// </summary>
|
||||
short NumberOfAxes { get; set; }
|
||||
/// <summary>
|
||||
/// allowable tolerance in mV on the high side for an idle reading of sensor
|
||||
/// used to determine if the sensor output is too high in diagnostics
|
||||
/// </summary>
|
||||
double OffsetToleranceHigh { get; set; }
|
||||
/// <summary>
|
||||
/// allowable tolerance in mV on the low side for an idle reading of sensor
|
||||
/// used to determine if the sensor output is too low in diagnostics
|
||||
/// </summary>
|
||||
double OffsetToleranceLow { get; set; }
|
||||
/// <summary>
|
||||
/// typical medium range for sensor in applications
|
||||
/// </summary>
|
||||
double RangeMedium { get; set; }
|
||||
/// <summary>
|
||||
/// typical high range for sensor in applications
|
||||
/// </summary>
|
||||
double RangeHigh { get; set; }
|
||||
/// <summary>
|
||||
/// typical low range for sensor in applications
|
||||
/// </summary>
|
||||
double RangeLow { get; set; }
|
||||
/// <summary>
|
||||
/// The type of sensor
|
||||
/// Deprecated, remains for TDC purposes
|
||||
/// Normal = 0,
|
||||
/// POT = 1,
|
||||
/// IRTracc = 2,
|
||||
/// Polynomial = 3
|
||||
/// </summary>
|
||||
int SensorCategory { get; set; }
|
||||
/// <summary>
|
||||
/// the database id of the sensor model, if applicable
|
||||
///
|
||||
/// </summary>
|
||||
int SensorModelId { get; set; }
|
||||
/// <summary>
|
||||
/// The type of shunt used for measuring shunt results
|
||||
/// note all SLICE hardware only supports emulation (or none)
|
||||
/// None = 0,
|
||||
/// Emulation = 1,
|
||||
/// Internal = 2,
|
||||
/// External = 3
|
||||
/// </summary>
|
||||
short Shunt { get; set; }
|
||||
[Required]
|
||||
[StringLength(50)]
|
||||
/// <summary>
|
||||
/// reserved/not in use
|
||||
/// </summary>
|
||||
SensorStatus Status { get; set; }
|
||||
/// <summary>
|
||||
/// Excitation voltages supported by the sensor
|
||||
/// used to prevent the sensor from being used in a situation that might damaged it
|
||||
/// (say a 2V sensor being fed 10V excitation)
|
||||
/// </summary>
|
||||
[Required]
|
||||
[StringLength(50)]
|
||||
ExcitationVoltageOptions.ExcitationVoltageOption[] SupportedExcitation { get; set; }
|
||||
/// <summary>
|
||||
/// bytes representing a delimited string of tag ids
|
||||
/// </summary>
|
||||
byte[] TagsBlobBytes { get; set; }
|
||||
/// <summary>
|
||||
/// Reserved/Not used
|
||||
/// </summary>
|
||||
long TimesUsed { get; set; }
|
||||
/// <summary>
|
||||
/// flag indicating that the sensor should be interpreted as 0-n rather than -x<0<x
|
||||
/// </summary>
|
||||
bool UniPolar { get; set; }
|
||||
/// <summary>
|
||||
/// User channel name to apply when sensor is applied to a blank channel
|
||||
/// </summary>
|
||||
[Required]
|
||||
[StringLength(255)]
|
||||
string UserChannelName { get; set; }
|
||||
/// <summary>
|
||||
/// User channel code to apply when sensor is applied to a blank channel
|
||||
/// </summary>
|
||||
[Required]
|
||||
[StringLength(50)]
|
||||
string UserCode { get; set; }
|
||||
[Required]
|
||||
[StringLength(50)]
|
||||
string UserSerialNumber { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// user supplied string
|
||||
/// travels with the sensor to data channels when
|
||||
/// data is recorded with the sensor
|
||||
/// </summary>
|
||||
[StringLength(50)]
|
||||
string UserValue1 { get; set; }
|
||||
/// <summary>
|
||||
/// user supplied string
|
||||
/// travels with the sensor to data channels when
|
||||
/// data is recorded with the sensor
|
||||
/// </summary>
|
||||
[StringLength(50)]
|
||||
string UserValue2 { get; set; }
|
||||
/// <summary>
|
||||
/// user supplied string
|
||||
/// travels with the sensor to data channels when
|
||||
/// data is recorded with the sensor
|
||||
/// </summary>
|
||||
[StringLength(50)]
|
||||
string UserValue3 { get; set; }
|
||||
/// <summary>
|
||||
/// deprectated
|
||||
/// </summary>
|
||||
int Version { get; set; }
|
||||
[Column(TypeName = "datetime")]
|
||||
/// <summary>
|
||||
/// Date of first destructive use since sensor was calibrated,
|
||||
/// only valid when using latest calibration
|
||||
/// null indicates not set
|
||||
/// </summary>
|
||||
DateTime? FirstUseDate { get; set; }
|
||||
/// <summary>
|
||||
/// deprecated
|
||||
/// Originally held the id of the latest calibration record
|
||||
/// for sensor
|
||||
/// </summary>
|
||||
int? LatestCalibrationId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// whether to use AC Coupling when using a bridge mode (full/half/quarter/half+sig)
|
||||
/// 18294 Implement Bridge AC/DC coupling(fw update dependent)
|
||||
/// </summary>
|
||||
bool ACCouplingModeEnabled { get; set; }
|
||||
}
|
||||
}
|
||||
38
Common/DTS.CommonCore/Interface/Sensors/IAnalogDefaults.cs
Normal file
38
Common/DTS.CommonCore/Interface/Sensors/IAnalogDefaults.cs
Normal file
@@ -0,0 +1,38 @@
|
||||
using DTS.Common.Interface.Sensors.SoftwareFilters;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace DTS.Common.Interface.Sensors
|
||||
{
|
||||
//FB 13120 new interface to support filter class mapping settings
|
||||
public interface IAnalogDefaults
|
||||
{
|
||||
/// <summary>
|
||||
/// the current selected default filter
|
||||
/// </summary>
|
||||
IFilterClass SelectedFilterOption { get; set; }
|
||||
/// <summary>
|
||||
/// all available filters
|
||||
/// </summary>
|
||||
List<IFilterClass> FilterOptions { get; }
|
||||
|
||||
//FB 18727 Setting to use MeasuredExcitation or not
|
||||
bool UseMeasuredExcitation { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// indicates whether the setting is valid or not
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
bool Validate();
|
||||
void Save();
|
||||
|
||||
/// <summary>
|
||||
/// FB15758 Import/Export settings
|
||||
/// </summary>
|
||||
void ReadXML(System.Xml.XmlElement root);
|
||||
void WriteXML(ref System.Xml.XmlWriter writer);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
using DTS.Common.Classes.Sensors;
|
||||
using DTS.Common.Enums;
|
||||
using DTS.Common.Enums.Sensors;
|
||||
|
||||
namespace DTS.Common.Interface.Sensors
|
||||
{
|
||||
[System.ComponentModel.TypeConverter(typeof(System.ComponentModel.ExpandableObjectConverter))]
|
||||
public interface ICalibrationRecords
|
||||
{
|
||||
ICalibrationRecord[] Records { get; set; }
|
||||
void FromSerializedString(string s);
|
||||
bool IsEqual(object obj, ISensorCalibration sc);
|
||||
string ToDisplayString(ISensorCalibration sc, ISensorCalibration previous, string linearFormat, string nonlinearFormat);
|
||||
string ToSerializedString(ISensorCalDbRecord sc);
|
||||
}
|
||||
[System.ComponentModel.TypeConverter(typeof(System.ComponentModel.ExpandableObjectConverter))]
|
||||
public interface ICalibrationRecord
|
||||
{
|
||||
bool AtCapacity { get; set; }
|
||||
double CapacityOutputIsBasedOn { get; set; }
|
||||
string EngineeringUnits { get; set; }
|
||||
ExcitationVoltageOptions.ExcitationVoltageOption Excitation { get; set; }
|
||||
string ISOCode { get; set; }
|
||||
LinearizationFormula Poly { get; set; }
|
||||
double Sensitivity { get; set; }
|
||||
SensorConstants.SensUnits SensitivityUnits { get; set; }
|
||||
double ZeroPoint { get; set; }
|
||||
string ToDisplayString(ISensorCalibration sc, ICalibrationRecord previous, ISensorCalibration sc2, string linearFormat, string nonlinearFormat);
|
||||
string ToSerializedString(ISensorCalDbRecord sc);
|
||||
bool IsEqual(object obj, ISensorCalibration sc);
|
||||
}
|
||||
}
|
||||
126
Common/DTS.CommonCore/Interface/Sensors/IDigitalInDbRecord.cs
Normal file
126
Common/DTS.CommonCore/Interface/Sensors/IDigitalInDbRecord.cs
Normal file
@@ -0,0 +1,126 @@
|
||||
using DTS.Common.Enums;
|
||||
using DTS.Common.Interface.Sensors.SoftwareFilters;
|
||||
using System;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace DTS.Common.Interface.Sensors
|
||||
{
|
||||
/// <summary>
|
||||
/// interface describing a record of a digital input setting in the db
|
||||
/// </summary>
|
||||
public interface IDigitalInDbRecord
|
||||
{
|
||||
/// <summary>
|
||||
/// Database id of record
|
||||
/// </summary>
|
||||
[Key]
|
||||
int Id { get; set; }
|
||||
/// <summary>
|
||||
/// serial number or name of setting
|
||||
/// </summary>
|
||||
string SerialNumber { get; set; }
|
||||
/// <summary>
|
||||
/// Input mode for setting
|
||||
/// </summary>
|
||||
DigitalInputModes Mode { get; set; }
|
||||
/// <summary>
|
||||
/// ScaleMultiplier, defines how to interpret output in terms of
|
||||
/// units or active/default value of input state
|
||||
/// </summary>
|
||||
[Required]
|
||||
[StringLength(50)]
|
||||
IDigitalInputScaleMultiplier ScaleMultiplier { get; set; }
|
||||
/// <summary>
|
||||
/// when setting was last modified
|
||||
/// </summary>
|
||||
[Column(TypeName = "datetime")]
|
||||
DateTime LastModified { get; set; }
|
||||
/// <summary>
|
||||
/// user that last modified setting in db
|
||||
/// </summary>
|
||||
[Required]
|
||||
[StringLength(50)]
|
||||
string LastModifiedBy { get; set; }
|
||||
/// <summary>
|
||||
/// Electronic ID for digital input setting
|
||||
/// (dallas or TeDS ID value)
|
||||
/// </summary>
|
||||
[Required]
|
||||
[Column("eId")]
|
||||
[StringLength(50)]
|
||||
string EID { get; set; }
|
||||
/// <summary>
|
||||
/// ISO 13499 code for digital input data collected using this setting
|
||||
/// this is the default code when the setting is applied to an input channel
|
||||
/// but can be changed in group or test settings
|
||||
/// </summary>
|
||||
[Required]
|
||||
[StringLength(50)]
|
||||
string ISOCode { get; set; }
|
||||
/// <summary>
|
||||
/// the associated ISO 13499 channel name to apply to a channel when applying
|
||||
/// setting to an input channel
|
||||
/// but can be changed in group or test settings
|
||||
/// </summary>
|
||||
[Required]
|
||||
[StringLength(255)]
|
||||
string ISOChannelName { get; set; }
|
||||
/// <summary>
|
||||
/// the user code to apply to a channel when applying setting to a channel
|
||||
/// can be changed in group or test settings
|
||||
/// </summary>
|
||||
[Required]
|
||||
[StringLength(50)]
|
||||
string UserCode { get; set; }
|
||||
/// <summary>
|
||||
/// user channel name to apply to a channel when applying setting to a channel
|
||||
/// can be changed in group or test settings
|
||||
/// </summary>
|
||||
[Required]
|
||||
[StringLength(255)]
|
||||
string UserChannelName { get; set; }
|
||||
/// <summary>
|
||||
/// user value to carry through to collected data channel when collecting data with this setting
|
||||
/// </summary>
|
||||
[StringLength(255)]
|
||||
string UserValue1 { get; set; }
|
||||
/// <summary>
|
||||
/// user value to carry through to collected data channel when collecting data with this setting
|
||||
/// </summary>
|
||||
[StringLength(255)]
|
||||
string UserValue2 { get; set; }
|
||||
/// <summary>
|
||||
/// user value to carry through to collected data channel when collecting data with this setting
|
||||
/// </summary>
|
||||
[StringLength(255)]
|
||||
string UserValue3 { get; set; }
|
||||
/// <summary>
|
||||
/// bytes describing tag ids for tags associated with setting
|
||||
/// see ITagAware for more information
|
||||
/// </summary>
|
||||
byte[] UserTags { get; set; }
|
||||
/// <summary>
|
||||
/// measurement unit for collected data, for example
|
||||
/// 'V' or Volts
|
||||
/// </summary>
|
||||
[Required]
|
||||
[StringLength(50)]
|
||||
string MeasurementUnit { get; set; }
|
||||
/// <summary>
|
||||
/// software filter class (applied when viewing data) to apply to collected data by default
|
||||
/// can be changed when viewing or exporting, this is just a default filter
|
||||
/// </summary>
|
||||
[Required]
|
||||
[StringLength(50)]
|
||||
IFilterClass FilterClass { get; set; }
|
||||
/// <summary>
|
||||
/// a flag indicating setting should not be used for arbitrary user specified reason
|
||||
/// </summary>
|
||||
bool DoNotUse { get; set; }
|
||||
/// <summary>
|
||||
/// a flag indicating setting should not be used because it is currently broken
|
||||
/// </summary>
|
||||
bool Broken { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
namespace DTS.Common.Interface.Sensors
|
||||
{
|
||||
/// <summary>
|
||||
/// this interface describes the default properties
|
||||
/// for digital inputs
|
||||
/// </summary>
|
||||
public interface IDigitalInputDefaults
|
||||
{
|
||||
/// <summary>
|
||||
/// the default value in ADC for Constant Current digital input where default state switches active or vice versa
|
||||
/// (CCNO or CCNC)
|
||||
/// </summary>
|
||||
double ConstantCurrentBreakpointADC { get; set; }
|
||||
/// <summary>
|
||||
/// the default value in ADC for Voltage digital input modes where default state switches to active or vice vera
|
||||
/// (Transition High To Low [THL] or [TLH])
|
||||
/// </summary>
|
||||
double VoltageBreakpointADC { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// whether to display analog SLICE PRO DIGITAL ADC data
|
||||
/// </summary>
|
||||
bool DisplaySPDADC { get; set; }
|
||||
/// <summary>
|
||||
/// indicates whether the setting is valid or not
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
bool Validate();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
namespace DTS.Common.Interface.Sensors
|
||||
{
|
||||
/// <summary>
|
||||
/// the format the scaler is in
|
||||
/// </summary>
|
||||
public enum Forms { ArbitraryLowAndHigh };
|
||||
public interface IDigitalInputScaleMultiplier
|
||||
{
|
||||
Forms Form { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// for arbirary low/high, this is the low value, the value 0 should be displayed as (OFF)
|
||||
/// </summary>
|
||||
double DefaultValue { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// for arbitrary low/high, this is the high value, the value 1 should be displayed as (ON)
|
||||
/// </summary>
|
||||
double ActiveValue { get; set; }
|
||||
|
||||
bool SimpleEquals(IDigitalInputScaleMultiplier rhs);
|
||||
|
||||
/// <summary>
|
||||
/// serializes scaler to a string
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
string ToSerializeDbString();
|
||||
|
||||
/// <summary>
|
||||
/// deserializes a scaler from a string, regardless of format
|
||||
/// </summary>
|
||||
/// <param name="s"></param>
|
||||
void FromDbSerializeString(string s);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
using DTS.Common.Enums;
|
||||
using System;
|
||||
|
||||
namespace DTS.Common.Interface.Sensors
|
||||
{
|
||||
public interface IDigitalOutDbRecord
|
||||
{
|
||||
int DatabaseId { get; set; }
|
||||
string SerialNumber { get; set; }
|
||||
double DODelay { get; set; }
|
||||
double DODuration { get; set; }
|
||||
string ModifiedBy { get; set; }
|
||||
DateTime LastModified { get; set; }
|
||||
string ISOCode { get; set; }
|
||||
string ISOChannelName { get; set; }
|
||||
string UserCode { get; set; }
|
||||
string UserChannelName { get; set; }
|
||||
bool Broken { get; set; }
|
||||
bool DoNotUse { get; set; }
|
||||
DigitalOutputModes DOMode { get; set; }
|
||||
bool LimitDuration { get; set; }
|
||||
int Version { get; set; }
|
||||
byte [] TagsBlobBytes { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
using DTS.Common.Enums;
|
||||
|
||||
namespace DTS.Common.Interface.Sensors
|
||||
{
|
||||
/// <summary>
|
||||
/// this interface describes the default properties and methods for a digital output
|
||||
/// It's intended to allow interaction with digital output defaults
|
||||
/// 13574 Design for Default squib config file settings
|
||||
/// </summary>
|
||||
public interface IDigitalOutDefaults
|
||||
{
|
||||
/// <summary>
|
||||
/// the default output mode for digital outputs
|
||||
/// </summary>
|
||||
DigitalOutputModes OutputMode{ get; set; }
|
||||
/// <summary>
|
||||
/// the default delay in ms for digital outputs
|
||||
/// </summary>
|
||||
double DelayMS { get; set; }
|
||||
/// <summary>
|
||||
/// the default for whether to limit output duration or not
|
||||
/// </summary>
|
||||
bool LimitDuration { get; set; }
|
||||
/// <summary>
|
||||
/// the default duration in ms to limit duration if limiting duration
|
||||
/// </summary>
|
||||
double DurationMS { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,52 @@
|
||||
using DTS.Common.Enums;
|
||||
|
||||
namespace DTS.Common.Interface.Sensors
|
||||
{
|
||||
/// <summary>
|
||||
/// this interface describes the default properties
|
||||
/// for an IEPE sensor
|
||||
/// </summary>
|
||||
public interface IIEPESensorDefaults
|
||||
{
|
||||
/// <summary>
|
||||
/// low limit for a valid reading of 24V power
|
||||
/// </summary>
|
||||
double _24VPowerLow { get; set; }
|
||||
/// <summary>
|
||||
/// high limit for a valid reading of 24V power
|
||||
/// </summary>
|
||||
double _24VPowerHigh { get; set; }
|
||||
/// <summary>
|
||||
/// the actual range low acceptable value (scalar applied to desired range)
|
||||
/// </summary>
|
||||
double RangeLowLimitScalar { get; set; }
|
||||
/// <summary>
|
||||
/// the actual range high acceptable value (scalar applied to desired range)
|
||||
/// </summary>
|
||||
double RangeHighLimitScalar { get; set; }
|
||||
/// <summary>
|
||||
/// indicates whether the setting is valid or not
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
bool Validate();
|
||||
/// <summary>
|
||||
/// Indicates whether range tolerance value is valid
|
||||
/// </summary>
|
||||
bool RangeToleranceValid { get; }
|
||||
/// <summary>
|
||||
/// indicates whether tolerance value is valid
|
||||
/// </summary>
|
||||
bool ToleranceValid { get; }
|
||||
/// <summary>
|
||||
/// whether AutoSense is allowed or not
|
||||
/// 14634 Implement enable/disable of the "SLICE PRO Auto-sense" feature
|
||||
/// </summary>
|
||||
bool DisableAutoSense { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// FB15758 Import/Export settings
|
||||
/// </summary>
|
||||
void ReadXML(System.Xml.XmlElement root);
|
||||
void WriteXML(ref System.Xml.XmlWriter writer);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
namespace DTS.Common.Interface.Sensors
|
||||
{
|
||||
public interface IInitialOffsets
|
||||
{
|
||||
}
|
||||
}
|
||||
60
Common/DTS.CommonCore/Interface/Sensors/ISensorBase.cs
Normal file
60
Common/DTS.CommonCore/Interface/Sensors/ISensorBase.cs
Normal file
@@ -0,0 +1,60 @@
|
||||
using DTS.Common.Enums;
|
||||
using DTS.Common.Enums.Sensors;
|
||||
using System;
|
||||
|
||||
namespace DTS.Common.Interface.Sensors
|
||||
{
|
||||
public interface ISensorBase
|
||||
{
|
||||
bool IsDigitalInput();
|
||||
bool IsDigitalOutput();
|
||||
bool IsSquib();
|
||||
bool IsUart();
|
||||
bool IsStreamOutput();
|
||||
bool CheckOffset { get; set; }
|
||||
bool MeasureNoise { get; set; }
|
||||
bool MeasureExcitation { get; set; }
|
||||
bool Invert { get; set; }
|
||||
string Model { get; set; }
|
||||
string Manufacturer { get; set; }
|
||||
string UserPartNumber { get; set; }
|
||||
double Capacity { get; set; }
|
||||
double FullScaleCapacity { get; }
|
||||
SensorConstants.CouplingModes CouplingMode { get; set; }
|
||||
double OffsetToleranceLow { get; set; }
|
||||
double OffsetToleranceHigh { get; set; }
|
||||
string DisplayUnit { get; set; }
|
||||
void SetDisplayUnitNoNotify(string unit);
|
||||
double RangeLow { get; set; }
|
||||
double RangeMedium { get; set; }
|
||||
double RangeHigh { get; set; }
|
||||
ExcitationVoltageOptions.ExcitationVoltageOption[] SupportedExcitation { get; set; }
|
||||
void SetExcitationsNoNotify(ExcitationVoltageOptions.ExcitationVoltageOption[] excitations);
|
||||
ISensorCalibration Calibration { get; set; }
|
||||
SensorConstants.BridgeType Bridge { get; set; }
|
||||
double BridgeResistance { get; set; }
|
||||
string FilterClassIso { get; set; }
|
||||
bool UniPolar { get; set; }
|
||||
bool IgnoreRange { get; set; }
|
||||
string LastUpdatedBy { get; set; }
|
||||
int Version { get; set; }
|
||||
bool LocalOnly { get; }
|
||||
void SetLocalOnly(bool bLocalOnly);
|
||||
short AxisNumber { get; set; }
|
||||
short NumberOfAxes { get; set; }
|
||||
int CalInterval { get; set; }
|
||||
string Polarity { get; set; }
|
||||
DateTime LastModified { get; set; }
|
||||
string UserChannelName { get; set; }
|
||||
string UserCode { get; set; }
|
||||
string ISOChannelName { get; set; }
|
||||
string ISOCode { get; set; }
|
||||
string PhysicalDimension { get; set; }
|
||||
string Direction { get; set; }
|
||||
bool DoNotUse { get; set; }
|
||||
bool Broken { get; set; }
|
||||
bool OutOfDate { get; set; }
|
||||
bool InWarningPeriod { get; set; }
|
||||
void CopyValues(ISensorBase copy, bool copyCalibration = true);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
using DTS.Common.Classes.Sensors;
|
||||
using System;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace DTS.Common.Interface.Sensors
|
||||
{
|
||||
public interface ISensorCalDbRecord
|
||||
{
|
||||
[Key]
|
||||
int? CalibrationId { get; set; }
|
||||
string SerialNumber { get; set; }
|
||||
[Column(TypeName = "datetime")]
|
||||
DateTime CalibrationDate { get; set; }
|
||||
[Required]
|
||||
[StringLength(50)]
|
||||
string Username { get; set; }
|
||||
bool LocalOnly { get; set; }
|
||||
bool NonLinear { get; set; }
|
||||
[Required]
|
||||
[StringLength(255)]
|
||||
ICalibrationRecords Records { get; set; }
|
||||
[Column(TypeName = "datetime")]
|
||||
DateTime ModifyDate { get; set; }
|
||||
bool IsProportional { get; set; }
|
||||
bool RemoveOffset { get; set; }
|
||||
[Required]
|
||||
[StringLength(255)]
|
||||
ZeroMethods ZeroMethods { get; set; }
|
||||
[Required]
|
||||
[StringLength(2048)]
|
||||
string [] CertificationDocuments { get; set; }
|
||||
InitialOffsets InitialOffsets { get; set; }
|
||||
bool LinearAdded { get; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
using DTS.Common.Classes.Sensors;
|
||||
using DTS.Common.Enums;
|
||||
using DTS.Common.Enums.Sensors;
|
||||
using System;
|
||||
|
||||
namespace DTS.Common.Interface.Sensors
|
||||
{
|
||||
public interface ISensorCalibration : ISensorCalDbRecord
|
||||
{
|
||||
string EngineeringUnits { get; }
|
||||
long CalVersion { get; set; }
|
||||
string UUID { get; set; }
|
||||
double GetPolynomialEU(double inputmV, double excitation);
|
||||
string DocumentID { get; set; }
|
||||
NonLinearStyles IRTraccCalculationType { get; set; }
|
||||
string ToSerializedString();
|
||||
void FromSerializedString(string s);
|
||||
string ToDisplayString(ExcitationVoltageOptions.ExcitationVoltageOption excitation, string linearFormat,
|
||||
string nonlinearFormat, bool iepe);
|
||||
string ToLinearDisplayString(ExcitationVoltageOptions.ExcitationVoltageOption excitation, string linearFormat, bool iepe);
|
||||
string ToNonLinearDisplayString(string nonlinearFormat, bool iepe);
|
||||
|
||||
void ReadXML(System.Xml.XmlElement root);
|
||||
void WriteXML(ref System.Xml.XmlWriter writer);
|
||||
/// <summary>
|
||||
/// returns true if the calibration is compatible with IEPE
|
||||
/// IEPE sensors require linear calibrations and non proportional
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
bool IsCompatibleWithIEPE();
|
||||
|
||||
void CopyValues(ISensorCalibration copy);
|
||||
}
|
||||
}
|
||||
39
Common/DTS.CommonCore/Interface/Sensors/ISensorChange.cs
Normal file
39
Common/DTS.CommonCore/Interface/Sensors/ISensorChange.cs
Normal file
@@ -0,0 +1,39 @@
|
||||
using DTS.Common.Enums.Sensors;
|
||||
using System;
|
||||
|
||||
namespace DTS.Common.Interface.Sensors
|
||||
{
|
||||
/// <summary>
|
||||
/// the essential part of any sensor chagne (who did it, when, which sensor)
|
||||
/// </summary>
|
||||
public interface ISensorChangeRecord
|
||||
{
|
||||
int RecordId { get; }
|
||||
int SensorId { get; }
|
||||
DateTime TimeStamp { get; }
|
||||
string UserName { get; }
|
||||
}
|
||||
/// <summary>
|
||||
/// what the actual change was (type of change, values)
|
||||
/// there can be up to 4 values that change here for ease and to prevent the need for parsing
|
||||
/// </summary>
|
||||
public interface ISensorChange : ISensorChangeRecord
|
||||
{
|
||||
SensorChangeTypes ChangeType { get; }
|
||||
string Value1 { get; }
|
||||
string Value2 { get; }
|
||||
string Value3 { get; }
|
||||
string Value4 { get; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// the only type of change we really have right now
|
||||
/// </summary>
|
||||
public interface IOffsetToleranceChange : ISensorChange
|
||||
{
|
||||
double LowMvValue { get; }
|
||||
double HighMvValue { get; }
|
||||
double LowEUValue { get; }
|
||||
double HighEUValue { get; }
|
||||
}
|
||||
}
|
||||
264
Common/DTS.CommonCore/Interface/Sensors/ISensorData.cs
Normal file
264
Common/DTS.CommonCore/Interface/Sensors/ISensorData.cs
Normal file
@@ -0,0 +1,264 @@
|
||||
using DTS.Common.Classes.Sensors;
|
||||
using DTS.Common.Enums;
|
||||
using DTS.Common.Enums.Sensors;
|
||||
using DTS.Common.Interface.Sensors.SoftwareFilters;
|
||||
using System;
|
||||
using System.IO.Ports;
|
||||
|
||||
namespace DTS.Common.Interface.Sensors
|
||||
{
|
||||
public interface ISensorData
|
||||
{
|
||||
string DIUnits { get; set; }
|
||||
/// <summary>
|
||||
/// gets the calibration due date for the sensor given a sensor calibration
|
||||
/// 13065 Sensor "First Use" Date
|
||||
/// </summary>
|
||||
DateTime GetDueDate(ISensorCalibration sc);
|
||||
/// <summary>
|
||||
/// initial offset information is stored in a sensor calibration at least in terms of possible settings for the sensor
|
||||
/// HOWEVER, the offset to use is stored here for convenience, this is the result of group or test parameters
|
||||
///
|
||||
/// </summary>
|
||||
InitialOffset InitialOffset { get; set; }
|
||||
SensorConstants.BridgeType Bridge { get; set; }
|
||||
ISensorCalibration GetLatestCalibration();
|
||||
ISensorCalibration NewEmbeddedSC(string units);
|
||||
|
||||
int DatabaseId { get; set; }
|
||||
/// <summary>
|
||||
/// 11260 Implement DiagnosticsMode in DataPRO
|
||||
/// DiagnosticsMode means the bridge in analog is short circuited to the outside world and only internal resistors are used
|
||||
/// </summary>
|
||||
bool DiagnosticsMode { get; set; }
|
||||
|
||||
bool IsTestSpecificDigitalOutput { get; set; }
|
||||
bool IsTestSpecificSquib{ get; set; }
|
||||
/// <summary>
|
||||
/// returns true if the sensor is a test specific digital input
|
||||
/// a digital input only created inside a test
|
||||
/// </summary>
|
||||
bool IsTestSpecificDigitalIn { get; set; }
|
||||
bool IsTestSpecificEmbedded { get; set; }
|
||||
bool IsTestSpecificEmbeddedClock { get; set; }
|
||||
bool IsTestSpecificStreamInput { get; set; }
|
||||
bool IsTestSpecificStreamOutput { get; set; }
|
||||
bool IsTestSpecificUart { get; set; }
|
||||
/// <summary>
|
||||
/// At one time all the different DelayMS were using one underlying property for storage, _delayMS.
|
||||
/// Now, the individual SquibFireDelayMS, etc. are defined because we don't want controls that are sharing to limit each other.
|
||||
/// </summary>
|
||||
double DelayMS { get; set; }
|
||||
|
||||
double DigitalOutputDelayMS { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// At one time all the different DurationMS were using one underlying property for storage, _durationMS.
|
||||
/// Now, the individual SquibFireDurationMS, etc. are defined because we don't want controls that are sharing to limit each other.
|
||||
/// </summary>
|
||||
double DurationMS { get; set; }
|
||||
double DigitalOutputDurationMS { get; set; }
|
||||
DigitalOutputModes DigitalOutputMode { get; set; }
|
||||
bool DigitalOutputLimitDuration { get; set; }
|
||||
double SquibFireDelayMS { get; set; }
|
||||
double SquibFireDurationMS{ get; set; }
|
||||
/// <summary>
|
||||
/// right now all the Limit Duration mechanisms using the same underlying property for storage (_limitDuration), however
|
||||
/// the public access methods (LimitSquibDuration, etc) exist in case we separate them out in the future
|
||||
/// </summary>
|
||||
bool LimitDuration { get; set; }
|
||||
bool LimitSquibFireDuration { get; set; }
|
||||
double SquibToleranceLow { get; set; }
|
||||
double SquibToleranceHigh { get; set; }
|
||||
SquibMeasurementType SquibMeasurementType { get; set; }
|
||||
double SquibOutputCurrent { get; set; }
|
||||
string DisplayUnit { get; }
|
||||
bool BypassCurrentFilter { get; }
|
||||
bool BypassVoltageFilter { get; }
|
||||
SquibFireMode SquibFireMode { get; set; }
|
||||
/// <summary>
|
||||
/// the setting name allows us to refer to different settings and allow it to be more easily included in test setups and channel setups
|
||||
/// </summary>
|
||||
string SettingName { get; set; }
|
||||
|
||||
DigitalInputModes InputMode { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Returns comment string. Returns serial number with axis if comment is not present.
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
string ToDisplayString();
|
||||
void ReadXML(System.Xml.XmlElement root);
|
||||
void WriteXML(ref System.Xml.XmlWriter writer, bool exportFirstUseDate=true);
|
||||
string UUID { get; set; }
|
||||
string SerialNumber { get; set; }
|
||||
string GetSerialNumberWithAxis(string format);
|
||||
string UserSerialNumber { get; set; }
|
||||
SensorStatus Status { get; set; }
|
||||
string EID { get; set; }
|
||||
string Comment { get; set; }
|
||||
bool PerformShuntEmulation{ get; }
|
||||
bool CalSignal { get; set; }
|
||||
double InternalShuntResistance { get; set; }
|
||||
double ExternalShuntResistance { get; set; }
|
||||
string UserValue1 { get; set; }
|
||||
string UserValue2 { get; set; }
|
||||
string UserValue3{ get; set; }
|
||||
string GetSerializedSupportedExcitation();
|
||||
void SetSupportedExcitationFromString(string s);
|
||||
DateTime Created { get; set; }
|
||||
int TimesUsed { get; set; }
|
||||
int SensorCategory { get; set; }
|
||||
bool ByPassFilter { get; set; }
|
||||
bool CheckCalibrationSignal{ get; set; }
|
||||
string TestObject { get; set; }
|
||||
string OriginalPosition { get; set; }
|
||||
string Position { get; set; }
|
||||
string MainLocation { get; set; }
|
||||
string FineLocation1 { get; set; }
|
||||
string FineLocation2 { get; set; }
|
||||
string FineLocation3 { get; set; }
|
||||
string FilterClassIso { get; set; }
|
||||
bool IncompatibleSensorAssignment(string sensorDimension, string channelDimension);
|
||||
bool IsDigitalInput();
|
||||
bool IsDigitalOutput();
|
||||
bool IsSquib();
|
||||
bool IsUart();
|
||||
/// <summary>
|
||||
/// uart baud rate
|
||||
/// </summary>
|
||||
uint UartBaudRate { get; set; }
|
||||
/// <summary>
|
||||
/// uart data bits
|
||||
/// </summary>
|
||||
uint UartDataBits { get; set; }
|
||||
/// <summary>
|
||||
/// uart stop bits
|
||||
/// </summary>
|
||||
StopBits UartStopBits { get; set; }
|
||||
/// <summary>
|
||||
/// uart parity
|
||||
/// </summary>
|
||||
Parity UartParity { get; set; }
|
||||
/// <summary>
|
||||
/// uart flow control FB 30486 Hardcode FlowControl to NONE for UART sensor type.
|
||||
/// </summary>
|
||||
Handshake UartFlowControl { get;}
|
||||
/// <summary>
|
||||
/// the data format of incoming data
|
||||
/// </summary>
|
||||
UartDataFormat UartDataFormat { get; set; }
|
||||
bool IsStreamInput();
|
||||
///<summary>
|
||||
/// udp address setting value
|
||||
///</summary>
|
||||
string StreamInUDPAddress { get; set; }
|
||||
bool IsStreamOutput();
|
||||
///<summary>
|
||||
/// udp profile setting value
|
||||
///</summary>
|
||||
UDPStreamProfile StreamOutUDPProfile { get; set; }
|
||||
///<summary>
|
||||
/// udp address setting value
|
||||
///</summary>
|
||||
string StreamOutUDPAddress { get; set; }
|
||||
///<summary>
|
||||
/// time channel id setting value
|
||||
///</summary>
|
||||
ushort StreamOutUDPTimeChannelId { get; set; }
|
||||
///<summary>
|
||||
/// data channel id setting value
|
||||
///</summary>
|
||||
ushort StreamOutUDPDataChannelId { get; set; }
|
||||
///<summary>
|
||||
/// tmns config setting value
|
||||
///</summary>
|
||||
string StreamOutUDPTmNSConfig { get; set; }
|
||||
///<summary>
|
||||
/// irig data packet interval setting value
|
||||
///</summary>
|
||||
ushort StreamOutIRIGTimeDataPacketIntervalMs { get; set; }
|
||||
/// <summary>
|
||||
/// interval in ms between sending out TMATs information
|
||||
/// http://manuscript.dts.local/f/cases/29987/Add-CG-DP-TMATS-interval-UI-support
|
||||
/// </summary>
|
||||
ushort StreamOutTMATSIntervalMs { get; set; }
|
||||
bool CheckOffset { get; set; }
|
||||
bool MeasureNoise{ get; set; }
|
||||
|
||||
bool MeasureExcitation { get; set; }
|
||||
|
||||
bool Invert { get; set; }
|
||||
|
||||
string Model{ get; set; }
|
||||
|
||||
string Manufacturer{ get; set; }
|
||||
|
||||
string UserPartNumber { get; set; }
|
||||
|
||||
double Capacity{ get; set; }
|
||||
//FB 13120 Added FilterClass property
|
||||
IFilterClass FilterClass { get; set; }
|
||||
|
||||
double FullScaleCapacity{ get; }
|
||||
double OffsetToleranceLow{ get; set; }
|
||||
double OffsetToleranceHigh{ get; set; }
|
||||
|
||||
void SetDisplayUnitNoNotify(string unit);
|
||||
|
||||
double RangeLow{ get; set; }
|
||||
double RangeMedium{ get; set; }
|
||||
double RangeHigh { get; set; }
|
||||
|
||||
ExcitationVoltageOptions.ExcitationVoltageOption[] SupportedExcitation{ get; set; }
|
||||
|
||||
void SetExcitationsNoNotify(ExcitationVoltageOptions.ExcitationVoltageOption[] excitations);
|
||||
|
||||
ISensorCalibration Calibration{ get; set; }
|
||||
|
||||
double BridgeResistance { get; set; }
|
||||
bool UniPolar{ get; set; }
|
||||
|
||||
bool IgnoreRange{ get; set; }
|
||||
|
||||
string LastUpdatedBy { get; set; }
|
||||
|
||||
int Version{ get; set; }
|
||||
|
||||
void SetLocalOnly(bool bLocalOnly);
|
||||
|
||||
short AxisNumber{ get; set; }
|
||||
|
||||
short NumberOfAxes{ get; set; }
|
||||
int CalInterval { get; set; }
|
||||
string Polarity { get; set; }
|
||||
|
||||
DateTime LastModified { get; set; }
|
||||
|
||||
string ISOCode{ get; set; }
|
||||
string ISOChannelName { get; set; }
|
||||
string UserCode { get; set; }
|
||||
string UserChannelName { get; set; }
|
||||
string PhysicalDimension{ get; set; }
|
||||
|
||||
string Direction{ get; set; }
|
||||
bool DoNotUse{ get; set; }
|
||||
|
||||
bool Broken{ get; set; }
|
||||
double InputActiveValue { get; set; }
|
||||
double InputDefaultValue { get; set; }
|
||||
FilterClassType FilterType { get; }
|
||||
int SensorCalWarningPeriodDays { get; set; }
|
||||
/// <summary>
|
||||
/// Date of first use, null indicates value not set
|
||||
/// value is only valid when using the latest calibration (as indicated by LatestCalibrationId)
|
||||
/// 13065 Sensor "First Use" Date
|
||||
/// </summary>
|
||||
DateTime? FirstUseDate { get; set; }
|
||||
/// <summary>
|
||||
/// Latest calibration for sensor, null indicates value not set
|
||||
/// 13065 Sensor "First Use" Date
|
||||
/// </summary>
|
||||
int ? LatestCalibrationId { get; set; }
|
||||
}
|
||||
}
|
||||
17
Common/DTS.CommonCore/Interface/Sensors/ISensorDbRecord.cs
Normal file
17
Common/DTS.CommonCore/Interface/Sensors/ISensorDbRecord.cs
Normal file
@@ -0,0 +1,17 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
|
||||
namespace DTS.Common.Interface.Sensors
|
||||
{
|
||||
public interface ISensorDbRecord
|
||||
{
|
||||
[Key]
|
||||
int id { get; set; }
|
||||
|
||||
short SensorType { get; set; }
|
||||
|
||||
[Required]
|
||||
[StringLength(50)]
|
||||
string SerialNumber { get; set; }
|
||||
}
|
||||
}
|
||||
20
Common/DTS.CommonCore/Interface/Sensors/ISoftwareFilter.cs
Normal file
20
Common/DTS.CommonCore/Interface/Sensors/ISoftwareFilter.cs
Normal file
@@ -0,0 +1,20 @@
|
||||
|
||||
using System;
|
||||
|
||||
namespace DTS.Common.Interface.Sensors
|
||||
{
|
||||
public interface ISoftwareFilter
|
||||
{
|
||||
int Id{ get; set; }
|
||||
char ISOCode { get; set; }
|
||||
string Description { get; set; }
|
||||
double Frequency { get; set; }
|
||||
DateTime LastModified { get; set; }
|
||||
string LastModifiedBy { get; set; }
|
||||
//FB 13120 determine if the software filter is default
|
||||
bool IsDefault { get; set; }
|
||||
bool IsBlank();
|
||||
void Delete();
|
||||
void Commit(bool updateDateTime = true, string user = "");
|
||||
}
|
||||
}
|
||||
57
Common/DTS.CommonCore/Interface/Sensors/ISquibDbRecord.cs
Normal file
57
Common/DTS.CommonCore/Interface/Sensors/ISquibDbRecord.cs
Normal file
@@ -0,0 +1,57 @@
|
||||
using DTS.Common.Enums;
|
||||
using System;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace DTS.Common.Interface.Sensors
|
||||
{
|
||||
public interface ISquibDbRecord
|
||||
{
|
||||
string SerialNumber { get; set; }
|
||||
[Key]
|
||||
int Id { get; set; }
|
||||
bool BypassCurrentFilter { get; set; }
|
||||
bool BypassVoltageFilter { get; set; }
|
||||
[Column("DelayMS")]
|
||||
double DelayMs { get; set; }
|
||||
[Column("DurationMS")]
|
||||
double DurationMs { get; set; }
|
||||
SquibFireMode FireMode { get; set; }
|
||||
[Required]
|
||||
[StringLength(50)]
|
||||
string IsoCode { get; set; }
|
||||
[Required]
|
||||
[StringLength(255)]
|
||||
string IsoChannelName { get; set; }
|
||||
[Required]
|
||||
[StringLength(50)]
|
||||
string UserCode { get; set; }
|
||||
[Required]
|
||||
[StringLength(255)]
|
||||
string UserChannelName { get; set; }
|
||||
SquibMeasurementType MeasurementType { get; set; }
|
||||
double SquibOutputCurrent { get; set; }
|
||||
double SquibToleranceLow { get; set; }
|
||||
double SquibToleranceHigh { get; set; }
|
||||
bool LimitDuration { get; set; }
|
||||
[Required]
|
||||
[StringLength(50)]
|
||||
string ArticleId { get; set; }
|
||||
int Version { get; set; }
|
||||
[Column(TypeName = "datetime")]
|
||||
DateTime LastModified { get; set; }
|
||||
[Required]
|
||||
[StringLength(50)]
|
||||
string LastModifiedBy { get; set; }
|
||||
[StringLength(255)]
|
||||
string UserValue1 { get; set; }
|
||||
[StringLength(255)]
|
||||
string UserValue2 { get; set; }
|
||||
[StringLength(255)]
|
||||
string UserValue3 { get; set; }
|
||||
byte[] UserTags { get; set; }
|
||||
bool DoNotUse { get; set; }
|
||||
bool Broken { get; set; }
|
||||
bool DefineDelayInTest { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,70 @@
|
||||
using DTS.Common.Enums;
|
||||
|
||||
namespace DTS.Common.Interface.Sensors
|
||||
{
|
||||
/// <summary>
|
||||
/// this interface describes the default properties and methods for a squib
|
||||
/// It's intended to allow interaction with squib defaults
|
||||
/// 13574 Design for Default squib config file settings
|
||||
/// </summary>
|
||||
public interface ISquibSettingDefaults
|
||||
{
|
||||
/// <summary>
|
||||
/// gets/sets the squib tolerance low default
|
||||
/// the low tolerance for squib resistance in ohms
|
||||
/// this is the minimum resistance value for a valid squib load
|
||||
/// </summary>
|
||||
double ToleranceLowDefault{ get; set; }
|
||||
/// <summary>
|
||||
/// gets/sets the squib tolerance high default
|
||||
/// the high tolerance for squib resistance in ohms
|
||||
/// this is the maximum resistance value for a valid squib load
|
||||
/// </summary>
|
||||
double ToleranceHighDefault{ get; set; }
|
||||
/// <summary>
|
||||
/// gets/sets the squib output current default
|
||||
/// the squib output current in amps
|
||||
/// this is the current outputted by a squib in constant current
|
||||
/// mode. It is only observed in constant current
|
||||
/// </summary>
|
||||
double OutputCurrentDefault{ get; set; }
|
||||
/// <summary>
|
||||
/// gets/sets the squib measurement type default
|
||||
/// the squib measurement type controls the alternate measurement type of
|
||||
/// of a squib
|
||||
/// </summary>
|
||||
SquibMeasurementType MeasurementTypeDefault { get; set; }
|
||||
/// <summary>
|
||||
/// gets/sets the squib firemode default
|
||||
/// the squib fire mode determines how the squib is fired
|
||||
/// [cap discharge/constant current/ac discharge]
|
||||
/// </summary>
|
||||
SquibFireMode FireModeDefault { get; set; }
|
||||
/// <summary>
|
||||
/// gets/sets whether to limit squib output duration default
|
||||
/// Limit duration allows for duration of output to be constrained
|
||||
/// </summary>
|
||||
bool LimitDurationDefault { get; set; }
|
||||
/// <summary>
|
||||
/// gets/sets the squib output duration in ms default
|
||||
/// the squib fire duration is the amount of time to output current
|
||||
/// It is only valid if the output is being limited
|
||||
/// </summary>
|
||||
double FireDurationMS { get; set; }
|
||||
/// <summary>
|
||||
/// gets/sets the delay before firing squib in ms default
|
||||
/// the squib fire delay is the amount of time after a trigger is received
|
||||
/// before output begins
|
||||
/// </summary>
|
||||
double FireDelayMS{ get; set; }
|
||||
/// <summary>
|
||||
/// indicates whether the setting is valid or not
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
bool Validate();
|
||||
/// <summary>
|
||||
/// indicates whether tolerance value is valid
|
||||
/// </summary>
|
||||
bool ToleranceValid { get; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
using DTS.Common.Enums;
|
||||
using System;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace DTS.Common.Interface.Sensors
|
||||
{
|
||||
public interface IStreamInputRecord
|
||||
{
|
||||
/// <summary>
|
||||
/// the database id of the sensor
|
||||
/// </summary>
|
||||
[Key]
|
||||
int Id { get; set; }
|
||||
/// <summary>
|
||||
/// Serial number of sensor
|
||||
/// [required to be unique]
|
||||
/// </summary>
|
||||
[Required]
|
||||
[StringLength(50)]
|
||||
string SerialNumber { get; set; }
|
||||
DateTime LastModified { get; set; }
|
||||
string LastUpdatedBy { get; set; }
|
||||
/// <summary>
|
||||
/// bytes representing a delimited string of tag ids
|
||||
/// </summary>
|
||||
byte[] TagsBlobBytes { get; set; }
|
||||
bool DoNotUse { get; set; }
|
||||
bool Broken { get; set; }
|
||||
string StreamInUDPAddress { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
using DTS.Common.Enums;
|
||||
|
||||
namespace DTS.Common.Interface.Sensors
|
||||
{
|
||||
public interface IStreamInputSettingDefaults
|
||||
{
|
||||
///<summary>
|
||||
/// udp address setting value for the channel
|
||||
///</summary>
|
||||
string UDPAddress { get; set; }
|
||||
/// <summary>
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
bool Validate();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
using DTS.Common.Enums;
|
||||
using DTS.Common.Enums.Sensors;
|
||||
using System;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace DTS.Common.Interface.Sensors
|
||||
{
|
||||
public interface IStreamOutputRecord
|
||||
{
|
||||
/// <summary>
|
||||
/// the database id of the sensor
|
||||
/// </summary>
|
||||
[Key]
|
||||
int Id { get; set; }
|
||||
/// <summary>
|
||||
/// Serial number of sensor
|
||||
/// [required to be unique]
|
||||
/// </summary>
|
||||
[Required]
|
||||
[StringLength(50)]
|
||||
string SerialNumber { get; set; }
|
||||
DateTime LastModified { get; set; }
|
||||
string LastUpdatedBy { get; set; }
|
||||
/// <summary>
|
||||
/// bytes representing a delimited string of tag ids
|
||||
/// </summary>
|
||||
byte[] TagsBlobBytes { get; set; }
|
||||
bool DoNotUse { get; set; }
|
||||
bool Broken { get; set; }
|
||||
UDPStreamProfile StreamOutUDPProfile { get; set; }
|
||||
string StreamOutUDPAddress { get; set; }
|
||||
ushort StreamOutUDPTimeChannelId { get; set; }
|
||||
ushort StreamOutUDPDataChannelId { get; set; }
|
||||
string StreamOutUDPTmNSConfig { get; set; }
|
||||
ushort StreamOutIRIGTimeDataPacketIntervalMs { get; set; }
|
||||
/// <summary>
|
||||
/// amount of time between transmitting tmat
|
||||
/// http://manuscript.dts.local/f/cases/29987/Add-CG-DP-TMATS-interval-UI-support
|
||||
/// </summary>
|
||||
ushort StreamOutTMATSIntervalMs { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
using DTS.Common.Enums;
|
||||
|
||||
namespace DTS.Common.Interface.Sensors
|
||||
{
|
||||
public interface IStreamOutputSettingDefaults
|
||||
{
|
||||
///<summary>
|
||||
/// udp profile setting value for the channel
|
||||
///</summary>
|
||||
UDPStreamProfile Profile { get; set; }
|
||||
///<summary>
|
||||
/// udp address setting value for the channel
|
||||
///</summary>
|
||||
string UDPAddress { get; set; }
|
||||
///<summary>
|
||||
/// time channel id setting value for the channel
|
||||
///</summary>
|
||||
ushort TimeChannelId { get; set; }
|
||||
///<summary>
|
||||
/// data channel id setting value for the channel
|
||||
///</summary>
|
||||
ushort DataChannelId { get; set; }
|
||||
///<summary>
|
||||
/// tmns config setting value for the channel
|
||||
///</summary>
|
||||
string TmNSConfig { get; set; }
|
||||
///<summary>
|
||||
/// irig data packet interval setting value for the channel
|
||||
///</summary>
|
||||
ushort IRIGTimeDataPacketIntervalMs { get; set; }
|
||||
/// <summary>
|
||||
/// 31840 basic / advanced streaming profiles
|
||||
/// </summary>
|
||||
bool UseAdvancedUDPStreamProfiles { get; set; }
|
||||
/// <summary>
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
bool Validate();
|
||||
}
|
||||
}
|
||||
40
Common/DTS.CommonCore/Interface/Sensors/IUARTRecord.cs
Normal file
40
Common/DTS.CommonCore/Interface/Sensors/IUARTRecord.cs
Normal file
@@ -0,0 +1,40 @@
|
||||
using DTS.Common.Enums;
|
||||
using System;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.IO.Ports;
|
||||
|
||||
namespace DTS.Common.Interface.Sensors
|
||||
{
|
||||
public interface IUARTRecord
|
||||
{
|
||||
/// <summary>
|
||||
/// the database id of the sensor
|
||||
/// </summary>
|
||||
[Key]
|
||||
int Id { get; set; }
|
||||
/// <summary>
|
||||
/// Serial number of sensor
|
||||
/// [required to be unique]
|
||||
/// </summary>
|
||||
[Required]
|
||||
[StringLength(50)]
|
||||
string SerialNumber { get; set; }
|
||||
uint UartBaudRate { get; set; }
|
||||
uint UartDataBits { get; set; }
|
||||
[StringLength(50)]
|
||||
StopBits UartStopBits { get; set; }
|
||||
//FB 30486 removed set
|
||||
Handshake UartFlowControl { get;}
|
||||
[StringLength(50)]
|
||||
UartDataFormat UartDataFormat { get; set; }
|
||||
Parity UartParity { get; set; }
|
||||
DateTime LastModified { get; set; }
|
||||
string LastUpdatedBy { get; set; }
|
||||
/// <summary>
|
||||
/// bytes representing a delimited string of tag ids
|
||||
/// </summary>
|
||||
byte[] TagsBlobBytes { get; set; }
|
||||
bool DoNotUse { get; set; }
|
||||
bool Broken { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,43 @@
|
||||
using DTS.Common.Enums;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO.Ports;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace DTS.Common.Interface.Sensors
|
||||
{
|
||||
public interface IUartSettingDefaults
|
||||
{
|
||||
/// <summary>
|
||||
/// uart baud rate
|
||||
/// </summary>
|
||||
uint BaudRate { get; set; }
|
||||
/// <summary>
|
||||
/// uart data bits
|
||||
/// </summary>
|
||||
uint DataBits { get; set; }
|
||||
/// <summary>
|
||||
/// uart stop bits
|
||||
/// </summary>
|
||||
StopBits StopBits { get; set; }
|
||||
/// <summary>
|
||||
/// uart parity
|
||||
/// </summary>
|
||||
Parity Parity { get; set; }
|
||||
/// <summary>
|
||||
/// uart flow control FB 30486 remove set
|
||||
/// </summary>
|
||||
Handshake FlowControl { get; }
|
||||
/// <summary>
|
||||
/// the data format of incoming data
|
||||
/// </summary>
|
||||
UartDataFormat DataFormat { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
bool Validate();
|
||||
}
|
||||
}
|
||||
6
Common/DTS.CommonCore/Interface/Sensors/IZeroMethods.cs
Normal file
6
Common/DTS.CommonCore/Interface/Sensors/IZeroMethods.cs
Normal file
@@ -0,0 +1,6 @@
|
||||
namespace DTS.Common.Interface.Sensors
|
||||
{
|
||||
public interface IZeroMethods
|
||||
{
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
using DTS.Common.Enums.Sensors;
|
||||
|
||||
namespace DTS.Common.Interface.Sensors.SensorSettingsModule
|
||||
{
|
||||
/// <summary>
|
||||
/// describes settings sensor calibrations
|
||||
/// </summary>
|
||||
public interface ICalibrationPolicy
|
||||
{
|
||||
/// <summary>
|
||||
/// the current selected calibration policy
|
||||
/// </summary>
|
||||
SensorConstants.SensorCalPolicy SelectedCalPolicy { get; set; }
|
||||
/// <summary>
|
||||
/// all available calibration policies
|
||||
/// </summary>
|
||||
SensorConstants.SensorCalPolicy [] AvailableSensorCalPolicies { get; }
|
||||
/// <summary>
|
||||
/// period in days before calibration is due to warn
|
||||
/// </summary>
|
||||
int WarningPeriod { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The current value for whether sensor cal interval starts after calibration or first use
|
||||
/// </summary>
|
||||
bool UseSensorFirstUseDate { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// FB15758 Import/Export settings
|
||||
/// </summary>
|
||||
void ReadXML(System.Xml.XmlElement root);
|
||||
void WriteXML(ref System.Xml.XmlWriter writer);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
using DTS.Common.Base;
|
||||
|
||||
namespace DTS.Common.Interface.Sensors.SensorSettingsModule
|
||||
{
|
||||
public interface ISensorSettingsView : IBaseView { }
|
||||
}
|
||||
@@ -0,0 +1,51 @@
|
||||
using DTS.Common.Base;
|
||||
|
||||
namespace DTS.Common.Interface.Sensors.SensorSettingsModule
|
||||
{
|
||||
public interface ISensorSettingsViewModel : IBaseViewModel
|
||||
{
|
||||
/// <summary>
|
||||
/// used when saving/reading defaults from db
|
||||
/// </summary>
|
||||
string User{ get; set; }
|
||||
/// <summary>
|
||||
/// used when saving/reading defaults from db
|
||||
/// </summary>
|
||||
int UserID { get; set; }
|
||||
/// <summary>
|
||||
/// restores settings to their original values
|
||||
/// </summary>
|
||||
void RestoreOriginalSettings();
|
||||
/// <summary>
|
||||
/// the view for the vm
|
||||
/// </summary>
|
||||
ISensorSettingsView View { get; set; }
|
||||
/// <summary>
|
||||
/// the defaults for squib
|
||||
/// </summary>
|
||||
ISquibSettingDefaults SquibSettings{ get; set; }
|
||||
/// <summary>
|
||||
/// the defaults for digital outputs
|
||||
/// </summary>
|
||||
IDigitalOutDefaults DigitalOutSettings { get; set; }
|
||||
IDigitalInputDefaults DigitalInputDefaults { get; set; }
|
||||
IIEPESensorDefaults IEPESensorDefaults { get; set; }
|
||||
ICalibrationPolicy SensorCalibrationDefaults { get; set; }
|
||||
//Fb 13120 default filter class setting
|
||||
IAnalogDefaults AnalogDefaults { get; set; }
|
||||
/// <summary>
|
||||
/// un initializes display and frees memory
|
||||
/// </summary>
|
||||
void Unset();
|
||||
/// <summary>
|
||||
/// initializes display
|
||||
/// </summary>
|
||||
void OnSetActive();
|
||||
/// <summary>
|
||||
/// returns whether settings are valid, saves if they are
|
||||
/// does not save if they are invalid
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
bool ValidateAndSave();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,198 @@
|
||||
using DTS.Common.Enums.Sensors;
|
||||
using System;
|
||||
using DTS.Common.Enums;
|
||||
using DTS.Common.Classes.Sensors;
|
||||
using DTS.Common.Interface.Sensors.SoftwareFilters;
|
||||
|
||||
namespace DTS.Common.Interface.Sensors.SensorsList
|
||||
{
|
||||
/// <summary>
|
||||
/// this interface is used to describe objects used to represents sensors for UI purposes
|
||||
/// </summary>
|
||||
public interface IAnalogSensor
|
||||
{
|
||||
/// <summary>
|
||||
/// bridge mode of the sensor in question
|
||||
/// </summary>
|
||||
SensorConstants.BridgeType Bridge { get; set; }
|
||||
/// <summary>
|
||||
/// indicates if the sensor is Integrated Electronics Piezo-Electric (IEPE)
|
||||
/// </summary>
|
||||
bool IEPE { get; }
|
||||
/// <summary>
|
||||
/// id in the database if available
|
||||
/// only positive values are valid
|
||||
/// </summary>
|
||||
int DatabaseId { get; set; }
|
||||
/// <summary>
|
||||
/// used to indicate that the sensor should be checked if in a list
|
||||
/// with a checkbox
|
||||
/// </summary>
|
||||
bool Included { get; set; }
|
||||
/// <summary>
|
||||
/// serial number of the sensor
|
||||
/// </summary>
|
||||
string SerialNumber { get; set; }
|
||||
/// <summary>
|
||||
/// description or comment of the sensor
|
||||
/// </summary>
|
||||
string Description { get; set; }
|
||||
/// <summary>
|
||||
/// the maker of the sensor
|
||||
/// </summary>
|
||||
string Manufacturer { get; set; }
|
||||
/// <summary>
|
||||
/// the model of the sensor
|
||||
/// </summary>
|
||||
string Model { get; set; }
|
||||
/// <summary>
|
||||
/// the current capacity or desired range of the sensor in EU
|
||||
/// in general this value refers to maximum capacity, however
|
||||
/// in some contexts this can refer to desired range instead
|
||||
/// </summary>
|
||||
double Capacity { get; set; }
|
||||
/// <summary>
|
||||
/// an arbitrary EU value for range for the sensor
|
||||
/// </summary>
|
||||
double RangeHigh { get; set; }
|
||||
/// <summary>
|
||||
/// an arbitrary EU value for medium range for the sensor
|
||||
/// </summary>
|
||||
double RangeMedium { get; set; }
|
||||
/// <summary>
|
||||
/// an arbitrary EU value for the low range for the sensor
|
||||
/// </summary>
|
||||
double RangeLow { get; set; }
|
||||
/// <summary>
|
||||
/// a user display friendly string representation of the sensor's sensitivity
|
||||
/// this is suitable for tables and user display
|
||||
/// </summary>
|
||||
string Sensitivity { get; set; }
|
||||
/// <summary>
|
||||
/// in the case of dual sensitivity sensors, this is a string
|
||||
/// user friendly representation of the second calibration
|
||||
/// </summary>
|
||||
string AddedSensitivity { get; set; }
|
||||
/// <summary>
|
||||
/// resistance in ohms of the sensor
|
||||
/// </summary>
|
||||
double Resistance { get; set; }
|
||||
/// <summary>
|
||||
/// a user friendly representation of the supported excitations
|
||||
/// of the sensor
|
||||
/// </summary>
|
||||
string Excitation { get; set; }
|
||||
/// <summary>
|
||||
/// the engineering units of the sensor
|
||||
/// usually obtained from the most recent calibration
|
||||
/// </summary>
|
||||
string Units { get; set; }
|
||||
/// <summary>
|
||||
/// Electronic ID associated with the sensor, if any
|
||||
/// </summary>
|
||||
string EID { get; set; }
|
||||
/// <summary>
|
||||
/// the last (most recent) calibration date for the sensor
|
||||
/// </summary>
|
||||
DateTime CalDate { get; set; }
|
||||
/// <summary>
|
||||
/// the date the sensor is due for calibration
|
||||
/// </summary>
|
||||
DateTime CalDueDate { get; set; }
|
||||
/// <summary>
|
||||
/// the user that last modified the sensor or calibration
|
||||
/// </summary>
|
||||
string ModifiedBy { get; set; }
|
||||
/// <summary>
|
||||
/// the date the sensor or calibration was last modified
|
||||
/// </summary>
|
||||
DateTime LastModified { get; set; }
|
||||
/// <summary>
|
||||
/// returns true if the sensor matches the filter criteria
|
||||
/// </summary>
|
||||
/// <param name="term"></param>
|
||||
/// <returns></returns>
|
||||
bool Filter(string term);
|
||||
/// <summary>
|
||||
/// used to indicate if the sensor has been assigned to a channel
|
||||
/// </summary>
|
||||
bool Assigned { get; set; }
|
||||
/// <summary>
|
||||
/// used to indicate if the sensor is online or not
|
||||
/// </summary>
|
||||
bool Online { get; set; }
|
||||
/// <summary>
|
||||
/// the isocode associated with the sensor
|
||||
/// this is the default isocode for the sensor when assigned to a new blank channel
|
||||
/// </summary>
|
||||
string ISOCode { get; set; }
|
||||
/// <summary>
|
||||
/// the isochannel name associated with the sensor
|
||||
/// this is the default user channel name for the sensor when assigned to a new blank channel
|
||||
/// </summary>
|
||||
string ISOChannelName { get; set; }
|
||||
/// <summary>
|
||||
/// the user code associated with the sensor
|
||||
/// this is the default user code for the sensor when assigned to a new blank channel
|
||||
/// </summary>
|
||||
string UserCode { get; set; }
|
||||
/// <summary>
|
||||
/// the user channel name associated with the sensor
|
||||
/// this is the default user channel name for the sensor when assigned to a new blank channel
|
||||
/// </summary>
|
||||
string UserChannelName{ get; set; }
|
||||
/// <summary>
|
||||
/// the channel filter class (CFC) associated with the sensor
|
||||
/// this is the default CFC for the sensor when assigned to a new blank channel
|
||||
/// </summary>
|
||||
Enums.Sensors.FilterClassType CFC { get; set; }
|
||||
/// <summary>
|
||||
/// indicates whether the sensor output should be inverted or not
|
||||
/// this is the default polarity for the sensor when assigned to a new blank channel
|
||||
/// </summary>
|
||||
bool Polarity { get; set; }
|
||||
/// <summary>
|
||||
/// indicates what the type of nonlinear calculation is used for this sensor as a string
|
||||
/// </summary>
|
||||
string NonLinearCalculationType { get; set; }
|
||||
/// <summary>
|
||||
/// indicates what the type of nonlinear calculation is used for this sensor, as an enum
|
||||
/// </summary>
|
||||
NonLinearStyles NonLinearCalculationTypeEnum { get; set; }
|
||||
/// <summary>
|
||||
/// indicates what the type of software zero method is used for this sensor
|
||||
/// </summary>
|
||||
Enums.Sensors.ZeroMethodType ZeroMethod { get; set; }
|
||||
/// <summary>
|
||||
/// If ZeroMethod is Average over Time, indicates the start time
|
||||
/// </summary>
|
||||
double ZeroMethodStart { get; set; }
|
||||
/// <summary>
|
||||
/// If ZeroMethod is Average over Time, indicates the end time
|
||||
/// </summary>
|
||||
double ZeroMethodEnd { get; set; }
|
||||
string UserValue1 { get; set; }
|
||||
string UserValue2 { get; set; }
|
||||
string UserValue3 { get; set; }
|
||||
UIItemStatus SensorCalibrationStatus { get; }
|
||||
InitialOffset [] InitialOffsets { get; set; }
|
||||
//FB 13120 define filter class
|
||||
IFilterClass FilterClass { get; set; }
|
||||
/// <summary>
|
||||
/// Date of first use (null value indicates not set)
|
||||
/// only valid when using latest calibration (as indicated by UsingLatestCalibration and LatestCalibrationId)
|
||||
/// 13065 Sensor "First Use" Date
|
||||
/// </summary>
|
||||
DateTime? FirstUseDate { get; set; }
|
||||
/// <summary>
|
||||
/// latest calibration id for sensor, null indicates not set
|
||||
/// 13065 Sensor "First Use" Date
|
||||
/// </summary>
|
||||
int? LatestCalibrationId { get; set; }
|
||||
/// <summary>
|
||||
/// whether the sensor is using the latest calibration (as indicated by calibration id)
|
||||
/// 13065 Sensor "First Use" Date
|
||||
/// </summary>
|
||||
bool UsingLatestCalibration { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,96 @@
|
||||
using DTS.Common.Enums;
|
||||
using System;
|
||||
|
||||
namespace DTS.Common.Interface.Sensors.SensorsList
|
||||
{
|
||||
/// <summary>
|
||||
/// interface describes objects used in the UI to display digital inputs
|
||||
/// </summary>
|
||||
public interface IDigitalInputSetting
|
||||
{
|
||||
/// <summary>
|
||||
/// ID in the database for the digital input setting
|
||||
/// only positive numbers are valid database ids
|
||||
/// </summary>
|
||||
int DatabaseId { get; set; }
|
||||
/// <summary>
|
||||
/// whether the digital input is checked in a list with a checkbox
|
||||
/// </summary>
|
||||
bool Included { get; set; }
|
||||
/// <summary>
|
||||
/// the serial number / setting name
|
||||
/// </summary>
|
||||
string SerialNumber { get; set; }
|
||||
/// <summary>
|
||||
/// description or comment of setting
|
||||
/// </summary>
|
||||
string Description { get; set; }
|
||||
/// <summary>
|
||||
/// string representation of the Digital Input Mode of the setting
|
||||
/// </summary>
|
||||
string DIMode { get; set; }
|
||||
/// <summary>
|
||||
/// the user who last modified setting
|
||||
/// </summary>
|
||||
string ModifiedBy { get; set; }
|
||||
/// <summary>
|
||||
/// when the setting was last modified
|
||||
/// </summary>
|
||||
DateTime LastModified { get; set; }
|
||||
/// <summary>
|
||||
/// returns true if digital input matches filter criteria
|
||||
/// </summary>
|
||||
/// <param name="term"></param>
|
||||
/// <returns></returns>
|
||||
bool Filter(string term);
|
||||
/// <summary>
|
||||
/// whether the digital input is associated with a channel
|
||||
/// </summary>
|
||||
bool Assigned { get; set; }
|
||||
/// <summary>
|
||||
/// whether the digital input is online or not
|
||||
/// </summary>
|
||||
bool Online { get; set; }
|
||||
/// <summary>
|
||||
/// electronic id associated with the digital input
|
||||
/// </summary>
|
||||
string EID { get; set; }
|
||||
/// <summary>
|
||||
/// the isocode for the digital input
|
||||
/// </summary>
|
||||
string ISOCode { get; set; }
|
||||
/// <summary>
|
||||
/// the iso channel name for the digital input
|
||||
/// </summary>
|
||||
string ISOChannelName { get; set; }
|
||||
/// <summary>
|
||||
/// the user code for the digital input
|
||||
/// </summary>
|
||||
string UserCode { get; set; }
|
||||
/// <summary>
|
||||
/// the user channel name for the digital input
|
||||
/// </summary>
|
||||
string UserChannelName { get; set; }
|
||||
/// <summary>
|
||||
/// the active value of digital input as a string
|
||||
/// this is the what to display when the digital input is in active state
|
||||
/// </summary>
|
||||
string ActiveValue{ get; set; }
|
||||
/// <summary>
|
||||
/// the string representation of the state of the digital input in it's default state
|
||||
/// this is what to display when the digital input is in idle, inactive, or the default state
|
||||
/// </summary>
|
||||
string DefaultValue { get; set; }
|
||||
DigitalInputModes Mode { get; set; }
|
||||
/// <summary>
|
||||
/// marks the digital input setting as broken or not
|
||||
/// broken sensors do not appear in selectable lists of sensors in edit test setup or edit group
|
||||
/// </summary>
|
||||
bool Broken { get; set; }
|
||||
/// <summary>
|
||||
/// marks the digital input setting as donotuse
|
||||
/// donotuse sensors do not appear in selectable lists of sensors in edit test setup or edit group
|
||||
/// </summary>
|
||||
bool DoNotUse { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,93 @@
|
||||
using System;
|
||||
|
||||
namespace DTS.Common.Interface.Sensors.SensorsList
|
||||
{
|
||||
public interface IDigitalOutputSetting
|
||||
{
|
||||
/// <summary>
|
||||
/// database id for digital output setting
|
||||
/// only ids > 0 are valid
|
||||
/// </summary>
|
||||
int DatabaseId { get; set; }
|
||||
/// <summary>
|
||||
/// whether digital output should have a check in a list with a checkbox
|
||||
/// </summary>
|
||||
bool Included { get; set; }
|
||||
/// <summary>
|
||||
/// serialnumber/setting name for digital output setting
|
||||
/// </summary>
|
||||
string SerialNumber { get; set; }
|
||||
/// <summary>
|
||||
/// description/comment for setting
|
||||
/// </summary>
|
||||
string Description { get; set; }
|
||||
/// <summary>
|
||||
/// delay in ms before outputting
|
||||
/// </summary>
|
||||
double DODelay { get; set; }
|
||||
/// <summary>
|
||||
/// duration in ms of output (if limiting duration)
|
||||
/// </summary>
|
||||
double DODuration { get; set; }
|
||||
/// <summary>
|
||||
/// who last modified the digital output
|
||||
/// </summary>
|
||||
string ModifiedBy { get; set; }
|
||||
/// <summary>
|
||||
/// when the digital output was last modified
|
||||
/// </summary>
|
||||
DateTime LastModified { get; set; }
|
||||
/// <summary>
|
||||
/// returns true if the digital output matches filter criteria
|
||||
/// </summary>
|
||||
/// <param name="term"></param>
|
||||
/// <returns></returns>
|
||||
bool Filter(string term);
|
||||
/// <summary>
|
||||
/// whether digital output is associated with a channel
|
||||
/// </summary>
|
||||
bool Assigned { get; set; }
|
||||
/// <summary>
|
||||
/// whether digital output was found online or not (there's no real way of finding digital output online, it has no EID)
|
||||
/// </summary>
|
||||
bool Online { get; set; }
|
||||
/// <summary>
|
||||
/// isocode associated with digital output
|
||||
/// digital outputs aren't in collected data so there's not a real need for this ...
|
||||
/// </summary>
|
||||
string ISOCode { get; set; }
|
||||
/// <summary>
|
||||
/// iso channel name associated with digital output
|
||||
/// digital outputs aren't in collected data so there's no real need for this ...
|
||||
/// </summary>
|
||||
string ISOChannelName { get; set; }
|
||||
/// <summary>
|
||||
/// user code associated with digital output
|
||||
/// there's no collected data for outputs so there's no real need for this
|
||||
/// </summary>
|
||||
string UserCode { get; set; }
|
||||
/// <summary>
|
||||
/// user channel name associated with digital output
|
||||
/// there's no collected data for outputs so there's no real need for this
|
||||
/// </summary>
|
||||
string UserChannelName{ get; set; }
|
||||
/// <summary>
|
||||
/// whether output should be limited or not
|
||||
/// </summary>
|
||||
bool LimitDuration { get; set; }
|
||||
/// <summary>
|
||||
/// the output mode for the digital output setting
|
||||
/// </summary>
|
||||
Enums.DigitalOutputModes DOMode { get; set; }
|
||||
/// <summary>
|
||||
/// used to mark whether the digital output is broken
|
||||
/// broken sensors do not appear in selectable lists of sensors in edit group or edit test setup
|
||||
/// </summary>
|
||||
bool Broken{ get; set; }
|
||||
/// <summary>
|
||||
/// used to mark whether the digital output should not be used
|
||||
/// donotuse sensors do not appear in selectable lists of sensors in edit group or edit test setup
|
||||
/// </summary>
|
||||
bool DoNotUse{ get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
namespace DTS.Common.Interface.Sensors.SensorsList
|
||||
{
|
||||
/// <summary>
|
||||
/// interface describing drag and drop payload when dragging from a sensor list
|
||||
/// this is common interface between different sensor types
|
||||
/// </summary>
|
||||
public interface IDragAndDropItem
|
||||
{
|
||||
/// <summary>
|
||||
/// serial name /setting name for sensor
|
||||
/// </summary>
|
||||
string SerialNumber { get; set; }
|
||||
/// <summary>
|
||||
/// database id associated with sensor (if any)
|
||||
/// only ids >0 are valid
|
||||
/// </summary>
|
||||
int DatabaseId { get; set; }
|
||||
/// <summary>
|
||||
/// isocode associated with sensor
|
||||
/// </summary>
|
||||
string ISOCode { get; }
|
||||
/// <summary>
|
||||
/// iso channel name associated with sensor
|
||||
/// </summary>
|
||||
string ISOChannelName{ get; }
|
||||
/// <summary>
|
||||
/// user code associated with sensor
|
||||
/// </summary>
|
||||
string UserCode { get; }
|
||||
/// <summary>
|
||||
/// user channel name associated with sensor
|
||||
/// </summary>
|
||||
string UserChannelName { get; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
using DTS.Common.Base;
|
||||
|
||||
namespace DTS.Common.Interface.Sensors.SensorsList
|
||||
{
|
||||
public interface ISensorTemplatesExportView : IBaseView { }
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
using DTS.Common.Base;
|
||||
|
||||
namespace DTS.Common.Interface.Sensors.SensorsList
|
||||
{
|
||||
public interface ISensorTemplatesViewModel : IBaseViewModel
|
||||
{
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
using DTS.Common.Base;
|
||||
|
||||
namespace DTS.Common.Interface.Sensors.SensorsList
|
||||
{
|
||||
public interface ISensorsListEditGroupView : IBaseView
|
||||
{
|
||||
/// <summary>
|
||||
/// handles adding/removing columns done before view is displayed
|
||||
/// 13065 Sensor "First Use" Date
|
||||
/// </summary>
|
||||
void HandleColumns();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
using DTS.Common.Base;
|
||||
using System.Collections.Generic;
|
||||
using DTS.Common.Enums.Sensors;
|
||||
using DTS.Common.Interface.Pagination;
|
||||
|
||||
namespace DTS.Common.Interface.Sensors.SensorsList
|
||||
{
|
||||
public interface ISensorsListEditGroupViewModel : IBaseViewModel, IFilterableListView
|
||||
{
|
||||
ISensorsListEditGroupView View { get; set; }
|
||||
IAnalogSensor [] AnalogSensors { get; set; }
|
||||
ISquib [] Squibs { get; set; }
|
||||
IDigitalInputSetting [] DigitalInputSettings { get; set; }
|
||||
IDigitalOutputSetting [] DigitalOutputSettings { get; set; }
|
||||
IUartIOSetting [] UartSettings { get; set; }
|
||||
IStreamOutputSetting [] StreamOutputSettings { get; set; }
|
||||
void GetSensors(int sensorCalWarningPeriodDays, bool included);
|
||||
void SetCapacityFormat(string format);
|
||||
void Sort(object sortBy, bool bColumnClick);
|
||||
void Unset();
|
||||
void Filter(string currentFilter);
|
||||
void FilterSquib(object columnTag, string searchTerm);
|
||||
void FilterDigitalIn(object columnTag, string searchTerm);
|
||||
void FilterDigitalOut(object columnTag, string searchTerm);
|
||||
void FilterUartIO(object columnTag, string searchTerm);
|
||||
void FilterStreamOut(object columnTag, string searchTerm);
|
||||
void FilterStreamIn(object columnTag, string searchTerm);
|
||||
void SetShowAssigned(bool showAssigned, bool showUnassigned, IReadOnlyDictionary<string, bool> assignedSensors);
|
||||
void SetShowOnline(bool showOnline);
|
||||
void SetAssignedSensors(IReadOnlyDictionary<string, bool> serialNumbers);
|
||||
void SetOnline(Dictionary<string, bool> serialNumbersToOnline);
|
||||
bool IsSensorOnline(string serialNumber);
|
||||
void SetCachedSensors(ISensorData[] cachedSensors);
|
||||
void SetCachedCalibrations(ISensorCalibration[] calibrations);
|
||||
// sets the currently active tab to the type of sensor (analog/squib/di/dout)
|
||||
void SetActiveTab(PossibleFilters filter);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
using DTS.Common.Base;
|
||||
|
||||
namespace DTS.Common.Interface.Sensors.SensorsList
|
||||
{
|
||||
public interface ISensorsListOverdueView : IBaseView { }
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
using DTS.Common.Base;
|
||||
using DTS.Common.Enums.Sensors;
|
||||
|
||||
namespace DTS.Common.Interface.Sensors.SensorsList
|
||||
{
|
||||
public interface ISensorsListView : IBaseView
|
||||
{
|
||||
void HandleColumns(CalibrationBehaviors calibrationBehavior);
|
||||
void SetIncludedVisible(bool bUsesIncludeColumn);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,66 @@
|
||||
using DTS.Common.Base;
|
||||
using DTS.Common.Enums.Sensors;
|
||||
using DTS.Common.Interface.Pagination;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace DTS.Common.Interface.Sensors.SensorsList
|
||||
{
|
||||
public interface ISensorsListViewModel : IBaseViewModel, IFilterableListView
|
||||
{
|
||||
ISensorsListView View { get; set; }
|
||||
IAnalogSensor [] AnalogSensors { get; set; }
|
||||
ISquib [] Squibs { get; set; }
|
||||
IDigitalInputSetting [] DigitalInputSettings { get; set; }
|
||||
IDigitalOutputSetting [] DigitalOutputSettings { get; set; }
|
||||
IUartIOSetting [] UartIOSettings { get; set; }
|
||||
IStreamOutputSetting [] StreamOutputSettings { get; set; }
|
||||
CalibrationBehaviors CalibrationBehavior { get; set; }
|
||||
void GetSensors(int sensorCalWarningPeriodDays, bool included);
|
||||
/// <summary>
|
||||
/// retrieves and populates view model with all sensors matching sensors allowed
|
||||
/// </summary>
|
||||
/// <param name="sensorCalWarningPeriodDays">cal warning period in days, used for colorization</param>
|
||||
/// <param name="sensorsAllowed">array of which sensors to display</param>
|
||||
/// <param name="sensors">dictionary look up of databaseid to ISensorData for sensors in a test</param>
|
||||
void GetSensors(int sensorCalWarningPeriodDays, int[] sensorsAllowed, IReadOnlyDictionary<int, ISensorData> sensors);
|
||||
|
||||
void SetSelectedSerial(string serialNumber);
|
||||
void Sort(object sortBy, bool bColumnClick);
|
||||
void SortOverdue(object sortBy, bool bColumnClick);
|
||||
void Unset();
|
||||
void Filter(string currentFilter);
|
||||
void FilterSquib(object columnTag, string searchTerm);
|
||||
void FilterDigitalIn(object columnTag, string searchTerm);
|
||||
void FilterDigitalOut(object columnTag, string searchTerm);
|
||||
void FilterUartIO(object columnTag, string searchTerm);
|
||||
void FilterStreamIn(object columnTag, string searchTerm);
|
||||
void FilterStreamOut(object columnTag, string searchTerm);
|
||||
void SetCachedSensors(ISensorData[] cachedSensors);
|
||||
void SetCachedCalibrations(ISensorCalibration[] sensorCalibrations);
|
||||
string CapacityFormat { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// determines whether included columns are used in models/views
|
||||
/// </summary>
|
||||
/// <param name="bUsesIncludedColumn"></param>
|
||||
void UseIncludedColumn(bool bUsesIncludedColumn);
|
||||
/// <summary>
|
||||
/// sets the included property for all sensors
|
||||
/// </summary>
|
||||
/// <param name="bIncluded"></param>
|
||||
void SetIncludedAll(bool bIncluded);
|
||||
/// <summary>
|
||||
/// returns all the included sensors
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
IDragAndDropItem[] GetIncludedSensors();
|
||||
/// <summary>
|
||||
/// controls whether TDC incompatible sensors should be included or not
|
||||
/// </summary>
|
||||
bool ShowOnlyTDCSensors{ set; }
|
||||
/// <summary>
|
||||
/// controls whether Sliceware incompatible sensors should be included or not
|
||||
/// </summary>
|
||||
bool ShowOnlySlicewareSensors { set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
using DTS.Common.Base;
|
||||
|
||||
namespace DTS.Common.Interface.Sensors.SensorsList
|
||||
{
|
||||
public interface ISensorTemplatesImportView : IBaseView { }
|
||||
}
|
||||
@@ -0,0 +1,41 @@
|
||||
using DTS.Common.Enums;
|
||||
using System;
|
||||
|
||||
namespace DTS.Common.Interface.Sensors.SensorsList
|
||||
{
|
||||
public interface ISquib
|
||||
{
|
||||
int DatabaseId { get; set; }
|
||||
bool Included { get; set; }
|
||||
string SerialNumber { get; set; }
|
||||
string Description { get; set; }
|
||||
double ResistanceLow { get; set; }
|
||||
double ResistanceHigh { get; set; }
|
||||
string ID { get; set; }
|
||||
string SQMode { get; set; }
|
||||
double SQDelay { get; set; }
|
||||
double SQCurrent { get; set; }
|
||||
double SQDuration { get; set; }
|
||||
bool LimitDuration { get; set; }
|
||||
string ModifiedBy { get; set; }
|
||||
DateTime LastModified { get; set; }
|
||||
bool Filter(string term);
|
||||
bool Assigned { get; set; }
|
||||
bool Online { get; set; }
|
||||
string ISOCode { get; set; }
|
||||
string ISOChannelName{ get; set; }
|
||||
string UserCode { get; set; }
|
||||
string UserChannelName { get; set; }
|
||||
SquibFireMode Mode { get; set; }
|
||||
/// <summary>
|
||||
/// marks the squib as broken
|
||||
/// broken sensors do not appear in lists of available sensors in edit test setup or edit group
|
||||
/// </summary>
|
||||
bool Broken { get; set; }
|
||||
/// <summary>
|
||||
/// marks the squib as donotuse
|
||||
/// donotuse sensors do not appear in lists of available sensors in edit test setup or edit group
|
||||
/// </summary>
|
||||
bool DoNotUse { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,80 @@
|
||||
using DTS.Common.Enums;
|
||||
using System;
|
||||
|
||||
namespace DTS.Common.Interface.Sensors.SensorsList
|
||||
{
|
||||
public interface IStreamInputSetting
|
||||
{
|
||||
/// <summary>
|
||||
/// ID in the database for the stream output setting
|
||||
/// only positive numbers are valid database ids
|
||||
/// </summary>
|
||||
int DatabaseId { get; set; }
|
||||
/// <summary>
|
||||
/// whether the stream output is checked in a list with a checkbox
|
||||
/// </summary>
|
||||
bool Included { get; set; }
|
||||
/// <summary>
|
||||
/// the serial number / setting name
|
||||
/// </summary>
|
||||
string SerialNumber { get; set; }
|
||||
/// <summary>
|
||||
/// description or comment of setting
|
||||
/// </summary>
|
||||
string Description { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// the user who last modified setting
|
||||
/// </summary>
|
||||
string LastModifiedBy { get; set; }
|
||||
/// <summary>
|
||||
/// when the setting was last modified
|
||||
/// </summary>
|
||||
DateTime LastModified { get; set; }
|
||||
/// <summary>
|
||||
/// returns true if stream output matches filter criteria
|
||||
/// </summary>
|
||||
/// <param name="term"></param>
|
||||
/// <returns></returns>
|
||||
bool Filter(string term);
|
||||
/// <summary>
|
||||
/// whether the stream output is associated with a channel
|
||||
/// </summary>
|
||||
bool Assigned { get; set; }
|
||||
/// <summary>
|
||||
/// whether the stream output is online or not
|
||||
/// </summary>
|
||||
bool Online { get; set; }
|
||||
/// <summary>
|
||||
/// the isocode for the stream output
|
||||
/// </summary>
|
||||
string ISOCode { get; set; }
|
||||
/// <summary>
|
||||
/// the iso channel name for the stream output
|
||||
/// </summary>
|
||||
string ISOChannelName { get; set; }
|
||||
/// <summary>
|
||||
/// the user code for the stream output
|
||||
/// </summary>
|
||||
string UserCode { get; set; }
|
||||
/// <summary>
|
||||
/// the user channel name for the stream output
|
||||
/// </summary>
|
||||
string UserChannelName { get; set; }
|
||||
/// <summary>
|
||||
/// marks the stream output setting as broken or not
|
||||
/// broken sensors do not appear in selectable lists of sensors in edit test setup or edit group
|
||||
/// </summary>
|
||||
bool Broken { get; set; }
|
||||
/// <summary>
|
||||
/// marks the stream output setting as donotuse
|
||||
/// donotuse sensors do not appear in selectable lists of sensors in edit test setup or edit group
|
||||
/// </summary>
|
||||
bool DoNotUse { get; set; }
|
||||
///<summary>
|
||||
/// udp address setting value
|
||||
///</summary>
|
||||
string UDPAddress { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,136 @@
|
||||
using DTS.Common.Enums;
|
||||
using System;
|
||||
|
||||
namespace DTS.Common.Interface.Sensors.SensorsList
|
||||
{
|
||||
public interface IStreamOutputSetting
|
||||
{
|
||||
/// <summary>
|
||||
/// ID in the database for the stream output setting
|
||||
/// only positive numbers are valid database ids
|
||||
/// </summary>
|
||||
int DatabaseId { get; set; }
|
||||
/// <summary>
|
||||
/// whether the stream output is checked in a list with a checkbox
|
||||
/// </summary>
|
||||
bool Included { get; set; }
|
||||
/// <summary>
|
||||
/// the serial number / setting name
|
||||
/// </summary>
|
||||
string SerialNumber { get; set; }
|
||||
/// <summary>
|
||||
/// description or comment of setting
|
||||
/// </summary>
|
||||
string Description { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// the user who last modified setting
|
||||
/// </summary>
|
||||
string LastModifiedBy { get; set; }
|
||||
/// <summary>
|
||||
/// when the setting was last modified
|
||||
/// </summary>
|
||||
DateTime LastModified { get; set; }
|
||||
/// <summary>
|
||||
/// returns true if stream output matches filter criteria
|
||||
/// </summary>
|
||||
/// <param name="term"></param>
|
||||
/// <returns></returns>
|
||||
bool Filter(string term);
|
||||
/// <summary>
|
||||
/// whether the stream output is associated with a channel
|
||||
/// </summary>
|
||||
bool Assigned { get; set; }
|
||||
/// <summary>
|
||||
/// whether the stream output is online or not
|
||||
/// </summary>
|
||||
bool Online { get; set; }
|
||||
/// <summary>
|
||||
/// the isocode for the stream output
|
||||
/// </summary>
|
||||
string ISOCode { get; set; }
|
||||
/// <summary>
|
||||
/// the iso channel name for the stream output
|
||||
/// </summary>
|
||||
string ISOChannelName { get; set; }
|
||||
/// <summary>
|
||||
/// the user code for the stream output
|
||||
/// </summary>
|
||||
string UserCode { get; set; }
|
||||
/// <summary>
|
||||
/// the user channel name for the stream output
|
||||
/// </summary>
|
||||
string UserChannelName { get; set; }
|
||||
/// <summary>
|
||||
/// marks the stream output setting as broken or not
|
||||
/// broken sensors do not appear in selectable lists of sensors in edit test setup or edit group
|
||||
/// </summary>
|
||||
bool Broken { get; set; }
|
||||
/// <summary>
|
||||
/// marks the stream output setting as donotuse
|
||||
/// donotuse sensors do not appear in selectable lists of sensors in edit test setup or edit group
|
||||
/// </summary>
|
||||
bool DoNotUse { get; set; }
|
||||
///<summary>
|
||||
/// udp profile setting value
|
||||
///</summary>
|
||||
UDPStreamProfile UDPProfile { get; set; }
|
||||
///<summary>
|
||||
/// udp address setting value
|
||||
///</summary>
|
||||
string UDPAddress { get; set; }
|
||||
///<summary>
|
||||
/// time channel id setting value
|
||||
///</summary>
|
||||
ushort UDPTimeChannelId { get; set; }
|
||||
///<summary>
|
||||
/// data channel id setting value
|
||||
///</summary>
|
||||
ushort UDPDataChannelId { get; set; }
|
||||
///<summary>
|
||||
/// tmns config setting value
|
||||
///</summary>
|
||||
string UDPTmNSConfig { get; set; }
|
||||
///<summary>
|
||||
/// irig data packet interval setting value
|
||||
///</summary>
|
||||
ushort IRIGTimeDataPacketIntervalMs { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// interval in ms between sending TMATS information while streaming
|
||||
/// http://manuscript.dts.local/f/cases/29987/Add-CG-DP-TMATS-interval-UI-support
|
||||
/// </summary>
|
||||
ushort TMATSIntervalMs { get; set; }
|
||||
bool IsCH10 { get; }
|
||||
bool IsTMNS { get; }
|
||||
bool IsIENA { get; }
|
||||
bool IsUART { get; }
|
||||
|
||||
/// <summary>
|
||||
/// TMNS sub frame id for output streaming
|
||||
/// </summary>
|
||||
uint TMNS_SubFrameId { get; set; }
|
||||
/// <summary>
|
||||
/// TMNS message id for output streaming
|
||||
/// </summary>
|
||||
uint TMNS_MsgId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// tmns PCM minor per major setting for output streaming
|
||||
/// </summary>
|
||||
uint TMNS_MinorPerMajor { get; set; }
|
||||
/// <summary>
|
||||
/// TMNS TMATs port for output streaming
|
||||
/// </summary>
|
||||
uint TMNS_TMATSPort { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// IENA key for output streaming
|
||||
/// </summary>
|
||||
ushort IENA_Key { get; set; }
|
||||
/// <summary>
|
||||
/// IENA source port for streaming
|
||||
/// </summary>
|
||||
uint IENA_SourcePort { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,100 @@
|
||||
using System;
|
||||
using System.IO.Ports;
|
||||
using DTS.Common.Enums;
|
||||
|
||||
namespace DTS.Common.Interface.Sensors.SensorsList
|
||||
{
|
||||
public interface IUartIOSetting
|
||||
{
|
||||
/// <summary>
|
||||
/// ID in the database for the uart i/o setting
|
||||
/// only positive numbers are valid database ids
|
||||
/// </summary>
|
||||
int DatabaseId { get; set; }
|
||||
/// <summary>
|
||||
/// whether the uart i/o is checked in a list with a checkbox
|
||||
/// </summary>
|
||||
bool Included { get; set; }
|
||||
/// <summary>
|
||||
/// the serial number / setting name
|
||||
/// </summary>
|
||||
string SerialNumber { get; set; }
|
||||
/// <summary>
|
||||
/// description or comment of setting
|
||||
/// </summary>
|
||||
string Description { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// the user who last modified setting
|
||||
/// </summary>
|
||||
string LastModifiedBy { get; set; }
|
||||
/// <summary>
|
||||
/// when the setting was last modified
|
||||
/// </summary>
|
||||
DateTime LastModified { get; set; }
|
||||
/// <summary>
|
||||
/// returns true if uart i/o matches filter criteria
|
||||
/// </summary>
|
||||
/// <param name="term"></param>
|
||||
/// <returns></returns>
|
||||
bool Filter(string term);
|
||||
/// <summary>
|
||||
/// whether the uart i/o is associated with a channel
|
||||
/// </summary>
|
||||
bool Assigned { get; set; }
|
||||
/// <summary>
|
||||
/// whether the uart i/o is online or not
|
||||
/// </summary>
|
||||
bool Online { get; set; }
|
||||
/// <summary>
|
||||
/// the isocode for the uart i/o
|
||||
/// </summary>
|
||||
string ISOCode { get; set; }
|
||||
/// <summary>
|
||||
/// the iso channel name for the uart i/o
|
||||
/// </summary>
|
||||
string ISOChannelName { get; set; }
|
||||
/// <summary>
|
||||
/// the user code for the uart i/o
|
||||
/// </summary>
|
||||
string UserCode { get; set; }
|
||||
/// <summary>
|
||||
/// the user channel name for the uart i/o
|
||||
/// </summary>
|
||||
string UserChannelName { get; set; }
|
||||
/// <summary>
|
||||
/// marks the uart i/o setting as broken or not
|
||||
/// broken sensors do not appear in selectable lists of sensors in edit test setup or edit group
|
||||
/// </summary>
|
||||
bool Broken { get; set; }
|
||||
/// <summary>
|
||||
/// marks the uart i/o setting as donotuse
|
||||
/// donotuse sensors do not appear in selectable lists of sensors in edit test setup or edit group
|
||||
/// </summary>
|
||||
bool DoNotUse { get; set; }
|
||||
/// <summary>
|
||||
/// uart baud rate
|
||||
/// </summary>
|
||||
uint BaudRate { get; set; }
|
||||
/// <summary>
|
||||
/// uart data bits
|
||||
/// </summary>
|
||||
uint DataBits { get; set; }
|
||||
/// <summary>
|
||||
/// uart stop bits
|
||||
/// </summary>
|
||||
StopBits StopBits { get; set; }
|
||||
/// <summary>
|
||||
/// uart parity
|
||||
/// </summary>
|
||||
Parity Parity { get; set; }
|
||||
/// <summary>
|
||||
/// uart flow control FB 30486 removed set. Always be NONE
|
||||
/// </summary>
|
||||
Handshake FlowControl { get; }
|
||||
/// <summary>
|
||||
/// the data format of incoming data
|
||||
/// </summary>
|
||||
UartDataFormat DataFormat { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
using DTS.Common.Base;
|
||||
using DTS.Common.Enums.Sensors;
|
||||
using System;
|
||||
|
||||
namespace DTS.Common.Interface.Sensors.SoftwareFilters
|
||||
{
|
||||
public interface ISoftwareFiltersView : IBaseView { }
|
||||
|
||||
/// <summary>
|
||||
/// FB 13120 Filter class interface
|
||||
/// </summary>
|
||||
[System.ComponentModel.TypeConverter(typeof(System.ComponentModel.ExpandableObjectConverter))]
|
||||
public interface IFilterClass : IComparable
|
||||
{
|
||||
string FilterName { get; }
|
||||
FilterClassType FClass { get; set; }
|
||||
double Frequency { get; set; }
|
||||
int GetFilterClassNumericValue();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
using DTS.Common.Base;
|
||||
using DTS.Common.Interface.Pagination;
|
||||
using System.Collections.ObjectModel;
|
||||
|
||||
namespace DTS.Common.Interface.Sensors.SoftwareFilters
|
||||
{
|
||||
public interface ISoftwareFiltersViewModel : IBaseViewModel, IFilterableListView
|
||||
{
|
||||
ISoftwareFiltersView View { get; set; }
|
||||
void Sort(object sortBy, bool bColumnClick);
|
||||
void Unset();
|
||||
void Filter(string currentFilter);
|
||||
ObservableCollection<ISoftwareFilter> SoftwareFilters { get; set; }
|
||||
ISoftwareFilter [] GetSoftwareFilters();
|
||||
void PopulateView();
|
||||
string CurrentUser{ get; set; }
|
||||
bool ValidateAndSave();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user