init
This commit is contained in:
@@ -0,0 +1,65 @@
|
||||
namespace DTS.Common.Interface.DASFactory.Diagnostics
|
||||
{
|
||||
public interface IDiagnosticActions
|
||||
{
|
||||
/// <summary>
|
||||
/// Which DAS Channel (CH# WRT entire DAS unit) are these diagnostic test
|
||||
/// instructions for?
|
||||
/// </summary>
|
||||
int DASChannelNumber { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Should we measure the excitation voltage being applied to this sensor?
|
||||
/// </summary>
|
||||
bool MeasureExcitation { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Should we measure the sensor's offset from 0? (If measured, the returned offset can
|
||||
/// be checked against the high and low offset limits that are properties of the
|
||||
/// AnalogInputDasChannel object corresponding to this sensor.)
|
||||
/// </summary>
|
||||
bool MeasureOffset { get; set; }
|
||||
/// <summary>
|
||||
/// should we check the open/closed/low/high nature of a digital input channel?
|
||||
/// </summary>
|
||||
bool CheckDigitalState { get; set; }
|
||||
|
||||
bool MeasureInternalOffset { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Should the firmware compensate for the offset from 0 of this sensor?
|
||||
/// </summary>
|
||||
bool RemoveOffset { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Should we measure the noise floor as a percentage of full scale readings?
|
||||
/// </summary>
|
||||
bool MeasureNoise { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Should an emulated shunt-check be performed on this sensor.
|
||||
/// </summary>
|
||||
bool PerformShuntCheck { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// should run a squib fire check on channel
|
||||
/// </summary>
|
||||
bool SquibFireCheck { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// perform a voltage insertion gain check (SLICE Pro)
|
||||
/// </summary>
|
||||
bool PerformVoltageInsertCheck { get; set; }
|
||||
/// <summary>
|
||||
/// Should a Calibration signal-check be performed on this sensor.
|
||||
/// </summary>
|
||||
bool PerformCalSignalCheck { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Should the resistance of the bridge be measured?
|
||||
/// </summary>
|
||||
bool MeasureBridgeResistance { get; set; }
|
||||
|
||||
bool AllActionsDisabled();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,60 @@
|
||||
using System;
|
||||
using System.Globalization;
|
||||
using System.Windows.Data;
|
||||
using DTS.Common.Enums;
|
||||
|
||||
namespace DTS.Common.Converters
|
||||
{
|
||||
public class TestDataToRegionOfInterestMaximumConverter : IMultiValueConverter
|
||||
{
|
||||
public object Convert(object[] values, Type targetType, object parameter, CultureInfo culture)
|
||||
{
|
||||
//values: dataStart, dataEnd, PreTrigger, PostTrigger, RecordingMode
|
||||
if (values.Length == 5)
|
||||
{
|
||||
if (values[2] is double && values[3] is double postTrigger &&
|
||||
values[4] is RecordingModes recordingMode)
|
||||
{
|
||||
switch (recordingMode)
|
||||
{
|
||||
case RecordingModes.CircularBuffer:
|
||||
case RecordingModes.RAMActive:
|
||||
case RecordingModes.MultipleEventRAMActive:
|
||||
case RecordingModes.CircularBufferAndStreamSubSample:
|
||||
case RecordingModes.CircularBufferPlusUART:
|
||||
case RecordingModes.MultipleEventCircularBuffer:
|
||||
case RecordingModes.MultipleEventCircularBufferPlusUART:
|
||||
//maximum is PostTrigger
|
||||
return postTrigger;
|
||||
case RecordingModes.Recorder:
|
||||
case RecordingModes.RecorderPlusUART:
|
||||
case RecordingModes.MultipleEventRecorder:
|
||||
case RecordingModes.MultipleEventRecorderPlusUART:
|
||||
case RecordingModes.HybridRecorder:
|
||||
case RecordingModes.HybridAndStream:
|
||||
case RecordingModes.MultipleEventHybridAndStream:
|
||||
case RecordingModes.MultipleEventHybridRecorder:
|
||||
case RecordingModes.ContinuousRecorder:
|
||||
case RecordingModes.ContinuousRecorderPlusUART:
|
||||
case RecordingModes.RecordOnBoot:
|
||||
case RecordingModes.RecordOnBootPlusUART:
|
||||
case RecordingModes.RecorderAndStreamSubSample:
|
||||
case RecordingModes.MultipleEventRecorderAndStream:
|
||||
// FB16465: maximum is DataEnd. if it's currently unknown, return PostTrigger
|
||||
// FB17991: could also be set to Max instead of unknown, same difference
|
||||
case RecordingModes.Active:
|
||||
case RecordingModes.MultipleEventActive:
|
||||
// FB18333: max holds for Active too.
|
||||
return values[1] is double end ? end < double.MaxValue ? end : postTrigger : postTrigger;
|
||||
}
|
||||
}
|
||||
}
|
||||
return double.PositiveInfinity;
|
||||
}
|
||||
|
||||
public object[] ConvertBack(object value, Type[] targetTypes, object parameter, CultureInfo culture)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
using Prism.Modularity;
|
||||
// ReSharper disable CheckNamespace
|
||||
|
||||
namespace DTS.Common.Interface
|
||||
{
|
||||
public interface IExportModule : IModule
|
||||
{
|
||||
void StartSession();
|
||||
bool SessionStarted { get; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
|
||||
//FB 6399 The interface that represents the Multiple download event
|
||||
using System;
|
||||
using System.ComponentModel;
|
||||
|
||||
namespace DTS.Common.Interface.DownloadEvent
|
||||
{
|
||||
public interface IDownloadEvent : INotifyPropertyChanged
|
||||
{
|
||||
int EventNumber { get; set; }
|
||||
string EventNumberDisplay { get; set; }
|
||||
bool IsEnabled { get; set; }
|
||||
bool IsReadonly { get; set; }
|
||||
bool IsDefault { get; }
|
||||
/// <summary>
|
||||
/// total length available for download event
|
||||
/// </summary>
|
||||
TimeSpan EventLength { get; set; }
|
||||
/// <summary>
|
||||
/// Whether event length should be displayed in UI or not
|
||||
/// </summary>
|
||||
bool ShouldDisplayLength { get; set; }
|
||||
string TestItem { get; set; }
|
||||
string DTSFile { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
using DTS.Common.Enums.Hardware;
|
||||
using DTS.Common.Interface.DataRecorders;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace DTS.Common.Interface.DASFactory.Diagnostics
|
||||
{
|
||||
public interface IISOHardware : IDASDBRecord
|
||||
{
|
||||
void GetChannelsString(out int analog, out int digitalIn, out int digitalOut, out int squib, out int uart, out int streamOut, out int streamIn, out int can);
|
||||
HardwareTypes DASTypeEnum { get; set; }
|
||||
string IPAddress { get; set; }
|
||||
//Pseudo racks are racks are collections of hardware that associated with each
|
||||
//other but aren't racks, this includes SLICE slabs and SLICE6 with S6DB
|
||||
//this just indicates whether it's capable, not whether it's serving that role
|
||||
bool IsPseudoRackModule();
|
||||
bool IsTSRAIR();
|
||||
bool ValidateSerialNumber(ref List<string> errors);
|
||||
bool ValidateIPAddress(ref List<string> errors);
|
||||
void Insert();
|
||||
void Update();
|
||||
/// <summary>
|
||||
/// remove this hardware from the database
|
||||
/// </summary>
|
||||
void Delete();
|
||||
}
|
||||
}
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 261 B |
@@ -0,0 +1,7 @@
|
||||
using System.Windows;
|
||||
using DTS.Common.Base;
|
||||
|
||||
namespace DTS.Common.Interface
|
||||
{
|
||||
public interface IViewerShellView : IBaseView { }
|
||||
}
|
||||
@@ -0,0 +1,47 @@
|
||||
using Prism.Events;
|
||||
|
||||
namespace DTS.Common.Events.TSRAIRGo
|
||||
{
|
||||
//FB 39466 Events to notify DAS and System Settings
|
||||
public class SystemSettingsLevelTriggerChangedEvent : PubSubEvent<LevelTriggerArg> { }
|
||||
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessage("Minor Code Smell", "S101:Types should be named in PascalCase", Justification = "DAS allowed")]
|
||||
public class DASLevelTriggerChangedEvent : PubSubEvent<LevelTriggerArg> { }
|
||||
|
||||
public class LevelTriggerArg
|
||||
{
|
||||
public string LevelTriggerText { get; set; }
|
||||
public bool? LevelTriggerAxis1 { get; set; }
|
||||
public bool? LevelTriggerAxis2 { get; set; }
|
||||
public bool? LevelTriggerAxis3 { get; set; }
|
||||
|
||||
public override bool Equals(object obj)
|
||||
{
|
||||
LevelTriggerArg lt = obj as LevelTriggerArg;
|
||||
if (obj == null)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
if (LevelTriggerAxis1.HasValue && lt.LevelTriggerAxis1.HasValue)
|
||||
{
|
||||
return LevelTriggerAxis1.Value && lt.LevelTriggerAxis1.Value;
|
||||
}
|
||||
else if (LevelTriggerAxis2.HasValue && lt.LevelTriggerAxis2.HasValue)
|
||||
{
|
||||
return LevelTriggerAxis2.Value && lt.LevelTriggerAxis2.Value;
|
||||
}
|
||||
else if (LevelTriggerAxis3.HasValue && lt.LevelTriggerAxis3.HasValue)
|
||||
{
|
||||
return LevelTriggerAxis3.Value && lt.LevelTriggerAxis3.Value;
|
||||
}
|
||||
else if (!string.IsNullOrEmpty(LevelTriggerText) && !string.IsNullOrEmpty(lt.LevelTriggerText))
|
||||
{
|
||||
return LevelTriggerText == lt.LevelTriggerText;
|
||||
}
|
||||
|
||||
return false;
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user