using System.Collections.Generic;
using DTS.Common.Interface.DataRecorders;
using DTS.Common.Storage;
using DTS.Common.Classes.Hardware;
namespace DTS.Common.DataModel.Common.DbWrappers
{
public class DASGet : DASDBRecord
{
public DASGet() { }
public DASGet(IDASDBRecord record) : base(record)
{
if (double.IsNaN(MaxAAFRate))
{
MaxAAFRate = MaxSampleRate / 5;
}
}
public int Type { get => DASType; set => DASType = value; }
public bool Reprogramable { get => IsProgrammable; set => IsProgrammable = value; }
public bool Reconfigurable { get => IsReconfigurable; set => IsReconfigurable = value; }
///
/// This ensures that any bad data in the database can be repaired in one place.
/// FB 17777
///
///
///
///
public List DASGet_Wrapper(string serialNumber = null, string position = null)
{
var dasGetList = new List();
var hResult = DbOperations.DASGet(serialNumber, position, out var dbDAS);
if (0 == hResult && null != dbDAS)
{
foreach (var das in dbDAS)
{
dasGetList.Add(new DASGet(das));
}
}
return dasGetList;
}
}
}