FUSIONTankReading.cs 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205
  1. #region --------------- Copyright Dresser Wayne Pignone -------------
  2. /*
  3. * $Log: /Wrk/Support/ForecourtControl/Wrk/NfsControl/NfsTankReading.cs $
  4. *
  5. * 2 07-03-19 17:03 roger.månsson
  6. * Don't publish a class interface of NfsTankReading to COM.
  7. *
  8. * 1 07-03-09 15:42 roger.månsson
  9. *
  10. * 3 07-02-16 9:59 roger.månsson
  11. * FxCop changes
  12. *
  13. * 2 07-01-09 9:28 roger.månsson
  14. * Documentation fixes
  15. *
  16. * 1 07-01-05 15:12 roger.månsson
  17. * Created
  18. */
  19. #endregion
  20. using System;
  21. using System.Runtime.InteropServices;
  22. #if _SINP
  23. using Wayne.ForecourtControl.Nfs;
  24. #endif
  25. namespace Wayne.ForecourtControl.Fusion
  26. {
  27. /// <summary>
  28. /// Data structure carrying the information of a physical tank reading.
  29. /// </summary>
  30. [ComVisible(true)]
  31. [ClassInterface( ClassInterfaceType.None)]
  32. [ComDefaultInterface(typeof(ITankReadingEx))]
  33. public class FUSIONTankReading : ITankReadingEx
  34. {
  35. #region Fields
  36. int tankId;
  37. ProbeState state;
  38. DateTime dateTime;
  39. decimal fuelLevel;
  40. decimal fuelVolume;
  41. decimal normalizedFuelLevel;
  42. decimal waterLevel;
  43. decimal waterVolume;
  44. decimal fuelTemperature;
  45. UnitOfMeasure fuelLevelUnit;
  46. UnitOfMeasure waterLevelUnit;
  47. bool normalizedFuelLevelSupplied;
  48. private string originalTransactionData;
  49. #endregion
  50. #region Construction
  51. /// <summary>
  52. /// Constructor.
  53. /// </summary>
  54. ///
  55. internal FUSIONTankReading()
  56. {
  57. }
  58. /// <param name="tankId"></param>
  59. /// <param name="state"></param>
  60. /// <param name="dateTime"></param>
  61. /// <param name="fuelLevel"></param>
  62. /// <param name="normalizedFuelLevel"></param>
  63. /// <param name="waterLevel"></param>
  64. /// <param name="fuelTemperature"></param>
  65. /// <param name="fuelLevelUnit"></param>
  66. /// <param name="waterLevelUnit"></param>
  67. /// <param name="normalizedFuelLevelSupplied"></param>
  68. /// <param name="originalTransactionData"></param>
  69. internal FUSIONTankReading(int tankId, ProbeState state, DateTime dateTime, decimal fuelLevel, decimal fuelVolume, decimal normalizedFuelLevel,
  70. decimal waterLevel, decimal waterVolume, decimal fuelTemperature, UnitOfMeasure fuelLevelUnit, UnitOfMeasure waterLevelUnit,
  71. bool normalizedFuelLevelSupplied, string originalTransactionData)
  72. {
  73. this.tankId = tankId;
  74. this.state = state;
  75. this.dateTime = dateTime;
  76. this.fuelLevel = fuelLevel;
  77. this.fuelVolume = fuelVolume;
  78. this.normalizedFuelLevel = normalizedFuelLevel;
  79. this.waterLevel = waterLevel;
  80. this.waterVolume = waterVolume;
  81. this.fuelTemperature = fuelTemperature;
  82. this.fuelLevelUnit = fuelLevelUnit;
  83. this.waterLevelUnit = waterLevelUnit;
  84. this.normalizedFuelLevelSupplied = normalizedFuelLevelSupplied;
  85. this.originalTransactionData = originalTransactionData;
  86. }
  87. #endregion
  88. #region ITankReadingEx Members
  89. /// <summary>
  90. /// Tank where the reading was made.
  91. /// </summary>
  92. public int TankId
  93. {
  94. get { return tankId; }
  95. }
  96. /// <summary>
  97. /// Status of the probe reading.
  98. /// </summary>
  99. public ProbeState State
  100. {
  101. get { return state; }
  102. }
  103. /// <summary>
  104. /// Date and time when the phsical reading was made.
  105. /// </summary>
  106. public DateTime DateTime
  107. {
  108. get { return dateTime; }
  109. }
  110. /// <summary>
  111. /// Fuel level, read by the probe.
  112. /// </summary>
  113. public decimal FuelLevel
  114. {
  115. get { return fuelLevel; }
  116. }
  117. /// <summary>
  118. /// Fuel volume, read by the probe.
  119. /// </summary>
  120. public decimal FuelVolume
  121. {
  122. get { return fuelVolume; }
  123. }
  124. /// <summary>
  125. /// Normalized fuel volume recalculated to the normalized temperature (15° C).
  126. /// </summary>
  127. public decimal NormalizedFuelLevel
  128. {
  129. get { return normalizedFuelLevel; }
  130. }
  131. /// <summary>
  132. /// Water level, read by the probe.
  133. /// </summary>
  134. public decimal WaterLevel
  135. {
  136. get { return waterLevel; }
  137. }
  138. /// <summary>
  139. /// Water volume, read by the probe.
  140. /// </summary>
  141. public decimal WaterVolume
  142. {
  143. get { return waterVolume; }
  144. }
  145. /// <summary>
  146. /// Fuel temperature, read by the probe.
  147. /// </summary>
  148. public decimal FuelTemperature
  149. {
  150. get { return fuelTemperature; }
  151. }
  152. /// <summary>
  153. /// Unit of measure used for the fuel level.
  154. /// </summary>
  155. public UnitOfMeasure FuelLevelUnit
  156. {
  157. get { return fuelLevelUnit; }
  158. }
  159. /// <summary>
  160. /// Unit of measure for the water level.
  161. /// </summary>
  162. public UnitOfMeasure WaterLevelUnit
  163. {
  164. get { return waterLevelUnit; }
  165. }
  166. /// <summary>
  167. /// Indicates if the normalized fuel volume is supplied.
  168. /// </summary>
  169. public bool NormalizedFuelLevelSupplied
  170. {
  171. get { return normalizedFuelLevelSupplied; }
  172. }
  173. /// <summary>
  174. ///
  175. /// </summary>
  176. public string OriginalTransactionData
  177. {
  178. get { return originalTransactionData; }
  179. }
  180. #endregion
  181. }
  182. }