2 /* header include files (.h) */
3 #include "envopt.h" /* environment options */
4 #include "envdep.h" /* environment dependent */
5 #include "envind.h" /* environment independent */
6 #include "gen.h" /* general */
7 #include "ssi.h" /* system services */
8 #include "cm_tkns.h" /* Common Token Defines */
9 #include "cm_llist.h" /* Common Link List Defines */
10 #include "cm_hash.h" /* Common Hash List Defines */
11 #include "cm_lte.h" /* Common LTE Defines */
12 #include "cm_mblk.h" /* Common LTE Defines */
13 #include "tfu.h" /* RGU Interface defines */
17 /* header/extern include files (.x) */
18 #include "gen.x" /* general */
19 #include "ssi.x" /* system services */
20 #include "cm_tkns.x" /* Common Token Definitions */
21 #include "cm_llist.x" /* Common Link List Definitions */
22 #include "cm_lib.x" /* Common Library Definitions */
23 #include "cm_hash.x" /* Common Hash List Definitions */
24 #include "cm_lte.x" /* Common LTE Defines */
25 #include "cm_mblk.x" /* Common LTE Defines */
26 #include "tfu.x" /* RGU Interface includes */
29 /* function pointers for packing macCellCfg Request */
30 typedef S16 (*packSlotIndMsg) ARGS((
32 fapi_slot_ind_t *slotInd
35 S16 packLcSlotInd (Pst *pst, fapi_slot_ind_t *slotInd);
36 S16 packTcSlotInd (Pst *pst, fapi_slot_ind_t *slotInd);
37 S16 packLwlcSlotInd (Pst *pst, fapi_slot_ind_t *slotInd);
39 packSlotIndMsg packSlotIndMt[] =
41 packLcSlotInd, /* packing for loosely coupled */
42 fapiMacSlotInd, /* packing for tightly coupled */
43 packLwlcSlotInd, /* packing for light weight loosly coupled */
46 S16 packLcSlotInd (Pst *pst, fapi_slot_ind_t *slotInd)
49 if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK)
54 /* pack SFN and slot value */
55 CMCHKPK(SPkU16,slotInd->sfn, mBuf);
56 CMCHKPK(SPkU16,slotInd->slot, mBuf);
58 RETVALUE(SPstTsk(pst,mBuf));
61 S16 packTcSlotInd (Pst *pst, fapi_slot_ind_t *slotInd)
66 S16 packLwlcSlotInd (Pst *pst, fapi_slot_ind_t *slotInd)
71 void handleSlotInd(fapi_slot_ind_t *fapiSlotInd)
73 /* fill Pst structure to send to lwr_mac to MAC */
83 pst.event = EVENT_SLOT_IND_TO_MAC;
86 pst.selector = MAC_SELECTOR_TC;
88 slotInd.sfn = fapiSlotInd->sfn;
89 slotInd.slot = fapiSlotInd->slot;
91 return (*packSlotIndMt[pst.selector])(&pst, &slotInd);
94 void handlePhyMessages(U8 *msg)
96 /* extract the header */
98 header = (fapi_msg_t *)msg;
100 switch(header->message_type_id)
102 case FAPI_SLOT_INDICATION:
104 fapi_slot_ind_t *slotInd;
105 slotInd = (fapi_slot_ind_t *)msg;
106 handleSlotInd(slotInd);
109 case FAPI_ERROR_INDICATION:
113 case FAPI_RX_DATA_INDICATION:
117 case FAPI_CRC_INDICATION:
121 case FAPI_UCI_INDICATION:
125 case FAPI_SRS_INDICATION:
129 case FAPI_RACH_INDICATION: