MTK获取基站的cell_id

发送请求Lai消息给底层,然后处理反馈信息取出cell_id。然后处理反馈信息取出cell_id。再根据cell_id去数据库查经纬度了。


注册消息处理函数
void GetCellIDStartReq(U32 mod_id, PU8 info_req)
{
     	SetProtocolEventHandler(parsing_cellId_data,MSG_ID_MMI_EM_STATUS_IND);
    	get_cellid_send_start_req();   
}


发消息请求cell id
void get_cellid_send_start_req(void)
{
	MYQUEUE Message;
	mmi_em_update_req_struct *em_start_req;
	Message.oslMsgId = MSG_ID_MMI_EM_UPDATE_REQ;
	em_start_req = OslConstructDataPtr(sizeof(mmi_em_update_req_struct));
em_start_req->mod_id = MOD_AS;
 	em_start_req->info_request = RR_EM_LAI_INFO;

	Message.oslDataPtr = (oslParaType*) em_start_req;
	Message.oslPeerBuffPtr = NULL;
	Message.oslSrcId = MOD_MMI;
	Message.oslDestId = MOD_L4C;
	OslMsgSendExtQueue(&Message);
}



处理消息的回调函数
void parsing_cellId_data(void *info)
{
	mmi_em_status_ind_struct *msg = (mmi_em_status_ind_struct*) info;
	if(msg->em_info == RR_EM_LAI_INFO){
	    rr_em_lai_info_struct *data_ptr;
	    kal_uint16 mm_pdu_len;
	    data_ptr = (rr_em_lai_info_struct*) get_pdu_ptr(msg->info, 	&mm_pdu_len);
	 }
}

你可能感兴趣的:(C++,c,C#,MTK)