PointMapModel.cs 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Runtime.Serialization;
  5. using System.Text;
  6. using System.Threading.Tasks;
  7. namespace GDNXFD.Data
  8. {
  9. [DataContract]
  10. public class PointMapModel
  11. {
  12. //对象ID
  13. [DataMember]
  14. public string ObjectId { get; set; }
  15. //对象类型
  16. [DataMember]
  17. public PointType ObjectType { get; set; }
  18. //测点数据类型, AI or DI
  19. [DataMember]
  20. public PointDataType DataType { get; set; }
  21. //统一编码
  22. [DataMember]
  23. public string UniformCode { get; set; }
  24. //测点命称
  25. [DataMember]
  26. public string PointName { get; set; }
  27. //测点ID
  28. [DataMember]
  29. public string PointId { get; set; }
  30. //测点的值(上次更新时)
  31. [DataMember]
  32. public double Value { get; set; }
  33. public override bool Equals(object obj)
  34. {
  35. PointMapModel pmm = obj as PointMapModel;
  36. if (pmm != null &&
  37. pmm.ObjectId == this.ObjectId &&
  38. pmm.ObjectType == this.ObjectType &&
  39. pmm.UniformCode == this.UniformCode)
  40. {
  41. return true;
  42. }
  43. return false;
  44. }
  45. }
  46. }