init
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
// ReSharper disable CheckNamespace
|
||||
|
||||
namespace DTS.Common.Interface
|
||||
{
|
||||
public interface ITestRunMetadata : INotifyPropertyChanged
|
||||
{
|
||||
string Id { get; set; }
|
||||
string Description { get; set; }
|
||||
bool InlineSerializedData { get; set; }
|
||||
string TestGuid { get; set; }
|
||||
int FaultFlags { get; set; }
|
||||
string Software { get; set; }
|
||||
string SoftwareVersion { get; set; }
|
||||
string DataType { get; set; }
|
||||
List<ITestModule> Modules { get; set; }
|
||||
List<ITestChannel> Channels { get; set; }
|
||||
List<ITestChannel> CalculatedChannels { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Xml.Serialization;
|
||||
|
||||
namespace DTS.Common.XMLUtils
|
||||
{
|
||||
public class TestSetupXMLClass
|
||||
{
|
||||
public string Id { get; set; }
|
||||
|
||||
[XmlElement("DASList")]
|
||||
public List<DASListXMLClass> DASList { get; set; }
|
||||
|
||||
[XmlElement("Groups")]
|
||||
public List<GroupsXMLClass> Groups { get; set; }
|
||||
|
||||
[XmlElement("Fields")]
|
||||
public FieldsXMLClass Fields { get; set; }
|
||||
public string HardwareIncludes { get; set; }
|
||||
|
||||
[XmlElement("LevelTriggers")]
|
||||
public LevelTriggersXMLClass LevelTriggers { get; set; }
|
||||
|
||||
[XmlElement("MetaDatas")]
|
||||
public MetaDatasXMLClass MetaDatas { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace DTS.Common.Behaviors
|
||||
{
|
||||
/// <summary>
|
||||
/// generic attribute to store string meta data on an object or enum
|
||||
/// </summary>
|
||||
public class StringMetaDataAttr : Attribute
|
||||
{
|
||||
public string MetaData { get; }
|
||||
|
||||
internal StringMetaDataAttr(string attr)
|
||||
{
|
||||
MetaData = attr;
|
||||
}
|
||||
|
||||
public static string GetStringMetaData(object o)
|
||||
{
|
||||
var mi = o?.GetType().GetMember(o.ToString());
|
||||
if (null == mi || 0 == mi.Length) { return null; }
|
||||
if (GetCustomAttribute(mi[0], typeof(StringMetaDataAttr)) is StringMetaDataAttr attr)
|
||||
{
|
||||
return attr.MetaData;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 3.4 KiB |
@@ -0,0 +1,11 @@
|
||||
using DTS.Common.Base;
|
||||
|
||||
namespace DTS.Common.Interface.Menu.HamburgerMenu
|
||||
{
|
||||
/// <summary>
|
||||
/// view for group channels
|
||||
/// </summary>
|
||||
public interface IHamburgerMenuView : IBaseView
|
||||
{
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
namespace DTS.Common.Classes.DSP
|
||||
{
|
||||
public interface IStreamingFilterProfile
|
||||
{
|
||||
/// <summary>
|
||||
/// the byte/enum value to send to the firmware for this filter type
|
||||
/// </summary>
|
||||
int EnumValue { get; set; }
|
||||
/// <summary>
|
||||
/// the display string for this filter
|
||||
/// </summary>
|
||||
string DisplayString { get; set; }
|
||||
/// <summary>
|
||||
/// description string for this filter
|
||||
/// </summary>
|
||||
string DescriptionString { get; set; }
|
||||
/// <summary>
|
||||
/// any restrictions on what das can use this filter
|
||||
/// </summary>
|
||||
DASRestriction[] Restrictions { get; set; }
|
||||
/// <summary>
|
||||
/// if this profile uses a ratio, then the ratio of sps to fC
|
||||
/// </summary>
|
||||
double Ratio { get; set; }
|
||||
/// <summary>
|
||||
/// returns the fC given the hardware type and the sample rate
|
||||
/// returns null if digital filtering isn't used in this combination
|
||||
/// </summary>
|
||||
/// <param name="sps"></param>
|
||||
/// <param name="hwType"></param>
|
||||
/// <returns></returns>
|
||||
double GetDSPFilterRate(double sps, string hwType);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
using System;
|
||||
using System.Windows.Data;
|
||||
|
||||
namespace DTS.Common.Converters
|
||||
{
|
||||
public class InverseBooleanToOpacityConverter : IValueConverter
|
||||
{
|
||||
/// <summary>
|
||||
/// Converts a Boolean value to a Opacity to show user control enable/disable.
|
||||
/// </summary>
|
||||
/// <param name="value">The Boolean value to convert. This value can be a standard Boolean value or a nullable Boolean value.</param>
|
||||
/// <param name="targetType">This parameter is not used.</param>
|
||||
/// <param name="parameter">The converter parameter to use.</param>
|
||||
/// <param name="culture">This parameter is not used.</param>
|
||||
/// <returns>The value to be passed to the target dependency property.</returns>
|
||||
public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
|
||||
{
|
||||
|
||||
if (value != null && (bool)value)
|
||||
return 1.0;
|
||||
return 0.5;
|
||||
}
|
||||
|
||||
|
||||
public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using DTS.Common.Base;
|
||||
|
||||
namespace DTS.Common.Interface.ISO.ExtraProperties
|
||||
{
|
||||
public interface IExtraPropertiesListView : IBaseView { }
|
||||
}
|
||||
@@ -0,0 +1,60 @@
|
||||
using DTS.Common.Enums.Sensors;
|
||||
|
||||
namespace DTS.Common.Interface.Sensors.SensorSettingsModule
|
||||
{
|
||||
/// <summary>
|
||||
/// describes settings sensor calibrations
|
||||
/// </summary>
|
||||
public interface ICalibrationPolicy
|
||||
{
|
||||
/// <summary>
|
||||
/// the current selected calibration policy
|
||||
/// </summary>
|
||||
SensorConstants.SensorCalPolicy SelectedCalPolicy { get; set; }
|
||||
/// <summary>
|
||||
/// all available calibration policies
|
||||
/// </summary>
|
||||
SensorConstants.SensorCalPolicy[] AvailableSensorCalPolicies { get; }
|
||||
/// <summary>
|
||||
/// period in days before calibration is due to warn
|
||||
/// </summary>
|
||||
int WarningPeriod { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The current value for whether sensor cal interval starts after calibration or first use
|
||||
/// </summary>
|
||||
bool UseSensorFirstUseDate { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Whether or not to keep track of, and validate a Test Setup based on, sensor use.
|
||||
/// </summary>
|
||||
bool DontAllowDataCollectionIfOverused { get; set; }
|
||||
/// <summary>
|
||||
/// A warning will be displayed if a sensor's usage is within this amount of its maximum.
|
||||
/// </summary>
|
||||
int UsageRemainingForWarning { get; set; }
|
||||
/// <summary>
|
||||
/// The default maximum number of uses for sensors
|
||||
/// </summary>
|
||||
int DefaultMaxUsageAllowed { get; set; }
|
||||
/// <summary>
|
||||
/// Whether or not the database being used supports the sensor usage policy.
|
||||
/// </summary>
|
||||
bool SensorAssemblyEnabled { get; }
|
||||
/// <summary>
|
||||
/// Whether or not the database being used supports the inspect before use
|
||||
/// </summary>
|
||||
bool AllowInspectBeforeUseEnabled { get; }
|
||||
//FB43142
|
||||
/// <summary>
|
||||
/// Whether or not to allow inspect before use
|
||||
/// </summary>
|
||||
bool AllowInspectBeforeUse { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// FB15758 Import/Export settings
|
||||
/// </summary>
|
||||
void ReadXML(System.Xml.XmlElement root);
|
||||
void WriteXML(ref System.Xml.XmlWriter writer);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,99 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using DTS.Common.Utilities;
|
||||
|
||||
namespace DTS.Common.Enums
|
||||
{
|
||||
public class ExcitationVoltageOptions
|
||||
{
|
||||
/// <summary>
|
||||
/// All available excitation voltages.
|
||||
/// </summary>
|
||||
public enum ExcitationVoltageOption
|
||||
{
|
||||
/// <summary>
|
||||
/// undefined excitation voltage
|
||||
/// </summary>
|
||||
[VoltageMagnitude(0.0)]
|
||||
[Description("Undefined")]
|
||||
Undefined = 1,
|
||||
/// <summary>
|
||||
/// 2V
|
||||
/// </summary>
|
||||
[VoltageMagnitude(2.0)]
|
||||
[Description("2.0")]
|
||||
Volt2 = 2,
|
||||
/// <summary>
|
||||
/// 2.5V
|
||||
/// </summary>
|
||||
[VoltageMagnitude(2.5)]
|
||||
[Description("2.5")]
|
||||
Volt2_5 = 4,
|
||||
/// <summary>
|
||||
/// 3.0V
|
||||
/// </summary>
|
||||
[VoltageMagnitude(3.0)]
|
||||
[Description("3.0")]
|
||||
Volt3 = 8,
|
||||
/// <summary>
|
||||
/// 5V
|
||||
/// </summary>
|
||||
[VoltageMagnitude(5.0)]
|
||||
[Description("5.0")]
|
||||
Volt5 = 16,
|
||||
/// <summary>
|
||||
/// 10V
|
||||
/// </summary>
|
||||
[VoltageMagnitude(10.0)]
|
||||
[Description("10.0")]
|
||||
Volt10 = 32,
|
||||
/// <summary>
|
||||
/// 1V
|
||||
/// </summary>
|
||||
[VoltageMagnitude(1.0)]
|
||||
[Description("1.0")]
|
||||
Volt1 = 64
|
||||
}
|
||||
/// <summary>
|
||||
/// Attribute for specifying the numerical magnitude of the attached field's
|
||||
/// "representation". Intended to be used with enumerations whose members represent
|
||||
/// voltage magnitude options so that the enum item can have a corresponding numerical
|
||||
/// value that can be extracted and used in calculations.
|
||||
/// </summary>
|
||||
[AttributeUsage(AttributeTargets.Field)]
|
||||
public class VoltageMagnitudeAttribute : Attribute
|
||||
{
|
||||
/// <summary>
|
||||
/// returns voltage magnitude
|
||||
/// </summary>
|
||||
public double Value { get; }
|
||||
|
||||
/// <summary>
|
||||
/// constructs a <see cref="ExcitationVoltageOptions.VoltageMagnitudeAttribute" />
|
||||
/// with a given value
|
||||
/// </summary>
|
||||
/// <param name="value"></param>
|
||||
public VoltageMagnitudeAttribute(double value) { Value = value; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Object for manipulating voltage option enumeration-attached
|
||||
/// <see cref="double"/> magnitude values.
|
||||
/// </summary>
|
||||
public class VoltageMagnitudeAttributeCoder
|
||||
: AttributeCoder<ExcitationVoltageOptions.ExcitationVoltageOption, VoltageMagnitudeAttribute, double>
|
||||
{
|
||||
/// <summary>
|
||||
/// Initializes a <see cref="ExcitationVoltageOptions.VoltageMagnitudeAttributeCoder"/> object.
|
||||
/// </summary>
|
||||
public VoltageMagnitudeAttributeCoder()
|
||||
: base(attribute => attribute.Value, null)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
using DTS.Common.Enums;
|
||||
|
||||
namespace DTS.Common.Events
|
||||
{
|
||||
/// <summary>
|
||||
/// Event arguments for the <see cref="TabControlSelectionChanged">TabControlSelectionChanged</see> event.
|
||||
/// </summary>
|
||||
public class TabControlSelectionEventArgs
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets the tab control operation type such as AddedItem or RemovedItem.
|
||||
/// </summary>
|
||||
public TabControlOperation Operation { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets the added or removed tab control's item.
|
||||
/// </summary>
|
||||
public object Item { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// Creates a new instance of the object.
|
||||
/// </summary>
|
||||
/// <param name="operation">The tab control operation type such as AddedItem or RemovedItem.</param>
|
||||
/// <param name="item">The added or removed tab control's item.</param>
|
||||
public TabControlSelectionEventArgs(TabControlOperation operation, object item)
|
||||
{
|
||||
Operation = operation;
|
||||
Item = item;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user