NotifiableIoItem.cs 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  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. using MECF.Framework.Common.CommonData;
  8. namespace MECF.Framework.Common.IOCore
  9. {
  10. public class NotifiableIoItem : NotifiableItem
  11. {
  12. [DataMember]
  13. public string Name { get; set; }
  14. [DataMember]
  15. public string Description { get; set; }
  16. [DataMember]
  17. public int Index { get; set; }
  18. [DataMember]
  19. public bool BoolValue { get; set; }
  20. [DataMember]
  21. public short ShortValue { get; set; }
  22. [DataMember]
  23. public string Address { get; set; }
  24. [DataMember]
  25. public string Provider { get; set; }
  26. [DataMember]
  27. public int BlockOffset { get; set; }
  28. [DataMember]
  29. public int BlockIndex { get; set; }
  30. [DataMember]
  31. public bool HoldValue { get; set; }
  32. [DataMember]
  33. public bool CanEdit { get; set; }
  34. public NotifiableIoItem Clone()
  35. {
  36. return new NotifiableIoItem()
  37. {
  38. Address = Address,
  39. BlockIndex = BlockIndex,
  40. BlockOffset = BlockOffset,
  41. BoolValue = BoolValue,
  42. Description = Description,
  43. HoldValue = HoldValue,
  44. Index = Index,
  45. Name = Name,
  46. Provider = Provider,
  47. ShortValue = ShortValue,
  48. };
  49. }
  50. }
  51. }