AtgStateChangeEventArg.cs 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Text;
  4. using Wayne.FDCPOSLibrary;
  5. namespace Edge.Core.IndustryStandardInterface.ATG
  6. {
  7. public enum AtgState
  8. {
  9. Idle,
  10. Offline,
  11. /// <summary>
  12. /// The ATG is in inoperative state.
  13. /// </summary>
  14. Inoperative_MissingConfig,
  15. /// <summary>
  16. /// The ATG is in operative state and Tanks info just reloaded and refreshed.
  17. /// Received this State indicates the caller side need re-read the tanks info.
  18. /// NOTE, this state is a intermediate state and will fastly switched to Idle.
  19. /// </summary>
  20. TanksReloaded,
  21. }
  22. public enum TankState
  23. {
  24. Unknown,
  25. Idle,
  26. Delivering,
  27. }
  28. public class AtgStateChangeEventArg : EventArgs
  29. {
  30. public AtgStateChangeEventArg(AtgState state, string description)
  31. {
  32. this.State = state;
  33. this.Description = description;
  34. }
  35. public AtgStateChangeEventArg(Tank targetTank, AtgState state, string description)
  36. {
  37. this.TargetTank = targetTank;
  38. this.State = state;
  39. this.Description = description;
  40. }
  41. public AtgState State { get; }
  42. public Tank? TargetTank { get; }
  43. public string Description { get; }
  44. }
  45. }