/*! Time-stamp: <@(#)ATBoardTunDVBSS2.h   07/05/2007 - 15:46:04   P.Hoogervorst>
*********************************************************************
*  @file   : ATBoardTunDVBSS2.h
*
*  Author  : P.Hoogervorst                              Date: 07/05/2007
*
*  Purpose : Implementation of methods for class 
*
*********************************************************************
* Version History:
*
* V 0.10  07/05/2007  BN : First Revision
*
*********************************************************************
*/

#ifndef __ATBOARD_TUN_DVBSS2_H__
#define __ATBOARD_TUN_DVBSS2_H__

/**********************************************************************************************************/
// includes
#include "ATBoardPlayRec.h"

class CATBoardTunDVBSS2 : public CATBoardPlayRec
{
public:
	CATBoardTunDVBSS2(void);
public:
	virtual ~CATBoardTunDVBSS2(void);

public:

    /*!
     * Do the one time initialize and reset of the tuner. Is done once at startup.
     *
	 * @return BOOL  : TRUE on success, else FALSE
     */
	BOOL Init();

    /*!
     * Set the tuner.
     *
	 * Valid settings:
	 *	nFreq:					950-2150MHz in 62.5kHz steps
	 *	nSymbolRate:			1-40MSymb/s
	 *
     * @param nFreq	: Tuning frequency (in Hz)
	 * @param nSymbolRate :	symbol rate in Symbols per second 
     * @param LNBTone : Set LNB 22kHz tone
	 * @param LNBVolt : Set LNB voltage
	 * @param LNBHighVolt : Set LNB +1Volt for long cable compensation
     *
	 * @return BOOL  : TRUE on success, else FALSE
     */
	BOOL Set(	u32					nFreq,
				u32					nSymbolRate,
				src_sec_tone_mode_t	LNBTone,
				src_sec_voltage_t	LNBVolt,
				BOOL				LNBHighVolt);

    /*!
     * Get status from the tuner.
	 * If bInSync, bCarrierDetect, bSigDet and bViterbiDet are high: then the tuner has properly locked
	 * to the input signal.
     *
	 * @param bInSync : TRUE: Tuner is in sync, FALSE: Tuner is not in sync
	 * @param bCarrierDet : TRUE: Tuner has detected a carrier, FALSE: Tuner has not detected a carrier
	 * @param bLock : TRUE: Tuner is locked, FALSE: Tuner did not lock.
     * @param nSignalStrength : Get the tuner signal strength. 
	 * @param nSnr : Get the tuner signal to noise ratio. 
     * @param nBer : Get the tuner bit error rate
	 * @param Mode : Get the DVB Mode. (DVB-S or DVB-S2)
     * @param Modulation : Get the modulation type. (QPSK, PSK8, APSK16 or APSK32)
	 * @param Fec : Get the FEC code rate (1/2, 2/3, 3/4, 4/5, 5/6, 6/7, 7/8, 8/9, 9/10, 1/4, 1/3, 2/5 or 3/5)
	 * @param FiltRollOff : Get the filter roll off status (20%, 25% or 35%)
	 * @param bPilots : Pilots on/off
	 * @param bLongFrame : Longframe on/off
	 * @param bInversion : Inversion on/off
     *
	 * @return BOOL  : TRUE on success, else FALSE
     */
	BOOL Get(	BOOL &bInSync,
				BOOL &bCarrierDet,
				BOOL &bLock,
				s32 &nSignalStrength,
				s32 &nSnr,
				u32 &nBer,
				src_dvbs_mode_t &Mode,
				src_modulation_t &Modulation,
				src_code_rate_t &Fec,
				src_filter_rolloff_t &FiltRollOff,
				BOOL &bPilots,
				BOOL &bLongFrame,
				BOOL &bInversion); 
};

#endif //__ATBOARD_TUN_DVBSS2_H__
