LinmotDeviceConfig.cs 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. using MECF.Framework.Common.Beckhoff.AxisProvider;
  2. using MECF.Framework.Common.CommonData;
  3. using System;
  4. using System.Collections.Generic;
  5. using System.Linq;
  6. using System.Text;
  7. using System.Threading.Tasks;
  8. using System.Xml.Schema;
  9. using System.Xml.Serialization;
  10. namespace MECF.Framework.Common.Device.LinMot
  11. {
  12. public class LinmotDeviceConfig : NotifiableItem
  13. {
  14. private List<LinMotDevice> _linmotDevice;
  15. [XmlAttribute(AttributeName = "Name", Form = XmlSchemaForm.Unqualified, DataType = "string")]
  16. public string Name { get; set; }
  17. [XmlAttribute(AttributeName = "BaudRate", Form = XmlSchemaForm.Unqualified, DataType = "int")]
  18. public int BaudRate { get; set; }
  19. [XmlAttribute(AttributeName = "Parity", Form = XmlSchemaForm.Unqualified, DataType = "string")]
  20. public string Parity { get; set; }
  21. [XmlAttribute(AttributeName = "Data", Form = XmlSchemaForm.Unqualified, DataType = "int")]
  22. public int Data { get; set; }
  23. [XmlAttribute(AttributeName = "StopBit", Form = XmlSchemaForm.Unqualified, DataType = "int")]
  24. public int StopBit { get; set; }
  25. [XmlAttribute(AttributeName = "Port", Form = XmlSchemaForm.Unqualified, DataType = "string")]
  26. public string Port { get; set; }
  27. [XmlAttribute(AttributeName = "SendTimeout", Form = XmlSchemaForm.Unqualified, DataType = "int")]
  28. public int SendTimeout { get; set; }
  29. [XmlAttribute(AttributeName = "RecvTimeout", Form = XmlSchemaForm.Unqualified, DataType = "int")]
  30. public int RecvTimeout { get; set; }
  31. [XmlElement(Type = typeof(LinMotDevice), ElementName = "Device", IsNullable = false, Form = XmlSchemaForm.Qualified)]
  32. public List<LinMotDevice> LinmotDevices { get { return _linmotDevice; } set { _linmotDevice = value; InvokePropertyChanged(nameof(LinmotDevices));}}
  33. }
  34. }