From 4a127066804b24ac769dd8170b54597b32de2b1b Mon Sep 17 00:00:00 2001 From: TAO Cheng Date: Thu, 29 May 2014 20:45:30 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9ESTIL=20CCS-PRIMA=E6=BF=80?= =?UTF-8?q?=E5=85=89=E6=B5=8B=E8=AF=95=E5=8A=9F=E8=83=BD=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Msi/Hsi/STIL/Common/inc/Colorimetry.h | 936 +++ .../Interfac/Msi/Hsi/STIL/Common/inc/Mchr.h | 5846 +++++++++++++++++ .../Msi/Hsi/STIL/Common/inc/MchrDefine.h | 545 ++ .../Msi/Hsi/STIL/Common/inc/MchrError.h | 754 +++ .../Msi/Hsi/STIL/Common/inc/MchrType.h | 1625 +++++ .../Interfac/Msi/Hsi/STIL/Common/inc/Sawli.h | 281 + .../Msi/Hsi/STIL/Common/inc/cAcqEasy.h | 86 + .../Msi/Hsi/STIL/Common/inc/cAcqEasyType.h | 402 ++ .../Msi/Hsi/STIL/Common/src/cAcqEasy.cpp | 2655 ++++++++ PcDmis/Base/Interfac/Msi/Hsi/STIL/Dll_chr.lib | Bin 0 -> 60498 bytes .../Msi/Hsi/STIL/STIL_CCS_PRIMA_Laser.cpp | 591 ++ .../Msi/Hsi/STIL/STIL_CCS_PRIMA_Laser.h | 78 + .../Hsi/Tools/UsbUtility/UsbUtil/Mv_Util.rc | 49 +- .../UsbUtility/UsbUtil/STIL_CCS_PRIMA_Dlg.cpp | 174 + .../UsbUtility/UsbUtil/STIL_CCS_PRIMA_Dlg.h | 43 + .../Tools/UsbUtility/UsbUtil/So7_Option.cpp | 21 + .../Tools/UsbUtility/UsbUtil/Usb_Util.vcxproj | 9 +- .../UsbUtil/Usb_Util.vcxproj.filters | 15 + .../Hsi/Tools/UsbUtility/UsbUtil/resource.h | 15 +- .../Hsi/Tools/UsbUtility/UsbUtil_VS2010.suo | Bin 135680 -> 150016 bytes 20 files changed, 14114 insertions(+), 11 deletions(-) create mode 100644 PcDmis/Base/Interfac/Msi/Hsi/STIL/Common/inc/Colorimetry.h create mode 100644 PcDmis/Base/Interfac/Msi/Hsi/STIL/Common/inc/Mchr.h create mode 100644 PcDmis/Base/Interfac/Msi/Hsi/STIL/Common/inc/MchrDefine.h create mode 100644 PcDmis/Base/Interfac/Msi/Hsi/STIL/Common/inc/MchrError.h create mode 100644 PcDmis/Base/Interfac/Msi/Hsi/STIL/Common/inc/MchrType.h create mode 100644 PcDmis/Base/Interfac/Msi/Hsi/STIL/Common/inc/Sawli.h create mode 100644 PcDmis/Base/Interfac/Msi/Hsi/STIL/Common/inc/cAcqEasy.h create mode 100644 PcDmis/Base/Interfac/Msi/Hsi/STIL/Common/inc/cAcqEasyType.h create mode 100644 PcDmis/Base/Interfac/Msi/Hsi/STIL/Common/src/cAcqEasy.cpp create mode 100644 PcDmis/Base/Interfac/Msi/Hsi/STIL/Dll_chr.lib create mode 100644 PcDmis/Base/Interfac/Msi/Hsi/STIL/STIL_CCS_PRIMA_Laser.cpp create mode 100644 PcDmis/Base/Interfac/Msi/Hsi/STIL/STIL_CCS_PRIMA_Laser.h create mode 100644 PcDmis/Base/Interfac/Msi/Hsi/Tools/UsbUtility/UsbUtil/STIL_CCS_PRIMA_Dlg.cpp create mode 100644 PcDmis/Base/Interfac/Msi/Hsi/Tools/UsbUtility/UsbUtil/STIL_CCS_PRIMA_Dlg.h diff --git a/PcDmis/Base/Interfac/Msi/Hsi/STIL/Common/inc/Colorimetry.h b/PcDmis/Base/Interfac/Msi/Hsi/STIL/Common/inc/Colorimetry.h new file mode 100644 index 0000000..a6efbdd --- /dev/null +++ b/PcDmis/Base/Interfac/Msi/Hsi/STIL/Common/inc/Colorimetry.h @@ -0,0 +1,936 @@ + + +//COLORIMETRY FUNCTIONS + +/* +Acquisition functions +Configure the device in the acquisition mode (XYZ,RGB) and start acquiring data +Any float array parameter is optional and can be set to NULL + +====================================== += Acquisition functions parameters = +====================================== +SensorID : device ID +Parameters : Acquire parameter + +pArrayColorDiff : ??? +pArraySpectralDiff : ??? +pArrayConformity : ??? +pArrayCounter : This array will be filled with an incremented value ranging from 0 to 1200 + +Parameters 3,4 and 5 will be filled according to the mode (XYZ,Yxy,RGB...) + +Mode description : +XYZ : ??? +Yxy : ??? +RGB : ??? +Lab : ??? +Luv : ??? +Lch_ab : ??? +W : ??? + +*/ + +/*! + \fn short MCHR_GetXYZ (MCHR_ID SensorID,MCHR_tyAcqParam Parameters, PFLOAT *pArrayDataX,PFLOAT*pArrayDataY,PFLOAT*pArrayDataZ,PFLOAT*pArrayColorDiff,PFLOAT*pArraySpectralDiff,PFLOAT*pArrayConformity,PFLOAT*pArrayCounter); + \if FR + \brief R閏up鑢e les donn閑s colorim閠riques CIEXYZ. + \else + \brief Get the colorometric data CIEXYZ. + \endif + \details + \if FR + \param [in] MCHR_ID SensorID : ID du coffret. + \param [out] MCHR_tyAcqParam Parameters? + \param [out] PFLOAT*pArrayDataX : Data X + \param [out] PFLOAT*pArrayDataY? : Data Y + \param [out] PFLOAT*pArrayDataZ : Data Z + \param [out] PFLOAT*pArrayColorDiff ? Method to calculate the difference of the color + \param [out] PFLOAT*pArraySpectralDiff : Method to calculate the difference of spectral + \param [out] PFLOAT*pArrayConformity : Tolerance to eliminate the sample no accordance. + \param [out] PFLOAT*pArrayCounter : Count the number of acquisitions + \return short : un code d'erreur \link MCHR_ERROR MCHR_ERROR \endlink. + \else + \param [in] MCHR_ID SensorID : ID of the device. + \param [out] MCHR_tyAcqParam Parameters? + \param [out] PFLOAT*pArrayDataX : Data X + \param [out] PFLOAT*pArrayDataY? : Data Y + \param [out] PFLOAT*pArrayDataZ : Data Z + \param [out] PFLOAT*pArrayColorDiff ? Method to calculate the difference of the color + \param [out] PFLOAT*pArraySpectralDiff : Method to calculate the difference of spectral + \param [out] PFLOAT*pArrayConformity : Tolerance to eliminate the sample no accordance. + \param [out] PFLOAT*pArrayCounter : Count the number of acquisitions + \return short : A \link MCHR_ERROR MCHR_ERROR \endlink code. + \endif + \see MCHR_GetErrorDescription +*/ +DLL_CHR_API short MCHR_GetXYZ (MCHR_ID SensorID,MCHR_tyAcqParam Parameters, PFLOAT *pArrayDataX,PFLOAT*pArrayDataY,PFLOAT*pArrayDataZ,PFLOAT*pArrayColorDiff,PFLOAT*pArraySpectralDiff,PFLOAT*pArrayConformity,PFLOAT*pArrayCounter); + +/*! + \fn short MCHR_GetYxy (MCHR_ID SensorID,MCHR_tyAcqParam Parameters, PFLOAT *pArrayDataY,PFLOAT*pArrayDatax,PFLOAT*pArrayDatay,PFLOAT*pArrayColorDiff,PFLOAT*pArraySpectralDiff,PFLOAT*pArrayConformity,PFLOAT*pArrayCounter); + \if FR + \brief R閏up鑢e les donn閑s colorim閠riques CIEYxy. + \else + \brief Get the colorometric data CIEYxy. + \endif + \details + \if FR + \param [in] MCHR_ID SensorID : ID du coffret. + \param [out] MCHR_tyAcqParam Parameters? + \param [out] PFLOAT*pArrayDataY : Data Y + \param [out] PFLOAT*pArrayDatax : Data x + \param [out] PFLOAT*pArrayDatay : Data y + \param [out] PFLOAT*pArrayColorDiff ? Method to calculate the difference of the color + \param [out] PFLOAT*pArraySpectralDiff : Method to calculate the difference of spectral + \param [out] PFLOAT*pArrayConformity : Tolerance to eliminate the sample no accordance. + \param [out] PFLOAT*pArrayCounter : Count the number of acquisitions + \return short : un code d'erreur \link MCHR_ERROR MCHR_ERROR \endlink. + \else + \param [in] MCHR_ID SensorID : ID of the device. + \param [out] MCHR_tyAcqParam Parameters? + \param [out] PFLOAT*pArrayDataY : Data Y + \param [out] PFLOAT*pArrayDatax : Data x + \param [out] PFLOAT*pArrayDatay : Data y + \param [out] PFLOAT*pArrayColorDiff ? Method to calculate the difference of the color + \param [out] PFLOAT*pArraySpectralDiff : Method to calculate the difference of spectral + \param [out] PFLOAT*pArrayConformity : Tolerance to eliminate the sample no accordance. + \param [out] PFLOAT*pArrayCounter : Count the number of acquisitions + \return short : A \link MCHR_ERROR MCHR_ERROR \endlink code. + \endif + \see MCHR_GetErrorDescription +*/ +DLL_CHR_API short MCHR_GetYxy (MCHR_ID SensorID,MCHR_tyAcqParam Parameters, PFLOAT *pArrayDataY,PFLOAT*pArrayDataX,PFLOAT*pArrayDatay,PFLOAT*pArrayColorDiff,PFLOAT*pArraySpectralDiff,PFLOAT*pArrayConformity,PFLOAT*pArrayCounter); + +/*! + \fn short MCHR_GetRGB (MCHR_ID SensorID,MCHR_tyAcqParam Parameters, PFLOAT *pArrayDataR,PFLOAT*pArrayDataG,PFLOAT*pArrayDataB,PFLOAT*pArrayColorDiff,PFLOAT*pArraySpectralDiff,PFLOAT*pArrayConformity,PFLOAT*pArrayCounter); + \if FR + \brief R閏up鑢e les donn閑s colorim閠riques sRVB. + \else + \brief Get the colorometric data sRVB. + \endif + \details + \if FR + \param [in] MCHR_ID SensorID : ID du coffret. + \param [out] MCHR_tyAcqParam Parameters? + \param [out] PFLOAT*pArrayDataR : Data R + \param [out] PFLOAT*pArrayDataG : Data V + \param [out] PFLOAT*pArrayDataB : Data B + \param [out] PFLOAT*pArrayColorDiff ? Method to calculate the difference of the color + \param [out] PFLOAT*pArraySpectralDiff : Method to calculate the difference of spectral + \param [out] PFLOAT*pArrayConformity : Tolerance to eliminate the sample no accordance. + \param [out] PFLOAT*pArrayCounter : Count the number of acquisitions + \return short : un code d'erreur \link MCHR_ERROR MCHR_ERROR \endlink. + \else + \param [in] MCHR_ID SensorID : ID of the device. + \param [out] MCHR_tyAcqParam Parameters? + \param [out] PFLOAT*pArrayDataR : Data R + \param [out] PFLOAT*pArrayDataG : Data V + \param [out] PFLOAT*pArrayDataB : Data B + \param [out] PFLOAT*pArrayColorDiff ? Method to calculate the difference of the color + \param [out] PFLOAT*pArraySpectralDiff : Method to calculate the difference of spectral + \param [out] PFLOAT*pArrayConformity : Tolerance to eliminate the sample no accordance. + \param [out] PFLOAT*pArrayCounter : Count the number of acquisitions + \return short : A \link MCHR_ERROR MCHR_ERROR \endlink code. + \endif + \see MCHR_GetErrorDescription +*/ +DLL_CHR_API short MCHR_GetRGB (MCHR_ID SensorID,MCHR_tyAcqParam Parameters, PFLOAT *pArrayDataR,PFLOAT*pArrayDataG,PFLOAT*pArrayDataB,PFLOAT*pArrayColorDiff,PFLOAT*pArraySpectralDiff,PFLOAT*pArrayConformity,PFLOAT*pArrayCounter); + +/*! + \fn short MCHR_GetLab (MCHR_ID SensorID,MCHR_tyAcqParam Parameters, PFLOAT *pArrayDataL,PFLOAT*pArrayDataa,PFLOAT*pArrayDatab,PFLOAT*pArrayColorDiff,PFLOAT*pArraySpectralDiff,PFLOAT*pArrayConformity,PFLOAT*pArrayCounter); + \if FR + \brief R閏up鑢e les donn閑s colorim閠riques CIELab. + \else + \brief Get the colorometric data CIELab. + \endif + \details + \if FR + \param [in] MCHR_ID SensorID : ID du coffret. + \param [out] MCHR_tyAcqParam Parameters? + \param [out] PFLOAT*pArrayDataL : Data L + \param [out] PFLOAT*pArrayDataa : Data a + \param [out] PFLOAT*pArrayDatab : Data b + \param [out] PFLOAT*pArrayColorDiff ? Method to calculate the difference of the color + \param [out] PFLOAT*pArraySpectralDiff : Method to calculate the difference of spectral + \param [out] PFLOAT*pArrayConformity : Tolerance to eliminate the sample no accordance. + \param [out] PFLOAT*pArrayCounter : Count the number of acquisitions + \return short : un code d'erreur \link MCHR_ERROR MCHR_ERROR \endlink. + \else + \param [in] MCHR_ID SensorID : ID of the device. + \param [out] MCHR_tyAcqParam Parameters? + \param [out] PFLOAT*pArrayDataL : Data L + \param [out] PFLOAT*pArrayDataa : Data a + \param [out] PFLOAT*pArrayDatab : Data b + \param [out] PFLOAT*pArrayColorDiff ? Method to calculate the difference of the color + \param [out] PFLOAT*pArraySpectralDiff : Method to calculate the difference of spectral + \param [out] PFLOAT*pArrayConformity : Tolerance to eliminate the sample no accordance. + \param [out] PFLOAT*pArrayCounter : Count the number of acquisitions + \return short : A \link MCHR_ERROR MCHR_ERROR \endlink code. + \endif + \see MCHR_GetErrorDescription +*/ +DLL_CHR_API short MCHR_GetLab (MCHR_ID SensorID,MCHR_tyAcqParam Parameters, PFLOAT *pArrayDataL,PFLOAT*pArrayDataa,PFLOAT*pArrayDatab,PFLOAT*pArrayColorDiff,PFLOAT*pArraySpectralDiff,PFLOAT*pArrayConformity,PFLOAT*pArrayCounter); + +/*! + \fn short MCHR_GetLuv (MCHR_ID SensorID,MCHR_tyAcqParam Parameters, PFLOAT *pArrayDataL,PFLOAT*pArrayDatau,PFLOAT*pArrayDatav,PFLOAT*pArrayColorDiff,PFLOAT*pArraySpectralDiff,PFLOAT*pArrayConformity,PFLOAT*pArrayCounter); + \if FR + \brief R閏up鑢e les donn閑s colorim閠riques CIELuv. + \else + \brief Get the colorometric data CIELuv. + \endif + \details + \if FR + \param [in] MCHR_ID SensorID : ID du coffret. + \param [out] MCHR_tyAcqParam Parameters? + \param [out] PFLOAT*pArrayDataL : Data L + \param [out] PFLOAT*pArrayDatau : Data u + \param [out] PFLOAT*pArrayDatav : Data v + \param [out] PFLOAT*pArrayColorDiff ? Method to calculate the difference of the color + \param [out] PFLOAT*pArraySpectralDiff : Method to calculate the difference of spectral + \param [out] PFLOAT*pArrayConformity : Tolerance to eliminate the sample no accordance. + \param [out] PFLOAT*pArrayCounter : Count the number of acquisitions + \return short : un code d'erreur \link MCHR_ERROR MCHR_ERROR \endlink. + \else + \param [in] MCHR_ID SensorID : ID of the device. + \param [out] MCHR_tyAcqParam Parameters? + \param [out] PFLOAT*pArrayDataL : Data L + \param [out] PFLOAT*pArrayDatau : Data u + \param [out] PFLOAT*pArrayDatav : Data v + \param [out] PFLOAT*pArrayColorDiff ? Method to calculate the difference of the color + \param [out] PFLOAT*pArraySpectralDiff : Method to calculate the difference of spectral + \param [out] PFLOAT*pArrayConformity : Tolerance to eliminate the sample no accordance. + \param [out] PFLOAT*pArrayCounter : Count the number of acquisitions + \return short : A \link MCHR_ERROR MCHR_ERROR \endlink code. + \endif + \see MCHR_GetErrorDescription +*/ +DLL_CHR_API short MCHR_GetLuv (MCHR_ID SensorID,MCHR_tyAcqParam Parameters, PFLOAT *pArrayDataL,PFLOAT*pArrayDatau,PFLOAT*pArrayDatav,PFLOAT*pArrayColorDiff,PFLOAT*pArraySpectralDiff,PFLOAT*pArrayConformity,PFLOAT*pArrayCounter); + +/*! + \fn short MCHR_GetLch_ab (MCHR_ID SensorID,MCHR_tyAcqParam Parameters, PFLOAT *pArrayDataLch,PFLOAT*pArrayData,PFLOAT*pArrayDatab,PFLOAT*pArrayColorDiff,PFLOAT*pArraySpectralDiff,PFLOAT*pArrayConformity,PFLOAT*pArrayCounter); + \if FR + \brief R閏up鑢e les donn閑s colorim閠riques CIELch. + \else + \brief Get the colorometric data CIELch. + \endif + \details + \if FR + \param [in] MCHR_ID SensorID : ID du coffret. + \param [out] MCHR_tyAcqParam Parameters? + \param [out] PFLOAT*pArrayDataLch : Data Lch + \param [out] PFLOAT*pArrayDataa : Data a + \param [out] PFLOAT*pArrayDatab : Data b + \param [out] PFLOAT*pArrayColorDiff ? Method to calculate the difference of the color + \param [out] PFLOAT*pArraySpectralDiff : Method to calculate the difference of spectral + \param [out] PFLOAT*pArrayConformity : Tolerance to eliminate the sample no accordance. + \param [out] PFLOAT*pArrayCounter : Count the number of acquisitions + \return short : un code d'erreur \link MCHR_ERROR MCHR_ERROR \endlink. + \else + \param [in] MCHR_ID SensorID : ID of the device. + \param [out] MCHR_tyAcqParam Parameters? + \param [out] PFLOAT*pArrayDataLch : Data Lch + \param [out] PFLOAT*pArrayDataa : Data a + \param [out] PFLOAT*pArrayDatab : Data b + \param [out] PFLOAT*pArrayColorDiff ? Method to calculate the difference of the color + \param [out] PFLOAT*pArraySpectralDiff : Method to calculate the difference of spectral + \param [out] PFLOAT*pArrayConformity : Tolerance to eliminate the sample no accordance. + \param [out] PFLOAT*pArrayCounter : Count the number of acquisitions + \return short : A \link MCHR_ERROR MCHR_ERROR \endlink code. + \endif + \see MCHR_GetErrorDescription +*/ +DLL_CHR_API short MCHR_GetLch_ab (MCHR_ID SensorID,MCHR_tyAcqParam Parameters, PFLOAT *pArrayDataLch,PFLOAT*pArrayData,PFLOAT*pArrayDatab,PFLOAT*pArrayColorDiff,PFLOAT*pArraySpectralDiff,PFLOAT*pArrayConformity,PFLOAT*pArrayCounter); + +/*! + \fn short MCHR_GetW (MCHR_ID SensorID,MCHR_tyAcqParam Parameters, PFLOAT *pArrayDataW,PFLOAT*pArrayColorDiff,PFLOAT*pArraySpectralDiff,PFLOAT*pArrayConformity,PFLOAT*pArrayCounter); + \if FR + \brief R閏up鑢e l'indice de blancheur CIE W + \brief Get the colorometric data CIE W + \endif + \details + \if FR + \param [in] MCHR_ID SensorID : ID du coffret. + \param [out] MCHR_tyAcqParam Parameters? + \param [out] PFLOAT*pArrayDataW : Value of the whiteref + \param [out] PFLOAT*pArrayColorDiff ? Method to calculate the difference of the color + \param [out] PFLOAT*pArraySpectralDiff : Method to calculate the difference of spectral + \param [out] PFLOAT*pArrayConformity : Tolerance to eliminate the sample no accordance. + \param [out] PFLOAT*pArrayCounter : Count the number of acquisitions + \return short : un code d'erreur \link MCHR_ERROR MCHR_ERROR \endlink. + \else + \param [in] MCHR_ID SensorID : ID of the device. + \param [out] MCHR_tyAcqParam Parameters? + \param [out] PFLOAT*pArrayDataW : Data W + \param [out] PFLOAT*pArrayColorDiff ? Method to calculate the difference of the color + \param [out] PFLOAT*pArraySpectralDiff : Method to calculate the difference of spectral + \param [out] PFLOAT*pArrayConformity : Tolerance to eliminate the sample no accordance. + \param [out] PFLOAT*pArrayCounter : Count the number of acquisitions + \return short : A \link MCHR_ERROR MCHR_ERROR \endlink code. + \endif + \see MCHR_GetErrorDescription +*/ +DLL_CHR_API short MCHR_GetW (MCHR_ID SensorID,MCHR_tyAcqParam Parameters, PFLOAT *pArrayDataW,PFLOAT*pArrayColorDiff,PFLOAT*pArraySpectralDiff,PFLOAT*pArrayConformity,PFLOAT*pArrayCounter); + +/*! + \fn short MCHR_GetFirstPixel(MCHR_ID SensorID,long *piFps) + \if FR + \brief Fonction detection du premier pixel. + \else + \brief Function Get First pixel. + \endif + \details + \if FR + \param [in] MCHR_ID SensorID : ID du coffret. + \param [out] long *piFps : Premier pixel detecte + \return short : un code d'erreur \link MCHR_ERROR MCHR_ERROR \endlink. + \else + \param [in] MCHR_ID SensorID : ID of the device. + \param [out] long *piFps : First detected pixel + \return short : A \link MCHR_ERROR MCHR_ERROR \endlink code. + \endif + \see MCHR_GetErrorDescription +*/ + +DLL_CHR_API short MCHR_GetFirstPixel(MCHR_ID SensorID,long *piFps); + +/*! + \fn short MCHR_SetFirstPixel(MCHR_ID SensorID,long iFps) + \if FR + \brief Fonction de parametrage du premier pixel. + \else + \brief Function Set First pixel. + \endif + \details + \if FR + \param [in] MCHR_ID SensorID : ID du coffret. + \param [in] long iFps : Premier pixel detecte + \return short : un code d'erreur \link MCHR_ERROR MCHR_ERROR \endlink. + \else + \param [in] MCHR_ID SensorID : ID of the device. + \param [in] long iFps : First detected pixel + \return short : A \link MCHR_ERROR MCHR_ERROR \endlink code. + \endif + \see MCHR_GetErrorDescription +*/ + +DLL_CHR_API short MCHR_SetFirstPixel(MCHR_ID SensorID,long iFps); + +/* +Number of pixels returned in the taken in account for result +To retreive the spectrums when using MCHR_SetSpectrumBuffer, buffer size must be equal to the NumberOfPixels +*/ + +/*! + \fn short MCHR_GetNumberOfPixels(MCHR_ID SensorID,long *piFps); + \if FR + \brief Recupere le nombre de pixel pour definir un spectre. + \else + \brief Get the number of pixels to define a spectral. + \endif + \details + \if FR + \param [in] MCHR_ID SensorID : ID du coffret. + \param [in] long *piFps : Nombre de pixels. + \return short : un code d'erreur \link MCHR_ERROR MCHR_ERROR \endlink. + \else + \param [in] MCHR_ID SensorID : ID of the device. + \param [in] long *piFps : Numbers of pixels. + \return short : A \link MCHR_ERROR MCHR_ERROR \endlink code. + \endif + \see MCHR_GetErrorDescription +*/ +DLL_CHR_API short MCHR_GetNumberOfPixels(MCHR_ID SensorID,long *piFps); + +/*! + \fn short MCHR_SetNumberOfPixels(MCHR_ID SensorID,long iFps); + \if FR + \brief Parametre le nombre de pixel pour definir un spectre. + \else + \brief Set the number of pixels to define a spectral. + \endif + \details + \if FR + \param [in] MCHR_ID SensorID : ID du coffret. + \param [in] long *piFps : Nombre de pixels. + \return short : un code d'erreur \link MCHR_ERROR MCHR_ERROR \endlink. + \else + \param [in] MCHR_ID SensorID : ID of the device. + \param [in] long *piFps : Numbers of pixels. + \return short : A \link MCHR_ERROR MCHR_ERROR \endlink code. + \endif + \see MCHR_GetErrorDescription +*/ +DLL_CHR_API short MCHR_SetNumberOfPixels(MCHR_ID SensorID,long iFps); + +/*! + \fn short MCHR_GetSampling(MCHR_ID SensorID,long *piSampling); + \if FR + \brief Recupere le pas d'閏hantillonage du spectre. + \else + \brief Get the spectral sampling + \endif + \details + \if FR + \param [in] MCHR_ID SensorID : ID du coffret. + \param [in] long *piSampling : + \return short : un code d'erreur \link MCHR_ERROR MCHR_ERROR \endlink. + \else + \param [in] MCHR_ID SensorID : ID of the device. + \param [in] long *piSampling : Spectral sampling ( nothing, 1nm, 5nm, 10nm). + \return short : A \link MCHR_ERROR MCHR_ERROR \endlink code. + \endif + \see MCHR_GetErrorDescription +*/ +DLL_CHR_API short MCHR_GetSampling(MCHR_ID SensorID,long *piSampling); + +/*! + \fn short MCHR_SetSampling(MCHR_ID SensorID,long iSampling); + \if FR + \brief Parametre le pas d'閏hantillonage du spectre. + \else + \brief Set the spectral sampling + \endif + \details + \if FR + \param [in] MCHR_ID SensorID : ID du coffret. + \param [in] long *piSampling : + \return short : un code d'erreur \link MCHR_ERROR MCHR_ERROR \endlink. + \else + \param [in] MCHR_ID SensorID : ID of the device. + \param [in] long *piSampling : Spectral sampling ( nothing, 1nm, 5nm, 10nm). + \return short : A \link MCHR_ERROR MCHR_ERROR \endlink code. + \endif + \see MCHR_GetErrorDescription +*/ +DLL_CHR_API short MCHR_SetSampling(MCHR_ID SensorID,long iSampling); + +/*! + \fn short MCHR_GetMaximumNumberPixel(MCHR_ID SensorID,long *piMax); + \if FR + \brief Obtient le nombre maximum de pixels. + \else + \brief Get the the maximum numbers of pixels + \endif + \details + \if FR + \param [in] MCHR_ID SensorID : ID du coffret. + \param [in] long *piMax : + \return short : un code d'erreur \link MCHR_ERROR MCHR_ERROR \endlink. + \else + \param [in] MCHR_ID SensorID : ID of the device. + \param [in] long *piMax : Maximum Numbers of pixels. + \return short : A \link MCHR_ERROR MCHR_ERROR \endlink code. + \endif + \see MCHR_GetErrorDescription +*/ +DLL_CHR_API short MCHR_GetMaximumNumberPixel(MCHR_ID SensorID,long *piMax); + +/*! + \fn short MCHR_SetMaximumNumberPixel(MCHR_ID SensorID,long *piMax); + \if FR + \brief PAram閠re le nombre maximum de pixels. + \else + \brief Set the the maximum numbers of pixels + \endif + \details + \if FR + \param [in] MCHR_ID SensorID : ID du coffret. + \param [in] long iMax : + \return short : un code d'erreur \link MCHR_ERROR MCHR_ERROR \endlink. + \else + \param [in] MCHR_ID SensorID : ID of the device. + \param [in] long iMax : Maximum Numbers of pixels. + \return short : A \link MCHR_ERROR MCHR_ERROR \endlink code. + \endif + \see MCHR_GetErrorDescription +*/ +DLL_CHR_API short MCHR_SetMaximumNumberPixel(MCHR_ID SensorID,long iMax); + +/*! + \fn short MCHR_GetMinimumNumberPixel(MCHR_ID SensorID,long *piMin); + \if FR + \brief Obtient le nombre minimum de pixels. + \else + \brief Get the the minimum numbers of pixels + \endif + \details + \if FR + \param [in] MCHR_ID SensorID : ID du coffret. + \param [in] long *piMin : + \return short : un code d'erreur \link MCHR_ERROR MCHR_ERROR \endlink. + \else + \param [in] MCHR_ID SensorID : ID of the device. + \param [in] long *piMins : Maximum Numbers of pixels. + \return short : A \link MCHR_ERROR MCHR_ERROR \endlink code. + \endif + \see MCHR_GetErrorDescription +*/ +DLL_CHR_API short MCHR_GetMinimumNumberPixel(MCHR_ID SensorID,long *piMin); + +/*! + \fn short MCHR_SetMinimumNumberPixel(MCHR_ID SensorID,long iMin); + \if FR + \brief Parametre le nombre minmum de pixels. + \else + \brief Set the the minimum numbers of pixels + \endif + \details + \if FR + \param [in] MCHR_ID SensorID : ID du coffret. + \param [in] long iMin : + \return short : un code d'erreur \link MCHR_ERROR MCHR_ERROR \endlink. + \else + \param [in] MCHR_ID SensorID : ID of the device. + \param [in] long iMin : Minimum Numbers of pixels. + \return short : A \link MCHR_ERROR MCHR_ERROR \endlink code. + \endif + \see MCHR_GetErrorDescription +*/ +DLL_CHR_API short MCHR_SetMinimumNumberPixel(MCHR_ID SensorID,long iMin); + +/*! + \fn short MCHR_GetRealTimeSignalType(MCHR_ID SensorID,enRealTimeSignalType *); + \if FR + \brief Obtient le type de signal export?(brut ou trait?, le signal trait?correspond ?la r閒lectance de l掗chantillon. + \else + \brief Get the type of signal exported (raw or processed), the processed signal is equivalent to the reflectance of the sample. + \endif + \details + \if FR + \param [in] MCHR_ID SensorID : ID du coffret. + \param enRealTimeSignalType : + \return short : un code d'erreur \link MCHR_ERROR MCHR_ERROR \endlink. + \else + \param [in] MCHR_ID SensorID : ID of the device. + \param enRealTimeSignalType : type of signal + \arg \c RT_NO_SIGNAL, + \arg \c RT_RAW_SIGNAL, + \arg \c RT_PRETRAITED_SIGNAL, + \aeg \c NBR_MAX_RT_SIGNAL_TYPE, + \return short : A \link MCHR_ERROR MCHR_ERROR \endlink code. + \endif + \see MCHR_GetErrorDescription +*/ +DLL_CHR_API short MCHR_GetRealTimeSignalType(MCHR_ID SensorID,enRealTimeSignalType *pRealTimeSignalType); + +/*! + \fn short MCHR_SetRealTimeSignalType(MCHR_ID SensorID,enRealTimeSignalType); + \if FR + \brief Parametre le type de signal export?(brut ou trait?, le signal trait?correspond ?la r閒lectance de l掗chantillon. + \else + \brief Set the type of signal exported (raw or processed), the processed signal is equivalent to the reflectance of the sample. + \endif + \details + \if FR + \param [in] MCHR_ID SensorID : ID du coffret. + \param enRealTimeSignalType : + \return short : un code d'erreur \link MCHR_ERROR MCHR_ERROR \endlink. + \else + \param [in] MCHR_ID SensorID : ID of the device. + \param enRealTimeSignalType : type of signal + \arg \c RT_NO_SIGNAL, + \arg \c RT_RAW_SIGNAL, + \arg \c RT_PRETRAITED_SIGNAL, + \aeg \c NBR_MAX_RT_SIGNAL_TYPE, + \return short : A \link MCHR_ERROR MCHR_ERROR \endlink code. + \endif + \see MCHR_GetErrorDescription +*/ +DLL_CHR_API short MCHR_SetRealTimeSignalType(MCHR_ID SensorID, enRealTimeSignalType realTimeSignalType); + +/*! + \fn short MCHR_MeasureTarget(MCHR_ID SensorID); + \if FR + \brief + \else + \brief Function to read the mesure of the target + \endif + \details + \if FR + \param [in] MCHR_ID SensorID : ID du coffret. + \else + \param [in] MCHR_ID SensorID : ID of the device. + \endif +*/ +DLL_CHR_API short MCHR_MeasureTarget(MCHR_ID SensorID); + +/*! + \fn short MCHR_GetReferenceCoordinate (MCHR_ID SensorID, PFLOAT pfX, PFLOAT pfY, PFLOAT pfZ); + \if FR + \brief Obtient les coordonn閑s colorim閠riques de la cible + \else + \brief Get the target colorimetric coordinates. + \endif + \details + \if FR + \param [in] MCHR_ID SensorID : ID du coffret. + \param PFLOAT pfX : Pointer to an array of target colorimetric coordinate X. + \param PFLOAT pfY : Pointer to an array of target colorimetric coordinate Y. + \param PFLOAT pfZ : Pointer to an array of target colorimetric coordinate Z. + \return short : un code d'erreur \link MCHR_ERROR MCHR_ERROR \endlink. + \else + \param [in] MCHR_ID SensorID : ID of the device. + \param PFLOAT pfX : Pointer to an array of target colorimetric coordinate X. + \param PFLOAT pfY : Pointer to an array of target colorimetric coordinate Y. + \param PFLOAT pfZ : Pointer to an array of target colorimetric coordinate Z. + \return short : A \link MCHR_ERROR MCHR_ERROR \endlink code. + \endif + \see MCHR_GetErrorDescription +*/ +DLL_CHR_API short MCHR_GetReferenceCoordinate (MCHR_ID SensorID, PFLOAT pfX, PFLOAT pfY, PFLOAT pfZ); + +/*! + \fn short MCHR_GetIlluminantCoordinate (MCHR_ID SensorID, PFLOAT pfX, PFLOAT pfY, PFLOAT pfZ); + \if FR + \brief Obtient les coordonn閑s colorim閠riques de l'illuminant + \else + \brief Get the illuminant colorimetric coordinates + \endif + \details + \if FR + \param [in] MCHR_ID SensorID : ID du coffret. + \param PFLOAT pfX : + \param PFLOAT pfY : + \param PFLOAT pfZ : + \return short : un code d'erreur \link MCHR_ERROR MCHR_ERROR \endlink. + \else + \param [in] MCHR_ID SensorID : ID of the device. + \param PFLOAT pfX : Pointer to an array of target colorimetric coordinate X. + \param PFLOAT pfY : Pointer to an array of target colorimetric coordinate Y. + \param PFLOAT pfZ : Pointer to an array of target colorimetric coordinate Z. + \return short : A \link MCHR_ERROR MCHR_ERROR \endlink code. + \endif + \see MCHR_GetErrorDescription +*/ +DLL_CHR_API short MCHR_GetIlluminantCoordinate (MCHR_ID SensorID, PFLOAT pfX, PFLOAT pfY, PFLOAT pfZ); + +/*! + \fn short MCHR_SetIlluminants (MCHR_ID SensorID, enIlluminant); + \if FR + \brief Configure l'illuminant CIE ?utiliser pour le calcul des coordonn閑s colorim閠riques. + \else + \brief Set the CIE illuminant to calculate of colorimetrics coordinates. + \endif + \details + \if FR + \param [in] MCHR_ID SensorID : ID du coffret. + \param enIlluminant : + \arg \c A. + \arg \c C. + \aeg \c D. + \arg \c F. + \return short : un code d'erreur \link MCHR_ERROR MCHR_ERROR \endlink. + \else + \param [in] MCHR_ID SensorID : ID of the device. + \param enIlluminant : + \arg \c A. + \arg \c C. + \aeg \c D. + \arg \c F. + \return short : A \link MCHR_ERROR MCHR_ERROR \endlink code. + \endif + \see MCHR_GetErrorDescription +*/ +DLL_CHR_API short MCHR_SetIlluminants (MCHR_ID SensorID, enIlluminant ); + +/*! + \fn short MCHR_GetIlluminants (MCHR_ID SensorID, enIlluminant *); + \if FR + \brief Obtient l'illuminant CIE ?utiliser pour le calcul des coordonn閑s colorim閠riques. + \else + \brief Get the CIE illuminant to calculate of colorimetrics coordinates. + \endif + \details + \if FR + \param [in] MCHR_ID SensorID : ID du coffret. + \param enIlluminant : + \arg \c A. + \arg \c C. + \aeg \c D. + \arg \c F. + \return short : un code d'erreur \link MCHR_ERROR MCHR_ERROR \endlink. + \else + \param [in] MCHR_ID SensorID : ID of the device. + \param enIlluminant : Choice of illuminant + \arg \c A. + \arg \c C. + \aeg \c D. + \arg \c F. + \return short : A \link MCHR_ERROR MCHR_ERROR \endlink code. + \endif + \see MCHR_GetErrorDescription +*/ +DLL_CHR_API short MCHR_GetIlluminants (MCHR_ID SensorID, enIlluminant *); + +/*! + \fn short MCHR_SetObserver (MCHR_ID SensorID, enObservateur); + \if FR + \brief Configure l抩bservateur standard CIE ?utiliser pour le calcul des coordonn閑s colorim閠riques. + \else + \brief Set the standart observer to calculate the colorimetrics coordinates. + \endif + \details + \if FR + \param [in] MCHR_ID SensorID : ID du coffret. + \param enObservateur : + \arg \c OBS_CIE1931 : CIE1931 (2?, + \arg \c OBS_CIE1964 : CIE1964 (10?. + \return short : un code d'erreur \link MCHR_ERROR MCHR_ERROR \endlink. + \else + \param [in] MCHR_ID SensorID : ID of the device. + \param enObservateur : Value of observer + \arg \c OBS_CIE1931 : CIE1931 (2?, + \arg \c OBS_CIE1964 : CIE1964 (10?. + \return short : A \link MCHR_ERROR MCHR_ERROR \endlink code. + \endif + \see MCHR_GetErrorDescription +*/ +DLL_CHR_API short MCHR_SetObserver (MCHR_ID SensorID, enObservateur); + +/*! + \fn short MCHR_GetObserver (MCHR_ID SensorID, enObservateur*); + \if FR + \brief Obtient l抩bservateur standard CIE ?utiliser pour le calcul des coordonn閑s colorim閠riques. + \else + \brief Get the standart observer to calculate the colorimetrics coordinates. + \endif + \details + \if FR + \param [in] MCHR_ID SensorID : ID du coffret. + \param enObservateur : + \arg \c OBS_CIE1931 : CIE1931 (2?, + \arg \c OBS_CIE1964 : CIE1964 (10?. + \return short : un code d'erreur \link MCHR_ERROR MCHR_ERROR \endlink. + \else + \param [in] MCHR_ID SensorID : ID of the device. + \param enObservateur : Value of observer + \arg \c OBS_CIE1931 : CIE1931 (2?, + \arg \c OBS_CIE1964 : CIE1964 (10? + \return short : A \link MCHR_ERROR MCHR_ERROR \endlink code. + \endif + \see MCHR_GetErrorDescription +*/ +DLL_CHR_API short MCHR_GetObserver (MCHR_ID SensorID, enObservateur*); + +/*! + \fn short MCHR_SetColorIndicator (MCHR_ID SensorID, enIndiceCouleur); + \if FR + \brief Configure le calcul des diff閞ences de couleur (coordonn閑s colorim閠riques). + \else + \brief Set the value to calculate the color difference. + \endif + \details + \if FR + \param [in] MCHR_ID SensorID : ID du coffret. + \param enIndiceCouleur : + \arg \c IND_COLOR_Eab : delta Eab, + \arg \c IND_COLOR_E2000 : delta E2000, + \arg \c IND_COLOR_CMC : CMC, + \return short : un code d'erreur \link MCHR_ERROR MCHR_ERROR \endlink. + \else + \param [in] MCHR_ID SensorID : ID of the device. + \param enIndiceCouleur : Value of calculation + \arg \c IND_COLOR_Eab : delta Eab, + \arg \c IND_COLOR_E2000 : delta E2000, + \arg \c IND_COLOR_CMC : CMC, + \return short : A \link MCHR_ERROR MCHR_ERROR \endlink code. + \endif + \see MCHR_GetErrorDescription +*/ +DLL_CHR_API short MCHR_SetColorIndicator (MCHR_ID SensorID, enIndiceCouleur); + +/*! + \fn short MCHR_GetColorIndicator (MCHR_ID SensorID, enIndiceCouleur*); + \if FR + \brief Obtient le calcul des diff閞ences de couleur (coordonn閑s colorim閠riques). + \else + \brief Get the value to calculate the color difference. + \endif + \details + \if FR + \param [in] MCHR_ID SensorID : ID du coffret. + \param enIndiceCouleur : + \arg \c IND_COLOR_Eab : delta Eab, + \arg \c IND_COLOR_E2000 : delta E2000, + \arg \c IND_COLOR_CMC : CMC, + \return short : un code d'erreur \link MCHR_ERROR MCHR_ERROR \endlink. + \else + \param [in] MCHR_ID SensorID : ID of the device. + \param enIndiceCouleur : Value of calculation + \arg \c IND_COLOR_Eab : delta Eab, + \arg \c IND_COLOR_E2000 : delta E2000, + \arg \c IND_COLOR_CMC : CMC, + \return short : A \link MCHR_ERROR MCHR_ERROR \endlink code. + \endif + \see MCHR_GetErrorDescription +*/ +DLL_CHR_API short MCHR_GetColorIndicator (MCHR_ID SensorID, enIndiceCouleur*); + +/*! + \fn short MCHR_SetSpectralIndicator (MCHR_ID SensorID, enIndiceSpectre); + \if FR + \brief Configure le calcul des diff閞ences de spectre. + \else + \brief Set the value to calculate the spectral difference. + \endif + \details + \if FR + \param [in] MCHR_ID SensorID : ID du coffret. + \param enIndiceSpectre : + \arg \c IND_SPECTRE_RMS : RootMeanSquar, + \arg \c IND_SPECTRE_GFC : Goodness-Fitness Coefficient, + \return short : un code d'erreur \link MCHR_ERROR MCHR_ERROR \endlink. + \else + \param [in] MCHR_ID SensorID : ID of the device. + \param enIndiceSpectre : Value of calculation + \arg \c IND_SPECTRE_RMS : RootMeanSquar, + \arg \c IND_SPECTRE_GFC : Goodness-Fitness Coefficient, + \return short : A \link MCHR_ERROR MCHR_ERROR \endlink code. + \endif + \see MCHR_GetErrorDescription +*/ +DLL_CHR_API short MCHR_SetSpectralIndicator (MCHR_ID SensorID, enIndiceSpectre); + +/*! + \fn short MCHR_GetSpectralIndicator (MCHR_ID SensorID, enIndiceSpectre*); + \if FR + \brief Obtient le calcul des diff閞ences de spectre. + \else + \brief Set the value to calculate the spectral difference. + \endif + \details + \if FR + \param [in] MCHR_ID SensorID : ID du coffret. + \param enIndiceSpectre : + \arg \c IND_SPECTRE_RMS : RootMeanSquar, + \arg \c IND_SPECTRE_GFC : Goodness-Fitness Coefficient, + \return short : un code d'erreur \link MCHR_ERROR MCHR_ERROR \endlink. + \else + \param [in] MCHR_ID SensorID : ID of the device. + \param enIndiceSpectre : Value of calculation + \arg \c IND_SPECTRE_RMS : RootMeanSquar, + \arg \c IND_SPECTRE_GFC : Goodness-Fitness Coefficient, + \return short : A \link MCHR_ERROR MCHR_ERROR \endlink code. + \endif + \see MCHR_GetErrorDescription +*/ +DLL_CHR_API short MCHR_GetSpectralIndicator (MCHR_ID SensorID, enIndiceSpectre*); + +/*! + \fn short MCHR_SetColorDifferenceMode (MCHR_ID SensorID, enTypeConformite); + \if FR + \brief Configure le type de calcul des diff閞ences entre mesure courante et mesure cible. Les deux types disponibles sont soit une diff閞ence de couleur ou de spectre. + \else + \brief Set the calculation type of difference between current measurement and target measurement. + \details + \if FR + \param [in] MCHR_ID SensorID : ID du coffret. + \param enIndiceSpectre : + \arg \c CONFORMITE_DESACTIVE, + \arg \c CONFORMITE_COULEUR, + \arg \c CONFORMITE_SPECTRE, + \return short : un code d'erreur \link MCHR_ERROR MCHR_ERROR \endlink. + \else + \param [in] MCHR_ID SensorID : ID of the device. + \param enIndiceSpectre : Value of calculation + \arg \c CONFORMITE_DESACTIVE, + \arg \c CONFORMITE_COULEUR, + \arg \c CONFORMITE_SPECTRE, + \return short : A \link MCHR_ERROR MCHR_ERROR \endlink code. + \endif + \see MCHR_GetErrorDescription +*/ +DLL_CHR_API short MCHR_SetColorDifferenceMode (MCHR_ID SensorID, enTypeConformite); + +/*! + \fn short MCHR_GetColorDifferenceMode (MCHR_ID SensorID, enTypeConformite*); + \if FR + \brief Configure le type de calcul des diff閞ences entre mesure courante et mesure cible. Les deux types disponibles sont soit une diff閞ence de couleur ou de spectre. + \else + \brief Get the calculation type of difference between current measurement and target measurement. + \details + \if FR + \param [in] MCHR_ID SensorID : ID du coffret. + \param enIndiceSpectre : + \arg \c CONFORMITE_DESACTIVE, + \arg \c CONFORMITE_COULEUR, + \arg \c CONFORMITE_SPECTRE, + \return short : un code d'erreur \link MCHR_ERROR MCHR_ERROR \endlink. + \else + \param [in] MCHR_ID SensorID : ID of the device. + \param enIndiceSpectre : Value of calculation + \arg \c CONFORMITE_DESACTIVE, + \arg \c CONFORMITE_COULEUR, + \arg \c CONFORMITE_SPECTRE, + \return short : A \link MCHR_ERROR MCHR_ERROR \endlink code. + \endif + \see MCHR_GetErrorDescription +*/ +DLL_CHR_API short MCHR_GetColorDifferenceMode (MCHR_ID SensorID, enTypeConformite*); + +/*! + \fn short MCHR_SetColorTolerance (MCHR_ID SensorID, double); + \if FR + \brief Configure la valeur de tol閞ance d抲n calcul de diff閞ence entre spectres ou coordonn閑s colorim閠riques. + \else + \brief Set the tolerance value of calculation berween spectral or colorimetrics coordinates. + \details + \if FR + \param [in] MCHR_ID SensorID : ID du coffret. + \return short : un code d'erreur \link MCHR_ERROR MCHR_ERROR \endlink. + \else + \param [in] MCHR_ID SensorID : ID of the device. + \return short : A \link MCHR_ERROR MCHR_ERROR \endlink code. + \endif + \see MCHR_GetErrorDescription +*/ +DLL_CHR_API short MCHR_SetColorTolerance (MCHR_ID SensorID, double); + +/*! + \fn short MCHR_GetColorTolerance (MCHR_ID SensorID, double*); + \if FR + \brief Configure la valeur de tol閞ance d抲n calcul de diff閞ence entre spectres ou coordonn閑s colorim閠riques. + \else + \brief Get the tolerance value of calculation berween spectral or colorimetrics coordinates. + \details + \if FR + \param [in] MCHR_ID SensorID : ID du coffret. + \return short : un code d'erreur \link MCHR_ERROR MCHR_ERROR \endlink. + \else + \param [in] MCHR_ID SensorID : ID of the device. + \return short : A \link MCHR_ERROR MCHR_ERROR \endlink code. + \endif + \see MCHR_GetErrorDescription +*/ +DLL_CHR_API short MCHR_GetColorTolerance (MCHR_ID SensorID, double*); + + + + +/* +Use this function to specify a buffer receiving the spectrums +ppSpectrumBuffer is a pointer to a pointer array of the size of the buffer_number +Each of this buffer is pointing to an array of pointer. Each of them point to an array of WORD, which size is specified in wSpectroSize +The size should be equals to the value returned by SPECTRO_GetNumberOfPixels() +For an example, please have a look at the SpectroSample, "DAcquisition.cpp" + + ppSpectrumBuffer + | + [*][*][*][*][*][*][*][*] ... (buffer number) + /|\ + \ + [*][*][*]... (buffer length) + /|\ + \ + [WORD][WORD][WORD][WORD][WORD][WORD][WORD][WORD]... buffer size +*/ + +/*! + \fn short MCHR_SetSpectrumBuffer (MCHR_ID SensorID, double*); + \if FR + \brief PRIVE + \else + \brief PRIVATE +*/ +DLL_CHR_API short MCHR_SetSpectrumBuffer(MCHR_ID SensorID,WORD***ppSpectrumBuffer,WORD wSpectroSize); + diff --git a/PcDmis/Base/Interfac/Msi/Hsi/STIL/Common/inc/Mchr.h b/PcDmis/Base/Interfac/Msi/Hsi/STIL/Common/inc/Mchr.h new file mode 100644 index 0000000..4af8028 --- /dev/null +++ b/PcDmis/Base/Interfac/Msi/Hsi/STIL/Common/inc/Mchr.h @@ -0,0 +1,5846 @@ +/************************************************************************/ +/* STIL * Software Departement */ +/*----------------------------------------------------------------------*/ +/* */ +/* MCHR.H */ +/* */ +/*----------------------------------------------------------------------*/ +/* Project .................................. CHR DLL */ +/* Reference documents ..."Specification DLL CHR-150"*/ +/* Programming Language ................. Visual C++ v6.0 */ +/* Starting date ................... 16/01/2003 */ +/* Date of last update ............. */ +/* Author(s)................................. DMO */ +/* Required files .................... MChrDefine.h, MchrType.h */ +/* Required hardware .................... PC Pentium 350 Mhz */ +/* Prefix ........... MCHR_ */ +/*----------------------------------------------------------------------*/ +/* This HEADER file defines exported functions */ +/* */ +/* */ +/*----------------------------------------------------------------------*/ +/* V? | Date |AUTHOR| COMMENTS */ +/*-------+---------- +--------------------------------------------------*/ +/* 01 | 16 Janu 03| DMO | Initial version */ +/* 02 | 18 Nov 05| DMO | Ethernet, XE, Downloads */ +/* | | | */ +/*----------------------------------------------------------------------*/ + +/*! \file mchr.h + \author STIL SA + \brief + \if FR + Header de definition des prototypes de fonctions pour l'API DLL_CHR. + \else + Function prototypes header file for DLL_CHR API. + \endif +*/ + +/*! + \example ../../Samples/Sample_CCS_INITIAL/VS2013/Example_0/Example_0.cpp + \example ../../Samples/Sample_CCS_INITIAL/VS2013/Example_1/Example_1.cpp + \example ../../Samples/Sample_CCS_INITIAL/VS2013/Example_2/Example_2.cpp + \example ../../Samples/Sample_CCS_INITIAL/VS2013/Example_3/Example_3.cpp + \example ../../Samples/Sample_CCS_INITIAL/VS2013/Example_4/Example_4.cpp + \example ../../Samples/Sample_CCS_INITIAL/VS2013/Example_5/Example_5.cpp + \example ../../Samples/Sample_CCS_INITIAL/VS2013/Example_6/Example_6.cpp + + \example ../../Samples/Sample_CCS_OPTIMA/VS2013/Example_0/Example_0.cpp + \example ../../Samples/Sample_CCS_OPTIMA/VS2013/Example_1/Example_1.cpp + \example ../../Samples/Sample_CCS_OPTIMA/VS2013/Example_2/Example_2.cpp + \example ../../Samples/Sample_CCS_OPTIMA/VS2013/Example_3/Example_3.cpp + \example ../../Samples/Sample_CCS_OPTIMA/VS2013/Example_4/Example_4.cpp + \example ../../Samples/Sample_CCS_OPTIMA/VS2013/Example_5/Example_5.cpp + + \example ../../Samples/Sample_CCS_PRIMA/VS2013/Example_0/Example_0.cpp + \example ../../Samples/Sample_CCS_PRIMA/VS2013/Example_1/Example_1.cpp + \example ../../Samples/Sample_CCS_PRIMA/VS2013/Example_2/Example_2.cpp + \example ../../Samples/Sample_CCS_PRIMA/VS2013/Example_3/Example_3.cpp + \example ../../Samples/Sample_CCS_PRIMA/VS2013/Example_4/Example_4.cpp + \example ../../Samples/Sample_CCS_PRIMA/VS2013/Example_5/Example_5.cpp + \example ../../Samples/Sample_CCS_PRIMA/VS2013/Example_6/Example_6.cpp + + \example ../../Samples/Sample_CCS_ULTIMA/VS2013/Example_0/Example_0.cpp + \example ../../Samples/Sample_CCS_ULTIMA/VS2013/Example_1/Example_1.cpp + \example ../../Samples/Sample_CCS_ULTIMA/VS2013/Example_2/Example_2.cpp + \example ../../Samples/Sample_CCS_ULTIMA/VS2013/Example_3/Example_3.cpp + \example ../../Samples/Sample_CCS_ULTIMA/VS2013/Example_4/Example_4.cpp + \example ../../Samples/Sample_CCS_ULTIMA/VS2013/Example_5/Example_5.cpp + + \example ../../Samples/Sample_CHR/VS2013/Example_0/Example_0.cpp + \example ../../Samples/Sample_CHR/VS2013/Example_1/Example_1.cpp + \example ../../Samples/Sample_CHR/VS2013/Example_2/Example_2.cpp + \example ../../Samples/Sample_CHR/VS2013/Example_3/Example_3.cpp + \example ../../Samples/Sample_CHR/VS2013/Example_4/Example_4.cpp + + \example ../../Samples/Sample_STIL_DUO/VS2013/Example_0/Example_0.cpp + \example ../../Samples/Sample_STIL_DUO/VS2013/Example_1/Example_1.cpp + \example ../../Samples/Sample_STIL_DUO/VS2013/Example_2/Example_2.cpp + \example ../../Samples/Sample_STIL_DUO/VS2013/Example_3/Example_3.cpp + \example ../../Samples/Sample_STIL_DUO/VS2013/Example_4/Example_4.cpp + \example ../../Samples/Sample_STIL_DUO/VS2013/Example_5/Example_5.cpp + \example ../../Samples/Sample_STIL_DUO/VS2013/Example_6/Example_6.cpp + + \example ../../Samples/Sample_RUBY/VS2013/ConsoleAcquisition/ConsoleAcquisition.cpp + \example ../../Samples/Sample_RUBY/VS2013/SpectroSample/DAcquisition.cpp + \example ../../Samples/Sample_RUBY/VS2013/SpectroSample/DCalibration.cpp + \example ../../Samples/Sample_RUBY/VS2013/SpectroSample/DColorDifference.cpp + \example ../../Samples/Sample_RUBY/VS2013/SpectroSample/DColorimetry.cpp + \example ../../Samples/Sample_RUBY/VS2013/SpectroSample/DCombo.cpp + \example ../../Samples/Sample_RUBY/VS2013/SpectroSample/DCommandLine.cpp + \example ../../Samples/Sample_RUBY/VS2013/SpectroSample/DConnect.cpp + \example ../../Samples/Sample_RUBY/VS2013/SpectroSample/DigitalOutput.cpp + \example ../../Samples/Sample_RUBY/VS2013/SpectroSample/DManualWhiteRef.cpp + \example ../../Samples/Sample_RUBY/VS2013/SpectroSample/DRawSignal.cpp + \example ../../Samples/Sample_RUBY/VS2013/SpectroSample/DSpectrumProperties.cpp + \example ../../Samples/Sample_RUBY/VS2013/SpectroSample/SpectroSample.cpp + \example ../../Samples/Sample_RUBY/VS2013/SpectroSample/SpectroSampleDlg.cpp + */ + +#ifndef MCHR_H + +/*! + \def MCHR_H + \if FR + Type de capteur pouvant 阾re gere par la DLL + \else + Type of sensors that can be handled by the DLL + \endif +*/ +#define MCHR_H + +#include "MChrDefine.h" +#include "MChrType.h" + +#if defined(_cplusplus) || defined(__cplusplus) +extern "C" { +#endif /* _cplusplus */ + +/* + The following ifdef block is the standard way of creating macros which make exporting + from a DLL simpler. All files within this DLL are compiled with the DLL_CHR_EXPORTS + symbol defined on the command line. this symbol should not be defined on any project + that uses this DLL. This way any other project whose source files include this file see + DLL_CHR_API functions as being imported from a DLL, wheras this DLL sees symbols + defined with this macro as being exported. +*/ +#ifdef DLL_CHR_EXPORTS + +#define DLL_CHR_API +// #define DLL_CHR_API __declspec(dllexport) //this line when not using a DEF file +#else +#define DLL_CHR_API __declspec(dllimport) +#endif + +/* White light interferometry (For MTS-DUO) */ +#include "Sawli.h" +/* Colorimetry (For NCS-RUBY) */ +#include "Colorimetry.h" + +/************************************************************************** + /*! \brief DLL Initialization and Clean-up */ +/**************************************************************************/ + +/*! + \fn short MCHR_GetVersion (char *VersionNumber, short LengthBuffer) + \if FR + \brief Fonction retournant le numero de version de la DLL. + \else + \brief Return the DLL version number + \endif + \details + \if FR + \param [out] char *VersionNumber : Numero de version retourne. + \param [in] short LengthBuffer : Taille du buffer de version entre en param鑤re. + \return short : un code d'erreur MCHR_ERROR (=o). Pour connaitre l'origine de l'erreur, appeller MCHR_GetLastError
+ \Erreurs sp閏ifiques : MCHR_ERROR_DLL_NOT_ACTIVE ( La DLL n'a pas 閠?initialis閑. + \else + \param [out] char *VersionNumber : Version number returned. + \param [in] short LengthBuffer : Max Buffer length of the param 1 entered. + \return short : A \link MCHR_ERROR MCHR_ERROR \endlink code (=0).
+ \brief In order to know the origin of the error, call \link MCHR_GetLastError MCHR_GetLastError \endlink.
+ \Brief Specific errors are: \link MCHR_ERROR_DLL_NOT_ACTIVE MCHR_ERROR_DLL_NOT_ACTIVE \endlink : the DLL has not been initialized. + \endif + \see MCHR_GetErrorDescription + \brief + \if FR + \brief Capteurs Compatibles : TOUS.

+ \brief Voir : la fonction "OnInitDialog" dans le module : + \else + \par Compatibles Sensors : ALL + \endif +*/ +DLL_CHR_API short MCHR_GetVersion(char *VersionNumber, short LengthBuffer); + +/* ------------------------------------------------------------- */ + +/*! + \fn MCHR_Init (void) + \if FR + \brief Fonction d'initialisation de la DLL et alloue la m閙oire requise. + \else + \brief DLL initialization function and allocates required memory + \endif + \par Arguments: \if FR Aucun \else None + \details + \if FR + \return Positive en cas de succ閟, autrement MCHR_ERROR (=0)
+ \else + \return Positive in case of success, \link MCHR_ERROR MCHR_ERROR \endlink otherwise + \endif + \see MCHR_GetErrorDescription + \brief + \if FR + \brief Capteurs Compatibles : TOUS.

+ \brief Voir : la fonction "OnAcqStop()" dans le module : + \else + \par Compatibles Sensors : ALL + \endif + +*/ +DLL_CHR_API WORD MCHR_Init (void); +/* ------------------------------------------------------------------------- */ + +/*! + \fn MCHR_Release (void) + \if FR + \brief Fonction de liberation des ressources globales de la DLL. + \else + \brief Clean-up (free global ressources of the DLL) + \endif + \brief Arguments : \if FR Aucun \else None + \details + \if FR + \return Positive en cas de succ閟, autrement MCHR_ERROR (=0). Pour conna顃re l'origine de l'erreure, appeller MCHR_GetLastError. + \else + \return Positive in case of success, \link MCHR_ERROR MCHR_ERROR \endlink) otherwise. In order to know the origin of the error, call \link MCHR_GetLastError MCHR_GetLastError \endlink. + \endif + \see MCHR_GetErrorDescription + \brief + \if FR + \brief Capteurs Compatibles : TOUS.

+ \brief Voir : la fonction "OnReleaseDLL" dans le module : + \else + \par Compatibles Sensors : ALL + \endif +*/ +DLL_CHR_API WORD MCHR_Release (void); + + +/*! + \fn short MCHR_GetUsbDeviceList (char *UsbDeviceNameList[MCHR_MAX_SENSOR], short *DeviceNumber) + \if FR + \brief Fonction permettant de lister les peripherique CCS connectes sur les ports USB. + \warning Attention, sur plateformes 32bits uniquement. + \else + \brief Get the list of USB devices of type "CCS". + \warning Warning, Only on 32bits platforms. + \endif + \details + \if FR + \param [out] char *UsbDeviceNameList[MCHR_MAX_SENSOR] : Liste des noms de coffret. + \param [out] short *DeviceNumber : Nombre de coffret sur USB. + \return short : un code d'erreur MCHR_ERROR + \else + \param [out] char *UsbDeviceNameList[MCHR_MAX_SENSOR] : Name list of connected USB Housing. + \param [out] short *DeviceNumber : Number of housings (CCS) connected. + \return short : A \link MCHR_ERROR MCHR_ERROR \endlink + \endif + \see MCHR_GetErrorDescription
+ \brief + \par Exa + \brief short DeviceNumber = 0;
+ \brief char * UsbDeviceNameList [MCHR_MAX_SENSOR];
+ \brief for (int j = 0; j < MCHR_MAX_SENSOR; j++)
+ \brief {
+ \brief UsbDeviceNameList[j] = new char [MCHR_USB_DEVICE_NAME_LENGTH];
+ \brief }

+ \brief // function call - Fonctions appell閑s
+ \brief MCHR_GetUsbDeviceList (UsbDeviceNameList, &DeviceNumber);
+ \brief // Display the list of 揅CS?USB devices (this step is optional)
+ \brief for (int i = 0; i < DeviceNumber; i++)
+ \brief { + \brief printf ("Device n?d : %s", i+1, UsbDeviceNameList[i]);
+ \brief } +*/ + +DLL_CHR_API short MCHR_GetUsbDeviceList (char *UsbDeviceNameList[MCHR_MAX_SENSOR], short *DeviceNumber); + + +/************************************************************************** + ** Connectiong and Disconnecting a Sensor ** + **************************************************************************/ + +/*! + \fn MCHR_ID MCHR_OpenChr (LPCSTR SensorName, enChrType SensorType, WORD IdSerialPort, DWORD BaudRate, LPCSTR ConfigFile) + \if FR + \brief Obsolete! Fonction permettant d'ouvrir une connection ?un CHR sur le syst鑝e. + \else + \brief Outdated! Function that opens a connection to a CHR. + \endif + \details + \if FR + \param [in] LPCSTR SensorName : Nom du coffret ?connecter. + \param [in] enChrType SensorType : Type du coffret. + \param [in] WORD IdSerialPort : Port serie ?utiliser pour la connexion. + \param [in] DWORD BaudRate : BAUDRATE de la connexion. + \param [in] LPCSTR ConfigFile : Fichier de configuration ?charger. + \return short : un code d'erreur MCHR_ERROR + \else + \param [in] LPCSTR SensorName : Name of the housing to connect to. + \param [in] enChrType SensorType : Type of the housing. + \param [in] WORD IdSerialPort : Serial port to use for connection. + \param [in] DWORD BaudRate : BAUDRATE for this communication. + \param [in] LPCSTR ConfigFile : Configuration file to load. + \return short : a \link MCHR_ERROR MCHR_ERROR \endlink + \endif + \see MCHR_GetErrorDescription +*/ +DLL_CHR_API MCHR_ID MCHR_OpenChr (LPCSTR SensorName, enChrType SensorType, WORD IdSerialPort, DWORD BaudRate, LPCSTR ConfigFile); + + +/*! + \fn MCHR_ID MCHR_OpenEthernetChr (LPCSTR SensorName, enChrType SensorType, char *IpAddress, CALLBACK_STATUS_CONNECTION CallBackFct, LPCSTR ConfigFile) + \if FR + \brief Fonction permettant d'ouvrir une connexion d'un coffret sur le syst鑝e avec une liaison ethernet. + \else + \brief Function that opens a connection to a sensor using Ethernet port. + \endif + \details + \if FR + \param [in] LPCSTR SensorName : Nom du coffret ?connecter. + \param [in] enChrType SensorType : Type du coffret. + \param [in] char *IpAddress : Adresse IP du coffret. + \param [in] CALLBACK_STATUS_CONNECTION CallBackFct : Fonction de retour des statuts de connexion. + \param [in] LPCSTR ConfigFile : Fichier de configuration ?charger. + \return short : un code d'erreur MCHR_ERROR. Pour connaitre l'origine de l'erreur, appeller MCHR_GetLastError.

+ \brief en plus des erreurs g閚閞ales, les erreurs sp閏ifiques sont: + \arg \c MCHR_ERROR_NOT_CONNECTED: pas de capteur trouv??l'adresse IP sp閏ifi閑. + \arg \c MCHR_ERROR_ADD_SENSOR: Une erreur s'est produite pendant l'ajout du capteur ?la liste. + \arg \c MCHR_ERROR_NAME_ALREADY_EXISTS: un capteur du m阭e nom existe d閖a dans la liste. + \arg \c MCHR_ERROR_IP_ADDRESS: impossible de se connecter ?l'adresse sp閏ifi閑. + \else + \param [in] LPCSTR SensorName : Name of the housing to connect to. + \param [in] enChrType SensorType : Type of the housing. + \param [in] char *IpAddress : IP address of the housing. + \param [in] CALLBACK_STATUS_CONNECTION CallBackFct : Connection status callback function. + \param [in] LPCSTR ConfigFile : Configuration file to load. + \return short : A \link MCHR_ERROR MCHR_ERROR \endlink. In order to know the origin of the error, call \link MCHR_GetLastError MCHR_GetLastError \endlink.

+ \brief In addition to general errors, specific errors are: + \arg \c MCHR_ERROR_NOT_CONNECTED: no sensor was found on the specified IP Address + \arg \c MCHR_ERROR_ADD_SENSOR: an error occurred while trying to add the sensor to the List + \arg \c MCHR_ERROR_NAME_ALREADY_EXISTS: a sensor with the specified name exists already in the Sensor List. + \arg \c MCHR_ERROR_IP_ADDRESS: Impossible to connect to the specified address. + \endif + \see MCHR_GetErrorDescription + \brief + \if FR + \brief Capteurs Compatibles : STIL-DUO only

+ \else + \par Compatibles Sensors : STIL-DUO only + \endif +*/ +DLL_CHR_API MCHR_ID MCHR_OpenEthernetChr (LPCSTR SensorName, enChrType SensorType, char *IpAddress, CALLBACK_STATUS_CONNECTION CallBackFct, LPCSTR ConfigFile); + + +/*! + \fn MCHR_ID MCHR_OpenUsbChr (LPCSTR SensorName, enChrType SensorType, LPCSTR UsbDeviceName, CALLBACK_STATUS_CONNECTION CallBackFct, LPCSTR ConfigFile) + \if FR + \brief Fonction permettant d'ouvrir une connexion d'un capteur par une liaison USB 2. + \warning Sur plateforme 32 bits uniquement! + \else + \brief Function that opens a connection to a sensor using USB 2 port. + \warning On 32 bits platform only! + \endif + \details + \if FR + \param [in] LPCSTR SensorName : Nom du coffret ?connecter. + \param [in] enChrType SensorType : Type du coffret. + \param [in] LPCSTR UsbDeviceName : Nom du coffret branche sur USB. + \param [in] CALLBACK_STATUS_CONNECTION CallBackFct : Fonction de retour des statuts de connexion. + \param [in] LPCSTR ConfigFile : Fichier de configuration ?charger. + \return short : un code d'erreur MCHR_ERROR

+ \brief En plus des erreurs g閚閞ales, les erreurs specifiques sont: + \arg \c MCHR_ERROR_NOT_CONNECTED: la recherche automatique du capteur sur un port USB de libre a 閏hou閑. + \arg \c MCHR_ERROR_ADD_SENSOR: Une erreur s'est produite pendant l'ajout du capteur ?la liste : probl閙e de communication avec le capteur. + \arg \c MCHR_ERROR_NAME_ALREADY_EXISTS: un capteur du m阭e nom existe d閖a dans la liste. + \else + \param [in] LPCSTR SensorName : Name of the housing to connect to. + \param [in] enChrType SensorType : Type of the housing. + \param [in] LPCSTR UsbDeviceName : USB Device name. + \param [in] CALLBACK_STATUS_CONNECTION CallBackFct : Connection status callback function. + \param [in] LPCSTR ConfigFile : Configuration file to load. + \return short : A \link MCHR_ERROR MCHR_ERROR \endlink

+ \brief In addition to general errors, specific errors are: + \arg \c MCHR_ERROR_NOT_CONNECTED: the automatic search of a sensor on a free USB PORT has failed. + \arg \c MCHR_ERROR_ADD_SENSOR: an error occurred while trying to add the sensor to the Sensor List: communication problem with the sensor + \arg \c MCHR_ERROR_NAME_ALREADY_EXISTS: a sensor with the specified name exists already in the Sensor List. + \endif + \see MCHR_GetErrorDescription + \if FR + \brief Capteurs Compatibles : CCS PRIMA, CCS OPTIMA, CCS ULTIMA, STIL-INITIAL

+ \else + \par Compatibles Sensors : CCS PRIMA, CCS OPTIMA, CCS ULTIMA, STIL-INITIAL + \endif +*/ + +DLL_CHR_API MCHR_ID MCHR_OpenUsbChr (LPCSTR SensorName, enChrType SensorType, LPCSTR UsbDeviceName, CALLBACK_STATUS_CONNECTION CallBackFct, LPCSTR ConfigFile); + + +/*! + \fn MCHR_ID MCHR_OpenSerialChr (LPCSTR SensorName, enChrType SensorType, WORD IdSerialPort, DWORD BaudRate, LPCSTR ConfigFile) + \if FR + \brief Fonction permettant d'etablir une connexion RS232 avec un capteur et l'ajjoute ?la liste des capteurs. + \else + \brief Function that opens a RS232 connection to a sensor and adds it to the Sensor List. + \endif + \details + \if FR + \param [in] LPCSTR SensorName : Nom du coffret ?connecter. + \param [in] enChrType SensorType : Type du coffret. + \param [in] WORD IdSerialPort : Port serie ?utiliser pour la connexion. + \param [in] DWORD BaudRate : BAUDRATE de la connexion. + \param [in] LPCSTR ConfigFile : Fichier de configuration ?charger. + \return short : un code d'erreur MCHR_ERROR (=0). pour connaitre l'origine de l'erreur, appeller MCHR_GetLastError.
+ \brief + \else + \param [in] LPCSTR SensorName : Name of the housing to connect to. + \param [in] enChrType SensorType : Type of the housing. + \param [in] WORD IdSerialPort : Serial port to use for connection. + \param [in] DWORD BaudRate : BAUDRATE for this communication. + \param [in] LPCSTR ConfigFile : Configuration file to load. + \return short : A \link MCHR_ERROR MCHR_ERROR \endlink. In order to know the origin of the error, call \link MCHR_GetLastError MCHR_GetLastError \endlink.

+ \brief In addition to general errors listed, specific errors are: + \arg \c MCHR_ERROR_NOT_CONNECTED: no sensor was found on the specified COM Port + \arg \c MCHR_ERROR_NAME_ALREADY_EXISTS: a sensor with the specified name exists already in the Sensor List. + \arg \c MCHR_ERROR_SERIAL_PORT: an error occurred while attempting to initialize the COM port + \endif + \see MCHR_GetErrorDescription + \brief + \if FR + \brief Capteurs Compatibles : TOUS.

+ \else + \par Compatibles Sensors : ALL + \endif +*/ +DLL_CHR_API MCHR_ID MCHR_OpenSerialChr (LPCSTR SensorName, enChrType SensorType, WORD IdSerialPort, DWORD BaudRate, LPCSTR ConfigFile); + +/*! + \fn short MCHR_CloseChr (MCHR_ID SensorID) + \brief + \if FR + \brief Fonction de liberation d'un coffret connecte. + \else + \brief Function that closes connection to a device. + \endif + \details + \if FR + \param [in] MCHR_ID SensorID : ID du capteur ?deconnecter. + \return short : un code d'erreur MCHR_ERROR + \else + \param [in] MCHR_ID SensorID : ID of the device to disconnect. + \return short : A \link MCHR_ERROR MCHR_ERROR \endlink + \endif + \see MCHR_GetErrorDescription + \brief + \if FR + \brief Capteurs Compatibles : TOUS + \else + \par Compatibles Sensors : ALL + \endif +*/ +DLL_CHR_API short MCHR_CloseChr (MCHR_ID SensorID); + +/*! + \fn MCHR_GetConnectionType(MCHR_ID SensorID,enChrConnection *pConnectionType) + \if FR + \brief Fonction renvoyant le type de connexion d'un coffret connecte. + \else + \brief Function that returns the connection type of a device. + \endif + \details + \if FR + \param [in] MCHR_ID SensorID : ID du coffret. + \param [out] enChrConnection *pConnectionType : Type de connexion d'un coffret connecte. + \return short : un code d'erreur MCHR_ERROR + \else + \param [in] MCHR_ID SensorID : ID of the device. + \param [out] enChrConnection *pConnectionType : Connection type of a connected device. + \return short : A \link MCHR_ERROR MCHR_ERROR \endlink + \endif + \see MCHR_GetErrorDescription +*/ +DLL_CHR_API short MCHR_GetConnectionType(MCHR_ID SensorID,enChrConnection *pConnectionType); + + +/************************************************************************** + ** Basic Queries ** + **************************************************************************/ + +/*! + \fn short MCHR_GetChrType (MCHR_ID SensorID, enChrType *ChrType) + \brief + \if FR + \brief Fonction renvoyant le type d'un coffret connecte. + \else + \brief Function that gets the type of a connected device. + \endif + \details + \if FR + \param [in] MCHR_ID SensorID : ID du coffret. + \param [out] enChrType *ChrType : Type du coffret connecte. + \return short : un code d'erreur MCHR_ERROR + \else + \param [in] MCHR_ID SensorID : ID of the device. + \param [out] enChrType *ChrType : Type of the connected device. + \return short : A \link MCHR_ERROR MCHR_ERROR \endlink + \endif + \see MCHR_GetErrorDescription + \brief + \if FR + \brief Capteurs Compatibles : TOUS.

+ \brief Voir : la fonction "OnGetChrType () " dans le module : + \else + \par Compatibles Sensors : ALL + \endif +*/ +DLL_CHR_API short MCHR_GetChrType (MCHR_ID SensorID, enChrType *ChrType); + + +/*! + \fn short MCHR_GetSensorName (MCHR_ID SensorID, PCHAR pName) + \if FR + \brief Fonction renvoyant le nom d'un coffret connecte. + \else + \brief Function that gets the name of a connected device. + \endif + \details + \if FR + \param [in] MCHR_ID SensorID : ID du coffret. + \param [out] PCHAR pName : Nom du coffret connecte. + \return short : un code d'erreur MCHR_ERROR + \else + \param [in] MCHR_ID SensorID : ID of the device. + \param [out] PCHAR pName : Name of the connected device. + \return short : A \link MCHR_ERROR MCHR_ERROR \endlink + \endif + \see MCHR_GetErrorDescription + \brief + \if FR + \brief Capteurs Compatibles : TOUS.

+ \brief Voir : la fonction "UpdateSensorInfo()" dans le module : + \else + \par Compatibles Sensors : ALL + \endif +*/ +DLL_CHR_API short MCHR_GetSensorName (MCHR_ID SensorID, PCHAR pName); + + +/*! + \fn short MCHR_GetFirmwareVersion (MCHR_ID SensorID, char *VersionNumber, short LengthBuffer) + \if FR + \brief Fonction renvoyant le numero de version de firmware d'un coffret connecte. + \else + \brief Function that gets the firmware version of a connected device. + \endif + \details + \if FR + \param [in] MCHR_ID SensorID : ID du coffret. + \param [out] char *VersionNumber : Version de firmware du coffret connecte. + \param [in] short LengthBuffer : Taille du buffer de version entre. + \return short : un code d'erreur MCHR_ERROR + \else + \param [in] MCHR_ID SensorID : ID of the device. + \param [out] CHAR *VersionNumber : Firmware version of the connected device. + \param [in] SHORT LengthBuffer : Length of the buffer entered. + \return short : A \link MCHR_ERROR MCHR_ERROR \endlink + \endif + \see MCHR_GetErrorDescription + \brief + \if FR + \brief Capteurs Compatibles : TOUS.

+ \brief Voir : la fonction "UpdateSensorInfo" dans le module : + \else + \par Compatibles Sensors : ALL + \endif +*/ +DLL_CHR_API short MCHR_GetFirmwareVersion (MCHR_ID SensorID, char *VersionNumber, short LengthBuffer); + +/*! + \fn short MCHR_GetSerialNumber (MCHR_ID SensorID, char *SerialNumber, short LengthBuffer) + \if FR + \brief Fonction renvoyant le numero de serie de firmware d'un coffret connecte. + \else + \brief Function that gets the serial number of a connected device. + \endif + \details + \if FR + \param [in] MCHR_ID SensorID : ID du coffret. + \param [out] char *SerialNumber : Numero de serie du coffret connecte. + \param [in] short LengthBuffer : Taille du buffer entre. + \return short : un code d'erreur MCHR_ERROR + \else + \param [in] MCHR_ID SensorID : ID of the device. + \param [out] char *SerialNumber : Serial number of the connected device. + \param [in] short LengthBuffer : Length of the buffer entered. + \return short : A \link MCHR_ERROR MCHR_ERROR \endlink + \endif + \see MCHR_GetErrorDescription + \brief + \if FR + \brief Capteurs Compatibles : TOUS.

+ \brief Voir : la fonction "UpdateSensorInfo" dans le module : + \else + \par Compatibles Sensors : ALL + \endif +*/ +DLL_CHR_API short MCHR_GetSerialNumber (MCHR_ID SensorID, char *SerialNumber, short LengthBuffer); + + +/*! + \fn short MCHR_GetMaxPenNumber (MCHR_ID SensorID) + \if FR + \brief Fonction renvoyant le nombre maximal de crayon pouvant etre configure dans un coffret connecte. + \else + \brief Function that gets the number of calibration tables (= length of Pen List) of a connected device. + \endif + \details + \if FR + \param [in] MCHR_ID SensorID : ID du coffret. + \return short : Nombre maximum de crayon. + \else + \param [in] MCHR_ID SensorID : ID du coffret. + \return short : Maximum number of pens. + \endif + \see MCHR_GetErrorDescription + \brief + \if FR + \brief Capteurs Compatibles : TOUS.

+ \brief Voir : la fonction "OnGetPenList()" dans le module : + \else + \par Compatibles Sensors : ALL + \endif +*/ +DLL_CHR_API short MCHR_GetMaxPenNumber (MCHR_ID SensorID); +/* ------------------------------------------------------------------------- */ + + +/*! + \fn short MCHR_GetPenList (MCHR_ID SensorID, PWORD pFullScaleList) + \if FR + \brief Fonction de lecture de la liste des crayons configures dans un capteur connecte.
+ \brief Avant d appeller cette fonction il est recommand?d'appeller MCHR_GetMaxPenNumber() qui informe sur le nombre disponible dans la table de calibration pour ce type de capteur, afin de d iniatialiser correctement le second argument. + \warning Voir la fonction MCHR_GetPenListEx pour utiliser le parametre pFullScaleList dans un format DWORD (?partir de la DLL_CHR V3.2.0.00)! + \else + \brief Get the list of all optical pens (calibration tables) defined in a connected device.
+ \brief Before calling this function it is recommended to call MCHR_GetMaxPenNumber() which returns the number of available calibration tables for the specified type of sensor, in order to correctly initialize the second argument. + \warning See MCHR_GetPenListEx Function to use pFullScaleList parameter on DWORD Format (from DLL_CHR V3.2.0.00)! + \endif + \details + \if FR + \param [in] MCHR_ID SensorID : ID du coffret. + \param [out] PWORD pFullScaleList : Liste des crayons configures dans le coffret. + \return short : un code d'erreur MCHR_ERROR + \else + \param [in] MCHR_ID SensorID : ID of the device. + \param [out] PWORD pFullScaleList : Pen list of all optical pens defined in the device. + \return short : A \link MCHR_ERROR MCHR_ERROR \endlink code + \endif + \see MCHR_GetErrorDescription + \brief + \if FR + \brief Capteurs Compatibles : TOUS.

+ \brief Voir : la fonction "OnGetPenList()" dans le module : + \else + \par Compatibles Sensors : ALL + \endif +*/ +DLL_CHR_API short MCHR_GetPenList (MCHR_ID SensorID, PWORD pFullScaleList); +/* ------------------------------------------------------------------------- */ + + +/*! + \fn short MCHR_GetFullScale (MCHR_ID SensorID, PWORD pFullScale) + \if FR + \brief Fonction permettant de lire la valeur pleine echelle du crayon selectionne. + \warning Voir la fonction MCHR_GetFullScaleEx pour utiliser le parametre pFullScale dans un format DWORD (?partir de la DLL_CHR V3.2.0.00)! + \else + \brief Get the measuring range of the current optical pen of a connected device. + \warning See MCHR_GetFullScaletEx Function to use pFullScale parameter on DWORD Format (from DLL_CHR V3.2.0.00)! + \endif + \details + \if FR + \param [in] MCHR_ID SensorID : ID du coffret. + \param [out] PWORD pFullScale : Valeur pleine echelle du crayon selectionne. + \return short : un code d'erreur MCHR_ERROR + \else + \param [in] MCHR_ID SensorID : ID of the device. + \param [out] PWORD pFullScale : Full scale value of the selected optical pen. + \return short : A \link MCHR_ERROR MCHR_ERROR \endlink code + \endif + \see MCHR_GetErrorDescription + \brief + \if FR + \brief Capteurs Compatibles : TOUS.

+ \brief Voir : la fonction "OnGetFullScale () " dans le module : + \else + \par Compatibles Sensors : ALL + \endif +*/ +DLL_CHR_API short MCHR_GetFullScale (MCHR_ID SensorID, PWORD pFullScale); +/* ------------------------------------------------------------------------- */ + +/*! + \fn short MCHR_GetFullScaleInterferometric (MCHR_ID SensorID, PWORD pFullScale) + \if FR + \brief Fonction permettant de lire la valeur pleine echelle en mode interferometrique du crayon selectionne. + \warning Voir la fonction MCHR_GetFullScaleInterferometricEx pour utiliser le parametre pFullScale dans un format DWORD (?partir de la DLL_CHR V3.2.0.00)! + \else + \brief Get the measuring range of the current optical pen in interferometric mode of a connected device. + \warning See MCHR_GetFullScaleInterferometricEx Function to use pFullScale parameter on DWORD Format (from DLL_CHR V3.2.0.00)! + \endif + \details + \if FR + \param [in] MCHR_ID SensorID : ID du coffret. + \param [out] PWORD pFullScale : Valeur pleine echelle en mode interferometrique du crayon selectionne. + \return short : un code d'erreur MCHR_ERROR + \else + \param [in] MCHR_ID SensorID : ID of the device. + \param [out] PWORD pFullScale : Full scale value in interferometric mode of the current optical pen. + \return short : A \link MCHR_ERROR MCHR_ERROR \endlink code + \endif + \see MCHR_GetErrorDescription +*/ +DLL_CHR_API short MCHR_GetFullScaleInterferometric(MCHR_ID SensorID, PWORD pFullScale); +/* ------------------------------------------------------------------------- */ + +/*! + \fn short MCHR_GetPenListEx (MCHR_ID SensorID, PDWORD pFullScaleList) + \if FR + \brief Fonction de lecture de la liste des crayons configures dans un capteur connecte.
+ \brief Avant d appeller cette fonction il est recommand?d'appeller MCHR_GetMaxPenNumber() qui informe sur le nombre disponible dans la table de calibration pour ce type de capteur, afin de d iniatialiser correctement le second argument. + \warning Remplace la fonction MCHR_GetPenList. + \else + \brief Get the list of all optical pens (calibration tables) defined in a connected device.
+ \brief Before calling this function it is recommended to call MCHR_GetMaxPenNumber() which returns the number of available calibration tables for the specified type of sensor, in order to correctly initialize the second argument. + \warning Replace the MCHR_GetPenList Function. + \endif + \details + \if FR + \param [in] MCHR_ID SensorID : ID du coffret. + \param [out] PDWORD pFullScaleList : Liste des crayons configures dans le coffret. + \return short : un code d'erreur MCHR_ERROR + \else + \param [in] MCHR_ID SensorID : ID of the device. + \param [out] PDWORD pFullScaleList : Pen list of all optical pens defined in the device. + \return short : A \link MCHR_ERROR MCHR_ERROR \endlink code + \endif + \see MCHR_GetErrorDescription + \brief + \if FR + \brief Capteurs Compatibles : TOUS.

+ \else + \par Compatibles Sensors : ALL + \endif +*/ +DLL_CHR_API short MCHR_GetPenListEx (MCHR_ID SensorID, PDWORD pFullScaleList); +/* ------------------------------------------------------------------------- */ + + +/*! + \fn short MCHR_GetFullScaleEx (MCHR_ID SensorID, PDWORD pFullScale) + \if FR + \brief Fonction permettant de lire la valeur pleine echelle du crayon selectionne. + \warning Remplace la fonction MCHR_GetFullScale. + \else + \brief Get the measuring range of the current optical pen of a connected device. + \warning Replace the MCHR_GetFullScale Function. + \endif + \details + \if FR + \param [in] MCHR_ID SensorID : ID du coffret. + \param [out] PDWORD pFullScale : Valeur pleine echelle du crayon selectionne. + \return short : un code d'erreur MCHR_ERROR + \else + \param [in] MCHR_ID SensorID : ID of the device. + \param [out] PDWORD pFullScale : Full scale value of the selected optical pen. + \return short : A \link MCHR_ERROR MCHR_ERROR \endlink code + \endif + \see MCHR_GetErrorDescription + \brief + \if FR + \brief Capteurs Compatibles : TOUS.

+ \else + \par Compatibles Sensors : ALL + \endif +*/ +DLL_CHR_API short MCHR_GetFullScaleEx (MCHR_ID SensorID, PDWORD pFullScale); +/* ------------------------------------------------------------------------- */ + + +/*! + \fn short MCHR_GetFullScaleInterferometricEx (MCHR_ID SensorID, PDWORD pFullScale) + \if FR + \brief Fonction permettant de lire la valeur pleine echelle en mode interferometrique du crayon selectionne. + \warning Remplace la fonction MCHR_GetFullScaleInterferometric. + \else + \brief Get the measuring range of the current optical pen in interferometric mode of a connected device. + \warning Replace the MCHR_GetFullScaleInterferometric Function. + \endif + \details + \if FR + \param [in] MCHR_ID SensorID : ID du coffret. + \param [out] PDWORD pFullScale : Valeur pleine echelle en mode interferometrique du crayon selectionne. + \return short : un code d'erreur MCHR_ERROR + \else + \param [in] MCHR_ID SensorID : ID of the device. + \param [out] PDWORD pFullScale : Full scale value in interferometric mode of the current optical pen. + \return short : A \link MCHR_ERROR MCHR_ERROR \endlink code + \endif + \see MCHR_GetErrorDescription +*/ +DLL_CHR_API short MCHR_GetFullScaleInterferometricEx(MCHR_ID SensorID, PDWORD pFullScale); +/* ------------------------------------------------------------------------- */ + +/*! + \fn long * MCHR_GetRateList(MCHR_ID SensorID, WORD *RateListLength) + \if FR + \brief Fonction retournant la liste des frequences disponibles pour le coffret connecte specifie. + \else + \brief Get the list of available rates for the specified connected device. + \endif + \details + \if FR + \param [in] MCHR_ID SensorID : ID du coffret. + \param [out] WORD *RateListLength : Taille du tableau de frequence. + \return long* : Tableau des frequences predefinie du coffret. + \else + \param [in] MCHR_ID SensorID : ID of the device. + \param [out] WORD *RateListLength : Length of the frequency array. + \return long* : Array of device's predefined frequencies (rates). + \endif + \see MCHR_GetErrorDescription + \brief + \if FR + \brief Capteurs Compatibles : TOUS.

+ \brief Voir : la fonction "OnOpenSensor()" and ?OnSelectSensor () ?dans le module : + \else + \par Compatibles Sensors : ALL + \endif +*/ +DLL_CHR_API long * MCHR_GetRateList(MCHR_ID SensorID, WORD *RateListLength); +/* ------------------------------------------------------------------------- */ + +/*! + \fn short MCHR_GetStatus (MCHR_ID SensorID) + \if FR + \brief Fonction retournant l'etat du capteur selectionne. + \else + \brief Get the current device's state. + \endif + \details + \if FR + \param [in] MCHR_ID SensorID : ID du coffret. + \return MCHR_STATUS : Statut du capteur

+ \brief Le statut peut 阾re comme suivant : + \arg \c MCHR_STATUS_NOT_INITIALIZED + \arg \c MCHR_STATUS_INITIALIZED + \arg \c MCHR_STATUS_INIT_FAILED + \arg \c MCHR_STATUS_WAIT_COMMAND + \arg \c MCHR_STATUS_COMMAND_IN_PROGRESS + \arg \c MCHR_STATUS_ACQUISITION_IN_PROGRESS + \arg \c MCHR_STATUS_CONTINUOUS_ACQ_IN_PROGRESS + \arg \c MCHR_STATUS_STOP_ACQ_IN_PROGRESS + \else + \param [in] MCHR_ID SensorID : ID of the device. + \return MCHR_STATUS : Status code

+ \brief The status may have one of the following values: + \arg \c MCHR_STATUS_NOT_INITIALIZED + \arg \c MCHR_STATUS_INITIALIZED + \arg \c MCHR_STATUS_INIT_FAILED + \arg \c MCHR_STATUS_WAIT_COMMAND + \arg \c MCHR_STATUS_COMMAND_IN_PROGRESS + \arg \c MCHR_STATUS_ACQUISITION_IN_PROGRESS + \arg \c MCHR_STATUS_CONTINUOUS_ACQ_IN_PROGRESS + \arg \c MCHR_STATUS_STOP_ACQ_IN_PROGRESS + \endif + \see MCHR_GetErrorDescription + \brief + \if FR + \brief Capteurs Compatibles : TOUS.

+ \brief Voir : la fonction "OnAcqStop()" dans le module : + \else + \par Compatibles Sensors : ALL + \endif +*/ +DLL_CHR_API short MCHR_GetStatus (MCHR_ID SensorID); +/* ------------------------------------------------------------- */ + +/************************************************************************** + ** Digital Outputs Configuration ** + **************************************************************************/ + +/*! + \fn short MCHR_GetDigitalOutput (MCHR_ID SensorID, PWORD Data0, PWORD Data1, PWORD Data2, PWORD Data3, PWORD Data4, PWORD Data5, PWORD Data6, PWORD Data7) + \if FR + \brief Fonction de lecture de la configuration des donnees transmises sur la liaison serie. + \else + \brief Get current configuration of data transmitted on the Digital output. + \endif + \details + \if FR + FONCTION OBSOLETE : Remplacee par MCHR_GetTransmittedDigitalOutput. + \else + OBSOLETE FUNCTION : Replaced by \link MCHR_GetTransmittedDigitalOutput MCHR_GetTransmittedDigitalOutput \endlink. + \endif +*/ +DLL_CHR_API short MCHR_GetDigitalOutput (MCHR_ID SensorID, PWORD Data0, PWORD Data1, PWORD Data2, PWORD Data3, PWORD Data4, PWORD Data5, PWORD Data6, PWORD Data7); +/* ------------------------------------------------------------------------- */ + +/*! + \fn short MCHR_SetDigitalOutput (MCHR_ID SensorID, WORD Data0, WORD Data1, WORD Data2, WORD Data3, WORD Data4, WORD Data5, WORD Data6, WORD Data7) + \if FR + \brief OBSOLETE : Fonction de configuration des donnees ?transmettre sur la liaison serie. + \else + \brief OBSOLETE : Set data to be transmitted by the digital output. + \endif + \details + \if FR + FONCTION OBSOLETE : Remplacee par MCHR_SetTransmittedDigitalOutput. + \else + OBSOLETE FUNCTION : Replaced by \link MCHR_SetTransmittedDigitalOutput MCHR_SetTransmittedDigitalOutput \endlink. + \endif +*/ +DLL_CHR_API short MCHR_SetDigitalOutput (MCHR_ID SensorID, WORD Data0, WORD Data1, WORD Data2, WORD Data3, WORD Data4, WORD Data5, WORD Data6, WORD Data7); +/* ------------------------------------------------------------------------- */ + +/*! + \fn short MCHR_GetTransmittedDigitalOutput (MCHR_ID SensorID, enDigitalOutputChannel *Data); + \if FR + \brief Fonction de lecture de la configuration des donnees transmises sur la liaison digitale. + \else + \brief Get current configuration of data transmitted on the Digital output. + \endif + \details + \if FR + \param [in] MCHR_ID SensorID : ID du coffret. + \param [out] enDigitalOutputChannel *Data : Tableau de configuration des sorties digitales. + \return short : un code d'erreur \link MCHR_ERROR MCHR_ERROR \endlink. + \else + \param [in] MCHR_ID SensorID : ID of the device. + \param [out] enDigitalOutputChannel *Data : Array of digital outputs channels.
+ \brief The number of available data items depends on controller type and may be found using the MCHR_GetMaxNumberOfTransmittedData() function. + \note It is possible to direct some or all of the data to a digital port different than the one connected to the DLL. + \return short : A \link MCHR_ERROR MCHR_ERROR \endlink code. + \endif + \see MCHR_GetErrorDescription + \brief + \if FR + \brief Capteurs Compatibles : TOUS.

+ \brief Voir : la fonction "On MCHR_GetMaxNumberof TransmittedData()" dans le module : + \else + \par Compatibles Sensors : ALL + \endif +*/ +DLL_CHR_API short MCHR_GetTransmittedDigitalOutput (MCHR_ID SensorID, enDigitalOutputChannel *Data); +/* ------------------------------------------------------------------------- */ + + +/*! + \fn short MCHR_SetTransmittedDigitalOutput (MCHR_ID SensorID, enDigitalOutputChannel *Data) + \if FR + \brief Fonction de configuration des donnees ?transmettre sur la liaison digitale. + \else + \brief Set data to be transmitted by the digital output channel. + \endif + \details + \if FR + \param [in] MCHR_ID SensorID : ID du coffret. + \param [in] enDigitalOutputChannel *Data : Tableau de configuration des sorties digitales. + \param Le nombre de donn閑s disponible d閜end du type de controller et peut etre trouver en utilisant la fonction MCHR_GetMaxNumberOfTransmittedData(). + \return short : un code d'erreur MCHR_ERROR.

+ \brief Erreurs sp閏ifiques : + \arg \c MCHR_ERROR_SCANRATE_TOO_HIGH: La vitesse de mesure actuelle est trop rapide pour transmettre les donnes sp閏ifiees sur une liaision serie + \else + \param [in] MCHR_ID SensorID : ID of the device. + \param [in] enDigitalOutputChannel *Data : Array of digital outputs channels. + \param The number of available data items depends on controller type and may be found using the MCHR_GetMaxNumberOfTransmittedData() function. + \return short : A \link MCHR_ERROR MCHR_ERROR \endlink code.

+ \brief Specifics errors : + \arg \c MCHR_ERROR_SCANRATE_TOO_HIGH: the current measuring rate is too high for transmitting the specified data items on the serial link. + \endif + \see MCHR_GetErrorDescription + \brief + \if FR \par Compatibles Sensors : ALL + \else + \par Compatibles Sensors : ALL + \endif +*/ +DLL_CHR_API short MCHR_SetTransmittedDigitalOutput (MCHR_ID SensorID, enDigitalOutputChannel *Data); +/* ------------------------------------------------------------------------- */ + +/*! + \fn short MCHR_GetDigitalOutputFormat (MCHR_ID SensorID, enDigitalOutputFormat *pOutputFormat) + \if FR + \brief Fonction de lecture du format (ASCII/BIN) de la sortie digitale. + \else + \brief Get the the current digital outpout format (ASCII/BIN). + \endif + \details + \if FR + \param [in] MCHR_ID SensorID : ID du coffret. + \param [out] enDigitalOutputFormat *pOutputFormat : Tableau des formats des sorties digitales. + \return short : un code d'erreur MCHR_ERROR. + \else + \param [in] MCHR_ID SensorID : ID of the device. + \param [out] enDigitalOutputFormat *pOutputFormat : Array with digital outputs formats. + \return short : A \link MCHR_ERROR MCHR_ERROR \endlink code. + \endif + \see MCHR_GetErrorDescription + \brief + \if FR + \brief Capteurs Compatibles : TOUS.

+ \brief Voir : la fonction "OnGetOutputFormat()" dans le module : + \else + \par Compatibles Sensors : ALL + \endif +*/ +DLL_CHR_API short MCHR_GetDigitalOutputFormat (MCHR_ID SensorID, enDigitalOutputFormat *pOutputFormat); +/* ------------------------------------------------------------------------- */ + + +/*! + \fn short MCHR_SetDigitalOutputFormat (MCHR_ID SensorID, enDigitalOutputFormat OutputFormat) + \if FR + \brief Fonction de parametrage du format (ASCII/BIN) de la sortie digitale. + \else + \brief Set the digital outpout format (ASCII/BIN). + \endif + \details + \if FR + \param [in] MCHR_ID SensorID : ID du coffret. + \param [in] enDigitalOutputFormat *pOutputFormat : Tableau des formats des sorties digitales. + \return short : un code d'erreur MCHR_ERROR. + \else + \param [in] MCHR_ID SensorID : ID of the device. + \param [in] enDigitalOutputFormat *pOutputFormat : Array with digital outputs formats. + \return short : A \link MCHR_ERROR MCHR_ERROR \endlink code. + \endif + \see MCHR_GetErrorDescription + \brief + \if FR \par Compatibles Sensors : ALL + \else + \par Compatibles Sensors : ALL + \endif +*/ +DLL_CHR_API short MCHR_SetDigitalOutputFormat (MCHR_ID SensorID, enDigitalOutputFormat OutputFormat); +/* ------------------------------------------------------------------------- */ + + +/*! + \fn short MCHR_GetSerialPort (MCHR_ID SensorID) + \if FR + \brief Fonction de lecture du port serie sur lequel est connecte le controleur. + \else + \brief Get the id of the serial port on which the controller is currently connected. + \endif + \details + \if FR + \param [in] MCHR_ID SensorID : ID du coffret. + \return short : Numero de port du controleur. + \else + \param [in] MCHR_ID SensorID : ID of the device. + \return short : Serial port number. + \endif + \see MCHR_GetErrorDescription + \brief + \if FR + \brief Capteurs Compatibles : TOUS.

+ \brief Voir : la fonction "UpdateSensorInfo" dans le module : + \else + \par Compatibles Sensors : ALL + \endif +*/ +DLL_CHR_API short MCHR_GetSerialPort (MCHR_ID SensorID); +/* ------------------------------------------------------------- */ + +/*! + \fn long MCHR_GetBaudRate (MCHR_ID SensorID) + \if FR + \brief Fonction de lecture de la vitesse de communication avec le controleur connecte. + \else + \brief Get the current baud rate. + \endif + \details + \if FR + \param [in] MCHR_ID SensorID : ID du coffret. + \return long : Baudrate du port serie. + \else + \param [in] MCHR_ID SensorID : ID of the device. + \return long : Baud rate of the serial port. + \endif + \brief + \see MCHR_GetErrorDescription + \brief + \if FR + \brief Capteurs Compatibles : TOUS.

+ \brief Voir : la fonction "UpdateSensorInfo()" dans le module : + \else + \par Compatibles Sensors : ALL + \endif +*/ +DLL_CHR_API long MCHR_GetBaudRate (MCHR_ID SensorID); +/* ------------------------------------------------------------- */ + + +/*! + \fn short MCHR_GetMaxNumberOfTransmittedData (MCHR_ID SensorID, WORD *MaxDataNumber) + \if FR + \brief Fonction de lecture du nombre Max de donnees pouvant etre transmises sur la liaison digitale. + \else + \brief Get the number of available data items (this depends on controller type). + \endif + \details + \if FR + \param [in] MCHR_ID SensorID : ID du coffret. + \param [out] WORD *MaxDataNumber : Nombre max de donnees transmissible. + \return short : un code d'erreur MCHR_ERROR. + \else + \param [in] MCHR_ID SensorID : ID of the device. + \param [out] WORD *MaxDataNumber : Maximum number of data that can be sent via the digital output. + \return short : A \link MCHR_ERROR MCHR_ERROR \endlink code. + \endif + \see MCHR_GetErrorDescription + \brief + \if FR + \brief Capteurs Compatibles : TOUS.

+ \brief Voir : la fonction dans le module : + \else + \par Compatibles Sensors : ALL + \endif +*/ +DLL_CHR_API short MCHR_GetMaxNumberOfTransmittedData (MCHR_ID SensorID, WORD *MaxDataNumber); +/* ------------------------------------------------------------------------- */ + +/*! + \fn short MCHR_GetIPAddress (MCHR_ID SensorID, char *Address) + \if FR + \brief Fonction permettant de lire l'adresse IP du capteur (depend du type de controleur. + \else + \brief Get sensor IP adress (this depends on controller type). + \endif + \details + \if FR + \param [in] MCHR_ID SensorID : ID du coffret. + \param [out] char *Address : Adresse IP du coffret. + \return short : un code d'erreur MCHR_ERROR. + \else + \param [in] MCHR_ID SensorID : ID of the device. + \param [out] CHAR *Address : Controller's IP address. + \return short : A \link MCHR_ERROR MCHR_ERROR \endlink code. + \endif + \see MCHR_GetErrorDescription + \brief + \if FR + \brief Capteurs Compatibles : TOUS.

+ \brief Voir : la fonction "OnGetIPAddress () " dans le module : + \else + \par Compatibles Sensors : STIL-DUO + \endif +*/ +DLL_CHR_API short MCHR_GetIPAddress (MCHR_ID SensorID, char *Address); +/* ------------------------------------------------------------------------- */ + +/*! + \fn short MCHR_SetIPAddress (MCHR_ID SensorID, char *Address) + \if FR + \brief Fonction permettant de fixer l'adresse IP du capteur (depend du type de controleur. + \else + \brief Set sensor IP adress (this depends on controller type). + \endif + \details + \if FR + \param [in] MCHR_ID SensorID : ID du coffret. + \param [in] char *Address : Nouvelle adresse IP du coffret. + \return short : un code d'erreur MCHR_ERROR. + \else + \param [in] MCHR_ID SensorID : ID of the device. + \param [in] char *Address : Controller's new IP address. + \return short : A \link MCHR_ERROR MCHR_ERROR \endlink code. + \endif + \see MCHR_GetErrorDescription + \brief + \if FR \par Compatibles Sensors : STIL-DUO. + \else + \par Compatibles Sensors : STIL-DUO. + \endif +*/ +DLL_CHR_API short MCHR_SetIPAddress (MCHR_ID SensorID, char *Address); +/* ------------------------------------------------------------------------- */ + +/*! + \fn short MCHR_GetBarycenterScale (MCHR_ID SensorID, float *pValue) + \if FR + \brief Fonction permettant de lire la valeur de codage du barycentre. + \else + \brief Get barycenter-data ouput scale. + \endif + \details + \if FR + \param [in] MCHR_ID SensorID : ID du coffret. + \param [out] float *pValue : Valeur d'echelle de mesure du barycentre. + \return short : un code d'erreur MCHR_ERROR. + \else + \param [in] MCHR_ID SensorID : ID of the device. + \param [out] float *pValue : Barycenter scale value. + \return short : A \link MCHR_ERROR MCHR_ERROR \endlink code. + \endif + \see MCHR_GetErrorDescription + \brief + \if FR + \brief Capteurs Compatibles : CCS PRIMA, CCS OPTIMA, CCS ULTIMA, STIL-INITIAL.

+ \brief Voir : la fonction "OnAcqStop()" dans le module : + \else + \par Compatibles Sensors : CCS PRIMA, CCS OPTIMA, CCS ULTIMA, STIL-INITIAL + \endif +*/ +DLL_CHR_API short MCHR_GetBarycenterScale (MCHR_ID SensorID, float *pValue); +/* ------------------------------------------------------------------------- */ + +/*! + \fn short MCHR_SetBarycenterScale (MCHR_ID SensorID, float Value) + \if FR + \brief Fonction permettant de fixer la valeur de codage du barycentre. + \else + \brief Set scale for barycenter output. + \endif + \details + \if FR + \param [in] MCHR_ID SensorID : ID du coffret. + \param [in] float pValue : Valeur d'echelle de mesure du barycentre. + \return short : un code d'erreur MCHR_ERROR. + \else + \param [in] MCHR_ID SensorID : ID of the device. + \param [in] float pValue : Barycenter scale value. + \return short : A \link MCHR_ERROR MCHR_ERROR \endlink code. + \endif + \see MCHR_GetErrorDescription + \brief + \if FR \par Compatibles Sensors : CCS PRIMA, CCS OPTIMA, CCS ULTIMA, STIL-INITIAL + \else + \par Compatibles Sensors : CCS PRIMA, CCS OPTIMA, CCS ULTIMA, STIL-INITIAL + \endif +*/ +DLL_CHR_API short MCHR_SetBarycenterScale (MCHR_ID SensorID, float Value); +/* ------------------------------------------------------------------------- */ + +/*! + \fn short MCHR_GetBarycenterRef (MCHR_ID SensorID, float *pValue) + \if FR + \brief Fonction permettant de lire la valeur de reference du barycentre. + \else + \brief Get barycenter-data reference value. + \endif + \details + \if FR + \param [in] MCHR_ID SensorID : ID du coffret. + \param [out] float *pValue : Valeur de reference du barycentre. + \return short : un code d'erreur MCHR_ERROR. + \else + \param [in] MCHR_ID SensorID : ID of the device. + \param [out] float *pValue : Barycenter reference value. + \return short : A \link MCHR_ERROR MCHR_ERROR \endlink code. + \endif + \see MCHR_GetErrorDescription + \brief + \if FR + \brief Capteurs Compatibles : TOUS.

+ \brief Voir : la fonction "OnGetBarycenterRef()" dans le module : + \else + \par Compatibles Sensors : CCS PRIMA, CCS OPTIMA, CCS ULTIMA, STIL-INITIAL + \endif +*/ +DLL_CHR_API short MCHR_GetBarycenterRef (MCHR_ID SensorID, float *pValue); +/* ------------------------------------------------------------------------- */ + +/*! + \fn short MCHR_SetBarycenterRef (MCHR_ID SensorID, float Value) + \if FR + \brief Fonction permettant de fixer la valeur de reference du barycentre. + \else + \brief Set reference for barycenter output. + \endif + \details + \if FR + \param [in] MCHR_ID SensorID : ID du coffret. + \param [in] float pValue : Valeur de reference de mesure du barycentre. + \return short : un code d'erreur MCHR_ERROR. + \else + \param [in] MCHR_ID SensorID : ID of the device. + \param [in] float pValue : Barycenter reference value. + \return short : A \link MCHR_ERROR MCHR_ERROR \endlink code. + \endif + \see MCHR_GetErrorDescription + \brief + \if FR \par Compatibles Sensors : CCS PRIMA, CCS OPTIMA, CCS ULTIMA, STIL-INITIAL + \else + \par Compatibles Sensors : CCS PRIMA, CCS OPTIMA, CCS ULTIMA, STIL-INITIAL + \endif +*/ +DLL_CHR_API short MCHR_SetBarycenterRef (MCHR_ID SensorID, float Value); +/* ------------------------------------------------------------------------- */ + +/*! + \fn short MCHR_GetThicknessScale (MCHR_ID SensorID, float *pValue) + \if FR + \brief Fonction permettant de lire la valeur de codage en mode epaisseur. + \else + \brief Get thickness-mode output data scale.(for thickness and distance data items)(CCS only) + \endif + \details + \if FR + \param [in] MCHR_ID SensorID : ID du coffret. + \param [in] float pValue : Valeur de reference de mesure du barycentre. + \return short : un code d'erreur MCHR_ERROR. + \else + \param [in] MCHR_ID SensorID : ID of the device. + \param [in] float pValue : Barycenter reference value. + \return short : A \link MCHR_ERROR MCHR_ERROR \endlink code. + \endif + \see MCHR_GetErrorDescription + \brief + \if FR + \brief Capteurs Compatibles : CCS PRIMA, CCS OPTIMA, CCS ULTIMA, STIL-INITIAL

+ \else + \par Compatibles Sensors : CCS PRIMA, CCS OPTIMA, CCS ULTIMA, STIL-INITIAL + \endif +*/ +DLL_CHR_API short MCHR_GetThicknessScale (MCHR_ID SensorID, float *pValue); +/* ------------------------------------------------------------------------- */ + +/*! + \fn short MCHR_SetThicknessScale (MCHR_ID SensorID, float Value) + \if FR + \brief Fonction permettant de fixer la valeur de codage en mode epaisseur. + \else + \brief Set scale for thickness and distance output in thickness mode (CCS only) + \endif + \details + \if FR + \param [in] MCHR_ID SensorID : ID du coffret. + \param [in] float Value : Valeur de reference de mesure du barycentre. + \return short : un code d'erreur MCHR_ERROR. + \else + \param [in] MCHR_ID SensorID : ID of the device. + \param [in] float Value : Barycenter reference value. + \return short : A \link MCHR_ERROR MCHR_ERROR \endlink code. + \endif + \see MCHR_GetErrorDescription +*/ + +DLL_CHR_API short MCHR_SetThicknessScale (MCHR_ID SensorID, float Value); +/* ------------------------------------------------------------------------- */ + +/************************************************************************** + ** Analog Outputs Configuration ** + **************************************************************************/ + +/*! + \fn short MCHR_GetAnalogOutput (MCHR_ID SensorID, WORD AnaIndex, PWORD Data, PWORD ZeroValue, PWORD MaxValue) + \if FR + \brief Fonction de lecture de la configuration d'une sortie analogique. + \warning Voir la fonction MCHR_GetAnalogOutputEx pour utiliser les parametres ZeroValue et MaxValue dans un format DWORD (?partir de la DLL_CHR V3.2.0.00)! + \else + \brief Get current configuration of analog output + \warning See MCHR_GetAnalogOutputEx Function to use ZeroValue and MaxValue parameters on DWORD Format (from DLL_CHR V3.2.0.00)! + \endif + \details + \if FR + \param [in] MCHR_ID SensorID : ID du coffret. + \param [out] WORD AnaIndex : Numero de la sortie analogique ?configurer + \param [out] PWORD Data : Pointeur sur la mesure transmise sur la voie analogique configuree dans le CHR-150, la valeur est comprise entre 0 et 7. + \param [out] PWORD ZeroValue : Pointeur sur la valeur de l'echelle de mesure pour laquelle on aura 0 volt sur la sortie analogique. + \param [out]PWORD MaxValue : Pointeur sur la valeur de l'echelle de mesure pour laquelle on aura 10 volt sur la sortie analogique. + \return short : un code d'erreur MCHR_ERROR. + \else + \param [in] MCHR_ID SensorID : ID of the device. + \param [out] WORD AnaIndex : Number of analog output to be configured + \param [out] PWORD Data : Pointer on the transmitted measuremen of the analog voice configured in THE CHR-150, the value is between 0 and 7. + \param [out] PWORD ZeroValue : Pointer on the measurement scale value where the analog outpout have 0 Volts. + \param [out] PWORD MaxValue : Pointer on the measurement scale value where the analog outpout have 10 Volts. + \return short : A \link MCHR_ERROR MCHR_ERROR \endlink code. + \endif + \see MCHR_GetErrorDescription + \brief + \if FR + \brief Capteurs Compatibles : CHR 150, CHR-150L, STIL-DUO, CCS PRIMA, CCS OPTIMA, CCS ULTIMA

+ \else + \par Compatibles Sensors : CHR 150, CHR-150L, STIL-DUO, CCS PRIMA, CCS OPTIMA, CCS ULTIMA + \endif +*/ +DLL_CHR_API short MCHR_GetAnalogOutput (MCHR_ID SensorID, WORD AnaIndex, PWORD Data, PWORD ZeroValue, PWORD MaxValue); +/* ------------------------------------------------------------------------- */ + +/*! + \fn short MCHR_GetAnalogOutputEx (MCHR_ID SensorID, WORD AnaIndex, PWORD Data, PDWORD ZeroValue, PDWORD MaxValue) + \if FR + \brief Fonction de lecture de la configuration d'une sortie analogique. + \warning Remplace la fonction MCHR_GetAnalogOutput. + \else + \brief Get current configuration of analog output + \warning Replace the MCHR_GetAnalogOutput Function. + \endif + \details + \if FR + \param [in] MCHR_ID SensorID : ID du coffret. + \param [out] WORD AnaIndex : Numero de la sortie analogique ?configurer + \param [out] PWORD Data : Pointeur sur la mesure transmise sur la voie analogique configuree dans le CHR-150, la valeur est comprise entre 0 et 7. + \param [out] PDWORD ZeroValue : Pointeur sur la valeur de l'echelle de mesure pour laquelle on aura 0 volt sur la sortie analogique. + \param [out] PDWORD MaxValue : Pointeur sur la valeur de l'echelle de mesure pour laquelle on aura 10 volt sur la sortie analogique. + \return short : un code d'erreur MCHR_ERROR. + \else + \param [in] MCHR_ID SensorID : ID of the device. + \param [out] WORD AnaIndex : Number of analog output to be configured + \param [out] PWORD Data : Pointer on the transmitted measuremen of the analog voice configured in THE CHR-150, the value is between 0 and 7. + \param [out] PDWORD ZeroValue : Pointer on the measurement scale value where the analog outpout have 0 Volts. + \param [out] PDWORD MaxValue : Pointer on the measurement scale value where the analog outpout have 10 Volts. + \return short : A \link MCHR_ERROR MCHR_ERROR \endlink code. + \endif + \see MCHR_GetErrorDescription + \brief + \if FR + \brief Capteurs Compatibles : CHR 150, CHR-150L, STIL-DUO, CCS PRIMA, CCS OPTIMA, CCS ULTIMA

+ \else + \par Compatibles Sensors : CHR 150, CHR-150L, STIL-DUO, CCS PRIMA, CCS OPTIMA, CCS ULTIMA + \endif +*/ +DLL_CHR_API short MCHR_GetAnalogOutputEx (MCHR_ID SensorID, WORD AnaIndex, PWORD Data, PDWORD ZeroValue, PDWORD MaxValue); +/* ------------------------------------------------------------------------- */ + + + +/*! + \fn short MCHR_SetAnalogOutput (MCHR_ID SensorID, WORD AnaIndex, WORD Data, WORD ZeroValue, WORD MaxValue) + \if FR + \brief Fonction de configuration d'une sortie analogique du capteur CHR-150. + \warning Voir la fonction MCHR_SetAnalogOutputEx pour utiliser les parametres ZeroValue et MaxValue dans un format DWORD (?partir de la DLL_CHR V3.2.0.00)! + \else + \brief Set analog output parameters + \warning See MCHR_SetAnalogOutputEx Function to use ZeroValue and MaxValue parameters on DWORD Format (from DLL_CHR V3.2.0.00)! + \endif + \details + \if FR + \param [in] MCHR_ID SensorID : ID du coffret. + \param [] WORD AnaIndex : + \param [] WORD Data : + \param [] WORD ZeroValue : + \param [] WORD MaxValue : + \return short : un code d'erreur MCHR_ERROR. + \else + \param [in] MCHR_ID SensorID : ID of the device. + \param [in] MCHR_ID SensorID : ID of the device. + \param [in] WORD AnaIndex : Number of analog output to be configured + \param [in] PWORD Data : Pointer on the transmitted measuremen of the analog voice configured in THE CHR-150, the value is between 0 and 7. + \param [in] PWORD ZeroValue : Pointer on the measurement scale value where the analog outpout have 0 Volts. + \param [in] PWORD MaxValue : Pointer on the measurement scale value where the analog outpout have 10 Volts. + \return short : A \link MCHR_ERROR MCHR_ERROR \endlink code. + \endif + \see MCHR_GetErrorDescription + \brief + \if FR \par Compatibles Sensors : CHR 150, CHR-150L, STIL-DUO, CCS PRIMA, CCS OPTIMA, CCS ULTIMA + \else + \par Compatibles Sensors : CHR 150, CHR-150L, STIL-DUO, CCS PRIMA, CCS OPTIMA, CCS ULTIMA + \endif + +*/ + +DLL_CHR_API short MCHR_SetAnalogOutput (MCHR_ID SensorID, WORD AnaIndex, WORD Data, WORD ZeroValue, WORD MaxValue); +/* ------------------------------------------------------------------------- */ + + +/*! + \fn short MCHR_SetAnalogOutputEx (MCHR_ID SensorID, WORD AnaIndex, WORD Data, DWORD ZeroValue, DWORD MaxValue) + \if FR + \brief Fonction de configuration d'une sortie analogique du capteur CHR-150. + \warning Remplace la fonction MCHR_SetAnalogOutput. + \else + \brief Set analog output parameters + \warning Replace the MCHR_SetAnalogOutput Function. + \endif + \details + \if FR + \param [in] MCHR_ID SensorID : ID du coffret. + \param [] WORD AnaIndex : + \param [] WORD Data : + \param [] DWORD ZeroValue : + \param [] DWORD MaxValue : + \return short : un code d'erreur MCHR_ERROR. + \else + \param [in] MCHR_ID SensorID : ID of the device. + \param [in] MCHR_ID SensorID : ID of the device. + \param [in] WORD AnaIndex : Number of analog output to be configured + \param [in] PWORD Data : Pointer on the transmitted measuremen of the analog voice configured in THE CHR-150, the value is between 0 and 7. + \param [in] PDWORD ZeroValue : Pointer on the measurement scale value where the analog outpout have 0 Volts. + \param [in] PDWORD MaxValue : Pointer on the measurement scale value where the analog outpout have 10 Volts. + \return short : A \link MCHR_ERROR MCHR_ERROR \endlink code. + \endif + \see MCHR_GetErrorDescription + \brief + \if FR \par Compatibles Sensors : CHR 150, CHR-150L, STIL-DUO, CCS PRIMA, CCS OPTIMA, CCS ULTIMA + \else + \par Compatibles Sensors : CHR 150, CHR-150L, STIL-DUO, CCS PRIMA, CCS OPTIMA, CCS ULTIMA + \endif + +*/ + +DLL_CHR_API short MCHR_SetAnalogOutputEx (MCHR_ID SensorID, WORD AnaIndex, WORD Data, DWORD ZeroValue, DWORD MaxValue); +/* ------------------------------------------------------------------------- */ + +/************************************************************************** + ** Dark signal Acquisition ** + **************************************************************************/ + +/*! + \fn short MCHR_AcqDark (MCHR_ID SensorID, void *pMinFreq) + \if FR + \brief Fonction de lancement de la fonction Dark. + \else + \brief This function updates the Dark signal of the sensor at all acquisition rates and informs on the minimum authorized acquisition rate. (If some rates are not authorized, see the sensor Operating and Maintenance Manual for methods for cleaning the fiber optics). The dark signals are saved in the sensor non-volatile memory.
+ \brief Note that the execution of this function may take a long time (of the order of one minute for some sensor types). No other commands should be sent to the sensor before processing of this command is done. + \endif + \if FR + \param [in] MCHR_ID SensorID : ID du coffret. + \param [out] *pMinFreq : Valeur de frequence minimum apres Dark. + \return short : un code d'erreur MCHR_ERROR. + \else + \param [in] MCHR_ID SensorID : ID of the device. + \param [out] *pMinFreq : Minimum frequence value after Dark. + \return short : A \link MCHR_ERROR MCHR_ERROR \endlink code. + \endif + \see MCHR_GetErrorDescription + \brief + \if FR + \brief Capteurs Compatibles : TOUS.

+ \brief Voir : la fonction "OnSetDark()" dans le module : + \else + \par Compatibles Sensors : ALL + \endif + +*/ + +DLL_CHR_API short MCHR_AcqDark (MCHR_ID SensorID, void *pMinFreq); +/* ------------------------------------------------------------------------- */ + +/*! + \fn short MCHR_AcqFastDark (MCHR_ID SensorID, WORD Average, float InfluenceValue) + \if FR + \brief Fonction d'execution de la commande de Dark Rapide. + \else + \brief Acquire "fast dark" (at current rate only) + \endif + \details + \if FR + \param [in] MCHR_ID SensorID : ID du coffret. + \param [in] WORD Average : entier indiquant le nombre d抋cquisition successives ?moyenner pour obtenir le dark de reference. Si egal ?0 on utilise les valeurs par defaut du chr. + \param [in] float InfluenceValue : Pourcentage de l抜nfluence des acquisitions faites sur le nouveau dark de reference. (ignore si Average == 0) + \return short : un code d'erreur MCHR_ERROR.

+ \brief Erreur specifique :
+ \arg \c MCHR_ERROR_DARK_NOT_VALID : erreur d'acquisition du DARK signal. + \else + \param [in] MCHR_ID SensorID : ID of the device. + \param [in] WORD Average : number of sequential acquisitions to be averaged to get the darkref.(if is egal to 0, we use the sensor value by default). + \param [in] FLOAT InfluenceValue : precentage of acquisition influences on the new darkref. ( ignored if Average = 0 ) + \return short : A \link MCHR_ERROR MCHR_ERROR \endlink code.
+ \brief Specific error : \link MCHR_ERROR_DARK_NOT_VALID MCHR_ERROR_DARK_NOT_VALID : \endlink Dark acquisition failed + \endif + \brief + \see MCHR_GetErrorDescription + \brief + \if FR + \brief Capteurs Compatibles : TOUS.

+ \else + \par Compatibles Sensors : ALL + \endif +*/ +DLL_CHR_API short MCHR_AcqFastDark (MCHR_ID SensorID, WORD Average, float InfluenceValue); +/************************************************************************** + ** White signal Acquisition ** + **************************************************************************/ + +/*! + \fn short MCHR_AcqWhite (MCHR_ID SensorID) + \if FR + \brief Fonction de lancement de la fonction white. + \else + \brief Acquire White signal + \endif + \details + \if FR + \param [in] MCHR_ID SensorID : ID du coffret. + \return short : un code d'erreur MCHR_ERROR. + \else + \param [in] MCHR_ID SensorID : ID of the device. + \return short : A \link MCHR_ERROR MCHR_ERROR \endlink code. + \endif + \see MCHR_GetErrorDescription + \par Compatibles Sensors : ALL Except RUBY and CHR Sensors +*/ + +DLL_CHR_API short MCHR_AcqWhite (MCHR_ID SensorID); +/* ------------------------------------------------------------------------- */ + + +/*! + \fn short MCHR_AcqNormalizedWhite (MCHR_ID SensorID) + \if FR + \brief Fonction d'execution de la commande de white normalized. + \else + \brief Acquire normalized White signal + \endif + \details + \if FR + \param [in] MCHR_ID SensorID : ID du coffret. + \return short : un code d'erreur MCHR_ERROR. + \else + \param [in] MCHR_ID SensorID : ID of the device. + \return short : A \link MCHR_ERROR MCHR_ERROR \endlink code. + \endif + \see MCHR_GetErrorDescription + \par Compatibles Sensors : ALL Except RUBY and CHR sensors +*/ + +DLL_CHR_API short MCHR_AcqNormalizedWhite (MCHR_ID SensorID); +/* ------------------------------------------------------------- */ + +/************************************************************************** + ** Measurement ** + **************************************************************************/ + +/*! + \fn short MCHR_GetDepthMeasurement (MCHR_ID SensorID, MCHR_tyAcqParam Parameters, PFLOAT *pArrayDepth, PFLOAT *pArrayIntensity, PFLOAT *pArrayCounter, PFLOAT *pArrayBarycenter, PFLOAT *pArrayStatus) + \if FR + \brief Fonction d'acquisition d'une sequence de points en mode distance mesurant la profondeur. + \warning Cette fonction ne peut etre utilise pour les mesure de la donn閑 du Barycentre pour la calibration deu capteur. + \else + \brief This function allows acquiring the data measured by the sensor in distance mode. The Z axis points downwards, in other words, the z-coordinate ("depth") increases when the sample point gets further from the optical pen tip. In this mode, some the sensor models deliver 5 data per measured points (Depth, Intensity, Counter, Barycenter position, State). For other models sensor models, counter and State data are not available.
+ \brief Before starting the acquisition, this function configures the sensor to the Distance measuring mode and directs the selected data (i.e. data for which the array pointer argument in the function call is not NULL ) to the digital output specified when opening the sensor. + \warning This function should not be used for measuring Barycenter data for sensor calibration. + \endif + \details + \if FR + \param [in] MCHR_ID SensorID : ID du coffret. + \param [out] MCHR_tyAcqParam Parameters : data structure for setting the measurement parameters + \param [out] PFLOAT *pArrayDepth : + \param [out] PFLOAT *pArrayIntensity : + \param [out] PFLOAT *pArrayCounter : + \param [out] PFLOAT *pArrayBarycenter : + \param [out] PFLOAT *pArrayStatus : + \return short : un code d'erreur MCHR_ERROR. + \else + \param [in] MCHR_ID SensorID : ID of the device. + \param [out] MCHR_tyAcqParam Parameters : data structure for setting the measurement parameters + \param [out] PFLOAT *pArrayDepth : an array of pointers to distance data buffers. If NULL, distance data is not acquired. (distance is in "Depth" mode, in other words, the Z axis points downwards). + \param [out] PFLOAT *pArrayIntensity : an array of pointers to intensity data buffers. If NULL, intensity data is not acquired. + \param [out] PFLOAT *pArrayCounter : an array of pointers to the counter data buffers. If NULL, intensity data is not acquired. (Note: For some sensor models counter data is not available, please consult the User Manual) + \param [out] PFLOAT *pArrayBarycenter : an array of pointers to Barycenter data buffers. If Null, Barycenter data is not acquired. (Barycenter data is peak position on the photodetector. This data is used for sensor calibration only). + \param [out] PFLOAT *pArrayStatus : an array of pointers to the State data buffers. If NULL, State data is not acquired. (Note: For some sensor models State data is not available, please consult the User Manual) + \param Note: the use of several buffers for the same data enables real-time processing of the data, e.g. real time display, as shown in the example bellow. + \return short : A MCHR_ERROR code.

+ \brief Specific errors : + \arg \c MCHR_ERROR_TRIGGER_TYPE: the specified trigger mode does not exist + \arg \c MCHR_ERROR_START_RECEP_THREAD: an error occurred while attempting to start the acquisition thread + \arg \c ERROR_CHR_BUFFER_FULL: the reception buffers are full, the data is not read rapidly enough + \endif + \see MCHR_GetErrorDescription + \brief + \if FR + \brief Capteurs Compatibles : TOUS.

+ \else + \par Compatibles Sensors : All Sensors in Chromatic Confocal mode. + \endif + \brief + +*/ + +DLL_CHR_API short MCHR_GetDepthMeasurement (MCHR_ID SensorID, MCHR_tyAcqParam Parameters, PFLOAT *pArrayDepth, PFLOAT *pArrayIntensity, PFLOAT *pArrayCounter, PFLOAT *pArrayBarycenter, PFLOAT *pArrayStatus); + +/*! + \fn short MCHR_StartSpectrumAcquisition (MCHR_ID SensorID, PWORD pwFirstUsablePixel, PWORD pwBufferSize) + \if FR + \brief Fonction de lancement de l'acquisition des spectres + \else + \brief Function to launch the acquisition of spectrum + \endif + \details + \if FR + \param [in] MCHR_ID SensorID : ID du coffret. + \param [out] PWORD pwFirstUsablePixel : retourne le numero du premier pixel utilis?pour l'acquisition du spectre + \param [out] PWORD pwBufferSize : retourne la taille que devra avoir le buffer d'acquisition + \return short : un code d'erreur MCHR_ERROR. + \else + \param [in] MCHR_ID SensorID : ID of the device. + \param [out] PWORD pwBufferSize : returns the size that will be the acquisition buffer + \return short : A \link MCHR_ERROR MCHR_ERROR \endlink code. + \endif + \see MCHR_GetErrorDescription + \par Compatibles Sensors : CCS_PRIMA, CCS_OPTIMA CCS_ULTIMA & MCHR_CCS_INITIAL + \par See an example : + \brief The \link Example6.cpp 揈xample6?\endlink sample program illustrating the acquisition of 10 spectrum. + \endif + \example Example6.cpp +*/ + +DLL_CHR_API short MCHR_StartSpectrumAcquisition (MCHR_ID SensorID, PWORD pwFirstUsablePixel, PWORD pwBufferSize); + +/*! + \fn short MCHR_StopSpectrumAcquisition (MCHR_ID SensorID) + \if FR + \brief Fonction d'arr阾 de l'acquisition des spectres + \else + \brief Stop function of the acquisition of spectrum + \endif + \details + \if FR + \param [in] MCHR_ID SensorID : ID du coffret. + \return short : un code d'erreur MCHR_ERROR. + \else + \param [in] MCHR_ID SensorID : ID of the device. + \return short : A \link MCHR_ERROR MCHR_ERROR \endlink code. + \endif + \see MCHR_GetErrorDescription + \par Compatibles Sensors : CCS_PRIMA, CCS_OPTIMA CCS_ULTIMA & MCHR_CCS_INITIAL + \par See an example : + \brief The \link Example6.cpp 揈xample6?\endlink sample program illustrating the acquisition of 10 spectrum. + \endif + \example Example6.cpp +*/ +DLL_CHR_API short MCHR_StopSpectrumAcquisition (MCHR_ID SensorID); + + +/*! + \fn short MCHR_GetSpectrumAcquisitionData (MCHR_ID SensorID, unsigned short **ppSpectrum, unsigned short *pDataSize, enSpectrumAcquisitionResult *pSpectrumAcquisitionResult, long timeout) + \if FR + \brief Fonction d'acquisition d'une sequence de points en mode distance mesurant l'altitude + \else + \brief Acquisition function for "Distance/Altitude" mode (z axis sens=upward)(this function returns 5 buffers with following data: Altitude, Intensity, Barycenter position,Counter and Status) + \warning This function should not be used for measuring Barycenter data for sensor calibration. + \endif + \details + \if FR + \param [in] MCHR_ID SensorID : ID du coffret. + \param [out] unsigned short *pSpectrum : Donn閑s du spectre lu (ne pas oublier d'effacer le buffer apr鑣 utilisation) + \param [in] unsigned short DataSize : Taille des donn閑s du spectre (donn閑s) + \param [out] enSpectrumAcquisitionResult *pSpectrumAcquisitionResult : Resultat de l'acquisition + \param [out] long timeout : Timeout sortir de la fonction + \return short : un code d'erreur MCHR_ERROR. + \else + \param [in] MCHR_ID SensorID : ID of the device. + \param [out] unsigned short *pSpectrum : Spectrum data read (do not forget to clear the buffer after use) + \param [in] unsigned short DataSize : Size spectrum data (data). + \param [out] enSpectrumAcquisitionResult *pSpectrumAcquisitionResult : Result of the acquisition + \param [out] long timeout : Out of the timeout function + \return short : A \link MCHR_ERROR MCHR_ERROR \endlink code.

+ \endif + \par Compatibles Sensors : CCS_PRIMA, CCS_OPTIMA CCS_ULTIMA & MCHR_CCS_INITIAL. + \par See an example : + \brief The \link Example6.cpp 揈xample6?\endlink sample program illustrating the acquisition of 10 spectrum. + \endif + \example Example6.cpp +*/ +DLL_CHR_API short MCHR_GetSpectrumAcquisitionData(MCHR_ID SensorID, unsigned short *pSpectrum, unsigned short DataSize, unsigned short *pCounter, enSpectrumAcquisitionResult *pSpectrumAcquisitionResult, long timeout); + + +/* ------------------------------------------------------------------------- */ + +/*! + \fn short MCHR_GetAltitudeMeasurement (MCHR_ID SensorID, MCHR_tyAcqParam Parameters, PFLOAT *pArrayAltitude, PFLOAT *pArrayIntensity, PFLOAT *pArrayCounter, PFLOAT *pArrayBarycenter, PFLOAT *pArrayStatus) + \if FR + \brief Fonction d'acquisition d'une sequence de points en mode distance mesurant l'altitude + \else + \brief Acquisition function for "Distance/Altitude" mode (z axis sens=upward)(this function returns 5 buffers with following data: Altitude, Intensity, Barycenter position,Counter and Status) + \warning This function should not be used for measuring Barycenter data for sensor calibration. + \endif + \details + \if FR + \param [in] MCHR_ID SensorID : ID du coffret. + \param [out] MCHR_tyAcqParam Parameters : data structure for setting the measurement parameters + \param [out] PFLOAT *pArrayAltitude : Altitude + \param [out] PFLOAT *pArrayIntensity : Intensite + \param [out] PFLOAT *pArrayCounter : Compteur de points acquis + \param [out] PFLOAT *pArrayBarycenter : Position du barycentre + \param [out] PFLOAT *pArrayStatus : + \return short : un code d'erreur MCHR_ERROR. + \else + \param [in] MCHR_ID SensorID : ID of the device. + \param [out] MCHR_tyAcqParam Parameters : data structure for setting the measurement parameters + \param [out] PFLOAT *pArrayAltitude : a pointer to distance data buffer. If NULL, distance data is not acquired. (distance is in "Altitude" mode, in other words, the Z axis points upwards). + \param [out] PFLOAT *pArrayIntensity : an array of pointers to intensity data buffers. If NULL, intensity data is not acquired. + \param [out] PFLOAT *pArrayCounter : an array of pointers to the counter data buffers. If NULL, intensity data is not acquired. (Note: For some sensor models counter data is not available, please consult the User Manual) + \param [out] PFLOAT *pArrayBarycenter : an array of pointers to Barycenter data buffers. If Null, Barycenter data is not acquired. (Barycenter data is peak position on the photodetector. This data is used for sensor calibration only). + \param [out] PFLOAT *pArrayStatus : an array of pointers to the State data buffers. If NULL, State data is not acquired. (Note: For some sensor models State data is not available, please consult the User Manual) + \param Note: the use of several buffers for the same data enables real-time processing of the data, e.g. real time display, as shown in the example bellow. + \return short : A MCHR_ERROR code.

+ \return short : A \link MCHR_ERROR MCHR_ERROR \endlink code.

+ \brief Specific errors : + \arg \c MCHR_ERROR_TRIGGER_TYPE : the specified trigger mode does not exist + \arg \c MCHR_ERROR_START_RECEP_THREAD : an error occurred while attempting to start the acquisition thread + \arg \c ERROR_CHR_BUFFER_FULL : the reception buffers are full, the data is not read rapidly enough + \endif + \par Compatibles Sensors : All Sensors in Chromatic Confocal mode. + + \endif + +*/ + +DLL_CHR_API short MCHR_GetAltitudeMeasurement (MCHR_ID SensorID, MCHR_tyAcqParam Parameters, PFLOAT *pArrayAltitude, PFLOAT *pArrayIntensity, PFLOAT *pArrayCounter, PFLOAT *pArrayBarycenter, PFLOAT *pArrayStatus); +/* ------------------------------------------------------------------------- */ + +/*! + \fn short MCHR_GetThicknessMeasurement (MCHR_ID SensorID, MCHR_tyAcqParam Parameters, PFLOAT *pArrayThickness, + PFLOAT *pArrayDistance1, PFLOAT *pArrayIntensity1, PFLOAT *pArrayBarycenter1, + PFLOAT *pArrayDistance2, PFLOAT *pArrayIntensity2, PFLOAT *pArrayBarycenter2, + PFLOAT *pArrayStatus, PFLOAT *pArrayCounter) + \if FR + \brief Fonction d'acquisition d'une sequence de points en mode epaisseur + \else + \brief Acquisition function for "Thickness" mode (this function returns 8 buffers with following data: Thickness, distance 1, intensity1, barycenter 1, distance 2, intensity 2, barycenter 2, status)
+ \brief Before starting the acquisition, this function configures the sensor to the Thickness measuring mode and directs the selected data (i.e. data for which the array pointer argument in the function call is not NULL ) to the digital output specified when opening the CHR. + \endif + \details + \if FR + \param [in] MCHR_ID SensorID : ID du coffret. + \param [out] MCHR_tyAcqParam Parameters : data structure for setting the measurement parameters + \param [out] PFLOAT *pArrayThickness : Epaisseur + \param [out] PFLOAT *pArrayDistance1 : Distance 1 + \param [out] PFLOAT *pArrayIntensity1 : Intensite 1 + \param [out] PFLOAT *pArrayBarycenter1 : Position du barycentre 1 + \param [out] PFLOAT *pArrayDistance2 : Distance 2 + \param [out] PFLOAT *pArrayIntensity2 : Intensite 2 + \param [out] PFLOAT *pArrayBarycenter2 : Position du barycentre 2 + \param [out] PFLOAT *pArrayStatus : + \param [out] PFLOAT *pArrayCounter : an array of pointers to the counter data buffers. If NULL, intensity data is not acquired. (Note: For some sensor models counter data is not available, please consult the User Manual) + \return short : un code d'erreur MCHR_ERROR. + \else + \param [in] MCHR_ID SensorID : ID of the device. + \param [out] MCHR_tyAcqParam Parameters : data structure for setting the measurement parameters + \param [out] PFLOAT *pArrayThickness : a pointer to distance data buffer. If NULL, distance data is not acquired. (distance is in "Thickness" mode, in other words). + \param [out] PFLOAT *pArrayDistance1 : Distance 1 + \param [out] PFLOAT *pArrayIntensity1 : Intensity 1an array of pointers to intensity data buffers. If NULL, intensity data is not acquired. + \param [out] PFLOAT *pArrayBarycenter1 : an array of pointers to Barycenter data buffers. If Null, Barycenter 1 data is not acquired. (Barycenter data is peak position on the photodetector. This data is used for sensor calibration only). + \param [out] PFLOAT *pArrayDistance2 : Distance 2 + \param [out] PFLOAT *pArrayIntensity2 : an array of pointers to intensity data buffers. If NULL, intensity data is not acquired. + \param [out] PFLOAT *pArrayBarycenter2 : an array of pointers to Barycenter 2 data buffers. If Null, Barycenter data is not acquired. (Barycenter data is peak position on the photodetector. This data is used for sensor calibration only). + \param [out] PFLOAT *pArrayStatus : an array of pointers to the State data buffers. If NULL, State data is not acquired. (Note: For some sensor models State data is not available, please consult the User Manual) + \param [out] PFLOAT *pArrayCounter : an array of pointers to the counter data buffers. If NULL, intensity data is not acquired. (Note: For some sensor models counter data is not available, please consult the User Manual) + \return short : A \link MCHR_ERROR MCHR_ERROR \endlink code.

+ \brief Specific errors : + \arg \c MCHR_ERROR_TRIGGER_TYPE: the specified trigger mode does not exist + \arg \c MCHR_ERROR_START_RECEP_THREAD: an error occurred while attempting to start the acquisition thread + \arg \c ERROR_CHR_BUFFER_FULL: the reception buffers are full, the data is not read rapidly enough + \endif + \see MCHR_GetErrorDescription + \brief + \if FR + \brief Capteurs Compatibles : TOUS Sensors in Chromatic Confocal mode

+ \else + \par Compatibles Sensors : ALL Sensors in Chromatic Confocal mode + \endif +*/ + +DLL_CHR_API short MCHR_GetThicknessMeasurement (MCHR_ID SensorID, MCHR_tyAcqParam Parameters, PFLOAT *pArrayThickness, + PFLOAT *pArrayDistance1, PFLOAT *pArrayIntensity1, PFLOAT *pArrayBarycenter1, + PFLOAT *pArrayDistance2, PFLOAT *pArrayIntensity2, PFLOAT *pArrayBarycenter2, + PFLOAT *pArrayStatus, PFLOAT *pArrayCounter); +/* ------------------------------------------------------------------------- */ + +/*! + \fn short short MCHR_GetDataMeasurement (MCHR_ID SensorID, MCHR_tyAcqParam Parameters, + PFLOAT *pArrayData0, PFLOAT *pArrayData1, PFLOAT *pArrayData2, PFLOAT *pArrayData3, + PFLOAT *pArrayData4, PFLOAT *pArrayData5, PFLOAT *pArrayData6, + PFLOAT *pArrayData7) + \if FR + \brief Fonction d'acquisition d'une sequence de points dans le mode courant du CHR + \warning l'interpretation des donnees depend du mode de mesure en cours + \else + \brief Rapid Acquisition Function for the current operating mode (This function returns 8 buffers. + \warning The interpretation of the 8 data depends on the current mode + \endif + \details + \if FR + \param [in] MCHR_ID SensorID : ID du coffret. + \param [out] MCHR_tyAcqParam Parameters : Structure de param鑤res pour configurer l'acquisition + \param [out] PFLOAT *pArrayData0 : Tableau de pointeur(s) sur les buffers de donnees de la 1鑢e mesure (la signification depend du mode de mesure). Si le pointeur est NULL, la fonction n'acqui鑢e pas cette donnee. + \param [out] PFLOAT *pArrayData1 : + \param [out] PFLOAT *pArrayData2 : + \param [out] PFLOAT *pArrayData3 : + \param [out] PFLOAT *pArrayData4 : + \param [out] PFLOAT *pArrayData5 : + \param [out] PFLOAT *pArrayData6 : + \param [out] PFLOAT *pArrayData7 : + \return short : un code d'erreur MCHR_ERROR. + \else + \param [in] MCHR_ID SensorID : ID of the device. + \param [out] MCHR_tyAcqParam Parameters : data structure for setting the measurement parameters + \param [out] PFLOAT *pArrayData0 : Array of pointer on the data buffers for the measurement 1 ( the signification depend of measurement mode ). If is NULL, this data is ignored + \param [out] PFLOAT *pArrayData1 : Array of pointer on the data buffers for the measurement 2 ( the signification depend of measurement mode ). If is NULL, this data is ignored + \param [out] PFLOAT *pArrayData2 : Array of pointer on the data buffers for the measurement 3 ( the signification depend of measurement mode ). If is NULL, this data is ignored + \param [out] PFLOAT *pArrayData3 : Array of pointer on the data buffers for the measurement 4 ( the signification depend of measurement mode ). If is NULL, this data is ignored + \param [out] PFLOAT *pArrayData4 : Array of pointer on the data buffers for the measurement 5 ( the signification depend of measurement mode ). If is NULL, this data is ignored + \param [out] PFLOAT *pArrayData5 : Array of pointer on the data buffers for the measurement 6 ( the signification depend of measurement mode ). If is NULL, this data is ignored + \param [out] PFLOAT *pArrayData6 : Array of pointer on the data buffers for the measurement 7 ( the signification depend of measurement mode ). If is NULL, this data is ignored + \param [out] PFLOAT *pArrayData7 : Array of pointer on the data buffers for the measurement 8 ( the signification depend of measurement mode ). If is NULL, this data is ignored + \return short : A \link MCHR_ERROR MCHR_ERROR \endlink code. + \endif + \see MCHR_GetErrorDescription +*/ + +DLL_CHR_API short MCHR_GetDataMeasurement (MCHR_ID SensorID, MCHR_tyAcqParam Parameters, + PFLOAT *pArrayData0, PFLOAT *pArrayData1, PFLOAT *pArrayData2, PFLOAT *pArrayData3, + PFLOAT *pArrayData4, PFLOAT *pArrayData5, PFLOAT *pArrayData6, + PFLOAT *pArrayData7); + + +/*! + \fn short MCHR_InvertDistance (MCHR_ID SensorID, BOOL bInvert); + \if FR + \brief Fonction permettant le basculement Profondeur <> Altitude + \else + \brief Function fo tip up Deph <> Altitude + \endif + \details + \if FR + \param [in] MCHR_ID SensorID : ID du coffret. + \param [in] BOOL bInvert : No null for Altitude, null for Depth + \return short : un code d'erreur MCHR_ERROR. + \else + \param [in] MCHR_ID SensorID : ID of the device. + \param [in] BOOL bInvert : No null for Altitude, null for Depth + \return short : A \link MCHR_ERROR MCHR_ERROR \endlink code. + \endif + \see MCHR_GetErrorDescription + \par Compatibles Sensors : ALL +*/ +DLL_CHR_API short MCHR_InvertDistance (MCHR_ID SensorID, BOOL bInvert); + + +/*! + \fn short short MCHR_GetTransmittedDataMeasurement (MCHR_ID SensorID, MCHR_tyAcqParam Parameters, PFLOAT *pArrayData0, + PFLOAT *pArrayData1, PFLOAT *pArrayData2, PFLOAT *pArrayData3, PFLOAT *pArrayData4, + PFLOAT *pArrayData5, PFLOAT *pArrayData6, PFLOAT *pArrayData7, + PFLOAT *pArrayData8, PFLOAT *pArrayData9, PFLOAT *pArrayData10, + PFLOAT *pArrayData11, PFLOAT *pArrayData12, PFLOAT *pArrayData13, + PFLOAT *pArrayData14, PFLOAT *pArrayData15); + \if FR + \brief Fonction d'acquisition d'une sequence de points dans le mode courant du CCS + \warning l'interpretation des donnees depend du mode de mesure en cours + \else + \brief Rapid Acquisition Function for the current operating mode (This function returns 16 buffers). + \warning The interpretation of the 16 data depends on the current mode + \endif + \details + \if FR + \param [in] MCHR_ID SensorID : ID du coffret. + \param [out] MCHR_tyAcqParam Parameters : data structure for setting the measurement parameters + \param Merci de consulter la description de la fonction MCHR_SetTransmittedDigitalData() pour la definition des ojets des donnes de 0..15 pour chaque mode de mesure. + \return short : un code d'erreur MCHR_ERROR.

+ \arg \c MCHR_ERROR_TRIGGER_TYPE: Le mode de trigger specifie n'existe pas + \arg \c MCHR_ERROR_START_RECEP_THREAD: an error occurred while attempting to start the acquisition thread + \arg \c ERROR_CHR_BUFFER_FULL: the reception buffers are full, the data is not read rapidly enough + \else + \param [in] MCHR_ID SensorID : ID of the device. + \param [out] MCHR_tyAcqParam Parameters : data structure for setting the measurement parameters + \param Consult the description for the definition of data items 0..15 to be transmitted for each measuring mode by sensor : + \arg \c STIL DUO - STIL INITIAL - CCS PRIMA - CCS ULTIMA - CCS OPTIMA + \return short : A \link MCHR_ERROR MCHR_ERROR \endlink code.

+ \arg \c MCHR_ERROR_TRIGGER_TYPE: the specified trigger mode does not exist + \arg \c MCHR_ERROR_START_RECEP_THREAD: an error occurred while attempting to start the acquisition thread + \arg \c ERROR_CHR_BUFFER_FULL: the reception buffers are full, the data is not read rapidly enough + \endif + \see MCHR_GetErrorDescription + \brief + \if FR + \brief Capteurs Compatibles : All Sensors in Chromatic Confocal mode

+ \brief Voir : la fonction "OnAcqStop()" dans le module : + \else + \par Compatibles Sensors : All Sensors in Chromatic Confocal mode + \endif +*/ + +DLL_CHR_API short MCHR_GetTransmittedDataMeasurement (MCHR_ID SensorID, MCHR_tyAcqParam Parameters, PFLOAT *pArrayData0, + PFLOAT *pArrayData1, PFLOAT *pArrayData2, PFLOAT *pArrayData3, PFLOAT *pArrayData4, + PFLOAT *pArrayData5, PFLOAT *pArrayData6, PFLOAT *pArrayData7, + PFLOAT *pArrayData8, PFLOAT *pArrayData9, PFLOAT *pArrayData10, + PFLOAT *pArrayData11, PFLOAT *pArrayData12, PFLOAT *pArrayData13, + PFLOAT *pArrayData14, PFLOAT *pArrayData15); + + +/*! + \fn short MCHR_GetInterferometricThickness (MCHR_ID SensorID, MCHR_tyAcqParam Parameters, + PFLOAT *pArrayThickness1, PFLOAT *pArrayThickness2, PFLOAT *pArrayThickness3, + PFLOAT *pArrayQuality1, PFLOAT *pArrayQuality2, PFLOAT *pArrayQuality3, + PFLOAT *pArrayIntensity) + \if FR + \brief Fonction d'acquisition d'une sequence de points en mode interferometrique avec capteur CHR-150 + \else + \brief Acquisition function for the Interferometric mode (this function returns 7 buffers for a series of measured points: Thickness1, Thickness2, Thickness3, Quality1, Quality2, Quality3, Intensity)
+ \brief Before starting the acquisition, this function configures the sensor to the Distance measuring mode and directs the selected data (i.e. data for which the array pointer argument in the function call is not NULL ) to the digital output specified when opening the CHR. + \endif + \details + \if FR + \param [in] MCHR_ID SensorID : ID du coffret. + \param [] MCHR_tyAcqParam Parameters : + \param [out] PFLOAT *pArrayThickness1 : Epaisseur 1 + \param [out] PFLOAT *pArrayThickness2 : Epaisseur 2 + \param [out] PFLOAT *pArrayThickness3 : Epaisseur 3 + \param [out] PFLOAT *pArrayQuality1 : Qualite 1 + \param [out] PFLOAT *pArrayQuality2 : Qualite 2 + \param [out] PFLOAT *pArrayQuality3 : Qualite 3 + \param [out] PFLOAT *pArrayIntensity : Intensite + \return short : un code d'erreur MCHR_ERROR. + \else + \param [in] MCHR_ID SensorID : ID of the device. + \param [out] MCHR_tyAcqParam Parameters : data structure for setting the measurement parameters + \param [out] PFLOAT *pArrayThickness1 : a pointer to distance data buffer. If NULL, distance data is not acquired. (distance is in "Thickness" mode, in other words). + \param [out] PFLOAT *pArrayThickness2 : a pointer to distance data buffer. If NULL, distance data is not acquired. (distance is in "Thickness" mode, in other words). + \param [out] PFLOAT *pArrayThickness3 : a pointer to distance data buffer. If NULL, distance data is not acquired. (distance is in "Thickness" mode, in other words). + \param [out] PFLOAT *pArrayQuality1 : a pointer to quality data buffer. If NULL, quality data is not acquired. + \param [out] PFLOAT *pArrayQuality2 : a pointer to quality data buffer. If NULL, quality data is not acquired. + \param [out] PFLOAT *pArrayQuality3 : a pointer to quality data buffer. If NULL, quality data is not acquired. + \param [out] PFLOAT *pArrayIntensity : an array of pointers to intensity data buffers. If NULL, intensity data is not acquired. + \return short : A \link MCHR_ERROR MCHR_ERROR \endlink code.

+ \brief Specific errors : + \arg \c MCHR_ERROR_TRIGGER_TYPE: the specified trigger mode does not exist + \arg \c MCHR_ERROR_START_RECEP_THREAD: an error occurred while attempting to start the acquisition thread + \arg \c ERROR_CHR_BUFFER_FULL: the reception buffers are full, the data is not read rapidly enough + \endif + \see MCHR_GetErrorDescription + \brief + \if FR + \brief Capteurs Compatibles : CHR 150, CHR-150PC, CHR-150L avec l'option Interferometric.

+ \brief Voir : la fonction "OnAcqStop()" dans le module : + \else + \par Compatibles Sensors : CHR 150, CHR-150PC, CHR-150L with Interferometric option + \endif + +*/ + +DLL_CHR_API short MCHR_GetInterferometricThickness (MCHR_ID SensorID, MCHR_tyAcqParam Parameters, + PFLOAT *pArrayThickness1, PFLOAT *pArrayThickness2, PFLOAT *pArrayThickness3, + PFLOAT *pArrayQuality1, PFLOAT *pArrayQuality2, PFLOAT *pArrayQuality3, + PFLOAT *pArrayIntensity); + +/* ------------------------------------------------------------------------- */ + +/*! + \fn short MCHR_SetEncoderBuffer (MCHR_ID SensorID, PDWORD *pArrayEncoder1, PDWORD *pArrayEncoder2, PDWORD *pArrayEncoder3) + \if FR + \brief Fonction d'initialisation des buffers d'acquisition des codeurs + \else + \brief Initialization function for the buffers of encoder acquisition + \endif + \details + \if FR + \param [in] MCHR_ID SensorID : ID du coffret. + \param [] PDWORD *pArrayEncoder1 : + \param [] PDWORD *pArrayEncoder2 : + \param [] PDWORD *pArrayEncoder3 : + \return short : un code d'erreur MCHR_ERROR. + \else + \param [in] MCHR_ID SensorID : ID of the device. + \param [in] PDWORD *pArrayEncoder1 : Arrays of encoder 1 + \param [in] PDWORD *pArrayEncoder2 : Arrays of encoder 2 + \param [in] PDWORD *pArrayEncoder3 : Arrays of encoder 3 + \return short : A \link MCHR_ERROR MCHR_ERROR \endlink code. + \endif + \see MCHR_GetErrorDescription + \brief + \if FR \par Compatibles Sensors : CCS PRIMA, CCS OPTIMA, CCS ULTIMA + \else + \par Compatibles Sensors : CCS PRIMA, CCS OPTIMA, CCS ULTIMA + \endif +*/ +DLL_CHR_API short MCHR_SetEncoderBuffer (MCHR_ID SensorID, PDWORD *pArrayEncoder1, PDWORD *pArrayEncoder2, PDWORD *pArrayEncoder3); + +/*! + \fn short MCHR_SetAutoAdaptiveBuffer (MCHR_ID SensorID, PFLOAT *pArrayAutoAdaptive) + \if FR + \brief Fonction d'initialisation du buffer de la frequence en mode autoadaptatif ou du niveau Led en mode AutoLed + \else + \brief Initialization function for the frequency buffers in autoadaptative mode or for Led level in Autoled mode + \endif + \details + \if FR + \param [in] MCHR_ID SensorID : ID du coffret. + \param [] PFLOAT *pArrayAutoAdaptive : + \return short : un code d'erreur MCHR_ERROR. + \else + \param [in] MCHR_ID SensorID : ID of the device. + \param [in] PFLOAT *pArrayAutoAdaptive : address of buffer for collecting the auto-adaptive mode data + \return short : A \link MCHR_ERROR MCHR_ERROR \endlink code. + \endif + \see MCHR_GetErrorDescription + \brief + \if FR \par Compatibles Sensors : CCS PRIMA, CCS OPTIMA, STIL-INITIAL + \else + \par Compatibles Sensors : CCS PRIMA, CCS OPTIMA, STIL-INITIAL + \endif +*/ + +DLL_CHR_API short MCHR_SetAutoAdaptiveBuffer (MCHR_ID SensorID, PFLOAT *pArrayAutoAdaptive); + +/*! + \fn short MCHR_StartAcquisition (MCHR_ID SensorID); + \if FR + \brief Fonction de lancement manuel de l'acquisition en attente de trigger + \else + \brief Function Wait for trigger, then start acquisition + \endif + \details + \if FR + \param [in] MCHR_ID SensorID : ID du coffret. + \return short : un code d'erreur MCHR_ERROR. + \else + \param [in] MCHR_ID SensorID : ID of the device. + \return short : A \link MCHR_ERROR MCHR_ERROR \endlink code. + \endif + \see MCHR_GetErrorDescription + \brief + \if FR \par Compatibles Sensors : ALL + \else + \par Compatibles Sensors : ALL + \endif +*/ + +DLL_CHR_API short MCHR_StartAcquisition (MCHR_ID SensorID); +/* ------------------------------------------------------------------------- */ + +/*! + \fn short MCHR_GetMeasureDuration (MCHR_ID SensorID, double *Duration); + \if FR + \brief Fonction donnant la duree d'une serie de mesure + \else + \brief Function Get the duration of a sequence of measurements + \endif + \details + \if FR + \param [in] MCHR_ID SensorID : ID du coffret. + \param [out] double *Duration : Duree d'une sequence de mesure + \return short : un code d'erreur MCHR_ERROR. + \else + \param [in] MCHR_ID SensorID : ID of the device. + \param [out] double *Duration : duration of a sequence of measurements + \return short : A \link MCHR_ERROR MCHR_ERROR \endlink code. + \endif + \see MCHR_GetErrorDescription + \brief + \if FR + \brief Capteurs Compatibles : TOUS.

+ \else + \par Compatibles Sensors : ALL + \endif +*/ + +DLL_CHR_API short MCHR_GetMeasureDuration (MCHR_ID SensorID, double *Duration); +/* ------------------------------------------------------------- */ + +/*! + \fn short MCHR_GetLastWrittenBuffer (MCHR_ID SensorID, enAcqEventType EventType, long *IndexBuffer, long *IndexPoint) + \if FR + \brief Fonction retournant l'indice du dernier buffer ecrit pendant l'acquisition de points + \else + \brief Function Get the index of the last buffer written to during the acquisition which is currently in progress + \endif + \details + \if FR + \param [in] MCHR_ID SensorID : ID du coffret. + \param [] enAcqEventType EventType : + \param [] long *IndexBuffer : Numero du buffer =-1 si pas d'acquisition en cours + \param [] long *IndexPoint : Numero du point de mesure dans le buffer en cours = -1 si pas d'acquisition en cours + \return short : un code d'erreur MCHR_ERROR. + \else + \param [in] MCHR_ID SensorID : ID of the device. + \param [out] enAcqEventType EventType : Acquisition Event Type + \param [out] long *IndexBuffer : Buffer number, if it is egal at -1 = no current acquisition. + \param [out] long *IndexPoint : point number, if it is egal at -1 = no current acquisition. + \return short : A \link MCHR_ERROR MCHR_ERROR \endlink code. + \endif + \see MCHR_GetErrorDescription + \brief + \if FR + \brief Capteurs Compatibles : TOUS.

+ \else + \par Compatibles Sensors : ALL + \endif +*/ + +DLL_CHR_API short MCHR_GetLastWrittenBuffer (MCHR_ID SensorID, enAcqEventType EventType, long *IndexBuffer, long *IndexPoint); +/* ------------------------------------------------------------------------- */ + +/*! + \fn short MCHR_GetLastWrittenPoint (MCHR_ID SensorID, long *Index) + \if FR + \brief Fonction retournant l'indice du dernier point de mesure ecrit dans le buffer courant pendant l'acquisition de points + \else + \brief Function Get the index of the last point written to the current buffer during the acquisition which is currently in progress + \endif + \details + \if FR + \param [in] MCHR_ID SensorID : ID du coffret. + \param [out] long *Index : + \return short : un code d'erreur MCHR_ERROR. + \else + \param [in] MCHR_ID SensorID : ID of the device. + \param [out] long *Index : point number, if it is egal at -1 = no current acquisition. + \return short : A \link MCHR_ERROR MCHR_ERROR \endlink code. + \endif + \see MCHR_GetErrorDescription + \brief + \if FR + \brief Capteurs Compatibles : TOUS.

+ \else + \par Compatibles Sensors : ALL + \endif +*/ + +DLL_CHR_API short MCHR_GetLastWrittenPoint (MCHR_ID SensorID, long *Index); +/* ------------------------------------------------------------------------- */ + +/*! + \fn short MCHR_GetLevelEdgeFlag (MCHR_ID SensorID, enLevelEdgeFlag *Value) + \if FR + \brief Fonction permettant de lire le niveau du signal ou le sens du front + \else + \brief Function Get active edge (or active state) for trigger (CCS only) + \endif + \details + \if FR + \param [in] MCHR_ID SensorID : ID du coffret. + \param [out] enLevelEdgeFlag *Value : valeur du bord actif + \return short : un code d'erreur MCHR_ERROR. + \else + \param [in] MCHR_ID SensorID : ID of the device. + \param [out] enLevelEdgeFlag *Value : value of the active edge + \return short : A \link MCHR_ERROR MCHR_ERROR \endlink code. + \endif + \brief + \see MCHR_GetErrorDescription + \brief + \if FR + \brief Capteurs Compatibles : TOUS.

+ \else + \par Compatibles Sensors : CCS PRIMA, CCS OPTIMA, CCS ULTIMA + \endif +*/ + +DLL_CHR_API short MCHR_GetLevelEdgeFlag (MCHR_ID SensorID, enLevelEdgeFlag *Value); +/* ------------------------------------------------------------------------- */ + +/*! + \fn short MCHR_SetLevelEdgeFlag (MCHR_ID SensorID, enLevelEdgeFlag Value) + \if FR + \brief Fonction permettant de fixer le niveau du signal ou le sens du front + \else + \brief Function Select active edge (or active state) for trigger signals (CCS only) + \endif + \details + \if FR + \param [in] MCHR_ID SensorID : ID du coffret. + \param [in] enLevelEdgeFlag Value : + \return short : un code d'erreur MCHR_ERROR. + \else + \param [in] MCHR_ID SensorID : ID of the device. + \param [in] enLevelEdgeFlag Value : value of the active edge + \return short : A \link MCHR_ERROR MCHR_ERROR \endlink code. + \endif + \see MCHR_GetErrorDescription + \brief + \if FR \par Compatibles Sensors : CCS PRIMA, CCS OPTIMA, CCS ULTIMA + \else + \par Compatibles Sensors : CCS PRIMA, CCS OPTIMA, CCS ULTIMA + \endif +*/ + +DLL_CHR_API short MCHR_SetLevelEdgeFlag (MCHR_ID SensorID, enLevelEdgeFlag Value); +/* ------------------------------------------------------------------------- */ + + +/************************************************************************** + ** Basic Setting ** + **************************************************************************/ + +/*! + \fn short MCHR_SendConfig (MCHR_ID SensorID, LPCSTR ConfigFile) + \if FR + \brief Fonction de parametrage du syst鑝e CHR + \else + \brief Function Send a configuration from a file to the CHR + \endif + \details + \if FR + \param [in] MCHR_ID SensorID : ID du coffret. + \param [in] LPCSTR ConfigFile : Nom du fichier comprenant les configuration par default du capteur. Si NULL, la configuration actuelle est pris en compte + \return short : un code d'erreur MCHR_ERROR. + \else + \param [in] MCHR_ID SensorID : ID of the device. + \param [in] LPCSTR ConfigFile : The name of a file comprising the default cTonfiguration for the sensor. If null, the current sensor configuration is read. + \return short : A \link MCHR_ERROR MCHR_ERROR \endlink code. + \endif + \see MCHR_GetErrorDescription + \brief + \if FR + \brief Capteurs Compatibles : TOUS.

+ \else + \par Compatibles Sensors : ALL + \endif +*/ + +DLL_CHR_API short MCHR_SendConfig (MCHR_ID SensorID, LPCSTR ConfigFile); +/* ------------------------------------------------------------------------- */ + +/*! + \fn short MCHR_ReceiveConfig (MCHR_ID SensorID, LPCSTR ConfigFile) + \if FR + \brief Fonction de lecture des parametres du CHR + \else + \brief Function Get the configuration from the CHR to a file + \endif + \details + \if FR + \param [in] MCHR_ID SensorID : ID du coffret. + \param [out] LPCSTR ConfigFile : + \return short : un code d'erreur MCHR_ERROR.

+ \brief En plus des erreurs g閚閞ales, les erreurs sp閏ifiques sont : + \arg \c MCHR_ERROR_RECEIVE_CONFIG_CHR: Erreur de reception de la configuration du capteur. + \arg \c MCHR_ERROR_WRITE_CONFIG_FILE: Erreur pendant l'essai d'閏riture de la configuration dans le fichier sp閏ifi? + \else + \param [in] MCHR_ID SensorID : ID of the device. + \param [out] LPCSTR ConfigFile : The name of a file comprising the default cTonfiguration for the sensor. If null, the current sensor configuration is read. + \return short : A \link MCHR_ERROR MCHR_ERROR \endlink code.

+ \brief In addition to general errors, specific errors are: + \arg \c MCHR_ERROR_RECEIVE_CONFIG_CHR: error getting the sensor configuration + \arg \c MCHR_ERROR_WRITE_CONFIG_FILE: error while trying to write the configuration to the specified file + \endif + \see MCHR_GetErrorDescription + \brief + \if FR + \brief Capteurs Compatibles : TOUS.

+ \else + \par Compatibles Sensors : ALL + \endif +*/ + +DLL_CHR_API short MCHR_ReceiveConfig (MCHR_ID SensorID, LPCSTR ConfigFile); +/* ------------------------------------------------------------------------- */ + +/*! + \fn short MCHR_SaveCurrentConfiguration(MCHR_ID SensorID) + \if FR + \brief Fonction permettant de sauvegarder la configuration du capteur specifie dans l'EEPROM + \else + \brief Function Save the configuration of the specified CHR to the EEPROM + \endif + \details + \if FR + \param [in] MCHR_ID SensorID : ID du coffret. + \return short : un code d'erreur MCHR_ERROR. + \else + \param [in] MCHR_ID SensorID : ID of the device. + \return short : A \link MCHR_ERROR MCHR_ERROR \endlink code. + \endif + \see MCHR_GetErrorDescription + \brief + \if FR + \brief Capteurs Compatibles : TOUS.

+ \else + \par Compatibles Sensors : ALL + \endif +*/ + +DLL_CHR_API short MCHR_SaveCurrentConfiguration(MCHR_ID SensorID); +/* ------------------------------------------------------------------------- */ + +/*! + \fn short MCHR_GetScanRate (MCHR_ID SensorID, WORD *pScanRate) + \if FR + \brief Fonction de lecture de la cadence du CHR + \else + \brief Function Get current acquisition pre-defined rate id + \endif + \details + \if FR + \param [in] MCHR_ID SensorID : ID du coffret. + \param [out] WORD *pScanRate : frequence d'acquisition du capteur + \return short : un code d'erreur MCHR_ERROR. + \else + \param [in] MCHR_ID SensorID : ID of the device. + \param [out] WORD *pScanRate : current acquisition pre-defined rate id + \return short : A \link MCHR_ERROR MCHR_ERROR \endlink code. + \endif + \see MCHR_GetErrorDescription + \brief + \if FR + \brief Capteurs Compatibles : TOUS.

+ \else + \par Compatibles Sensors : ALL + \endif +*/ + + +DLL_CHR_API short MCHR_GetScanRate (MCHR_ID SensorID, WORD *pScanRate); +/* ------------------------------------------------------------------------- */ + +/*! + \fn short MCHR_SetScanRate (MCHR_ID SensorID, WORD ScanRate) + \if FR + \brief Fonction de parametrage de la cadence du CHR + \else + \brief Function Set CHR Acquisition rate + \endif + \details + \if FR + \param [in] MCHR_ID SensorID : ID du coffret. + \param [in] WORD ScanRate : Cadence du CHR + \return short : un code d'erreur MCHR_ERROR.

+ \brief Erreur specifique : + \arg \c MCHR_ERROR_SCANRATE_TOO_HIGH: la vitesse est trop elevee pour transmettre toutes les d閠ails des donn閑s actuelement configur閟 + \else + \param [in] MCHR_ID SensorID : ID of the device. + \param [in] WORD ScanRate : CHR Acquisition rate + \return short : A \link MCHR_ERROR MCHR_ERROR \endlink code.

+ \brief Specific error : + \arg \c MCHR_ERROR_SCANRATE_TOO_HIGH: the rate is too high for transmitting all data items currently configured + \endif + \see MCHR_GetErrorDescription + \brief + \if FR \par Compatibles Sensors : ALL + \else + \par Compatibles Sensors : ALL + \endif +*/ + +DLL_CHR_API short MCHR_SetScanRate (MCHR_ID SensorID, WORD ScanRate); +/* ------------------------------------------------------------------------- */ + +/*! + \fn short MCHR_GetAveraging (MCHR_ID SensorID, PWORD pAveragingValue) + \if FR + \brief Fonction de lecture du taux de moyennage du CHR + \else + \brief Function Get current averaging mode + \endif + \details + \if FR + \param [in] MCHR_ID SensorID : ID du coffret. + \param [out] PWORD pAveragingValue : + \return short : un code d'erreur MCHR_ERROR. + \else + \param [in] MCHR_ID SensorID : ID of the device. + \param [out] PWORD pAveragingValue : a pointer to the averaging factor. + \return short : A \link MCHR_ERROR MCHR_ERROR \endlink code. + \endif + \see MCHR_GetErrorDescription + \brief + \if FR + \brief Capteurs Compatibles : TOUS.

+ \else + \par Compatibles Sensors : ALL + \endif +*/ + +DLL_CHR_API short MCHR_GetAveraging (MCHR_ID SensorID, PWORD pAveragingValue); +/* ------------------------------------------------------------------------- */ + +/*! + \fn short MCHR_SetAveraging (MCHR_ID SensorID, WORD AveragingValue) + \if FR + \brief Fonction de parametrage du taux de moyennage du CHR + \else + \brief Function Set averaging factor (ratio of acquisition rate to output rate) + \endif + \details + \if FR + \param [in] MCHR_ID SensorID : ID du coffret. + \param [in] WORD AveragingValue : Taux de moyennage du CHR + \return short : un code d'erreur MCHR_ERROR. + \else + \param [in] MCHR_ID SensorID : ID of the device. + \param [in] WORD AveragingValue : Ratio of averaging acquisition rate + \return short : A \link MCHR_ERROR MCHR_ERROR \endlink code. + \endif + \see MCHR_GetErrorDescription + \brief + \if FR \par Compatibles Sensors : ALL + \else + \par Compatibles Sensors : ALL + \endif +*/ + +DLL_CHR_API short MCHR_SetAveraging (MCHR_ID SensorID, WORD AveragingValue); +/* ------------------------------------------------------------------------- */ + +/*! + \fn short MCHR_GetOpticalPen (MCHR_ID SensorID, PWORD pOpticalPen, PWORD pFullScale) + \if FR + \brief Fonction de lecture du crayon optique selectionne dans le CHR + \warning Voir la fonction MCHR_GetOpticalPenEx pour utiliser le parametre pFullScale dans un format DWORD (?partir de la DLL_CHR V3.2.0.00)! + \else + \brief Function Get current optical pen (= index of current calibration table) + \warning See MCHR_GetOpticalPenEx Function to use pFullScale parameter on DWORD Format (from DLL_CHR V3.2.0.00)! + \endif + \details + \if FR + \param [in] MCHR_ID SensorID : ID du coffret. + \param [] PWORD pOpticalPen : + \param [] PWORD pFullScale : + \return short : un code d'erreur MCHR_ERROR. + \else + \param [in] MCHR_ID SensorID : ID of the device. + \param [out] PWORD pOpticalPen : a pointer to the identifier of the calibration table selected. + \param [out] PWORD pFullScale : a pointer to the measuring range (value given in microns) a pen number of MCHR_NO_PEN (999) or a measuring range of 65535 indicate the no pen is currently selected. + \return short : A A \link MCHR_ERROR MCHR_ERROR \endlink code. + \endif + \brief + \see MCHR_GetErrorDescription + \brief + \if FR + \brief Capteurs Compatibles : TOUS.

+ \else + \par Compatibles Sensors : ALL except STIL-INITIAL + \endif + +*/ + +DLL_CHR_API short MCHR_GetOpticalPen (MCHR_ID SensorID, PWORD pOpticalPen, PWORD pFullScale); +/* ------------------------------------------------------------------------- */ + +/*! + \fn short MCHR_GetOpticalPenEx (MCHR_ID SensorID, PWORD pOpticalPen, PDWORD pFullScale) + \if FR + \brief Fonction de lecture du crayon optique selectionne dans le CHR + \warning Remplace la fonction MCHR_GetOpticalPen. + \else + \brief Function Get current optical pen (= index of current calibration table) + \warning Replace the MCHR_GetOpticalPen Function. + \endif + \details + \if FR + \param [in] MCHR_ID SensorID : ID du coffret. + \param [] PWORD pOpticalPen : + \param [] PDWORD pFullScale : + \return short : un code d'erreur MCHR_ERROR. + \else + \param [in] MCHR_ID SensorID : ID of the device. + \param [out] PWORD pOpticalPen : a pointer to the identifier of the calibration table selected. + \param [out] PDWORD pFullScale : a pointer to the measuring range (value given in microns) a pen number of MCHR_NO_PEN (999) or a measuring range of 65535 indicate the no pen is currently selected. + \return short : A A \link MCHR_ERROR MCHR_ERROR \endlink code. + \endif + \brief + \see MCHR_GetErrorDescription + \brief + \if FR + \brief Capteurs Compatibles : TOUS.

+ \else + \par Compatibles Sensors : ALL except STIL-INITIAL + \endif + +*/ + +DLL_CHR_API short MCHR_GetOpticalPenEx (MCHR_ID SensorID, PWORD pOpticalPen, PDWORD pFullScale); +/* ------------------------------------------------------------------------- */ + +/*! + \fn short MCHR_SetOpticalPen (MCHR_ID SensorID, WORD OpticalPen, PWORD pFullScale) + \if FR + \brief Fonction de parametrage du crayon optique du CHR + \warning Voir la fonction MCHR_SetOpticalPenEx pour utiliser le parametre pFullScale dans un format DWORD (?partir de la DLL_CHR V3.2.0.00)! + \else + \brief Function Set the optical pen selection (this function selects one of the existing calibration tables in the CHR) + \warning See MCHR_SetOpticalPennEx Function to use pFullScale parameter on DWORD Format (from DLL_CHR V3.2.0.00)! + \endif + \details + \if FR + \param [in] MCHR_ID SensorID : ID du coffret. + \param [in] WORD OpticalPen : + \param [in] PWORD pFullScale : + \return short : un code d'erreur MCHR_ERROR. + \else + \param [in] MCHR_ID SensorID : ID of the device. + \param [] WORD OpticalPen : a pointer to the identifier of the calibration table selected + \param [] PWORD pFullScale : a pointer to the measuring range (value given in microns) a pen number of MCHR_NO_PEN (999) or a measuring range of 65535 indicate the no pen is currently selected. + \return short : A \link MCHR_ERROR MCHR_ERROR \endlink code. + \endif + \see MCHR_GetErrorDescription + \brief + \if FR \par Compatibles Sensors : ALL + \else + \par Compatibles Sensors : ALL except STIL-INITIAL + \endif +*/ + +DLL_CHR_API short MCHR_SetOpticalPen (MCHR_ID SensorID, WORD OpticalPen, PWORD pFullScale); +/* ------------------------------------------------------------------------- */ + + +/*! + \fn short MCHR_SetOpticalPenEx (MCHR_ID SensorID, WORD OpticalPen, PDWORD pFullScale) + \if FR + \brief Fonction de parametrage du crayon optique du CHR + \warning Remplace la fonction MCHR_SetOpticalPen. + \else + \brief Function Set the optical pen selection (this function selects one of the existing calibration tables in the CHR) + \warning Replace the MCHR_SetOpticalPen Function. + \endif + \details + \if FR + \param [in] MCHR_ID SensorID : ID du coffret. + \param [in] WORD OpticalPen : + \param [in] PDWORD pFullScale : + \return short : un code d'erreur MCHR_ERROR. + \else + \param [in] MCHR_ID SensorID : ID of the device. + \param [] WORD OpticalPen : a pointer to the identifier of the calibration table selected + \param [] PDWORD pFullScale : a pointer to the measuring range (value given in microns) a pen number of MCHR_NO_PEN (999) or a measuring range of 65535 indicate the no pen is currently selected. + \return short : A \link MCHR_ERROR MCHR_ERROR \endlink code. + \endif + \see MCHR_GetErrorDescription + \brief + \if FR \par Compatibles Sensors : ALL + \else + \par Compatibles Sensors : ALL except STIL-INITIAL + \endif +*/ + +DLL_CHR_API short MCHR_SetOpticalPenEx (MCHR_ID SensorID, WORD OpticalPen, PDWORD pFullScale); +/* ------------------------------------------------------------------------- */ + +/*! + \fn short MCHR_GetMeasureMode (MCHR_ID SensorID, enMeasureMode *Mode) + \if FR + \brief Fonction de lecture du mode de mesure en cours d'utilisation (Distance ou Epaisseur) + \else + \brief Function Get current measurement mode (Distance or Thickness). + \endif + \details + \if FR + \param [in] MCHR_ID SensorID : ID du coffret. + \param [] enMeasureMode *Mode : mode de mesure en cours d'utilisation + \return short : un code d'erreur MCHR_ERROR. + \else + \param [in] MCHR_ID SensorID : ID of the device. + \param [out] enMeasureMode *Mode : current measurement mode + \return short : A A \link MCHR_ERROR MCHR_ERROR \endlink code. + \endif + \see MCHR_GetErrorDescription + \brief + \if FR + \brief Capteurs Compatibles : TOUS.

+ \else + \par Compatibles Sensors : ALL + \endif +*/ + +DLL_CHR_API short MCHR_GetMeasureMode (MCHR_ID SensorID, enMeasureMode *Mode); +/* ------------------------------------------------------------------------- */ + +/*! + \fn short MCHR_SetMeasureMode (MCHR_ID SensorID, enMeasureMode Mode) + \if FR + \brief Fonction de configuration du mode de mesure + \else + \brief Function Set measurement mode (distance/thickness) + \endif + \details + \if FR + \param [in] MCHR_ID SensorID : ID du coffret. + \param [in] enMeasureMode Mode : Mode de mesure selectionne + \return short : un code d'erreur MCHR_ERROR. + \else + \param [in] MCHR_ID SensorID : ID of the device. + \param [in] enMeasureMode Mode : Current measurement mode + \return short : A \link MCHR_ERROR MCHR_ERROR \endlink code. + \endif + \see MCHR_GetErrorDescription + \brief + \if FR \par Compatibles Sensors : ALL + \else + \par Compatibles Sensors : ALL + \endif +*/ + +DLL_CHR_API short MCHR_SetMeasureMode (MCHR_ID SensorID, enMeasureMode Mode); +/* ------------------------------------------------------------------------- */ + +/*! + \fn short MCHR_GetRefractiveIndex (MCHR_ID SensorID, float *RefractiveIndexValue) + \if FR + \brief Fonction de lecture de l'indice de refraction + \else + \brief Function Get the refractive index + \endif + \details + \if FR + \param [in] MCHR_ID SensorID : ID du coffret. + \param [] float *RefractiveIndexValue : Indice de Refraction utilise + \return short : un code d'erreur MCHR_ERROR. + \else + \param [in] MCHR_ID SensorID : ID of the device. + \param [out] float *RefractiveIndexValue : Current Refractive Index + \return short : A \link MCHR_ERROR MCHR_ERROR \endlink code. + \endif + \see MCHR_GetErrorDescription + \brief + \if FR + \brief Capteurs Compatibles : TOUS.

+ \else + \par Compatibles Sensors : ALL + \endif +*/ + +DLL_CHR_API short MCHR_GetRefractiveIndex (MCHR_ID SensorID, float *RefractiveIndexValue); +/* ------------------------------------------------------------------------- */ + +/*! + \fn short MCHR_SetRefractiveIndex (MCHR_ID SensorID, float RefractiveIndexValue) + \if FR + \brief Fonction de parametrage de l'indice de refraction + \else + \brief Function Set the refractive index + \endif + \details + \if FR + \param [in] MCHR_ID SensorID : ID du coffret. + \param [in] float RefractiveIndexValue : Indice de refraction selectionne + \return short : un code d'erreur MCHR_ERROR. + \else + \param [in] MCHR_ID SensorID : ID of the device. + \param [in] float RefractiveIndexValue : Selected Refractive Index + \return short : A \link MCHR_ERROR MCHR_ERROR \endlink code. + \endif + \see MCHR_GetErrorDescription + \brief + \if FR \par Compatibles Sensors : ALL except STIL-DUO in SAWLI mode + \else + \par Compatibles Sensors : ALL except STIL-DUO in SAWLI mode + \endif +*/ + +DLL_CHR_API short MCHR_SetRefractiveIndex (MCHR_ID SensorID, float RefractiveIndexValue); +/* ------------------------------------------------------------------------- */ + +/*! + \fn short MCHR_GetDetectionThreshold (MCHR_ID SensorID, float *ThresholdValue) + \if FR + \brief Fonction de lecture du seuil de detection + \else + \brief Function Get the peak detection threshold + \endif + \details + \if FR + \param [in] MCHR_ID SensorID : ID du coffret. + \param [] float *ThresholdValue : Seuil de detection utilise + \return short : un code d'erreur MCHR_ERROR. + \else + \param [in] MCHR_ID SensorID : ID of the device. + \param [out] FLOAT *ThresholdValue : Current Threshold value + \return short : A \link MCHR_ERROR MCHR_ERROR \endlink code. + \endif + \see MCHR_GetErrorDescription + \brief + \if FR + \brief Capteurs Compatibles : TOUS.

+ \else + \par Compatibles Sensors : ALL + \endif +*/ + +DLL_CHR_API short MCHR_GetDetectionThreshold (MCHR_ID SensorID, float *ThresholdValue); +/* ------------------------------------------------------------------------- */ + +/*! + \fn short MCHR_SetDetectionThreshold (MCHR_ID SensorID, float ThresholdValue) + \if FR + \brief Fonction de parametrage du seuil de detection + \else + \brief Function Set the peak detection threshold + \endif + \details + \if FR + \param [in] MCHR_ID SensorID : ID du coffret. + \param [in] float ThresholdValue : Seuil de detection selectionne + \return short : un code d'erreur MCHR_ERROR. + \else + \param [in] MCHR_ID SensorID : ID of the device. + \param [in] float ThresholdValue : Selected Threshold value + \return short : A \link MCHR_ERROR MCHR_ERROR \endlink code. + \endif + \see MCHR_GetErrorDescription + \brief + \if FR \par Compatibles Sensors : ALL + \else + \par Compatibles Sensors : ALL + \endif +*/ + +DLL_CHR_API short MCHR_SetDetectionThreshold (MCHR_ID SensorID, float ThresholdValue); +/* ------------------------------------------------------------------------- */ + +/*! + \fn short MCHR_GetMinDarkFrequency (MCHR_ID SensorID, WORD *pScanRate) + \if FR + \brief Fonction de lecture de la cadence du CHR + \else + \brief Function Get current acquisition pre-defined rate id + \endif + \details + \if FR + \param [in] MCHR_ID SensorID : ID du coffret. + \param [] WORD *pScanRate : + \return short : un code d'erreur MCHR_ERROR. + \else + \param [in] MCHR_ID SensorID : ID of the device. + \param [out] WORD *pScanRate : the min authorized rate, in Hz + \return short : A \link MCHR_ERROR MCHR_ERROR \endlink code. + \endif + \see MCHR_GetErrorDescription + \brief + \if FR + \brief Capteurs Compatibles : CCS PRIMA, CCS OPTIMA, CCS ULTIMA, STIL-DUO, STIL-INITIAL

+ \else + \par Compatibles Sensors : CCS PRIMA, CCS OPTIMA, CCS ULTIMA, STIL-DUO, STIL-INITIAL + \endif +*/ + +DLL_CHR_API short MCHR_GetMinDarkFrequency (MCHR_ID SensorID, WORD *pScanRate); +/* ------------------------------------------------------------------------- */ + + +/************************************************************************** + ** Advanced Setting ** + **************************************************************************/ + +/*! + \fn short MCHR_GetLed (MCHR_ID SensorID, PWORD pValue) + \if FR + \brief Fonction permettant de lire la valeur de l'intensite de la LED + \else + \brief Function Get LED intensity value + \endif + \details + \if FR + \param [in] MCHR_ID SensorID : ID du coffret. + \param [out] PWORD pValue : Valeur de l'intensite de la LED + \return short : un code d'erreur MCHR_ERROR. + \else + \param [in] MCHR_ID SensorID : ID of the device. + \param [out] PWORD pValue : Current LED intensity value + \return short : A \link MCHR_ERROR MCHR_ERROR \endlink code. + \endif + \see MCHR_GetErrorDescription + \brief + \if FR + \brief Capteurs Compatibles : CCS PRIMA, CCS OPTIMA, STIL-INITIAL, STIL-DUO in Chromatic Confocal mode.

+ \brief Voir : la fonction "OnAcqStop()" dans le module : + \else + \par Compatibles Sensors : CCS PRIMA, CCS OPTIMA, STIL-INITIAL, STIL-DUO in Chromatic Confocal mode + \endif +*/ + +DLL_CHR_API short MCHR_GetLed (MCHR_ID SensorID, PWORD pValue); +/* ------------------------------------------------------------------------- */ + +/*! + \fn short MCHR_SetLed (MCHR_ID SensorID, WORD Value) + \if FR + \brief Fonction permettant de fixer la valeur de l'intensite de la LED + \else + \brief Function Set LED intensity value + \endif + \details + \if FR + \param [in] MCHR_ID SensorID : ID du coffret. + \param [in] WORD Value : Valeur de l'intensite de la LED selectionnee + \return short : un code d'erreur MCHR_ERROR. + \else + \param [in] MCHR_ID SensorID : ID of the device. + \param [in] WORD Value : Selected LED intensity value + \return short : A \link MCHR_ERROR MCHR_ERROR \endlink code. + \endif + \see MCHR_GetErrorDescription + \brief + \if FR \par Compatibles Sensors : CCS PRIMA, CCS OPTIMA, STIL-INITIAL, STIL-DUO in Chromatic Confocal mode + \else + \par Compatibles Sensors : CCS PRIMA, CCS OPTIMA, STIL-INITIAL, STIL-DUO in Chromatic Confocal mode + \endif +*/ + +DLL_CHR_API short MCHR_SetLed (MCHR_ID SensorID, WORD Value); +/* ------------------------------------------------------------------------- */ + +/* + Fonction permettant de lire le mode de selection du pic (MCHR_HIGH_PEAK, MCHR_FIRST_PEAK, MCHR_LAST_PEAK + Get current peak selection mode (CCS only) +*/ + +/*! + \fn short MCHR_GetPeakSelectionMode (MCHR_ID SensorID, enPeakSelectionMode *pPeakMode) + \if FR + \brief Fonction permettant de lire le mode de selection du pic (CCS uniquement) + \else + \brief Function Get current peak selection mode (CCS only) + \endif + \details + \if FR + \param [in] MCHR_ID SensorID : ID du coffret. + \param [out] enPeakSelectionMode *pPeakMode : mode de selection du pic utilise + \return short : un code d'erreur MCHR_ERROR. + \else + \param [in] MCHR_ID SensorID : ID of the device. + \param [out] enPeakSelectionMode *pPeakMode : current peak selection mode + \return short : A \link MCHR_ERROR MCHR_ERROR \endlink code. + \endif + \see MCHR_GetErrorDescription + \brief + \if FR + \brief Capteurs Compatibles : CCS PRIMA, CCS OPTIMA, CCS ULTIMA, STIL-INITIAL

+ \brief Voir : la fonction "OnGetPeakSelectionMode()" dans le module : + \else + \par Compatibles Sensors : CCS PRIMA, CCS OPTIMA, CCS ULTIMA, STIL-INITIAL + \endif +*/ + +DLL_CHR_API short MCHR_GetPeakSelectionMode (MCHR_ID SensorID, enPeakSelectionMode *pPeakMode); +/* ------------------------------------------------------------------------- */ + +/* + Fonction permettant de configurer le mode de selection du pic (MCHR_HIGH_PEAK, MCHR_FIRST_PEAK, MCHR_LAST_PEAK + Set Peak-selction mode (CCS only) +*/ + +/*! + \fn short MCHR_SetPeakSelectionMode (MCHR_ID SensorID, enPeakSelectionMode PeakMode) + \if FR + \brief Fonction permettant de configurer le mode de selection du pic (CCS uniquement) + \else + \brief Function Set Peak-selction mode (CCS only) + \endif + \details + \if FR + \param [in] MCHR_ID SensorID : ID du coffret. + \param [in] enPeakSelectionMode PeakMode : mode de selection du pic choisi + \return short : un code d'erreur MCHR_ERROR. + \else + \param [in] MCHR_ID SensorID : ID of the device. + \param [in] enPeakSelectionMode PeakMode *pPeakMode : selected peak selection mode + \return short : A \link MCHR_ERROR MCHR_ERROR \endlink code. + \endif + \see MCHR_GetErrorDescription + \brief + \if FR \par Compatibles Sensors : CCS PRIMA, CCS OPTIMA, CCS ULTIMA, STIL-INITIAL + \else + \par Compatibles Sensors : CCS PRIMA, CCS OPTIMA, CCS ULTIMA, STIL-INITIAL + \endif +*/ + +DLL_CHR_API short MCHR_SetPeakSelectionMode (MCHR_ID SensorID, enPeakSelectionMode PeakMode); +/* ------------------------------------------------------------------------- */ + +/*! + \fn short MCHR_GetThicknessDetectionThresholds (MCHR_ID SensorID, float *pFirstPeakThreshold, float *pSecondPeakThreshold) + \if FR + \brief Fonction permettant de lire les seuils de detection du premier pic et du 2eme Pic en mode epaisseur + \else + \brief Function Get current detection thresholds for thickness mode + \endif + \details + \if FR + \param [in] MCHR_ID SensorID : ID du coffret. + \param [] float *pFirstPeakThreshold : Premier pic detecte + \param [] float *pSecondPeakThreshold : Second pic detecte + \return short : un code d'erreur MCHR_ERROR. + \else + \param [in] MCHR_ID SensorID : ID of the device. + \param [out] float *pFirstPeakThreshold : First detected peak + \param [out] float *pSecondPeakThreshold : Second detected peak + \return short : A \link MCHR_ERROR MCHR_ERROR \endlink code. + \endif + \see MCHR_GetErrorDescription + \brief + \if FR + \brief Capteurs Compatibles : CCS PRIMA, CCS OPTIMA, CCS ULTIMA, STIL-INITIAL

+ \else + \par Compatibles Sensors : CCS PRIMA, CCS OPTIMA, CCS ULTIMA, STIL-INITIAL + \endif +*/ + +DLL_CHR_API short MCHR_GetThicknessDetectionThresholds (MCHR_ID SensorID, float *pFirstPeakThreshold, float *pSecondPeakThreshold); +/* ------------------------------------------------------------------------- */ + +/*! + \fn short MCHR_SetThicknessDetectionThresholds (MCHR_ID SensorID, float FirstPeakThreshold, float SecondPeakThreshold) + \if FR + \brief Fonction permettant de fixer les seuils de detection du premier pic et du 2eme Pic en mode epaisseur + \else + \brief Function Set detection-thresholds in case of thickness mode + \endif + \details + \if FR + \param [in] MCHR_ID SensorID : ID du coffret. + \param [in] float FirstPeakThreshold : Affectation de la valeur du seuil du premier pic + \param [in] float SecondPeakThreshold : Affectation de la valeur du seuil du second pic + \return short : un code d'erreur MCHR_ERROR. + \else + \param [in] MCHR_ID SensorID : ID of the device. + \param [in] float FirstPeakThreshold : First selected peak threshold + \param [in] float SecondPeakThreshold : Second selected peak threshold + \return short : A \link MCHR_ERROR MCHR_ERROR \endlink code. + \endif + \see MCHR_GetErrorDescription + \brief + \if FR \par Compatibles Sensors : CCS PRIMA, CCS OPTIMA, CCS ULTIMA, STIL-INITIAL + \else + \par Compatibles Sensors : CCS PRIMA, CCS OPTIMA, CCS ULTIMA, STIL-INITIAL + \endif +*/ + +DLL_CHR_API short MCHR_SetThicknessDetectionThresholds (MCHR_ID SensorID, float FirstPeakThreshold, float SecondPeakThreshold); +/* ------------------------------------------------------------------------- */ + +/*! + \fn short MCHR_GetHoldLastValue (MCHR_ID SensorID, PWORD pValue) + \if FR + \brief Fonction permettant de lire la valeur du mode "hold last value" (memorisation de la derni鑢e valeur pendant n acquisition) + \else + \brief Function Get "Hold last value" parameter. 0 or positive. (CCS only) + \endif + \details + \if FR + \param [in] MCHR_ID SensorID : ID du coffret. + \param [] PWORD pValue : valeur du mode "hold last value" + \return short : un code d'erreur MCHR_ERROR. + \else + \param [in] MCHR_ID SensorID : ID of the device. + \param [out] PWORD pValue : "Hold last value" parameter + \return short : A \link MCHR_ERROR MCHR_ERROR \endlink code. + \endif + \see MCHR_GetErrorDescription + \brief + \if FR + \brief Capteurs Compatibles : CCS PRIMA, CCS OPTIMA, CCS ULTIMA, STIL-INITIAL

+ \brief Voir : la fonction "OnAcqStop()" dans le module : + \else + \par Compatibles Sensors : CCS PRIMA, CCS OPTIMA, CCS ULTIMA, STIL-INITIAL + \endif +*/ + +DLL_CHR_API short MCHR_GetHoldLastValue (MCHR_ID SensorID, PWORD pValue); +/* ------------------------------------------------------------------------- */ + +/*! + \fn short MCHR_SetHoldLastValue (MCHR_ID SensorID, WORD Value) + \if FR + \brief Fonction permettant de fixer la valeur du mode "hold last value" (memorisation de la derni鑢e valeur pendant n acquisition) + \else + \brief Function Get "Hold last value" parameter. (CCS only) + \endif + \details + \if FR + \param [in] MCHR_ID SensorID : ID du coffret. + \param [in] WORD Value : valeur du mode "hold last value" selectionne + \return short : un code d'erreur MCHR_ERROR. + \else + \param [in] MCHR_ID SensorID : ID of the device. + \param [in] WORD Value : Selected "Hold last value" parameter + \return short : A \link MCHR_ERROR MCHR_ERROR \endlink code. + \endif + \see MCHR_GetErrorDescription + \brief + \if FR \par Compatibles Sensors : CCS PRIMA, CCS OPTIMA, CCS ULTIMA, STIL-INITIAL + \else + \par Compatibles Sensors : CCS PRIMA, CCS OPTIMA, CCS ULTIMA, STIL-INITIAL + \endif +*/ + +DLL_CHR_API short MCHR_SetHoldLastValue (MCHR_ID SensorID, WORD Value); +/* ------------------------------------------------------------------------- */ + +/*! + \fn short MCHR_GetRefractiveIndexFile (MCHR_ID SensorID, PWORD pwIndexFileIndice,PREFRACTIVE_FILE_INFO) + \if FR + \brief Fonction de lecture du nom du fichier d'indice de refraction + \else + \brief Function Get the refractive index file + \endif + \details + \if FR + \param [in] MCHR_ID SensorID : ID du coffret. + \param [] PWORD pwIndexFileIndice : pointeur sur le nom de fichier d'indice selectionne + \param [] PREFRACTIVE_FILE_INFO : + \return short : un code d'erreur MCHR_ERROR. + \else + \param [in] MCHR_ID SensorID : ID of the device. + \param [out] PWORD pwIndexFileIndice : pointer on the file name of index selected + \param [out] PREFRACTIVE_FILE_INFO : Information file + \return short : A \link MCHR_ERROR MCHR_ERROR \endlink code. + \endif + \see MCHR_GetErrorDescription +*/ + +DLL_CHR_API short MCHR_GetRefractiveIndexFile (MCHR_ID SensorID, PWORD pwIndexFileIndice,PREFRACTIVE_FILE_INFO); +/* ------------------------------------------------------------------------- */ + +/*! + \fn short MCHR_SetRefractiveIndexFile (MCHR_ID SensorID, WORD wIndexFileIndice,LPSTR szMaterialDesc) + \if FR + \brief Fonction de parametrage du fichier d'indice de refraction + \else + \brief Function Set the refractive index + \endif + \details + \if FR + \param [in] MCHR_ID SensorID : ID du coffret. + \param [in] WORD wIndexFileIndice : pointeur sur le nom de fichier d'indice ?selectionner + \param [in] LPSTR szMaterialDesc : + \return short : un code d'erreur MCHR_ERROR. + \else + \param [in] MCHR_ID SensorID : ID of the device. + \param [in] WORD wIndexFileIndice : pointer on the file name of index selected + \param [in] LPSTR szMaterialDesc : descriptive of material + \return short : A \link MCHR_ERROR MCHR_ERROR \endlink code. + \endif + \see MCHR_GetErrorDescription +*/ + +DLL_CHR_API short MCHR_SetRefractiveIndexFile (MCHR_ID SensorID, WORD wIndexFileIndice,LPSTR szMaterialDesc); +/* ------------------------------------------------------------------------- */ + +/*! + \fn short MCHR_GetAutoDarkMode (MCHR_ID SensorID, enAutoDarkMode *pMode) + \if FR + \brief Fonction permettant de lire la valeur du mode de Dark Automatique. + \else + \brief Function Get automatic-dark activation flag (CCS only) + \endif + \details + \if FR + \param [in] MCHR_ID SensorID : ID du coffret. + \param [] enAutoDarkMode *pMode : + \return short : un code d'erreur MCHR_ERROR. + \else + \param [in] MCHR_ID SensorID : ID of the device. + \param [out] enAutoDarkMode *pMode : make take one of the following values : + \arg MCHR_MANUAL DARK : 揂uto adaptive dark ?mode Disable + \arg MCHR_AUTO_DARK: 揂uto adaptive dark ?mode Enable + \return short : A \link MCHR_ERROR MCHR_ERROR \endlink code. + \endif + \see MCHR_GetErrorDescription + \brief + \if FR + \brief Capteurs Compatibles : TOUS.

+ \brief Voir : la fonction "OnGetAutoDarkMode()" dans le module : + \else + \par Compatibles Sensors : CCS PRIMA, CCS OPTIMA, CCS ULTIMA, STIL-INITIAL + \endif +*/ + +DLL_CHR_API short MCHR_GetAutoDarkMode (MCHR_ID SensorID, enAutoDarkMode *pMode); +/* ------------------------------------------------------------------------- */ + +/*! + \fn short MCHR_SetAutoDarkMode (MCHR_ID SensorID, enAutoDarkMode pMode) + \if FR + \brief Fonction permettant de fixer la valeur du mode de Dark Automatique + \else + \brief Function Activate/Deactivate Automatic Dark mode (CCS only) + \endif + \details + \if FR + \param [in] MCHR_ID SensorID : ID du coffret. + \param [] enAutoDarkMode pMode : valeur du mode de Dark Automatique selectionne + \return short : un code d'erreur MCHR_ERROR. + \else + \param [in] MCHR_ID SensorID : ID of the device. + \param [in] enAutoDarkMode pMode : Selected Automatic Dark mode value + \arg \c MCHR_MANUAL DARK : Disable 揂uto adaptive dark ?mode + \arg \c MCHR_AUTO_DARK: Enable 揂uto adaptive dark ?mode + \return short : A \link MCHR_ERROR MCHR_ERROR \endlink code. + \endif + \see MCHR_GetErrorDescription + \brief + \if FR \par Compatibles Sensors : CCS PRIMA, CCS OPTIMA, CCS ULTIMA, STIL-INITIAL + \else + \par Compatibles Sensors : CCS PRIMA, CCS OPTIMA, CCS ULTIMA, STIL-INITIAL + \endif +*/ + +DLL_CHR_API short MCHR_SetAutoDarkMode (MCHR_ID SensorID, enAutoDarkMode pMode); +/* ------------------------------------------------------------------------- */ + +/*! + \fn short MCHR_GetAutoModeThreshold (MCHR_ID SensorID, PWORD Value) + \if FR + \brief Fonction permettant de lire la valeur de seuil pour les modes automatique (Auto LED et Auto Rate) + \else + \brief Function Get Threshold Automatic mode value (Auto LED et Auto Rate)(CCS only) + \endif + \details + \if FR + \param [in] MCHR_ID SensorID : ID du coffret. + \param [out] PWORD Value : Valeur de seuil pour les modes automatiques utilises + \return short : un code d'erreur MCHR_ERROR. + \else + \param [in] MCHR_ID SensorID : ID of the device. + \param [out] PWORD Value : Current Threshold Automatic mode value + \return short : A \link MCHR_ERROR MCHR_ERROR \endlink code. + \endif + \see MCHR_GetErrorDescription + \brief + \if FR + \brief Capteurs Compatibles : CCS PRIMA, CCS OPTIMA, STIL-INITIAL

+ \else + \par Compatibles Sensors : CCS PRIMA, CCS OPTIMA, STIL-INITIAL + \endif +*/ + +DLL_CHR_API short MCHR_GetAutoModeThreshold (MCHR_ID SensorID, PWORD Value); +/* ------------------------------------------------------------------------- */ + +/*! + \fn short MCHR_SetAutoModeThreshold (MCHR_ID SensorID, WORD Value) + \if FR + \brief Fonction permettant de fixer la valeur de seuil pour les modes automatique (Auto LED et Auto Rate) + \else + \brief Function Activate/Deactivate Automatic Dark mode (Auto LED et Auto Rate)(CCS only) + \endif + \details + \if FR + \param [in] MCHR_ID SensorID : ID du coffret. + \param [in] WORD Value : Valeur de seuil pour les modes automatique choisie + \return short : un code d'erreur MCHR_ERROR. + \else + \param [in] MCHR_ID SensorID : ID of the device. + \param [in] WORD Value : Selected Threshold Automatic mode value + \return short : A \link MCHR_ERROR MCHR_ERROR \endlink code. + \endif + \see MCHR_GetErrorDescription + \brief + \if FR \par Compatibles Sensors : CCS PRIMA, CCS OPTIMA, STIL-INITIAL + \else + \par Compatibles Sensors : CCS PRIMA, CCS OPTIMA, STIL-INITIAL + \endif +*/ + +DLL_CHR_API short MCHR_SetAutoModeThreshold (MCHR_ID SensorID, WORD Value); +/* ------------------------------------------------------------------------- */ + +/*! + \fn short MCHR_GetAutoRateMode (MCHR_ID SensorID, BOOL *Flag) + \if FR + \warning OBSOLETE + \else + \warning OBSOLETE + \endif +*/ + +DLL_CHR_API short MCHR_GetAutoRateMode (MCHR_ID SensorID, BOOL *Flag); +/* ------------------------------------------------------------------------- */ + +/*! + \fn short MCHR_SetAutoRateMode (MCHR_ID SensorID, BOOL Flag) + \if FR + \brief Fonction permettant de passer en mode frequence Automatique + \else + \brief Function allowing to actvate the automatic frequency mode(CCS only) + \endif + \details + \if FR + \param [in] MCHR_ID SensorID : ID du coffret. + \param [in] BOOL Flag : valeur = 0 mode desactive ou valeur = 1 mode active + \return short : un code d'erreur MCHR_ERROR. + \else + \param [in] MCHR_ID SensorID : ID of the device. + \param [in] BOOL Flag : value = 0 mode not activated or value = 1 mode activated + \return short : A \link MCHR_ERROR MCHR_ERROR \endlink code. + \endif + \see MCHR_GetErrorDescription +*/ + +DLL_CHR_API short MCHR_SetAutoRateMode (MCHR_ID SensorID, BOOL Flag); +/* ------------------------------------------------------------------------- */ + +/*! + \fn short MCHR_GetAutoLedMode (MCHR_ID SensorID, BOOL *pFlag) + \if FR + \brief Fonction permettant de Lire la valeur du flag AutoLed + \else + \brief Function to Get the AutoLed value flag + \endif + \details + \if FR + \param [in] MCHR_ID SensorID : ID du coffret. + \param [out] BOOL *pFlag : valeur = 0 mode desactive ou valeur = 1 mode active + \return short : un code d'erreur MCHR_ERROR. + \else + \param [in] MCHR_ID SensorID : ID of the device. + \param [out] BOOL *pFlag : value = 0 mode not activated or value = 1 mode activated + \return short : A \link MCHR_ERROR MCHR_ERROR \endlink code. + \endif + \see MCHR_GetErrorDescription + \brief + \if FR + \brief Capteurs Compatibles : CCS PRIMA, CCS OPTIMA, STIL-INITIAL

+ \else + \par Compatibles Sensors : CCS PRIMA, CCS OPTIMA, STIL-INITIAL + \brief The "OnGetAutoLedMode()" function in the \link SampleCHRDlg.cpp SampleCHRDlg.cpp \endlink module.
+ \endif + + +*/ + +DLL_CHR_API short MCHR_GetAutoLedMode (MCHR_ID SensorID, BOOL *pFlag); +/* ------------------------------------------------------------------------- */ + +/*! + \fn short MCHR_SetAutoLedMode (MCHR_ID SensorID, BOOL Flag) + \if FR + \brief Fonction permettant de fixer la valeur du flag AutoLed + \else + \brief Function to Set the AutoLed value flag + \endif + \details + \if FR + \param [in] MCHR_ID SensorID : ID du coffret. + \param [] BOOL Flag : valeur = 0 mode desactive ou valeur = 1 mode active + \return short : un code d'erreur MCHR_ERROR. + \else + \param [in] MCHR_ID SensorID : ID of the device. + \param [in] BOOL Flag : value = 0 mode not activated or value = 1 mode activated + \return short : A \link MCHR_ERROR MCHR_ERROR \endlink code. + \endif + \see MCHR_GetErrorDescription + \brief + \if FR \par Compatibles Sensors : CCS PRIMA, CCS OPTIMA, STIL-INITIAL + \else + \par Compatibles Sensors : CCS PRIMA, CCS OPTIMA, STIL-INITIAL + \endif +*/ + +DLL_CHR_API short MCHR_SetAutoLedMode (MCHR_ID SensorID, BOOL Flag); +/* ------------------------------------------------------------------------- */ + +/*! + \fn short MCHR_GetExposureTime (MCHR_ID SensorID, PWORD ExposureTime) + \if FR + \brief Fonction de lecture du temps d'exposition du CHR-450 en microsecondes + \else + \brief Function Get CHR current exposure time in microseconds + \endif + \details + \if FR + \param [in] MCHR_ID SensorID : ID du coffret. + \param [out] PWORD ExposureTime : temps d'exposition du CHR-450 + \return short : un code d'erreur MCHR_ERROR. + \else + \param [in] MCHR_ID SensorID : ID of the device. + \param [out] PWORD ExposureTime : CHR current exposure time + \return short : A \link MCHR_ERROR MCHR_ERROR \endlink code. + \endif + \see MCHR_GetErrorDescription + \brief + \if FR + \brief Capteurs Compatibles : TOUS except閟 CHR 150, CHR-150PC, CHR150L.

+ \brief Voir : la fonction "OnGetExposureTime()" dans le module : + \else + \par Compatibles Sensors : ALL except: CHR 150, CHR-150PC, CHR150L + \endif +*/ + +DLL_CHR_API short MCHR_GetExposureTime (MCHR_ID SensorID, PWORD ExposureTime); +/* ------------------------------------------------------------------------- */ + +/*! + \fn short MCHR_GetExposureTimeDW (MCHR_ID SensorID, PDWORD ExposureTime) + \if FR + \brief Fonction de lecture du temps d'exposition du CHR-450 en microsecondes + \else + \brief Function Get CHR current exposure time in microseconds + \endif + \details + \if FR + \param [in] MCHR_ID SensorID : ID du coffret. + \param [out]PDWORD ExposureTime : temps d'exposition du CHR-450 + \return short : un code d'erreur MCHR_ERROR. + \else + \param [in] MCHR_ID SensorID : ID of the device. + \param [out] PDWORD ExposureTime : CHR current exposure time + \return short : A \link MCHR_ERROR MCHR_ERROR \endlink code. + \endif + \see MCHR_GetErrorDescription + +*/ + +DLL_CHR_API short MCHR_GetExposureTimeDW (MCHR_ID SensorID, PDWORD ExposureTime); +/* ------------------------------------------------------------------------- */ + +/*! + \fn short MCHR_SetExposureTime (MCHR_ID SensorID, WORD ExposureTime) + \if FR + \brief Fonction de parametrage de la cadence du CHR-450 par le temps d'exposition + \else + \brief Function Set CHR Acquisition rate by specifying exposure time + \endif + \details + \if FR + \param [in] MCHR_ID SensorID : ID du coffret. + \param [in] WORD ExposureTime : Selection du temps d'exposition du CHR-450 en microsecondes + \return short : un code d'erreur MCHR_ERROR. + \else + \param [in] MCHR_ID SensorID : ID of the device. + \param [in] WORD ExposureTime : CHR selected exposure time in microseconds + \return short : A \link MCHR_ERROR MCHR_ERROR \endlink code. + \endif + \see MCHR_GetErrorDescription +*/ + +DLL_CHR_API short MCHR_SetExposureTime (MCHR_ID SensorID, WORD ExposureTime); + +/*! + \fn short MCHR_SetExposureTimeDW (MCHR_ID SensorID, DWORD ExposureTime) + \if FR + \brief Fonction de parametrage de la cadence du CHR-450 par le temps d'exposition + \else + \brief Function Set CHR Acquisition rate by specifying exposure time + \endif + \details + \if FR + \param [in] MCHR_ID SensorID : ID du coffret. + \param [in] DWORD ExposureTime : Selection du temps d'exposition du CHR-450 en microsecondes + \return short : un code d'erreur MCHR_ERROR. + \else + \param [in] MCHR_ID SensorID : ID of the device. + \param [in] DWORD ExposureTime : CHR selected exposure time in microseconds + \return short : A \link MCHR_ERROR MCHR_ERROR \endlink code. + \endif + \see MCHR_GetErrorDescription +*/ + +DLL_CHR_API short MCHR_SetExposureTimeDW (MCHR_ID SensorID, DWORD ExposureTime); +/* ------------------------------------------------------------------------- */ + +/*! + \fn short MCHR_SetFreeFrequency (MCHR_ID SensorID, long iFrequency) + \if FR + \brief Fonction de parametrage de la cadence des CHR et des CCS frequence + \else + \brief Function Set CHR Acquisition rate by specifying frequency + \endif + \details + \if FR + \param [in] MCHR_ID SensorID : ID du coffret. + \param [in] long iFrequency : Selection de la cadence des CHR et des frequences CCS + \return short : un code d'erreur MCHR_ERROR. + \else + \param [in] MCHR_ID SensorID : ID of the device. + \param [in] long iFrequency : Selection of the sensor frequency + \return short : A \link MCHR_ERROR MCHR_ERROR \endlink code. + \endif + \if FR + \par Capteurs Compatibles :TOUS. + \else + \par Compatibles Sensors : ALL. + \endif +*/ + +DLL_CHR_API short MCHR_SetFreeFrequency (MCHR_ID SensorID, long iFrequency); + +/* + Fonction de parametrage de la cadence des CHR et des CCS frequence + Set CHR Acquisition rate by specifying frequency +*/ + +/*! + \fn short MCHR_GetFreeFrequency (MCHR_ID SensorID, long* iFrequency) + \if FR + \brief Fonction de lecture de la cadence des CHR et des CCS frequence + \else + \brief Function Get CHR Acquisition rate by specifying frequency + \endif + \details + \if FR + \param [in] MCHR_ID SensorID : ID du coffret. + \param [] long *iFrequency : Selection de la cadence des CHR et des frequences CCS + \return short : un code d'erreur MCHR_ERROR. + \else + \param [in] MCHR_ID SensorID : ID of the device. + \param [out] long *iFrequency : Selection of the sensor frequency + \return short : A \link MCHR_ERROR MCHR_ERROR \endlink code. + \endif + \see MCHR_GetErrorDescription + \par Compatibles Sensors : ALL +*/ + +DLL_CHR_API short MCHR_GetFreeFrequency (MCHR_ID SensorID, long* iFrequency); + +/* ------------------------------------------------------------------------- */ + +/************************************************************************** + ** Interferometric mode Setting ** + **************************************************************************/ +/* + Fonction de d'activation ou de desactivation du mode fenetre en mode interferometrique + Get the activation state of the "limited range" mode (interferometric mode only) +*/ + +/*! + \fn short MCHR_GetBracketedMode (MCHR_ID SensorID, BOOL *BracketedModeEnabled) + \if FR + \brief Fonction de d'activation ou de desactivation du mode fenetre en mode interferometrique + \else + \brief Function Get the activation state of the "limited range" mode (interferometric mode only) + \endif + \details + \if FR + \param [in] MCHR_ID SensorID : ID du coffret. + \param [] BOOL *BracketedModeEnabled : valeur = 0 mode desactive ou valeur = 1 mode active + \return short : un code d'erreur MCHR_ERROR. + \else + \param [in] MCHR_ID SensorID : ID of the device. + \param [out] BOOL *BracketedModeEnabled : value = 0 mode not activated or value = 1 mode activated + \return short : A \link MCHR_ERROR MCHR_ERROR \endlink code. + \endif + \see MCHR_GetErrorDescription + \brief + \if FR + \brief Capteurs Compatibles : CHR 150, CHR-150PC, CHR-150L, with Interferometric option

+ \brief Voir : la fonction "OnGetBracketedMode()" dans le module : + \else + \par Compatibles Sensors : CHR 150, CHR-150PC, CHR-150L, with Interferometric option + \brief The "OnGetBracketedMode()" function in the \link SampleCHRDlg.cpp SampleCHRDlg.cpp \endlink module. + \endif +*/ + +DLL_CHR_API short MCHR_GetBracketedMode (MCHR_ID SensorID, BOOL *BracketedModeEnabled); +/* ------------------------------------------------------------------------- */ + +/*! + \fn short MCHR_SetBracketedMode (MCHR_ID SensorID, BOOL BracketedModeEnabled) + \if FR + \brief Fonction de d'activation ou de desactivation du mode fenetre en mode interfermetrique + \else + \brief Function Set the activation state of the "limited range" mode (interferometric mode only) + \endif + \details + \if FR + \param [in] MCHR_ID SensorID : ID du coffret. + \param [] BOOL BracketedModeEnabled : valeur = 0 mode desactive ou valeur = 1 mode active + \return short : un code d'erreur MCHR_ERROR. + \else + \param [in] MCHR_ID SensorID : ID of the device. + \param [in] BOOL BracketedModeEnabled : value = 0 mode not activated or value = 1 mode activated + \return short : A \link MCHR_ERROR MCHR_ERROR \endlink code. + \endif + \see MCHR_GetErrorDescription + \brief + \if FR \par Compatibles Sensors : CHR 150, CHR-150PC, CHR-150L, with Interferometric option + \else + \par Compatibles Sensors : CHR 150, CHR-150PC, CHR-150L, with Interferometric option + \endif +*/ + +DLL_CHR_API short MCHR_SetBracketedMode (MCHR_ID SensorID, BOOL BracketedModeEnabled); +/* ------------------------------------------------------------------------- */ + +/*! + \fn short MCHR_GetLeftDetectionLimit (MCHR_ID SensorID, float *LeftLimitValue) + \if FR + \brief Fonction de lecture de la limite de detection gauche en mode interfermetrique + \else + \brief Function Get the left-side detection limit (interferometric mode only) + \endif + \details + \if FR + \param [in] MCHR_ID SensorID : ID du coffret. + \param [] float *LeftLimitValue : valeur de la limite de detection gauche en mode interfermetrique + \return short : un code d'erreur MCHR_ERROR. + \else + \param [in] MCHR_ID SensorID : ID of the device. + \param [out] FLOAT *LeftLimitValue : value of left-side detection limit in interferometric mode + \return short : A \link MCHR_ERROR MCHR_ERROR \endlink code. + \endif + \see MCHR_GetErrorDescription + \brief + \if FR + \brief Capteurs Compatibles : CCS PRIMA, CCS OPTIMA, CCS ULTIMA

+ \else + \par Compatibles Sensors : CCS PRIMA, CCS OPTIMA, CCS ULTIMA + \endif +*/ + +DLL_CHR_API short MCHR_GetLeftDetectionLimit (MCHR_ID SensorID, float *LeftLimitValue); +/* ------------------------------------------------------------------------- */ + +/*! + \fn short MCHR_SetLeftDetectionLimit (MCHR_ID SensorID, float LeftLimitValue) + \if FR + \brief Fonction de parametrage de la limite de detection gauche en mode interferometrique + \else + \brief Function Set the left-side detection limit (interferometric mode only) + \endif + \details + \if FR + \param [in] MCHR_ID SensorID : ID du coffret. + \param [] float LeftLimitValue : valeur de la limite de detection gauche en mode interferometrique + \return short : un code d'erreur MCHR_ERROR. + \else + \param [in] MCHR_ID SensorID : ID of the device. + \param [in] float LeftLimitValue : value of left-side detection limit in interferometric mode + \return short : A \link MCHR_ERROR MCHR_ERROR \endlink code. + \endif + \see MCHR_GetErrorDescription + \brief + \if FR \par Compatibles Sensors : CHR 150, CHR-150PC, CHR-150L, with Interferometric option + \else + \par Compatibles Sensors : CHR 150, CHR-150PC, CHR-150L, with Interferometric option + \endif +*/ + +DLL_CHR_API short MCHR_SetLeftDetectionLimit (MCHR_ID SensorID, float LeftLimitValue); +/* ------------------------------------------------------------------------- */ + +/*! + \fn short MCHR_GetRightDetectionLimit (MCHR_ID SensorID, float *RightLimitValue) + \if FR + \brief Fonction de lecture de la limite de detection droite en mode interferometrique + \else + \brief Function Get the right-side detection limit (interferometric mode only) + \endif + \details + \if FR + \param [in] MCHR_ID SensorID : ID du coffret. + \param [] float *RightLimitValue : valeur de la limite de detection droite en mode interferometrique + \return short : un code d'erreur MCHR_ERROR. + \else + \param [in] MCHR_ID SensorID : ID of the device. + \param [out] float *RightLimitValue : value of right-side detection limit in interferometric mode + \return short : A \link MCHR_ERROR MCHR_ERROR \endlink code. + \endif + \see MCHR_GetErrorDescription + \brief + \if FR + \brief Capteurs Compatibles : CHR 150, CHR-150PC, CHR-150L, with Interferometric option

+ \brief Voir : la fonction "OnGetRightDetectionLimit()" dans le module : + \else + \par Compatibles Sensors : CHR 150, CHR-150PC, CHR-150L, with Interferometric option + \endif +*/ + +DLL_CHR_API short MCHR_GetRightDetectionLimit (MCHR_ID SensorID, float *RightLimitValue); +/* ------------------------------------------------------------------------- */ + +/*! + \fn short MCHR_SetRightDetectionLimit (MCHR_ID SensorID, float RightLimitValue) + \if FR + \brief Fonction de parametrage de la limite de detection droite en mode interferometrique + \else + \brief Function Set the right-side detection limit (interferometric mode only) + \endif + \details + \if FR + \param [in] MCHR_ID SensorID : ID du coffret. + \param [in] float RightLimitValue : valeur de la limite de detection droite en mode interferometrique + \return short : un code d'erreur MCHR_ERROR. + \else + \param [in] MCHR_ID SensorID : ID of the device. + \param [in] float RightLimitValue : value of right-side detection limit in interferometric mode + \return short : A \link MCHR_ERROR MCHR_ERROR \endlink code. + \endif + \see MCHR_GetErrorDescription + \brief + \if FR \par Compatibles Sensors : CHR 150, CHR-150PC, CHR-150L, with Interferometric option + \else + \par Compatibles Sensors : CHR 150, CHR-150PC, CHR-150L, with Interferometric option + \endif +*/ + +DLL_CHR_API short MCHR_SetRightDetectionLimit (MCHR_ID SensorID, float RightLimitValue); +/* ------------------------------------------------------------------------- */ + +/*! + \fn short MCHR_GetQualityThreshold (MCHR_ID SensorID, WORD *ThresholdValue) + \if FR + \brief Fonction de lecture du seuil de qualite en mode interfermetrique + \else + \brief Function Get the qualite threshold (interferometric mode only) + \endif + \details + \if FR + \param [in] MCHR_ID SensorID : ID du coffret. + \param [] WORD *ThresholdValue : valeur du seuil de qualite en mode interfermetrique + \return short : un code d'erreur MCHR_ERROR. + \else + \param [in] MCHR_ID SensorID : ID of the device. + \param [out] WORD *ThresholdValue : value of the quality threshold + \return short : A \link MCHR_ERROR MCHR_ERROR \endlink code. + \endif + \see MCHR_GetErrorDescription + \brief + \if FR + \brief Capteurs Compatibles : CHR 150, CHR-150PC, CHR-150L, with Interferometric option

+ \brief Voir : la fonction "OnGetQualityThreshold ()" dans le module : + \else + \par Compatibles Sensors : CHR 150, CHR-150PC, CHR-150L, with Interferometric option + \endif +*/ + + +DLL_CHR_API short MCHR_GetQualityThreshold (MCHR_ID SensorID, WORD *ThresholdValue); +/* ------------------------------------------------------------------------- */ + +/*! + \fn short MCHR_SetQualityThreshold (MCHR_ID SensorID, WORD ThresholdValue) + \if FR + \brief Fonction de parametrage du seuil de qualite en mode interferometrique + \else + \brief Function Set Quality threshold (interferometric mode only) + \endif + \details + \if FR + \param [in] MCHR_ID SensorID : ID du coffret. + \param [in] WORD ThresholdValue : valeur du seuil de qualite en mode interfermetrique + \return short : un code d'erreur MCHR_ERROR. + \else + \param [in] MCHR_ID SensorID : ID of the device. + \param [in] WORD ThresholdValue : value of the quality threshold + \return short : A \link MCHR_ERROR MCHR_ERROR \endlink code. + \endif + \see MCHR_GetErrorDescription + \brief + \if FR \par Compatibles Sensors : CHR 150, CHR-150PC, CHR-150L, with Interferometric option + \else + \par Compatibles Sensors : CHR 150, CHR-150PC, CHR-150L, with Interferometric option + \endif +*/ + +DLL_CHR_API short MCHR_SetQualityThreshold (MCHR_ID SensorID, WORD ThresholdValue); +/* ------------------------------------------------------------------------- */ + + +/************************************************************************** + ** Miscellaneous functions ** + **************************************************************************/ + +/*! + \fn short MCHR_Abort (MCHR_ID SensorID) + \if FR + \brief Fonction permettant d'arreter la commande en cours soit une acquisition ou une commande + \else + \brief Function Stop the acquisition currently in progress, or the command that is currently executed + \endif + \if FR + \param [in] MCHR_ID SensorID : ID du coffret. + \return short : un code d'erreur MCHR_ERROR. + \else + \param [in] MCHR_ID SensorID : ID of the device. + \return short : A \link MCHR_ERROR MCHR_ERROR \endlink code. + \endif + \see MCHR_GetErrorDescription + \brief + \if FR + \brief Capteurs Compatibles : TOUS.

+ \else + \par Compatibles Sensors : ALL + \endif + +*/ +DLL_CHR_API short MCHR_Abort (MCHR_ID SensorID); +/* ------------------------------------------------------------- */ + +/*! + \fn WORD MCHR_GetLastError (MCHR_ID SensorID) + \if FR + \brief Fonction retournant la derni鑢e erreur survenue + \else + \brief Function Get last error + \endif + \details + \if FR + \param [in] MCHR_ID SensorID : ID du coffret. + \return short : un code d'erreur MCHR_ERROR. + \else + \param [in] MCHR_ID SensorID : ID of the device. + \return short : A \link MCHR_ERROR MCHR_ERROR \endlink code. + \arg \c 0x01 : Error encountered when trying to communicate with the CHR + \arg \c 0x03 : Error encountered when trying to initialize the specified COM PORT (IdSerialPort > 0) + \arg \c 0x04 : Error encountered when trying to read the specified confoguration file + \arg \c 0x05 : Error encountered when trying to write the specified configuration file + \arg \c 0x06 : Error encountered when trying to get the CHR configuration + \arg \c 0x07 : Error encountered during CHR configuration transmission + \arg \c 0x08 : The name of the specified CHR exist already in the list of initialized CHR + \arg \c 0x09 : Error while adding a new CHR + \arg \c 0x0a : The specified CHR does not exist in the list of initialized CHR + \arg \c 0x0b : No CHR is currently connected. + \arg \c 0x0c : Invalid argument for the required function + \arg \c 0x0d : Dialog error encountered while communicationg with the CHR + \arg \c 0x0e : Error encountered while initializing the Reception Thread + \arg \c 0x0f : No command is being executed while "Abort" command is received + \arg \c 0x10 : Abort command failed. + \arg \c 0x11 : The DLL has not been initialized and activated. + \arg \c 0x12 : The DLL is busy executing a previous command. + \arg \c 0x13 : The acquisition rate is too high, impossible to transmit all requested data at this rate + \arg \c 0x14 : The specified function is autorized for CHR 450 only, the current CHR is not a 450 + \arg \c 0x15 : No acquisition is currently in progress. + \arg \c 0x16 : Unspecified error during function execution. + \arg \c 0x17 : The specified function is autorized on interferometric mode only, the CHR is not in this mode + \arg \c 0x18 : Error during "Fast Dark" command execution. + \arg \c 0x19 : The interferometric mode is not authorized with this sensor. + \arg \c 0x1a : The command is not authorized for the current sensor type + \arg \c 0x1c : Impossible to send the calibration file + \arg \c 0x1b : Impossible to read calibration file + \arg \c 0x1d : Illegal IP address. + \arg \c 0x1e : Reception buffer overflow, reading rate is too slow. + \arg \c 0x1f : Unrecognized trigger type + \arg \c 0x20 : Impossible to read the firmware file + \arg \c 0x21 : Impossible to read the menu file + \arg \c 0x22 : Impossible to send the firmware file + \arg \c 0x23 : Impossible to send the menu file + \arg \c 0x24 : Error while trying to run the new firmware version + \arg \c 0x25 : Error while trying to save the new firmware version + \arg \c 0x26 : Error while trying restart the sensor after saving the new firmware version + \arg \c 0x27 : The specified function is autorized for CHR 150 only, the current CHR is not a 150 + \arg \c 0x28 : The specified function is autorized for CCS only, the current CHR is not a 150 + \arg \c 0x29 : No data item is configured to be transmitted on current digital output channel + \arg \c 0x2a : The Ethernet link is not supported on this sensor. + \arg \c 0x2b : Failed to send Serial Number + \arg \c 0x2c : The specified function is autorized for an ILB sensor + \arg \c 0x2d : The specified function is not available on the device. + \arg \c 0x2e : Frequency too high. + \arg \c 0x2f : Frequency too low. + \arg \c 0x3a : Error during "White Acquisition" command execution : the signal is too High + \arg \c 0x3b : Error during "White Acquisition" command execution : the signal is too low + \arg \c 0x3c : Error during "White Acquisition" command execution : the signal is satured + \arg \c 0x3d : The function is avalaible only for an ethernet connection. + \arg \c 0x3e : Error during setting / getting ILB parameters. + \arg \c 0x3f : The specified function is unautorized for CHR 150 + \arg \c 0x40 : Failure to start the acquisition of WhiteRef + \arg \c 0x41 : Failure to stop the acquisition of WhiteRef + \arg \c 0x0100 : Unknown error + \endif + \brief + \if FR + \brief Capteurs Compatibles : TOUS. + \else + \brief Compatibles Sensors : ALL. + \endif +*/ +DLL_CHR_API WORD MCHR_GetLastError (MCHR_ID SensorID); +/* ------------------------------------------------------------- */ + +/*! + \fn short MCHR_SendCommand(MCHR_ID SensorID, LPCSTR Command, LPSTR Response) + \if FR + \brief Fonction envoyant une commande libre au capteur specifie + \else + \brief Function Send a commande to the specified CHR + \endif + \details + \if FR + \param [in] MCHR_ID SensorID : ID du coffret. + \param [] LPCSTR Command : + \param [] LPSTR Response : + \return short : un code d'erreur MCHR_ERROR. + \else + \param [in] MCHR_ID SensorID : ID of the device. + \param [in] LPCSTR Command : a character string comprising the command to send + \param [out] LPSTR Response : a character string comprising the sensor response + \return short : A \link MCHR_ERROR MCHR_ERROR \endlink code. + \endif + \see MCHR_GetErrorDescription + \brief + \if FR + \brief Capteurs Compatibles : TOUS.

+ \else + \par Compatibles Sensors : ALL + \endif +*/ + +DLL_CHR_API short MCHR_SendCommand(MCHR_ID SensorID, LPCSTR Command, LPSTR Response); +/* ------------------------------------------------------------------------- */ + +/*! + \fn short MCHR_ReadSignal (MCHR_ID SensorID, enSignalType FirstSignalType, WORD *FirstSignal, enSignalType SecondSignalType, WORD *SecondSignal) + \if FR + \brief Fonction recuperant les signaux bruts et traites dans le capteur specifie + \warning Appeler GetNbrPixels pour conna顃re la taille du buffer ?passer en param鑤res + \else + \brief Function Read raw and treated signals to the specified CHR + \warning Call GetNbrPixels to know the buffer size to set in parameters + \endif + \details + \if FR + \param [in] MCHR_ID SensorID : ID du coffret. + \param [] enSignalType FirstSignalType : selects the type of the first signal. + \param [] WORD *FirstSignal : a buffer for receiving the first signal (size=number of spectrometer pixels). + \param [] enSignalType SecondSignalType : selects the type of the second signal. + \param [] WORD *SecondSignal : a buffer for receiving the second signal (same size). + \arg Signal types may be one of the following: + \arg \c MCHR_RAW_SIGNAL, + \arg \c MCHR_PRETREATED_SIGNAL, + \arg \c MCHR_DARK_SIGNAL, + \return short : un code d'erreur MCHR_ERROR. + \else + \param [in] MCHR_ID SensorID : ID of the device. + \param [in] enSignalType FirstSignalType : selects the type of the first signal. + \param [out] WORD *FirstSignal : a buffer for receiving the first signal (size=number of spectrometer pixels). + \param [in] enSignalType SecondSignalType : selects the type of the second signal. + \param [out] WORD *SecondSignal : a buffer for receiving the second signal (same size). + \arg Signal types may be one of the following: + \arg \c MCHR_RAW_SIGNAL, + \arg \c MCHR_PRETREATED_SIGNAL, + \arg \c MCHR_DARK_SIGNAL, + \return short : A \link MCHR_ERROR MCHR_ERROR \endlink code. + \see MCHR_GetErrorDescription + \brief + \endif + \if FR + \brief Capteurs Compatibles : TOUS.

+ \brief Voir : la fonction "OnReadSignal()" dans le module : + \else + \par Compatibles Sensors : ALL + \endif +*/ + +DLL_CHR_API short MCHR_ReadSignal (MCHR_ID SensorID, enSignalType FirstSignalType, WORD *FirstSignal, enSignalType SecondSignalType, WORD *SecondSignal); +/* ------------------------------------------------------------------------- */ + +/*! + \fn short MCHR_ReadSignalFloat (MCHR_ID SensorID, enSignalType FirstSignalType, float *FirstSignal, enSignalType SecondSignalType, float *SecondSignal) + \if FR + \brief Fonction ?utiliser pour recuperer le fichier d'indice de refraction + \warning Appeler GetNbrPixels pour conna顃re la taille du buffer ?passer en param鑤res + \else + \brief Function Read refractive index file + \warning Call GetNbrPixels to know the buffer size + \endif + \details + \if FR + \param [in] MCHR_ID SensorID : ID du coffret. + \param [] enSignalType FirstSignalType : + \param [] float *FirstSignal : + \param [] enSignalType SecondSignalType : + \param [] float *SecondSignal : + \return short : un code d'erreur MCHR_ERROR. + \else + \param [in] MCHR_ID SensorID : ID of the device. + \param [in] enSignalType FirstSignalType : selects the type of the first signal. + \param [out] FLOAT *FirstSignal : a buffer for receiving the first signal (size=number of spectrometer pixels). + \param [in] enSignalType SecondSignalType : selects the type of the second signal. + \param [out] FLOAT *SecondSignal : a buffer for receiving the second signal (same size). + \arg Signal types may be one of the following: + \arg \c MCHR_RAW_SIGNAL, + \arg \c MCHR_PRETREATED_SIGNAL, + \arg \c MCHR_DARK_SIGNAL, + \return short : A \link MCHR_ERROR MCHR_ERROR \endlink code. + \endif + \see MCHR_GetErrorDescription + +*/ +DLL_CHR_API short MCHR_ReadSignalFloat (MCHR_ID SensorID, enSignalType FirstSignalType, float *FirstSignal, enSignalType SecondSignalType, float *SecondSignal); +/* ------------------------------------------------------------------------- */ + +/*! + \fn short MCHR_GetNbrMaxPixels (MCHR_ID SensorID,long *piMaxNbPixels) + \if FR + \brief Fonction permettant de conna顃re le nombre de pixels du capteur + \warning Cette fonction doit 阾re appelee pour la fonction ReadSignal + \else + \brief Function to Get Max Number of Pixels of the sensor + \warning This function must be called for the ReadSignal function + \endif + \details + \if FR + \param [in] MCHR_ID SensorID : ID du coffret. + \param [out] long *piMaxNbPixels : + \return short : un code d'erreur MCHR_ERROR. + \else + \param [in] MCHR_ID SensorID : ID of the device. + \param [out] long *piMaxNbPixels : maximum numbers of pixels + \return short : A \link MCHR_ERROR MCHR_ERROR \endlink code. + \endif + \see MCHR_GetErrorDescription + \brief + \if FR + \brief Capteurs Compatibles : TOUS.

+ \else + \par Compatibles Sensors : ALL + \endif +*/ +DLL_CHR_API short MCHR_GetNbrMaxPixels (MCHR_ID SensorID,long *piMaxNbPixels); + + +/*! + \fn short MCHR_RecenterEncoders (MCHR_ID SensorID, BOOL Encoder1, BOOL Encoder2, BOOL Encoder3) + \if FR + \brief Fonction permettant de recentrer les codeurs + \else + \brief Function to recenter encoders (only CCS) + \endif + \details + \if FR + \param [in] MCHR_ID SensorID : ID du coffret. + \param [in] BOOL Encoder1 : + \param [in] BOOL Encoder2 : + \param [in] BOOL Encoder3 : + \return short : un code d'erreur MCHR_ERROR. + \else + \param [in] MCHR_ID SensorID : ID of the device. + \param [in] BOOL Encoder1 : true to recenter encoder 1, false otherwise. + \param [in] BOOL Encoder2 : true to recenter encoder 2, false otherwise. + \param [in] BOOL Encoder3 : true to recenter encoder 3, false otherwise. + \return short : A \link MCHR_ERROR MCHR_ERROR \endlink code. + \endif + \see MCHR_GetErrorDescription + \brief + \if FR + \brief Capteurs Compatibles : CCS PRIMA, CCS OPTIMA, CCS ULTIMA.

+ \else + \par Compatibles Sensors : CCS PRIMA, CCS OPTIMA, CCS ULTIMA + \endif +*/ + +DLL_CHR_API short MCHR_RecenterEncoders (MCHR_ID SensorID, BOOL Encoder1, BOOL Encoder2, BOOL Encoder3); +/* ------------------------------------------------------------------------- */ + + +/************************************************************************** + ** Maintenance ** + **************************************************************************/ +/* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! */ + +/*! + \fn short MCHR_GetMeasurementForCalibration (MCHR_ID SensorID, MCHR_tyAcqParam Parameters, PFLOAT *pArrayDepth, PFLOAT *pArrayIntensity, PFLOAT *pArrayBarycenter); + \if FR + \brief Fonction d'acquisition d'une sequence de points utilisable pour une calibration du CHR + \warning CETTE FONCTION EST UNIQUEMENT RESERVEE POUR UNE UTILISATION USINE + \else + \brief Function Acquisition of a series of points for sensor calibration + \warning THIS FUNCTION IS RESERVED FOR FACTORY USE ONLY. + \endif + \details + \if FR + \param [in] MCHR_ID SensorID : ID du coffret. + \param [] MCHR_tyAcqParam Parameters : + \param [] PFLOAT *pArrayDepth : a pointer array to the Thickness1 data buffers + \param [] PFLOAT *pArrayIntensity : + \param [] PFLOAT *pArrayBarycenter : + \return short : un code d'erreur MCHR_ERROR. + \else + \param [in] MCHR_ID SensorID : ID of the device. + \param [out] MCHR_tyAcqParam Parameters : data structure for setting the measurement parameters + \param [out] PFLOAT *pArrayDepth : a pointer array to the Thickness1 data buffers + \param [out] PFLOAT *pArrayIntensity : data structure for setting the measurement parameters + \param [out] PFLOAT *pArrayBarycenter : a pointer array to the Thickness3 data buffers + \return short : A \link MCHR_ERROR MCHR_ERROR \endlink code. + \endif + \see MCHR_GetErrorDescription + \brief + \if FR + \brief Capteurs Compatibles : TOUS.

+ \else + \par Compatibles Sensors : CHR 150, CHR-150PC, CHR-150L + \endif +*/ + +DLL_CHR_API short MCHR_GetMeasurementForCalibration (MCHR_ID SensorID, MCHR_tyAcqParam Parameters, PFLOAT *pArrayDepth, PFLOAT *pArrayIntensity, PFLOAT *pArrayBarycenter); + +/* ------------------------------------------------------------------------- */ + +/*! + \fn short MCHR_SendCalibration (MCHR_ID SensorID, short PenID, char *ptrCalibrationFile, CALLBACK_SEND_FILE CallBackFct); + \if FR + \brief Fonction d'envoi d'une table de calibration sur le capteur specifie + \warning CETTE FONCTION EST UNIQUEMENT RESERVEE POUR UNE UTILISATION USINE + \else + \brief Function Download of a calibration table into the sensor + \warning THIS FUNCTION IS RESERVED FOR FACTORY USE ONLY + \endif + \details + \if FR + \param [in] MCHR_ID SensorID : ID du coffret. + \param [in] short PenID : + \param [in] char *ptrCalibrationFile : + \param [in] CALLBACK_SEND_FILE CallBackFct : + \return short : un code d'erreur MCHR_ERROR. + \else + \param [in] MCHR_ID SensorID : ID of the device. + \param [in] short PenID : ID of the pen selected + \param [in] char *ptrCalibrationFile : a pointer to LUT file name + \param [out] CALLBACK_SEND_FILE CallBackFct : Optional callback function + \return short : A \link MCHR_ERROR MCHR_ERROR \endlink code. + \arg \c MCHR_ERROR_READ_CALIBRATION_FILE : error while attempting to read LUT File + \arg \c MCHR_ERROR_SEND_CALIBRATION_TABLE : download error + \endif + \see MCHR_GetErrorDescription + \brief + \if FR + \brief Capteurs Compatibles : TOUS. + \else + \par Compatibles Sensors : ALL + \endif +*/ + +DLL_CHR_API short MCHR_SendCalibration (MCHR_ID SensorID, short PenID, char *ptrCalibrationFile, CALLBACK_SEND_FILE CallBackFct); +/* ------------------------------------------------------------------------- */ + +/*! + \fn short MCHR_SendFirmware (MCHR_ID SensorID, char *FirmwareFile, char *AdditionalFile, CALLBACK_SEND_FILE CallBackFct); + \if FR + \brief Fonction d'envoi du firmware dans le CHR (CHR 450, 450XE, 450XE-e) + \else + \brief Function Download the firmware to the CHR (CHR 450, 450XE, 450XE-e) without saving it to the non-volatile memory + \endif + \details + \if FR + \param [in] MCHR_ID SensorID : ID du coffret. + \param [in] char *FirmwareFile : Nom du fichier contenant le firmware (.exe) ?telecharger = NULL si on ne souhaite pas telecharger le firmware (.exe) + \param [in] char *AdditionalFile : Nom du fichier complementaire contenant le Menu ?telecharger pour CHR 450. Nom du fichier complementaire 'stil.bin' ?telecharger pour un CHR150. = NULL si on ne souhaite pas telecharger le menu complementaire + \param [out] CALLBACK_SEND_FILE CallBackFct : Valeur de retour + \return short : un code d'erreur MCHR_ERROR. + \else + \param [in] MCHR_ID SensorID : ID of the device. + \param [in] char *FirmwareFile : Name of firmware (*.exe) to be downloaded. = NULL if we don't want to download the firmware. + \param [in] char *AdditionalFile : Name of menu file to be downloaded for CHR 450 OR 'stil.bin' for a CHR 150. = NULL if we don't want to download the menu file. + \param [out] CALLBACK_SEND_FILE CallBackFct : Reply + \return short : A \link MCHR_ERROR MCHR_ERROR \endlink code. + \endif + \see MCHR_GetErrorDescription + \par Compatibles Sensors : CHR 450, 450XE, 450XE-e +*/ + +DLL_CHR_API short MCHR_SendFirmware (MCHR_ID SensorID, char *FirmwareFile, char *AdditionalFile, CALLBACK_SEND_FILE CallBackFct); +/* ------------------------------------------------------------------------- */ + +/*! + \fn short MCHR_SaveFirmware (MCHR_ID SensorID, char *FirmwareFile, char *AdditionalFile, CALLBACK_SEND_FILE CallBackFct); + \if FR + \brief Fonction de sauvegarde du firmware dans le CHR. + \warning Valide definitivement le firmware et ou le menu envoyes par la commande MCHR_SendFirmware pour un CHR450, 450XE, 450XE-e. Pour un CHR 150: envoi + sauvegarde du firmware dans l'EEPROM + \else + \brief Function writes a new CHR firmware version. + \warning Version previously sent with MCHR_SendFirmware, to the non-volatile memory and erases the previous version definitively. For a CHR 150, this function downloads and saves the new version definitively. + \endif + \details + \if FR + \param [in] MCHR_ID SensorID : ID du coffret. + \param [in] char *FirmwareFile : Name of firmware (*.exe) to be saved. + \param [in] char *AdditionalFile : Name of additonal file to be saved + \param [out] CALLBACK_SEND_FILE CallBackFct : reply + \return short : un code d'erreur MCHR_ERROR. + \else + \param [in] MCHR_ID SensorID : ID of the device. + \param [in] char *FirmwareFile : Name of firmware (*.exe) to be saved. + \param [in] char *AdditionalFile : Name of additonal file to be saved + \param [out] CALLBACK_SEND_FILE CallBackFct : reply + \return short : A \link MCHR_ERROR MCHR_ERROR \endlink code. + \endif + \see MCHR_GetErrorDescription +*/ + +DLL_CHR_API short MCHR_SaveFirmware (MCHR_ID SensorID, char *FirmwareFile, char *AdditionalFile, CALLBACK_SEND_FILE CallBackFct); +/* ------------------------------------------------------------------------- */ + +/*! + \fn short MCHR_SendSerialNumber (MCHR_ID SensorID, char *SerialNumber); + \if FR + \brief Fonction permettant d'envoyer un numero de serie au capteur. + \else + \brief Function to Set a Serial number to a sensor. + \endif + \details + \if FR + \param [in] MCHR_ID SensorID : ID du coffret. + \param [in] char *SerialNumber : the new serial number + \return short : un code d'erreur MCHR_ERROR. + \else + \param [in] MCHR_ID SensorID : ID of the device. + \param [in] char *SerialNumber : the new serial number + \return short : A \link MCHR_ERROR MCHR_ERROR \endlink code. + \endif + \see MCHR_GetErrorDescription +*/ + +DLL_CHR_API short MCHR_SendSerialNumber (MCHR_ID SensorID, char *SerialNumber); + +/*! + \fn short MCHR_SetDebugMessage (BOOL Enabled); + \if FR + \brief Fonction activant des messages de debug. + \else + \brief Function to Activate debug message. + \endif + \details + \if FR + \param [in] BOOL Enabled : valeur = 0 mode non active ou valeur = 1 mode active + \else + \param [in] BOOL Enabled : value = 0 mode non activated or value = 1 mode activated + \endif +*/ + +DLL_CHR_API void MCHR_SetDebugMessage (BOOL Enabled); +/* ------------------------------------------------------------- */ + +/*! + \fn short MCHR_GetFtpDir(MCHR_ID SensorID, char * sFileName,PMCHR_FILE_DATA pFileData, long *plNbFiles); + \if FR + \brief Fonction recup鑢e la liste des fichiers disponibles sur le capteur. + \warning Pour connaitre le nombre de fichiers appeler cette fonction avec pFileData NULL (CETTE FONCTION EST UNIQUEMENT RESERVEE POUR UNE UTILISATION USINE) + \else + \brief Function Get the list of avaialable files. + \warning THIS FUNCTION IS RESERVED FOR FACTORY USE ONLY + \endif + \details + \if FR + \param [in] MCHR_ID SensorID : ID du coffret. + \param [O] char * sFileName : nom du fichier recherche (*.*) + \param [] PMCHR_FILE_DATA pFileData : tableau de structure qui doit 阾re initialise avec le nombre de fichiers existant + \param [] long *plNbFiles : + \return short : un code d'erreur MCHR_ERROR. + \else + \param [in] MCHR_ID SensorID : ID of the device. + \param [out] char * sFileName : sherched file name (*.*) + \param [out] PMCHR_FILE_DATA pFileData : structure array that must be set with the existing files number + \param [out] long *plNbFiles : + \return short : A \link MCHR_ERROR MCHR_ERROR \endlink code. + \endif + \see MCHR_GetErrorDescription +*/ + +DLL_CHR_API short MCHR_GetFtpDir(MCHR_ID SensorID, char * sFileName,PMCHR_FILE_DATA pFileData, long *plNbFiles); + +/* ------------------------------------------------------------- */ +/*! + \fn short MCHR_GetFtpNumberOfFiles(MCHR_ID SensorID, char * sFileName, long *plNbFiles); + \if FR + \brief Fonction recup鑢e le nombre de fichiers disponibles sur le capteur. + \else + \brief Function Get the number of files avaialable on the sensor. + \warning THIS FUNCTION IS RESERVED FOR FACTORY USE ONLY + \endif + \details + \if FR + \param [in] MCHR_ID SensorID : ID du coffret. + \param [O] char * sFileName : nom du fichier recherche (*.*) + \param [] long *plNbFiles : nombre de fichiers disponibles sur le capteur + \return short : un code d'erreur MCHR_ERROR. + \else + \param [in] MCHR_ID SensorID : ID of the device. + \param [out] char * sFileName : sherched file name (*.*) + \param [out] long *plNbFiles : number of files avaialable on the sensor + \return short : A \link MCHR_ERROR MCHR_ERROR \endlink code. + \endif + \see MCHR_GetErrorDescription +*/ +DLL_CHR_API short MCHR_GetFtpNumberOfFiles(MCHR_ID SensorID, char * sFileName, long *plNbFiles); + +/* ------------------------------------------------------------- */ +/*! + \fn short MCHR_GetFtpFileName(MCHR_ID SensorID, MCHR_FILE_DATA_EX *pFileData, long numFile); + \if FR + \brief Fonction recup鑢e les caract閞istique du fichier en fonction de son index. + \else + \brief Function Get the characteristics of the file according to its index. + \warning THIS FUNCTION IS RESERVED FOR FACTORY USE ONLY + \endif + \details + \if FR + \param [in] MCHR_ID SensorID : ID du coffret. + \param [O] char * sFileName : nom du fichier + \param [] long numFile : index du ficheir + \return short : un code d'erreur MCHR_ERROR. + \else + \param [in] MCHR_ID SensorID : ID of the device. + \param [out] char * sFileName : file name + \param [out] long numFile : index of file + \return short : A \link MCHR_ERROR MCHR_ERROR \endlink code. + \endif + \see MCHR_GetErrorDescription +*/ +DLL_CHR_API short MCHR_GetFtpFileName(MCHR_ID SensorID, MCHR_FILE_DATA_EX *pFileData, long numFile); + +/*! + \fn short MCHR_DownloadFile(MCHR_ID SensorID, char * src,char *dest); + \if FR + \brief PRIVATE + \warning CETTE FONCTION EST UNIQUEMENT RESERVEE POUR UNE UTILISATION USINE + \else + \brief PRIVATE + \warning THIS FUNCTION IS RESERVED FOR FACTORY USE ONLY + \endif +*/ + +DLL_CHR_API short MCHR_DownloadFile(MCHR_ID SensorID, char * src,char *dest); + +/*! + \fn short MCHR_UploadFile(MCHR_ID SensorID, char * src,char *dest,HWND hWindowToNotify,UINT uiMessID); + \if FR + \brief Fonction Envoi d'un fichier depuis le PC vers le CCS + \warning CETTE FONCTION EST UNIQUEMENT RESERVEE POUR UNE UTILISATION USINE + \else + \brief Function file download + \warning THIS FUNCTION IS RESERVED FOR FACTORY USE ONLY + \endif + \details + \if FR + \param [in] MCHR_ID SensorID : ID du coffret. + \param [in] char * src : Chemin absolu du fichier + \param [in] char *dest : Nom du fichier de destination + \param [out] HWND hWindowToNotify : Identifiant de la fen阾re pour l'envoi de la progression + \param [out] UINT uiMessID : ID du message qui est envoye ?la fen阾re + \return short : un code d'erreur MCHR_ERROR. + \else + \param [in] MCHR_ID SensorID : ID of the device. + \param [in] char * src : Absolute file source path + \param [in] char *dest : Destination file name + \param [out] HWND hWindowToNotify : Window Id for progress bargraph + \param [out] UINT uiMessID : ID of the message send to the window + \return short : A \link MCHR_ERROR MCHR_ERROR \endlink code. + \endif +*/ + +DLL_CHR_API short MCHR_UploadFile(MCHR_ID SensorID, char * src,char *dest,HWND hWindowToNotify,UINT uiMessID); + +/*! + \fn short MCHR_UploadFileEx(MCHR_ID SensorID, char * src, char *dest, CALLBACK_SEND_FILE CallBackFct); + \if FR + \brief Fonction Envoi d'un fichier depuis le PC vers le CCS + \warning CETTE FONCTION EST UNIQUEMENT RESERVEE POUR UNE UTILISATION USINE + \else + \brief Function file download + \warning THIS FUNCTION IS RESERVED FOR FACTORY USE ONLY + \endif + \details + \if FR + \param [in] MCHR_ID SensorID : ID du coffret. + \param [in] char * src : Chemin absolu du fichier + \param [in] char *dest : Nom du fichier de destination + \param [out] CALLBACK_SEND_FILE CallBackFct : Option de function retour + \return short : un code d'erreur MCHR_ERROR. + \else + \param [in] MCHR_ID SensorID : ID of the device. + \param [in] char * src : Absolute file source path + \param [in] char *dest : Destination file name + \param [out] CALLBACK_SEND_FILE CallBackFct : Optional callback function + \return short : A \link MCHR_ERROR MCHR_ERROR \endlink code. + \endif +*/ +DLL_CHR_API short MCHR_UploadFileEx(MCHR_ID SensorID, char * src, char *dest, CALLBACK_SEND_FILE CallBackFct); + +/*! + \fn short MCHR_SetSpectrumMode(MCHR_ID SensorID, WORD Value); + \if FR + \brief Fonction Activation ou Desactivation du mode spectre. + \else + \brief Function Enable or Disable spectrum mode + \endif + \details + \if FR + \param [in] MCHR_ID SensorID : ID du coffret. + \param [in] WORD Value : 1 pour activer le mode spectre et 0 pour d閟activer + \return short : un code d'erreur MCHR_ERROR. + \else + \param [in] MCHR_ID SensorID : ID of the device. + \param [in] WORD Value : 1 for enable the spectrum mode, 0 for disable. + \return short : A \link MCHR_ERROR MCHR_ERROR \endlink code. + \endif + \see MCHR_GetErrorDescription +*/ +DLL_CHR_API short MCHR_SetSpectrumMode (MCHR_ID SensorID, WORD Value); + +/*! + \fn short MCHR_SetLedType(MCHR_ID SensorID,enLedType LedType); + \if FR + \brief Fonction Type de LED selectionne (Source interne, source externe) + \warning CETTE FONCTION EST UNIQUEMENT RESERVEE POUR UNE UTILISATION USINE + \else + \brief Function Led type selected. Source type can be either Internal LED or External source + \warning THIS FUNCTION IS RESERVED FOR FACTORY USE ONLY + \endif + \details + \if FR + \param [in] MCHR_ID SensorID : ID du coffret. + \param [in] enLedType LedType : Type de Led selectionne + \return short : un code d'erreur MCHR_ERROR. + \else + \param [in] MCHR_ID SensorID : ID of the device. + \param [in] enLedType LedType : Selected Led Type + \return short : A \link MCHR_ERROR MCHR_ERROR \endlink code. + \endif + \see MCHR_GetErrorDescription +*/ +DLL_CHR_API short MCHR_SetLedType(MCHR_ID SensorID,enLedType LedType); + +/*! + \fn short MCHR_GetLedType(MCHR_ID SensorID,enLedType *pLedType); + \if FR + \brief Fonction detection Type de LED (Source interne, source externe) + \warning CETTE FONCTION EST UNIQUEMENT RESERVEE POUR UNE UTILISATION USINE + \else + \brief Function Led type detected. Source type can be either Internal LED or External source + \warning THIS FUNCTION IS RESERVED FOR FACTORY USE ONLY + \endif + \details + \if FR + \param [in] MCHR_ID SensorID : ID du coffret. + \param [] enLedType *pLedType : Type de Led detectee + \return short : un code d'erreur MCHR_ERROR. + \else + \param [in] MCHR_ID SensorID : ID of the device. + \param [out] enLedType *pLedType : Detected Led Type + \return short : A \link MCHR_ERROR MCHR_ERROR \endlink code. + \endif + \see MCHR_GetErrorDescription +*/ + +DLL_CHR_API short MCHR_GetLedType(MCHR_ID SensorID,enLedType *pLedType); + +/*! + \fn short MCHR_GetUsablePixels (MCHR_ID SensorID,PWORD pwFirstUsablePixel,PWORD pwNumberOfUsablePixels); + \if FR + \brief Fonction detection des pixels du capteur utilisables + \else + \brief Function detection usable sensor pixels + \endif + \details + \if FR + \param [in] MCHR_ID SensorID : ID du coffret. + \param [out] PWORD pwFirstUsablePixel : premier pixel utilisable + \param [out] PWORD pwNumberOfUsablePixels : nombre de pixels utilisables + \return short : un code d'erreur MCHR_ERROR. + \else + \param [in] MCHR_ID SensorID : ID of the device. + \param [out] PWORD pwFirstUsablePixel : first usable pixel + \param [out] PWORD pwNumberOfUsablePixels : number of usable pixels + \return short : A \link MCHR_ERROR MCHR_ERROR \endlink code. + \endif + \see MCHR_GetErrorDescription + \par Compatibles Sensors : ALL +*/ + + +DLL_CHR_API short MCHR_GetUsablePixels (MCHR_ID SensorID,PWORD pwFirstUsablePixel,PWORD pwNumberOfUsablePixels); + +/*! + \fn short MCHR_GetCCDMaxPixels (MCHR_ID SensorID); + \if FR + \brief Fonction detection du nombre maximum de pixels du capteur + \else + \brief Function detection of maximum number of pixels of the sensor + \endif + \details + \if FR + \param [in] MCHR_ID SensorID : ID du coffret. + \param [] PWORD pwMaxPixel : nombre maximum de pixels du capteur + \return short : un code d'erreur MCHR_ERROR. + \else + \param [in] MCHR_ID SensorID : ID of the device. + \param [] PWORD pwMaxPixel : maximum number of pixels of the sensor + \return short : A \link MCHR_ERROR MCHR_ERROR \endlink code. + \endif +*/ + + + DLL_CHR_API short MCHR_GetCCDMaxPixels (MCHR_ID SensorID,PWORD pwMaxPixel); + + +/*! + \fn short MCHR_GetErrorDescription (WORD shErrorID,LPSTR pszErrorBuffer,long iBufferLength) + \if FR + \brief Cette fonction re鏾it l'erreur et en retourne sa description. + \else + \brief This function gets an error id and returns the description of the error. + \endif + \details + \if FR + \param [in] WORD shErrorID: Code erreur retourne par GetLastError + \param [out] LPSTR pszErrorBuffer: + \param [in] long iBufferLength: + \else + \param [in] WORD shErrorID: error code returned by GetLastError + \arg \c 0x01 : Error encountered when trying to communicate with the CHR + \arg \c 0x03 : Error encountered when trying to initialize the specified COM PORT (IdSerialPort > 0) + \arg \c 0x04 : Error encountered when trying to read the specified confoguration file + \arg \c 0x05 : Error encountered when trying to write the specified configuration file + \arg \c 0x06 : Error encountered when trying to get the CHR configuration + \arg \c 0x07 : Error encountered during CHR configuration transmission + \arg \c 0x08 : The name of the specified CHR exist already in the list of initialized CHR + \arg \c 0x09 : Error while adding a new CHR + \arg \c 0x0a : The specified CHR does not exist in the list of initialized CHR + \arg \c 0x0b : No CHR is currently connected. + \arg \c 0x0c : Invalid argument for the required function + \arg \c 0x0d : Dialog error encountered while communicationg with the CHR + \arg \c 0x0e : Error encountered while initializing the Reception Thread + \arg \c 0x0f : No command is being executed while "Abort" command is received + \arg \c 0x10 : Abort command failed. + \arg \c 0x11 : The DLL has not been initialized and activated. + \arg \c 0x12 : The DLL is busy executing a previous command. + \arg \c 0x13 : The acquisition rate is too high, impossible to transmit all requested data at this rate + \arg \c 0x14 : The specified function is autorized for CHR 450 only, the current CHR is not a 450 + \arg \c 0x15 : No acquisition is currently in progress. + \arg \c 0x16 : Unspecified error during function execution. + \arg \c 0x17 : The specified function is autorized on interferometric mode only, the CHR is not in this mode + \arg \c 0x18 : Error during "Fast Dark" command execution. + \arg \c 0x19 : The interferometric mode is not authorized with this sensor. + \arg \c 0x1a : The command is not authorized for the current sensor type + \arg \c 0x1c : Impossible to send the calibration file + \arg \c 0x1b : Impossible to read calibration file + \arg \c 0x1d : Illegal IP address. + \arg \c 0x1e : Reception buffer overflow, reading rate is too slow. + \arg \c 0x1f : Unrecognized trigger type + \arg \c 0x20 : Impossible to read the firmware file + \arg \c 0x21 : Impossible to read the menu file + \arg \c 0x22 : Impossible to send the firmware file + \arg \c 0x23 : Impossible to send the menu file + \arg \c 0x24 : Error while trying to run the new firmware version + \arg \c 0x25 : Error while trying to save the new firmware version + \arg \c 0x26 : Error while trying restart the sensor after saving the new firmware version + \arg \c 0x27 : The specified function is autorized for CHR 150 only, the current CHR is not a 150 + \arg \c 0x28 : The specified function is autorized for CCS only, the current CHR is not a 150 + \arg \c 0x29 : No data item is configured to be transmitted on current digital output channel + \arg \c 0x2a : The Ethernet link is not supported on this sensor. + \arg \c 0x2b : Failed to send Serial Number + \arg \c 0x2c : The specified function is autorized for an ILB sensor + \arg \c 0x2d : The specified function is not available on the device. + \arg \c 0x2e : Frequency too high. + \arg \c 0x2f : Frequency too low. + \arg \c 0x3a : Error during "White Acquisition" command execution : the signal is too High + \arg \c 0x3b : Error during "White Acquisition" command execution : the signal is too low + \arg \c 0x3c : Error during "White Acquisition" command execution : the signal is satured + \arg \c 0x3d : The function is avalaible only for an ethernet connection. + \arg \c 0x3e : Error during setting / getting ILB parameters. + \arg \c 0x3f : The specified function is unautorized for CHR 150 + \arg \c 0x40 : Failure to start the acquisition of WhiteRef + \arg \c 0x41 : Failure to stop the acquisition of WhiteRef + \arg \c 0x0100 : Unknown error + + + \param [out] LPSTR pszErrorBuffer: the string buffer for the error description + \param [in] long iBufferLength: the length of the string + \endif + \brief + \if FR + \brief Capteurs Compatibles : TOUS. + \else + \brief Compatibles Sensors : ALL. + \endif + +*/ +DLL_CHR_API short MCHR_GetErrorDescription(WORD shErrorID, LPSTR pszErrorBuffer, long iBufferLength); + + + +/************************************************************************/ +/* White ref state acquisition */ +/************************************************************************/ +/*! + \fn short MCHR_StopWhiteRefStateAcquisition(MCHR_ID SensorID) + \if FR + \brief Fonction d'arr阾 de l'acquisition du white ref. + \else + \brief Stops white ref acquisition. + \endif + \details + \if FR + \param [in] MCHR_ID SensorID : ID du coffret. + \return short : un code d'erreur MCHR_ERROR. + \else + \param [in] MCHR_ID SensorID : ID of the device. + \return short : A \link MCHR_ERROR MCHR_ERROR \endlink code. + \endif + \see MCHR_GetErrorDescription +*/ +DLL_CHR_API short MCHR_StopWhiteRefStateAcquisition(MCHR_ID SensorID); + +/*! + \fn short MCHR_StartWhiteRefStateAcquisition(MCHR_ID SensorID) + \if FR + \brief Fonction de demarrage de l'acquisition du white ref. + \else + \brief Starts white ref acquisition. + \endif + \details + \if FR + \param [in] MCHR_ID SensorID : ID du coffret. + \return short : un code d'erreur MCHR_ERROR. + \else + \param [in] MCHR_ID SensorID : ID of the device. + \return short : A \link MCHR_ERROR MCHR_ERROR \endlink code. + \endif + \see MCHR_GetErrorDescription +*/ +DLL_CHR_API short MCHR_StartWhiteRefStateAcquisition(MCHR_ID SensorID); + +/*! + \fn short MCHR_StartWhiteNormalisationRefStateAcquisition(MCHR_ID SensorID) + \if FR + \brief Fonction de demarrage de l'acquisition du white ref de normalisation. + \else + \brief Starts normalization white ref acquisition. + \endif + \details + \if FR + \param [in] MCHR_ID SensorID : ID du coffret. + \return short : un code d'erreur MCHR_ERROR. + \else + \param [in] MCHR_ID SensorID : ID of the device. + \return short : A \link MCHR_ERROR MCHR_ERROR \endlink code. + \endif + \see MCHR_GetErrorDescription +*/ +DLL_CHR_API short MCHR_StartWhiteNormalisationRefStateAcquisition(MCHR_ID SensorID); + +/*! + \fn short MCHR_GetLastWhiteRefState(MCHR_ID SensorID,WORD *pwLastState) + \if FR + \brief Fonction permettant de lire l'etat du White ref. + \else + \brief Reads white ref status. + \endif + \details + \if FR + \param [in] MCHR_ID SensorID : ID du coffret. + \param [] WORD *pwLastState : Statut du White ref. + \return short : un code d'erreur MCHR_ERROR. + \else + \param [in] MCHR_ID SensorID : ID of the device. + \param [out] WORD *pwLastState : White ref Status. + \return short : A \link MCHR_ERROR MCHR_ERROR \endlink code. + \endif + \see MCHR_GetErrorDescription +*/ +DLL_CHR_API short MCHR_GetLastWhiteRefState(MCHR_ID SensorID,WORD *pwLastState); + +/*! + \fn short MCHR_GetWhiteRefMaxThreshold(MCHR_ID SensorID, long *iMaxWhiteRefThreshold) + \if FR + \brief Fonction permettant de lire le seuil maximum du white ref. + \else + \brief Reads white ref max threshold. + \endif + \details + \if FR + \param [in] MCHR_ID SensorID : ID du coffret. + \param [] long * : Seuil White ref Maximum. + \return short : un code d'erreur MCHR_ERROR. + \else + \param [in] MCHR_ID SensorID : ID of the device. + \param [out] long * : Max white ref threshold. + \return short : A \link MCHR_ERROR MCHR_ERROR \endlink code. + \endif + \see MCHR_GetErrorDescription +*/ +DLL_CHR_API short MCHR_GetWhiteRefMaxThreshold(MCHR_ID SensorID, long *iMaxWhiteRefThreshold); + +/*! + \fn short MCHR_SetWhiteRefMaxThreshold(MCHR_ID SensorID, long iMaxWhiteRefThreshold) + \if FR + \brief Fonction permettant de parametrer le seuil maximum du white ref. + \else + \brief Sets white ref max threshold. + \endif + \details + \if FR + \param [in] MCHR_ID SensorID : ID du coffret. + \param [in] long : Seuil White ref Maximum. + \return short : un code d'erreur MCHR_ERROR. + \else + \param [in] MCHR_ID SensorID : ID of the device. + \param [in] long : Max white ref threshold. + \return short : A \link MCHR_ERROR MCHR_ERROR \endlink code. + \endif + \see MCHR_GetErrorDescription +*/ +DLL_CHR_API short MCHR_SetWhiteRefMaxThreshold(MCHR_ID SensorID, long iMaxWhiteRefThreshold); + +/*! + \fn short MCHR_SetWhiteRefMinThreshold(MCHR_ID SensorID, long iMinWhiteRefThreshold) + \if FR + \brief Fonction permettant de parametrer le seuil minimum du white ref. + \else + \brief Sets white ref min threshold. + \endif + \details + \if FR + \param [in] MCHR_ID SensorID : ID du coffret. + \param [in] long : Seuil White ref Minimum. + \return short : un code d'erreur MCHR_ERROR. + \else + \param [in] MCHR_ID SensorID : ID of the device. + \param [in] long : Min white ref threshold. + \return short : A \link MCHR_ERROR MCHR_ERROR \endlink code. + \endif + \see MCHR_GetErrorDescription +*/ +DLL_CHR_API short MCHR_SetWhiteRefMinThreshold(MCHR_ID SensorID, long iMinWhiteRefThreshold); + +/*! + \fn short MCHR_GetWhiteRefMinThreshold(MCHR_ID SensorID, long *iMinWhiteRefThreshold) + \if FR + \brief Fonction permettant de lire le seuil minimum du white ref. + \else + \brief Reads white ref min threshold. + \endif + \details + \if FR + \param [in] MCHR_ID SensorID : ID du coffret. + \param [] long * : Seuil White ref Minimum. + \return short : un code d'erreur MCHR_ERROR. + \else + \param [in] MCHR_ID SensorID : ID of the device. + \param [out] long * : Min white ref threshold. + \return short : A \link MCHR_ERROR MCHR_ERROR \endlink code. + \endif + \see MCHR_GetErrorDescription +*/ +DLL_CHR_API short MCHR_GetWhiteRefMinThreshold(MCHR_ID SensorID, long *iMinWhiteRefThreshold); + +/*! + \fn short MCHR_GetWhiteRefAvg(MCHR_ID SensorID, long *iWhiterefAveragingFactor) + \if FR + \brief Fonction permettant de lire le taux de moyennage du white ref. + \else + \brief Reads white ref averaging factor. + \endif + \details + \if FR + \param [in] MCHR_ID SensorID : ID du coffret. + \param [out] long *iWhiterefAveragingFactor : Facteur de moyennage du white ref. + \return short : un code d'erreur MCHR_ERROR. + \else + \param [in] MCHR_ID SensorID : ID of the device. + \param [out] long *iWhiterefAveragingFactor : White ref averaging factor. + \return short : A \link MCHR_ERROR MCHR_ERROR \endlink code. + \endif + \see MCHR_GetErrorDescription +*/ +DLL_CHR_API short MCHR_GetWhiteRefAvg(MCHR_ID SensorID, long *iWhiterefAveragingFactor); + +/*! + \fn short MCHR_SetWhiteRefAvg(MCHR_ID SensorID, long iWhiterefAveragingFactor) + \if FR + \brief Fonction permettant de parametrer le taux de moyennage du white ref. + \else + \brief Sets white ref averaging factor. + \endif + \details + \if FR + \param [in] MCHR_ID SensorID : ID du coffret. + \param [in] long iWhiterefAveragingFactor: Facteur de moyennage du white ref. + \return short : un code d'erreur MCHR_ERROR. + \else + \param [in] MCHR_ID SensorID : ID of the device. + \param [in] long iWhiterefAveragingFactor: White ref averaging factor. + \return short : A \link MCHR_ERROR MCHR_ERROR \endlink code. + \endif + \see MCHR_GetErrorDescription +*/ +DLL_CHR_API short MCHR_SetWhiteRefAvg(MCHR_ID SensorID, long iWhiterefAveragingFactor); + +/*! + \fn short MCHR_GetWhiteRefCuttingValue(MCHR_ID SensorID, long *iWhiterefCuttingValue) + \if FR + \brief Fonction permettant de lire la valeur de coupe du white ref. + \else + \brief Reads white ref cutting value. + \endif + \details + \if FR + \param [in] MCHR_ID SensorID : ID du coffret. + \param [] long *iWhiterefCuttingValue : Valeur de coupe du white ref. + \return short : un code d'erreur MCHR_ERROR. + \else + \param [in] MCHR_ID SensorID : ID of the device. + \param [out] long *iWhiterefCuttingValue : White ref cutting value. + \return short : A \link MCHR_ERROR MCHR_ERROR \endlink code. + \endif + \see MCHR_GetErrorDescription +*/ +DLL_CHR_API short MCHR_GetWhiteRefCuttingValue(MCHR_ID SensorID, long *iWhiterefCuttingValue); + +/*! + \fn short MCHR_SetWhiteRefCuttingValue(MCHR_ID SensorID, long iWhiterefCuttingValue) + \if FR + \brief Fonction permettant de parametrer la valeur de coupe du white ref. + \else + \brief Sets white ref cutting value. + \endif + \details + \if FR + \param [in] MCHR_ID SensorID : ID du coffret. + \param [in] long iWhiterefCuttingValue : Valeur de coupe du white ref. + \return short : un code d'erreur MCHR_ERROR. + \else + \param [in] MCHR_ID SensorID : ID of the device. + \param [in] long iWhiterefCuttingValue : White ref cutting value. + \return short : A \link MCHR_ERROR MCHR_ERROR \endlink code. + \endif + \see MCHR_GetErrorDescription +*/ +DLL_CHR_API short MCHR_SetWhiteRefCuttingValue(MCHR_ID SensorID, long iWhiterefCuttingValue); + +/*! + \fn short MCHR_GetWhiteRefFrq(MCHR_ID SensorID, long *iWhiterefFrequency) + \if FR + \brief Fonction permettant de lire la frequence du white ref. + \else + \brief Reads white ref frequency. + \endif + \details + \if FR + \param [in] MCHR_ID SensorID : ID du coffret. + \param [] long *iWhiterefFrequency : Frequence du white ref. + \return short : un code d'erreur MCHR_ERROR. + \else + \param [in] MCHR_ID SensorID : ID of the device. + \param [out] long *iWhiterefFrequency : White ref frequency. + \return short : A \link MCHR_ERROR MCHR_ERROR \endlink code. + \endif + \see MCHR_GetErrorDescription +*/ +DLL_CHR_API short MCHR_GetWhiteRefFrq(MCHR_ID SensorID, long *iWhiterefFrequency); + +/*! + \fn short MCHR_SetWhiteRefFrq(MCHR_ID SensorID, long iWhiterefFrequency) + \if FR + \brief Fonction permettant de parametrer la frequence du white ref. + \else + \brief Sets white ref frequency. + \endif + \details + \if FR + \param [in] MCHR_ID SensorID : ID du coffret. + \param [in] long iWhiterefFrequency : Frequence du white ref. + \return short : un code d'erreur MCHR_ERROR. + \else + \param [in] MCHR_ID SensorID : ID of the device. + \param [in] long iWhiterefFrequency : White ref frequency. + \return short : A \link MCHR_ERROR MCHR_ERROR \endlink code. + \endif + \see MCHR_GetErrorDescription +*/ +DLL_CHR_API short MCHR_SetWhiteRefFrq(MCHR_ID SensorID, long iWhiterefFrequency); + +/*! + \fn short MCHR_GetWhiteRefNormaMinThreshold(MCHR_ID SensorID, long *iValue) + \if FR + \brief Fonction permettant de lire le seuil minimum du white ref de normalisation. + \else + \brief Reads normalization white ref minimum threshold. + \endif + \details + \if FR + \param [in] MCHR_ID SensorID : ID du coffret. + \param [] long *iValue : Valeur min du white ref de nomalisation. + \return short : un code d'erreur MCHR_ERROR. + \else + \param [in] MCHR_ID SensorID : ID of the device. + \param [out] long *iValue : Normalization White ref min threshold. + \return short : A \link MCHR_ERROR MCHR_ERROR \endlink code. + \endif + \see MCHR_GetErrorDescription +*/ +DLL_CHR_API short MCHR_GetWhiteRefNormaMinThreshold(MCHR_ID SensorID, long *iValue); + +/*! + \fn short MCHR_SetWhiteRefNormaMinThreshold(MCHR_ID SensorID, long iValue) + \if FR + \brief Fonction permettant de parametrer le seuil minimum du white ref de normalisation. + \else + \brief Sets normalization white ref minimum threshold. + \endif + \details + \if FR + \param [in] MCHR_ID SensorID : ID du coffret. + \param [in] long iValue : Valeur min du white ref de nomalisation. + \return short : un code d'erreur MCHR_ERROR. + \else + \param [in] MCHR_ID SensorID : ID of the device. + \param [in] long iValue : Normalization White ref min threshold. + \return short : A \link MCHR_ERROR MCHR_ERROR \endlink code. + \endif + \see MCHR_GetErrorDescription +*/ +DLL_CHR_API short MCHR_SetWhiteRefNormaMinThreshold(MCHR_ID SensorID, long iValue); + +/*! + \fn short MCHR_GetWhiteRefNormaMaxThreshold(MCHR_ID SensorID, long *iValue) + \if FR + \brief Fonction permettant de lire le seuil maximum du white ref de normalisation. + \else + \brief Reads normalization white ref maximum threshold. + \endif + \details + \if FR + \param [in] MCHR_ID SensorID : ID du coffret. + \param [] long *iValue : Valeur max du white ref de nomalisation. + \return short : un code d'erreur MCHR_ERROR. + \else + \param [in] MCHR_ID SensorID : ID of the device. + \param [out] long *iValue : Normalization White ref max threshold. + \return short : A \link MCHR_ERROR MCHR_ERROR \endlink code. + \endif + \see MCHR_GetErrorDescription +*/ +DLL_CHR_API short MCHR_GetWhiteRefNormaMaxThreshold(MCHR_ID SensorID, long *iValue); + +/*! + \fn short MCHR_SetWhiteRefNormaMaxThreshold(MCHR_ID SensorID, long iValue) + \if FR + \brief Fonction permettant de parametrer le seuil maximum du white ref de normalisation. + \else + \brief Sets normalization white ref maximum threshold. + \endif + \details + \if FR + \param [in] MCHR_ID SensorID : ID du coffret. + \param [in] long iValue : Valeur max du white ref de nomalisation. + \return short : un code d'erreur MCHR_ERROR. + \else + \param [in] MCHR_ID SensorID : ID of the device. + \param [in] long iValue : Normalization White ref max threshold. + \return short : A \link MCHR_ERROR MCHR_ERROR \endlink code. + \endif + \see MCHR_GetErrorDescription +*/ +DLL_CHR_API short MCHR_SetWhiteRefNormaMaxThreshold(MCHR_ID SensorID, long iValue); + +/*! + \fn short MCHR_GetWhiteRefNormaAvg(MCHR_ID SensorID, long *iValue) + \if FR + \brief Fonction permettant de lire le taux de moyennage du white ref de normalisation. + \else + \brief Reads normalization white ref averaging factor. + \endif + \details + \if FR + \param [in] MCHR_ID SensorID : ID du coffret. + \param [out] long *iValue : Facteur de moyennage du white ref de normalisation. + \return short : un code d'erreur MCHR_ERROR. + \else + \param [in] MCHR_ID SensorID : ID of the device. + \param [out] long *iValue : Normaliztion white ref averaging factor. + \return short : A \link MCHR_ERROR MCHR_ERROR \endlink code. + \endif + \see MCHR_GetErrorDescription +*/ +DLL_CHR_API short MCHR_GetWhiteRefNormaAvg(MCHR_ID SensorID, long *iValue); + +/*! + \fn short MCHR_SetWhiteRefNormaAvg(MCHR_ID SensorID, long iValue) + \if FR + \brief Fonction permettant de parametrer le taux de moyennage du white ref de normalisation. + \else + \brief Sets normalization white ref averaging factor. + \endif + \details + \if FR + \param [in] MCHR_ID SensorID : ID du coffret. + \param [in] long iValue : Facteur de moyennage du white ref de nomalisation. + \return short : un code d'erreur MCHR_ERROR. + \else + \param [in] MCHR_ID SensorID : ID of the device. + \param [in] long iValue : Normalization white ref averaging factor. + \return short : A \link MCHR_ERROR MCHR_ERROR \endlink code. + \endif + \see MCHR_GetErrorDescription +*/ +DLL_CHR_API short MCHR_SetWhiteRefNormaAvg(MCHR_ID SensorID, long iValue); + +/*! + \fn short MCHR_GetWhiteRefNormaFrq(MCHR_ID SensorID, long *iValue) + \if FR + \brief Fonction permettant de lire la frequence du white ref de normalisation. + \else + \brief Reads white ref frequency. + \endif + \details + \if FR + \param [in] MCHR_ID SensorID : ID du coffret. + \param [out] long *iValue : Frequence du white ref de normalisation. + \return short : un code d'erreur MCHR_ERROR. + \else + \param [in] MCHR_ID SensorID : ID of the device. + \param [out] long *iValue : Normalization white ref frequency. + \return short : A A \link MCHR_ERROR MCHR_ERROR \endlink code. + \endif + \see MCHR_GetErrorDescription +*/ +DLL_CHR_API short MCHR_GetWhiteRefNormaFrq(MCHR_ID SensorID, long *iValue); + +/*! + \fn short MCHR_SetWhiteRefNormaFrq(MCHR_ID SensorID, long iValue) + \if FR + \brief Fonction permettant de parametrer la frequence du white ref de normalisation. + \else + \brief Sets normalization white ref frequency. + \endif + \details + \if FR + \param [in] MCHR_ID SensorID : ID du coffret. + \param [in] long *iValue : Frequence du white ref de normalisation. + \return short : un code d'erreur MCHR_ERROR. + \else + \param [in] MCHR_ID SensorID : ID of the device. + \param [in] long *iValue : Normalization white ref frequency. + \return short : A \link MCHR_ERROR MCHR_ERROR \endlink code. + \endif + \see MCHR_GetErrorDescription +*/ +DLL_CHR_API short MCHR_SetWhiteRefNormaFrq(MCHR_ID SensorID, long iValue); + +/*! + \fn short MCHR_GenerateOrEnableWhiteRef(MCHR_ID SensorID,short Preprocessed, short Generate, long iFirstPixel, long iNbPixels, char * pszFileName) + \if FR + \brief Fonction permettant de preparer le prise de white ref. + \else + \brief Prepare white ref computation. + \endif + \details + \if FR + \param [in] MCHR_ID SensorID : ID du coffret. + \param [] short Preprocessed : Signal utilise ('0' : Preprocessed, '1' : normalissation). + \param [] short Generate : Mode de selection ('0' : Generer un nouveau fichier, '1' : lire un fichier existant). + \param [] long iFirstPixel : Premier pixel utile pour l'acquisition du white ref. + \param [] long iNbPixels : Nombre de pixel utile pour l'acquisition du white ref. + \param [] char *pszFileName : Terminaison du nom de fichier de white ref. + \return short : un code d'erreur MCHR_ERROR. + \else + \param [in] MCHR_ID SensorID : ID of the device. + \param [in] short Preprocessed : Signal used for computation ('0' : Preprocessed, '1' : normalization). + \param [in] short Generate : File use mode ('0' : Generate new white ref file, '1' : read existing white ref file). + \param [in] long iFirstPixel : First pixel used for white ref acquisition. + \param [in] long iNbPixels : Number of pixels used for white ref acquisition. + \param [in] char *pszFileName : White ref end of file name. + \return short : A \link MCHR_ERROR MCHR_ERROR \endlink code. + \endif + \see MCHR_GetErrorDescription +*/ +DLL_CHR_API short MCHR_GenerateOrEnableWhiteRef(MCHR_ID SensorID, short Preprocessed, short Generate, long iFirstPixel, long iNbPixels, char * pszFileName); + +/*! + \fn short MCHR_GetWhiteRefAveraging(MCHR_ID SensorID, long *piMxs) + \if FR + \brief Fonction permettant de lire le taux de moyennage du white ref. + \deprecated + \else + \brief Reads white ref averaging factor. + \deprecated + \endif + \details + \if FR + \param [in] MCHR_ID SensorID : ID du coffret. + \param [out] long *piMxs : Facteur de moyennage du white ref. + \return short : un code d'erreur MCHR_ERROR. + \else + \param [in] MCHR_ID SensorID : ID of the device. + \param [out] long *piMxs : White ref averaging factor. + \return short : A \link MCHR_ERROR MCHR_ERROR \endlink code. + \endif + \see MCHR_GetErrorDescription +*/ +DLL_CHR_API short MCHR_GetWhiteRefAveraging(MCHR_ID SensorID, long *piMxs); + +/*! + \fn short MCHR_SetWhiteRefAveraging(MCHR_ID SensorID, long iMxs) + \if FR + \brief Fonction permettant de parametrer le taux de moyennage du white ref. + \deprecated. + \else + \brief Sets white ref averaging factor. + \deprecated + \endif + \details + \if FR + \param [in] MCHR_ID SensorID : ID du coffret. + \param [in] long iMxs : Facteur de moyennage du white ref. + \return short : un code d'erreur MCHR_ERROR. + \else + \param [in] MCHR_ID SensorID : ID of the device. + \param [in] long iMxs : White ref averaging factor. + \return short : A \link MCHR_ERROR MCHR_ERROR \endlink code. + \endif + \see MCHR_GetErrorDescription +*/ +DLL_CHR_API short MCHR_SetWhiteRefAveraging(MCHR_ID SensorID, long iMxs); + +/*! + \fn short MCHR_GetAutoWhiteRef (MCHR_ID SensorID, long *iEnabled) + \if FR + \brief Recupere l'etat de l'autowhiteref. + \else + \brief Get autowhiteref status. + \endif + \details + \if FR + \param [in] MCHR_ID SensorID : ID du coffret. + \param [out] long *iEnabled : 1 si l'autowhiteref est actif, 0 sinon. + \return short : un code d'erreur MCHR_ERROR. + \else + \param [in] MCHR_ID SensorID : ID of the device. + \param [out] long *iEnabled : 1 if Autowhiteref is enabled, 0 otherwise. + \return short : A \link MCHR_ERROR MCHR_ERROR \endlink code. + \endif + \see MCHR_GetErrorDescription + \par Compatibles Sensors : ALL +*/ +DLL_CHR_API short MCHR_GetAutoWhiteRef (MCHR_ID SensorID, long *iEnabled); + +/*! + \fn short MCHR_SetAutoWhiteRef (MCHR_ID SensorID, long iEnabled) + \if FR + \brief Active/Desactive l'autowhiteref. + \else + \brief Activate/Desactivate autowhiteref. + \endif + \details + \if FR + \param [in] MCHR_ID SensorID : ID du coffret. + \param [in] long iEnabled : 1 pour activer l'autowhiteref, 0 sinon. + \return short : un code d'erreur MCHR_ERROR. + \else + \param [in] MCHR_ID SensorID : ID of the device. + \param [in] long iEnabled : 1 to activate autowhiteref, 0 otherwise. + \return short : A \link MCHR_ERROR MCHR_ERROR \endlink code. + \endif + \see MCHR_GetErrorDescription +*/ +DLL_CHR_API short MCHR_SetAutoWhiteRef (MCHR_ID SensorID, long iEnabled); + +/*! + \fn short MCHR_AcqWhiteRef (MCHR_ID SensorID) + \if FR + \brief Lancement de l'acquisition du whiteref. + \else + \brief Launch whiteref acquisition. + \endif + \details + \if FR + \param [in] MCHR_ID SensorID : ID du coffret. + \return short : un code d'erreur MCHR_ERROR. + \else + \param [in] MCHR_ID SensorID : ID of the device. + \return short : A \link MCHR_ERROR MCHR_ERROR \endlink code. + \endif + \see MCHR_GetErrorDescription + \par Compatibles Sensors : ALL Except RUBY and CHR sensors +*/ +DLL_CHR_API short MCHR_AcqWhiteRef (MCHR_ID SensorID); + +/*! + \fn short MCHR_SetDoubleFrequencyParameters(MCHR_ID SensorID, short iEnabled, long iLowFreq, long iHighFrq, short IntensityNormalization) + \if FR + \brief Fonction permettant de parametrer le mode double frequence. + \warning Seulement pour les coffrets type CCS. + \else + \brief Function to set the double frequency mode. + \warning Only available for CCS devices. + \endif + \details + \if FR + \param [in] MCHR_ID SensorID : ID du coffret. + \param [in] short Enabled : Activation du mode double frequence (0 : inactif, 1 : actif). + \param [in] long iLowFreq : Frequence basse. + \param [in] long iHighFrq : Frequence haute. + \param [in] short IntensityNormalization : Normalisation de l'intensite (0 : pas de normalisation, 1 : normalisation). + \return short : un code d'erreur MCHR_ERROR. + \else + \param [in] MCHR_ID SensorID : ID of the device. + \param [in] short Enabled : Activate double frequency mode (0 : not active, 1 : active). + \param [in] long iLowFreq : Low Frequency. + \param [in] long iHighFrq : High Frequency. + \param [in] short IntensityNormalization : Intensity normalization (0 : no normalization, 1 : normalization). + \return short : A \link MCHR_ERROR MCHR_ERROR \endlink code. + \endif + \see MCHR_GetErrorDescription + \brief + \if FR + \par Capteurs Compatibles : CCS PRIMA, STIL-INITIAL. + \else + \par Compatibles Sensors : CCS PRIMA, STIL-INITIAL. + \endif +*/ +DLL_CHR_API short MCHR_SetDoubleFrequencyParameters(MCHR_ID SensorID, short Enabled, long iLowFreq, long iHighFrq, short IntensityNormalization); + +/*! + \fn short MCHR_GetDoubleFrequencyParameters(MCHR_ID SensorID, short *pEnabled, long *piLowFreq, long *piHighFrq, short *pIntensityNormalization) + \if FR + \brief Fonction permettant d'obtenir le mode double frequence. + \else + \brief Function to get the double frequency mode. + \endif + \details + \if FR + \param [in] MCHR_ID SensorID : ID du coffret. + \param [in] short *Enabled : Activation du mode double frequence (0 : inactif, 1 : actif). + \param [in] long *iLowFreq : Frequence basse. + \param [in] long *iHighFrq : Frequence haute. + \param [in] short *IntensityNormalization : Normalisation de l'intensite (0 : pas de normalisation, 1 : normalisation). + \return short : un code d'erreur MCHR_ERROR. + \else + \param [in] MCHR_ID SensorID : ID of the device. + \param [out] short *Enabled : Activate double frequency mode (0 : not active, 1 : active). + \param [out] long *iLowFreq : Low Frequency. + \param [out] long *iHighFrq : High Frequency. + \param [out] short *IntensityNormalization : Intensity normalization (0 : no normalization, 1 : normalization). + \return short : A \link MCHR_ERROR MCHR_ERROR \endlink code. + \endif + \see MCHR_GetErrorDescription + \par Compatibles Sensors : CCS PRIMA, STIL-INITIAL +*/ +DLL_CHR_API short MCHR_GetDoubleFrequencyParameters(MCHR_ID SensorID, short *pEnabled, long *piLowFreq, long *piHighFrq, short *pIntensityNormalization); + +/*! + \fn short MCHR_SetNonExistantSecondPeakHandling(MCHR_ID SensorID,enSecondPeakHandling enPeakHandling) + \if FR + \brief Fonction permettant de definir le type de prise en compte des pics lors de la mesure. + \else + \brief Function setting measurement second peak handling type. + \endif + \details + \if FR + \param [in] MCHR_ID SensorID : ID du coffret. + \param [in] enSecondPeakHandling enPeakHandling : Type de prise en compte des pics. + \return short : un code d'erreur MCHR_ERROR. + \else + \param [in] MCHR_ID SensorID : ID of the device. + \param [in] enSecondPeakHandling enPeakHandling : Measurement second peak handling type. + \return short : A \link MCHR_ERROR MCHR_ERROR \endlink code. + \endif + \see MCHR_GetErrorDescription +*/ +DLL_CHR_API short MCHR_SetNonExistantSecondPeakHandling(MCHR_ID SensorID,enSecondPeakHandling enPeakHandling); + +/*! + \fn short MCHR_GetNonExistantSecondPeakHandling(MCHR_ID SensorID,enSecondPeakHandling *enPeakHandling) + \if FR + \brief Fonction permettant de recuperer le type de prise en compte des pics lors de la mesure. + \else + \brief Function getting measurement second peak handling type. + \endif + \details + \if FR + \param [in] MCHR_ID SensorID : ID du coffret. + \param [out] \link enSecondPeakHandling enSecondPeakHandling \endlink *enPeakHandling : Type de prise en compte des pics. + \return short : un code d'erreur MCHR_ERROR. + \else + \param [in] MCHR_ID SensorID : ID of the device. + \param [out] enSecondPeakHandling *enPeakHandling : Measurement second peak handling type. + \return short : A \link MCHR_ERROR MCHR_ERROR \endlink code. + \endif + \see MCHR_GetErrorDescription +*/ +DLL_CHR_API short MCHR_GetNonExistantSecondPeakHandling(MCHR_ID SensorID,enSecondPeakHandling *enPeakHandling); + +/*! + \fn short MCHR_LockKeyboard(MCHR_ID SensorID,BOOL bLock) + \if FR + \brief Fonction permettant de bloquer/debloquer le clavier d'un coffret. + \warning Seulement pour CHR 150, RUBY, DUO or TRIO. + \else + \brief Locks or unlocks the device's keyboard. + \endif + \details + \if FR + \param [in] MCHR_ID SensorID : ID du coffret. + \param [in] BOOL bLock : true pour activer le blocage et false pour le desactiver. + \return short : un code d'erreur MCHR_ERROR. + \else + \param [in] MCHR_ID SensorID : ID of the device. + \param [in] BOOL bLock : true to activate blocking and false to desactivate it. + \return short : A \link MCHR_ERROR MCHR_ERROR \endlink code. + \endif + \see MCHR_GetErrorDescription + \brief + \if FR + \brief Capteurs Compatibles : Seulement CHR 150, RUBY, DUO or TRIO.

+ \else + \par Compatibles Sensors : Only CHR 150, RUBY, DUO or TRIO. + \endif +*/ +DLL_CHR_API short MCHR_LockKeyboard(MCHR_ID SensorID,BOOL bLock); + +/*! + \fn short MCHR_GetSpectralCalibration(MCHR_ID SensorID, double *pCoefArray, long *piCoefArraySize) + \if FR + \brief Fonction permettant de recuperer les coeficients de calibration spectrale. + \warning Seulement pour CHR 150, RUBY, DUO or TRIO. + \else + \brief Function getting spectral calibration coeficients. + \warning Only for CHR 150, RUBY, DUO or TRIO. + \endif + \details + \if FR + \param [in] MCHR_ID SensorID : ID du coffret. + \param [out] double *pCoefArray : Tableau de coeficients de calibration. + \param [out] long *piCoefArraySize : Taille du tableau de coeficients. + \return short : un code d'erreur MCHR_ERROR. + \else + \param [in] MCHR_ID SensorID : ID of the device. + \param [out] double *pCoefArray : Calibration coeficients array. + \param [out] long *piCoefArraySize : Size of the calibration coeficients array. + \return short : A \link MCHR_ERROR MCHR_ERROR \endlink code. + \endif + \see MCHR_GetErrorDescription +*/ +DLL_CHR_API short MCHR_GetSpectralCalibration(MCHR_ID SensorID, double *pCoefArray, long *piCoefArraySize); + +/*! + \fn short MCHR_SetSpectralCalibration(MCHR_ID SensorID, double *pCoefArray, lonf iCoefArraySize) + \if FR + \brief Fonction permettant de parametrer les coeficients de calibration spectrale. + \else + \brief Function setting spectral calibration coeficients. + \endif + \details + \if FR + \param [in] MCHR_ID SensorID : ID du coffret. + \param [in] double *pCoefArray : Tableau de coeficients de calibration. + \param [in] long piCoefArraySize : Taille du tableau de coeficients. + \return short : un code d'erreur MCHR_ERROR. + \else + \param [in] MCHR_ID SensorID : ID of the device. + \param [in] double *pCoefArray : Calibration coeficients array. + \param [in] long piCoefArraySize : Size of the calibration coeficients array. + \return short : A \link MCHR_ERROR MCHR_ERROR \endlink code. + \endif + \see MCHR_GetErrorDescription + \par Compatibles Sensors : CHR 150, RUBY, DUO or TRIO +*/ +DLL_CHR_API short MCHR_SetSpectralCalibration(MCHR_ID SensorID, double *pCoefArray, long iCoefArraySize); + +/*! + \fn short MCHR_GetSpectralRefractivesIndexes(MCHR_ID SensorID, double *pCoefArray, long *piCoefArraySize) + \if FR + \brief Fonction permettant de recuperer les indice de refractions. + \else + \brief Function getting refractive indexes. + \endif + \details + \if FR + \param [in] MCHR_ID SensorID : ID du coffret. + \param [out] double *pCoefArray : Tableau de coeficients de refraction. + \param [out] long *piCoefArraySize : Taille du tableau de coeficients. + \return short : un code d'erreur MCHR_ERROR. + \else + \param [in] MCHR_ID SensorID : ID of the device. + \param [out] double *pCoefArray : Refarctive indexes coeficients array. + \param [out] long *piCoefArraySize : Size of the calibration coeficients array. + \return short : A \link MCHR_ERROR MCHR_ERROR \endlink code. + \endif + \see MCHR_GetErrorDescription + \brief + \if FR + \brief Capteurs Compatibles :ATTENTION UNIQUEMENT CHR 150, RUBY, DUO or TRIO + \else + \par Compatibles Sensors :WARNING CHR 150, RUBY, DUO or TRIO ONLY + \endif +*/ +DLL_CHR_API short MCHR_GetSpectralRefractivesIndexes(MCHR_ID SensorID, double *pCoefArray, long *piCoefArraySize); + +/*! + \fn short MCHR_SetSpectralRefractivesIndexes(MCHR_ID SensorID, double *pCoefArray, long iCoefArraySize) + \if FR + \brief Fonction permettant de parametrer les indice de refractions. + \else + \brief Function setting refractive indexes. + \endif + \details + \if FR + \param [in] MCHR_ID SensorID : ID du coffret. + \param [in] double *pCoefArray : Tableau d'indices de refraction. + \param [in] long piCoefArraySize : Taille du tableau d'indice. + \return short : un code d'erreur MCHR_ERROR. + \else + \param [in] MCHR_ID SensorID : ID of the device. + \param [in] double *pCoefArray : Refractive indexes coeficients array. + \param [in] long piCoefArraySize : Size of the refractive indexes array. + \return short : A \link MCHR_ERROR MCHR_ERROR \endlink code. + \endif + \see MCHR_GetErrorDescription + \brief + \if FR + \par Compatibles Sensors : WARNING CHR 150, RUBY, DUO or TRIO ONLY + \else + \par Compatibles Sensors : WARNING CHR 150, RUBY, DUO or TRIO ONLY + \endif +*/ +DLL_CHR_API short MCHR_SetSpectralRefractivesIndexes(MCHR_ID SensorID, double *pCoefArray, long iCoefArraySize); + +/*! + \fn short MCHR_EnableExternalThicknessProcessing(MCHR_ID SensorID, BOOL bEnable,WORD wRefractiveIndexFileID) + \if FR + \brief Fonction permettant d'activer le calcul d'epaisseur extrenalise. + \else + \brief Function activating external thickness processing. + \endif + \details + \if FR + \param [in] MCHR_ID SensorID : ID du coffret. + \param [in] BOOL bEnable : true pour activer la fonctionnalite. + \param [in] WORD wRefractiveIndexFileID : Fichier d'indice de refraction. + \return short : un code d'erreur MCHR_ERROR. + \else + \param [in] MCHR_ID SensorID : ID of the device. + \param [in] BOOL bEnable : true to enable external thickness processing. + \param [in] WORD wRefractiveIndexFileID : Refractive indexes file. + \return short : A \link MCHR_ERROR MCHR_ERROR \endlink code. + \endif + \see MCHR_GetErrorDescription + \par Compatibles Sensors : ALL Except RUBY Sensor +*/ +DLL_CHR_API short MCHR_EnableExternalThicknessProcessing(MCHR_ID SensorID, BOOL bEnable, WORD wRefractiveIndexFileID); + + +/************************************************************************** + ** White signal Acquisition ** + **************************************************************************/ +//??? +//DLL_CHR_API short MCHR_GetWhiteRefMaxThreshold(MCHR_ID SensorID,long *piMxs); +//DLL_CHR_API short MCHR_SetWhiteRefMaxThreshold(MCHR_ID SensorID,long iMxs); + + +/************************************************************************** + ** Black signal Acquisition ** + **************************************************************************/ + +/*! + \fn short MCHR_GetBlackMaxThreshold(MCHR_ID SensorID, long *piMxs); + \if FR + \brief Obtient le seuil maximum du black ref + \else + \brief Obtient the black Maximum Threshold + \endif + \details + \if FR + \param [in] MCHR_ID SensorID : ID du coffret. + \param [out] long *piMxs : Value of the black Max Threshold + \return short : un code d'erreur MCHR_ERROR. + \else + \param [in] MCHR_ID SensorID : ID of the device. + \param [out] long *piMxs : Value of the black Max Threshold + \return short : A \link MCHR_ERROR MCHR_ERROR \endlink code. + \endif + \see MCHR_GetErrorDescription +*/ +DLL_CHR_API short MCHR_GetBlackMaxThreshold(MCHR_ID SensorID, long *piMxs); + +/*! + \fn short MCHR_SetBlackMaxThreshold(MCHR_ID SensorID, long iMxs); + \if FR + \brief Configure le seuil maximum du black ref + \else + \brief Set the bblack Maximum Threshold + \endif + \details + \if FR + \param [in] MCHR_ID SensorID : ID du coffret. + \param [in] long iMxs : Value of the black Max Threshold + \return short : un code d'erreur MCHR_ERROR. + \else + \param [in] MCHR_ID SensorID : ID of the device. + \param [in] long iMxs : Value of the black Max Threshold + \return short : A \link MCHR_ERROR MCHR_ERROR \endlink code. + \endif + \see MCHR_GetErrorDescription +*/ +DLL_CHR_API short MCHR_SetBlackMaxThreshold(MCHR_ID SensorID, long iMxs); + +/*! + \fn short MCHR_GetBlackAveraging(MCHR_ID SensorID, long *piMxs); + \if FR + \brief Obtient le moyennage du black signal + \else + \brief Get the Averaging of the black signal + \endif + \details + \if FR + \param [in] MCHR_ID SensorID : ID du coffret. + \param [in] long *piMxs : Value of the black averaging + \return short : un code d'erreur MCHR_ERROR. + \else + \param [in] MCHR_ID SensorID : ID of the device. + \param [in] long *piMxs : Value of the black averaging + \return short : A \link MCHR_ERROR MCHR_ERROR \endlink code. + \endif + \see MCHR_GetErrorDescription +*/ +DLL_CHR_API short MCHR_GetBlackAveraging(MCHR_ID SensorID, long *piMxs); + +/*! + \fn short MCHR_SetBlackAveraging(MCHR_ID SensorID, long iMxs); + \if FR + \brief Configure le moyennage du black signal + \else + \brief Set the Averaging of the black signal + \endif + \details + \if FR + \param [in] MCHR_ID SensorID : ID du coffret. + \param [in] long iMxs : Value of the black averaging + \return short : un code d'erreur MCHR_ERROR. + \else + \param [in] MCHR_ID SensorID : ID of the device. + \param [in] long iMxs : Value of the black averaging + \return short : A \link MCHR_ERROR MCHR_ERROR \endlink code. + \endif + \see MCHR_GetErrorDescription +*/ +DLL_CHR_API short MCHR_SetBlackAveraging(MCHR_ID SensorID, long iMxs); + +/*! + \fn short MCHR_AcqBlack (MCHR_ID SensorID, void *pMinFreq); + \if FR + \brief Acquiere le black signal ?toutes fr閝uences, et retourne la fr閝uence minimun. + \else + \brief Acquire black signal at all frequencies, and returns the minimum frequency. + \endif + \details + \if FR + \param [in] MCHR_ID SensorID : ID du coffret. + \param [in] INT iMxs : Value of the black averaging + \return short : un code d'erreur MCHR_ERROR. + \else + \param [in] MCHR_ID SensorID : ID of the device. + \param [in] void *pMinFreq : Mimimun frequency + \return short : A \link MCHR_ERROR MCHR_ERROR \endlink code. + \endif + \see MCHR_GetErrorDescription +*/ +DLL_CHR_API short MCHR_AcqBlack (MCHR_ID SensorID, void *pMinFreq); + +//Acquire "fast dark" (at current rate only) +//DLL_CHR_API short MCHR_AcqFastBlack (MCHR_ID SensorID, WORD Average, float InfluenceValue); + +/*! + \fn short MCHR_GetMaxCalibrationFileValue (MCHR_ID SensorID, PWORD pFullScale); + \if FR + \brief Obtient La valeur maximum du fichier de calibration. + \warning Voir la fonction MCHR_GetMaxCalibrationFileValueEx pour utiliser le parametre pFullScale dans un format DWORD (?partir de la DLL_CHR V3.2.0.00)! + \else + \brief Get the maximum value of the calibration file. + \warning See MCHR_GetMaxCalibrationFileValueEx Function to use pFullScale parameter on DWORD Format (from DLL_CHR V3.2.0.00)! + \endif + \details + \if FR + \param [in] MCHR_ID SensorID : ID du coffret. + \param [in] PWORD pFullScale : + \return short : un code d'erreur MCHR_ERROR. + \else + \param [in] MCHR_ID SensorID : ID of the device. + \param [in] PWORD pFullScale : Maximum value + \return short : A \link MCHR_ERROR MCHR_ERROR \endlink code. + \endif + \see MCHR_GetErrorDescription +*/ +DLL_CHR_API short MCHR_GetMaxCalibrationFileValue (MCHR_ID SensorID, PWORD pFullScale); + + +/*! + \fn short MCHR_GetMaxCalibrationFileValueEx (MCHR_ID SensorID, PDWORD pFullScale); + \if FR + \brief Obtient La valeur maximum du fichier de calibration. + \warning Remplace la fonction MCHR_GetMaxCalibrationFileValue. + \else + \brief Get the maximum value of the calibration file. + \warning Replace the MCHR_GetMaxCalibrationFileValue Function. + \endif + \details + \if FR + \param [in] MCHR_ID SensorID : ID du coffret. + \param [in] PDWORD pFullScale : + \return short : un code d'erreur MCHR_ERROR. + \else + \param [in] MCHR_ID SensorID : ID of the device. + \param [in] PDWORD pFullScale : Maximum value + \return short : A \link MCHR_ERROR MCHR_ERROR \endlink code. + \endif + \see MCHR_GetErrorDescription +*/ +DLL_CHR_API short MCHR_GetMaxCalibrationFileValueEx (MCHR_ID SensorID, PDWORD pFullScale); + +/*! + \fn short MCHR_SetLanguage (MCHR_ID SensorID, char *szLanguage); + \if FR + \brief Configure le language d'utilisation. + \else + \brief Set the sensor language. + \endif + \details + \if FR + \param [in] MCHR_ID SensorID : ID du coffret. + \param [in] char *szLanguage : Code du language + \return short : un code d'erreur MCHR_ERROR. + \else + \param [in] MCHR_ID SensorID : ID of the device. + \param [in] char *szLanguage : code of language + \return short : A \link MCHR_ERROR MCHR_ERROR \endlink code. + \endif + \see MCHR_GetErrorDescription +*/ +DLL_CHR_API short MCHR_SetLanguage (MCHR_ID SensorID, char *szLanguage); + +/*! + \fn short MCHR_GetLanguage (MCHR_ID SensorID, char *szLanguage, long iLength); + \if FR + \brief Obtient le language d'utilisation. + \else + \brief Get the sensor language. + \endif + \details + \if FR + \param [in] MCHR_ID SensorID : ID du coffret. + \param [in] char *szLanguage : Code du language + \param [in] long iLength : longueur de la chaine + \return short : un code d'erreur MCHR_ERROR. + \else + \param [in] MCHR_ID SensorID : ID of the device. + \param [in] CHAR *szLanguage : code of language + \param [in] long iLength : size of string + \return short : A \link MCHR_ERROR MCHR_ERROR \endlink code. + \endif + \see MCHR_GetErrorDescription +*/ +DLL_CHR_API short MCHR_GetLanguage (MCHR_ID SensorID, char *szLanguage, long iLength); + + +/*! + \fn short MCHR_SendColorReference (MCHR_ID SensorID, char *ColorRefFile, CALLBACK_SEND_FILE CallBackFct) + \if FR + \brief Fonction d'envoi du fichier de reference de couleur dans le SPECTRO. + \else + \brief Function Download the Color Reference file to the SPECTRO. + \endif + \details + \if FR + \param [in] MCHR_ID SensorID : ID du coffret. + \param [in] char *ColorRefFile : Nom du fichier contenant les param鑤res de reference de couleurs ?telecharger + \param [out] CALLBACK_SEND_FILE CallBackFct : Fonction callback appelee pendant le telechargement + \return short : un code d'erreur MCHR_ERROR. + \else + \param [in] MCHR_ID SensorID : ID of the device. + \param [in] char *ColorRefFile : file name with the color reference parameters to be downloaded + \param [out] CALLBACK_SEND_FILE CallBackFct : Function callback during the download + \return short : A \link MCHR_ERROR MCHR_ERROR \endlink code. + \endif + \see MCHR_GetErrorDescription +*/ + +DLL_CHR_API short MCHR_SendColorReference (MCHR_ID SensorID, char *ColorRefFile, CALLBACK_SEND_FILE CallBackFct); + +/*! + \fn short MCHR_SendReferenceSpectrum (MCHR_ID SensorID, char *RefSpectrumFile, CALLBACK_SEND_FILE CallBackFct) + \if FR + \brief Fonction d'envoi du fichier de spectre de reference dans le SPECTRO. + \else + \brief Function Download the Reference Spectrum file to the SPECTRO. + \endif + \details + \if FR + \param [in] MCHR_ID SensorID : ID du coffret. + \param [in] char *RefSpectrumFile : Nom du fichier contenant le spectre de reference ?telecharger + \param [out] CALLBACK_SEND_FILE CallBackFct : + \return short : un code d'erreur MCHR_ERROR. + \else + \param [in] MCHR_ID SensorID : ID of the device. + \param [in] char *RefSpectrumFile : name file with the reference spectral to be downloaded + \param [out] CALLBACK_SEND_FILE CallBackFct : Function callback during the download + \return short : A \link MCHR_ERROR MCHR_ERROR \endlink code. + \endif + \see MCHR_GetErrorDescription +*/ + +DLL_CHR_API short MCHR_SendReferenceSpectrum (MCHR_ID SensorID, char *RefSpectrumFile, CALLBACK_SEND_FILE CallBackFct); + + +/*! + \fn short MCHR_GetSmoothingValue(MCHR_ID SensorID, long *pSmoothingValue) + \if FR + \brief Fonction de lecture de l'indice de lissage. + \else + \brief Function Get current smoothing index. + \endif + \details + \if FR + \param [in] MCHR_ID SensorID : ID du coffret. + \param [in] long *pSmoothingValue : + \return short : un code d'erreur MCHR_ERROR. + \else + \param [in] MCHR_ID SensorID : ID of the device. + \param [in] long *pSmoothingValue : Value of smoothing index + \return short : A \link MCHR_ERROR MCHR_ERROR \endlink code. + \endif + \see MCHR_GetErrorDescription +*/ + +DLL_CHR_API short MCHR_GetSmoothingValue(MCHR_ID SensorID, long *pSmoothingValue); +/* ------------------------------------------------------------------------- */ + +/*! + \fn short MCHR_GetFirstCCDPixelRead(MCHR_ID SensorID, long *iPixel); + \if FR + \brief Obtient le premier pixel lu par le CDD + \else + \brief Get the first pixel readed by the CDD. + \endif + \details + \if FR + \param [in] MCHR_ID SensorID : ID du coffret. + \param [in] long *iPixel : Valeur du premier pixel. + \return short : un code d'erreur MCHR_ERROR. + \else + \param [in] MCHR_ID SensorID : ID of the device. + \param [out] long *iPixel : Value of the first pixel. + \return short : A \link MCHR_ERROR MCHR_ERROR \endlink code. + \endif + \see MCHR_GetErrorDescription +*/ +DLL_CHR_API short MCHR_GetFirstCCDPixelRead(MCHR_ID SensorID, long *iPixel); + +/*! + \fn short MCHR_SetSmoothingValue (MCHR_ID SensorID, long SmoothingValue) + \if FR + \brief Fonction de parametrage de l'indice de lissage. + \else + \brief Function Set smothing value. + \endif + \details + \if FR + \param [in] MCHR_ID SensorID : ID du coffret. + \param [in] long SmoothingValue : + \return short : un code d'erreur MCHR_ERROR. + \else + \param [in] MCHR_ID SensorID : ID of the device. + \param [in] long SmoothingValue : Value of smoothing index + \return short : A \link MCHR_ERROR MCHR_ERROR \endlink code. + \endif + \see MCHR_GetErrorDescription + +*/ + +DLL_CHR_API short MCHR_SetSmoothingValue (MCHR_ID SensorID, long SmoothingValue); + +/*! + \fn short MCHR_GetMultiplexChannel(MCHR_ID SensorID, WORD *piChannel) + \if FR + \brief Fonction pour detecter l'ID du canal utilise sur le capteur. (0 par defaut) + \else + \brief Function Get the chanel ID currently used by the sensor (by default 0). + \details + \if FR + \param [in] MCHR_ID SensorID : ID du coffret. + \param [out] WORD *piChannel : ID du canal utilise + \return short : un code d'erreur MCHR_ERROR. + \else + \param [in] MCHR_ID SensorID : ID of the device. + \param [out] WORD *piChannel : Chanel ID in use + \return short : A \link MCHR_ERROR MCHR_ERROR \endlink code. + \endif + \see MCHR_GetErrorDescription + \if FR + \brief Capteurs Compatibles : MULTIPLEX CCS PRIMA.

+ \else + \par Compatibles Sensors : MULTIPLEX CCS PRIMA + \endif +*/ +DLL_CHR_API short MCHR_GetMultiplexChannel(MCHR_ID SensorID, WORD *piChannel); + +/*! + \fn short MCHR_SetMultiplexChannel(MCHR_ID SensorID, WORD iChannel) + \if FR + \brief Fonction pour parametrer l'ID du canal utilise sur le capteur. + \else + \brief Function Set the chanel ID used by the sensor. + \endif + \details + \if FR + \param [in] MCHR_ID SensorID : ID du coffret. + \param [in] WORD iChannel : ID du canal selectionne + \return short : un code d'erreur MCHR_ERROR. + \else + \param [in] MCHR_ID SensorID : ID of the device. + \param [in] WORD iChannel : Selected Chanel ID + \return short : A \link MCHR_ERROR MCHR_ERROR \endlink code. + \endif + \see MCHR_GetErrorDescription + \brief + \if FR + \par Compatibles Sensors : MULTIPLEX CCS PRIMA + \else + \par Compatibles Sensors : MULTIPLEX CCS PRIMA + \endif +*/ +DLL_CHR_API short MCHR_SetMultiplexChannel(MCHR_ID SensorID, WORD iChannel); + +/* Returns the number of channels provided by the sensor */ + +/*! + \fn short MCHR_GetMultiplexChannelNumber(MCHR_ID SensorID, WORD *pwChannelNumber) + \if FR + \brief Fonction pour detecter le nombre de canaux dont le capteur est pourvu. + \else + \brief Function Get the number of channels provided by the sensor. + \endif + \details + \if FR + \param [in] MCHR_ID SensorID : ID du coffret. + \param [out] WORD *pwChannelNumber : Nombre de canaux du capteur + \return short : un code d'erreur MCHR_ERROR. + \else + \param [in] MCHR_ID SensorID : ID of the device. + \param [out] WORD *pwChannelNumber : Number of chanels + \return short : A \link MCHR_ERROR MCHR_ERROR \endlink code. + \endif + \see MCHR_GetErrorDescription + \brief + \if FR + \brief Capteurs Compatibles : MULTIPLEX CCS PRIMA

+ \else + \par Compatibles Sensors : MULTIPLEX CCS PRIMA + \endif +*/ + +DLL_CHR_API short MCHR_GetMultiplexChannelNumber(MCHR_ID SensorID, WORD *pwChannelNumber); + +/*! + \fn short MCHR_AcqMultiplexDark(MCHR_ID SensorID, long *pMinFreq,WORD wNbFreqElem) + \if FR + \brief Fonction Acquisition du signal Dark sur tous les canaux du CCS PRIMA multiplexe. ( contraire de MCHR_AcqDark qui acquiere le Dark uniquement sur le canal courant). + \else + \brief Function Acquire dark signal for all CCS PRIMA multiplex channels. (in contrast with the MCHR_AcqDark which acquires ans saves the Dark for the current channel only). + \endif + \details + \if FR + \param [in] MCHR_ID SensorID : ID du coffret. + \param [out] long *pMinFreq : Tableau d'entiers allou?par l'appelant et rempli par la DLL avec les frequences minimum permises sur chaque canal + \param [out] WORD wNbFreqElem : Nombre des elements alloues pour pMinFreq (doit etre egal au nombre de canaux disponibles sur le capteur) + \return short : un code d'erreur MCHR_ERROR. la fonction retourne une erreur si elle est appel?pour un seul canal du capteur. + \else + \param [in] MCHR_ID SensorID : ID of the device. + \param [out] long *pMinFreq : Array of integer allocated by the caller that with be filled by the DLL with the minimum frequencies allowed for each channels + \param [out] WORD wNbFreqElem : Number of elements allocated for pMinFreq (should be equal to the number of channels available on the device) + \return short : A \link MCHR_ERROR MCHR_ERROR \endlink code. The function return an error if called for single-channel sensors. + \endif + \see MCHR_GetErrorDescription + \if FR + \brief Capteurs Compatibles : MULTIPLEX CCS PRIMA.

+ \else + \par Compatibles Sensors : MULTIPLEX CCS PRIMA. + \endif +*/ + +DLL_CHR_API short MCHR_AcqMultiplexDark(MCHR_ID SensorID, long *pMinFreq, WORD wNbFreqElem); +/* ------------------------------------------------------------------------- */ + +#if defined(_cplusplus) || defined(__cplusplus) +} +#endif /* _cplusplus */ + +#endif \ No newline at end of file diff --git a/PcDmis/Base/Interfac/Msi/Hsi/STIL/Common/inc/MchrDefine.h b/PcDmis/Base/Interfac/Msi/Hsi/STIL/Common/inc/MchrDefine.h new file mode 100644 index 0000000..da9e492 --- /dev/null +++ b/PcDmis/Base/Interfac/Msi/Hsi/STIL/Common/inc/MchrDefine.h @@ -0,0 +1,545 @@ +/************************************************************************/ +/* STIL * Software Departement */ +/*----------------------------------------------------------------------*/ +/* */ +/* MchrDefine.h */ +/* */ +/*----------------------------------------------------------------------*/ +/* Project .................................. CHR DLL */ +/* Reference documents */ +/* Programming Language ................. Visual C++ v6.0 */ +/* Starting date ................... 16/01/2003 */ +/* Date of last update ............. */ +/* Author(s)................................. DMO */ +/* Required Files .........................none */ +/* Required hardware .................... PC Pentium 350 Mhz */ +/* Prefix ........... MCHR_ */ +/*----------------------------------------------------------------------*/ +/* This HEADER file defines constants */ +/* */ +/* */ +/*----------------------------------------------------------------------*/ +/* V? | Date |AUTHOR| COMMENTS */ +/*-------+---------- +--------------------------------------------------*/ +/* 01 | 05 Sept 03| DMO | Initial version */ +/* 02 | 18 Nov 05| DMO | Ethernet, XE, download */ +/* 03 | 07 Mar. 08| RSA | Max number devices set to 8 */ +/*----------------------------------------------------------------------*/ + +#ifndef MCHRDEFINE_H +#define MCHRDEFINE_H + + +#if defined(_cplusplus) || defined(__cplusplus) +extern "C" { +#endif /* _cplusplus */ + +/*! + \def MCHR_MAX_SENSOR + \if FR + Nombre maximum de capteur pouvant 阾re gere par la DLL + \else + Maximum number of sensors that can be handled by the DLL + \endif +*/ +#define MCHR_MAX_SENSOR 16 + +/*! + \def MCHR_MAX_REFRACTIVE_INDEX + \if FR + Nombre maximum de d'indice de refraction pouvant 阾re gere par un capteur + \else + Maximum number of refractive indexes that can be handled by a sensor + \endif +*/ +#define MCHR_MAX_REFRACTIVE_INDEX 8 + +/*! + \def MCHR_USB_DEVICE_NAME_LENGTH + \if FR + Taille max du nom de peripherique USB + \else + Max length of Usb device name + \endif +*/ +#define MCHR_USB_DEVICE_NAME_LENGTH 50 + +/*! + \def MCHR_MAX_DIGITAL_DATA + \if FR + Nombre de donnees max mesurees par un capteur + \else + Max number of data measured at each physical point + \endif +*/ +#define MCHR_MAX_DIGITAL_DATA 16 + +/*! + \def MCHR_ANALOG_OUTPUT_NUMBER + \if FR + Nombre de sorties analogique max d'un capteur + \else + Max number of analog outputs for a sensor + \endif +*/ +#define MCHR_ANALOG_OUTPUT_NUMBER 2 + +/*! + \def MCHR_MAX_ENCODER + \if FR + Nombre de codeur max pour un capteur + \else + Max number of encoders for a sensor + \endif +*/ +#define MCHR_MAX_ENCODER 3 + +/*! + \def MCHR_MAX_PEN_CHR_150 + \if FR + Nombre de crayon max dans un CHR-150. + \else + Max number of opticals pens ( = calibration tables) by CHR 150 + \endif +*/ +#define MCHR_MAX_PEN_CHR_150 6 +/*! + \def MCHR_MAX_PEN_CHR_450 + \if FR + Nombre de crayon max dans un CHR-450. + \else + Max number of opticals pens ( = calibration tables) by CHR 450 + \endif +*/ +#define MCHR_MAX_PEN_CHR_450 6 +/*! + \def MCHR_MAX_PEN_CHR_XE + \if FR + Nombre de crayon max dans un CHR-XE. + \else + Max number of opticals pens ( = calibration tables) by CHR XE + \endif +*/ +#define MCHR_MAX_PEN_CHR_XE 6 +/*! + \def MCHR_MAX_PEN_CHR_XE_E + \if FR + Nombre de crayon max dans un CHR-XE. + \else + Max number of opticals pens ( = calibration tables) by CHR XE + \endif +*/ +#define MCHR_MAX_PEN_CHR_XE_E 20 +/*! + \def MCHR_MAX_PEN_CCS_ALPHA + \if FR + Nombre de crayon max dans un CCS ALPHA. + \else + Max number of opticals pens ( = calibration tables) by CCS ALPHA + \endif +*/ +#define MCHR_MAX_PEN_CCS_ALPHA 20 +/*! + \def MCHR_MAX_PEN_CCS_PRIMA + \if FR + Nombre de crayon max dans un CCS PRIMA. + \else + Max number of opticals pens ( = calibration tables) by CCS PRIMA. + \endif +*/ +#define MCHR_MAX_PEN_CCS_PRIMA 20 +/*! + \def MCHR_MAX_PEN_CCS_OPTIMA + \if FR + Nombre de crayon max dans un CCS OPTIMA. + \else + Max number of opticals pens ( = calibration tables) by CCS OPTIMA + \endif +*/ +#define MCHR_MAX_PEN_CCS_OPTIMA 20 +/*! + \def MCHR_MAX_PEN_CCS_ULTIMA + \if FR + Nombre de crayon max dans un CCS ULTIMA. + \else + Max number of opticals pens ( = calibration tables) by CCS ULTIMA + \endif +*/ +#define MCHR_MAX_PEN_CCS_ULTIMA 20 +/*! + \def MCHR_MAX_PEN_CCS_INITIAL + \if FR + Nombre de crayon max dans un CCS INITIAL. + \else + Max number of opticals pens ( = calibration tables) by CCS INITIAL. + \endif +*/ +#define MCHR_MAX_PEN_CCS_INITIAL 1 +/*! + \def MCHR_MAX_PEN_TRIO + \if FR + Nombre de crayon max dans un TRIO. + \else + Max number of opticals pens ( = calibration tables) by TRIO. + \endif +*/ +#define MCHR_MAX_PEN_TRIO 20 +/*! + \def MCHR_MAX_PEN_RUBY + \if FR + Nombre de crayon max dans un RUBY. + \else + Max number of opticals pens ( = calibration tables) by RUBY + \endif +*/ +#define MCHR_MAX_PEN_RUBY 20 +/*! + \def MCHR_MAX_PEN_CHR + \if FR + Nombre de crayon max dans un CHR. + \else + Max number of opticals pens ( = calibration tables) by CHR. + \endif +*/ +#define MCHR_MAX_PEN_CHR MCHR_MAX_PEN_CHR_150 +/*! + \def MCHR_MAX_EXPOSURE_CHR_150 + \if FR + Definition du temps d'exposition MAXIMUM pour un capteur. + \warning Fonction non autorisee pour le CHR 150. + \else + MAXIMUM exposure time in microsec for a sensor. + \warning COMMAND NOT AUTHORIZED for CHR 150. + \endif +*/ +#define MCHR_MAX_EXPOSURE_CHR_150 0 /* Non applicable sur CHR-150 */ + /* Command not authorized for CHR 150 */ +/*! + \def MCHR_MIN_EXPOSURE_CHR_150 + \if FR + Definition du temps d'exposition MINIMUM pour un capteur. + \warning Fonction non autorisee pour le CHR 150. + \else + MINIMUM exposure time in microsec for a sensor. + \warning COMMAND NOT AUTHORIZED for CHR 150. + \endif +*/ +#define MCHR_MIN_EXPOSURE_CHR_150 0 /* Non applicable sur CHR-150 */ + /* Command not authorized for CHR 150 */ +/*! + \def MCHR_MAX_EXPOSURE_CHR_450 + \if FR + Definition du temps d'exposition MAXIMUM pour un CHR 450
+ 30000 correspond ?la fr閝uence 33Hz. + \else + MAXIMUM exposure time in microsec for CHR 450.
+ 30000 correspond to the frequency 33Hz. + \endif +*/ +#define MCHR_MAX_EXPOSURE_CHR_450 30000 /* Correspond ?la Freq 33Hhz */ + /* Corresponds to 33Hz */ +/*! + \def MCHR_MIN_EXPOSURE_CHR_450 + \if FR + Definition du temps d'exposition MINIMUM pour un CHR 450. + 250 correspond ?la fr閝uence 4 KHz. + \else + MINIMUM exposure time in microsec for CHR 450. + 250 correspond to the frequency 4 kHz. + \endif +*/ +#define MCHR_MIN_EXPOSURE_CHR_450 250 /* Correspond la freq 4Khz */ + /* Corresponds to 4KHz */ +/*! + \def MCHR_MAX_EXPOSURE_CHR_XE + \if FR + Definition du temps d'exposition MAXIMUM pour un CHR XE
+ 30000 correspond ?la fr閝uence 33Hz. + \else + MAXIMUM exposure time in microsec for CHR XE
+ 30000 correspond to the frequency 33Hz. + \endif +*/ +#define MCHR_MAX_EXPOSURE_CHR_XE 30000 /* Correspond ?la Freq 33Hhz */ + /* Corresponds to 33Hz */ +/*! + \def MCHR_MIN_EXPOSURE_CHR_XE + \if FR + Definition du temps d'exposition MINIMUM pour un CHR XE. + 100 correspond ?la fr閝uence 10 KHz. + \else + MINIMUM exposure time in microsec for CHR XE. + 100 correspond to the frequency 10 kHz. + \endif +*/ +#define MCHR_MIN_EXPOSURE_CHR_XE 100 /* Correspond la freq 10Khz */ + /* Corresponds to 10KHz */ +/*! + \def MCHR_MAX_EXPOSURE_CHR_XE_E + \if FR + Definition du temps d'exposition MAXIMUM pour un CHR XE_E
+ 30000 correspond ?la fr閝uence 33 Hz. + \else + MAXIMUM exposure time in microsec for CHR XE_E.
+ 30000 correspond to the frequency 33 Hz. + \endif +*/ +#define MCHR_MAX_EXPOSURE_CHR_XE_E 30000 /* Correspond ?la Freq 33Hhz */ + /* Corresponds to 33Hz */ +/*! + \def MCHR_MIN_EXPOSURE_XE_E + \if FR + Definition du temps d'exposition MINIMUM pour un CHR XE_E. + 32 correspond ?la fr閝uence 31,250 Khz. + \else + MINIMUM exposure time in microsec for CHR XE_E. + 32 correspond to the frequency 31,250 Khz. + \endif +*/ +#define MCHR_MIN_EXPOSURE_CHR_XE_E 32 /* Correspond la freq 31Khz250 */ + /* Corresponds to 31250 Hz */ +/*! + \def MCHR_MAX_EXPOSURE_CCS_ALPHA + \if FR + Definition du temps d'exposition MAXIMUM pour un CCS ALPHA
+ 25000 correspond ?la fr閝uence 40 Hz. + \else + MAXIMUM exposure time in microsec for CCS ALPHA.
+ 25000 correspond to the frequency 40 Hz. + \endif +*/ +#define MCHR_MAX_EXPOSURE_CCS_ALPHA 25000 /* Correspond ?la Freq 40 Hz */ + /* Corresponds to 40 Hz */ +/*! + \def MCHR_MIN_EXPOSURE_CCS_ALPHA + \if FR + Definition du temps d'exposition MINIMUM pour un CCS ALPHA. + 500 correspond ?la fr閝uence 2 KHz. + \else + MINIMUM exposure time in microsec for CHR CCS ALPHA. + 500 correspond to the frequency 2 kHz. + \endif +*/ +#define MCHR_MIN_EXPOSURE_CCS_ALPHA 500 /* Correspond la freq 2Khz */ + /* Corresponds to 2000 Hz */ +/*! + \def MCHR_MAX_EXPOSURE_CCS_INITIAL + \if FR + Definition du temps d'exposition MAXIMUM pour un CCS INITIAL
+ 10000 correspond ?la fr閝uence 100 Hz. + \else + MAXIMUM exposure time in microsec for CHR CCS INITIAL.
+ 10000 correspond to the frequency 100 Hz. + \endif +*/ +#define MCHR_MAX_EXPOSURE_CCS_INITIAL 10000 /* Correspond ?la Freq 100Hhz */ + /* Corresponds to 100Hz */ +/*! + \def MCHR_MIN_EXPOSURE_CCS_INITIAL + \if FR + Definition du temps d'exposition MINIMUM pour un CCS INITIAL. + 500 correspond ?la fr閝uence 2 KHz. + \else + MINIMUM exposure time in microsec for CHR CCS INITIAL. + 500 correspond to the frequency 2 kHz. + \endif +*/ +#define MCHR_MIN_EXPOSURE_CCS_INITIAL 500 /* Correspond la freq 2Khz */ + /* Corresponds to 2000 Hz */ +/*! + \def MCHR_MAX_EXPOSURE_CCS_PRIMA + \if FR + Definition du temps d'exposition MAXIMUM pour un CCS PRIMA
+ 10000 correspond ?la fr閝uence 100Hz. + \else + MAXIMUM exposure time in microsec for CCS PRIMA.
+ 10000 correspond to the frequency 100Hz. + \endif +*/ +#define MCHR_MAX_EXPOSURE_CCS_PRIMA 10000 /* Correspond ?la Freq 100Hhz */ + /* Corresponds to 100Hz */ +/*! + \def MCHR_MIN_EXPOSURE_CCS_PRIMA + \if FR + Definition du temps d'exposition MINIMUM pour un CCS PRIMA. + 500 correspond ?la fr閝uence 2 KHz. + \else + MINIMUM exposure time in microsec for CCS PRIMA. + 500 correspond to the frequency 2 kHz. + \endif +*/ +#define MCHR_MIN_EXPOSURE_CCS_PRIMA 500 /* Correspond la freq 2Khz */ + /* Corresponds to 2000 Hz */ +/*! + \def MCHR_MAX_EXPOSURE_CCS_OPTIMA + \if FR + Definition du temps d'exposition MAXIMUM pour un CCS_OPTIMA
+ 10000 correspond ?la fr閝uence 100Hz. + \else + MAXIMUM exposure time in microsec for CCS_OPTIMA.
+ 10000 correspond to the frequency 100Hz. + \endif +*/ +#define MCHR_MAX_EXPOSURE_CCS_OPTIMA 10000 /* Correspond ?la Freq 100Hhz */ + /* Corresponds to 100Hz */ +/*! + \def MCHR_MIN_EXPOSURE_CCS_OPTIMA + \if FR + Definition du temps d'exposition MINIMUM pour un CCS OPTIMA. + 200 correspond ?la fr閝uence 5 KHz. + \else + MINIMUM exposure time in microsec for CCS OPTIMA. + 200 correspond to the frequency 4 kHz. + \endif +*/ +#define MCHR_MIN_EXPOSURE_CCS_OPTIMA 200 /* Correspond la freq 5000 hz */ + /* Corresponds to 5 kHz */ +/*! + \def MCHR_MAX_EXPOSURE_CCS_ULTIMA + \if FR + Definition du temps d'exposition MAXIMUM pour un CCS ULTIMA
+ 10000 correspond ?la fr閝uence 100Hz. + \else + MAXIMUM exposure time in microsec for CCS ULTIMA.
+ 10000 correspond to the frequency 100Hz. + \endif +*/ +#define MCHR_MAX_EXPOSURE_CCS_ULTIMA 10000 /* Correspond ?la Freq 100Hhz */ + /* Corresponds to 100Hz */ +/*! + \def MCHR_MIN_EXPOSURE_CCS_ULTIMA + \if FR + Definition du temps d'exposition MINIMUM pour un CCS ULTIMA. + 32 correspond ?la fr閝uence 31,250 KHz. + \else + MINIMUM exposure time in microsec for CCS ULTIMA. + 32 correspond to the frequency 31,250 kHz. + \endif +*/ +#define MCHR_MIN_EXPOSURE_CCS_ULTIMA 32 /* Correspond la freq 31250 hz */ + /* Corresponds to 31250 Hz */ +/*! + \def MCHR_MAX_EXPOSURE_TRIO + \if FR + Definition du temps d'exposition MAXIMUM pour un TRIO
+ 25000 correspond ?la fr閝uence 40Hz. + \else + MAXIMUM exposure time in microsec for TRIO.
+ 25000 correspond to the frequency 40Hz. + \endif +*/ +#define MCHR_MAX_EXPOSURE_TRIO 25000 /* Correspond ?la Freq 40Hz */ +/*! + \def MCHR_MIN_EXPOSURE_TRIO + \if FR + Definition du temps d'exposition MINIMUM pour un TRIO. + 500 correspond ?la fr閝uence 2 KHz. + \else + MINIMUM exposure time in microsec for TRIO. + 500 correspond to the frequency 2 kHz. + \endif +*/ +#define MCHR_MIN_EXPOSURE_TRIO 500 /* Correspond ?la Freq 2000Hhz */ +/*! + \def MCHR_MAX_EXPOSURE_RUBY + \if FR + Definition du temps d'exposition MAXIMUM pour un RUBY + \else + MAXIMUM exposure time in microsec for RUBY. + + \endif +*/ +#define MCHR_MAX_EXPOSURE_RUBY 250000L /* Correspond ?la Freq 100Hhz */ +/*! + \def MCHR_MIN_EXPOSURE_CHR_450 + \if FR + Definition du temps d'exposition MINIMUM pour un RUBY. + 500 correspond ?la fr閝uence 2 KHz. + \else + MINIMUM exposure time in microsec for RUBY. + 500 correspond to the frequency 2 kHz. + \endif +*/ +#define MCHR_MIN_EXPOSURE_RUBY 500 /* Correspond ?la Freq 2Khz */ + +/*! + \def MCHR_NO_PEN + \if FR + Identificateur d'absence de crayon configure + \else + Full scale value attributed to undefined calibration table + \endif +*/ +#define MCHR_NO_PEN 999 + +/*! + \def MCHR_NOT_FREQ_MIN + \if FR + Identificateur d'absence de Frequence min du Dark + \else + Dark min frequency value attributed to undefined Dark + \endif +*/ +#define MCHR_NOT_FREQ_MIN 999 + +/*! + \def enum MCHR_STATUS + \if FR + Definition des etats de l'objet Capteur + \else + Definition of possible states of the CHR + \endif +*/ +enum MCHR_STATUS +{ + /*! \brief not initialized */ + MCHR_STATUS_NOT_INITIALIZED=1, //not initialized + /*! \brief initialized */ + MCHR_STATUS_INITIALIZED, //initialized + /*! \brief initialization failed */ + MCHR_STATUS_INIT_FAILED, //initialization failed + /*! \brief waiting for command */ + MCHR_STATUS_WAIT_COMMAND, //waiting for command + /*! \brief not initialized */ + MCHR_STATUS_COMMAND_IN_PROGRESS, //command processing in progress + /*! \brief finite acquisition in progress */ + MCHR_STATUS_ACQUISITION_IN_PROGRESS, //finite acquisition in progress + /*! \brief finite acquisition in progress */ + MCHR_STATUS_CONTINUOUS_ACQ_IN_PROGRESS, //continuous acquisition in progress + /*! \brief Acquisition-abort in progress */ + MCHR_STATUS_STOP_ACQ_IN_PROGRESS, //Acquisition-abort in progress + /*! \brief communication failed */ + MCHR_STATUS_COM_FAILED, //communication failed + /*! \brief Sensor already in use by another instance */ + MCHR_STATUS_ALREADY_IN_USE, // Sensor already in use by another instance + +}; + +/*! + \def enum enSpectrumAcquisitionResult + \if FR + Definition des etats de l'objet de l'acquisition du spectre + \else + Definition of possible states of the spectrum acquisition + \endif +*/ +enum enSpectrumAcquisitionResult +{ + /*! \brief data present */ + SPECTRUM_ACQUISITION_DATA_READY, + /*! \brief no data present */ + SPECTRUM_ACQUISITION_BUFFER_EMPTY, + /*! \brief error */ + SPECTRUM_ACQUISITION_ERROR, + /*! \brief timeout */ + SPECTRUM_ACQUISITION_TIMEOUT, +}; + + +// Other declarations +#define MAX_NAME_LENGTH 128 + +#if defined(_cplusplus) || defined(__cplusplus) +} +#endif /* _cplusplus */ +#endif \ No newline at end of file diff --git a/PcDmis/Base/Interfac/Msi/Hsi/STIL/Common/inc/MchrError.h b/PcDmis/Base/Interfac/Msi/Hsi/STIL/Common/inc/MchrError.h new file mode 100644 index 0000000..edf9209 --- /dev/null +++ b/PcDmis/Base/Interfac/Msi/Hsi/STIL/Common/inc/MchrError.h @@ -0,0 +1,754 @@ +/*************************************************************************/ +/* STIL * Software Departement */ +/*----------------------------------------------------------------------*/ +/* */ +/* MchrError.h */ +/* */ +/*----------------------------------------------------------------------*/ +/* Project .................................. CHR DLL */ +/* Reference documents "Specification DLL CHR-150"*/ +/* Programming Language ................. Visual C++ v6.0 */ +/* Starting date ................... 16/01/2003 */ +/* Date of last update ............. */ +/* Author(s)................................. DMO */ +/* Required Files .........................none */ +/* Required hardware .................... PC Pentium 350 Mhz */ +/* Prefix ........... MCHR_ */ +/*----------------------------------------------------------------------*/ +/* This HEADER file defines the errors returned by the */ +/* "MCHR_GetLastError" function and other DLL functions */ +/* */ +/* */ +/*----------------------------------------------------------------------*/ +/* V? | Date |AUTHOR| COMMENTS */ +/*-------+---------- +--------------------------------------------------*/ +/* 01 | 16 Janu 03| DMO | Initial version */ +/* 02 | 18 Nov 05| DMO | Ethernet, XE, Downloads */ +/*----------------------------------------------------------------------*/ + +#ifndef DEFINEERROR_H +#define DEFINEERROR_H + + +#if defined(_cplusplus) || defined(__cplusplus) +extern "C" { +#endif /* _cplusplus */ + +/* + ERREURS RETOURNEES PAR LES FONCTIONS DE LA DLL + INTERPRETATION OF ERRORS RETURNED BY THE DLL FUNCTIONS +*/ + +/*! + \def MCHR_ERROR + \if FR + La fonction est sortie en erreur, utilisez \link MCHR_GetLastError MCHR_GetLastError \endlink pour en connaitre son origine + \else + The function is in error, call \link MCHR_GetLastError MCHR_GetLastError \endlink to know the origin of the error + \endif +*/ +#define MCHR_ERROR 0 +/*! + \def MCHR_ERROR_NONE + \if FR + Pas d'erreur, la fonction s'est correctement ex閏ut閑 + \else + No ERROR, the function is OK. + \endif +*/ +#define MCHR_ERROR_NONE 1 +/*! + \def MCHR_ERROR_CODE + \if FR + D閎ut du codage des types d'erreur. + \else + Starting of ERROR CODE + \endif +*/ +#define MCHR_ERROR_CODE 0xf000 + +/*! + \def MCHR_ERROR_NOT_CONNECTED + \if FR + Probl鑝e de communication avec le CHR + \else + Error encountered when trying to communicate with the CHR + \endif +*/ + +#define MCHR_ERROR_NOT_CONNECTED (MCHR_ERROR_CODE + 0x01) + +/*! + \def MCHR_ERROR_SERIAL_PORT + \if FR + La fonction a rencontre un probl鑝e pour initialiser le port serie (IdSerialPort > 0) specifie. + \else + Error encountered when trying to initialize the specified COM PORT (IdSerialPort > 0) + \endif +*/ + +#define MCHR_ERROR_SERIAL_PORT (MCHR_ERROR_CODE + 0x03) + + +/*! + \def MCHR_ERROR_READ_CONFIG_FILE + \if FR + Un probl鑝e est survenu lors de la lecture du fichier de configuration specifie. + \else + Error encountered when trying to read the specified confoguration file + \endif +*/ + +#define MCHR_ERROR_READ_CONFIG_FILE (MCHR_ERROR_CODE + 0x04) + + +/*! + \def MCHR_ERROR_WRITE_CONFIG_FILE + \if FR + Un probl鑝e est survenu lors de l'ecriture du fichier de configuration specifie. + \else + Error encountered when trying to write the specified configuration file + \endif +*/ + +#define MCHR_ERROR_WRITE_CONFIG_FILE (MCHR_ERROR_CODE + 0x05) + + +/*! + \def MCHR_ERROR_RECEIVE_CONFIG_CHR + \if FR + Un probl鑝e est survenu lors de la recuperation de la configuration du CHR. + \else + Error encountered when trying to get the CHR configuration + \endif +*/ + +#define MCHR_ERROR_RECEIVE_CONFIG_CHR (MCHR_ERROR_CODE + 0x06) + + +/*! + \def MCHR_ERROR_SEND_CONFIG_CHR + \if FR + Un probl鑝e est survenu lors de la transmission de la configuration du CHR. + \else + Error encountered during CHR configuration transmission + \endif +*/ +#define MCHR_ERROR_SEND_CONFIG_CHR (MCHR_ERROR_CODE + 0x07) + + +/*! + \def MCHR_ERROR_NAME_ALREADY_EXIST + \if FR + Le nom du CHR recherche existe dej?dans la liste des CHR initialises. + \else + The name of the specified CHR exist already in the list of initialized CHR + \endif +*/ +#define MCHR_ERROR_NAME_ALREADY_EXIST (MCHR_ERROR_CODE + 0x08) + + + +/*! + \def MCHR_ERROR_ADD_SENSOR + \if FR + Il y a une erreur lors de l'ajout du capteur. + \else + Error while adding a new CHR + \endif +*/ +#define MCHR_ERROR_ADD_SENSOR (MCHR_ERROR_CODE + 0x09) + + +/*! + \def MCHR_ERROR_UNKNOWN_SENSOR + \if FR + Le CHR n'existe pas dans la liste des CHR initialises. + \else + The specified CHR does not exist in the list of initialized CHR + \endif +*/ +#define MCHR_ERROR_UNKNOWN_SENSOR (MCHR_ERROR_CODE + 0x0a) + + +/*! + \def MCHR_ERROR_NO_SENSOR_CONNECTED + \if FR + Pas de capteur CHR connecte. + \else + No CHR is currently connected + \endif +*/ +#define MCHR_ERROR_NO_SENSOR_CONNECTED (MCHR_ERROR_CODE + 0x0b) + + + +/*! + \def MCHR_ERROR_PARAM_NOT_VALID + \if FR + Le param鑤re de la fonction demandee n'est pas valide. + \else + Invalid argument for the required function + \endif +*/ +#define MCHR_ERROR_PARAM_NOT_VALID (MCHR_ERROR_CODE + 0x0c) + + + +/*! + \def MCHR_ERROR_DIALOG_CHR + \if FR + Une erreur de dialogue est apparue lors d'un echange avec le CHR. + \else + Dialog error encountered while communicationg with the CHR + \endif +*/ +#define MCHR_ERROR_DIALOG_CHR (MCHR_ERROR_CODE + 0x0d) + + + +/*! + \def MCHR_ERROR_START_RECEP_THREAD + \if FR + Une erreur s'est produite lors de l'initialisation du thread de reception. + \else + Error encountered while initializing the Reception Thread + \endif +*/ +#define MCHR_ERROR_START_RECEP_THREAD (MCHR_ERROR_CODE + 0x0e) + + + +/*! + \def MCHR_ERROR_NOTHING_TO_ABORT + \if FR + S'il n'y a aucune commande ?arr阾er. + \else + No command is being executed while "Abort" command is received + \endif +*/ +#define MCHR_ERROR_NOTHING_TO_ABORT (MCHR_ERROR_CODE + 0x0f) + + +/*! + \def MCHR_ERROR_ABORT_COMMAND + \if FR + Si impossible d'arr阾er une commande. + \else + Abort command failed + \endif +*/ +#define MCHR_ERROR_ABORT_COMMAND (MCHR_ERROR_CODE + 0x10) + + +/*! + \def MCHR_ERROR_DLL_NOT_ACTIVE + \if FR + Si la DLL n'a pas ete initialisee et activee. + \else + The DLL has not been initialized and activated + \endif +*/ +#define MCHR_ERROR_DLL_NOT_ACTIVE (MCHR_ERROR_CODE + 0x11) + + +/*! + \def MCHR_ERROR_CHR_BUSY + \if FR + Si la DLL est dej?occupee ?traiter une commande. + \else + The DLL is busy executing a previous command + \endif +*/ +#define MCHR_ERROR_CHR_BUSY (MCHR_ERROR_CODE + 0x12) + + +/*! + \def MCHR_ERROR_SCANRATE_TOO_HIGH + \if FR + La Frequence de mesure est trop elevee pour transmettre all required data. + \else + The acquisition rate is too high, impossible to transmit all requested data at this rate + \endif +*/ +#define MCHR_ERROR_SCANRATE_TOO_HIGH (MCHR_ERROR_CODE + 0x13) + + +/*! + \def MCHR_ERROR_ONLY_CHR450_FUNCTION + \if FR + La fonction demande n'est valide que pour un CHR-450. + \else + The specified function is autorized for CHR 450 only, the current CHR is not a 450 + \endif +*/ +#define MCHR_ERROR_ONLY_CHR450_FUNCTION (MCHR_ERROR_CODE + 0x14) + + + +/*! + \def MCHR_ERROR_ACQUISTION_STOPPED + \if FR + Erreur de la fonction car il n'y a pas d'acquisition en cours. + \else + No acquisition is currently in progress + \endif +*/ +#define MCHR_ERROR_ACQUISITION_STOPPED (MCHR_ERROR_CODE + 0x15) + + + +/*! + \def MCHR_ERROR_INTERNAL_FUNCTION + \if FR + Erreur interne de la fonction. + \else + Unspecified error during function execution + \endif +*/ +#define MCHR_ERROR_INTERNAL_FUNCTION (MCHR_ERROR_CODE + 0x16) + + + +/*! + \def MCHR_ERROR_NOT_IN_INTERFEROMETRIC_MODE + \if FR + Erreur de la fonction car le CHR n'est pas en mode interferometrique. + \else + The specified function is autorized on interferometric mode only, the CHR is not in this mode + \endif +*/ +#define MCHR_ERROR_NOT_IN_INTERFEROMETRIC_MODE (MCHR_ERROR_CODE + 0x17) + + + +/*! + \def MCHR_ERROR_DARK_NOT_VALID + \if FR + Erreur lors de la commande Fast Dark. + \else + Error during "Fast Dark" command execution + \endif +*/ +#define MCHR_ERROR_DARK_NOT_VALID (MCHR_ERROR_CODE + 0x18) + + + +/*! + \def MCHR_ERROR_INTERFEROMETRIC_MODE_NOT_AUTHORIZED + \if FR + Le mode Interferometrique n'est pas autorise sur ce capteur. + \else + The interferometric mode is not authorized with this sensor + \endif +*/ +#define MCHR_ERROR_INTERFEROMETRIC_MODE_NOT_AUTHORIZED (MCHR_ERROR_CODE + 0x19) + + + +/*! + \def MCHR_ERROR_NOT_VALID_CHR_CMD + \if FR + La commande envoye sur le capteur n'est pas valide. + \else + The command is not authorized for the current sensor type + \endif +*/ +#define MCHR_ERROR_NOT_VALID_CHR_CMD (MCHR_ERROR_CODE + 0x1a) + + + +/*! + \def MCHR_ERROR_READ_CALIBRATION_FILE + \if FR + Un probl鑝e est survenu lors de la lecture du fichier de calibration. + \else + Impossible to read calibration file + \endif +*/ +#define MCHR_ERROR_READ_CALIBRATION_FILE (MCHR_ERROR_CODE + 0x1b) + + +/*! + \def MCHR_ERROR_SEND_CALIBRATION_TABLE + \if FR + Un probl鑝e est survenu lors de l'envoi de la table de calibration vers le capteur specifie. + \else + Impossible to send the calibration file + \endif +*/ +#define MCHR_ERROR_SEND_CALIBRATION_TABLE (MCHR_ERROR_CODE + 0x1c) + + +/*! + \def MCHR_ERROR_IP_ADDRESS + \if FR + L'adresse IP specifie n'est pas valide. + \else + Illegal IP address + \endif +*/ +#define MCHR_ERROR_IP_ADDRESS (MCHR_ERROR_CODE + 0x1d) + + + +/*! + \def MCHR_ERROR_BUFFER_FULL + \if FR + Les buffers de receptions sont plein, Cadence de lecture trop lente. + \else + Reception buffer overflow, reading rate is too slow + \endif +*/ +#define MCHR_ERROR_BUFFER_FULL (MCHR_ERROR_CODE + 0x1e) + + + +/*! + \def MCHR_ERROR_TRIGGER_TYPE + \if FR + Le mode de trigger demande n'existe pas. + \else + Unrecognized trigger type + \endif +*/ +#define MCHR_ERROR_TRIGGER_TYPE (MCHR_ERROR_CODE + 0x1f) + + + +/*! + \def MCHR_ERROR_READ_FIRMWARE_FILE + \if FR + Erreur de lecture du fichier firmware. + \else + Impossible to read the firmware file + \endif +*/ +#define MCHR_ERROR_READ_FIRMWARE_FILE (MCHR_ERROR_CODE + 0x20) + + + +/*! + \def MCHR_ERROR_READ_ADDITIONAL_FILE + \if FR + Erreur de lecture du fichier menu. + \else + Impossible to read the menu file + \endif +*/ +#define MCHR_ERROR_READ_ADDITIONAL_FILE (MCHR_ERROR_CODE + 0x21) + + + +/*! + \def MCHR_ERROR_SEND_FIRMWARE_FILE + \if FR + Erreur d'envoi du fichier firmware. + \else + Impossible to send the firmware file + \endif +*/ +#define MCHR_ERROR_SEND_FIRMWARE_FILE (MCHR_ERROR_CODE + 0x22) + + +/*! + \def MCHR_ERROR_SEND_ADDITIONAL_FILE + \if FR + Erreur d'envoi du fichier menu. + \else + Impossible to send the menu file + \endif +*/ + +#define MCHR_ERROR_SEND_ADDITIONAL_FILE (MCHR_ERROR_CODE + 0x23) + + + +/*! + \def MCHR_ERROR_RUN_FIRMWARE + \if FR + Une erreur est survenue lors de l'execution de la nouvelle version du firmware. + \else + Error while trying to run the new firmware version + \endif +*/ +#define MCHR_ERROR_RUN_FIRMWARE (MCHR_ERROR_CODE + 0x24) + + +/*! + \def MCHR_ERROR_SAVE_FIRMWARE + \if FR + Erreur de sauvegarde du firmware. + \else + Error while trying to save the new firmware version + \endif +*/ + +#define MCHR_ERROR_SAVE_FIRMWARE (MCHR_ERROR_CODE + 0x25) + + +/*! + \def MCHR_ERROR_RESTART_CHR + \if FR + Erreur de redemarrage apres sauvegarde du firmware. + \else + Error while trying restart the sensor after saving the new firmware version + \endif +*/ + +#define MCHR_ERROR_RESTART_CHR (MCHR_ERROR_CODE + 0x26) + + + +/*! + \def MCHR_ERROR_ONLY_CHR150_FUNCTION + \if FR + La fonction demande n'est valide que pour un CHR-150. + \else + The specified function is autorized for CHR 150 only, the current CHR is not a 150 + \endif +*/ + +#define MCHR_ERROR_ONLY_CHR150_FUNCTION (MCHR_ERROR_CODE + 0x27) /* La fonction demande n'est valide que pour un CHR-150 */ + /* The specified function is autorized for CHR 150 only, the current CHR is not a 150 */ + +/*! + \def MCHR_ERROR_ONLY_CCS_FUNCTION + \if FR + La fonction demande n'est valide que pour un CCS. + \else + The specified function is autorized for CCS only, the current CHR is not a 150 + \endif +*/ + +#define MCHR_ERROR_ONLY_CCS_FUNCTION (MCHR_ERROR_CODE + 0x28) + + + +/*! + \def MCHR_ERROR_NO_TRANSMITTED_DATA + \if FR + Aucune donnee n'est configuree sur la sortie numerique utilisee. + \else + No data item is configured to be transmitted on current digital output channel + \endif +*/ +#define MCHR_ERROR_NO_TRANSMITTED_DATA (MCHR_ERROR_CODE + 0x29) + + + + +/*! + \def MCHR_ERROR_ETHERNET_NOT_SUPPORTED + \if FR + La Liaison Ethernet n'est pas supporte sur ce capteur. + \else + The Ethernet link is not supported on this sensor + \endif +*/ +#define MCHR_ERROR_ETHERNET_NOT_SUPPORTED (MCHR_ERROR_CODE + 0x2a) + + + +/*! + \def MCHR_ERROR_SEND_SERIAL_NUMBER + \if FR + L'envoi du numero de serie ?echoue. + \else + Failed to send Serial Number + \endif +*/ +#define MCHR_ERROR_SEND_SERIAL_NUMBER (MCHR_ERROR_CODE + 0x2b) + + + + +/*! + \def MCHR_ERROR_ONLY_ILB_FUNCTION + \if FR + La fonction demande n'est valide que pour un capteur ILB. + \else + The specified function is autorized for an ILB sensor + \endif +*/ +#define MCHR_ERROR_ONLY_ILB_FUNCTION (MCHR_ERROR_CODE + 0x2c) + + + +/*! + \def MCHR_ERROR_FUNCTION_NOT_AVAILABLE + \if FR + La fonction demande n'est pas disponible sur le capteur. + \else + The specified function is not available on the device + \endif +*/ +#define MCHR_ERROR_FUNCTION_NOT_AVAILABLE (MCHR_ERROR_CODE + 0x2d) + + + +/*! + \def MCHR_ERROR_FREQUENCY_TOO_HIGH + \if FR + La frequence est trop elevee. + \else + Frequency too high + \endif +*/ +#define MCHR_ERROR_FREQUENCY_TOO_HIGH (MCHR_ERROR_CODE + 0x2e) + + + +/*! + \def MCHR_ERROR_FREQUENCY_TOO_LOW + \if FR + La frequence est trop basse. + \else + Frequency too low + \endif +*/ +#define MCHR_ERROR_FREQUENCY_TOO_LOW (MCHR_ERROR_CODE + 0x2f) + + + +/*! + \def MCHR_ERROR_WHITE_TOO_HIGH + \if FR + Erreur lors de la commande d'acquisition du Blanc : le signal est trop haut. + \else + Error during "White Acquisition" command execution : the signal is too High + \endif +*/ +#define MCHR_ERROR_WHITE_TOO_HIGH (MCHR_ERROR_CODE + 0x3a) + + +/*! + \def MCHR_ERROR_WHITE_TOO_LOW + \if FR + Erreur lors de la commande d'acquisition du Blanc : le signal est trop bas. + \else + Error during "White Acquisition" command execution : the signal is too low + \endif +*/ +#define MCHR_ERROR_WHITE_TOO_LOW (MCHR_ERROR_CODE + 0x3b) + + +/*! + \def MCHR_ERROR_WHITE_SATURED + \if FR + Erreur lors de la commande d'acquisition du Blanc : le signal est sature. + \else + Error during "White Acquisition" command execution : the signal is satured + \endif +*/ +#define MCHR_ERROR_WHITE_SATURED (MCHR_ERROR_CODE + 0x3c) + + + +/*! + \def MCHR_ERROR_ONLY_ETHERNET_CONNECTION + \if FR + La fonction demande n'est valide que pour une connection Ethernet. + \else + The function is avalaible only for an ethernet connection + \endif +*/ +#define MCHR_ERROR_ONLY_ETHERNET_CONNECTION (MCHR_ERROR_CODE + 0x3d) + + + + +/*! + \def MCHR_ERROR_ILB_PARAM + \if FR + Probleme dans l'envoi / reception de parametres ILB. + \else + Error during setting / getting ILB parameters + \endif +*/ +#define MCHR_ERROR_ILB_PARAM (MCHR_ERROR_CODE + 0x3e) + + +/*! + \def MCHR_ERROR_NOT_CHR150_FUNCTION + \if FR + La fonction demande n'est pas valide pour un CHR-150. + \else + The specified function is unautorized for CHR 150 + \endif +*/ +#define MCHR_ERROR_NOT_CHR150_FUNCTION (MCHR_ERROR_CODE + 0x3f) /* La fonction demande n'est valide que pour un CHR-150 */ + + +/*! + \def MCHR_ERROR_TO_START_WHITE_REF_ACQ + \if FR + Erreur de lancement de l'acquisition du whiteRef + \else + Failure to start the acquisition of WhiteRef + \endif +*/ + +#define MCHR_ERROR_TO_START_WHITE_REF_ACQ (MCHR_ERROR_CODE + 0x40) /* La fonction demande n'est valide que pour un CHR-150 */ + +/*! + \def MCHR_ERROR_TO_STOP_WHITE_REF_ACQ + \if FR + Erreur d'arr阾 de l'acquisition du whiteRef + \else + Failure to stop the acquisition of WhiteRef + \endif +*/ + +#define MCHR_ERROR_TO_STOP_WHITE_REF_ACQ (MCHR_ERROR_CODE + 0x41) /* La fonction demande n'est valide que pour un CHR-150 */ + +/*! + \def MCHR_ERROR_TO_STOP_WHITE_REF_ACQ + \if FR + Erreur Autorisation d'acc鑣 + \else + Failure Permission access + \endif +*/ +#define MCHR_ERROR_UNAUTHORIZED_ACCESS (MCHR_ERROR_CODE + 0x42) /* Permission access */ + +/*! + \def MCHR_ERROR_FREQ_SMALLER_THAN_MIN_DARK_FREQ + \if FR + Erreur fr閝uence du scanrate en dessous de la fr閝uence du dark minimum + \else + Failure the resquested frequency is smaller then the min dark frequency + \endif +*/ +#define MCHR_ERROR_FREQ_SMALLER_THAN_MIN_DARK_FREQ (MCHR_ERROR_CODE + 0x43) + + +/*! + \def MCHR_ERROR_SENSOR_ALREADY_IN_USE + \if FR + Le capteur est d閖?utilis?par une autre instance ou processus. + \else + The sensor is already in use with another instance or process. + \endif +*/ +#define MCHR_ERROR_SENSOR_ALREADY_IN_USE (MCHR_ERROR_CODE + 0x44) + + + +/*! + \def MCHR_ERROR_UNKNOWN + \if FR + Erreur inconue. + \else + Unknown error + \endif +*/ +#define MCHR_ERROR_UNKNOWN (MCHR_ERROR_CODE + 0x0100) + +/* ------------------------------------------------------------------- */ + +#if defined(_cplusplus) || defined(__cplusplus) +} +#endif /* _cplusplus */ + +#endif \ No newline at end of file diff --git a/PcDmis/Base/Interfac/Msi/Hsi/STIL/Common/inc/MchrType.h b/PcDmis/Base/Interfac/Msi/Hsi/STIL/Common/inc/MchrType.h new file mode 100644 index 0000000..8715664 --- /dev/null +++ b/PcDmis/Base/Interfac/Msi/Hsi/STIL/Common/inc/MchrType.h @@ -0,0 +1,1625 @@ +/*************************************************************************/ +/* STIL * Software Departement */ +/*----------------------------------------------------------------------*/ +/* */ +/* MchrType.h */ +/* */ +/*----------------------------------------------------------------------*/ +/* Project .................................. CHR DLL */ +/* Reference documents "Specification DLL CHR-150"*/ +/* Programming Language ................. Visual C++ v6.0 */ +/* Starting date ................... 16/01/2003 */ +/* Date of last update ............. */ +/* Author(s)................................. DMO */ +/* Required Files .........................none */ +/* Required hardware .................... PC Pentium 350 Mhz */ +/* Prefix ........... MCHR_ */ +/*----------------------------------------------------------------------*/ +/* This HEADER file defines types and event handles */ +/* */ +/* */ +/*----------------------------------------------------------------------*/ +/* V? | Date |AUTHOR| COMMENTS */ +/*-------+---------- +--------------------------------------------------*/ +/* 01 | 16 Janu 03| DMO | Initial version */ +/*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ +/* 02 | 08 Dec 03| DMO | Add CHR-450 fonctionnality */ +/*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ +/* 03 | 04 Nov 05| DMO | Add CHR-450XE fonctionnality */ +/* | | | Add download functions */ +/*----------------------------------------------------------------------*/ + +#ifndef MCHRTYPE_H +#define MCHRTYPE_H + +#if defined(_cplusplus) || defined(__cplusplus) +extern "C" { +#endif /* _cplusplus */ + +/*! \typedef unsigned short MCHR_ID + \brief + \if FR + Identifiant du controleur. + \else + Controller's ID. + \endif +*/ +typedef unsigned short MCHR_ID; + + + +/* CHR types */ + +/*! \enum enChrType + \brief + \if FR + Types de controleur. + \else + Controller types. + \endif +*/ +#if defined(_cplusplus) || defined(__cplusplus) +enum enChrType +{ +#else +typedef enum +{ +#endif + /*! \if FR CAPTEUR CHR 150. \else SENSOR CHR 150 \endif */ + MCHR_150, + /*! \if FR CAPTEUR CHR 450. \else SENSOR CHR 450 \endif */ + MCHR_450, + /*! \if FR CAPTEUR CHR XE. \else SENSOR CHR XE \endif */ + MCHR_XE, + /*! \if FR CAPTEUR XE_E. \else SENSOR CHR XE_E \endif */ + MCHR_XE_E, + /*! \if FR CAPTEUR CCS ALPHA. \else SENSOR CCS ALPHA \endif */ + MCHR_CCS_ALPHA, + /*! \if FR CAPTEUR CCS PRIMA. \else SENSOR CCS PRIMA \endif */ + MCHR_CCS_PRIMA, + /*! \if FR CAPTEUR CCS OPTIMA. \else SENSOR CCS OPTIMA \endif */ + MCHR_CCS_OPTIMA, + /*! \if FR CAPTEUR CCS ULTIMA. \else SENSOR CCS ULTIMA \endif */ + MCHR_CCS_ULTIMA, + /*! \if FR CAPTEUR CCS INITIAL. \else SENSOR CCS INITIAL \endif */ + MCHR_CCS_INITIAL, + /*! \if FR CAPTEUR STIL DUO. \else SENSOR STIL DUO \endif */ + MCHR_DUO, + /*! \if FR CAPTEUR STIL TRIO. \else SENSOR STIL TRIO \endif */ + MCHR_TRIO, + /*! \if FR CAPTEUR RUBY. \else SENSOR RUBY \endif */ + MCHR_RUBY, + MCHR_MAX_MODEL +#if defined(_cplusplus) || defined(__cplusplus) +}; +#else +} enChrType; +#endif + +/*! \enum enChrConnection + \brief + \if FR Types de connexion controleurs. + \else Controller connection types. + \endif +*/ +#if defined(_cplusplus) || defined(__cplusplus) +enum enChrConnection +{ +#else +typedef enum +{ +#endif + /*! \if FR Utilisation d'une connexion sur port serie. \else < Use serial port connection. \endif */ + MCHR_SERIAL_CONNECTION, + /*! \if FR Utilisation d'une connexion sur port Ethernet. \else < Use Ethernet port connection. \endif */ + MCHR_ETHERNET_CONNECTION, + /*! \if FR Utilisation d'une connexion USB. \else < Use USB connection. \endif */ + MCHR_USB_CONNECTION, + /*! \if FR Limite du nombre de type de connexion. \else < Connection type limit number. \endif */ + MCHR_MAX_CONNECTION_TYPE +#if defined(_cplusplus) || defined(__cplusplus) +}; +#else +} enChrConnection; +#endif + + +/*! \enum enSCAN_RATE_LIST_CHR150 + \brief + \if FR Liste des frequences parametrables pour un controleur CHR 150. + \else CHR 150 controller frequency possible values. + \endif + \warning + \if FR Seulement pour coffret CHR 150. + \else Only for CHR 150 controller. + \endif +*/ +#if defined(_cplusplus) || defined(__cplusplus) +enum enSCAN_RATE_LIST_CHR150 +{ +#else +typedef enum +{ +#endif + /*! \if FR Frequence de 30Hz predefinie sur CHR-150. \else 30Hz predefined scanrate for CHR-150. \endif */ + MCHR_SCAN_RATE_CHR150_30HZ=3, + /*! \if FR Frequence de 100Hz predefinie sur CHR-150. \else 100Hz predefined scanrate for CHR-150. \endif */ + MCHR_SCAN_RATE_CHR150_100HZ, + /*! \if FR Frequence de 300Hz predefinie sur CHR-150. \else 300Hz predefined scanrate for CHR-150. \endif */ + MCHR_SCAN_RATE_CHR150_300HZ, + /*! \if FR Frequence de 1000Hz predefinie sur CHR-150. \else 1000Hz predefined scanrate for CHR-150. \endif */ + MCHR_SCAN_RATE_CHR150_1000HZ, + /*! \if FR Limite des frequences predefinient sur CHR-150. \else Predefined scanrate limit for CHR-150. \endif */ + MCHR_MAX_SCAN_RATE_CHR150 + +#if defined(_cplusplus) || defined(__cplusplus) +}; +#else +} enSCAN_RATE_LIST_CHR150; +#endif + + +/*! \enum enSCAN_RATE_LIST_CHR450 + \brief + \if FR Liste des frequences parametrables pour un controleur CHR 450. + \else List of rate identifiers for CHR-450. + \endif + \warning + \if FR Seulement pour coffret CHR 450. + \else Only for CHR 450 controller. + \endif +*/ +#if defined(_cplusplus) || defined(__cplusplus) +enum enSCAN_RATE_LIST_CHR450 +{ +#else +typedef enum +{ +#endif + /*! \if FR Frequence de LIBRE predefinie sur CHR-150. \else FREE predefined scanrate for CHR-150. \endif */ + MCHR_SCAN_RATE_CHR450_LIBRE, + /*! \if FR Frequence de 33Hz predefinie sur CHR450. \else 33Hz predefined scanrate for CHR450. \endif */ + MCHR_SCAN_RATE_CHR450_33HZ, + /*! \if FR Frequence de 40Hz predefinie sur CHR450. \else 40Hz predefined scanrate for CHR450. \endif */ + MCHR_SCAN_RATE_CHR450_40HZ, + /*! \if FR Frequence de 100Hz predefinie sur CHR450. \else 100Hz predefined scanrate for CHR450. \endif */ + MCHR_SCAN_RATE_CHR450_100HZ, + /*! \if FR Frequence de 200Hz predefinie sur CHR450. \else 200Hz predefined scanrate for CHR450. \endif */ + MCHR_SCAN_RATE_CHR450_200HZ, + /*! \if FR Frequence de 400Hz predefinie sur CHR450. \else 400Hz predefined scanrate for CHR450. \endif */ + MCHR_SCAN_RATE_CHR450_400HZ, + /*! \if FR Frequence de 1000Hz predefinie sur CHR450. \else 1000Hz predefined scanrate for CHR450. \endif */ + MCHR_SCAN_RATE_CHR450_1000HZ, + /*! \if FR Frequence de 2000Hz predefinie sur CHR450. \else 2000Hz predefined scanrate for CHR450. \endif */ + MCHR_SCAN_RATE_CHR450_2000HZ, + /*! \if FR Frequence de 4000Hz predefinie sur CHR450. \else 4000Hz predefined scanrate for CHR450. \endif */ + MCHR_SCAN_RATE_CHR450_4000HZ, + /*! \if FR Frequence Max predefinie sur CHR450. \else Max predefined scanrate for CHR450. \endif */ + MCHR_MAX_SCAN_RATE_CHR450 +#if defined(_cplusplus) || defined(__cplusplus) +}; +#else +} enSCAN_RATE_LIST_CHR450; +#endif + + +/*! \enum enSCAN_RATE_LIST_CHRXE + \brief + \if FR Liste des frequences parametrables pour un controleur CHRXE. + \else List of rate identifiers for CHRXE. + \endif + \warning + \if FR Seulement pour coffret CHRXE. + \else Only for CHRXE controller. + \endif +*/ +#if defined(_cplusplus) || defined(__cplusplus) +enum enSCAN_RATE_LIST_CHRXE +{ +#else +typedef enum +{ +#endif + + /*! \if FR Frequence libre predefinie sur CHRXE. \else FREE predefined scanrate for CHRXE. \endif */ + MCHR_SCAN_RATE_CHRXE_LIBRE, + /*! \if FR Frequence de 33Hz predefinie sur CHRXE. \else 33Hz predefined scanrate for CHRXE. \endif */ + MCHR_SCAN_RATE_CHRXE_33HZ, + /*! \if FR Frequence de 40Hz predefinie sur CHRXE. \else 40Hz predefined scanrate for CHRXE. \endif */ + MCHR_SCAN_RATE_CHRXE_40HZ, + /*! \if FR Frequence de 100Hz predefinie sur CHRXE. \else 100Hz predefined scanrate for CHRXE. \endif */ + MCHR_SCAN_RATE_CHRXE_100HZ, + /*! \if FR Frequence de 200Hz predefinie sur CHRXE. \else 200Hz predefined scanrate for CHRXE. \endif */ + MCHR_SCAN_RATE_CHRXE_200HZ, + /*! \if FR Frequence de 400Hz predefinie sur CHRXE. \else 400Hz predefined scanrate for CHRXE. \endif */ + MCHR_SCAN_RATE_CHRXE_400HZ, + /*! \if FR Frequence de 1000Hz predefinie sur CHRXE. \else 1000Hz predefined scanrate for CHRXE. \endif */ + MCHR_SCAN_RATE_CHRXE_1000HZ, + /*! \if FR Frequence de 2000Hz predefinie sur CHRXE. \else 2000Hz predefined scanrate for CHRXE. \endif */ + MCHR_SCAN_RATE_CHRXE_2000HZ, + /*! \if FR Frequence de 4000Hz predefinie sur CHRXE. \else 4000Hz predefined scanrate for CHRXE. \endif */ + MCHR_SCAN_RATE_CHRXE_4000HZ, + /*! \if FR Frequence de 5000Hz predefinie sur CHRXE. \else 5000Hz predefined scanrate for CHRXE. \endif */ + MCHR_SCAN_RATE_CHRXE_5000HZ, + /*! \if FR Frequence de 6000Hz predefinie sur CHRXE. \else 6000Hz predefined scanrate for CHRXE. \endif */ + MCHR_SCAN_RATE_CHRXE_6000HZ, + /*! \if FR Frequence de 7000Hz predefinie sur CHRXE. \else 7000Hz predefined scanrate for CHRXE. \endif */ + MCHR_SCAN_RATE_CHRXE_7000HZ, + /*! \if FR Frequence de 8000Hz predefinie sur CHRXE. \else 8000Hz predefined scanrate for CHRXE. \endif */ + MCHR_SCAN_RATE_CHRXE_8000HZ, + /*! \if FR Frequence de 9000Hz predefinie sur CHRXE. \else 9000Hz predefined scanrate for CHRXE. \endif */ + MCHR_SCAN_RATE_CHRXE_9000HZ, + /*! \if FR Frequence de 10000Hz predefinie sur CHRXE. \else 10000Hz predefined scanrate for CHRXE. \endif */ + MCHR_SCAN_RATE_CHRXE_10000HZ, + /*! \if FR Frequence Max predefinie sur CHRXE. \else Max predefined scanrate for CHRXE. \endif */ + MCHR_MAX_SCAN_RATE_CHRXE +#if defined(_cplusplus) || defined(__cplusplus) +}; +#else +} enSCAN_RATE_LIST_CHRXE; +#endif + +/*! \enum enSCAN_RATE_LIST_CHRXE_E + \brief + \if FR Liste des frequences parametrables pour un controleur CHRXe-E. + \else list of rate identifiers for CHRXe-E. + \endif + \warning + \if FR Seulement pour coffret CHRXe-E. + \else Only for CHRXe-E controller. + \endif +*/ +#if defined(_cplusplus) || defined(__cplusplus) +enum enSCAN_RATE_LIST_CHRXE_E +{ +#else +typedef enum +{ +#endif + + /*! \if FR Frequence Libre predefinie sur CHRXE_E. \else FREE predefined scanrate for CHRXE_E. \endif */ + MCHR_SCAN_RATE_CHRXE_E_LIBRE, + /*! \if FR Frequence de 100Hz predefinie sur CHRXE_E. \else 100Hz predefined scanrate for CHRXE_E. \endif */ + MCHR_SCAN_RATE_CHRXE_E_100HZ, + /*! \if FR Frequence de 200Hz predefinie sur CHRXE_E. \else 200Hz predefined scanrate for CHRXE_E. \endif */ + MCHR_SCAN_RATE_CHRXE_E_200HZ, + /*! \if FR Frequence de 400Hz predefinie sur CHRXE_E. \else 400Hz predefined scanrate for CHRXE_E. \endif */ + MCHR_SCAN_RATE_CHRXE_E_400HZ, + /*! \if FR Frequence de 1000Hz predefinie sur CHRXE_E. \else 1000Hz predefined scanrate for CHRXE_E. \endif */ + MCHR_SCAN_RATE_CHRXE_E_1000HZ, + /*! \if FR Frequence de 2000Hz predefinie sur CHRXE_E. \else 2000Hz predefined scanrate for CHRXE_E. \endif */ + MCHR_SCAN_RATE_CHRXE_E_2000HZ, + /*! \if FR Frequence de 4000Hz predefinie sur CHRXE_E. \else 4000Hz predefined scanrate for CHRXE_E. \endif */ + MCHR_SCAN_RATE_CHRXE_E_4000HZ, + /*! \if FR Frequence de 6250Hz predefinie sur CHRXE_E. \else 6250Hz predefined scanrate for CHRXE_E. \endif */ + MCHR_SCAN_RATE_CHRXE_E_6250HZ, + /*! \if FR Frequence de 10000Hz predefinie sur CHRXE_E. \else 10000Hz predefined scanrate for CHRXE_E. \endif */ + MCHR_SCAN_RATE_CHRXE_E_10000HZ, + /*! \if FR Frequence de 15625Hz predefinie sur CHRXE_E. \else 15625Hz predefined scanrate for CHRXE_E. \endif */ + MCHR_SCAN_RATE_CHRXE_E_15625HZ, + /*! \if FR Frequence de 20000Hz predefinie sur CHRXE_E. \else 20000Hz predefined scanrate for CHRXE_E. \endif */ + MCHR_SCAN_RATE_CHRXE_E_20000HZ, + /*! \if FR Frequence de 25000Hz predefinie sur CHRXE_E. \else 25000Hz predefined scanrate for CHRXE_E. \endif */ + MCHR_SCAN_RATE_CHRXE_E_25000HZ, + /*! \if FR Frequence de 31250Hz predefinie sur CHRXE_E. \else 31250Hz predefined scanrate for CHRXE_E. \endif */ + MCHR_SCAN_RATE_CHRXE_E_31250HZ, + /*! \if FR Frequence Max predefinie sur CHRXE_E. \else Max predefined scanrate for CHRXE_E. \endif */ + MCHR_MAX_SCAN_RATE_CHRXE_E +#if defined(_cplusplus) || defined(__cplusplus) +}; +#else +} enSCAN_RATE_LIST_CHRXE_E; +#endif + + +/*! \enum enSCAN_RATE_LIST_CCS_ALPHA + \brief + \if FR Liste des frequences parametrables pour un controleur CCS-Alpha. + \else list of rate identifiers for CCS-Alpha. + \endif + \warning + \if FR Seulement pour coffret CCS-Alpha. + \else Only for CCS-Alpha controller. + \endif +*/ +#if defined(_cplusplus) || defined(__cplusplus) +enum enSCAN_RATE_LIST_CCS_ALPHA +{ +#else +typedef enum +{ +#endif + /*! \if FR Frequence Libre predefinie sur CCS_ALPHA. \else Free predefined scanrate for CCS_ALPHA. \endif */ + MCHR_SCAN_RATE_CCS_ALPHA_LIBRE, + /*! \if FR Frequence de 40Hz predefinie sur CCS_ALPHA. \else 40Hz predefined scanrate for CCS_ALPHA. \endif */ + MCHR_SCAN_RATE_CCS_ALPHA_40HZ, + /*! \if FR Frequence de 100Hz predefinie sur CCS_ALPHA. \else 100Hz predefined scanrate for CCS_ALPHA. \endif */ + MCHR_SCAN_RATE_CCS_ALPHA_100HZ, + /*! \if FR Frequence de 200Hz predefinie sur CCS_ALPHA. \else 200Hz predefined scanrate for CCS_ALPHA. \endif */ + MCHR_SCAN_RATE_CCS_ALPHA_200HZ, + /*! \if FR Frequence de 400Hz predefinie sur CCS_ALPHA. \else 400Hz predefined scanrate for CCS_ALPHA. \endif */ + MCHR_SCAN_RATE_CCS_ALPHA_400HZ, + /*! \if FR Frequence de 1000Hz predefinie sur CCS_ALPHA. \else 1000Hz predefined scanrate for CCS_ALPHA. \endif */ + MCHR_SCAN_RATE_CCS_ALPHA_1000HZ, + /*! \if FR Frequence de 2000Hz predefinie sur CCS_ALPHA. \else 2000Hz predefined scanrate for CCS_ALPHA. \endif */ + MCHR_SCAN_RATE_CCS_ALPHA_2000HZ, + /*! \if FR Frequence Max predefinie sur CCS_ALPHA. \else Max predefined scanrate for CCS_ALPHA. \endif */ + MCHR_MAX_SCAN_RATE_CCS_ALPHA +#if defined(_cplusplus) || defined(__cplusplus) +}; +#else +} enSCAN_RATE_LIST_CCS_ALPHA; +#endif + + +/*! \enum enSCAN_RATE_LIST_CCS_PRIMA + \brief + \if FR Liste des frequences parametrables pour un controleur CCS_PRIMA. + \else list of rate identifiers for CCS_PRIMA. + \endif + \warning + \if FR Seulement pour coffret CCS_PRIMA. + \else Only for CCS_PRIMA controller. + \endif +*/ +#if defined(_cplusplus) || defined(__cplusplus) +enum enSCAN_RATE_LIST_CCS_PRIMA +{ +#else +typedef enum +{ +#endif + /*! \if FR Frequence libre predefinie sur CCS_PRIMA. \else Free predefined scanrate for CCS_PRIMA. \endif */ + MCHR_SCAN_RATE_CCS_PRIMA_LIBRE, + /*! \if FR Frequence de 100Hz predefinie sur CCS_PRIMA. \else 100Hz predefined scanrate for CCS_PRIMA. \endif */ + MCHR_SCAN_RATE_CCS_PRIMA_100HZ, + /*! \if FR Frequence de 200Hz predefinie sur CCS_PRIMA. \else 200Hz predefined scanrate for CCS_PRIMA. \endif */ + MCHR_SCAN_RATE_CCS_PRIMA_200HZ, + /*! \if FR Frequence de 400Hz predefinie sur CCS_PRIMA. \else 400Hz predefined scanrate for CCS_PRIMA. \endif */ + MCHR_SCAN_RATE_CCS_PRIMA_400HZ, + /*! \if FR Frequence de 1000Hz predefinie sur CCS_PRIMA. \else 1000Hz predefined scanrate for CCS_PRIMA. \endif */ + MCHR_SCAN_RATE_CCS_PRIMA_1000HZ, + /*! \if FR Frequence de 2000Hz predefinie sur CCS_PRIMA. \else 2000Hz predefined scanrate for CCS_PRIMA. \endif */ + MCHR_SCAN_RATE_CCS_PRIMA_2000HZ, + /*! \if FR Frequence Max predefinie sur CCS_PRIMA. \else Max predefined scanrate for CCS_PRIMA. \endif */ + MCHR_MAX_SCAN_RATE_CCS_PRIMA +#if defined(_cplusplus) || defined(__cplusplus) +}; +#else +} enSCAN_RATE_LIST_CCS_PRIMA; +#endif + + +/*! \enum enSCAN_RATE_LIST_CCS_OPTIMA + \brief + \if FR Liste des frequences parametrables pour un controleur CCS_OPTIMA. + \else list of rate identifiers for CCS_OPTIMA. + \endif + \warning + \if FR Seulement pour coffret CCS_OPTIMA. + \else Only for CCS_OPTIMA controller. + \endif +*/ +#if defined(_cplusplus) || defined(__cplusplus) +enum enSCAN_RATE_LIST_CCS_OPTIMA +{ +#else +typedef enum +{ +#endif + + /*! \if FR Frequence libre predefinie sur CCS_OPTIMA. \else Free predefined scanrate for CCS_OPTIMA. \endif */ + MCHR_SCAN_RATE_CCS_OPTIMA_LIBRE, + /*! \if FR Frequence de 100Hz predefinie sur CCS_OPTIMA. \else 100Hz predefined scanrate for CCS_OPTIMA. \endif */ + MCHR_SCAN_RATE_CCS_OPTIMA_100HZ, + /*! \if FR Frequence de 200Hz predefinie sur CCS_OPTIMA. \else 200Hz predefined scanrate for CCS_OPTIMA. \endif */ + MCHR_SCAN_RATE_CCS_OPTIMA_200HZ, + /*! \if FR Frequence de 500Hz predefinie sur CCS_OPTIMA. \else 500Hz predefined scanrate for CCS_OPTIMA. \endif */ + MCHR_SCAN_RATE_CCS_OPTIMA_500HZ, + /*! \if FR Frequence de 1000Hz predefinie sur CCS_OPTIMA. \else 1000Hz predefined scanrate for CCS_OPTIMA. \endif */ + MCHR_SCAN_RATE_CCS_OPTIMA_1000HZ, + /*! \if FR Frequence de 2000Hz predefinie sur CCS_OPTIMA. \else 2000Hz predefined scanrate for CCS_OPTIMA. \endif */ + MCHR_SCAN_RATE_CCS_OPTIMA_2000HZ, + /*! \if FR Frequence de 5000Hz predefinie sur CCS_OPTIMA. \else 5000Hz predefined scanrate for CCS_OPTIMA. \endif */ + MCHR_SCAN_RATE_CCS_OPTIMA_5000HZ, + /*! \if FR Frequence de Max predefinie sur CCS_OPTIMA. \else Max predefined scanrate for CCS_OPTIMA. \endif */ + MCHR_MAX_SCAN_RATE_CCS_OPTIMA +#if defined(_cplusplus) || defined(__cplusplus) +}; +#else +} enSCAN_RATE_LIST_CCS_OPTIMA; +#endif + +//RSA : 28/09/2007 : supprime frequence 100 & 300hz +/*! \enum enSCAN_RATE_LIST_CCS_ULTIMA + \brief + \if FR Liste des frequences parametrables pour un controleur CCS_ULTIMA. + \else list of rate identifiers for CCS_ULTIMA. + \endif + \warning + \if FR Seulement pour coffret CCS_ULTIMA. + \else Only for CCS_ULTIMA controller. + \endif +*/ +#if defined(_cplusplus) || defined(__cplusplus) +enum enSCAN_RATE_LIST_CCS_ULTIMA +{ +#else +typedef enum +{ +#endif + + /*! \if FR Frequence libre predefinie sur CCS_ULTIMA. \else Free predefined scanrate for CCS_ULTIMA. \endif */ + MCHR_SCAN_RATE_CCS_ULTIMA_LIBRE, + /*! \if FR Frequence de 500Hz predefinie sur CCS_ULTIMA. \else 500Hz predefined scanrate for CCS_ULTIMA. \endif */ + MCHR_SCAN_RATE_CCS_ULTIMA_500HZ, + /*! \if FR Frequence de 1000Hz predefinie sur CCS_ULTIMA. \else 1000Hz predefined scanrate for CCS_ULTIMA. \endif */ + MCHR_SCAN_RATE_CCS_ULTIMA_1000HZ, + /*! \if FR Frequence de 2000Hz predefinie sur CCS_ULTIMA. \else 2000Hz predefined scanrate for CCS_ULTIMA. \endif */ + MCHR_SCAN_RATE_CCS_ULTIMA_2000HZ, + /*! \if FR Frequence de 5000Hz predefinie sur CCS_ULTIMA. \else 5000Hz predefined scanrate for CCS_ULTIMA. \endif */ + MCHR_SCAN_RATE_CCS_ULTIMA_5000HZ, + /*! \if FR Frequence de 10000Hz predefinie sur CCS_ULTIMA. \else 10000Hz predefined scanrate for CCS_ULTIMA. \endif */ + MCHR_SCAN_RATE_CCS_ULTIMA_10000HZ, + /*! \if FR Frequence de 15625Hz predefinie sur CCS_ULTIMA. \else 15625Hz predefined scanrate for CCS_ULTIMA. \endif */ + MCHR_SCAN_RATE_CCS_ULTIMA_15625HZ, + /*! \if FR Frequence de 20000Hz predefinie sur CCS_ULTIMA. \else 20000Hz predefined scanrate for CCS_ULTIMA. \endif */ + MCHR_SCAN_RATE_CCS_ULTIMA_20000HZ, + /*! \if FR Frequence de 25000Hz predefinie sur CCS_ULTIMA. \else 25000Hz predefined scanrate for CCS_ULTIMA. \endif */ + MCHR_SCAN_RATE_CCS_ULTIMA_25000HZ, + /*! \if FR Frequence de 31250Hz predefinie sur CCS_ULTIMA. \else 31250Hz predefined scanrate for CCS_ULTIMA. \endif */ + MCHR_SCAN_RATE_CCS_ULTIMA_31250HZ, + /*! \if FR Frequence Max predefinie sur CCS_ULTIMA. \else Max predefined scanrate for CCS_ULTIMA. \endif */ + MCHR_MAX_SCAN_RATE_CCS_ULTIMA, +#if defined(_cplusplus) || defined(__cplusplus) +}; +#else +} enSCAN_RATE_LIST_CCS_ULTIMA; +#endif + + +/*! \enum enSCAN_RATE_LIST_CCS_INITIAL + \brief + \if FR Liste des frequences parametrables pour un controleur CCS_INITIAL. + \else list of rate identifiers for CCS_INITIAL. + \endif + \warning + \if FR Seulement pour coffret CCS_INITIAL. + \else Only for CCS_INITIAL controller. + \endif +*/ +#if defined(_cplusplus) || defined(__cplusplus) +enum enSCAN_RATE_LIST_CCS_INITIAL +{ +#else +typedef enum +{ +#endif + + /*! \if FR Frequence de 100Hz predefinie sur CCS_INITIAL. \else 100Hz predefined scanrate for CCS_INITIAL. \endif */ + MCHR_SCAN_RATE_CCS_INITIAL_LIBRE, + /*! \if FR Frequence de 100Hz predefinie sur CCS_INITIAL. \else 100Hz predefined scanrate for CCS_INITIAL. \endif */ + MCHR_SCAN_RATE_CCS_INITIAL_100HZ, + /*! \if FR Frequence de 100Hz predefinie sur CCS_INITIAL. \else 100Hz predefined scanrate for CCS_INITIAL. \endif */ + MCHR_SCAN_RATE_CCS_INITIAL_200HZ, + /*! \if FR Frequence de 100Hz predefinie sur CCS_INITIAL. \else 100Hz predefined scanrate for CCS_INITIAL. \endif */ + MCHR_SCAN_RATE_CCS_INITIAL_400HZ, + /*! \if FR Frequence de 100Hz predefinie sur CCS_INITIAL. \else 100Hz predefined scanrate for CCS_INITIAL. \endif */ + MCHR_SCAN_RATE_CCS_INITIAL_1000HZ, + /*! \if FR Frequence de 100Hz predefinie sur CCS_INITIAL. \else 100Hz predefined scanrate for CCS_INITIAL. \endif */ + MCHR_SCAN_RATE_CCS_INITIAL_2000HZ, + /*! \if FR Frequence de 100Hz predefinie sur CCS_INITIAL. \else 100Hz predefined scanrate for CCS_INITIAL. \endif */ + MCHR_MAX_SCAN_RATE_CCS_INITIAL +#if defined(_cplusplus) || defined(__cplusplus) +}; +#else +} enSCAN_RATE_LIST_CCS_INITIAL; +#endif + + +/*! \enum enSCAN_RATE_LIST_TRIO + \brief + \if FR Liste des frequences parametrables pour un controleur TRIO. + \else list of rate identifiers for TRIO. + \endif + \warning + \if FR Seulement pour coffret TRIO. + \else Only for TRIO controller. + \endif +*/ +#if defined(_cplusplus) || defined(__cplusplus) +enum enSCAN_RATE_LIST_TRIO +{ +#else +typedef enum +{ +#endif + /*! \if FR Frequence libre predefinie sur TRIO. \else Free predefined scanrate for TRIO. \endif */ + MCHR_SCAN_RATE_TRIO_FREE, + /*! \if FR Frequence de 40Hz predefinie sur TRIO. \else 40Hz predefined scanrate for TRIO. \endif */ + MCHR_SCAN_RATE_TRIO_40HZ, + /*! \if FR Frequence de 100Hz predefinie sur TRIO. \else 100Hz predefined scanrate for TRIO. \endif */ + MCHR_SCAN_RATE_TRIO_100HZ, + /*! \if FR Frequence de 200Hz predefinie sur TRIO. \else 200Hz predefined scanrate for TRIO. \endif */ + MCHR_SCAN_RATE_TRIO_200HZ, + /*! \if FR Frequence de 400Hz predefinie sur TRIO. \else 400Hz predefined scanrate for TRIO. \endif */ + MCHR_SCAN_RATE_TRIO_400HZ, + /*! \if FR Frequence de 1000Hz predefinie sur TRIO. \else 1000Hz predefined scanrate for TRIO. \endif */ + MCHR_SCAN_RATE_TRIO_1000HZ, + /*! \if FR Frequence de 2000Hz predefinie sur TRIO. \else 2000Hz predefined scanrate for TRIO. \endif */ + MCHR_SCAN_RATE_TRIO_2000HZ, + /*! \if FR Frequence Max predefinie sur TRIO. \else Max predefined scanrate for TRIO. \endif */ + MCHR_MAX_SCAN_RATE_TRIO, + +#if defined(_cplusplus) || defined(__cplusplus) +}; +#else +} enSCAN_RATE_LIST_TRIO; +#endif + +/*! \enum enSCAN_RATE_LIST_DUO + \brief + \if FR Liste des frequences parametrables pour un controleur DUO. + \else list of rate identifiers for DUO. + \endif + \warning + \if FR Seulement pour coffret DUO. + \else Only for DUO/TRIO controller. + \endif +*/ +#if defined(_cplusplus) || defined(__cplusplus) +enum enSCAN_RATE_LIST_DUO +{ +#else +typedef enum +{ +#endif + /*! \if FR Frequence libre predefinie sur DUO. \else Free predefined scanrate for DUO. \endif */ + MCHR_SCAN_RATE_DUO_FREE, + /*! \if FR Frequence de 40Hz predefinie sur DUO. \else 40Hz predefined scanrate for DUO. \endif */ + MCHR_SCAN_RATE_DUO_40HZ, + /*! \if FR Frequence de 100Hz predefinie sur DUO. \else 100Hz predefined scanrate for DUO. \endif */ + MCHR_SCAN_RATE_DUO_100HZ, + /*! \if FR Frequence de 200Hz predefinie sur DUO. \else 200Hz predefined scanrate for DUO. \endif */ + MCHR_SCAN_RATE_DUO_200HZ, + /*! \if FR Frequence de 400Hz predefinie sur DUO. \else 400Hz predefined scanrate for DUO. \endif */ + MCHR_SCAN_RATE_DUO_400HZ, + /*! \if FR Frequence de 1000Hz predefinie sur DUO. \else 1000Hz predefined scanrate for DUO. \endif */ + MCHR_SCAN_RATE_DUO_1000HZ, + /*! \if FR Frequence de 2000Hz predefinie sur DUO. \else 2000Hz predefined scanrate for DUO. \endif */ + MCHR_SCAN_RATE_DUO_2000HZ, + /*! \if FR Frequence Max predefinie sur DUO. \else Max predefined scanrate for DUO. \endif */ + MCHR_MAX_SCAN_RATE_DUO, + +#if defined(_cplusplus) || defined(__cplusplus) +}; +#else +} enSCAN_RATE_LIST_DUO; +#endif + +/*! \enum enSCAN_RATE_LIST_RUBY + \brief + \if FR Liste des frequences parametrables pour un controleur RUBY. + \else list of rate identifiers for RUBY. + \endif + \warning + \if FR Seulement pour coffret RUBY. + \else Only for RUBY controller. + \endif +*/ +#if defined(_cplusplus) || defined(__cplusplus) +enum enSCAN_RATE_LIST_RUBY +{ +#else +typedef enum +{ +#endif + /*! \if FR Frequence libre predefinie sur RUBY. \else Free predefined scanrate for RUBY. \endif */ + MCHR_SCAN_RATE_RUBY_FREE, + /*! \if FR Frequence de 4Hz predefinie sur RUBY. \else 4Hz predefined scanrate for RUBY. \endif */ + MCHR_SCAN_RATE_RUBY_4HZ, + /*! \if FR Frequence de 10Hz predefinie sur RUBY. \else 10Hz predefined scanrate for RUBY. \endif */ + MCHR_SCAN_RATE_RUBY_10HZ, + /*! \if FR Frequence de 20Hz predefinie sur RUBY. \else 20Hz predefined scanrate for RUBY. \endif */ + MCHR_SCAN_RATE_RUBY_20HZ, + /*! \if FR Frequence de 40Hz predefinie sur RUBY. \else 40Hz predefined scanrate for RUBY. \endif */ + MCHR_SCAN_RATE_RUBY_40HZ, + /*! \if FR Frequence de 100Hz predefinie sur RUBY. \else 100Hz predefined scanrate for RUBY. \endif */ + MCHR_SCAN_RATE_RUBY_100HZ, + /*! \if FR Frequence de 200Hz predefinie sur RUBY. \else 200Hz predefined scanrate for RUBY. \endif */ + MCHR_SCAN_RATE_RUBY_200HZ, + /*! \if FR Frequence de 400Hz predefinie sur RUBY. \else 400Hz predefined scanrate for RUBY. \endif */ + MCHR_SCAN_RATE_RUBY_400HZ, + /*! \if FR Frequence de 1000Hz predefinie sur RUBY. \else 1000Hz predefined scanrate for RUBY. \endif */ + MCHR_SCAN_RATE_RUBY_1000HZ, + /*! \if FR Frequence de 2000Hz predefinie sur RUBY. \else 2000Hz predefined scanrate for RUBY. \endif */ + MCHR_SCAN_RATE_RUBY_2000HZ, + /*! \if FR Frequence Max predefinie sur RUBY. \else Max predefined scanrate for RUBY. \endif */ + MCHR_MAX_SCAN_RATE_RUBY, +#if defined(_cplusplus) || defined(__cplusplus) +}; +#else +} enSCAN_RATE_LIST_RUBY; +#endif + + +/*! \enum enCPUType + \brief + \if FR Type de CPU embarqu? + \else Embedded CPU type. + \endif + \warning + \if FR Utilisation par STIL SA uniquement. + \else STIL SA use only. + \endif +*/ +#if defined(_cplusplus) || defined(__cplusplus) +enum enCPUType +{ +#else +typedef enum +{ +#endif + CPU_JREX_PM_1G, + CPU_JREX_PM_1_8G, + CPU_DG41MJ_L_3G, + CPU_DG41AN_LUF_3G, + CPU_DG41AN_WIN_3G, + CPU_DG41AN_L_3G, + CPU_DG41AN_LRUBY_3G, + CPU_DH61DL_L_3G, + CPU_DH61DL_LRUBY_3G, + NBR_MAX_CPU, +#if defined(_cplusplus) || defined(__cplusplus) +}; +#else +} enCPUType; +#endif + + +/*! \def MCHR_MAX_SCAN_RATE + \brief + \if FR Frequence d'acquisition maximum. + \else Max Scan Frequency Rate. + \endif +*/ +#define MCHR_MAX_SCAN_RATE MCHR_MAX_SCAN_RATE_CHRXE + + +/*! \enum enMeasureMode + \brief + \if FR Modes de mesure. + \else Measuring modes. + \endif +*/ +#if defined(_cplusplus) || defined(__cplusplus) +enum enMeasureMode +{ +#else +typedef enum +{ +#endif + /*! \if FR Mode mesure de distance en confocal chromatique. \else Chromatic Confocal Distance measuring mode. \endif */ + MCHR_DISTANCE_MODE = 0, + /*! \if FR Mode mesure d'epaisseur en confocal chromatique. \else Chromatic Confocal Thickness measuring mode. \endif */ + MCHR_THICKNESS_MODE = 1, + /*! \if FR Mode mesure d'epaisseur en interferometrie lumiere blanche (ILB). \warning Seulement pour STIL-DUO \else SAWLI Thickness measuring mode. \warning Only for STIL-DUO \endif */ + MCHR_SAWLI_THICKNESS_MODE = 2, + /*! \if FR Mode mesure de distance en interferometrie lumiere blanche (ILB). \warning Seulement pour STIL-DUO \else SAWLI Distance measuring mode. \warning Only for STIL-DUO \endif */ + MCHR_SAWLI_DISTANCE_MODE = 3, + /*! \if FR Mesure spectrometrique dans le repere XYZ. \warning Seulement pour NCS-RUBY \else Spectrometric mesurement using XYZ scaling. \warning Only for NCS-RUBY \endif */ + MCHR_MESURE_XYZ = 4, + /*! \if FR Mesure spectrometrique dans le repere Yxy. \warning Seulement pour NCS-RUBY \else Spectrometric mesurement using yxy scaling. \warning Only for NCS-RUBY \endif */ + MCHR_MESURE_Yxy = 5, + /*! \if FR Mesure spectrometrique dans le repere RGB. \warning Seulement pour NCS-RUBY \else Spectrometric mesurement using RGB scaling. \warning Only for NCS-RUBY \endif */ + MCHR_MESURE_RGB = 6, + /*! \if FR Mesure spectrometrique dans le repere Lab. \warning Seulement pour NCS-RUBY \else Spectrometric mesurement using Lab scaling. \warning Only for NCS-RUBY \endif */ + MCHR_MESURE_Lab = 7, + /*! \if FR Mesure spectrometrique dans le repere Luv. \warning Seulement pour NCS-RUBY \else Spectrometric mesurement using Luv scaling. \warning Only for NCS-RUBY \endif */ + MCHR_MESURE_Luv = 8, + /*! \if FR Mesure spectrometrique dans le repere LChab. \warning Seulement pour NCS-RUBY \else Spectrometric mesurement using LChab scaling. \warning Only for NCS-RUBY \endif */ + MCHR_MESURE_LCh_ab = 9, + /*! \if FR Mesure spectrometrique dans le repere W. \warning Seulement pour NCS-RUBY \else Spectrometric mesurement using W scaling. \warning Only for NCS-RUBY \endif */ + MCHR_MESURE_W = 10, + /*! \if FR Mode mesure de distance en confocal chromatique. \else Chromatic Confocal Distance measuring mode. \endif */ + MCHR_DISTANCE_AND_SPECTRUM_MODE = 8, + /*! \if FR Mode mesure d'epaisseur en confocal chromatique. \else Chromatic Confocal Thickness measuring mode. \endif */ + MCHR_THICKNESS_AND_SPECTRUM_MODE = 9, + /*! \if FR Limite du nombre de mode mesure. \else Limit number of measuring modes. \endif */ + MCHR_MAX_MODE = 11 + +#if defined(_cplusplus) || defined(__cplusplus) +}; +#else +} enMeasureMode; +#endif + +/*! \enum enDigitalOutputFormat + \brief + \if FR + Type de sortie digitale. + \else + Digital Output Format. + \endif +*/ +#if defined(_cplusplus) || defined(__cplusplus) +enum enDigitalOutputFormat +{ +#else +typedef enum +{ +#endif + /*! \if FR Donnees formatees en ASCII. \else ASCII data format. \endif */ + MCHR_ASCII, + /*! \if FR Donnees formatees en binaire. \else Binary data format. \endif */ + MCHR_BINARY, + /*! \if FR Donnees transf閞閑 pas paquet. \warning Seulement pour STIL-DUO et CHR-450 \else Data transfered using packets. \warning Only for STIL-DUO and CHR-450 \endif */ + MCHR_PACKET, + /*! \if FR Limite du nombre de type de format de donnees. \else Limit number of data types. \endif */ + MCHR_MAX_FORMAT +#if defined(_cplusplus) || defined(__cplusplus) +}; +#else +} enDigitalOutputFormat; +#endif + + +/*! \enum enDigitalOutputChannel + \brief + \if FR + Type de sortie digitale. + \else + Digital Output Channel. + \endif +*/ +#if defined(_cplusplus) || defined(__cplusplus) +enum enDigitalOutputChannel +{ +#else +typedef enum +{ +#endif + /*! \if FR Donnees non transmises. \else Data not transmitted. \endif */ + MCHR_NOT_TRANSMIT, + /*! \if FR Donnees transmises sur le port serie. \else Data transmitted via serial port. \endif */ + MCHR_MAIN_SERIAL, + /*! \if FR Donnees transmises sur le port serie auxiliaire. \else Data transmitted via auxiliary serial port. \endif */ + MCHR_AUX_SERIAL, + /*! \if FR Donnees transmises sur le port Ethernet. \warning Seulement pour STIL-DUO et CHR-450 \else Data transmitted via ethernet port. \warning Only for STIL-DUO and CHR-450 \endif */ + MCHR_ETHERNET, + /*! \if FR Donnees transmises sur le port USB. \warning Seulement pour CCS et STIL INITIAL \else Data transmitted via USB port. \warning Only for CCS and STIL INITIAL \endif */ + MCHR_USB=3, + /*! \if FR Enumeration maximale du type de donnees transmises. \else Maximum enum for transmitted data types. \endif */ + MCHR_MAX_OUTPUT_CHANNEL +#if defined(_cplusplus) || defined(__cplusplus) +}; +#else +} enDigitalOutputChannel; +#endif + + +/*! \enum enTriggerType + \brief + \if FR + Type de Trigger. + \else + Trigger type. + \endif + \warning + \if FR Les types de Trigger disponibles dependent du type de controleur. + \else available trigger types depend on controller type. + \endif + +*/ +#if defined(_cplusplus) || defined(__cplusplus) +enum enTriggerType +{ +#else +typedef enum +{ +#endif + MCHR_TYPE_NONE, + /*! \brief + \if FR : Commence quand l'impulsion Trig est re鐄, sans r?armer + \else : Start when a Trig pulse is received, do not re-arm + \endif + */ + MCHR_TYPE_TRG, + /*! \brief + \if FR : D閎ute ou stop la mesure d鑣 la r閏eption de 3 impulsions Trig et r?arme + \else : Start/Stop measurement upon successive Trig pulses, and re-arm + \endif + */ + MCHR_TYPE_TRS, + /*! \brief + \if FR : + \else : Send a burst of N points when a Trig pulse is received, and re-arm + \endif + */ + MCHR_TYPE_TRE, + /*! \brief + \if FR : + \else : Start/Stop measurement upon Trig-signal state, and re-arm + \endif + */ + MCHR_TYPE_TRN, + MCHR_MAX_TYPE +#if defined(_cplusplus) || defined(__cplusplus) +}; +#else +} enTriggerType; +#endif + + +/*! \enum enAcqEventType + \brief + \if FR + Acquisition du type d'evenement. + \else + Acquisition Event Type. + \endif +*/ +#if defined(_cplusplus) || defined(__cplusplus) +enum enAcqEventType +{ +#else +typedef enum +{ +#endif + /*! \if FR Correspond ?l'evenement d'acquisition du point de la structure. \else Corresponds to EventAcquire_n_Points of this structure. \endif */ + MCHR_ONE_STEP_EVENT, + /*! \if FR Correspond . \else Corresponds to EventEndBuffer of the acquisition parameter structure. \endif */ + MCHR_BUFFER_EVENT, + /*! \if FR Correspond. \else Corresponds to EventEndMeasurement of this structure. \endif */ + MCHR_END_MEASUREMENT, + MCHR_MAX_EVENT +#if defined(_cplusplus) || defined(__cplusplus) +}; +#else +} enAcqEventType; +#endif + +// MCHR_LOOKUP_TABLE, Added january 2th 2008 +/*! \enum enSignalType + \brief + \if FR + Types de signaux. + \else + Signals types. + \endif +*/ +#if defined(_cplusplus) || defined(__cplusplus) +enum enSignalType +{ +#else +typedef enum +{ +#endif + /*! \if FR Correspond. \else NO SIGNAL. \endif */ + MCHR_NOT_SIGNAL, + /*! \if FR Correspond. \else RAW SIGNAL \endif */ + MCHR_RAW_SIGNAL, + /*! \if FR Correspond. \else PRETREATED SIGNAL. \endif */ + MCHR_PRETREATED_SIGNAL, + /*! \if FR Correspond. \else DARK SIGNAL \endif */ + MCHR_DARK_SIGNAL, + /*! \if FR Correspond. \else WHITE REFERENCE SIGNAL. \endif */ + MCHR_WHITEREF_SIGNAL, + /*! \if FR Correspond. \else LOOKUP TABLE OF CALIBRATION. \endif */ + MCHR_LOOKUP_TABLE, + /*! \if FR Correspond. \else REFRACTIVE INDEX \endif */ + MCHR_REFRACTIVE_INDEX, + /*! \if FR Correspond. \else THE OPTICAL DARK SIGNAL \endif */ + MCHR_OPTICAL_DARK, + /*! \if FR Correspond. \else THE ELECTONIC DARK SIGNAL \endif */ + MCHR_ELECTRONIC_DARK, + /*! \if FR Correspond. \else THE NORMALISATION WHITE SIGNAL. \endif */ + MCHR_NORMALIZATION_WHITE, + /*! \if FR Correspond. \else THE SIGNAL OF REFERENCE. \endif */ + MCHR_REFERENCE_SIGNAL, + MCHR_MAX_SIGNAL +#if defined(_cplusplus) || defined(__cplusplus) +}; +#else +} enSignalType; +#endif + + +/*! \enum enPeakSelectionMode + \brief + \if FR + Mode de selection de pic. + \else + Peak selection mode. + \endif +*/ +#if defined(_cplusplus) || defined(__cplusplus) +enum enPeakSelectionMode +{ +#else +typedef enum +{ +#endif + MCHR_HIGH_PEAK, + MCHR_FIRST_PEAK, + MCHR_LAST_PEAK, + MCHR_MAX_PEAK_MODE +#if defined(_cplusplus) || defined(__cplusplus) +}; +#else +} enPeakSelectionMode; +#endif + + + +/*! \enum enAutoDarkMode + \brief + \if FR + Mode de Dark Automatique. + \else + Auto Dark mode. + \endif +*/ +#if defined(_cplusplus) || defined(__cplusplus) +enum enAutoDarkMode +{ +#else +typedef enum +{ +#endif + MCHR_MANUAL_DARK, + MCHR_AUTO_DARK, + MCHR_MAX_AUTO_DARK_MODE +#if defined(_cplusplus) || defined(__cplusplus) +}; +#else +} enAutoDarkMode; +#endif + +/*! \enum enLedType + \brief + \if FR + Type de Led. + \else + Led type. + \endif +*/ +#if defined(_cplusplus) || defined(__cplusplus) +enum enLedType +{ +#else +typedef enum +{ +#endif + //Values for CHR devices (LPA function used) + //0 + MCHR_CCS_LED_NO_SOURCE, + //1 + MCHR_CCS_LED_INNER, + //2 + MCHR_CCS_HALOGEN, + //3 + MCHR_CCS_LED_XENON, + //Values for CCS devices (SRC function used) + //0 + MCHR_LED_OUTER=0, + //1 + MCHR_LED_INNER, + +#if defined(_cplusplus) || defined(__cplusplus) +}; +#else +} enLedType; +#endif + + +/*! \enum enLevelEdgeFlag + \brief + \if FR + Definition du niveau du Signal et du front. + \else + Level or Edge definition. + \endif +*/ +#if defined(_cplusplus) || defined(__cplusplus) +enum enLevelEdgeFlag +{ +#else +typedef enum +{ +#endif + MCHR_HIGH_LEVEL = 0, + MCHR_LOW_LEVEL, + MCHR_RISING_EDGE = 0, + MCHR_FALLING_EDGE, + MCHR_MAX_LEVEL_EDGE_FLAG +#if defined(_cplusplus) || defined(__cplusplus) +}; +#else +} enLevelEdgeFlag; +#endif + + + +/*! \enum enSecondPeakHandling + \brief + \if FR + Second pic. + \else + Second peak handling. + \endif +*/ +#if defined(_cplusplus) || defined(__cplusplus) +enum enSecondPeakHandling +{ +#else +typedef enum +{ +#endif + MCHR_SECOND_PEAK_NULL, + MCHR_SECOND_PEAK_IS_PEAK_ONE +#if defined(_cplusplus) || defined(__cplusplus) +}; +#else +} enSecondPeakHandling; +#endif + + + +/*! \enum enLanguage + \brief + \if FR + Determine le nombre max de langages et les identifie + \else + Max Number langages et identification. + \endif +*/ + +#if defined(_cplusplus) || defined(__cplusplus) +enum enLanguage +{ +#else +typedef enum +{ +#endif + ENGLISH, + FRENCH, + NBR_MAX_LANGUAGE +#if defined(_cplusplus) || defined(__cplusplus) +}; +#else +} enLanguage; +#endif + +/*! \enum enObservateur + \brief + \if FR + \brief Observateur standart disponible pour 1931 (2?, 1964 (10? + \else + \brief Standart observator available to 1931 (2?, 1964 (10? + \endif +*/ +#if defined(_cplusplus) || defined(__cplusplus) +enum enObservateur +{ +#else +typedef enum +{ +#endif + /*! \brief CIE1931 (2?, */ + OBS_CIE1931, + /*! \brief CIE1964 (10?. */ + OBS_CIE1964, + NBR_MAX_OBSERVATEUR +#if defined(_cplusplus) || defined(__cplusplus) +}; +#else +} enObservateur; +#endif + +/*! \enum enIlluminant + \brief + \if FR + \brief Illuminant standart (CIE) disponible pour le calcul de coordonn閑s colorim閠riques A B C D F. + + \else + \brief Standart Illinant (CIE) avaible to calculate the colorimetry Coordinate A B C D. + + \endif +*/ + +#if defined(_cplusplus) || defined(__cplusplus) +enum enIlluminant +{ +#else +typedef enum +{ +#endif + ILLUM_A, + ILLUM_D65, + ILLUM_C, + ILLUM_D50, + ILLUM_D55, + ILLUM_D75, + ILLUM_FL01, + ILLUM_FL02, + ILLUM_FL03, + ILLUM_FL04, + ILLUM_FL05, + ILLUM_FL06, + ILLUM_FL07, + ILLUM_FL08, + ILLUM_FL09, + ILLUM_FL10, + ILLUM_FL11, + ILLUM_FL12, + ILLUM_HP1, + ILLUM_HP2, + ILLUM_HP3, + ILLUM_HP4, + ILLUM_HP5, + NBR_MAX_ILLUMINANT +#if defined(_cplusplus) || defined(__cplusplus) +}; +#else +} enIlluminant; +#endif + +/*! \enum enIndiceCouleur + \brief + \if FR + \brief Indice de couleur + \else + \brief Indice Of the color. + +*/ +#if defined(_cplusplus) || defined(__cplusplus) +enum enIndiceCouleur +{ +#else +typedef enum +{ +#endif + IND_COLOR_E2000, + IND_COLOR_Eab, + IND_COLOR_CMC, + NBR_IND_COLOR +#if defined(_cplusplus) || defined(__cplusplus) +}; +#else +} enIndiceCouleur; +#endif + +/*! \enum enIndiceSpectre + \brief + \if FR + Les differents indice de spectre + \else + The differrent spectral index + \endif +*/ +#if defined(_cplusplus) || defined(__cplusplus) +enum enIndiceSpectre +{ +#else +typedef enum +{ +#endif + IND_SPECTRE_RMS, + IND_SPECTRE_GFC, + NBR_IND_SPECTRE +#if defined(_cplusplus) || defined(__cplusplus) +}; +#else +} enIndiceSpectre; +#endif + +/*! \enum enTypeConformite + \brief + \if FR + \brief Definit le type de comparaison entre couleur ? et couleur rererence en mode spectral ou mode couleur. + \else + \Brief Define the comparison type between ? color and referent color spectral mode or color mode. + + \endif +*/ +#if defined(_cplusplus) || defined(__cplusplus) +enum enTypeConformite +{ +#else +typedef enum +{ +#endif + CONFORMITE_DESACTIVE, + CONFORMITE_COULEUR, + CONFORMITE_SPECTRE, + NBR_MAX_TYPE_CONFORMITE +#if defined(_cplusplus) || defined(__cplusplus) +}; +#else +} enTypeConformite; +#endif + +/*! \enum enTypeEtendueSpectrale + \brief + \if FR + Les types de spectres 閠endus + \else + The types of etendue spectral + \endif +*/ +#if defined(_cplusplus) || defined(__cplusplus) +enum enTypeEtendueSpectrale +{ +#else +typedef enum +{ +#endif + ETENDUE_ISO, + ETENDUE_STD, + ETENDUE_COURT, + ETENDUE_OPTIMISE, + NBR_MAX_ETENDUE_SPECTRALE +#if defined(_cplusplus) || defined(__cplusplus) +}; +#else +} enTypeEtendueSpectrale; +#endif + +/*! \enum enTypeAcqFreqBlanc + \brief + \if FR + \brief Definit le type d'acquisition pour le calibrage du blanc, en mode automatique ou en mode manuel. + + \else + \brief define the acquisition type to calibrate the white in automatic mode or manual mode + \endif +*/ +#if defined(_cplusplus) || defined(__cplusplus) +enum enTypeAcqFreqBlanc +{ +#else +typedef enum +{ +#endif + FREQ_BLANC_COURANTE, + FREQ_BLANC_AUTO, + NBR_MAX_TYPE_FREQ_BLANC +#if defined(_cplusplus) || defined(__cplusplus) +}; +#else +} enTypeAcqFreqBlanc; +#endif + +/*! \enum enRealTimeSignalType + \brief + \if FR + \brief Selection du type de spectre envoy?en temps reel + \arg \c Pas de Spectre + \arg \c Spectre Brut + \arg \c Spectre pre-traiter + + \else + \brief Selection of spectrum type send in real time. + \arg \c No spectrum + \arg \c Spectrum raw + \arg \c Spectrum pre-treated + + \endif +*/ +#if defined(_cplusplus) || defined(__cplusplus) +enum enRealTimeSignalType +{ +#else +typedef enum +{ +#endif + REALTIME_NO_SIGNAL, + REALTIME_RAW_SIGNAL, + REALTIME_PRETRAITED_SIGNAL, + NBR_MAX_RT_SIGNAL_TYPE + +#if defined(_cplusplus) || defined(__cplusplus) +}; +#else +} enRealTimeSignalType; +#endif + + + + + +/* +Structure de param鑤res d'acquisition +Acquisition parameters Structure +*/ +/*! Acquisition parameters Structure */ +typedef struct _AcqParam +{ + /* + Nombre de points ?acquerir. Si la valeur vaut 0 l'acquisition se fera en continu + Number of points to acquire. If this parameter is set to 0, acquisition will be continuous. + */ + /*! + \brief + \if FR + + \else + Number of point to measure. If this parameters is set to 0, measurement will be continuous (i.e. will last forever or until stopped by the user) and no event " EventEndMeasurement" will be generated + \endif + */ + DWORD NumberOfPoints; + + /* + Indique si la t鈉he d'acquisition doit initialiser le CHR-150 en attente de trigger ou si la t鈉he d'acquisition doit demarrer immediatement. + Trigger flag. This parameter indicates if the CHR sould wait a trig signal before starting, or not. + */ + /*! + \brief + \if FR + + \else + This parameter activates or deactivates Trigger mode (if Trigger mode is active acquisition will wait for a "Trigger in" signal to start, otherwise acquisition starts immediately). + \endif + */ + BOOL TriggerFlag; + /*! + \brief + \if FR + + \else + This parameter is significant only if TriggerFlag is set to 揟RUE? + \endif + */ + /* + Indique le type de trigger utilise + Trigger Type. This parameter indicates the trigger mode (TRG /TRE/TRN/ TRS) + */ + enum enTriggerType TriggerType; + + /* + Indique le niveau ou le type de front actif + LevelEdgeFlag: This parameter indicates the active edge + */ + /*! + \brief + \if FR + + \else + This parameter is significant only if TriggerFlag is set to 揟RUE?and only for CCS and STIL-INITIAL sensors. + It indicates which edge of the Sync-In signal pulse is active (for TRG, TRE, and TRS) or which state of this signal is active (for TRN). + Authorized values are: MCHR_FALLING_EDGE, MCHR_RISING_EDGE, MCHR_LOW_LEVEL, MCHR_HIGH_LEVEL. + \endif + */ + enLevelEdgeFlag HighLevelOrRisingEdgeActivated; + + /* + Nombre d'image ?acquerir en mode TRE + Number of points for TRE mode: This parameter indicates the number of points to acquire after each Sync-in pulse + */ + /*! + \brief + \if FR + + \else + This parameter is significant only if TriggerFlag is set to 揟RUE?and if TriggerType is set to MCHR_TYPE_TRE. + It determines the number of points that are latched after each TRE pulse. + For CHR 150 sensor the only valid value is 1. + FOR CCS sensors, STIL-DUO and STIL-INITIAL sensors valid values are 1 to 999. + \endif + */ + DWORD NumberPointsTRE; + + /* + Indique le nombre de buffers pour les differents types de donnees. Ce param鑤re doit 阾re superieur ?0. + Number of buffers per data item. This parameter should be greater than 0 + */ + /*! + \brief + \if FR + + \else + The number of buffers per data type for receiving the measured data (Should be greater than or equal to 1). + \endif + */ + DWORD NumberOfBuffers; + + /* + Nombre de point max contenus dans les buffers de reception des donnees mesurees + Max number of points (data) per buffer + */ + /*! + \brief + \if FR + + \else + Size of the buffers for receiving the measured data (in words: one word=data for one measured point). + \endif + */ + DWORD BufferLength; + + /* + Definie le nombre de points ?acquerir avant de signaler un evenement. + This parameters gives the number of data to acquire before signaling an event + */ + /*! + \brief + \if FR + + \else + This parameter is significant only if the EventAcquire_n_Points is activated. + It determines the number of points to be measured before creating the 揈ventAcquire_n_Points?event. + This parameter should be an integer divider of BufferLength (e.g. if BufferLength=10, + The authorized values of NumberOfPointsBeforeSignal are 1, 2, 5 and 10). In addition, + If this parameter is set to 0, no event 揈ventAcquire_n_Points" will be generated. + \endif + */ + DWORD NumberOfPointsBeforeSignal; + + /* + ev鑞ement signalant l'acquisition de NumberOfPointBeforeSignal + Event indicating that "NumberOfPointBeforeSignal " points have been acquired + */ + /*! + \brief + \if FR + + \else + Event that indicates that NumberOfPointsBeforeSignal points have been acquired (set by the DLL). + \endif + */ + HANDLE EventAcquire_n_Points; + + /* + ev鑞ement signalant la fin de remplissage d'un buffer de mesures. + Event indicating that one or several buffer is/are full. + */ + /*! + \brief + \if FR + + \else + Event that indicates that an acquisition buffer is full (set by the DLL). + \endif + */ + HANDLE EventEndBuffer; + + /* + ev鑞ement signalant la fin de l'acquisition des NumberOfPoints points de mesures demandes. Si NumberOfPoints vaut 0, cet evenement n'aura jamais lieu. + Event indicating measurement end ("NumberOfPoint" points have been acquired) + */ + /*! + \brief + \if FR + + \else + Event that indicates that NumberOfPoints points have been acquired (set by the DLL). + Note: if NumberOfPoints equals 0, this event will never occur. + \endif + */ + HANDLE EventEndMeasurement; + + /* + Ev鑞ement permettant de stopper l'acquisition avant la fin + User-set event indicating that acquisition should be stopped (aborted) + */ + /*! + \brief + \if FR + + \else + Obsolete, kept for compatibility with earlier versions. + \endif + */ + HANDLE EventEndAcquire; + + /* + Evenement permettant de signaler le debut effectif de l'acquisition + Event indicationg the actual start of acquisition upon reception of trigger signal + */ + /*! + \brief + \if FR + + \else + Event that indicates that acquisition has actually been started (set by the DLL). + This event may be used for controlling triggered acquisition. + \endif + */ + HANDLE EventStartingAcquisition; + +/*! + \brief + \if FR + \brief liste des types : tyAcqParam + \arg \c DWORD NumberOfPoints + \arg \c BOOL TriggerFlag + \arg \c enTriggerType TriggerType + \arg \c enLevelEdgeFlag HighLevelOrRisingEdgeActivated + \arg \c DWORD NumberPointsTRE + \arg \c WORD NumberOfBuffers + \arg \c DWORD BufferLength + \arg \c DWORD NumberOfPointsBeforeSignal + \arg \c HANDLE EventAcquire_n_Points + \arg \c HANDLE EventEndBuffer + \arg \c HANDLE EventEndMeasurements + \arg \c HANDLE EventEndAcquire + \arg \c HANDLE EventStartingAcquisition + \else + \brief Type name: tyAcqParam + \arg \c DWORD NumberOfPoints + \arg \c BOOL TriggerFlag + \arg \c enTriggerType TriggerType + \arg \c enLevelEdgeFlag HighLevelOrRisingEdgeActivated + \arg \c DWORD NumberPointsTRE + \arg \c WORD NumberOfBuffers + \arg \c DWORD BufferLength + \arg \c DWORD NumberOfPointsBeforeSignal + \arg \c HANDLE EventAcquire_n_Points + \arg \c HANDLE EventEndBuffer + \arg \c HANDLE EventEndMeasurements + \arg \c HANDLE EventEndAcquire + \arg \c HANDLE EventStartingAcquisition + \endif + */ + +} MCHR_tyAcqParam; + + +//#define EventEndMeasurement EventEndMeasurementTest + /* + Definition des types pour les fonctions callback + Type definition for callback functions + */ + + /*! Sensor response to know the reception of sent file */ +typedef void (* CALLBACK_SEND_FILE)(BOOL FlagInit, long Param1, long Param2) ; + + /*! Sensor response to know the status of connection */ +typedef void (* CALLBACK_STATUS_CONNECTION)(long Param1, long Param2) ; + +/*! Structure of DATA */ +typedef struct _MCHR_FILE_DATA_ { + /*! Destination Directory of sent file */ + BOOL bIsDirectory; + /*! Size of sent file */ + DWORD nFileSize; + /*! Name of sent file */ + char cFileName[MAX_PATH]; + /*! Creation time of sent file */ + long ftCreationTime; + /*! Name of sent file */ + WCHAR cWideFileName[MAX_PATH]; +} MCHR_FILE_DATA, *PMCHR_FILE_DATA; + +/*! Structure of DATA */ +typedef struct _MCHR_FILE_DATA_EX_ { + /*! Destination Directory of sent file */ + BOOL bIsDirectory; + /*! Size of sent file */ + DWORD nFileSize; + /*! Name of sent file */ + char cFileName[MAX_PATH]; + /*! Creation time of sent file */ + long ftCreationTime; +} MCHR_FILE_DATA_EX, *PMCHR_FILE_DATA_EX; + +/*! Structure of refractive information file */ +typedef struct _MCHR_REFRACTIVE_FILE_INFO_ { + /*! Description BY CHARACTERS*/ + char szDescription[MAX_PATH]; + /*! The description by UNICODE*/ + WCHAR szDescriptionWideChar[MAX_PATH]; + /*! Min value of the refractive file */ + float fMin; + /*! Max value of the refractive file */ + float fMax; + /*! Average value of the refractive file */ + float fAvg; +} REFRACTIVE_FILE_INFO,*PREFRACTIVE_FILE_INFO; + + +#if defined(_cplusplus) || defined(__cplusplus) +} +#endif /* _cplusplus */ +#endif \ No newline at end of file diff --git a/PcDmis/Base/Interfac/Msi/Hsi/STIL/Common/inc/Sawli.h b/PcDmis/Base/Interfac/Msi/Hsi/STIL/Common/inc/Sawli.h new file mode 100644 index 0000000..ff342ed --- /dev/null +++ b/PcDmis/Base/Interfac/Msi/Hsi/STIL/Common/inc/Sawli.h @@ -0,0 +1,281 @@ +/********************************************************* +** White light interferometry functions ** +*********************************************************/ +/*! + \fn short MCHR_GetSAWLINumberOfLayer(MCHR_ID SensorID, long *piNbLayers) + \if FR + \brief Fonction permettant de recuperer le nombre de couches mesurable en mode ILB (SAWLI). + \warning Seulement pour les coffrets ILB (SAWLI). + \else + \brief Function getting number of layers measurable in SAWLI mode. + \warning Only for SAWLI Controllers. + \endif + \details + \if FR + \param [in] MCHR_ID SensorID : ID du coffret. + \param [out] long *piNbLayers : Nombre de couche mesurable. + \return short : un code d'erreur MCHR_ERROR. + \else + \param [in] MCHR_ID SensorID : ID of the device. + \param [out] long *piNbLayers : Number of SAWLI measurable layers. + \return short : A \link MCHR_ERROR MCHR_ERROR \endlink code. + \endif + +*/ +DLL_CHR_API short MCHR_GetSAWLINumberOfLayer(MCHR_ID SensorID, long *piNbLayers); + +/*! + \fn short MCHR_SetSAWLINumberOfLayer(MCHR_ID SensorID, long iNbLayers) + \if FR + \brief Fonction permettant de param閠rer le nombre de couches mesurable en mode ILB (SAWLI). + \warning Seulement pour les coffrets ILB (SAWLI). + \else + \brief Function setting number of layers measurable in SAWLI mode. + \warning Only for SAWLI Controllers. + \endif + \details + \if FR + \param [in] MCHR_ID SensorID : ID du coffret. + \param [in] long iNbLayers : Nombre de couche mesurable. + \return short : un code d'erreur MCHR_ERROR. + \else + \param [in] MCHR_ID SensorID : ID of the device. + \param [in] long piNbLayers : Number of SAWLI measurable layers. + \return short : A \link MCHR_ERROR MCHR_ERROR \endlink code. + \endif +*/ +DLL_CHR_API short MCHR_SetSAWLINumberOfLayer(MCHR_ID SensorID, long iNbLayers); + +/*! + \fn short MCHR_GetSAWLISmoothing(MCHR_ID SensorID, long *piSmoothing) + \if FR + \brief Fonction permettant de recuperer le lissage du signal en mode ILB (SAWLI). + \warning Seulement pour les coffrets ILB (SAWLI). + \else + \brief Function getting smoothing value in SAWLI mode. + \warning Only for SAWLI Controllers. + \endif + \details + \if FR + \param [long] MCHR_ID SensorID : ID du coffret. + \param [out] long *iSmoothing : Largeur du lissage. + \return short : un code d'erreur MCHR_ERROR. + \else + \param [long] MCHR_ID SensorID : ID of the device. + \param [out] long *iSmoothing : Smoothing width. + \return short : A \link MCHR_ERROR MCHR_ERROR \endlink code. + \endif +*/ +DLL_CHR_API short MCHR_GetSAWLISmoothing(MCHR_ID SensorID, long *piSmoothing); + +/*! + \fn short MCHR_SetSAWLISmoothing(MCHR_ID SensorID, long iSmoothing) + \if FR + \brief Fonction permettant de parametrer le lissage du signal en mode ILB (SAWLI). + \warning Seulement pour les coffrets ILB (SAWLI). + \else + \brief Function setting smoothing value in SAWLI mode. + \warning Only for SAWLI Controllers. + \endif + \details + \if FR + \param [in] MCHR_ID SensorID : ID du coffret. + \param [in] long iSmoothing : Largeur du lissage. + \return short : un code d'erreur MCHR_ERROR. + \else + \param [in] MCHR_ID SensorID : ID of the device. + \param [in] long iSmoothing : Smoothing width. + \return short : A \link MCHR_ERROR MCHR_ERROR \endlink code. + \endif +*/ +DLL_CHR_API short MCHR_SetSAWLISmoothing(MCHR_ID SensorID, long iSmoothing); + +//These 4 functions helps you define the measurement range +// en micron + +/*! + \fn short MCHR_GetSAWLIMinThickness(MCHR_ID SensorId, long *piThickness) + \if FR + \brief Get the minimal value (threshold) of thickness to detect + \warning Seulement pour les coffrets ILB (SAWLI). + \else + \brief Get the minimal value (threshold) of thickness to detect + \warning Only for SAWLI Controllers. + \endif + \details + \if FR + \param [in] MCHR_ID SensorID: Sensor Identifier + \param [in] long piThickness: pointer to the Min thickness threshold. + \else + \param [in] MCHR_ID SensorID: Sensor Identifier + \param [in] long piThickness: pointer to the Min thickness threshold. + \endif + \return short : A \link MCHR_ERROR MCHR_ERROR \endlink code. +*/ +DLL_CHR_API short MCHR_GetSAWLIMinThickness(MCHR_ID SensorID,long *piThickness); + +/*! + \fn short MCHR_SetSAWLIMinThickness(MCHR_ID SensorId, long iThickness) + \if FR + \brief Set the minimal value (threshold) of thickness to detect + \warning Seulement pour les coffrets ILB (SAWLI). + \else + \brief Set the minimal value (threshold) of thickness to detect + \warning Only for SAWLI Controllers. + \endif + \details + \if FR + \param [in] MCHR_ID SensorID: Sensor Identifier + \param [in] long iThickness: Min thickness threshold, in 祄. + \else + \param [in] MCHR_ID SensorID: Sensor Identifier + \param [in] long iThickness: Min thickness threshold, in 祄. + \endif + \return short : A \link MCHR_ERROR MCHR_ERROR \endlink code. +*/ +DLL_CHR_API short MCHR_SetSAWLIMinThickness(MCHR_ID SensorID, long iThickness); + +/*! + \fn short MCHR_GetSAWLIMaxThickness(MCHR_ID SensorId, long *piThickness) + \if FR + \brief Get the maximal value (threshold) of thickness to detect + \warning Seulement pour les coffrets ILB (SAWLI). + \else + \brief Get the maximal value (threshold) of thickness to detect + \warning Only for SAWLI Controllers. + \endif + \details + \if FR + \param MCHR_ID SensorID: Sensor Identifier + \param long *piThickness: pointer to the Max thickness threshold. + \else + \param MCHR_ID SensorID: Sensor Identifier + \param long *piThickness: pointer to the Max thickness threshold. + \endif + \return short : A \link MCHR_ERROR MCHR_ERROR \endlink code. +*/ +DLL_CHR_API short MCHR_GetSAWLIMaxThickness(MCHR_ID SensorID, long *piThickness); + +/*! + \fn short MCHR_SetSAWLIMaxThickness(MCHR_ID SensorId, long iThickness) + \if FR + \brief Set the maximal value (threshold) of thickness to detect + \warning Seulement pour les coffrets ILB (SAWLI). + \else + \brief Set the maximal value (threshold) of thickness to detect + \warning Only for SAWLI Controllers. + \endif + \details + \if FR + \param [in] MCHR_ID SensorID: Sensor Identifier + \param [in] long iThickness: Max thickness threshold, in 祄. + \else + \param [in] MCHR_ID SensorID: Sensor Identifier + \param [in] long iThickness: Max thickness threshold, in 祄. + \endif + \return short : A \link MCHR_ERROR MCHR_ERROR \endlink code. + +*/ +DLL_CHR_API short MCHR_SetSAWLIMaxThickness(MCHR_ID SensorID, long iThickness); + +//Indices de refraction en mode ILB mode +//Refractive index used in the SAWLI mode + +/*! + \fn short MCHR_GetSAWLIRefractiveIndex(MCHR_ID SensorID,double *dRefractiveIndex); + \if FR + \brief Obtient l'indidice de refraction en mode interferometrique. + \warning Seulement pour les coffrets ILB (SAWLI). + \else + \brief Get the refractive index in Interferometric mode. + \warning Only for SAWLI Controllers. + \endif + \details + \if FR + \param [in] MCHR_ID SensorID: Sensor Identifier + \param [in] double *dRefractiveIndex : Indice de refraction + \else + \param [in] MCHR_ID SensorID: Sensor Identifier + \param [in] double *dRefractiveIndex : Index of refractive + \endif + \return short : A \link MCHR_ERROR MCHR_ERROR \endlink code. +*/ +DLL_CHR_API short MCHR_GetSAWLIRefractiveIndex(MCHR_ID SensorID,double *dRefractiveIndex); + +/*! + \fn short MCHR_SetSAWLIRefractiveIndex(MCHR_ID SensorID,double dRefractiveIndex); + \if FR + \brief Configure l'indidice de refraction en mode interferometrique. + \warning Seulement pour les coffrets ILB (SAWLI). + \else + \brief Set the refractive index in Interferometric mode. + \warning Only for SAWLI Controllers. + \endif + \details + \if FR + \param SensorID: Sensor Identifier + \param dRefractiveIndex : Indice de refraction + \else + \param SensorID: Sensor Identifier + \param dRefractiveIndex : Index of refractive + \endif + \return short : A \link MCHR_ERROR MCHR_ERROR \endlink code. +*/ +DLL_CHR_API short MCHR_SetSAWLIRefractiveIndex(MCHR_ID SensorID,double dRefractiveIndex); + +/* + Fonction d'acquisition d'une sequence de points en mode interferometrique avec capteur MTS-DUO + Acquisition function for the Interferometric mode + voir le .cpp correspondant pour plus d'info lors de la redaction de la doc +*/ +/*! + \fn short MCHR_GetInterferometricThicknessSAWLI ( MCHR_ID SensorID, MCHR_tyAcqParam Parameters, + PFLOAT *pArrayThickness1, PFLOAT *pArrayThickness2, PFLOAT *pArrayThickness3, + PFLOAT *pArrayQuality1, PFLOAT *pArrayQuality2, PFLOAT *pArrayQuality3, + PFLOAT *pArrayIntensity,PFLOAT *pNbThickness,PFLOAT *pCounter,PFLOAT *pState); + \if FR + \brief Acquisition function for the Specral Interferometric (SAWLI) Thickness mode.
+ \brief Note: in Distance mode set the number of layer to 1, and the refractive index to 1.0.
+ \brief The Distance Data may be comuted from the air gap thickness using the following raelation:
+ \brief Distance = 160祄 ?Thickness1. + \warning Seulement pour les coffrets ILB (SAWLI). + \else + \brief Acquisition function for the Specral Interferometric (SAWLI) Thickness mode.
+ \brief Note: in Distance mode set the number of layer to 1, and the refractive index to 1.0.
+ \brief The Distance Data may be comuted from the air gap thickness using the following raelation:
+ \brief Distance = 160祄 ?Thickness1. + \brief This function is destined to STIL-DUO in the interferometric mode + \warning Only for SAWLI Controllers. + \endif + \details + \if FR + \param SensorID: Sensor Identifier + \param iThickness: Max thickness threshold, in 祄. + \else + \param SensorID : Sensor Identifier + \param pThickness1 : a pointer to the Thickness1 data buffers. + \param pThickness2 : a pointer to the Thickness2 data buffers. + \param pThickness3 : a pointer to the Thickness3 data buffers + \param pQuality1 : a pointer to the Quality1 data buffers + \param pQuality2 : a pointer to the Quality2 data buffers + \param pQuality3 : a pointer to the Quality3 data buffers + \param pIntensity : a pointer to the Intensity data buffers + \param pNbThickness : a pointer to the Number Of Thicknesses data Buffers + \param pCounter : a pointer to the Counter data Buffers + \param pState : a pointer to the State Data buffer + \endif + \if FR + \par Capteurs Compatibles : STIL DUO en mode de mesure SAWLI interfermotric. + \else + \par Compatibles Sensors : STIL DUO in the SAWLI interfermotric measuring modes. + \endif + \return short : A \link MCHR_ERROR MCHR_ERROR \endlink code. +*/ +DLL_CHR_API short MCHR_GetInterferometricThicknessSAWLI (MCHR_ID SensorID, MCHR_tyAcqParam Parameters, + PFLOAT *pArrayThickness1, PFLOAT *pArrayThickness2, PFLOAT *pArrayThickness3, + PFLOAT *pArrayQuality1, PFLOAT *pArrayQuality2, PFLOAT *pArrayQuality3, + PFLOAT *pArrayIntensity,PFLOAT *pNbThickness,PFLOAT *pCounter,PFLOAT *pState); + + + + diff --git a/PcDmis/Base/Interfac/Msi/Hsi/STIL/Common/inc/cAcqEasy.h b/PcDmis/Base/Interfac/Msi/Hsi/STIL/Common/inc/cAcqEasy.h new file mode 100644 index 0000000..220d556 --- /dev/null +++ b/PcDmis/Base/Interfac/Msi/Hsi/STIL/Common/inc/cAcqEasy.h @@ -0,0 +1,86 @@ +#if !defined(AFX_ACQUISITION_EASY_H_INCLUDED_) +#define AFX_ACQUISITION_EASY_H_INCLUDED_ + +#include "afxmt.h" +#include "windows.h" +#include "MchrType.h" +#include "MchrDefine.h" +#include "MchrError.h" +#include "Mchr.h" +#include "cAcqEasyType.h" + +class cAcqEasy +{ +private: + HANDLE hThread; + static DWORD WINAPI ProcessThread (LPVOID lpArg); + DWORD ProcessThread(void); + HANDLE m_OnEvent[EVENT_ACQ_EASY_NUMBER]; + HANDLE m_OnEventAcquisition[EVENT_ACQUISITION_NUMBER]; + MCHR_tyAcqParam m_acqParam; + sAcqEasyParam m_acqEasyParam; + bool m_IsDataAcquisitionStarting; + bool m_IsSpectrumAcquisitionStarting; + MCHR_ID m_chr_id; + short m_status_acquisition; + char m_status_message[MAX_CHAR]; + int m_number_of_buffer_to_read; + int m_current_index_of_buffer_to_read; + long m_measure_index; + HANDLE m_end_acq_event; + HANDLE m_status_event; + float **m_ppAcqBuffer[ID_BUFFER_MAX]; //data buffers + DWORD **m_ppEncoderBuffer[ID_BUFFER_ENCODER_MAX]; //encoders buffers + float **m_ppAutoAdaptativeBuffer; //auto adaptative buffers + bool m_IsCreateAcqBuffer; + + CCriticalSection criticalBuffer; + + void _CreateAcqBuffer(int NumberOfBuffers, int BufferLength); + void _ReleaseAcqBuffer(int NumberOfBuffers); + + //try to determine and set the sensor mode and digital output + bool _SetSensorModeAndDigitalOutput(sAcqEasyParam *pAcqEasyParam); + +public: + cAcqEasy(MCHR_ID SensorID); + ~cAcqEasy(); + + //start spectrum acquisition + bool StartSpectrumAcquisition(unsigned short **ppSpectrum, unsigned short *pFirstUsablePixel, unsigned short *pBufferSize); + //stop spectrum acquisition + bool StopSpectrumAcquisition(unsigned short **ppSpectrum); + //read spectrum acquisition + bool GetSpectrumAcquisition(unsigned short *pSpectrum, unsigned short DataSize, unsigned short *pCounter, enSpectrumAcquisitionResult *pSpectrumAcquisitionResult, int timeout); + + + //start acquisition with acquisition parameters + bool StartAcquisition(sAcqEasyParam acqEasyParam); + //stop acquisition + bool StopAcquisition(); + //select your own acquisition event + void SetAcqEvent(HANDLE endAcqEvent) { m_end_acq_event = endAcqEvent; }; + //select your own status event + void SetStatusEvent(HANDLE statusEvent) { m_status_event = statusEvent; }; + + void SetSensorId(MCHR_ID Id) { m_chr_id = Id; } + MCHR_ID GetSensorId(void) { return (m_chr_id); } + bool GetAltitudeAcquisitionData(PFLOAT pArrayAltitude, PFLOAT pArrayIntensity, PFLOAT pArrayCounter, PFLOAT pArrayBarycenter, PFLOAT pArrayStatus, int* pCount); + bool GetThicknessAcquisitionData(PFLOAT pArrayThickness, PFLOAT pArrayDistance1, PFLOAT pArrayIntensity1, PFLOAT pArrayBarycenter1, PFLOAT pArrayDistance2, PFLOAT pArrayIntensity2, PFLOAT pArrayBarycenter2, PFLOAT pArrayStatus, PFLOAT pArrayCounter, int* pDataCount); + bool GetDepthAcquisitionData(PFLOAT pArrayDepth, PFLOAT pArrayIntensity, PFLOAT pArrayCounter, PFLOAT pArrayBarycenter, PFLOAT pArrayStatus, int* pDataCount); + bool GetInterferometricThicknessAcquisitionData(PFLOAT pArrayThickness1, PFLOAT pArrayThickness2, PFLOAT pArrayThickness3, PFLOAT pArrayQuality1, PFLOAT pArrayQuality2, PFLOAT pArrayQuality3, PFLOAT pArrayIntensity, int* pDataCount); + bool GetInterferometricThicknessSAWLIAcquisitionData(PFLOAT pArrayThickness1, PFLOAT pArrayThickness2, PFLOAT pArrayThickness3, PFLOAT pArrayQuality1, PFLOAT pArrayQuality2, PFLOAT pArrayQuality3, PFLOAT pArrayIntensity, PFLOAT pArrayThickness, PFLOAT pArrayCounter, PFLOAT pArrayStatus, int* pDataCount); + bool GetEncoderData(PDWORD pArrayEncoder1, PDWORD pArrayEncoder2, PDWORD pArrayEncoder3); + bool GetAutoAdaptativeData(PFLOAT pArrayAutoAdaptative); + bool GetTransmittedData_ChrDistance(PFLOAT pArrayDistance, PFLOAT pArrayIntensity, PFLOAT pArrayBarycenter, int* pDataCount); + bool GetTransmittedData_ChrThickness(PFLOAT pArrayThickness, PFLOAT pArrayDistance1, PFLOAT pArrayDistance2, PFLOAT pArrayIntensity1, PFLOAT pArrayIntensity2, PFLOAT pArrayBarycenter1, PFLOAT pArrayBarycenter2, int* pDataCount); + bool GetTransmittedData_CcsDistance(PFLOAT pArrayDistance, PFLOAT pArrayAutoAdaptativeModeData, PFLOAT pArrayIntensity, PFLOAT pArrayBarycenter, PFLOAT pArrayStatus, PFLOAT pArrayCounter, PDWORD pArrayEncoder1, PDWORD pArrayEncoder2, PDWORD pArrayEncoder3, int* pDataCount); + bool GetTransmittedData_CcsThickness(PFLOAT pArrayThickness, PFLOAT pArrayDistance1, PFLOAT pArrayDistance2, PFLOAT pArrayAutoAdaptativeModeData, PFLOAT pArrayIntensity1, PFLOAT pArrayIntensity2, PFLOAT pArrayBaryCenter1, PFLOAT pArrayBaryCenter2, PFLOAT pArrayStatus, PFLOAT pArrayCounter, PDWORD pArrayEncoder1, PDWORD pArrayEncoder2, PDWORD pArrayEncoder3, int* pDataCount); + bool GetTransmittedData_DuoDistance(PFLOAT pArrayDistance, PFLOAT pArrayIntensity, PFLOAT pArrayCounter, PFLOAT pArrayBarycenter, PFLOAT pArrayStatus, int* pDataCount); + bool GetTransmittedData_DuoThickness(PFLOAT pArrayThickness, PFLOAT pArrayDistance1, PFLOAT pArrayDistance2, PFLOAT pArrayCounter, PFLOAT pArrayIntensity1, PFLOAT pArrayIntensity2, PFLOAT pArrayBaryCenter1, PFLOAT pArrayBaryCenter2, PFLOAT pArrayStatus, int* pDataCount); + bool GetTransmittedData_DuoSawliDistance(PFLOAT pArrayDistance, PFLOAT pArrayQuality, PFLOAT pArrayIntensity, PFLOAT pArrayCounter, PFLOAT pArrayStatus, int* pDataCount); + bool GetTransmittedData_DuoSawliThickness(PFLOAT pArrayThickness1, PFLOAT pArrayThickness2, PFLOAT pArrayThickness3, PFLOAT pArrayQuality1, PFLOAT pArrayQuality2, PFLOAT pArrayQuality3, PFLOAT pArrayIntensity, PFLOAT pArrayNbThickness, PFLOAT pArrayCounter, PFLOAT pArrayStatus, int* pDataCount); + short GetStatusAcquisition(char *pMessage); +}; + +#endif //AFX_ACQUISITION_EASY_H_INCLUDED_ \ No newline at end of file diff --git a/PcDmis/Base/Interfac/Msi/Hsi/STIL/Common/inc/cAcqEasyType.h b/PcDmis/Base/Interfac/Msi/Hsi/STIL/Common/inc/cAcqEasyType.h new file mode 100644 index 0000000..6d4a7d8 --- /dev/null +++ b/PcDmis/Base/Interfac/Msi/Hsi/STIL/Common/inc/cAcqEasyType.h @@ -0,0 +1,402 @@ +#if !defined(AFX_ACQUISITION_EASY_TYPE_H_INCLUDED_) +#define AFX_ACQUISITION_EASY_TYPE_H_INCLUDED_ + +#include "afxmt.h" + +#define MAX_CHAR 256 + +//do not change the order of data +#define EVENT_ACQ_EASY_KILL_THREAD 0 +#define EVENT_ACQ_EASY_KILL_THREAD_DO 1 +#define EVENT_ACQ_EASY_NUMBER 2 + +//do not change the order of data +#define EVENT_ACQUIRE_N_POINTS 0 +#define EVENT_END_BUFFER 1 +#define EVENT_END_MEASUREMENT 2 +#define EVENT_END_ACQUIRE 3 +#define EVENT_STARTING_ACQUISITION 4 +#define EVENT_ACQUISITION_NUMBER 5 + +//do not change the order of data +//for eMCHR_GetThicknessMeasurement +#define ID_BUFFER_THICKNESS_THICKNESS 0 +#define ID_BUFFER_THICKNESS_DISTANCE1 1 +#define ID_BUFFER_THICKNESS_DISTANCE2 2 +#define ID_BUFFER_THICKNESS_INTENSITY1 3 +#define ID_BUFFER_THICKNESS_INTENSITY2 4 +#define ID_BUFFER_THICKNESS_BARYCENTER1 5 +#define ID_BUFFER_THICKNESS_BARYCENTER2 6 +#define ID_BUFFER_THICKNESS_STATUS 7 +#define ID_BUFFER_THICKNESS_COUNTER 8 +#define ID_BUFFER_THICKNESS_MEASUREMENT_MAX 9 //number of max buffers for MCHR_GetThicknessMeasurement + +//for eMCHR_GetAltitudeMeasurement +#define ID_BUFFER_ALTITUDE_ALTITUDE 0 +#define ID_BUFFER_ALTITUDE_INTENSITY 1 +#define ID_BUFFER_ALTITUDE_COUNTER 2 +#define ID_BUFFER_ALTITUDE_BARYCENTER 3 +#define ID_BUFFER_ALTITUDE_STATUS 4 +#define ID_BUFFER_ALTITUDE_MEASUREMENT_MAX 5 //number of max buffers for MCHR_GetAltitudeMeasurement + +//for eMCHR_GetDepthMeasurement +#define ID_BUFFER_DEPTH_DEPTH 0 +#define ID_BUFFER_DEPTH_INTENSITY 1 +#define ID_BUFFER_DEPTH_COUNTER 2 +#define ID_BUFFER_DEPTH_BARYCENTER 3 +#define ID_BUFFER_DEPTH_STATUS 4 +#define ID_BUFFER_DEPTH_MEASUREMENT_MAX 5 //number of max buffers for MCHR_GetDepthMeasurement + +//for eMCHR_GetTransmittedDataMeasurement +#define ID_BUFFER_CHR_DISTANCE_DISTANCE 0 +#define ID_BUFFER_CHR_DISTANCE_INTENSITY 3 +#define ID_BUFFER_CHR_DISTANCE_COUNTER 5 +#define ID_BUFFER_CHR_DISTANCE_BARYCENTER 6 +#define ID_BUFFER_CHR_DISTANCE_STATUS 7 +#define ID_BUFFER_CHR_DISTANCE_MEASUREMENT_MAX 8 + +#define ID_BUFFER_CHR_THICKNESS_THICKNESS 0 +#define ID_BUFFER_CHR_THICKNESS_DISTANCE1 1 +#define ID_BUFFER_CHR_THICKNESS_DISTANCE2 2 +#define ID_BUFFER_CHR_THICKNESS_STATUS 3 +#define ID_BUFFER_CHR_THICKNESS_INTENSITY1 4 +#define ID_BUFFER_CHR_THICKNESS_INTENSITY2 5 +#define ID_BUFFER_CHR_THICKNESS_BARYCENTER1 6 +#define ID_BUFFER_CHR_THICKNESS_BARYCENTER2 7 +#define ID_BUFFER_CHR_THICKNESS_MEASUREMENT_MAX 8 + +#define ID_BUFFER_CCS_DISTANCE_DISTANCE_MSB 0 +#define ID_BUFFER_CCS_DISTANCE_DISTANCE_LSB 1 +#define ID_BUFFER_CCS_DISTANCE_AUTO_ADAPTATIVE_MODE 2 +#define ID_BUFFER_CCS_DISTANCE_INTENSITY 3 +#define ID_BUFFER_CCS_DISTANCE_BARYCENTER 6 +#define ID_BUFFER_CCS_DISTANCE_STATUS 8 +#define ID_BUFFER_CCS_DISTANCE_COUNTER 9 +#define ID_BUFFER_CCS_DISTANCE_ENCODER1_MSB 10 +#define ID_BUFFER_CCS_DISTANCE_ENCODER1_LSB 11 +#define ID_BUFFER_CCS_DISTANCE_ENCODER2_MSB 12 +#define ID_BUFFER_CCS_DISTANCE_ENCODER2_LSB 13 +#define ID_BUFFER_CCS_DISTANCE_ENCODER3_MSB 14 +#define ID_BUFFER_CCS_DISTANCE_ENCODER3_LSB 15 +#define ID_BUFFER_CCS_DISTANCE_MEASUREMENT_MAX 16 + +#define ID_BUFFER_CCS_THICKNESS_THICKNESS 0 +#define ID_BUFFER_CCS_THICKNESS_DISTANCE1 1 +#define ID_BUFFER_CCS_THICKNESS_DISTANCE2 2 +#define ID_BUFFER_CCS_THICKNESS_AUTO_ADAPTATIVE_MODE 3 +#define ID_BUFFER_CCS_THICKNESS_INTENSITY1 4 +#define ID_BUFFER_CCS_THICKNESS_INTENSITY2 5 +#define ID_BUFFER_CCS_THICKNESS_BARYCENTER1 6 +#define ID_BUFFER_CCS_THICKNESS_BARYCENTER2 7 +#define ID_BUFFER_CCS_THICKNESS_STATUS 8 +#define ID_BUFFER_CCS_THICKNESS_COUNTER 9 +#define ID_BUFFER_CCS_THICKNESS_ENCODER1_MSB 10 +#define ID_BUFFER_CCS_THICKNESS_ENCODER1_LSB 11 +#define ID_BUFFER_CCS_THICKNESS_ENCODER2_MSB 12 +#define ID_BUFFER_CCS_THICKNESS_ENCODER2_LSB 13 +#define ID_BUFFER_CCS_THICKNESS_ENCODER3_MSB 14 +#define ID_BUFFER_CCS_THICKNESS_ENCODER3_LSB 15 +#define ID_BUFFER_CCS_THICKNESS_MEASUREMENT_MAX 16 + +#define ID_BUFFER_DUO_DISTANCE_DISTANCE_MSB 0 +#define ID_BUFFER_DUO_DISTANCE_DISTANCE_LSB 1 +#define ID_BUFFER_DUO_DISTANCE_INTENSITY 3 +#define ID_BUFFER_DUO_DISTANCE_COUNTER 5 +#define ID_BUFFER_DUO_DISTANCE_BARYCENTER 6 +#define ID_BUFFER_DUO_DISTANCE_STATUS 9 +#define ID_BUFFER_DUO_DISTANCE_MEASUREMENT_MAX 10 + +#define ID_BUFFER_DUO_THICKNESS_THICKNESS 0 +#define ID_BUFFER_DUO_THICKNESS_DISTANCE1 1 +#define ID_BUFFER_DUO_THICKNESS_DISTANCE2 2 +#define ID_BUFFER_DUO_THICKNESS_COUNTER 3 +#define ID_BUFFER_DUO_THICKNESS_INTENSITY1 4 +#define ID_BUFFER_DUO_THICKNESS_INTENSITY2 5 +#define ID_BUFFER_DUO_THICKNESS_BARYCENTER1 6 +#define ID_BUFFER_DUO_THICKNESS_BARYCENTER2 7 +#define ID_BUFFER_DUO_THICKNESS_STATUS 9 +#define ID_BUFFER_DUO_THICKNESS_MEASUREMENT_MAX 10 + +#define ID_BUFFER_DUO_SAWLI_DISTANCE_DISTANCE_MSB 0 +#define ID_BUFFER_DUO_SAWLI_DISTANCE_DISTANCE_LSB 1 +#define ID_BUFFER_DUO_SAWLI_DISTANCE_QUALITY 6 +#define ID_BUFFER_DUO_SAWLI_DISTANCE_INTENSITY 9 +#define ID_BUFFER_DUO_SAWLI_DISTANCE_COUNTER 11 +#define ID_BUFFER_DUO_SAWLI_DISTANCE_STATUS 15 +#define ID_BUFFER_DUO_SAWLI_DISTANCE_MEASUREMENT_MAX 16 + +#define ID_BUFFER_DUO_SAWLI_THICKNESS_THICKNESS1_MSB 0 +#define ID_BUFFER_DUO_SAWLI_THICKNESS_THICKNESS1_LSB 1 +#define ID_BUFFER_DUO_SAWLI_THICKNESS_THICKNESS2_MSB 2 +#define ID_BUFFER_DUO_SAWLI_THICKNESS_THICKNESS2_LSB 3 +#define ID_BUFFER_DUO_SAWLI_THICKNESS_THICKNESS3_MSB 4 +#define ID_BUFFER_DUO_SAWLI_THICKNESS_THICKNESS3_LSB 5 +#define ID_BUFFER_DUO_SAWLI_THICKNESS_QUALITY1 6 +#define ID_BUFFER_DUO_SAWLI_THICKNESS_QUALITY2 7 +#define ID_BUFFER_DUO_SAWLI_THICKNESS_QUALITY3 8 +#define ID_BUFFER_DUO_SAWLI_THICKNESS_INTENSITY 9 +#define ID_BUFFER_DUO_SAWLI_THICKNESS_NB_THICKNESS 10 +#define ID_BUFFER_DUO_SAWLI_THICKNESS_COUNTER 11 +#define ID_BUFFER_DUO_SAWLI_THICKNESS_STATUS 15 +#define ID_BUFFER_DUO_SAWLI_THICKNESS_MEASUREMENT_MAX 16 + +#define ID_BUFFER_INTERFEROMETRIC_THICKNESS_SAWLI_THICKNESS1 0 +#define ID_BUFFER_INTERFEROMETRIC_THICKNESS_SAWLI_THICKNESS2 1 +#define ID_BUFFER_INTERFEROMETRIC_THICKNESS_SAWLI_THICKNESS3 2 +#define ID_BUFFER_INTERFEROMETRIC_THICKNESS_SAWLI_QUALITY1 4 +#define ID_BUFFER_INTERFEROMETRIC_THICKNESS_SAWLI_QUALITY2 5 +#define ID_BUFFER_INTERFEROMETRIC_THICKNESS_SAWLI_QUALITY3 6 +#define ID_BUFFER_INTERFEROMETRIC_THICKNESS_SAWLI_INTENSITY 7 +#define ID_BUFFER_INTERFEROMETRIC_THICKNESS_SAWLI_THICKNESS 8 +#define ID_BUFFER_INTERFEROMETRIC_THICKNESS_SAWLI_COUNTER 9 +#define ID_BUFFER_INTERFEROMETRIC_THICKNESS_SAWLI_STATUS 10 +#define ID_BUFFER_INTERFEROMETRIC_THICKNESS_SAWLI_MEASUREMENT_MAX 11 + +#define ID_BUFFER_INTERFEROMETRIC_THICKNESS_THICKNESS1 0 +#define ID_BUFFER_INTERFEROMETRIC_THICKNESS_THICKNESS2 1 +#define ID_BUFFER_INTERFEROMETRIC_THICKNESS_THICKNESS3 2 +#define ID_BUFFER_INTERFEROMETRIC_THICKNESS_QUALITY1 3 +#define ID_BUFFER_INTERFEROMETRIC_THICKNESS_QUALITY2 4 +#define ID_BUFFER_INTERFEROMETRIC_THICKNESS_QUALITY3 5 +#define ID_BUFFER_INTERFEROMETRIC_THICKNESS_INTENSITY 6 +#define ID_BUFFER_INTERFEROMETRIC_THICKNESS_MEASUREMENT_MAX 7 + + +//for (MCHR_SetEncoderBuffer) +#define ID_BUFFER_ENCODER_1 0 +#define ID_BUFFER_ENCODER_2 1 +#define ID_BUFFER_ENCODER_3 2 +#define ID_BUFFER_ENCODER_MAX 3 //number of total buffers for each encoder + +#define ID_BUFFER_MAX 16 //number of total buffers for each acquisition function +#define MAX_BUFFER_NUMBER 5000 //number of max buffer number + +#define STATUS_NO_ERROR 0 +#define STATUS_TIMEOUT_ERROR 1 +#define STATUS_PARAM_ERROR 2 +#define STATUS_ACQ_ERROR 3 +#define STATUS_EVENT_ERROR 4 +#define STATUS_NO_DATA 5 +#define STATUS_MCHR_FUNCTION 6 + +enum eAcqEasyFunc{eMCHR_GetThicknessMeasurement, eMCHR_GetAltitudeMeasurement, eMCHR_GetDepthMeasurement, eMCHR_GetTransmittedDataMeasurement, eMCHR_GetInterferometricThickness, eMCHR_GetInterferometricThicknessSAWLI}; + +typedef struct +{ + bool Thickness; //Enabled the acquisition Thickness + bool Distance1; //Enabled the acquisition Distance 1 + bool Distance2; //Enabled the acquisition Distance 2 + bool Intensity1; //Enabled the acquisition Intensity 1 + bool Intensity2; //Enabled the acquisition Intensity 2 + bool BaryCenter1; //Enabled the acquisition BaryCenter 1 + bool BaryCenter2; //Enabled the acquisition BaryCenter 2 + bool Status; //Enabled the acquisition Status + bool Counter; //Enabled the acquisition Counter +} sEnableBufferThickness; + + +typedef struct +{ + bool Altitude; //Enabled the acquisition Altitude + bool Intensity; //Enabled the acquisition Intensity + bool Counter; //Enabled the acquisition Counter + bool BaryCenter; //Enabled the acquisition BaryCenter + bool Status; //Enabled the acquisition Status +} sEnableBufferAltitude; + +typedef struct +{ + bool Depth; //Enabled the acquisition Depth + bool Intensity; //Enabled the acquisition Intensity + bool Counter; //Enabled the acquisition Counter + bool BaryCenter; //Enabled the acquisition BaryCenter + bool Status; //Enabled the acquisition Status +} sEnableBufferDepth; + +typedef struct +{ + bool Distance; //Enabled the acquisition Distance + bool Intensity; //Enabled the acquisition Intensity + bool Counter; //Enabled the acquisition Counter + bool BaryCenter; //Enabled the acquisition BaryCenter + bool Status; //Enabled the acquisition Status +} sChrDistance; + +typedef struct +{ + bool Thickness; //Enabled the acquisition Thickness + bool Distance1; //Enabled the acquisition Distance1 + bool Distance2; //Enabled the acquisition Distance2 + bool Status; //Enabled the acquisition Status + bool Intensity1; //Enabled the acquisition Intensity1 + bool Intensity2; //Enabled the acquisition Intensity2 + bool BaryCenter1; //Enabled the acquisition Barycenter1 + bool BaryCenter2; //Enabled the acquisition Barycenter2 +} sChrThickness; + +typedef struct +{ + bool Distance; //Enabled the acquisition Distance + bool AutoAdaptativeModeData; //Enabled the acquisition AutoAdaptativeModeData + bool Intensity; //Enabled the acquisition Intensity + bool BaryCenter; //Enabled the acquisition Barycenter + bool Status; //Enabled the acquisition Status + bool Counter; //Enabled the acquisition Counter + bool Encoder1; //Enabled the acquisition Encoder1 + bool Encoder2; //Enabled the acquisition Encoder2 + bool Encoder3; //Enabled the acquisition Encoder3 +} sCcsDistance; + +typedef struct +{ + bool Thickness; //Enabled the acquisition Thickness + bool Distance1; //Enabled the acquisition Distance1 + bool Distance2; //Enabled the acquisition Distance2 + bool AutoAdaptativeModeData; //Enabled the acquisition AutoAdaptativeModeData + bool Intensity1; //Enabled the acquisition Intensity1 + bool Intensity2; //Enabled the acquisition Intensity2 + bool BaryCenter1; //Enabled the acquisition Barycenter1 + bool BaryCenter2; //Enabled the acquisition Barycenter2 + bool Status; //Enabled the acquisition Status + bool Counter; //Enabled the acquisition Counter + bool Encoder1; //Enabled the acquisition Encoder1 + bool Encoder2; //Enabled the acquisition Encoder2 + bool Encoder3; //Enabled the acquisition Encoder3 +} sCcsThickness; + +typedef struct +{ + bool Distance; //Enabled the acquisition Distance + bool Intensity; //Enabled the acquisition Intensity + bool Counter; //Enabled the acquisition Counter + bool BaryCenter; //Enabled the acquisition Barycenter + bool Status; //Enabled the acquisition Status +} sDuoDistance; + +typedef struct +{ + bool Thickness; //Enabled the acquisition Thickness + bool Distance1; //Enabled the acquisition Distance1 + bool Distance2; //Enabled the acquisition Distance2 + bool Counter; //Enabled the acquisition Counter + bool Intensity1; //Enabled the acquisition Intensity1 + bool Intensity2; //Enabled the acquisition Intensity2 + bool BaryCenter1; //Enabled the acquisition Barycenter1 + bool BaryCenter2; //Enabled the acquisition Barycenter2 + bool Status; //Enabled the acquisition Status +} sDuoThickness; + +typedef struct +{ + bool Distance; //Enabled the acquisition Distance + bool Quality; //Enabled the acquisition Quality + bool Intensity; //Enabled the acquisition Intensity + bool Counter; //Enabled the acquisition Counter + bool Status; //Enabled the acquisition Status +} sDuoSawliDistance; + +typedef struct +{ + bool Thickness1; //Enabled the acquisition Thickness1 + bool Thickness2; //Enabled the acquisition Thickness2 + bool Thickness3; //Enabled the acquisition Thickness3 + bool Quality1; //Enabled the acquisition Quality1 + bool Quality2; //Enabled the acquisition Quality2 + bool Quality3; //Enabled the acquisition Quality3 + bool Intensity; //Enabled the acquisition Intensity + bool NbThickness; //Enabled the acquisition NbThickness + bool Counter; //Enabled the acquisition Counter + bool Status; //Enabled the acquisition Status +} sDuoSawliThickness; + +typedef struct +{ + bool Thickness1; + bool Thickness2; + bool Thickness3; + bool Quality1; + bool Quality2; + bool Quality3; + bool Intensity; +} sEnableBufferInterferometricThickness; + +typedef struct +{ + bool Thickness1; + bool Thickness2; + bool Thickness3; + bool Quality1; + bool Quality2; + bool Quality3; + bool Intensity; + bool Thickness; + bool Status; + bool Counter; +} sEnableBufferInterferometricThicknessSAWLI; + +typedef struct +{ + sChrDistance ChrDistance; //Enabled the acquisition ChrDistance + sChrThickness ChrThickness; //Enabled the acquisition ChrThickness + sCcsDistance CcsDistance; //Enabled the acquisition CcsDistance + sCcsThickness CcsThickness; //Enabled the acquisition CcsThickness + sDuoDistance DuoDistance; //Enabled the acquisition DuoDistance + sDuoThickness DuoThickness; //Enabled the acquisition DuoThickness + sDuoSawliDistance DuoSawliDistance; //Enabled the acquisition DuoSawliDistance + sDuoSawliThickness DuoSawliThickness; //Enabled the acquisition DuoSawliThickness +} sEnableBufferTransmittedData; + + +typedef struct +{ + bool Encoder1; //Enabled the acquisition Encoder 1 + bool Encoder2; //Enabled the acquisition Encoder 2 + bool Encoder3; //Enabled the acquisition Encoder 3 +} sEnableBufferEncoder; + +typedef struct +{ + bool Enable; //This parameter activates or deactivates Trigger mode (if Trigger mode is active acquisition will wait for a "Trigger in" signal to start, otherwise acquisition starts immediately). + enTriggerType Type; //This parameter indicates the trigger mode (TRG /TRE/TRN/ TRS) + enLevelEdgeFlag Level; //This parameter is significant only if TriggerFlag is set to 揟RUE?and only for CCS and STIL-INITIAL sensors. It indicates which edge of the Sync-In signal pulse is active (for TRG, TRE, and TRS) or which state of this signal is active (for TRN). Authorized values are: MCHR_FALLING_EDGE, MCHR_RISING_EDGE, MCHR_LOW_LEVEL, MCHR_HIGH_LEVEL. +} sTriggerParameters; + +typedef enum +{ + //if the user wants to wait for an event type "EventEndBuffer" + EV_END_BUFFER = 0, + //if the user wants to wait for an event type "EventAcquire_n_Points" + EV_ACQUIRE_N_POINTS, + //if the user wants to wait for an event type "EventEndMeasurements" + EV_END_MEASUREMENTS, + //if the user wants to wait for an event type "EventEndAcquire" + EV_END_ACQUIRE + } evTypeEvents; + + +typedef struct +{ + eAcqEasyFunc typeAcquisition; //type of function to use + sEnableBufferThickness EnableBufferThickness; //Enabled the acquisition Thickness (eMCHR_GetThicknessMeasurement) + sEnableBufferAltitude EnableBufferAltitude; //Enabled the acquisition Altitude (eMCHR_GetAltitudeMeasurement) + sEnableBufferDepth EnableBufferDepth; //Enabled the acquisition Depth (eMCHR_GetDepthMeasurement) + sEnableBufferTransmittedData EnableBufferTransmittedData; //Enabled the acquisition TransmittedData (eMCHR_GetTransmittedDataMeasurement) + sEnableBufferEncoder EnableBufferEncoder; //Enabled the acquisition Encoder + sEnableBufferInterferometricThickness EnableBufferInterferometricThickness; //Enabled the acquisition InterferometricThickness + sEnableBufferInterferometricThicknessSAWLI EnableBufferInterferometricThicknessSAWLI; //Enabled the acquisition InterferometricThicknessSAWLI + bool EnableBufferAutoAdaptive; //Enabled the acquisition AutoAdaptive + WORD NumberOfBuffers; //The number of buffers per data type for receiving the measured data (Should be greater than or equal to 1). + DWORD BufferLength; //Size of the buffers for receiving the measured data (in words: one word=data for one measured point) + WORD TimeoutAcquisition; //timeout for acquisition delay in ms + DWORD NumberOfPoints; //Number of point to measure. If this parameters is set to 0, measurement will be continuous (i.e. will last forever or until stopped by the user) and no event " EventEndMeasurement" will be generated + DWORD NumberPointsTRE; //Number of points for TRE mode: This parameter indicates the number of points to acquire after each Sync-in pulse. + enChrType SensorType; //Controller types(MCHR_CCS_PRIMA, MCHR_DUO, ...) used only for eMCHR_GetTransmittedDataMeasurement + enMeasureMode SensorMode; //Measuring modes(MCHR_DISTANCE_MODE, MCHR_THICKNESS_MODE, ...) used only for eMCHR_GetTransmittedDataMeasurement + evTypeEvents TypeEvent; //The event that the user wants to wait. + sTriggerParameters Trigger; + unsigned short Frequency; +} sAcqEasyParam; + + + +#endif //AFX_ACQUISITION_EASY_H_INCLUDED_ \ No newline at end of file diff --git a/PcDmis/Base/Interfac/Msi/Hsi/STIL/Common/src/cAcqEasy.cpp b/PcDmis/Base/Interfac/Msi/Hsi/STIL/Common/src/cAcqEasy.cpp new file mode 100644 index 0000000..fde2d04 --- /dev/null +++ b/PcDmis/Base/Interfac/Msi/Hsi/STIL/Common/src/cAcqEasy.cpp @@ -0,0 +1,2655 @@ +#include "StdAfx.h" +#include +#include "..\inc\cAcqEasy.h" + + +//-------------------------------------------------------------------- +cAcqEasy::cAcqEasy(MCHR_ID SensorID) +{ + DWORD dwThreadId = 0; + int nIndex = 0, idx = 0, jdx = 0; + UNREFERENCED_PARAMETER(jdx); + m_current_index_of_buffer_to_read = -1; + m_number_of_buffer_to_read = 0; + m_IsCreateAcqBuffer = false; + + //init acquisition buffers + for (idx = 0; idx < ID_BUFFER_MAX; idx++) + { + m_ppAcqBuffer[idx] = NULL; + } + //init encoder buffers + for (idx = 0; idx < ID_BUFFER_ENCODER_MAX; idx++) + { + m_ppEncoderBuffer[idx] = NULL; + } + //init auto adaptative buffers + m_ppAutoAdaptativeBuffer = NULL; + + m_end_acq_event = NULL; + m_status_event = NULL; + m_chr_id = SensorID; + m_IsDataAcquisitionStarting = false; + m_IsSpectrumAcquisitionStarting = false; + m_status_acquisition = STATUS_NO_ERROR; + //create all events for process + for (nIndex = 0; nIndex < EVENT_ACQ_EASY_NUMBER; nIndex++) + { + m_OnEvent[nIndex] = CreateEvent(NULL, FALSE, FALSE, NULL); + } + //create all events for acquisition process + for (nIndex = 0; nIndex < EVENT_ACQUISITION_NUMBER; nIndex++) + { + if (nIndex == EVENT_END_ACQUIRE) + { + m_OnEventAcquisition[nIndex] = CreateEvent(NULL, TRUE, FALSE, NULL); + } + else + { + m_OnEventAcquisition[nIndex] = CreateEvent(NULL, FALSE, FALSE, NULL); + } + } + ZeroMemory(&m_acqParam, sizeof(MCHR_tyAcqParam)); + //open process thread + hThread = ::CreateThread(0, 0, ProcessThread, LPVOID(this), 0, &dwThreadId); +} +//-------------------------------------------------------------------- +cAcqEasy::~cAcqEasy() +{ + int nIndex = 0; + + //close process thread + if (hThread != NULL) + { + SetEvent(m_OnEvent[EVENT_ACQ_EASY_KILL_THREAD]); + if (WaitForSingleObject(m_OnEvent[EVENT_ACQ_EASY_KILL_THREAD_DO], 500) != WAIT_OBJECT_0) + { + TerminateThread(hThread, 0); + } + CloseHandle(hThread); + hThread = NULL; + } + //release process events + for (nIndex = 0; nIndex < EVENT_ACQ_EASY_NUMBER; nIndex++) + { + if (m_OnEvent[nIndex] != NULL) + { + CloseHandle(m_OnEvent[nIndex]); + m_OnEvent[nIndex] = NULL; + } + } + //release acquisition process events + for (nIndex = 0; nIndex < EVENT_ACQUISITION_NUMBER; nIndex++) + { + if (m_OnEventAcquisition[nIndex] != NULL) + { + CloseHandle(m_OnEventAcquisition[nIndex]); + m_OnEventAcquisition[nIndex] = NULL; + } + } + _ReleaseAcqBuffer(m_acqEasyParam.NumberOfBuffers); +} +//------------------------------------------------------------------------------------------------- +void cAcqEasy::_ReleaseAcqBuffer(int NumberOfBuffers) +{ + int nIndex = 0, idx = 0, jdx = 0; + UNREFERENCED_PARAMETER(nIndex); + if (m_IsCreateAcqBuffer) + { + m_IsCreateAcqBuffer = false; + //release acquisition buffers + for (idx = 0; idx < ID_BUFFER_MAX; idx++) + { + if (m_ppAcqBuffer[idx] != NULL) + { + for (jdx = 0; jdx < NumberOfBuffers; jdx++) + { + if (m_ppAcqBuffer[idx][jdx] != NULL) + { + delete[] m_ppAcqBuffer[idx][jdx]; + m_ppAcqBuffer[idx][jdx] = NULL; + } + } + delete[] m_ppAcqBuffer[idx]; + m_ppAcqBuffer[idx] = NULL; + } + } + //release encoders buffers + for (idx = 0; idx < ID_BUFFER_ENCODER_MAX; idx++) + { + if (m_ppEncoderBuffer[idx] != NULL) + { + for (jdx = 0; jdx < NumberOfBuffers; jdx++) + { + if (m_ppEncoderBuffer[idx][jdx] != NULL) + { + delete[] m_ppEncoderBuffer[idx][jdx]; + m_ppEncoderBuffer[idx][jdx] = NULL; + } + } + delete[] m_ppEncoderBuffer[idx]; + m_ppEncoderBuffer[idx] = NULL; + } + } + //init auto adaptative buffers + if (m_ppAutoAdaptativeBuffer != NULL) + { + for (jdx = 0; jdx < NumberOfBuffers; jdx++) + { + if (m_ppAutoAdaptativeBuffer[jdx] != NULL) + { + delete[] m_ppAutoAdaptativeBuffer[jdx]; + m_ppAutoAdaptativeBuffer[jdx] = NULL; + } + } + delete[] m_ppAutoAdaptativeBuffer; + m_ppAutoAdaptativeBuffer = NULL; + } + } +} +//------------------------------------------------------------------------------------------------- +void cAcqEasy::_CreateAcqBuffer(int NumberOfBuffers, int BufferLength) +{ + int nIndex = 0, idx = 0, jdx = 0; + PFLOAT pFloatBuffer = NULL; + PDWORD pDwordBuffer = NULL; + UNREFERENCED_PARAMETER(pFloatBuffer); + UNREFERENCED_PARAMETER(nIndex); + UNREFERENCED_PARAMETER(pDwordBuffer); + m_IsCreateAcqBuffer = true; + //allocate acquisition buffers + for (idx = 0; idx < ID_BUFFER_MAX; idx++) + { + m_ppAcqBuffer[idx] = new PFLOAT[NumberOfBuffers]; + for (jdx = 0; jdx < NumberOfBuffers; jdx++) + { + m_ppAcqBuffer[idx][jdx] = new float[BufferLength]; + } + } + //allocate encoder buffers + for (idx = 0; idx < ID_BUFFER_ENCODER_MAX; idx++) + { + m_ppEncoderBuffer[idx] = new PDWORD[NumberOfBuffers]; + for (jdx = 0; jdx < NumberOfBuffers; jdx++) + { + m_ppEncoderBuffer[idx][jdx] = new DWORD[BufferLength]; + } + } + //init auto adaptative buffers + m_ppAutoAdaptativeBuffer = new PFLOAT[NumberOfBuffers]; + for (jdx = 0; jdx < NumberOfBuffers; jdx++) + { + m_ppAutoAdaptativeBuffer[jdx] = new float[BufferLength]; + } +} +//------------------------------------------------------------------------------------------------- +// Description : Thread Processing ---------------------------------------------------------------- +//------------------------------------------------------------------------------------------------- +DWORD WINAPI cAcqEasy::ProcessThread(LPVOID lpArg) +{ + cAcqEasy* pThis = reinterpret_cast(lpArg); + return pThis->ProcessThread(); +} +#define DEFAULT_DELAY_THREAD 10 +//------------------------------------------------------------------------------------------------- +DWORD cAcqEasy::ProcessThread(void) +{ + DWORD dwResult = 0; + int TimeoutValue = m_acqEasyParam.TimeoutAcquisition; + WORD TimeoutStep = 10; + bool AcqReady = false; + m_measure_index = -1; + long _last_buffer_index = -1; + int _previous_buffer_index = -1; + m_number_of_buffer_to_read = 0; + + while(WaitForSingleObject(m_OnEvent[EVENT_ACQ_EASY_KILL_THREAD], m_IsDataAcquisitionStarting ? 0 : 10) != WAIT_OBJECT_0) + { + if (m_IsDataAcquisitionStarting) + { + AcqReady = false; + TRACE(">>WaitForMultipleObjects\r\n"); + dwResult = WaitForMultipleObjects(EVENT_ACQUISITION_NUMBER, m_OnEventAcquisition, FALSE, TimeoutStep); + TRACE(">>WaitForMultipleObjects ret:%d\r\n",dwResult); + switch(dwResult) + { + case WAIT_OBJECT_0 + EVENT_ACQUIRE_N_POINTS: + case WAIT_OBJECT_0 + EVENT_END_BUFFER: + case WAIT_OBJECT_0 + EVENT_END_MEASUREMENT: + case WAIT_OBJECT_0 + EVENT_END_ACQUIRE: + switch(m_acqEasyParam.TypeEvent) + { + case EV_ACQUIRE_N_POINTS: //EV_ACQUIRE_N_POINTS + if (dwResult == WAIT_OBJECT_0 + EVENT_ACQUIRE_N_POINTS) + { + AcqReady = true; + } + else + { + m_status_acquisition = STATUS_EVENT_ERROR; + if (m_status_event != NULL) + { + SetEvent(m_status_event); +#ifdef _VC6_ + sprintf(m_status_message, "ProcessThread:unexpected event (0x%X)\n", dwResult); +#else + sprintf_s(m_status_message, "ProcessThread:unexpected event (0x%X)\n", dwResult); +#endif + TRACE1("%s",m_status_message); + } + } + break; + case EV_END_MEASUREMENTS: //EV_END_MEASUREMENTS + if (dwResult == WAIT_OBJECT_0 + EVENT_END_MEASUREMENT) + { + criticalBuffer.Lock(); + if (MCHR_GetLastWrittenBuffer(m_chr_id, MCHR_END_MEASUREMENT, &_last_buffer_index, &m_measure_index) != MCHR_ERROR) + { + //fifo roll index---------------------------------------------------------------------- + if (_previous_buffer_index == -1) + { + m_number_of_buffer_to_read = 1; + m_current_index_of_buffer_to_read = _last_buffer_index; + } + else + { + if (_previous_buffer_index <= _last_buffer_index) + { + m_number_of_buffer_to_read += (_last_buffer_index - _previous_buffer_index); + } + else + { + m_number_of_buffer_to_read += ((m_acqEasyParam.NumberOfBuffers - _previous_buffer_index) + _last_buffer_index); + } + } + _previous_buffer_index = _last_buffer_index; + //--------------------------------------------------------------------------------------- + if (m_end_acq_event != NULL) + { + SetEvent(m_end_acq_event); + } + } + else + { + m_status_acquisition = STATUS_ACQ_ERROR; + if (m_status_event != NULL) + { + SetEvent(m_status_event); +#ifdef _VC6_ + sprintf(m_status_message, "ProcessThread:MCHR_GetLastWrittenBuffer(End Measurements): Error : (0x%X)\n", MCHR_GetLastError(m_chr_id)); +#else + sprintf_s(m_status_message, "ProcessThread:MCHR_GetLastWrittenBuffer(End Measurements): Error : (0x%X)\n", MCHR_GetLastError(m_chr_id)); +#endif + TRACE1("%s",m_status_message); + + } + } + criticalBuffer.Unlock(); + } + else + { + m_status_acquisition = STATUS_EVENT_ERROR; + if (m_status_event != NULL) + { + SetEvent(m_status_event); +#ifdef _VC6_ + sprintf(m_status_message, "ProcessThread:unexpected event (0x%X)\n", dwResult); +#else + sprintf_s(m_status_message, "ProcessThread:unexpected event (0x%X)\n", dwResult); +#endif + TRACE1("%s",m_status_message); + + } + } + break; + case EV_END_ACQUIRE: //EV_END_ACQUIRE + if (dwResult == WAIT_OBJECT_0 + EVENT_END_ACQUIRE) + { + if (m_end_acq_event != NULL) + { + SetEvent(m_end_acq_event); + } + } + break; + default: //EV_END_BUFFER + if (dwResult == WAIT_OBJECT_0 + EVENT_END_BUFFER) + { + criticalBuffer.Lock(); + if (MCHR_GetLastWrittenBuffer(m_chr_id, MCHR_BUFFER_EVENT, &_last_buffer_index, &m_measure_index) != MCHR_ERROR) + { + //fifo roll index---------------------------------------------------------------------- + if (_previous_buffer_index == -1) + { + m_number_of_buffer_to_read = 1; + m_current_index_of_buffer_to_read = _last_buffer_index; + } + else + { + if (_previous_buffer_index <= _last_buffer_index) + { + m_number_of_buffer_to_read += (_last_buffer_index - _previous_buffer_index); + } + else + { + m_number_of_buffer_to_read += ((m_acqEasyParam.NumberOfBuffers - _previous_buffer_index) + _last_buffer_index); + } + } + _previous_buffer_index = _last_buffer_index; + //--------------------------------------------------------------------------------------- + if (m_end_acq_event != NULL) + { + SetEvent(m_end_acq_event); + } + } + else + { + m_status_acquisition = STATUS_ACQ_ERROR; + if (m_status_event != NULL) + { + SetEvent(m_status_event); +#ifdef _VC6_ + sprintf(m_status_message, "ProcessThread:MCHR_GetLastWrittenBuffer(End buffer): Error : (0x%X)", MCHR_GetLastError(m_chr_id)); +#else + sprintf_s(m_status_message, "ProcessThread:MCHR_GetLastWrittenBuffer(End buffer): Error : (0x%X)", MCHR_GetLastError(m_chr_id)); +#endif + TRACE1("%s",m_status_message); + + } + } + criticalBuffer.Unlock(); + } + else + { + m_status_acquisition = STATUS_EVENT_ERROR; + if (m_status_event != NULL) + { + SetEvent(m_status_event); +#ifdef _VC6_ + sprintf(m_status_message, "ProcessThread:unexpected event (0x%X)\n", dwResult); +#else + sprintf_s(m_status_message, "ProcessThread:unexpected event (0x%X)\n", dwResult); +#endif + TRACE1("%s",m_status_message); + + } + } + break; + } + break; + case WAIT_TIMEOUT: + if (TimeoutValue <= 0) + { + m_status_acquisition = STATUS_TIMEOUT_ERROR; + if (m_status_event != NULL) + { + SetEvent(m_status_event); +#ifdef _VC6_ + sprintf(m_status_message, "ProcessThread:Timeout Error\n"); +#else + sprintf_s(m_status_message, "ProcessThread:Timeout Error\n"); +#endif + TRACE1("%s",m_status_message); + + } + } + else + { + TimeoutValue -= TimeoutStep; + } + break; + default: + m_status_acquisition = STATUS_ACQ_ERROR; + if (m_status_event != NULL) + { + SetEvent(m_status_event); + } + break; + } + } + } + SetEvent(m_OnEvent[EVENT_ACQ_EASY_KILL_THREAD_DO]); + return(0); +} +//------------------------------------------------------------------------------------------------- +bool cAcqEasy::StopAcquisition() +{ + bool result = false; + if (m_chr_id > 0) + { + MCHR_Abort(m_chr_id); + result = true; + } + criticalBuffer.Lock(); + m_IsDataAcquisitionStarting = false; + _ReleaseAcqBuffer(m_acqEasyParam.NumberOfBuffers); + criticalBuffer.Unlock(); + return(result); +} +//------------------------------------------------------------------------------------------------- +bool cAcqEasy::GetThicknessAcquisitionData(PFLOAT pArrayThickness, PFLOAT pArrayDistance1, PFLOAT pArrayIntensity1, PFLOAT pArrayBarycenter1, PFLOAT pArrayDistance2, PFLOAT pArrayIntensity2, PFLOAT pArrayBarycenter2, PFLOAT pArrayStatus, PFLOAT pArrayCounter, int* pDataCount) +{ + bool ret = false; + DWORD sizeDataFloat = 0; + DWORD sizeDataDWord = 0; + + if (pDataCount != NULL) + { + *pDataCount = 0; + } + //verify parameters + if (m_acqEasyParam.typeAcquisition != eMCHR_GetThicknessMeasurement) + { + m_status_acquisition = STATUS_PARAM_ERROR; + sprintf_s(m_status_message, "GetThicknessAcquisitionData:Bad Parameters\n"); + if (m_status_event != NULL) + { + SetEvent(m_status_event); + } + return(false); //bad call it is not the good function to call + } + if (m_acqEasyParam.TypeEvent == EV_END_MEASUREMENTS) + { + sizeDataFloat = (m_acqEasyParam.NumberOfPoints * sizeof(float)); + sizeDataDWord = (m_acqEasyParam.NumberOfPoints * sizeof(DWORD)); + } + else + { + sizeDataFloat = (m_acqEasyParam.BufferLength * sizeof(float)); + sizeDataDWord = (m_acqEasyParam.BufferLength * sizeof(DWORD)); + } + criticalBuffer.Lock(); + if (m_number_of_buffer_to_read > 0) + { + if ((pArrayThickness != NULL) && (m_acqEasyParam.EnableBufferThickness.Thickness == true)) + { + memcpy(pArrayThickness, m_ppAcqBuffer[ID_BUFFER_THICKNESS_THICKNESS][m_current_index_of_buffer_to_read], sizeDataFloat); + } + if ((pArrayDistance1 != NULL) && (m_acqEasyParam.EnableBufferThickness.Distance1 == true)) + { + memcpy(pArrayDistance1, m_ppAcqBuffer[ID_BUFFER_THICKNESS_DISTANCE1][m_current_index_of_buffer_to_read], sizeDataFloat); + } + if ((pArrayDistance2 != NULL) && (m_acqEasyParam.EnableBufferThickness.Distance2 == true)) + { + memcpy(pArrayDistance2, m_ppAcqBuffer[ID_BUFFER_THICKNESS_DISTANCE2][m_current_index_of_buffer_to_read], sizeDataFloat); + } + if ((pArrayIntensity1 != NULL) && (m_acqEasyParam.EnableBufferThickness.Intensity1 == true)) + { + memcpy(pArrayIntensity1, m_ppAcqBuffer[ID_BUFFER_THICKNESS_INTENSITY1][m_current_index_of_buffer_to_read], sizeDataFloat); + } + if ((pArrayIntensity2 != NULL) && (m_acqEasyParam.EnableBufferThickness.Intensity2 == true)) + { + memcpy(pArrayIntensity2, m_ppAcqBuffer[ID_BUFFER_THICKNESS_INTENSITY2][m_current_index_of_buffer_to_read], sizeDataFloat); + } + if ((pArrayBarycenter1 != NULL) && (m_acqEasyParam.EnableBufferThickness.BaryCenter1 == true)) + { + memcpy(pArrayBarycenter1, m_ppAcqBuffer[ID_BUFFER_THICKNESS_BARYCENTER1][m_current_index_of_buffer_to_read], sizeDataFloat); + } + if ((pArrayBarycenter2 != NULL) && (m_acqEasyParam.EnableBufferThickness.BaryCenter2 == true)) + { + memcpy(pArrayBarycenter2, m_ppAcqBuffer[ID_BUFFER_THICKNESS_BARYCENTER2][m_current_index_of_buffer_to_read], sizeDataFloat); + } + if ((pArrayStatus != NULL) && (m_acqEasyParam.EnableBufferThickness.Status == true)) + { + memcpy(pArrayStatus, m_ppAcqBuffer[ID_BUFFER_THICKNESS_STATUS][m_current_index_of_buffer_to_read], sizeDataFloat); + } + if ((pArrayCounter != NULL) && (m_acqEasyParam.EnableBufferThickness.Counter == true)) + { + memcpy(pArrayCounter, m_ppAcqBuffer[ID_BUFFER_THICKNESS_COUNTER][m_current_index_of_buffer_to_read], sizeDataFloat); + } + if (pDataCount != NULL) + { + *pDataCount = (sizeDataFloat / sizeof(float)); + } + m_current_index_of_buffer_to_read = (m_current_index_of_buffer_to_read + 1) % m_acqEasyParam.NumberOfBuffers; + m_number_of_buffer_to_read -= 1; + ret = true; + } + else + { + m_status_acquisition = STATUS_NO_DATA; + if (m_status_event != NULL) + { + SetEvent(m_status_event); + sprintf_s(m_status_message, "GetThicknessAcquisitionData:No data to read.\n"); + } + } + criticalBuffer.Unlock(); + return(ret); +} +//------------------------------------------------------------------------------------------------- +bool cAcqEasy::GetAltitudeAcquisitionData(PFLOAT pArrayAltitude, PFLOAT pArrayIntensity, PFLOAT pArrayCounter, PFLOAT pArrayBarycenter, PFLOAT pArrayStatus, int* pDataCount) +{ + bool ret = false; + DWORD sizeDataFloat = 0; + DWORD sizeDataDWord = 0; + + if (pDataCount != NULL) + { + *pDataCount = 0; + } + //verify parameters + if (m_acqEasyParam.typeAcquisition != eMCHR_GetAltitudeMeasurement) + { + m_status_acquisition = STATUS_PARAM_ERROR; +#ifdef _VC6_ + sprintf(m_status_message, "GetAltitudeAcquisitionData:Bad Parameters\n"); +#else + sprintf_s(m_status_message, "GetAltitudeAcquisitionData:Bad Parameters\n"); +#endif + if (m_status_event != NULL) + { + SetEvent(m_status_event); + } + return(false); //bad call it is not the good function to call + } + if (m_acqEasyParam.TypeEvent == EV_END_MEASUREMENTS) + { + sizeDataFloat = (m_acqEasyParam.NumberOfPoints * sizeof(float)); + sizeDataDWord = (m_acqEasyParam.NumberOfPoints * sizeof(DWORD)); + } + else + { + sizeDataFloat = (m_acqEasyParam.BufferLength * sizeof(float)); + sizeDataDWord = (m_acqEasyParam.BufferLength * sizeof(DWORD)); + } + criticalBuffer.Lock(); + if (m_number_of_buffer_to_read > 0) + { + if ((pArrayAltitude != NULL) && (m_acqEasyParam.EnableBufferAltitude.Altitude == true)) + { + memcpy(pArrayAltitude, m_ppAcqBuffer[ID_BUFFER_ALTITUDE_ALTITUDE][m_current_index_of_buffer_to_read], sizeDataFloat); + } + if ((pArrayIntensity != NULL) && (m_acqEasyParam.EnableBufferAltitude.Intensity == true)) + { + memcpy(pArrayIntensity, m_ppAcqBuffer[ID_BUFFER_ALTITUDE_INTENSITY][m_current_index_of_buffer_to_read], sizeDataFloat); + } + if ((pArrayCounter != NULL) && (m_acqEasyParam.EnableBufferAltitude.Counter == true)) + { + memcpy(pArrayCounter, m_ppAcqBuffer[ID_BUFFER_ALTITUDE_COUNTER][m_current_index_of_buffer_to_read], sizeDataFloat); + } + if ((pArrayBarycenter != NULL) && (m_acqEasyParam.EnableBufferAltitude.BaryCenter == true)) + { + memcpy(pArrayBarycenter, m_ppAcqBuffer[ID_BUFFER_ALTITUDE_BARYCENTER][m_current_index_of_buffer_to_read], sizeDataFloat); + } + if ((pArrayStatus != NULL) && (m_acqEasyParam.EnableBufferAltitude.Status == true)) + { + memcpy(pArrayStatus, m_ppAcqBuffer[ID_BUFFER_ALTITUDE_STATUS][m_current_index_of_buffer_to_read], sizeDataFloat); + } + if (pDataCount != NULL) + { + *pDataCount = (sizeDataFloat / sizeof(float)); + } + m_current_index_of_buffer_to_read = (m_current_index_of_buffer_to_read + 1) % m_acqEasyParam.NumberOfBuffers; + m_number_of_buffer_to_read -= 1; + ret = true; + } + else + { + m_status_acquisition = STATUS_NO_DATA; + if (m_status_event != NULL) + { + SetEvent(m_status_event); +#ifdef _VC6_ + sprintf(m_status_message, "GetAltitudeAcquisitionData:No data to read.\n"); +#else + sprintf_s(m_status_message, "GetAltitudeAcquisitionData:No data to read.\n"); +#endif + } + } + criticalBuffer.Unlock(); + return(ret); +} +//------------------------------------------------------------------------------------------------- +bool cAcqEasy::GetDepthAcquisitionData(PFLOAT pArrayDepth, PFLOAT pArrayIntensity, PFLOAT pArrayCounter, PFLOAT pArrayBarycenter, PFLOAT pArrayStatus, int* pDataCount) +{ + bool ret = false; + DWORD sizeDataFloat = 0; + DWORD sizeDataDWord = 0; + + if (pDataCount != NULL) + { + *pDataCount = 0; + } + //verify parameters + if (m_acqEasyParam.typeAcquisition != eMCHR_GetDepthMeasurement) + { + m_status_acquisition = STATUS_PARAM_ERROR; +#ifdef _VC6_ + sprintf(m_status_message, "GetDepthAcquisitionData:Bad Parameters\n"); +#else + sprintf_s(m_status_message, "GetDepthAcquisitionData:Bad Parameters\n"); +#endif + if (m_status_event != NULL) + { + SetEvent(m_status_event); + } + return(false); //bad call it is not the good function to call + } + if (m_acqEasyParam.TypeEvent == EV_END_MEASUREMENTS) + { + sizeDataFloat = (m_acqEasyParam.NumberOfPoints * sizeof(float)); + sizeDataDWord = (m_acqEasyParam.NumberOfPoints * sizeof(DWORD)); + } + else + { + sizeDataFloat = (m_acqEasyParam.BufferLength * sizeof(float)); + sizeDataDWord = (m_acqEasyParam.BufferLength * sizeof(DWORD)); + } + criticalBuffer.Lock(); + if (m_number_of_buffer_to_read > 0) + { + if ((pArrayDepth != NULL) && (m_acqEasyParam.EnableBufferDepth.Depth == true)) + { + memcpy(pArrayDepth, m_ppAcqBuffer[ID_BUFFER_DEPTH_DEPTH][m_current_index_of_buffer_to_read], sizeDataFloat); + } + if ((pArrayIntensity != NULL) && (m_acqEasyParam.EnableBufferDepth.Intensity == true)) + { + memcpy(pArrayIntensity, m_ppAcqBuffer[ID_BUFFER_DEPTH_INTENSITY][m_current_index_of_buffer_to_read], sizeDataFloat); + } + if ((pArrayCounter != NULL) && (m_acqEasyParam.EnableBufferDepth.Counter == true)) + { + memcpy(pArrayCounter, m_ppAcqBuffer[ID_BUFFER_DEPTH_COUNTER][m_current_index_of_buffer_to_read], sizeDataFloat); + } + if ((pArrayBarycenter != NULL) && (m_acqEasyParam.EnableBufferDepth.BaryCenter == true)) + { + memcpy(pArrayBarycenter, m_ppAcqBuffer[ID_BUFFER_DEPTH_BARYCENTER][m_current_index_of_buffer_to_read], sizeDataFloat); + } + if ((pArrayStatus != NULL) && (m_acqEasyParam.EnableBufferDepth.Status == true)) + { + memcpy(pArrayStatus, m_ppAcqBuffer[ID_BUFFER_DEPTH_STATUS][m_current_index_of_buffer_to_read], sizeDataFloat); + } + if (pDataCount != NULL) + { + *pDataCount = (sizeDataFloat / sizeof(float)); + } + m_current_index_of_buffer_to_read = (m_current_index_of_buffer_to_read + 1) % m_acqEasyParam.NumberOfBuffers; + m_number_of_buffer_to_read -= 1; + ret = true; + } + else + { + m_status_acquisition = STATUS_NO_DATA; +#ifdef _VC6_ + sprintf(m_status_message, "GetDepthAcquisitionData:No data to read.\n"); +#else + sprintf_s(m_status_message, "GetDepthAcquisitionData:No data to read.\n"); +#endif + if (m_status_event != NULL) + { + SetEvent(m_status_event); + } + } + criticalBuffer.Unlock(); + return(ret); +} +//------------------------------------------------------------------------------------------------- +bool cAcqEasy::GetEncoderData(PDWORD pArrayEncoder1, PDWORD pArrayEncoder2, PDWORD pArrayEncoder3) +{ + bool ret = false; + DWORD sizeDataFloat = 0; + DWORD sizeDataDWord = 0; + + //verify parameters + if ((m_acqEasyParam.EnableBufferEncoder.Encoder1 == FALSE) && (m_acqEasyParam.EnableBufferEncoder.Encoder2 == FALSE) && (m_acqEasyParam.EnableBufferEncoder.Encoder3 == FALSE)) + { + m_status_acquisition = STATUS_PARAM_ERROR; +#ifdef _VC6_ + sprintf(m_status_message, "GetEncoderData:Bad Parameters\n"); +#else + sprintf_s(m_status_message, "GetEncoderData:Bad Parameters\n"); +#endif + if (m_status_event != NULL) + { + SetEvent(m_status_event); + } + return(false); //bad call it is not the good function to call + } + if (m_acqEasyParam.TypeEvent == EV_END_MEASUREMENTS) + { + sizeDataFloat = (m_acqEasyParam.NumberOfPoints * sizeof(float)); + sizeDataDWord = (m_acqEasyParam.NumberOfPoints * sizeof(DWORD)); + } + else + { + sizeDataFloat = (m_acqEasyParam.BufferLength * sizeof(float)); + sizeDataDWord = (m_acqEasyParam.BufferLength * sizeof(DWORD)); + } + criticalBuffer.Lock(); + if (m_current_index_of_buffer_to_read > 0) + { + if ((pArrayEncoder1 != NULL) && (m_acqEasyParam.EnableBufferEncoder.Encoder1 == true)) + { + memcpy(pArrayEncoder1, m_ppEncoderBuffer[ID_BUFFER_ENCODER_1][m_current_index_of_buffer_to_read], sizeDataDWord); + } + if ((pArrayEncoder2 != NULL) && (m_acqEasyParam.EnableBufferEncoder.Encoder1 == true)) + { + memcpy(pArrayEncoder2, m_ppEncoderBuffer[ID_BUFFER_ENCODER_2][m_current_index_of_buffer_to_read], sizeDataDWord); + } + if ((pArrayEncoder3 != NULL) && (m_acqEasyParam.EnableBufferEncoder.Encoder3 == true)) + { + memcpy(pArrayEncoder3, m_ppEncoderBuffer[ID_BUFFER_ENCODER_3][m_current_index_of_buffer_to_read], sizeDataDWord); + } + m_current_index_of_buffer_to_read = (m_current_index_of_buffer_to_read + 1) % m_acqEasyParam.NumberOfBuffers; + m_number_of_buffer_to_read -= 1; + ret = true; + } + else + { + m_status_acquisition = STATUS_NO_DATA; +#ifdef _VC6_ + sprintf(m_status_message, "GetEncoderData:No data to read.\n"); +#else + sprintf_s(m_status_message, "GetEncoderData:No data to read.\n"); +#endif + if (m_status_event != NULL) + { + SetEvent(m_status_event); + } + } + criticalBuffer.Unlock(); + return(ret); +} +//------------------------------------------------------------------------------------------------- +bool cAcqEasy::GetTransmittedData_ChrDistance(PFLOAT pArrayDistance, PFLOAT pArrayIntensity, PFLOAT pArrayBarycenter, int* pDataCount) +{ + bool ret = false; + DWORD sizeDataFloat = 0; + DWORD sizeDataDWord = 0; + + if (pDataCount != NULL) + { + *pDataCount = 0; + } + //verify parameters + if ((m_acqEasyParam.typeAcquisition != eMCHR_GetTransmittedDataMeasurement) && (m_acqEasyParam.SensorMode == MCHR_DISTANCE_MODE)) + { + m_status_acquisition = STATUS_PARAM_ERROR; +#ifdef _VC6_ + sprintf(m_status_message, "GetTransmittedData_ChrDistance:Bad Parameters\n"); +#else + sprintf_s(m_status_message, "GetTransmittedData_ChrDistance:Bad Parameters\n"); +#endif + if (m_status_event != NULL) + { + SetEvent(m_status_event); + } + return(false); //bad call it is not the good function to call + } + if (m_acqEasyParam.TypeEvent == EV_END_MEASUREMENTS) + { + sizeDataFloat = (m_acqEasyParam.NumberOfPoints * sizeof(float)); + sizeDataDWord = (m_acqEasyParam.NumberOfPoints * sizeof(DWORD)); + } + else + { + sizeDataFloat = (m_acqEasyParam.BufferLength * sizeof(float)); + sizeDataDWord = (m_acqEasyParam.BufferLength * sizeof(DWORD)); + } + criticalBuffer.Lock(); + if (m_number_of_buffer_to_read > 0) + { + if ((pArrayDistance != NULL) && (m_acqEasyParam.EnableBufferTransmittedData.ChrDistance.Distance == true)) + { + memcpy(pArrayDistance, m_ppAcqBuffer[ID_BUFFER_CHR_DISTANCE_DISTANCE][m_current_index_of_buffer_to_read], sizeDataFloat); + } + if ((pArrayIntensity != NULL) && (m_acqEasyParam.EnableBufferTransmittedData.ChrDistance.Intensity == true)) + { + memcpy(pArrayIntensity, m_ppAcqBuffer[ID_BUFFER_CHR_DISTANCE_INTENSITY][m_current_index_of_buffer_to_read], sizeDataFloat); + } + if ((pArrayBarycenter != NULL) && (m_acqEasyParam.EnableBufferTransmittedData.ChrDistance.BaryCenter == true)) + { + memcpy(pArrayBarycenter, m_ppAcqBuffer[ID_BUFFER_CHR_DISTANCE_BARYCENTER][m_current_index_of_buffer_to_read], sizeDataFloat); + } + if (pDataCount != NULL) + { + *pDataCount = (sizeDataFloat / sizeof(float)); + } + m_current_index_of_buffer_to_read = (m_current_index_of_buffer_to_read + 1) % m_acqEasyParam.NumberOfBuffers; + m_number_of_buffer_to_read -= 1; + ret = true; + } + else + { + m_status_acquisition = STATUS_NO_DATA; +#ifdef _VC6_ + sprintf(m_status_message, "GetTransmittedData_ChrDistance:No data to read.\n"); +#else + sprintf_s(m_status_message, "GetTransmittedData_ChrDistance:No data to read.\n"); +#endif + if (m_status_event != NULL) + { + SetEvent(m_status_event); + } + } + criticalBuffer.Unlock(); + return(ret); +} +//------------------------------------------------------------------------------------------------- +bool cAcqEasy::GetTransmittedData_ChrThickness(PFLOAT pArrayThickness, PFLOAT pArrayDistance1, PFLOAT pArrayDistance2, + PFLOAT pArrayIntensity1, PFLOAT pArrayIntensity2, PFLOAT pArrayBaryCenter1, PFLOAT pArrayBaryCenter2, int* pDataCount) +{ + bool ret = false; + DWORD sizeDataFloat = 0; + DWORD sizeDataDWord = 0; + + if (pDataCount != NULL) + { + *pDataCount = 0; + } + //verify parameters + if ((m_acqEasyParam.typeAcquisition != eMCHR_GetTransmittedDataMeasurement) && (m_acqEasyParam.SensorMode == MCHR_THICKNESS_MODE)) + { + m_status_acquisition = STATUS_PARAM_ERROR; +#ifdef _VC6_ + sprintf(m_status_message, "GetTransmittedData_ChrThickness:Bad Parameters\n"); +#else + sprintf_s(m_status_message, "GetTransmittedData_ChrThickness:Bad Parameters\n"); +#endif + if (m_status_event != NULL) + { + SetEvent(m_status_event); + } + return(false); //bad call it is not the good function to call + } + if (m_acqEasyParam.TypeEvent == EV_END_MEASUREMENTS) + { + sizeDataFloat = (m_acqEasyParam.NumberOfPoints * sizeof(float)); + sizeDataDWord = (m_acqEasyParam.NumberOfPoints * sizeof(DWORD)); + } + else + { + sizeDataFloat = (m_acqEasyParam.BufferLength * sizeof(float)); + sizeDataDWord = (m_acqEasyParam.BufferLength * sizeof(DWORD)); + } + criticalBuffer.Lock(); + if (m_number_of_buffer_to_read > 0) + { + if ((pArrayThickness != NULL) && (m_acqEasyParam.EnableBufferTransmittedData.ChrThickness.Thickness == true)) + { + memcpy(pArrayThickness, m_ppAcqBuffer[ID_BUFFER_CHR_THICKNESS_THICKNESS][m_current_index_of_buffer_to_read], sizeDataFloat); + } + if ((pArrayDistance1 != NULL) && (m_acqEasyParam.EnableBufferTransmittedData.ChrThickness.Distance1 == true)) + { + memcpy(pArrayDistance1, m_ppAcqBuffer[ID_BUFFER_CHR_THICKNESS_DISTANCE1][m_current_index_of_buffer_to_read], sizeDataFloat); + } + if ((pArrayDistance2 != NULL) && (m_acqEasyParam.EnableBufferTransmittedData.ChrThickness.Distance2 == true)) + { + memcpy(pArrayDistance2, m_ppAcqBuffer[ID_BUFFER_CHR_THICKNESS_DISTANCE2][m_current_index_of_buffer_to_read], sizeDataFloat); + } + if ((pArrayIntensity1 != NULL) && (m_acqEasyParam.EnableBufferTransmittedData.ChrThickness.Intensity1 == true)) + { + memcpy(pArrayIntensity1, m_ppAcqBuffer[ID_BUFFER_CHR_THICKNESS_INTENSITY1][m_current_index_of_buffer_to_read], sizeDataFloat); + } + if ((pArrayIntensity2 != NULL) && (m_acqEasyParam.EnableBufferTransmittedData.ChrThickness.Intensity2 == true)) + { + memcpy(pArrayIntensity2, m_ppAcqBuffer[ID_BUFFER_CHR_THICKNESS_INTENSITY2][m_current_index_of_buffer_to_read], sizeDataFloat); + } + if ((pArrayBaryCenter1 != NULL) && (m_acqEasyParam.EnableBufferTransmittedData.ChrThickness.BaryCenter1 == true)) + { + memcpy(pArrayBaryCenter1, m_ppAcqBuffer[ID_BUFFER_CHR_THICKNESS_BARYCENTER1][m_current_index_of_buffer_to_read], sizeDataFloat); + } + if ((pArrayBaryCenter2 != NULL) && (m_acqEasyParam.EnableBufferTransmittedData.ChrThickness.BaryCenter2 == true)) + { + memcpy(pArrayBaryCenter2, m_ppAcqBuffer[ID_BUFFER_CHR_THICKNESS_BARYCENTER2][m_current_index_of_buffer_to_read], sizeDataFloat); + } + if (pDataCount != NULL) + { + *pDataCount = (sizeDataFloat / sizeof(float)); + } + m_current_index_of_buffer_to_read = (m_current_index_of_buffer_to_read + 1) % m_acqEasyParam.NumberOfBuffers; + m_number_of_buffer_to_read -= 1; + ret = true; + } + else + { + m_status_acquisition = STATUS_NO_DATA; +#ifdef _VC6_ + sprintf(m_status_message, "GetTransmittedData_ChrThickness:No data to read.\n"); +#else + sprintf_s(m_status_message, "GetTransmittedData_ChrThickness:No data to read.\n"); +#endif + if (m_status_event != NULL) + { + SetEvent(m_status_event); + } + } + criticalBuffer.Unlock(); + return(ret); +} +//------------------------------------------------------------------------------------------------- +bool cAcqEasy::GetTransmittedData_CcsDistance(PFLOAT pArrayDistance, PFLOAT pArrayAutoAdaptativeModeData, PFLOAT pArrayIntensity, PFLOAT pArrayBaryCenter, + PFLOAT pArrayStatus, PFLOAT pArrayCounter, PDWORD pArrayEncoder1, PDWORD pArrayEncoder2, PDWORD pArrayEncoder3, int* pDataCount) +{ + bool ret = false; + DWORD sizeDataFloat = 0; + DWORD sizeDataDWord = 0; + DWORD idx = 0; + + if (pDataCount != NULL) + { + *pDataCount = 0; + } + //verify parameters + if ((m_acqEasyParam.typeAcquisition != eMCHR_GetTransmittedDataMeasurement) && (m_acqEasyParam.SensorMode == MCHR_DISTANCE_MODE)) + { + m_status_acquisition = STATUS_PARAM_ERROR; +#ifdef _VC6_ + sprintf(m_status_message, "GetTransmittedData_CcsDistance:Bad Parameters\n"); +#else + sprintf_s(m_status_message, "GetTransmittedData_CcsDistance:Bad Parameters\n"); +#endif + if (m_status_event != NULL) + { + SetEvent(m_status_event); + } + return(false); //bad call it is not the good function to call + } + if (m_acqEasyParam.TypeEvent == EV_END_MEASUREMENTS) + { + sizeDataFloat = (m_acqEasyParam.NumberOfPoints * sizeof(float)); + sizeDataDWord = (m_acqEasyParam.NumberOfPoints * sizeof(DWORD)); + } + else + { + sizeDataFloat = (m_acqEasyParam.BufferLength * sizeof(float)); + sizeDataDWord = (m_acqEasyParam.BufferLength * sizeof(DWORD)); + } + criticalBuffer.Lock(); + if (m_number_of_buffer_to_read > 0) + { + if ((pArrayDistance != NULL) && (m_acqEasyParam.EnableBufferTransmittedData.CcsDistance.Distance == true)) + { + memcpy(pArrayDistance, m_ppAcqBuffer[ID_BUFFER_CCS_DISTANCE_DISTANCE_MSB][m_current_index_of_buffer_to_read], sizeDataFloat); + } + if ((pArrayAutoAdaptativeModeData != NULL) && (m_acqEasyParam.EnableBufferTransmittedData.CcsDistance.AutoAdaptativeModeData == true)) + { + memcpy(pArrayAutoAdaptativeModeData, m_ppAcqBuffer[ID_BUFFER_CCS_DISTANCE_AUTO_ADAPTATIVE_MODE][m_current_index_of_buffer_to_read], sizeDataFloat); + } + if ((pArrayIntensity != NULL) && (m_acqEasyParam.EnableBufferTransmittedData.CcsDistance.Intensity == true)) + { + memcpy(pArrayIntensity, m_ppAcqBuffer[ID_BUFFER_CCS_DISTANCE_INTENSITY][m_current_index_of_buffer_to_read], sizeDataFloat); + } + if ((pArrayBaryCenter != NULL) && (m_acqEasyParam.EnableBufferTransmittedData.CcsDistance.BaryCenter == true)) + { + memcpy(pArrayBaryCenter, m_ppAcqBuffer[ID_BUFFER_CCS_DISTANCE_BARYCENTER][m_current_index_of_buffer_to_read], sizeDataFloat); + } + if ((pArrayStatus != NULL) && (m_acqEasyParam.EnableBufferTransmittedData.CcsDistance.Status == true)) + { + memcpy(pArrayStatus, m_ppAcqBuffer[ID_BUFFER_CCS_DISTANCE_STATUS][m_current_index_of_buffer_to_read], sizeDataFloat); + } + if ((pArrayCounter != NULL) && (m_acqEasyParam.EnableBufferTransmittedData.CcsDistance.Counter == true)) + { + memcpy(pArrayCounter, m_ppAcqBuffer[ID_BUFFER_CCS_DISTANCE_COUNTER][m_current_index_of_buffer_to_read], sizeDataFloat); + } + if ((pArrayEncoder1 != NULL) && (m_acqEasyParam.EnableBufferTransmittedData.CcsDistance.Encoder1 == true)) + { + //memcpy(pArrayEncoder1, m_ppAcqBuffer[ID_BUFFER_CCS_DISTANCE_ENCODER1_MSB][m_current_index_of_buffer_to_read], sizeDataDWord); + for(idx = 0; idx < (sizeDataDWord / sizeof (DWORD)); idx++) + pArrayEncoder1[idx] = (((DWORD)(m_ppAcqBuffer[ID_BUFFER_CCS_DISTANCE_ENCODER1_MSB][m_current_index_of_buffer_to_read][idx])<<15) + | (DWORD) m_ppAcqBuffer[ID_BUFFER_CCS_DISTANCE_ENCODER1_LSB][m_current_index_of_buffer_to_read][idx]); + } + if ((pArrayEncoder2 != NULL) && (m_acqEasyParam.EnableBufferTransmittedData.CcsDistance.Encoder2 == true)) + { + //memcpy(pArrayEncoder2, m_ppAcqBuffer[ID_BUFFER_CCS_DISTANCE_ENCODER2_MSB][m_current_index_of_buffer_to_read], sizeDataDWord); + for(idx = 0; idx < (sizeDataDWord / sizeof (DWORD)); idx++) + pArrayEncoder2[idx] = (((DWORD)(m_ppAcqBuffer[ID_BUFFER_CCS_DISTANCE_ENCODER2_MSB][m_current_index_of_buffer_to_read][idx])<<15) + | (DWORD) m_ppAcqBuffer[ID_BUFFER_CCS_DISTANCE_ENCODER2_LSB][m_current_index_of_buffer_to_read][idx]); + } + if ((pArrayEncoder3 != NULL) && (m_acqEasyParam.EnableBufferTransmittedData.CcsDistance.Encoder3 == true)) + { + //memcpy(pArrayEncoder3, m_ppAcqBuffer[ID_BUFFER_CCS_DISTANCE_ENCODER3_MSB][m_current_index_of_buffer_to_read], sizeDataDWord); + for(idx = 0; idx < (sizeDataDWord / sizeof (DWORD)); idx++) + pArrayEncoder3[idx] = (((DWORD)(m_ppAcqBuffer[ID_BUFFER_CCS_DISTANCE_ENCODER3_MSB][m_current_index_of_buffer_to_read][idx])<<15) + | (DWORD) m_ppAcqBuffer[ID_BUFFER_CCS_DISTANCE_ENCODER3_LSB][m_current_index_of_buffer_to_read][idx]); + } + if (pDataCount != NULL) + { + *pDataCount += (sizeDataFloat / sizeof(float)); + } + m_current_index_of_buffer_to_read = (m_current_index_of_buffer_to_read + 1) % m_acqEasyParam.NumberOfBuffers; + m_number_of_buffer_to_read -= 1; + ret = true; + } + else + { + m_status_acquisition = STATUS_NO_DATA; +#ifdef _VC6_ + sprintf(m_status_message, "GetTransmittedData_CcsDistance:No data to read.\n"); +#else + sprintf_s(m_status_message, "GetTransmittedData_CcsDistance:No data to read.\n"); +#endif + if (m_status_event != NULL) + { + SetEvent(m_status_event); + } + } + criticalBuffer.Unlock(); + return(ret); +} +//------------------------------------------------------------------------------------------------- +bool cAcqEasy::GetTransmittedData_CcsThickness(PFLOAT pArrayThickness, PFLOAT pArrayDistance1, PFLOAT pArrayDistance2, PFLOAT pArrayAutoAdaptativeModeData, PFLOAT pArrayIntensity1, + PFLOAT pArrayIntensity2, PFLOAT pArrayBaryCenter1, PFLOAT pArrayBaryCenter2, PFLOAT pArrayStatus, PFLOAT pArrayCounter, + PDWORD pArrayEncoder1, PDWORD pArrayEncoder2, PDWORD pArrayEncoder3, int* pDataCount) +{ + bool ret = false; + DWORD sizeDataFloat = 0; + DWORD sizeDataDWord = 0; + DWORD idx = 0; + + if (pDataCount != NULL) + { + *pDataCount = 0; + } + //verify parameters + if ((m_acqEasyParam.typeAcquisition != eMCHR_GetTransmittedDataMeasurement) && (m_acqEasyParam.SensorMode == MCHR_THICKNESS_MODE)) + { + m_status_acquisition = STATUS_PARAM_ERROR; +#ifdef _VC6_ + sprintf(m_status_message, "GetTransmittedData_CcsThickness:Bad Parameters\n"); +#else + sprintf_s(m_status_message, "GetTransmittedData_CcsThickness:Bad Parameters\n"); +#endif + if (m_status_event != NULL) + { + SetEvent(m_status_event); + } + return(false); //bad call it is not the good function to call + } + if (m_acqEasyParam.TypeEvent == EV_END_MEASUREMENTS) + { + sizeDataFloat = (m_acqEasyParam.NumberOfPoints * sizeof(float)); + sizeDataDWord = (m_acqEasyParam.NumberOfPoints * sizeof(DWORD)); + } + else + { + sizeDataFloat = (m_acqEasyParam.BufferLength * sizeof(float)); + sizeDataDWord = (m_acqEasyParam.BufferLength * sizeof(DWORD)); + } + criticalBuffer.Lock(); + if (m_number_of_buffer_to_read > 0) + { + if ((pArrayThickness != NULL) && (m_acqEasyParam.EnableBufferTransmittedData.CcsThickness.Thickness == true)) + { + memcpy(pArrayThickness, m_ppAcqBuffer[ID_BUFFER_CCS_THICKNESS_THICKNESS][m_current_index_of_buffer_to_read], sizeDataFloat); + } + if ((pArrayDistance1 != NULL) && (m_acqEasyParam.EnableBufferTransmittedData.CcsThickness.Distance1 == true)) + { + memcpy(pArrayDistance1, m_ppAcqBuffer[ID_BUFFER_CCS_THICKNESS_DISTANCE1][m_current_index_of_buffer_to_read], sizeDataFloat); + } + if ((pArrayDistance2 != NULL) && (m_acqEasyParam.EnableBufferTransmittedData.CcsThickness.Distance2 == true)) + { + memcpy(pArrayDistance2, m_ppAcqBuffer[ID_BUFFER_CCS_THICKNESS_DISTANCE2][m_current_index_of_buffer_to_read], sizeDataFloat); + } + if ((pArrayAutoAdaptativeModeData != NULL) && (m_acqEasyParam.EnableBufferTransmittedData.CcsThickness.AutoAdaptativeModeData == true)) + { + memcpy(pArrayAutoAdaptativeModeData, m_ppAcqBuffer[ID_BUFFER_CCS_THICKNESS_AUTO_ADAPTATIVE_MODE][m_current_index_of_buffer_to_read], sizeDataFloat); + } + if ((pArrayIntensity1 != NULL) && (m_acqEasyParam.EnableBufferTransmittedData.CcsThickness.Intensity1 == true)) + { + memcpy(pArrayIntensity1, m_ppAcqBuffer[ID_BUFFER_CCS_THICKNESS_INTENSITY1][m_current_index_of_buffer_to_read], sizeDataFloat); + } + if ((pArrayIntensity2 != NULL) && (m_acqEasyParam.EnableBufferTransmittedData.CcsThickness.Intensity2 == true)) + { + memcpy(pArrayIntensity2, m_ppAcqBuffer[ID_BUFFER_CCS_THICKNESS_INTENSITY2][m_current_index_of_buffer_to_read], sizeDataFloat); + } + if ((pArrayBaryCenter1 != NULL) && (m_acqEasyParam.EnableBufferTransmittedData.CcsThickness.BaryCenter1 == true)) + { + memcpy(pArrayBaryCenter1, m_ppAcqBuffer[ID_BUFFER_CCS_THICKNESS_BARYCENTER1][m_current_index_of_buffer_to_read], sizeDataFloat); + } + if ((pArrayBaryCenter2 != NULL) && (m_acqEasyParam.EnableBufferTransmittedData.CcsThickness.BaryCenter2 == true)) + { + memcpy(pArrayBaryCenter2, m_ppAcqBuffer[ID_BUFFER_CCS_THICKNESS_BARYCENTER2][m_current_index_of_buffer_to_read], sizeDataFloat); + } + if ((pArrayStatus != NULL) && (m_acqEasyParam.EnableBufferTransmittedData.CcsThickness.Status == true)) + { + memcpy(pArrayStatus, m_ppAcqBuffer[ID_BUFFER_CCS_THICKNESS_STATUS][m_current_index_of_buffer_to_read], sizeDataFloat); + } + if ((pArrayCounter != NULL) && (m_acqEasyParam.EnableBufferTransmittedData.CcsThickness.Counter == true)) + { + memcpy(pArrayCounter, m_ppAcqBuffer[ID_BUFFER_CCS_THICKNESS_COUNTER][m_current_index_of_buffer_to_read], sizeDataFloat); + } + if ((pArrayEncoder1 != NULL) && (m_acqEasyParam.EnableBufferTransmittedData.CcsThickness.Encoder1 == true)) + { + // memcpy(pArrayEncoder1, m_ppAcqBuffer[ID_BUFFER_CCS_THICKNESS_ENCODER1_MSB][m_current_index_of_buffer_to_read], sizeDataDWord); + for(idx = 0; idx < (sizeDataDWord / sizeof (DWORD)); idx++) + pArrayEncoder1[idx] = (((DWORD)(m_ppAcqBuffer[ID_BUFFER_CCS_THICKNESS_ENCODER1_MSB][m_current_index_of_buffer_to_read][idx])<<15) + | (DWORD) m_ppAcqBuffer[ID_BUFFER_CCS_THICKNESS_ENCODER1_LSB][m_current_index_of_buffer_to_read][idx]); + } + if ((pArrayEncoder2 != NULL) && (m_acqEasyParam.EnableBufferTransmittedData.CcsThickness.Encoder2 == true)) + { + //memcpy(pArrayEncoder2, m_ppAcqBuffer[ID_BUFFER_CCS_THICKNESS_ENCODER2_MSB][m_current_index_of_buffer_to_read], sizeDataDWord); + for(idx = 0; idx < (sizeDataDWord / sizeof (DWORD)); idx++) + pArrayEncoder2[idx] = (((DWORD)(m_ppAcqBuffer[ID_BUFFER_CCS_THICKNESS_ENCODER2_MSB][m_current_index_of_buffer_to_read][idx])<<15) + | (DWORD) m_ppAcqBuffer[ID_BUFFER_CCS_THICKNESS_ENCODER2_LSB][m_current_index_of_buffer_to_read][idx]); + } + if ((pArrayEncoder3 != NULL) && (m_acqEasyParam.EnableBufferTransmittedData.CcsThickness.Encoder3 == true)) + { + //memcpy(pArrayEncoder3, m_ppAcqBuffer[ID_BUFFER_CCS_THICKNESS_ENCODER3_MSB][m_current_index_of_buffer_to_read], sizeDataDWord); + for(idx = 0; idx < (sizeDataDWord / sizeof (DWORD)); idx++) + pArrayEncoder3[idx] = (((DWORD)(m_ppAcqBuffer[ID_BUFFER_CCS_THICKNESS_ENCODER3_MSB][m_current_index_of_buffer_to_read][idx])<<15) + | (DWORD) m_ppAcqBuffer[ID_BUFFER_CCS_THICKNESS_ENCODER3_LSB][m_current_index_of_buffer_to_read][idx]); + } + if (pDataCount != NULL) + { + *pDataCount = (sizeDataFloat / sizeof(float)); + } + m_current_index_of_buffer_to_read = (m_current_index_of_buffer_to_read + 1) % m_acqEasyParam.NumberOfBuffers; + m_number_of_buffer_to_read -= 1; + ret = true; + } + else + { + m_status_acquisition = STATUS_NO_DATA; +#ifdef _VC6_ + sprintf(m_status_message, "GetTransmittedData_CcsThickness:No data to read.\n"); +#else + sprintf_s(m_status_message, "GetTransmittedData_CcsThickness:No data to read.\n"); +#endif + if (m_status_event != NULL) + { + SetEvent(m_status_event); + } + } + criticalBuffer.Unlock(); + return(ret); +} +//------------------------------------------------------------------------------------------------- +bool cAcqEasy::GetTransmittedData_DuoDistance(PFLOAT pArrayDistance, PFLOAT pArrayIntensity, PFLOAT pArrayCounter, PFLOAT pArrayBarycenter, PFLOAT pArrayStatus, int* pDataCount) +{ + bool ret = false; + DWORD sizeDataFloat = 0; + DWORD sizeDataDWord = 0; + + if (pDataCount != NULL) + { + *pDataCount = 0; + } + //verify parameters + if ((m_acqEasyParam.typeAcquisition != eMCHR_GetTransmittedDataMeasurement) && (m_acqEasyParam.SensorMode == MCHR_DISTANCE_MODE)) + { + m_status_acquisition = STATUS_PARAM_ERROR; +#ifdef _VC6_ + sprintf(m_status_message, "GetTransmittedData_DuoDistance:Bad Parameters\n"); +#else + sprintf_s(m_status_message, "GetTransmittedData_DuoDistance:Bad Parameters\n"); +#endif + if (m_status_event != NULL) + { + SetEvent(m_status_event); + } + return(false); //bad call it is not the good function to call + } + if (m_acqEasyParam.TypeEvent == EV_END_MEASUREMENTS) + { + sizeDataFloat = (m_acqEasyParam.NumberOfPoints * sizeof(float)); + sizeDataDWord = (m_acqEasyParam.NumberOfPoints * sizeof(DWORD)); + } + else + { + sizeDataFloat = (m_acqEasyParam.BufferLength * sizeof(float)); + sizeDataDWord = (m_acqEasyParam.BufferLength * sizeof(DWORD)); + } + criticalBuffer.Lock(); + if (m_number_of_buffer_to_read > 0) + { + if ((pArrayDistance != NULL) && (m_acqEasyParam.EnableBufferTransmittedData.DuoDistance.Distance == true)) + { + memcpy(pArrayDistance, m_ppAcqBuffer[ID_BUFFER_DUO_DISTANCE_DISTANCE_MSB][m_current_index_of_buffer_to_read], sizeDataFloat); + } + if ((pArrayIntensity != NULL) && (m_acqEasyParam.EnableBufferTransmittedData.DuoDistance.Intensity == true)) + { + memcpy(pArrayIntensity, m_ppAcqBuffer[ID_BUFFER_DUO_DISTANCE_INTENSITY][m_current_index_of_buffer_to_read], sizeDataFloat); + } + if ((pArrayCounter != NULL) && (m_acqEasyParam.EnableBufferTransmittedData.DuoDistance.Counter == true)) + { + memcpy(pArrayCounter, m_ppAcqBuffer[ID_BUFFER_DUO_DISTANCE_COUNTER][m_current_index_of_buffer_to_read], sizeDataFloat); + } + if ((pArrayBarycenter != NULL) && (m_acqEasyParam.EnableBufferTransmittedData.DuoDistance.BaryCenter == true)) + { + memcpy(pArrayBarycenter, m_ppAcqBuffer[ID_BUFFER_DUO_DISTANCE_BARYCENTER][m_current_index_of_buffer_to_read], sizeDataFloat); + } + if ((pArrayStatus != NULL) && (m_acqEasyParam.EnableBufferTransmittedData.DuoDistance.Status == true)) + { + memcpy(pArrayStatus, m_ppAcqBuffer[ID_BUFFER_DUO_DISTANCE_STATUS][m_current_index_of_buffer_to_read], sizeDataFloat); + } + if (pDataCount != NULL) + { + *pDataCount = (sizeDataFloat / sizeof(float)); + } + m_current_index_of_buffer_to_read = (m_current_index_of_buffer_to_read + 1) % m_acqEasyParam.NumberOfBuffers; + m_number_of_buffer_to_read -= 1; + ret = true; + } + else + { + m_status_acquisition = STATUS_NO_DATA; +#ifdef _VC6_ + sprintf(m_status_message, "GetTransmittedData_DuoDistance:No data to read.\n"); +#else + sprintf_s(m_status_message, "GetTransmittedData_DuoDistance:No data to read.\n"); +#endif + if (m_status_event != NULL) + { + SetEvent(m_status_event); + } + } + criticalBuffer.Unlock(); + return(ret); +} +//------------------------------------------------------------------------------------------------- +bool cAcqEasy::GetTransmittedData_DuoThickness(PFLOAT pArrayThickness, PFLOAT pArrayDistance1, PFLOAT pArrayDistance2, PFLOAT pArrayCounter, + PFLOAT pArrayIntensity1, PFLOAT pArrayIntensity2, PFLOAT pArrayBaryCenter1, PFLOAT pArrayBaryCenter2, PFLOAT pArrayStatus, int* pDataCount) +{ + bool ret = false; + DWORD sizeDataFloat = 0; + DWORD sizeDataDWord = 0; + + if (pDataCount != NULL) + { + *pDataCount = 0; + } + //verify parameters + if ((m_acqEasyParam.typeAcquisition != eMCHR_GetTransmittedDataMeasurement) && (m_acqEasyParam.SensorMode == MCHR_THICKNESS_MODE)) + { + m_status_acquisition = STATUS_PARAM_ERROR; +#ifdef _VC6_ + sprintf(m_status_message, "GetTransmittedData_DuoThickness:Bad Parameters\n"); +#else + sprintf_s(m_status_message, "GetTransmittedData_DuoThickness:Bad Parameters\n"); +#endif + if (m_status_event != NULL) + { + SetEvent(m_status_event); + } + return(false); //bad call it is not the good function to call + } + if (m_acqEasyParam.TypeEvent == EV_END_MEASUREMENTS) + { + sizeDataFloat = (m_acqEasyParam.NumberOfPoints * sizeof(float)); + sizeDataDWord = (m_acqEasyParam.NumberOfPoints * sizeof(DWORD)); + } + else + { + sizeDataFloat = (m_acqEasyParam.BufferLength * sizeof(float)); + sizeDataDWord = (m_acqEasyParam.BufferLength * sizeof(DWORD)); + } + criticalBuffer.Lock(); + if (m_number_of_buffer_to_read > 0) + { + if ((pArrayThickness != NULL) && (m_acqEasyParam.EnableBufferTransmittedData.DuoThickness.Thickness == true)) + { + memcpy(pArrayThickness, m_ppAcqBuffer[ID_BUFFER_DUO_THICKNESS_THICKNESS][m_current_index_of_buffer_to_read], sizeDataFloat); + } + if ((pArrayDistance1 != NULL) && (m_acqEasyParam.EnableBufferTransmittedData.DuoThickness.Distance1 == true)) + { + memcpy(pArrayDistance1, m_ppAcqBuffer[ID_BUFFER_DUO_THICKNESS_DISTANCE1][m_current_index_of_buffer_to_read], sizeDataFloat); + } + if ((pArrayDistance2 != NULL) && (m_acqEasyParam.EnableBufferTransmittedData.DuoThickness.Distance2 == true)) + { + memcpy(pArrayDistance2, m_ppAcqBuffer[ID_BUFFER_DUO_THICKNESS_DISTANCE2][m_current_index_of_buffer_to_read], sizeDataFloat); + } + if ((pArrayCounter != NULL) && (m_acqEasyParam.EnableBufferTransmittedData.DuoThickness.Counter == true)) + { + memcpy(pArrayCounter, m_ppAcqBuffer[ID_BUFFER_DUO_THICKNESS_COUNTER][m_current_index_of_buffer_to_read], sizeDataFloat); + } + if ((pArrayIntensity1 != NULL) && (m_acqEasyParam.EnableBufferTransmittedData.DuoThickness.Intensity1 == true)) + { + memcpy(pArrayIntensity1, m_ppAcqBuffer[ID_BUFFER_DUO_THICKNESS_INTENSITY1][m_current_index_of_buffer_to_read], sizeDataFloat); + } + if ((pArrayIntensity2 != NULL) && (m_acqEasyParam.EnableBufferTransmittedData.DuoThickness.Intensity2 == true)) + { + memcpy(pArrayIntensity2, m_ppAcqBuffer[ID_BUFFER_DUO_THICKNESS_INTENSITY2][m_current_index_of_buffer_to_read], sizeDataFloat); + } + if ((pArrayBaryCenter1 != NULL) && (m_acqEasyParam.EnableBufferTransmittedData.DuoThickness.BaryCenter1 == true)) + { + memcpy(pArrayBaryCenter1, m_ppAcqBuffer[ID_BUFFER_DUO_THICKNESS_BARYCENTER1][m_current_index_of_buffer_to_read], sizeDataFloat); + } + if ((pArrayBaryCenter2 != NULL) && (m_acqEasyParam.EnableBufferTransmittedData.DuoThickness.BaryCenter2 == true)) + { + memcpy(pArrayBaryCenter2, m_ppAcqBuffer[ID_BUFFER_DUO_THICKNESS_BARYCENTER2][m_current_index_of_buffer_to_read], sizeDataFloat); + } + if ((pArrayStatus != NULL) && (m_acqEasyParam.EnableBufferTransmittedData.DuoThickness.Status == true)) + { + memcpy(pArrayStatus, m_ppAcqBuffer[ID_BUFFER_DUO_THICKNESS_STATUS][m_current_index_of_buffer_to_read], sizeDataFloat); + } + if (pDataCount != NULL) + { + *pDataCount = (sizeDataFloat / sizeof(float)); + } + m_current_index_of_buffer_to_read = (m_current_index_of_buffer_to_read + 1) % m_acqEasyParam.NumberOfBuffers; + m_number_of_buffer_to_read -= 1; + ret = true; + } + else + { + m_status_acquisition = STATUS_NO_DATA; +#ifdef _VC6_ + sprintf(m_status_message, "GetTransmittedData_DuoThickness:No data to read.\n"); +#else + sprintf_s(m_status_message, "GetTransmittedData_DuoThickness:No data to read.\n"); +#endif + if (m_status_event != NULL) + { + SetEvent(m_status_event); + } + } + criticalBuffer.Unlock(); + return(ret); +} +//------------------------------------------------------------------------------------------------- +bool cAcqEasy::GetTransmittedData_DuoSawliDistance(PFLOAT pArrayDistance, PFLOAT pArrayQuality, PFLOAT pArrayIntensity, PFLOAT pArrayCounter, PFLOAT pArrayStatus, int* pDataCount) +{ + bool ret = false; + DWORD sizeDataFloat = 0; + DWORD sizeDataDWord = 0; + + if (pDataCount != NULL) + { + *pDataCount = 0; + } + //verify parameters + if ((m_acqEasyParam.typeAcquisition != eMCHR_GetTransmittedDataMeasurement) && (m_acqEasyParam.SensorMode == MCHR_DISTANCE_MODE)) + { + m_status_acquisition = STATUS_PARAM_ERROR; +#ifdef _VC6_ + sprintf(m_status_message, "GetTransmittedData_DuoSawliDistance:Bad Parameters\n"); +#else + sprintf_s(m_status_message, "GetTransmittedData_DuoSawliDistance:Bad Parameters\n"); +#endif + if (m_status_event != NULL) + { + SetEvent(m_status_event); + } + return(false); //bad call it is not the good function to call + } + if (m_acqEasyParam.TypeEvent == EV_END_MEASUREMENTS) + { + sizeDataFloat = (m_acqEasyParam.NumberOfPoints * sizeof(float)); + sizeDataDWord = (m_acqEasyParam.NumberOfPoints * sizeof(DWORD)); + } + else + { + sizeDataFloat = (m_acqEasyParam.BufferLength * sizeof(float)); + sizeDataDWord = (m_acqEasyParam.BufferLength * sizeof(DWORD)); + } + criticalBuffer.Lock(); + if (m_number_of_buffer_to_read > 0) + { + if ((pArrayDistance != NULL) && (m_acqEasyParam.EnableBufferTransmittedData.DuoSawliDistance.Distance == true)) + { + memcpy(pArrayDistance, m_ppAcqBuffer[ID_BUFFER_DUO_SAWLI_DISTANCE_DISTANCE_MSB][m_current_index_of_buffer_to_read], sizeDataFloat); + } + if ((pArrayQuality != NULL) && (m_acqEasyParam.EnableBufferTransmittedData.DuoSawliDistance.Quality == true)) + { + memcpy(pArrayQuality, m_ppAcqBuffer[ID_BUFFER_DUO_SAWLI_DISTANCE_QUALITY][m_current_index_of_buffer_to_read], sizeDataFloat); + } + if ((pArrayIntensity != NULL) && (m_acqEasyParam.EnableBufferTransmittedData.DuoSawliDistance.Intensity == true)) + { + memcpy(pArrayIntensity, m_ppAcqBuffer[ID_BUFFER_DUO_SAWLI_DISTANCE_INTENSITY][m_current_index_of_buffer_to_read], sizeDataFloat); + } + if ((pArrayCounter != NULL) && (m_acqEasyParam.EnableBufferTransmittedData.DuoSawliDistance.Counter == true)) + { + memcpy(pArrayCounter, m_ppAcqBuffer[ID_BUFFER_DUO_SAWLI_DISTANCE_COUNTER][m_current_index_of_buffer_to_read], sizeDataFloat); + } + if ((pArrayStatus != NULL) && (m_acqEasyParam.EnableBufferTransmittedData.DuoSawliDistance.Status == true)) + { + memcpy(pArrayStatus, m_ppAcqBuffer[ID_BUFFER_DUO_SAWLI_DISTANCE_STATUS][m_current_index_of_buffer_to_read], sizeDataFloat); + } + if (pDataCount != NULL) + { + *pDataCount = (sizeDataFloat / sizeof(float)); + } + m_current_index_of_buffer_to_read = (m_current_index_of_buffer_to_read + 1) % m_acqEasyParam.NumberOfBuffers; + m_number_of_buffer_to_read -= 1; + ret = true; + } + else + { + m_status_acquisition = STATUS_NO_DATA; +#ifdef _VC6_ + sprintf(m_status_message, "GetTransmittedData_DuoSawliDistance:No data to read.\n"); +#else + sprintf_s(m_status_message, "GetTransmittedData_DuoSawliDistance:No data to read.\n"); +#endif + if (m_status_event != NULL) + { + SetEvent(m_status_event); + } + } + criticalBuffer.Unlock(); + return(ret); +} +//------------------------------------------------------------------------------------------------- +bool cAcqEasy::GetTransmittedData_DuoSawliThickness(PFLOAT pArrayThickness1, PFLOAT pArrayThickness2, PFLOAT pArrayThickness3, PFLOAT pArrayQuality1, + PFLOAT pArrayQuality2, PFLOAT pArrayQuality3, PFLOAT pArrayIntensity, PFLOAT pArrayNbThickness, + PFLOAT pArrayCounter, PFLOAT pArrayStatus, int* pDataCount) +{ + bool ret = false; + DWORD sizeDataFloat = 0; + DWORD sizeDataDWord = 0; + + if (pDataCount != NULL) + { + *pDataCount = 0; + } + //verify parameters + if ((m_acqEasyParam.typeAcquisition != eMCHR_GetTransmittedDataMeasurement) && (m_acqEasyParam.SensorMode == MCHR_THICKNESS_MODE)) + { + m_status_acquisition = STATUS_PARAM_ERROR; +#ifdef _VC6_ + sprintf(m_status_message, "GetTransmittedData_DuoSawliThickness:Bad Parameters\n"); +#else + sprintf_s(m_status_message, "GetTransmittedData_DuoSawliThickness:Bad Parameters\n"); +#endif + if (m_status_event != NULL) + { + SetEvent(m_status_event); + } + return(false); //bad call it is not the good function to call + } + if (m_acqEasyParam.TypeEvent == EV_END_MEASUREMENTS) + { + sizeDataFloat = (m_acqEasyParam.NumberOfPoints * sizeof(float)); + sizeDataDWord = (m_acqEasyParam.NumberOfPoints * sizeof(DWORD)); + } + else + { + sizeDataFloat = (m_acqEasyParam.BufferLength * sizeof(float)); + sizeDataDWord = (m_acqEasyParam.BufferLength * sizeof(DWORD)); + } + criticalBuffer.Lock(); + if (m_number_of_buffer_to_read > 0) + { + if ((pArrayThickness1 != NULL) && (m_acqEasyParam.EnableBufferTransmittedData.DuoSawliThickness.Thickness1 == true)) + { + memcpy(pArrayThickness1, m_ppAcqBuffer[ID_BUFFER_DUO_SAWLI_THICKNESS_THICKNESS1_MSB][m_current_index_of_buffer_to_read], sizeDataFloat); + } + if ((pArrayThickness2 != NULL) && (m_acqEasyParam.EnableBufferTransmittedData.DuoSawliThickness.Thickness2 == true)) + { + memcpy(pArrayThickness2, m_ppAcqBuffer[ID_BUFFER_DUO_SAWLI_THICKNESS_THICKNESS2_MSB][m_current_index_of_buffer_to_read], sizeDataFloat); + } + if ((pArrayThickness3 != NULL) && (m_acqEasyParam.EnableBufferTransmittedData.DuoSawliThickness.Thickness2 == true)) + { + memcpy(pArrayThickness3, m_ppAcqBuffer[ID_BUFFER_DUO_SAWLI_THICKNESS_THICKNESS3_MSB][m_current_index_of_buffer_to_read], sizeDataFloat); + } + if ((pArrayQuality1 != NULL) && (m_acqEasyParam.EnableBufferTransmittedData.DuoSawliThickness.Quality1 == true)) + { + memcpy(pArrayQuality1, m_ppAcqBuffer[ID_BUFFER_DUO_SAWLI_THICKNESS_QUALITY1][m_current_index_of_buffer_to_read], sizeDataFloat); + } + if ((pArrayQuality2 != NULL) && (m_acqEasyParam.EnableBufferTransmittedData.DuoSawliThickness.Quality2 == true)) + { + memcpy(pArrayQuality2, m_ppAcqBuffer[ID_BUFFER_DUO_SAWLI_THICKNESS_QUALITY2][m_current_index_of_buffer_to_read], sizeDataFloat); + } + if ((pArrayQuality3 != NULL) && (m_acqEasyParam.EnableBufferTransmittedData.DuoSawliThickness.Quality3 == true)) + { + memcpy(pArrayQuality3, m_ppAcqBuffer[ID_BUFFER_DUO_SAWLI_THICKNESS_QUALITY3][m_current_index_of_buffer_to_read], sizeDataFloat); + } + if ((pArrayIntensity != NULL) && (m_acqEasyParam.EnableBufferTransmittedData.DuoSawliThickness.Intensity == true)) + { + memcpy(pArrayIntensity, m_ppAcqBuffer[ID_BUFFER_DUO_SAWLI_THICKNESS_INTENSITY][m_current_index_of_buffer_to_read], sizeDataFloat); + } + if ((pArrayNbThickness != NULL) && (m_acqEasyParam.EnableBufferTransmittedData.DuoSawliThickness.NbThickness == true)) + { + memcpy(pArrayNbThickness, m_ppAcqBuffer[ID_BUFFER_DUO_SAWLI_THICKNESS_NB_THICKNESS][m_current_index_of_buffer_to_read], sizeDataFloat); + } + if ((pArrayCounter != NULL) && (m_acqEasyParam.EnableBufferTransmittedData.DuoSawliThickness.Counter == true)) + { + memcpy(pArrayCounter, m_ppAcqBuffer[ID_BUFFER_DUO_SAWLI_THICKNESS_COUNTER][m_current_index_of_buffer_to_read], sizeDataFloat); + } + if ((pArrayStatus != NULL) && (m_acqEasyParam.EnableBufferTransmittedData.DuoSawliThickness.Status == true)) + { + memcpy(pArrayStatus, m_ppAcqBuffer[ID_BUFFER_DUO_SAWLI_THICKNESS_STATUS][m_current_index_of_buffer_to_read], sizeDataFloat); + } + if (pDataCount != NULL) + { + *pDataCount = (sizeDataFloat / sizeof(float)); + } + m_current_index_of_buffer_to_read = (m_current_index_of_buffer_to_read + 1) % m_acqEasyParam.NumberOfBuffers; + m_number_of_buffer_to_read -= 1; + ret = true; + } + else + { + m_status_acquisition = STATUS_NO_DATA; +#ifdef _VC6_ + sprintf(m_status_message, "GetTransmittedData_DuoSawliThickness:No data to read.\n"); +#else + sprintf_s(m_status_message, "GetTransmittedData_DuoSawliThickness:No data to read.\n"); +#endif + if (m_status_event != NULL) + { + SetEvent(m_status_event); + } + } + criticalBuffer.Unlock(); + return(ret); +} +//------------------------------------------------------------------------------------------------- +bool cAcqEasy::GetInterferometricThicknessAcquisitionData(PFLOAT pArrayThickness1, PFLOAT pArrayThickness2, PFLOAT pArrayThickness3, PFLOAT pArrayQuality1, + PFLOAT pArrayQuality2, PFLOAT pArrayQuality3, PFLOAT pArrayIntensity, int* pDataCount) +{ + bool ret = false; + DWORD sizeDataFloat = 0; + DWORD sizeDataDWord = 0; + + if (pDataCount != NULL) + { + *pDataCount = 0; + } + //verify parameters + if ((m_acqEasyParam.typeAcquisition != eMCHR_GetInterferometricThickness) && (m_acqEasyParam.SensorMode == MCHR_THICKNESS_MODE)) + { + m_status_acquisition = STATUS_PARAM_ERROR; +#ifdef _VC6_ + sprintf(m_status_message, "GetInterferometricThicknessAcquisitionData:Bad Parameters\n"); +#else + sprintf_s(m_status_message, "GetInterferometricThicknessAcquisitionData:Bad Parameters\n"); +#endif + if (m_status_event != NULL) + { + SetEvent(m_status_event); + } + return(false); //bad call it is not the good function to call + } + if (m_acqEasyParam.TypeEvent == EV_END_MEASUREMENTS) + { + sizeDataFloat = (m_acqEasyParam.NumberOfPoints * sizeof(float)); + sizeDataDWord = (m_acqEasyParam.NumberOfPoints * sizeof(DWORD)); + } + else + { + sizeDataFloat = (m_acqEasyParam.BufferLength * sizeof(float)); + sizeDataDWord = (m_acqEasyParam.BufferLength * sizeof(DWORD)); + } + criticalBuffer.Lock(); + if (m_number_of_buffer_to_read > 0) + { + if ((pArrayThickness1 != NULL) && (m_acqEasyParam.EnableBufferInterferometricThickness.Thickness1 == true)) + { + memcpy(pArrayThickness1, m_ppAcqBuffer[ID_BUFFER_INTERFEROMETRIC_THICKNESS_THICKNESS1][m_current_index_of_buffer_to_read], sizeDataFloat); + } + if ((pArrayThickness2 != NULL) && (m_acqEasyParam.EnableBufferInterferometricThickness.Thickness2 == true)) + { + memcpy(pArrayThickness2, m_ppAcqBuffer[ID_BUFFER_INTERFEROMETRIC_THICKNESS_THICKNESS2][m_current_index_of_buffer_to_read], sizeDataFloat); + } + if ((pArrayThickness3 != NULL) && (m_acqEasyParam.EnableBufferInterferometricThickness.Thickness2 == true)) + { + memcpy(pArrayThickness3, m_ppAcqBuffer[ID_BUFFER_INTERFEROMETRIC_THICKNESS_THICKNESS3][m_current_index_of_buffer_to_read], sizeDataFloat); + } + if ((pArrayQuality1 != NULL) && (m_acqEasyParam.EnableBufferInterferometricThickness.Quality1 == true)) + { + memcpy(pArrayQuality1, m_ppAcqBuffer[ID_BUFFER_INTERFEROMETRIC_THICKNESS_QUALITY1][m_current_index_of_buffer_to_read], sizeDataFloat); + } + if ((pArrayQuality2 != NULL) && (m_acqEasyParam.EnableBufferInterferometricThickness.Quality2 == true)) + { + memcpy(pArrayQuality2, m_ppAcqBuffer[ID_BUFFER_INTERFEROMETRIC_THICKNESS_QUALITY2][m_current_index_of_buffer_to_read], sizeDataFloat); + } + if ((pArrayQuality3 != NULL) && (m_acqEasyParam.EnableBufferInterferometricThickness.Quality3 == true)) + { + memcpy(pArrayQuality3, m_ppAcqBuffer[ID_BUFFER_INTERFEROMETRIC_THICKNESS_QUALITY3][m_current_index_of_buffer_to_read], sizeDataFloat); + } + if ((pArrayIntensity != NULL) && (m_acqEasyParam.EnableBufferInterferometricThickness.Intensity == true)) + { + memcpy(pArrayIntensity, m_ppAcqBuffer[ID_BUFFER_INTERFEROMETRIC_THICKNESS_INTENSITY][m_current_index_of_buffer_to_read], sizeDataFloat); + } + if (pDataCount != NULL) + { + *pDataCount = (sizeDataFloat / sizeof(float)); + } + m_current_index_of_buffer_to_read = (m_current_index_of_buffer_to_read + 1) % m_acqEasyParam.NumberOfBuffers; + m_number_of_buffer_to_read -= 1; + ret = true; + } + else + { + m_status_acquisition = STATUS_NO_DATA; +#ifdef _VC6_ + sprintf(m_status_message, "GetInterferometricThicknessAcquisitionData:No data to read.\n"); +#else + sprintf_s(m_status_message, "GetInterferometricThicknessAcquisitionData:No data to read.\n"); +#endif + if (m_status_event != NULL) + { + SetEvent(m_status_event); + } + } + criticalBuffer.Unlock(); + return(ret); +} +//------------------------------------------------------------------------------------------------- +bool cAcqEasy::GetInterferometricThicknessSAWLIAcquisitionData(PFLOAT pArrayThickness1, PFLOAT pArrayThickness2, PFLOAT pArrayThickness3, PFLOAT pArrayQuality1, + PFLOAT pArrayQuality2, PFLOAT pArrayQuality3, PFLOAT pArrayIntensity, PFLOAT pArrayThickness, + PFLOAT pArrayCounter, PFLOAT pArrayStatus, int* pDataCount) +{ + bool ret = false; + DWORD sizeDataFloat = 0; + DWORD sizeDataDWord = 0; + + if (pDataCount != NULL) + { + *pDataCount = 0; + } + //verify parameters + if ((m_acqEasyParam.typeAcquisition != eMCHR_GetInterferometricThicknessSAWLI) && (m_acqEasyParam.SensorMode == MCHR_THICKNESS_MODE)) + { + m_status_acquisition = STATUS_PARAM_ERROR; +#ifdef _VC6_ + sprintf(m_status_message, "GetInterferometricThicknessSAWLIAcquisitionData:Bad Parameters\n"); +#else + sprintf_s(m_status_message, "GetInterferometricThicknessSAWLIAcquisitionData:Bad Parameters\n"); +#endif + if (m_status_event != NULL) + { + SetEvent(m_status_event); + } + return(false); //bad call it is not the good function to call + } + if (m_acqEasyParam.TypeEvent == EV_END_MEASUREMENTS) + { + sizeDataFloat = (m_acqEasyParam.NumberOfPoints * sizeof(float)); + sizeDataDWord = (m_acqEasyParam.NumberOfPoints * sizeof(DWORD)); + } + else + { + sizeDataFloat = (m_acqEasyParam.BufferLength * sizeof(float)); + sizeDataDWord = (m_acqEasyParam.BufferLength * sizeof(DWORD)); + } + criticalBuffer.Lock(); + if (m_number_of_buffer_to_read > 0) + { + if ((pArrayThickness1 != NULL) && (m_acqEasyParam.EnableBufferInterferometricThicknessSAWLI.Thickness1 == true)) + { + memcpy(pArrayThickness1, m_ppAcqBuffer[ID_BUFFER_INTERFEROMETRIC_THICKNESS_SAWLI_THICKNESS1][m_current_index_of_buffer_to_read], sizeDataFloat); + } + if ((pArrayThickness2 != NULL) && (m_acqEasyParam.EnableBufferInterferometricThicknessSAWLI.Thickness2 == true)) + { + memcpy(pArrayThickness2, m_ppAcqBuffer[ID_BUFFER_INTERFEROMETRIC_THICKNESS_SAWLI_THICKNESS2][m_current_index_of_buffer_to_read], sizeDataFloat); + } + if ((pArrayThickness3 != NULL) && (m_acqEasyParam.EnableBufferInterferometricThicknessSAWLI.Thickness2 == true)) + { + memcpy(pArrayThickness3, m_ppAcqBuffer[ID_BUFFER_INTERFEROMETRIC_THICKNESS_SAWLI_THICKNESS3][m_current_index_of_buffer_to_read], sizeDataFloat); + } + if ((pArrayQuality1 != NULL) && (m_acqEasyParam.EnableBufferInterferometricThicknessSAWLI.Quality1 == true)) + { + memcpy(pArrayQuality1, m_ppAcqBuffer[ID_BUFFER_INTERFEROMETRIC_THICKNESS_SAWLI_QUALITY1][m_current_index_of_buffer_to_read], sizeDataFloat); + } + if ((pArrayQuality2 != NULL) && (m_acqEasyParam.EnableBufferInterferometricThicknessSAWLI.Quality2 == true)) + { + memcpy(pArrayQuality2, m_ppAcqBuffer[ID_BUFFER_INTERFEROMETRIC_THICKNESS_SAWLI_QUALITY2][m_current_index_of_buffer_to_read], sizeDataFloat); + } + if ((pArrayQuality3 != NULL) && (m_acqEasyParam.EnableBufferInterferometricThicknessSAWLI.Quality3 == true)) + { + memcpy(pArrayQuality3, m_ppAcqBuffer[ID_BUFFER_INTERFEROMETRIC_THICKNESS_SAWLI_QUALITY3][m_current_index_of_buffer_to_read], sizeDataFloat); + } + if ((pArrayIntensity != NULL) && (m_acqEasyParam.EnableBufferInterferometricThicknessSAWLI.Intensity == true)) + { + memcpy(pArrayIntensity, m_ppAcqBuffer[ID_BUFFER_INTERFEROMETRIC_THICKNESS_SAWLI_INTENSITY][m_current_index_of_buffer_to_read], sizeDataFloat); + } + if ((pArrayIntensity != NULL) && (m_acqEasyParam.EnableBufferInterferometricThicknessSAWLI.Thickness == true)) + { + memcpy(pArrayThickness, m_ppAcqBuffer[ID_BUFFER_INTERFEROMETRIC_THICKNESS_SAWLI_THICKNESS][m_current_index_of_buffer_to_read], sizeDataFloat); + } + if ((pArrayCounter != NULL) && (m_acqEasyParam.EnableBufferInterferometricThicknessSAWLI.Counter == true)) + { + memcpy(pArrayCounter, m_ppAcqBuffer[ID_BUFFER_INTERFEROMETRIC_THICKNESS_SAWLI_COUNTER][m_current_index_of_buffer_to_read], sizeDataFloat); + } + if ((pArrayStatus != NULL) && (m_acqEasyParam.EnableBufferInterferometricThicknessSAWLI.Status == true)) + { + memcpy(pArrayStatus, m_ppAcqBuffer[ID_BUFFER_INTERFEROMETRIC_THICKNESS_SAWLI_STATUS][m_current_index_of_buffer_to_read], sizeDataFloat); + } + if (pDataCount != NULL) + { + *pDataCount = (sizeDataFloat / sizeof(float)); + } + m_current_index_of_buffer_to_read = (m_current_index_of_buffer_to_read + 1) % m_acqEasyParam.NumberOfBuffers; + m_number_of_buffer_to_read -= 1; + ret = true; + } + else + { + m_status_acquisition = STATUS_NO_DATA; +#ifdef _VC6_ + sprintf(m_status_message, "GetInterferometricThicknessSAWLIAcquisitionData:No data to read.\n"); +#else + sprintf_s(m_status_message, "GetInterferometricThicknessSAWLIAcquisitionData:No data to read.\n"); +#endif + if (m_status_event != NULL) + { + SetEvent(m_status_event); + } + } + criticalBuffer.Unlock(); + return(ret); +} +//------------------------------------------------------------------------------------------------- +bool cAcqEasy::GetAutoAdaptativeData(PFLOAT pArrayAutoAdaptative) +{ + bool ret = false; + DWORD sizeDataFloat = 0; + DWORD sizeDataDWord = 0; + + //verify parameters + if (m_acqEasyParam.EnableBufferAutoAdaptive == FALSE) + { + m_status_acquisition = STATUS_PARAM_ERROR; +#ifdef _VC6_ + sprintf(m_status_message, "GetAutoAdaptativeData:Bad Parameters\n"); +#else + sprintf_s(m_status_message, "GetAutoAdaptativeData:Bad Parameters\n"); +#endif + if (m_status_event != NULL) + { + SetEvent(m_status_event); + } + return(false); //bad call it is not the good function to call + } + if (m_acqEasyParam.TypeEvent == EV_END_MEASUREMENTS) + { + sizeDataFloat = (m_acqEasyParam.NumberOfPoints * sizeof(float)); + sizeDataDWord = (m_acqEasyParam.NumberOfPoints * sizeof(DWORD)); + } + else + { + sizeDataFloat = (m_acqEasyParam.BufferLength * sizeof(float)); + sizeDataDWord = (m_acqEasyParam.BufferLength * sizeof(DWORD)); + } + criticalBuffer.Lock(); + if (m_current_index_of_buffer_to_read > 0) + { + if ((pArrayAutoAdaptative != NULL) && (m_acqEasyParam.EnableBufferAutoAdaptive == true)) + { + memcpy(pArrayAutoAdaptative, m_ppAutoAdaptativeBuffer[m_current_index_of_buffer_to_read], sizeDataDWord); + } + m_current_index_of_buffer_to_read = (m_current_index_of_buffer_to_read + 1) % m_acqEasyParam.NumberOfBuffers; + m_number_of_buffer_to_read -= 1; + ret = true; + } + else + { + m_status_acquisition = STATUS_NO_DATA; +#ifdef _VC6_ + sprintf(m_status_message, "GetAutoAdaptativeData:No data to read.\n"); +#else + sprintf_s(m_status_message, "GetAutoAdaptativeData:No data to read.\n"); +#endif + if (m_status_event != NULL) + { + SetEvent(m_status_event); + } + } + criticalBuffer.Unlock(); + return(ret); +} +//------------------------------------------------------------------------------------------------- +bool cAcqEasy::_SetSensorModeAndDigitalOutput(sAcqEasyParam *pAcqEasyParam) +{ + bool ret = true; + enDigitalOutputChannel *pDigitalOutputChannel = NULL; + WORD MaxNumberOfDigitalOutput = 0; + + // verify input parameter + if (pAcqEasyParam == NULL) + { + m_status_acquisition = STATUS_PARAM_ERROR; +#ifdef _VC6_ + sprintf(m_status_message, "_ConfigureDigitalOutput:Bad Parameter (pAcqEasyParam)\n"); +#else + sprintf_s(m_status_message, "_ConfigureDigitalOutput:Bad Parameter (pAcqEasyParam)\n"); +#endif + return(false); + } + // Configure digital output format + if (MCHR_SetDigitalOutputFormat(m_chr_id, MCHR_BINARY) == MCHR_ERROR) + { + m_status_acquisition = STATUS_MCHR_FUNCTION; +#ifdef _VC6_ + sprintf(m_status_message, "_ConfigureDigitalOutput:MCHR_SetDigitalOutputFormat: Error : (0x%X)\n", MCHR_GetLastError(m_chr_id)); +#else + sprintf_s(m_status_message, "_ConfigureDigitalOutput:MCHR_SetDigitalOutputFormat: Error : (0x%X)\n", MCHR_GetLastError(m_chr_id)); +#endif + return(false); + } + if ((MCHR_GetMaxNumberOfTransmittedData(m_chr_id, &MaxNumberOfDigitalOutput) == MCHR_ERROR) || (MaxNumberOfDigitalOutput <= 0)) + { + m_status_acquisition = STATUS_MCHR_FUNCTION; +#ifdef _VC6_ + sprintf(m_status_message, "_ConfigureDigitalOutput:MCHR_GetMaxNumberOfTransmittedData: Error : (0x%X)\n", MCHR_GetLastError(m_chr_id)); +#else + sprintf_s(m_status_message, "_ConfigureDigitalOutput:MCHR_GetMaxNumberOfTransmittedData: Error : (0x%X)\n", MCHR_GetLastError(m_chr_id)); +#endif + return(false); + } + pDigitalOutputChannel = new enDigitalOutputChannel [MaxNumberOfDigitalOutput]; + memset (pDigitalOutputChannel, 0, sizeof (enDigitalOutputChannel) * (MaxNumberOfDigitalOutput)); + switch (pAcqEasyParam->SensorType) + { + case MCHR_150: + case MCHR_450: + case MCHR_XE: + case MCHR_XE_E: + if (pAcqEasyParam->EnableBufferTransmittedData.ChrDistance.BaryCenter || pAcqEasyParam->EnableBufferTransmittedData.ChrDistance.Distance || pAcqEasyParam->EnableBufferTransmittedData.ChrDistance.Intensity) + { + pAcqEasyParam->SensorMode = MCHR_DISTANCE_MODE; + if (MaxNumberOfDigitalOutput >= ID_BUFFER_CHR_DISTANCE_MEASUREMENT_MAX) + { + pDigitalOutputChannel[ID_BUFFER_CHR_DISTANCE_DISTANCE] = (pAcqEasyParam->EnableBufferTransmittedData.ChrDistance.Distance) ? MCHR_MAIN_SERIAL : MCHR_NOT_TRANSMIT; + pDigitalOutputChannel[ID_BUFFER_CHR_DISTANCE_INTENSITY] = (pAcqEasyParam->EnableBufferTransmittedData.ChrDistance.Intensity) ? MCHR_MAIN_SERIAL : MCHR_NOT_TRANSMIT; + pDigitalOutputChannel[ID_BUFFER_CHR_DISTANCE_COUNTER] = MCHR_NOT_TRANSMIT; + pDigitalOutputChannel[ID_BUFFER_CHR_DISTANCE_BARYCENTER] = (pAcqEasyParam->EnableBufferTransmittedData.ChrDistance.BaryCenter) ? MCHR_MAIN_SERIAL : MCHR_NOT_TRANSMIT; + pDigitalOutputChannel[ID_BUFFER_CHR_DISTANCE_STATUS] = MCHR_NOT_TRANSMIT; + } + else + { + m_status_acquisition = STATUS_PARAM_ERROR; +#ifdef _VC6_ + sprintf(m_status_message, "_ConfigureDigitalOutput: Bad MaxNumberOfDigitalOutput in MCHR_DISTANCE_MODE\n"); +#else + sprintf_s(m_status_message, "_ConfigureDigitalOutput: Bad MaxNumberOfDigitalOutput in MCHR_DISTANCE_MODE\n"); +#endif + ret = false; + } + } + else if (pAcqEasyParam->EnableBufferTransmittedData.ChrThickness.BaryCenter1 || pAcqEasyParam->EnableBufferTransmittedData.ChrThickness.BaryCenter2 || pAcqEasyParam->EnableBufferTransmittedData.ChrThickness.Distance1 || pAcqEasyParam->EnableBufferTransmittedData.ChrThickness.Distance2 || pAcqEasyParam->EnableBufferTransmittedData.ChrThickness.Intensity1 || pAcqEasyParam->EnableBufferTransmittedData.ChrThickness.Intensity2 || pAcqEasyParam->EnableBufferTransmittedData.ChrThickness.Thickness) + { + pAcqEasyParam->SensorMode = MCHR_THICKNESS_MODE; + if (MaxNumberOfDigitalOutput >= ID_BUFFER_CHR_THICKNESS_MEASUREMENT_MAX) + { + pDigitalOutputChannel[ID_BUFFER_CHR_THICKNESS_THICKNESS] = (pAcqEasyParam->EnableBufferTransmittedData.ChrThickness.Thickness) ? MCHR_MAIN_SERIAL : MCHR_NOT_TRANSMIT; + pDigitalOutputChannel[ID_BUFFER_CHR_THICKNESS_DISTANCE1] = (pAcqEasyParam->EnableBufferTransmittedData.ChrThickness.Distance1) ? MCHR_MAIN_SERIAL : MCHR_NOT_TRANSMIT; + pDigitalOutputChannel[ID_BUFFER_CHR_THICKNESS_DISTANCE2] = (pAcqEasyParam->EnableBufferTransmittedData.ChrThickness.Distance2) ? MCHR_MAIN_SERIAL : MCHR_NOT_TRANSMIT; + pDigitalOutputChannel[ID_BUFFER_CHR_THICKNESS_STATUS] = MCHR_NOT_TRANSMIT; + pDigitalOutputChannel[ID_BUFFER_CHR_THICKNESS_INTENSITY1] = (pAcqEasyParam->EnableBufferTransmittedData.ChrThickness.Intensity1) ? MCHR_MAIN_SERIAL : MCHR_NOT_TRANSMIT; + pDigitalOutputChannel[ID_BUFFER_CHR_THICKNESS_INTENSITY2] = (pAcqEasyParam->EnableBufferTransmittedData.ChrThickness.Intensity2) ? MCHR_MAIN_SERIAL : MCHR_NOT_TRANSMIT; + pDigitalOutputChannel[ID_BUFFER_CHR_THICKNESS_BARYCENTER1] = (pAcqEasyParam->EnableBufferTransmittedData.ChrThickness.BaryCenter1) ? MCHR_MAIN_SERIAL : MCHR_NOT_TRANSMIT; + pDigitalOutputChannel[ID_BUFFER_CHR_THICKNESS_BARYCENTER2] = (pAcqEasyParam->EnableBufferTransmittedData.ChrThickness.BaryCenter2) ? MCHR_MAIN_SERIAL : MCHR_NOT_TRANSMIT; + } + else + { + m_status_acquisition = STATUS_PARAM_ERROR; +#ifdef _VC6_ + sprintf(m_status_message, "_ConfigureDigitalOutput: Bad MaxNumberOfDigitalOutput in MCHR_THICKNESS_MODE\n"); +#else + sprintf_s(m_status_message, "_ConfigureDigitalOutput: Bad MaxNumberOfDigitalOutput in MCHR_THICKNESS_MODE\n"); +#endif + ret = false; + } + } + else + { + m_status_acquisition = STATUS_PARAM_ERROR; +#ifdef _VC6_ + sprintf(m_status_message, "_GetSensorMode : Bad Parameter (SensorType or EnableBufferTransmittedData)\n"); +#else + sprintf_s(m_status_message, "_GetSensorMode : Bad Parameter (SensorType or EnableBufferTransmittedData)\n"); +#endif + ret = false; + } + break; + case MCHR_CCS_ALPHA: + case MCHR_CCS_OPTIMA: + case MCHR_CCS_PRIMA: + case MCHR_CCS_ULTIMA: + if (pAcqEasyParam->EnableBufferTransmittedData.CcsDistance.AutoAdaptativeModeData || pAcqEasyParam->EnableBufferTransmittedData.CcsDistance.BaryCenter || pAcqEasyParam->EnableBufferTransmittedData.CcsDistance.Counter || pAcqEasyParam->EnableBufferTransmittedData.CcsDistance.Distance || pAcqEasyParam->EnableBufferTransmittedData.CcsDistance.Encoder1 || pAcqEasyParam->EnableBufferTransmittedData.CcsDistance.Encoder2 || pAcqEasyParam->EnableBufferTransmittedData.CcsDistance.Encoder3 || pAcqEasyParam->EnableBufferTransmittedData.CcsDistance.Intensity || pAcqEasyParam->EnableBufferTransmittedData.CcsDistance.Status) + { + pAcqEasyParam->SensorMode = MCHR_DISTANCE_MODE; + if (MaxNumberOfDigitalOutput >= ID_BUFFER_CCS_DISTANCE_MEASUREMENT_MAX) + { + pDigitalOutputChannel[ID_BUFFER_CCS_DISTANCE_DISTANCE_MSB] = (pAcqEasyParam->EnableBufferTransmittedData.CcsDistance.Distance) ? MCHR_USB : MCHR_NOT_TRANSMIT; + pDigitalOutputChannel[ID_BUFFER_CCS_DISTANCE_DISTANCE_LSB] = (pAcqEasyParam->EnableBufferTransmittedData.CcsDistance.Distance) ? MCHR_USB : MCHR_NOT_TRANSMIT; + pDigitalOutputChannel[ID_BUFFER_CCS_DISTANCE_AUTO_ADAPTATIVE_MODE] = (pAcqEasyParam->EnableBufferTransmittedData.CcsDistance.AutoAdaptativeModeData) ? MCHR_USB : MCHR_NOT_TRANSMIT; + pDigitalOutputChannel[ID_BUFFER_CCS_DISTANCE_INTENSITY] = (pAcqEasyParam->EnableBufferTransmittedData.CcsDistance.Intensity) ? MCHR_USB : MCHR_NOT_TRANSMIT; + pDigitalOutputChannel[ID_BUFFER_CCS_DISTANCE_BARYCENTER] = (pAcqEasyParam->EnableBufferTransmittedData.CcsDistance.BaryCenter) ? MCHR_USB : MCHR_NOT_TRANSMIT; + pDigitalOutputChannel[ID_BUFFER_CCS_DISTANCE_STATUS] = (pAcqEasyParam->EnableBufferTransmittedData.CcsDistance.Status) ? MCHR_USB : MCHR_NOT_TRANSMIT; + pDigitalOutputChannel[ID_BUFFER_CCS_DISTANCE_COUNTER] = (pAcqEasyParam->EnableBufferTransmittedData.CcsDistance.Counter) ? MCHR_USB : MCHR_NOT_TRANSMIT; + pDigitalOutputChannel[ID_BUFFER_CCS_DISTANCE_ENCODER1_MSB] = (pAcqEasyParam->EnableBufferTransmittedData.CcsDistance.Encoder1) ? MCHR_USB : MCHR_NOT_TRANSMIT; + pDigitalOutputChannel[ID_BUFFER_CCS_DISTANCE_ENCODER1_LSB] = (pAcqEasyParam->EnableBufferTransmittedData.CcsDistance.Encoder1) ? MCHR_USB : MCHR_NOT_TRANSMIT; + pDigitalOutputChannel[ID_BUFFER_CCS_DISTANCE_ENCODER2_MSB] = (pAcqEasyParam->EnableBufferTransmittedData.CcsDistance.Encoder2) ? MCHR_USB : MCHR_NOT_TRANSMIT; + pDigitalOutputChannel[ID_BUFFER_CCS_DISTANCE_ENCODER2_LSB] = (pAcqEasyParam->EnableBufferTransmittedData.CcsDistance.Encoder2) ? MCHR_USB : MCHR_NOT_TRANSMIT; + pDigitalOutputChannel[ID_BUFFER_CCS_DISTANCE_ENCODER3_MSB] = (pAcqEasyParam->EnableBufferTransmittedData.CcsDistance.Encoder3) ? MCHR_USB : MCHR_NOT_TRANSMIT; + pDigitalOutputChannel[ID_BUFFER_CCS_DISTANCE_ENCODER3_LSB] = (pAcqEasyParam->EnableBufferTransmittedData.CcsDistance.Encoder3) ? MCHR_USB : MCHR_NOT_TRANSMIT; + } + else + { + m_status_acquisition = STATUS_PARAM_ERROR; +#ifdef _VC6_ + sprintf(m_status_message, "_ConfigureDigitalOutput: Bad MaxNumberOfDigitalOutput in MCHR_DISTANCE_MODE\n"); +#else + sprintf_s(m_status_message, "_ConfigureDigitalOutput: Bad MaxNumberOfDigitalOutput in MCHR_DISTANCE_MODE\n"); +#endif + ret = false; + } + } + else if (pAcqEasyParam->EnableBufferTransmittedData.CcsThickness.AutoAdaptativeModeData || pAcqEasyParam->EnableBufferTransmittedData.CcsThickness.BaryCenter1 || pAcqEasyParam->EnableBufferTransmittedData.CcsThickness.BaryCenter2 || pAcqEasyParam->EnableBufferTransmittedData.CcsThickness.Counter || pAcqEasyParam->EnableBufferTransmittedData.CcsThickness.Distance1 || pAcqEasyParam->EnableBufferTransmittedData.CcsThickness.Distance2 || pAcqEasyParam->EnableBufferTransmittedData.CcsThickness.Encoder1 || pAcqEasyParam->EnableBufferTransmittedData.CcsThickness.Encoder2 || pAcqEasyParam->EnableBufferTransmittedData.CcsThickness.Encoder3 || pAcqEasyParam->EnableBufferTransmittedData.CcsThickness.Intensity1) + { + pAcqEasyParam->SensorMode = MCHR_THICKNESS_MODE; + if (MaxNumberOfDigitalOutput >= ID_BUFFER_CCS_THICKNESS_MEASUREMENT_MAX) + { + pDigitalOutputChannel[ID_BUFFER_CCS_THICKNESS_THICKNESS] = (pAcqEasyParam->EnableBufferTransmittedData.CcsThickness.Thickness) ? MCHR_USB : MCHR_NOT_TRANSMIT; + pDigitalOutputChannel[ID_BUFFER_CCS_THICKNESS_DISTANCE1] = (pAcqEasyParam->EnableBufferTransmittedData.CcsThickness.Distance1) ? MCHR_USB : MCHR_NOT_TRANSMIT; + pDigitalOutputChannel[ID_BUFFER_CCS_THICKNESS_DISTANCE2] = (pAcqEasyParam->EnableBufferTransmittedData.CcsThickness.Distance2) ? MCHR_USB : MCHR_NOT_TRANSMIT; + pDigitalOutputChannel[ID_BUFFER_CCS_THICKNESS_AUTO_ADAPTATIVE_MODE] = (pAcqEasyParam->EnableBufferTransmittedData.CcsThickness.AutoAdaptativeModeData) ? MCHR_USB : MCHR_NOT_TRANSMIT; + pDigitalOutputChannel[ID_BUFFER_CCS_THICKNESS_INTENSITY1] = (pAcqEasyParam->EnableBufferTransmittedData.CcsThickness.Intensity1) ? MCHR_USB : MCHR_NOT_TRANSMIT; + pDigitalOutputChannel[ID_BUFFER_CCS_THICKNESS_INTENSITY2] = (pAcqEasyParam->EnableBufferTransmittedData.CcsThickness.Intensity2) ? MCHR_USB : MCHR_NOT_TRANSMIT; + pDigitalOutputChannel[ID_BUFFER_CCS_THICKNESS_BARYCENTER1] = (pAcqEasyParam->EnableBufferTransmittedData.CcsThickness.BaryCenter1) ? MCHR_USB : MCHR_NOT_TRANSMIT; + pDigitalOutputChannel[ID_BUFFER_CCS_THICKNESS_BARYCENTER2] = (pAcqEasyParam->EnableBufferTransmittedData.CcsThickness.BaryCenter2) ? MCHR_USB : MCHR_NOT_TRANSMIT; + pDigitalOutputChannel[ID_BUFFER_CCS_THICKNESS_STATUS] = (pAcqEasyParam->EnableBufferTransmittedData.CcsThickness.Status) ? MCHR_USB : MCHR_NOT_TRANSMIT; + pDigitalOutputChannel[ID_BUFFER_CCS_THICKNESS_COUNTER] = (pAcqEasyParam->EnableBufferTransmittedData.CcsThickness.Counter) ? MCHR_USB : MCHR_NOT_TRANSMIT; + pDigitalOutputChannel[ID_BUFFER_CCS_THICKNESS_ENCODER1_MSB] = (pAcqEasyParam->EnableBufferTransmittedData.CcsThickness.Encoder1) ? MCHR_USB : MCHR_NOT_TRANSMIT; + pDigitalOutputChannel[ID_BUFFER_CCS_THICKNESS_ENCODER1_LSB] = (pAcqEasyParam->EnableBufferTransmittedData.CcsThickness.Encoder1) ? MCHR_USB : MCHR_NOT_TRANSMIT; + pDigitalOutputChannel[ID_BUFFER_CCS_THICKNESS_ENCODER2_MSB] = (pAcqEasyParam->EnableBufferTransmittedData.CcsThickness.Encoder2) ? MCHR_USB : MCHR_NOT_TRANSMIT; + pDigitalOutputChannel[ID_BUFFER_CCS_THICKNESS_ENCODER2_LSB] = (pAcqEasyParam->EnableBufferTransmittedData.CcsThickness.Encoder2) ? MCHR_USB : MCHR_NOT_TRANSMIT; + pDigitalOutputChannel[ID_BUFFER_CCS_THICKNESS_ENCODER3_MSB] = (pAcqEasyParam->EnableBufferTransmittedData.CcsThickness.Encoder3) ? MCHR_USB : MCHR_NOT_TRANSMIT; + pDigitalOutputChannel[ID_BUFFER_CCS_THICKNESS_ENCODER3_LSB] = (pAcqEasyParam->EnableBufferTransmittedData.CcsThickness.Encoder3) ? MCHR_USB : MCHR_NOT_TRANSMIT; + } + else + { + m_status_acquisition = STATUS_PARAM_ERROR; +#ifdef _VC6_ + sprintf(m_status_message, "_ConfigureDigitalOutput: Bad MaxNumberOfDigitalOutput in MCHR_THICKNESS_MODE\n"); +#else + sprintf_s(m_status_message, "_ConfigureDigitalOutput: Bad MaxNumberOfDigitalOutput in MCHR_THICKNESS_MODE\n"); +#endif + ret = false; + } + } + else + { + m_status_acquisition = STATUS_PARAM_ERROR; +#ifdef _VC6_ + sprintf(m_status_message, "_GetSensorMode : Bad Parameter (SensorType or EnableBufferTransmittedData)\n"); +#else + sprintf_s(m_status_message, "_GetSensorMode : Bad Parameter (SensorType or EnableBufferTransmittedData)\n"); +#endif + ret = false; + } + break; + case MCHR_RUBY: + case MCHR_DUO: + if (pAcqEasyParam->EnableBufferTransmittedData.DuoDistance.BaryCenter || pAcqEasyParam->EnableBufferTransmittedData.DuoDistance.Counter || pAcqEasyParam->EnableBufferTransmittedData.DuoDistance.Distance || pAcqEasyParam->EnableBufferTransmittedData.DuoDistance.Intensity || pAcqEasyParam->EnableBufferTransmittedData.DuoDistance.Status) + { + pAcqEasyParam->SensorMode = MCHR_DISTANCE_MODE; + if (MaxNumberOfDigitalOutput >= ID_BUFFER_DUO_DISTANCE_MEASUREMENT_MAX) + { + pDigitalOutputChannel[ID_BUFFER_DUO_DISTANCE_DISTANCE_MSB] = (pAcqEasyParam->EnableBufferTransmittedData.DuoDistance.Distance) ? MCHR_ETHERNET : MCHR_NOT_TRANSMIT; + pDigitalOutputChannel[ID_BUFFER_DUO_DISTANCE_DISTANCE_LSB] = (pAcqEasyParam->EnableBufferTransmittedData.DuoDistance.Distance) ? MCHR_ETHERNET : MCHR_NOT_TRANSMIT; + pDigitalOutputChannel[ID_BUFFER_DUO_DISTANCE_INTENSITY] = (pAcqEasyParam->EnableBufferTransmittedData.DuoDistance.Intensity) ? MCHR_ETHERNET : MCHR_NOT_TRANSMIT; + pDigitalOutputChannel[ID_BUFFER_DUO_DISTANCE_COUNTER] = (pAcqEasyParam->EnableBufferTransmittedData.DuoDistance.Counter) ? MCHR_ETHERNET : MCHR_NOT_TRANSMIT; + pDigitalOutputChannel[ID_BUFFER_DUO_DISTANCE_BARYCENTER] = (pAcqEasyParam->EnableBufferTransmittedData.DuoDistance.BaryCenter) ? MCHR_ETHERNET : MCHR_NOT_TRANSMIT; + pDigitalOutputChannel[ID_BUFFER_DUO_DISTANCE_STATUS] = (pAcqEasyParam->EnableBufferTransmittedData.DuoDistance.Status) ? MCHR_ETHERNET : MCHR_NOT_TRANSMIT; + } + else + { + m_status_acquisition = STATUS_PARAM_ERROR; +#ifdef _VC6_ + sprintf(m_status_message, "_ConfigureDigitalOutput: Bad MaxNumberOfDigitalOutput in MCHR_DISTANCE_MODE\n"); +#else + sprintf_s(m_status_message, "_ConfigureDigitalOutput: Bad MaxNumberOfDigitalOutput in MCHR_DISTANCE_MODE\n"); +#endif + ret = false; + } + } + else if (pAcqEasyParam->EnableBufferTransmittedData.DuoThickness.BaryCenter1 || pAcqEasyParam->EnableBufferTransmittedData.DuoThickness.BaryCenter2 || pAcqEasyParam->EnableBufferTransmittedData.DuoThickness.Counter || pAcqEasyParam->EnableBufferTransmittedData.DuoThickness.Distance1 || pAcqEasyParam->EnableBufferTransmittedData.DuoThickness.Distance2 || pAcqEasyParam->EnableBufferTransmittedData.DuoThickness.Intensity1 || pAcqEasyParam->EnableBufferTransmittedData.DuoThickness.Intensity2 || pAcqEasyParam->EnableBufferTransmittedData.DuoThickness.Status || pAcqEasyParam->EnableBufferTransmittedData.DuoThickness.Thickness) + { + pAcqEasyParam->SensorMode = MCHR_THICKNESS_MODE; + if (MaxNumberOfDigitalOutput >= ID_BUFFER_DUO_THICKNESS_MEASUREMENT_MAX) + { + pDigitalOutputChannel[ID_BUFFER_DUO_THICKNESS_THICKNESS] = (pAcqEasyParam->EnableBufferTransmittedData.DuoThickness.Thickness) ? MCHR_ETHERNET : MCHR_NOT_TRANSMIT; + pDigitalOutputChannel[ID_BUFFER_DUO_THICKNESS_DISTANCE1] = (pAcqEasyParam->EnableBufferTransmittedData.DuoThickness.Distance1) ? MCHR_ETHERNET : MCHR_NOT_TRANSMIT; + pDigitalOutputChannel[ID_BUFFER_DUO_THICKNESS_DISTANCE2] = (pAcqEasyParam->EnableBufferTransmittedData.DuoThickness.Distance2) ? MCHR_ETHERNET : MCHR_NOT_TRANSMIT; + pDigitalOutputChannel[ID_BUFFER_DUO_THICKNESS_COUNTER] = (pAcqEasyParam->EnableBufferTransmittedData.DuoThickness.Counter) ? MCHR_ETHERNET : MCHR_NOT_TRANSMIT; + pDigitalOutputChannel[ID_BUFFER_DUO_THICKNESS_INTENSITY1] = (pAcqEasyParam->EnableBufferTransmittedData.DuoThickness.Intensity1) ? MCHR_ETHERNET : MCHR_NOT_TRANSMIT; + pDigitalOutputChannel[ID_BUFFER_DUO_THICKNESS_INTENSITY2] = (pAcqEasyParam->EnableBufferTransmittedData.DuoThickness.Intensity2) ? MCHR_ETHERNET : MCHR_NOT_TRANSMIT; + pDigitalOutputChannel[ID_BUFFER_DUO_THICKNESS_BARYCENTER1] = (pAcqEasyParam->EnableBufferTransmittedData.DuoThickness.BaryCenter1) ? MCHR_ETHERNET : MCHR_NOT_TRANSMIT; + pDigitalOutputChannel[ID_BUFFER_DUO_THICKNESS_BARYCENTER2] = (pAcqEasyParam->EnableBufferTransmittedData.DuoThickness.BaryCenter2) ? MCHR_ETHERNET : MCHR_NOT_TRANSMIT; + pDigitalOutputChannel[ID_BUFFER_DUO_THICKNESS_STATUS] = (pAcqEasyParam->EnableBufferTransmittedData.DuoThickness.Status) ? MCHR_ETHERNET : MCHR_NOT_TRANSMIT; + } + else + { + m_status_acquisition = STATUS_PARAM_ERROR; +#ifdef _VC6_ + sprintf(m_status_message, "_ConfigureDigitalOutput: Bad MaxNumberOfDigitalOutput in MCHR_THICKNESS_MODE\n"); +#else + sprintf_s(m_status_message, "_ConfigureDigitalOutput: Bad MaxNumberOfDigitalOutput in MCHR_THICKNESS_MODE\n"); +#endif + ret = false; + } + } + else if (pAcqEasyParam->EnableBufferTransmittedData.DuoSawliDistance.Counter || pAcqEasyParam->EnableBufferTransmittedData.DuoSawliDistance.Distance || pAcqEasyParam->EnableBufferTransmittedData.DuoSawliDistance.Intensity || pAcqEasyParam->EnableBufferTransmittedData.DuoSawliDistance.Intensity || pAcqEasyParam->EnableBufferTransmittedData.DuoSawliDistance.Quality || pAcqEasyParam->EnableBufferTransmittedData.DuoSawliDistance.Status) + { + pAcqEasyParam->SensorMode = MCHR_SAWLI_DISTANCE_MODE; + if (MaxNumberOfDigitalOutput >= ID_BUFFER_DUO_SAWLI_DISTANCE_MEASUREMENT_MAX) + { + pDigitalOutputChannel[ID_BUFFER_DUO_SAWLI_DISTANCE_DISTANCE_MSB] = (pAcqEasyParam->EnableBufferTransmittedData.DuoSawliDistance.Distance) ? MCHR_ETHERNET : MCHR_NOT_TRANSMIT; + pDigitalOutputChannel[ID_BUFFER_DUO_SAWLI_DISTANCE_DISTANCE_LSB] = (pAcqEasyParam->EnableBufferTransmittedData.DuoSawliDistance.Distance) ? MCHR_ETHERNET : MCHR_NOT_TRANSMIT; + pDigitalOutputChannel[ID_BUFFER_DUO_SAWLI_DISTANCE_QUALITY] = (pAcqEasyParam->EnableBufferTransmittedData.DuoSawliDistance.Quality) ? MCHR_ETHERNET : MCHR_NOT_TRANSMIT; + pDigitalOutputChannel[ID_BUFFER_DUO_SAWLI_DISTANCE_INTENSITY] = (pAcqEasyParam->EnableBufferTransmittedData.DuoSawliDistance.Intensity) ? MCHR_ETHERNET : MCHR_NOT_TRANSMIT; + pDigitalOutputChannel[ID_BUFFER_DUO_SAWLI_DISTANCE_COUNTER] = (pAcqEasyParam->EnableBufferTransmittedData.DuoSawliDistance.Counter) ? MCHR_ETHERNET : MCHR_NOT_TRANSMIT; + pDigitalOutputChannel[ID_BUFFER_DUO_SAWLI_DISTANCE_STATUS] = (pAcqEasyParam->EnableBufferTransmittedData.DuoSawliDistance.Status) ? MCHR_ETHERNET : MCHR_NOT_TRANSMIT; + } + else + { + m_status_acquisition = STATUS_PARAM_ERROR; +#ifdef _VC6_ + sprintf(m_status_message, "_ConfigureDigitalOutput: Bad MaxNumberOfDigitalOutput in MCHR_SAWLI_DISTANCE_MODE\n"); +#else + sprintf_s(m_status_message, "_ConfigureDigitalOutput: Bad MaxNumberOfDigitalOutput in MCHR_SAWLI_DISTANCE_MODE\n"); +#endif + ret = false; + } + } + else if (pAcqEasyParam->EnableBufferTransmittedData.DuoSawliThickness.Counter || pAcqEasyParam->EnableBufferTransmittedData.DuoSawliThickness.Intensity || pAcqEasyParam->EnableBufferTransmittedData.DuoSawliThickness.NbThickness || pAcqEasyParam->EnableBufferTransmittedData.DuoSawliThickness.Quality1 || pAcqEasyParam->EnableBufferTransmittedData.DuoSawliThickness.Quality2 || pAcqEasyParam->EnableBufferTransmittedData.DuoSawliThickness.Quality3 || pAcqEasyParam->EnableBufferTransmittedData.DuoSawliThickness.Status || pAcqEasyParam->EnableBufferTransmittedData.DuoSawliThickness.Thickness1 || pAcqEasyParam->EnableBufferTransmittedData.DuoSawliThickness.Thickness2 || pAcqEasyParam->EnableBufferTransmittedData.DuoSawliThickness.Thickness3) + { + pAcqEasyParam->SensorMode = MCHR_SAWLI_THICKNESS_MODE; + if (MaxNumberOfDigitalOutput >= ID_BUFFER_DUO_SAWLI_THICKNESS_MEASUREMENT_MAX) + { + pDigitalOutputChannel[ID_BUFFER_DUO_SAWLI_THICKNESS_THICKNESS1_MSB] = (pAcqEasyParam->EnableBufferTransmittedData.DuoSawliThickness.Thickness1) ? MCHR_ETHERNET : MCHR_NOT_TRANSMIT; + pDigitalOutputChannel[ID_BUFFER_DUO_SAWLI_THICKNESS_THICKNESS1_LSB] = (pAcqEasyParam->EnableBufferTransmittedData.DuoSawliThickness.Thickness1) ? MCHR_ETHERNET : MCHR_NOT_TRANSMIT; + pDigitalOutputChannel[ID_BUFFER_DUO_SAWLI_THICKNESS_THICKNESS2_MSB] = (pAcqEasyParam->EnableBufferTransmittedData.DuoSawliThickness.Thickness2) ? MCHR_ETHERNET : MCHR_NOT_TRANSMIT; + pDigitalOutputChannel[ID_BUFFER_DUO_SAWLI_THICKNESS_THICKNESS2_LSB] = (pAcqEasyParam->EnableBufferTransmittedData.DuoSawliThickness.Thickness2) ? MCHR_ETHERNET : MCHR_NOT_TRANSMIT; + pDigitalOutputChannel[ID_BUFFER_DUO_SAWLI_THICKNESS_THICKNESS3_MSB] = (pAcqEasyParam->EnableBufferTransmittedData.DuoSawliThickness.Thickness3) ? MCHR_ETHERNET : MCHR_NOT_TRANSMIT; + pDigitalOutputChannel[ID_BUFFER_DUO_SAWLI_THICKNESS_THICKNESS3_LSB] = (pAcqEasyParam->EnableBufferTransmittedData.DuoSawliThickness.Thickness3) ? MCHR_ETHERNET : MCHR_NOT_TRANSMIT; + pDigitalOutputChannel[ID_BUFFER_DUO_SAWLI_THICKNESS_QUALITY1] = (pAcqEasyParam->EnableBufferTransmittedData.DuoSawliThickness.Quality1) ? MCHR_ETHERNET : MCHR_NOT_TRANSMIT; + pDigitalOutputChannel[ID_BUFFER_DUO_SAWLI_THICKNESS_QUALITY2] = (pAcqEasyParam->EnableBufferTransmittedData.DuoSawliThickness.Quality2) ? MCHR_ETHERNET : MCHR_NOT_TRANSMIT; + pDigitalOutputChannel[ID_BUFFER_DUO_SAWLI_THICKNESS_QUALITY3] = (pAcqEasyParam->EnableBufferTransmittedData.DuoSawliThickness.Quality3) ? MCHR_ETHERNET : MCHR_NOT_TRANSMIT; + pDigitalOutputChannel[ID_BUFFER_DUO_SAWLI_THICKNESS_INTENSITY] = (pAcqEasyParam->EnableBufferTransmittedData.DuoSawliThickness.Intensity) ? MCHR_ETHERNET : MCHR_NOT_TRANSMIT; + pDigitalOutputChannel[ID_BUFFER_DUO_SAWLI_THICKNESS_NB_THICKNESS] = (pAcqEasyParam->EnableBufferTransmittedData.DuoSawliThickness.NbThickness) ? MCHR_ETHERNET : MCHR_NOT_TRANSMIT; + pDigitalOutputChannel[ID_BUFFER_DUO_SAWLI_THICKNESS_COUNTER] = (pAcqEasyParam->EnableBufferTransmittedData.DuoSawliThickness.Counter) ? MCHR_ETHERNET : MCHR_NOT_TRANSMIT; + pDigitalOutputChannel[ID_BUFFER_DUO_SAWLI_THICKNESS_STATUS] = (pAcqEasyParam->EnableBufferTransmittedData.DuoSawliThickness.Status) ? MCHR_ETHERNET : MCHR_NOT_TRANSMIT; + } + else + { + m_status_acquisition = STATUS_PARAM_ERROR; +#ifdef _VC6_ + sprintf(m_status_message, "_ConfigureDigitalOutput: Bad MaxNumberOfDigitalOutput in MCHR_SAWLI_THICKNESS_MODE\n"); +#else + sprintf_s(m_status_message, "_ConfigureDigitalOutput: Bad MaxNumberOfDigitalOutput in MCHR_SAWLI_THICKNESS_MODE\n"); +#endif + ret = false; + } + } + else + { + m_status_acquisition = STATUS_PARAM_ERROR; +#ifdef _VC6_ + sprintf(m_status_message, "_GetSensorMode : Bad Parameter (SensorType or EnableBufferTransmittedData)\n"); +#else + sprintf_s(m_status_message, "_GetSensorMode : Bad Parameter (SensorType or EnableBufferTransmittedData)\n"); +#endif + ret = false; + } + break; + default : + m_status_acquisition = STATUS_PARAM_ERROR; +#ifdef _VC6_ + sprintf(m_status_message, "_GetSensorMode : Bad Parameter (SensorType)\n"); +#else + sprintf_s(m_status_message, "_GetSensorMode : Bad Parameter (SensorType)\n"); +#endif + ret = false; + break; + } + //set sensor mode + if (ret) + { + if (MCHR_SetMeasureMode (m_chr_id, pAcqEasyParam->SensorMode) == MCHR_ERROR) + { + m_status_acquisition = STATUS_MCHR_FUNCTION; +#ifdef _VC6_ + sprintf(m_status_message, "_ConfigureSensorMode:MCHR_SetMeasureMode: Error : (0x%X)\n", MCHR_GetLastError(m_chr_id)); +#else + sprintf_s(m_status_message, "_ConfigureSensorMode:MCHR_SetMeasureMode: Error : (0x%X)\n", MCHR_GetLastError(m_chr_id)); +#endif + ret = false; + } + } + //set digital output + if (ret) + { + if (MCHR_SetTransmittedDigitalOutput(m_chr_id, pDigitalOutputChannel) == MCHR_ERROR) + { + m_status_acquisition = STATUS_MCHR_FUNCTION; +#ifdef _VC6_ + sprintf(m_status_message, "_ConfigureSensorMode:MCHR_SetTransmittedDigitalOutput: Error : (0x%X)\n", MCHR_GetLastError(m_chr_id)); +#else + sprintf_s(m_status_message, "_ConfigureSensorMode:MCHR_SetTransmittedDigitalOutput: Error : (0x%X)\n", MCHR_GetLastError(m_chr_id)); +#endif + ret = false; + } + } + if (pDigitalOutputChannel != NULL) + { + delete[] pDigitalOutputChannel; + pDigitalOutputChannel = NULL; + } + return(ret); +} +//------------------------------------------------------------------------------------------------- +bool cAcqEasy::StartAcquisition(sAcqEasyParam acqEasyParam) +{ + int idx = 0, jdx = 0; + bool ret = true; + UNREFERENCED_PARAMETER(idx); + UNREFERENCED_PARAMETER(jdx); + //bad parameters + if ((acqEasyParam.NumberOfBuffers <= 0) || (acqEasyParam.BufferLength <= 0)) + { + m_status_acquisition = STATUS_PARAM_ERROR; + sprintf_s(m_status_message, "StartAcquisition:Bad Parameters\n"); + if (m_status_event != NULL) + { + SetEvent(m_status_event); + } + return(false); + } + //verify frequency + if (acqEasyParam.Frequency == 0) + { + m_status_acquisition = STATUS_PARAM_ERROR; + sprintf_s(m_status_message, "StartAcquisition:The frequency must be greater than zero\n"); + if (m_status_event != NULL) + { + SetEvent(m_status_event); + } + return(false); + } + //Already starting ? + if (m_IsDataAcquisitionStarting) + { + StopAcquisition(); + } + //starting + criticalBuffer.Lock(); + memcpy(&m_acqEasyParam, &acqEasyParam, sizeof(sAcqEasyParam)); + ZeroMemory(&m_acqParam, sizeof(MCHR_tyAcqParam)); + m_acqParam.NumberOfBuffers = m_acqEasyParam.NumberOfBuffers; + m_acqParam.BufferLength = m_acqEasyParam.BufferLength; + m_acqParam.NumberPointsTRE = m_acqEasyParam.NumberPointsTRE; + m_acqParam.TriggerFlag = m_acqEasyParam.Trigger.Enable; + m_acqParam.TriggerType = m_acqEasyParam.Trigger.Type; + m_acqParam.HighLevelOrRisingEdgeActivated = m_acqEasyParam.Trigger.Level; + m_acqParam.NumberOfPoints = m_acqEasyParam.NumberOfPoints; + switch(m_acqEasyParam.TypeEvent) + { + case EV_ACQUIRE_N_POINTS: //EV_ACQUIRE_N_POINTS + m_acqParam.EventEndBuffer = m_OnEventAcquisition[EVENT_ACQUIRE_N_POINTS]; + break; + case EV_END_MEASUREMENTS: //EV_END_MEASUREMENTS + m_acqParam.EventEndMeasurement = m_OnEventAcquisition[EVENT_END_MEASUREMENT]; + break; + case EV_END_ACQUIRE: //EV_END_ACQUIRE + m_acqParam.EventEndAcquire = m_OnEventAcquisition[EVENT_END_ACQUIRE]; + break; + default : //EV_END_BUFFER + m_acqParam.EventEndBuffer = m_OnEventAcquisition[EVENT_END_BUFFER]; + break; + } + _CreateAcqBuffer( m_acqParam.NumberOfBuffers, m_acqEasyParam.BufferLength); + //encoder settings + if ((m_acqEasyParam.EnableBufferEncoder.Encoder1) || (m_acqEasyParam.EnableBufferEncoder.Encoder2) || (m_acqEasyParam.EnableBufferEncoder.Encoder3)) + { + //encoder buffer initialization + ret = (MCHR_SetEncoderBuffer (m_chr_id, (m_acqEasyParam.EnableBufferEncoder.Encoder1) ? m_ppEncoderBuffer[ID_BUFFER_ENCODER_1] : NULL, + (m_acqEasyParam.EnableBufferEncoder.Encoder2) ? m_ppEncoderBuffer[ID_BUFFER_ENCODER_2] : NULL, + (m_acqEasyParam.EnableBufferEncoder.Encoder3) ? m_ppEncoderBuffer[ID_BUFFER_ENCODER_3] : NULL) != MCHR_ERROR); + if (!ret) + { + m_status_acquisition = STATUS_MCHR_FUNCTION; + sprintf_s(m_status_message, "StartAcquisition:MCHR_SetEncoderBuffer: Error : (0x%X)\n", MCHR_GetLastError(m_chr_id)); + } + } + if (ret) + { + //auto adaptative settings + if (m_acqEasyParam.EnableBufferAutoAdaptive) + { + //auto adaptative buffer initialization + ret = (MCHR_SetAutoAdaptiveBuffer (m_chr_id, (m_acqEasyParam.EnableBufferAutoAdaptive) ? m_ppAutoAdaptativeBuffer : NULL) != MCHR_ERROR); + if (!ret) + { + m_status_acquisition = STATUS_MCHR_FUNCTION; + sprintf_s(m_status_message, "StartAcquisition:MCHR_SetAutoAdaptiveBuffer: Error : (0x%X)\n", MCHR_GetLastError(m_chr_id)); + } + } + } + if (ret) + { + //acquisition settings + switch(m_acqEasyParam.typeAcquisition) + { + //MCHR_GetThicknessMeasurement + case eMCHR_GetThicknessMeasurement : + ret = (MCHR_GetThicknessMeasurement (m_chr_id, m_acqParam, + (m_acqEasyParam.EnableBufferThickness.Thickness) ? m_ppAcqBuffer[ID_BUFFER_THICKNESS_THICKNESS] : NULL, + (m_acqEasyParam.EnableBufferThickness.Distance1) ? m_ppAcqBuffer[ID_BUFFER_THICKNESS_DISTANCE1] : NULL, + (m_acqEasyParam.EnableBufferThickness.Intensity1) ? m_ppAcqBuffer[ID_BUFFER_THICKNESS_INTENSITY1] : NULL, + (m_acqEasyParam.EnableBufferThickness.BaryCenter1) ? m_ppAcqBuffer[ID_BUFFER_THICKNESS_BARYCENTER1] : NULL, + (m_acqEasyParam.EnableBufferThickness.Distance2) ? m_ppAcqBuffer[ID_BUFFER_THICKNESS_DISTANCE2] : NULL, + (m_acqEasyParam.EnableBufferThickness.Intensity2) ? m_ppAcqBuffer[ID_BUFFER_THICKNESS_INTENSITY2] : NULL, + (m_acqEasyParam.EnableBufferThickness.BaryCenter2) ? m_ppAcqBuffer[ID_BUFFER_THICKNESS_BARYCENTER2] : NULL, + (m_acqEasyParam.EnableBufferThickness.Status) ? m_ppAcqBuffer[ID_BUFFER_THICKNESS_STATUS] : NULL, + (m_acqEasyParam.EnableBufferThickness.Counter) ? m_ppAcqBuffer[ID_BUFFER_THICKNESS_COUNTER] : NULL + ) != MCHR_ERROR); + if (!ret) + { + m_status_acquisition = STATUS_MCHR_FUNCTION; + sprintf_s(m_status_message, "StartAcquisition:MCHR_GetThicknessMeasurement: Error : (0x%X)\n", MCHR_GetLastError(m_chr_id)); + } + break; + //MCHR_GetAltitudeMeasurement + case eMCHR_GetAltitudeMeasurement : + ret = (MCHR_GetAltitudeMeasurement (m_chr_id, m_acqParam, + (m_acqEasyParam.EnableBufferAltitude.Altitude) ? m_ppAcqBuffer[ID_BUFFER_ALTITUDE_ALTITUDE] : NULL, + (m_acqEasyParam.EnableBufferAltitude.Intensity) ? m_ppAcqBuffer[ID_BUFFER_ALTITUDE_INTENSITY] : NULL, + (m_acqEasyParam.EnableBufferAltitude.Counter) ? m_ppAcqBuffer[ID_BUFFER_ALTITUDE_COUNTER] : NULL, + (m_acqEasyParam.EnableBufferAltitude.BaryCenter) ? m_ppAcqBuffer[ID_BUFFER_ALTITUDE_BARYCENTER] : NULL, + (m_acqEasyParam.EnableBufferAltitude.Status) ? m_ppAcqBuffer[ID_BUFFER_ALTITUDE_STATUS] : NULL + ) != MCHR_ERROR); + + if (!ret) + { + m_status_acquisition = STATUS_MCHR_FUNCTION; + sprintf_s(m_status_message, "StartAcquisition:MCHR_GetAltitudeMeasurement: Error : (0x%X)\n", MCHR_GetLastError(m_chr_id)); + + } + break; + //MCHR_GetDepthMeasurement + case eMCHR_GetDepthMeasurement : + ret = (MCHR_GetDepthMeasurement (m_chr_id, m_acqParam, + (m_acqEasyParam.EnableBufferDepth.Depth) ? m_ppAcqBuffer[ID_BUFFER_DEPTH_DEPTH] : NULL, + (m_acqEasyParam.EnableBufferDepth.Intensity) ? m_ppAcqBuffer[ID_BUFFER_DEPTH_INTENSITY] : NULL, + (m_acqEasyParam.EnableBufferDepth.Counter) ? m_ppAcqBuffer[ID_BUFFER_DEPTH_COUNTER] : NULL, + (m_acqEasyParam.EnableBufferDepth.BaryCenter) ? m_ppAcqBuffer[ID_BUFFER_DEPTH_BARYCENTER] : NULL, + (m_acqEasyParam.EnableBufferDepth.Status) ? m_ppAcqBuffer[ID_BUFFER_DEPTH_STATUS] : NULL + ) != MCHR_ERROR); + if (!ret) + { + m_status_acquisition = STATUS_MCHR_FUNCTION; + sprintf_s(m_status_message, "StartAcquisition:MCHR_GetDepthMeasurement: Error : (0x%X)\n", MCHR_GetLastError(m_chr_id)); + } + break; + //MCHR_GetInterferometricThickness + case eMCHR_GetInterferometricThickness: + ret = (MCHR_GetInterferometricThickness(m_chr_id, m_acqParam, + (m_acqEasyParam.EnableBufferInterferometricThickness.Thickness1) ? m_ppAcqBuffer[ID_BUFFER_INTERFEROMETRIC_THICKNESS_THICKNESS1] : NULL, + (m_acqEasyParam.EnableBufferInterferometricThickness.Thickness2) ? m_ppAcqBuffer[ID_BUFFER_INTERFEROMETRIC_THICKNESS_THICKNESS2] : NULL, + (m_acqEasyParam.EnableBufferInterferometricThickness.Thickness3) ? m_ppAcqBuffer[ID_BUFFER_INTERFEROMETRIC_THICKNESS_THICKNESS3] : NULL, + (m_acqEasyParam.EnableBufferInterferometricThickness.Quality1) ? m_ppAcqBuffer[ID_BUFFER_INTERFEROMETRIC_THICKNESS_QUALITY1] : NULL, + (m_acqEasyParam.EnableBufferInterferometricThickness.Quality2) ? m_ppAcqBuffer[ID_BUFFER_INTERFEROMETRIC_THICKNESS_QUALITY2] : NULL, + (m_acqEasyParam.EnableBufferInterferometricThickness.Quality3) ? m_ppAcqBuffer[ID_BUFFER_INTERFEROMETRIC_THICKNESS_QUALITY3] : NULL, + (m_acqEasyParam.EnableBufferInterferometricThickness.Intensity) ? m_ppAcqBuffer[ID_BUFFER_INTERFEROMETRIC_THICKNESS_INTENSITY] : NULL + ) != MCHR_ERROR); + if (!ret) + { + m_status_acquisition = STATUS_MCHR_FUNCTION; + sprintf_s(m_status_message, "StartAcquisition:MCHR_GetInterferometricThickness: Error : (0x%X)\n", MCHR_GetLastError(m_chr_id)); + } + break; + //MCHR_GetInterferometricThicknessSAWLI + case eMCHR_GetInterferometricThicknessSAWLI: + ret = (MCHR_GetInterferometricThicknessSAWLI(m_chr_id, m_acqParam, + (m_acqEasyParam.EnableBufferInterferometricThicknessSAWLI.Thickness1) ? m_ppAcqBuffer[ID_BUFFER_INTERFEROMETRIC_THICKNESS_SAWLI_THICKNESS1] : NULL, + (m_acqEasyParam.EnableBufferInterferometricThicknessSAWLI.Thickness2) ? m_ppAcqBuffer[ID_BUFFER_INTERFEROMETRIC_THICKNESS_SAWLI_THICKNESS2] : NULL, + (m_acqEasyParam.EnableBufferInterferometricThicknessSAWLI.Thickness3) ? m_ppAcqBuffer[ID_BUFFER_INTERFEROMETRIC_THICKNESS_SAWLI_THICKNESS3] : NULL, + (m_acqEasyParam.EnableBufferInterferometricThicknessSAWLI.Quality1) ? m_ppAcqBuffer[ID_BUFFER_INTERFEROMETRIC_THICKNESS_SAWLI_QUALITY1] : NULL, + (m_acqEasyParam.EnableBufferInterferometricThicknessSAWLI.Quality2) ? m_ppAcqBuffer[ID_BUFFER_INTERFEROMETRIC_THICKNESS_SAWLI_QUALITY2] : NULL, + (m_acqEasyParam.EnableBufferInterferometricThicknessSAWLI.Quality3) ? m_ppAcqBuffer[ID_BUFFER_INTERFEROMETRIC_THICKNESS_SAWLI_QUALITY3] : NULL, + (m_acqEasyParam.EnableBufferInterferometricThicknessSAWLI.Intensity) ? m_ppAcqBuffer[ID_BUFFER_INTERFEROMETRIC_THICKNESS_SAWLI_INTENSITY] : NULL, + (m_acqEasyParam.EnableBufferInterferometricThicknessSAWLI.Thickness) ? m_ppAcqBuffer[ID_BUFFER_INTERFEROMETRIC_THICKNESS_SAWLI_THICKNESS] : NULL, + (m_acqEasyParam.EnableBufferInterferometricThicknessSAWLI.Counter) ? m_ppAcqBuffer[ID_BUFFER_INTERFEROMETRIC_THICKNESS_SAWLI_COUNTER] : NULL, + (m_acqEasyParam.EnableBufferInterferometricThicknessSAWLI.Status) ? m_ppAcqBuffer[ID_BUFFER_INTERFEROMETRIC_THICKNESS_SAWLI_STATUS] : NULL + ) != MCHR_ERROR); + if (!ret) + { + m_status_acquisition = STATUS_MCHR_FUNCTION; + sprintf_s(m_status_message, "StartAcquisition:MCHR_GetInterferometricThicknessSAWLI: Error : (0x%X)\n", MCHR_GetLastError(m_chr_id)); + } + break; + //MCHR_GetTransmittedDataMeasurement + case eMCHR_GetTransmittedDataMeasurement : + //Automatic mode setting + ret = _SetSensorModeAndDigitalOutput(&m_acqEasyParam); + if (!ret) + { + sprintf_s(m_status_message, "StartAcquisition: SensorMode : Impossible to determine the sensor mode.\n"); + + break; + } + //Sensor Type + switch (m_acqEasyParam.SensorType) + { + case MCHR_150: + case MCHR_450: + case MCHR_XE: + case MCHR_XE_E: + if (m_acqEasyParam.SensorMode == MCHR_DISTANCE_MODE) + { + ret = (MCHR_GetTransmittedDataMeasurement(m_chr_id, m_acqParam, + (m_acqEasyParam.EnableBufferTransmittedData.ChrDistance.Distance) ? m_ppAcqBuffer[ID_BUFFER_CHR_DISTANCE_DISTANCE] : NULL, + NULL,NULL, + (m_acqEasyParam.EnableBufferTransmittedData.ChrDistance.Intensity) ? m_ppAcqBuffer[ID_BUFFER_CHR_DISTANCE_INTENSITY] : NULL, + NULL, + NULL, + (m_acqEasyParam.EnableBufferTransmittedData.ChrDistance.BaryCenter) ? m_ppAcqBuffer[ID_BUFFER_CHR_DISTANCE_BARYCENTER] : NULL, + NULL, + NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL + ) != MCHR_ERROR); + if (!ret) + { + m_status_acquisition = STATUS_MCHR_FUNCTION; + sprintf_s(m_status_message, "StartAcquisition:MCHR_GetTransmittedDataMeasurement: Error : (0x%X)\n", MCHR_GetLastError(m_chr_id)); + } + } + else if (m_acqEasyParam.SensorMode == MCHR_THICKNESS_MODE) + { + ret = (MCHR_GetTransmittedDataMeasurement(m_chr_id, m_acqParam, + (m_acqEasyParam.EnableBufferTransmittedData.ChrThickness.Thickness) ? m_ppAcqBuffer[ID_BUFFER_CHR_THICKNESS_THICKNESS] : NULL, + (m_acqEasyParam.EnableBufferTransmittedData.ChrThickness.Distance1) ? m_ppAcqBuffer[ID_BUFFER_CHR_THICKNESS_DISTANCE1] : NULL, + (m_acqEasyParam.EnableBufferTransmittedData.ChrThickness.Distance2) ? m_ppAcqBuffer[ID_BUFFER_CHR_THICKNESS_DISTANCE2] : NULL, + NULL, + (m_acqEasyParam.EnableBufferTransmittedData.ChrThickness.Intensity1) ? m_ppAcqBuffer[ID_BUFFER_CHR_THICKNESS_INTENSITY1] : NULL, + (m_acqEasyParam.EnableBufferTransmittedData.ChrThickness.Intensity2) ? m_ppAcqBuffer[ID_BUFFER_CHR_THICKNESS_INTENSITY2] : NULL, + (m_acqEasyParam.EnableBufferTransmittedData.ChrThickness.BaryCenter1) ? m_ppAcqBuffer[ID_BUFFER_CHR_THICKNESS_BARYCENTER1] : NULL, + (m_acqEasyParam.EnableBufferTransmittedData.ChrThickness.BaryCenter2) ? m_ppAcqBuffer[ID_BUFFER_CHR_THICKNESS_BARYCENTER2] : NULL, + NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL + ) != MCHR_ERROR); + if (!ret) + { + m_status_acquisition = STATUS_MCHR_FUNCTION; + sprintf_s(m_status_message, "StartAcquisition:MCHR_GetTransmittedDataMeasurement: Error : (0x%X)\n", MCHR_GetLastError(m_chr_id)); + } + } + else + { + m_status_acquisition = STATUS_PARAM_ERROR; + sprintf_s(m_status_message, "StartAcquisition:MCHR_GetTransmittedDataMeasurement:(SensorType or SensorMode) Bad Parameters\n"); + ret = FALSE; + } + break; + case MCHR_CCS_ALPHA: + case MCHR_CCS_OPTIMA: + case MCHR_CCS_PRIMA: + case MCHR_CCS_ULTIMA: + case MCHR_CCS_INITIAL: + if (m_acqEasyParam.SensorMode == MCHR_DISTANCE_MODE) + { + ret = (MCHR_GetTransmittedDataMeasurement(m_chr_id, m_acqParam, + (m_acqEasyParam.EnableBufferTransmittedData.CcsDistance.Distance) ? m_ppAcqBuffer[ID_BUFFER_CCS_DISTANCE_DISTANCE_MSB] : NULL, + (m_acqEasyParam.EnableBufferTransmittedData.CcsDistance.Distance) ? m_ppAcqBuffer[ID_BUFFER_CCS_DISTANCE_DISTANCE_MSB] : NULL, + (m_acqEasyParam.EnableBufferTransmittedData.CcsDistance.AutoAdaptativeModeData) ? m_ppAcqBuffer[ID_BUFFER_CCS_DISTANCE_AUTO_ADAPTATIVE_MODE] : NULL, + (m_acqEasyParam.EnableBufferTransmittedData.CcsDistance.Intensity) ? m_ppAcqBuffer[ID_BUFFER_CCS_DISTANCE_INTENSITY] : NULL, + NULL, NULL, + (m_acqEasyParam.EnableBufferTransmittedData.CcsDistance.BaryCenter) ? m_ppAcqBuffer[ID_BUFFER_CCS_DISTANCE_BARYCENTER] : NULL, + NULL, + (m_acqEasyParam.EnableBufferTransmittedData.CcsDistance.Status) ? m_ppAcqBuffer[ID_BUFFER_CCS_DISTANCE_STATUS] : NULL, + (m_acqEasyParam.EnableBufferTransmittedData.CcsDistance.Counter) ? m_ppAcqBuffer[ID_BUFFER_CCS_DISTANCE_COUNTER] : NULL, + (m_acqEasyParam.EnableBufferTransmittedData.CcsDistance.Encoder1) ? m_ppAcqBuffer[ID_BUFFER_CCS_DISTANCE_ENCODER1_LSB] : NULL, + (m_acqEasyParam.EnableBufferTransmittedData.CcsDistance.Encoder1) ? m_ppAcqBuffer[ID_BUFFER_CCS_DISTANCE_ENCODER1_MSB] : NULL, + (m_acqEasyParam.EnableBufferTransmittedData.CcsDistance.Encoder2) ? m_ppAcqBuffer[ID_BUFFER_CCS_DISTANCE_ENCODER2_LSB] : NULL, + (m_acqEasyParam.EnableBufferTransmittedData.CcsDistance.Encoder2) ? m_ppAcqBuffer[ID_BUFFER_CCS_DISTANCE_ENCODER2_MSB] : NULL, + (m_acqEasyParam.EnableBufferTransmittedData.CcsDistance.Encoder3) ? m_ppAcqBuffer[ID_BUFFER_CCS_DISTANCE_ENCODER3_LSB] : NULL, + (m_acqEasyParam.EnableBufferTransmittedData.CcsDistance.Encoder3) ? m_ppAcqBuffer[ID_BUFFER_CCS_DISTANCE_ENCODER3_MSB] : NULL + ) != MCHR_ERROR); + if (!ret) + { + m_status_acquisition = STATUS_MCHR_FUNCTION; + sprintf_s(m_status_message, "StartAcquisition:MCHR_GetTransmittedDataMeasurement: Error : (0x%X)\n", MCHR_GetLastError(m_chr_id)); + } + } + else if (m_acqEasyParam.SensorMode == MCHR_THICKNESS_MODE) + { + ret = (MCHR_GetTransmittedDataMeasurement(m_chr_id, m_acqParam, + (m_acqEasyParam.EnableBufferTransmittedData.CcsThickness.Thickness) ? m_ppAcqBuffer[ID_BUFFER_CCS_THICKNESS_THICKNESS] : NULL, + (m_acqEasyParam.EnableBufferTransmittedData.CcsThickness.Distance1) ? m_ppAcqBuffer[ID_BUFFER_CCS_THICKNESS_DISTANCE1] : NULL, + (m_acqEasyParam.EnableBufferTransmittedData.CcsThickness.Distance2) ? m_ppAcqBuffer[ID_BUFFER_CCS_THICKNESS_DISTANCE2] : NULL, + (m_acqEasyParam.EnableBufferTransmittedData.CcsThickness.AutoAdaptativeModeData) ? m_ppAcqBuffer[ID_BUFFER_CCS_THICKNESS_AUTO_ADAPTATIVE_MODE] : NULL, + (m_acqEasyParam.EnableBufferTransmittedData.CcsThickness.Intensity1) ? m_ppAcqBuffer[ID_BUFFER_CCS_THICKNESS_INTENSITY1] : NULL, + (m_acqEasyParam.EnableBufferTransmittedData.CcsThickness.Intensity2) ? m_ppAcqBuffer[ID_BUFFER_CCS_THICKNESS_INTENSITY2] : NULL, + (m_acqEasyParam.EnableBufferTransmittedData.CcsThickness.BaryCenter1) ? m_ppAcqBuffer[ID_BUFFER_CCS_THICKNESS_BARYCENTER1] : NULL, + (m_acqEasyParam.EnableBufferTransmittedData.CcsThickness.BaryCenter2) ? m_ppAcqBuffer[ID_BUFFER_CCS_THICKNESS_BARYCENTER2] : NULL, + (m_acqEasyParam.EnableBufferTransmittedData.CcsThickness.Status) ? m_ppAcqBuffer[ID_BUFFER_CCS_THICKNESS_STATUS] : NULL, + (m_acqEasyParam.EnableBufferTransmittedData.CcsThickness.Counter) ? m_ppAcqBuffer[ID_BUFFER_CCS_THICKNESS_COUNTER] : NULL, + (m_acqEasyParam.EnableBufferTransmittedData.CcsThickness.Encoder1) ? m_ppAcqBuffer[ID_BUFFER_CCS_THICKNESS_ENCODER1_LSB] : NULL, + (m_acqEasyParam.EnableBufferTransmittedData.CcsThickness.Encoder1) ? m_ppAcqBuffer[ID_BUFFER_CCS_THICKNESS_ENCODER1_MSB] : NULL, + (m_acqEasyParam.EnableBufferTransmittedData.CcsThickness.Encoder2) ? m_ppAcqBuffer[ID_BUFFER_CCS_THICKNESS_ENCODER2_LSB] : NULL, + (m_acqEasyParam.EnableBufferTransmittedData.CcsThickness.Encoder2) ? m_ppAcqBuffer[ID_BUFFER_CCS_THICKNESS_ENCODER2_MSB] : NULL, + (m_acqEasyParam.EnableBufferTransmittedData.CcsThickness.Encoder3) ? m_ppAcqBuffer[ID_BUFFER_CCS_THICKNESS_ENCODER3_LSB] : NULL, + (m_acqEasyParam.EnableBufferTransmittedData.CcsThickness.Encoder3) ? m_ppAcqBuffer[ID_BUFFER_CCS_THICKNESS_ENCODER3_MSB] : NULL + ) != MCHR_ERROR); + if (!ret) + { + m_status_acquisition = STATUS_MCHR_FUNCTION; + sprintf_s(m_status_message, "StartAcquisition:MCHR_GetTransmittedDataMeasurement: Error : (0x%X)\n", MCHR_GetLastError(m_chr_id)); + } + } + else + { + m_status_acquisition = STATUS_PARAM_ERROR; + sprintf_s(m_status_message, "StartAcquisition:MCHR_GetTransmittedDataMeasurement:(SensorType) Bad Parameters\n"); + ret = FALSE; + } + break; + case MCHR_RUBY: + case MCHR_DUO: + if (m_acqEasyParam.SensorMode == MCHR_DISTANCE_MODE) + { + ret = (MCHR_GetTransmittedDataMeasurement(m_chr_id, m_acqParam, + (m_acqEasyParam.EnableBufferTransmittedData.DuoDistance.Distance) ? m_ppAcqBuffer[ID_BUFFER_DUO_DISTANCE_DISTANCE_MSB] : NULL, + (m_acqEasyParam.EnableBufferTransmittedData.DuoDistance.Distance) ? m_ppAcqBuffer[ID_BUFFER_DUO_DISTANCE_DISTANCE_MSB] : NULL, + NULL, + (m_acqEasyParam.EnableBufferTransmittedData.DuoDistance.Intensity) ? m_ppAcqBuffer[ID_BUFFER_DUO_DISTANCE_INTENSITY] : NULL, + NULL, + (m_acqEasyParam.EnableBufferTransmittedData.DuoDistance.Counter) ? m_ppAcqBuffer[ID_BUFFER_DUO_DISTANCE_COUNTER] : NULL, + (m_acqEasyParam.EnableBufferTransmittedData.DuoDistance.BaryCenter) ? m_ppAcqBuffer[ID_BUFFER_DUO_DISTANCE_BARYCENTER] : NULL, + NULL, NULL, + (m_acqEasyParam.EnableBufferTransmittedData.DuoDistance.Status) ? m_ppAcqBuffer[ID_BUFFER_DUO_DISTANCE_STATUS] : NULL, + NULL, NULL, NULL, NULL, NULL, NULL + ) != MCHR_ERROR); + if (!ret) + { + m_status_acquisition = STATUS_MCHR_FUNCTION; + sprintf_s(m_status_message, "StartAcquisition:MCHR_GetTransmittedDataMeasurement: Error : (0x%X)\n", MCHR_GetLastError(m_chr_id)); + } + } + else if (m_acqEasyParam.SensorMode == MCHR_THICKNESS_MODE) + { + ret = (MCHR_GetTransmittedDataMeasurement(m_chr_id, m_acqParam, + (m_acqEasyParam.EnableBufferTransmittedData.DuoThickness.Thickness) ? m_ppAcqBuffer[ID_BUFFER_DUO_THICKNESS_THICKNESS] : NULL, + (m_acqEasyParam.EnableBufferTransmittedData.DuoThickness.Distance1) ? m_ppAcqBuffer[ID_BUFFER_DUO_THICKNESS_DISTANCE1] : NULL, + (m_acqEasyParam.EnableBufferTransmittedData.DuoThickness.Distance2) ? m_ppAcqBuffer[ID_BUFFER_DUO_THICKNESS_DISTANCE2] : NULL, + (m_acqEasyParam.EnableBufferTransmittedData.DuoThickness.Counter) ? m_ppAcqBuffer[ID_BUFFER_DUO_THICKNESS_COUNTER] : NULL, + (m_acqEasyParam.EnableBufferTransmittedData.DuoThickness.Intensity1) ? m_ppAcqBuffer[ID_BUFFER_DUO_THICKNESS_INTENSITY1] : NULL, + (m_acqEasyParam.EnableBufferTransmittedData.DuoThickness.Intensity2) ? m_ppAcqBuffer[ID_BUFFER_DUO_THICKNESS_INTENSITY2] : NULL, + (m_acqEasyParam.EnableBufferTransmittedData.DuoThickness.BaryCenter1) ? m_ppAcqBuffer[ID_BUFFER_DUO_THICKNESS_BARYCENTER1] : NULL, + (m_acqEasyParam.EnableBufferTransmittedData.DuoThickness.BaryCenter2) ? m_ppAcqBuffer[ID_BUFFER_DUO_THICKNESS_BARYCENTER2] : NULL, + NULL, + (m_acqEasyParam.EnableBufferTransmittedData.DuoThickness.Status) ? m_ppAcqBuffer[ID_BUFFER_DUO_THICKNESS_STATUS] : NULL, + NULL, NULL, NULL, NULL, NULL, NULL + ) != MCHR_ERROR); + if (!ret) + { + m_status_acquisition = STATUS_MCHR_FUNCTION; + sprintf_s(m_status_message, "StartAcquisition:MCHR_GetTransmittedDataMeasurement: Error : (0x%X)\n", MCHR_GetLastError(m_chr_id)); + } + } + else if (m_acqEasyParam.SensorMode == MCHR_SAWLI_DISTANCE_MODE) + { + ret = (MCHR_GetTransmittedDataMeasurement(m_chr_id, m_acqParam, + (m_acqEasyParam.EnableBufferTransmittedData.DuoSawliDistance.Distance) ? m_ppAcqBuffer[ID_BUFFER_DUO_SAWLI_DISTANCE_DISTANCE_MSB] : NULL, + (m_acqEasyParam.EnableBufferTransmittedData.DuoSawliDistance.Distance) ? m_ppAcqBuffer[ID_BUFFER_DUO_SAWLI_DISTANCE_DISTANCE_MSB] : NULL, + NULL, NULL, NULL, NULL, + (m_acqEasyParam.EnableBufferTransmittedData.DuoSawliDistance.Quality) ? m_ppAcqBuffer[ID_BUFFER_DUO_SAWLI_DISTANCE_QUALITY] : NULL, + NULL, NULL, + (m_acqEasyParam.EnableBufferTransmittedData.DuoSawliDistance.Intensity) ? m_ppAcqBuffer[ID_BUFFER_DUO_SAWLI_DISTANCE_INTENSITY] : NULL, + NULL, + (m_acqEasyParam.EnableBufferTransmittedData.DuoSawliDistance.Counter) ? m_ppAcqBuffer[ID_BUFFER_DUO_SAWLI_DISTANCE_COUNTER] : NULL, + NULL, NULL, NULL, + (m_acqEasyParam.EnableBufferTransmittedData.DuoSawliDistance.Status) ? m_ppAcqBuffer[ID_BUFFER_DUO_SAWLI_DISTANCE_STATUS] : NULL + ) != MCHR_ERROR); + if (!ret) + { + m_status_acquisition = STATUS_MCHR_FUNCTION; + sprintf_s(m_status_message, "StartAcquisition:MCHR_GetTransmittedDataMeasurement: Error : (0x%X)\n", MCHR_GetLastError(m_chr_id)); + } + } + else if (m_acqEasyParam.SensorMode == MCHR_SAWLI_THICKNESS_MODE) + { + ret = (MCHR_GetTransmittedDataMeasurement(m_chr_id, m_acqParam, + (m_acqEasyParam.EnableBufferTransmittedData.DuoSawliThickness.Thickness1) ? m_ppAcqBuffer[ID_BUFFER_DUO_SAWLI_THICKNESS_THICKNESS1_MSB] : NULL, + (m_acqEasyParam.EnableBufferTransmittedData.DuoSawliThickness.Thickness1) ? m_ppAcqBuffer[ID_BUFFER_DUO_SAWLI_THICKNESS_THICKNESS1_MSB] : NULL, + (m_acqEasyParam.EnableBufferTransmittedData.DuoSawliThickness.Thickness2) ? m_ppAcqBuffer[ID_BUFFER_DUO_SAWLI_THICKNESS_THICKNESS2_MSB] : NULL, + (m_acqEasyParam.EnableBufferTransmittedData.DuoSawliThickness.Thickness2) ? m_ppAcqBuffer[ID_BUFFER_DUO_SAWLI_THICKNESS_THICKNESS2_MSB] : NULL, + (m_acqEasyParam.EnableBufferTransmittedData.DuoSawliThickness.Thickness3) ? m_ppAcqBuffer[ID_BUFFER_DUO_SAWLI_THICKNESS_THICKNESS3_MSB] : NULL, + (m_acqEasyParam.EnableBufferTransmittedData.DuoSawliThickness.Thickness3) ? m_ppAcqBuffer[ID_BUFFER_DUO_SAWLI_THICKNESS_THICKNESS3_MSB] : NULL, + (m_acqEasyParam.EnableBufferTransmittedData.DuoSawliThickness.Quality1) ? m_ppAcqBuffer[ID_BUFFER_DUO_SAWLI_THICKNESS_QUALITY1] : NULL, + (m_acqEasyParam.EnableBufferTransmittedData.DuoSawliThickness.Quality2) ? m_ppAcqBuffer[ID_BUFFER_DUO_SAWLI_THICKNESS_QUALITY2] : NULL, + (m_acqEasyParam.EnableBufferTransmittedData.DuoSawliThickness.Quality3) ? m_ppAcqBuffer[ID_BUFFER_DUO_SAWLI_THICKNESS_QUALITY3] : NULL, + (m_acqEasyParam.EnableBufferTransmittedData.DuoSawliThickness.Intensity) ? m_ppAcqBuffer[ID_BUFFER_DUO_SAWLI_THICKNESS_INTENSITY] : NULL, + (m_acqEasyParam.EnableBufferTransmittedData.DuoSawliThickness.NbThickness) ? m_ppAcqBuffer[ID_BUFFER_DUO_SAWLI_THICKNESS_NB_THICKNESS] : NULL, + (m_acqEasyParam.EnableBufferTransmittedData.DuoSawliThickness.Counter) ? m_ppAcqBuffer[ID_BUFFER_DUO_SAWLI_THICKNESS_COUNTER] : NULL, + NULL, NULL, NULL, + (m_acqEasyParam.EnableBufferTransmittedData.DuoSawliThickness.Status) ? m_ppAcqBuffer[ID_BUFFER_DUO_SAWLI_THICKNESS_STATUS] : NULL + ) != MCHR_ERROR); + if (!ret) + { + m_status_acquisition = STATUS_MCHR_FUNCTION; + sprintf_s(m_status_message, "StartAcquisition:MCHR_GetTransmittedDataMeasurement: Error : (0x%X)\n", MCHR_GetLastError(m_chr_id)); + } + } + else + { + m_status_acquisition = STATUS_PARAM_ERROR; + sprintf_s(m_status_message, "StartAcquisition:MCHR_GetTransmittedDataMeasurement:(SensorType) Bad Parameters\n"); + ret = FALSE; + } + break; + default: + m_status_acquisition = STATUS_PARAM_ERROR; + sprintf_s(m_status_message, "StartAcquisition:(SensorType) Bad Parameters\n"); + ret = FALSE; + break; + + } + break; + default : + m_status_acquisition = STATUS_PARAM_ERROR; + sprintf_s(m_status_message, "StartAcquisition:(typeAcquisition) Bad Parameters\n"); + ret = FALSE; + break; + } + } + m_IsDataAcquisitionStarting = ret; + criticalBuffer.Unlock(); + if ((m_status_acquisition != STATUS_NO_ERROR) && (m_status_event != NULL)) + { + SetEvent(m_status_event); + } + return(ret); +} +//-------------------------------------------------------------------- +short cAcqEasy::GetStatusAcquisition(char *pMessage) +{ + if (pMessage != NULL) + { +#ifdef _VC6_ + strcpy(pMessage, m_status_message); +#else + strcpy_s(pMessage, MAX_CHAR, m_status_message); +#endif + } + short status = m_status_acquisition; + m_status_acquisition = STATUS_NO_ERROR; + return(status); +} +//-------------------------------------------------------------------- + + + + + +//------------------------------------------------------------------------------------------------- +bool cAcqEasy::StartSpectrumAcquisition(unsigned short **ppSpectrum, unsigned short *pFirstUsablePixel, unsigned short *pBufferSize) +{ + bool ret = true; + + // Configure Spectrum Mode + if (MCHR_SetSpectrumMode(m_chr_id, 1) == MCHR_ERROR) + { + m_status_acquisition = STATUS_MCHR_FUNCTION; +#ifdef _VC6_ + sprintf(m_status_message, "StartAcquisition:MCHR_SetSpectrumMode: Error : (0x%X)\n", MCHR_GetLastError(m_chr_id)); +#else + sprintf_s(m_status_message, "StartAcquisition:MCHR_SetSpectrumMode: Error : (0x%X)\n", MCHR_GetLastError(m_chr_id)); +#endif + ret = false; + } + else + { + if (MCHR_StartSpectrumAcquisition(m_chr_id, pFirstUsablePixel, pBufferSize) == MCHR_ERROR) + { + m_status_acquisition = STATUS_MCHR_FUNCTION; +#ifdef _VC6_ + sprintf(m_status_message, "StartAcquisition:MCHR_StartSpectrumAcquisition: Error : (0x%X)\n", MCHR_GetLastError(m_chr_id)); +#else + sprintf_s(m_status_message, "StartAcquisition:MCHR_StartSpectrumAcquisition: Error : (0x%X)\n", MCHR_GetLastError(m_chr_id)); +#endif + ret = false; + } + *ppSpectrum = new unsigned short[*pBufferSize]; + } + m_IsSpectrumAcquisitionStarting = ret; + return(ret); + +} +//------------------------------------------------------------------------------------------------- +bool cAcqEasy::StopSpectrumAcquisition(unsigned short **ppSpectrum) +{ + bool ret = true; + + if (MCHR_StopSpectrumAcquisition(m_chr_id) == MCHR_ERROR) + { + m_status_acquisition = STATUS_MCHR_FUNCTION; +#ifdef _VC6_ + sprintf(m_status_message, "StopSpectrumAcquisition:MCHR_StopSpectrumAcquisition: Error : (0x%X)\n", MCHR_GetLastError(m_chr_id)); +#else + sprintf_s(m_status_message, "StopSpectrumAcquisition:MCHR_StopSpectrumAcquisition: Error : (0x%X)\n", MCHR_GetLastError(m_chr_id)); +#endif + ret = false; + } + else + { + if (MCHR_SetSpectrumMode(m_chr_id, 0) == MCHR_ERROR) + { + m_status_acquisition = STATUS_MCHR_FUNCTION; +#ifdef _VC6_ + sprintf(m_status_message, "StopSpectrumAcquisition:MCHR_SetSpectrumMode: Error : (0x%X)\n", MCHR_GetLastError(m_chr_id)); +#else + sprintf_s(m_status_message, "StopSpectrumAcquisition:MCHR_SetSpectrumMode: Error : (0x%X)\n", MCHR_GetLastError(m_chr_id)); +#endif + ret = false; + } + } + if (*ppSpectrum != NULL) + { + delete[] *ppSpectrum; + *ppSpectrum = NULL; + } + return(ret); +} +//-------------------------------------------------------------------- +bool cAcqEasy::GetSpectrumAcquisition(unsigned short *pSpectrum, unsigned short DataSize, unsigned short *pCounter, enSpectrumAcquisitionResult *pSpectrumAcquisitionResult, int timeout) +{ + bool ret = true; + + if (MCHR_GetSpectrumAcquisitionData(m_chr_id, pSpectrum, DataSize, pCounter, pSpectrumAcquisitionResult, timeout) == MCHR_ERROR) + { + m_status_acquisition = STATUS_MCHR_FUNCTION; +#ifdef _VC6_ + sprintf(m_status_message, "GetSpectrumAcquisition:MCHR_StopSpectrumAcquisition: Error : (0x%X)\n", MCHR_GetLastError(m_chr_id)); +#else + sprintf_s(m_status_message, "GetSpectrumAcquisition:MCHR_GetSpectrumAcquisitionData: Error : (0x%X)\n", MCHR_GetLastError(m_chr_id)); +#endif + ret = false; + } + return(ret); +} +//-------------------------------------------------------------------- diff --git a/PcDmis/Base/Interfac/Msi/Hsi/STIL/Dll_chr.lib b/PcDmis/Base/Interfac/Msi/Hsi/STIL/Dll_chr.lib new file mode 100644 index 0000000000000000000000000000000000000000..200da668d5abc14513e63e988adc7e2a06b8ba70 GIT binary patch literal 60498 zcmeHQdz@WWbzTHP3}7ifN~xt0sbECpkp!@m5;BQIlaNjVsHKLRnVaOwow>uEJ29bv zfPlzLKvYB?5kU|U5kUfk_Zz}1gjeJZ3Iy6xielIXB8MAtp7=;jX-FlA`+|$MndPitZjy#B~1!iq@B3$`Uq`(% z9lcD^NoNo-U2&?op=cm z(~nmu`Zn^-bog9FXTC$k^otu5owu5Z>EcZk-3mFTZ>~{v>I@>L%g~0IZmBD}v73nL zrt=k@jxu37YDYz{wuqQ+-$K!=NCVU9z|QCd{DQ7LQ_(3XGp4m~D0<~>qKts|3h4Ve zEgw(B^qaF4{T6MEY54_;ezlT_>BT)2U5#I+7cWX|T`VGecy7mM`FCkq_*N#>6 z(qZ@;bPe*v^xIPvU2_Kh2EDYQqNC9snI3=)(j`xSlbalB`s2ai$o&?58~pwliJ#)Uq?zdj5Ns1&Ox~{{S;|rda6s&rAQ;w(~}habQbuaC(%}zE_qbZlgJ~} zr6_-Am}&KN~!Aw5i2y{722&!ApF529R{F4$br zV>h8*KtJ1F(bK3urt=O|^hhtp8PE@}Q1mF$%yjXgiq^CT&3tl#Le_vooU{@ z=`&~V+dX$)*VH*vx~I>cyKncrt{F4tP1&cL=FOY6A09mc`dTib_;dH!Z`SAMbxoc- zndZ%e-n{AkwHB0XeFO7kK*sB?)~l7ls>L>8nZ&*W)&41qnwEqK%Os}M8-rC>qzKGp zK3i?=Uu_Q78vRy8GT5NasWxksx*H*53XYMU+FDd?_E%dWd5f26%&E4zs`G~y&a4g& zRu zCbqw~U?|zj;%X5j>U)mG$m4Cz>8bR0S6XhgB3w)EJJ722RO+*@T%SjAy#otbF1L(S^UMz5Cvi>2i!FRnH#3v2yu?X(0# z%UY1r8qL0nmyw`|*6*$^XjXb!sO9PXz11a7duVxVtv7YaK!Y5EMYR6j$mPL6?+w+0!_+$eI8>?ET1)3HYE}mq zHR`=?;rM*5Y4RD>4M}M2xy?%dAj$`+wd&5rkIU(pW>+f*&q24Dm3b)V0RgSM4{|)C zGT7R`QXlfF*kNj&$wRG1SEYGy2+HPZjk$|zJqP!rhr=sg_h4ME*4n$$T-sCZZ&jN? zHIMDf&mBYVX48w0gyRdmX0MF?sZxga?_H z)iH8O&j`14izVf`ca7Cr!P6Q}w=k{dS6xs<>mzk@mkxNA9hT8COy_Cdf@-tTS8X+GJx18gKwM78B$9wZX9_0w^P3f3jkr-I1a(|p z=&^*D8-vHzdQPX8h$1DK#fBBr)czhUDw}%`EkFTTY4Dj^hhLG&y%nsJ7gxiIAql13 zsx(`A-Zi=BkfGXO%`3k-QK3AJ#=!7VL}aoU@NNVm;1ah=ASI^b;q}b{O%lQdFm!CwP@16_i||a6O*~VEnoV><%Ca;Rcnjk~I%Sw2AoprAVdVjN zwRu`YndD|SnqDzVj+WlLGStf>gBy1dt|ehx>#8oU^;APO36wW zE3a<9;};AqYbwZ>wpf|`v5fg3c3i-B$Y9gAUem+GH8A4|{B_r`lJz zt=haI?UCUr%a`P38r{`O@0{8~m@}>BDuZ)5Wj4tN4!e@rsLO+G!PM!W)*9%lc~!4N zGpVk|SNrRY3JkrDEx=}Evil7LC1r3X$9c7jN6e>urW3c*?u*!&k;$T&ArE>z!YQ{4 zB*+(1{7I>Nx?iWj8<(%mXvg2o5hyudTlV9ehr^a9rf^Py6m#yR~CZxUgZ6j zm9e5t=wOT@Vf!uA!!jzDF|I87n2Z-gtv{RwOz=z^EE!z_VXjDn%tbPW$%}1UrclgS zZkkz7L^5Tl)xvIvZ)lFnxQNjh1hg&VmeRE5A#MxN1(>m1L|0w_74jneS<9Vi z6?3>M0)j4fKt#kPQW6k!^Q}bMXy^gKaJph~dFiqQgXwY`l3SidYjPuZHG}*hrdzQt zW>LFtoUUe&pJVo8hp$!L7eg%%3c95^Eifje%e|{H1m$VX>LEkb{+^|?D@{!MF@D>_ z3zCr#)Mbzm5p4^Fkr32z%^ZR)VW3`JGG$Q(vs`;hf+&2x&XLa%;K+#2k70)ATCTp9 z(y^F{v13edDy9{e%VNTSn^mc$Rs?F9?3Jq54z2bEr9F10H@zRb!?5cQwkrKS_Tt24 z>0F`P;boa=C|0t#K0LnGgu%)c&Vn*N>ci#hAg#}q1m3#|4`F}~2hUzntocn| z2nT1JHc#heR-=FFlB{XLT+q|#?`8Y>K3GE41E&#&5jLr4J5J=ioj7MSdJg`4b?N*@ zrD?ZLo1yWQtq6y7$9gyun}Z^0sO5lw&R>8fbWzp;0gcNYf@WJU zV&2gdJdGCB0FcegG;|k^BDLbT!gXr)uH(c>Y6%e#(CG@W>{18_Sh&%m&lCmMLKNWv zIKj=dkn1cqwrYf)^)<8rkYj7x*9DO0+#{+#=K z3liB22;}K)xp9he;qJ>xPo{<1HM6CVQP*MWR3d@VF~{ak+85$#kf_S#VxoNrU-ZHnNuXV z7FM=4&Cg;5;cNj5(PjleZ2=pXmw`!KOTfmpSRq_Xz{17*89n%@Yu1yo&^>M-0iKLb zgVTgf5o9&%mj5uqI?gYA@k_2|7Nq%KT(Z>VXF;0Z{n@=;eio$pGb;04eimf-LyJ8= z2N{0PqIrQR@=z`1P1g~id07{ib$~9Ap0P&)%u3|6lAcBLJ}G$#Iq4Y5(c~0KOA;I!e9q@ z4t797V`C_+^C@Jt{Sn&62}x+|5YNUANo3mj4%OUBb79q9kvW_qrTIK#N~6*2t@Q^s z7tvp+sfZNO`qS(6p+2bbzG*Ciu#C=a!S!rJ7RyJp<M#CM)VG3w|E9|JPz;A+Yxp@yu=^wG;l9;o`6Rp z;@am0c<$l($%h~ZkF?d#6TSZ)c!xoEHoU1`hfX)b4!jfCcM%-~{jmsp_Bq4}y*~o) zte+9RaRJemUx&Bh$wZ%9Mzj~ax8B5a{U<~VzJ>gpjX2;r_Qvr<+h2q@z}xalqOY6_ zkFg7Z@f|`!h(7*HqHVqb?=I-yfv{7cH~tEuCU^%P3-4jXckvI1dZBX?@Rl77&$^S~ z4F{R6zXz{DU~h%L&q6%sJ^(%B>GhZ4p}iJq`UT=R3+4BHcxxkU){lucx{PSMBOv!} zczojbNR;JTq-ia}&q6xJqUhp*;xfo%ni#6XQnsF-1 z74I%{Ei3zgliGkOGqPr55w$3o^VqWzCV+KwlB3vFs6 z{2qhf6)3~{IcUGYI|XI=G|Fq)ZA4!}e7B$sk3*d7KDh{Gx{A{Z**ktp)b$kNyp(9t z)2KWAz4A%4olAg;-#rn&0{mrY17oj4-azMHgfc+_@-xWGTgcbu7a-lp z%l2rymmt0a&qJGf1YXrBi&-eALs75IHE0{x6a5a)lfDc2RVaV_PIw$?g#MRTBE2U7 z3whrMW$@y?_{HC=5I*TdQ>lv<(6zLj{*LaTL+C&0-|6?Xi00C4`g_`iCefKFnBC|?YSOLrYr2@e zN{7>7RH3iX*>opOrfKvFy-MBmFg->$Qk}j|2hu;$6ZAuxLA%pu>2bQA?xKI7UV4uD zX#&lmW%L4lpMF4>(53Vg{VVN6GifjSGSz4gdXyUU8+w^`rO(r6=mENq?xu(6UV4Uh zqPqyM1G=}Xi{`_Mnq6xxsWq$6k{ZA5G6mvlUxKqukF{sx^+XV9s13azF` z=sk2E{fu6s4QVXBk2awp`U$UrvrbFoi^l3VPwx&=6`R?@Td=X4wWoL;A2(3|ur+KxU( ze?wQ&H|az=nU1C7=-c!iI*q0f9)8uR}({ePmS*U#5^^5j`z zW6Y)x_*2=U^k2@=Lf>em1;d+Zkk5?58ae+Hv+z8`aSaZfWoq9pp4`sGq%?T~Tb}GL z*26MXTEW|_GMvTqD?mXOLij{#C?oM>GMTULEQ_DxshR09Q`|c1$ z8?gMXBEhbYRU4c5k;7%km)r;~@MI`&x$4}))RK9GnR@ ziogA%cm5$iBd$%#BEdRHzECmKb3n~8*2!2RUPS>%n__h>m-;%@1sBV56BzZA7)~O$ zIchQ6re}6t3br{3EQ55HkexUzQWZM}k9H(j`QdvLpJNg%&K$6s_8m3S0mt%!XF24W zU}=_wVJo~rrKKYRvSuNoZGDd4Mo|=y5eL>qW8!l-stk%O2TmEF2HV->XR(mU72%GFh(pAs4?1Z@n5?ISKVW`@zDRuF zOnuzH(lV4gN70eOs1Y&aC2W4t4Fre5onDdjq~mG!x}!0gJ%>V1vG|mt*^$xZnXz=0 zx-MQj6H5ICyJB)T{W0PaZ+{&FJAx0@@ z21a_VS7fy~%3-Sy^fF2_PQ@VnMv&I@&2exr^*Hy{dx4E~&<5~xCU2e8kD9)Cm!RUl! zoZ^7wQ5ff~2>@N!p9C*sBSZ_*XV)hkC{Fi^(Q0&Sg z>)s&rV#doPi@6BMkEP|I*0n(c}{|glFA}=XNRn1&ki}no*i;XXnx1x(fOTV209I`S0vV%-x>8{`_hz~ zbyblLH4`(xhY>HAk#hP_IenAeO;LKf>vm^UNNB;*Gb#}nm{AFCF~bpo;XYfV1m-nD z*O^hdoFJZ>F7YzOo-Vn{A!NRSKuo}Oc@1|nK}k15m^xCA$5J&bYe`^IlycR~ zA}HKebDbi9yB7b7&EfChl=o`}9KR#SdP9dm3-i0!#rKWyHZ!Z(xZ6wCqO1cX+De~I zJVacDab5)4CVIhW!%#1zKUn)+M(cTe>T{4N~gPbI0)mhwp%3RBg@5CyN`98~; z1o{HSRM6+?m)fcYPERo{w3Uikpj$`KDwuiq=IUy*zZ33EAOl>xOL7G4$)wG+w*wrW zcKUaMLt6s@5izU;xMD`?a_!9mo9k^EIP77s=gF_#6n&`^gFUaZ=A=oV4JHKZN>oMvEA*4fI#rvq%)&-)M8g76x$GC7tDh%@m6Uhhdfua@!&%<7M4Rm6;Z~B@vU$=8~>(@YHg^l>|Li@{$wX zDdrm-cBaH$hF;M{1;RHCh0jI@{VzjjTtn+ECk4^FNjc~K(QS0D!m`3mwT$16-$oIi zZufFt8@RR!l47I8&INehBGHj>H%)?UwRI9?g*H$eL2nzy;}4feZ+Ys(;P6$+xlP;N zUa?~sW|`{Zv8k~j)B18hRg(Ek?5>0WikjwWvv2(ch&_j&oV<{(2igO8Ch$)Cn6J^ zk~{r#DxT=(k&S0>A-TN7^=XmWoHzT^qjPkLQV2vZv$2gLb|SU9d&vjJPR+v56rEoi z8EfMy3{e%n5`=(%-X_S&wRDG{Up~7+D~$x ze%rnL1nnnKDoiA<{lsGWoi(%Lb`s5v_Dn1gwUdAu+|(F0t2GtQ3J zAL!iDw07W<%z({;(c7|FK+xH$v(qWhJ-UgIJjY;xXyxXe9cSF&0JZqa9L(^_oEc_i zZm+t*Dz^6QRN(D!Gi0{;T*=`-?P6{D+3Lfr>5xQg`_EAh99(lGoVApjsrFY&NQs^> z>uo_BD!5XDR5IEK(#g~LN@6%LQDEtosZ+Cqp#J5L=)k*#7o(yj!(!xXSR z8KCf2RLo+*?{B@1!pH{4A-QOXT9c6)JvfGE>Xv{#Qx~l0OkK#hGi1R^jfXmU(Rs0m zCpc4g`H6I-XXA zTD@rzjIK2Lox%M3gFE!r>zQ-$a9<{#u)F?b@j+u}thYYBu*)Oe8^il>BREsy-+DXr z@;CannWO$B_zJ>bU_kxcn zhb+<|S>{+{eH}7^We`xvOe{h;d>sFm|Kqp_ZkNTsF>uW!GzRZ`lf!R@M;ppmk=?dh z%FYw@*Q~jvjLBLGT!yp4z)!HH^cH!@o}!)(Fqgs z0v*TSQsGT#H`W)LT9mF!$4TgqmtCuSnEv3Lp!zd}~S7;rg;v^>o966WMI5#iVk^ zy^AVOb6814|1NU2Q@FkS4RCf{Ph(kUpgO|aRb8e6P`fYT?(>hP)`mY?B@-c@+bZ8l zdIIL8;gd+i#ux-u`9=?H3Apm*Jtsx5Hjb90+#P@cMrd_+XC(1 z%{zpRBsOTjZn^R-XmXPAPyqE9sFfE&rge~76B<6e#t7NUMna(g1eZdE0Uaga{5>h<3RihIkrOS)QPn($v z`T~6khX5%5UZ%$B$2JzNHMFDE5prtOeAq)SY`qdxJhxT0Dab3_8>U9{vxn>tit7RQr1!kZN7`^E$7KH2vb zr=EmAl7tq|?Y%vT*8D&idC+Q3BifpmTV)%&|4rmkCZ(tva;r9S7k8*C!qU2|kk!ind$$~I-Y`h%?5!Yxfe zlrP8BOyw;(-ek^f*0*y<4fhT=p9eH+tyZ-^KgiS>ZlovXb=>U{T;-c5Va0P>wVIl< zTyM2jHz zOpTrYV&lr=tOBO|Tbb(JR#@!?E}9)7O^URZPa$VxW$y-4r*JDMJU=@_kF3sk<^7>H z(4A>f=@y)tmkr9gMeg-%TOMg-KUG-(;<>%Hm9W6x@8B2SuL4D)w}qH`i*A=K3psY( zRXf2=oiEs4jx+hG?yjL`_8EAY!Se6X#Kg>OkyXCpDk+)G@+~USqWRpHnHvfJIoPno ztJPtS6XV-!viHZqQ9d<-g}M4rv;`}QpyO6`r`4+bgZTnWrlBp|)M~jdEqCUmjQ;v` zC#aJmZ|(M|-~JS;>Oy2L<#T&Ej$m&M>^EioT5jN-{*;_I@L3hF`UG@a`AW@>?zZyf-w7eGWR}~*jaXFp zMA=Fk*S~2(0+(+;k@*Vmj~p!9PvLKb?dqz1z^gQBYOn8W3DnHjtfTyZ+f@H}tL!<9C!@&Kh@$n%x5xNLc7ztG$#Fos+d?aDi0KF~F(=wd zjy2ZR1sx$Ka`=FqL%!)I`;b9Lc#&POZGiP>(%xbkr@G#&6UTMH*< zoR3)VM(&pzK8RI*bc@W%c(?DJP>zdE$oTShRN@Jn-c44k%C9FD4w~8RLlV4n?o+nz zcPw;usgVQ|&u#U7yGGV%>`-}_#4=k?A&+K(TDnI}?K)l^Oo1@`NHqD}R^C&i%~ylS z{sCZ-^R_Tk_ELNVv{t)=2@wnJUjXR_*+<*Qz)I&THT(XP?31+zLU9v8 zN2QsvK>v?yGX?HK*-Xl>m{UE{pF)V%y$Le2;<>HfA(dCSJ{PT3=ap|k5FjI)*Z&UX zHF{uQB%`gorb_vpAhNvVO`ypFXbU-I^L}rrl+A?{qlNmuD5_h*A_Z;bbyCDS!TW<7 zL{X!aT)Njt;jbUZk5zSP{FI$-x$GVJQa(|*<=>{%b6cgGItjC>vB71C_EoI{=w0M9VkzO>>>ccUHq;HU5>7m~ zmB&=?HnylmzN)s7-76~q-bLOLZDtb-ZDiU^YG>p9Rt>_iS8Z1Nd#d^_KC7{cOt)34 zsgsDiTXh&UP?zp?QhoV{McG={@^+TXNI%CmYPRd;y$^0i5O-WS+vsIWHdUk7TbQ_w z!TBPmz>@iHuSOHS5AVPhd0iJbUGVuO3vtwMx_I5p25_(8I=tzEPq$h*9rc?o#)y6) z%c-`3$TlON+iO3Go{v2tiad_~O&9EwZ1C36O&8mSF?~aK`F=0a3%ys?$S(A^A)v1KD! ztJa06pBCW$vEewBSk zIZyQ#D`d{?8}d8DOtfY8`!=O5Zw`>{S3Yt}X)s5~6FFshzF*d3;fdU#KXB?4*v4|^Fd{yxsl9@KlkH|y zJq&pd$kZH=vJW73)XSvCFW&tYXzR?wkWVcN+!6CIOy%_s*+xg&4=l3#!}9~ai`e8f z-?qp;$vA4YdY6^cb?2MZC&%d#^-W57>-?8|H`58Qk0CzEcGC9V(sj&h$Tk$&Z*4ZhH*P%r$bzbIU5^;pRbyBAr#!1`}^=C=-hWE(U6Zm+Jd{xAAd$Y{Q z`3AQA@r~)GH!Mzwj^%eMooV~15UxC$DO|Cm%f&U5RxOino#8)6SS6k!fd#EpP2~X)aHDS$R9|bj%Oa=NBpZcFdDKr_kBy?b63C*KUD29qK0qmVKI;<@8K=0;Hy;qO)oG+8O_At&1X??uiV1A4ejX1sK} dPo3D?&EOYb)07!3-|AAgq(baudrate); + m_nComIndex = static_cast(comPort); + + if (InitChrLib()) + { + //open sensor + TRACE ("Open Sensor (please wait)\n"); + + memset(m_szSensorName, 0, sizeof(m_szSensorName)); + if (connectionType == MCHR_SERIAL_CONNECTION) + { + m_SensorId = MCHR_OpenSerialChr ("", MCHR_CCS_PRIMA, m_nComIndex, m_nBaudrate, NULL); + } + else + { + m_SensorId = MCHR_OpenUsbChr ("", MCHR_CCS_PRIMA, NULL, NULL, NULL); + } + if (m_SensorId != 0) + { + MCHR_GetSensorName(m_SensorId, m_szSensorName); + TRACE2("%s Sensor Open: SensorID = %d\n", m_szSensorName, m_SensorId); + } + else + { + m_ErrorCode = MCHR_GetLastError(NULL); + TRACE1("Error : OpenSensor() : Sensor Open failed : 0x%X\n", m_ErrorCode); + } + if (m_ErrorCode == SPARKSHI_ERROR_NONE) + { + // Initialize Sensor with custom configuration + if (MCHR_SetScanRate (m_SensorId, m_ScanRate) == MCHR_ERROR) + m_ErrorCode = MCHR_GetLastError(m_SensorId); + else + //set averaging = 1 for acquisition + if(MCHR_SetAveraging (m_SensorId, 1) == MCHR_ERROR) + { + m_ErrorCode = MCHR_GetLastError(m_SensorId); + } + } + } + else + m_ErrorCode = SPARKSHI_ERROR_INIT_DLL_CHR; + + if (m_ErrorCode == SPARKSHI_ERROR_NONE) + { + return(TRUE); + } + else + { + return(FALSE); + } +} + +//----------------------------------------------------------------------------------------- +BOOL CSTIL_CCS_PRIMA_Laser::CreateEvents(cAcqEasy *pAcquisitionEasy, HANDLE *pAcquisitionEvent) +{ + m_ErrorCode = SPARKSHI_ERROR_NONE; + if (pAcquisitionEasy == NULL) + { + TRACE("Error : CreateEvents() : Bad parameter (pAcquisitionEasy)\n"); + m_ErrorCode = SPARKSHI_ERROR_CREATE_EVENT; + return(FALSE); + } + *pAcquisitionEvent = CreateEvent(NULL,FALSE,FALSE,NULL); + if (*pAcquisitionEvent != NULL) + { + if (pAcquisitionEasy != NULL) + { + pAcquisitionEasy->SetAcqEvent(*pAcquisitionEvent); + return(TRUE); + } + } + m_ErrorCode = SPARKSHI_ERROR_CREATE_EVENT; + return (FALSE); +} +//----------------------------------------------------------------------------------------- +BOOL CSTIL_CCS_PRIMA_Laser::ReleaseEvents(HANDLE *pAcquisitionEvent) +{ + if (*pAcquisitionEvent != NULL) + { + CloseHandle(*pAcquisitionEvent); + *pAcquisitionEvent = NULL; + } + return (TRUE); +} + + +BOOL CSTIL_CCS_PRIMA_Laser::InitAcquisition (eAcqEasyFunc selectedFunction, enTriggerType selectedTrigger, int numberOfPointTRE) +{ + DWORD readLong; + + m_ErrorCode = SPARKSHI_ERROR_NONE; + if(m_pAcqEasy) + { + ReleaseAcquisition(); + } + //create cAcqEasy class + m_pAcqEasy = new cAcqEasy(m_SensorId); + if (CreateEvents(m_pAcqEasy, &m_evAcquisition)) + { + m_NumberOfPointTRE = numberOfPointTRE; + //set acquisition parameters + ZeroMemory(&m_acqEasyParam, sizeof(sAcqEasyParam)); + // Set number of points for TRE mode (should be > 0) + m_acqEasyParam.NumberPointsTRE = m_NumberOfPointTRE; + // Set buffer size (should be > 0) + m_acqEasyParam.BufferLength = m_NumberOfPointTRE; + // Set number of acquisition buffers per data (should be > 0) + m_acqEasyParam.NumberOfBuffers = 10; + //set timeout acquisition : should be reasonable time for tigger pulse to arrive. it depends on the application. + //minimum value should be at least = (((averaging / rate) * NUMBER_POINTS_TRE) * 1000) + 20 + m_acqEasyParam.TimeoutAcquisition = 1000; + //set controller type + m_acqEasyParam.SensorType = MCHR_CCS_PRIMA; + //event type (here end of each buffer) + m_acqEasyParam.TypeEvent = EV_END_BUFFER; + //trigger settings + m_acqEasyParam.Trigger.Enable = true; + m_acqEasyParam.Trigger.Type = selectedTrigger; + m_acqEasyParam.Trigger.Level = MCHR_RISING_EDGE; + //Set frenquency + m_acqEasyParam.Frequency = static_cast(m_ScanRate); + + + if (MCHR_GetFullScaleEx (m_SensorId, &readLong) == MCHR_ERROR_NONE) + m_nCurrentFullScale = readLong; + else + m_nCurrentFullScale = 999; + + //set name of acquisition function used + m_acqEasyParam.typeAcquisition = selectedFunction; + switch (selectedFunction) + { + case eMCHR_GetDepthMeasurement : + //set Distance and intensity buffering enabled + m_acqEasyParam.EnableBufferDepth.Depth = true; + m_acqEasyParam.EnableBufferDepth.Intensity = true; + + // Allocate data for acquisition buffer + m_pDistance1 = new float[m_NumberOfPointTRE]; + m_pIntensity1 = new float[m_NumberOfPointTRE]; + break; + + case eMCHR_GetThicknessMeasurement : + //set thickness, Distances, intensities buffering enabled + m_acqEasyParam.EnableBufferThickness.Thickness = true; + m_acqEasyParam.EnableBufferThickness.Distance1 = true; + m_acqEasyParam.EnableBufferThickness.Distance2 = true; + m_acqEasyParam.EnableBufferThickness.Intensity1 = true; + m_acqEasyParam.EnableBufferThickness.Intensity2 = true; + + // Allocate data for acquisition buffer + m_pThickness = new float[m_NumberOfPointTRE]; + m_pDistance1 = new float[m_NumberOfPointTRE]; + m_pDistance2 = new float[m_NumberOfPointTRE]; + m_pIntensity1 = new float[m_NumberOfPointTRE]; + m_pIntensity2 = new float[m_NumberOfPointTRE]; + MCHR_InvertDistance (m_SensorId, FALSE); + break; + + default : + TRACE1("Error : StartAcquisition() : Function (%d) not implemented!\n", selectedFunction); + return (FALSE); + + } + + + //start acquisition + TRACE ("Start Acquisition\n"); + if (!m_pAcqEasy->StartAcquisition(m_acqEasyParam)) + { + m_ErrorCode = MCHR_GetLastError(m_SensorId); + TRACE("Error : StartAcquisition() : Error code : 0x%X\n", m_ErrorCode); + return (FALSE); + } + } + else + return (FALSE); + return (TRUE); +} + + +BOOL CSTIL_CCS_PRIMA_Laser::ReleaseAcquisition () +{ + if (m_pAcqEasy) + { + m_pAcqEasy->StopAcquisition(); + ReleaseEvents (&m_evAcquisition); + } + + if (m_pThickness) + { + delete [] m_pThickness; + m_pThickness = NULL; + } + if (m_pDistance1) + { + delete [] m_pDistance1; + m_pDistance1 = NULL; + } + if (m_pIntensity1) + { + delete [] m_pIntensity1; + m_pIntensity1 = NULL; + } + if (m_pDistance2) + { + delete [] m_pDistance2; + m_pDistance2 = NULL; + } + if (m_pIntensity2) + { + delete [] m_pIntensity2; + m_pIntensity2 = NULL; + } + if (m_pAcqEasy) + { + delete m_pAcqEasy; + m_pAcqEasy = NULL; + } + return (TRUE); +} + +WORD CSTIL_CCS_PRIMA_Laser::GetLastError () +{ + return(m_ErrorCode); +} + +BOOL CSTIL_CCS_PRIMA_Laser::CloseCom () +{ + m_ErrorCode = SPARKSHI_ERROR_NONE; + if (m_SensorId != 0) + { + if (MCHR_CloseChr (m_SensorId) == MCHR_ERROR_NONE) + { + m_SensorId = 0; + return (TRUE); + } + else + { + m_ErrorCode = MCHR_GetLastError (m_SensorId); + return(FALSE); + } + MCHR_Release(); + } + else + { + m_ErrorCode = SPARKSHI_ERROR_SENSOR_NOT_CONNECTED; + return(FALSE); + } + +} + + +BOOL CSTIL_CCS_PRIMA_Laser::GetDistanceValue(double &dblDistance, double &dblIntensity, bool bSoftTrigger) +{ + int DataCount = 0; + m_ErrorCode = SPARKSHI_ERROR_NONE; + if (m_pAcqEasy == NULL) + { + TRACE("Error : Process() : Bad parameter (pAcquisitionEasy)\n"); + m_ErrorCode = SPARKSHI_ERROR_INVALID_PARAM; + return(SPARKSHI_ERROR); + } + if (m_evAcquisition == NULL) + { + TRACE("Error : Process() : Bad parameter (AcquisitionEvent)\n"); + m_ErrorCode = SPARKSHI_ERROR_INVALID_PARAM; + return(SPARKSHI_ERROR); + } + + if (m_pDistance1 == NULL) + { + TRACE("Error : Process() : Bad parameter (Distance1 pointer)\n"); + m_ErrorCode = SPARKSHI_ERROR_INVALID_PARAM; + return(SPARKSHI_ERROR); + } + + if (m_pIntensity1 == NULL) + { + TRACE("Error : Process() : Bad parameter (m_pIntensity1 pointer)\n"); + m_ErrorCode = SPARKSHI_ERROR_INVALID_PARAM; + return(SPARKSHI_ERROR); + } + + if (m_NumberOfPointTRE > 0) + { + // Software trigger + if (bSoftTrigger) + { + char cmd[MAX_PATH] = "STR"; + char resp[MAX_PATH]; + MCHR_SendCommand (m_SensorId, cmd, resp); + //MCHR_StartAcquisition (m_SensorId); + } + if (WaitForSingleObject(m_evAcquisition, m_acqEasyParam.TimeoutAcquisition) == WAIT_OBJECT_0) + { + if (!m_pAcqEasy->GetDepthAcquisitionData(m_pDistance1, m_pIntensity1, NULL, NULL, NULL, &DataCount)) + { + TRACE("Error : Process() GetAltitudeAcquisitionData : Error\n"); + m_ErrorCode = m_pAcqEasy->GetStatusAcquisition(NULL); + return (SPARKSHI_ERROR); + } + if (DataCount > 0) + { + dblDistance = (double) m_pDistance1[0]; + dblIntensity = (double) m_pIntensity1[0]; + } + } + else + { + //TRACE("Error : Process() GetAltitudeAcquisitionData : Timeout\n"); + m_ErrorCode = SPARKSHI_ERROR_TIMEOUT; + } + } + else + m_ErrorCode = SPARKSHI_ERROR_INVALID_PARAM; + if (m_ErrorCode != SPARKSHI_ERROR_NONE) + return(SPARKSHI_ERROR); + else + return (SPARKSHI_ERROR_NONE); + +} + +BOOL CSTIL_CCS_PRIMA_Laser::GetThicknessValue(double &dblThickness, double &dblDistance1, double &dblDistance2, double &dblIntensity1, double &dblIntensity2, bool bSoftTrigger) +{ + int DataCount = 0; + m_ErrorCode = SPARKSHI_ERROR_NONE; + if (m_pAcqEasy == NULL) + { + TRACE("Error : Process() : Bad parameter (pAcquisitionEasy)\n"); + m_ErrorCode = SPARKSHI_ERROR_INVALID_PARAM; + return(SPARKSHI_ERROR); + } + if (m_evAcquisition == NULL) + { + TRACE("Error : Process() : Bad parameter (AcquisitionEvent)\n"); + m_ErrorCode = SPARKSHI_ERROR_INVALID_PARAM; + return(SPARKSHI_ERROR); + } + + if (m_pThickness == NULL) + { + TRACE("Error : Process() : Bad parameter (Thickness pointer)\n"); + m_ErrorCode = SPARKSHI_ERROR_INVALID_PARAM; + return(SPARKSHI_ERROR); + } + + + if (m_pDistance1 == NULL) + { + TRACE("Error : Process() : Bad parameter (Distance1 pointer)\n"); + m_ErrorCode = SPARKSHI_ERROR_INVALID_PARAM; + return(SPARKSHI_ERROR); + } + + if (m_pIntensity1 == NULL) + { + TRACE("Error : Process() : Bad parameter (m_pIntensity1 pointer)\n"); + m_ErrorCode = SPARKSHI_ERROR_INVALID_PARAM; + return(SPARKSHI_ERROR); + } + if (m_pDistance2 == NULL) + { + TRACE("Error : Process() : Bad parameter (Distance2 pointer)\n"); + m_ErrorCode = SPARKSHI_ERROR_INVALID_PARAM; + return(SPARKSHI_ERROR); + } + + if (m_pIntensity2 == NULL) + { + TRACE("Error : Process() : Bad parameter (m_pIntensity2 pointer)\n"); + m_ErrorCode = SPARKSHI_ERROR_INVALID_PARAM; + return(SPARKSHI_ERROR); + } + + if (m_NumberOfPointTRE > 0) + { + // Software trigger + if (bSoftTrigger) + { + char cmd[MAX_PATH] = "STR"; + char resp[MAX_PATH]; + MCHR_SendCommand (m_SensorId, cmd, resp); + //MCHR_StartAcquisition (m_SensorId); + } + if (WaitForSingleObject(m_evAcquisition, m_acqEasyParam.TimeoutAcquisition) == WAIT_OBJECT_0) + { + if (!m_pAcqEasy->GetThicknessAcquisitionData (m_pThickness, m_pDistance1, m_pIntensity1, NULL, m_pDistance2, m_pIntensity2, NULL, NULL, NULL, &DataCount)) + { + TRACE("Error : Process() GetThicknessValue : Error\n"); + m_ErrorCode = m_pAcqEasy->GetStatusAcquisition(NULL); + return (SPARKSHI_ERROR); + } + dblThickness=0.0; + dblDistance1=0.0; + dblIntensity1=0.0; + dblDistance2=0.0; + dblIntensity2=0.0; + if (DataCount > 0) + { + for (int i=0;i 1000 +#pragma once +#endif // _MSC_VER > 1000 + +#define SPARKSHI_ERROR_CODE 0xe000 + +#define SPARKSHI_ERROR 0 +#define SPARKSHI_ERROR_NONE 1 +#define SPARKSHI_ERROR_INIT_DLL_CHR (SPARKSHI_ERROR_CODE + 0x01) +#define SPARKSHI_ERROR_SENSOR_NOT_CONNECTED (SPARKSHI_ERROR_CODE + 0x02) +#define SPARKSHI_ERROR_CREATE_EVENT (SPARKSHI_ERROR_CODE + 0x03) +#define SPARKSHI_ERROR_INVALID_PARAM (SPARKSHI_ERROR_CODE + 0x04) +#define SPARKSHI_ERROR_TIMEOUT (SPARKSHI_ERROR_CODE + 0x05) + +class CSTIL_CCS_PRIMA_Laser +{ +public: + CSTIL_CCS_PRIMA_Laser(); + ~CSTIL_CCS_PRIMA_Laser(void); + BOOL Init(int _Mode=0); + BOOL Exit(); + BOOL SetMeasureMode(int _MeasureMode=0); + BOOL GetDistance(double &dblDistance1, double &dblDistance2); + BOOL GetThicknessAllData(double &dbThickness, double &dblDistance1, double &dblDistance2, double &dblIntensity1, double &dblIntensity2); +private : + BOOL InitChrLib(); + + // Open connection on your controller with MCHR_SERIAL_CONNECTION or MCHR_USB_CONNECTION + // if MCHR_SERIAL_CONNECTION you can to change the baudrate value and serial port number + BOOL OpenCom (enChrConnection connectionType, int comPort = 1, int baudrate = 115200); + // If function return an error, get the last code value with this function + WORD GetLastError (); + // Close the controller connection + BOOL CloseCom (); + // Initialize controller and DLL_CHR to process data acquisition + BOOL InitAcquisition (eAcqEasyFunc selectedFunction, enTriggerType selectedTrigger, int numberTRE); + // Proper Stop acquisition function + BOOL ReleaseAcquisition (); + // Wait hardware trigger or start Software trigger and read datas values + BOOL GetDistanceValue(double &dbDistance, double &nIntensity, bool bSoftTrigger = true); + BOOL GetThicknessValue(double &dbThickness, double &dblDistance1, double &dblDistance2, double &dblIntensity1, double &dblIntensity2, bool bSoftTrigger = true); + + BOOL SetRefractiveIndex (double indice); + BOOL GetRefractiveIndex (double &indice); +private : + BOOL CreateEvents(cAcqEasy *pAcquisitionEasy, HANDLE *pAcquisitionEvent); + BOOL ReleaseEvents(HANDLE *pAcquisitionEvent); + +private : + MCHR_ID m_SensorId; + char m_szSensorName[MAX_PATH]; + enTriggerType m_nTrigger; + WORD m_nComIndex; + WORD m_nBaudrate; + int m_nCurrentFullScale; + WORD m_ScanRate; + float m_RefractiveIndex; + WORD m_ErrorCode; + //Acquisition parameters + sAcqEasyParam m_acqEasyParam; + int m_NumberOfPointTRE; + //User Event + HANDLE m_evAcquisition; + + + cAcqEasy * m_pAcqEasy; + float *m_pThickness; + float *m_pDistance1; + float *m_pDistance2; + float *m_pIntensity1; + float *m_pIntensity2; +}; + +#endif diff --git a/PcDmis/Base/Interfac/Msi/Hsi/Tools/UsbUtility/UsbUtil/Mv_Util.rc b/PcDmis/Base/Interfac/Msi/Hsi/Tools/UsbUtility/UsbUtil/Mv_Util.rc index 4e0a381..e54e45c 100644 --- a/PcDmis/Base/Interfac/Msi/Hsi/Tools/UsbUtility/UsbUtil/Mv_Util.rc +++ b/PcDmis/Base/Interfac/Msi/Hsi/Tools/UsbUtility/UsbUtil/Mv_Util.rc @@ -16,7 +16,7 @@ #undef APSTUDIO_READONLY_SYMBOLS ///////////////////////////////////////////////////////////////////////////// -// 中文(简体,中国) resources +// Chinese (Simplified, PRC) resources #if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_CHS) LANGUAGE LANG_CHINESE, SUBLANG_CHINESE_SIMPLIFIED @@ -410,21 +410,22 @@ BEGIN CONTROL "TC4000视频卡",IDC_RADIO_VIDEOCARD_TC4000,"Button",BS_AUTORADIOBUTTON,24,80,69,10 CONTROL "IP Camera",IDC_RADIO_SO7_IP_CAMERA,"Button",BS_AUTORADIOBUTTON,24,96,62,10 CONTROL "USB Camera",IDC_RADIO_SO7_USB_CAMERA,"Button",BS_AUTORADIOBUTTON,24,112,62,10 - CONTROL "控制器(USB)",IDC_RADIO_CONTROLLER,"Button",BS_AUTORADIOBUTTON,195,31,69,10 - CONTROL "控制器(RS232)",IDC_RADIO__SO7_RS232,"Button",BS_AUTORADIOBUTTON,195,63,77,10 CONTROL "LK_G激光",IDC_RADIO_KEYENCE_LASER,"Button",BS_AUTORADIOBUTTON,100,32,76,10 CONTROL "LK_H激光(USB)",IDC_RADIO_KEYENCE_LASER_LK_H,"Button",BS_AUTORADIOBUTTON,100,48,76,10 CONTROL "LK_H激光(ETHERNET)",IDC_RADIO_KEYENCE_LASER_LKH_ETHERNET, "Button",BS_AUTORADIOBUTTON,100,64,85,10 CONTROL "LJ_G激光",IDC_RADIO_KEYENCE_LASER3,"Button",BS_AUTORADIOBUTTON,100,80,76,10 + CONTROL "ART PCI8822",IDC_RADIO_ART_PCI8622,"Button",BS_AUTORADIOBUTTON,100,96,76,10 + CONTROL "STIL CCS-PRIMA",IDC_RADIO_ERT_CCS_PRIMA,"Button",BS_AUTORADIOBUTTON,100,112,76,10 + CONTROL "控制器(USB)",IDC_RADIO_CONTROLLER,"Button",BS_AUTORADIOBUTTON,195,31,69,10 + CONTROL "控制器(USB R)",IDC_RADIO_CONTROLLER2,"Button",BS_AUTORADIOBUTTON,195,47,75,10 + CONTROL "控制器(RS232)",IDC_RADIO__SO7_RS232,"Button",BS_AUTORADIOBUTTON,195,63,77,10 CONTROL "Verifcation algorithm",IDC_RADIO_SO7_VERIFICATION_ALGORITHM, "Button",BS_AUTORADIOBUTTON | NOT WS_VISIBLE,8,139,81,10 CONTROL "Image.dll",IDC_RADIO_TEST_IMAGE_DLL,"Button",BS_AUTORADIOBUTTON | NOT WS_VISIBLE,7,139,45,10 DEFPUSHBUTTON "OK",IDOK,145,142,50,14 PUSHBUTTON "Cancel",IDCANCEL,225,142,50,14 GROUPBOX "测试选项",IDC_STATIC,10,8,265,123 - CONTROL "控制器(USB R)",IDC_RADIO_CONTROLLER2,"Button",BS_AUTORADIOBUTTON,195,47,75,10 - CONTROL "ART PCI8822",IDC_RADIO_ART_PCI8622,"Button",BS_AUTORADIOBUTTON,100,96,76,10 END IDD_SO7_VIDEOCARD_SDK3000 DIALOGEX 0, 0, 488, 316 @@ -1556,12 +1557,12 @@ IDB_BITMAP_Z_DOWN BITMAP "res\\bmp\\Z_DOWN.bmp" IDB_BITMAP_Z_UP BITMAP "res\\bmp\\Z_UP.bmp" IDB_BITMAP_X_LEFT BITMAP "res\\bmp\\X_LEFT.BMP" IDB_BITMAP_X_RIGHT BITMAP "res\\bmp\\X_RIGHT.bmp" -#endif // 中文(简体,中国) resources +#endif // Chinese (Simplified, PRC) resources ///////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////// -// 英语(美国) resources +// English (United States) resources #if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US @@ -2279,6 +2280,30 @@ BEGIN EDITTEXT IDC_EDIT_TEST_KEYENCE_SETFOCUS,7,317,40,14,ES_AUTOHSCROLL | NOT WS_VISIBLE END +IDD_DIALOG_STIL_CCS_PRIMA DIALOGEX 0, 0, 450, 337 +STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU +CAPTION "STIL CCS - PRIMA" +FONT 8, "MS Shell Dlg", 400, 0, 0x1 +BEGIN + EDITTEXT IDC_EDIT_STIL_INTERVAL,287,39,40,14,ES_RIGHT | ES_AUTOHSCROLL + CONTROL "Continuous",IDC_CHECK_STIL_CONTINUE_GET_DATA,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,288,64,52,10 + PUSHBUTTON "Get Data",IDC_BUTTON_STIL_GET_DATA,356,38,66,38 + PUSHBUTTON "Clear All",IDC_BUTTON_STIL_CLEAR_LOG,403,187,37,20 + PUSHBUTTON "Exit",IDCANCEL,394,317,50,14 + EDITTEXT IDC_EDIT_STIL_LASER_VALUE1,132,31,98,26,ES_CENTER | ES_AUTOHSCROLL + EDITTEXT IDC_EDIT_STIL_LASER_VALUE2,132,65,98,26,ES_CENTER | ES_AUTOHSCROLL + EDITTEXT IDC_EDIT_STIL_MESSAGE,26,113,370,177,ES_MULTILINE | ES_AUTOVSCROLL | ES_WANTRETURN | WS_VSCROLL + LTEXT "Interval",-1,259,41,26,8 + LTEXT "ms",-1,333,41,10,8 + GROUPBOX "Get Data",-1,255,22,95,74 + GROUPBOX "Readout",-1,86,20,163,76 + LTEXT "Dis1",-1,98,41,14,8 + LTEXT "Dis2",-1,97,70,14,8 + PUSHBUTTON "Init",IDC_BUTTON_STIL_LASER_INIT,27,24,50,24 + PUSHBUTTON "Exit",IDC_BUTTON_STIL_LASER_EXIT,27,78,50,24 + PUSHBUTTON "Set Measure Mode",IDC_BUTTON_STIL_LASER_SET_MODE,27,51,50,24,BS_MULTILINE +END + ///////////////////////////////////////////////////////////////////////////// // @@ -2407,6 +2432,14 @@ BEGIN TOPMARGIN, 11 BOTTOMMARGIN, 331 END + + IDD_DIALOG_STIL_CCS_PRIMA, DIALOG + BEGIN + LEFTMARGIN, 7 + RIGHTMARGIN, 444 + TOPMARGIN, 11 + BOTTOMMARGIN, 331 + END END #endif // APSTUDIO_INVOKED @@ -2504,7 +2537,7 @@ BEGIN IDS_SO7_ABOUTBOX "&About Utility for SO7..." END -#endif // 英语(美国) resources +#endif // English (United States) resources ///////////////////////////////////////////////////////////////////////////// diff --git a/PcDmis/Base/Interfac/Msi/Hsi/Tools/UsbUtility/UsbUtil/STIL_CCS_PRIMA_Dlg.cpp b/PcDmis/Base/Interfac/Msi/Hsi/Tools/UsbUtility/UsbUtil/STIL_CCS_PRIMA_Dlg.cpp new file mode 100644 index 0000000..e1d09d3 --- /dev/null +++ b/PcDmis/Base/Interfac/Msi/Hsi/Tools/UsbUtility/UsbUtil/STIL_CCS_PRIMA_Dlg.cpp @@ -0,0 +1,174 @@ +// STIL_CCS_PRIMA_Dlg.cpp : implementation file +// + +#include "stdafx.h" +#include "resource.h" +#include "..\..\..\STIL\Common\inc\cAcqEasy.h" +#include "..\..\..\STIL\STIL_CCS_PRIMA_Laser.h" +#include "STIL_CCS_PRIMA_Dlg.h" +#include "afxdialogex.h" + +extern CSTIL_CCS_PRIMA_Laser* g_pSTIL_CCS_PRIMA; + +// CSTIL_CCS_PRIMA_Dlg dialog + +IMPLEMENT_DYNAMIC(CSTIL_CCS_PRIMA_Dlg, CDialogEx) + +CSTIL_CCS_PRIMA_Dlg::CSTIL_CCS_PRIMA_Dlg(CWnd* pParent /*=NULL*/) + : CDialogEx(CSTIL_CCS_PRIMA_Dlg::IDD, pParent) +{ + m_dDis1=0.0; + m_dDis2=0.0; + m_dIntensity1=0.0; + m_dIntensity2=0.0; + m_dThickness=0.0; + m_BTN_StartGetData=FALSE; + m_Timer1Interval=100; +} + +CSTIL_CCS_PRIMA_Dlg::~CSTIL_CCS_PRIMA_Dlg() +{ +} + +void CSTIL_CCS_PRIMA_Dlg::DoDataExchange(CDataExchange* pDX) +{ + DDX_Control(pDX, IDC_EDIT_STIL_MESSAGE, m_edMsg); + CDialogEx::DoDataExchange(pDX); +} + + +BEGIN_MESSAGE_MAP(CSTIL_CCS_PRIMA_Dlg, CDialogEx) + ON_WM_TIMER() + ON_BN_CLICKED(IDC_BUTTON_STIL_GET_DATA, &CSTIL_CCS_PRIMA_Dlg::OnBnClickedButtonStilGetData) + ON_BN_CLICKED(IDC_BUTTON_STIL_LASER_INIT, &CSTIL_CCS_PRIMA_Dlg::OnBnClickedButtonStilLaserInit) + ON_BN_CLICKED(IDC_BUTTON_STIL_LASER_EXIT, &CSTIL_CCS_PRIMA_Dlg::OnBnClickedButtonStilLaserExit) + ON_BN_CLICKED(IDC_BUTTON_STIL_LASER_SET_MODE, &CSTIL_CCS_PRIMA_Dlg::OnBnClickedButtonStilLaserSetMode) + ON_BN_CLICKED(IDCANCEL, &CSTIL_CCS_PRIMA_Dlg::OnBnClickedCancel) +END_MESSAGE_MAP() + + +// CSTIL_CCS_PRIMA_Dlg message handlers +BOOL CSTIL_CCS_PRIMA_Dlg::OnInitDialog() +{ + CDialog::OnInitDialog(); + ((CButton*)(GetDlgItem(IDC_EDIT_STIL_INTERVAL)))->SetWindowText(_T("100")); + + return TRUE; // return TRUE unless you set the focus to a control +} + +void CSTIL_CCS_PRIMA_Dlg::OnBnClickedButtonStilGetData() +{ + if (((CButton*)(GetDlgItem(IDC_CHECK_STIL_CONTINUE_GET_DATA)))->GetCheck()) + { + if (m_BTN_StartGetData) + { + KillTimer(1); + m_BTN_StartGetData=FALSE; + ((CButton*)GetDlgItem(IDC_BUTTON_STIL_GET_DATA))->SetWindowTextW(_T("Get Data")); + } + else + { + UpdateData(TRUE); + USES_CONVERSION; + CString str(_T("")); + GetDlgItem(IDC_EDIT_STIL_INTERVAL)->GetWindowText(str); + const char* cTempValue=T2A(str); + m_Timer1Interval = atoi(cTempValue); + m_BTN_StartGetData=TRUE; + SetTimer(1,m_Timer1Interval,NULL); + ((CButton*)GetDlgItem(IDC_BUTTON_STIL_GET_DATA))->SetWindowTextW(_T("STOP")); + } + } + else + { + g_pSTIL_CCS_PRIMA->GetDistance(m_dDis1,m_dDis2); + Show_Get_Data(); + } + GetDlgItem(IDC_EDIT_STIL_MESSAGE)->SetFocus(); +} + + +void CSTIL_CCS_PRIMA_Dlg::OnBnClickedButtonStilLaserInit() +{ + g_pSTIL_CCS_PRIMA->Init(); +} + + +void CSTIL_CCS_PRIMA_Dlg::OnBnClickedButtonStilLaserSetMode() +{ + g_pSTIL_CCS_PRIMA->SetMeasureMode(); +} +void CSTIL_CCS_PRIMA_Dlg::OnBnClickedButtonStilLaserExit() +{ + g_pSTIL_CCS_PRIMA->Exit(); + +} +void CSTIL_CCS_PRIMA_Dlg::Show_Get_Data() +{ + m_csMsg.Format(_T("%.4f"),m_dDis1); + GetDlgItem(IDC_EDIT_STIL_LASER_VALUE1)->SetWindowText(m_csMsg); + m_csMsg.Format(_T("%.4f"),m_dDis2); + GetDlgItem(IDC_EDIT_STIL_LASER_VALUE2)->SetWindowText(m_csMsg); +} + +//===================================================================================== +//Print message on edit control +void CSTIL_CCS_PRIMA_Dlg::OutputWithScroll(const CString &strNewText,CEdit &edtOutput) +{ + CString strOutput; + edtOutput.GetWindowText(strOutput); + strOutput += strNewText; + if ("\r\n" != strOutput.Right(2)) + { + strOutput += "\r\n"; + } + + int iCount = strOutput.GetLength(); + + edtOutput.SetRedraw(FALSE); + edtOutput.SetWindowText(strOutput); + int iLine = edtOutput.GetLineCount(); + edtOutput.LineScroll(iLine, 0); + edtOutput.SetSel(iCount, iCount); + edtOutput.SetRedraw(TRUE); +} + +//================================================================================================ +void CSTIL_CCS_PRIMA_Dlg::OnTimer(UINT_PTR nIDEvent) +{ + switch(nIDEvent) + { + case 1: + { + g_pSTIL_CCS_PRIMA->GetThicknessAllData(m_dThickness,m_dDis1,m_dDis2,m_dIntensity1,m_dIntensity2); + m_csMsg.Format(_T("Thick:%.4f,Dis1:%.4f,Dis2:%.4f,Int1:%.4f,Int2:%.4f\n"),m_dThickness,m_dDis1,m_dDis2,m_dIntensity1,m_dIntensity2); + OutputWithScroll(m_csMsg,m_edMsg); + } + break; + } + CDialog::OnTimer(nIDEvent); +} +//================================================================================================ +BOOL CSTIL_CCS_PRIMA_Dlg::PreTranslateMessage(MSG* pMsg) +{ + if(pMsg->message==WM_KEYDOWN) + { + if (pMsg->wParam==VK_SPACE) + { + OnBnClickedButtonStilGetData(); + } + else if(pMsg->wParam==VK_RETURN || pMsg->wParam==VK_ESCAPE) + { + return TRUE; + } + } + return CDialog::PreTranslateMessage(pMsg); +} + + + +void CSTIL_CCS_PRIMA_Dlg::OnBnClickedCancel() +{ + g_pSTIL_CCS_PRIMA->Exit(); + CDialogEx::OnCancel(); +} diff --git a/PcDmis/Base/Interfac/Msi/Hsi/Tools/UsbUtility/UsbUtil/STIL_CCS_PRIMA_Dlg.h b/PcDmis/Base/Interfac/Msi/Hsi/Tools/UsbUtility/UsbUtil/STIL_CCS_PRIMA_Dlg.h new file mode 100644 index 0000000..f931272 --- /dev/null +++ b/PcDmis/Base/Interfac/Msi/Hsi/Tools/UsbUtility/UsbUtil/STIL_CCS_PRIMA_Dlg.h @@ -0,0 +1,43 @@ +#pragma once + + +// CSTIL_CCS_PRIMA_Dlg dialog + +class CSTIL_CCS_PRIMA_Dlg : public CDialogEx +{ + DECLARE_DYNAMIC(CSTIL_CCS_PRIMA_Dlg) + +public: + CSTIL_CCS_PRIMA_Dlg(CWnd* pParent = NULL); // standard constructor + virtual ~CSTIL_CCS_PRIMA_Dlg(); + +// Dialog Data + enum { IDD = IDD_DIALOG_STIL_CCS_PRIMA }; + +protected: + virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support + virtual BOOL OnInitDialog(); + + DECLARE_MESSAGE_MAP() +private: + CEdit m_edMsg; + CString m_csMsg; + void OutputWithScroll(const CString &strNewText,CEdit &edtOutput); + void Show_Get_Data(); + double m_dDis1; + double m_dDis2; + double m_dIntensity1; + double m_dIntensity2; + double m_dThickness; + int m_Timer1Interval; + BOOL m_BTN_StartGetData; + +public: + afx_msg BOOL PreTranslateMessage(MSG* pMsg); + afx_msg void OnTimer(UINT_PTR nIDEvent); + afx_msg void OnBnClickedButtonStilGetData(); + afx_msg void OnBnClickedButtonStilLaserInit(); + afx_msg void OnBnClickedButtonStilLaserExit(); + afx_msg void OnBnClickedButtonStilLaserSetMode(); + afx_msg void OnBnClickedCancel(); +}; diff --git a/PcDmis/Base/Interfac/Msi/Hsi/Tools/UsbUtility/UsbUtil/So7_Option.cpp b/PcDmis/Base/Interfac/Msi/Hsi/Tools/UsbUtility/UsbUtil/So7_Option.cpp index 668105b..ee680b9 100644 --- a/PcDmis/Base/Interfac/Msi/Hsi/Tools/UsbUtility/UsbUtil/So7_Option.cpp +++ b/PcDmis/Base/Interfac/Msi/Hsi/Tools/UsbUtility/UsbUtil/So7_Option.cpp @@ -23,6 +23,9 @@ #include "Videocard_TC4000.h" #include "..\..\..\Videocard\SV4000E\SV4000E.h" #include "Videocard_SV4000E.h" +#include "..\..\..\STIL\Common\inc\cAcqEasy.h" +#include "..\..\..\STIL\STIL_CCS_PRIMA_Laser.h" +#include "STIL_CCS_PRIMA_Dlg.h" #endif //_RELEASE_FULL_VERSION #include "SO7_UtilDlg.h" @@ -66,6 +69,7 @@ CEF8000_Interface* m_pEF8000_Interface=NULL; CXBOXController* XBoxPlayer =NULL; CART_PCI8622* m_pART_PCI8622=NULL; +CSTIL_CCS_PRIMA_Laser* g_pSTIL_CCS_PRIMA=NULL; // CSo7_Option dialog IMPLEMENT_DYNAMIC(CSo7_Option, CDialog) @@ -147,6 +151,7 @@ BOOL CSo7_Option::OnInitDialog() ((CButton *)GetDlgItem(IDC_RADIO_SO7_VERIFICATION_ALGORITHM))->EnableWindow(FALSE); ((CButton *)GetDlgItem(IDC_RADIO_TEST_IMAGE_DLL))->EnableWindow(FALSE); ((CButton *)GetDlgItem(IDC_RADIO_ART_PCI8622))->EnableWindow(FALSE); + ((CButton *)GetDlgItem(IDC_RADIO_ERT_CCS_PRIMA))->EnableWindow(FALSE); #endif #ifdef _RELEASE_ONLY_ONE_FUNCTION @@ -346,6 +351,22 @@ void CSo7_Option::OnBnClickedOk() delete m_pART_PCI8622; m_pART_PCI8622=NULL; } + else if(((CButton *)GetDlgItem(IDC_RADIO_ERT_CCS_PRIMA))->GetCheck()) + { +#ifdef _RELEASE_FULL_VERSION + if (!g_pSTIL_CCS_PRIMA) + { + g_pSTIL_CCS_PRIMA=new CSTIL_CCS_PRIMA_Laser(); + } + CSTIL_CCS_PRIMA_Dlg* pSTIL_CCS_PRIMA_Dlg=new CSTIL_CCS_PRIMA_Dlg(); + pSTIL_CCS_PRIMA_Dlg->DoModal(); + delete pSTIL_CCS_PRIMA_Dlg; + pSTIL_CCS_PRIMA_Dlg=nullptr; + + delete g_pSTIL_CCS_PRIMA; + g_pSTIL_CCS_PRIMA=NULL; +#endif //_RELEASE_FULL_VERSION + } else if (((CButton *)GetDlgItem(IDC_RADIO_VIDEOCARD_SDK3000))->GetCheck()) { #ifdef _RELEASE_FULL_VERSION diff --git a/PcDmis/Base/Interfac/Msi/Hsi/Tools/UsbUtility/UsbUtil/Usb_Util.vcxproj b/PcDmis/Base/Interfac/Msi/Hsi/Tools/UsbUtility/UsbUtil/Usb_Util.vcxproj index 8dfb21a..e40da36 100644 --- a/PcDmis/Base/Interfac/Msi/Hsi/Tools/UsbUtility/UsbUtil/Usb_Util.vcxproj +++ b/PcDmis/Base/Interfac/Msi/Hsi/Tools/UsbUtility/UsbUtil/Usb_Util.vcxproj @@ -145,7 +145,7 @@ $(IntDir);%(AdditionalIncludeDirectories) - ..\..\..\..\..\..\..\ThirdParty\UsbSupport\LibUsb_Win\Lib\Msvc\libusb.lib;..\..\..\Videocard\SDK3000\sdk3000_7130.lib;..\..\..\Videocard\TC4000\Sa7134Capture.lib;..\..\..\Videocard\SV4000E\dataAcq.lib;..\..\..\Videocard\SV4000E\DXMediaCap.lib;..\..\..\ART\PCI8622_32.lib;%(AdditionalDependencies) + ..\..\..\..\..\..\..\ThirdParty\UsbSupport\LibUsb_Win\Lib\Msvc\libusb.lib;..\..\..\Videocard\SDK3000\sdk3000_7130.lib;..\..\..\Videocard\TC4000\Sa7134Capture.lib;..\..\..\Videocard\SV4000E\dataAcq.lib;..\..\..\Videocard\SV4000E\DXMediaCap.lib;..\..\..\ART\PCI8622_32.lib;..\..\..\STIL\Dll_chr.lib;%(AdditionalDependencies) true Windows MachineX86 @@ -206,7 +206,7 @@ true true MachineX86 - ..\..\..\..\..\..\..\ThirdParty\UsbSupport\LibUsb_Win\Lib\Msvc\libusb.lib;..\..\..\Videocard\SDK3000\sdk3000_7130.lib;..\..\..\Videocard\SV2000E\dataAcq.lib;..\..\..\Videocard\SV2000E\DXMediaCap.lib;..\..\..\Videocard\TC4000\Sa7134Capture.lib;..\..\..\ART\PCI8622_32.lib;%(AdditionalDependencies) + ..\..\..\..\..\..\..\ThirdParty\UsbSupport\LibUsb_Win\Lib\Msvc\libusb.lib;..\..\..\Videocard\SDK3000\sdk3000_7130.lib;..\..\..\Videocard\SV2000E\dataAcq.lib;..\..\..\Videocard\SV2000E\DXMediaCap.lib;..\..\..\Videocard\TC4000\Sa7134Capture.lib;..\..\..\ART\PCI8622_32.lib;..\..\..\STIL\Dll_chr.lib;%(AdditionalDependencies) @@ -323,6 +323,8 @@ + + @@ -375,6 +377,7 @@ Create Create + @@ -409,6 +412,7 @@ + @@ -456,6 +460,7 @@ + diff --git a/PcDmis/Base/Interfac/Msi/Hsi/Tools/UsbUtility/UsbUtil/Usb_Util.vcxproj.filters b/PcDmis/Base/Interfac/Msi/Hsi/Tools/UsbUtility/UsbUtil/Usb_Util.vcxproj.filters index 44414b2..7a57594 100644 --- a/PcDmis/Base/Interfac/Msi/Hsi/Tools/UsbUtility/UsbUtil/Usb_Util.vcxproj.filters +++ b/PcDmis/Base/Interfac/Msi/Hsi/Tools/UsbUtility/UsbUtil/Usb_Util.vcxproj.filters @@ -208,6 +208,15 @@ Sources Files + + Sources Files + + + Sources Files + + + Sources Files + @@ -453,6 +462,12 @@ Header Files + + Header Files + + + Header Files + diff --git a/PcDmis/Base/Interfac/Msi/Hsi/Tools/UsbUtility/UsbUtil/resource.h b/PcDmis/Base/Interfac/Msi/Hsi/Tools/UsbUtility/UsbUtil/resource.h index 12bf773..32341c7 100644 --- a/PcDmis/Base/Interfac/Msi/Hsi/Tools/UsbUtility/UsbUtil/resource.h +++ b/PcDmis/Base/Interfac/Msi/Hsi/Tools/UsbUtility/UsbUtil/resource.h @@ -653,6 +653,7 @@ #define IDC_BUTTON_TESA_STAR_STOP_MACHINE 1542 #define IDC_BUTTON_SO7_MOTION_CONFIG_OK 1542 #define IDC_BTN_KEYENCE_LKG5000_ETHERNET_READOUT1 1542 +#define IDC_BUTTON_STIL_LASER_EXIT 1542 #define IDC_BUTTON_STOP_SAMPLE_SCURVE 1543 #define IDC_BTN_KEYENCE_LKG5000_ETHERNET_READOUT2 1543 #define IDC_BUTTON_SO7_MOTION_CONFIG_OK2 1543 @@ -721,6 +722,7 @@ #define IDC_RADIO_MACHINE_KEYENCE_TM3000 1592 #define IDC_RADIO_ART_PCI8622 1592 #define IDC_BUTTON_GET_SCAN_DATA_KEYENCE_LK_HLASER 1593 +#define IDC_RADIO_ERT_CCS_PRIMA 1593 #define IDC_RADIO_KEYENCE_LASER_LK_H 1594 #define IDC_RADIO_TEST_IMAGE_DLL 1595 #define IDC_BUTTON_IMAGEDLL_PAUSE_AND_GET_SCAN_LASER_DATA 1596 @@ -853,6 +855,7 @@ #define IDD_DIALOG_KEYENCE_LKG5000 1719 #define IDD_SO7_UTIL_SETUP_SO7_CONFIG_MOTION 1720 #define IDD_SO7_ART_PCI8622 1721 +#define IDD_DIALOG_STIL_CCS_PRIMA 1722 #define IDC_RADIO_SPEED_SLOW 1770 #define IDC_RADIO_SCALE 1772 #define IDC_EDIT_SPEED_X 1773 @@ -883,8 +886,11 @@ #define IDC_BUTTON_SO7_MOVETO_CLEAR_ALL_LOG 1794 #define IDC_BUTTON_SO7_MOTION_CONFIG_CANCEL 1794 #define IDC_BTN_KEYENCE_LKG5000_ETHERNET_CONNECT1 1794 +#define IDC_BUTTON_STIL_LASER_INIT 1794 #define IDC_COMBO_RWDATA_ADDR 1795 #define IDC_BTN_KEYENCE_LKG5000_ETHERNET_CONNECT2 1795 +#define IDC_BUTTON_STIL_LASER_INIT2 1795 +#define IDC_BUTTON_STIL_LASER_SET_MODE 1795 #define IDC_EDIT_MOTION_SPEEDY 1796 #define IDC_COMBO_OUTPORT_NUMBER 1796 #define IDC_EDIT4 1797 @@ -988,6 +994,13 @@ #define IDC_BUTTON_SO7_TRIGPULSE_READ_PARA 1855 #define IDC_BUTTON4 1856 #define IDC_BUTTON_SET_SCALE_COEFFICIENT 1856 +#define IDC_BUTTON_STIL_GET_DATA 1857 +#define IDC_EDIT_STIL_INTERVAL 1858 +#define IDC_CHECK_STIL_CONTINUE_GET_DATA 1859 +#define IDC_EDIT_STIL_LASER_VALUE2 1860 +#define IDC_EDIT_STIL_LASER_VALUE1 1861 +#define IDC_EDIT_STIL_MESSAGE 1862 +#define IDC_BUTTON_STIL_CLEAR_LOG 1863 #define IDC_BUTTON_DIY_EXIT_BUTTON 32740 #define ID_EDIT_SO7_CONFIG_MOTION 32741 @@ -997,7 +1010,7 @@ #ifndef APSTUDIO_READONLY_SYMBOLS #define _APS_NEXT_RESOURCE_VALUE 191 #define _APS_NEXT_COMMAND_VALUE 32771 -#define _APS_NEXT_CONTROL_VALUE 1857 +#define _APS_NEXT_CONTROL_VALUE 1864 #define _APS_NEXT_SYMED_VALUE 104 #endif #endif diff --git a/PcDmis/Base/Interfac/Msi/Hsi/Tools/UsbUtility/UsbUtil_VS2010.suo b/PcDmis/Base/Interfac/Msi/Hsi/Tools/UsbUtility/UsbUtil_VS2010.suo index 71bc4b1e7dcbeab7c520fa82958f34f7b950e322..534a1068522462a5845f47cbd26266f628faa909 100644 GIT binary patch delta 13659 zcmeHNdt8)N`ajRh%s5;`ZgL9|5EU;VV1kk;$VEvMLUOkx5pfh;Zo+s$ONLTQt4%rP z>sDJzYF9BGb?l;!qGpz>_1i78G;~|nT(`8yO*8p@&->2EMF`sc*k8STzMS)(`+3fD zJI_0&4SLgR$CU}xZENCa2hA?V7+>O$+0%s>E5pki;1S?aU=jby;SpE2lHJk$7ab!9 zl$h$x3pHuv$eQp3qd-0$LSej7n;rhD#Mlj#_C%>S-~;#qet=Hi0}*=gA+_ zt<{J(b7;5T4qBy=Y>H+lK-$e=KD zLeD^ndw7R%lh5zD)yGSPmqw0QO?uf?C%GymU;8X0FFx0|iF)z5ei=Mj8`-_Lm>Up} zfd>bTHYfP+r*3Ybq$@kl_hpXdnE@$2ld{v&bHu;gq@+o?nOSKQ5_8k@D)^=45p>Mn z%2#QXR9akIT9Q*yo}ZJSm_H{aucDH#S~!@_+M0FW7HIU)1!2AwTD~xHA|Iz6tm}?f z???Hy$Q#|>azY;G8#VYKpBAg<2{EDOOVKB~X`V!>?d0Mz9FPjQ<6!oEccTxhk<* z;=yb0>CtAlyn5;odX3Zkcz(9VSKhsaym{s99=iF3C8hcK$__ub?Qp8|ctfS3B;Sxe zeq64ccag%W!B&;)+M0%H?O*H^?2yhY(+AVX_ThQtl(JqmW0LNS9TS=Qkd?b<$B}{G6Oi2Ma0*LW98UGxfwW&V%r(U27)whk za|&kVDrs?EenDZ0p|HegD4&^^ZF<7VDp^6k`8O0@Rta`=+&$8rgUknPa@v~eDi?Ant9&^KAF%p zd#!O{V`Lt+Y*bA}aQAXUMNWQEUPZ;cLc@HXuqd4VEUNgj>0aEl><;a{C56T)MJH^v zm3ugi8=ISw8k;*YErqX}?#mMvCqnnDo!VB0W|SEVOG_$pLk9+9SFN`fW0TnMnO^&E><>)e@aGwIa^N>3_?{PhYt}8GI&kW^2CNF+2gW~z#XML2n>OW_A#n{fY}>w;H1*J^{J9+l z5^8^)oUn#G%;O$T?=D-t>129o?tqx#ODuj1zWQvy{k^j_NfIy9wFK3RSI-)#{NO$v3H@?h&E;DQ_5yzK)d)B zV6s9?-z5*$T=o7z7rnTy)BpFd4jio(0s+;FU7&-x0r7z z+8qMz<3MF2s9%D^&EZ>5_2z+RYqdjJG{ouP*)61-37Tk#U(7~~)d4gv21hXGM`1nK*Lkh`O{vSUb(10Mn(0sja575E$Q zG4Kg+0{9d-348{84x9o`1783Qz!~7IRK?iek@*t%2XGGfCvYD43b+9L3%CgU8xV{7 z2I(bR{#&Hq0gb@-wldM?2js5;*KB3ik^Us|ws!_ymjiCj=VLESFlT*zS#l(ya8Ya* zrps{>FB$ET&~-*E8NTl7rkeHBEa&ch*72@Gj^Y{*eKfgtVSHyYE$*sCKsorf7))kF zPAHxN3^ABrK2*;W4u{H@#?$l{*Y(l#T7u%`z#G6iU@5Q?SOxrr_qtZ~qNc6F3ii1zZHoz-8dyz;xg$ za0&Pk_!jsMXav3ot^of5egK@I;jSUoBmD_!AEY6G1E3|o_0F>C^~LOBjN79Ep`pR5bh=)UXMrvGJN=;0(wKC{dNnWRZi8?CxHz@X#=Gz~Cjc)0^t`j`Rp7 z{F8lBOJg7%*Xm!!JJ?5Eh@~-0aQ6WN%!h{#*U8gr=?R`WcoTOUr01CfbUb0iw4GU$1VP|v zxCT%tE*rBE^?_B9jrUTfemKgXv)5S~@1ok~G3!Q+8`^N(g+y-RIZezpi0T z%F^v|QAM-=@quDgOP(MP`FK2eAbe9jvMMSE=J@9{Q@Y~2AjoA?B7NkyC(wruR>gT) z-sJ^lLkkIyM%6?EK&IDOio9YOt8M(v%*Ur;1XPVk{r z`Q%9IN6}{bp^40<&)sO}CUVhC5Um!$k%(rga6Dq!o%kQc!r2%lKNPtr{3WwU%br(ho->8Y!*D_?Wki8GMAD9A&YCGfw77EIqh0+3`5SVRiQG~P@C;>`sWpj|00~LVLRyGgm zd|&}kX)9Zb)N;{6Uiu!b{6vLpb1Wt+ne-wceeJk2k(xtb3j`^_Gc6eTvYD_TdGzDd2gOk+KCBe;OJ8}&l0^Q!oB1tQ@sM)i@HP9*L*yY^+DC7} zBYu2XXST2ctUDjpu+YYJ;h3&LWv5He(M&oZMj74NDE2t-3~=vE#T&G9@j#5HvL{bC zI$O57<7#k7-DQibft|SR`MzR{;%cCZm;G`Oig8biaUS5NxDa{68;ai2>4g~F7Xtofn-WWsOxeA0+hcSb?bW9)#X&Tl&?qek5h{0|$J= zJMP--o{PyNfREI}OL&K}_}7OnREbN@INN2%PUf~e+}T~sk{GeND0r6NiOB(nFZkz` zis&5#Sb6$AN{SB*ym!gx{bj86Tt);!tv zo>v{#Te&aoR<1jJZaoAFtY6EoY%Fk}@W8fDit8S1eNiGSuRiuY7LexBn%^2?IJhKzVX(#@s37PS+g%+b^2{NT1%09`l)nz zq!R^&Hw)#hI;c=~k9aR+TKc&@kG$>u*@*>l^1cxA>oE{wG#1=ogfT5(2gEs~*_UJA zV&~_eY5;xuoXsImdpNHx*mW?-)4Trn!f^YQD2#4|9gSv#Sr8oOQv9jDVZ7=B?NS^T zo&Hr&WfY()inqbh7gUetWm|(+P`UMHgS}|*rP^S-(jZ1xhaySbTl>i&qD(keb?6}O z3CgI>2hc*N>JA=tAtTAY+4gB~_e)xyo+UkIS>L+fzYsHR*;5XWU%KO%pkyz3;A(P_ z8)``7$yjE?Q0?^(%TCYJM>g#A;O7)}?^S}`hk@3ugDa_sGLIjH9NjIdz&l8%{3FrZI2kbUqr0%wN50S3Q8?6=U!%d#kP4e7YHjOrEK-`)j-~M*i z=!E;ZyH8(vhE~eyV-F>@BxGAH0?~B8#j07VbW%0FWO9>8zM_>v`HaMXn)gjSQlsNm z`&Zwalt73JL7ykbcC^0Ev?>Bc*tvK_I#B*bD-8-4!kVcl0ulbGz@Ly6@dY&xU#Y{` zJn(ZNa>6@IlY8r=yf){fuBxv%CQGP`6rhQ1{Ykdt%Wpd*8hZM-$;3sY^urjAb2E(NOQLAcRo(P}=+;(-n8_?V!A|AFGeY!nx1*e|Ded25P$@Nd1d z_#SV3OZV1KYcCAeh7Q;bJXwW;opVR4wX!csPRO7=v8oPfUrpLWeg*8)zj`D;4;v93ofMrI9sQ7v%n36Slr5JnRnz2EYPzdB zq18wCzFqq2CfCiSEJT!3+Sj99ps2DK#)cuCsGRRs%OXc;ipIPktgV!z(ck>uwI(qu&!u%FPnFxy?ru;Wz zgL!P1!U?L4T&bEs%?=PpQSjO(ShCZq`4g2Q2;hK&S50P!FqxvL8;UN8LQqlLs6TkA|##4dP0fjc>J0p0< z>h5b~tM63fEp>mxQl?fv2c&xkJ< zy#o&y{!Xv9w<2+1;t^?_!r)bpA)90~AmUR<3QUODnh~ZY>=xD!VgnI^P@RUk*t+;g zB7Wi{be7$$3gV1I8}a!f9i>0p$MxoP!eZ%L>rd6Azt|xn|F^`Odpr zkP(kaL)DG9_BNH@bzu{#O`QyeFM=;*010Mbb93P-7U3<3^}~Cs--6xjBevas+hm1M zMvSR`w1^VEXH^#)tBz{>1E*m?ac0eKtuk~6Be!lH)z%9x!uqE}la=CzEbjFZr9nIP>+U*G)g_2Bgl&73g&8`**f-K^RW-X_u{3t*;RJsFXzQZwa#luUx=$%E8(q#VPbzgl1HGnMvv z&{V>gYx#SM=9-_;760=_K2i6jHI*e|-tdfguK{>jGpA|3Y2SM~AjS=DG8twegK zvZ`L1)rIW#If>py{7E|F2W`HfT zS&-sFig0EgB5^l=RS#3DdSAl4w$r}K)}dW@s=W@j_O1OM;r6IrQae-FdW^xs#3z3d zVo^P;a`dU{U|k(7OLg2jp5)eLb<(2>U*m3FS0|lpy21!Ar9ugLcDx`Fbrf!r@F>fb zwyGa9P&u$<)>A#p=4OKX`rjVzs{_}GN2H#=ao=y;$J}q>zII$&56d5&ByW?rgxGgdQzlq!d;kel}1TnaIM79*7D6(yZN#Swa(=wFCC*Wv%0e*zIGvtTXj0jBYW4 zfTI(V;2Of|4z$g2qeVXinRcCMfiJOY)~}l8it5+rZOkj8yY+0lZE-MuSU1&maADa9 zG4s()4ZVh0I(oI!GVJ-iKQ z%i;M~c|NYPYe{<>3Y>fQsEuVk&u5IUFP?wsb4S(U!4n^$u_+4cKA418K8UDuyav}? z6^=LIe@>GY2!TDW$xY=d94{G3-vfG=`+!!2VmuZ#t?tlw(1PC|dLFx^6tsSrqg7&B zxgHO0!-oS{lN7~_V%)et8)oC~q>)~#>iz71*}`I>P}so8b9MY~rzk0r;}uk|=H6ng zXd71SX|rjzFsI&xl}C0Q+;AHt=O^_rd}a3^F9av1tawg7{w2&0pl82^Qn}P5)&SnI z>a_)hPfkzWI(Hu?b{znsM4QWY?zCR}HtVlr4Bu1h)ojij%H7@bkmvd9J3wxoXdYEq@{7WW3)a74 zEi5T4%gnRpy(O)2q;~ELyh6y1D>H1$6;!EmVBZGve?!>3t7%XGBw8WXSoLo zz)8nui@#A!#F#4@7V;-H=2Ns>kD&Zev4PT!pp~^TVjAGR{$xzPRil1|z45y1vs*_% z?Y(gLy)@p{bbFPW$_C*Om0SjGQ2$TQNvLpje64=j>>n%2o-A9M;@iM(-3s8s|49Q3=?1X&!FYpF!>DEK#8LM*g(=%Uz*H+EpW$Ml-GFB%Dw@u!{m!Fo8-hgXZz0lZVt`5RGFvjU};vl|3j8 zKW&dyAAroXWZ9wxw;$H^HQ?mgsq8`(K@)VL?ZO1=y#gAzM(>}88Lc6lyu~x+UjCXs z7=U`LN*sg95zE>mpi7HgrrGVWa9XY1&)ZcZ$-8CQV}=|9W~!5AYbr=;XqGFc!J7cv z&=~#{y*eGnq7-Q~zbLF1N`$#Wo}h%sWMQ3fGT{?bUVYE3aq10*mLKk){k@86GayNJ z&j5=^mHQxuI&W~sx?^5Ty%)iR+s;e?iKtG)<(tS+wWWgn!u#0K6j~6gp4VYvHFa4VV;I=o|>1YEyiI#3NHhh~;?m@_x^NrvS z^kf5EgpZZO+Cs@jNTqTIoN0C>i0zBvX;Fz$vM%9e09oU7hWCKTx)gG>b|zDNEZMUZ zE{QtW&J3lHd*{Ju`gS?IAT|0JWL*K-idNaP0`!4cHvW`Slw4~Q`L2arpDa%dX%L>Y)iLY1_|=~ zvs^RfVv}h1)&$o?_bSoe3cJ*6a&t4ECU8R5@WdZmK>}K72Oa4?hP(8aQ}7n8I1Cor z)e4*Fy~A*wZaCpBoDpOp%@Ig+?d*IN{;!HnT(Lv3G3aNs@*w!rzYjv_@WMq-D3?~` z<`&qUP(%Dj4HnU&&)^6;oa1TyS!jeJ9G$a_R=0wIPM%}OpFIojP@jQ) z=TjVk6+t60BDfG22L6lge+)A*V^O5+sE0L=JvL;1Y_ZcLrabzORLqj&^kSUE(WpUpq(p;Hh)=ch3kf^> JN|cfu@?VaGSx*1}