init
This commit is contained in:
@@ -0,0 +1,121 @@
|
||||
using DTS.Common.Converters;
|
||||
using DTS.Common.Interface.DASFactory;
|
||||
using DTS.Common.Interface.DASFactory.Diagnostics.HardwareList;
|
||||
using DTS.Common.Interface.DataRecorders;
|
||||
using System;
|
||||
using System.ComponentModel;
|
||||
using System.Net;
|
||||
|
||||
namespace DTS.Common.Interface.Hardware
|
||||
{
|
||||
public interface IAllATDStatus
|
||||
{
|
||||
IATDStatus[] ATDs { get; }
|
||||
void AddDevice(IDeviceArmStatus device, string parent);
|
||||
void PopulateFromHardware(IDASHardware[] hardware);
|
||||
AllATDStatuses OverallStatus { get; }
|
||||
}
|
||||
|
||||
public enum AllATDStatuses
|
||||
{
|
||||
NotConnected,
|
||||
Connecting,
|
||||
AllConnected,
|
||||
AllArmed,
|
||||
Errors
|
||||
}
|
||||
public interface IATDStatus
|
||||
{
|
||||
AllATDStatuses Status { get; }
|
||||
IDistributorArmStatus[] Distributors { get; }
|
||||
void AddDistributor(IDistributorArmStatus distributor);
|
||||
IPAddress IP { get; }
|
||||
void SetIP(IPAddress ip);
|
||||
void UpdateAggregateStatus();
|
||||
}
|
||||
public interface IDistributorArmStatus
|
||||
{
|
||||
bool EmptyDistributor { get; }
|
||||
IDeviceArmStatus Distributor { get; }
|
||||
void SetDistributor(IDeviceArmStatus distributor);
|
||||
DistributorStatuses DistributorStatus { get; }
|
||||
void SetDistributorStatus(DistributorStatuses status);
|
||||
AllATDStatuses AggregateStatus { get; }
|
||||
IDeviceArmStatus[] Devices { get; }
|
||||
void AddDevice(IDeviceArmStatus device);
|
||||
string SerialNumber { get; }
|
||||
void SetSerialNumber(string serial);
|
||||
void UpdateAggregateStatus();
|
||||
DateTime? LastSeen { get; }
|
||||
float? InputVoltage { get; }
|
||||
float? BackupVoltage { get; }
|
||||
void UpdateStatusFromQATS(IUDPQATSEntry qats);
|
||||
}
|
||||
[TypeConverter(typeof(EnumDescriptionTypeConverter))]
|
||||
public enum DistributorStatuses
|
||||
{
|
||||
[Description("DistributorStatus_OFFLINE")]
|
||||
NotConnected,
|
||||
[Description("DistributorStatus_ONLINE")]
|
||||
Connected,
|
||||
[Description("DistributorStatus_ARMED")]
|
||||
Armed,
|
||||
[Description("DistributorStatus_IDLE")]
|
||||
NotArmed,
|
||||
[Description("DistributorStatus_ARMEDFAULTED")]
|
||||
Errored
|
||||
}
|
||||
[TypeConverter(typeof(EnumDescriptionTypeConverter))]
|
||||
public enum DASStatuses
|
||||
{
|
||||
[Description("DASStatus_Offline")]
|
||||
MissingNotBooted,
|
||||
[Description("DASStatus_Online")]
|
||||
BootedNotArmedYet,
|
||||
[Description("DASStatus_Online")]
|
||||
BootedNeverArmed,
|
||||
[Description("DASStatus_ARMED")]
|
||||
ArmedReady,
|
||||
[Description("DASStatus_ARMEDFAULTED")]
|
||||
ArmedButFailedDiag,
|
||||
[Description("DASStatus_READYFORDL")]
|
||||
ReadyForDownload
|
||||
}
|
||||
[Flags]
|
||||
public enum DiagStatuses
|
||||
{
|
||||
Passed,
|
||||
NoResults,
|
||||
FailedShunt,
|
||||
FailedOffset,
|
||||
FailedTilt,
|
||||
FailedTemperature
|
||||
}
|
||||
public interface IDeviceArmStatus
|
||||
{
|
||||
bool HasArmed { get; set; }
|
||||
DASStatuses DASStatus { get; }
|
||||
void SetDASStatus(DASStatuses status);
|
||||
DiagStatuses DiagStatus { get; }
|
||||
void SetDiagStatus(DiagStatuses status);
|
||||
IDistributorArmStatus Distributor { get; }
|
||||
void SetDistributor(IDistributorArmStatus distributor);
|
||||
IDASHardware Hardware { get; }
|
||||
void SetHardware(IDASHardware hardware);
|
||||
IDASCommunication DASCommunication { get; }
|
||||
void SetDASCommunication(IDASCommunication das);
|
||||
string SerialNumber { get; }
|
||||
void SetSerialNumber(string serial);
|
||||
DateTime? LastSeen { get; }
|
||||
float? InputVoltage { get; }
|
||||
float? BackupVoltage { get; }
|
||||
void UpdateStatusFromQATS(IUDPQATSEntry qats);
|
||||
string ShuntResults { get; }
|
||||
string OffsetResults { get; }
|
||||
double? TiltX { get; }
|
||||
double? TiltY { get; }
|
||||
double? TiltZ { get; }
|
||||
string IPAddress { get; }
|
||||
bool Triggered { get; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
using System;
|
||||
using System.Windows.Data;
|
||||
|
||||
namespace DTS.Common.Converters
|
||||
{
|
||||
/// <summary>
|
||||
/// Date converter that will display Table_NA when date is null, otherwise datetime [xaml responsible for formatting]
|
||||
/// </summary>
|
||||
public class DateConverter : IValueConverter
|
||||
{
|
||||
public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
|
||||
{
|
||||
if (value is DateTime dt) { return dt; }
|
||||
return Strings.Strings.Table_NA;
|
||||
}
|
||||
|
||||
public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
|
||||
{
|
||||
if (value is DateTime dt) { return dt; }
|
||||
return Strings.Strings.Table_NA;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,58 @@
|
||||
using System;
|
||||
|
||||
namespace DTS.Common.Interface.DASFactory.Diagnostics.HardwareList
|
||||
{
|
||||
public interface IHardware
|
||||
{
|
||||
int DASId { get; set; }
|
||||
bool Disabled { get; set; }
|
||||
bool Included { get; set; }
|
||||
double DSPStreamingFilter { get; set; }
|
||||
double TestSampleRate { get; set; }
|
||||
string SerialNumber { get; set; }
|
||||
string HardwareType { get; set; }
|
||||
string ChannelCount { get; set; }
|
||||
string Firmware { get; set; }
|
||||
double? MaxSampleRate { get; set; }
|
||||
DateTime? CalDate { get; set; }
|
||||
DateTime? CalDueDate { get; set; }
|
||||
object Hardware { get; set; }
|
||||
void SetIncluded(bool bIncluded);
|
||||
void SetMixedRates(bool mixed);
|
||||
bool Filter(string term);
|
||||
string ParentDAS { get; set; }
|
||||
int PositionOnChain { get; set; }
|
||||
int PositionOnDistributor { get; set; }
|
||||
int Port { get; set; }
|
||||
int AnalogChannels { get; set; }
|
||||
int SquibChannels { get; set; }
|
||||
int DigitalInChannels { get; set; }
|
||||
int DigitalOutChannels { get; set; }
|
||||
int UartChannels { get; set; }
|
||||
int StreamOutChannels { get; set; }
|
||||
int StreamInChannels { get; set; }
|
||||
/// <summary>
|
||||
/// determines the ChannelCount text
|
||||
/// </summary>
|
||||
/// <param name="showCompact">whether to show compact or expanded
|
||||
/// compact will not show SLICEPro units connect to ECMs
|
||||
/// </param>
|
||||
void DetermineChannelCount(bool showCompact, IHardware[] allHardware);
|
||||
string IPAddress { 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>
|
||||
/// whether hardware supports and is using first use date
|
||||
/// 15524 DAS "First Use Date"
|
||||
/// </summary>
|
||||
bool IsFirstUseValid { get; set; }
|
||||
bool IsTSRAIR { get; }
|
||||
byte PTPDomainID { get; set; }
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user