init
This commit is contained in:
@@ -0,0 +1,7 @@
|
||||
using DTS.Common.Base;
|
||||
// ReSharper disable CheckNamespace
|
||||
|
||||
namespace DTS.Common.Interface
|
||||
{
|
||||
public interface ITestModificationView : IBaseView { }
|
||||
}
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 488 B |
@@ -0,0 +1,156 @@
|
||||
using DTS.Common.Enums.Sensors;
|
||||
|
||||
namespace DTS.Common.Interface.DASFactory.Diagnostics
|
||||
{
|
||||
public interface IDiagnosticResult
|
||||
{
|
||||
/// <summary>
|
||||
/// Which DASChannel from which this diagnostics is returning.
|
||||
/// </summary>
|
||||
int DASChannelNumber { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The event number that this diagnostics is relevant for.
|
||||
/// </summary>
|
||||
int EventNumber { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The firmware calculates a scale factory for the channel's input. The hardware will
|
||||
/// deliver raw, unprocessed data upon download, but to diagnos this data to
|
||||
/// reflect real world votages it must be scaled based on the DAS unit's factory
|
||||
/// diagnostics as well as results from this diagnose. The samples that
|
||||
/// will be downloaded will be straight from the A to D Converter so this scale
|
||||
/// factor is MANDATORY and must be used at the software level to scale the data
|
||||
/// to the real sensed voltages and engineering units.
|
||||
/// </summary>
|
||||
double ScalefactorMilliVoltsPerADC { get; set; }
|
||||
double ScalefactorEngineeringUnitsPerADC { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The factory excitation value (mandatory)
|
||||
/// </summary>
|
||||
double ExpectedExcitationMilliVolts { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// gets what will probably be the datazerolevel adc for the channel
|
||||
/// </summary>
|
||||
/// <param name="zeroMethod"></param>
|
||||
/// <returns></returns>
|
||||
short GetExpectedDataZeroLevelADC(ZeroMethodType zeroMethod);
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Excitation voltage provided to sensor as measured by the firmware during
|
||||
/// calibration. When read from event attributes, a value of 0.0 might actually
|
||||
/// mean null (i.e. was not measured).
|
||||
/// </summary>
|
||||
double? MeasuredExcitationMilliVolts { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// flag to indicate whether MeasuredExcitationMilliVolts was negative when it was initially read
|
||||
/// 14233 Negative Excitation Reported by TDAS hardware not showing in Diagnostics
|
||||
/// this was created to relate to legacy TDC/TDAS broken sensor/wire warnings carried through
|
||||
/// the excitation reading
|
||||
/// </summary>
|
||||
bool NegativeExcitation { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// What is the sensor's offset reading from the 0 level? This is measured by firmware
|
||||
/// during the calibration. When read from event attributes, a value of 0.0 might actually
|
||||
/// mean null (i.e. was not measured).
|
||||
/// </summary>
|
||||
double? MeasuredOffsetMilliVolts { get; set; }
|
||||
|
||||
double? MeasuredInternalOffsetMilliVolts { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// What is the sensor's offset reading from the 0 level? This is measured by firmware
|
||||
/// during the calibration. When read from event attributes, a value of 0.0 might actually
|
||||
/// mean null (i.e. was not measured).
|
||||
/// </summary>
|
||||
double? MeasuredOffsetEngineeringUnits { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// when a channel is autozero'd (remove offset)
|
||||
/// this is the devation from 0 (from RW Auto zero is checking for +/- 5% from 0 in counts.)
|
||||
/// </summary>
|
||||
double? AutoZeroPercentDeviation { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// If the <see cref="DTS.DASLib.Service.DiagnosticsService" />.Calibrate method was called with the "RemoveOffset" boolean variable set
|
||||
/// to TRUE then the firmware will attempt to remove the offset of the sensor, moving it's base
|
||||
/// reading back to 0. This value is how much offset is present after removing the offset. While the
|
||||
/// offset my not be compeletely removed it may have been reduced to fall within the high and low
|
||||
/// limits for acceptable offsets for the sensor. See <see cref="AnalogInputDASChannel" /> to find
|
||||
/// these sensor specific values. When read from event attributes, a value of 0.0 might actually
|
||||
/// mean null (i.e. was not measured).
|
||||
/// </summary>
|
||||
short? FinalOffsetADC { get; set; }
|
||||
|
||||
int? RemovedOffsetADC { get; set; }
|
||||
|
||||
int? RemovedInternalOffsetADC { get; set; }
|
||||
/// <summary>
|
||||
/// FullScaleSignal to Noise ratio as a percentage. When read from event attributes, a value of 0.0 might actually
|
||||
/// mean null (i.e. was not measured).
|
||||
/// </summary>
|
||||
double? NoisePercentFullScale { get; set; }
|
||||
|
||||
bool ShuntDeflectionFailed { get; set; }
|
||||
|
||||
bool CalSignalCheckFailed { get; set; }
|
||||
/// <summary>
|
||||
/// If an emulated shunt test is performed the measured shunt deflection in mV detected
|
||||
/// during the test will be here.
|
||||
/// <see cref="DTS.DASLib.Service.DiagnosticsActions" />.PerformShuntCheck
|
||||
/// When read from event attributes, a value of 0.0 might actually mean null
|
||||
/// (i.e. was not measured).
|
||||
/// </summary>
|
||||
double? MeasuredShuntDeflectionMv { get; set; }
|
||||
|
||||
double? MeasuredCalSignalMv { get; set; }
|
||||
double? TargetCalSignalMv { get; set; }
|
||||
|
||||
double? MeasuredDurationMS { get; set; }
|
||||
|
||||
double? MeasuredDelayMS { get; set; }
|
||||
bool? SquibFirePassed { get; set; }
|
||||
bool? SquibDurationPassed { get; set; }
|
||||
bool? SquibDelayPassed { get; set; }
|
||||
double[] SquibFireCurrentData { get; set; }
|
||||
double[] SquibFireVoltageData { get; set; }
|
||||
double[] SquibFireTimeAxis { get; set; }
|
||||
double SquibThreshold { get; set; }
|
||||
|
||||
double SquibVoltageScaler { get; set; }
|
||||
double SquibCurrentScaler { get; set; }
|
||||
|
||||
double? TargetGain { get; set; }
|
||||
double? MeasuredGain { get; set; }
|
||||
double? QueriedGain { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// If an emulated shunt test is performed the target shunt deflection in mV will be here.
|
||||
/// CalibrateActions.PerformShuntCheck When read from event attributes, a value of 0.0 might actually
|
||||
/// mean null (i.e. was not measured).
|
||||
/// </summary>
|
||||
double? TargetShuntDeflectionMv { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// If the bridge resistance of the sensor was measured, the measured resistance in
|
||||
/// ohms will be here. <see cref="DiagnosticsActions.MeasureBridgeResistance" />
|
||||
/// When read from event attributes, a value of 0.0 might actually mean null
|
||||
/// (i.e. was not measured).
|
||||
/// </summary>
|
||||
double? BridgeResistance { get; set; }
|
||||
|
||||
short ZeroMVInADC { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// WindowAverageADC is the average ADC over the averaging window specified for the channel
|
||||
/// short.MinValue indicates an unitialized or invalid value
|
||||
/// </summary>
|
||||
short WindowAverageADC { get; set; }
|
||||
bool DigitalInputActiveState { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,86 @@
|
||||
using DTS.Common.Interface.Groups;
|
||||
using System.Data;
|
||||
|
||||
namespace DTS.Common.Classes.Groups
|
||||
{
|
||||
/// <summary>
|
||||
/// represents an association of groups to test setups and additional
|
||||
/// test setup specific meta data for a group
|
||||
/// <inheritdoc cref="ITestSetupGroupRecord"/>
|
||||
/// </summary>
|
||||
public class TestSetupGroupRecord : Base.BasePropertyChanged, ITestSetupGroupRecord
|
||||
{
|
||||
private int _groupId = -1;
|
||||
/// <summary>
|
||||
/// database id of group
|
||||
/// </summary>
|
||||
public int GroupId
|
||||
{
|
||||
get => _groupId;
|
||||
set => SetProperty(ref _groupId, value, "GroupId");
|
||||
}
|
||||
private int _displayOrder = -1;
|
||||
/// <summary>
|
||||
/// display order of group
|
||||
/// </summary>
|
||||
public int DisplayOrder
|
||||
{
|
||||
get => _displayOrder;
|
||||
set => SetProperty(ref _displayOrder, value, "DisplayOrder");
|
||||
}
|
||||
private string _position = "";
|
||||
/// <summary>
|
||||
/// Position field (ISO 13499) for group, if available
|
||||
/// [groups can be made of mixed position fields]
|
||||
/// </summary>
|
||||
public string Position
|
||||
{
|
||||
get => _position;
|
||||
set => SetProperty(ref _position, value, "Position");
|
||||
}
|
||||
private string _testObjectType = "";
|
||||
/// <summary>
|
||||
/// Test Object field (ISO 13499) for group, if available
|
||||
/// [groups can be made of mixed test object fields]
|
||||
/// </summary>
|
||||
public string TestObjectType
|
||||
{
|
||||
get => _testObjectType;
|
||||
set => SetProperty(ref _testObjectType, value, "TestObjectType");
|
||||
}
|
||||
private int _testSetupId = -1;
|
||||
/// <summary>
|
||||
/// database id of test setup group belongs to
|
||||
/// </summary>
|
||||
public int TestSetupId
|
||||
{
|
||||
get => _testSetupId;
|
||||
set => SetProperty(ref _testSetupId, value, "TestSetupId");
|
||||
}
|
||||
public TestSetupGroupRecord() { }
|
||||
/// <summary>
|
||||
/// creates record using data reader
|
||||
/// </summary>
|
||||
/// <param name="reader"></param>
|
||||
public TestSetupGroupRecord(IDataReader reader)
|
||||
{
|
||||
GroupId = Utility.GetInt(reader, "GroupId");
|
||||
DisplayOrder = Utility.GetInt(reader, "DisplayOrder");
|
||||
Position = Utility.GetString(reader, "Position");
|
||||
TestObjectType = Utility.GetString(reader, "TestObjectType");
|
||||
TestSetupId = Utility.GetInt(reader, "TestSetupId");
|
||||
}
|
||||
/// <summary>
|
||||
/// copy constructor
|
||||
/// </summary>
|
||||
/// <param name="copy"></param>
|
||||
public TestSetupGroupRecord(ITestSetupGroupRecord copy)
|
||||
{
|
||||
GroupId = copy.GroupId;
|
||||
DisplayOrder = copy.DisplayOrder;
|
||||
Position = copy.Position;
|
||||
TestObjectType = copy.TestObjectType;
|
||||
TestSetupId = copy.TestSetupId;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
namespace DTS.Common.Enums.Sensors
|
||||
{
|
||||
/// <summary>
|
||||
/// describes different ways of filtering channels and sensors by type
|
||||
/// </summary>
|
||||
public enum PossibleFilters
|
||||
{
|
||||
All,
|
||||
Analog,
|
||||
Squib,
|
||||
DigitalIn,
|
||||
DigitalOut,
|
||||
UART,
|
||||
StreamOut,
|
||||
StreamIn,
|
||||
CAN
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
using DTS.Common.Base;
|
||||
|
||||
namespace DTS.Common.Interface
|
||||
{
|
||||
public interface ITestsView : IBaseView { }
|
||||
}
|
||||
Binary file not shown.
Binary file not shown.
|
After Width: | Height: | Size: 1.5 KiB |
@@ -0,0 +1,82 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Xml.Serialization;
|
||||
|
||||
namespace DTS.DASLib.Utility
|
||||
{
|
||||
|
||||
public class XmlDictionary
|
||||
{
|
||||
public SerializableDictionary<string, object> Dictionary { get; set; } = new SerializableDictionary<string, object>();
|
||||
}
|
||||
|
||||
[XmlRoot("dictionary")]
|
||||
public class SerializableDictionary<TKey, TValue>
|
||||
|
||||
: Dictionary<TKey, TValue>, IXmlSerializable
|
||||
{
|
||||
|
||||
#region IXmlSerializable Members
|
||||
|
||||
public System.Xml.Schema.XmlSchema GetSchema()
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
|
||||
public void ReadXml(System.Xml.XmlReader reader)
|
||||
{
|
||||
var keySerializer = new XmlSerializer(typeof(TKey));
|
||||
var valueSerializer = new XmlSerializer(typeof(TValue));
|
||||
|
||||
var wasEmpty = reader.IsEmptyElement;
|
||||
reader.Read();
|
||||
|
||||
if (wasEmpty)
|
||||
return;
|
||||
reader.ReadStartElement("items");
|
||||
while (reader.NodeType != System.Xml.XmlNodeType.EndElement)
|
||||
{
|
||||
reader.ReadStartElement("item");
|
||||
|
||||
reader.ReadStartElement("key");
|
||||
var key = (TKey)keySerializer.Deserialize(reader);
|
||||
reader.ReadEndElement();
|
||||
|
||||
reader.ReadStartElement("value");
|
||||
var value = (TValue)valueSerializer.Deserialize(reader);
|
||||
reader.ReadEndElement();
|
||||
|
||||
Add(key, value);
|
||||
|
||||
reader.ReadEndElement();
|
||||
reader.MoveToContent();
|
||||
}
|
||||
reader.ReadEndElement();
|
||||
}
|
||||
|
||||
public void WriteXml(System.Xml.XmlWriter writer)
|
||||
{
|
||||
var keySerializer = new XmlSerializer(typeof(TKey));
|
||||
var valueSerializer = new XmlSerializer(typeof(TValue));
|
||||
writer.WriteStartElement("items");
|
||||
foreach (var key in Keys)
|
||||
{
|
||||
writer.WriteStartElement("item");
|
||||
|
||||
writer.WriteStartElement("key");
|
||||
keySerializer.Serialize(writer, key);
|
||||
writer.WriteEndElement();
|
||||
|
||||
writer.WriteStartElement("value");
|
||||
var value = this[key];
|
||||
valueSerializer.Serialize(writer, value);
|
||||
writer.WriteEndElement();
|
||||
|
||||
writer.WriteEndElement();
|
||||
}
|
||||
writer.WriteEndElement();
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
using System.Collections.Generic;
|
||||
using DTS.Common.Base;
|
||||
|
||||
namespace DTS.Common.Interface.Groups
|
||||
{
|
||||
/// <summary>
|
||||
/// the options view controls selecting files and validating the selection
|
||||
/// </summary>
|
||||
public interface IGroupImportOptionsView : IBaseView
|
||||
{
|
||||
/// <summary>
|
||||
/// returns true if files have been selected, false if files are not selected
|
||||
/// </summary>
|
||||
/// <param name="errors">any errors that were detected during validation</param>
|
||||
/// <param name="warnings">any warnings that were detected during validation</param>
|
||||
/// <returns></returns>
|
||||
bool Validate(out List<string> errors, out List<string> warnings);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user