You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

45 lines
1.4 KiB

8 months ago
  1. using Mirle.Component.MPLC.DataBlocks.DeviceRange.Interfaces;
  2. namespace Mirle.Component.MPLC.DataBlocks
  3. {
  4. /// <summary>
  5. /// 區塊資訊
  6. /// </summary>
  7. public class BlockInfo
  8. {
  9. /// <summary>
  10. /// 建構式
  11. /// </summary>
  12. /// <param name="deviceRange">設備範圍介面</param>
  13. /// <param name="sharedMemoryName">共享記憶體名稱</param>
  14. /// <param name="plcRawdataIndex">控制器來源資料索引</param>
  15. public BlockInfo(ITypeDeviceRange deviceRange, string sharedMemoryName, int plcRawdataIndex)
  16. {
  17. DeviceRange = deviceRange;
  18. StartAddress = deviceRange.StartAddress;
  19. EndAddress = deviceRange.EndAddress;
  20. SharedMemoryName = sharedMemoryName;
  21. PLCRawdataIndex = plcRawdataIndex;
  22. }
  23. /// <summary>
  24. /// 起始位置
  25. /// </summary>
  26. public string StartAddress { get; }
  27. /// <summary>
  28. /// 結束位置
  29. /// </summary>
  30. public string EndAddress { get; }
  31. /// <summary>
  32. /// 共享記憶體名稱
  33. /// </summary>
  34. public string SharedMemoryName { get; }
  35. /// <summary>
  36. /// 控制器來源資料索引
  37. /// </summary>
  38. public int PLCRawdataIndex { get; }
  39. /// <summary>
  40. /// 設備範圍介面
  41. /// </summary>
  42. public ITypeDeviceRange DeviceRange { get; }
  43. }
  44. }