[Epic-ID: ODUHIGH-462][Task-ID: ODUHIGH-481] Adding Trigger for Ul/Dl data
[o-du/l2.git] / src / 5gnrrlc / rlc_dl_ul_inf.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**
20   
21         Name:    UDX RRC Control Interface
22     
23         Type:    C file
24   
25         Desc:    This file Contains the packing and unpacking functions for
26                  UDX Interface
27  
28         File:    rlc_dl_ul_inf.c
29   
30 *********************************************************************21*/
31 #include "common_def.h"
32 #include "rgu.h"           /* RGU interface includes*/
33 #include "lkw.h"           /* LKW defines */
34 #include "ckw.h"           /* CKW defines */
35
36 /* extern (.x) include files */
37 #include "rgu.x"           
38 #include "lkw.x"           /* LKW */
39 #include "ckw.x"           /* CKW */
40
41 #include "rlc_env.h"
42 #include "rlc_utils.h"
43 #include "rlc_dl_ul_inf.h"           /* UDX defines */
44
45 #ifdef LCUDX
46
47 /*
48 *
49 *    Fun:    cmPkUdxBndReq
50 *
51 *    Desc:    pack the primitive UdxBndReq
52 *
53 *    Ret:    ROK  -ok
54 *
55 *    Notes:    None
56 *
57 *    File:     ckw.c
58 *
59 */
60 static S16 cmUnpkUdxStruct(Buffer *srcMBuf,uint32_t offset,uint8_t *dstBuf,uint32_t size)
61 {
62     MsgLen tmpLen;
63
64     return (SCpyMsgFix(srcMBuf,offset,size,dstBuf,&tmpLen));
65
66 } /*end of function cmPkUdxBndReq*/
67
68 /*
69 *
70 *    Fun:    cmPkUdxBndReq
71 *
72 *    Desc:    pack the primitive UdxBndReq
73 *
74 *    Ret:    ROK  -ok
75 *
76 *    Notes:    None
77 *
78 *    File:     ckw.c
79 *
80 */
81 static S16 cmPkUdxStruct(uint8_t *srcBuf,MsgLen size,Buffer *dstMBuf)
82 {
83
84     return (SAddPstMsgMult(srcBuf,size,dstMBuf));
85
86 } /*end of function cmPkUdxBndReq*/
87 /*
88 *
89 *    Fun:    cmPkUdxBndReq
90 *
91 *    Desc:    pack the primitive UdxBndReq
92 *
93 *    Ret:    ROK  -ok
94 *
95 *    Notes:    None
96 *
97 *    File:     ckw.c
98 *
99 */
100 S16 cmPkUdxBndReq(Pst *pst,SuId suId,SpId spId)
101 {
102     S16 ret1;
103     Buffer *mBuf;
104     mBuf = NULLP;
105
106     if((ret1 = ODU_GET_MSG_BUF(pst->region, pst->pool, &mBuf)) != ROK)
107     {
108 #if (ERRCLASS & ERRCLS_ADD_RES)
109        if(ret1 != ROK)
110        {
111           SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
112                 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
113                (ErrVal)EUDXXXX, (ErrVal)0, "ODU_GET_MSG_BUF() failed");
114        }
115 #endif /*  ERRCLASS & ERRCLS_ADD_RES  */
116        return (ret1);
117     }
118     CMCHKPKLOG(SPkS16, spId, mBuf, EUDXXXX, pst);
119     CMCHKPKLOG(SPkS16, suId, mBuf, EUDXXXX, pst);
120     pst->event = (Event) UDX_EVT_BND_REQ;
121
122     return (SPstTsk(pst,mBuf));
123 } /*end of function cmPkUdxBndReq*/
124 \f
125 /*
126 *
127 *    Fun:    cmPkUdxUbndReq
128 *
129 *    Desc:    pack the primitive UdxUbndReq
130 *
131 *    Ret:    ROK  -ok
132 *
133 *    Notes:    None
134 *
135 *    File:     ckw.c
136 *
137 */
138 S16 cmPkUdxUbndReq(Pst *pst,SpId spId,Reason reason)
139 {
140     S16 ret1;
141     Buffer *mBuf;
142     mBuf = NULLP;
143
144     if((ret1 = ODU_GET_MSG_BUF(pst->region, pst->pool, &mBuf)) != ROK)
145     {
146 #if (ERRCLASS & ERRCLS_ADD_RES)
147        if(ret1 != ROK)
148        {
149           SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
150                 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
151                (ErrVal)EUDXXXX, (ErrVal)0, "ODU_GET_MSG_BUF() failed");
152        }
153 #endif /*  ERRCLASS & ERRCLS_ADD_RES  */
154        return (ret1);
155     }
156     CMCHKPKLOG(SPkS16, reason, mBuf, EUDXXXX, pst);
157     CMCHKPKLOG(SPkS16, spId, mBuf, EUDXXXX, pst);
158     pst->event = (Event) UDX_EVT_UBND_REQ;
159
160     return (SPstTsk(pst,mBuf));
161 } /*end of function cmPkUdxUbndReq*/
162 \f
163 /*
164 *
165 *    Fun:    cmPkUdxBndCfm
166 *
167 *    Desc:    pack the primitive UdxBndCfm
168 *
169 *    Ret:    ROK  -ok
170 *
171 *    Notes:    None
172 *
173 *    File:     ckw.c
174 *
175 */
176 S16 cmPkUdxBndCfm(Pst *pst,SuId suId,uint8_t status)
177 {
178     S16 ret1;
179     Buffer *mBuf;
180     mBuf = NULLP;
181
182     if((ret1 = ODU_GET_MSG_BUF(pst->region, pst->pool, &mBuf)) != ROK)
183     {
184 #if (ERRCLASS & ERRCLS_ADD_RES)
185        if(ret1 != ROK)
186        {
187           SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
188                 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
189                (ErrVal)EUDXXXX, (ErrVal)0, "ODU_GET_MSG_BUF() failed");
190        }
191
192 #endif /*  ERRCLASS & ERRCLS_ADD_RES  */
193        return (ret1);
194     }
195     CMCHKPKLOG(oduUnpackUInt8, status, mBuf, EUDXXXX, pst);
196     CMCHKPKLOG(SPkS16, suId, mBuf, EUDXXXX, pst);
197     pst->event = (Event) UDX_EVT_BND_CFM;
198
199     return (SPstTsk(pst,mBuf));
200 } /*end of function cmPkUdxBndCfm*/
201
202 \f
203 /*
204 *
205 *    Fun:    cmPkUdxCfgReq
206 *
207 *    Desc:    pack the primitive KwUiUdxCfgReq
208 *
209 *    Ret:    ROK  -ok
210 *
211 *    Notes:    None
212 *
213 *    File:     ckw.c
214 *
215 */
216 S16 cmPkUdxCfgReq(Pst *pst,SpId  spId,RlcCfgInfo *cfgInfo)
217 {
218     S16 ret1;
219     Buffer *mBuf;
220     mBuf = NULLP;
221
222     if((ret1 = ODU_GET_MSG_BUF(pst->region, pst->pool, &mBuf)) != ROK)
223     {
224 #if (ERRCLASS & ERRCLS_ADD_RES)
225        if(ret1 != ROK)
226        {
227           SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
228                 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
229                (ErrVal)EUDXXXX, (ErrVal)0, "ODU_GET_MSG_BUF() failed");
230        }
231 #endif /*  ERRCLASS & ERRCLS_ADD_RES  */
232        return (ret1);
233     }
234
235     switch(pst->selector)
236     {
237 #ifdef LCUDX
238        case UDX_SEL_LC:
239           {
240              cmPkUdxStruct((uint8_t *)cfgInfo, sizeof(RlcCfgInfo),mBuf);
241              /* Need Not free CfgInfo here as it is stored 
242                 in UL */
243              break;
244           }
245         case UDX_SEL_LWLC:
246           {
247              CMCHKPKLOG(oduPackPointer,(PTR)cfgInfo,mBuf,EUDXXXX,pst);
248              break;
249           }
250 #endif /* LCUDX */
251     }
252
253     CMCHKPKLOG(SPkS16, spId, mBuf, EUDXXXX, pst);
254     pst->event = (Event) UDX_EVT_CFG_REQ;
255
256     return (SPstTsk(pst,mBuf));
257 } /* cmPkUdxCfgReq */
258
259 \f
260 /*
261 *
262 *    Fun:    cmPkUdxCfgCfm
263 *
264 *    Desc:    pack the primitive KwUiUdxCfgCfm
265 *
266 *    Ret:    ROK  -ok
267 *
268 *    Notes:    None
269 *
270 *    File:     ckw.c
271 *
272 */
273 S16 cmPkUdxCfgCfm(Pst *pst,SuId suId,RlcCfgCfmInfo  *cfgCfmInfo)
274 {
275     S16 ret1;
276     Buffer *mBuf;
277     mBuf = NULLP;
278
279     if((ret1 = ODU_GET_MSG_BUF(pst->region, pst->pool, &mBuf)) != ROK)
280     {
281 #if (ERRCLASS & ERRCLS_ADD_RES)
282        if(ret1 != ROK)
283        {
284           SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
285                 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
286                (ErrVal)EUDXXXX, (ErrVal)0, "ODU_GET_MSG_BUF() failed");
287        }
288 #endif /*  ERRCLASS & ERRCLS_ADD_RES  */
289        return (ret1);
290     }
291
292     switch(pst->selector)
293     {
294 #ifdef LCUDX
295        case UDX_SEL_LC:
296           {
297              cmPkUdxStruct((uint8_t *)cfgCfmInfo, sizeof(RlcCfgCfmInfo),mBuf);
298              /* Need to free the cfgCfmInfo here as it is allocated 
299                                         buffer call SPutStaticBuffer */
300              RLC_FREE_SHRABL_BUF(pst->region, pst->pool, cfgCfmInfo, sizeof(RlcCfgCfmInfo));
301              break;
302           }
303         case UDX_SEL_LWLC:
304           {
305              CMCHKPKLOG(oduPackPointer,(PTR)cfgCfmInfo,mBuf,EUDXXXX,pst);
306              break;
307           }
308 #endif /* LCUDX */
309     }
310
311     CMCHKPKLOG(SPkS16, suId, mBuf, EUDXXXX, pst);
312     pst->event = (Event) UDX_EVT_CFG_CFM;
313
314     return (SPstTsk(pst,mBuf));
315 } /* cmPkUdxCfgCfm */
316
317
318 /*
319 *
320 *    Fun:    cmPkUdxUeIdChgReq
321 *
322 *    Desc:   pack the primitive KwUiUdxUeIdChgReq
323 *
324 *    Ret:    ROK  -ok
325 *
326 *    Notes:  None
327 *
328 *    File:   ckw.c
329 *
330 */
331 S16 cmPkUdxUeIdChgReq
332 (
333 Pst        *pst,
334 SpId       spId,
335 uint32_t   transId,
336 CkwUeInfo  *ueInfo,
337 CkwUeInfo  *newUeInfo
338 )
339 {
340     S16    ret1;
341     Buffer *mBuf = NULLP;
342
343
344     if((ret1 = ODU_GET_MSG_BUF(pst->region, pst->pool, &mBuf)) != ROK)
345     {
346 #if (ERRCLASS & ERRCLS_ADD_RES)
347        if(ret1 != ROK)
348        {
349           SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
350                 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
351                (ErrVal)EUDXXXX, (ErrVal)0, "ODU_GET_MSG_BUF() failed");
352        }
353 #endif /*  ERRCLASS & ERRCLS_ADD_RES  */
354
355        return (ret1);
356     }
357
358     switch(pst->selector)
359     {
360 #ifdef LCUDX
361        case UDX_SEL_LC:
362        {
363             cmPkUdxStruct((uint8_t *)newUeInfo, sizeof(CkwUeInfo),mBuf);
364             cmPkUdxStruct((uint8_t *)ueInfo, sizeof(CkwUeInfo),mBuf);
365             /* No need to free ueInfo here as it is stored */
366             break;
367        }
368        case UDX_SEL_LWLC:
369           {
370              CMCHKPKLOG(oduPackPointer,(PTR)newUeInfo,mBuf,EUDXXXX,pst);
371              CMCHKPKLOG(oduPackPointer,(PTR)ueInfo,mBuf,EUDXXXX,pst);
372              break;
373           }
374        default:
375        {
376           DU_LOG("\nERROR  -->  RLC : cmPkUdxUeIdChgReq()- selector =%d not supported \n", pst->selector);
377           exit(1);
378        }
379 #endif
380     }
381     CMCHKPKLOG(oduUnpackUInt32, transId, mBuf, EUDXXXX, pst);
382     CMCHKPKLOG(SPkS16, spId, mBuf, EUDXXXX, pst);
383     pst->event = (Event) UDX_EVT_UEIDCHG_REQ;
384
385     return (SPstTsk(pst, mBuf));
386
387 } /* cmPkUdxUeIdChgReq */
388
389 /*
390 *
391 *    Fun:    cmPkUdxUeIdChgCfm
392 *
393 *    Desc:   pack the primitive KwUiUdxUeIdChgCfm
394 *
395 *    Ret:    ROK  -ok
396 *
397 *    Notes:  None
398 *
399 *    File:   ckw.c
400 *
401 */
402 S16 cmPkUdxUeIdChgCfm(Pst *pst,SuId suId,uint32_t transId,CmStatus status)
403 {
404     S16    ret1;
405     Buffer *mBuf = NULLP;
406
407     if((ret1 = ODU_GET_MSG_BUF(pst->region, pst->pool, &mBuf)) != ROK)
408     {
409 #if (ERRCLASS & ERRCLS_ADD_RES)
410        if(ret1 != ROK)
411        {
412           SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
413                 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
414                (ErrVal)EUDXXXX, (ErrVal)0, "ODU_GET_MSG_BUF() failed");
415        }
416 #endif /*  ERRCLASS & ERRCLS_ADD_RES  */
417
418        return (ret1);
419     }
420     
421     CMCHKPK(cmPkCmStatus, &status, mBuf); 
422     CMCHKPKLOG(oduUnpackUInt32, transId, mBuf, EUDXXXX, pst);
423     CMCHKPKLOG(SPkS16, suId, mBuf, EUDXXXX, pst);
424     pst->event = (Event) UDX_EVT_UEIDCHG_CFM;
425
426     return (SPstTsk(pst, mBuf));
427
428 } /* cmPkUdxUeIdChgCfm */
429
430 /*
431 *
432 *    Fun:    cmPkUdxStaUpdCfm
433 *
434 *    Desc:   pack the primitive KwUiUdxUeIdChgCfm
435 *
436 *    Ret:    ROK  -ok
437 *
438 *    Notes:  None
439 *
440 *    File:   ckw.c
441 *
442 */
443 S16 cmPkUdxStaUpdCfm(Pst *pst,SuId suId,CmLteRlcId *rlcId,RlcUdxBufLst *pStaPdu)
444 {
445     S16    ret1;
446     Buffer *mBuf = NULLP;
447
448     if((ret1 = ODU_GET_MSG_BUF(pst->region, pst->pool, &mBuf)) != ROK)
449     {
450 #if (ERRCLASS & ERRCLS_ADD_RES)
451        if(ret1 != ROK)
452        {
453           SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
454                 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
455                (ErrVal)EUDXXXX, (ErrVal)0, "ODU_GET_MSG_BUF() failed");
456        }
457 #endif /*  ERRCLASS & ERRCLS_ADD_RES  */
458
459        return (ret1);
460     }
461     
462     switch (pst->selector)
463     {
464        case UDX_SEL_LC:
465        {
466          cmPkUdxStruct((uint8_t *)pStaPdu, sizeof(RlcUdxBufLst),mBuf);
467          cmPkUdxStruct((uint8_t *)rlcId, sizeof(CmLteRlcId),mBuf);
468          break;
469        }
470        case UDX_SEL_LWLC:
471        {
472          CMCHKPK(oduPackPointer,(PTR) pStaPdu, mBuf);
473          CMCHKPK(oduPackPointer,(PTR) rlcId, mBuf); 
474          break;
475        }
476     }
477     CMCHKPKLOG(SPkS16, suId, mBuf, EUDXXXX, pst);
478     pst->event = (Event) UDX_EVT_STA_UPD_CFM;
479
480     return (SPstTsk(pst, mBuf));
481
482 } /* cmPkUdxStaUpdCfm */
483
484 /*
485 *
486 *    Fun:    cmPkUdxStaProhTmrStart
487 *
488 *    Desc:   pack the primitive
489 *
490 *    Ret:    ROK  -ok
491 *
492 *    Notes:  None
493 *
494 *    File:   Kw_udx.c
495 *
496 */
497 S16 cmPkUdxStaProhTmrStart(Pst *pst,SpId spId,CmLteRlcId *rlcId)
498 {
499     S16    ret1;
500     Buffer *mBuf = NULLP;
501
502     if((ret1 = ODU_GET_MSG_BUF(pst->region, pst->pool, &mBuf)) != ROK)
503     {
504 #if (ERRCLASS & ERRCLS_ADD_RES)
505        if(ret1 != ROK)
506        {
507           SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
508                 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
509                (ErrVal)EUDXXXX, (ErrVal)0, "ODU_GET_MSG_BUF() failed");
510        }
511 #endif /*  ERRCLASS & ERRCLS_ADD_RES  */
512
513        return (ret1);
514     }
515     
516     switch (pst->selector)
517     {
518        case UDX_SEL_LC:
519        {
520          cmPkUdxStruct((uint8_t *)rlcId, sizeof(CmLteRlcId),mBuf);
521          break;
522        }
523        case UDX_SEL_LWLC:
524        {
525          CMCHKPK(oduPackPointer,(PTR) rlcId, mBuf); 
526          break;
527        }
528     }
529     CMCHKPKLOG(SPkS16, spId, mBuf, EUDXXXX, pst);
530     pst->event = (Event) UDX_EVT_STA_PHBT_TMR_START;
531
532     return (SPstTsk(pst, mBuf));
533
534 } /* cmPkUdxStaProhTmrStart */
535
536 /*
537 *
538 *    Fun:    cmPkUdxStaUpdReq
539 *
540 *    Desc:   pack the primitive KwUiUdxUeIdChgCfm
541 *
542 *    Ret:    ROK  -ok
543 *
544 *    Notes:  None
545 *
546 *    File:   ckw.c
547 *
548 */
549 S16 cmPkUdxStaUpdReq(Pst *pst,SpId spId,CmLteRlcId *rlcId,RlcUdxStaPdu *pStaPdu)
550 {
551     S16    ret1;
552     Buffer *mBuf = NULLP;
553
554     if((ret1 = ODU_GET_MSG_BUF(pst->region, pst->pool, &mBuf)) != ROK)
555     {
556 #if (ERRCLASS & ERRCLS_ADD_RES)
557        if(ret1 != ROK)
558        {
559           SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
560                 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
561                (ErrVal)EUDXXXX, (ErrVal)0, "ODU_GET_MSG_BUF() failed");
562        }
563 #endif /*  ERRCLASS & ERRCLS_ADD_RES  */
564
565        return (ret1);
566     }
567     
568     switch (pst->selector)
569     {
570        case UDX_SEL_LC:
571        {
572          cmPkUdxStruct((uint8_t *)pStaPdu, sizeof(RlcUdxStaPdu),mBuf);
573          cmPkUdxStruct((uint8_t *)rlcId, sizeof(CmLteRlcId),mBuf);
574          RLC_FREE_SHRABL_BUF(pst->region,pst->pool, pStaPdu, sizeof(RlcUdxStaPdu));
575
576          break;
577        }
578        case UDX_SEL_LWLC:
579        {
580          CMCHKPK(oduPackPointer,(PTR) pStaPdu, mBuf);
581          CMCHKPK(oduPackPointer,(PTR) rlcId, mBuf); 
582          break;
583        }
584     }
585     CMCHKPKLOG(SPkS16, spId, mBuf, EUDXXXX, pst);
586     pst->event = (Event) UDX_EVT_STA_UPD_REQ;
587
588     return (SPstTsk(pst, mBuf));
589
590 } /* cmPkUdxStaUpdReq */
591
592 /*
593 *
594 *    Fun:    cmPkUdxStaPduReq
595 *
596 *    Desc:   pack the primitive KwUiUdxUeIdChgCfm
597 *
598 *    Ret:    ROK  -ok
599 *
600 *    Notes:  None
601 *
602 *    File:   ckw.c
603 *
604 */
605 S16 cmPkUdxStaPduReq(Pst *pst,SpId spId,CmLteRlcId *rlcId,RlcUdxDlStaPdu *pStaPdu)
606 {
607     S16    ret1;
608     Buffer *mBuf = NULLP;
609
610     if((ret1 = ODU_GET_MSG_BUF(pst->region, pst->pool, &mBuf)) != ROK)
611     {
612 #if (ERRCLASS & ERRCLS_ADD_RES)
613        if(ret1 != ROK)
614        {
615           SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
616                 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
617                (ErrVal)EUDXXXX, (ErrVal)0, "ODU_GET_MSG_BUF() failed");
618        }
619 #endif /*  ERRCLASS & ERRCLS_ADD_RES  */
620
621        return (ret1);
622     }
623     
624     switch (pst->selector)
625     {
626        case UDX_SEL_LC:
627        {
628          cmPkUdxStruct((uint8_t *)pStaPdu, sizeof(RlcUdxDlStaPdu),mBuf);
629          cmPkUdxStruct((uint8_t *)rlcId, sizeof(CmLteRlcId),mBuf);
630          /* Free status Pdu here for LC */
631          RLC_FREE_SHRABL_BUF(pst->region,pst->pool, pStaPdu, sizeof(RlcUdxDlStaPdu));
632          break;
633        }
634        case UDX_SEL_LWLC:
635        {
636          CMCHKPK(oduPackPointer,(PTR) pStaPdu, mBuf);
637          CMCHKPK(oduPackPointer,(PTR) rlcId, mBuf); 
638          break;
639        }
640     }
641     CMCHKPKLOG(SPkS16, spId, mBuf, EUDXXXX, pst);
642     pst->event = (Event) UDX_EVT_STA_PDU_REQ;
643
644     return (SPstTsk(pst, mBuf));
645
646 } /* cmPkUdxStaUpdReq */
647
648 #ifdef LTE_L2_MEAS
649 /*
650 *
651 *    Fun:    cmPkUdxL2MeasReq
652 *
653 *    Ret:    ROK  -ok
654 *
655 *    Notes:  None
656 *
657 *
658 */
659 S16 cmPkUdxL2MeasReq(Pst  *pst,RlcL2MeasReqEvt *measReqEvt)
660 {
661     S16    ret1;
662     Buffer *mBuf = NULLP;
663
664     if((ret1 = ODU_GET_MSG_BUF(pst->region, pst->pool, &mBuf)) != ROK)
665     {
666 #if (ERRCLASS & ERRCLS_ADD_RES)
667        if(ret1 != ROK)
668        {
669           SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
670                 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
671                (ErrVal)EUDXXXX, (ErrVal)0, "ODU_GET_MSG_BUF() failed");
672        }
673 #endif /*  ERRCLASS & ERRCLS_ADD_RES  */
674
675        return (ret1);
676     }
677     
678     switch (pst->selector)
679     {
680        case UDX_SEL_LC:
681        {
682          cmPkUdxStruct((uint8_t *)measReqEvt, sizeof(RlcL2MeasReqEvt),mBuf);
683          break;
684        }
685        case UDX_SEL_LWLC:
686        {
687          CMCHKPK(oduPackPointer,(PTR) measReqEvt, mBuf);
688          break;
689        }
690     }
691     pst->event = (Event) UDX_EVT_L2MEAS_REQ;
692
693     return (SPstTsk(pst, mBuf));
694
695 } /* cmPkUdxStaUpdReq */
696
697 /*
698 *
699 *    Fun:    cmPkUdxL2MeasReq
700 *
701 *    Ret:    ROK  -ok
702 *
703 *    Notes:  None
704 *
705 *
706 */
707 S16 cmPkUdxL2MeasSendReq(Pst  *pst,uint8_t measType)
708 {
709     S16    ret1;
710     Buffer *mBuf = NULLP;
711
712     if((ret1 = ODU_GET_MSG_BUF(pst->region, pst->pool, &mBuf)) != ROK)
713     {
714 #if (ERRCLASS & ERRCLS_ADD_RES)
715        if(ret1 != ROK)
716        {
717           SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
718                 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
719                (ErrVal)EUDXXXX, (ErrVal)0, "ODU_GET_MSG_BUF() failed");
720        }
721 #endif /*  ERRCLASS & ERRCLS_ADD_RES  */
722
723        return (ret1);
724     }
725     
726     switch (pst->selector)
727     {
728        case UDX_SEL_LC:
729        case UDX_SEL_LWLC:
730        {
731           CMCHKPKLOG(oduUnpackUInt8, measType, mBuf, EUDXXXX, pst);
732           break;
733        }
734     }
735     pst->event = (Event) UDX_EVT_L2MEAS_SEND_REQ;
736
737     return (SPstTsk(pst, mBuf));
738
739
740
741 /*
742 *
743 *    Fun:    cmPkUdxL2MeasStopReq
744 *
745 *    Ret:    ROK  -ok
746 *
747 *    Notes:  None
748 *
749 *
750 */
751 S16 cmPkUdxL2MeasStopReq(Pst *pst,uint8_t measType)
752 {
753     S16    ret1;
754     Buffer *mBuf = NULLP;
755
756     if((ret1 = ODU_GET_MSG_BUF(pst->region, pst->pool, &mBuf)) != ROK)
757     {
758 #if (ERRCLASS & ERRCLS_ADD_RES)
759        if(ret1 != ROK)
760        {
761           SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
762                 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
763                (ErrVal)EUDXXXX, (ErrVal)0, "ODU_GET_MSG_BUF() failed");
764        }
765 #endif /*  ERRCLASS & ERRCLS_ADD_RES  */
766
767        return (ret1);
768     }
769     
770     switch (pst->selector)
771     {
772        case UDX_SEL_LC:
773        case UDX_SEL_LWLC:
774        {
775           CMCHKPKLOG(oduUnpackUInt8, measType, mBuf, EUDXXXX, pst);
776           break;
777        }
778     }
779     pst->event = (Event) UDX_EVT_L2MEAS_STOP_REQ;
780
781     return (SPstTsk(pst, mBuf));
782
783
784 #endif
785 /******************************************************************************
786  *                            UNPACK FUNCTIONS
787  *****************************************************************************/
788 \f
789 /*
790 *
791 *    Fun:    cmUnpkUdxBndReq
792 *
793 *    Desc:    unpack the primitive UdxBndReq
794 *
795 *    Ret:    ROK  -ok
796 *
797 *    Notes:    None
798 *
799 *    File:     ckw.c
800 *
801 */
802 S16 cmUnpkUdxBndReq(UdxBndReq func,Pst  *pst,Buffer *mBuf)
803 {
804     SuId       suId = 0;
805     SpId       spId = 0;
806     
807     CMCHKUNPKLOG(SUnpkS16, &suId, mBuf, EUDXXXX, pst);
808     CMCHKUNPKLOG(SUnpkS16, &spId, mBuf, EUDXXXX, pst);
809     ODU_PUT_MSG_BUF(mBuf);
810
811     return ((*func)(pst, suId, spId));
812 } /*end of function cmUnpkUdxBndReq*/
813 \f
814 /*
815 *
816 *    Fun:    cmUnpkUdxUbndReq
817 *
818 *    Desc:    unpack the primitive UdxUbndReq
819 *
820 *    Ret:    ROK  -ok
821 *
822 *    Notes:    None
823 *
824 *    File:     ckw.c
825 *
826 */
827 S16 cmUnpkUdxUbndReq(UdxUbndReq func,Pst *pst,Buffer *mBuf)
828 {
829     SpId       spId = 0;
830     Reason     reason = 0;
831     
832     CMCHKUNPKLOG(SUnpkS16, &spId, mBuf, EUDXXXX, pst);
833     CMCHKUNPKLOG(SUnpkS16, &reason, mBuf, EUDXXXX, pst);
834     ODU_PUT_MSG_BUF(mBuf);
835     return ((*func)(pst, spId, reason));
836 } /*end of function cmUnpkUdxUbndReq*/
837 \f
838 /*
839 *
840 *    Fun:    cmUnpkUdxBndCfm
841 *
842 *    Desc:    unpack the primitive UdxBndCfm
843 *
844 *    Ret:    ROK  -ok
845 *
846 *    Notes:    None
847 *
848 *    File:     ckw.c
849 *
850 */
851 S16 cmUnpkUdxBndCfm(UdxBndCfm func,Pst *pst,Buffer *mBuf)
852 {
853     SuId       suId = 0;
854     uint8_t         status = 0;
855     
856     CMCHKUNPKLOG(SUnpkS16, &suId, mBuf, EUDXXXX, pst);
857     CMCHKUNPKLOG(oduPackUInt8, &status, mBuf, EUDXXXX, pst);
858     ODU_PUT_MSG_BUF(mBuf);
859
860     return ((*func)(pst, suId, status));
861 } /*end of function cmUnpkUdxBndCfm*/
862
863 \f
864 /*
865 *
866 *    Fun:    cmUnpkUdxCfgReq
867 *
868 *    Desc:    unpack the primitive KwUiUdxCfgReq
869 *
870 *    Ret:    ROK  -ok
871 *
872 *    Notes:    None
873 *
874 *    File:     ckw.c
875 *
876 */
877 S16 cmUnpkUdxCfgReq(UdxCfgReq func,Pst  *pst,Buffer *mBuf)
878 {
879 #if(ERRCLASS & ERRCLS_DEBUG)
880     S16           ret1;
881 #endif /* ERRCLASS & ERRCLS_DEBUG */
882     SpId          spId = 0;
883     RlcCfgInfo     tmpCfgInfo;
884     RlcCfgInfo    *cfgInfo; /*stack Variable because it is not freed */
885     
886     CMCHKUNPK(SUnpkS16, &(spId), mBuf);
887     switch(pst->selector)
888     {
889 #ifdef LCUDX
890        case UDX_SEL_LC:
891        {
892 #if(ERRCLASS & ERRCLS_DEBUG)
893           ret1 = cmUnpkUdxStruct(mBuf,0,(uint8_t *)&tmpCfgInfo,sizeof(RlcCfgInfo));
894           if(ret1 != ROK)
895           {
896              ODU_PUT_MSG_BUF(mBuf);
897              SLogError(pst->dstEnt, pst->dstInst, pst->dstProcId,
898                    __FILE__, __LINE__, (ErrCls)ERRCLS_DEBUG,
899                   (ErrVal)EUDXXXX, (ErrVal)ret1, "Unpacking failure");
900              return ( ret1 );
901           }
902 #else
903          cmUnpkUdxStruct(mBuf,0,(uint8_t *)&tmpCfgInfo,sizeof(RlcCfgInfo));
904 #endif /* ERRCLASS & ERRCLS_DEBUG */
905           cfgInfo = &tmpCfgInfo;
906           break;
907        }
908        case UDX_SEL_LWLC:
909        {
910           CMCHKUNPK(oduUnpackPointer,(PTR *) &cfgInfo, mBuf);
911           break;
912        }
913 #endif /* LCUDX */
914     }
915     ODU_PUT_MSG_BUF(mBuf);
916
917     return ((*func)(pst, spId, cfgInfo));
918 } /* cmUnpkUdxCfgReq */
919
920 \f
921 /*
922 *
923 *    Fun:    cmUnpkUdxCfgCfm
924 *
925 *    Desc:    unpack the primitive KwUiUdxCfgCfm
926 *
927 *    Ret:    ROK  -ok
928 *
929 *    Notes:    None
930 *
931 *    File:     ckw.c
932 *
933 */
934 S16 cmUnpkUdxCfgCfm(UdxCfgCfm func,Pst  *pst,Buffer *mBuf)
935 {
936     S16 ret1;
937     SuId             suId = 0;
938     RlcCfgCfmInfo    *cfgCfmInfo = NULLP;
939     
940     CMCHKUNPK(SUnpkS16, &suId, mBuf);
941
942     switch(pst->selector)
943     {
944 #ifdef LCUDX
945        case UDX_SEL_LC:
946        {
947            RLC_ALLOC_SHRABL_BUF(pst->region, pst->pool, cfgCfmInfo, sizeof(RlcCfgCfmInfo))
948            if(cfgCfmInfo == NULL)
949            {
950 #if (ERRCLASS & ERRCLS_ADD_RES)
951               if(cfgCfmInfo == NULL)
952               {
953                  SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
954                        __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
955                       (ErrVal)EUDXXXX, (ErrVal)0, "ODU_GET_MSG_BUF() failed");
956               }
957 #endif /*  ERRCLASS & ERRCLS_ADD_RES  */
958               return (RFAILED);
959            }
960
961           ret1 = cmUnpkUdxStruct(mBuf,0,(uint8_t *)cfgCfmInfo, sizeof(RlcCfgCfmInfo));
962           if(ret1 != ROK)
963           {
964 #if(ERRCLASS & ERRCLS_DEBUG)
965              ODU_PUT_MSG_BUF(mBuf);
966              SLogError(pst->dstEnt, pst->dstInst, pst->dstProcId,
967                    __FILE__, __LINE__, (ErrCls)ERRCLS_DEBUG,
968                   (ErrVal)EUDXXXX, (ErrVal)ret1, "Unpacking failure");
969              return ( ret1 );
970 #endif /* ERRCLASS & ERRCLS_DEBUG */
971           }
972           break;
973        }
974        case UDX_SEL_LWLC:
975        {
976           CMCHKUNPK(oduUnpackPointer,(PTR *) &cfgCfmInfo, mBuf);
977           break;
978        }
979 #endif /* LCUDX */
980     }
981     ODU_PUT_MSG_BUF(mBuf);
982
983     return ((*func)(pst, suId, cfgCfmInfo));
984 } /* cmUnpkUdxCfgCfm */
985
986 /*
987 *
988 *    Fun:    cmUnpkUdxUeIdChgReq
989 *
990 *    Desc:    unpack the primitive KwUiUdxUeIdChgReq
991 *
992 *    Ret:    ROK  -ok
993 *
994 *    Notes:    None
995 *
996 *    File:     ckw.c
997 *
998 */
999 S16 cmUnpkUdxUeIdChgReq(UdxUeIdChgReq func,Pst *pst,Buffer *mBuf)
1000 {
1001     SpId      spId = 0;
1002     uint32_t  transId = 0;
1003     CkwUeInfo tmpUeInfo;
1004     CkwUeInfo tmpNewUeInfo;
1005     CkwUeInfo *ueInfo;
1006     CkwUeInfo *newUeInfo;
1007     
1008     CMCHKUNPK(SUnpkS16, &(spId), mBuf);
1009     CMCHKUNPKLOG(oduPackUInt32, &transId, mBuf, EUDXXXX, pst);
1010
1011     switch(pst->selector)
1012     {
1013 #ifdef LCUDX
1014        case UDX_SEL_LC:
1015        {
1016           cmUnpkUdxStruct(mBuf,0,(uint8_t *)&tmpNewUeInfo, sizeof(CkwUeInfo));
1017           cmUnpkUdxStruct(mBuf,sizeof(CkwUeInfo),(uint8_t *)&tmpUeInfo, sizeof(CkwUeInfo));
1018
1019           ueInfo =  &tmpUeInfo;
1020           newUeInfo =  &tmpNewUeInfo;
1021           break;
1022        }
1023        case UDX_SEL_LWLC:
1024        {
1025           CMCHKUNPK(oduUnpackPointer,(PTR *) &ueInfo, mBuf);
1026           CMCHKUNPK(oduUnpackPointer,(PTR *) &newUeInfo, mBuf);
1027           break;
1028        }
1029        default:
1030        {
1031           DU_LOG("\nERROR  -->  RLC : cmUnpkUdxUeIdChgReq()- selector =%d not supported \n", pst->selector);
1032           exit(1);
1033        }
1034
1035 #endif /* LCUDX */
1036     }
1037     ODU_PUT_MSG_BUF(mBuf);
1038
1039     return ((*func)(pst, spId, transId, ueInfo, newUeInfo));
1040
1041 } /* cmUnpkUdxUeIdChgReq */
1042
1043 /*
1044 *
1045 *    Fun:     cmUnpkUdxUeIdChgCfm
1046 *
1047 *    Desc:    unpack the primitive KwUiUdxUeIdChgCfm
1048 *
1049 *    Ret:     ROK  -ok
1050 *
1051 *    Notes:   None
1052 *
1053 *    File:    ckw.c
1054 *
1055 */
1056 S16 cmUnpkUdxUeIdChgCfm(UdxUeIdChgCfm func,Pst  *pst,Buffer *mBuf)
1057 {
1058     SuId      suId = 0;
1059     uint32_t  transId = 0;
1060     CmStatus  status;
1061     
1062     memset(&status, 0, sizeof(CmStatus));
1063
1064     CMCHKUNPK(SUnpkS16, &suId, mBuf);
1065     CMCHKUNPKLOG(oduPackUInt32, &transId, mBuf, EUDXXXX, pst);
1066
1067     CMCHKUNPK(cmUnpkCmStatus, &status, mBuf);
1068
1069     ODU_PUT_MSG_BUF(mBuf);
1070
1071     return ((*func)(pst, suId, transId, status));
1072
1073 } /* cmUnpkUdxUeIdChgCfm */
1074
1075 /*
1076 *
1077 *    Fun:     cmUnpkUdxStaUpdCfm
1078 *
1079 *    Desc:    unpack the primitive KwUiUdxUeIdChgCfm
1080 *
1081 *    Ret:     ROK  -ok
1082 *
1083 *    Notes:   None
1084 *
1085 *    File:    ckw.c
1086 *
1087 */
1088 S16 cmUnpkUdxStaUpdCfm(UdxStaUpdCfm func,Pst *pst,Buffer *mBuf)
1089 {
1090     SuId      suId = 0;
1091     CmLteRlcId *rlcId = NULLP;  /* KW_FIX */
1092     RlcUdxBufLst *pBufLst = NULLP; /* KW_FIX*/
1093     
1094     CMCHKUNPK(SUnpkS16, &suId, mBuf);
1095     switch (pst->selector)
1096     {
1097        case UDX_SEL_LC:
1098        {
1099           break;
1100        }
1101        case UDX_SEL_LWLC:
1102        {
1103           CMCHKUNPK(oduUnpackPointer, (PTR *)&rlcId,mBuf);
1104           CMCHKUNPK(oduUnpackPointer, (PTR *)&pBufLst,mBuf);
1105           break;
1106        }
1107     } 
1108
1109     ODU_PUT_MSG_BUF(mBuf);
1110
1111     return ((*func)(pst, suId, rlcId, pBufLst));
1112
1113 } /* cmUnpkUdxUeIdChgCfm */
1114
1115 /*
1116 *
1117 *    Fun:     cmUnpkUdxStaUpdReq
1118 *
1119 *    Desc:    unpack the primitive KwUiUdxUeIdChgCfm
1120 *
1121 *    Ret:     ROK  -ok
1122 *
1123 *    Notes:   None
1124 *
1125 *    File:    ckw.c
1126 *
1127 */
1128 S16 cmUnpkUdxStaUpdReq(UdxStaUpdReq func,Pst *pst,Buffer *mBuf)
1129 {
1130     SpId      spId = 0;
1131     CmLteRlcId *rlcId = NULLP; /* KW_FIX */ 
1132     RlcUdxStaPdu *pStaPdu = NULLP; /* KW_FIX */
1133     CmLteRlcId tmpRlcId;
1134     
1135     CMCHKUNPK(SUnpkS16, &spId, mBuf);
1136     switch (pst->selector)
1137     {
1138        case UDX_SEL_LC:
1139        {
1140            RLC_ALLOC_SHRABL_BUF(pst->region, pst->pool, pStaPdu, sizeof(RlcUdxStaPdu))
1141            if(pStaPdu == NULLP)
1142            {
1143 #if (ERRCLASS & ERRCLS_ADD_RES)
1144               if(pStaPdu == NULLP)
1145               {
1146                  SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1147                        __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1148                       (ErrVal)EUDXXXX, (ErrVal)0, "ODU_GET_MSG_BUF() failed");
1149               }
1150 #endif /*  ERRCLASS & ERRCLS_ADD_RES  */
1151               return (RFAILED);
1152            }
1153            cmUnpkUdxStruct(mBuf,0,(uint8_t *)pStaPdu, sizeof(RlcUdxStaPdu));
1154            cmUnpkUdxStruct(mBuf,sizeof(RlcUdxStaPdu),(uint8_t *)&tmpRlcId,sizeof(CmLteRlcId));
1155           rlcId = &tmpRlcId; 
1156           break;
1157        }
1158        case UDX_SEL_LWLC:
1159        {
1160           CMCHKUNPK(oduUnpackPointer, (PTR *)&rlcId,mBuf);
1161           CMCHKUNPK(oduUnpackPointer, (PTR *)&pStaPdu,mBuf);
1162           break;
1163        }
1164     } 
1165
1166     ODU_PUT_MSG_BUF(mBuf);
1167
1168     return ((*func)(pst, spId, rlcId, pStaPdu));
1169
1170 } /* cmUnpkUdxUeIdChgCfm */
1171
1172 /*
1173 *
1174 *    Fun:     cmUnpkUdxStaPduReq
1175 *
1176 *    Desc:    unpack the primitive KwUiUdxUeIdChgCfm
1177 *
1178 *    Ret:     ROK  -ok
1179 *
1180 *    Notes:   None
1181 *
1182 *    File:    ckw.c
1183 *
1184 */
1185 S16 cmUnpkUdxStaPduReq(UdxStaPduReq func,Pst *pst,Buffer *mBuf)
1186 {
1187     SpId      spId = 0;
1188     CmLteRlcId tmpRlcId;
1189     CmLteRlcId *rlcId = NULLP;  /* KW_FIX */
1190     RlcUdxDlStaPdu *pStaPdu = NULLP; /* KW_FIX */
1191     
1192     CMCHKUNPK(SUnpkS16, &spId, mBuf);
1193     switch (pst->selector)
1194     {
1195        case UDX_SEL_LC:
1196        {
1197            RLC_ALLOC_SHRABL_BUF(pst->region, pst->pool, pStaPdu, sizeof(RlcUdxDlStaPdu))
1198            if(pStaPdu == NULLP)
1199            {
1200 #if (ERRCLASS & ERRCLS_ADD_RES)
1201               if(pStaPdu == NULLP)
1202               {
1203                  SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1204                        __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1205                       (ErrVal)EUDXXXX, (ErrVal)0, "ODU_GET_MSG_BUF() failed");
1206               }
1207 #endif /*  ERRCLASS & ERRCLS_ADD_RES  */
1208               return (RFAILED);
1209            }
1210            cmUnpkUdxStruct(mBuf,0, (uint8_t *)pStaPdu, sizeof(RlcUdxDlStaPdu));
1211            cmUnpkUdxStruct(mBuf,sizeof(RlcUdxDlStaPdu),(uint8_t *)&tmpRlcId,sizeof(CmLteRlcId));
1212            rlcId = &tmpRlcId; 
1213            break;
1214        }
1215        case UDX_SEL_LWLC:
1216        {
1217           CMCHKUNPK(oduUnpackPointer, (PTR *)&rlcId,mBuf);
1218           CMCHKUNPK(oduUnpackPointer, (PTR *)&pStaPdu,mBuf);
1219           break;
1220        }
1221     } 
1222
1223     ODU_PUT_MSG_BUF(mBuf);
1224     return ((*func)(pst, spId, rlcId, pStaPdu));
1225
1226 } /* cmUnpkUdxUeIdChgCfm */
1227
1228 /*
1229 *
1230 *    Fun:     cmUnpkUdxStaProhTmrStart
1231 *
1232 *    Desc:    unpack the Status prohibit timer start Msg
1233 *
1234 *    Ret:     ROK  -ok
1235 *
1236 *    Notes:   None
1237 *
1238 *    File:    rlc_dl_ul_inf.c
1239 *
1240 */
1241 S16 cmUnpkUdxStaProhTmrStart(UdxStaProhTmrStart func,Pst *pst,Buffer *mBuf)
1242 {
1243     SpId      spId = 0;
1244     CmLteRlcId tmpRlcId;
1245     CmLteRlcId *rlcId = NULLP; /* KW_FIX */
1246     
1247     CMCHKUNPK(SUnpkS16, &spId, mBuf);
1248     switch (pst->selector)
1249     {
1250        case UDX_SEL_LC:
1251        {
1252           cmUnpkUdxStruct(mBuf,0,(uint8_t *)&tmpRlcId,sizeof(CmLteRlcId));
1253           rlcId = &tmpRlcId;
1254           break;
1255        }
1256        case UDX_SEL_LWLC:
1257        {
1258           CMCHKUNPK(oduUnpackPointer, (PTR *)&rlcId,mBuf);
1259           break;
1260        }
1261     } 
1262
1263     ODU_PUT_MSG_BUF(mBuf);
1264
1265     return ((*func)(pst, spId, rlcId));
1266
1267 } /* cmUnpkUdxStaProhTmrStart */
1268
1269 #ifdef LTE_L2_MEAS
1270 /*
1271
1272  
1273 *    Fun:    cmUnpkUdxL2MeasReq
1274 *
1275 *    Ret:    ROK  -ok
1276 *
1277 *    Notes:  None
1278 *
1279 *
1280 */
1281 S16 cmUnpkUdxL2MeasReq(UdxL2MeasReq func,Pst *pst,Buffer *mBuf)
1282 {
1283     RlcL2MeasReqEvt    tmpMeasReqEvt;
1284     RlcL2MeasReqEvt    *measReqEvt = NULLP;  /* KW_FIX */
1285
1286     switch (pst->selector)
1287     {
1288        case UDX_SEL_LC:
1289        {
1290           cmUnpkUdxStruct(mBuf,0,(uint8_t *)&tmpMeasReqEvt,sizeof(RlcL2MeasReqEvt));
1291           measReqEvt = &tmpMeasReqEvt;
1292           break;
1293        }
1294        case UDX_SEL_LWLC:
1295        {
1296          CMCHKUNPK(oduUnpackPointer, (PTR *)&measReqEvt,mBuf);
1297          break;
1298        }
1299     }
1300
1301     ODU_PUT_MSG_BUF(mBuf);
1302
1303     return ((*func)(pst, measReqEvt));
1304 } /* cmUnpkUdxL2MeasReq */
1305
1306 /*
1307 *
1308 *    Fun:    cmUnpkUdxL2MeasSendReq
1309 *
1310 *    Ret:    ROK  -ok
1311 *
1312 *    Notes:  None
1313 *
1314 *
1315 */
1316 S16 cmUnpkUdxL2MeasSendReq(UdxL2MeasSendReq func,Pst *pst,Buffer *mBuf)
1317 {
1318     uint8_t     measType = 0;  /* KW_FIX */
1319
1320     switch (pst->selector)
1321     {
1322        case UDX_SEL_LC:
1323        case UDX_SEL_LWLC:
1324        {
1325           CMCHKUNPK(oduPackUInt8, &measType, mBuf);
1326          break;
1327        }
1328     }
1329
1330     ODU_PUT_MSG_BUF(mBuf);
1331
1332     return ((*func)(pst, measType));
1333 } /* cmUnpkUdxL2MeasReq */
1334
1335 /*
1336 *
1337 *    Fun:    cmUnpkUdxL2MeasStopReq
1338 *
1339 *    Ret:    ROK  -ok
1340 *
1341 *    Notes:  None
1342 *
1343 *
1344 */
1345 S16 cmUnpkUdxL2MeasStopReq(UdxL2MeasStopReq func,Pst *pst,Buffer *mBuf)
1346 {
1347     uint8_t     measType = 0; /* KW_FIX */
1348
1349     switch (pst->selector)
1350     {
1351        case UDX_SEL_LC:
1352        case UDX_SEL_LWLC:
1353        {
1354           CMCHKUNPK(oduPackUInt8, &measType, mBuf);
1355          break;
1356        }
1357     }
1358
1359     ODU_PUT_MSG_BUF(mBuf);
1360
1361     return ((*func)(pst, measType));
1362 } /* cmUnpkUdxL2MeasStopReq */
1363 #endif
1364 #endif /* LCUDX */
1365
1366 \f  
1367 /********************************************************************30**
1368          End of file
1369 **********************************************************************/