SerialPortDevice.cs 967 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. using Aitex.Core.RT.Device;
  2. using System;
  3. using System.Collections.Generic;
  4. using System.Linq;
  5. using System.Text;
  6. using System.Threading.Tasks;
  7. namespace MECF.Framework.RT.EquipmentLibrary.HardwareUnits.Common
  8. {
  9. public class SerialPortDevice : BaseDevice, IDevice
  10. {
  11. public string PortName { get; set; }
  12. public SerialPortDevice(string module, string name)
  13. {
  14. Module = module;
  15. Name = name;
  16. }
  17. public virtual bool Initialize()
  18. {
  19. return true;
  20. }
  21. public virtual bool Initialize(string portName)
  22. {
  23. return true;
  24. }
  25. public virtual void Monitor()
  26. {
  27. }
  28. public virtual void Terminate()
  29. {
  30. }
  31. public virtual void Reset()
  32. {
  33. }
  34. public virtual bool Home(out string reason)
  35. {
  36. reason = string.Empty;
  37. return true;
  38. }
  39. }
  40. }