Files
EF3-Interface/PcDmis/Base/Interfac/Msi/Hsi/MicroVu/HAL_OPTICS.CPP
T
2013-05-09 20:29:54 +08:00

119 lines
3.8 KiB
C++

#include "stdafx.h"
#include "Hal.h"
#include "HSI.h"
extern CMv_Proto *g_pMv_Proto;
extern CHALMicroVuExt g_HSIExt; // basic configuration data
#ifdef _DEBUG
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#define new DEBUG_NEW
#endif
extern CHAL *g_pHSI;
bool IsZoomCell(void)
{
return ((g_pHSI->Optics.GetSupported() & HAL_OPTICS_SUPPORTS_FIXED_LENS)==0);
}
//***********************************************************************************************
//
//***********************************************************************************************
HAL_STATUS HAL_Optics_Startup ( COpticalCalibrationData *OptCalData)
{
HAL_STATUS retVal=HAL_STATUS_NORMAL;
//call startup in WAI_OPTICS.DLL
if(g_HSIExt.g_lpfnWAIOpticsStartup)
retVal=g_HSIExt.g_lpfnWAIOpticsStartup(OptCalData);
return retVal;
}
//***********************************************************************************************
//
//***********************************************************************************************
HAL_STATUS HAL_Optics_Shutdown ( )
{
HAL_STATUS retVal=HAL_STATUS_NORMAL;
//call shutdown in WAI_OPTICS.DLL
if(g_HSIExt.g_lpfnWALOpticsShutdown)
retVal=g_HSIExt.g_lpfnWALOpticsShutdown();
return retVal;
}
//***********************************************************************************************
//
//***********************************************************************************************
HAL_STATUS HAL_Optics_IsLaserEnabled(bool &)
{
return HAL_STATUS_NORMAL;
}
//***********************************************************************************************
//
//***********************************************************************************************
HAL_STATUS HAL_Optics_EnableLaser(bool)
{
return HAL_STATUS_NORMAL;
}
//***********************************************************************************************
//
//***********************************************************************************************
HAL_STATUS HAL_Optics_IsGridEnabled(bool &)
{
return HAL_STATUS_NORMAL;
}
//***********************************************************************************************
//
//***********************************************************************************************
HAL_STATUS HAL_Optics_EnableGrid(bool)
{
return HAL_STATUS_NORMAL;
}
//***********************************************************************************************
//
//***********************************************************************************************
HAL_STATUS HAL_Optics_SetScalePosition(long lScale, bool bWait)
{
UNREFERENCED_PARAMETER(bWait);
g_pMv_Proto->mv_optics_set_scale_position(lScale);
return HAL_STATUS_NORMAL;
}
//***********************************************************************************************
//
//***********************************************************************************************
HAL_STATUS HAL_Optics_GetScalePosition(long &lScale)
{
g_pMv_Proto->mv_optics_get_scale_position(lScale);
return HAL_STATUS_NORMAL;
}
//***********************************************************************************************
//
//***********************************************************************************************
HAL_STATUS HAL_Optics_GetScaleRange(long &lMaxMagScale,long &lMinMagScale)
{
g_pMv_Proto->mv_optics_get_scale_range(lMaxMagScale, lMinMagScale);
return HAL_STATUS_NORMAL;
}
//***********************************************************************************************
//
//***********************************************************************************************
HAL_STATUS HAL_Optics_IsSupported(unsigned int &IsSupported)
{
IsSupported = true;
return HAL_STATUS_NORMAL;
}