IoMessage.cs 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. using System;
  2. using System.Xml;
  3. using Aitex.Core.Common.DeviceData;
  4. using Aitex.Core.RT.DataCenter;
  5. using Aitex.Core.RT.Device;
  6. using Aitex.Core.RT.Event;
  7. using Aitex.Core.RT.IOCore;
  8. using Aitex.Core.RT.Log;
  9. using Aitex.Core.RT.OperationCenter;
  10. using Aitex.Core.Util;
  11. namespace Aitex.Core.RT.Device.Unit
  12. {
  13. public class IoMessage : BaseDevice, IDevice
  14. {
  15. private readonly AIAccessor _ai;
  16. private readonly AOAccessor _ao;
  17. public IoMessage(string module, XmlElement node, string ioModule = "")
  18. {
  19. base.Module = module;
  20. base.Name = node.GetAttribute("id");
  21. base.Display = node.GetAttribute("display");
  22. base.DeviceID = node.GetAttribute("schematicId");
  23. _ai = ParseAiNode("ai", node, ioModule);
  24. _ao = ParseAoNode("ao", node, ioModule);
  25. }
  26. public void SetMessager(float fValue)
  27. {
  28. _SetRealFloat(_ao, fValue);
  29. }
  30. public bool Initialize()
  31. {
  32. return true;
  33. }
  34. public void Monitor()
  35. {
  36. ;
  37. }
  38. public void Terminate()
  39. {
  40. ;
  41. }
  42. public void Reset()
  43. {
  44. ;
  45. }
  46. }
  47. }