RobotServerModule.cs 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. using Aitex.Core.RT.Device;
  2. using MECF.Framework.RT.EquipmentLibrary.HardwareUnits.Robots.RobotBase;
  3. using System;
  4. using System.Collections.Generic;
  5. using System.Linq;
  6. using System.Text;
  7. using System.Threading.Tasks;
  8. namespace athosRT.Devices.EFEM
  9. {
  10. public class RobotServerModule : IServerModule, IData, IFunction
  11. {
  12. protected RobotBaseDevice _robot = (RobotBaseDevice)null;
  13. public bool IsLinkOk => this._robot != null;
  14. public bool Busy => this._robot.IsBusy;
  15. public bool Error => this._robot.IsError;
  16. public bool Disabled { get; set; }
  17. public bool Initialized { get; set; }
  18. public bool OriginSearched { get; set; }
  19. public bool InUsed { get; set; }
  20. public string Name { get; set; }
  21. public RobotBaseDevice GetDevice() => this._robot;
  22. public RobotServerModule(string name)
  23. {
  24. this.Name = name;
  25. this._robot = DEVICE.GetDevice<RobotBaseDevice>("Robot");
  26. }
  27. public bool Init(out string reason)
  28. {
  29. reason = (string)null;
  30. return this._robot.Init((object[])null);
  31. }
  32. public bool Home(out string reason)
  33. {
  34. reason = (string)null;
  35. return this._robot.Home((object[])null);
  36. }
  37. }
  38. }