158 lines
4.5 KiB
C#
158 lines
4.5 KiB
C#
using System;
|
|
using System.ComponentModel;
|
|
using System.Linq;
|
|
using System.Reflection;
|
|
|
|
namespace DTS.Common.Enums
|
|
{
|
|
public static class HeaderLineExtension
|
|
{
|
|
public static string GetDescription(this Enum genericEnum)
|
|
{
|
|
Type genericEnumType = genericEnum.GetType();
|
|
MemberInfo[] memberInfo = genericEnumType.GetMember(genericEnum.ToString());
|
|
if ((memberInfo != null && memberInfo.Length > 0))
|
|
{
|
|
var attribs = memberInfo[0].GetCustomAttributes(typeof(DescriptionAttribute), false);
|
|
if (attribs != null && attribs.Any())
|
|
{
|
|
return ((DescriptionAttribute)attribs.ElementAt(0)).Description;
|
|
}
|
|
}
|
|
return genericEnum.ToString();
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// The various header lines (and associated text) that appear in CSV file format.
|
|
/// </summary>
|
|
public enum FtssHeaderLine
|
|
{
|
|
[Description("Headers")] Headers = 0,
|
|
|
|
[Description("Test Date")] TestDate,
|
|
|
|
[Description("Test Time")] TestTime,
|
|
|
|
[Description("Test ID")] TestId,
|
|
|
|
[Description("Test Description")] TestDescription,
|
|
|
|
[Description("Sample Rate (Hz)")] SampleRate,
|
|
|
|
[Description("Hardware AA Filter (-3dB)")]
|
|
HardwareAntiAliasFilter,
|
|
|
|
[Description("Data Channel Number")] DataChannelNumber,
|
|
|
|
[Description("ISO Channel Code")] IsoCode,
|
|
|
|
[Description("User Channel Code")] UserCode,
|
|
|
|
[Description("Channel Description")] ChannelDescription,
|
|
|
|
[Description("Channel Location")] ChannelLocation,
|
|
|
|
[Description("Sensor S/N")] SensorSerialNumber,
|
|
|
|
[Description("Sensor Calibration Date")] SensorCalDate, //17651: include sensor cal date in CSV exports
|
|
|
|
[Description("Software Filter (SAE Class)")]
|
|
SoftwareFilter,
|
|
|
|
[Description("Software Filter (-3dB)")]
|
|
SoftwareFilterDb,
|
|
|
|
[Description("Engineering Unit")] EngineeringUnits,
|
|
|
|
[Description("User Comment")] UserComment,
|
|
|
|
[Description("Number of Pre-Zero Data Pts")]
|
|
PreZero,
|
|
|
|
[Description("Number of Post-Zero Data Pts")]
|
|
PostZero,
|
|
|
|
[Description("Data Zero (CNTS)")] DataZero,
|
|
|
|
[Description("Scale Factor (EU/CNT)")] ScaleEu,
|
|
|
|
[Description("Scale Factor (mV/CNT)")] ScaleMv,
|
|
|
|
[Description("Channel Name")] ChannelName,
|
|
|
|
[Description("Display Name")] DisplayName,
|
|
|
|
[Description("DAS Serial Number")]
|
|
HardwareLine,
|
|
|
|
[Description("Zero Method")] ZeroMethod,
|
|
|
|
[Description("Remove Offset")] RemoveOffset,
|
|
|
|
[Description("Group Name")] GroupName,
|
|
|
|
[Description("Time of T0 (UTC)")] Timestamp, // FB15333: Add PTP/RTC timestamp column for CSV exports
|
|
|
|
[Description("Data Starts Here")] DataStart,
|
|
|
|
[Description("Time")] Labels,
|
|
}
|
|
/// <summary>
|
|
/// The various header lines (and associated text) that appear in XLSX file format.
|
|
/// </summary>
|
|
public enum XLSXExportHeaderLine
|
|
{
|
|
[Description("Headers")] Headers = 0,
|
|
|
|
[Description("Test Date")] TestDate,
|
|
|
|
[Description("Test Time")] TestTime,
|
|
|
|
[Description("Test ID")] TestId,
|
|
|
|
[Description("Test Description")] TestDescription,
|
|
|
|
[Description("Sample Rate (Hz)")] SampleRate,
|
|
|
|
[Description("Hardware AA Filter (-3dB)")]
|
|
HardwareAntiAliasFilter,
|
|
|
|
[Description("Data Channel Number")] DataChannelNumber,
|
|
|
|
[Description("ISO Channel Code")] IsoCode,
|
|
|
|
[Description("Channel Description")] ChannelDescription,
|
|
|
|
[Description("Channel Location")] ChannelLocation,
|
|
|
|
[Description("Sensor S/N")] SensorSerialNumber,
|
|
|
|
[Description("Software Filter (SAE Class)")]
|
|
SoftwareFilter,
|
|
|
|
[Description("Software Filter (-3dB)")]
|
|
SoftwareFilterDb,
|
|
|
|
[Description("Engineering Unit")] EngineeringUnits,
|
|
|
|
[Description("User Comment")] UserComment,
|
|
|
|
[Description("Number of Pre-Zero Data Pts")]
|
|
PreZero,
|
|
|
|
[Description("Number of Post-Zero Data Pts")]
|
|
PostZero,
|
|
|
|
[Description("Data Zero (CNTS)")] DataZero,
|
|
|
|
[Description("Scale Factor (EU/CNT)")] ScaleEu,
|
|
|
|
[Description("Scale Factor (mV/CNT)")] ScaleMv,
|
|
|
|
[Description("Data Starts Here")] DataStart,
|
|
|
|
[Description("Time")] Labels,
|
|
}
|
|
}
|