终端一体化运控平台
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符
 
 
 

28 行
716 B

  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6. namespace BPASmartClient.MorkCL.Server
  7. {
  8. /// <summary>
  9. /// 压力锅服务类
  10. /// </summary>
  11. internal class PressureCookerServer : PressureCookerSet, IModbus
  12. {
  13. public void Init(string IP = "", int Port = 502, string PortName = "")
  14. {
  15. MyModbus = new ModbusTcp();
  16. MyModbus.WithModbusTcp(IP, Port).UseConnected(() =>
  17. {
  18. TaskManage.GetInstance.StartLong(new Action(() =>
  19. {
  20. Thread.Sleep(10);
  21. }), $"压力锅服务-{IP}", true);
  22. });
  23. }
  24. }
  25. }