ITankEvents.cs 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. #region --------------- Copyright Dresser Wayne Pignone -------------
  2. /*
  3. * $Log: /Wrk/Support/ForecourtControl/Wrk/ForecourtControl/Com/ITankEvents.cs $
  4. *
  5. * 2 07-03-09 15:34 roger.månsson
  6. * Supply success flag in OnReadCompleted event.
  7. *
  8. * 1 07-01-05 15:13 roger.månsson
  9. * Created
  10. */
  11. #endregion
  12. using System.Runtime.InteropServices;
  13. namespace Wayne.ForecourtControl.Com
  14. {
  15. /// <summary>
  16. /// Event interface for ITank
  17. /// </summary>
  18. [ComVisible(true)]
  19. [InterfaceType( ComInterfaceType.InterfaceIsIDispatch)]
  20. public interface ITankEvents
  21. {
  22. #region Response events
  23. /// <summary>
  24. /// Event invoked when the ReadAsync request has completed.
  25. /// </summary>
  26. /// <param name="sender">Tank object that raised the event.</param>
  27. /// <param name="success">Indicates if the reading was performed ok.</param>
  28. /// <param name="tankReading">The tank reading that was created due to the read request. If success=false, tankreading will be null.</param>
  29. /// <param name="userToken">The user token that was specified in the request.</param>
  30. void OnReadCompleted(ITank sender, bool success, ITankReading tankReading, object userToken);
  31. /// <summary>
  32. /// Event invoked when the RegisterManualTankDippingAsync request has completed.
  33. /// </summary>
  34. /// <param name="sender">Tank object that raised the event.</param>
  35. /// <param name="success">True if the registration succeeded.</param>
  36. /// <param name="userToken">The user token that was specified in the request.</param>
  37. void OnRegisterManualTankDippingCompleted(ITank sender, bool success, object userToken);
  38. #endregion
  39. #region Unsolicited events
  40. /// <summary>
  41. /// Event fired when the connection state of the tank changes
  42. /// </summary>
  43. /// <param name="sender">Tank object that raised the event.</param>
  44. /// <param name="connectionState">The new connection state of the tank.</param>
  45. void OnConnectionStateChanged(ITank sender, DeviceConnectionState connectionState);
  46. #endregion
  47. }
  48. }