| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100 |
- using FEIApiControl;
- using OTSCLRINTERFACE;
- using OTSModelSharp.ServiceCenter;
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- using NSDLL_CLR;
- namespace OTSMeasureApp.ServiceCenter.Coxm
- {
- class CoxmEDSController : IEDSController
- {
- public static int imgwidth=800;
- public static int imgheight = 600;
- private IEDSController m_eds;
- static string eds_deviceType = "Bruker";//"Oxford" "FEI"
- NSRestClient m_coxm_api;
- public CoxmEDSController(string deviceType, int imgwidth, int imgheight ,int expectcount, bool ifautoid, string knownelements)
- //(string deviceType, int expectcount, bool ifautoid, string knownelements)
- {
- CoxmEDSController.imgwidth = imgwidth;
- CoxmEDSController.imgheight = imgheight;
- m_eds = EDSController.GetEDSController(eds_deviceType, imgwidth, imgheight, expectcount, ifautoid, knownelements);
- m_coxm_api = CoxmSemController.GetApiClassInstance();
- }
- public bool CollectSpectrum(uint a_nXRayAQTime, ref uint[] a_XrayData)
- {
- return m_eds.CollectSpectrum( a_nXRayAQTime, ref a_XrayData);
- }
- public bool Connect()
- {
- m_coxm_api.ServerConnect();
- if(m_coxm_api.IsServerConnectStatus())
- {
- return false;
- }
-
- return m_eds.Connect();
- }
- public EDSTYPE GetEDSType()
- {
- return EDSTYPE.COXM;
- }
- public int GetExpectCount()
- {
- return m_eds.GetExpectCount();
- }
- public bool GetIfDelayQuantify()
- {
- return m_eds.GetIfDelayQuantify();
- }
- public bool GetXRayByFeatures(List<COTSParticleClr> a_listParticles, double a_nXRayAQTime, bool a_bElementInfo)
- {
- return m_eds.GetXRayByFeatures( a_listParticles, a_nXRayAQTime, a_bElementInfo);
- }
- public bool GetXRayByParts(List<COTSParticleClr> a_listParticles, uint a_nXRayAQTime, bool a_bElementInfo)
- {
- return m_eds.GetXRayByParts( a_listParticles, a_nXRayAQTime, a_bElementInfo);
- }
- public bool QuantifyXrayByPart(COTSParticleClr part)
- {
- return m_eds.QuantifyXrayByPart( part);
- }
- public void SetFilterKeyEleNames(List<string> KeyNameList)
- {
- m_eds.SetFilterKeyEleNames(KeyNameList);
- }
- public void SetResolution(int resolutionWidth, int resolutionHeight)
- {
- imgwidth= resolutionWidth;
- imgheight= resolutionHeight;
- m_eds.SetResolution(resolutionWidth, resolutionHeight);
- }
- bool IEDSController.GetXRayByExpandFeatures(List<COTSParticleClr> a_listParticles, double a_nXRayAQTime, bool a_bElementInfo)
- {
- return m_eds.GetXRayByExpandFeatures( a_listParticles, a_nXRayAQTime, a_bElementInfo);
- }
-
- void IEDSController.SetQuantifiCationParam(bool IfAutoId, string knownElements)
- {
- m_eds.SetQuantifiCationParam(IfAutoId, knownElements);
- }
- }
- }
|