init
This commit is contained in:
49
Common/DTS.Common.Serialization/TestSetup/ExtraProperty.cs
Normal file
49
Common/DTS.Common.Serialization/TestSetup/ExtraProperty.cs
Normal file
@@ -0,0 +1,49 @@
|
||||
using DTS.Common.Utilities;
|
||||
using DTS.Common.Utilities.DotNetProgrammingConstructs;
|
||||
|
||||
namespace DTS.Serialization
|
||||
{
|
||||
public partial class TestSetup : Exceptional
|
||||
{
|
||||
public partial class ExtraProperty : Exceptional
|
||||
{
|
||||
public ExtraProperty()
|
||||
{
|
||||
_key.Value = null;
|
||||
_value.Value = null;
|
||||
_version.Value = "1.0.0.0";
|
||||
}
|
||||
|
||||
public ExtraProperty(string key, string value)
|
||||
: this()
|
||||
{
|
||||
_key.Value = key;
|
||||
_value.Value = value;
|
||||
}
|
||||
|
||||
public string Key
|
||||
{
|
||||
get => _key.Value;
|
||||
set => _key.Value = value;
|
||||
}
|
||||
private readonly Property<string> _key
|
||||
= new Property<string>(typeof(Graph).Namespace + ".ExtraProperty.Key", "", false);
|
||||
|
||||
public string Value
|
||||
{
|
||||
get => _value.Value;
|
||||
set => _value.Value = value;
|
||||
}
|
||||
private readonly Property<string> _value
|
||||
= new Property<string>(typeof(Graph).Namespace + ".ExtraProperty.Value", "", false);
|
||||
|
||||
public string Version
|
||||
{
|
||||
get => _version.Value;
|
||||
set => _version.Value = value;
|
||||
}
|
||||
private readonly Property<string> _version
|
||||
= new Property<string>(typeof(Graph).Namespace + ".ExtraProperty.Version", "", false);
|
||||
}
|
||||
}
|
||||
}
|
||||
139
Common/DTS.Common.Serialization/TestSetup/Graph/Channel.cs
Normal file
139
Common/DTS.Common.Serialization/TestSetup/Graph/Channel.cs
Normal file
@@ -0,0 +1,139 @@
|
||||
using DTS.Common.Utilities;
|
||||
using DTS.Common.Utilities.DotNetProgrammingConstructs;
|
||||
|
||||
namespace DTS.Serialization
|
||||
{
|
||||
//[Serializable]
|
||||
public partial class TestSetup : Exceptional
|
||||
{
|
||||
public partial class Graph : Exceptional
|
||||
{
|
||||
public partial class Channel : Exceptional
|
||||
{
|
||||
private Channel()
|
||||
{
|
||||
ChannelId = "Not Set";
|
||||
}
|
||||
|
||||
public Channel(Test.Module.Channel channel)
|
||||
{
|
||||
ParentTestModule = channel.ParentModule;
|
||||
TestChannel = channel;
|
||||
ChannelId = channel.ChannelId;
|
||||
ChannelGroupName = channel.ChannelGroupName;
|
||||
//TODO use unique key
|
||||
//Identifier = channel.HardwareChannelName;
|
||||
}
|
||||
|
||||
public Channel(string channelId)
|
||||
{
|
||||
ParentTestModule = null;
|
||||
TestChannel = null;
|
||||
|
||||
ChannelId = channelId;
|
||||
}
|
||||
|
||||
public Channel(long groupChannelId)
|
||||
{
|
||||
ParentTestModule = null;
|
||||
TestChannel = null;
|
||||
ChannelId = groupChannelId.ToString();
|
||||
}
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
if (null != TestChannel)
|
||||
{
|
||||
return TestChannel.ToString();
|
||||
}
|
||||
return "Not Set";
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// refers to a unique id for a logical channel in the test
|
||||
/// for now this is using TestObjectChannel.GetId()
|
||||
/// which is in the form of TestObjectSerial_ChannelType_ChannelId
|
||||
/// </summary>
|
||||
private readonly Property<string> _channelId
|
||||
= new Property<string>(typeof(Channel).Namespace + ".Channel.ChannelId", "", true);
|
||||
public string ChannelId
|
||||
{
|
||||
get => _channelId.Value;
|
||||
set => _channelId.Value = value;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// refers to the Group name for a logical channel in the test
|
||||
/// </summary>
|
||||
private readonly Property<string> _channelGroupName
|
||||
= new Property<string>(typeof(Channel).Namespace + ".Channel.ChannelGroupName", "", true);
|
||||
public string ChannelGroupName
|
||||
{
|
||||
get => _channelGroupName.Value;
|
||||
set => _channelGroupName.Value = value;
|
||||
}
|
||||
|
||||
public string Name
|
||||
{
|
||||
get
|
||||
{
|
||||
if (null != TestChannel)
|
||||
{
|
||||
return TestChannel.ChannelDescriptionString;
|
||||
}
|
||||
return "Not Set";
|
||||
}
|
||||
}
|
||||
|
||||
[System.Xml.Serialization.XmlIgnoreAttribute]
|
||||
public string SensorName
|
||||
{
|
||||
get
|
||||
{
|
||||
if (null != TestChannel)
|
||||
{
|
||||
return TestChannel.ChannelDescriptionString.ToString();
|
||||
}
|
||||
return "Not Set";
|
||||
}
|
||||
}
|
||||
|
||||
[System.Xml.Serialization.XmlIgnoreAttribute]
|
||||
public string AxisUnit
|
||||
{
|
||||
get
|
||||
{
|
||||
if (null != TestChannel)
|
||||
{
|
||||
if (TestChannel is Test.Module.AnalogInputChannel)
|
||||
{
|
||||
return (TestChannel as Test.Module.AnalogInputChannel).EngineeringUnits;
|
||||
}
|
||||
return "EU";
|
||||
}
|
||||
return "EU";
|
||||
}
|
||||
}
|
||||
|
||||
[System.Xml.Serialization.XmlIgnoreAttribute]
|
||||
public string SerialNumber
|
||||
{
|
||||
get
|
||||
{
|
||||
if (null != TestChannel)
|
||||
{
|
||||
return ParentTestModule.SerialNumber;
|
||||
}
|
||||
return "Not Set";
|
||||
}
|
||||
}
|
||||
|
||||
[System.Xml.Serialization.XmlIgnoreAttribute]
|
||||
public Test.Module ParentTestModule;
|
||||
|
||||
[System.Xml.Serialization.XmlIgnoreAttribute]
|
||||
public Test.Module.Channel TestChannel;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
79
Common/DTS.Common.Serialization/TestSetup/Graph/Graph.cs
Normal file
79
Common/DTS.Common.Serialization/TestSetup/Graph/Graph.cs
Normal file
@@ -0,0 +1,79 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using DTS.Common.Utilities;
|
||||
using DTS.Common.Utilities.DotNetProgrammingConstructs;
|
||||
|
||||
namespace DTS.Serialization
|
||||
{
|
||||
//[Serializable]
|
||||
public partial class TestSetup : Exceptional
|
||||
{
|
||||
public partial class Graph : Exceptional
|
||||
{
|
||||
public Graph()
|
||||
{
|
||||
_Name.Value = null;
|
||||
_Version.Value = "1.0.0.0";
|
||||
Identifier = Guid.NewGuid();
|
||||
}
|
||||
|
||||
public void UnSet()
|
||||
{
|
||||
}
|
||||
public List<Channel> Channels
|
||||
{
|
||||
get => _Channels.Value;
|
||||
set => _Channels.Value = value;
|
||||
}
|
||||
private readonly Property<List<Channel>> _Channels
|
||||
= new Property<List<Channel>>(typeof(Graph).Namespace + "Graph.Channels", new List<Channel>(), true);
|
||||
|
||||
public string Name
|
||||
{
|
||||
get => _Name.Value;
|
||||
set => _Name.Value = value;
|
||||
}
|
||||
private readonly Property<string> _Name
|
||||
= new Property<string>(typeof(Graph).Namespace + ".Graph.Name", "", false);
|
||||
|
||||
public string HardwareChannelName
|
||||
{
|
||||
get => _HardwareChannelName.Value;
|
||||
set => _HardwareChannelName.Value = value;
|
||||
}
|
||||
private readonly Property<string> _HardwareChannelName
|
||||
= new Property<string>(typeof(Graph).Namespace + ".Graph.HardwareChannelName", "", true);
|
||||
|
||||
public string DisplayName => _Name.Value + "_" + _HardwareChannelName.Value;
|
||||
|
||||
public string Version
|
||||
{
|
||||
get => _Version.Value;
|
||||
set => _Version.Value = value;
|
||||
}
|
||||
private readonly Property<string> _Version
|
||||
= new Property<string>(typeof(Graph).Namespace + ".Graph.Version", "", false);
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return Name;
|
||||
}
|
||||
|
||||
[System.Xml.Serialization.XmlIgnoreAttribute]
|
||||
public bool IsSingleChannelGraph => ((null != Channels) && (1 == Channels.Count));
|
||||
|
||||
[System.Xml.Serialization.XmlIgnoreAttribute]
|
||||
public Channel FirstChannel => Channels[0];
|
||||
|
||||
[System.Xml.Serialization.XmlIgnoreAttribute]
|
||||
public Test.Module.Channel FirstTestChannel => Channels[0].TestChannel;
|
||||
|
||||
[System.Xml.Serialization.XmlIgnoreAttribute]
|
||||
public Guid Identifier
|
||||
{
|
||||
get;
|
||||
private set;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
70
Common/DTS.Common.Serialization/TestSetup/Sensor.cs
Normal file
70
Common/DTS.Common.Serialization/TestSetup/Sensor.cs
Normal file
@@ -0,0 +1,70 @@
|
||||
using DTS.Common.Utilities;
|
||||
using DTS.Common.Utilities.DotNetProgrammingConstructs;
|
||||
|
||||
namespace DTS.Serialization
|
||||
{
|
||||
//[Serializable]
|
||||
public partial class TestSetup : Exceptional
|
||||
{
|
||||
public partial class Sensor : Exceptional
|
||||
{
|
||||
public Sensor()
|
||||
{
|
||||
_filterClass.Value = null;
|
||||
_name.Value = null;
|
||||
_polarity.Value = null;
|
||||
_position.Value = null;
|
||||
_range.Value = null;
|
||||
_version.Value = "1.0.0.0";
|
||||
}
|
||||
|
||||
public string FilterClass
|
||||
{
|
||||
get => _filterClass.Value;
|
||||
set => _filterClass.Value = value;
|
||||
}
|
||||
private readonly Property<string> _filterClass
|
||||
= new Property<string>(typeof(Graph).Namespace + ".Sensor.FilterClass", "", false);
|
||||
|
||||
public string Name
|
||||
{
|
||||
get => _name.Value;
|
||||
set => _name.Value = value;
|
||||
}
|
||||
private readonly Property<string> _name
|
||||
= new Property<string>(typeof(Graph).Namespace + ".Sensor.Name", "", false);
|
||||
|
||||
public string Polarity
|
||||
{
|
||||
get => _polarity.Value;
|
||||
set => _polarity.Value = value;
|
||||
}
|
||||
private readonly Property<string> _polarity
|
||||
= new Property<string>(typeof(Graph).Namespace + ".Sensor.Polarity", "", false);
|
||||
|
||||
public string Position
|
||||
{
|
||||
get => _position.Value;
|
||||
set => _position.Value = value;
|
||||
}
|
||||
private readonly Property<string> _position
|
||||
= new Property<string>(typeof(Graph).Namespace + ".Sensor.Position", "", false);
|
||||
|
||||
public string Range
|
||||
{
|
||||
get => _range.Value;
|
||||
set => _range.Value = value;
|
||||
}
|
||||
private readonly Property<string> _range
|
||||
= new Property<string>(typeof(Graph).Namespace + ".Sensor.Range", "", false);
|
||||
|
||||
public string Version
|
||||
{
|
||||
get => _version.Value;
|
||||
set => _version.Value = value;
|
||||
}
|
||||
private readonly Property<string> _version
|
||||
= new Property<string>(typeof(Graph).Namespace + ".Sensor.Version", "", false);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,46 @@
|
||||
using DTS.Common.Utilities;
|
||||
using DTS.Common.Utilities.DotNetProgrammingConstructs;
|
||||
|
||||
namespace DTS.Serialization
|
||||
{
|
||||
//[Serializable]
|
||||
public partial class TestSetup : Exceptional
|
||||
{
|
||||
public partial class TestObject : Exceptional
|
||||
{
|
||||
public partial class TOChannel : Exceptional
|
||||
{
|
||||
public TOChannel()
|
||||
{
|
||||
_name.Value = null;
|
||||
_sensorName.Value = null;
|
||||
_version.Value = "1.0.0.0";
|
||||
}
|
||||
|
||||
public string Name
|
||||
{
|
||||
get => _name.Value;
|
||||
set => _name.Value = value;
|
||||
}
|
||||
private readonly Property<string> _name
|
||||
= new Property<string>(typeof(TOChannel).Namespace + ".Channel.Name", "", false);
|
||||
|
||||
public string SensorName
|
||||
{
|
||||
get => _sensorName.Value;
|
||||
set => _sensorName.Value = value;
|
||||
}
|
||||
private readonly Property<string> _sensorName
|
||||
= new Property<string>(typeof(TOChannel).Namespace + ".Channel.SensorName", "", false);
|
||||
|
||||
public string Version
|
||||
{
|
||||
get => _version.Value;
|
||||
set => _version.Value = value;
|
||||
}
|
||||
private readonly Property<string> _version
|
||||
= new Property<string>(typeof(TOChannel).Namespace + ".Channel.Version", "", false);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,83 @@
|
||||
using DTS.Common.Utilities;
|
||||
using DTS.Common.Utilities.DotNetProgrammingConstructs;
|
||||
|
||||
namespace DTS.Serialization
|
||||
{
|
||||
public partial class TestSetup : Exceptional
|
||||
{
|
||||
public partial class TestObject : Exceptional
|
||||
{
|
||||
public partial class DASHardware : Exceptional
|
||||
{
|
||||
public partial class DASChannel : Exceptional
|
||||
{
|
||||
public DASChannel()
|
||||
{
|
||||
_location.Value = null;
|
||||
_measurementUnits.Value = null;
|
||||
_name.Value = null;
|
||||
_numberOfSamples.Value = null;
|
||||
_serialNumber.Value = null;
|
||||
_version.Value = "1.0.0.0";
|
||||
}
|
||||
|
||||
public string Location
|
||||
{
|
||||
get => _location.Value;
|
||||
set => _location.Value = value;
|
||||
}
|
||||
private readonly Property<string> _location
|
||||
= new Property<string>(typeof(DASHardware).Namespace + ".DASChannel.Location", "", false);
|
||||
|
||||
public string MeasurementUnits
|
||||
{
|
||||
get => _measurementUnits.Value;
|
||||
set => _measurementUnits.Value = value;
|
||||
}
|
||||
private readonly Property<string> _measurementUnits
|
||||
= new Property<string>(typeof(DASHardware).Namespace + ".DASChannel.MeasurementUnits", "", false);
|
||||
|
||||
public string Name
|
||||
{
|
||||
get => _name.Value;
|
||||
set => _name.Value = value;
|
||||
}
|
||||
private readonly Property<string> _name
|
||||
= new Property<string>(typeof(DASHardware).Namespace + ".DASChannel.Name", "", false);
|
||||
|
||||
public string NumberOfSamples
|
||||
{
|
||||
get => _numberOfSamples.Value;
|
||||
set => _numberOfSamples.Value = value;
|
||||
}
|
||||
private readonly Property<string> _numberOfSamples
|
||||
= new Property<string>(typeof(DASHardware).Namespace + ".DASChannel.NumberOfSamples", "", false);
|
||||
|
||||
public string SensorName
|
||||
{
|
||||
get => _sensorName.Value;
|
||||
set => _sensorName.Value = value;
|
||||
}
|
||||
private readonly Property<string> _sensorName
|
||||
= new Property<string>(typeof(DASHardware).Namespace + ".DASChannel.SensorName", "", false);
|
||||
|
||||
public string SerialNumber
|
||||
{
|
||||
get => _serialNumber.Value;
|
||||
set => _serialNumber.Value = value;
|
||||
}
|
||||
private readonly Property<string> _serialNumber
|
||||
= new Property<string>(typeof(DASHardware).Namespace + ".DASChannel.SerialNumber", "", false);
|
||||
|
||||
public string Version
|
||||
{
|
||||
get => _version.Value;
|
||||
set => _version.Value = value;
|
||||
}
|
||||
private readonly Property<string> _version
|
||||
= new Property<string>(typeof(DASHardware).Namespace + ".DASChannel.Version", "", false);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,54 @@
|
||||
using System.Collections.Generic;
|
||||
using DTS.Common.Utilities;
|
||||
using DTS.Common.Utilities.DotNetProgrammingConstructs;
|
||||
|
||||
namespace DTS.Serialization
|
||||
{
|
||||
public partial class TestSetup : Exceptional
|
||||
{
|
||||
public partial class TestObject : Exceptional
|
||||
{
|
||||
public partial class DASHardware : Exceptional
|
||||
{
|
||||
public DASHardware()
|
||||
{
|
||||
_sampleRate.Value = null;
|
||||
_serialNumber.Value = null;
|
||||
_version.Value = "1.0.0.0";
|
||||
}
|
||||
|
||||
public List<DASChannel> DASChannels
|
||||
{
|
||||
get => _dasChannels.Value;
|
||||
set => _dasChannels.Value = value;
|
||||
}
|
||||
private readonly Property<List<DASChannel>> _dasChannels
|
||||
= new Property<List<DASChannel>>(typeof(TestObject).Namespace + "DASHardware.DASChannels", new List<DASChannel>(), true);
|
||||
|
||||
public string SampleRate
|
||||
{
|
||||
get => _sampleRate.Value;
|
||||
set => _sampleRate.Value = value;
|
||||
}
|
||||
private readonly Property<string> _sampleRate
|
||||
= new Property<string>(typeof(TestObject).Namespace + ".DASHardware.SampleRate", "", false);
|
||||
|
||||
public string SerialNumber
|
||||
{
|
||||
get => _serialNumber.Value;
|
||||
set => _serialNumber.Value = value;
|
||||
}
|
||||
private readonly Property<string> _serialNumber
|
||||
= new Property<string>(typeof(TestObject).Namespace + ".DASHardware.SerialNumber", "", false);
|
||||
|
||||
public string Version
|
||||
{
|
||||
get => _version.Value;
|
||||
set => _version.Value = value;
|
||||
}
|
||||
private readonly Property<string> _version
|
||||
= new Property<string>(typeof(TestObject).Namespace + ".DASHardware.Version", "", false);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,282 @@
|
||||
using System.Collections.Generic;
|
||||
using DTS.Common.Utilities;
|
||||
using DTS.Common.Utilities.DotNetProgrammingConstructs;
|
||||
|
||||
namespace DTS.Serialization
|
||||
{
|
||||
public partial class TestSetup : Exceptional
|
||||
{
|
||||
public partial class TestObject : Exceptional
|
||||
{
|
||||
public TestObject()
|
||||
{
|
||||
_BarrierHeight.Value = null;
|
||||
_BarrierWidth.Value = null;
|
||||
_ClassOfTestObject.Value = null;
|
||||
_CodeOfTestObject.Value = null;
|
||||
_Comment1.Value = null;
|
||||
_Comment2.Value = null;
|
||||
_Comment3.Value = null;
|
||||
_DriverPositionObject.Value = null;
|
||||
_ExcitationWarmupMS.Value = null;
|
||||
_ImpactSideTestObject.Value = null;
|
||||
_Location.Value = null;
|
||||
_MassOfTestObject.Value = null;
|
||||
_NameOfTestObject.Value = null;
|
||||
_NumberOfLoadCells.Value = null;
|
||||
_Offset.Value = null;
|
||||
_OriginX.Value = null;
|
||||
_OriginY.Value = null;
|
||||
_OriginZ.Value = null;
|
||||
_ReferenceSystem.Value = null;
|
||||
_RefNumberOfTestObject.Value = null;
|
||||
_SerialNumber.Value = null;
|
||||
_TargetSampleRate.Value = null;
|
||||
//_TypeOfTestObject.Value = null;
|
||||
_Velocity.Value = null;
|
||||
_VelocityMeasurementUnit.Value = null;
|
||||
_Version.Value = "1.0.0.0";
|
||||
_YawAngle.Value = null;
|
||||
}
|
||||
|
||||
public string BarrierHeight
|
||||
{
|
||||
get => _BarrierHeight.Value;
|
||||
set => _BarrierHeight.Value = value;
|
||||
}
|
||||
private readonly Property<string> _BarrierHeight
|
||||
= new Property<string>(typeof(TestObject).Namespace + ".TestObject.BarrierHeight", "", false);
|
||||
|
||||
public string BarrierWidth
|
||||
{
|
||||
get => _BarrierWidth.Value;
|
||||
set => _BarrierWidth.Value = value;
|
||||
}
|
||||
private readonly Property<string> _BarrierWidth
|
||||
= new Property<string>(typeof(TestObject).Namespace + ".TestObject.BarrierWidth", "", false);
|
||||
|
||||
public List<TOChannel> Channels
|
||||
{
|
||||
get => _Channels.Value;
|
||||
set => _Channels.Value = value;
|
||||
}
|
||||
private readonly Property<List<TOChannel>> _Channels
|
||||
= new Property<List<TOChannel>>(typeof(TestObject).Namespace + "TestObject.Channels", new List<TOChannel>(), true);
|
||||
|
||||
public string ClassOfTestObject
|
||||
{
|
||||
get => _ClassOfTestObject.Value;
|
||||
set => _ClassOfTestObject.Value = value;
|
||||
}
|
||||
private readonly Property<string> _ClassOfTestObject
|
||||
= new Property<string>(typeof(TestObject).Namespace + ".TestObject.ClassOfTestObject", "", false);
|
||||
|
||||
public string CodeOfTestObject
|
||||
{
|
||||
get => _CodeOfTestObject.Value;
|
||||
set => _CodeOfTestObject.Value = value;
|
||||
}
|
||||
private readonly Property<string> _CodeOfTestObject
|
||||
= new Property<string>(typeof(TestObject).Namespace + ".TestObject.CodeOfTestObject", "", false);
|
||||
|
||||
public string Comment1
|
||||
{
|
||||
get => _Comment1.Value;
|
||||
set => _Comment1.Value = value;
|
||||
}
|
||||
private readonly Property<string> _Comment1
|
||||
= new Property<string>(typeof(TestObject).Namespace + ".TestObject.Comment1", "", false);
|
||||
|
||||
public string Comment2
|
||||
{
|
||||
get => _Comment2.Value;
|
||||
set => _Comment2.Value = value;
|
||||
}
|
||||
private readonly Property<string> _Comment2
|
||||
= new Property<string>(typeof(TestObject).Namespace + ".TestObject.Comment2", "", false);
|
||||
|
||||
public string Comment3
|
||||
{
|
||||
get => _Comment3.Value;
|
||||
set => _Comment3.Value = value;
|
||||
}
|
||||
private readonly Property<string> _Comment3
|
||||
= new Property<string>(typeof(TestObject).Namespace + ".TestObject.Comment3", "", false);
|
||||
|
||||
public List<DASHardware> DASHardwares
|
||||
{
|
||||
get => _DASHardwares.Value;
|
||||
set => _DASHardwares.Value = value;
|
||||
}
|
||||
private readonly Property<List<DASHardware>> _DASHardwares
|
||||
= new Property<List<DASHardware>>(typeof(TestObject).Namespace + "TestObject.DASHardwares", new List<DASHardware>(), true);
|
||||
|
||||
public string DriverPositionObject
|
||||
{
|
||||
get => _DriverPositionObject.Value;
|
||||
set => _DriverPositionObject.Value = value;
|
||||
}
|
||||
private readonly Property<string> _DriverPositionObject
|
||||
= new Property<string>(typeof(TestObject).Namespace + ".TestObject.DriverPositionObject", "", false);
|
||||
|
||||
public string ExcitationWarmupMS
|
||||
{
|
||||
get => _ExcitationWarmupMS.Value;
|
||||
set => _ExcitationWarmupMS.Value = value;
|
||||
}
|
||||
private readonly Property<string> _ExcitationWarmupMS
|
||||
= new Property<string>(typeof(TestObject).Namespace + ".TestObject.ExcitationWarmupMS", "", false);
|
||||
|
||||
public List<ExtraProperty> ExtraProperties
|
||||
{
|
||||
get => _extraProperties.Value;
|
||||
set => _extraProperties.Value = value;
|
||||
}
|
||||
private readonly Property<List<ExtraProperty>> _extraProperties
|
||||
= new Property<List<ExtraProperty>>(typeof(TestObject).Namespace + ".TestObject.ExtraProperties", new List<ExtraProperty>(), true);
|
||||
|
||||
public string ImpactSideTestObject
|
||||
{
|
||||
get => _ImpactSideTestObject.Value;
|
||||
set => _ImpactSideTestObject.Value = value;
|
||||
}
|
||||
private readonly Property<string> _ImpactSideTestObject
|
||||
= new Property<string>(typeof(TestObject).Namespace + ".TestObject.ImpactSideTestObject", "", false);
|
||||
|
||||
public string Location
|
||||
{
|
||||
get => _Location.Value;
|
||||
set => _Location.Value = value;
|
||||
}
|
||||
private readonly Property<string> _Location
|
||||
= new Property<string>(typeof(TestObject).Namespace + ".TestObject.Location", "", false);
|
||||
|
||||
public string MassOfTestObject
|
||||
{
|
||||
get => _MassOfTestObject.Value;
|
||||
set => _MassOfTestObject.Value = value;
|
||||
}
|
||||
private readonly Property<string> _MassOfTestObject
|
||||
= new Property<string>(typeof(TestObject).Namespace + ".TestObject.MassOfTestObject", "", false);
|
||||
|
||||
public string NameOfTestObject
|
||||
{
|
||||
get => _NameOfTestObject.Value;
|
||||
set => _NameOfTestObject.Value = value;
|
||||
}
|
||||
private readonly Property<string> _NameOfTestObject
|
||||
= new Property<string>(typeof(TestObject).Namespace + ".TestObject.NameOfTestObject", "", false);
|
||||
|
||||
public string NumberOfLoadCells
|
||||
{
|
||||
get => _NumberOfLoadCells.Value;
|
||||
set => _NumberOfLoadCells.Value = value;
|
||||
}
|
||||
private readonly Property<string> _NumberOfLoadCells
|
||||
= new Property<string>(typeof(TestObject).Namespace + ".TestObject.NumberOfLoadCells", "", false);
|
||||
|
||||
public string Offset
|
||||
{
|
||||
get => _Offset.Value;
|
||||
set => _Offset.Value = value;
|
||||
}
|
||||
private readonly Property<string> _Offset
|
||||
= new Property<string>(typeof(TestObject).Namespace + ".TestObject.Offset", "", false);
|
||||
|
||||
public string OriginX
|
||||
{
|
||||
get => _OriginX.Value;
|
||||
set => _OriginX.Value = value;
|
||||
}
|
||||
private readonly Property<string> _OriginX
|
||||
= new Property<string>(typeof(TestObject).Namespace + ".TestObject.OriginX", "", false);
|
||||
|
||||
public string OriginY
|
||||
{
|
||||
get => _OriginY.Value;
|
||||
set => _OriginY.Value = value;
|
||||
}
|
||||
private readonly Property<string> _OriginY
|
||||
= new Property<string>(typeof(TestObject).Namespace + ".TestObject.OriginY", "", false);
|
||||
|
||||
public string OriginZ
|
||||
{
|
||||
get => _OriginZ.Value;
|
||||
set => _OriginZ.Value = value;
|
||||
}
|
||||
private readonly Property<string> _OriginZ
|
||||
= new Property<string>(typeof(TestObject).Namespace + ".TestObject.OriginZ", "", false);
|
||||
|
||||
public string ReferenceSystem
|
||||
{
|
||||
get => _ReferenceSystem.Value;
|
||||
set => _ReferenceSystem.Value = value;
|
||||
}
|
||||
private readonly Property<string> _ReferenceSystem
|
||||
= new Property<string>(typeof(TestObject).Namespace + ".TestObject.ReferenceSystem", "", false);
|
||||
|
||||
public string RefNumberOfTestObject
|
||||
{
|
||||
get => _RefNumberOfTestObject.Value;
|
||||
set => _RefNumberOfTestObject.Value = value;
|
||||
}
|
||||
private readonly Property<string> _RefNumberOfTestObject
|
||||
= new Property<string>(typeof(TestObject).Namespace + ".TestObject.RefNumberOfTestObject", "", false);
|
||||
|
||||
public string SerialNumber
|
||||
{
|
||||
get => _SerialNumber.Value;
|
||||
set => _SerialNumber.Value = value;
|
||||
}
|
||||
private readonly Property<string> _SerialNumber
|
||||
= new Property<string>(typeof(TestObject).Namespace + ".TestObject.SerialNumber", "", false);
|
||||
|
||||
public string TargetSampleRate
|
||||
{
|
||||
get => _TargetSampleRate.Value;
|
||||
set => _TargetSampleRate.Value = value;
|
||||
}
|
||||
private readonly Property<string> _TargetSampleRate
|
||||
= new Property<string>(typeof(TestObject).Namespace + ".TestObject.TargetSampleRate", "", false);
|
||||
|
||||
//public string TypeOfTestObject
|
||||
//{
|
||||
// get { return _TypeOfTestObject.Value; }
|
||||
// set { _TypeOfTestObject.Value = value; }
|
||||
//}
|
||||
//private Property<string> _TypeOfTestObject
|
||||
// = new Property<string>(typeof(TestObject).Namespace + ".TestObject.TypeOfTestObject", "", false);
|
||||
public string Velocity
|
||||
{
|
||||
get => _Velocity.Value;
|
||||
set => _Velocity.Value = value;
|
||||
}
|
||||
private readonly Property<string> _Velocity
|
||||
= new Property<string>(typeof(TestObject).Namespace + ".TestObject.Velocity", "", false);
|
||||
|
||||
public string VelocityMeasurementUnit
|
||||
{
|
||||
get => _VelocityMeasurementUnit.Value;
|
||||
set => _VelocityMeasurementUnit.Value = value;
|
||||
}
|
||||
private readonly Property<string> _VelocityMeasurementUnit
|
||||
= new Property<string>(typeof(TestObject).Namespace + ".TestObject.VelocityMeasurementUnit", "", false);
|
||||
|
||||
public string Version
|
||||
{
|
||||
get => _Version.Value;
|
||||
set => _Version.Value = value;
|
||||
}
|
||||
private readonly Property<string> _Version
|
||||
= new Property<string>(typeof(TestObject).Namespace + ".TestObject.Version", "", false);
|
||||
|
||||
public string YawAngle
|
||||
{
|
||||
get => _YawAngle.Value;
|
||||
set => _YawAngle.Value = value;
|
||||
}
|
||||
private readonly Property<string> _YawAngle
|
||||
= new Property<string>(typeof(TestObject).Namespace + ".TestObject.YawAngle", "", false);
|
||||
}
|
||||
}
|
||||
}
|
||||
468
Common/DTS.Common.Serialization/TestSetup/TestSetup.cs
Normal file
468
Common/DTS.Common.Serialization/TestSetup/TestSetup.cs
Normal file
@@ -0,0 +1,468 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using DTS.Common.Enums.Sensors;
|
||||
using DTS.Common.Utilities;
|
||||
using DTS.Common.Utilities.DotNetProgrammingConstructs;
|
||||
|
||||
namespace DTS.Serialization
|
||||
{
|
||||
[Serializable]
|
||||
public partial class TestSetup : Exceptional
|
||||
{
|
||||
public TestSetup()
|
||||
{
|
||||
_dateOfTheTest.Value = null;
|
||||
_description.Value = null;
|
||||
_calibrationBehavior.Value = CalibrationBehaviors.NonLinearIfAvailable;
|
||||
_exportFolder.Value = null;
|
||||
_exportTypes.Value = 0;
|
||||
|
||||
_labName.Value = null;
|
||||
_laboratoryName.Value = null;
|
||||
_laboratoryContactName.Value = null;
|
||||
_laboratoryContactPhone.Value = null;
|
||||
_laboratoryContactFax.Value = null;
|
||||
_laboratoryContactEmail.Value = null;
|
||||
_laboratoryTestReferenceNumber.Value = null;
|
||||
|
||||
_custName.Value = null;
|
||||
_customerName.Value = null;
|
||||
_customerTestReferenceNumber.Value = null;
|
||||
_customerProjectReferenceNumber.Value = null;
|
||||
_customerOrderNumber.Value = null;
|
||||
_customerCostUnit.Value = null;
|
||||
_testEngineerName.Value = null;
|
||||
_testEngineerPhone.Value = null;
|
||||
_testEngineerFax.Value = null;
|
||||
_testEngineerEmail.Value = null;
|
||||
|
||||
_name.Value = null;
|
||||
_numberOfMedia.Value = null;
|
||||
_numberOfTestObjects.Value = null;
|
||||
_testComment.Value = null;
|
||||
_typeOfTheTest.Value = null;
|
||||
_referenceTemperature.Value = null;
|
||||
_relativeAirHumidity.Value = null;
|
||||
_regulation.Value = null;
|
||||
_subtype.Value = null;
|
||||
_dateOfTheTest.Value = null;
|
||||
_timestamp.Value = null;
|
||||
//version 2.0 - 2019-05-17 added Upload/UploadFolder/UploadExportsOnly
|
||||
_version.Value = "2.0.0.0";
|
||||
_upload.Value = false;
|
||||
_uploadExportsOnly.Value = false;
|
||||
_uploadFolder.Value = "";
|
||||
}
|
||||
|
||||
private readonly Property<bool> _upload =
|
||||
new Property<bool>(typeof(TestSetup).Namespace + ".TestSetup.Upload", false, true);
|
||||
/// <summary>
|
||||
/// indicates whether the test setup was configured to upload when it was run
|
||||
/// 12874 export button, upload feature not displaying information
|
||||
/// </summary>
|
||||
public bool Upload
|
||||
{
|
||||
get => _upload.Value;
|
||||
set => _upload.Value = value;
|
||||
}
|
||||
|
||||
private readonly Property<string> _uploadFolder =
|
||||
new Property<string>(typeof(TestSetup).Namespace + ".TestSetup.UploadFolder", "", true);
|
||||
/// <summary>
|
||||
/// stores the simple upload folder value set in edit test setup
|
||||
/// 12874 export button, upload feature not displaying information
|
||||
/// this is where the test setup was configured to upload when it was run
|
||||
/// this is overridden by an INI file if one is set
|
||||
/// </summary>
|
||||
public string UploadFolder
|
||||
{
|
||||
get => _uploadFolder.Value;
|
||||
set => _uploadFolder.Value = value;
|
||||
}
|
||||
|
||||
private readonly Property<bool> _uploadExportsOnly =
|
||||
new Property<bool>(typeof(TestSetup).Namespace + ".TestSetup.UploadExportsOnly", false, true);
|
||||
/// <summary>
|
||||
/// stores the simple upload folder value set in edit test setup
|
||||
/// 12874 export button, upload feature not displaying information
|
||||
/// this is where the test setup was configured to upload when it was run
|
||||
/// this is overridden by an INI file if one is set
|
||||
/// </summary>
|
||||
public bool UploadExportsOnly
|
||||
{
|
||||
get => _uploadExportsOnly.Value;
|
||||
set => _uploadExportsOnly.Value = value;
|
||||
}
|
||||
|
||||
|
||||
private readonly Property<string> _isfFile
|
||||
= new Property<string>(typeof(TestSetup).Namespace + ".TestSetup.ISFFile", "", true);
|
||||
public string ISFFile
|
||||
{
|
||||
get => _isfFile.Value;
|
||||
set => _isfFile.Value = value;
|
||||
}
|
||||
|
||||
public string DateOfTheTest
|
||||
{
|
||||
get => _dateOfTheTest.Value;
|
||||
set => _dateOfTheTest.Value = value;
|
||||
}
|
||||
private readonly Property<string> _dateOfTheTest
|
||||
= new Property<string>(typeof(TestSetup).Namespace + ".TestSetup.DateOfTheTest", "", false);
|
||||
|
||||
public string Description
|
||||
{
|
||||
get => _description.Value;
|
||||
set => _description.Value = value;
|
||||
}
|
||||
private readonly Property<string> _description
|
||||
= new Property<string>(typeof(TestSetup).Namespace + ".TestSetup.Description", "", false);
|
||||
|
||||
public CalibrationBehaviors CalibrationBehavior
|
||||
{
|
||||
get => _calibrationBehavior.Value;
|
||||
set => _calibrationBehavior.Value = value;
|
||||
}
|
||||
private readonly Property<CalibrationBehaviors> _calibrationBehavior
|
||||
= new Property<CalibrationBehaviors>(typeof(TestSetup).Namespace + ".TestSetup.CalibrationBehavior", CalibrationBehaviors.NonLinearIfAvailable, false);
|
||||
|
||||
public string ExportFolder
|
||||
{
|
||||
get => _exportFolder.Value;
|
||||
set => _exportFolder.Value = value;
|
||||
}
|
||||
private readonly Property<string> _exportFolder
|
||||
= new Property<string>(typeof(TestSetup).Namespace + ".TestSetup.ExportFolder", "", false);
|
||||
|
||||
public Int32 ExportTypes
|
||||
{
|
||||
get => _exportTypes.Value;
|
||||
set => _exportTypes.Value = value;
|
||||
}
|
||||
private readonly Property<Int32> _exportTypes
|
||||
= new Property<Int32>(typeof(TestSetup).Namespace + ".TestSetup.ExportFormats", new Int32(), false);
|
||||
|
||||
public List<Graph> Graphs
|
||||
{
|
||||
get => _graphs.Value;
|
||||
set => _graphs.Value = value;
|
||||
}
|
||||
private readonly Property<List<Graph>> _graphs
|
||||
= new Property<List<Graph>>(typeof(TestSetup).Namespace + ".TestSetup.Graphs", new List<Graph>(), true);
|
||||
|
||||
public List<Sensor> Sensors
|
||||
{
|
||||
get => _sensors.Value;
|
||||
set => _sensors.Value = value;
|
||||
}
|
||||
private readonly Property<List<Sensor>> _sensors
|
||||
= new Property<List<Sensor>>(typeof(TestSetup).Namespace + ".TestSetup.Sensors", new List<Sensor>(), true);
|
||||
|
||||
public string LabName
|
||||
{
|
||||
get => _labName.Value;
|
||||
set => _labName.Value = value;
|
||||
}
|
||||
private readonly Property<string> _labName
|
||||
= new Property<string>(typeof(TestSetup).Namespace + ".TestSetup.LabName", "", false);
|
||||
|
||||
public string LaboratoryName
|
||||
{
|
||||
get => _laboratoryName.Value;
|
||||
set => _laboratoryName.Value = value;
|
||||
}
|
||||
private readonly Property<string> _laboratoryName
|
||||
= new Property<string>(typeof(TestSetup).Namespace + ".TestSetup.LaboratoryName", "", false);
|
||||
|
||||
public string LaboratoryContactName
|
||||
{
|
||||
get => _laboratoryContactName.Value;
|
||||
set => _laboratoryContactName.Value = value;
|
||||
}
|
||||
private readonly Property<string> _laboratoryContactName
|
||||
= new Property<string>(typeof(TestSetup).Namespace + ".TestSetup.LaboratoryContactName", "", false);
|
||||
|
||||
public string LaboratoryContactPhone
|
||||
{
|
||||
get => _laboratoryContactPhone.Value;
|
||||
set => _laboratoryContactPhone.Value = value;
|
||||
}
|
||||
private readonly Property<string> _laboratoryContactPhone
|
||||
= new Property<string>(typeof(TestSetup).Namespace + ".TestSetup.LaboratoryContactPhone", "", false);
|
||||
|
||||
public string LaboratoryContactFax
|
||||
{
|
||||
get => _laboratoryContactFax.Value;
|
||||
set => _laboratoryContactFax.Value = value;
|
||||
}
|
||||
private readonly Property<string> _laboratoryContactFax
|
||||
= new Property<string>(typeof(TestSetup).Namespace + ".TestSetup.LaboratoryContactFax", "", false);
|
||||
|
||||
public string LaboratoryContactEmail
|
||||
{
|
||||
get => _laboratoryContactEmail.Value;
|
||||
set => _laboratoryContactEmail.Value = value;
|
||||
}
|
||||
private readonly Property<string> _laboratoryContactEmail
|
||||
= new Property<string>(typeof(TestSetup).Namespace + ".TestSetup.LaboratoryContactEmail", "", false);
|
||||
|
||||
public string LaboratoryTestReferenceNumber
|
||||
{
|
||||
get => _laboratoryTestReferenceNumber.Value;
|
||||
set => _laboratoryTestReferenceNumber.Value = value;
|
||||
}
|
||||
private readonly Property<string> _laboratoryTestReferenceNumber
|
||||
= new Property<string>(typeof(TestSetup).Namespace + ".TestSetup.LaboratoryTestReferenceNumber", "", false);
|
||||
|
||||
public string LaboratoryProjectReferenceNumber
|
||||
{
|
||||
get
|
||||
{
|
||||
if (_laboratoryProjectReferenceNumber.IsValueInitialized) { return _laboratoryProjectReferenceNumber.Value; }
|
||||
return "";
|
||||
}
|
||||
set => _laboratoryProjectReferenceNumber.Value = value;
|
||||
}
|
||||
private readonly Property<string> _laboratoryProjectReferenceNumber
|
||||
= new Property<string>(typeof(TestSetup).Namespace + ".TestSetup.LaboratoryProjectReferenceNumber", "", false);
|
||||
|
||||
public string CustName
|
||||
{
|
||||
get => _custName.Value;
|
||||
set => _custName.Value = value;
|
||||
}
|
||||
private readonly Property<string> _custName
|
||||
= new Property<string>(typeof(TestSetup).Namespace + ".TestSetup.CustName", "", false);
|
||||
|
||||
public string CustomerName
|
||||
{
|
||||
get => _customerName.Value;
|
||||
set => _customerName.Value = value;
|
||||
}
|
||||
private readonly Property<string> _customerName
|
||||
= new Property<string>(typeof(TestSetup).Namespace + ".TestSetup.CustomerName", "", false);
|
||||
|
||||
public string CustomerTestReferenceNumber
|
||||
{
|
||||
get => _customerTestReferenceNumber.Value;
|
||||
set => _customerTestReferenceNumber.Value = value;
|
||||
}
|
||||
private readonly Property<string> _customerTestReferenceNumber
|
||||
= new Property<string>(typeof(TestSetup).Namespace + ".TestSetup.CustomerTestReferenceNumber", "", false);
|
||||
|
||||
public string CustomerProjectReferenceNumber
|
||||
{
|
||||
get => _customerProjectReferenceNumber.Value;
|
||||
set => _customerProjectReferenceNumber.Value = value;
|
||||
}
|
||||
private readonly Property<string> _customerProjectReferenceNumber
|
||||
= new Property<string>(typeof(TestSetup).Namespace + ".TestSetup.CustomerProjectReferenceNumber", "", false);
|
||||
|
||||
public string CustomerOrderNumber
|
||||
{
|
||||
get => _customerOrderNumber.Value;
|
||||
set => _customerOrderNumber.Value = value;
|
||||
}
|
||||
private readonly Property<string> _customerOrderNumber
|
||||
= new Property<string>(typeof(TestSetup).Namespace + ".TestSetup.CustomerOrderNumber", "", false);
|
||||
|
||||
public string CustomerCostUnit
|
||||
{
|
||||
get => _customerCostUnit.Value;
|
||||
set => _customerCostUnit.Value = value;
|
||||
}
|
||||
private readonly Property<string> _customerCostUnit
|
||||
= new Property<string>(typeof(TestSetup).Namespace + ".TestSetup.CustomerCostUnit", "", false);
|
||||
|
||||
public string TEName
|
||||
{
|
||||
get => _teName.IsValueInitialized ? _teName.Value : "";
|
||||
set => _teName.Value = value;
|
||||
}
|
||||
private readonly Property<string> _teName
|
||||
= new Property<string>(typeof(TestSetup).Namespace + ".TestSetup.TEName", "", false);
|
||||
|
||||
public string TestEngineerName
|
||||
{
|
||||
get => _testEngineerName.Value;
|
||||
set => _testEngineerName.Value = value;
|
||||
}
|
||||
private readonly Property<string> _testEngineerName
|
||||
= new Property<string>(typeof(TestSetup).Namespace + ".TestSetup.TestEngineerName", "", false);
|
||||
|
||||
public string TestEngineerPhone
|
||||
{
|
||||
get => _testEngineerPhone.Value;
|
||||
set => _testEngineerPhone.Value = value;
|
||||
}
|
||||
private readonly Property<string> _testEngineerPhone
|
||||
= new Property<string>(typeof(TestSetup).Namespace + ".TestSetup.TestEngineerPhone", "", false);
|
||||
|
||||
public string TestEngineerFax
|
||||
{
|
||||
get => _testEngineerFax.Value;
|
||||
set => _testEngineerFax.Value = value;
|
||||
}
|
||||
private readonly Property<string> _testEngineerFax
|
||||
= new Property<string>(typeof(TestSetup).Namespace + ".TestSetup.TestEngineerFax", "", false);
|
||||
|
||||
public string TestEngineerEmail
|
||||
{
|
||||
get => _testEngineerEmail.Value;
|
||||
set => _testEngineerEmail.Value = value;
|
||||
}
|
||||
private readonly Property<string> _testEngineerEmail
|
||||
= new Property<string>(typeof(TestSetup).Namespace + ".TestSetup.TestEngineerEmail", "", false);
|
||||
|
||||
public string Name
|
||||
{
|
||||
get => _name.Value;
|
||||
set => _name.Value = value;
|
||||
}
|
||||
private readonly Property<string> _name
|
||||
= new Property<string>(typeof(TestSetup).Namespace + ".TestSetup.Name", "", false);
|
||||
|
||||
public string NumberOfTestObjects
|
||||
{
|
||||
get => _numberOfTestObjects.Value;
|
||||
set => _numberOfTestObjects.Value = value;
|
||||
}
|
||||
private readonly Property<string> _numberOfTestObjects
|
||||
= new Property<string>(typeof(TestSetup).Namespace + ".TestSetup.NumberOfTestObjects", "", false);
|
||||
|
||||
public string NumberOfMedia
|
||||
{
|
||||
get => _numberOfMedia.Value;
|
||||
set => _numberOfMedia.Value = value;
|
||||
}
|
||||
private readonly Property<string> _numberOfMedia
|
||||
= new Property<string>(typeof(TestSetup).Namespace + ".TestSetup.NumberOfMedia", "", false);
|
||||
|
||||
public string ReferenceTemperature
|
||||
{
|
||||
get => _referenceTemperature.Value;
|
||||
set => _referenceTemperature.Value = value;
|
||||
}
|
||||
private readonly Property<string> _referenceTemperature
|
||||
= new Property<string>(typeof(TestSetup).Namespace + ".TestSetup.ReferenceTemperature", "", false);
|
||||
|
||||
public string Regulation
|
||||
{
|
||||
get => _regulation.Value;
|
||||
set => _regulation.Value = value;
|
||||
}
|
||||
private readonly Property<string> _regulation
|
||||
= new Property<string>(typeof(TestSetup).Namespace + ".TestSetup.Regulation", "", false);
|
||||
|
||||
public string RelativeAirHumidity
|
||||
{
|
||||
get => _relativeAirHumidity.Value;
|
||||
set => _relativeAirHumidity.Value = value;
|
||||
}
|
||||
private readonly Property<string> _relativeAirHumidity
|
||||
= new Property<string>(typeof(TestSetup).Namespace + ".TestSetup.RelativeAirHumidity", "", false);
|
||||
|
||||
public string Subtype
|
||||
{
|
||||
get => _subtype.Value;
|
||||
set => _subtype.Value = value;
|
||||
}
|
||||
private readonly Property<string> _subtype
|
||||
= new Property<string>(typeof(TestSetup).Namespace + ".TestSetup.Subtype", "", false);
|
||||
|
||||
public string TestComment
|
||||
{
|
||||
get => _testComment.Value;
|
||||
set => _testComment.Value = value;
|
||||
}
|
||||
private readonly Property<string> _testComment
|
||||
= new Property<string>(typeof(TestSetup).Namespace + ".TestSetup.TestComment", "", false);
|
||||
|
||||
public List<ExtraProperty> ExtraProperties
|
||||
{
|
||||
get => _extraProperties.Value;
|
||||
set => _extraProperties.Value = value;
|
||||
}
|
||||
private readonly Property<List<ExtraProperty>> _extraProperties
|
||||
= new Property<List<ExtraProperty>>(typeof(TestSetup).Namespace + ".TestSetup.ExtraProperties", new List<ExtraProperty>(), true);
|
||||
|
||||
public List<TestObject> TestObjects
|
||||
{
|
||||
get => _testObjects.Value;
|
||||
set => _testObjects.Value = value;
|
||||
}
|
||||
private readonly Property<List<TestObject>> _testObjects
|
||||
= new Property<List<TestObject>>(typeof(TestSetup).Namespace + ".TestSetup.TestObjects", new List<TestObject>(), true);
|
||||
|
||||
public string Timestamp
|
||||
{
|
||||
get => _timestamp.Value;
|
||||
set => _timestamp.Value = value;
|
||||
}
|
||||
private readonly Property<string> _timestamp
|
||||
= new Property<string>(typeof(TestSetup).Namespace + ".TestSetup.Timestamp", "", false);
|
||||
|
||||
public string TypeOfTheTest
|
||||
{
|
||||
get => _typeOfTheTest.Value;
|
||||
set => _typeOfTheTest.Value = value;
|
||||
}
|
||||
private readonly Property<string> _typeOfTheTest
|
||||
= new Property<string>(typeof(TestSetup).Namespace + ".TestSetup.TypeOfTheTest", "", false);
|
||||
|
||||
public virtual string Version
|
||||
{
|
||||
get => _version.Value;
|
||||
set => _version.Value = value;
|
||||
}
|
||||
private readonly Property<string> _version
|
||||
= new Property<string>(typeof(TestSetup).Namespace + ".TestSetup.Version", "", false);
|
||||
|
||||
//Placeholder for all graph channels
|
||||
[System.Xml.Serialization.XmlIgnore]
|
||||
public List<Graph.Channel> Channels = new List<Graph.Channel>();
|
||||
|
||||
//Placeholder for Single Channel Graphs
|
||||
[System.Xml.Serialization.XmlIgnore]
|
||||
public List<Graph> SingleChannelGraphs = new List<Graph>();
|
||||
|
||||
[System.Xml.Serialization.XmlIgnore]
|
||||
public IDictionary<Guid, Graph> SortedGraphs = new Dictionary<Guid, Graph>();
|
||||
|
||||
/*
|
||||
* Display listing of graphs is a little funny:
|
||||
* First come defined multi-channel graphs in the order that they are listed in the .dts file.
|
||||
* Next come the single channel files that are created when a dts file is read in sorted by display order
|
||||
* Finally come all the calculated channels, sorted in display order.
|
||||
*/
|
||||
|
||||
public void SortGraphs()
|
||||
{
|
||||
SortedGraphs.Clear();
|
||||
|
||||
foreach (var g in Graphs)
|
||||
{
|
||||
SortedGraphs.Add(g.Identifier, g);
|
||||
}
|
||||
|
||||
//All of the multi channel graphs are in the dictionary in the correct order, now sort the single channel graphs.
|
||||
SingleChannelGraphs.Sort(GraphDisplayOrderComparer);
|
||||
|
||||
//Add them to the dictionary
|
||||
foreach (var g in SingleChannelGraphs)
|
||||
{
|
||||
SortedGraphs.Add(g.Identifier, g);
|
||||
}
|
||||
}
|
||||
|
||||
private int GraphDisplayOrderComparer(Graph a, Graph b)
|
||||
{
|
||||
if (a == b) { return 0; }
|
||||
if (null == a) { return -1; }
|
||||
if (null == b) { return 1; }
|
||||
|
||||
return a.FirstTestChannel.AbsoluteDisplayOrder.CompareTo(b.FirstTestChannel.AbsoluteDisplayOrder);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user