Files
DP44/Common/DTS.Common/.svn/pristine/a1/a169ea71f3a9e79c4f2526b59d82cf882f54309c.svn-base

374 lines
15 KiB
Plaintext
Raw Normal View History

2026-04-17 14:55:32 -04:00
using DTS.Common.Interface.DataRecorders;
using DTS.Common.Interface.Sensors.SensorsList;
using System;
using System.Windows.Input;
using DTS.Common.Interface.Groups.GroupList;
using DTS.Common.Enums;
using DTS.Common.Interface.Sensors;
using DTS.Common.Enums.Sensors;
using DTS.Common.Enums.Sensors.SensorsList;
using DTS.Common.Classes.ChannelCodes;
using DTS.Common.Classes.Sensors;
using DTS.Common.Interface.Sensors.SoftwareFilters;
using System.IO.Ports;
namespace DTS.Common.Interface.Channels
{
public interface IGroupChannel : IComparable<IGroupChannel>, IChannelDbRecord
{
SensorConstants.AvailableRangesLowG RangeLowG { get; set; }
/// <summary>
/// whether the channel has a calibration less voltage measurement channel
/// </summary>
bool VoltageInsertionSensor { get; }
/// <summary>
/// Whether the channel has an embedded range modifiable low g sensor
/// </summary>
bool RangeModifiableSensorLowG { get; }
/// <summary>
/// whether the channel has an embedded range modifiable ars sensor
/// </summary>
bool RangeModifiableSensorARS { get; }
/// <summary>
/// available initial offsets for this channel
/// dependent on a sensor w/ a sensor calibration being assigned
/// </summary>
InitialOffset[] AvailableInitialOffsets { get; set; }
/// <summary>
/// current support for IEPE by channel
/// if there is a sensor assigned, value is depedent on sensor bridge
/// if there is no sensor but hardware is assigned, is dependent on hardwarechannel support
/// if neither is assigned, IEPE Is available to be assigned to the channel
/// </summary>
string IEPESupport { get; }
/// <summary>
/// the group the channel belongs to
/// </summary>
IGroup Group { get; set; }
/// <summary>
/// the name of the group (DisplayName) the channel belongs to
/// </summary>
string GroupName { get; set; }
/// <summary>
/// whether the group name is valid or not
/// </summary>
bool GroupNameValid { get; set; }
/// <summary>
/// whether the isocode is set or not [does not examine iso code validity]
/// </summary>
bool IsoCodeValid { get; set; }
/// <summary>
/// whether the iso channel name is set or not
/// </summary>
bool IsoChannelNameValid { get; set; }
/// <summary>
/// whether the user code is set or not
/// </summary>
bool UserCodeValid { get; set; }
/// <summary>
/// whether the user channel name is set or not
/// </summary>
bool UserChannelNameValid { get; set; }
/// <summary>
/// whether the hardware has been set or not
/// </summary>
bool HardwareValid { get; }
/// <summary>
/// this is the old identifier for the hardware channel assigned
/// it's something in the form of [das serial]:[channel index]
/// I'm not sure why we have two hardware ids around and why this one is still around...
/// </summary>
string HardwareId { get; set; }
/// <summary>
/// stores the sample rate of the DAS associated with this channel
/// </summary>
double TestSampleRate { get; set; }
/// <summary>
/// whether the sensor has been set or not
/// </summary>
bool SensorValid { get; }
/// <summary>
/// whether the channel should be used for collecting data or not
/// </summary>
bool IsDisabled { get; set; }
long ChannelId { get; set; }
void SetHardwareChannel(IHardwareChannel hardwareChannel);
void SetSensor(IDragAndDropItem sensor, IChannelSetting[] channelDefaults, bool applySensorDataToBlankChannels);
bool CompareValue(string property);
bool SetDifferent(string property);
void SetNotDifferent();
void SetRange(CACOption option);
bool CanMoveUp { get; set; }
bool CanMoveDown { get; set; }
bool DeleteShouldBeEnabled { get; set; }
System.Windows.Visibility RemoveSensorVisibility { get; set; }
/// <summary>
/// indicates whether the channel is a new non edited channel
/// </summary>
/// <returns></returns>
bool IsBlank();
/// <summary>
/// clears hardware and sensor assignments for channel
/// </summary>
void Clear();
/// <summary>
/// return true if channel contains the given term
/// </summary>
/// <param name="term"></param>
/// <returns></returns>
bool Filter(string term);
/// <summary>
/// what to do when something is pasted to the channel
/// </summary>
ICommand PasteCommand { get; set; }
/// <summary>
/// settings (range/polarity/ etc) for channel
/// </summary>
IChannelSetting[] ChannelSettings { get; set; }
/// <summary>
/// returns a channel name for channel based on view mode
/// </summary>
/// <param name="isoViewMode"></param>
/// <returns></returns>
string GetChannelName(IsoViewMode isoViewMode);
/// <summary>
/// returns a code for channel based on view mode
/// </summary>
/// <param name="isoViewMode"></param>
/// <returns></returns>
string GetChannelCode(IsoViewMode isoViewMode);
/// <summary>
/// creates a memory copy of channel
/// </summary>
/// <param name="groupChannel"></param>
void Copy(IGroupChannel groupChannel);
/// <summary>
/// string to display in UI for hardware
/// </summary>
string Hardware { get; set; }
/// <summary>
/// string to display in UI for sensor
/// </summary>
string Sensor { get; }
ISensorData SensorData { get; }
IHardwareChannel HardwareChannel { get; }
IDragAndDropItem DragAndDropItem { get; }
ISensorCalibration SensorCalibration { get; }
void SetSensorCalibration(ISensorCalibration calibration);
void SetSensorData(ISensorData sensorData, IDragAndDropItem dragAndDropItem, bool decideSettings = false);
bool HasEID { get; }
/// <summary>
/// whether channel has an analog sensor assigned
/// if no sensor is assigned but the channel is not blank, returns true
/// returns false if channel is blank
/// </summary>
bool IsAnalog { get; }
/// <summary>
/// whether the channel has a squib sensor assigned
/// if no sensor is assigned but the channel is not blank, returns true
/// returns false if channel is blank
/// </summary>
bool IsSquib { get; }
/// <summary>
/// whether the channel has a digital input sensor assigned
/// if no sensor is assigned but the channel is not blank, returns true
/// returns false if channel is blank
/// </summary>
bool IsDigitalIn { get; }
/// <summary>
/// whether the channel has a digital output sensor assigned
/// if no sensor is assigned but the channel is not blank, returns true
/// returns false if channel is blank
/// </summary>
bool IsDigitalOut { get; }
/// <summary>
/// whether the channel is from a RTC module
/// returns false if channel is a normal phyiscal measurement channel
/// </summary>
bool IsClock { get; }
/// <summary>
/// whether the channel is from a UART module
/// returns false if channel is a normal phyiscal measurement channel
/// </summary>
bool IsUart { get; }
/// <summary>
/// whether the channel is from a stream in module
/// returns false if channel is a normal phyiscal measurement channel
/// </summary>
bool IsStreamIn { get; }
/// <summary>
/// whether the channel is from a stream out module
/// returns false if channel is a normal phyiscal measurement channel
/// </summary>
bool IsStreamOut { get; }
/// <summary>
/// range setting value for the channel
/// </summary>
double Range { get; set; }
/// <summary>
/// the capacity of the sensor on the channel
/// </summary>
double Capacity { get; }
/// <summary>
/// FB 13120 filter class setting value for the channel
/// </summary>
IFilterClass FilterClass { get; set; }
/// <summary>
/// polarity setting value for the channel
/// </summary>
string Polarity { get; set; }
string Units { get; }
ZeroMethodType ZeroMethod { get; set; }
double ZeroMethodStart { get; set; }
double ZeroMethodEnd { get; set; }
string Sensitivity { get; }
InitialOffset InitialOffset { get; set; }
bool SquibLimitDuration { get; set; }
double SquibDuration { get; set; }
//14623 SquibDelay is nullable for UI perpose
double? SquibDelay { get; set; }
double SquibCurrent { get; set; }
bool DigitalOutLimitDuration { get; set; }
double DigitalOutDuration { get; set; }
//FB 28107 Define max value allowed for digital out duration
double DigitalOutDurationMax { get; set; }
double DigitalOutDelay { get; set; }
/// <summary>
/// output mode setting value for the channel
/// </summary>
DigitalOutputModes DigitalOutputMode { get; set; }
/// <summary>
/// fire mode setting value for the channel
/// </summary>
SquibFireMode SquibFireMode { get; set; }
/// <summary>
/// digital input mode setting value for the channel
/// </summary>
DigitalInputModes DigitalInputMode { get; set; }
/// <summary>
/// active value setting value for the channel
/// </summary>
string ActiveValue { get; set; }
/// <summary>
/// default value setting value for the channel
/// </summary>
string DefaultValue { get; set; }
///<summary>
/// baud rate setting value for the channel
///</summary>
uint UartBaudRate { get; set; }
///<summary>
/// data bits setting value for the channel
///</summary>
uint UartDataBits { get; set; }
///<summary>
/// stop bits setting value for the channel
///</summary>
StopBits UartStopBits { get; set; }
///<summary>
/// parity setting value for the channel
///</summary>
Parity UartParity { get; set; }
///<summary>
/// flow control setting value for the channel FB 30486 removed set, it's always NONE
///</summary>
Handshake UartFlowControl { get; }
///<summary>
/// data format setting value for the channel
///</summary>
UartDataFormat UartDataFormat { get; set; }
///<summary>
/// udp address setting value for the channel
///</summary>
string StreamInUDPAddress { get; set; }
///<summary>
/// udp profile setting value for the channel
///</summary>
UDPStreamProfile StreamOutUDPProfile { get; set; }
///<summary>
/// udp address setting value for the channel
///</summary>
string StreamOutUDPAddress { get; set; }
///<summary>
/// time channel id setting value for the channel
///</summary>
ushort StreamOutUDPTimeChannelId { get; set; }
///<summary>
/// data channel id setting value for the channel
///</summary>
ushort StreamOutUDPDataChannelId { get; set; }
///<summary>
/// tmns config setting value for the channel
///</summary>
string StreamOutUDPTmNSConfig { get; set; }
///<summary>
/// irig data packet interval setting value for the channel
///</summary>
ushort StreamOutIRIGTimeDataPacketIntervalMs { get; set; }
/// <summary>
/// time in ms between sending out TMATS information while streaming
/// http://manuscript.dts.local/f/cases/29987/Add-CG-DP-TMATS-interval-UI-support
/// </summary>
ushort StreamOutTMATSIntervalMs { get; set; }
/// <summary>
/// FB 15574 FB 13120
/// get the current FilterClass from the current isocode
/// </summary>
/// <param name="filters"></param>
/// <param name="isoCode"></param>
/// <returns></returns>
IFilterClass GetFilterClassFromISOCode(ISoftwareFilter[] filters, string isoCode);
/// <summary>
/// gets a function that will perform coercion on isocodes if needed
/// </summary>
CoerceISOCodeDelegate CoerceISOCodeFunc { get; }
/// <summary>
/// returns the status of the channel considering IsComplete and sensor cal status
/// </summary>
UIItemStatus ChannelStatus { get; }
/// <summary>
/// sets the channel settings based on a sensor's settings
/// </summary>
/// <param name="sd"></param>
void SetSettingsFromSensor(ISensorData sd);
/// <summary>
/// returns a list of sensor parameter differences from sensor vs channel
/// returns empty string if there aren't any
/// </summary>
/// <param name="sensor"></param>
/// <returns></returns>
string GetChangeList(ISensorData sensor);
bool IsRangeDifferent { get; set; }
bool IsFilterClassDifferent { get; set; }
bool IsPolarityDifferent { get; set; }
bool IsZeroMethodDifferent { get; set; }
bool IsZeroMethodStartDifferent { get; set; }
bool IsZeroMethodEndDifferent { get; set; }
bool IsInitialOffsetDifferent { get; set; }
bool IsSquibFireModeDifferent { get; set; }
bool IsSquibDelayDifferent { get; set; }
bool IsSquibLimitDurationDifferent { get; set; }
bool IsSquibDurationDifferent { get; set; }
bool IsSquibCurrentDifferent { get; set; }
bool IsDigitalOutputModeDifferent { get; set; }
bool IsDigitalOutDelayDifferent { get; set; }
bool IsDigitalOutLimitDurationDifferent { get; set; }
bool IsDigitalOutDurationDifferent { get; set; }
bool IsDigitalInputModeDifferent { get; set; }
bool IsDefaultValueDifferent { get; set; }
bool IsActiveValueDifferent { get; set; }
bool BorderShouldShowOutOfDate { get; set; }
}
}