#region --------------- Copyright Dresser Wayne Pignone ------------- /* * $Log: /Wrk/Support/ForecourtControl/Wrk/NfsControl/NfsTankReading.cs $ * * 2 07-03-19 17:03 roger.månsson * Don't publish a class interface of NfsTankReading to COM. * * 1 07-03-09 15:42 roger.månsson * * 3 07-02-16 9:59 roger.månsson * FxCop changes * * 2 07-01-09 9:28 roger.månsson * Documentation fixes * * 1 07-01-05 15:12 roger.månsson * Created */ #endregion using System; using System.Runtime.InteropServices; #if _SINP using Wayne.ForecourtControl.Nfs; #endif namespace Wayne.ForecourtControl.Fusion { /// /// Data structure carrying the information of a physical tank reading. /// [ComVisible(true)] [ClassInterface( ClassInterfaceType.None)] [ComDefaultInterface(typeof(ITankReadingEx))] public class FUSIONTankReading : ITankReadingEx { #region Fields int tankId; ProbeState state; DateTime dateTime; decimal fuelLevel; decimal fuelVolume; decimal normalizedFuelLevel; decimal waterLevel; decimal waterVolume; decimal fuelTemperature; UnitOfMeasure fuelLevelUnit; UnitOfMeasure waterLevelUnit; bool normalizedFuelLevelSupplied; #endregion #region Construction /// /// Constructor. /// /// internal FUSIONTankReading() { } /// /// /// /// /// /// /// /// /// /// internal FUSIONTankReading(int tankId, ProbeState state, DateTime dateTime, decimal fuelLevel, decimal fuelVolume, decimal normalizedFuelLevel, decimal waterLevel, decimal waterVolume, decimal fuelTemperature, UnitOfMeasure fuelLevelUnit, UnitOfMeasure waterLevelUnit, bool normalizedFuelLevelSupplied) { this.tankId = tankId; this.state = state; this.dateTime = dateTime; this.fuelLevel = fuelLevel; this.fuelVolume = fuelVolume; this.normalizedFuelLevel = normalizedFuelLevel; this.waterLevel = waterLevel; this.waterVolume = waterVolume; this.fuelTemperature = fuelTemperature; this.fuelLevelUnit = fuelLevelUnit; this.waterLevelUnit = waterLevelUnit; this.normalizedFuelLevelSupplied = normalizedFuelLevelSupplied; } #endregion #region ITankReadingEx Members /// /// Tank where the reading was made. /// public int TankId { get { return tankId; } } /// /// Status of the probe reading. /// public ProbeState State { get { return state; } } /// /// Date and time when the phsical reading was made. /// public DateTime DateTime { get { return dateTime; } } /// /// Fuel level, read by the probe. /// public decimal FuelLevel { get { return fuelLevel; } } /// /// Fuel volume, read by the probe. /// public decimal FuelVolume { get { return fuelVolume; } } /// /// Normalized fuel volume recalculated to the normalized temperature (15° C). /// public decimal NormalizedFuelLevel { get { return normalizedFuelLevel; } } /// /// Water level, read by the probe. /// public decimal WaterLevel { get { return waterLevel; } } /// /// Water volume, read by the probe. /// public decimal WaterVolume { get { return waterVolume; } } /// /// Fuel temperature, read by the probe. /// public decimal FuelTemperature { get { return fuelTemperature; } } /// /// Unit of measure used for the fuel level. /// public UnitOfMeasure FuelLevelUnit { get { return fuelLevelUnit; } } /// /// Unit of measure for the water level. /// public UnitOfMeasure WaterLevelUnit { get { return waterLevelUnit; } } /// /// Indicates if the normalized fuel volume is supplied. /// public bool NormalizedFuelLevelSupplied { get { return normalizedFuelLevelSupplied; } } #endregion } }