87 lines
2.6 KiB
C#
87 lines
2.6 KiB
C#
namespace MODSensorFile
|
|
{
|
|
public class MODSensor
|
|
{
|
|
/// <summary>
|
|
/// Sensor Record ID; 3 digit ID code
|
|
/// </summary>
|
|
public int PhysicalChannel { get; set; }
|
|
/// <summary>
|
|
/// Name of the sensor
|
|
/// </summary>
|
|
public string SensorName { get; set; }
|
|
/// <summary>
|
|
/// Alpha-numeric Serial Number of the sensor
|
|
/// </summary>
|
|
public string SensorSerial { get; set; }
|
|
/// <summary>
|
|
/// Polarity - positive polarity = 0, inverse polarity = 1
|
|
/// </summary>
|
|
public int SignalReverse { get; set; }
|
|
/// <summary>
|
|
/// SAE J211 Channel Frequency Class for the sensor
|
|
/// </summary>
|
|
public int CFCClass { get; set; }
|
|
/// <summary>
|
|
/// Physical Property?
|
|
/// </summary>
|
|
public char PhysicalProperty { get; set; }
|
|
/// <summary>
|
|
/// EU for the sensor
|
|
/// </summary>
|
|
public string EngineeringUnits { get; set; }
|
|
/// <summary>
|
|
/// Sensor Sensitivity
|
|
/// </summary>
|
|
public float Sensibility { get; set; }
|
|
/// <summary>
|
|
/// Full scale EU range (+/-, for example 1000, means +1000/-1000)
|
|
/// </summary>
|
|
public float FullScale { get; set; }
|
|
/// <summary>
|
|
/// Excitation Voltage for the sensor
|
|
/// </summary>
|
|
public float ExcitationVoltage { get; set; }
|
|
/// <summary>
|
|
/// Type: 0=full bridge, 1=half bridge, 2=voltage
|
|
/// </summary>
|
|
public int Type { get; set; }
|
|
/// <summary>
|
|
/// The Dallas ID for the sensor
|
|
/// </summary>
|
|
public string ExpectedDallasID { get; set; }
|
|
/// <summary>
|
|
/// Remove offset (normally half of pretrigger)
|
|
/// </summary>
|
|
public int RemoveOffset { get; set; }
|
|
public enum Polarity
|
|
{
|
|
Normal = 0,
|
|
Inverse = 1,
|
|
}
|
|
public bool IsInverted()
|
|
{
|
|
return SignalReverse == (int)Polarity.Inverse;
|
|
}
|
|
public enum SensorType
|
|
{
|
|
FullBridge = 0,
|
|
HalfBridge = 1,
|
|
Voltage = 2,
|
|
}
|
|
public SensorType GetSensorType()
|
|
{
|
|
return (SensorType)Type;
|
|
}
|
|
public enum OffsetRemoval
|
|
{
|
|
None = 0,
|
|
Remove = 1,
|
|
}
|
|
public OffsetRemoval GetOffsetRemoval()
|
|
{
|
|
return (OffsetRemoval)RemoveOffset;
|
|
}
|
|
}
|
|
}
|