77 lines
2.8 KiB
Plaintext
77 lines
2.8 KiB
Plaintext
|
|
using DTS.Common.Interface.TestSetups;
|
||
|
|
using System.Data;
|
||
|
|
|
||
|
|
namespace DTS.Common.Classes.TestSetups
|
||
|
|
{
|
||
|
|
/// <summary>
|
||
|
|
/// implements a record for test setup hardware
|
||
|
|
/// <inheritdoc cref="ITestSetupHardwareRecord"/>
|
||
|
|
/// </summary>
|
||
|
|
public class TestSetupHardwareRecord : Base.BasePropertyChanged, ITestSetupHardwareRecord
|
||
|
|
{
|
||
|
|
private int _dasId = -1;
|
||
|
|
public int DASId
|
||
|
|
{
|
||
|
|
get => _dasId;
|
||
|
|
set => SetProperty(ref _dasId, value, "DASId");
|
||
|
|
}
|
||
|
|
private int _testSetupId;
|
||
|
|
public int TestSetupId
|
||
|
|
{
|
||
|
|
get => _testSetupId;
|
||
|
|
set => SetProperty(ref _testSetupId, value, "TestSetupId");
|
||
|
|
}
|
||
|
|
private bool _addDAS = true;
|
||
|
|
public bool AddDAS
|
||
|
|
{
|
||
|
|
get => _addDAS;
|
||
|
|
set => SetProperty(ref _addDAS, value, "AddDAS");
|
||
|
|
}
|
||
|
|
private int _samplesPerSecond;
|
||
|
|
public int SamplesPerSecond
|
||
|
|
{
|
||
|
|
get => _samplesPerSecond;
|
||
|
|
set => SetProperty(ref _samplesPerSecond, value, "SamplesPerSecond");
|
||
|
|
}
|
||
|
|
private bool _isClockMaster = false;
|
||
|
|
public bool IsClockMaster
|
||
|
|
{
|
||
|
|
get => _isClockMaster;
|
||
|
|
set => SetProperty(ref _isClockMaster, value, "IsClockMaster");
|
||
|
|
}
|
||
|
|
private byte _ptpDomainId = 0;
|
||
|
|
public byte PTPDomainId
|
||
|
|
{
|
||
|
|
get => _ptpDomainId;
|
||
|
|
set => SetProperty(ref _ptpDomainId, value, "PTPDomainId");
|
||
|
|
}
|
||
|
|
private int _antiAliasFilterRate;
|
||
|
|
public int AntiAliasFilterRate
|
||
|
|
{
|
||
|
|
get => _antiAliasFilterRate;
|
||
|
|
set => SetProperty(ref _antiAliasFilterRate, value, "AntiAliasFilterRate");
|
||
|
|
}
|
||
|
|
public TestSetupHardwareRecord() { }
|
||
|
|
public TestSetupHardwareRecord(IDataReader reader)
|
||
|
|
{
|
||
|
|
DASId = Utility.GetInt(reader, "DASId");
|
||
|
|
TestSetupId = Utility.GetInt(reader, "TestSetupId");
|
||
|
|
AddDAS = Utility.GetBool(reader, "AddOrRemove");
|
||
|
|
SamplesPerSecond = Utility.GetInt(reader, "SamplesPerSecond");
|
||
|
|
IsClockMaster = Utility.GetBool(reader, "IsClockMaster");
|
||
|
|
AntiAliasFilterRate = Utility.GetInt(reader, "AntiAliasFilterRate");
|
||
|
|
PTPDomainId = (byte)Utility.GetInt(reader, "PTPDomainID");
|
||
|
|
}
|
||
|
|
public TestSetupHardwareRecord(ITestSetupHardwareRecord copy)
|
||
|
|
{
|
||
|
|
DASId = copy.DASId;
|
||
|
|
TestSetupId = copy.TestSetupId;
|
||
|
|
AddDAS = copy.AddDAS;
|
||
|
|
SamplesPerSecond = copy.SamplesPerSecond;
|
||
|
|
IsClockMaster = copy.IsClockMaster;
|
||
|
|
AntiAliasFilterRate = copy.AntiAliasFilterRate;
|
||
|
|
PTPDomainId = copy.PTPDomainId;
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|