init
This commit is contained in:
@@ -0,0 +1,336 @@
|
||||
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; }
|
||||
//FB 43046
|
||||
/// <summary>
|
||||
/// SensitivityTolerancePercent
|
||||
/// </summary>
|
||||
double SensitivityTolerancePercent { get; set; }
|
||||
/// <summary>
|
||||
/// whether this sensor which has been marked inspect before use is cleared
|
||||
/// </summary>
|
||||
bool InspectBeforeUseCleared { 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; }
|
||||
/// <summary>
|
||||
/// The name of an Assembly (group of sensors)
|
||||
/// </summary>
|
||||
string AssemblyName { get; set; }
|
||||
/// <summary>
|
||||
/// The number of times a sensor has been used
|
||||
/// </summary>
|
||||
int UsageCount { get; set; }
|
||||
/// <summary>
|
||||
/// The maximum number of times a sensor can be used before generating an error
|
||||
/// </summary>
|
||||
int MaximumUsage { get; set; }
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user