| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980 |
- using OTSCLRINTERFACE;
- using OTSDataType;
- using System;
- using System.Collections.Generic;
- using System.Drawing;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace OTSModelSharp.ServiceInterface
- {
- public class ScanController : IScanController
- {
- private OTSCLRINTERFACE.COTSControlFunExport scan;
- static ScanController scanctrl=null;
- public static ScanController GetScanController()
- {
- if (scanctrl == null)
- {
- scanctrl = new ScanController();
-
- }
- return scanctrl;
-
- }
- private ScanController()
- {
- this.scan = SemController.hw;
- }
- public CBSEImgClr AcquireBSEImage(int matrixIndex, int reads, int dwell)
- {
- if (!scan.IsConnected())
- {
- return null;
- }
-
- Rectangle r = new Rectangle();
- CBSEImgClr bse = new CBSEImgClr(r);
- if (!scan.AcquireBSEImage(matrixIndex, reads, dwell, ref bse))
- {
- return null;
- }
-
- return bse;
- }
- public bool Init()
- {
- bool m_init= scan.ScanInit();
- return m_init;
- }
-
- public bool SetDwellTime(long val)
- {
- if (!scan.IsConnected())
- {
- return false;
- }
-
- return scan.SetDwellTime((int)val);
- }
- public bool SetImageSize(int width,int height)
- {
- if (!scan.IsConnected())
- {
- return false;
- }
-
- return scan.SetImageSize(width,height);
- }
- }
- }
|