56 lines
1.4 KiB
C#
56 lines
1.4 KiB
C#
using IRIGCh10;
|
|
using System.ComponentModel;
|
|
using System.ComponentModel.DataAnnotations;
|
|
|
|
namespace DTS.Serialization.IRIGCH10.TMATS.DataConversion
|
|
{
|
|
public enum TelemetryAttributes
|
|
{
|
|
[Description("BFM")]
|
|
[MaxLength(3)]
|
|
BinaryFormat
|
|
}
|
|
|
|
public enum BinaryFormats
|
|
{
|
|
[Description("INT")]
|
|
Integer,
|
|
[Description("UNS")]
|
|
UnsignedBinary,
|
|
[Description("SIG")]
|
|
SignAndMagnitudeSig,
|
|
[Description("SIM")]
|
|
SignAndMagnitudeSim,
|
|
[Description("ONE")]
|
|
OnesCompliment,
|
|
[Description("TWO")]
|
|
TwosCompliment,
|
|
[Description("OFF")]
|
|
OffsetBinary,
|
|
[Description("FPT")]
|
|
FloatingPoint,
|
|
[Description("BCD")]
|
|
BinaryCodedDecimal,
|
|
[Description("BWT")]
|
|
BitWeight,
|
|
[Description("OTH")]
|
|
Other
|
|
}
|
|
/// <summary>
|
|
/// implements part of the telemetry section of the TMATS packet (see chapter 9)
|
|
/// </summary>
|
|
public class TelemetrySection : TMATSSection<TelemetryAttributes>
|
|
{
|
|
public TelemetrySection(int number) : base(AttributeIdentifiers.DataConversionAttributes, number)
|
|
{
|
|
}
|
|
|
|
public void SetBinaryFormat(BinaryFormats format)
|
|
{
|
|
SetValueWithLength(TelemetryAttributes.BinaryFormat,
|
|
DescriptionDecoder.GetDescription(format));
|
|
}
|
|
}
|
|
|
|
}
|