<[Epic-ID: ODUHIGH-406][Task-ID: ODUHIGH-421]Paging Message: CU_STUB Trigger and...
[o-du/l2.git] / src / 5gnrmac / mac_msg_router.c
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  
21      Name:     LTE-MAC layer
22   
23      Type:     C source file
24   
25      Desc:     C source code SSI Interface Implementation
26   
27      File:     mac_msg_router.c
28   
29 **********************************************************************/
30
31 /** @file mac_msg_router.c
32 @brief This file contains the implementation of callback functions 
33 registered with SSI during the LTE MAC Task initialization.
34 */
35 /* header include files -- defines (.h) */
36 #include "common_def.h"
37 #include "rgu.h"           /* RGU defines */
38 #include "tfu.h"           /* RGU defines */
39 #include "lrg.h"           /* layer management defines for LTE-MAC */
40 #include "rgr.h"           /* layer management defines for LTE-MAC */
41 #include "crg.h"           /* CRG interface includes */
42 #include "rg_sch_inf.h"    /* SCH interface includes */
43 #include "rg_prg.h"        /* PRG interface includes */
44 #include "rg_env.h"        /* customisable defines and macros for LTE-MAC */
45 #include "rg.h"            /* defines and macros for MAC */
46 #include "rgr.h"            /* defines and macros for SCH */
47
48
49 /* header/extern include files (.x) */
50 #include "rgu.x"           /* RGU types */
51 #include "tfu.x"           /* RGU types */
52 #include "lrg.x"           /* layer management typedefs for MAC */
53 #include "rgr.x"           /* layer management typedefs for MAC */
54 #include "crg.x"           /* CRG interface typedes */
55 #include "rg_sch_inf.x"    /* SCH interface typedefs */
56 #include "rg_prg.x"        /*PRG interface includes*/
57 #include "du_app_mac_inf.h"
58 #include "rg.x"            /* typedefs for MAC */
59 #include "rlc_mac_inf.h"
60 #include "lwr_mac_upr_inf.h"
61
62 /**
63  * @brief Task Activation callback function Entity SM. 
64  *
65  * @details
66  *
67  *     Function : rgHdlSMEvents
68  *     
69  *     Process Messages received from Entity SM
70  *     
71  *  @param[in]  Pst     *pst, Post structure of the primitive.     
72  *  @param[in]  Buffer *mBuf, Packed primitive parameters in the buffer.
73  *  @param[in]  Reason reason.
74  *  @return  void
75  **/
76 static inline void rgHdlSMEvents
77 (
78 Pst     *pst,                       /* post structure       */
79 Buffer  *mBuf                       /* message buffer       */
80 )
81 {
82    switch(pst->event)
83    {
84 #ifdef LCRGMILRG
85       case EVTLRGCFGREQ:
86          /* Process a config. request */
87          cmUnpkLrgCfgReq(RgMiLrgCfgReq, pst, mBuf);
88          break;
89       case EVTMACSCHGENCFGREQ:
90          /* Process a config. request */
91          cmUnpkLrgSchCfgReq(MacSchGenCfgReq, pst, mBuf);
92          break;
93       case EVTLRGCNTRLREQ:
94          /* Process a control request */
95          cmUnpkLrgCntrlReq(RgMiLrgCntrlReq, pst, mBuf);
96          break;
97       case EVTLRGSSTAREQ:
98          /* Process a status request  */
99          cmUnpkLrgStaReq(RgMiLrgStaReq, pst, mBuf);
100          break;
101       case EVTLRGSTSREQ:
102          /* Process a statistics request */
103          cmUnpkLrgStsReq(RgMiLrgStsReq, pst, mBuf);
104          break;
105 #endif /* LCRGMILRG */
106       case EVENT_MAC_CELL_CONFIG_REQ:
107          /* Process MAC cell config */
108          unpackDuMacCellCfg(MacProcCellCfgReq, pst, mBuf);
109          break;
110       case EVENT_MAC_CELL_START:
111          /* Process MAC cell start request */
112          unpackMacCellStart(MacProcCellStart, pst, mBuf);
113          break;
114       case EVENT_MAC_CELL_STOP:
115          /* Process MAC cell stop request */
116          unpackMacCellStop(MacProcCellStop, pst, mBuf);
117          break;
118       case EVENT_MAC_DL_CCCH_IND:
119          /* Process DL CCCH Ind */
120          unpackMacDlCcchInd(MacProcDlCcchInd, pst, mBuf);
121          break;
122       case EVENT_MAC_UE_CREATE_REQ:
123          /* Process Ue Create Request */
124          unpackMacUeCreateReq(MacProcUeCreateReq, pst, mBuf);
125          break;
126       case EVENT_MAC_UE_RECONFIG_REQ:
127          /* Process Ue Reconfig Request */
128          unpackMacUeReconfigReq(MacProcUeReconfigReq, pst, mBuf);
129          break;
130     case EVENT_MAC_UE_DELETE_REQ:
131     {
132        unpackMacUeDeleteReq(MacProcUeDeleteReq, pst, mBuf);
133        break;
134     }
135     case EVENT_MAC_CELL_DELETE_REQ:
136     {
137        unpackMacCellDeleteReq(MacProcCellDeleteReq, pst, mBuf);
138        break;
139     }
140     case EVENT_MAC_SLICE_CFG_REQ:
141     {
142        unpackMacSliceCfgReq(MacProcSliceCfgReq, pst, mBuf);
143        break;
144     }
145     case EVENT_MAC_SLICE_RECFG_REQ:
146     {
147        unpackMacSliceCfgReq(MacProcSliceReCfgReq, pst, mBuf);
148        break;
149     }
150     default:
151          RG_FREE_MSG(mBuf);
152          break;
153    }
154 }
155
156
157 /**
158  * @brief Task Activation callback function Entity NH. 
159  *
160  * @details
161  *
162  *     Function : rgHdlNHEvents
163  *     
164  *     Process Messages received from Entity NH
165  *     
166  *  @param[in]  Pst     *pst, Post structure of the primitive.     
167  *  @param[in]  Buffer *mBuf, Packed primitive parameters in the buffer.
168  *  @param[in]  Reason reason.
169  *  @return  void
170  **/
171 static inline void rgHdlNHEvents
172 (
173 Pst     *pst,                       /* post structure       */
174 Buffer  *mBuf                       /* message buffer       */
175 )
176 {
177    switch(pst->event)
178    {
179 #ifdef LCRGUICRG
180       case EVTCRGBNDREQ:
181          cmUnpkCrgBndReq(RgUiCrgBndReq, pst, mBuf);
182          break;
183       case EVTCRGUBNDREQ:
184          cmUnpkCrgUbndReq(RgUiCrgUbndReq, pst, mBuf);
185          break;
186       case EVTCRGCFGREQ:
187          cmUnpkCrgCfgReq(RgUiCrgCfgReq, pst, mBuf);
188          break;
189 #endif            
190       default:
191          RG_FREE_MSG(mBuf);
192          break;
193    }
194 }
195
196 /**
197  * @brief Task Activation callback function Entity KW. 
198  *
199  * @details
200  *
201  *     Function : rgHdlKWEvents
202  *     
203  *     Process Messages received from Entity KW
204  *     
205  *  @param[in]  Pst     *pst, Post structure of the primitive.     
206  *  @param[in]  Buffer *mBuf, Packed primitive parameters in the buffer.
207  *  @param[in]  Reason reason.
208  *  @return  void
209  **/
210 static inline void rgHdlKWEvents
211 (
212 Pst     *pst,                       /* post structure       */
213 Buffer  *mBuf                       /* message buffer       */
214 )
215 {
216    switch(pst->event)
217    {
218 #ifdef LCRGUIRGU
219       case EVTRGUBNDREQ:
220          cmUnpkRguBndReq(RgUiRguBndReq, pst, mBuf);
221          break;
222       case EVTRGUUBNDREQ:
223          cmUnpkRguUbndReq(RgUiRguUbndReq, pst, mBuf);
224          break;
225       case EVENT_DL_DATA_TO_MAC:
226          unpackRlcDlData(MacProcRlcDlData, pst, mBuf);
227          break;
228       case EVENT_BO_STATUS_TO_MAC:
229          unpackRlcBoStatus(MacProcRlcBoStatus, pst, mBuf);
230          break;
231 #ifdef LTE_L2_MEAS
232
233       case EVTRGUL2MULTHRPMEASREQ:
234          cmUnpkRguL2MUlThrpMeasReq(RgUiRguL2MUlThrpMeasReq, pst,mBuf);
235          break;
236
237 #endif
238 #endif            
239       default:
240          RG_FREE_MSG(mBuf);
241          break;
242    }
243 }
244
245 /**
246  * @brief Task Activation callback function Entity TF. 
247  *
248  * @details
249  *
250  *     Function : rgHdlTFEvents
251  *     
252  *     Process Messages received from Entity TF
253  *     
254  *  @param[in]  Pst     *pst, Post structure of the primitive.     
255  *  @param[in]  Buffer *mBuf, Packed primitive parameters in the buffer.
256  *  @param[in]  Reason reason.
257  *  @return  void
258  **/
259 static inline void rgHdlTFEvents
260 (
261 Pst     *pst,                       /* post structure       */
262 Buffer  *mBuf                       /* message buffer       */
263 )
264 {
265    switch(pst->event)
266    {
267       case EVENT_SLOT_IND_TO_MAC:
268          unpackSlotInd(fapiMacSlotInd, pst, mBuf);
269          break;
270       case EVENT_STOP_IND_TO_MAC:
271          unpackStopInd(fapiMacStopInd, pst, mBuf);
272          break;
273       case EVENT_RACH_IND_TO_MAC:
274          unpackRachInd(fapiMacRachInd, pst, mBuf);
275          break;
276       case EVENT_CRC_IND_TO_MAC:
277          unpackCrcInd(fapiMacCrcInd, pst, mBuf);
278          break;
279       case EVENT_RX_DATA_IND_TO_MAC:
280          unpackRxDataInd(fapiMacRxDataInd, pst, mBuf);
281          break;
282       case EVENT_UCI_IND_TO_MAC:
283          unpackUciInd(FapiMacUciInd, pst, mBuf);
284          break;
285       default:
286          RG_FREE_MSG(mBuf);
287          break;
288    }
289 }
290
291
292 /**
293  * @brief Task Activation callback function Entity RG SCH. 
294  *
295  * @details
296  *
297  *     Function : rgHdlRGEvents
298  *     
299  *     Process Messages received from Entity RG SCH
300  *     
301  *  @param[in]  Pst     *pst, Post structure of the primitive.     
302  *  @param[in]  Buffer *mBuf, Packed primitive parameters in the buffer.
303  *  @param[in]  Reason reason.
304  *  @return  void
305  **/
306 static inline void rgHdlRGEvents
307 (
308 Pst     *pst,                       /* post structure       */
309 Buffer  *mBuf                       /* message buffer       */
310 )
311 {
312    switch(pst->event)
313    {
314 #ifdef LCRG
315       case EVTINFCELLREGREQ:
316          cmUnpkSchMacCellRegReq(RgSchMacCellRegReq, pst, mBuf);
317          break;
318       case EVTINFSFALLOCREQ:
319          cmUnpkSchMacSfAllocReq(RgSchMacSfAllocReq, pst, mBuf);
320          break;
321       case EVTINFRLSHQREQ:
322          cmUnpkSchMacRlsHqReq(RgSchMacRlsHqReq, pst, mBuf);
323          break;
324       case EVTINFHQENTRESET:
325          cmUnpkSchMacRstHqEntReq(RgSchMacRstHqEntReq, pst, mBuf);
326          break;
327       case EVTINFRLSRNTIREQ:
328          cmUnpkSchMacRlsRntiReq(RgSchMacRlsRntiReq, pst, mBuf);
329          break;
330 #ifdef LTEMAC_SPS
331       case EVTINFSPSLCREG:
332          cmUnpkSchMacSpsLcRegReq(RgSchMacSpsLcRegReq, pst, mBuf);
333          break;
334       case EVTINFSPSLCDEREG:
335          cmUnpkSchMacSpsLcDeregReq(RgSchMacSpsLcDeregReq, pst, mBuf);
336          break;
337       case EVTINFSPSRESET:
338          cmUnpkSchMacUlSpsResetReq(RgSchMacUlSpsResetReq, pst, mBuf);
339          break;
340 #endif /* LTEMAC_SPS */
341 #ifdef LTE_L2_MEAS
342       case EVTINFL2MEASREQ:
343          cmUnpkSchMacL2MeasReq(RgSchMacL2MeasReq, pst, mBuf);
344          break;
345       case EVTINFL2MEASSENDREQ :
346          cmUnpkSchMacL2MeasSendReq(RgSchMacL2MeasSendReq, pst , mBuf);
347          break;
348       case EVTINFL2MEASSTOPREQ:
349          cmUnpkSchMacL2MeasStopReq(RgSchMacL2MeasStopReq, pst , mBuf);
350          break;
351 #endif/* LTE_L2_MEAS */
352       case EVTINFLCGREG:
353          cmUnpkSchMacLcgRegReq(RgSchMacLcgRegReq, pst, mBuf);
354          break;
355 #endif            
356 #if defined(LTE_ADV) && defined(LCPRG)
357       case EVTPRGUESCELLCFGREQ:
358       {
359          cmUnpkPrgPMacSMacUeSCellCfgReq(RgPrgPMacSMacUeSCellCfgReq, pst, mBuf);
360       }
361       break;
362       case EVTPRGUESCELLCFGCFM:
363       case EVTPRGUESCELLLCHMODCFM:
364       case EVTPRGUESCELLLCHDELCFMDEL:
365       case EVTPRGUESCELLLCHADDCFM:
366       {
367          cmUnpkPrgSMacPMacCfgCfm(RgPrgSMacPMacCfgCfm, pst, mBuf);
368       }
369       break;
370       case EVTPRGUESCELLDELREQ:
371       {
372          cmUnpkPrgPMacSMacUeSCellDelReq(RgPrgPMacSMacUeSCellDelReq, pst, mBuf);
373       }
374       break;
375       case EVTPRGUESCELLLCHMODREQ:
376       {
377          cmUnpkPrgPMacSMacUeSCellLchModReq(RgPrgPMacSMacUeSCellLchModReq, pst,
378                                            mBuf);
379       }
380       break;
381       case EVTPRGUESCELLLCHDELREQ:
382       {
383          cmUnpkPrgPMacSMacUeSCellLchDelReq(RgPrgPMacSMacUeSCellLchDelReq, pst,
384                                            mBuf);
385       }
386       break;
387       case EVTPRGUESCELLLCHADDREQ:
388       {
389          cmUnpkPrgPMacSMacUeSCellLchAddReq(RgPrgPMacSMacUeSCellLchAddReq, pst,
390                                            mBuf);
391       }
392       break;
393
394 #endif
395       default:
396       {
397          RG_FREE_MSG(mBuf);
398          break;
399       }
400
401    }
402 }
403
404 /**
405 * @brief Function prints src, dest, msg infor about all the msgs that received.
406 *
407 * @details
408 *
409 *     Function : callFlowRgActvTsk 
410 *
411 *     Function prints src, dest, msg infor about all the msgs that received
412 *
413 *  @param[in]  Pst     *pst, Post structure of the primitive.
414 *
415 *  @return  void
416 **/
417
418 void callFlowRgActvTsk(Pst *pst)
419 {
420    char sourceTask[50];
421    char destTask[50]="ENTMAC";
422    char message[100];
423
424    switch(pst->srcEnt)
425    {
426       case ENTDUAPP:
427          {
428             strcpy(sourceTask,"ENTDUAPP");
429             switch(pst->event)
430             {
431 #ifdef LCRGMILRG
432                case EVTLRGCFGREQ:
433                   strcpy(message,"EVTLRGCFGREQ");
434                   break;
435                case EVTMACSCHGENCFGREQ:
436                   strcpy(message,"EVTMACSCHGENCFGREQ");
437                   break;
438                case EVTLRGCNTRLREQ:
439                   strcpy(message,"EVTLRGCNTRLREQ");
440                   break;
441                case EVTLRGSSTAREQ:
442                   strcpy(message,"EVTLRGSSTAREQ");
443                   break;
444                case EVTLRGSTSREQ:
445                   strcpy(message,"EVTLRGSTSREQ");
446                   break;
447 #endif /* LCRGMILRG */
448                case EVENT_MAC_CELL_CONFIG_REQ:
449                   strcpy(message,"EVENT_MAC_CELL_CONFIG_REQ");
450                   break;
451                case EVENT_MAC_CELL_START:
452                   strcpy(message,"EVENT_MAC_CELL_START");
453                   break;
454                case EVENT_MAC_CELL_STOP:
455                   strcpy(message,"EVENT_MAC_CELL_STOP");
456                   break;
457                case EVENT_MAC_DL_CCCH_IND:
458                   strcpy(message,"EVENT_MAC_DL_CCCH_IND");
459                   break;
460                case EVENT_MAC_UE_CREATE_REQ:
461                   strcpy(message,"EVENT_MAC_UE_CREATE_REQ");
462                   break;
463                case EVENT_MAC_UE_RECONFIG_REQ:
464                   strcpy(message,"EVENT_MAC_UE_RECONFIG_REQ");
465                   break;
466                case EVENT_MAC_UE_DELETE_REQ:
467                   strcpy(message,"EVENT_MAC_UE_DELETE_REQ");
468                   break;
469                case EVENT_MAC_CELL_DELETE_REQ:
470                   strcpy(message,"EVENT_MAC_CELL_DELETE_REQ");
471                   break;
472                case EVENT_MAC_SLICE_CFG_REQ:
473                   strcpy(message,"EVENT_MAC_SLICE_CFG_REQ");
474                   break;
475                case EVENT_MAC_SLICE_RECFG_REQ:
476                   strcpy(message,"EVENT_MAC_SLICE_RECFG_REQ");
477                   break;
478                default:
479                   strcpy(message,"Invalid Event");
480                   break;
481             }
482             break;
483          }
484       case ENTRLC:
485          { 
486             strcpy(sourceTask,"ENTRLC");
487             switch(pst->event)
488             {
489 #ifdef LCRGUIRGU
490                case EVTRGUBNDREQ:
491                   strcpy(message,"EVTRGUBNDREQ");
492                   break;
493                case EVTRGUUBNDREQ:
494                   strcpy(message,"EVTRGUUBNDREQ");
495                   break;
496                case EVENT_DL_DATA_TO_MAC:
497                   strcpy(message,"EVENT_DL_DATA_TO_MAC");
498                   break;
499                case EVENT_BO_STATUS_TO_MAC:
500                   strcpy(message,"EVENT_BO_STATUS_TO_MAC");
501                   break;
502 #endif
503                default:
504                   strcpy(message,"Invalid Event");
505                   break;
506             }
507
508             break;
509          }
510       case ENTLWRMAC:
511          {
512             strcpy(sourceTask,"ENTLWRMAC");
513             switch(pst->event)
514             {
515                case EVENT_SLOT_IND_TO_MAC:
516                   strcpy(message,"EVENT_SLOT_IND_TO_MAC");
517                   break;
518                case EVENT_STOP_IND_TO_MAC:
519                   strcpy(message,"EVENT_STOP_IND_TO_MAC");
520                   break;
521                case EVENT_RACH_IND_TO_MAC:
522                   strcpy(message,"EVENT_RACH_IND_TO_MAC");
523                   break;
524                case EVENT_CRC_IND_TO_MAC:
525                   strcpy(message,"EVENT_CRC_IND_TO_MAC");
526                   break;
527                case EVENT_RX_DATA_IND_TO_MAC:
528                   strcpy(message,"EVENT_RX_DATA_IND_TO_MAC");
529                   break;
530                case EVENT_UCI_IND_TO_MAC:
531                   strcpy(message,"EVENT_UCI_IND_TO_MAC");
532                   break;
533                default:
534                   strcpy(message,"Invalid Event");
535                   break;
536             }
537
538             break;
539          }
540       case ENTMAC: /* When scheduler instance sends msg to MAC */
541          {
542             strcpy(sourceTask,"ENTMAC");
543             switch(pst->event)
544             {
545 #ifdef LCRG
546                case EVTINFCELLREGREQ:
547                   strcpy(message,"EVTINFCELLREGREQ");
548                   break;
549                case EVTINFSFALLOCREQ:
550                   strcpy(message,"EVTINFSFALLOCREQ");
551                   break;
552                case EVTINFRLSHQREQ:
553                   strcpy(message,"EVTINFRLSHQREQ");
554                   break;
555                case EVTINFHQENTRESET:
556                   strcpy(message,"EVTINFHQENTRESET");
557                   break;
558                case EVTINFRLSRNTIREQ:
559                   strcpy(message,"EVTINFRLSRNTIREQ");
560                   break;
561 #ifdef LTEMAC_SPS
562                case EVTINFSPSLCREG:
563                   strcpy(message,"EVTINFSPSLCREG");
564                   break;
565                case EVTINFSPSLCDEREG:
566                   strcpy(message,"EVTINFSPSLCDEREG");
567                   break;
568                case EVTINFSPSRESET:
569                   strcpy(message,"EVTINFSPSRESET");
570                   break;
571 #endif /* LTEMAC_SPS */
572                case EVTINFLCGREG:
573                   strcpy(message,"EVTINFLCGREG");
574                   break;
575 #endif            
576 #if defined(LTE_ADV) && defined(LCPRG)
577                case EVTPRGUESCELLCFGREQ:
578                   strcpy(message,"EVTPRGUESCELLCFGREQ");
579                   break;
580                case EVTPRGUESCELLCFGCFM:
581                   strcpy(message,"EVTPRGUESCELLCFGCFM");
582                   break;
583                case EVTPRGUESCELLLCHMODCFM:
584                   strcpy(message,"EVTPRGUESCELLLCHMODCFM");
585                   break;
586                case EVTPRGUESCELLLCHDELCFMDEL:
587                   strcpy(message,"EVTPRGUESCELLLCHDELCFMDEL");
588                   break;
589                case EVTPRGUESCELLLCHADDCFM:
590                   strcpy(message,"EVTPRGUESCELLLCHADDCFM");
591                   break;
592                case EVTPRGUESCELLDELREQ:
593                   strcpy(message,"EVTPRGUESCELLDELREQ");
594                   break;
595                case EVTPRGUESCELLLCHMODREQ:
596                   strcpy(message,"EVTPRGUESCELLLCHMODREQ");
597                   break;
598                case EVTPRGUESCELLLCHDELREQ:
599                   strcpy(message,"EVTPRGUESCELLLCHDELREQ");
600                   break;
601                case EVTPRGUESCELLLCHADDREQ:
602                   strcpy(message,"EVTPRGUESCELLLCHADDREQ");
603                   break;
604
605 #endif
606                default:
607                   strcpy(message,"Invalid Event");
608                   break;
609             }
610             break;
611          }
612
613       default:
614          {
615             strcpy(sourceTask,"Invalid Source Entity Id");
616             break;
617          }
618    }
619    DU_LOG("\nCall Flow: %s -> %s : %s\n", sourceTask, destTask, message);
620 }
621
622 \f
623 /**********************************************************************
624 \f
625 /**
626  * @brief Task Activation callback function. 
627  *
628  * @details
629  *
630  *     Function : rgActvTsk
631  *     
632  *     Primitives invoked by MAC's users/providers through
633  *     a loosely coupled interface arrive here by means of 
634  *     SSI's message handling. This API is registered with
635  *     SSI during the Task Registration of MAC.
636  *     
637  *  @param[in]  Pst     *pst, Post structure of the primitive.     
638  *  @param[in]  Buffer *mBuf, Packed primitive parameters in the buffer.
639  *  @param[in]  Reason reason.
640  *  @return  S16
641  *      -# ROK
642  **/
643 S16 rgActvTsk
644 (
645 Pst     *pst,                       /* post structure       */
646 Buffer  *mBuf                       /* message buffer       */
647 )
648 {
649
650 #ifdef CALL_FLOW_DEBUG_LOG
651    callFlowRgActvTsk(pst);
652 #endif
653
654    switch(pst->srcEnt)
655    {
656       /* The originator of this message is the stack manager,
657        * unpack and go to the respective primitive processing function */
658       case ENTDUAPP:
659           rgHdlSMEvents(pst, mBuf);
660            break;
661       case ENTNH:
662           rgHdlNHEvents(pst, mBuf);
663           break;
664       case ENTRLC:
665           rgHdlKWEvents(pst, mBuf);
666           break;
667       case ENTLWRMAC:
668           rgHdlTFEvents(pst, mBuf);
669           break;
670       case ENTMAC: /* When scheduler instance sends msg to MAC */
671           rgHdlRGEvents(pst, mBuf);
672           break;
673        default:
674           RG_FREE_MSG(mBuf);
675           break;
676    }
677    ODU_EXIT_TASK();
678    return ROK;
679 }/* end of rgActvTsk */
680
681 \f
682 /**********************************************************************
683  
684          End of file
685 **********************************************************************/