114 lines
4.0 KiB
Plaintext
114 lines
4.0 KiB
Plaintext
using DTS.Common.Enums.DASFactory;
|
|
using DTS.Common.Interface.DASFactory.Diagnostics;
|
|
using DTS.DASLib.Command.TDAS;
|
|
|
|
namespace DTS.DASLib.Service
|
|
{
|
|
/// <summary>
|
|
/// Each time <see cref="DTS.DASLib.Service.DiagnosticsService" />.Diagnose is called these values
|
|
/// are populated. Each IDASCommunication will have one of these objects. It
|
|
/// provides information about input voltage to the base unit, like power input,
|
|
/// presence of a battery and battery output voltage.
|
|
/// </summary>
|
|
public class BaseInputValues : IBaseInputValues
|
|
{
|
|
/// <summary>
|
|
/// The current input voltage to the base.
|
|
/// </summary>
|
|
public double InputMilliVolts { get; set; }
|
|
|
|
|
|
//18740 DataPRO system settings Power setting values for TDAS rack do not change actual power values on device
|
|
// added Min/Max valid and tied Valid bool to those values
|
|
public virtual bool InputMilliVoltsValid => InputMilliVolts > 1000D * MinimumValidInputVoltage && InputMilliVolts < 1000D * MaximumValidInputVoltage;
|
|
|
|
/// <summary>
|
|
/// The current input voltage to the base.
|
|
/// </summary>
|
|
public double InputVoltage { get; set; }
|
|
|
|
/// <summary>
|
|
/// The minimum valid input voltage to the base.
|
|
/// </summary>
|
|
public double MinimumValidInputVoltage { get; set; } = 6D;
|
|
|
|
/// <summary>
|
|
/// The maximum valid input voltage to the base.
|
|
/// </summary>
|
|
public double MaximumValidInputVoltage { get; set; } = 16D;
|
|
|
|
public virtual bool BatteryMilliVoltsValid => BatteryMilliVolts > 1000D * MinimumValidBatteryVoltage && BatteryMilliVolts < 1000D * MaximumValidBatteryVoltage;
|
|
|
|
/// <summary>
|
|
/// The current battery voltage.
|
|
/// </summary>
|
|
public double BatteryMilliVolts { get; set; }
|
|
|
|
/// <summary>
|
|
/// The current battery voltage.
|
|
/// </summary>
|
|
public double BatteryVoltage { get; set; }
|
|
|
|
/// <summary>
|
|
/// battery state of charge - null if not queried
|
|
/// can be 0 if not available
|
|
/// this is a percentage
|
|
/// </summary>
|
|
public double? BatterySoC { get; set; } = null;
|
|
|
|
/// <summary>
|
|
/// The minimum valid battery voltage to the base.
|
|
/// </summary>
|
|
public double MinimumValidBatteryVoltage { get; set; } = 6D;
|
|
|
|
/// <summary>
|
|
/// The maximum valid battery voltage to the base.
|
|
/// </summary>
|
|
public double MaximumValidBatteryVoltage { get; set; } = 16D;
|
|
|
|
/// <summary>
|
|
/// TRUE if the battery is currently charging.
|
|
/// </summary>
|
|
public bool BatteryIsCharging { get; set; }
|
|
|
|
/// <summary>
|
|
/// Temperature sensed by logic in the hardware, in degrees Celsius.
|
|
/// </summary>
|
|
public double TemperatureC { get; set; }
|
|
|
|
/// <summary>
|
|
/// returns status
|
|
/// </summary>
|
|
public virtual string BatteryVoltageStatus { get; set; }
|
|
|
|
/// <summary>
|
|
/// returns status
|
|
/// </summary>
|
|
public virtual string InputVoltageStatus { get; set; }
|
|
|
|
/// <summary>
|
|
/// returns status
|
|
/// </summary>
|
|
public virtual string StatusDisplayBattery { get; set; }
|
|
|
|
/// <summary>
|
|
/// returns status
|
|
/// </summary>
|
|
public virtual string StatusDisplayInput { get; set; }
|
|
|
|
/// <summary>
|
|
/// returns color
|
|
/// </summary>
|
|
public virtual DFConstantsAndEnums.VoltageStatusColor BatteryVoltageStatusColor { get; set; }
|
|
|
|
/// <summary>
|
|
/// returns color
|
|
/// </summary>
|
|
public virtual DFConstantsAndEnums.VoltageStatusColor InputVoltageStatusColor { get; set; }
|
|
|
|
public double ChargeCapacity { get; set; } = double.NaN;
|
|
|
|
public bool ChargeCapacityValid => !double.IsNaN(ChargeCapacity) && ChargeCapacity > 0 && ChargeCapacity < 100;
|
|
}
|
|
}
|