This commit is contained in:
2026-04-17 14:55:32 -04:00
commit bc3ac1d4c9
18017 changed files with 4371742 additions and 0 deletions

View File

@@ -0,0 +1,106 @@
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace DTS.Common.Interface.DataRecorders
{
/// <summary>
/// interface describing a DAS channel in the Db
/// </summary>
public interface IDASChannelDBRecord
{
/// <summary>
/// a string id for the hardware the channel belongs to
/// (serialnumber_dastype)
/// </summary>
string HardwareId { get; set; }
[Key]
[Column("DASChannelId")]
/// <summary>
/// the id/key of the DAS channel record in the db
/// </summary>
int DaschannelId { get; set; }
[Column("DASId")]
/// <summary>
/// the das db id of the Hardware this channel belongs to
/// </summary>
int? Dasid { get; set; }
/// <summary>
/// the physical channel index of the channel among channels on the DAS
/// </summary>
int ChannelIdx { get; set; }
/// <summary>
/// BitMask for bridges supported by the channel
/// Bit 0 indicates IEPE
/// Bit 1 indicates quarter bridge
/// Bit 2 indicates half bridge
/// Bit 3 indicates full bridge
/// Bit 4 indicates digital input
/// Bit 5 indicates squib fire
/// Bit 6 indicates digital output
/// Bit 7 indicates Half bridge signal plus (G5 signal plus)
/// Bit 8 indicates RealTime Clock
/// Bit 9 indicates UART
/// </summary>
int SupportedBridges { get; set; }
/// <summary>
/// BitMask indicating what excitation options the channel supports
/// Bit 0 indicates an invalid excitation (undefined)
/// Bit 1 indicates 2V
/// Bit 2 indicates 2.5V
/// Bit 3 indicates 3V
/// Bit 4 indicates 5V
/// Bit 5 indicates 10V
/// Bit 6 indicates 1V
/// </summary>
int SupportedExcitations { get; set; }
[Column("DASDisplayOrder")]
/// <summary>
/// The display order of the channel among channels on the DAS
/// note that the physical order of channels and the display order may not match for
/// some hardware
/// </summary>
int DASDisplayOrder { get; set; }
/// <summary>
/// Indicates that record should be stored only in the local db and not propagated to a central db
/// deprecated
/// </summary>
bool LocalOnly { get; set; }
/// <summary>
/// BitMask indicating what Digital input modes are supported on the channel (if channel supports digital input bridge type)
/// Bit 0 indicates an invalid mode
/// Bit 1 indicates Transition low to high (TLH)
/// Bit 2 indicates Transition high to low (THL)
/// Bit 3 indicates Contact closure normally open (CCNO)
/// Bit 4 indicates Contact closure normally closed (CCNC)
/// </summary>
int SupportedDigitalInputModes { get; set; }
/// <summary>
/// BitMask indicating what Squib fire modes are supported on the channel (if the channel supports squib fire bridge type)
/// Bit 0 indicates an invalid mode (fire mode not set)
/// Bit 1 indicates capacitor discharge
/// Bit 2 indicates constant current
/// Bit 3 indicates AC discharge
/// </summary>
int SupportedSquibFireModes { get; set; }
/// <summary>
/// Bit mask indicating what digital output modes are supported (if the channel supports digital output bridge type)
/// a value of 0 indicates no digital output or off
/// Bit 0 indicates 5V low to high transition (FVLH)
/// Bit 1 indicates 5V high to low transition (FVHL)
/// Bit 2 indicates contact closure normally open (CCNO)
/// Bit 3 indicates contact closure normally closed (CCNC)
/// </summary>
int SupportedDigitalOutputModes { get; set; }
string ModuleSerialNumber { get; set; }
int SettingId { get; set; }
/// <summary>
/// array index of the module the channel belongs to among modules on a DAS
/// </summary>
int ModuleArrayIndex { get; set; }
}
}

View File

@@ -0,0 +1,75 @@
using System;
namespace DTS.Common.Interface.DataRecorders
{
/// <summary>
/// interface encapsulating a DAS record in the DB
/// </summary>
public interface IDASDBRecord
{
int DASId { get; set; }
string SerialNumber { get; set; }
int DASType { get; set; }
int MaxModules { get; set; }
long MaxMemory { get; set; }
double MaxSampleRate { get; set; }
double MinSampleRate { get; set; }
string FirmwareVersion { get; set; }
DateTime CalDate { get; set; }
int ProtocolVersion { get; set; }
DateTime LastModified { get; set; }
string LastModifiedBy { get; set; }
int Version { get; set; }
bool LocalOnly { get; set; }
DateTime LastUsed { get; set; }
string LastUsedBy { get; set; }
/// <summary>
/// Used to determine DAS connectivity for Hardware Scan
/// </summary>
string Connection { get; set; }
int Channels { get; set; }
string Position { get; set; }
int [] ChannelTypes { get; set; }
bool IsProgrammable { get; set; }
bool IsReconfigurable { get; set; }
/// <summary>
/// the module flag is whether this hardware is operating by itself or as part
/// of a collection (a rack module)
/// </summary>
bool IsModule { get; set; }
int PositionOnDistributor { get; set; }
int PositionOnChain { get; set; }
int Port { get; set; }
string ParentDAS { get; set; }
/// <summary>
/// first date of use after calibration
/// only valid if IsFirstUseValid is true
/// null value indicates hardware has not been used since calibration
/// (once again, only if IsFirstUseValid is true)
/// 15524 DAS "First Use Date"
/// </summary>
DateTime? FirstUseDate { get; set; }
/// <summary>
/// The test id this hardware is associated with if it's a
/// standin hardware existing in a test only
/// 15727 Building and Replacing Racks/Mods
/// </summary>
int? TestId { get; set; }
/// <summary>
/// The group id this hardware is associated with if it's a
/// standin hardware existing in a group only
/// </summary>
int? GroupId { get; set; }
/// <summary>
/// whether this hardware is standin/dummy hardware and not actually
/// physical hardware that data can be collected on
/// </summary>
bool StandIn { get; set; }
double MaxAAFRate { get; set; }
/// <summary>
/// whether hardware supports and is using first use date
/// 15524 DAS "First Use Date"
/// </summary>
bool IsFirstUseValid { get; set; }
}
}

View File

@@ -0,0 +1,83 @@
using DTS.Common.Enums.Hardware;
using System;
namespace DTS.Common.Interface.DataRecorders
{
/// <summary>
/// represents hardware in TTS import
/// </summary>
public interface IDASHardware
{
/// <summary>
/// returns true if the hardware is standin for a real das, but not a physical das in itself
/// </summary>
/// <returns></returns>
bool IsStandIn();
/// <summary>
/// whether hardware supports and is using first use date
/// 15524 DAS "First Use Date"
/// </summary>
bool IsFirstUseValid { get; }
/// <summary>
/// first date of use after calibration
/// only valid if IsFirstUseValid is true
/// null value indicates hardware has not been used since calibration
/// (once again, only if IsFirstUseValid is true)
/// 15524 DAS "First Use Date"
/// </summary>
DateTime? FirstUseDate { get; }
bool IsPseudoRack();
int DASId { get; }
string SerialNumber { get; set; }
string SerialNumberFamily { get; set; }
string EIDFound { get; set; }
string BatteryVoltageStatus { get; set; }
System.Windows.Media.SolidColorBrush BatteryVoltageColor { get; set; }
string InputVoltageStatus { get; set; }
System.Windows.Media.SolidColorBrush InputVoltageColor { get; set; }
/// <summary>
/// Used to display DAS connectivity in Hardware Scan
/// </summary>
string ParentDAS { get; set; }
/// <summary>
/// Used to determine DAS connectivity for Hardware Scan
/// </summary>
string Connection { get; set; }
IHardwareChannel[] GetIHardwareChannels();
/// <summary>
/// returns whether DAS is a SLICE Ethernet Controller or not
/// </summary>
bool IsSLICEEthernetController { get; }
/// <summary>
/// returns true if the the DAS is a TDAS rack
/// </summary>
/// <returns></returns>
bool IsTDASRack();
bool IsG5();
bool IsTSRAIR();
bool IsTSRAIRModule();
/// <summary>
/// returns the minimum sample rate allowed on this DAS
/// </summary>
double GetMinSampleRateDouble();
/// <summary>
/// returns the maximum sample rate allowed on this DAS
/// </summary>
double GetMaxSampleRateDouble();
/// <summary>
/// TTS import sets to True for modules which should not be displayed in Hardware Scan (Slice bridges)
/// and to False for modules which should be displayed (those in TDAS racks)
/// </summary>
/// <returns></returns>
bool IsModule();
string LastModifiedBy { get; set; }
DateTime LastModified { get; set; }
HardwareTypes DASTypeEnum { get; set; }
}
}

View File

@@ -0,0 +1,76 @@
using DTS.Common.Enums;
using DTS.Common.Enums.Sensors;
using DTS.Common.Interface.DASFactory.Diagnostics;
namespace DTS.Common.Interface.DataRecorders
{
public interface IHardwareChannel
{
/// <summary>
/// diagnostic results for this channel if available (null otherwise)
/// </summary>
IDiagnosticResult Diagnostics { get; }
/// <summary>
/// returns whether the channel supports the given bridge type
/// </summary>
/// <param name="bridgeType"></param>
/// <returns></returns>
bool IsSupportedBridgeType(SensorConstants.BridgeType bridgeType);
int ChannelNumber { get; }
string GetId();
/// <summary>
/// returns true if the channel supports analog sensors
/// </summary>
bool IsAnalog { get; }
/// <summary>
/// returns true if chanel supports squibs
/// </summary>
bool IsSquib { get; }
/// <summary>
/// returns true if the channel supports digital outputs
/// </summary>
bool IsDigitalOut { get; }
/// <summary>
/// returns true if the channel supports digital inputs
/// </summary>
bool IsDigitalIn { get; }
/// <summary>
/// returns true if the channel supports uart i/o
/// </summary>
bool IsUart { get; }
/// <summary>
/// returns true if the channel supports stream input
/// </summary>
bool IsStreamIn { get; }
/// <summary>
/// returns true if the channel supports stream output
/// </summary>
bool IsStreamOut { get; }
/// <summary>
/// returns true if the channel supports clocks
/// </summary>
bool IsClock { get; }
bool IsTSRAIR { get; }
bool IsTSRAIRModule { get; }
/// <summary>
/// returns the DAS this channel belongs to
/// </summary>
/// <returns></returns>
IDASHardware GetParentDAS();
/// <summary>
/// returns the module serial number this channel belongs to
/// </summary>
string ModuleSerialNumber { get; set; }
/// <summary>
/// returns whether or not a given excitation is supported by the hardware channel
/// </summary>
bool IsSupportedExcitation(ExcitationVoltageOptions.ExcitationVoltageOption excitation);
/// <summary>
/// returns true if the serial number starts with "5M"
/// </summary>
/// <returns></returns>
bool IsG5();
string ToString(IDASHardware [] hardwares);
}
}