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

📄 csr.h

📁 GSM手机设计软件代码
💻 H
字号:
#ifndef CSR_H
#define CSR_H

/* Number of reference and of neighbour BTS measurements in an RRLP message. */
#define NUM_MEAS_SETS 3
#define MAX_REF_NEIGH_BTS 15
#define N_CSR_CORRELATION 9
#define MAX_CALLED_BCD_NO_LENGTH 10
/* Number of neighbours for each measurement set */
#define N_CSR_NEIGHBOURS	 12

#include "csr_types.h"

/* Basic types */
typedef UInt32    FrameTicks;
typedef Int16     SigLevel;
typedef Complex16 CorrelationRes[N_CSR_CORRELATION];
typedef UInt32    FrameNumber;
typedef UInt32    NominalPosn;
typedef UInt8     TimingAdvance;
typedef UInt16    CallReference;
typedef UInt16    Mnc;
typedef UInt16    Mcc;
typedef UInt16    Lac;
typedef UInt8     Bsic;
typedef UInt16    Arfcn;
typedef UInt16    CellId;

typedef UInt8     CsrResponse[140];

typedef struct {
  UInt8  bsic;
  UInt16 arfcn;
  UInt8  quality;
  UInt8  numMeasurements;
  Int32  timingOffset;
  Int32  timingAdvance; /* Currently unused, reserved for future use. */
} NeighbouringBts;

typedef struct {
  UInt16          cellId;
  UInt16          lac;
  UInt8           quality;
  UInt8           numMeasurements;
  Int32           timingOffset;
  UInt8           totalNeighBts;
  NeighbouringBts btsData[MAX_REF_NEIGH_BTS];
  UInt16          frameNumber; /* Most recent frame number for this
                                  cell */
  Int32           timingAdvance; /* Currently unused, reserved for
                                    future use. */
} ReferenceBts;
 
  
/* This only really describes one measurement set which is all we
   decode at the moment */
typedef struct {
  UInt16       mcc;
  UInt16       mnc;
  UInt8        referenceRelation;  /* 0, 1 or 2, only used when there
                                      are 2 ref cells and 3
                                      measurement sets*/
  UInt8        timeSlot;
  UInt8        stdResolution;
  UInt8        numMeasurementSets;
  UInt8        numReferenceCells;
  Boolean      taCorrectionPresent;
  UInt16       taCorrection;
  ReferenceBts refBtsData[NUM_MEAS_SETS];
} TimingData;

/* Message structures */
typedef UInt8  Bcd;

typedef struct
{
  UInt8 numberLength;
  /* each byte holds 2 digits of the phone number */
  Bcd   number[MAX_CALLED_BCD_NO_LENGTH];
} CalledPartyBcdNum;

typedef struct {
  TimingAdvance timingAdvance;
  CellId        cellId;
  Arfcn         arfcn;
  Bsic          bsic;
} RrCsrTimingAdvInd;

typedef struct {
  CallReference callReference;
} CsrProceedingInd;

typedef struct {
  CallReference callReference;
} CsrAbortReq;

typedef struct {
  CallReference callReference;
} CsrAbortCnf;

typedef struct {
  CallReference     callReference;
  Boolean           csrOnlyCall;
  CalledPartyBcdNum calledBcdNumber;
} CsrPosnDataReq;

typedef struct {
  CallReference callReference;
  Boolean       cursorDataValid;
  CsrResponse   cursorData;
} CsrPosnDataCnf;

typedef struct {
  Boolean        csrDataValid;
  SigLevel       siglevel;
  CorrelationRes correlationRes;
} ServingCellCsrData;

typedef struct {
  Boolean        neighbourCsrDataValid;
  Bsic           bsic;
  Arfcn          arfcn;
  SigLevel       siglevel;
  CorrelationRes correlationRes;
  NominalPosn    nominalPosn;
} NeighbourCsrData;

typedef struct {
  FrameNumber        framenumber;
  Arfcn              arfcn;
  Bsic               bsic;
  NominalPosn        nominalPosn;
  Mcc                mcc;
  Mnc                mnc;
  Lac                lac;
  CellId             cellId;
  ServingCellCsrData servingCellCsrData1;
  NeighbourCsrData   neighbourCsrData[N_CSR_NEIGHBOURS];
  ServingCellCsrData servingCellCsrData2;
  Boolean            inDedicated;
} RrCsrMeasInd;

typedef struct {
  UInt8 codeVersion;
} csrVersionId;
typedef struct {
  RrCsrTimingAdvInd taData;
  FrameTicks        timeTag;
  Boolean           taValid;
} TaBuffer;

typedef struct {
  RrCsrMeasInd csrData;
  FrameTicks	 timeTag;
  Boolean	     dataValid;
} DataBuffer;

/* Function definitions */
csrVersionId getTimingData (const TaBuffer   * const taBuffer,
                                  TimingData *       data);

void csrUpdateTimings(const DataBuffer  * const buffer);
#endif

⌨️ 快捷键说明

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