BgModbusTcp.cs 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. using Prism.Mvvm;
  2. using System;
  3. using System.Collections.Generic;
  4. using System.Linq;
  5. using System.Text;
  6. using System.Threading.Tasks;
  7. namespace TeamAAS_VP.Models
  8. {
  9. public class BgModbusTcp : BindableBase
  10. {
  11. private string _IP = "127.0.0.1";
  12. /// <summary>
  13. /// 端口号
  14. /// </summary>
  15. public string IP
  16. {
  17. get { return _IP; }
  18. set { SetProperty(ref _IP, value); }
  19. }
  20. private int _Port = 502;
  21. /// <summary>
  22. /// 端口号
  23. /// </summary>
  24. public int Port
  25. {
  26. get { return _Port; }
  27. set { SetProperty(ref _Port, value); }
  28. }
  29. private byte _SlaveID=1;
  30. public byte SlaveID
  31. {
  32. get { return _SlaveID; }
  33. set { SetProperty(ref _SlaveID, value); ; }
  34. }
  35. private bool _IsEnabled=false;
  36. public bool IsEnabled
  37. {
  38. get { return _IsEnabled; }
  39. set { SetProperty(ref _IsEnabled, value); ; }
  40. }
  41. }
  42. }