Initial commit
[o-du/l2.git] / src / cm / rgu.x
1 /*******************************************************************************
2 ################################################################################
3 #   Copyright (c) [2017-2019] [Radisys]                                        #
4 #                                                                              #
5 #   Licensed under the Apache License, Version 2.0 (the "License");            #
6 #   you may not use this file except in compliance with the License.           #
7 #   You may obtain a copy of the License at                                    #
8 #                                                                              #
9 #       http://www.apache.org/licenses/LICENSE-2.0                             #
10 #                                                                              #
11 #   Unless required by applicable law or agreed to in writing, software        #
12 #   distributed under the License is distributed on an "AS IS" BASIS,          #
13 #   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.   #
14 #   See the License for the specific language governing permissions and        #
15 #   limitations under the License.                                             #
16 ################################################################################
17 *******************************************************************************/
18
19 /**********************************************************************
20      Name:    Upper Layer Interface
21
22      Type:    C header file
23
24      Desc:    Structures, variables and typedefs required by 
25               RGU interface
26
27      File:    rgu.x
28
29 *********************************************************************21*/
30
31 \f
32 #ifndef __RGUX__
33 #define __RGUX__
34 #ifdef __cplusplus
35 extern "C" {
36 #endif
37
38 /** 
39   @file rgu.x 
40   @brief Structure declarations and definitions for RGU interface.
41  */
42
43 /***********************************************************************
44                           typedefs and data structures
45  ***********************************************************************/
46
47 /**
48  * @brief PDU information given on a logical channel.
49  */
50 typedef struct rguPduInfo
51 {
52    U8     numPdu;                 /*!< Number of PDUs */ 
53    Buffer *mBuf[RGU_MAX_PDU];     /*!< numPdu data buffers */
54 } RguPduInfo;
55
56
57 /**
58  * @brief Buffer Occupancy Report for dedicated logical channel.
59  */
60 typedef struct rguDBoReport
61 {
62    S32  bo;                /*!< Buffer occupancy reported by RLC */
63 #ifdef CCPU_OPT
64    U16  estRlcHdrSz;       /*!< Estimated RLC header size */
65    Bool staPduPrsnt;       /*!< Indicates whether the BO includes
66                                 a status PDU as well */
67 #endif
68    U32  staPduBo;          /*!< Indicates the Status PDU BO. 
69                                 This is included in bo */
70    U32  oldestSduArrTime;
71 } RguDBoReport;
72
73 /**
74  * @brief DatReq from RLC to MAC for Common Channels (BCCH, PCCH and CCCH).
75  */
76 typedef struct rguCDatReqInfo
77 {
78    CmLteCellId     cellId;          /*!< CELL ID */
79    CmLteLcId       lcId;            /*!< Logical channel ID */
80    CmLteLcType     lcType;          /*!< Logical channel Type */
81    U32             transId;         /*!< Transaction ID */
82 #ifdef EMTC_ENABLE
83    U8              pnb;            /*Paging narrowBand on which UE performs Paging*/
84 #endif
85    union{
86    CmLteTimingInfo timeToTx;        /*!< Actual time when PHY transmits
87                                          this, applicable to BCCH and PCCH only */
88    CmLteRnti rnti;                  /*!< Temporary CRNTI:Applicable for CCCH. */
89    }u;
90    Buffer          *pdu;            /*!< PDU to be transmitted */
91 } RguCDatReqInfo;
92 /**
93  * @brief DatReq Information of a logical channel.
94  */
95 typedef struct rguLchDatReq
96 {
97    CmLteLcId    lcId;                /*!< Logical channel ID */
98    RguDBoReport boReport;            /*!< BO for the logical channel */
99    RguPduInfo   pdu;                 /*!< PDU to be transmitted*/
100    Bool         setMaxUlPrio;
101 #ifdef L2_OPTMZ
102    Bool         freeBuff;            /*!< TRUE if Buffer is to be freed by MAC
103                                           It is set for UM bearer*/
104 #endif
105 } RguLchDatReq;
106
107 /*rgu_x_001.main_3 - ADD - L2M Support */
108 #ifdef LTE_L2_MEAS
109 /**
110  * @brief Structure to store logical channels to SN mapping */
111 typedef struct rguLchmapInfo
112 {
113    CmLteLcId lChId;                  /*!< Logical channel Id */
114    U16       snList[RGU_MAX_LC];     /*!< Set of sequence numbers */
115 }RguLchMapInfo;
116 /**
117  * @brief Sequence Number mapping info per TB 
118  * */
119 typedef struct rguSnMapInfo
120 {
121    U32            tbId;               /*!< TB id for which sn info map */
122    U8             numLch;             /*!< Number of Ded Logical Channels */
123    RguLchMapInfo  lchMap[RGU_MAX_LC]; /*!< LC to SN Mapping Info*/
124 } RguSnMapInfo;
125
126 /*
127  *  @brief Structure to hold harq status Indication to RLC
128  *  */
129 typedef struct rguHarqStatusInd
130 {
131    CmLteCellId   cellId;                    /*!< Cell Id*/
132    CmLteRnti     ueId;                      /*!< ue Id*/
133    U8            numTbs;                    /*!< Number of Tbs present */
134  
135    U32           tbId[RGU_MAX_TB];          /*!< tbId provided by RLC in
136                                                  DatReq  */                                                                                 
137    U16           status[RGU_MAX_TB];        /*!< Status back to RLC ACK/NACK*/
138 } RguHarqStatusInd;
139
140 /*
141  *  @brief Structure to hold rguHarqStatusInd and pst structure
142  *  */
143 typedef struct rguHarqStaInd
144 {
145     RguHarqStatusInd  hqStatusInd;            
146     Pst               pst;
147 } RguHarqStaInd;
148
149 /*
150  *  @brief UL Throughput Measurement Request from RLC to MAC regarding configuration
151  *  of an LC for a particular UE to provide Timing Info.
152  *  */
153 typedef struct rguL2MUlThrpMeasReqInfo
154 {
155    CmLteCellId   cellId;                    /*!< Cell Id*/
156    CmLteRnti     rnti;                      /*!< UE Id*/
157    U8            numLcId;                   /*!< Number of LC Ids configured */
158    U8            lcId[RGU_MAX_LC];          /*!< LC ID indices that are 
159                                               configured */
160    Bool          enbMeas;                   /*!< Indication to enable/disable 
161                                                measurement for the LC ID*/
162 } RguL2MUlThrpMeasReqInfo;
163
164 #endif /* LTE_L2_MEAS */
165 /**
166  * @brief DatReq info for each TB of a UE.
167  */
168 typedef struct rguDatReqTb
169 {
170    U8           nmbLch;              /*!< Number of logical channels of a UE 
171                                           that have data for this TB */
172    RguLchDatReq lchData[RGU_MAX_LC]; /*!< Data Buffers and BO of  
173                                           logical channels for this TB */
174 /* rgu_x_001.main_3 - ADD - L2M Support */
175 #ifdef LTE_L2_MEAS
176    U32          tbId;                /*!< RLC's internal tbId maintained
177                                           per UE */  
178 #endif /* LTE_L2_MEAS */
179 }RguDatReqTb;
180
181 /**
182  * @brief DatReq from RLC to MAC for dedicated channels of an UE.
183  */
184 typedef struct rguDDatReqPerUe
185 {
186    CmLteRnti     rnti;         /*!< UE ID */
187    U32           transId;      /*!< Transaction ID */
188    U8            nmbOfTbs;     /*!< Number of TBs. Relevant for MIMO */
189    RguDatReqTb   datReqTb[2];  /*!< DatReq info for MAX 2 TBs */ 
190 } RguDDatReqPerUe;
191
192 /**
193  * @brief DatReq from RLC to MAC for dedicated channels of all UEs in a TTI.
194  */
195 typedef struct rguDDatReqInfo
196 {
197    CmLteCellId        cellId;                        /*!< CELL ID */
198    U8                 nmbOfUeGrantPerTti;                 /*!< Number of TBs. Relevant for MIMO */
199    RguDDatReqPerUe    datReq[RGU_MAX_NUM_UE_PER_TTI];    /*!< Pointer to DatReq for MAX UEs configured Per TTI */ 
200 } RguDDatReqInfo;
201
202 /**
203  * @brief DatInd from MAC to RLC on CCCH.
204  */
205 typedef struct rguCDatIndInfo
206 {
207    CmLteCellId cellId;               /*!< Cell ID */
208    CmLteRnti   rnti;                 /*!< RNTI */
209    CmLteLcId   lcId;                 /*!< Logical channel instance */
210    Buffer      *pdu;                 /*!< PDU received always one */
211 } RguCDatIndInfo;
212
213 #ifdef MAC_RLC_UL_RBUF
214 typedef struct rguDedDatInd1
215 {
216    Void *msg;
217 }RguDedDatInd1;
218 #endif 
219
220 /* rgu_x_001.main_3 - ADD - L2M & R9 Support */
221 #ifdef LTE_L2_MEAS
222
223 /** 
224  *  * Segment Indication ID from MAC to RLC */
225 typedef enum rguL2MUlThrpSegInd
226 {
227    RGU_L2M_ULTHRP_NOTDEF = 0,/**< Specifies No Indication */
228    RGU_L2M_ULTHRP_FIRST = 1,        /**< Specifies First Segment Indication */
229    RGU_L2M_ULTHRP_LAST = 2,        /**< Specifies Last Segment Indication */
230    RGU_L2M_ULTHRP_INTERIM = 3    /**< Specifies Interim Segment Indication */
231 }RguL2MUlThrpSegInd;
232
233 /**
234  * @brief Scheduled IP Throughput Timing Info from MAC to RLC.
235  */
236 typedef struct rgL2MeasUlThrpTimInfo 
237 {
238    U32                 thrpTimeUl;      /*!< Difference in Timing values T1, T2 */
239    RguL2MUlThrpSegInd  firstLastSegInd;         /*!< Indication of Data Burst */
240 }RgL2MeasUlThrpTimInfo;
241
242 #endif
243 /**
244  * @brief DatInd Information for a logical channel.
245  */
246 typedef struct rguLchDatInd
247 {
248    CmLteLcId    lcId;                /*!< Logical channel instance */
249    RguPduInfo   pdu;                 /*!< PDU received */
250    /* rgu_x_001.main_3 - ADD - L2M & R9 Support */
251 }RguLchDatInd;
252
253 /**
254  * @brief Data Indication from MAC to RLC for dedicated channels of an UE.
255  */
256 typedef struct rguDDatIndInfo
257 {
258    CmLteCellId  cellId;              /*!< CELL ID */
259    CmLteRnti    rnti;                /*!< UE ID */
260    U8           numLch;              /*!< Number of logical channels within
261                                        the UE that has data */
262    RguLchDatInd lchData[RGU_MAX_LC]; /*!< Data buffers of logical channels */
263 #ifdef LTE_L2_MEAS
264    U32          ttiCnt;              /*!< The Current TTI in the Cell */
265    U8           burstInd;            /*!< Indicates the Burst Start or End */
266 #endif
267 } RguDDatIndInfo;
268
269 /**
270  * @brief Status Response from RLC to MAC  for common logical channel.
271  */
272 typedef struct rguCStaRspInfo
273 {
274    CmLteCellId  cellId;         /*!< CELL ID */
275    CmLteLcId    lcId;           /*!< Logical channel ID */ 
276    CmLteLcType  lcType;         /*!< Logical channel type */
277    S32 bo;                      /*!< Buffer occupancy reported by RLC */
278 #ifdef EMTC_ENABLE
279    U8          emtcDiReason;   /*!< Reason for DI message to send. */
280    U8          pnb;            /*paging narrowBand on which UE will perform paging*/
281 #endif
282    union                        /*!< lcType in the primitive is 
283                                      the union selector */
284    {
285       CmLteTimingInfo timeToTx; /*!< Timing info for the BO, applicable for
286                                    BCCH and PCCH */
287       CmLteRnti       rnti;     /*!< Temporary CRNTI, only for CCCH */
288    } u;
289 } RguCStaRspInfo;
290
291 /**
292  * @brief Status Response from RLC to MAC  for dedicated logical channel.
293  */
294 typedef struct rguDStaRspInfo
295 {
296    Pst          post; 
297    CmLteCellId  cellId;     /*!< CELL ID */
298    CmLteRnti    rnti;       /*!< UE ID */
299    CmLteLcId    lcId;       /*!< Logical channel ID */
300    RguDBoReport boReport;   /*!< BO report for this common channel */
301 } RguDStaRspInfo;
302
303 /**
304  * @brief Status Indication from MAC to RLC for common logical channel.
305  */
306 typedef struct rguCStaIndInfo
307 {
308    CmLteCellId cellId;       /*!< CELL ID */
309    CmLteLcId   lcId;         /*!< Logical channel ID */
310    U32         transId;      /*!< Transaction ID */
311    CmLteRnti   rnti;         /*!< Temporary CRNTI */
312 #ifdef EMTC_ENABLE
313    Bool                isEmtcPaging;      /*!< To Identify whether Paging is EMTC or Lagecy */
314    CmLteTimingInfo     pagingTimingInfo; /*!< paging TimingInfo information */
315 #endif
316 } RguCStaIndInfo;
317
318 /**
319  * @brief StaInd info for each logical channel of an UE.
320  */
321 typedef struct rguLchStaInd
322 {
323    CmLteLcId   lcId;         /*!< Logical channel ID */
324    S16         totBufSize;  /*!< Total buffer size in bytes 
325                                 scheduled by MAC */
326 } RguLchStaInd;
327
328 /**
329  * @brief StaInd info for each TB of a UE.
330  */
331 typedef struct rguStaIndTb
332 {
333    U8           nmbLch;               /*!< Number of logical channels scheduled
334                                            for this TB */
335    RguLchStaInd lchStaInd[RGU_MAX_LC];/*!< Buffer size allocated for scheduled 
336                                            logical channels for this TB */
337 #ifdef LTE_L2_MEAS
338    U32          tbId;                /*!< RLC internal TB id */                                           
339    U16          status;              /*!< Status back to RLC ACK/NACK/RGU_NACK_LOSS */
340 #endif
341 }RguStaIndTb;
342 /**
343  * @brief StaInd from MAC to RLC for dedicated logical channels of an UE.
344  */
345 typedef struct rguDStaIndPerUe
346 {
347    CmLteRnti     rnti;        /*!< UE ID */
348    U32           transId;     /*!< Transaction ID */
349    U8            nmbOfTbs;    /*!< Number of TBs. Relevant for MIMO */
350    RguStaIndTb   staIndTb[2]; /*!< StaInd info for MAX 2 TBs */
351    Bool          fillCtrlPdu; /*!< Flag to fill RLC control PDU */
352 } RguDStaIndPerUe;
353
354 /**
355  * @brief StaInd from MAC to RLC for dedicated logical channels of all UEs Per TTI.
356  */
357 typedef struct rguDStaIndInfo
358 {
359    CmLteCellId      cellId;                       /*!< CELL ID */
360    U8               nmbOfUeGrantPerTti;                /*!< Number of TBs. Relevant for MIMO */
361    RguDStaIndPerUe  staInd[RGU_MAX_NUM_UE_PER_TTI];   /*!< StaInd info for MAX number of UEs per TTI */
362 } RguDStaIndInfo;
363
364 /**
365  * @brief flowCntrl info per LC.
366  */
367 typedef struct rguLcFlowCntrlInfo
368 {
369   CmLteLcId   lcId; 
370   U32         pktAdmitCnt; 
371   U32         maxBo4FlowCtrl; /*!< MAX BO of Queued SDUs at RLC beyond which Flow is Controlled */
372 }RguLcFlowCntrlInfo;
373
374 /**
375  * @brief flowCntrl info per UE.
376  */
377 typedef struct rguUeFlowCntrlInfo 
378 {
379   CmLteRnti            ueId;
380   U32                  numLcs;
381   RguLcFlowCntrlInfo   lcInfo[RGU_MAX_LC];
382 }RguUeFlowCntrlInfo;  
383
384 /**
385  * @brief flowCntrlInd from MAC to RLC for dedicated logical channels of all UEs Per TTI.
386  */
387 typedef struct rguFlowCntrlInd
388 {
389    CmLteCellId         cellId;                       /*!< CELL ID */
390    U32                 numUes;
391    RguUeFlowCntrlInfo  ueFlowCntrlInfo[RGU_MAX_NUM_UE_PER_TTI];
392 }RguFlowCntrlInd;  
393 typedef struct rguInfoRingElem 
394 {
395   SpId         spId;
396   U8           event;
397   Void         *msg;
398 }RguInfoRingElem;
399 /***********************************************************************
400           type definitions for upper layer interface - RLC primitives
401  ***********************************************************************/
402 /** @brief Bind Request from RLC to MAC to bind the interface SAPs */
403 typedef S16 (*RguBndReq) ARGS((
404    Pst*                 pst,
405    SuId                 suId,
406    SpId                 spId));
407 /** @brief Unbind Request from RLC to MAC to unbind the interface SAPs */
408 typedef S16 (*RguUbndReq) ARGS((
409    Pst*                 pst,
410    SpId                 spId,
411    Reason               reason));
412 /** @brief Bind Confirmation from MAC to RLC for the bind/unbind 
413  * request for the interface SAPs */
414 typedef S16 (*RguBndCfm) ARGS((
415    Pst*                 pst,
416    SuId                 suId,
417    U8                   status));
418 /** @brief Data Request from RLC to MAC for forwarding SDUs on common
419  * channel for transmission */
420 typedef S16 (*RguCDatReq) ARGS((
421    Pst*                 pst,
422    SpId                 spId,
423    RguCDatReqInfo  *    datReq));
424 /** @brief Data Request from RLC to MAC for forwarding SDUs on 
425  * dedicated channel for transmission */
426 typedef S16 (*RguDDatReq) ARGS((
427    Pst*                 pst,
428    SpId                 spId,
429    RguDDatReqInfo  *    datReq));
430 /** @brief Data Indication from MAC to RLC to 
431  * forward the data received for common channels */
432 typedef S16 (*RguCDatInd) ARGS((
433    Pst*                 pst,
434    SuId                 suId,
435    RguCDatIndInfo  *    datInd));
436 /** @brief Data Indication from MAC to RLC to 
437  * forward the data received for dedicated channels */
438 typedef S16 (*RguDDatInd) ARGS((
439    Pst*                 pst,
440    SuId                 suId,
441    RguDDatIndInfo  *    datInd));
442 /** @brief Status Response from RLC to MAC to 
443  * inform the BO report for common channels */
444 typedef S16 (*RguCStaRsp) ARGS((
445    Pst*                 pst,
446    SpId                 spId,
447    RguCStaRspInfo  *    staRsp));
448 /** @brief Status Repsonse from RLC to MAC to 
449  * inform the BO report for dedicated channels */
450 typedef S16 (*RguDStaRsp) ARGS((
451    Pst*                 pst,
452    SpId                 spId,
453    RguDStaRspInfo  *    staRsp));
454 /** @brief Status Indication from MAC to RLC  
455  * as a response to the staRsp primitive from RLC */
456 typedef S16 (*RguCStaInd) ARGS((
457    Pst*                 pst,
458    SuId                 suId,
459    RguCStaIndInfo  *    staInd));
460 /** @brief Status Indication from MAC to RLC  
461  * as a response to the staRsp primitive from RLC */
462 typedef S16 (*RguDStaInd) ARGS((
463    Pst*                 pst,
464    SuId                 suId,
465    RguDStaIndInfo  *    staInd));
466
467 typedef S16 (*RguFlowCntrlIndInfo) ARGS((
468    Pst                  *pst,
469    SuId                 suId,
470    RguFlowCntrlInd      *flowCntrlInd));
471
472 /* rgu_x_001.main_3 - ADD - L2M & R9 Support */
473 #ifdef LTE_L2_MEAS
474 /** @brief HARQ Status Indication from MAC to RLC  
475  * as a response to Data Req primitive from RLC */
476 typedef S16 (*RguHqStaInd) ARGS((
477    Pst*                 pst,
478    SuId                 suId,
479    RguHarqStatusInd     *harqStatusInd));
480 /** @brief LCID measurement status from RLC to MAC  
481  * so as to provide Timing Info in DDatInd */
482 typedef S16 (*RguL2MUlThrpMeasReq) ARGS((
483    Pst*                 pst,
484    SpId                 spId,
485    RguL2MUlThrpMeasReqInfo  *l2mUlThrpMeasReq));
486
487 #endif /* LTE_L2_MEAS */
488
489
490 #ifdef RG
491 /** @brief Bind Request from RLC to MAC to bind the interface SAPs
492  * @param pst Pointer to the post structure.
493  * @param suId SAP ID of the service user.
494  * @param spId SAP ID of the service provider.
495  * @return ROK/RFAILED
496 */
497 EXTERN S16 RgUiRguBndReq ARGS((Pst* pst,SuId suId,SpId spId));
498 /** @brief Unbind Request from RLC to MAC to unbind the interface SAPs 
499  * @param pst Pointer to the post structure.
500  * @param spId SAP ID of the service provider.
501  * @param reason Reason for unbind request.
502  * @return ROK/RFAILED
503 */
504 EXTERN S16 RgUiRguUbndReq ARGS((Pst* pst,SpId spId,Reason reason));
505 /** @brief Bind Confirmation from MAC to RLC for the bind and unbind 
506  * request for the interface SAPs 
507  * @param pst Pointer to the post structure.
508  * @param suId SAP ID of the service user.
509  * @param status Status of the bind request. 
510  * @return ROK/RFAILED
511 */
512 EXTERN S16 RgUiRguBndCfm ARGS((Pst* pst,SuId suId,U8 status));
513 /** @brief Data Request from RLC to MAC for forwarding SDUs on common
514  * channel for transmission 
515  * @param pst Pointer to the post structure.
516  * @param spId SAP ID of the service provider.
517  * @param datReq Data request for common channels (BCCH, PCCH and CCCH).
518  * @return ROK/RFAILED
519 */
520 EXTERN S16 RgUiRguCDatReq ARGS((Pst* pst,SpId spId,RguCDatReqInfo *datReq));
521 /** @brief Data Request from RLC to MAC for forwarding SDUs on 
522  * dedicated channel for transmission 
523  * @param pst Pointer to the post structure.
524  * @param spId SAP ID of the service provider.
525  * @param datReq Data request for dedicated channels (DCCH and DTCH).
526  * @return ROK/RFAILED
527 */
528 EXTERN S16 RgUiRguDDatReq ARGS((Pst* pst,SpId spId,RguDDatReqInfo  *datReq));
529 /** @brief Data Indication from MAC to RLC to 
530  * forward the data received for common channels
531  * @param pst Pointer to the post structure.
532  * @param suId SAP ID of the service user.
533  * @param datInd Data indication on CCCH.
534  * @return ROK/RFAILED
535 */
536 EXTERN S16 RgUiRguCDatInd ARGS((Pst* pst,SuId suId,RguCDatIndInfo  *datInd));
537 /** @brief Data Indication from MAC to RLC to 
538  * forward the data received for dedicated channels
539  * @param pst Pointer to the post structure.
540  * @param suId SAP ID of the service user.
541  * @param datInd Data indication on dedicated channels (DCCH and DTCH).
542  * @return ROK/RFAILED
543 */
544 EXTERN S16 RgUiRguDDatInd ARGS((Pst* pst,SuId suId,RguDDatIndInfo  *datInd));
545 /** @brief Status Response from RLC to MAC to 
546  * inform the BO report for common channels
547  * @param pst Pointer to the post structure.
548  * @param spId SAP ID of the service provider.
549  * @param staRsp Status response for common channels (BCCH, PCCH and CCCH).
550  * @return ROK/RFAILED
551 */
552 EXTERN S16 RgUiRguCStaRsp ARGS((Pst* pst,SpId spId,RguCStaRspInfo  *staRsp));
553 /** @brief Status Response from RLC to MAC to 
554  * inform the BO report for dedicated channels
555  * @param pst Pointer to the post structure.
556  * @param spId SAP ID of the service provider.
557  * @param staRsp Status response for dedicated channels (DCCH and DTCH).
558  * @return ROK/RFAILED
559 */
560 EXTERN S16 RgUiRguDStaRsp ARGS((Pst* pst,SpId spId,RguDStaRspInfo  *staRsp));
561 /** @brief Status Indication from MAC to RLC  
562  * as a response to the staRsp primitive from RLC.
563  * @param pst Pointer to the post structure.
564  * @param suId SAP ID of the service user.
565  * @param staInd Status indication on common channels (BCCH, PCCH and CCCH).
566  * @return ROK/RFAILED
567 */
568 EXTERN S16 RgUiRguCStaInd ARGS((Pst* pst,SuId suId,RguCStaIndInfo  *staInd));
569 /** @brief Status Indication from MAC to RLC  
570  * as a response to the staRsp primitive from RLC.
571  * @param pst Pointer to the post structure.
572  * @param suId SAP ID of the service user.
573  * @param staInd Status indication on dedicated channels (DCCH and DTCH).
574  * @return ROK/RFAILED
575 */
576 EXTERN S16 RgUiRguDStaInd ARGS((Pst* pst,SuId suId,RguDStaIndInfo  *staInd));
577 /** @brief flow control indication from MAC to RLC */  
578 EXTERN S16 RgUiRguFlowCntrlInd ARGS((Pst *pst, SuId suId, 
579 RguFlowCntrlInd *flowCntrlInd)); 
580 /*rgu_x_001.main_3 - ADD - L2M & R9 Support */
581 #ifdef LTE_L2_MEAS
582 /** @brief HARQ Status Indication from MAC to RLC  
583  * as a response to the Data Req from RLC.
584  * Informs HARQ feedback for the TB with sn mapping info. */
585 EXTERN S16 RgUiRguHqStaInd ARGS((Pst* pst,SuId suId,
586 RguHarqStatusInd *harqStatusInd));
587
588
589
590 /** @brief Request for measuring the timing Info for a LC from RLC to MAC  
591  * When the status is ON then Timing Info for data bursts 
592  * shall be captured and provided to RLC on DDatInd. */
593 EXTERN S16 RgUiRguL2MUlThrpMeasReq ARGS((Pst* pst,SpId spId,
594 RguL2MUlThrpMeasReqInfo  *l2mUlThrpMeasReq));
595
596 #endif /* LTE_L2_MEAS */
597
598 #endif
599
600 #ifdef KW
601 /** @brief Request from RLC to MAC to bind the interface saps */
602 EXTERN S16 KwLiRguBndReq ARGS((
603    Pst*                 pst,
604    SuId                 suId,
605    SpId                 spId
606 ));
607 /** @brief Request from RLC to MAC to Unbind the interface saps */
608 EXTERN S16 KwLiRguUbndReq ARGS((
609    Pst*                 pst,
610    SpId                 spId,
611    Reason               reason
612 ));
613 /** @brief Confirmation from MAC to RLC for the bind/Unbind 
614  * request for the interface saps */
615 EXTERN S16 KwLiRguBndCfm ARGS((
616    Pst*                 pst,
617    SuId                 suId,
618    U8                   status
619 ));
620 /** @brief Request from RLC to MAC for forwarding SDUs on common
621  * channel for transmission */
622 EXTERN S16 KwLiRguCDatReq ARGS((
623    Pst*                 pst,
624    SpId                 spId,
625    RguCDatReqInfo  *    datReq
626 ));
627 /** @brief Request from RLC to MAC for forwarding SDUs on 
628  * dedicated channel for transmission */
629 EXTERN S16 KwLiRguDDatReq ARGS((
630    Pst*                 pst,
631    SpId                 spId,
632    RguDDatReqInfo  *    datReq
633 ));
634 /** @brief Data Indication from MAC to RLC to 
635  * forward the data received for common channels*/
636 EXTERN S16 KwLiRguCDatInd ARGS((
637    Pst*                 pst,
638    SuId                 suId,
639    RguCDatIndInfo  *    datInd
640 ));
641 /** @brief Data Indication from MAC to RLC to 
642  * forward the data received for dedicated channels*/
643 EXTERN S16 KwLiRguDDatInd ARGS((
644    Pst*                 pst,
645    SuId                 suId,
646    RguDDatIndInfo  *    datInd
647 ));
648 /** @brief Primitive invoked from RLC to MAC to 
649  * inform the BO report for common channels*/
650 EXTERN S16 KwLiRguCStaRsp ARGS((
651    Pst*                 pst,
652    SpId                 spId,
653    RguCStaRspInfo  *    staRsp
654 ));
655 /** @brief Primitive invoked from RLC to MAC to 
656  * inform the BO report for dedicated channels*/
657 EXTERN S16 KwLiRguDStaRsp ARGS((
658    Pst*                 pst,
659    SpId                 spId,
660    RguDStaRspInfo  *    staRsp
661 ));
662 /** @brief Status Indication from MAC to RLC  
663  * as a response to the staRsp primitive from RLC.
664  * Informs RLC of the totalBufferSize and Timing Info 
665  * for the transmission on common channels. */
666 EXTERN S16 KwLiRguCStaInd ARGS((
667    Pst*                 pst,
668    SuId                 suId,
669    RguCStaIndInfo  *    staInd
670 ));
671 /** @brief Status Indication from MAC to RLC  
672  * as a response to the staRsp primitive from RLC.
673  * Informs RLC of the totalBufferSize and Timing Info 
674  * for the transmission on dedicated channels. */
675 EXTERN S16 KwLiRguDStaInd ARGS((
676    Pst*                 pst,
677    SuId                 suId,
678    RguDStaIndInfo  *    staInd
679 ));
680
681 #ifdef LTE_L2_MEAS
682 /** @brief HARQ Status Indication from MAC to RLC  
683  * as a response to the Data Req from RLC.
684  * Informs HARQ feedback for the PDU with sn. */
685 EXTERN S16 KwLiRguHqStaInd ARGS((
686    Pst*                 pst,
687    SuId                 suId,
688    RguHarqStatusInd     *harqStatusInd));
689
690
691 /** @brief Request for measuring the timing Info for a LC from RLC to MAC  
692  * When the status is ON then Timing Info for data bursts 
693  * shall be captured and provided to RLC on DDatInd. */
694 EXTERN S16 KwLiRguL2MUlThrpMeasReq ARGS((
695    Pst*                 pst,
696    SpId                 spId,
697    RguL2MUlThrpMeasReqInfo *l2mUlThrpMeasReq));
698
699 #endif /* LTE_L2_MEAS */
700
701 /** @brief flowCntrl Indication from MAC to RLC  */
702 EXTERN S16 KwLiRguFlowCntrlInd ARGS((
703 Pst              *pst, 
704 SuId             suId, 
705 RguFlowCntrlInd  *flowCntrlInd
706 ));
707 #endif
708
709 #ifdef LCRGU
710 /** @brief Request from RLC to MAC to bind the interface saps */
711 EXTERN S16 cmPkRguBndReq ARGS((
712    Pst*                 pst,
713    SuId                 suId,
714    SpId                 spId
715 ));
716 /** @brief Request from RLC to MAC to bind the interface saps */
717 EXTERN S16 cmUnpkRguBndReq ARGS((
718    RguBndReq            func,
719    Pst*                 pst,
720    Buffer               *mBuf
721 ));
722 /** @brief Request from RLC to MAC to Unbind the interface saps */
723 EXTERN S16 cmPkRguUbndReq ARGS((
724    Pst*                 pst,
725    SpId                 spId,
726    Reason               reason
727 ));
728 /** @brief Request from RLC to MAC to Unbind the interface saps */
729 EXTERN S16 cmUnpkRguUbndReq ARGS((
730    RguUbndReq           func,
731    Pst*                 pst,
732    Buffer               *mBuf
733 ));
734 /** @brief Confirmation from MAC to RLC for the bind/Unbind 
735  * request for the interface saps */
736 EXTERN S16 cmPkRguBndCfm ARGS((
737    Pst*                 pst,
738    SuId                 suId,
739    U8                   status
740 ));
741 /** @brief Confirmation from MAC to RLC for the bind/Unbind 
742  * request for the interface saps */
743 EXTERN S16 cmUnpkRguBndCfm ARGS((
744    RguBndCfm            func,
745    Pst*                 pst,
746    Buffer               *mBuf
747 ));
748 /** @brief Request from RLC to MAC for forwarding SDUs on common
749  * channel for transmission */
750 EXTERN S16 cmPkRguCDatReq ARGS((
751    Pst*                 pst,
752    SpId                 spId,
753    RguCDatReqInfo  *    datReq
754 ));
755 /** @brief Request from RLC to MAC for forwarding SDUs on common
756  * channel for transmission */
757 EXTERN S16 cmUnpkRguCDatReq ARGS((
758    RguCDatReq           func,
759    Pst*                 pst,
760    Buffer               *mBuf
761 ));
762 /** @brief Request from RLC to MAC for forwarding SDUs on 
763  * dedicated channel for transmission */
764 EXTERN S16 cmPkRguDDatReq ARGS((
765    Pst*                 pst,
766    SpId                 spId,
767    RguDDatReqInfo  *    datReq
768 ));
769 /** @brief Request from RLC to MAC for forwarding SDUs on 
770  * dedicated channel for transmission */
771 EXTERN S16 cmUnpkRguDDatReq ARGS((
772    RguDDatReq           func,
773    Pst*                 pst,
774    Buffer               *mBuf
775 ));
776 /** @brief Data Indication from MAC to RLC to 
777  * forward the data received for common channels*/
778 EXTERN S16 cmPkRguCDatInd ARGS((
779    Pst*                 pst,
780    SuId                 suId,
781    RguCDatIndInfo  *    datInd
782 ));
783 /** @brief Data Indication from MAC to RLC to 
784  * forward the data received for common channels*/
785 EXTERN S16 cmUnpkRguCDatInd ARGS((
786    RguCDatInd           func,
787    Pst*                 pst,
788    Buffer               *mBuf
789 ));
790 /** @brief Data Indication from MAC to RLC to 
791  * forward the data received for dedicated channels*/
792 EXTERN S16 cmPkRguDDatInd ARGS((
793    Pst*                 pst,
794    SuId                 suId,
795    RguDDatIndInfo  *    datInd
796 ));
797 /** @brief Data Indication from MAC to RLC to 
798  * forward the data received for dedicated channels*/
799 EXTERN S16 cmUnpkRguDDatInd ARGS((
800    RguDDatInd           func,
801    Pst*                 pst,
802    Buffer               *mBuf
803 ));
804 /** @brief Primitive invoked from RLC to MAC to 
805  * inform the BO report for common channels*/
806 EXTERN S16 cmPkRguCStaRsp ARGS((
807    Pst*                 pst,
808    SpId                 spId,
809    RguCStaRspInfo  *    staRsp
810 ));
811 /** @brief Primitive invoked from RLC to MAC to 
812  * inform the BO report for common channels*/
813 EXTERN S16 cmUnpkRguCStaRsp ARGS((
814    RguCStaRsp           func,
815    Pst*                 pst,
816    Buffer               *mBuf
817 ));
818 /** @brief Primitive invoked from RLC to MAC to 
819  * inform the BO report for dedicated channels*/
820 EXTERN S16 cmPkRguDStaRsp ARGS((
821    Pst*                 pst,
822    SpId                 spId,
823    RguDStaRspInfo  *    staRsp
824 ));
825 /** @brief Primitive invoked from RLC to MAC to 
826  * inform the BO report for dedicated channels*/
827 EXTERN S16 cmUnpkRguDStaRsp ARGS((
828    RguDStaRsp           func,
829    Pst*                 pst,
830    Buffer               *mBuf
831 ));
832 /** @brief Status Indication from MAC to RLC  
833  * as a response to the staRsp primitive from RLC.
834  * Informs RLC of the totalBufferSize and Timing Info 
835  * for the transmission on common channels. */
836 EXTERN S16 cmPkRguCStaInd ARGS((
837    Pst*                 pst,
838    SuId                 suId,
839    RguCStaIndInfo  *    staInd
840 ));
841 /** @brief Status Indication from MAC to RLC  
842  * as a response to the staRsp primitive from RLC.
843  * Informs RLC of the totalBufferSize and Timing Info 
844  * for the transmission on common channels. */
845 EXTERN S16 cmUnpkRguCStaInd ARGS((
846    RguCStaInd           func,
847    Pst*                 pst,
848    Buffer               *mBuf
849 ));
850 /** @brief Status Indication from MAC to RLC  
851  * as a response to the staRsp primitive from RLC.
852  * Informs RLC of the totalBufferSize and Timing Info 
853  * for the transmission on dedicated channels. */
854 EXTERN S16 cmPkRguDStaInd ARGS((
855    Pst*                 pst,
856    SuId                 suId,
857    RguDStaIndInfo  *    staInd
858 ));
859 EXTERN S16 cmPkRguFlowCntrlInfo ARGS((
860 RguFlowCntrlInd *param, 
861 Buffer           *mBuf
862 ));
863 EXTERN S16 cmPkRguUeFlowCntrlInfo ARGS((
864 RguUeFlowCntrlInfo *param,
865 Buffer           *mBuf
866 ));
867 EXTERN S16 cmPkRguLcFlowCntrlInfo ARGS((
868 RguLcFlowCntrlInfo *param,
869 Buffer           *mBuf
870 ));
871 EXTERN S16 cmUnpkRguLcFlowCntrlInfo ARGS((
872 RguLcFlowCntrlInfo *param,
873 Buffer           *mBuf
874 ));
875 EXTERN S16 cmUnpkRguUeFlowCntrlInfo ARGS((
876 RguUeFlowCntrlInfo *param,
877 Buffer           *mBuf
878 ));
879 EXTERN S16 cmUnpkRguFlowCntrlInfo ARGS((
880 RguFlowCntrlInd *param, 
881 Buffer           *mBuf
882 ));
883 /** @brief Status Indication from MAC to RLC  
884  * as a response to the staRsp primitive from RLC.
885  * Informs RLC of the totalBufferSize and Timing Info 
886  * for the transmission on dedicated channels. */
887 EXTERN S16 cmUnpkRguDStaInd ARGS((
888    RguDStaInd           func,
889    Pst*                 pst,
890    Buffer               *mBuf
891 ));
892 EXTERN S16 cmPkRguPduInfo ARGS((
893    RguPduInfo           *param,
894    Buffer               *mBuf
895 ));
896 EXTERN S16 cmUnpkRguPduInfo ARGS((
897    RguPduInfo           *param,
898    Buffer               *mBuf
899 ));
900 EXTERN S16 cmPkRguDBoReport ARGS((
901    RguDBoReport         *param,
902    Buffer               *mBuf
903 ));
904 EXTERN S16 cmUnpkRguDBoReport ARGS((
905    RguDBoReport         *param,
906    Buffer               *mBuf
907 ));
908
909 EXTERN S16 cmPkRguCDatReqInfo ARGS((
910    RguCDatReqInfo       *param,
911    Buffer               *mBuf
912 ));
913 EXTERN S16 cmUnpkRguCDatReqInfo ARGS((
914    RguCDatReqInfo       *param,
915    Buffer               *mBuf
916 ));
917 EXTERN S16 cmPkRguLchDatReq ARGS((
918    RguLchDatReq         *param,
919    Buffer               *mBuf
920 ));
921 EXTERN S16 cmUnpkRguLchDatReq ARGS((
922    RguLchDatReq         *param,
923    Buffer               *mBuf
924 ));
925 EXTERN S16 cmPkRguDatReqTb ARGS((
926    RguDatReqTb          *param,
927    Buffer               *mBuf
928 ));
929 EXTERN S16 cmPkRguStaIndTb ARGS((
930    RguStaIndTb          *param,
931    Buffer               *mBuf
932 ));
933 EXTERN S16 cmUnpkRguStaIndTb ARGS((
934    RguStaIndTb          *param,
935    Buffer               *mBuf
936 ));
937 /* rgu_x_001.main_3 - ADD - L2M Support */
938 #ifdef LTE_L2_MEAS
939 EXTERN S16 cmPkRguDDatReqInfo ARGS((
940    Pst                  *pst,
941    RguDDatReqInfo       *param,
942    Buffer               *mBuf
943 ));
944 EXTERN S16 cmUnpkRguDDatReqInfo ARGS((
945    Pst                  *pst,
946    RguDDatReqInfo       *param,
947    Buffer               *mBuf
948 ));
949 EXTERN S16 cmUnpkRguDatReqTb ARGS((
950    Pst                  *pst,
951    RguDatReqTb          *param,
952    Buffer               *mBuf
953 ));
954 #else
955 EXTERN S16 cmPkRguDDatReqInfo ARGS((
956    RguDDatReqInfo       *param,
957    Buffer               *mBuf
958 ));
959 EXTERN S16 cmUnpkRguDDatReqInfo ARGS((
960    RguDDatReqInfo       *param,
961    Buffer               *mBuf
962 ));
963 EXTERN S16 cmUnpkRguDatReqTb ARGS((
964    RguDatReqTb          *param,
965    Buffer               *mBuf
966 ));
967 #endif
968 EXTERN S16 cmPkRguCDatIndInfo ARGS((
969    RguCDatIndInfo       *param,
970    Buffer               *mBuf
971 ));
972 EXTERN S16 cmUnpkRguCDatIndInfo ARGS((
973    RguCDatIndInfo       *param,
974    Buffer               *mBuf
975 ));
976 EXTERN S16 cmPkRguLchDatInd ARGS((
977    RguLchDatInd         *param,
978    Buffer               *mBuf
979 ));
980 EXTERN S16 cmUnpkRguLchDatInd ARGS((
981    RguLchDatInd         *param,
982    Buffer               *mBuf
983 ));
984 EXTERN S16 cmPkRguDDatIndInfo ARGS((
985    RguDDatIndInfo       *param,
986    Buffer               *mBuf
987 ));
988 EXTERN S16 cmUnpkRguDDatIndInfo ARGS((
989    RguDDatIndInfo       *param,
990    Buffer               *mBuf
991 ));
992
993 EXTERN S16 cmPkRguCStaRspInfo ARGS((
994    RguCStaRspInfo       *param,
995    Buffer               *mBuf
996 ));
997 EXTERN S16 cmUnpkRguCStaRspInfo ARGS((
998    RguCStaRspInfo       *param,
999    Buffer               *mBuf
1000 ));
1001 EXTERN S16 cmPkRguDStaRspInfo ARGS((
1002    RguDStaRspInfo       *param,
1003    Buffer               *mBuf
1004 ));
1005 EXTERN S16 cmUnpkRguDStaRspInfo ARGS((
1006    RguDStaRspInfo       *param,
1007    Buffer               *mBuf
1008 ));
1009 EXTERN S16 cmPkRguCStaIndInfo ARGS((
1010    RguCStaIndInfo       *param,
1011    Buffer               *mBuf
1012 ));
1013 EXTERN S16 cmUnpkRguCStaIndInfo ARGS((
1014    RguCStaIndInfo       *param,
1015    Buffer               *mBuf
1016 ));
1017 EXTERN S16 cmPkRguLchStaInd ARGS((
1018    RguLchStaInd         *param,
1019    Buffer               *mBuf
1020 ));
1021 EXTERN S16 cmUnpkRguLchStaInd ARGS((
1022    RguLchStaInd         *param,
1023    Buffer               *mBuf
1024 ));
1025 EXTERN S16 cmPkRguDStaIndInfo ARGS((
1026    RguDStaIndInfo       *param,
1027    Buffer               *mBuf
1028 ));
1029 EXTERN S16 cmUnpkRguDStaIndInfo ARGS((
1030    RguDStaIndInfo       *param,
1031    Buffer               *mBuf
1032 ));
1033   
1034 /*rgu_x_001.main_3 - ADD - L2M  & R9 Support */
1035 #ifdef LTE_L2_MEAS
1036 /** @brief Request from MAC to RLC for forwarding HARQ Status */
1037
1038 EXTERN S16 cmPkRguHqStaInd ARGS((
1039    Pst*                 pst,
1040    SpId                 spId,
1041    RguHarqStatusInd     *harqStatusInd));
1042
1043 /** @brief Request from MAC to RLC forwarding HARQ status  */
1044 EXTERN S16 cmUnpkRguHqStaInd ARGS((
1045    RguHqStaInd          func,
1046    Pst*                 pst,
1047    Buffer               *mBuf
1048 ));
1049
1050 /** @brief Primitive invoked from RLC to MAC to 
1051  *  * inform the On/Off Status of LC Id*/
1052 EXTERN S16 cmPkRguL2MUlThrpMeasReq ARGS((
1053    Pst*                 pst,
1054    SpId                 spId,
1055    RguL2MUlThrpMeasReqInfo*    measReq
1056 ));
1057
1058 /** @brief Primitive invoked from RLC to MAC to 
1059  *  * inform the On/Off Status of LC Id*/
1060 EXTERN S16 cmUnpkRguL2MUlThrpMeasReq ARGS((
1061    RguL2MUlThrpMeasReq  func,
1062    Pst*                 pst,
1063    Buffer               *mBuf
1064 ));
1065
1066 EXTERN S16 cmPkRguL2MUlThrpMeasReqInfo ARGS((
1067    RguL2MUlThrpMeasReqInfo *param,
1068    Buffer               *mBuf
1069 ));
1070
1071 EXTERN S16 cmUnpkRguL2MUlThrpMeasReqInfo ARGS((
1072    RguL2MUlThrpMeasReqInfo       *param,
1073    Buffer               *mBuf
1074 ));
1075
1076 #endif /* LTE_L2_MEAS */
1077 EXTERN S16 cmUnpkRguFlowCntrlInd ARGS((
1078    RguFlowCntrlIndInfo  func,
1079    Pst                  *pst,
1080    Buffer               *mBuf
1081  ));
1082
1083 EXTERN S16 cmPkRguFlowCntrlInd ARGS((
1084    Pst* pst,
1085    SuId suId,
1086    RguFlowCntrlInd  *flowCntrlInd
1087  ));
1088 #endif
1089
1090 #ifdef __cplusplus
1091 }
1092 #endif
1093 #endif /* __RGUX__ */
1094
1095 /********************************************************************30**
1096
1097          End of file
1098 **********************************************************************/