HardwareInterface.cs 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139
  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. } private FactoryHardware()
  20. {
  21. }
  22. //使用这个实例
  23. public static FactoryHardware Instance
  24. {
  25. get
  26. {
  27. return instance;
  28. }
  29. }
  30. //其他使用的成员变量
  31. private ISEMControl m_iSEM = new SmartSEM(); //成员变量
  32. public ISEMControl ISEM
  33. {
  34. get { return m_iSEM; }
  35. } //属性,只能当前类创建
  36. }
  37. //SEM控制
  38. public interface ISEMControl
  39. {
  40. //缩放
  41. float GetMagnification();
  42. Boolean SetMagnification(float set);
  43. //焦距
  44. float GetWorkingDistance();
  45. Boolean SetWorkingDistance(float set);
  46. //亮度
  47. float GetBrightness();
  48. Boolean SetBrightness(float set);
  49. //对比度
  50. float GetContrast();
  51. Boolean SetContrast(float set);
  52. //消像散
  53. float GetAstigmatismX();
  54. float GetAstigmatismY();
  55. Boolean SetAstigmatismX(float set);
  56. Boolean SetAstigmatismY(float set);
  57. //角度补偿
  58. float GetTiltAngle();
  59. Boolean SetTiltAngle(float set);
  60. //BeamSHift移动
  61. float GetBeamShiftX();
  62. float GetBeamShiftY();
  63. Boolean SetBeamShiftX(float set);
  64. Boolean SetBeamShiftY(float set);
  65. //样品台
  66. float GetStageAtX();
  67. float GetStageAtY();
  68. float GetStageAtZ();
  69. float GetStageAtT();
  70. float GetStageAtR();
  71. float GetStageAtM();
  72. Boolean SetStageGotoX(float set);
  73. Boolean SetStageGotoY(float set);
  74. Boolean SetStageGotoZ(float set);
  75. Boolean SetStageGotoT(float set);
  76. Boolean SetStageGotoR(float set);
  77. Boolean SetStageGotoM(float set);
  78. //Scan Rotate角度接口
  79. float GetScanRotation();
  80. Boolean SetScanRotation(float set);
  81. //像素读取PixelSize
  82. float GetPixelSize();
  83. //电子束校正设置
  84. float GetTiltCorrection();
  85. Boolean SetTiltCorrection(float set);
  86. //开启电压
  87. Boolean CmdOpenVoltage();
  88. //关闭电压
  89. Boolean CmdCloseVoltage();
  90. //清除控件
  91. Boolean Dispose();
  92. }
  93. interface FIBControl
  94. {
  95. //FIB的控制
  96. }
  97. interface PtControl
  98. {
  99. //Pt的控制
  100. }
  101. interface StageControl
  102. {
  103. //样品台控制
  104. }
  105. interface CommonMsg
  106. {
  107. //通用的信息
  108. }
  109. }