Files
DP44/Common/DTS.CommonCore/.svn/pristine/3e/3e1d278b2b443a08932694a8c9fdd7909110edd6.svn-base
2026-04-17 14:55:32 -04:00

324 lines
11 KiB
Plaintext

using DTS.Common.Enums;
using DTS.Common.Enums.Sensors;
using DTS.Common.Interface.DASFactory.Diagnostics;
using DTS.Common.Interface.Sensors.SoftwareFilters;
using System;
using System.Xml;
namespace DTS.Common.Interface.DASFactory
{
public interface IAnalogInputDASChannel
{
/// <summary>
/// Type of Wheatstone Bridge in the sensor; half, full, etc.
/// </summary>
SensorConstants.BridgeType TypeOfBridge { get; set; }
/// <summary>
/// 14042 Flash Clear turns of excitation for s6
/// this allows for ILevelTriggerable channels to store and cache a sample average for checking
/// level triggered
/// </summary>
//double? ILevelTriggerable.SampleAverageADC { get; set; } = null;
/// <summary>
/// used during TDAS diagnostics, it's a throw away value that's computed during configuration
/// then compared to during measure shunt.
/// </summary>
int ShuntTargetADC { get; set; }
SensorConstants.BridgeType[] SupportedBridges { get; set; }
/// <summary>
/// the types of digital input modes supported by the channel.
/// by default all digital modes are supported, and some hardware restrict the list (notably the g5)
/// </summary>
DigitalInputModes[] SupportedDigitalInputModes { get; set; }
/// <summary>
/// IEPE Coupling mode (AC, AC/DC)
/// correct voltage base on this property.
/// </summary>
SensorConstants.CouplingModes CouplingMode { get; set; }
/// <summary>
/// Resistance of the Bridge in the sensor.
/// </summary>
double BridgeResistanceOhms { get; set; }
/// <summary>
/// used to store 2D/3D IR-TRACC ZeroPoint Voltage data
/// </summary>
double ZeroPoint { get; set; }
/// <summary>
/// Bi-Polar maximum tolerance of sensor in Engineering Units.
/// </summary>
double SensorCapacityEU { get; set; }
/// <summary>
/// Sensor capacity specified in sensor database.
/// </summary>
double SensorCapacity { get; set; }
/// <summary>
/// Sensor polarity specified in sensor database.
/// </summary>
string SensorPolarity { get; set; }
/// <summary>
/// The desired Bi-Polar range of readings (in Engineering Units)
/// from this sensor for this test or event. This must be
/// within the SensorCapacityEU of the sensor.
/// </summary>
double DesiredRangeWithHeadroomEU { get; set; }
/// <summary>
/// Sensitivity of the sensor in Millivots per Engineering Unit
/// as specified by the sensor's manufacturer or hardware settings.
/// </summary>
double SensitivityMilliVoltsPerEU { get; set; }
double SensitivityMilliVoltsPerEUNormalized { get; }
/// <summary>
/// Are sensor readings proportional to excitation voltage?
/// </summary>
bool IsProportionalToExcitation { get; set; }
bool IsSupported(ExcitationVoltageOptions.ExcitationVoltageOption o);
/// <summary>
/// Is this sensor's output inverted?
/// </summary>
bool IsInverted { get; set; }
string OriginalChannelName { get; set; }
string ChannelName2 { get; set; }
/// <summary>
/// refers to a unique id for a logical channel in the test
/// for now this is using TestObjectChannel.GetId()
/// which is in the form of TestObjectSerial_ChannelType_ChannelId
/// </summary>
string ChannelId { get; set; }
/// <summary>
/// refers to the Group for a logical channel in the test
/// </summary>
string ChannelGroupName { get; set; }
string HardwareChannelName { get; set; }
string DIUnits { get; set; }
DigitalInputModes DigitalMode { get; set; }
DTS.Common.Classes.Sensors.LinearizationFormula LinearizationFormula { get; set; }
/// <summary>
/// The excitation voltage to apply to the sensor. Firmware will provide the
/// correct voltage base on this property.
/// </summary>
ExcitationVoltageOptions.ExcitationVoltageOption Excitation { get; set; }
ExcitationVoltageOptions.ExcitationVoltageOption[] SupportedExcitation { get; set; }
/// <summary>
/// String representation of the Engineering Units this sensor reads, for example
/// "g" or "m/s/s" or "meters per second", etc. Not mathematically relevant, only
/// used for display.
/// </summary>
string EngineeringUnits { get; set; }
/// <summary>
/// Serial number of the sensor.
/// </summary>
string SerialNumber { get; set; }
/// <summary>
/// Manufacturer of the sensor.
/// </summary>
string Manufacturer { get; set; }
/// <summary>
/// Model of the sensor.
/// </summary>
string Model { get; set; }
/// <summary>
/// A text description of the sensor.
/// </summary>
string Description { get; set; }
/// <summary>
/// How will this sensor be zeroed?
/// </summary>
ZeroMethodType ZeroMethod { get; set; }
/// <summary>
/// Start time for the zero window relative to T=0
/// used if ZeroMethod is AverageOverTime.
/// </summary>
double ZeroAverageStartSeconds { get; set; }
/// <summary>
/// Stop time for the zero window relative to T=0
/// used if ZeroMethod is AverageOverTime.
/// </summary>
double ZeroAverageStopSeconds { get; set; }
/// <summary>
/// The initial EU value
/// </summary>
double InitialEU { get; set; }
string InitialOffset { get; set; }
bool Unipolar { get; set; }
/// <summary>
/// Should the shunt be enabled?
/// </summary>
bool ShuntIsEnabled { get; set; }
/// <summary>
/// some DAS require holding zeromV in adc in the xml configuration (slice2)
/// this is here to hold that information
/// </summary>
short ZeromVInADC { get; set; }
/// <summary>
/// should voltage insertion (gain) check be enabled?
/// </summary>
bool VoltageInsertionCheckEnabled { get; set; }
bool IEPEChannel { get; set; }
bool DigitalInputChannel { get; set; }
bool CalSignalIsEnabled { get; set; }
/// <summary>
/// Setting this true will flag the hardware to compensate for the offset of the sensor
/// during a call to DiagnosticsService.Diagnose(...).
/// </summary>
bool RemoveOffset { get; set; }
/// <summary>
/// Should we verify the measured offset to the limits?
/// </summary>
bool VerifyOffset { get; set; }
/// <summary>
/// The lower limit on allowed offset for the connected sensor.
/// </summary>
double OffsetToleranceLowMilliVolts { get; set; }
/// <summary>
/// The upper limit on allowed offset for the connected sensor.
/// </summary>
double OffsetToleranceHighMilliVolts { get; set; }
DateTime LastCalibrationDate { get; set; }
DateTime CalDueDate { get; set; }
/// <summary>
/// The ISO code for this channel.
/// </summary>
string ISOCode { get; set; }
/// <summary>
/// Not available on slice or G5. Remove for now?
/// </summary>
bool BypassAAFilter { get; set; }
string SensorID { get; set; }
/// <summary>
/// Get the channel diagnostics results (if available) for this channel.
/// </summary>
IDiagnosticResult Diagnostics { get; }
/// <summary>
/// some channels should not be refreshed from the database prior to running configuration, for example sensors that are part of a group
/// should not be updated from database
/// </summary>
bool UpdateChannelFromDatabase { get; set; }
/// <inheritdoc />
/// <summary>
/// Get/set the "trigger below" threshold. Set to "null" to deactivate.
/// </summary>
double? TriggerBelowThresholdEu
{
get;
set;
}
/// <inheritdoc />
/// <summary>
/// Get/set the "trigger above" threshold. Set to "null" to deactivate.
/// </summary>
double? TriggerAboveThresholdEu
{
get;
set;
}
bool AlreadyLevelTriggered
{
get;
set;
}
double MeasuredEULevelTriggerCheck
{
get;
set;
}
/// <summary>
/// Temporary fix that'll be addressed in 1.1
/// </summary>
double SoftwareFilterFrequency { get; set; }
/// <summary>
/// Fb 13120 For now continue using SoftwareFilterFrequency needs to be refactored to use SoftwareFilterClass instead
/// </summary>
IFilterClass SoftwareFilterClass { get; set; }
/// <summary>
/// Get/set the <see cref="DTS.DASLib.Service.DiagnosticsResult"/> for this channel.
/// </summary>
IDiagnosticResult DiagnosticInformation { get; }
/// <summary>
/// Get/set the <see cref="double"/> measured excitation voltage.
/// </summary>
double? MeasuredExcitationVolts { get; }
/// <summary>
/// Get/set the <see cref="double"/> factory excitation voltage.
/// </summary>
double? FactoryExcitationVolts { get; }
double ScalefactorMilliVoltsPerADC { get; set; }
double ScalefactorEngineeringUnitsPerADC { get; set; }
double NoiseAsPercentOfFullScale { get; set; }
/// <summary>
/// If this channel is supersampled, what the regular sampling rate is
/// </summary>
double UnsupersampledSampleRate { get; set; }
/// <summary>
/// If the channel has a serial number in the SerialNumber field, it is "Configured".
/// </summary>
bool IsConfigured();
void WriteElementEnd(XmlWriter writer);
void WriteXml(XmlWriter writer);
string GetSupportedExcitationSerialized();
string GetSupportedDigitalInputModesSerialized();
string GetSupportedBridgesSerialized();
void WriteXmlCRC32(XmlWriter writer);
}
}