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; } /// /// gets the calibration due date for the sensor given a sensor calibration /// 13065 Sensor "First Use" Date /// DateTime GetDueDate(ISensorCalibration sc); /// /// 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 /// /// InitialOffset InitialOffset { get; set; } SensorConstants.BridgeType Bridge { get; set; } ISensorCalibration GetLatestCalibration(); ISensorCalibration NewEmbeddedSC(string units); int DatabaseId { get; set; } /// /// 11260 Implement DiagnosticsMode in DataPRO /// DiagnosticsMode means the bridge in analog is short circuited to the outside world and only internal resistors are used /// bool DiagnosticsMode { get; set; } bool IsTestSpecificDigitalOutput { get; set; } bool IsTestSpecificSquib{ get; set; } /// /// returns true if the sensor is a test specific digital input /// a digital input only created inside a test /// bool IsTestSpecificDigitalIn { get; set; } bool IsTestSpecificEmbedded { get; set; } bool IsTestSpecificEmbeddedClock { get; set; } bool IsTestSpecificStreamInput { get; set; } bool IsTestSpecificStreamOutput { get; set; } bool IsTestSpecificUart { get; set; } /// /// 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. /// double DelayMS { get; set; } double DigitalOutputDelayMS { get; set; } /// /// 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. /// double DurationMS { get; set; } double DigitalOutputDurationMS { get; set; } DigitalOutputModes DigitalOutputMode { get; set; } bool DigitalOutputLimitDuration { get; set; } double SquibFireDelayMS { get; set; } double SquibFireDurationMS{ get; set; } /// /// 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 /// 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; } /// /// the setting name allows us to refer to different settings and allow it to be more easily included in test setups and channel setups /// string SettingName { get; set; } DigitalInputModes InputMode { get; set; } /// /// Returns comment string. Returns serial number with axis if comment is not present. /// /// 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(); /// /// uart baud rate /// uint UartBaudRate { get; set; } /// /// uart data bits /// uint UartDataBits { get; set; } /// /// uart stop bits /// StopBits UartStopBits { get; set; } /// /// uart parity /// Parity UartParity { get; set; } /// /// uart flow control FB 30486 Hardcode FlowControl to NONE for UART sensor type. /// Handshake UartFlowControl { get;} /// /// the data format of incoming data /// UartDataFormat UartDataFormat { get; set; } bool IsStreamInput(); /// /// udp address setting value /// string StreamInUDPAddress { get; set; } bool IsStreamOutput(); /// /// udp profile setting value /// UDPStreamProfile StreamOutUDPProfile { get; set; } /// /// udp address setting value /// string StreamOutUDPAddress { get; set; } /// /// time channel id setting value /// ushort StreamOutUDPTimeChannelId { get; set; } /// /// data channel id setting value /// ushort StreamOutUDPDataChannelId { get; set; } /// /// tmns config setting value /// string StreamOutUDPTmNSConfig { get; set; } /// /// irig data packet interval setting value /// ushort StreamOutIRIGTimeDataPacketIntervalMs { get; set; } /// /// interval in ms between sending out TMATs information /// http://manuscript.dts.local/f/cases/29987/Add-CG-DP-TMATS-interval-UI-support /// 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; } /// /// 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 /// DateTime? FirstUseDate { get; set; } /// /// Latest calibration for sensor, null indicates value not set /// 13065 Sensor "First Use" Date /// int ? LatestCalibrationId { get; set; } } }