ITank.cs 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. #region --------------- Copyright Dresser Wayne Pignone -------------
  2. /*
  3. * $Log: /Wrk/Support/ForecourtControl/Wrk/ForecourtControl/Com/ITank.cs $
  4. *
  5. * 2 07-03-09 15:34 roger.månsson
  6. * Use MarshalAs (Currency) on decimal parameters that should be exposed
  7. * COM
  8. *
  9. * 1 07-01-05 15:13 roger.månsson
  10. * Created
  11. */
  12. #endregion
  13. using System.Runtime.InteropServices;
  14. namespace Wayne.ForecourtControl.Com
  15. {
  16. /// <summary>
  17. /// Interface to the representation of a physical fuel tank. The tanks are grouped in Tank groups,
  18. /// where several tanks are linked together.
  19. /// </summary>
  20. [ComVisible(true)]
  21. [InterfaceType( ComInterfaceType.InterfaceIsDual)]
  22. public interface ITank
  23. {
  24. #region Properties
  25. /// <summary>
  26. /// Id of the tank.
  27. /// </summary>
  28. int Id { get;}
  29. /// <summary>
  30. /// The tank group this tank is associated with.
  31. /// </summary>
  32. ITankGroup TankGroup { get;}
  33. /// <summary>
  34. /// Indicates the connection state of the tank probe.
  35. /// </summary>
  36. DeviceConnectionState ConnectionState { get;}
  37. /// <summary>
  38. /// The latest physical reading from the TIG
  39. /// </summary>
  40. ITankReading LatestPhysicalReading { get;}
  41. /// <summary>
  42. /// Indicates if this tank has a probe for physical tank reading.
  43. /// </summary>
  44. bool CapPhysicalReading { get;}
  45. #endregion
  46. #region Methods
  47. /// <summary>
  48. /// Starts a physical tank reading if a physical probe is available.
  49. /// </summary>
  50. /// <param name="userToken"></param>
  51. void ReadAsync(object userToken);
  52. /// <summary>
  53. /// Used to register manual tank dipping from the application.
  54. /// </summary>
  55. /// <param name="tankLevel"></param>
  56. /// <param name="userToken"></param>
  57. void RegisterManualTankDippingAsync([param:MarshalAs(UnmanagedType.Currency)] decimal tankLevel, object userToken);
  58. #endregion
  59. }
  60. }