PlcContex.cs 513 B

1234567891011121314151617181920212223242526
  1. using IACommService4CSharp;
  2. using System;
  3. using System.Collections.Generic;
  4. using System.Linq;
  5. using System.Text;
  6. using System.Threading.Tasks;
  7. namespace PlcCom
  8. {
  9. public class PlcContex
  10. {
  11. public string Name { get; set; }
  12. public IPlcComProtocol Protocol { get; }
  13. public PlcContex(IPlcComProtocol protocol, string name = null)
  14. {
  15. Protocol = protocol;
  16. Name = name ?? Guid.NewGuid().ToString();
  17. }
  18. private PlcContex() { }
  19. }
  20. }