PlcAddress.cs 1.1 KB

123456789101112131415161718192021222324252627282930313233
  1. using Prism.Mvvm;
  2. using System;
  3. namespace TeamAAS_VP.Models
  4. {
  5. /// <summary>
  6. /// Represent a PLC address entry mapping a variable name to its node/address string and type.
  7. /// </summary>
  8. public class PlcAddress : BindableBase
  9. {
  10. private int _PlcNo;
  11. /// <summary>
  12. /// PLC number used in system (int)
  13. /// </summary>
  14. public int PlcNo { get => _PlcNo; set => SetProperty(ref _PlcNo, value); }
  15. private string _Address;
  16. /// <summary>
  17. /// Address or node string used to access PLC (e.g. OP-UA node id or Modbus address)
  18. /// </summary>
  19. public string Address { get => _Address; set => SetProperty(ref _Address, value); }
  20. private string _DataType;
  21. /// <summary>
  22. /// Data type string (e.g. "Bool","Int32","Float","String")
  23. /// </summary>
  24. public string DataType { get => _DataType; set => SetProperty(ref _DataType, value); }
  25. private string _Description;
  26. public string Description { get => _Description; set => SetProperty(ref _Description, value); }
  27. }
  28. }