init
This commit is contained in:
@@ -0,0 +1,72 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using DTS.Common.Enums.Communication;
|
||||
using DTS.Common.Enums.DASFactory;
|
||||
using DTS.Common.Interface.Communication;
|
||||
using DTS.Common.Interface.Connection;
|
||||
|
||||
namespace DTS.Common.ICommunication
|
||||
{
|
||||
public class CanceledException : ApplicationException
|
||||
{
|
||||
}
|
||||
|
||||
public class Communication_DASInfo : ICommunication_DASInfo
|
||||
{
|
||||
/// <summary>
|
||||
/// indicates date of first use
|
||||
/// null value indicates hardware has not been used since calibration
|
||||
/// only valid when IsFirstUseDateSupported is true
|
||||
/// </summary>
|
||||
public DateTime? FirstUseDate { get; set; } = null;
|
||||
|
||||
/// <summary>
|
||||
/// indicates that FirstUseDate data is valid and hardware supports First use dates
|
||||
/// 15524 DAS "First Use Date"
|
||||
/// </summary>
|
||||
public bool IsFirstUseDateSupported { get; set; } = false;
|
||||
/// <summary>
|
||||
/// indicates whether or not streaming is supported
|
||||
/// 30429 TSR AIRs can enable/disable streaming via the DISABLE_STREAMING_FEATURE system attribute
|
||||
/// </summary>
|
||||
public bool IsStreamingSupported { get; set; } = false;
|
||||
/// <summary>
|
||||
/// these are devices which are connected to the das
|
||||
/// currently only used by SLICE6DB
|
||||
/// </summary>
|
||||
public IDASConnectedDevice[] ConnectedDevices { get; private set; } = new IDASConnectedDevice[0];
|
||||
/// <summary>
|
||||
/// sets ConnectedDevices
|
||||
/// </summary>
|
||||
/// <param name="devices">devices connected to this das</param>
|
||||
public void SetConnectedDevices(IDASConnectedDevice[] devices) { ConnectedDevices = devices; }
|
||||
|
||||
public string[] SerialNumbers { get; set; }
|
||||
public string[] FirmwareVersions { get; set; }
|
||||
public string StackSerialNumber(int devid)
|
||||
{
|
||||
if (null == SerialNumbers || SerialNumbers.Length < 1)
|
||||
{
|
||||
return "N/A";
|
||||
}
|
||||
else if (0 != devid && devid < SerialNumbers.Length)
|
||||
{
|
||||
return SerialNumbers[0] + "::" + SerialNumbers[devid];
|
||||
}
|
||||
else
|
||||
{
|
||||
return SerialNumbers[0];
|
||||
}
|
||||
}
|
||||
|
||||
public Communication_DASInfo()
|
||||
{
|
||||
}
|
||||
|
||||
public Communication_DASInfo(string[] serials, string[] fwnums)
|
||||
{
|
||||
SerialNumbers = (string[])serials.Clone();
|
||||
FirmwareVersions = (string[])fwnums.Clone();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user