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

📄 frameprefix.c

📁 基于wimax中ofdm在vxworks的仿真代码
💻 C
字号:
/*****************************************************************************//*   FIle Name : frameprefix.c                                               *//*   Description : Wi-Max OFDM Frame Prefix Encoder                          *//*   author : miffie                                                         *//*   Date   : oct/13/05                                                      *//*   Copyright (c) 2005 miffie   All rights reserved.                        *//*****************************************************************************////////////////////////////////////////////////////////////////////////////////struct 	binaryset frameprefix( struct DLFP_IE *dlfp ,                               char BSID, char frame_number) {struct  binaryset btop ;char    *btmp1 ;int	ii , nn ;//DLchar  	Configuration_Change_Count  ;//ULchar	Uplink_Channel_ID  ;int	Allocation_Start_time ;  //Make LONG PLCP Preamble    if ((btmp1 = (char *)malloc(10*sizeof(char))) == NULL) {       PRINTF( " malloc failed in frameprefix\n") ;   } //fail   else { //allocated      PRINTF("frameprefix\n" ) ;      ii=0 ;   //////////////////////////   //DL-MAP   //////////////////////////    //Base_Station_ID      btmp1[ ii ] = (BSID &0xf) <<4 ;    //Frame_Number      btmp1[ ii++ ] += frame_number &0xf ;    //Configuration_Change_Count      Configuration_Change_Count = 0xf ;      btmp1[ ii++ ] = ((Configuration_Change_Count &0xf) <<4) ;    //DL-MAP IE      for(nn=0;nn<4;nn++) { //each IE         if(nn==0) { //first           //Rate_ID           btmp1[ ii ] = (dlfp[nn].DIUC &0xf)<<4 ;           //Preamble_present           btmp1[ ii ] += (dlfp[nn].Preamble_present &0x1)<<3 ;           //Length           btmp1[ ii++ ] += (dlfp[nn].Length>>8) &0x7 ;           btmp1[ ii++ ] = (dlfp[nn].Length) &0xff ;         } else { //beyond           //DIUC           btmp1[ ii ] = (dlfp[nn].DIUC &0xf)<<4 ;           if( dlfp[nn].DIUC >0 ) {             //Preamble_present             btmp1[ ii ] += (dlfp[nn].Preamble_present &0x1)<<3 ;             //Length             btmp1[ ii++ ] += (dlfp[nn].Length>>8)  &0x7 ;             btmp1[ ii++ ] = (dlfp[nn].Length) &0xff ;           } else {             //Start Time             btmp1[ ii++ ] += (dlfp[nn].Length>>8) &0xf ;             btmp1[ ii++ ] = (dlfp[nn].Length) &0xff ;           }         }//beyond      } //each IE      btop.format = 1 ;      btop.size = ii ;      btop.data = btmp1 ;      //HCS      btop = cat_binaryset ( btop , hcs( btop ) ) ;    } //allocated   return( btop ) ;} //frameprefix

⌨️ 快捷键说明

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