SilverSulfatePipeOperate.cs 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. using SHJX.Service.Control.PortOperate.Interface;
  2. using SHJX.Service.Model.Control;
  3. using SHJX.Service.ServerClient;
  4. using System;
  5. using System.Collections.Generic;
  6. using System.Linq;
  7. using System.Text;
  8. using System.Threading.Tasks;
  9. namespace SHJX.Service.Control.PortOperate
  10. {
  11. public class SilverSulfatePipeOperate : StorageOperateImp
  12. {
  13. /// <summary>
  14. /// 硫酸银管道
  15. /// </summary>
  16. /// <param name="client"></param>
  17. public SilverSulfatePipeOperate(OptClient client) : base(client)
  18. {
  19. OpName = "SilverSulfatePipe";
  20. }
  21. public override bool Start(object reserve = null)
  22. {
  23. var openArgs = new PortArgs
  24. {
  25. TypeName = "SilverSulfate",
  26. WriteWay = WriteWay.Start,
  27. Reserve = reserve
  28. };
  29. return Client.Factory(OpName).Write(openArgs);
  30. }
  31. public override bool Stop(object reserve = null)
  32. {
  33. var openArgs = new PortArgs
  34. {
  35. TypeName = "SilverSulfate",
  36. WriteWay = WriteWay.Stop,
  37. Reserve = reserve
  38. };
  39. return Client.Factory(OpName).Write(openArgs);
  40. }
  41. }
  42. }