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

📄 rxswitchmgr.h

📁 MIMO 2x2接收端选择全系统仿真代码
💻 H
字号:
/*****************************************************************************
  Module     : Switch Manager
******************************************************************************

  Function   : 

  Procedures : none

  Author     : $Author: Adrian $

  Revision   : $Revision: 7 $

  Modified   : $Modtime: 05-05-28 15:37 $

  File       : $Workfile: rxswitchmgr.h $

******************************************************************************
 KTH, Royal Institute of Technology, S3, Stockholm
*****************************************************************************/

#ifndef RX_SWITCHMANAGER_H
#define  RX_SWITCHMANAGER_H

/*--- Include files --------------------------------------------------------*/

#include <csl_stdinc.h>

#include "../common/commondef.h"

/*=== End of include files =================================================*/


/*--- Global defines -------------------------------------------------------*/

#define DELTA_S_SET_LEN 404

#define DELAY_SWITCH_ON 29 // number of samples for the switch delay while switching on
#define DELAY_SWITCH_OFF 36 // number of samples for the switch delay while switching off

/*=== End of global defines ================================================*/


/*--- Global types declaration ---------------------------------------------*/

/* possible values for switch 1 */
typedef enum
{
  eSWITCH1,
  eSWITCH2
} typRX_eSwitch1;

/* possible values for switch 2 */
typedef enum
{
  eSWITCH3,
  eSWITCH4
} typRX_eSwitch2;

/* possible methods for antenna subset selection */
typedef enum
{
  eAnteNO = 0,
  eAnteMMNP,
  eAnteMBER,
  eAnteMMI
} typRX_eAntenna;

typedef struct
{
  /* start index of first frame */
  int iStartIndex;
  /* start index of next frame */
  int iNextStartIndex;
  /* index of change for both positions and switches */
  int iPos1Sw1;
  int iPos1Sw2;
  int iPos2Sw1;
  int iPos2Sw2;
  /* status of the switches at the moment */
  typRX_eSwitch1 uiPosSwitch1;
  typRX_eSwitch2 uiPosSwitch2;
  /* indicates which switch to set how at the first occasion for the next frame */
  typRX_eSwitch1 uiPos1SetSwitch1;
  typRX_eSwitch2 uiPos1SetSwitch2;
  /* indicates which switch to set how at the second occasion for the next frame */
  typRX_eSwitch1 uiPos2SetSwitch1;
  typRX_eSwitch2 uiPos2SetSwitch2;  
  /*Antenna Selection Type*/
  typRX_eAntenna uiAnteSelType;

} typRX_SWITCHSTATE;

/*=== End of global types declaration ======================================*/


/*--- Global variables declaration -----------------------------------------*/
/*=== End of global variables declaration ==================================*/


/*--- Global constants declaration -----------------------------------------*/
/*=== End of global constants declaration ==================================*/


/*--- Global functions declaration -----------------------------------------*/

void antennaselection(typRX_SWITCHSTATE *pSwitchState);
void switch_cntrl_init(typRX_SWITCHSTATE *pSwitchState, const int uiSyncRep);
void switch_control(Int16 *pOutBuff, const unsigned int uiBuffLen, const int iFrameLen,
	typRX_SWITCHSTATE *pSwitchState, const int iSyncRep, const int iSyncCtrl);

/*=== End of global functions declaration ==================================*/
#endif

/*--- AUTOMATICALLY GENERATED VERSION HISTORY --------------------------------

$Log: /MIMO/Receiver/rxswitchmgr.h $ 
 * 
 * 7     05-05-28 20:14 Adrian
 * changed the function prototypes to include variables for the switching
 * start index
 * 
 * 6     05-05-23 9:51 Jinfeng
 * remove the choice of LAZY
 * 
 * 5     05-05-20 18:05 Jinfeng
 * typedef enum {eAnteNO = 0,  eAnteMMNP, eAnteMBER, eAnteMMI, eAnteLAZY }
 * typRX_eAntenna;
 * 
 * 4     05-05-13 16:51 Adrian
 * modified typRX_SWITCHSTATE and removed typRX_SWITCHCONTROL
 * 
 * 3     05-05-12 17:04 Adrian
 * changed typRX_SWITCHSTATE and added typRX_SWITCHCONTROL
 * 
 * 1     05-05-11 17:00 Adrian
 * created and added to VSS

===== END OF AUTOMATICALLY GENERATED VERSION HISTORY =======================*/

/**** End of file ***********************************************************/

⌨️ 快捷键说明

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