TankReading.cs 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156
  1. #region --------------- Copyright Dresser Wayne Pignone -------------
  2. /*
  3. * $Log: /Wrk/Support/ForecourtControl/Wrk/ForecourtControl/TankReading.cs $
  4. *
  5. * 3 07-02-16 9:59 roger.månsson
  6. * FxCop changes
  7. *
  8. * 2 07-01-09 9:28 roger.månsson
  9. * Documentation fixes
  10. *
  11. * 1 07-01-05 15:12 roger.månsson
  12. * Created
  13. */
  14. #endregion
  15. using System;
  16. using System.Collections.Generic;
  17. using System.Text;
  18. namespace Wayne.ForecourtControl
  19. {
  20. /// <summary>
  21. /// Data structure carrying the information of a physical tank reading.
  22. /// </summary>
  23. public class TankReading // : Com.ITankReading
  24. {
  25. #region Fields
  26. ITank tank;
  27. ProbeState state;
  28. DateTime dateTime;
  29. decimal fuelLevel;
  30. decimal normalizedFuelLevel;
  31. decimal waterLevel;
  32. decimal fuelTemperature;
  33. UnitOfMeasure fuelLevelUnit;
  34. UnitOfMeasure waterLevelUnit;
  35. bool normalizedFuelLevelSupplied;
  36. #endregion
  37. #region Construction
  38. /// <summary>
  39. /// Constructor.
  40. /// </summary>
  41. /// <param name="tank"></param>
  42. /// <param name="state"></param>
  43. /// <param name="dateTime"></param>
  44. /// <param name="fuelLevel"></param>
  45. /// <param name="normalizedFuelLevel"></param>
  46. /// <param name="waterLevel"></param>
  47. /// <param name="fuelTemperature"></param>
  48. /// <param name="fuelLevelUnit"></param>
  49. /// <param name="waterLevelUnit"></param>
  50. /// <param name="normalizedFuelLevelSupplied"></param>
  51. public TankReading(ITank tank, ProbeState state, DateTime dateTime, decimal fuelLevel, decimal normalizedFuelLevel,
  52. decimal waterLevel, decimal fuelTemperature, UnitOfMeasure fuelLevelUnit, UnitOfMeasure waterLevelUnit,
  53. bool normalizedFuelLevelSupplied)
  54. {
  55. this.tank = tank;
  56. this.state = state;
  57. this.dateTime = dateTime;
  58. this.fuelLevel = fuelLevel;
  59. this.normalizedFuelLevel = normalizedFuelLevel;
  60. this.waterLevel = waterLevel;
  61. this.fuelTemperature = fuelTemperature;
  62. this.fuelLevelUnit = fuelLevelUnit;
  63. this.waterLevelUnit = waterLevelUnit;
  64. this.normalizedFuelLevelSupplied = normalizedFuelLevelSupplied;
  65. }
  66. #endregion
  67. #region ITankReading Members
  68. /// <summary>
  69. /// Tank where the reading was made.
  70. /// </summary>
  71. public ITank Tank
  72. {
  73. get { return tank ; }
  74. }
  75. /// <summary>
  76. /// Status of the probe reading.
  77. /// </summary>
  78. public ProbeState State
  79. {
  80. get { return state; }
  81. }
  82. /// <summary>
  83. /// Date and time when the phsical reading was made.
  84. /// </summary>
  85. public DateTime DateTime
  86. {
  87. get { return dateTime; }
  88. }
  89. /// <summary>
  90. /// Fuel level, read by the probe.
  91. /// </summary>
  92. public decimal FuelLevel
  93. {
  94. get { return fuelLevel; }
  95. }
  96. /// <summary>
  97. /// Normalized fuel volume recalculated to the normalized temperature (15° C).
  98. /// </summary>
  99. public decimal NormalizedFuelLevel
  100. {
  101. get { return normalizedFuelLevel; }
  102. }
  103. /// <summary>
  104. /// Water level, read by the probe.
  105. /// </summary>
  106. public decimal WaterLevel
  107. {
  108. get { return waterLevel; }
  109. }
  110. /// <summary>
  111. /// Fuel temperature, read by the probe.
  112. /// </summary>
  113. public decimal FuelTemperature
  114. {
  115. get { return fuelTemperature; }
  116. }
  117. /// <summary>
  118. /// Unit of measure used for the fuel level.
  119. /// </summary>
  120. public UnitOfMeasure FuelLevelUnit
  121. {
  122. get { return fuelLevelUnit; }
  123. }
  124. /// <summary>
  125. /// Unit of measure for the water level.
  126. /// </summary>
  127. public UnitOfMeasure WaterLevelUnit
  128. {
  129. get { return waterLevelUnit; }
  130. }
  131. /// <summary>
  132. /// Indicates if the normalized fuel volume is supplied.
  133. /// </summary>
  134. public bool NormalizedFuelLevelSupplied
  135. {
  136. get { return normalizedFuelLevelSupplied; }
  137. }
  138. #endregion
  139. }
  140. }