ITank.cs 2.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. #region --------------- Copyright Dresser Wayne Pignone -------------
  2. /*
  3. * $Log: /Wrk/Support/ForecourtControl/Wrk/ForecourtControl/ITank.cs $
  4. *
  5. * 3 07-03-09 15:36 roger.månsson
  6. * Use ITankReading in the interface instead of TankReading class.
  7. *
  8. * 2 07-02-16 9:59 roger.månsson
  9. * FxCop changes
  10. *
  11. * 1 07-01-05 15:12 roger.månsson
  12. * Created
  13. */
  14. #endregion
  15. using System;
  16. using Wayne.Lib;
  17. namespace Wayne.ForecourtControl
  18. {
  19. /// <summary>
  20. /// Interface to the representation of a physical fuel tank. The tanks are grouped in Tank groups,
  21. /// where several tanks are linked together.
  22. /// </summary>
  23. public interface ITank
  24. {
  25. #region Properties
  26. /// <summary>
  27. /// Id of the tank.
  28. /// </summary>
  29. int Id { get;}
  30. /// <summary>
  31. /// The tank group this tank is associated with.
  32. /// </summary>
  33. ITankGroup TankGroup { get;}
  34. /// <summary>
  35. /// Indicates the connection state of the tank probe.
  36. /// </summary>
  37. DeviceConnectionState ConnectionState { get;}
  38. /// <summary>
  39. /// The latest physical reading from the TIG
  40. /// </summary>
  41. ITankReading LatestPhysicalReading { get;}
  42. /// <summary>
  43. /// Indicates if this tank has a probe for physical tank reading.
  44. /// </summary>
  45. bool CapPhysicalReading { get;}
  46. #endregion
  47. #region Events
  48. /// <summary>
  49. /// Event fired when the connection state of the tank changes
  50. /// </summary>
  51. event EventHandler<ConnectionChangedEventArgs> OnConnectionStateChange;
  52. #endregion
  53. #region Methods
  54. /// <summary>
  55. /// Starts a physical tank reading if a physical probe is available.
  56. /// </summary>
  57. /// <param name="readingCompleted"></param>
  58. /// <param name="userToken"></param>
  59. [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1006:DoNotNestGenericTypesInMemberSignatures")]
  60. void ReadAsync(EventHandler<AsyncCompletedEventArgs<ITankReading>> readingCompleted, object userToken);
  61. /// <summary>
  62. /// Used to register manual tank dipping from the application.
  63. /// </summary>
  64. /// <param name="tankLevel"></param>
  65. /// <param name="manualTankDippingRegistered"></param>
  66. /// <param name="userToken"></param>
  67. void RegisterManualTankDippingAsync(decimal tankLevel, EventHandler<AsyncCompletedEventArgs> manualTankDippingRegistered, object userToken);
  68. #endregion
  69. }
  70. }