init
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
using DTS.Common.Interface.Hardware;
|
||||
using System;
|
||||
using System.Windows;
|
||||
using System.Windows.Data;
|
||||
// ReSharper disable PossibleNullReferenceException
|
||||
|
||||
namespace DTS.Common.Converters
|
||||
{
|
||||
public class DiagStatusOffsetColorConverter : IValueConverter
|
||||
{
|
||||
public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
|
||||
{
|
||||
if (value is DiagStatuses status)
|
||||
{
|
||||
if (status == DiagStatuses.NoResults) { return BrushesAndColors.Brush_ApplicationStatus_Idle; }
|
||||
if ((status & DiagStatuses.FailedOffset) == DiagStatuses.FailedOffset)
|
||||
{
|
||||
return BrushesAndColors.Brush_ApplicationStatus_Failed;
|
||||
}
|
||||
return BrushesAndColors.Brush_ApplicationStatus_Complete;
|
||||
}
|
||||
return BrushesAndColors.Brush_ApplicationStatus_Idle;
|
||||
}
|
||||
|
||||
public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
|
||||
{
|
||||
return value.Equals(true) ? parameter : Binding.DoNothing;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,85 @@
|
||||
using DTS.Common.Base;
|
||||
|
||||
namespace DTS.Common.Classes.Groups
|
||||
{
|
||||
// ReSharper disable once InconsistentNaming
|
||||
/// <summary>
|
||||
/// this class encapsulates a single channel or row in a TDC GRP file
|
||||
/// </summary>
|
||||
public class GroupGRPImportChannel: BasePropertyChanged
|
||||
{
|
||||
public const uint SerialNumberField = 0;
|
||||
public const uint DisplayNameField = 1;
|
||||
public const uint ISOCodeField = 2;
|
||||
public const uint InvertField = 3;
|
||||
public const uint CapacityField = 4;
|
||||
public const uint InputModeField = 5;
|
||||
public const uint DefaultValueField = 6;
|
||||
public const uint ActiveValueField = 7;
|
||||
public const uint FireModeField = 8;
|
||||
public const uint DelayField = 9;
|
||||
public const uint LimitDurationField = 10;
|
||||
public const uint DurationField = 11;
|
||||
public const uint CurrentField = 12;
|
||||
|
||||
public string SensorSerialNumber { get; set; }
|
||||
public string DisplayName { get; set; }
|
||||
public string ISOCode { get; set; }
|
||||
public bool Invert { get; set; }
|
||||
public double FullScale { get; set; }
|
||||
|
||||
public enum InputModes
|
||||
{
|
||||
na, //Not applicable. Used to denote a non-Digital Input channel
|
||||
TLH, //TransitionLowToHigh (DigitalInput)
|
||||
THL, //TransitionHighToLow (DigitalInput)
|
||||
CCNO, //ContactClosureNormallyOpen(DigitalInput)
|
||||
CCNC //ContactClosureNormallyClosed(DigitalInput)
|
||||
}
|
||||
public const InputModes DefaultInputMode = InputModes.CCNO;
|
||||
public InputModes? InputMode { get; set; } = null;
|
||||
|
||||
public const double DefaultDefaultValue = 0.0;
|
||||
public double? DefaultValue { get; set; } = null;
|
||||
|
||||
public const double DefaultActiveValue = 1.0;
|
||||
public double? ActiveValue { get; set; } = null;
|
||||
|
||||
public enum FireModes
|
||||
{
|
||||
na, //Not applicable. Used to denote a non-Squib channel
|
||||
CD, //CapacitorDischarge (Squib)
|
||||
CC //ConstantCurrent (Squib)
|
||||
}
|
||||
public const FireModes DefaultFireMode = FireModes.CD;
|
||||
public FireModes? FireMode { get; set; } = null;
|
||||
|
||||
public const double DefaultDelay = 0.00;
|
||||
public double? Delay { get; set; } = null;
|
||||
|
||||
public const bool DefaultLimitDuration = true;
|
||||
public bool? LimitDuration { get; set; } = null;
|
||||
|
||||
public const double DefaultDuration = 10.0;
|
||||
public double? Duration { get; set; } = null;
|
||||
|
||||
public const double DefaultCurrent = 1.5;
|
||||
public double? Current { get; set; } = null;
|
||||
/// <summary>
|
||||
/// error for the group, or null if there are no errors
|
||||
/// an error at this level means the group can't be imported
|
||||
/// </summary>
|
||||
public GroupGRPImportError Error { get; set; } = null;
|
||||
public GroupGRPImportGroup ParentGroup { get; set; }
|
||||
|
||||
public string GroupName => null == ParentGroup ? "---" : ParentGroup.GroupName;
|
||||
|
||||
/// <summary>
|
||||
/// forces refresh for anything bound to GroupName
|
||||
/// </summary>
|
||||
public void GroupNameInvalidate()
|
||||
{
|
||||
OnPropertyChanged("GroupName");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace DTS.Common.Constant.DASSpecific
|
||||
{
|
||||
public class SLICE2
|
||||
{
|
||||
public const uint MaxAAFilterRateHz = 200000;
|
||||
|
||||
public const int SLICE1_5_BASETYPE = 2;
|
||||
public const int SLICEPRO_DIM_BASETYPE = 3;
|
||||
public const int SLICEPRO_TOM_BASETYPE = 5;
|
||||
public const byte MIN_PROTOCOL_VER = 128;
|
||||
public const int FILE_DATA = 133;
|
||||
public const int MULTIPLE_EVENTS = 134;
|
||||
public const int STACK_SENSORS = 136;
|
||||
public const int STACK_FIRMWARE_UPDATE = 137;
|
||||
public const int DIAGNOSTIC_TWO_VOLT_EXCITATION = 138;
|
||||
public const int QUERY_ARM_AND_TRIGGER_STATUS_TIME_LEFT_IN_ARM = 139;
|
||||
public const byte MIN_PROTOCOL_VER_GEN3 = 140;
|
||||
public const int SLICE2_ONE_WIRE_ID = 142;
|
||||
public const int EVENT_ARM_ATTEMPTS = 145;
|
||||
public const int MEASURE_INTERNAL_OFFSET = 149;
|
||||
public const int START_REC_DELAY_IN_SECONDS = 150;
|
||||
public const int START_REALTIME_STREAM = 152;
|
||||
public const int HALF_BRIDGE_SIG_PLUS_SUPPORT = 154;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user