/*************************************************************************\
* "$RCSfile: CCamFeatures.hpp,v $"                                        *
***************************************************************************
* Information by CVS or VSS:                                              *
*     Last check in on: $Date: 2009/10/15 13:21:15 $                      *
*     by                $Author: schluckebier $
*     Revision        : $Revision: 1.3 $                                 *
\*************************************************************************/
/*! \file CCamFeatures.hpp
*	\brief Header CCamFeatures class
**************************************************************************/

/*************************************************************************/
/*! @brief Camera features class

	Handles a list with all camera features.
**************************************************************************/
class CCamFeatures
{
private:
	CCamFeatures();
	~CCamFeatures();
	static CCamFeatures *m_pThis;

public:
	static CCamFeatures *CreateInstance();
	//! Gets CCamFeatures instance.
	static CCamFeatures *GetInstance() { return m_pThis; }
	static void DisposeInstance();

	void UpdateAllFeatures();
	void ApplyCamDlg(int Id);

	//! Returns Status line value.
	int GetStatusLineValue() const { return m_pStatusLine->GetValue(); }
	//! Returns camera feature list.
	CFeature **GetFeatureList() { return m_FeatList; }

	int m_ExpV;						//!< Value of exposure time \e EditBox
	int m_FrameTV;					//!< Value of frame time \e EditBox
	int	m_FineGainV;    		 	//!< Value of Fine gain \e EditBox
	CFeature *m_pExposureTime;		//!< Exposure time
	CFeature *m_pFrameTime;			//!< Frame time
	CFeature *m_pTriggerCFR;		//!< Constant frame rate mode (1 = enable)
	CFeature *m_pMROIIndex;			//!< Index of MROI parameter-set
	CFeature *m_pMROIY;				//!< Y-Position of MROI(index)
	CFeature *m_pMROIH;				//!< Height of MROI(index)
	CFeature *m_pMROIHtot;			//!< Height of all MROI, calculated by camera

	CFeatureWindow *m_pEnLinescanHighSpeedMode;  //!< FrameCombine enable
	CFeatureWindow *m_pFrameCombineEnable;	      //!< FrameCombine enable
	CFeatureWindow *m_pFrameCombineNrOfFrames;	  //!< FrameCombine NrOfFrames
	CFeature *m_pFrameCombineTimeout;	  //!< FrameCombine Timeout value
	CFeature *m_pFrameCombineForceTimeout; //!< FrameCombine Timeout value

	CFeature *m_pTriggerDelay;		//!< Trigger delay
	CFeature *m_pTriggerDivisor;	//!< Trigger encoder divisor
	CFeature *m_pTriggerInvert;		//!< Flag to invert trigger signal
	CFeature *m_pTriggerLevelControlled;	//!< Flag if exposure time is controlled via trigger pulse width
	CFeature *m_pStrobeDelay;		//!< Delay of strobe output base on the trigger signal
	CFeature *m_pStrobePulseWidth;	//!< Pulse width of strobe signal
	CFeature *m_pStrobeInvert;		//!< Invert strobe signal
	CFeature *m_pStrobeOutput;		//!< Selects strobe output
	CFeature *m_pDataOutMode;		//!< Data out mode: Normal, Ramp, LUT, ...
	CFeature *m_pDigitalGain;		//!< Digital gain mode: Gain1, Gain2, Gain4 (this means a bit shift of 0, 1 or 2)
	CFeature *m_pAnalogGain;		//!< Analog gain mode
	CFeature *m_pDigitalOffset;  	//!< Digital data offset
	CFeature *m_pFineGain;       	//!< FineGain
	CFeature *m_pLUTMode;			//!< LookUpTable mode: Gain or Gamma
	CFeature *m_pLUTValue;			//!< Value to calculate LUT (Gamma or gain)
	CFeature *m_pLUT0Enable;		//!< LookUpTable0: Enable
	CFeature *m_pLUT0Mode;			//!< LookUpTable0: Mode
	CFeature *m_pLUT0Value;			//!< LookUpTable0: Value
	CFeature *m_pLUT1Enable;		//!< LookUpTable1: Enable
	CFeature *m_pLUT1Mode;			//!< LookUpTable1: Mode
	CFeature *m_pLUT1Value;			//!< LookUpTable1: Value
	CFeature *m_pLUTIndex;			//!< LookUpTable: Index
	CFeature *m_pLUTFileRead1;		//!< Value to open a LUT file
	CFeature *m_pLUTFileSave1;		//!< Value to save a LUT file
	CFeature *m_pLUTEnRegionLUT;	//!< LookUpTable: Enable RegionLUT
	CFeature *m_pLUT0X;				//!< LookUpTable0: ROI x-position
	CFeature *m_pLUT0W;				//!< LookUpTable0: ROI width
	CFeature *m_pLUT0Y;				//!< LookUpTable0: ROI y-position
	CFeature *m_pLUT0H;				//!< LookUpTable0: ROI height
	CFeature *m_pLUT0Max;			//!< LookUpTable0: ROI set ROI to max
	CFeature *m_pLUT1X;				//!< LookUpTable1: ROI x-position
	CFeature *m_pLUT1W;				//!< LookUpTable1: ROI width
	CFeature *m_pLUT1Y;				//!< LookUpTable1: ROI y-position
	CFeature *m_pLUT1H;				//!< LookUpTable1: ROI height
	CFeature *m_pLUT1Max;			//!< LookUpTable1: ROI set ROI to max
	CFeature *m_pLinlogMode;		//!< LinLog mode: Off, low compression, normal compression, high compression
	CFeature *m_pLinlogValue1;		//!< LinLog value 1
	CFeature *m_pLinlogValue2;		//!< LinLog value 2
	CFeature *m_pLinlogTime1;		//!< LinLog time 1
	CFeature *m_pLinlogTime2;		//!< LinLog time 2
	CFeature *m_pSkim;				//!< Skimming value: 0 = off, 1 = high, 8 = low
	CFeature *m_pMultislopeMode;	//!< Multislope mode: Off, low compression, normal compression, high compression
	CFeature *m_pMultislopeNrSlopes;	//!< Multislope Nr of Slopes
	CFeature *m_pMultislopeValue1;	//!< Multislope value 1
	CFeature *m_pMultislopeValue2;	//!< Multislope value 2
	CFeature *m_pMultislopeTime1;	//!< Multislope time 1
	CFeature *m_pMultislopeTime2;	//!< Multislope time 2
	CFeature *m_pBlacklevelOffset;	//!< Black level offset
	CFeature *m_pTriggerInterleave;	//!< Interleaved trigger mode accept a trigger during read out
	CFeature *m_pConvolverEnable;	//!< Convolver enable
	CFeature *m_pConvolverPresets;	//!< Convolver presets
	CFeature *m_pConvolverOffset;	//!< Convolver offset
	CFeature *m_pConvolverScale;	//!< Convolver scale
	CFeature *m_pConvolverCoeff0;	//!< Convolver Coeff0
	CFeature *m_pConvolverCoeff1;	//!< Convolver Coeff1
	CFeature *m_pConvolverCoeff2;	//!< Convolver Coeff2
	CFeature *m_pConvolverCoeff3;	//!< Convolver Coeff3
	CFeature *m_pConvolverCoeff4;	//!< Convolver Coeff4
	CFeature *m_pConvolverCoeff5;	//!< Convolver Coeff5
	CFeature *m_pConvolverCoeff6;	//!< Convolver Coeff6
	CFeature *m_pConvolverCoeff7;	//!< Convolver Coeff7
	CFeature *m_pConvolverCoeff8;	//!< Convolver Coeff8
	CFeature *m_pCorrectionMode;	//!< Image correction mode: Off, Gain, Offset+Gain, ...
	CFeature *m_pCorrectionValidationBlack;	//!< Image correction validation black
	CFeature *m_pCorrectionSetBlackRef;	//!< Image correction black
	CFeature *m_pCorrectionValidationGrey;//!< Image correction validation grey
	CFeature *m_pCorrectionSetGreyRef;	//!< Image correction grey
	CFeature *m_pCorrectionCalculate;	//!< Calculate image correction
	CFeature *m_pCorrectionSaveToFlash;	//!< Save image correction data to flash
	CFeature *m_pColCorrectionEnable;	//!< Image Colcorrection
	CFeature *m_pColCorrectionCalculate;	//!< Calculate image col correction
	CFeature *m_pColCorrectionSaveToFlash;	//!< Save image col correction data to flash
	CFeature *m_pInfoTypecode;		//!< Camera information: Type code
	CFeature *m_pInfoSerial;		//!< Camera information: Serial
	CFeature *m_pInfoFPGASensor;	//!< Camera information: FPGA Sensor
	CFeature *m_pInfoFPGAAdc;		//!< Camera information: FPGA Adc
	CFeature *m_pInfouC;			//!< Camera information: uC
	CFeature *m_pStoreDefaults;		//!< Store current values in camera module flash
	CFeature *m_pAverageValue;		//!< Average gray value read from camera module status line
	CFeature *m_pFactoryReset;		//!< Average gray value read from camera module status line
	CFeature *m_pStatusLine;		//!< Status line in camera
	CFeature *m_pFlipImage;			//!< Flip image
	CFeature *m_pPSCSerial;			//!< Serial number of PSC
	CFeature *m_pDSPModuleSerial;	//!< Serial number of DSP-Module
	CFeature *m_pAlteraFPGA;		//!< Serial number of Altera FPGA
	CFeature *m_pMacAddr;			//!< MAC address
	CFeature *m_pLineCamMode;		//!< Line camera mode
	CFeature *m_pLSImageHeight;		//!< Line-scan image height
	CFeature *m_pCameraName;		//!< Camera name
	CFeatureWindow *m_pWindowX;		//!< X-position of camera module ROI
	CFeatureWindow *m_pWindowY;		//!< Y-position of camera module ROI
	CFeatureWindow *m_pWindowW;		//!< Width of camera module ROI
	CFeatureWindow *m_pWindowH;		//!< Height of camera module ROI
	CFeatureWindow *m_pDecimationY;	//!< Decimation (1 <=> every line is grabbed, 2 <=> one of two lines is grabbed, ...)
	CFeatureWindow *m_pMROIEnable;	//!< Flag enable Multi Regions Of Interest MROI
	CFeatureTrigger *m_pTriggerSource;//!< Trigger source
	CFeatureResolution *m_pDataResolution;	//!< Resolution: 8 bit, 10 bit, 12 bit

protected:
	CFeature *m_FeatList[CFeature::MAXPROPERTIES];	//!< List of all features
};

/*************************************************************************/
