init
This commit is contained in:
@@ -0,0 +1,70 @@
|
||||
using DTS.Common.Enums;
|
||||
|
||||
namespace DTS.Common.Constant.DASSpecific
|
||||
{
|
||||
public class SLICE6
|
||||
{
|
||||
public const uint MaxAAFilterRateHz = 20000;
|
||||
|
||||
public const int MIN_PROTOCOL_VER = 1;
|
||||
public const int DIAGNOS_SHUNT_DAC = 2;
|
||||
public const int START_REC_DELAY_IN_SECONDS = 3;
|
||||
public const int IN_SLICE_TILT_SENSOR_ADC_PRE = 4;
|
||||
public const int STACK_SENSORS = 5;
|
||||
public const int START_REALTIME_STREAM = 11;
|
||||
public const int UDP_REALTIME_STREAM = 14;
|
||||
// Profiles as detailed in 29378
|
||||
public const int CLOCKSYNCPROFILE = 21;
|
||||
// minimum protocol version for PTP Domain ID per 30472
|
||||
public const int PTP_DOMAIN_ID_VER = 21;
|
||||
|
||||
public static bool IsRecordingModeSupported(RecordingModes mode, int protocolVersion)
|
||||
{
|
||||
switch (mode)
|
||||
{
|
||||
case RecordingModes.CircularBuffer:
|
||||
case RecordingModes.Recorder:
|
||||
case RecordingModes.MultipleEventCircularBuffer:
|
||||
case RecordingModes.MultipleEventRecorder:
|
||||
case RecordingModes.HybridRecorder:
|
||||
case RecordingModes.MultipleEventHybridRecorder:
|
||||
case RecordingModes.ContinuousRecorder:
|
||||
case RecordingModes.MultipleEventRAMActive:
|
||||
case RecordingModes.RAMActive:
|
||||
return true;
|
||||
//RecordingModes.S6A_DeviceStreamingOnly:
|
||||
//note: per Loc, S6 only supports udp streams in realtime, *not* as a streaming test mode (i.e. boot-and-stream)
|
||||
//result = protocolVersion >= UDP_REALTIME_STREAM;
|
||||
//break;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
public static bool IsStreamingProfileSupported(UDPStreamProfile profile, int protocolVersion)
|
||||
{
|
||||
switch (profile)
|
||||
{
|
||||
//note: per Loc, S6 only supports these in realtime, *not* as a streaming test mode (i.e. boot-and-stream)
|
||||
case UDPStreamProfile.RTCStreaming:
|
||||
case UDPStreamProfile.DTS_UDP:
|
||||
return true;
|
||||
default: return false;
|
||||
}
|
||||
}
|
||||
|
||||
public static bool IsClockSyncProfileSupported(ClockSyncProfile profile, int protocolVersion)
|
||||
{
|
||||
switch(profile)
|
||||
{
|
||||
case ClockSyncProfile.None:
|
||||
return true;
|
||||
case ClockSyncProfile.Manual:
|
||||
return protocolVersion < CLOCKSYNCPROFILE;
|
||||
case ClockSyncProfile.Slave_E2E:
|
||||
return protocolVersion >= CLOCKSYNCPROFILE;
|
||||
default: return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
using DTS.Common.Enums;
|
||||
using DTS.Common.Enums.Sensors;
|
||||
using System;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace DTS.Common.Interface.Sensors
|
||||
{
|
||||
public interface IStreamOutputRecord
|
||||
{
|
||||
/// <summary>
|
||||
/// the database id of the sensor
|
||||
/// </summary>
|
||||
[Key]
|
||||
int Id { get; set; }
|
||||
/// <summary>
|
||||
/// Serial number of sensor
|
||||
/// [required to be unique]
|
||||
/// </summary>
|
||||
[Required]
|
||||
[StringLength(50)]
|
||||
string SerialNumber { get; set; }
|
||||
DateTime LastModified { get; set; }
|
||||
string LastUpdatedBy { get; set; }
|
||||
/// <summary>
|
||||
/// bytes representing a delimited string of tag ids
|
||||
/// </summary>
|
||||
byte[] TagsBlobBytes { get; set; }
|
||||
bool DoNotUse { get; set; }
|
||||
bool Broken { get; set; }
|
||||
UDPStreamProfile StreamOutUDPProfile { get; set; }
|
||||
string StreamOutUDPAddress { get; set; }
|
||||
ushort StreamOutUDPTimeChannelId { get; set; }
|
||||
ushort StreamOutUDPDataChannelId { get; set; }
|
||||
string StreamOutUDPTmNSConfig { get; set; }
|
||||
ushort StreamOutIRIGTimeDataPacketIntervalMs { get; set; }
|
||||
/// <summary>
|
||||
/// amount of time between transmitting tmat
|
||||
/// http://manuscript.dts.local/f/cases/29987/Add-CG-DP-TMATS-interval-UI-support
|
||||
/// </summary>
|
||||
ushort StreamOutTMATSIntervalMs { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,130 @@
|
||||
using DTS.Common.Base.Classes;
|
||||
using DTS.Common.Interface.TestMetaData;
|
||||
using DTS.Common.Utilities.Logging;
|
||||
using System;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.IO;
|
||||
using System.Xml;
|
||||
using System.Xml.Serialization;
|
||||
|
||||
namespace DTS.Common.Classes.CustomerDetails
|
||||
{
|
||||
public class CustomerDetailsDbRecord : Base.BasePropertyChanged, ICustomerDetailsDbRecord
|
||||
{
|
||||
private int _customerId = -1;
|
||||
[ReadOnly(true)]
|
||||
[Browsable(false)]
|
||||
public int CustomerId
|
||||
{
|
||||
get => _customerId;
|
||||
set => SetProperty(ref _customerId, value, "CustomerId");
|
||||
}
|
||||
private string _name = "";
|
||||
[ReadOnly(true)]
|
||||
[Browsable(false)]
|
||||
public string Name
|
||||
{
|
||||
get => _name;
|
||||
set => SetProperty(ref _name, value, "Name");
|
||||
}
|
||||
private string _customerName = "";
|
||||
[DisplayResource("CustomerName")]
|
||||
public string CustomerName
|
||||
{
|
||||
get => _customerName;
|
||||
set => SetProperty(ref _customerName, value, "CustomerName");
|
||||
}
|
||||
private string _customerTestRefNumber = "";
|
||||
[DisplayResource("CustomerTestRefNumber")]
|
||||
public string CustomerTestRefNumber
|
||||
{
|
||||
get => _customerTestRefNumber;
|
||||
set => SetProperty(ref _customerTestRefNumber, value, "CustomerTestRefNumber");
|
||||
}
|
||||
private string _projectRefNumber = "NOVALUE";
|
||||
[DisplayResource("ProjectRefNumber")]
|
||||
public string ProjectRefNumber
|
||||
{
|
||||
get => _projectRefNumber;
|
||||
set => SetProperty(ref _projectRefNumber, value, "ProjectRefNumber");
|
||||
}
|
||||
private string _customerOrderNumber = "NOVALUE";
|
||||
[DisplayResource("CustomerOrderNumber")]
|
||||
public string CustomerOrderNumber
|
||||
{
|
||||
get => _customerOrderNumber;
|
||||
set => SetProperty(ref _customerOrderNumber, value, "CustomerOrderNumber");
|
||||
}
|
||||
private string _customerCostUnit = "NOVALUE";
|
||||
[DisplayResource("CustomerCostUnit")]
|
||||
public string CustomerCostUnit
|
||||
{
|
||||
get => _customerCostUnit;
|
||||
set => SetProperty(ref _customerCostUnit, value, "CustomerCostUnit");
|
||||
}
|
||||
private bool _localOnly = false;
|
||||
[Browsable(false)]
|
||||
[ReadOnly(true)]
|
||||
public bool LocalOnly
|
||||
{
|
||||
get => _localOnly;
|
||||
set => SetProperty(ref _localOnly, value, "LocalOnly");
|
||||
}
|
||||
private DateTime _lastModified = DateTime.MinValue;
|
||||
[Browsable(false)]
|
||||
[ReadOnly(true)]
|
||||
public DateTime LastModified
|
||||
{
|
||||
get => _lastModified;
|
||||
set => SetProperty(ref _lastModified, value, "LastModified");
|
||||
}
|
||||
private string _lastModifiedBy = "";
|
||||
[Browsable(false)]
|
||||
[ReadOnly(true)]
|
||||
public string LastModifiedBy
|
||||
{
|
||||
get => _lastModifiedBy;
|
||||
set => SetProperty(ref _lastModifiedBy, value, "LastModifiedBy");
|
||||
}
|
||||
private int _version = -1;
|
||||
[Browsable(false)]
|
||||
[ReadOnly(true)]
|
||||
public int Version
|
||||
{
|
||||
get => _version;
|
||||
set => SetProperty(ref _version, value, "Version");
|
||||
}
|
||||
public CustomerDetailsDbRecord(ICustomerDetailsDbRecord customerDetailsDbRecord)
|
||||
{
|
||||
Name = customerDetailsDbRecord.Name;
|
||||
CustomerName = customerDetailsDbRecord.CustomerName;
|
||||
CustomerTestRefNumber = customerDetailsDbRecord.CustomerTestRefNumber;
|
||||
ProjectRefNumber = customerDetailsDbRecord.ProjectRefNumber;
|
||||
CustomerOrderNumber = customerDetailsDbRecord.CustomerOrderNumber;
|
||||
CustomerCostUnit = customerDetailsDbRecord.CustomerCostUnit;
|
||||
LocalOnly = customerDetailsDbRecord.LocalOnly;
|
||||
LastModified = customerDetailsDbRecord.LastModified;
|
||||
LastModifiedBy = customerDetailsDbRecord.LastModifiedBy;
|
||||
Version = customerDetailsDbRecord.Version;
|
||||
}
|
||||
public CustomerDetailsDbRecord() { }
|
||||
public CustomerDetailsDbRecord(IDataReader reader)
|
||||
{
|
||||
Name = Utility.GetString(reader, "Name");
|
||||
CustomerName = Utility.GetString(reader, "CustomerName");
|
||||
CustomerTestRefNumber = Utility.GetString(reader, "CustomerTestRefNumber");
|
||||
ProjectRefNumber = Utility.GetString(reader, "ProjectRefNumber");
|
||||
CustomerOrderNumber = Utility.GetString(reader, "CustomerOrderNumber");
|
||||
CustomerCostUnit = Utility.GetString(reader, "CustomerCostUnit");
|
||||
LocalOnly = Utility.GetBool(reader, "LocalOnly");
|
||||
LastModified = Utility.GetDateTime(reader, "LastModified", DateTime.MinValue);
|
||||
LastModifiedBy = Utility.GetString(reader, "LastModifiedBy");
|
||||
Version = Utility.GetInt(reader, "Version");
|
||||
}
|
||||
public bool IsInvalidBlank()
|
||||
{
|
||||
return string.IsNullOrWhiteSpace(Name);
|
||||
}
|
||||
}
|
||||
}
|
||||
Binary file not shown.
@@ -0,0 +1,8 @@
|
||||
using DTS.Common.Base;
|
||||
|
||||
namespace DTS.Common.Interface
|
||||
{
|
||||
public interface IGenericModuleViewModel : IBaseViewModel
|
||||
{
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
using DTS.Common.Base;
|
||||
|
||||
namespace DTS.Common.Interface.TestSetups.Imports.TTS.DOChannels
|
||||
{
|
||||
public interface IDigitalOutputChannelsView : IBaseView { }
|
||||
}
|
||||
Reference in New Issue
Block a user