IntlkNode.cs 717 B

12345678910111213141516171819202122232425262728
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. namespace Aitex.Core.RT.IOCore
  6. {
  7. public class IntlkNode
  8. {
  9. public int Index;
  10. public bool IoTypeIsDI; //True:DI False:DO
  11. public bool IsReversed;
  12. public override int GetHashCode()
  13. {
  14. return string.Format("{0}_{1}_{2}", Index, IoTypeIsDI, IsReversed).ToString().GetHashCode();
  15. }
  16. public override bool Equals(object obj)
  17. {
  18. var o1 = obj as IntlkNode;
  19. if (o1 != null && o1.Index == Index && o1.IoTypeIsDI == IoTypeIsDI && o1.IsReversed == IsReversed)
  20. return true;
  21. return false;
  22. }
  23. }
  24. }