LinMotDevice.cs 3.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. using MECF.Framework.Common.CommonData;
  2. using System;
  3. using System.Collections.Generic;
  4. using System.Linq;
  5. using System.Text;
  6. using System.Threading.Tasks;
  7. using System.Xml.Schema;
  8. using System.Xml.Serialization;
  9. namespace MECF.Framework.Common.Device.LinMot
  10. {
  11. public class LinMotDevice : NotifiableItem
  12. {
  13. private string _name;
  14. private short _statusWord;
  15. private string _direction;
  16. private double _position;
  17. private int _scanCount;
  18. private string _parentName;
  19. private bool _isConnected;
  20. private int _speed;
  21. [XmlAttribute(AttributeName = "Name", Form = XmlSchemaForm.Unqualified, DataType = "string")]
  22. public string Name { get { return _name; } set { _name = value; InvokePropertyChanged(nameof(Name)); } }
  23. public string ParentName { get { return _parentName; } set { _parentName = value; InvokePropertyChanged(nameof(ParentName)); } }
  24. [XmlAttribute(AttributeName = "Address", Form = XmlSchemaForm.Unqualified, DataType = "string")]
  25. public string Address { get; set; }
  26. [XmlAttribute(AttributeName = "NoProfile", Form = XmlSchemaForm.Unqualified, DataType = "string")]
  27. public string NoProfile { get; set; }
  28. [XmlAttribute(AttributeName = "Drive_A_Mode", Form = XmlSchemaForm.Unqualified, DataType = "string")]
  29. public string Drive_A_Mode { get; set; }
  30. [XmlAttribute(AttributeName = "Drive_B_Mode", Form = XmlSchemaForm.Unqualified, DataType = "string")]
  31. public string Drive_B_Mode { get; set; }
  32. [XmlAttribute(AttributeName = "ModuleName", Form = XmlSchemaForm.Unqualified, DataType = "string")]
  33. public string ModuleName { get; set; }
  34. [XmlAttribute(AttributeName = "ModuleSettingMode", Form = XmlSchemaForm.Unqualified, DataType = "string")]
  35. public string ModuleSettingMode { get; set; }
  36. [XmlAttribute(AttributeName = "ModuleAddress", Form = XmlSchemaForm.Unqualified, DataType = "string")]
  37. public string ModuleAddress { get; set; }
  38. [XmlElement(Type = typeof(LinMotDeviceData), ElementName = "DeviceData", IsNullable = false, Form = XmlSchemaForm.Qualified)]
  39. public LinMotDeviceData LinMotDeviceData { get; set; }
  40. public short StatusWord { get { return _statusWord; } set { _statusWord = value; InvokePropertyChanged(nameof(StatusWord)); } }
  41. public string Direction { get { return _direction; } set { _direction = value; InvokePropertyChanged(nameof(Direction)); } }
  42. public double Position { get { return _position; } set { _position = value;InvokePropertyChanged(nameof(Position)); } }
  43. public int ScanCount { get { return _scanCount; } set {_scanCount = value; InvokePropertyChanged(nameof(ScanCount)); } }
  44. public bool IsConnected { get { return _isConnected; } set { _isConnected = value; InvokePropertyChanged(nameof(IsConnected)); } }
  45. public int Speed { get { return _speed; } set { _speed = value;InvokePropertyChanged(nameof(Speed)); } }
  46. }
  47. }