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

📄 smsctrllib.h

📁 组拨技术
💻 H
📖 第 1 页 / 共 4 页
字号:
/*************************************************************************/
/*                                                                       */
/* Copyright (C) 2005,2006 Siano Mobile Silicon Ltd. All rights reserved */
/*                                                                       */
/* PROPRIETARY RIGHTS of Siano Mobile Silicon are involved in the        */
/* subject matter of this material.  All manufacturing, reproduction,    */
/* use, and sales rights pertaining to this subject matter are governed  */
/* by the license agreement.  The recipient of this software implicitly  */
/* accepts the terms of the license.                                     */
/*                                                                       */
/*                                                                       */
/*************************************************************************/

/*************************************************************************/
/*                                                                       */
/* FILE NAME                                                             */
/*                                                                       */
/*      SmsCtrlLib.h		                                             */
/*                                                                       */
/* COMPONENT                                                             */
/*                                                                       */
/*      Siano Host Control Library API									 */
/*                                                                       */
/* DESCRIPTION                                                           */
/*                                                                       */
/*************************************************************************/

#ifndef SMS_CTRL_LIB_H
#define SMS_CTRL_LIB_H

#ifdef __cplusplus
extern "C" {
#endif

#if defined(OS_WIN32) || defined(OS_WINCE)
	#ifdef SMSHOSTLIB_EXPORTS
		#define SMSHOSTLIB_API __declspec(dllexport)
	#else
		#define SMSHOSTLIB_API __declspec(dllimport)
	#endif
#else
	#define SMSHOSTLIB_API  
#endif

/*************************************************************************
*			 Defines
*************************************************************************/

#define SMSHOSTLIB_MAX_LABEL_SIZE 							(  16 )
#define SMSHOSTLIB_MAX_SCAN_FREQ 							(  10 )
#define SMSHOSTLIB_MAX_FILTERS_LIST_LEN 					(  32 )
#define SMSHOSTLIB_DAB_MAX_SERVICES							(  15 )
#define SMSHOSTLIB_DAB_MAX_SERVICE_COMPONENTS_IN_SERVICE	(   4 )
#define SMSHOSTLIB_MAX_NUM_LOG_PARAMETERS                   (   8 )
#define SMSHOSTLIB_MAX_USER_APPLICATIONS					(  12 )	//12 in V1.3.3; 6 in V1.4.1
#define SMSHOSTLIB_MAX_LEN_OF_APPLICATION_DATA				(  24 )  //the spec defines it as 23, we round it to a byte resolution
#define SMSHOSTLIB_MAX_DATE_N_TIME_SIZE						(   6 )	//the date and time maximum length
#define SMSHOSTLIB_MAX_LOG_STRING_SIZE						( 300 )	//including ASCIZ
#define SMSHOSTLIB_MAX_MODEM_VERSION_STRING_SIZE            ( 250 )	//including ASCIZ
#define SMSHOSTLIB_IP_PLAT_NAME_MAX_LEN						(  64 )
#define SMSHOSTLIB_IP_PLAT_LANGUAGE_MAX_VARIANT				(  10 )
#define SMSHOSTLIB_CURRENT_TABLE_ID							( 0xFFFFFFFF )

#define SMSHOSTLIB_MIN_VHF_FREQ								( 174000000 )
#define SMSHOSTLIB_MAX_VHF_FREQ								( 240000000 )
#define SMSHOSTLIB_MIN_UHF_FREQ								( 474000000 )
#define SMSHOSTLIB_MAX_UHF_FREQ								( 858000000 )
#define SMSHOSTLIB_MIN_L1_FREQ								( 1452000000 )
#define SMSHOSTLIB_MAX_L1_FREQ								( 1492000000 )
#define SMSHOSTLIB_MIN_L2_FREQ								( 1672500000 )
#define SMSHOSTLIB_MAX_L2_FREQ								( 1672500000 )

#define SMS_HOST_MAX_DEVICE_NAME_STRING_LEN					(256)
#define SMS_HOST_MAX_DEVICE_NICK_NAME_LEN					(64)
#define SMS_HOST_DVBT_SERVICE_DATA_HANDLE					(1)
#define SMS_INVALID_DEVICE_INSTANCE_HANDLE					( (SmsHostApiDeviceHandle)0xFFFFFFFF )

/*************************************************************************
*			 Enums
*************************************************************************/

/// Return Codes
typedef enum
{
	SMSHOSTLIB_ERR_OK							= 0x00000000,
	SMSHOSTLIB_ERR_PENDING						= 0x00000001,
	SMSHOSTLIB_ERR_UNDEFINED_ERR				= 0x80000000,
	SMSHOSTLIB_ERR_NOT_IMPLEMENTED				= 0x80000002,
	SMSHOSTLIB_ERR_NOT_SUPPORTED				= 0x80000003,

	SMSHOSTLIB_ERR_LIB_NOT_INITIATED			= 0x80000004,
	SMSHOSTLIB_ERR_LIB_ALREADY_INITIATED		= 0x80000005,
	SMSHOSTLIB_ERR_DEVICE_NOT_INITIATED			= 0x80000006,
	SMSHOSTLIB_ERR_COMM_NOT_VALID				= 0x80000007,
	SMSHOSTLIB_ERR_TASK_CREATION_FAILED			= 0x80000008,

	SMSHOSTLIB_ERR_INVALID_ARG					= 0x80000009,
	SMSHOSTLIB_ERR_LIST_FULL					= 0x8000000A,
	SMSHOSTLIB_ERR_DAB_LIB_INIT_FAILED			= 0x8000000B,
	SMSHOSTLIB_ERR_MEM_ALLOC_FAILED				= 0x8000000C,
	SMSHOSTLIB_ERR_TIMEOUT						= 0x8000000D,
	SMSHOSTLIB_ERR_FS_ERROR						= 0x8000000E,
	SMSHOSTLIB_ERR_HANDINIT_ERROR				= 0x8000000F,
	SMSHOSTLIB_ERR_ALREADY_EXIST				= 0x80000010,
	SMSHOSTLIB_ERR_SRV_IS_PLAYING				= 0x80000011,
	SMSHOSTLIB_ERR_ONLY_ONE_SRV_ALLOWED			= 0x80000012,
	SMSHOSTLIB_ERR_ONLY_DMB_SRV_ALLOWED			= 0x80000013,	

	SMSHOSTLIB_ERR_ENSEMBLE_NOT_EXIST			= 0x80000020,
	SMSHOSTLIB_ERR_COMPONENT_NOT_EXIST			= 0x80000021,
	SMSHOSTLIB_ERR_ALREADY_PLAYED				= 0x80000022,
	SMSHOSTLIB_ERR_PLAYING_ANOTHER_ENSEMBLE		= 0x80000023,
	SMSHOSTLIB_ERR_EXCEED_MAX_SERVICES			= 0x80000024,
	SMSHOSTLIB_ERR_NOT_SUPPORTED_TRANSMIT_MODE	= 0x80000025,
	SMSHOSTLIB_ERR_HANDLE_NOT_AVAIL				= 0x80000026,
	SMSHOSTLIB_ERR_MODEM_START_FAILED			= 0x80000027,
	
	SMSHOSTLIB_ERR_EXCEED_MAX_HANDLES			= 0x80000030,
	SMSHOSTLIB_ERR_HANDLE_INVALID				= 0x80000031,
	SMSHOSTLIB_ERR_MODEM_STOP_FAILED			= 0x80000032,
	
	SMSHOSTLIB_ERR_ALREADY_ACTIVE				= 0x80000040,
	SMSHOSTLIB_ERR_NOT_ACTIVE					= 0x80000041,
	SMSHOSTLIB_ERR_SRVM_RESPONSE_TIMEOUT		= 0x80000042,
	SMSHOSTLIB_TUNE_RESPONSE_TIMEOUT			= 0x80000043,
	SMSHOSTLIB_ERR_MODEM_NOT_LOCKED				= 0x80000044,
	SMSHOSTLIB_ERR_NO_SI_ACQ					= 0x80000045,
	SMSHOSTLIB_ERR_SRVM_UNDEFINED_ERR			= 0x80000046,
	SMSHOSTLIB_ERR_ENSEMBLE_IDX_EXCEED			= 0x80000047,
	SMSHOSTLIB_ERR_SERVICE_ACTIVE				= 0x80000048,
	SMSHOSTLIB_ERR_COMM_ERR						= 0x80000049,
	
	SMSHOSTLIB_ERR_DEVICE_DISCONNECTED			= 0x80000060,
	SMSHOSTLIB_ERR_DEVICE_DOES_NOT_EXIST		= 0x80000061

} SMSHOSTLIB_ERR_CODES_E;

/// Communication interface
typedef enum
{
	SMSHOSTLIB_COMM_UNDEFINED = -1,
	SMSHOSTLIB_COMM_UART,
	SMSHOSTLIB_COMM_USB,
	SMSHOSTLIB_COMM_SDIO,
	SMSHOSTLIB_COMM_SPI,
	SMSHOSTLIB_COMM_HIF
} SMSHOSTLIB_COMM_TYPES_E;

/// Communication state
typedef enum SMSHOSTLIB_COMM_STATE_E
{
	SMSHOSTLIB_COMM_DISCONNECTED,
	SMSHOSTLIB_COMM_CONNECTED

} SMSHOSTLIB_COMM_STATE_ET;

/// SMS1000 working mode
typedef enum
{
	SMSHOSTLIB_DEVMD_DVBT,
	SMSHOSTLIB_DEVMD_DVBH,
	SMSHOSTLIB_DEVMD_DAB_TDMB,
	SMSHOSTLIB_DEVMD_DAB_TDMB_DABIP,
	SMSHOSTLIB_DEVMD_DVBT_BDA,
	SMSHOSTLIB_DEVMD_NONE = 0xFFFFFFFF

} SMSHOSTLIB_DEVICE_MODES_E;

/// Message type responses to APIs requests. The enum is analog to the APIs names
typedef enum
{
// Initialization and Termination
	SMSHOSTLIB_MSG_INIT_DEVICE_RES = 0,			//!< Response to #SmsHostApiDeviceInit_Req
	SMSHOSTLIB_MSG_DEVICE_TERMINATE_RES,		//!< Response to #SmsHostApiDeviceTerminate_Req

// Information and Statistics		
	SMSHOSTLIB_MSG_GET_VERSION_RES = 1000,		//!< Response to #SmsHostApiGetVersion_Req
	SMSHOSTLIB_MSG_GET_STATISTICS_RES,			//!< Response to #SmsHostApiGetStatistics_Req
	SMSHOSTLIB_MSG_GET_RECEPTION_RES,			//!< Response to #SmsHostApiGetReceptionQuality_Req

// Tune and Scan operations	
	SMSHOSTLIB_MSG_TUNE_RES        = 2000,		//!< Response to #SmsHostApiTune_Req
	SMSHOSTLIB_MSG_SCAN_START_RES,				//!< Response to #SmsHostApiScanStart_Req
	SMSHOSTLIB_MSG_SCAN_STOP_RES,				//!< Response to #SmsHostApiScanStop_Req

// DVB-T
	SMSHOSTLIB_MSG_ADD_PID_FILTER_RES = 3000,	//!< Response to #SmsHostApiAddPidFilter_Req
	SMSHOSTLIB_MSG_REMOVE_PID_FILTER_RES,		//!< Response to #SmsHostApiRemovePidFilter_Req
	SMSHOSTLIB_MSG_RETRIEVE_PID_FILTER_LIST_RES,//!< Response to #SmsHostApiRetrievePidFilterList_Req
	SMSHOSTLIB_MSG_GET_PID_FILTER_LIST_RES,		//!< Obsolete Response to SmsHostGetPidFilterList_Req
	SMSHOSTLIN_MSG_GET_SI_TBL_RES,				//!< Response to #SmsHostApiDvbGetSITable_Req

// DVB-H
	SMSHOSTLIB_MSG_ADD_IP_FILTER_RES = 4000,	//!< Response to #SmsHostApiAddIpFilter_Req
	SMSHOSTLIB_MSG_REMOVE_IP_FILTER_RES,		//!< Response to #SmsHostApiRemoveIpFilter_Req
	SMSHOSTLIB_MSG_GET_IP_FILTER_LIST_RES,		//!< Response to #SmsHostApiGetIpFilterList_Req
	SMSHOSTLIB_MSG_SET_MPE_TBL_PARAMS_RES,		//!< Internal for debugging purposes
	SMSHOSTLIB_MSG_GET_AVAIL_IP_PLATFORMS_RES,	//!< Response to #SmsHostApiGetAvailableIpPlatforms_Req
	SMSHOSTLIB_MSG_UTC_TIME_RES,				//!< Response to #SmsHostApiDvbTDT_Req
	SMSHOSTLIB_MSG_TIME_OFFSET_RES,				//!< Response to #SmsHostApiDvbTOT_Req

// DAB, T-DMB and eDAB
	SMSHOSTLIB_MSG_START_SERVICE_RES = 5000,	//!< Response to #SmsHostApiDabStartService_Req
	SMSHOSTLIB_MSG_STOP_SERVICE_RES,			//!< Response to #SmsHostApiDabStopService_Req
	SMSHOSTLIB_MSG_GET_ENSEMBLE_INFO_RES,		//!< Response to #SmsHostApiDabGetEnsembleInfo_Req
	SMSHOSTLIB_MSG_GET_SERVICES_RES,			//!< Response to #SmsHostApiDabGetServices_Req
	SMSHOSTLIB_MSG_GET_COMPONENTS_INFO_RES,		//!< Response to #SmsHostApiDabGetComponentsInfo_Req
	SMSHOSTLIB_GET_CURR_ENSEMBLE_INDEX_RES,		//!< Response to #SmsHostApiDabGetCurrentEnsembleIndex_Req
	SMSHOSTLIB_MSG_POST_VITERBI_BER_STATE_SET_RES,//!< Obsolete Res. to SmsHostDmbStartPostViterbiBerStateSet_Req
	SMSHOSTLIB_MSG_GET_COMBINED_COMPONENTS_INFO_RES,//!< Response to #SmsHostApiDabGetCombinedComponentsInfo_Req

// GPIO
	SMSHOSTLIB_MSG_GPIO_CONFIGURE_RES = 6000,	//!< Response to #SmsHostApiGPIOConfigure_Req
	SMSHOSTLIB_MSG_GPIO_SET_LEVEL_RES,			//!< Response to #SmsHostApiGPIOSetLevel_Req
	SMSHOSTLIB_MSG_GPIO_GET_LEVEL_RES,			//!< Response to #SmsHostApiGPIOGetLevel_Req

// Indications

// Scan
	SMSHOSTLIB_SCAN_PROGRESS_IND	= 10000,	//!< Indicates that a frequency had been scanned	
	SMSHOSTLIB_SCAN_COMPLETE_IND,				//!< Indicates that the scanned has been completed
// Service Information
	SMSHOSTLIB_DVB_SI_CHANGE_IND	= 11000,	//!< Indicates that current SI has been changed
	SMSHOSTLIB_DAB_RECONFIG_IN_PROG_IND = 11100,//!< Indicates that DAB re-configuration is taking place	
	SMSHOSTLIB_DAB_ENSEMBLE_CHANGED_IND,		//!< Indicates that DAB current ensemble has been changed	
	SMSHOSTLIB_MSG_FAST_INFORMATION_BLOCK_IND,	//!< Indication contains raw FIC data
// Handover
	SMSHOSTLIB_HANDOVER_IND	= 12000,			//!< Indicates that DVB-H Handover has been performed
	SMSHOSTLIB_RECEPTION_STATUS_IND,			//!< Indicates the current reception status

// Log	
    SMSHOSTLIB_MSG_LOG_ITEM_IND = 13000,		//!< Forwarding of an asynchronous Log message from SMS1000 
	SMSHOSTLIB_MSG_LOG_STRING_IND,				//!< Forwarding of a log string from Siano Host Control Library. SMSHOSTLIB_MSG_LOG_STRING_IND data is a null terminated string. The PayloadLen value is up to SMSHOSTLIB_MAX_LOG_STRING_SIZE 
// Other
	SMSHOSTLIB_MSG_UART_FOR_INFRARED_IND	= 14000,	//!< Notification to host with data received from UART
	SMSHOSTLIB_MSG_COMM_STATE_CHANGED_IND,	//!< Notification to host that the current communication state has changed
	SMSHOSTLIB_MSG_DEVICE_UNPLUGGED_IND,		//!< Notification that a device has been unplugged (PNP)
	SMSHOSTLIB_MSG_DEVICE_NEW_DEVICE_DETECTED_IND	//!< Notification that a new device was detected (PNP)


} SMSHOSTLIB_MSG_TYPE_RES_E;

typedef enum SMSHOSTLIB_FREQ_BANDWIDTH_E
{ 
	BW_8_MHZ		= 0,
	BW_7_MHZ		= 1,	
	BW_6_MHZ		= 2,
	BW_5_MHZ		= 3,
	BW_1_5_MHZ		= 15,
	BW_UNKNOWN		= 0xFFFF

} SMSHOSTLIB_FREQ_BANDWIDTH_ET;

typedef enum SMSHOSTLIB_DVB_MODEM_STATE_E
{ 
	MS_WAKE_UP				= 1,
	MS_SET_INITIAL_LNA		= 2,
	MS_ACQUIRE_LOCK			= 3,
	MS_SET_LNA				= 4,
	MS_PRE_SLICE			= 5,
	MS_IN_SLICE				= 6,
	MS_POST_SLICE			= 7,
	MS_IQ_AMBIG				= 8,
	MS_SYR_FIRST_SYNC		= 9,
	MS_CHECK_COARSE_FREQ	= 10,
	MS_HANDLE_IFFT			= 11,
	MS_PREPARE_TO_HANDLE_IFFT=12,
	MS_HANDLE_IFFT_IN_SLICE	= 13,
	MS_HO_SCAN_PHASE		= 14,
	MS_DEBUG_STATE			= 15,
	MS_ALLOW_AGC_SETTLE		= 16
	
} SMSHOSTLIB_DVB_MODEM_STATE_ET;

typedef enum SMSHOSTLIB_CODE_RATE_E
{ 
	CR_1_2	= 0,
	CR_2_3	= 1,
	CR_3_4	= 2,
	CR_5_6	= 3,
	CR_7_8	= 4

} SMSHOSTLIB_CODE_RATE_ET;

typedef enum SMSHOSTLIB_HIERARCHY_E
{ 
	HR_NONE		= 0,
	HR_ALPHA_1	= 1,
	HR_ALPHA_2	= 2,
	HR_ALPHA_4	= 3

} SMSHOSTLIB_HIERARCHY_ET;

typedef enum SMSHOSTLIB_CONSTELLATION_E
{ 
	CN_QPSK		= 0,
	CN_16_QAM	= 1,
	CN_64_QAM	= 2

} SMSHOSTLIB_CONSTELLATION_ET;

//! IP classification
typedef enum
{
	IP_V_4,
	IP_V_6
} SMSHOSTLIB_IP_TYPE_ET;

//! Scan analyze types
typedef enum 
{
	ANALYSE_SRV_INFO,					//!< Service information processing is performed on each frequency found
	CLEAN_PREV_DB_AT_SCAN_START,		//!< Clean the previous Scan DB at the current scan start command
	DO_NOT_CLEAN_PREV_DB_AT_SCAN_START	//!< Clean the previous Scan DB only if the current scan succeeds
} SMSHOSTLIB_SCAN_ANALYSE_TYPE_ET;

//! Indicator for Scan operation
typedef enum 
{
	SCAN_PARAM_TABLE,		//!< The scan range is given by the structure #SMSHOSTLIB_SCAN_TABLE_ST
	SCAN_PARAM_RANGE		//!< The scan range is given by the structure #SMSHOSTLIB_SCAN_RANGE_ST							 	
} SMSHOSTLIB_SCAN_PARAM_STD_ET;

//! Reception Status Indication
typedef enum 
{
	RECEPTION_STATUS_OK,		//!< Good system reception indication
	RECEPTION_STATUS_FAIL		//!< System reception failure on all discovered frequencies						 	
} SMSHOSTLIB_RECEPTION_STATUS_ET;

⌨️ 快捷键说明

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