⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 smsctrllib.h

📁 组拨技术
💻 H
📖 第 1 页 / 共 4 页
字号:
typedef struct UTC_TIME_S
{
	UINT16	UTC_Date;				//!< Date, MJD (by annex C)
	UINT8	UTC_Time[3];			//!< BCD Time (Hour, minute and seconds)
}UTC_TIME_ST;

/// Local time offset descriptor structure
typedef struct TIME_OFFSET_S
{
	UINT8		country_code[3];			//!< Country code, ISO 3166
	UINT8		country_region_id;			//!< In-Country region code, 6 bit, Least bit alignment
	UINT8		local_time_offset_polarity;	//!< Time offset polarity to the Greenwich, 1 bit, Least bit alignment
	UINT16		local_time_offset;			//!< Time offset 
	UTC_TIME_ST	time_of_change;				//!< See #UTC_TIME_ST
	UINT16		next_time_offset;			//!< BCD Time (Hour, minute)
}TIME_OFFSET_ST;

/// A struct that describes an SMS device
/// Returned by GetDevicesList, and used by the client for opening a device

typedef struct SmsHostApiDeviceData_S 
{
	// A string identifying this device
	char						DeviceName[SMS_HOST_MAX_DEVICE_NAME_STRING_LEN] ;
	// A logical name exposed to the user
	char						NickName[SMS_HOST_MAX_DEVICE_NICK_NAME_LEN];
	// Is device initialized (by the application)
	BOOL						IsDeviceInit ;
	// Is device connected to the host
	BOOL						IsDeviceConnected ;
	// Device handle - for non-initialized device, the value is SMS_INVALID_DEVICE_INSTANCE_HANDLE
	SmsHostApiDeviceHandle		DevHdl;													
	// Device mode - for non-initialized device, the value is SMSHOSTLIB_DEVMD_NONE
	SMSHOSTLIB_DEVICE_MODES_E	DeviceMode;												
} SmsHostApiDeviceData_ST ;


// Default APIs set is the single instance API (backward compatible)
#if !defined(SMSHOSTLIB_SINGLE_DEVICE_API) && !defined (SMSHOSTLIB_MULTI_DEVICE_API)
	#define SMSHOSTLIB_SINGLE_DEVICE_API
#endif

#ifdef SMSHOSTLIB_SINGLE_DEVICE_API
/*************************************************************************
*			 Library and and receiver initialization, termination,
*            and power management API
**************************************************************************/

/** @defgroup group1 General and Power Management APIs
 *  @{
 */

/*!
	Initiates the SMS host library.
	
	\param[in]	pCtrlCallback	Control callback function, should be of type #SmsCtrlCbFunc
	\param[in]	pInitLibParams	Library initialization information, according to #SMSHOSTLIB_INITLIB_PARAMS_ST structure

	\return		Error code by  #SMSHOSTLIB_ERR_CODES_E enumerator.
	
	\remark		This command execution is synchronous.
*/
SMSHOSTLIB_ERR_CODES_E SMSHOSTLIB_API 
	SmsHostLibInitEx(	SmsCtrlCbFunc					pCtrlCallback,
						SMSHOSTLIB_INITLIB_PARAMS_ST*	pInitLibParams);

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

/*!
	Terminates the SMS host library.

	\return		Error code by  #SMSHOSTLIB_ERR_CODES_E enumerator.

	\remark		This command execution is synchronous.
*/
SMSHOSTLIB_ERR_CODES_E SMSHOSTLIB_API 
	SmsHostLibDeinit( void );

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

/*!
	Host requests the device to initialize. 
	Device performs initialization operations but does not output any data yet.
	
	\param[in] DeviceMode	Work mode, according to #SMSHOSTLIB_DEVICE_MODES_E enumerator
	\param[in] pSwImage		Pointer to the SW image
	\param[in] SwImageSize	Size of the SW image
	\param[in] Crystal		Supplied clock's frequency

	\return		Error code by  #SMSHOSTLIB_ERR_CODES_E enumerator.

	\remark		This command execution is asynchronous, the callback given at
				\c SmsHostLibInit() is executed when a response is available.
				
	\see		Response type is SMSHOSTLIB_MSG_INIT_DEVICE_RES. \n
				There are no supplementary parameters in the response.
*/	
SMSHOSTLIB_ERR_CODES_E SMSHOSTLIB_API 	
	SmsHostInitDevice_Req(	SMSHOSTLIB_DEVICE_MODES_E	DeviceMode, 
							UINT8*						pSwImage,	
							UINT32						SwImageSize,
							UINT32 						Crystal );

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


/** 
 *  @}
 */
 
/** @defgroup group2 Information and Statistics Retrieval APIs
 *  @{
 */

/*************************************************************************
*			 Information and Statistics Retrieval APIs
*************************************************************************/

/*!
	Requests version information from the device and the library.

	\return		Error code by  #SMSHOSTLIB_ERR_CODES_E enumerator.

	\remark		This command execution is asynchronous, the callback given at
				\c SmsHostLibInit() is executed when a response is available.
				
	\see		Response type is SMSHOSTLIB_MSG_GET_VERSION_RES. \n
				The response includes the supplementary structure SMSHOSTLIB_VERSION_INFO_ST. 
*/	
SMSHOSTLIB_ERR_CODES_E SMSHOSTLIB_API
	SmsHostGetVersion_Req( void );

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

/*!
	Requests statistics indications.

	\return		Error code by  #SMSHOSTLIB_ERR_CODES_E enumerator.

	\remark		This command execution is asynchronous, the callback given at
				\c SmsHostLibInit() is executed when a response is available.

	\see		Response type is SMSHOSTLIB_MSG_GET_STATISTICS_RES \n
				The response includes the supplementary structure SMSHOSTLIB_STATISTICS_ST. 
*/
SMSHOSTLIB_ERR_CODES_E SMSHOSTLIB_API 
	SmsHostGetStatistics_Req( void );

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

/*!
	Requests reception quality.

	\return		Error code by  #SMSHOSTLIB_ERR_CODES_E enumerator.

	\remark		This command execution is asynchronous, the callback given at
				\c SmsHostLibInit() is executed when a response is available.

	\see		Response type is SMSHOSTLIB_MSG_GET_RECEPTION_RES \n
				The response includes the supplementary integer (UINT32) that represents
				the reception quality in the range 0-6 :
				0 - Unknown (modem is not lock, etc.)
				1 - Fail	
				2 - Poor
				3 - Average
				4 - Good
				5 - Excellent
*/
SMSHOSTLIB_ERR_CODES_E SMSHOSTLIB_API 
	SmsHostGetReceptionQuality_Req( void );

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

/** 
 *  @}
 */

/** @defgroup group3 Tune and Scan APIs
 *  @{
 */
	
/*************************************************************************
*			 Tune and Scan APIs
*************************************************************************/

/*!
	Requests the SMS1000 to tune to a specific frequency
	
	\param[in] Frequency	Frequency Frequency (Hz)
	\param[in] Bandwidth	Bandwidth, according to #SMSHOSTLIB_FREQ_BANDWIDTH_ET 
							enumerator (applicable only for DVB-T/H, ignored for DAB/DMB)

	\return		Error code by  #SMSHOSTLIB_ERR_CODES_E enumerator.

	\remark		This command execution is asynchronous, the callback given at
				\c SmsHostLibInit() is executed when a response is available.

	\see		Response type is SMSHOSTLIB_MSG_TUNE_RES \n
				There are no supplementary parameters in the response.
*/	

SMSHOSTLIB_ERR_CODES_E SMSHOSTLIB_API
	SmsHostTune_Req(	UINT32						Frequency,	 /* frequency in Hz */
						SMSHOSTLIB_FREQ_BANDWIDTH_ET	Bandwidth);	 /* bandwidth */

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

/*!
	Requests the SMS1000 to perform a scan operation

	\param[in] ScanType				Type of scan, according to #SMSHOSTLIB_SCAN_ANALYSE_TYPE_ET enumerator
	\param[in] FreqBandwidth		Bandwidth, according to #SMSHOSTLIB_FREQ_BANDWIDTH_ET
	\param[in] ParamsType			Defines if we scan according to range of frequencies, or by given table. See #SMSHOSTLIB_SCAN_PARAM_STD_ET.
 	\param[in] pFreqBuff			Buffer contains either #SMSHOSTLIB_SCAN_TABLE_ST structure or 
									#SMSHOSTLIB_SCAN_RANGE_ST structure (according to ParamsType)

	\return		Error code by  #SMSHOSTLIB_ERR_CODES_E enumerator.

	\remark		This command execution is asynchronous, the callback given at
				\c SmsHostLibInit() is executed when a response is available.

	\see		Response type is SMSHOSTLIB_MSG_SCAN_START_RES \n
				The response includes the supplementary boolean representing the start operation status

	\note		
				-# This API is supported only for DVB-H and DAB/DMB. It is not supported in DVB-T.
				-# In DAB/DMB there is a limit of maximum DAB_MAX_MULTIPLEXES supported active ensembles in parallel.
				In case scan encounters more than DAB_MAX_MULTIPLEXES active ensembles it indicates failure for the rest of the frequencies. \n
				-# If N frequencies are scanned, the function returns N-1 times SMSHOSTLIB_SCAN_PROGRESS_IND,
				and than one time SMSHOSTLIB_SCAN_COMPLETE_IND.

*/	
SMSHOSTLIB_ERR_CODES_E SMSHOSTLIB_API SmsHostScanStart_Req( SMSHOSTLIB_SCAN_ANALYSE_TYPE_ET	ScanType,
															SMSHOSTLIB_FREQ_BANDWIDTH_ET	FreqBandwidth,
															SMSHOSTLIB_SCAN_PARAM_STD_ET	ParamsType,
															void*							pFreqBuff );

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

/*!
	Requests the SMS1000 to stop a scan operation

	\return		Error code by  #SMSHOSTLIB_ERR_CODES_E enumerator.

	\remark		This command execution is asynchronous, the callback given at
				\c SmsHostLibInit() is executed when a response is available.

	\see		Response type is SMSHOSTLIB_MSG_SCAN_STOP_RES \n
				
	\note		SMSHOSTLIB_SCAN_PROGRESS_IND and SMSHOSTLIB_SCAN_COMPLETE_IND may be received  
				between the stop request and the stop asynchronous response.
*/	

SMSHOSTLIB_ERR_CODES_E SMSHOSTLIB_API SmsHostScanStop_Req( void );

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

/** 
 *  @}
 */

/** @defgroup group4 DVB APIs
 *  @{
 */

/************************************************************************
*			 DVB APIs
*************************************************************************/

/*!
	Requests to add PID to PID filters list.
	
	\param[in]	PID Program ID.

	\return		Error code by  #SMSHOSTLIB_ERR_CODES_E enumerator.

	\remark		This command execution is asynchronous, the callback given at
				\c SmsHostLibInit() is executed when a response is available.

	\see		Response type is SMSHOSTLIB_MSG_ADD_PID_FILTER_RES \n
				The response inculdes the supplementary integer (UINT32) that represents
				the Stream Device handle number.
*/				
SMSHOSTLIB_ERR_CODES_E SMSHOSTLIB_API 
	SmsHostAddPidFilter_Req( UINT32 PID );

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

/*!
	Requests to remove PID from PID filters list.
	
	\param[in]	PID PID.

	\return		Error code by  #SMSHOSTLIB_ERR_CODES_E enumerator.

	\remark		This command execution is asynchronous, the callback given at
				\c SmsHostLibInit() is executed when a response is available.

	\see		Response type is SMSHOSTLIB_MSG_REMOVE_PID_FILTER_RES \n
				There are no supplementary parameters in the response.

*/	
SMSHOSTLIB_ERR_CODES_E SMSHOSTLIB_API 
	SmsHostRemovePidFilter_Req( UINT32 PID );

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

/*!
	Requests PID filters list.
	
	\param[in]	MaxPidNum	The maximum number of PIDs may reported (Maximum buffer length).
	\param[out]	pActNum		The actual number of reported PIDs
	\param[out]	pPidList	Buffer of reported filtered PIDs
	
	
	\return		Error code by  #SMSHOSTLIB_ERR_CODES_E enumerator.

	\remark		This command execution is asynchronous, the callback given at
				\c SmsHostLibInit() is executed when a response is available.

	\see		Response type is SMSHOSTLIB_MSG_RETRIEVE_PID_FILTER_LIST_RES

	\note		The maximum length of the PID filters list is 
				defined as #SMSHOSTLIB_MAX_FILTERS_LIST_LEN. 				
*/	

SMSHOSTLIB_ERR_CODES_E SMSHOSTLIB_API
	SmsHostRetrievePidFilterList_Req(	UINT32		MaxPidNum,
										UINT32*		pActNum,		

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -