init
This commit is contained in:
@@ -0,0 +1,53 @@
|
||||
using DTS.Common.Enums;
|
||||
using DTS.Common.Enums.Sensors;
|
||||
using DTS.Common.Interface.Sensors;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
|
||||
namespace DTS.Common.Classes
|
||||
{
|
||||
public enum ImportPageType
|
||||
{
|
||||
ImportSensor,
|
||||
ImportTestSetup
|
||||
}
|
||||
public class SensorImportData
|
||||
{
|
||||
public Dictionary<string, List<string>> GroupNameSensorListLookup { get; set; } = new Dictionary<string, List<string>>();
|
||||
public Dictionary<string, string> SensorGroupNameLookup { get; set; } = new Dictionary<string, string>();
|
||||
public Dictionary<string, string> SensorGroupTypeLookup { get; set; } = new Dictionary<string, string>();
|
||||
public Dictionary<string, string> GroupNameTestObjectLookup { get; set; } = new Dictionary<string, string>();
|
||||
public List<string> Errors { get; set; } = new List<string>();
|
||||
public Dictionary<string, string> SensorISOCode { get; set; } = new Dictionary<string, string>();
|
||||
public Dictionary<string, string> SensorISOChannelName { get; set; } = new Dictionary<string, string>();
|
||||
public Dictionary<string, string> SensorUserCode { get; set; } = new Dictionary<string, string>();
|
||||
public Dictionary<string, string> SensorUserChannelName { get; set; } = new Dictionary<string, string>();
|
||||
public Dictionary<string, string> SensorDASSerialNumber { get; set; } = new Dictionary<string, string>();
|
||||
public Dictionary<string, int> SensorChannelIndex { get; set; } = new Dictionary<string, int>();
|
||||
}
|
||||
public class TestSetupImportData
|
||||
{
|
||||
public string Name { get; set; }
|
||||
public string Description { get; set; }
|
||||
public double SamplesPerSecond { get; set; }
|
||||
public double PosttriggerSeconds { get; set; }
|
||||
public double PretriggerSeconds { get; set; }
|
||||
public RecordingModes RecordingMode { get; set; }
|
||||
public CalibrationBehaviors CalibrationBehavior { get; set; }
|
||||
public int Version { get; set; }
|
||||
public List<string> TestChannelOrders { get; set; }
|
||||
public List<string> Tags { get; set; }
|
||||
|
||||
public InputClockSource ClockMasterInput { get; set; } = InputClockSource.None;
|
||||
public OutputClockSource ClockMasterOutput { get; set; } = OutputClockSource.None;
|
||||
public bool ManageClocksOutsideOfDataPROMaster { get; set; } = false;
|
||||
public bool ManageClocksOutsideOfDataPROSlave { get; set; } = false;
|
||||
public OutputClockSource ClockSlaveInput { get; set; } = OutputClockSource.None;
|
||||
public OutputClockSource ClockSlaveOutput { get; set; } = OutputClockSource.None;
|
||||
public Dictionary<string, int> SampleRateForDAS { get; } = new Dictionary<string, int>();
|
||||
public Dictionary<string, uint> DomainIdForDAS { get; } = new Dictionary<string, uint>();
|
||||
public Dictionary<string, bool> IsClockMaster { get; } = new Dictionary<string, bool>();
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,136 @@
|
||||
using DTS.Common.Enums;
|
||||
using System;
|
||||
|
||||
namespace DTS.Common.Interface.Sensors.SensorsList
|
||||
{
|
||||
public interface IStreamOutputSetting
|
||||
{
|
||||
/// <summary>
|
||||
/// ID in the database for the stream output setting
|
||||
/// only positive numbers are valid database ids
|
||||
/// </summary>
|
||||
int DatabaseId { get; set; }
|
||||
/// <summary>
|
||||
/// whether the stream output is checked in a list with a checkbox
|
||||
/// </summary>
|
||||
bool Included { get; set; }
|
||||
/// <summary>
|
||||
/// the serial number / setting name
|
||||
/// </summary>
|
||||
string SerialNumber { get; set; }
|
||||
/// <summary>
|
||||
/// description or comment of setting
|
||||
/// </summary>
|
||||
string Description { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// the user who last modified setting
|
||||
/// </summary>
|
||||
string LastModifiedBy { get; set; }
|
||||
/// <summary>
|
||||
/// when the setting was last modified
|
||||
/// </summary>
|
||||
DateTime LastModified { get; set; }
|
||||
/// <summary>
|
||||
/// returns true if stream output matches filter criteria
|
||||
/// </summary>
|
||||
/// <param name="term"></param>
|
||||
/// <returns></returns>
|
||||
bool Filter(string term);
|
||||
/// <summary>
|
||||
/// whether the stream output is associated with a channel
|
||||
/// </summary>
|
||||
bool Assigned { get; set; }
|
||||
/// <summary>
|
||||
/// whether the stream output is online or not
|
||||
/// </summary>
|
||||
bool Online { get; set; }
|
||||
/// <summary>
|
||||
/// the isocode for the stream output
|
||||
/// </summary>
|
||||
string ISOCode { get; set; }
|
||||
/// <summary>
|
||||
/// the iso channel name for the stream output
|
||||
/// </summary>
|
||||
string ISOChannelName { get; set; }
|
||||
/// <summary>
|
||||
/// the user code for the stream output
|
||||
/// </summary>
|
||||
string UserCode { get; set; }
|
||||
/// <summary>
|
||||
/// the user channel name for the stream output
|
||||
/// </summary>
|
||||
string UserChannelName { get; set; }
|
||||
/// <summary>
|
||||
/// marks the stream output setting as broken or not
|
||||
/// broken sensors do not appear in selectable lists of sensors in edit test setup or edit group
|
||||
/// </summary>
|
||||
bool Broken { get; set; }
|
||||
/// <summary>
|
||||
/// marks the stream output setting as donotuse
|
||||
/// donotuse sensors do not appear in selectable lists of sensors in edit test setup or edit group
|
||||
/// </summary>
|
||||
bool DoNotUse { get; set; }
|
||||
///<summary>
|
||||
/// udp profile setting value
|
||||
///</summary>
|
||||
UDPStreamProfile UDPProfile { get; set; }
|
||||
///<summary>
|
||||
/// udp address setting value
|
||||
///</summary>
|
||||
string UDPAddress { get; set; }
|
||||
///<summary>
|
||||
/// time channel id setting value
|
||||
///</summary>
|
||||
ushort UDPTimeChannelId { get; set; }
|
||||
///<summary>
|
||||
/// data channel id setting value
|
||||
///</summary>
|
||||
ushort UDPDataChannelId { get; set; }
|
||||
///<summary>
|
||||
/// tmns config setting value
|
||||
///</summary>
|
||||
string UDPTmNSConfig { get; set; }
|
||||
///<summary>
|
||||
/// irig data packet interval setting value
|
||||
///</summary>
|
||||
ushort IRIGTimeDataPacketIntervalMs { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// interval in ms between sending TMATS information while streaming
|
||||
/// http://manuscript.dts.local/f/cases/29987/Add-CG-DP-TMATS-interval-UI-support
|
||||
/// </summary>
|
||||
ushort TMATSIntervalMs { get; set; }
|
||||
bool IsCH10 { get; }
|
||||
bool IsTMNS { get; }
|
||||
bool IsIENA { get; }
|
||||
bool IsUART { get; }
|
||||
|
||||
/// <summary>
|
||||
/// TMNS sub frame id for output streaming
|
||||
/// </summary>
|
||||
uint TMNS_SubFrameId { get; set; }
|
||||
/// <summary>
|
||||
/// TMNS message id for output streaming
|
||||
/// </summary>
|
||||
uint TMNS_MsgId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// tmns PCM minor per major setting for output streaming
|
||||
/// </summary>
|
||||
uint TMNS_MinorPerMajor { get; set; }
|
||||
/// <summary>
|
||||
/// TMNS TMATs port for output streaming
|
||||
/// </summary>
|
||||
uint TMNS_TMATSPort { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// IENA key for output streaming
|
||||
/// </summary>
|
||||
ushort IENA_Key { get; set; }
|
||||
/// <summary>
|
||||
/// IENA source port for streaming
|
||||
/// </summary>
|
||||
uint IENA_SourcePort { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
using DTS.Common.Interface;
|
||||
using DTS.Common.Interface.TestDefinition;
|
||||
// ReSharper disable CheckNamespace
|
||||
|
||||
namespace DTS.Common.Classes.Viewer.TestMetadata
|
||||
{
|
||||
public class TestMetadata : ITestMetadata
|
||||
{
|
||||
public ITestRunMetadata TestRun { get; set; }
|
||||
public ITestSetupMetadata TestSetup { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
using DTS.Common.Base;
|
||||
|
||||
namespace DTS.Common.Interface
|
||||
{
|
||||
public interface IChannelSummary : IBaseClass
|
||||
{
|
||||
string ChannelType { get; set; }
|
||||
int Requested { get; set; }
|
||||
int Assigned { get; set; }
|
||||
int Unassigned { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
using Prism.Modularity;
|
||||
// ReSharper disable CheckNamespace
|
||||
|
||||
namespace DTS.Common.Interface
|
||||
{
|
||||
public interface IViewerModule : IModule
|
||||
{
|
||||
void StartSession();
|
||||
bool SessionStarted { get; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
using DTS.Common.SharedResource.Strings;
|
||||
using System.Globalization;
|
||||
using System.Windows.Controls;
|
||||
|
||||
namespace DTS.Common.Validators
|
||||
{
|
||||
public class SensitivityValidator : ValidationRule
|
||||
{
|
||||
public override ValidationResult Validate(object value, CultureInfo cultureInfo)
|
||||
{
|
||||
if (value is string s)
|
||||
{
|
||||
if (!double.TryParse(s, out var d))
|
||||
{
|
||||
return new ValidationResult(false, StringResources.InvalidFormat);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (0D.Equals(d))
|
||||
{
|
||||
return new ValidationResult(false, StringResources.SensitivityCanNotBeZero);
|
||||
}
|
||||
return new ValidationResult(true, null);
|
||||
}
|
||||
}
|
||||
return new ValidationResult(false, StringResources.InvalidFormat);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user