86186816fd2023d7a1dbfecc6834423301e529c2
[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    uint8_t     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    uint16_t  estRlcHdrSz;       /*!< Estimated RLC header size */
65    Bool staPduPrsnt;       /*!< Indicates whether the BO includes
66                                 a status PDU as well */
67 #endif
68    uint32_t  staPduBo;          /*!< Indicates the Status PDU BO. 
69                                 This is included in bo */
70    uint32_t  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    uint32_t             transId;         /*!< Transaction ID */
82 #ifdef EMTC_ENABLE
83    uint8_t              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    uint16_t       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    uint32_t            tbId;               /*!< TB id for which sn info map */
122    uint8_t             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    uint8_t            numTbs;                    /*!< Number of Tbs present */
134  
135    uint32_t           tbId[RGU_MAX_TB];          /*!< tbId provided by RLC in
136                                                  DatReq  */                                                                                 
137    uint16_t           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    uint8_t            numLcId;                   /*!< Number of LC Ids configured */
158    uint8_t            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    uint8_t           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    uint32_t          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    uint32_t           transId;      /*!< Transaction ID */
188    uint8_t            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    uint8_t                 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    uint32_t                 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    uint8_t           numLch;              /*!< Number of logical channels within
261                                        the UE that has data */
262    RguLchDatInd lchData[MAX_NUM_LC]; /*!< Data buffers of logical channels */
263 #ifdef LTE_L2_MEAS
264    uint32_t          ttiCnt;              /*!< The Current TTI in the Cell */
265    uint8_t           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    uint8_t          emtcDiReason;   /*!< Reason for DI message to send. */
280    uint8_t          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    uint32_t         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    uint8_t           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    uint32_t          tbId;                /*!< RLC internal TB id */                                           
339    uint16_t          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    uint32_t           transId;     /*!< Transaction ID */
349    uint8_t            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    uint8_t               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   uint32_t         pktAdmitCnt; 
371   uint32_t         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   uint32_t                  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    uint32_t                 numUes;
391    RguUeFlowCntrlInfo  ueFlowCntrlInfo[RGU_MAX_NUM_UE_PER_TTI];
392 }RguFlowCntrlInd;  
393 typedef struct rguInfoRingElem 
394 {
395   SpId         spId;
396   uint8_t           event;
397   Void         *msg;
398 }RguInfoRingElem;
399
400 /***********************************************************************
401           type definitions for upper layer interface - RLC primitives
402  ***********************************************************************/
403 /** @brief Bind Request from RLC to MAC to bind the interface SAPs */
404 typedef S16 (*RguBndReq) ARGS((
405    Pst*                 pst,
406    SuId                 suId,
407    SpId                 spId));
408 /** @brief Unbind Request from RLC to MAC to unbind the interface SAPs */
409 typedef S16 (*RguUbndReq) ARGS((
410    Pst*                 pst,
411    SpId                 spId,
412    Reason               reason));
413 /** @brief Bind Confirmation from MAC to RLC for the bind/unbind 
414  * request for the interface SAPs */
415 typedef S16 (*RguBndCfm) ARGS((
416    Pst*                 pst,
417    SuId                 suId,
418    uint8_t                   status));
419 /** @brief Data Request from RLC to MAC for forwarding SDUs on common
420  * channel for transmission */
421 typedef S16 (*RguCDatReq) ARGS((
422    Pst*                 pst,
423    SpId                 spId,
424    RguCDatReqInfo  *    datReq));
425 /** @brief Data Request from RLC to MAC for forwarding SDUs on 
426  * dedicated channel for transmission */
427 typedef S16 (*RguDDatReq) ARGS((
428    Pst*                 pst,
429    SpId                 spId,
430    RguDDatReqInfo       *datReq));
431
432 /** @brief Data Indication from MAC to RLC to 
433  * forward the data received for common channels */
434 typedef S16 (*RguCDatInd) ARGS((
435    Pst*                 pst,
436    SuId                 suId,
437    RguCDatIndInfo  *    datInd));
438 /** @brief Data Indication from MAC to RLC to 
439  * forward the data received for dedicated channels */
440 typedef S16 (*RguDDatInd) ARGS((
441    Pst*                 pst,
442    SuId                 suId,
443    RguDDatIndInfo       *datInd));
444
445 /** @brief Status Response from RLC to MAC to 
446  * inform the BO report for common channels */
447 typedef S16 (*RguCStaRsp) ARGS((
448    Pst*                 pst,
449    SpId                 spId,
450    RguCStaRspInfo  *    staRsp));
451 /** @brief Status Repsonse from RLC to MAC to 
452  * inform the BO report for dedicated channels */
453 typedef S16 (*RguDStaRsp) ARGS((
454    Pst*                 pst,
455    SpId                 spId,
456    RguDStaRspInfo  *    staRsp));
457
458 /** @brief Status Indication from MAC to RLC  
459  * as a response to the staRsp primitive from RLC */
460 typedef S16 (*RguCStaInd) ARGS((
461    Pst*                 pst,
462    SuId                 suId,
463    RguCStaIndInfo  *    staInd));
464 /** @brief Status Indication from MAC to RLC  
465  * as a response to the staRsp primitive from RLC */
466 typedef S16 (*RguDStaInd) ARGS((
467    Pst*                 pst,
468    SuId                 suId,
469    RguDStaIndInfo *    staInd));
470
471 typedef S16 (*RguFlowCntrlIndInfo) ARGS((
472    Pst                  *pst,
473    SuId                 suId,
474    RguFlowCntrlInd      *flowCntrlInd));
475
476 /* rgu_x_001.main_3 - ADD - L2M & R9 Support */
477 #ifdef LTE_L2_MEAS
478 /** @brief HARQ Status Indication from MAC to RLC  
479  * as a response to Data Req primitive from RLC */
480 typedef S16 (*RguHqStaInd) ARGS((
481    Pst*                 pst,
482    SuId                 suId,
483    RguHarqStatusInd     *harqStatusInd));
484 /** @brief LCID measurement status from RLC to MAC  
485  * so as to provide Timing Info in DDatInd */
486 typedef S16 (*RguL2MUlThrpMeasReq) ARGS((
487    Pst*                 pst,
488    SpId                 spId,
489    RguL2MUlThrpMeasReqInfo  *l2mUlThrpMeasReq));
490
491 #endif /* LTE_L2_MEAS */
492
493
494 #ifdef RG
495 /** @brief Bind Request from RLC to MAC to bind the interface SAPs
496  * @param pst Pointer to the post structure.
497  * @param suId SAP ID of the service user.
498  * @param spId SAP ID of the service provider.
499  * @return ROK/RFAILED
500 */
501 S16 RgUiRguBndReq ARGS((Pst* pst,SuId suId,SpId spId));
502 /** @brief Unbind Request from RLC to MAC to unbind the interface SAPs 
503  * @param pst Pointer to the post structure.
504  * @param spId SAP ID of the service provider.
505  * @param reason Reason for unbind request.
506  * @return ROK/RFAILED
507 */
508 S16 RgUiRguUbndReq ARGS((Pst* pst,SpId spId,Reason reason));
509 /** @brief Bind Confirmation from MAC to RLC for the bind and unbind 
510  * request for the interface SAPs 
511  * @param pst Pointer to the post structure.
512  * @param suId SAP ID of the service user.
513  * @param status Status of the bind request. 
514  * @return ROK/RFAILED
515 */
516 S16 RgUiRguBndCfm ARGS((Pst* pst,SuId suId,uint8_t status));
517 /** @brief Data Request from RLC to MAC for forwarding SDUs on common
518  * channel for transmission 
519  * @param pst Pointer to the post structure.
520  * @param spId SAP ID of the service provider.
521  * @param datReq Data request for common channels (BCCH, PCCH and CCCH).
522  * @return ROK/RFAILED
523 */
524 S16 RgUiRguCDatReq ARGS((Pst* pst,SpId spId,RguCDatReqInfo *datReq));
525 /** @brief Data Request from RLC to MAC for forwarding SDUs on 
526  * dedicated channel for transmission 
527  * @param pst Pointer to the post structure.
528  * @param spId SAP ID of the service provider.
529  * @param datReq Data request for dedicated channels (DCCH and DTCH).
530  * @return ROK/RFAILED
531 */
532 S16 RgUiRguDDatReq ARGS((Pst* pst,SpId spId,RguDDatReqInfo  *datReq));
533
534 /** @brief Data Indication from MAC to RLC to 
535  * forward the data received for common channels
536  * @param pst Pointer to the post structure.
537  * @param suId SAP ID of the service user.
538  * @param datInd Data indication on CCCH.
539  * @return ROK/RFAILED
540 */
541 S16 RgUiRguCDatInd ARGS((Pst* pst,SuId suId,RguCDatIndInfo  *datInd));
542 /** @brief Data Indication from MAC to RLC to 
543  * forward the data received for dedicated channels
544  * @param pst Pointer to the post structure.
545  * @param suId SAP ID of the service user.
546  * @param datInd Data indication on dedicated channels (DCCH and DTCH).
547  * @return ROK/RFAILED
548 */
549 S16 RgUiRguDDatInd ARGS((Pst* pst,SuId suId,RguDDatIndInfo  *datInd));
550 /** @brief Status Response from RLC to MAC to 
551  * inform the BO report for common channels
552  * @param pst Pointer to the post structure.
553  * @param spId SAP ID of the service provider.
554  * @param staRsp Status response for common channels (BCCH, PCCH and CCCH).
555  * @return ROK/RFAILED
556 */
557 S16 RgUiRguCStaRsp ARGS((Pst* pst,SpId spId,RguCStaRspInfo  *staRsp));
558 /** @brief Status Response from RLC to MAC to 
559  * inform the BO report for dedicated channels
560  * @param pst Pointer to the post structure.
561  * @param spId SAP ID of the service provider.
562  * @param staRsp Status response for dedicated channels (DCCH and DTCH).
563  * @return ROK/RFAILED
564 */
565 S16 RgUiRguDStaRsp ARGS((Pst* pst,SpId spId,RguDStaRspInfo  *staRsp));
566
567 /** @brief Status Indication from MAC to RLC  
568  * as a response to the staRsp primitive from RLC.
569  * @param pst Pointer to the post structure.
570  * @param suId SAP ID of the service user.
571  * @param staInd Status indication on common channels (BCCH, PCCH and CCCH).
572  * @return ROK/RFAILED
573 */
574 S16 RgUiRguCStaInd ARGS((Pst* pst,SuId suId,RguCStaIndInfo  *staInd));
575 /** @brief Status Indication from MAC to RLC  
576  * as a response to the staRsp primitive from RLC.
577  * @param pst Pointer to the post structure.
578  * @param suId SAP ID of the service user.
579  * @param staInd Status indication on dedicated channels (DCCH and DTCH).
580  * @return ROK/RFAILED
581 */
582 S16 RgUiRguDStaInd ARGS((Pst* pst,SuId suId,RguDStaIndInfo  *staInd));
583 /** @brief flow control indication from MAC to RLC */  
584 S16 RgUiRguFlowCntrlInd ARGS((Pst *pst, SuId suId, 
585 RguFlowCntrlInd *flowCntrlInd)); 
586 /*rgu_x_001.main_3 - ADD - L2M & R9 Support */
587 #ifdef LTE_L2_MEAS
588 /** @brief HARQ Status Indication from MAC to RLC  
589  * as a response to the Data Req from RLC.
590  * Informs HARQ feedback for the TB with sn mapping info. */
591 S16 RgUiRguHqStaInd ARGS((Pst* pst,SuId suId,
592 RguHarqStatusInd *harqStatusInd));
593
594
595
596 /** @brief Request for measuring the timing Info for a LC from RLC to MAC  
597  * When the status is ON then Timing Info for data bursts 
598  * shall be captured and provided to RLC on DDatInd. */
599 S16 RgUiRguL2MUlThrpMeasReq ARGS((Pst* pst,SpId spId,
600 RguL2MUlThrpMeasReqInfo  *l2mUlThrpMeasReq));
601
602 #endif /* LTE_L2_MEAS */
603
604 #endif
605
606 #ifdef KW
607 /** @brief Request from RLC to MAC to bind the interface saps */
608 S16 RlcLiRguBndReq ARGS((
609    Pst*                 pst,
610    SuId                 suId,
611    SpId                 spId
612 ));
613 /** @brief Request from RLC to MAC to Unbind the interface saps */
614 S16 RlcLiRguUbndReq ARGS((
615    Pst*                 pst,
616    SpId                 spId,
617    Reason               reason
618 ));
619 /** @brief Confirmation from MAC to RLC for the bind/Unbind 
620  * request for the interface saps */
621 S16 RlcLiRguBndCfm ARGS((
622    Pst*                 pst,
623    SuId                 suId,
624    uint8_t                   status
625 ));
626 /** @brief Request from RLC to MAC for forwarding SDUs on common
627  * channel for transmission */
628 S16 RlcLiRguCDatReq ARGS((
629    Pst*                 pst,
630    SpId                 spId,
631    RguCDatReqInfo  *    datReq
632 ));
633
634 /** @brief Primitive invoked from RLC to MAC to 
635  * inform the BO report for common channels*/
636 S16 RlcLiRguCStaRsp ARGS((
637    Pst*                 pst,
638    SpId                 spId,
639    RguCStaRspInfo  *    staRsp
640 ));
641
642 #ifdef LTE_L2_MEAS
643 /** @brief HARQ Status Indication from MAC to RLC  
644  * as a response to the Data Req from RLC.
645  * Informs HARQ feedback for the PDU with sn. */
646 S16 RlcLiRguHqStaInd ARGS((
647    Pst*                 pst,
648    SuId                 suId,
649    RguHarqStatusInd     *harqStatusInd));
650
651
652 /** @brief Request for measuring the timing Info for a LC from RLC to MAC  
653  * When the status is ON then Timing Info for data bursts 
654  * shall be captured and provided to RLC on DDatInd. */
655 S16 RlcLiRguL2MUlThrpMeasReq ARGS((
656    Pst*                 pst,
657    SpId                 spId,
658    RguL2MUlThrpMeasReqInfo *l2mUlThrpMeasReq));
659
660 #endif /* LTE_L2_MEAS */
661
662 /** @brief flowCntrl Indication from MAC to RLC  */
663 S16 RlcLiRguFlowCntrlInd ARGS((
664 Pst              *pst, 
665 SuId             suId, 
666 RguFlowCntrlInd  *flowCntrlInd
667 ));
668 #endif
669
670 #ifdef LCRGU
671 /** @brief Request from RLC to MAC to bind the interface saps */
672 S16 cmPkRguBndReq ARGS((
673    Pst*                 pst,
674    SuId                 suId,
675    SpId                 spId
676 ));
677 /** @brief Request from RLC to MAC to bind the interface saps */
678 S16 cmUnpkRguBndReq ARGS((
679    RguBndReq            func,
680    Pst*                 pst,
681    Buffer               *mBuf
682 ));
683 /** @brief Request from RLC to MAC to Unbind the interface saps */
684 S16 cmPkRguUbndReq ARGS((
685    Pst*                 pst,
686    SpId                 spId,
687    Reason               reason
688 ));
689 /** @brief Request from RLC to MAC to Unbind the interface saps */
690 S16 cmUnpkRguUbndReq ARGS((
691    RguUbndReq           func,
692    Pst*                 pst,
693    Buffer               *mBuf
694 ));
695 /** @brief Confirmation from MAC to RLC for the bind/Unbind 
696  * request for the interface saps */
697 S16 cmPkRguBndCfm ARGS((
698    Pst*                 pst,
699    SuId                 suId,
700    uint8_t                   status
701 ));
702 /** @brief Confirmation from MAC to RLC for the bind/Unbind 
703  * request for the interface saps */
704 S16 cmUnpkRguBndCfm ARGS((
705    RguBndCfm            func,
706    Pst*                 pst,
707    Buffer               *mBuf
708 ));
709 /** @brief Request from RLC to MAC for forwarding SDUs on common
710  * channel for transmission */
711 S16 cmPkRguCDatReq ARGS((
712    Pst*                 pst,
713    SpId                 spId,
714    RguCDatReqInfo  *    datReq
715 ));
716 /** @brief Request from RLC to MAC for forwarding SDUs on common
717  * channel for transmission */
718 S16 cmUnpkRguCDatReq ARGS((
719    RguCDatReq           func,
720    Pst*                 pst,
721    Buffer               *mBuf
722 ));
723
724 /** @brief Data Indication from MAC to RLC to 
725  * forward the data received for common channels*/
726 S16 cmPkRguCDatInd ARGS((
727    Pst*                 pst,
728    SuId                 suId,
729    RguCDatIndInfo  *    datInd
730 ));
731 /** @brief Data Indication from MAC to RLC to 
732  * forward the data received for common channels*/
733 S16 cmUnpkRguCDatInd ARGS((
734    RguCDatInd           func,
735    Pst*                 pst,
736    Buffer               *mBuf
737 ));
738
739 /** @brief Primitive invoked from RLC to MAC to 
740  * inform the BO report for common channels*/
741 S16 cmPkRguCStaRsp ARGS((
742    Pst*                 pst,
743    SpId                 spId,
744    RguCStaRspInfo  *    staRsp
745 ));
746 /** @brief Primitive invoked from RLC to MAC to 
747  * inform the BO report for common channels*/
748 S16 cmUnpkRguCStaRsp ARGS((
749    RguCStaRsp           func,
750    Pst*                 pst,
751    Buffer               *mBuf
752 ));
753
754 /** @brief Status Indication from MAC to RLC  
755  * as a response to the staRsp primitive from RLC.
756  * Informs RLC of the totalBufferSize and Timing Info 
757  * for the transmission on common channels. */
758 S16 cmPkRguCStaInd ARGS((
759    Pst*                 pst,
760    SuId                 suId,
761    RguCStaIndInfo  *    staInd
762 ));
763 /** @brief Status Indication from MAC to RLC  
764  * as a response to the staRsp primitive from RLC.
765  * Informs RLC of the totalBufferSize and Timing Info 
766  * for the transmission on common channels. */
767 S16 cmUnpkRguCStaInd ARGS((
768    RguCStaInd           func,
769    Pst*                 pst,
770    Buffer               *mBuf
771 ));
772
773 S16 cmPkRguFlowCntrlInfo ARGS((
774 RguFlowCntrlInd *param, 
775 Buffer           *mBuf
776 ));
777 S16 cmPkRguUeFlowCntrlInfo ARGS((
778 RguUeFlowCntrlInfo *param,
779 Buffer           *mBuf
780 ));
781 S16 cmPkRguLcFlowCntrlInfo ARGS((
782 RguLcFlowCntrlInfo *param,
783 Buffer           *mBuf
784 ));
785 S16 cmUnpkRguLcFlowCntrlInfo ARGS((
786 RguLcFlowCntrlInfo *param,
787 Buffer           *mBuf
788 ));
789 S16 cmUnpkRguUeFlowCntrlInfo ARGS((
790 RguUeFlowCntrlInfo *param,
791 Buffer           *mBuf
792 ));
793 S16 cmUnpkRguFlowCntrlInfo ARGS((
794 RguFlowCntrlInd *param, 
795 Buffer           *mBuf
796 ));
797
798 S16 cmPkRguPduInfo ARGS((
799    RguPduInfo           *param,
800    Buffer               *mBuf
801 ));
802 S16 cmUnpkRguPduInfo ARGS((
803    RguPduInfo           *param,
804    Buffer               *mBuf
805 ));
806 S16 cmPkRguDBoReport ARGS((
807    RguDBoReport         *param,
808    Buffer               *mBuf
809 ));
810 S16 cmUnpkRguDBoReport ARGS((
811    RguDBoReport         *param,
812    Buffer               *mBuf
813 ));
814
815 S16 cmPkRguCDatReqInfo ARGS((
816    RguCDatReqInfo       *param,
817    Buffer               *mBuf
818 ));
819 S16 cmUnpkRguCDatReqInfo ARGS((
820    RguCDatReqInfo       *param,
821    Buffer               *mBuf
822 ));
823 S16 cmPkRguLchDatReq ARGS((
824    RguLchDatReq         *param,
825    Buffer               *mBuf
826 ));
827 S16 cmUnpkRguLchDatReq ARGS((
828    RguLchDatReq         *param,
829    Buffer               *mBuf
830 ));
831 S16 cmPkRguDatReqTb ARGS((
832    RguDatReqTb          *param,
833    Buffer               *mBuf
834 ));
835 S16 cmPkRguStaIndTb ARGS((
836    RguStaIndTb          *param,
837    Buffer               *mBuf
838 ));
839 S16 cmUnpkRguStaIndTb ARGS((
840    RguStaIndTb          *param,
841    Buffer               *mBuf
842 ));
843 /* rgu_x_001.main_3 - ADD - L2M Support */
844 #ifdef LTE_L2_MEAS
845 S16 cmPkRguDDatReqInfo ARGS((
846    Pst                  *pst,
847    RguDDatReqInfo       *param,
848    Buffer               *mBuf
849 ));
850 S16 cmUnpkRguDDatReqInfo ARGS((
851    Pst                  *pst,
852    RguDDatReqInfo       *param,
853    Buffer               *mBuf
854 ));
855 S16 cmUnpkRguDatReqTb ARGS((
856    Pst                  *pst,
857    RguDatReqTb          *param,
858    Buffer               *mBuf
859 ));
860 #else
861 S16 cmPkRguDDatReqInfo ARGS((
862    RguDDatReqInfo       *param,
863    Buffer               *mBuf
864 ));
865 S16 cmUnpkRguDDatReqInfo ARGS((
866    RguDDatReqInfo       *param,
867    Buffer               *mBuf
868 ));
869 S16 cmUnpkRguDatReqTb ARGS((
870    RguDatReqTb          *param,
871    Buffer               *mBuf
872 ));
873 #endif
874 S16 cmPkRguCDatIndInfo ARGS((
875    RguCDatIndInfo       *param,
876    Buffer               *mBuf
877 ));
878 S16 cmUnpkRguCDatIndInfo ARGS((
879    RguCDatIndInfo       *param,
880    Buffer               *mBuf
881 ));
882 S16 cmPkRguLchDatInd ARGS((
883    RguLchDatInd         *param,
884    Buffer               *mBuf
885 ));
886 S16 cmUnpkRguLchDatInd ARGS((
887    RguLchDatInd         *param,
888    Buffer               *mBuf
889 ));
890
891 S16 cmPkRguCStaRspInfo ARGS((
892    RguCStaRspInfo       *param,
893    Buffer               *mBuf
894 ));
895 S16 cmUnpkRguCStaRspInfo ARGS((
896    RguCStaRspInfo       *param,
897    Buffer               *mBuf
898 ));
899
900 S16 cmPkRguCStaIndInfo ARGS((
901    RguCStaIndInfo       *param,
902    Buffer               *mBuf
903 ));
904 S16 cmUnpkRguCStaIndInfo ARGS((
905    RguCStaIndInfo       *param,
906    Buffer               *mBuf
907 ));
908 S16 cmPkRguLchStaInd ARGS((
909    RguLchStaInd         *param,
910    Buffer               *mBuf
911 ));
912 S16 cmUnpkRguLchStaInd ARGS((
913    RguLchStaInd         *param,
914    Buffer               *mBuf
915 ));
916
917 /*rgu_x_001.main_3 - ADD - L2M  & R9 Support */
918 #ifdef LTE_L2_MEAS
919 /** @brief Request from MAC to RLC for forwarding HARQ Status */
920
921 S16 cmPkRguHqStaInd ARGS((
922    Pst*                 pst,
923    SpId                 spId,
924    RguHarqStatusInd     *harqStatusInd));
925
926 /** @brief Request from MAC to RLC forwarding HARQ status  */
927 S16 cmUnpkRguHqStaInd ARGS((
928    RguHqStaInd          func,
929    Pst*                 pst,
930    Buffer               *mBuf
931 ));
932
933 /** @brief Primitive invoked from RLC to MAC to 
934  *  * inform the On/Off Status of LC Id*/
935 S16 cmPkRguL2MUlThrpMeasReq ARGS((
936    Pst*                 pst,
937    SpId                 spId,
938    RguL2MUlThrpMeasReqInfo*    measReq
939 ));
940
941 /** @brief Primitive invoked from RLC to MAC to 
942  *  * inform the On/Off Status of LC Id*/
943 S16 cmUnpkRguL2MUlThrpMeasReq ARGS((
944    RguL2MUlThrpMeasReq  func,
945    Pst*                 pst,
946    Buffer               *mBuf
947 ));
948
949 S16 cmPkRguL2MUlThrpMeasReqInfo ARGS((
950    RguL2MUlThrpMeasReqInfo *param,
951    Buffer               *mBuf
952 ));
953
954 S16 cmUnpkRguL2MUlThrpMeasReqInfo ARGS((
955    RguL2MUlThrpMeasReqInfo       *param,
956    Buffer               *mBuf
957 ));
958
959 #endif /* LTE_L2_MEAS */
960 S16 cmUnpkRguFlowCntrlInd ARGS((
961    RguFlowCntrlIndInfo  func,
962    Pst                  *pst,
963    Buffer               *mBuf
964  ));
965
966 S16 cmPkRguFlowCntrlInd ARGS((
967    Pst* pst,
968    SuId suId,
969    RguFlowCntrlInd  *flowCntrlInd
970  ));
971 #endif
972
973 #ifdef __cplusplus
974 }
975 #endif
976 #endif /* __RGUX__ */
977
978 /********************************************************************30**
979
980          End of file
981 **********************************************************************/