NotifiableIoItem.cs 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  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 float FloatValue { get; set; }
  24. [DataMember]
  25. public int IntValue { get; set; }
  26. [DataMember]
  27. public string StringValue { get; set; }
  28. [DataMember]
  29. public string Address { get; set; }
  30. [DataMember]
  31. public string Provider { get; set; }
  32. [DataMember]
  33. public int BlockOffset { get; set; }
  34. [DataMember]
  35. public int BlockIndex { get; set; }
  36. [DataMember]
  37. public bool HoldValue { get; set; }
  38. public NotifiableIoItem Clone()
  39. {
  40. return new NotifiableIoItem()
  41. {
  42. Address = Address,
  43. BlockIndex = BlockIndex,
  44. BlockOffset = BlockOffset,
  45. BoolValue = BoolValue,
  46. Description = Description,
  47. HoldValue = HoldValue,
  48. Index = Index,
  49. Name = Name,
  50. Provider = Provider,
  51. ShortValue = ShortValue,
  52. FloatValue = FloatValue,
  53. IntValue = IntValue,
  54. StringValue = StringValue,
  55. };
  56. }
  57. }
  58. }