init
This commit is contained in:
@@ -0,0 +1,106 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace DTS.Common.Interface.DataRecorders
|
||||
{
|
||||
/// <summary>
|
||||
/// interface describing a DAS channel in the Db
|
||||
/// </summary>
|
||||
public interface IDASChannelDBRecord
|
||||
{
|
||||
/// <summary>
|
||||
/// a string id for the hardware the channel belongs to
|
||||
/// (serialnumber_dastype)
|
||||
/// </summary>
|
||||
string HardwareId { get; set; }
|
||||
[Key]
|
||||
[Column("DASChannelId")]
|
||||
/// <summary>
|
||||
/// the id/key of the DAS channel record in the db
|
||||
/// </summary>
|
||||
int DaschannelId { get; set; }
|
||||
[Column("DASId")]
|
||||
/// <summary>
|
||||
/// the das db id of the Hardware this channel belongs to
|
||||
/// </summary>
|
||||
int? Dasid { get; set; }
|
||||
/// <summary>
|
||||
/// the physical channel index of the channel among channels on the DAS
|
||||
/// </summary>
|
||||
int ChannelIdx { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// BitMask for bridges supported by the channel
|
||||
/// Bit 0 indicates IEPE
|
||||
/// Bit 1 indicates quarter bridge
|
||||
/// Bit 2 indicates half bridge
|
||||
/// Bit 3 indicates full bridge
|
||||
/// Bit 4 indicates digital input
|
||||
/// Bit 5 indicates squib fire
|
||||
/// Bit 6 indicates digital output
|
||||
/// Bit 7 indicates Half bridge signal plus (G5 signal plus)
|
||||
/// Bit 8 indicates RealTime Clock
|
||||
/// Bit 9 indicates UART
|
||||
/// </summary>
|
||||
int SupportedBridges { get; set; }
|
||||
/// <summary>
|
||||
/// BitMask indicating what excitation options the channel supports
|
||||
/// Bit 0 indicates an invalid excitation (undefined)
|
||||
/// Bit 1 indicates 2V
|
||||
/// Bit 2 indicates 2.5V
|
||||
/// Bit 3 indicates 3V
|
||||
/// Bit 4 indicates 5V
|
||||
/// Bit 5 indicates 10V
|
||||
/// Bit 6 indicates 1V
|
||||
/// </summary>
|
||||
int SupportedExcitations { get; set; }
|
||||
|
||||
[Column("DASDisplayOrder")]
|
||||
/// <summary>
|
||||
/// The display order of the channel among channels on the DAS
|
||||
/// note that the physical order of channels and the display order may not match for
|
||||
/// some hardware
|
||||
/// </summary>
|
||||
int DASDisplayOrder { get; set; }
|
||||
/// <summary>
|
||||
/// Indicates that record should be stored only in the local db and not propagated to a central db
|
||||
/// deprecated
|
||||
/// </summary>
|
||||
bool LocalOnly { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// BitMask indicating what Digital input modes are supported on the channel (if channel supports digital input bridge type)
|
||||
/// Bit 0 indicates an invalid mode
|
||||
/// Bit 1 indicates Transition low to high (TLH)
|
||||
/// Bit 2 indicates Transition high to low (THL)
|
||||
/// Bit 3 indicates Contact closure normally open (CCNO)
|
||||
/// Bit 4 indicates Contact closure normally closed (CCNC)
|
||||
/// </summary>
|
||||
int SupportedDigitalInputModes { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// BitMask indicating what Squib fire modes are supported on the channel (if the channel supports squib fire bridge type)
|
||||
/// Bit 0 indicates an invalid mode (fire mode not set)
|
||||
/// Bit 1 indicates capacitor discharge
|
||||
/// Bit 2 indicates constant current
|
||||
/// Bit 3 indicates AC discharge
|
||||
/// </summary>
|
||||
int SupportedSquibFireModes { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Bit mask indicating what digital output modes are supported (if the channel supports digital output bridge type)
|
||||
/// a value of 0 indicates no digital output or off
|
||||
/// Bit 0 indicates 5V low to high transition (FVLH)
|
||||
/// Bit 1 indicates 5V high to low transition (FVHL)
|
||||
/// Bit 2 indicates contact closure normally open (CCNO)
|
||||
/// Bit 3 indicates contact closure normally closed (CCNC)
|
||||
/// </summary>
|
||||
int SupportedDigitalOutputModes { get; set; }
|
||||
string ModuleSerialNumber { get; set; }
|
||||
int SettingId { get; set; }
|
||||
/// <summary>
|
||||
/// array index of the module the channel belongs to among modules on a DAS
|
||||
/// </summary>
|
||||
int ModuleArrayIndex { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
using DTS.Common.Base;
|
||||
using Microsoft.Practices.Prism.Events;
|
||||
// ReSharper disable CheckNamespace
|
||||
namespace DTS.Common.Events
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// The number of selected Tests changed event.
|
||||
/// </summary>
|
||||
public class GraphLoadedCountNotification : CompositePresentationEvent<GraphLoadedCountNotificationArg> { }
|
||||
public class GraphLoadedCountNotificationArg
|
||||
{
|
||||
public int LoadedCount { get; set; }
|
||||
/// <summary>
|
||||
/// 24417 start pulling apart viewer to allow reuse for PSD reports
|
||||
/// </summary>
|
||||
public IBaseViewModel ParentVM { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
// ReSharper disable CheckNamespace
|
||||
|
||||
namespace DTS.Common.Interface
|
||||
{
|
||||
public interface ITestRunMetadata : INotifyPropertyChanged
|
||||
{
|
||||
string Name { get; set; }
|
||||
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; }
|
||||
DateTime FileDate { get; set; }
|
||||
string FilePath { get; set; }
|
||||
List<ITestModule> Modules { get; set; }
|
||||
List<ITestChannel> Channels { get; set; }
|
||||
List<ITestChannel> CalculatedChannels { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
using DTS.Common.Base;
|
||||
|
||||
namespace DTS.Common.Interface.Sensors.SensorsList
|
||||
{
|
||||
public interface ISensorTemplatesViewModel : IBaseViewModel
|
||||
{
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
using DTS.Common.Base;
|
||||
|
||||
namespace DTS.Common.Interface
|
||||
{
|
||||
public interface IViewerView : IBaseView { }
|
||||
}
|
||||
@@ -0,0 +1,60 @@
|
||||
using System;
|
||||
|
||||
namespace DTS.Common.Classes
|
||||
{
|
||||
/// <summary>
|
||||
/// This is the generic for singletons.
|
||||
/// </summary>
|
||||
/// <typeparam name="T">Type of derived Singleton object (i.e. class MySingletone: Singleton<MySingleton>).</typeparam>
|
||||
public class Singleton<T> where T : new()
|
||||
{
|
||||
/// <summary>
|
||||
/// This is a protected constructor.
|
||||
/// </summary>
|
||||
protected Singleton()
|
||||
{
|
||||
if (!ReferenceEquals(Instance, null))
|
||||
throw new InvalidOperationException("You have tried to create a new singleton class where you should have instanced it. Replace your \"new class()\" with \"class.Instance\"");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the singleton instance of type T.
|
||||
/// </summary>
|
||||
public static T Instance
|
||||
{
|
||||
get
|
||||
{
|
||||
if (SingletonCreator.exception != null)
|
||||
throw SingletonCreator.exception;
|
||||
|
||||
return SingletonCreator.instance;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Creates the singleton instance of type T.
|
||||
/// </summary>
|
||||
// ReSharper disable once ClassNeverInstantiated.Local
|
||||
private class SingletonCreator
|
||||
{
|
||||
internal static readonly T instance;
|
||||
internal static readonly Exception exception;
|
||||
|
||||
/// <summary>
|
||||
/// Creates the singleton instance of type T.
|
||||
/// </summary>
|
||||
static SingletonCreator()
|
||||
{
|
||||
try
|
||||
{
|
||||
instance = new T();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
exception = ex.InnerException ?? ex;
|
||||
Console.WriteLine(@"Singleton: {0}", exception);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user