init
This commit is contained in:
@@ -0,0 +1,87 @@
|
||||
using IRIGCh10;
|
||||
using System.ComponentModel;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace DTS.Serialization.IRIGCH10.TMATS.DataConversion
|
||||
{
|
||||
public enum MeasurandAttributes
|
||||
{
|
||||
[Description("MN1")]
|
||||
[MaxLength(64)]
|
||||
Description,
|
||||
[Description("MNA")]
|
||||
[MaxLength(32)]
|
||||
MeasurementAlias,
|
||||
[Description("MN2")]
|
||||
[MaxLength(10)]
|
||||
ExcitationVoltage,
|
||||
[Description("MN3")]
|
||||
[MaxLength(16)]
|
||||
EngineeringUnits,
|
||||
[Description("MN4")]
|
||||
[MaxLength(3)]
|
||||
LinkType
|
||||
}
|
||||
|
||||
public enum SourceDataTypeLinks
|
||||
{
|
||||
[Description("ANA")]
|
||||
FM,
|
||||
[Description("PCM")]
|
||||
PCM,
|
||||
[Description("PAM")]
|
||||
PAM,
|
||||
[Description("OTH")]
|
||||
Other
|
||||
}
|
||||
/// <summary>
|
||||
/// implements the measurand section of the tmats document
|
||||
/// </summary>
|
||||
public class MeasurandSection : TMATSSection<MeasurandAttributes>
|
||||
{
|
||||
public MeasurandSection(int number) : base(AttributeIdentifiers.DataConversionAttributes, number)
|
||||
{
|
||||
|
||||
}
|
||||
/// <summary>
|
||||
/// DESCRIBE THE PARAMETER BEING MEASURED.
|
||||
/// </summary>
|
||||
public string Description
|
||||
{
|
||||
get => GetValue(MeasurandAttributes.Description);
|
||||
set => SetValueWithLength(MeasurandAttributes.Description, value);
|
||||
}
|
||||
/// <summary>
|
||||
/// ALTERNATE MEASURAND NAME
|
||||
/// </summary>
|
||||
public string MeasurementAlias
|
||||
{
|
||||
get => GetValue(MeasurandAttributes.MeasurementAlias);
|
||||
set => SetValueWithLength( MeasurandAttributes.MeasurementAlias, value);
|
||||
}
|
||||
/// <summary>
|
||||
/// SENSOR REFERENCE VOLTAGE, IN VOLTS
|
||||
/// </summary>
|
||||
public string ExcitationVoltage
|
||||
{
|
||||
get => GetValue(MeasurandAttributes.ExcitationVoltage);
|
||||
set => SetValueWithLength(MeasurandAttributes.ExcitationVoltage, value);
|
||||
}
|
||||
/// <summary>
|
||||
/// DEFINE THE ENGINEERING UNITS APPLICABLE TO THE OUTPUT DATA.
|
||||
/// </summary>
|
||||
public string EngineeringUnits
|
||||
{
|
||||
get => GetValue(MeasurandAttributes.EngineeringUnits);
|
||||
set => SetValueWithLength(MeasurandAttributes.EngineeringUnits, value);
|
||||
}
|
||||
/// <summary>
|
||||
/// DEFINE THE SOURCE DATA LINK TYPE:
|
||||
/// </summary>
|
||||
/// <param name="linkType"></param>
|
||||
public void SetLinkType(SourceDataTypeLinks linkType)
|
||||
{
|
||||
SetValueWithLength(MeasurandAttributes.LinkType, DescriptionDecoder.GetDescription(linkType));
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user