HardwareInterface.cs 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6. namespace SmartSEMControl
  7. {
  8. //sealed, 避免继承出新类造成重构
  9. public sealed class FactoryHardware
  10. {
  11. //只读的静态成员
  12. private static readonly FactoryHardware instance = new FactoryHardware();
  13. // Explicit static constructor to tell C# compiler
  14. // not to mark type as beforefieldinit
  15. //C#的静态构造函数只有在当其类的实例被创建或者有静态成员被引用时执行,
  16. //在整个应用程序域中只会被执行一次。
  17. static FactoryHardware()
  18. {
  19. }
  20. private FactoryHardware()
  21. {
  22. }
  23. //使用这个实例
  24. public static FactoryHardware Instance
  25. {
  26. get
  27. {
  28. return instance;
  29. }
  30. }
  31. //其他使用的成员变量
  32. private ISEMControl m_iSEM = new SmartSEM(); //成员变量
  33. public ISEMControl ISEM
  34. {
  35. get { return m_iSEM; }
  36. } //属性,只能当前类创建
  37. }
  38. //SEM控制
  39. public interface ISEMControl
  40. {
  41. //缩放
  42. float GetMagnification();
  43. Boolean SetMagnification(float set);
  44. //焦距
  45. float GetWorkingDistance();
  46. Boolean SetWorkingDistance(float set);
  47. //亮度
  48. float GetBrightness();
  49. Boolean SetBrightness(float set);
  50. //对比度
  51. float GetContrast();
  52. Boolean SetContrast(float set);
  53. //消像散
  54. float GetAstigmatismX();
  55. float GetAstigmatismY();
  56. Boolean SetAstigmatismX(float set);
  57. Boolean SetAstigmatismY(float set);
  58. //角度补偿
  59. float GetTiltAngle();
  60. Boolean SetTiltAngle(float set);
  61. //BeamSHift移动
  62. float GetBeamShiftX();
  63. float GetBeamShiftY();
  64. Boolean SetBeamShiftX(float set);
  65. Boolean SetBeamShiftY(float set);
  66. //样品台
  67. float GetStageAtX();
  68. float GetStageAtY();
  69. float GetStageAtZ();
  70. float GetStageAtT();
  71. float GetStageAtR();
  72. float GetStageAtM();
  73. Boolean SetStageGotoX(float set);
  74. Boolean SetStageGotoY(float set);
  75. Boolean SetStageGotoZ(float set);
  76. Boolean SetStageGotoT(float set);
  77. Boolean SetStageGotoR(float set);
  78. Boolean SetStageGotoM(float set);
  79. //Scan Rotate角度接口
  80. float GetScanRotation();
  81. Boolean SetScanRotation(float set);
  82. //像素读取PixelSize
  83. float GetPixelSize();
  84. //电子束校正设置
  85. float GetTiltCorrection();
  86. Boolean SetTiltCorrection(float set);
  87. //开启电压
  88. Boolean CmdOpenVoltage();
  89. //关闭电压
  90. Boolean CmdCloseVoltage();
  91. //清除控件
  92. Boolean Dispose();
  93. }
  94. interface FIBControl
  95. {
  96. //FIB的控制
  97. }
  98. interface PtControl
  99. {
  100. //Pt的控制
  101. }
  102. interface StageControl
  103. {
  104. //样品台控制
  105. }
  106. interface CommonMsg
  107. {
  108. //通用的信息
  109. }
  110. }