Replaced old SSI function with new macros jira id - ODUHIGH-212
[o-du/l2.git] / src / cm / ctf.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:     CTF Interface
22  
23      Type:     C file
24  
25      Desc:     This file contains the packing/unpacking functions
26                for control plane primitives on CTF interface.
27
28      File:     ctf.c
29
30 *********************************************************************21*/
31
32 /* header include files (.h) */
33 #include "common_def.h"
34 #include "ctf.h"           /* CTF interface defines           */
35
36 /* header/extern include files (.x) */
37 #ifdef TENB_AS_SECURITY
38 #include "cm_mblk.x"
39 #endif
40 #include "ctf.x"          
41
42 #ifdef TENB_AS_SECURITY
43 #define cmPkCtfCrnti oduUnpackUInt16
44 #define cmPkCtfCellId oduUnpackUInt16
45 #define cmUnpkCtfCellId oduPackUInt16
46 #define cmUnpkCtfCrnti oduPackUInt16
47 #endif
48
49
50 #if (defined(LCCTF) || defined(LWLCCTF))
51
52 \f
53 /**
54 * @brief Request from RRC to PHY to bind the CTF interface SAP.
55 *
56 * @details
57 *
58 *     Function: cmPkCtfBndReq
59 *
60 *  @param[in]   Pst*  pst
61 *  @param[in]   SuId  suId
62 *  @param[in]   SpId  spId
63 *  @return   S16
64 *      -# ROK
65 **/
66 #ifdef ANSI
67 PUBLIC S16 cmPkCtfBndReq
68 (
69 Pst* pst,
70 SuId suId,
71 SpId spId
72 )
73 #else
74 PUBLIC S16 cmPkCtfBndReq(pst, suId, spId)
75 Pst* pst;
76 SuId suId;
77 SpId spId;
78 #endif
79 {
80    Buffer *mBuf = NULLP;
81    TRC3(cmPkCtfBndReq)
82
83    if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) {
84 #if (ERRCLASS & ERRCLS_ADD_RES)
85       /* ctf_c_001.main_3 Compilation warning fix with g++ */
86       SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
87          (Txt*)&__FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
88          (ErrVal)ECTF001, (ErrVal)0, (Txt*)&"Packing failed");
89 #endif
90       return RFAILED;
91    }
92    if (SPkS16(spId, mBuf) != ROK) {
93 #if (ERRCLASS & ERRCLS_ADD_RES)
94       /* ctf_c_001.main_3 Compilation warning fix with g++ */
95       SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
96          (Txt*)&__FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
97          (ErrVal)ECTF002, (ErrVal)0, (Txt*)&"Packing failed");
98 #endif
99       SPutMsg(mBuf);
100       return RFAILED;
101    }
102    if (SPkS16(suId, mBuf) != ROK) {
103 #if (ERRCLASS & ERRCLS_ADD_RES)
104       /* ctf_c_001.main_3 Compilation warning fix with g++ */
105       SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
106          (Txt*)&__FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
107          (ErrVal)ECTF003, (ErrVal)0, (Txt*)&"Packing failed");
108 #endif
109       SPutMsg(mBuf);
110       return RFAILED;
111    }
112    pst->event = (Event) EVTCTFBNDREQ;
113    return (SPstTsk(pst,mBuf));
114 }
115
116 \f
117 /**
118 * @brief Request from RRC to PHY to bind the CTF interface SAP.
119 *
120 * @details
121 *
122 *     Function: cmUnpkCtfBndReq
123 *
124 *  @param[in]   Pst*  pst
125 *  @param[in]   SuId  suId
126 *  @param[in]   SpId  spId
127 *  @return   S16
128 *      -# ROK
129 **/
130 #ifdef ANSI
131 PUBLIC S16 cmUnpkCtfBndReq
132 (
133 CtfBndReq func,
134 Pst *pst,
135 Buffer *mBuf
136 )
137 #else
138 PUBLIC S16 cmUnpkCtfBndReq(func, pst, mBuf)
139 CtfBndReq func;
140 Pst *pst;
141 Buffer *mBuf;
142 #endif
143 {
144    SuId suId = 0;
145    SpId spId = 0;
146    
147    TRC3(cmUnpkCtfBndReq)
148
149    if (SUnpkS16(&suId, mBuf) != ROK) {
150       SPutMsg(mBuf);
151 #if (ERRCLASS & ERRCLS_ADD_RES)
152       /* ctf_c_001.main_3 Compilation warning fix with g++ */
153       SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
154          (Txt*)&__FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
155          (ErrVal)ECTF004, (ErrVal)0, (Txt*)&"Packing failed");
156 #endif
157       return RFAILED;
158    }
159    if (SUnpkS16(&spId, mBuf) != ROK) {
160       SPutMsg(mBuf);
161 #if (ERRCLASS & ERRCLS_ADD_RES)
162       /* ctf_c_001.main_3 Compilation warning fix with g++ */
163       SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
164          (Txt*)&__FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
165          (ErrVal)ECTF005, (ErrVal)0, (Txt*)&"Packing failed");
166 #endif
167       return RFAILED;
168    }
169    SPutMsg(mBuf);
170    return ((*func)(pst, suId, spId));
171 }
172
173 \f
174 /**
175 * @brief Confirmation from PHY to RRC for the bind 
176  * request for the CTF interface SAP.
177 *
178 * @details
179 *
180 *     Function: cmPkCtfBndCfm
181 *
182 *  @param[in]   Pst*  pst
183 *  @param[in]   SuId  suId
184 *  @param[in]   U8  status
185 *  @return   S16
186 *      -# ROK
187 **/
188 #ifdef ANSI
189 PUBLIC S16 cmPkCtfBndCfm
190 (
191 Pst* pst,
192 SuId suId,
193 U8 status
194 )
195 #else
196 PUBLIC S16 cmPkCtfBndCfm(pst, suId, status)
197 Pst* pst;
198 SuId suId;
199 U8 status;
200 #endif
201 {
202    Buffer *mBuf = NULLP;
203    TRC3(cmPkCtfBndCfm)
204
205    if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) {
206 #if (ERRCLASS & ERRCLS_ADD_RES)
207       /* ctf_c_001.main_3 Compilation warning fix with g++ */
208       SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
209          (Txt*)&__FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
210          (ErrVal)ECTF006, (ErrVal)0, (Txt*)&"Packing failed");
211 #endif
212       return RFAILED;
213    }
214    if (oduUnpackUInt8(status, mBuf) != ROK) {
215 #if (ERRCLASS & ERRCLS_ADD_RES)
216       /* ctf_c_001.main_3 Compilation warning fix with g++ */
217       SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
218          (Txt*)&__FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
219          (ErrVal)ECTF007, (ErrVal)0, (Txt*)&"Packing failed");
220 #endif
221       SPutMsg(mBuf);
222       return RFAILED;
223    }
224    if (SPkS16(suId, mBuf) != ROK) {
225 #if (ERRCLASS & ERRCLS_ADD_RES)
226       /* ctf_c_001.main_3 Compilation warning fix with g++ */
227       SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
228          (Txt*)&__FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
229          (ErrVal)ECTF008, (ErrVal)0, (Txt*)&"Packing failed");
230 #endif
231       SPutMsg(mBuf);
232       return RFAILED;
233    }
234    pst->event = (Event) EVTCTFBNDCFM;
235    return (SPstTsk(pst,mBuf));
236 }
237
238 \f
239 /**
240 * @brief Confirmation from PHY to RRC for the bind 
241  * request for the CTF interface SAP.
242 *
243 * @details
244 *
245 *     Function: cmUnpkCtfBndCfm
246 *
247 *  @param[in]   Pst*  pst
248 *  @param[in]   SuId  suId
249 *  @param[in]   U8  status
250 *  @return   S16
251 *      -# ROK
252 **/
253 #ifdef ANSI
254 PUBLIC S16 cmUnpkCtfBndCfm
255 (
256 CtfBndCfm func,
257 Pst *pst,
258 Buffer *mBuf
259 )
260 #else
261 PUBLIC S16 cmUnpkCtfBndCfm(func, pst, mBuf)
262 CtfBndCfm func;
263 Pst *pst;
264 Buffer *mBuf;
265 #endif
266 {
267    SuId suId = 0;
268    U8 status;
269    
270    TRC3(cmUnpkCtfBndCfm)
271
272    if (SUnpkS16(&suId, mBuf) != ROK) {
273       SPutMsg(mBuf);
274 #if (ERRCLASS & ERRCLS_ADD_RES)
275       /* ctf_c_001.main_3 Compilation warning fix with g++ */
276       SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
277          (Txt*)&__FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
278          (ErrVal)ECTF009, (ErrVal)0, (Txt*)&"Packing failed");
279 #endif
280       return RFAILED;
281    }
282    if (oduPackUInt8(&status, mBuf) != ROK) {
283       SPutMsg(mBuf);
284 #if (ERRCLASS & ERRCLS_ADD_RES)
285       /* ctf_c_001.main_3 Compilation warning fix with g++ */
286       SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
287          (Txt*)&__FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
288          (ErrVal)ECTF010, (ErrVal)0, (Txt*)&"Packing failed");
289 #endif
290       return RFAILED;
291    }
292    SPutMsg(mBuf);
293    return ((*func)(pst, suId, status));
294 }
295
296 \f
297 /**
298 * @brief Request from RRC to PHY to Unbind the CTF interface SAP.
299 *
300 * @details
301 *
302 *     Function: cmPkCtfUbndReq
303 *
304 *  @param[in]   Pst*  pst
305 *  @param[in]   SpId  spId
306 *  @param[in]   Reason  reason
307 *  @return   S16
308 *      -# ROK
309 **/
310 #ifdef ANSI
311 PUBLIC S16 cmPkCtfUbndReq
312 (
313 Pst* pst,
314 SpId spId,
315 Reason reason
316 )
317 #else
318 PUBLIC S16 cmPkCtfUbndReq(pst, spId, reason)
319 Pst* pst;
320 SpId spId;
321 Reason reason;
322 #endif
323 {
324    Buffer *mBuf = NULLP;
325    TRC3(cmPkCtfUbndReq)
326
327    if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) {
328 #if (ERRCLASS & ERRCLS_ADD_RES)
329       /* ctf_c_001.main_3 Compilation warning fix with g++ */
330       SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
331          (Txt*)&__FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
332          (ErrVal)ECTF011, (ErrVal)0, (Txt*)&"Packing failed");
333 #endif
334       return RFAILED;
335    }
336    if (SPkS16(reason, mBuf) != ROK) {
337 #if (ERRCLASS & ERRCLS_ADD_RES)
338       /* ctf_c_001.main_3 Compilation warning fix with g++ */
339       SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
340          (Txt*)&__FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
341          (ErrVal)ECTF012, (ErrVal)0, (Txt*)&"Packing failed");
342 #endif
343       SPutMsg(mBuf);
344       return RFAILED;
345    }
346    if (SPkS16(spId, mBuf) != ROK) {
347 #if (ERRCLASS & ERRCLS_ADD_RES)
348       /* ctf_c_001.main_3 Compilation warning fix with g++ */
349       SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
350          (Txt*)&__FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
351          (ErrVal)ECTF013, (ErrVal)0,(Txt*)&"Packing failed");
352 #endif
353       SPutMsg(mBuf);
354       return RFAILED;
355    }
356    pst->event = (Event) EVTCTFUBNDREQ;
357    return (SPstTsk(pst,mBuf));
358 }
359
360 \f
361 /**
362 * @brief Request from RRC to PHY to Unbind the CTF interface SAP.
363 *
364 * @details
365 *
366 *     Function: cmUnpkCtfUbndReq
367 *
368 *  @param[in]   Pst*  pst
369 *  @param[in]   SpId  spId
370 *  @param[in]   Reason  reason
371 *  @return   S16
372 *      -# ROK
373 **/
374 #ifdef ANSI
375 PUBLIC S16 cmUnpkCtfUbndReq
376 (
377 CtfUbndReq func,
378 Pst *pst,
379 Buffer *mBuf
380 )
381 #else
382 PUBLIC S16 cmUnpkCtfUbndReq(func, pst, mBuf)
383 CtfUbndReq func;
384 Pst *pst;
385 Buffer *mBuf;
386 #endif
387 {
388    SpId spId = 0;
389    Reason reason = 0;
390    
391    TRC3(cmUnpkCtfUbndReq)
392
393    if (SUnpkS16(&spId, mBuf) != ROK) {
394       SPutMsg(mBuf);
395 #if (ERRCLASS & ERRCLS_ADD_RES)
396       /* ctf_c_001.main_3 Compilation warning fix with g++ */
397       SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
398          (Txt*)&__FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
399          (ErrVal)ECTF014, (ErrVal)0, (Txt*)&"Packing failed");
400 #endif
401       return RFAILED;
402    }
403    if (SUnpkS16(&reason, mBuf) != ROK) {
404       SPutMsg(mBuf);
405 #if (ERRCLASS & ERRCLS_ADD_RES)
406       /* ctf_c_001.main_3 Compilation warning fix with g++ */
407       SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
408          (Txt*)&__FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
409          (ErrVal)ECTF015, (ErrVal)0, (Txt*)&"Packing failed");
410 #endif
411       return RFAILED;
412    }
413    SPutMsg(mBuf);
414    return ((*func)(pst, spId, reason));
415 }
416
417 \f
418 /***********************************************************
419 *
420 *     Func: cmRelCtfCfgReq
421 *
422 *
423 *     Desc:  This fucntion will release the memory used for ctf cfg req
424 *
425 *     Ret: S16
426 *
427 *     Notes:
428 *
429 *     File: 
430 *
431 **********************************************************/
432 #ifdef ANSI
433 PRIVATE S16 cmRelCtfCfgReq
434 (
435 Pst  *pst,
436 CtfCfgReqInfo *cfgReqInfo
437 )
438 #else
439 PRIVATE S16 cmRelCtfCfgReq(pst,cfgReqInfo)
440 Pst  *pst;
441 CtfCfgReqInfo *param;
442 #endif
443 {
444    /* ctf_c_001.main_4: Added support for vendor specific parameters */
445 #ifdef CTF_VER3
446    if(cfgReqInfo->vendorParams.paramBuffer != NULLP) {
447       SPutSBuf(pst->region, pst->pool, 
448                    (Data *)cfgReqInfo->vendorParams.paramBuffer,
449                    cfgReqInfo->vendorParams.buffLen);
450    }
451 #endif
452    SPutSBuf(pst->region, pst->pool, (Data *)cfgReqInfo, sizeof(CtfCfgReqInfo)); 
453    return ROK;
454 }
455
456 #ifdef TENB_AS_SECURITY
457 /***********************************************************
458 *
459 *     Func: cmPkCtfNhKeyInfo
460 *
461 *
462 *     Desc:   Pack keNB* input parameter information
463  * @details This is one of the main structure in the KDF request primitive.
464  *    -# This structure contains the configuration information as given by 
465  *       the Application to trigger key derivation at PHY layer for generation of kENB*.
466  *    -# It take Next Hop key, DL Frequency and Physical cell Id as input.
467  *    -# The result of configuration is indicated in KdfCfgCfm.
468 *
469 *
470 *     Ret: S16
471 *
472 *     Notes:
473 *
474 *     File: 
475 *
476 **********************************************************/
477 #ifdef ANSI
478 PUBLIC S16 cmPkCtfNhKeyInfo
479 (
480 CtfNhKeyInfo *param,
481 Buffer *mBuf
482 )
483 #else
484 PUBLIC S16 cmPkCtfNhKeyInfo(param, mBuf)
485 CtfNhKeyInfo *param;
486 Buffer *mBuf;
487 #endif
488 {
489
490    S16  idx;
491
492    TRC3(cmPkCtfNhKeyInfo)
493          
494    for(idx=31;idx>=0;idx--)
495    {
496       CMCHKPK(oduUnpackUInt8,param->secKey[idx],mBuf);
497    }
498    CMCHKPK(oduUnpackUInt16, param->physCellId, mBuf);
499    CMCHKPK(oduUnpackUInt16, param->dlCarrFreq, mBuf);
500
501    return ROK;
502 }
503
504 /***********************************************************
505 *
506 *     Func: cmPkCtfKenbStarInfo
507 *
508 *
509 *     Desc:   Pack keNB* input parameter information
510  * @details This is one of the main structure in the KDF request primitive.
511  *    -# This structure contains the configuration information as given by 
512  *       the Application to trigger key derivation at PHY layer for generation of kENB*.
513  *    -# It take existing kENB, DL Frequency and Physical cell Id as input.
514  *    -# The result of configuration is indicated in KdfCfgCfm.
515 *
516 *
517 *     Ret: S16
518 *
519 *     Notes:
520 *
521 *     File: 
522 *
523 **********************************************************/
524 #ifdef ANSI
525 PUBLIC S16 cmPkCtfKenbStarInfo
526 (
527 CtfKenbStarInfo *param,
528 Buffer *mBuf
529 )
530 #else
531 PUBLIC S16 cmPkCtfKenbStarInfo(param, mBuf)
532 CtfKenbStarInfo *param;
533 Buffer *mBuf;
534 #endif
535 {
536
537    S16  idx;
538
539    TRC3(cmPkCtfKenbStarInfo)
540          
541    for(idx=31;idx>=0;idx--)
542    {
543       CMCHKPK(oduUnpackUInt8,param->secKey[idx],mBuf);
544    }
545    CMCHKPK(oduUnpackUInt16, param->physCellId, mBuf);
546    CMCHKPK(oduUnpackUInt16, param->dlCarrFreq, mBuf);
547    
548    return ROK;
549 }
550
551
552 /***********************************************************
553 *
554 *     Func: cmPkCtfAskeyInfo
555 *
556 *
557 *     Desc:   Pack AS key generation input parameter information.
558  * @details This is one of the main structure in the KDF request primitive.
559  *    -# This structure contains the configuration information as given by 
560  *       the Application to trigger key derivation at PHY layer for generation of AS Security keys.
561  *    -# It take existing kENB, and integrity/cipherig Algorithm as input.
562  *    -# The result of configuration is indicated in KdfCfgCfm.
563 *
564 *
565 *     Ret: S16
566 *
567 *     Notes:
568 *
569 *     File: 
570 *
571 **********************************************************/
572 #ifdef ANSI
573 PUBLIC S16 cmPkCtfAskeyInfo
574 (
575 CtfAsKeyInfo *param,
576 Buffer *mBuf
577 )
578 #else
579 PUBLIC S16 cmPkCtfAskeyInfo(param, mBuf)
580 CtfAsKeyInfo *param;
581 Buffer *mBuf;
582 #endif
583 {
584
585    S16  idx;
586
587    TRC3(cmPkCtfAskeyInfo)
588
589          
590    for(idx=31;idx>=0;idx--)
591    {
592       CMCHKPK(oduUnpackUInt8,param->secKey[idx],mBuf);
593    }
594    CMCHKPK(oduUnpackUInt8, param->ciphAlgoType, mBuf);
595    CMCHKPK(oduUnpackUInt8, param->intgAlgoType, mBuf);
596
597    return ROK;
598 }
599
600 /***********************************************************
601 *
602 *     Func: cmPkCtfKdfReqInfo
603 *
604 *
605 *     Desc:   Pack one of the 3 Key Derivation types.
606  * @details This is the encompassing structure in the KDF request primitive.
607  *    -# This structure contains the configuration information as given by 
608  *       the Application to trigger key derivation at PHY layer for generation of keys.
609  *    -# It takes key derivation type as input.
610  *    -# The result of configuration is indicated in KdfCfgCfm.
611 *
612 *
613 *     Ret: S16
614 *
615 *     Notes:
616 *
617 *     File: 
618 *
619 **********************************************************/
620 #ifdef ANSI
621 PUBLIC S16 cmPkCtfKdfReqInfo
622 (
623 CtfKdfReqInfo *param,
624 Buffer *mBuf
625  )
626 #else
627 PUBLIC S16 cmPkCtfKdfReqInfo(param, mBuf)
628 CtfKdfReqInfo *param;
629 Buffer *mBuf;
630 #endif
631 {
632
633    TRC3(cmPkCtfKdfReqInfo)
634
635    switch (param->keyDerType)
636     {
637          case CTF_KDF_TYPE1:
638              CMCHKPK(cmPkCtfAskeyInfo, &param->u.kEnbInf, mBuf);
639              break;
640          case CTF_KDF_TYPE2:
641             CMCHKPK(cmPkCtfKenbStarInfo, &param->u.kEnbStarInf, mBuf);
642             break;
643          case CTF_KDF_TYPE3:
644             CMCHKPK(cmPkCtfNhKeyInfo , &param->u.nhKeyInf, mBuf);
645              break;
646          default :
647             return RFAILED;
648     }
649     CMCHKPK(oduUnpackUInt8, param->keyDerType, mBuf);
650
651    return ROK;
652 }
653
654 /**
655 * @brief Primitive Request from Application to PHY for 
656  * security key derivation.
657 *
658 * @details
659 *
660 *     Function: cmPkCtfKdfReq
661 *
662 *  @param[in]   Pst*  pst
663 *  @param[in]   SpId  spId
664 *  @param[in]   CtfCfgTransId  transId
665 *  @param[in]   CtfCfgReqInfo*  cfgReqInfo
666 *  @return   S16
667 *      -# ROK
668 **/
669 #ifdef ANSI
670 PUBLIC S16 cmPkCtfKdfReq
671 (
672 Pst* pst,
673 SpId spId,
674 CtfCfgTransId transId,
675 CtfKdfReqInfo* kdfReqInfo
676 )
677 #else
678 PUBLIC S16 cmPkCtfKdfReq(pst, spId, transId, kdfReqInfo)
679 Pst* pst;
680 SpId spId;
681 CtfCfgTransId transId;
682 CtfKdfReqInfo* kdfReqInfo;
683 #endif
684 {
685    Buffer *mBuf = NULLP;
686
687
688    TRC3(cmPkCtfKdfReq)
689    
690    if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) {
691 #if (ERRCLASS & ERRCLS_ADD_RES)
692       /* ctf_c_001.main_3 Compilation warning fix with g++ */
693       SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
694          (Txt*)&__FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
695          (ErrVal)ECTF016, (ErrVal)0, (Txt*)&"Packing failed");
696 #endif
697       SPutSBuf(pst->region, pst->pool, (Data *)kdfReqInfo, sizeof(CtfKdfReqInfo));
698       return RFAILED;
699    }
700    if (pst->selector == ODU_SELECTOR_LC) {
701       if (cmPkCtfKdfReqInfo(kdfReqInfo, mBuf) != ROK) {
702 #if (ERRCLASS & ERRCLS_ADD_RES)
703       /* ctf_c_001.main_3 Compilation warning fix with g++ */
704          SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
705             (Txt*)&__FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
706             (ErrVal)ECTF017, (ErrVal)0, (Txt*)&"Packing failed");
707 #endif
708          SPutSBuf(pst->region, pst->pool, (Data *)kdfReqInfo, sizeof(CtfKdfReqInfo));
709          SPutMsg(mBuf);
710          return RFAILED;
711       }
712    }
713    else if (pst->selector == ODU_SELECTOR_LWLC) {
714    }
715    if (cmPkCtfCfgTransId(&transId, mBuf) != ROK) {
716 #if (ERRCLASS & ERRCLS_ADD_RES)
717       /* ctf_c_001.main_3 Compilation warning fix with g++ */
718       SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
719          (Txt*)&__FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
720          (ErrVal)ECTF019, (ErrVal)0, (Txt*)&"Packing failed");
721 #endif
722       SPutSBuf(pst->region, pst->pool, (Data *)kdfReqInfo, sizeof(CtfKdfReqInfo));
723       SPutMsg(mBuf);
724       return RFAILED;
725    }
726    if (SPkS16(spId, mBuf) != ROK) {
727 #if (ERRCLASS & ERRCLS_ADD_RES)
728       /* ctf_c_001.main_3 Compilation warning fix with g++ */
729       SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
730          (Txt*)&__FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
731          (ErrVal)ECTF020, (ErrVal)0, (Txt*)&"Packing failed");
732 #endif
733       SPutSBuf(pst->region, pst->pool, (Data *)kdfReqInfo, sizeof(CtfKdfReqInfo));
734       SPutMsg(mBuf);
735       return RFAILED;
736    }
737    if (pst->selector != ODU_SELECTOR_LWLC) {
738       if (SPutSBuf(pst->region, pst->pool, (Data *)kdfReqInfo, sizeof(CtfKdfReqInfo)) != ROK) {
739 #if (ERRCLASS & ERRCLS_ADD_RES)
740       /* ctf_c_001.main_3 Compilation warning fix with g++ */
741       SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
742          (Txt*)&__FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
743          (ErrVal)ECTF021, (ErrVal)0, (Txt*)&"Packing failed");
744 #endif
745          SPutMsg(mBuf);
746          return RFAILED;
747       }
748    }
749    pst->event = (Event) EVTCTFKDFREQ;
750    return (SPstTsk(pst,mBuf));
751 }
752 #endif
753
754 /********************************************************************************************************************************/
755                               /*START OF CNM PACK & UNPACK FUNCTIONS*/
756 /********************************************************************************************************************************/
757 #ifdef ANSI
758 PUBLIC S16 cmPkCtfCnmVendorSpecificInfo
759 (
760 CtfCnmVendorSpecificInfo *param,
761 Buffer *mBuf
762 )
763 #else
764 CtfCnmVendorSpecificInfo *param;
765 Buffer *mBuf;
766 #endif
767 {
768    S32 i;
769    TRC3(cmPkCtfCnmVendorSpecificInfo);
770    if(param->numOfVendorSpecifcParam <= CTF_CNM_MAX_VENDOR_PARAMS)
771    {
772       for(i= param->numOfVendorSpecifcParam-1; i >= 0; i--)
773       {
774          CMCHKPK(oduUnpackUInt32,(U32)param->vendorSpecifcParam[i], mBuf);
775       }
776    }
777    CMCHKPK(oduUnpackUInt16, param->numOfVendorSpecifcParam, mBuf);
778    return ROK;
779 }
780
781 #ifdef ANSI
782 PUBLIC S16 cmPkCtfCtfCnmCellSyncReq
783 (
784 CtfCnmCellSyncReq *param,
785 Buffer *mBuf
786 )
787 #else
788 PUBLIC S16 cmPkCtfCtfCnmCellSyncReq(param, mBuf)
789 CtfCnmCellSyncReq *param;
790 Buffer *mBuf;
791 #endif
792 {
793
794    TRC3(cmPkCtfCtfCnmCellSyncReq);
795    CMCHKPK(oduUnpackUInt16, param->nbrEarfcn, mBuf);
796    CMCHKPK(oduUnpackUInt16, param->nbrPCellId, mBuf);
797    CMCHKPK(oduUnpackUInt8, param->nbrTxAntCount, mBuf);
798    CMCHKPK(oduUnpackUInt8, param->nbrCellCp, mBuf);
799    CMCHKPK(oduUnpackUInt8, param->nbrCellNRb, mBuf);
800    CMCHKPK(oduUnpackUInt8, param->nbrSpecSfCfg, mBuf);
801    CMCHKPK(cmPkCtfCnmVendorSpecificInfo, &param->ctfCnmVendorSpecificInfo, mBuf);
802    return ROK;
803
804 }
805
806 #ifdef ANSI
807 PUBLIC S16 cmPkCtfcfgReqInfo
808 (
809 CtfCnmInitSyncReq *param,
810 Buffer *mBuf
811 )
812 #else
813 PUBLIC S16 cmPkCtfcfgReqInfo(param, mBuf)
814 CtfCnmInitSyncReq *param;
815 Buffer *mBuf;
816 #endif
817 {
818    S32 i;
819    TRC3(cmPkCtfcfgReqInfo);
820
821    CMCHKPK(oduUnpackUInt8, param->searchType, mBuf);
822    CMCHKPK(oduUnpackUInt8, param->mibRequest, mBuf);
823    CMCHKPK(oduUnpackUInt16, param->earfcn, mBuf);
824    CMCHKPK(oduUnpackUInt8, param->measBandWidth, mBuf);
825    if(param->numOfPciList <= CTF_CNM_MAX_CELL_SEARCH)
826    { 
827       for(i= param->numOfPciList-1; i >= 0; i--)
828       {
829          CMCHKPK(cmPkCtfCtfCnmCellSyncReq, &param->pciList[i], mBuf);
830       }
831    }
832    CMCHKPK(oduUnpackUInt16, param->numOfPciList, mBuf);
833    return ROK;
834
835 }
836 #ifdef ANSI
837 PUBLIC S16 cmUnpkCtfCnmVendorSpecificInfo
838 (
839 CtfCnmVendorSpecificInfo *param,
840 Buffer *mBuf
841 )
842 #else
843 PUBLIC S16 cmUnpkCtfCnmVendorSpecificInfo(param, mBuf)
844 CtfCnmVendorSpecificInfo *param;
845 Buffer *mBuf;
846 #endif
847 {
848    S32 i;
849    TRC3(cmUnpkCtfCnmVendorSpecificInfo);
850
851    CMCHKUNPK(oduPackUInt16, &param->numOfVendorSpecifcParam, mBuf);
852    for(i=0; (i<param->numOfVendorSpecifcParam)&&(i < CTF_CNM_MAX_VENDOR_PARAMS); i++)
853    {
854       CMCHKUNPK(oduPackUInt32, &param->vendorSpecifcParam[i], mBuf);
855    }
856    return ROK;
857 }
858
859 #ifdef ANSI
860 PUBLIC S16 cmUnpkCtfCtfCnmCellSyncReq
861 (
862 CtfCnmCellSyncReq *param,
863 Buffer *mBuf
864 )
865 #else
866 PUBLIC S16 cmUnpkCtfCtfCnmCellSyncReq(param, mBuf)
867 CtfCnmCellSyncReq *param;
868 Buffer *mBuf;
869 #endif
870 {
871    TRC3(cmUnpkCtfCtfCnmCellSyncReq);
872
873
874    CMCHKUNPK(cmUnpkCtfCnmVendorSpecificInfo, &param->ctfCnmVendorSpecificInfo, mBuf);
875    CMCHKUNPK(oduPackUInt8, &param->nbrSpecSfCfg, mBuf);
876    CMCHKUNPK(oduPackUInt8, &param->nbrCellNRb, mBuf);
877    CMCHKUNPK(oduPackUInt8, &param->nbrCellCp, mBuf);
878    CMCHKUNPK(oduPackUInt8, &param->nbrTxAntCount, mBuf);
879    CMCHKUNPK(oduPackUInt16, &param->nbrPCellId, mBuf);
880    CMCHKUNPK(oduPackUInt16, &param->nbrEarfcn, mBuf);
881    return ROK;
882
883 }
884
885 #ifdef ANSI
886 PUBLIC S16 cmUnpkCtfsyncReqInfo
887 (
888 CtfCnmInitSyncReq *param,
889 Buffer *mBuf
890 )
891 #else
892 PUBLIC S16 cmUnpkCtfsyncReqInfo(param, mBuf)
893 CtfCnmInitSyncReq *param;
894 Buffer *mBuf;
895 #endif
896 {
897    S32 i;
898    TRC3(cmUnpkCtfsyncReqInfo);
899
900    CMCHKUNPK(oduPackUInt16, &param->numOfPciList, mBuf);
901    for(i=0; (i < param->numOfPciList)&&(i < CTF_CNM_MAX_CELL_SEARCH); i++)
902    {
903       CMCHKUNPK(cmUnpkCtfCtfCnmCellSyncReq, &param->pciList[i], mBuf);
904    }
905
906    CMCHKUNPK(oduPackUInt8, &param->measBandWidth, mBuf);
907    CMCHKUNPK(oduPackUInt16, &param->earfcn, mBuf);
908    CMCHKUNPK(oduPackUInt8, &param->mibRequest, mBuf);
909    CMCHKUNPK(oduPackUInt8, &param->searchType, mBuf);
910    return ROK;
911 }
912 /**
913 * @brief Configuration Request from App to CL for
914  * cnm Cell Sync request.
915 *
916 * @details
917 *
918 *     Function: cmPkCtfCnmCellSyncReq
919 *
920 *  @param[in]   Pst*  pst
921 *  @param[in]   SpId  spId
922 *  @param[in]   CtfCfgTransId  * transId
923 *  @param[in]   CtfCnmCellSyncReq* ctfcnmCellSyncReq
924 *  @return   S16
925 *      -# ROK
926 **/
927 #ifdef ANSI
928 PUBLIC S16 cmPkCtfCnmCellSyncReq
929 (
930 Pst* pst,
931 SpId spId,
932 CtfCfgTransId *transId,
933 CtfCnmCellSyncReq * cfgReqInfo
934 )
935 #else
936 PUBLIC S16 cmPkCtfCnmCellSyncReq(pst, spId, transId, cfgReqInfo)
937 Pst* pst;
938 SpId spId;
939 CtfCfgTransId *transId;
940 CtfCnmCellSyncReq * cfgReqInfo;
941 #endif
942 {
943
944    Buffer *mBuf = NULLP;
945
946    TRC3(cmPkCtfCnmCellSyncReq)
947
948    if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) {
949 #if (ERRCLASS & ERRCLS_ADD_RES)
950       /* ctf_c_001.main_3 Compilation warning fix with g++ */
951       SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
952          (Txt*)&__FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
953          (ErrVal)ECTF016, (ErrVal)0, (Txt*)&"Packing failed");
954 #endif
955       SPutSBuf(pst->region, pst->pool, (Data *)cfgReqInfo, sizeof(CtfCnmCellSyncReq));
956       return RFAILED;
957    }
958    if (pst->selector == ODU_SELECTOR_LC) {
959       if (cmPkCtfCtfCnmCellSyncReq(cfgReqInfo, mBuf) != ROK) {
960 #if (ERRCLASS & ERRCLS_ADD_RES)
961       /* ctf_c_001.main_3 Compilation warning fix with g++ */
962          SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
963             (Txt*)&__FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
964             (ErrVal)ECTF017, (ErrVal)0, (Txt*)&"Packing failed");
965 #endif
966          SPutSBuf(pst->region, pst->pool, (Data *)cfgReqInfo, sizeof(CtfCnmCellSyncReq));
967          SPutMsg(mBuf);
968          return RFAILED;
969       }
970    }
971    else if (pst->selector == ODU_SELECTOR_LWLC) {
972
973    if (oduPackPointer((PTR)cfgReqInfo, mBuf) != ROK) {
974 #if (ERRCLASS & ERRCLS_ADD_RES)
975       /* ctf_c_001.main_3 Compilation warning fix with g++ */
976          SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
977             __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
978             (ErrVal)ECTF018, (ErrVal)0, "Packing failed");
979 #endif
980          SPutSBuf(pst->region, pst->pool, (Data *)cfgReqInfo, sizeof(CtfCnmCellSyncReq));
981          SPutMsg(mBuf);
982          return RFAILED;
983       }
984
985    }
986    if(cmPkCtfCfgTransId(transId, mBuf) != ROK) {
987 #if (ERRCLASS & ERRCLS_ADD_RES)
988       /* ctf_c_001.main_3 Compilation warning fix with g++ */
989       SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
990          __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
991          (ErrVal)ECTF019, (ErrVal)0, "Packing failed");
992 #endif
993       SPutSBuf(pst->region, pst->pool, (Data *)cfgReqInfo, sizeof(CtfCnmCellSyncReq));
994       SPutMsg(mBuf);
995       return RFAILED;
996    }
997  if (SPkS16(spId, mBuf) != ROK) {
998 #if (ERRCLASS & ERRCLS_ADD_RES)
999       /* ctf_c_001.main_3 Compilation warning fix with g++ */
1000       SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1001          __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1002          (ErrVal)ECTF020, (ErrVal)0, "Packing failed");
1003 #endif
1004       SPutSBuf(pst->region, pst->pool, (Data *)cfgReqInfo, sizeof(CtfCnmCellSyncReq));
1005       SPutMsg(mBuf);
1006       return RFAILED;
1007    }
1008    if (pst->selector != ODU_SELECTOR_LWLC) {
1009       SPutSBuf(pst->region, pst->pool, (Data *)cfgReqInfo, sizeof(CtfCnmCellSyncReq));
1010    }
1011    pst->event = (Event)EVTCTFCNMSYNCREQ;
1012    return (SPstTsk(pst,mBuf));
1013
1014 }
1015 /**
1016 * @brief Configuration Request from RRC to PHY for
1017  * cell or dedicated configuration.
1018 *
1019 * @details
1020 *
1021 *     Function: cmUnpkCtfCnmCellSyncReq
1022 *
1023 *  @param[in]   CtfCnmCellSyncReqMsg func
1024 *  @param[in]   Pst*  pst
1025 *  @param[in]   Buffer *mBuf
1026 *  @return   S16
1027 *      -# ROK
1028 **/
1029 #ifdef ANSI
1030 PUBLIC S16 cmUnpkCtfCnmCellSyncReq
1031 (
1032 CtfCnmCellSyncReqMsg func,
1033 Pst *pst,
1034 Buffer *mBuf
1035 )
1036 #else
1037 PUBLIC S16 cmUnpkCtfCnmCellSyncReq(func, pst, mBuf)
1038 CtfCnmCellSyncReqMsg func;
1039 Pst *pst;
1040 Buffer *mBuf;
1041 #endif
1042 {
1043
1044    SpId spId = 0;
1045    CtfCfgTransId transId;
1046    CtfCnmCellSyncReq *SyncReqMsg = NULLP;
1047    TRC3(cmUnpkCtfCnmCellSyncReq)
1048
1049    if (SUnpkS16(&spId, mBuf) != ROK) {
1050       SPutMsg(mBuf);
1051 #if (ERRCLASS & ERRCLS_ADD_RES)
1052       /* ctf_c_001.main_3 Compilation warning fix with g++ */
1053       SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1054          (Txt*)&__FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1055          (ErrVal)ECTF022, (ErrVal)0, (Txt*)&"Packing failed");
1056 #endif
1057       return RFAILED;
1058    }
1059    if (cmUnpkCtfCfgTransId(&transId, mBuf) != ROK) {
1060       SPutMsg(mBuf);
1061 #if (ERRCLASS & ERRCLS_ADD_RES)
1062       /* ctf_c_001.main_3 Compilation warning fix with g++ */
1063       SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1064          (Txt*)&__FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1065          (ErrVal)ECTF023, (ErrVal)0, (Txt*)&"Packing failed");
1066 #endif
1067       return RFAILED;
1068    }
1069    if (pst->selector != ODU_SELECTOR_LWLC) {
1070       if ((SGetSBuf(pst->region, pst->pool, (Data **)&SyncReqMsg, sizeof(CtfCnmCellSyncReq))) != ROK) {
1071 #if (ERRCLASS & ERRCLS_ADD_RES)
1072       /* ctf_c_001.main_3 Compilation warning fix with g++ */
1073          SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1074             (Txt*)&__FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1075             (ErrVal)ECTF024, (ErrVal)0, (Txt*)&"Packing failed");
1076 #endif
1077          SPutMsg(mBuf);
1078          return RFAILED;
1079       }
1080    }
1081    if (pst->selector == ODU_SELECTOR_LWLC) {
1082       if (oduUnpackPointer((PTR *)&SyncReqMsg, mBuf) != ROK) {
1083          SPutMsg(mBuf);
1084          return RFAILED;
1085       }
1086    }
1087   else if (pst->selector == ODU_SELECTOR_LC)
1088       if (cmUnpkCtfCtfCnmCellSyncReq(SyncReqMsg, mBuf) != ROK) {
1089       SPutSBuf(pst->region, pst->pool, (Data *)SyncReqMsg, sizeof(CtfCnmCellSyncReq));
1090       SPutMsg(mBuf);
1091 #if (ERRCLASS & ERRCLS_ADD_RES)
1092       /* ctf_c_001.main_3 Compilation warning fix with g++ */
1093       SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1094          (Txt*)&__FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1095          (ErrVal)ECTF025, (ErrVal)0, (Txt*)&"Packing failed");
1096 #endif
1097       return RFAILED;
1098    }
1099    SPutMsg(mBuf);
1100    return ((*func)(pst, spId, &transId, SyncReqMsg));
1101
1102 }
1103 /*-----------------------------------------------------*/
1104
1105
1106 /**
1107 * @brief Configuration Request from App to CL for
1108  * cnm Init Sync request.
1109 *
1110 * @details
1111 *
1112 *     Function: cmPkCtfCnmInitSyncReq
1113 *
1114 *  @param[in]   Pst*  pst
1115 *  @param[in]   SpId  spId
1116 *  @param[in]   CtfCfgTransId  * transId
1117 *  @param[in]   CtfCnmInitSyncReq* ctfcnmInitSyncReq
1118 *  @return   S16
1119 *      -# ROK
1120 **/
1121 #ifdef ANSI
1122 PUBLIC S16 cmPkCtfCnmInitSyncReq
1123 (
1124 Pst* pst,
1125 SpId spId,
1126 CtfCfgTransId *transId,
1127 CtfCnmInitSyncReq * cfgReqInfo
1128 )
1129 #else
1130 PUBLIC S16 cmPkCtfCnmInitSyncReq(pst, spId, transId, cfgReqInfo)
1131 Pst* pst;
1132 SpId spId;
1133 CtfCfgTransId *transId;
1134 CtfCnmInitSyncReq * cfgReqInfo;
1135 #endif
1136 {
1137    Buffer *mBuf = NULLP;
1138
1139    TRC3(cmPkCtfCnmInitSyncReq)
1140
1141    if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) {
1142 #if (ERRCLASS & ERRCLS_ADD_RES)
1143       /* ctf_c_001.main_3 Compilation warning fix with g++ */
1144       SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1145          (Txt*)&__FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1146          (ErrVal)ECTF016, (ErrVal)0, (Txt*)&"Packing failed");
1147 #endif
1148       SPutSBuf(pst->region, pst->pool, (Data *)cfgReqInfo, sizeof(CtfCnmInitSyncReq));
1149       return RFAILED;
1150    }
1151    if (pst->selector == ODU_SELECTOR_LC) {
1152       if (cmPkCtfcfgReqInfo(cfgReqInfo, mBuf) != ROK) {
1153 #if (ERRCLASS & ERRCLS_ADD_RES)
1154       /* ctf_c_001.main_3 Compilation warning fix with g++ */
1155          SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1156             (Txt*)&__FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1157             (ErrVal)ECTF017, (ErrVal)0, (Txt*)&"Packing failed");
1158 #endif
1159          SPutSBuf(pst->region, pst->pool, (Data *)cfgReqInfo, sizeof(CtfCnmInitSyncReq));
1160          SPutMsg(mBuf);
1161          return RFAILED;
1162       }
1163    }
1164    else if (pst->selector == ODU_SELECTOR_LWLC) {
1165
1166    if (oduPackPointer((PTR)cfgReqInfo, mBuf) != ROK) {
1167 #if (ERRCLASS & ERRCLS_ADD_RES)
1168       /* ctf_c_001.main_3 Compilation warning fix with g++ */
1169          SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1170             __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1171             (ErrVal)ECTF018, (ErrVal)0, "Packing failed");
1172 #endif
1173          SPutSBuf(pst->region, pst->pool, (Data *)cfgReqInfo, sizeof(CtfCnmInitSyncReq));
1174          SPutMsg(mBuf);
1175          return RFAILED;
1176       }
1177
1178    }
1179    if(cmPkCtfCfgTransId(transId, mBuf) != ROK) {
1180 #if (ERRCLASS & ERRCLS_ADD_RES)
1181       /* ctf_c_001.main_3 Compilation warning fix with g++ */
1182       SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1183          __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1184          (ErrVal)ECTF019, (ErrVal)0, "Packing failed");
1185 #endif
1186       SPutSBuf(pst->region, pst->pool, (Data *)cfgReqInfo, sizeof(CtfCnmInitSyncReq));
1187       SPutMsg(mBuf);
1188       return RFAILED;
1189    }
1190  if (SPkS16(spId, mBuf) != ROK) {
1191 #if (ERRCLASS & ERRCLS_ADD_RES)
1192       /* ctf_c_001.main_3 Compilation warning fix with g++ */
1193       SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1194          __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1195          (ErrVal)ECTF020, (ErrVal)0, "Packing failed");
1196 #endif
1197       SPutSBuf(pst->region, pst->pool, (Data *)cfgReqInfo, sizeof(CtfCnmInitSyncReq));
1198       SPutMsg(mBuf);
1199       return RFAILED;
1200    }
1201    if (pst->selector != ODU_SELECTOR_LWLC) {
1202       SPutSBuf(pst->region, pst->pool, (Data *)cfgReqInfo, sizeof(CtfCnmInitSyncReq));
1203    }
1204    pst->event = (Event)EVTCTFCNMINITSYNCREQ;
1205    return (SPstTsk(pst,mBuf));
1206
1207 }
1208 /*-----------------------------------------------------------------*/
1209
1210 /**
1211 * @brief Configuration Request from RRC to PHY for
1212  * cell or dedicated configuration.
1213 *
1214 * @details
1215 *
1216 *     Function: cmUnpkCtfCnmInitSyncReq
1217 *
1218 *  @param[in]   CtfCnmInitSyncReqMsg func
1219 *  @param[in]   Pst*  pst
1220 *  @param[in]   Buffer *mBuf
1221 *  @return   S16
1222 *      -# ROK
1223 **/
1224 #ifdef ANSI
1225 PUBLIC S16 cmUnpkCtfCnmInitSyncReq
1226 (
1227 CtfCnmInitSyncReqMsg func,
1228 Pst *pst,
1229 Buffer *mBuf
1230 )
1231 #else
1232 PUBLIC S16 cmUnpkCtfCnmInitSyncReq(func, pst, mBuf)
1233 CtfCnmInitSyncReqMsg func;
1234 Pst *pst;
1235 Buffer *mBuf;
1236 #endif
1237 {
1238
1239    SpId spId = 0;
1240    CtfCfgTransId transId;
1241    CtfCnmInitSyncReq *syncReqInfo = NULLP;
1242    TRC3(cmUnpkCtfCnmInitSyncReq)
1243
1244    if (SUnpkS16(&spId, mBuf) != ROK) {
1245       SPutMsg(mBuf);
1246 #if (ERRCLASS & ERRCLS_ADD_RES)
1247       /* ctf_c_001.main_3 Compilation warning fix with g++ */
1248       SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1249          (Txt*)&__FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1250          (ErrVal)ECTF022, (ErrVal)0, (Txt*)&"Packing failed");
1251 #endif
1252       return RFAILED;
1253    }
1254    if (cmUnpkCtfCfgTransId(&transId, mBuf) != ROK) {
1255       SPutMsg(mBuf);
1256 #if (ERRCLASS & ERRCLS_ADD_RES)
1257       /* ctf_c_001.main_3 Compilation warning fix with g++ */
1258       SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1259          (Txt*)&__FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1260          (ErrVal)ECTF023, (ErrVal)0, (Txt*)&"Packing failed");
1261 #endif
1262       return RFAILED;
1263    }
1264    if (pst->selector != ODU_SELECTOR_LWLC) {
1265       if ((SGetSBuf(pst->region, pst->pool, (Data **)&syncReqInfo, sizeof(CtfCnmInitSyncReq))) != ROK) {
1266 #if (ERRCLASS & ERRCLS_ADD_RES)
1267       /* ctf_c_001.main_3 Compilation warning fix with g++ */
1268          SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1269             (Txt*)&__FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1270             (ErrVal)ECTF024, (ErrVal)0, (Txt*)&"Packing failed");
1271 #endif
1272          SPutMsg(mBuf);
1273          return RFAILED;
1274       }
1275    }
1276    if (pst->selector == ODU_SELECTOR_LWLC) {
1277       if (oduUnpackPointer((PTR *)&syncReqInfo, mBuf) != ROK) {
1278          SPutMsg(mBuf);
1279          return RFAILED;
1280       }
1281    }
1282   else if (pst->selector == ODU_SELECTOR_LC)
1283       if (cmUnpkCtfsyncReqInfo(syncReqInfo, mBuf) != ROK) {
1284       SPutSBuf(pst->region, pst->pool, (Data *)syncReqInfo, sizeof(CtfCnmInitSyncReq));
1285       SPutMsg(mBuf);
1286 #if (ERRCLASS & ERRCLS_ADD_RES)
1287       /* ctf_c_001.main_3 Compilation warning fix with g++ */
1288       SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1289          (Txt*)&__FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1290          (ErrVal)ECTF025, (ErrVal)0, (Txt*)&"Packing failed");
1291 #endif
1292       return RFAILED;
1293    }
1294    SPutMsg(mBuf);
1295    return ((*func)(pst, spId, &transId, syncReqInfo));
1296 }
1297 /*-----------------------------------------------------------------------------*/
1298
1299 #ifdef ANSI
1300 PUBLIC S16 cmPkCtfctfCnmMibInfo
1301 (
1302 CtfCnmMibInfo *param,
1303 Buffer *mBuf
1304 )
1305 #else
1306 PUBLIC S16 cmPkCtfctfCnmMibInfo(param, mBuf)
1307 CtfCnmMibInfo *param;
1308 Buffer *mBuf;
1309 #endif
1310 {
1311    TRC3(cmPkCtfctfCnmMibInfo)
1312
1313    CMCHKPK(oduUnpackUInt16, param->sfn, mBuf);
1314    CMCHKPK(oduUnpackUInt8, param->numTxAntennas, mBuf);
1315    CMCHKPK(oduUnpackUInt8, param->phichDuration, mBuf);
1316    CMCHKPK(oduUnpackUInt8, param->phichResource, mBuf);
1317    CMCHKPK(oduUnpackUInt8, param->dlSystemBandWidht, mBuf);
1318    return ROK;
1319
1320 }
1321
1322 #ifdef ANSI
1323 PUBLIC S16 cmPkCtfctfCnmInitSyncInfo
1324 (
1325 CtfCnmInitSyncInfo *param,
1326 Buffer *mBuf
1327 )
1328 #else
1329 PUBLIC S16 cmPkCtfctfCnmInitSyncInfo(param, mBuf)
1330 CtfCnmInitSyncInfo *param;
1331 Buffer *mBuf;
1332 #endif
1333 {
1334    TRC3(cmPkCtfctfCnmInitSyncInfo)
1335
1336    CMCHKPK(oduUnpackUInt16, param->pci, mBuf);
1337    CMCHKPK(oduUnpackUInt8, param->rsrp, mBuf);
1338    CMCHKPK(oduUnpackUInt8, param->mibValidFlag, mBuf);
1339    CMCHKPK(oduUnpackUInt16, param->localSfn, mBuf);
1340    CMCHKPK(cmPkCtfctfCnmMibInfo, &param->ctfCnmMibInfo, mBuf);
1341    CMCHKPK(cmPkCtfCnmVendorSpecificInfo, &param->ctfCnmVendorSpecificInfo, mBuf);
1342    return ROK;
1343
1344 }
1345
1346 #ifdef ANSI
1347 PUBLIC S16 cmPkCtfcfgRspInfo
1348 (
1349 CtfCnmInitSyncRsp *param,
1350 Buffer *mBuf
1351 )
1352 #else
1353 PUBLIC S16 cmPkCtfcfgRspInfo(param, mBuf)
1354 CtfCnmInitSyncRsp *param;
1355 Buffer *mBuf;
1356 #endif
1357 {
1358    S32 i;
1359    TRC3(cmPkCtfcfgRspInfo)
1360
1361
1362    CMCHKPK(oduUnpackUInt8, param->status, mBuf);
1363    CMCHKPK(oduUnpackUInt16, param->earfcn, mBuf);
1364    if(param->numOfNeighbourInfo <= CTF_CNM_MAX_CELL_SEARCH)
1365    {
1366       for(i= param->numOfNeighbourInfo-1; i >= 0; i--)
1367       {
1368          CMCHKPK(cmPkCtfctfCnmInitSyncInfo, &param->ctfCnmInitSyncInfo[i], mBuf);
1369       }
1370    }
1371    CMCHKPK(oduUnpackUInt8, param->numOfNeighbourInfo, mBuf);
1372    return ROK;
1373
1374 }
1375
1376 /**
1377 * @brief Configuration Request from App to CL for
1378  * cnm Init Sync responce
1379 *
1380 * @details
1381 *
1382 *     Function: cmPkCtfCnmInitSyncRsp
1383 *
1384 *  @param[in]   Pst*  pst
1385 *  @param[in]   SpId  spId
1386 *  @param[in]   CtfCfgTransId  * transId
1387 *  @param[in]   CtfCnmInitSyncRsp* ctfcnmInitSyncRsp
1388 *  @return   S16
1389 *      -# ROK
1390 **/
1391 #ifdef ANSI
1392 PUBLIC S16 cmPkCtfCnmInitSyncRsp
1393 (
1394 Pst* pst,
1395 SpId spId,
1396 CtfCfgTransId *transId,
1397 CtfCnmInitSyncRsp * cfgRspInfo
1398 )
1399 #else
1400 PUBLIC S16 cmPkCtfCnmInitSyncRsp(pst, spId, transId, cfgRspInfo)
1401 Pst* pst;
1402 SpId spId;
1403 CtfCfgTransId *transId;
1404 CtfCnmInitSyncRsp * cfgRspInfo;
1405 #endif
1406 {
1407    Buffer *mBuf = NULLP;
1408    TRC3(cmPkCtfCnmInitSyncRsp)
1409
1410    if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) {
1411 #if (ERRCLASS & ERRCLS_ADD_RES)
1412       /* ctf_c_001.main_3 Compilation warning fix with g++ */
1413       SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1414          (Txt*)&__FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1415          (ErrVal)ECTF016, (ErrVal)0, (Txt*)&"Packing failed");
1416 #endif
1417       SPutSBuf(pst->region, pst->pool, (Data *)cfgRspInfo, sizeof(CtfCnmInitSyncRsp));
1418       return RFAILED;
1419    }
1420    if (pst->selector == ODU_SELECTOR_LC) {
1421       if (cmPkCtfcfgRspInfo(cfgRspInfo, mBuf) != ROK) {
1422 #if (ERRCLASS & ERRCLS_ADD_RES)
1423       /* ctf_c_001.main_3 Compilation warning fix with g++ */
1424          SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1425             (Txt*)&__FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1426             (ErrVal)ECTF017, (ErrVal)0, (Txt*)&"Packing failed");
1427 #endif
1428          SPutSBuf(pst->region, pst->pool, (Data *)cfgRspInfo, sizeof(CtfCnmInitSyncRsp));
1429          SPutMsg(mBuf);
1430          return RFAILED;
1431       }
1432    }
1433    else if (pst->selector == ODU_SELECTOR_LWLC) {
1434
1435    if (oduPackPointer((PTR)cfgRspInfo, mBuf) != ROK) {
1436 #if (ERRCLASS & ERRCLS_ADD_RES)
1437       /* ctf_c_001.main_3 Compilation warning fix with g++ */
1438          SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1439             __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1440             (ErrVal)ECTF018, (ErrVal)0, "Packing failed");
1441 #endif
1442          SPutSBuf(pst->region, pst->pool, (Data *)cfgRspInfo, sizeof(CtfCnmInitSyncRsp));
1443          SPutMsg(mBuf);
1444          return RFAILED;
1445       }
1446
1447    }
1448  if(cmPkCtfCfgTransId(transId, mBuf) != ROK) {
1449 #if (ERRCLASS & ERRCLS_ADD_RES)
1450       /* ctf_c_001.main_3 Compilation warning fix with g++ */
1451       SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1452          __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1453          (ErrVal)ECTF019, (ErrVal)0, "Packing failed");
1454 #endif
1455       SPutSBuf(pst->region, pst->pool, (Data *)cfgRspInfo, sizeof(CtfCnmInitSyncRsp));
1456       SPutMsg(mBuf);
1457       return RFAILED;
1458    }
1459  if (SPkS16(spId, mBuf) != ROK) {
1460 #if (ERRCLASS & ERRCLS_ADD_RES)
1461       /* ctf_c_001.main_3 Compilation warning fix with g++ */
1462       SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1463          __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1464          (ErrVal)ECTF020, (ErrVal)0, "Packing failed");
1465 #endif
1466       SPutSBuf(pst->region, pst->pool, (Data *)cfgRspInfo, sizeof(CtfCnmInitSyncRsp));
1467       SPutMsg(mBuf);
1468       return RFAILED;
1469    }
1470    if (pst->selector != ODU_SELECTOR_LWLC) {
1471       SPutSBuf(pst->region, pst->pool, (Data *)cfgRspInfo, sizeof(CtfCnmInitSyncRsp));
1472    }
1473    pst->event = (Event)EVTCTFCNMINITSYNCRSP;
1474    return (SPstTsk(pst,mBuf));
1475
1476 }
1477 /*-----------------------------------------------------------------------------*/
1478
1479 #ifdef ANSI
1480 PUBLIC S16 cmUnpkCtfctfCnmMibInfo
1481 (
1482 CtfCnmMibInfo *param,
1483 Buffer *mBuf
1484 )
1485 #else
1486 PUBLIC S16 cmUnpkCtfctfCnmMibInfo(param, mBuf)
1487 CtfCnmMibInfo *param;
1488 Buffer *mBuf;
1489 #endif
1490 {
1491    TRC3(cmUnpkCtfctfCnmMibInfo);
1492
1493
1494    CMCHKUNPK(oduPackUInt8, &param->dlSystemBandWidht, mBuf);
1495    CMCHKUNPK(oduPackUInt8, &param->phichResource, mBuf);
1496    CMCHKUNPK(oduPackUInt8, &param->phichDuration, mBuf);
1497    CMCHKUNPK(oduPackUInt8, &param->numTxAntennas, mBuf);
1498    CMCHKUNPK(oduPackUInt16, &param->sfn, mBuf);
1499    return ROK;
1500
1501 }
1502
1503 #ifdef ANSI
1504 PUBLIC S16 cmUnpkctfCnmInitSyncInfo
1505 (
1506 CtfCnmInitSyncInfo *param,
1507 Buffer *mBuf
1508 )
1509 #else
1510 PUBLIC S16 cmUnpkctfCnmInitSyncInfo(param, mBuf)
1511 CtfCnmInitSyncInfo *param;
1512 Buffer *mBuf;
1513 #endif
1514 {
1515    TRC3(cmUnpkctfCnmInitSyncInfo);
1516
1517    CMCHKUNPK(cmUnpkCtfCnmVendorSpecificInfo, &param->ctfCnmVendorSpecificInfo, mBuf);
1518    CMCHKUNPK(cmUnpkCtfctfCnmMibInfo, &param->ctfCnmMibInfo, mBuf);
1519    CMCHKUNPK(oduPackUInt16, &param->localSfn, mBuf);
1520    CMCHKUNPK(oduPackUInt8, &param->mibValidFlag, mBuf);
1521    CMCHKUNPK(oduPackUInt8, &param->rsrp, mBuf);
1522    CMCHKUNPK(oduPackUInt16, &param->pci, mBuf);
1523    return ROK;
1524
1525 }
1526
1527 #ifdef ANSI
1528 PUBLIC S16 cmUnpkCtfCnmInitSyncRspMsg
1529 (
1530 CtfCnmInitSyncRsp *param,
1531 Buffer *mBuf
1532 )
1533 #else
1534 PUBLIC S16 cmUnpkCtfCnmInitSyncRspMsg(param, mBuf)
1535 CtfCnmInitSyncRsp *param;
1536 Buffer *mBuf;
1537 #endif
1538 {
1539     S32 i;
1540     TRC3(cmUnpkCtfCnmInitSyncRspMsg);
1541
1542
1543     CMCHKUNPK(oduPackUInt8, &param->numOfNeighbourInfo, mBuf);
1544     for(i=0; (i < param->numOfNeighbourInfo)&&(i < CTF_CNM_MAX_CELL_SEARCH); i++)
1545     {
1546          CMCHKUNPK(cmUnpkctfCnmInitSyncInfo, &param->ctfCnmInitSyncInfo[i], mBuf);
1547     }
1548     CMCHKUNPK(oduPackUInt16, &param->earfcn, mBuf);
1549     CMCHKUNPK(oduPackUInt8, &param->status, mBuf);
1550     return ROK;
1551
1552 }
1553 /**
1554 * @brief Configuration Request from RRC to PHY for
1555  * cell or dedicated configuration.
1556 *
1557 * @details
1558 *
1559 *     Function: cmUnpkCtfCnmInitSyncRsp
1560 *
1561 *  @param[in]   CtfCnmInitSyncRspMsg func
1562 *  @param[in]   Pst*  pst
1563 *  @param[in]   Buffer *mBuf
1564 *  @return   S16
1565 *      -# ROK
1566 **/
1567 #ifdef ANSI
1568 PUBLIC S16 cmUnpkCtfCnmInitSyncRsp
1569 (
1570 CtfCnmInitSyncRspMsg func,
1571 Pst *pst,
1572 Buffer *mBuf
1573 )
1574 #else
1575 PUBLIC S16 cmUnpkCtfCnmInitSyncRsp(func, pst, mBuf)
1576 CtfCnmInitSyncRspMsg func;
1577 Pst *pst;
1578 Buffer *mBuf;
1579 #endif
1580 {
1581
1582    SpId spId = 0;
1583    CtfCfgTransId transId;
1584    CtfCnmInitSyncRsp *syncRspInfo = NULLP;
1585    TRC3(cmUnpkCtfCnmInitSyncRsp)
1586
1587    if (SUnpkS16(&spId, mBuf) != ROK) {
1588       SPutMsg(mBuf);
1589 #if (ERRCLASS & ERRCLS_ADD_RES)
1590       /* ctf_c_001.main_3 Compilation warning fix with g++ */
1591       SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1592          (Txt*)&__FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1593          (ErrVal)ECTF022, (ErrVal)0, (Txt*)&"Packing failed");
1594 #endif
1595       return RFAILED;
1596    }
1597    if (cmUnpkCtfCfgTransId(&transId, mBuf) != ROK) {
1598       SPutMsg(mBuf);
1599 #if (ERRCLASS & ERRCLS_ADD_RES)
1600       /* ctf_c_001.main_3 Compilation warning fix with g++ */
1601       SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1602          (Txt*)&__FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1603          (ErrVal)ECTF023, (ErrVal)0, (Txt*)&"Packing failed");
1604 #endif
1605       return RFAILED;
1606    }
1607    if (pst->selector != ODU_SELECTOR_LWLC) {
1608       if((SGetSBuf(pst->region, pst->pool, (Data **)&syncRspInfo, sizeof(CtfCnmInitSyncRsp))) != ROK) {
1609 #if (ERRCLASS & ERRCLS_ADD_RES)
1610       /* ctf_c_001.main_3 Compilation warning fix with g++ */
1611          SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1612             (Txt*)&__FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1613             (ErrVal)ECTF024, (ErrVal)0, (Txt*)&"Packing failed");
1614 #endif
1615          SPutMsg(mBuf);
1616          return RFAILED;
1617       }
1618    }
1619    if (pst->selector == ODU_SELECTOR_LWLC) {
1620       if(oduUnpackPointer((PTR *)&syncRspInfo, mBuf) != ROK) {
1621          SPutMsg(mBuf);
1622          return RFAILED;
1623       }
1624    }
1625   else if (pst->selector == ODU_SELECTOR_LC)
1626       if(cmUnpkCtfCnmInitSyncRspMsg(syncRspInfo, mBuf) != ROK) {
1627       SPutSBuf(pst->region, pst->pool, (Data *)syncRspInfo, sizeof(CtfCnmInitSyncRsp));
1628       SPutMsg(mBuf);
1629 #if (ERRCLASS & ERRCLS_ADD_RES)
1630       /* ctf_c_001.main_3 Compilation warning fix with g++ */
1631       SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1632          (Txt*)&__FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1633          (ErrVal)ECTF025, (ErrVal)0, (Txt*)&"Packing failed");
1634 #endif
1635       return RFAILED;
1636    }
1637    SPutMsg(mBuf);
1638    return ((*func)(pst, spId, &transId, syncRspInfo));
1639
1640 }
1641 /*-----------------------------------------------------------------------*/
1642
1643 #ifdef ANSI
1644 PUBLIC S16 cmPkCtfCellSyncRsp 
1645 (
1646 CtfCnmCellSyncRsp *param,
1647 Buffer *mBuf
1648 )
1649 #else
1650 PUBLIC S16 cmPkCtfCellSyncRsp(param, mBuf)
1651 CtfCnmCellSyncRsp *param;
1652 Buffer *mBuf;
1653 #endif
1654 {
1655
1656    TRC3(cmPkCtfCellSyncRsp)
1657
1658    CMCHKPK(oduUnpackUInt8, param->status, mBuf);
1659    return ROK;
1660
1661 }
1662 /**
1663 * @brief Configuration Request from App to CL for
1664 * cnm Init Sync responce.
1665 *
1666 * @details
1667 *
1668 *     Function: cmPkCtfCnmCellSyncRsp
1669 *
1670 *  @param[in]   Pst*  pst
1671 *  @param[in]   SpId  spId
1672 *  @param[in]   CtfCfgTransId  * transId
1673 *  @param[in]   CtfCnmCellSyncRsp* ctfcnmCellSyncRsp
1674 *  @return   S16
1675 *      -# ROK
1676 **/
1677 #ifdef ANSI
1678 PUBLIC S16 cmPkCtfCnmCellSyncRsp
1679 (
1680 Pst* pst,
1681 SpId spId,
1682 CtfCfgTransId *transId,
1683 CtfCnmCellSyncRsp * cfgRspInfo
1684 )
1685 #else
1686 PUBLIC S16 cmPkCtfCnmCellSyncRsp(pst, spId, transId, cfgRspInfo)
1687 Pst* pst;
1688 SpId spId;
1689 CtfCfgTransId *transId;
1690 CtfCnmCellSyncRsp * cfgRspInfo;
1691 #endif
1692 {
1693
1694    Buffer *mBuf = NULLP;
1695    TRC3(cmPkCtfCnmCellSyncRsp)
1696
1697    if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) {
1698 #if (ERRCLASS & ERRCLS_ADD_RES)
1699       /* ctf_c_001.main_3 Compilation warning fix with g++ */
1700       SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1701          (Txt*)&__FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1702          (ErrVal)ECTF016, (ErrVal)0, (Txt*)&"Packing failed");
1703 #endif
1704       SPutSBuf(pst->region, pst->pool, (Data *)cfgRspInfo, sizeof(CtfCnmCellSyncRsp));
1705       return RFAILED;
1706    }
1707    if (pst->selector == ODU_SELECTOR_LC) {
1708       if (cmPkCtfCellSyncRsp(cfgRspInfo, mBuf) != ROK) {
1709 #if (ERRCLASS & ERRCLS_ADD_RES)
1710       /* ctf_c_001.main_3 Compilation warning fix with g++ */
1711          SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1712             (Txt*)&__FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1713             (ErrVal)ECTF017, (ErrVal)0, (Txt*)&"Packing failed");
1714 #endif
1715          SPutSBuf(pst->region, pst->pool, (Data *)cfgRspInfo, sizeof(CtfCnmCellSyncRsp));
1716          SPutMsg(mBuf);
1717          return RFAILED;
1718       }
1719    }
1720    else if (pst->selector == ODU_SELECTOR_LWLC) {
1721
1722    if (oduPackPointer((PTR)cfgRspInfo, mBuf) != ROK) {
1723 #if (ERRCLASS & ERRCLS_ADD_RES)
1724       /* ctf_c_001.main_3 Compilation warning fix with g++ */
1725          SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1726             __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1727             (ErrVal)ECTF018, (ErrVal)0, "Packing failed");
1728 #endif
1729          SPutSBuf(pst->region, pst->pool, (Data *)cfgRspInfo, sizeof(CtfCnmCellSyncRsp));
1730          SPutMsg(mBuf);
1731          return RFAILED;
1732       }
1733
1734    }
1735  if(cmPkCtfCfgTransId(transId, mBuf) != ROK) {
1736 #if (ERRCLASS & ERRCLS_ADD_RES)
1737       /* ctf_c_001.main_3 Compilation warning fix with g++ */
1738       SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1739          __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1740          (ErrVal)ECTF019, (ErrVal)0, "Packing failed");
1741 #endif
1742       SPutSBuf(pst->region, pst->pool, (Data *)cfgRspInfo, sizeof(CtfCnmCellSyncRsp));
1743       SPutMsg(mBuf);
1744       return RFAILED;
1745    }
1746  if (SPkS16(spId, mBuf) != ROK) {
1747 #if (ERRCLASS & ERRCLS_ADD_RES)
1748       /* ctf_c_001.main_3 Compilation warning fix with g++ */
1749       SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1750          __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1751          (ErrVal)ECTF020, (ErrVal)0, "Packing failed");
1752 #endif
1753       SPutSBuf(pst->region, pst->pool, (Data *)cfgRspInfo, sizeof(CtfCnmCellSyncRsp));
1754       SPutMsg(mBuf);
1755       return RFAILED;
1756    }
1757    if (pst->selector != ODU_SELECTOR_LWLC) {
1758       SPutSBuf(pst->region, pst->pool, (Data *)cfgRspInfo, sizeof(CtfCnmCellSyncRsp));
1759    }
1760    pst->event = (Event)EVTCTFCNMSYNCRSP;
1761    return (SPstTsk(pst,mBuf));
1762
1763
1764 }
1765 /*------------------------------------------------------------*/
1766
1767 #ifdef ANSI
1768 PUBLIC S16 cmUnpkCtfCnmSyncRspMsg
1769 (
1770 CtfCnmCellSyncRsp *param,
1771 Buffer *mBuf
1772 )
1773 #else
1774 PUBLIC S16 cmUnpkCtfCnmSyncRspMsg(param, mBuf)
1775 CtfCnmCellSyncRsp *param;
1776 Buffer *mBuf;
1777 #endif
1778 {
1779
1780    TRC3(cmUnpkCtfCnmSyncRspMsg);
1781
1782    CMCHKUNPK(oduPackUInt8, &param->status, mBuf);
1783    return ROK;
1784
1785 }
1786 /**
1787 * @brief Configuration Request from RRC to PHY for
1788  * cell or dedicated configuration.
1789 *
1790 * @details
1791 *
1792 *     Function: cmUnpkCtfCnmCellSyncRsp
1793 *
1794 *  @param[in]   CtfCnmCellSyncRspMsg func
1795 *  @param[in]   Pst*  pst
1796 *  @param[in]   Buffer *mBuf
1797 *  @return   S16
1798 *      -# ROK
1799 **/
1800 #ifdef ANSI
1801 PUBLIC S16 cmUnpkCtfCnmCellSyncRsp
1802 (
1803 CtfCnmCellSyncRspMsg func,
1804 Pst *pst,
1805 Buffer *mBuf
1806 )
1807 #else
1808 PUBLIC S16 cmUnpkCtfCnmCellSyncRsp(func, pst, mBuf)
1809 CtfCnmCellSyncRspMsg func;
1810 Pst *pst;
1811 Buffer *mBuf;
1812 #endif
1813 {
1814
1815    SpId spId = 0;
1816    CtfCfgTransId transId;
1817    CtfCnmCellSyncRsp *syncRspMsg = NULLP;
1818    TRC3(cmUnpkCtfCnmCellSyncRsp)
1819
1820    if (SUnpkS16(&spId, mBuf) != ROK) {
1821       SPutMsg(mBuf);
1822 #if (ERRCLASS & ERRCLS_ADD_RES)
1823       /* ctf_c_001.main_3 Compilation warning fix with g++ */
1824       SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1825          (Txt*)&__FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1826          (ErrVal)ECTF022, (ErrVal)0, (Txt*)&"Packing failed");
1827 #endif
1828       return RFAILED;
1829    }
1830    if (cmUnpkCtfCfgTransId(&transId, mBuf) != ROK) {
1831       SPutMsg(mBuf);
1832 #if (ERRCLASS & ERRCLS_ADD_RES)
1833       /* ctf_c_001.main_3 Compilation warning fix with g++ */
1834       SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1835          (Txt*)&__FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1836          (ErrVal)ECTF023, (ErrVal)0, (Txt*)&"Packing failed");
1837 #endif
1838       return RFAILED;
1839    }
1840    if (pst->selector != ODU_SELECTOR_LWLC) {
1841       if ((SGetSBuf(pst->region, pst->pool, (Data **)&syncRspMsg, sizeof(CtfCnmCellSyncRsp))) != ROK) {
1842 #if (ERRCLASS & ERRCLS_ADD_RES)
1843       /* ctf_c_001.main_3 Compilation warning fix with g++ */
1844          SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1845             (Txt*)&__FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1846             (ErrVal)ECTF024, (ErrVal)0, (Txt*)&"Packing failed");
1847 #endif
1848          SPutMsg(mBuf);
1849          return RFAILED;
1850       }
1851    }
1852    if (pst->selector == ODU_SELECTOR_LWLC) {
1853       if (oduUnpackPointer((PTR *)&syncRspMsg, mBuf) != ROK) {
1854          SPutMsg(mBuf);
1855          return RFAILED;
1856       }
1857    }
1858   else if (pst->selector == ODU_SELECTOR_LC)
1859       if (cmUnpkCtfCnmSyncRspMsg(syncRspMsg, mBuf) != ROK) {
1860       SPutSBuf(pst->region, pst->pool, (Data *)syncRspMsg, sizeof(CtfCnmCellSyncRsp));
1861       SPutMsg(mBuf);
1862 #if (ERRCLASS & ERRCLS_ADD_RES)
1863       /* ctf_c_001.main_3 Compilation warning fix with g++ */
1864       SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1865          (Txt*)&__FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1866          (ErrVal)ECTF025, (ErrVal)0, (Txt*)&"Packing failed");
1867 #endif
1868       return RFAILED;
1869    }
1870    SPutMsg(mBuf);
1871    return ((*func)(pst, spId, &transId, syncRspMsg));
1872
1873 }
1874 /*---------------------------------------------------------------*/
1875
1876 #ifdef ANSI
1877 PUBLIC S16 cmPkCtfcfgIndInfo
1878 (
1879 CtfCnmCellSyncInd *param,
1880 Buffer *mBuf
1881 )
1882 #else
1883 PUBLIC S16 cmPkCtfcfgIndInfo(param, mBuf)
1884 CtfCnmCellSyncInd *param;
1885 Buffer *mBuf;
1886 #endif
1887 {
1888
1889    TRC3(cmPkCtfcfgIndInfo);
1890
1891    CMCHKPK(oduUnpackUInt8, param->status, mBuf);
1892    CMCHKPK(cmPkCtfCnmVendorSpecificInfo, &param->ctfCnmVendorSpecificInfo, mBuf);
1893    return ROK;
1894
1895 }
1896 /**
1897 * @brief Configuration Request from App to CL for
1898 * cnm Init Sync responce.
1899 *
1900 * @details
1901 *
1902 *     Function: cmPkCtfCnmCellSyncInd
1903 *
1904 *  @param[in]   Pst*  pst
1905 *  @param[in]   SpId  spId
1906 *  @param[in]   CtfCfgTransId  * transId
1907 *  @param[in]   CtfCnmCellSyncInd* ctfcnmCellSyncInd
1908 *  @return   S16
1909 *      -# ROK
1910 **/
1911 #ifdef ANSI
1912 PUBLIC S16 cmPkCtfCnmCellSyncInd
1913 (
1914 Pst* pst,
1915 SpId spId,
1916 CtfCfgTransId *transId,
1917 CtfCnmCellSyncInd * cfgIndInfo
1918 )
1919 #else
1920 PUBLIC S16 cmPkCtfCnmCellSyncInd(pst, spId, transId, cfgIndInfo)
1921 Pst* pst;
1922 SpId spId;
1923 CtfCfgTransId *transId;
1924 CtfCnmCellSyncInd * cfgIndInfo;
1925 #endif
1926 {
1927    
1928    Buffer *mBuf = NULLP;
1929    TRC3(cmPkCtfCnmCellSyncInd)
1930
1931    if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) {
1932 #if (ERRCLASS & ERRCLS_ADD_RES)
1933       /* ctf_c_001.main_3 Compilation warning fix with g++ */
1934       SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1935          (Txt*)&__FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1936          (ErrVal)ECTF016, (ErrVal)0, (Txt*)&"Packing failed");
1937 #endif
1938       SPutSBuf(pst->region, pst->pool, (Data *)cfgIndInfo, sizeof(CtfCnmCellSyncInd));
1939       return RFAILED;
1940    }
1941    if (pst->selector == ODU_SELECTOR_LC) {
1942       if (cmPkCtfcfgIndInfo(cfgIndInfo, mBuf) != ROK) {
1943 #if (ERRCLASS & ERRCLS_ADD_RES)
1944       /* ctf_c_001.main_3 Compilation warning fix with g++ */
1945          SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1946             (Txt*)&__FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1947             (ErrVal)ECTF017, (ErrVal)0, (Txt*)&"Packing failed");
1948 #endif
1949          SPutSBuf(pst->region, pst->pool, (Data *)cfgIndInfo, sizeof(CtfCnmCellSyncInd));
1950          SPutMsg(mBuf);
1951          return RFAILED;
1952       }
1953    }
1954    else if (pst->selector == ODU_SELECTOR_LWLC) {
1955
1956    if (oduPackPointer((PTR)cfgIndInfo, mBuf) != ROK) {
1957 #if (ERRCLASS & ERRCLS_ADD_RES)
1958       /* ctf_c_001.main_3 Compilation warning fix with g++ */
1959          SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1960             __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1961             (ErrVal)ECTF018, (ErrVal)0, "Packing failed");
1962 #endif
1963          SPutSBuf(pst->region, pst->pool, (Data *)cfgIndInfo, sizeof(CtfCnmCellSyncInd));
1964          SPutMsg(mBuf);
1965          return RFAILED;
1966       }
1967
1968    }
1969  if(cmPkCtfCfgTransId(transId, mBuf) != ROK) {
1970 #if (ERRCLASS & ERRCLS_ADD_RES)
1971       /* ctf_c_001.main_3 Compilation warning fix with g++ */
1972       SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1973          __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1974          (ErrVal)ECTF019, (ErrVal)0, "Packing failed");
1975 #endif
1976       SPutSBuf(pst->region, pst->pool, (Data *)cfgIndInfo, sizeof(CtfCnmCellSyncInd));
1977       SPutMsg(mBuf);
1978       return RFAILED;
1979    }
1980  if (SPkS16(spId, mBuf) != ROK) {
1981 #if (ERRCLASS & ERRCLS_ADD_RES)
1982       /* ctf_c_001.main_3 Compilation warning fix with g++ */
1983       SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1984          __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1985          (ErrVal)ECTF020, (ErrVal)0, "Packing failed");
1986 #endif
1987       SPutSBuf(pst->region, pst->pool, (Data *)cfgIndInfo, sizeof(CtfCnmCellSyncInd));
1988       SPutMsg(mBuf);
1989       return RFAILED;
1990    }
1991    if (pst->selector != ODU_SELECTOR_LWLC) {
1992       SPutSBuf(pst->region, pst->pool, (Data *)cfgIndInfo, sizeof(CtfCnmCellSyncInd));
1993    }
1994    pst->event = (Event)EVTCTFCNMSYNCIND;
1995    return (SPstTsk(pst,mBuf));
1996
1997 }
1998
1999 /*---------------------------------------------------------------*/
2000
2001 #ifdef ANSI
2002 PUBLIC S16 cmUnpkCtfCnmSyncIndMsg
2003 (
2004 CtfCnmCellSyncInd *param,
2005 Buffer *mBuf
2006 )
2007 #else
2008 PUBLIC S16 cmUnpkCtfCnmSyncIndMsg(param, mBuf)
2009 CtfCnmCellSyncInd *param;
2010 Buffer *mBuf;
2011 #endif
2012 {
2013
2014    TRC3(cmUnpkCtfCnmSyncIndMsg);
2015
2016    CMCHKUNPK(cmUnpkCtfCnmVendorSpecificInfo, &param->ctfCnmVendorSpecificInfo, mBuf);
2017    CMCHKUNPK(oduPackUInt8, &param->status, mBuf);
2018    return ROK;
2019
2020 }
2021 /**
2022 * @brief Configuration Request from RRC to PHY for
2023  * cell or dedicated configuration.
2024 *
2025 * @details
2026 *
2027 *     Function: cmUnpkCtfCnmCellSyncInd
2028 *
2029 *  @param[in]   CtfCnmCellSyncIndMsg func
2030 *  @param[in]   Pst*  pst
2031 *  @param[in]   Buffer *mBuf
2032 *  @return   S16
2033 *      -# ROK
2034 **/
2035 #ifdef ANSI
2036 PUBLIC S16 cmUnpkCtfCnmCellSyncInd
2037 (
2038 CtfCnmCellSyncIndMsg func,
2039 Pst *pst,
2040 Buffer *mBuf
2041 )
2042 #else
2043 PUBLIC S16 cmUnpkCtfCnmCellSyncInd(func, pst, mBuf)
2044 CtfCnmCellSyncIndMsg func;
2045 Pst *pst;
2046 Buffer *mBuf;
2047 #endif
2048 {
2049
2050    SpId spId = 0;
2051    CtfCfgTransId transId;
2052    CtfCnmCellSyncInd *syncIndMsg = NULLP;
2053    TRC3(cmUnpkCtfCnmInitSyncRsp)
2054
2055    if (SUnpkS16(&spId, mBuf) != ROK) {
2056       SPutMsg(mBuf);
2057 #if (ERRCLASS & ERRCLS_ADD_RES)
2058       /* ctf_c_001.main_3 Compilation warning fix with g++ */
2059       SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
2060          (Txt*)&__FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
2061          (ErrVal)ECTF022, (ErrVal)0, (Txt*)&"Packing failed");
2062 #endif
2063       return RFAILED;
2064    }
2065    if (cmUnpkCtfCfgTransId(&transId, mBuf) != ROK) {
2066       SPutMsg(mBuf);
2067 #if (ERRCLASS & ERRCLS_ADD_RES)
2068       /* ctf_c_001.main_3 Compilation warning fix with g++ */
2069       SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
2070          (Txt*)&__FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
2071          (ErrVal)ECTF023, (ErrVal)0, (Txt*)&"Packing failed");
2072 #endif
2073       return RFAILED;
2074    }
2075    if (pst->selector != ODU_SELECTOR_LWLC) {
2076       if ((SGetSBuf(pst->region, pst->pool, (Data **)&syncIndMsg, sizeof(CtfCnmCellSyncInd))) != ROK) {
2077 #if (ERRCLASS & ERRCLS_ADD_RES)
2078       /* ctf_c_001.main_3 Compilation warning fix with g++ */
2079          SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
2080             (Txt*)&__FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
2081             (ErrVal)ECTF024, (ErrVal)0, (Txt*)&"Packing failed");
2082 #endif
2083          SPutMsg(mBuf);
2084          return RFAILED;
2085       }
2086    }
2087    if (pst->selector == ODU_SELECTOR_LWLC) {
2088       if (oduUnpackPointer((PTR *)&syncIndMsg, mBuf) != ROK) {
2089          SPutMsg(mBuf);
2090          return RFAILED;
2091       }
2092    }
2093   else if (pst->selector == ODU_SELECTOR_LC)
2094       if (cmUnpkCtfCnmSyncIndMsg(syncIndMsg, mBuf) != ROK) {
2095       SPutSBuf(pst->region, pst->pool, (Data *)syncIndMsg, sizeof(CtfCnmCellSyncInd));
2096       SPutMsg(mBuf);
2097 #if (ERRCLASS & ERRCLS_ADD_RES)
2098       /* ctf_c_001.main_3 Compilation warning fix with g++ */
2099       SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
2100          (Txt*)&__FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
2101          (ErrVal)ECTF025, (ErrVal)0, (Txt*)&"Packing failed");
2102 #endif
2103       return RFAILED;
2104    }
2105    SPutMsg(mBuf);
2106    return ((*func)(pst, spId, &transId, syncIndMsg));
2107
2108 }
2109
2110 /********************************************************************************************************************************/
2111                               /*END OF CNM PACK & UNPACK FUNCTIONS*/
2112 /********************************************************************************************************************************/
2113
2114
2115
2116 \f
2117 /**
2118 * @brief Configuration Request from RRC to PHY for 
2119  * cell or dedicated configuration.
2120 *
2121 * @details
2122 *
2123 *     Function: cmPkCtfCfgReq
2124 *
2125 *  @param[in]   Pst*  pst
2126 *  @param[in]   SpId  spId
2127 *  @param[in]   CtfCfgTransId  transId
2128 *  @param[in]   CtfCfgReqInfo*  cfgReqInfo
2129 *  @return   S16
2130 *      -# ROK
2131 **/
2132 #ifdef ANSI
2133 PUBLIC S16 cmPkCtfCfgReq
2134 (
2135 Pst* pst,
2136 SpId spId,
2137 CtfCfgTransId transId,
2138 CtfCfgReqInfo* cfgReqInfo
2139 )
2140 #else
2141 PUBLIC S16 cmPkCtfCfgReq(pst, spId, transId, cfgReqInfo)
2142 Pst* pst;
2143 SpId spId;
2144 CtfCfgTransId transId;
2145 CtfCfgReqInfo* cfgReqInfo;
2146 #endif
2147 {
2148    Buffer *mBuf = NULLP;
2149    TRC3(cmPkCtfCfgReq)
2150
2151    if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) {
2152 #if (ERRCLASS & ERRCLS_ADD_RES)
2153       /* ctf_c_001.main_3 Compilation warning fix with g++ */
2154       SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
2155          __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
2156          (ErrVal)ECTF016, (ErrVal)0, "Packing failed");
2157 #endif
2158       cmRelCtfCfgReq(pst, cfgReqInfo);     
2159       return RFAILED;
2160    }
2161    if (pst->selector == ODU_SELECTOR_LC) {
2162       if (cmPkCtfCfgReqInfo(cfgReqInfo, mBuf) != ROK) {
2163 #if (ERRCLASS & ERRCLS_ADD_RES)
2164       /* ctf_c_001.main_3 Compilation warning fix with g++ */
2165          SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
2166             __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
2167             (ErrVal)ECTF017, (ErrVal)0, "Packing failed");
2168 #endif
2169          cmRelCtfCfgReq(pst, cfgReqInfo);     
2170          SPutMsg(mBuf);
2171          return RFAILED;
2172       }
2173    }
2174    else if (pst->selector == ODU_SELECTOR_LWLC) {
2175       if (oduPackPointer((PTR)cfgReqInfo, mBuf) != ROK) {
2176 #if (ERRCLASS & ERRCLS_ADD_RES)
2177       /* ctf_c_001.main_3 Compilation warning fix with g++ */
2178          SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
2179             __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
2180             (ErrVal)ECTF018, (ErrVal)0, "Packing failed");
2181 #endif
2182          cmRelCtfCfgReq(pst, cfgReqInfo);     
2183          SPutMsg(mBuf);
2184          return RFAILED;
2185       }
2186    }
2187    if (cmPkCtfCfgTransId(&transId, mBuf) != ROK) {
2188 #if (ERRCLASS & ERRCLS_ADD_RES)
2189       /* ctf_c_001.main_3 Compilation warning fix with g++ */
2190       SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
2191          __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
2192          (ErrVal)ECTF019, (ErrVal)0, "Packing failed");
2193 #endif
2194       cmRelCtfCfgReq(pst, cfgReqInfo);     
2195       SPutMsg(mBuf);
2196       return RFAILED;
2197    }
2198    if (SPkS16(spId, mBuf) != ROK) {
2199 #if (ERRCLASS & ERRCLS_ADD_RES)
2200       /* ctf_c_001.main_3 Compilation warning fix with g++ */
2201       SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
2202          __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
2203          (ErrVal)ECTF020, (ErrVal)0, "Packing failed");
2204 #endif
2205       cmRelCtfCfgReq(pst, cfgReqInfo);     
2206       SPutMsg(mBuf);
2207       return RFAILED;
2208    }
2209    if (pst->selector != ODU_SELECTOR_LWLC) {
2210          cmRelCtfCfgReq(pst, cfgReqInfo); 
2211    }
2212    pst->event = (Event) EVTCTFCFGREQ;
2213    return (SPstTsk(pst,mBuf));
2214 }
2215
2216 #ifdef TENB_AS_SECURITY
2217 /***********************************************************
2218 *
2219 *     Func: cmPkCtfKenbCfgInfo
2220 *
2221 *
2222 *     Desc:   Key derivation funtion Input Information
2223  * @details This funtion packs the the CtfKenbCfgInfo structure
2224  *           which contains the eNodeB key and Algorithm Type for
2225  *           deriving AS security keys.
2226  *
2227  *
2228  *     Ret : S16
2229  *
2230  *     Notes:
2231  *
2232  *     File:
2233  *
2234  **********************************************************/
2235 #ifdef ANSI
2236 PUBLIC S16 cmUnpkCtfNhKeyInfo
2237 (
2238 CtfNhKeyInfo *param,
2239 Buffer *mBuf
2240 )
2241 #else
2242 PUBLIC S16 cmUnpkCtfNhKeyInfo(param, mBuf)
2243 CtfNhKeyInfo *param;
2244 Buffer *mBuf;
2245 #endif
2246 {
2247
2248    U8  idx;
2249
2250    TRC3(cmUnpkCtfNhKeyInfo)
2251          
2252    CMCHKUNPK(oduPackUInt16, &param->dlCarrFreq, mBuf);
2253    CMCHKUNPK(oduPackUInt16, &param->physCellId, mBuf);
2254    for(idx=0;idx<32;idx++)
2255    {
2256       CMCHKUNPK(oduPackUInt8,&param->secKey[idx],mBuf);
2257    }
2258    return ROK;
2259 }
2260
2261 /***********************************************************
2262 *
2263 *     Func: cmPkCtfKenbCfgInfo
2264 *
2265 *
2266 *     Desc:   Key derivation funtion Input Information
2267  * @details This funtion packs the the CtfKenbCfgInfo structure
2268  *           which contains the eNodeB key and Algorithm Type for
2269  *           deriving AS security keys.
2270  *
2271  *
2272  *     Ret : S16
2273  *
2274  *     Notes:
2275  *
2276  *     File:
2277  *
2278  **********************************************************/
2279 #ifdef ANSI
2280 PUBLIC S16 cmUnpkCtfKenbStarInfo
2281 (
2282 CtfKenbStarInfo *param,
2283 Buffer *mBuf
2284 )
2285 #else
2286 PUBLIC S16 cmUnpkCtfKenbStarInfo(param, mBuf)
2287 CtfKenbStarInfo *param;
2288 Buffer *mBuf;
2289 #endif
2290 {
2291
2292    U8  idx;
2293
2294    TRC3(cmUnpkCtfKenbStarInfo)
2295          
2296    CMCHKUNPK(oduPackUInt16, &param->dlCarrFreq, mBuf);
2297    CMCHKUNPK(oduPackUInt16, &param->physCellId, mBuf);
2298    for(idx=0;idx<32;idx++)
2299    {
2300       CMCHKUNPK(oduPackUInt8,&param->secKey[idx],mBuf);
2301    }
2302    return ROK;
2303 }
2304
2305
2306 /***********************************************************
2307 *
2308 *     Func: cmPkCtfKenbCfgInfo
2309 *
2310 *
2311 *     Desc:   Key derivation funtion Input Information
2312  * @details This funtion packs the the CtfKenbCfgInfo structure
2313  *           which contains the eNodeB key and Algorithm Type for
2314  *           deriving AS security keys.
2315  *
2316  *
2317  *     Ret : S16
2318  *
2319  *     Notes:
2320  *
2321  *     File:
2322  *
2323  **********************************************************/
2324 #ifdef ANSI
2325 PUBLIC S16 cmUnpkCtfAskeyInfo
2326 (
2327 CtfAsKeyInfo *param,
2328 Buffer *mBuf
2329 )
2330 #else
2331 PUBLIC S16 cmUnpkCtfAskeyInfo(param, mBuf)
2332 CtfAskeyInfo *param;
2333 Buffer *mBuf;
2334 #endif
2335 {
2336
2337    U8  idx;
2338
2339    TRC3(cmUnpkCtfAskeyInfo)
2340
2341    CMCHKUNPK(oduPackUInt8, &param->intgAlgoType, mBuf);
2342    CMCHKUNPK(oduPackUInt8, &param->ciphAlgoType, mBuf);
2343    for(idx=0;idx<32;idx++)
2344    {
2345       CMCHKUNPK(oduPackUInt8,&param->secKey[idx],mBuf);
2346    }
2347    return ROK;
2348 }
2349
2350 /***********************************************************
2351  *
2352  *    Func: cmPkCtfKenbCfgInfo
2353  *
2354  *
2355  *    Desc:   Key derivation funtion Input Information
2356  * @details This funtion packs the the CtfKenbCfgInfo structure
2357  *           which contains the eNodeB key and Algorithm Type for
2358  *           deriving AS security keys.
2359  *
2360  *
2361  *     Ret : S16
2362  *
2363  *     Notes:
2364  *
2365  *     File:
2366  *
2367  *  **********************************************************/
2368 #ifdef ANSI
2369 PUBLIC S16 cmUnpkCtfKdfReqInfo
2370 (
2371 CtfKdfReqInfo *param,
2372 Buffer *mBuf
2373  )
2374 #else
2375 PUBLIC S16 cmUnpkCtfKdfReqInfo(param, mBuf)
2376 CtfKdfReqInfo *param;
2377 Buffer *mBuf;
2378 #endif
2379 {
2380
2381    TRC3(cmUnpkCtfKdfReqInfo)
2382
2383     CMCHKUNPK(oduPackUInt8, &param->keyDerType, mBuf);
2384      switch (param->keyDerType)
2385     {
2386        case CTF_KDF_TYPE1:
2387            CMCHKUNPK(cmUnpkCtfAskeyInfo, &param->u.kEnbInf, mBuf);
2388            break;
2389        case CTF_KDF_TYPE2:
2390           CMCHKUNPK(cmUnpkCtfKenbStarInfo, &param->u.kEnbStarInf, mBuf);
2391           break;
2392        case CTF_KDF_TYPE3:
2393           CMCHKUNPK(cmUnpkCtfNhKeyInfo, &param->u.nhKeyInf, mBuf);
2394            break;
2395        default :
2396           return RFAILED;
2397     }
2398    return ROK;
2399 }
2400
2401 /**
2402 * @brief Configuration Request from RRC to PHY for 
2403  * cell or dedicated configuration.
2404 *
2405 * @details
2406 *
2407 *     Function: cmUnpkCtfCfgReq
2408 *
2409 *  @param[in]   Pst*  pst
2410 *  @param[in]   SpId  spId
2411 *  @param[in]   CtfCfgTransId  transId
2412 *  @param[in]   CtfCfgReqInfo*  cfgReqInfo
2413 *  @return   S16
2414 *      -# ROK
2415 **/
2416 #ifdef ANSI
2417 PUBLIC S16 cmUnpkCtfKdfReq
2418 (
2419 CtfKdfReq func,
2420 Pst *pst,
2421 Buffer *mBuf
2422 )
2423 #else
2424 PUBLIC S16 cmUnpkCtfKdfReq(func, pst, mBuf)
2425 CtfKdfReq func;
2426 Pst *pst;
2427 Buffer *mBuf;
2428 #endif
2429 {
2430    SpId spId = 0;
2431    CtfCfgTransId transId;
2432    CtfKdfReqInfo *kdfReqInfo = NULLP;
2433    
2434    TRC3(cmUnpkCtfKdfReq)
2435
2436    if (SUnpkS16(&spId, mBuf) != ROK) {
2437       SPutMsg(mBuf);
2438 #if (ERRCLASS & ERRCLS_ADD_RES)
2439       /* ctf_c_001.main_3 Compilation warning fix with g++ */
2440       SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
2441          (Txt*)&__FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
2442          (ErrVal)ECTF022, (ErrVal)0, (Txt*)&"Packing failed");
2443 #endif
2444       return RFAILED;
2445    }
2446    
2447    if (cmUnpkCtfCfgTransId(&transId, mBuf) != ROK) {
2448       SPutMsg(mBuf);
2449 #if (ERRCLASS & ERRCLS_ADD_RES)
2450       /* ctf_c_001.main_3 Compilation warning fix with g++ */
2451       SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
2452          (Txt*)&__FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
2453          (ErrVal)ECTF023, (ErrVal)0, (Txt*)&"Packing failed");
2454 #endif
2455       return RFAILED;
2456    }
2457    
2458    if (pst->selector != ODU_SELECTOR_LWLC) {
2459       if ((SGetSBuf(pst->region, pst->pool, (Data **)&kdfReqInfo, sizeof(CtfKdfReqInfo))) != ROK) {
2460 #if (ERRCLASS & ERRCLS_ADD_RES)
2461       /* ctf_c_001.main_3 Compilation warning fix with g++ */
2462          SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
2463             (Txt*)&__FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
2464             (ErrVal)ECTF024, (ErrVal)0, (Txt*)&"Packing failed");
2465 #endif
2466          SPutMsg(mBuf);
2467          return RFAILED;
2468       }
2469           
2470    }
2471    
2472    if (pst->selector == ODU_SELECTOR_LWLC) {
2473       /*if (oduUnpackPointer((PTR *)&cfgReqInfo, mBuf) != ROK) {
2474          SPutMsg(mBuf);
2475          return RFAILED;
2476       }*/
2477    }
2478    else if (pst->selector == ODU_SELECTOR_LC) 
2479       if (cmUnpkCtfKdfReqInfo(kdfReqInfo, mBuf) != ROK) {
2480       SPutSBuf(pst->region, pst->pool, (Data *)kdfReqInfo, sizeof(CtfKdfReqInfo));
2481       SPutMsg(mBuf);
2482           #if (ERRCLASS & ERRCLS_ADD_RES)
2483       /* ctf_c_001.main_3 Compilation warning fix with g++ */
2484       SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
2485          (Txt*)&__FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
2486          (ErrVal)ECTF025, (ErrVal)0, (Txt*)&"Packing failed");
2487 #endif
2488       return RFAILED;
2489    }
2490            SPutMsg(mBuf);
2491    return ((*func)(pst, spId, transId, kdfReqInfo));
2492 }
2493 #endif
2494
2495
2496 \f
2497 /**
2498 * @brief Configuration Request from RRC to PHY for 
2499  * cell or dedicated configuration.
2500 *
2501 * @details
2502 *
2503 *     Function: cmUnpkCtfCfgReq
2504 *
2505 *  @param[in]   Pst*  pst
2506 *  @param[in]   SpId  spId
2507 *  @param[in]   CtfCfgTransId  transId
2508 *  @param[in]   CtfCfgReqInfo*  cfgReqInfo
2509 *  @return   S16
2510 *      -# ROK
2511 **/
2512 #ifdef ANSI
2513 PUBLIC S16 cmUnpkCtfCfgReq
2514 (
2515 CtfCfgReq func,
2516 Pst *pst,
2517 Buffer *mBuf
2518 )
2519 #else
2520 PUBLIC S16 cmUnpkCtfCfgReq(func, pst, mBuf)
2521 CtfCfgReq func;
2522 Pst *pst;
2523 Buffer *mBuf;
2524 #endif
2525 {
2526    SpId spId = 0;
2527    CtfCfgTransId transId;
2528    CtfCfgReqInfo *cfgReqInfo = NULLP;
2529    
2530    TRC3(cmUnpkCtfCfgReq)
2531
2532    if (SUnpkS16(&spId, mBuf) != ROK) {
2533       SPutMsg(mBuf);
2534 #if (ERRCLASS & ERRCLS_ADD_RES)
2535       /* ctf_c_001.main_3 Compilation warning fix with g++ */
2536       SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
2537          (Txt*)&__FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
2538          (ErrVal)ECTF022, (ErrVal)0, (Txt*)&"Packing failed");
2539 #endif
2540       return RFAILED;
2541    }
2542    if (cmUnpkCtfCfgTransId(&transId, mBuf) != ROK) {
2543       SPutMsg(mBuf);
2544 #if (ERRCLASS & ERRCLS_ADD_RES)
2545       /* ctf_c_001.main_3 Compilation warning fix with g++ */
2546       SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
2547          (Txt*)&__FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
2548          (ErrVal)ECTF023, (ErrVal)0, (Txt*)&"Packing failed");
2549 #endif
2550       return RFAILED;
2551    }
2552    if (pst->selector != ODU_SELECTOR_LWLC) {
2553       if ((SGetSBuf(pst->region, pst->pool, (Data **)&cfgReqInfo, sizeof(CtfCfgReqInfo))) != ROK) {
2554 #if (ERRCLASS & ERRCLS_ADD_RES)
2555       /* ctf_c_001.main_3 Compilation warning fix with g++ */
2556          SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
2557             (Txt*)&__FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
2558             (ErrVal)ECTF024, (ErrVal)0, (Txt*)&"Packing failed");
2559 #endif
2560          SPutMsg(mBuf);
2561          return RFAILED;
2562       }
2563    }
2564    if (pst->selector == ODU_SELECTOR_LWLC) {
2565       if (oduUnpackPointer((PTR *)&cfgReqInfo, mBuf) != ROK) {
2566          SPutMsg(mBuf);
2567          return RFAILED;
2568       }
2569    }
2570    else if (pst->selector == ODU_SELECTOR_LC) 
2571       if (cmUnpkCtfCfgReqInfo(pst,cfgReqInfo, mBuf) != ROK) {
2572       cmRelCtfCfgReq(pst, cfgReqInfo);
2573       SPutMsg(mBuf);
2574 #if (ERRCLASS & ERRCLS_ADD_RES)
2575       /* ctf_c_001.main_3 Compilation warning fix with g++ */
2576       SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
2577          (Txt*)&__FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
2578          (ErrVal)ECTF025, (ErrVal)0, (Txt*)&"Packing failed");
2579 #endif
2580       return RFAILED;
2581    }
2582    SPutMsg(mBuf);
2583    return ((*func)(pst, spId, transId, cfgReqInfo));
2584 }
2585
2586 #ifdef TENB_AS_SECURITY
2587 /***********************************************************
2588 *
2589 *     Func: cmPkCtfKenbCfgInfo
2590 *
2591 *
2592 *     Desc:   Key derivation funtion Input Information
2593  * @details This funtion packs the the CtfKenbCfgInfo structure
2594  *           which contains the eNodeB key and Algorithm Type for
2595  *           deriving AS security keys.
2596  *
2597  *
2598  *     Ret : S16
2599  *
2600  *     Notes:
2601  *
2602  *     File:
2603  *
2604  **********************************************************/
2605 #ifdef ANSI
2606 PUBLIC S16 cmPkCtfNhKeyCfmInfo
2607 (
2608 CtfNhKeyCfmInfo *param,
2609 Buffer *mBuf
2610 )
2611 #else
2612 PUBLIC S16 cmPkCtfNhKeyCfmInfo(param, mBuf)
2613 CtfNhKeyCfmInfo *param;
2614 Buffer *mBuf;
2615 #endif
2616 {
2617
2618    S16  idx;
2619
2620    TRC3(cmPkCtfNhKeyCfmInfo)
2621          
2622    for(idx=31;idx>=0;idx--)
2623    {
2624       CMCHKPK(oduUnpackUInt8,param->secKey[idx],mBuf);
2625    }
2626    return ROK;
2627 }
2628
2629 /***********************************************************
2630 *
2631 *     Func: cmPkCtfKenbCfgInfo
2632 *
2633 *
2634 *     Desc:   Key derivation funtion Input Information
2635  * @details This funtion packs the the CtfKenbCfgInfo structure
2636  *           which contains the eNodeB key and Algorithm Type for
2637  *           deriving AS security keys.
2638  *
2639  *
2640  *     Ret : S16
2641  *
2642  *     Notes:
2643  *
2644  *     File:
2645  *
2646  **********************************************************/
2647 #ifdef ANSI
2648 PUBLIC S16 cmPkCtfKenbStarCfmInfo
2649 (
2650 CtfKenbStarCfmInfo *param,
2651 Buffer *mBuf
2652 )
2653 #else
2654 PUBLIC S16 cmPkCtfKenbStarCfmInfo(param, mBuf)
2655 CtfKenbStarCfmInfo *param;
2656 Buffer *mBuf;
2657 #endif
2658 {
2659
2660    S16  idx;
2661
2662    TRC3(cmPkCtfKenbStarCfmInfo)
2663          
2664    for(idx=31;idx>=0;idx--)
2665    {
2666       CMCHKPK(oduUnpackUInt8,param->secKey[idx],mBuf);
2667    }
2668    return ROK;
2669 }
2670
2671
2672 /***********************************************************
2673 *
2674 *     Func: cmPkCtfKenbCfgInfo
2675 *
2676 *
2677 *     Desc:   Key derivation funtion Input Information
2678  * @details This funtion packs the the CtfKenbCfgInfo structure
2679  *           which contains the eNodeB key and Algorithm Type for
2680  *           deriving AS security keys.
2681  *
2682  *
2683  *     Ret : S16
2684  *
2685  *     Notes:
2686  *
2687  *     File:
2688  *
2689  **********************************************************/
2690 #ifdef ANSI
2691 PUBLIC S16 cmPkCtfAskeyCfmInfo
2692 (
2693 CtfAskeyCfmInfo *param,
2694 Buffer *mBuf
2695 )
2696 #else
2697 PUBLIC S16 cmPkCtfAskeyCfmInfo(param, mBuf)
2698 CtfAskeyCfmInfo *param;
2699 Buffer *mBuf;
2700 #endif
2701 {
2702
2703    S16  idx;
2704
2705    TRC3(cmPkCtfCtfAskeyCfmInfo)
2706
2707    for(idx=15;idx>=0;idx--)
2708    {
2709       CMCHKPK(oduUnpackUInt8,param->cpCiphKey[idx],mBuf);
2710    }
2711    for(idx=15;idx>=0;idx--)
2712    {
2713       CMCHKPK(oduUnpackUInt8,param->upCiphKey[idx],mBuf);
2714    }
2715    for(idx=15;idx>=0;idx--)
2716    {
2717       CMCHKPK(oduUnpackUInt8,param->intKey[idx],mBuf);
2718    }
2719    return ROK;
2720 }
2721
2722 /***********************************************************
2723  *
2724  *    Func: cmPkCtfKenbCfgInfo
2725  *
2726  *
2727  *    Desc:   Key derivation funtion Input Information
2728  * @details This funtion packs the the CtfKenbCfgInfo structure
2729  *           which contains the eNodeB key and Algorithm Type for
2730  *           deriving AS security keys.
2731  *
2732  *
2733  *     Ret : S16
2734  *
2735  *     Notes:
2736  *
2737  *     File:
2738  *
2739  *  **********************************************************/
2740 #ifdef ANSI
2741 PUBLIC S16 cmPkCtfKdfCfmInfo
2742 (
2743 CtfKdfCfmInfo *param,
2744 Buffer *mBuf
2745  )
2746 #else
2747 PUBLIC S16 cmPkCtfKdfCfmInfo(param, mBuf)
2748 CtfKdfCfmInfo *param;
2749 Buffer *mBuf;
2750 #endif
2751 {
2752
2753    TRC3(cmPkCtfKdfCfmInfo)
2754
2755    switch (param->keyDerType)
2756     {
2757          case CTF_KDF_TYPE1:
2758              CMCHKPK(cmPkCtfAskeyCfmInfo, &param->u.kEnbInf, mBuf);
2759              break;
2760          case CTF_KDF_TYPE2:
2761             CMCHKPK(cmPkCtfKenbStarCfmInfo, &param->u.kEnbStarInf, mBuf);
2762             break;
2763          case CTF_KDF_TYPE3:
2764             CMCHKPK(cmPkCtfNhKeyCfmInfo, &param->u.nhKeyInf, mBuf);
2765              break;
2766          default :
2767             return RFAILED;
2768     }
2769     CMCHKPK(oduUnpackUInt8, param->keyDerType, mBuf);
2770    return ROK;
2771 }
2772
2773 /**
2774 * @brief Configuration Confirm from PHY to RRC.
2775 *
2776 * @details
2777 *
2778 *     Function: cmPkCtfCfgCfm
2779 *
2780 *  @param[in]   Pst*  pst
2781 *  @param[in]   SuId  suId
2782 *  @param[in]   CtfCfgTransId  transId
2783 *  @param[in]   U8  status
2784 *  @return   S16
2785 *      -# ROK
2786 **/
2787 #ifdef ANSI
2788 PUBLIC S16 cmPkCtfKdfCfm
2789 (
2790 Pst* pst,
2791 SuId suId,
2792 CtfCfgTransId transId,
2793 CtfKdfCfmInfo *kdfCfmInfo,
2794 U8 status
2795 )
2796 #else
2797 PUBLIC S16 cmPkCtfKdfCfm(pst, suId, transId, status)
2798 Pst* pst;
2799 SuId suId;
2800 CtfCfgTransId transId;
2801 U8 status;
2802 #endif
2803 {
2804    Buffer *mBuf = NULLP;
2805    TRC3(cmPkCtfKdfCfm)
2806
2807    if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) {
2808 #if (ERRCLASS & ERRCLS_ADD_RES)
2809       /* ctf_c_001.main_3 Compilation warning fix with g++ */
2810       SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
2811          (Txt*)&__FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
2812          (ErrVal)ECTF026, (ErrVal)0, (Txt*)&"Packing failed");
2813 #endif
2814       SPutSBuf(pst->region, pst->pool, (Data *)kdfCfmInfo, sizeof(CtfKdfCfmInfo));
2815       return RFAILED;
2816    }
2817
2818    if (oduUnpackUInt8(status, mBuf) != ROK) {
2819 #if (ERRCLASS & ERRCLS_ADD_RES)
2820       /* ctf_c_001.main_3 Compilation warning fix with g++ */
2821       SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
2822          (Txt*)&__FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
2823          (ErrVal)ECTF027, (ErrVal)0, (Txt*)&"Packing failed");
2824 #endif
2825       SPutSBuf(pst->region, pst->pool, (Data *)kdfCfmInfo, sizeof(CtfKdfCfmInfo));
2826       SPutMsg(mBuf);
2827       return RFAILED;
2828    }
2829
2830    if (cmPkCtfKdfCfmInfo(kdfCfmInfo, mBuf) != ROK) {
2831 #if (ERRCLASS & ERRCLS_ADD_RES)
2832       /* ctf_c_001.main_3 Compilation warning fix with g++ */
2833       SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
2834          (Txt*)&__FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
2835          (ErrVal)ECTF028, (ErrVal)0, (Txt*)&"Packing failed");
2836 #endif
2837       SPutSBuf(pst->region, pst->pool, (Data *)kdfCfmInfo, sizeof(CtfKdfCfmInfo));
2838       SPutMsg(mBuf);
2839       return RFAILED;
2840    }
2841
2842    if (cmPkCtfCfgTransId(&transId, mBuf) != ROK) {
2843 #if (ERRCLASS & ERRCLS_ADD_RES)
2844       /* ctf_c_001.main_3 Compilation warning fix with g++ */
2845       SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
2846          (Txt*)&__FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
2847          (ErrVal)ECTF028, (ErrVal)0, (Txt*)&"Packing failed");
2848 #endif
2849       SPutSBuf(pst->region, pst->pool, (Data *)kdfCfmInfo, sizeof(CtfKdfCfmInfo));
2850       SPutMsg(mBuf);
2851       return RFAILED;
2852    }
2853
2854    if (SPkS16(suId, mBuf) != ROK) {
2855 #if (ERRCLASS & ERRCLS_ADD_RES)
2856       /* ctf_c_001.main_3 Compilation warning fix with g++ */
2857       SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
2858          (Txt*)&__FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
2859          (ErrVal)ECTF029, (ErrVal)0, (Txt*)&"Packing failed");
2860 #endif
2861       SPutSBuf(pst->region, pst->pool, (Data *)kdfCfmInfo, sizeof(CtfKdfCfmInfo));
2862       SPutMsg(mBuf);
2863       return RFAILED;
2864    }
2865
2866    if (SPutSBuf(pst->region, pst->pool, (Data *)kdfCfmInfo, sizeof(CtfKdfCfmInfo)) != ROK) 
2867    {
2868 #if (ERRCLASS & ERRCLS_ADD_RES)
2869    /* ctf_c_001.main_3 Compilation warning fix with g++ */
2870    SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
2871       (Txt*)&__FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
2872       (ErrVal)ECTF021, (ErrVal)0, (Txt*)&"Packing failed");
2873 #endif
2874      SPutMsg(mBuf);
2875      return RFAILED;
2876    }
2877
2878    pst->event = (Event) EVTCTFKDFCFM;
2879    return (SPstTsk(pst,mBuf));
2880 }
2881 #endif
2882 \f
2883 /**
2884 * @brief Configuration Confirm from PHY to RRC.
2885 *
2886 * @details
2887 *
2888 *     Function: cmPkCtfCfgCfm
2889 *
2890 *  @param[in]   Pst*  pst
2891 *  @param[in]   SuId  suId
2892 *  @param[in]   CtfCfgTransId  transId
2893 *  @param[in]   U8  status
2894 *  @return   S16
2895 *      -# ROK
2896 **/
2897 #ifdef ANSI
2898 PUBLIC S16 cmPkCtfCfgCfm
2899 (
2900 Pst* pst,
2901 SuId suId,
2902 CtfCfgTransId transId,
2903 U8 status
2904 )
2905 #else
2906 PUBLIC S16 cmPkCtfCfgCfm(pst, suId, transId, status)
2907 Pst* pst;
2908 SuId suId;
2909 CtfCfgTransId transId;
2910 U8 status;
2911 #endif
2912 {
2913    Buffer *mBuf = NULLP;
2914    TRC3(cmPkCtfCfgCfm)
2915
2916    if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) {
2917 #if (ERRCLASS & ERRCLS_ADD_RES)
2918       /* ctf_c_001.main_3 Compilation warning fix with g++ */
2919       SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
2920          (Txt*)&__FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
2921          (ErrVal)ECTF026, (ErrVal)0, (Txt*)&"Packing failed");
2922 #endif
2923       return RFAILED;
2924    }
2925    if (oduUnpackUInt8(status, mBuf) != ROK) {
2926 #if (ERRCLASS & ERRCLS_ADD_RES)
2927       /* ctf_c_001.main_3 Compilation warning fix with g++ */
2928       SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
2929          (Txt*)&__FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
2930          (ErrVal)ECTF027, (ErrVal)0, (Txt*)&"Packing failed");
2931 #endif
2932       SPutMsg(mBuf);
2933       return RFAILED;
2934    }
2935    if (cmPkCtfCfgTransId(&transId, mBuf) != ROK) {
2936 #if (ERRCLASS & ERRCLS_ADD_RES)
2937       /* ctf_c_001.main_3 Compilation warning fix with g++ */
2938       SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
2939          (Txt*)&__FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
2940          (ErrVal)ECTF028, (ErrVal)0, (Txt*)&"Packing failed");
2941 #endif
2942       SPutMsg(mBuf);
2943       return RFAILED;
2944    }
2945    if (SPkS16(suId, mBuf) != ROK) {
2946 #if (ERRCLASS & ERRCLS_ADD_RES)
2947       /* ctf_c_001.main_3 Compilation warning fix with g++ */
2948       SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
2949          (Txt*)&__FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
2950          (ErrVal)ECTF029, (ErrVal)0, (Txt*)&"Packing failed");
2951 #endif
2952       SPutMsg(mBuf);
2953       return RFAILED;
2954    }
2955    pst->event = (Event) EVTCTFCFGCFM;
2956    return (SPstTsk(pst,mBuf));
2957 }
2958
2959 /**
2960 * @brief ENB STOP Indication from PHY to ENB-APP.
2961 *
2962 * @details
2963 *
2964 *     Function: cmPkCtfEnbStopInd
2965 *
2966 *  @param[in]   Pst*  pst
2967 *  @param[in]   SuId  suId
2968 *  @param[in]   CtfCfgTransId  transId
2969 *  @return   S16
2970 *      -# ROK
2971 **/
2972 #ifdef ANSI
2973 PUBLIC S16 cmPkCtfEnbStopInd
2974 (
2975 Pst* pst,
2976 SuId suId,
2977 CtfCfgTransId transId
2978 )
2979 #else
2980 PUBLIC S16 cmPkCtfEnbStopInd(pst, suId, transId)
2981 Pst* pst;
2982 SuId suId;
2983 CtfCfgTransId transId;
2984 #endif
2985 {
2986    Buffer *mBuf = NULLP;
2987    TRC3(cmPkCtfEnbStopInd)
2988
2989    if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) {
2990 #if (ERRCLASS & ERRCLS_ADD_RES)
2991       /* ctf_c_001.main_3 Compilation warning fix with g++ */
2992       SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
2993          (Txt*)&__FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
2994          (ErrVal)ECTF026, (ErrVal)0, (Txt*)&"Packing failed");
2995 #endif
2996       return RFAILED;
2997    }
2998    if (cmPkCtfCfgTransId(&transId, mBuf) != ROK) {
2999 #if (ERRCLASS & ERRCLS_ADD_RES)
3000       /* ctf_c_001.main_3 Compilation warning fix with g++ */
3001       SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
3002          (Txt*)&__FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
3003          (ErrVal)ECTF028, (ErrVal)0, (Txt*)&"Packing failed");
3004 #endif
3005       SPutMsg(mBuf);
3006       return RFAILED;
3007    }
3008    if (SPkS16(suId, mBuf) != ROK) {
3009 #if (ERRCLASS & ERRCLS_ADD_RES)
3010       /* ctf_c_001.main_3 Compilation warning fix with g++ */
3011       SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
3012          (Txt*)&__FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
3013          (ErrVal)ECTF029, (ErrVal)0, (Txt*)&"Packing failed");
3014 #endif
3015       SPutMsg(mBuf);
3016       return RFAILED;
3017    }
3018    pst->event = (Event) EVTCTFENBSTOPIND;
3019    return (SPstTsk(pst,mBuf));
3020 }
3021
3022 #ifdef TENB_AS_SECURITY
3023 /***********************************************************
3024 *
3025 *     Func: cmPkCtfKenbCfgInfo
3026 *
3027 *
3028 *     Desc:   Key derivation funtion Input Information
3029  * @details This funtion packs the the CtfKenbCfgInfo structure
3030  *           which contains the eNodeB key and Algorithm Type for
3031  *           deriving AS security keys.
3032  *
3033  *
3034  *     Ret : S16
3035  *
3036  *     Notes:
3037  *
3038  *     File:
3039  *
3040  **********************************************************/
3041 #ifdef ANSI
3042 PUBLIC S16 cmUnpkCtfNhKeyCfmInfo
3043 (
3044 CtfNhKeyCfmInfo *param,
3045 Buffer *mBuf
3046 )
3047 #else
3048 PUBLIC S16 cmUnpkCtfNhKeyCfmInfo(param, mBuf)
3049 CtfNhKeyCfmInfo *param;
3050 Buffer *mBuf;
3051 #endif
3052 {
3053
3054    U8  idx;
3055
3056    TRC3(cmUnpkCtfNhKeyCfmInfo)
3057          
3058    for(idx=0;idx<32;idx++)
3059    {
3060       CMCHKUNPK(oduPackUInt8,&param->secKey[idx],mBuf);
3061    }
3062    return ROK;
3063 }
3064
3065 /***********************************************************
3066 *
3067 *     Func: cmPkCtfKenbCfgInfo
3068 *
3069 *
3070 *     Desc:   Key derivation funtion Input Information
3071  * @details This funtion packs the the CtfKenbCfgInfo structure
3072  *           which contains the eNodeB key and Algorithm Type for
3073  *           deriving AS security keys.
3074  *
3075  *
3076  *     Ret : S16
3077  *
3078  *     Notes:
3079  *
3080  *     File:
3081  *
3082  **********************************************************/
3083 #ifdef ANSI
3084 PUBLIC S16 cmUnpkCtfKenbStarCfmInfo
3085 (
3086 CtfKenbStarCfmInfo *param,
3087 Buffer *mBuf
3088 )
3089 #else
3090 PUBLIC S16 cmUnpkCtfKenbStarCfmInfo(param, mBuf)
3091 CtfKenbStarCfmInfo *param;
3092 Buffer *mBuf;
3093 #endif
3094 {
3095
3096    U8  idx;
3097
3098    TRC3(cmUnpkCtfKenbStarCfmInfo)
3099          
3100    for(idx=0;idx<32;idx++)
3101    {
3102       CMCHKUNPK(oduPackUInt8,&param->secKey[idx],mBuf);
3103    }
3104    return ROK;
3105 }
3106
3107
3108 /***********************************************************
3109 *
3110 *     Func: cmPkCtfKenbCfgInfo
3111 *
3112 *
3113 *     Desc:   Key derivation funtion Input Information
3114  * @details This funtion packs the the CtfKenbCfgInfo structure
3115  *           which contains the eNodeB key and Algorithm Type for
3116  *           deriving AS security keys.
3117  *
3118  *
3119  *     Ret : S16
3120  *
3121  *     Notes:
3122  *
3123  *     File:
3124  *
3125  **********************************************************/
3126 #ifdef ANSI
3127 PUBLIC S16 cmUnpkCtfAskeyCfmInfo
3128 (
3129 CtfAskeyCfmInfo *param,
3130 Buffer *mBuf
3131 )
3132 #else
3133 PUBLIC S16 cmUnpkCtfAskeyCfmInfo(param, mBuf)
3134 CtfAskeyCfmInfo *param;
3135 Buffer *mBuf;
3136 #endif
3137 {
3138
3139    U8  idx;
3140
3141    TRC3(cmUnpkCtfCtfAskeyCfmInfo)
3142          
3143    for(idx=0;idx<16;idx++)
3144    {
3145       CMCHKUNPK(oduPackUInt8,&param->intKey[idx],mBuf);
3146    }
3147    for(idx=0;idx<16;idx++)
3148    {
3149       CMCHKUNPK(oduPackUInt8,&param->upCiphKey[idx],mBuf);
3150    }
3151    for(idx=0;idx<16;idx++)
3152    {
3153       CMCHKUNPK(oduPackUInt8,&param->cpCiphKey[idx],mBuf);
3154    }
3155    return ROK;
3156 }
3157
3158 /***********************************************************
3159  *
3160  *    Func: cmPkCtfKenbCfgInfo
3161  *
3162  *
3163  *    Desc:   Key derivation funtion Input Information
3164  * @details This funtion packs the the CtfKenbCfgInfo structure
3165  *           which contains the eNodeB key and Algorithm Type for
3166  *           deriving AS security keys.
3167  *
3168  *
3169  *     Ret : S16
3170  *
3171  *     Notes:
3172  *
3173  *     File:
3174  *
3175  *  **********************************************************/
3176 #ifdef ANSI
3177 PUBLIC S16 cmUnpkCtfKdfCfmInfo
3178 (
3179 CtfKdfCfmInfo *param,
3180 Buffer *mBuf
3181  )
3182 #else
3183 PUBLIC S16 cmUnpkCtfKdfCfmInfo(param, mBuf)
3184 CtfKdfCfmInfo *param;
3185 Buffer *mBuf;
3186 #endif
3187 {
3188
3189    TRC3(cmUnpkCtfKdfCfmInfo)
3190
3191     CMCHKUNPK(oduPackUInt8, &param->keyDerType, mBuf);
3192    switch (param->keyDerType)
3193     {
3194          case CTF_KDF_TYPE1:
3195              CMCHKUNPK(cmUnpkCtfAskeyCfmInfo, &param->u.kEnbInf, mBuf);
3196              break;
3197          case CTF_KDF_TYPE2:
3198             CMCHKUNPK(cmUnpkCtfKenbStarCfmInfo, &param->u.kEnbStarInf, mBuf);
3199             break;
3200          case CTF_KDF_TYPE3:
3201             CMCHKUNPK(cmUnpkCtfNhKeyCfmInfo, &param->u.nhKeyInf, mBuf);
3202              break;
3203          default :
3204             return RFAILED;
3205     }
3206    return ROK;
3207 }
3208
3209 /**
3210 * @brief Configuration Confirm from PHY to RRC.
3211 *
3212 * @details
3213 *
3214 *     Function: cmUnpkCtfCfgCfm
3215 *
3216 *  @param[in]   Pst*  pst
3217 *  @param[in]   SuId  suId
3218 *  @param[in]   CtfCfgTransId  transId
3219 *  @param[in]   U8  status
3220 *  @return   S16
3221 *      -# ROK
3222 **/
3223 #ifdef ANSI
3224 PUBLIC S16 cmUnpkCtfKdfCfm
3225 (
3226 CtfKdfCfm func,
3227 Pst *pst,
3228 Buffer *mBuf
3229 )
3230 #else
3231 PUBLIC S16 cmUnpkCtfCfgCfm(func, pst, mBuf)
3232 CtfKdfCfm func;
3233 Pst *pst;
3234 Buffer *mBuf;
3235 #endif
3236 {
3237    SuId suId = 0;
3238    CtfCfgTransId transId;
3239    U8 status;
3240    CtfKdfCfmInfo kdfCfmInfo;
3241    
3242    TRC3(cmUnpkCtfKdfCfm)
3243
3244    if (SUnpkS16(&suId, mBuf) != ROK) {
3245       SPutMsg(mBuf);
3246 #if (ERRCLASS & ERRCLS_ADD_RES)
3247       /* ctf_c_001.main_3 Compilation warning fix with g++ */
3248       SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
3249          (Txt*)&__FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
3250          (ErrVal)ECTF030, (ErrVal)0, (Txt*)&"Packing failed");
3251 #endif
3252       return RFAILED;
3253    }
3254    if (cmUnpkCtfCfgTransId(&transId, mBuf) != ROK) {
3255       SPutMsg(mBuf);
3256 #if (ERRCLASS & ERRCLS_ADD_RES)
3257       /* ctf_c_001.main_3 Compilation warning fix with g++ */
3258       SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
3259          (Txt*)&__FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
3260          (ErrVal)ECTF031, (ErrVal)0, (Txt*)&"Packing failed");
3261 #endif
3262       return RFAILED;
3263    }
3264    if (cmUnpkCtfKdfCfmInfo(&kdfCfmInfo, mBuf) != ROK) {
3265       SPutMsg(mBuf);
3266 #if (ERRCLASS & ERRCLS_ADD_RES)
3267       /* ctf_c_001.main_3 Compilation warning fix with g++ */
3268       SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
3269          (Txt*)&__FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
3270          (ErrVal)ECTF031, (ErrVal)0, (Txt*)&"Packing failed");
3271 #endif
3272       return RFAILED;
3273    }
3274
3275    if (oduPackUInt8(&status, mBuf) != ROK) {
3276       SPutMsg(mBuf);
3277 #if (ERRCLASS & ERRCLS_ADD_RES)
3278       /* ctf_c_001.main_3 Compilation warning fix with g++ */
3279       SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
3280          (Txt*)&__FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
3281          (ErrVal)ECTF032, (ErrVal)0, (Txt*)&"Packing failed");
3282 #endif
3283       return RFAILED;
3284    }
3285    SPutMsg(mBuf);
3286    return ((*func)(pst, suId, transId,&kdfCfmInfo, status));
3287 }
3288 #endif
3289
3290 \f
3291 /**
3292 * @brief Configuration Confirm from PHY to RRC.
3293 *
3294 * @details
3295 *
3296 *     Function: cmUnpkCtfCfgCfm
3297 *
3298 *  @param[in]   Pst*  pst
3299 *  @param[in]   SuId  suId
3300 *  @param[in]   CtfCfgTransId  transId
3301 *  @param[in]   U8  status
3302 *  @return   S16
3303 *      -# ROK
3304 **/
3305 #ifdef ANSI
3306 PUBLIC S16 cmUnpkCtfCfgCfm
3307 (
3308 CtfCfgCfm func,
3309 Pst *pst,
3310 Buffer *mBuf
3311 )
3312 #else
3313 PUBLIC S16 cmUnpkCtfCfgCfm(func, pst, mBuf)
3314 CtfCfgCfm func;
3315 Pst *pst;
3316 Buffer *mBuf;
3317 #endif
3318 {
3319    SuId suId = 0;
3320    CtfCfgTransId transId;
3321    U8 status;
3322    
3323    TRC3(cmUnpkCtfCfgCfm)
3324
3325    if (SUnpkS16(&suId, mBuf) != ROK) {
3326       SPutMsg(mBuf);
3327 #if (ERRCLASS & ERRCLS_ADD_RES)
3328       /* ctf_c_001.main_3 Compilation warning fix with g++ */
3329       SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
3330          (Txt*)&__FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
3331          (ErrVal)ECTF030, (ErrVal)0, (Txt*)&"Packing failed");
3332 #endif
3333       return RFAILED;
3334    }
3335    if (cmUnpkCtfCfgTransId(&transId, mBuf) != ROK) {
3336       SPutMsg(mBuf);
3337 #if (ERRCLASS & ERRCLS_ADD_RES)
3338       /* ctf_c_001.main_3 Compilation warning fix with g++ */
3339       SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
3340          (Txt*)&__FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
3341          (ErrVal)ECTF031, (ErrVal)0, (Txt*)&"Packing failed");
3342 #endif
3343       return RFAILED;
3344    }
3345    if (oduPackUInt8(&status, mBuf) != ROK) {
3346       SPutMsg(mBuf);
3347 #if (ERRCLASS & ERRCLS_ADD_RES)
3348       /* ctf_c_001.main_3 Compilation warning fix with g++ */
3349       SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
3350          (Txt*)&__FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
3351          (ErrVal)ECTF032, (ErrVal)0, (Txt*)&"Packing failed");
3352 #endif
3353       return RFAILED;
3354    }
3355    SPutMsg(mBuf);
3356    return ((*func)(pst, suId, transId, status));
3357 }
3358
3359 /**
3360 * @brief ENB STOP Indication from PHY to ENB-APP
3361 *
3362 * @details
3363 *
3364 *     Function: cmUnpkCtfEnbStopInd
3365 *
3366 *  @param[in]   Pst*  pst
3367 *  @param[in]   SuId  suId
3368 *  @param[in]   CtfCfgTransId  transId
3369 *  @return   S16
3370 *      -# ROK
3371 **/
3372 #ifdef ANSI
3373 PUBLIC S16 cmUnpkCtfEnbStopInd
3374 (
3375 CtfEnbStopInd func,
3376 Pst *pst,
3377 Buffer *mBuf
3378 )
3379 #else
3380 PUBLIC S16 cmUnpkCtfEnbStopInd(func, pst, mBuf)
3381 CtfEnbStopInd func;
3382 Pst *pst;
3383 Buffer *mBuf;
3384 #endif
3385 {
3386    SuId suId = 0;
3387    CtfCfgTransId transId;
3388    
3389    TRC3(cmUnpkCtfCfgCfm)
3390
3391    if (SUnpkS16(&suId, mBuf) != ROK) {
3392       SPutMsg(mBuf);
3393 #if (ERRCLASS & ERRCLS_ADD_RES)
3394       /* ctf_c_001.main_3 Compilation warning fix with g++ */
3395       SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
3396          (Txt*)&__FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
3397          (ErrVal)ECTF030, (ErrVal)0, (Txt*)&"Packing failed");
3398 #endif
3399       return RFAILED;
3400    }
3401    if (cmUnpkCtfCfgTransId(&transId, mBuf) != ROK) {
3402       SPutMsg(mBuf);
3403 #if (ERRCLASS & ERRCLS_ADD_RES)
3404       /* ctf_c_001.main_3 Compilation warning fix with g++ */
3405       SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
3406          (Txt*)&__FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
3407          (ErrVal)ECTF031, (ErrVal)0, (Txt*)&"Packing failed");
3408 #endif
3409       return RFAILED;
3410    }
3411    SPutMsg(mBuf);
3412    return ((*func)(pst, suId, transId));
3413 }
3414
3415 \f
3416 /**
3417 * @brief UE ID Change Request from RRC to PHY.
3418 *
3419 * @details
3420 *
3421 *     Function: cmPkCtfUeIdChgReq
3422 *
3423 *  @param[in]   Pst*  pst
3424 *  @param[in]   SpId  spId
3425 *  @param[in]   CtfCfgTransId  transId
3426 *  @param[in]   CtfUeInfo *  ueInfo
3427 *  @param[in]   CtfUeInfo *  newUeInfo
3428 *  @return   S16
3429 *      -# ROK
3430 **/
3431 #ifdef ANSI
3432 PUBLIC S16 cmPkCtfUeIdChgReq
3433 (
3434 Pst* pst,
3435 SpId spId,
3436 CtfCfgTransId transId,
3437 CtfUeInfo * ueInfo,
3438 CtfUeInfo * newUeInfo
3439 )
3440 #else
3441 PUBLIC S16 cmPkCtfUeIdChgReq(pst, spId, transId, ueInfo, newUeInfo)
3442 Pst* pst;
3443 SpId spId;
3444 CtfCfgTransId transId;
3445 CtfUeInfo * ueInfo;
3446 CtfUeInfo * newUeInfo;
3447 #endif
3448 {
3449    Buffer *mBuf = NULLP;
3450    TRC3(cmPkCtfUeIdChgReq)
3451
3452    if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) {
3453 #if (ERRCLASS & ERRCLS_ADD_RES)
3454       /* ctf_c_001.main_3 Compilation warning fix with g++ */
3455       SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
3456          (Txt*)&__FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
3457          (ErrVal)ECTF033, (ErrVal)0, (Txt*)&"Packing failed");
3458 #endif
3459       SPutSBuf(pst->region, pst->pool, (Data *)ueInfo, sizeof(CtfUeInfo));
3460       SPutSBuf(pst->region, pst->pool, (Data *)newUeInfo, sizeof(CtfUeInfo));
3461       return RFAILED;
3462    }
3463    if (pst->selector == ODU_SELECTOR_LC) {
3464       if (cmPkCtfUeInfo(newUeInfo, mBuf) != ROK) {
3465 #if (ERRCLASS & ERRCLS_ADD_RES)
3466       /* ctf_c_001.main_3 Compilation warning fix with g++ */
3467          SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
3468             (Txt*)&__FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
3469             (ErrVal)ECTF034, (ErrVal)0, (Txt*)&"Packing failed");
3470 #endif
3471          SPutSBuf(pst->region, pst->pool, (Data *)ueInfo, sizeof(CtfUeInfo));
3472          SPutSBuf(pst->region, pst->pool, (Data *)newUeInfo, sizeof(CtfUeInfo));
3473          SPutMsg(mBuf);
3474          return RFAILED;
3475       }
3476    }
3477    else if (pst->selector == ODU_SELECTOR_LWLC) {
3478       if (oduPackPointer((PTR)newUeInfo, mBuf) != ROK) {
3479 #if (ERRCLASS & ERRCLS_ADD_RES)
3480       /* ctf_c_001.main_3 Compilation warning fix with g++ */
3481          SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
3482             (Txt*)&__FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
3483             (ErrVal)ECTF035, (ErrVal)0, (Txt*)&"Packing failed");
3484 #endif
3485          SPutSBuf(pst->region, pst->pool, (Data *)ueInfo, sizeof(CtfUeInfo));
3486          SPutSBuf(pst->region, pst->pool, (Data *)newUeInfo, sizeof(CtfUeInfo));
3487          SPutMsg(mBuf);
3488          return RFAILED;
3489       }
3490    }
3491    if (pst->selector == ODU_SELECTOR_LC) {
3492       if (cmPkCtfUeInfo(ueInfo, mBuf) != ROK) {
3493 #if (ERRCLASS & ERRCLS_ADD_RES)
3494       /* ctf_c_001.main_3 Compilation warning fix with g++ */
3495          SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
3496             (Txt*)&__FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
3497             (ErrVal)ECTF036, (ErrVal)0, (Txt*)&"Packing failed");
3498 #endif
3499          SPutSBuf(pst->region, pst->pool, (Data *)ueInfo, sizeof(CtfUeInfo));
3500          SPutSBuf(pst->region, pst->pool, (Data *)newUeInfo, sizeof(CtfUeInfo));
3501          SPutMsg(mBuf);
3502          return RFAILED;
3503       }
3504    }
3505    else if (pst->selector == ODU_SELECTOR_LWLC) {
3506       if (oduPackPointer((PTR)ueInfo, mBuf) != ROK) {
3507 #if (ERRCLASS & ERRCLS_ADD_RES)
3508       /* ctf_c_001.main_3 Compilation warning fix with g++ */
3509          SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
3510             (Txt*)&__FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
3511             (ErrVal)ECTF037, (ErrVal)0, (Txt*)&"Packing failed");
3512 #endif
3513          SPutSBuf(pst->region, pst->pool, (Data *)ueInfo, sizeof(CtfUeInfo));
3514          SPutSBuf(pst->region, pst->pool, (Data *)newUeInfo, sizeof(CtfUeInfo));
3515          SPutMsg(mBuf);
3516          return RFAILED;
3517       }
3518    }
3519    if (cmPkCtfCfgTransId(&transId, mBuf) != ROK) {
3520 #if (ERRCLASS & ERRCLS_ADD_RES)
3521       /* ctf_c_001.main_3 Compilation warning fix with g++ */
3522       SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
3523          (Txt*)&__FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
3524          (ErrVal)ECTF038, (ErrVal)0, (Txt*)&"Packing failed");
3525 #endif
3526       SPutSBuf(pst->region, pst->pool, (Data *)ueInfo, sizeof(CtfUeInfo));
3527       SPutSBuf(pst->region, pst->pool, (Data *)newUeInfo, sizeof(CtfUeInfo));
3528       SPutMsg(mBuf);
3529       return RFAILED;
3530    }
3531    if (SPkS16(spId, mBuf) != ROK) {
3532 #if (ERRCLASS & ERRCLS_ADD_RES)
3533       /* ctf_c_001.main_3 Compilation warning fix with g++ */
3534       SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
3535          (Txt*)&__FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
3536          (ErrVal)ECTF039, (ErrVal)0, (Txt*)&"Packing failed");
3537 #endif
3538       SPutSBuf(pst->region, pst->pool, (Data *)ueInfo, sizeof(CtfUeInfo));
3539       SPutSBuf(pst->region, pst->pool, (Data *)newUeInfo, sizeof(CtfUeInfo));
3540       SPutMsg(mBuf);
3541       return RFAILED;
3542    }
3543    if (pst->selector != ODU_SELECTOR_LWLC) {
3544       if (SPutSBuf(pst->region, pst->pool, (Data *)ueInfo, sizeof(CtfUeInfo)) != ROK) {
3545 #if (ERRCLASS & ERRCLS_ADD_RES)
3546       /* ctf_c_001.main_3 Compilation warning fix with g++ */
3547       SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
3548          (Txt*)&__FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
3549          (ErrVal)ECTF040, (ErrVal)0, (Txt*)&"Packing failed");
3550 #endif
3551          SPutMsg(mBuf);
3552          return RFAILED;
3553       }
3554       if (SPutSBuf(pst->region, pst->pool, (Data *)newUeInfo, sizeof(CtfUeInfo)) != ROK) {
3555 #if (ERRCLASS & ERRCLS_ADD_RES)
3556       /* ctf_c_001.main_3 Compilation warning fix with g++ */
3557       SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
3558          (Txt*)&__FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
3559          (ErrVal)ECTF041, (ErrVal)0, (Txt*)&"Packing failed");
3560 #endif
3561          SPutMsg(mBuf);
3562          return RFAILED;
3563       }
3564    }
3565    pst->event = (Event) EVTCTFUEIDCHGREQ;
3566    return (SPstTsk(pst,mBuf));
3567 }
3568
3569 \f
3570 /**
3571 * @brief UE ID Change Request from RRC to PHY.
3572 *
3573 * @details
3574 *
3575 *     Function: cmUnpkCtfUeIdChgReq
3576 *
3577 *  @param[in]   Pst*  pst
3578 *  @param[in]   SpId  spId
3579 *  @param[in]   CtfCfgTransId  transId
3580 *  @param[in]   CtfUeInfo *  ueInfo
3581 *  @param[in]   CtfUeInfo *  newUeInfo
3582 *  @return   S16
3583 *      -# ROK
3584 **/
3585 #ifdef ANSI
3586 PUBLIC S16 cmUnpkCtfUeIdChgReq
3587 (
3588 CtfUeIdChgReq func,
3589 Pst *pst,
3590 Buffer *mBuf
3591 )
3592 #else
3593 PUBLIC S16 cmUnpkCtfUeIdChgReq(func, pst, mBuf)
3594 CtfUeIdChgReq func;
3595 Pst *pst;
3596 Buffer *mBuf;
3597 #endif
3598 {
3599    SpId spId = 0;
3600    CtfCfgTransId transId;
3601    CtfUeInfo *ueInfo = NULLP;
3602    CtfUeInfo *newUeInfo = NULLP;
3603    
3604    TRC3(cmUnpkCtfUeIdChgReq)
3605
3606    if (SUnpkS16(&spId, mBuf) != ROK) {
3607       SPutMsg(mBuf);
3608 #if (ERRCLASS & ERRCLS_ADD_RES)
3609       /* ctf_c_001.main_3 Compilation warning fix with g++ */
3610       SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
3611         (Txt*)& __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
3612          (ErrVal)ECTF042, (ErrVal)0, (Txt*)&"Packing failed");
3613 #endif
3614       return RFAILED;
3615    }
3616    if (cmUnpkCtfCfgTransId(&transId, mBuf) != ROK) {
3617       SPutMsg(mBuf);
3618 #if (ERRCLASS & ERRCLS_ADD_RES)
3619       /* ctf_c_001.main_3 Compilation warning fix with g++ */
3620       SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
3621          (Txt*)&__FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
3622          (ErrVal)ECTF043, (ErrVal)0, (Txt*)&"Packing failed");
3623 #endif
3624       return RFAILED;
3625    }
3626    if (pst->selector != ODU_SELECTOR_LWLC) {
3627       if ((SGetSBuf(pst->region, pst->pool, (Data **)&ueInfo, sizeof(CtfUeInfo))) != ROK) {
3628 #if (ERRCLASS & ERRCLS_ADD_RES)
3629       /* ctf_c_001.main_3 Compilation warning fix with g++ */
3630          SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
3631             (Txt*)&__FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
3632             (ErrVal)ECTF044, (ErrVal)0, (Txt*)&"Packing failed");
3633 #endif
3634          SPutMsg(mBuf);
3635          return RFAILED;
3636       }
3637    }
3638    if (pst->selector == ODU_SELECTOR_LWLC) {
3639       if (oduUnpackPointer((PTR *)&ueInfo, mBuf) != ROK) {
3640          SPutMsg(mBuf);
3641          return RFAILED;
3642       }
3643    }
3644    else if (pst->selector == ODU_SELECTOR_LC) 
3645       if (cmUnpkCtfUeInfo(ueInfo, mBuf) != ROK) {
3646       SPutSBuf(pst->region, pst->pool, (Data *)ueInfo, sizeof(CtfUeInfo));
3647       SPutMsg(mBuf);
3648 #if (ERRCLASS & ERRCLS_ADD_RES)
3649       /* ctf_c_001.main_3 Compilation warning fix with g++ */
3650       SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
3651          (Txt*)&__FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
3652          (ErrVal)ECTF045, (ErrVal)0, (Txt*)&"Packing failed");
3653 #endif
3654       return RFAILED;
3655    }
3656    if (pst->selector != ODU_SELECTOR_LWLC) {
3657       if ((SGetSBuf(pst->region, pst->pool, (Data **)&newUeInfo, sizeof(CtfUeInfo))) != ROK) {
3658 #if (ERRCLASS & ERRCLS_ADD_RES)
3659       /* ctf_c_001.main_3 Compilation warning fix with g++ */
3660          SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
3661             (Txt*)&__FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
3662             (ErrVal)ECTF046, (ErrVal)0, (Txt*)&"Packing failed");
3663 #endif
3664          SPutMsg(mBuf);
3665          SPutSBuf(pst->region, pst->pool, (Data *)ueInfo, sizeof(CtfUeInfo));
3666          return RFAILED;
3667       }
3668    }
3669    if (pst->selector == ODU_SELECTOR_LWLC) {
3670       if (oduUnpackPointer((PTR *)&newUeInfo, mBuf) != ROK) {
3671          SPutMsg(mBuf);
3672          return RFAILED;
3673       }
3674    }
3675    else if (pst->selector == ODU_SELECTOR_LC) 
3676       if (cmUnpkCtfUeInfo(newUeInfo, mBuf) != ROK) {
3677       SPutSBuf(pst->region, pst->pool, (Data *)ueInfo, sizeof(CtfUeInfo));
3678       SPutSBuf(pst->region, pst->pool, (Data *)newUeInfo, sizeof(CtfUeInfo));
3679       SPutMsg(mBuf);
3680 #if (ERRCLASS & ERRCLS_ADD_RES)
3681       /* ctf_c_001.main_3 Compilation warning fix with g++ */
3682       SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
3683          (Txt*)&__FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
3684          (ErrVal)ECTF047, (ErrVal)0, (Txt*)&"Packing failed");
3685 #endif
3686       return RFAILED;
3687    }
3688    SPutMsg(mBuf);
3689    return ((*func)(pst, spId, transId, ueInfo, newUeInfo));
3690 }
3691
3692 \f
3693 /**
3694 * @brief UE ID Change Confirm from PHY to RRC.
3695 *
3696 * @details
3697 *
3698 *     Function: cmPkCtfUeIdChgCfm
3699 *
3700 *  @param[in]   Pst*  pst
3701 *  @param[in]   SuId  suId
3702 *  @param[in]   CtfCfgTransId  transId
3703 *  @param[in]   CtfUeInfo *  ueInfo
3704 *  @param[in]   U8  status
3705 *  @return   S16
3706 *      -# ROK
3707 **/
3708 #ifdef ANSI
3709 PUBLIC S16 cmPkCtfUeIdChgCfm
3710 (
3711 Pst* pst,
3712 SuId suId,
3713 CtfCfgTransId transId,
3714 CtfUeInfo * ueInfo,
3715 CmStatus status
3716 )
3717 #else
3718 PUBLIC S16 cmPkCtfUeIdChgCfm(pst, suId, transId, ueInfo, status)
3719 Pst* pst;
3720 SuId suId;
3721 CtfCfgTransId transId;
3722 CtfUeInfo * ueInfo;
3723 CmStatus status;
3724 #endif
3725 {
3726    Buffer *mBuf = NULLP;
3727    TRC3(cmPkCtfUeIdChgCfm)
3728
3729    if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) {
3730 #if (ERRCLASS & ERRCLS_ADD_RES)
3731       /* ctf_c_001.main_3 Compilation warning fix with g++ */
3732       SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
3733          (Txt*)&__FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
3734          (ErrVal)ECTF048, (ErrVal)0, (Txt*)&"Packing failed");
3735 #endif
3736       SPutSBuf(pst->region, pst->pool, (Data *)ueInfo, sizeof(CtfUeInfo));
3737       return RFAILED;
3738    }
3739    if (cmPkCmStatus(&status, mBuf) != ROK) {
3740 #if (ERRCLASS & ERRCLS_ADD_RES)
3741       /* ctf_c_001.main_3 Compilation warning fix with g++ */
3742       SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
3743          (Txt*)&__FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
3744          (ErrVal)ECTF049, (ErrVal)0, (Txt*)&"Packing failed");
3745 #endif
3746       SPutSBuf(pst->region, pst->pool, (Data *)ueInfo, sizeof(CtfUeInfo));
3747       SPutMsg(mBuf);
3748       return RFAILED;
3749    }
3750    if (pst->selector == ODU_SELECTOR_LC) {
3751       if (cmPkCtfUeInfo(ueInfo, mBuf) != ROK) {
3752 #if (ERRCLASS & ERRCLS_ADD_RES)
3753       /* ctf_c_001.main_3 Compilation warning fix with g++ */
3754          SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
3755             (Txt*)&__FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
3756             (ErrVal)ECTF050, (ErrVal)0, (Txt*)&"Packing failed");
3757 #endif
3758          SPutSBuf(pst->region, pst->pool, (Data *)ueInfo, sizeof(CtfUeInfo));
3759          SPutMsg(mBuf);
3760          return RFAILED;
3761       }
3762    }
3763    else if (pst->selector == ODU_SELECTOR_LWLC) {
3764       if (oduPackPointer((PTR)ueInfo, mBuf) != ROK) {
3765 #if (ERRCLASS & ERRCLS_ADD_RES)
3766       /* ctf_c_001.main_3 Compilation warning fix with g++ */
3767          SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
3768             (Txt*)&__FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
3769             (ErrVal)ECTF051, (ErrVal)0, (Txt*)&"Packing failed");
3770 #endif
3771          SPutSBuf(pst->region, pst->pool, (Data *)ueInfo, sizeof(CtfUeInfo));
3772          SPutMsg(mBuf);
3773          return RFAILED;
3774       }
3775    }
3776    if (cmPkCtfCfgTransId(&transId, mBuf) != ROK) {
3777 #if (ERRCLASS & ERRCLS_ADD_RES)
3778       /* ctf_c_001.main_3 Compilation warning fix with g++ */
3779       SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
3780          (Txt*)&__FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
3781          (ErrVal)ECTF052, (ErrVal)0, (Txt*)&"Packing failed");
3782 #endif
3783       SPutSBuf(pst->region, pst->pool, (Data *)ueInfo, sizeof(CtfUeInfo));
3784       SPutMsg(mBuf);
3785       return RFAILED;
3786    }
3787    if (SPkS16(suId, mBuf) != ROK) {
3788 #if (ERRCLASS & ERRCLS_ADD_RES)
3789       /* ctf_c_001.main_3 Compilation warning fix with g++ */
3790       SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
3791          (Txt*)&__FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
3792          (ErrVal)ECTF053, (ErrVal)0, (Txt*)&"Packing failed");
3793 #endif
3794       SPutSBuf(pst->region, pst->pool, (Data *)ueInfo, sizeof(CtfUeInfo));
3795       SPutMsg(mBuf);
3796       return RFAILED;
3797    }
3798    if (pst->selector != ODU_SELECTOR_LWLC) {
3799       if (SPutSBuf(pst->region, pst->pool, (Data *)ueInfo, sizeof(CtfUeInfo)) != ROK) {
3800 #if (ERRCLASS & ERRCLS_ADD_RES)
3801       /* ctf_c_001.main_3 Compilation warning fix with g++ */
3802       SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
3803          (Txt*)&__FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
3804          (ErrVal)ECTF054, (ErrVal)0, (Txt*)&"Packing failed");
3805 #endif
3806          SPutMsg(mBuf);
3807          return RFAILED;
3808       }
3809    }
3810    pst->event = (Event) EVTCTFUEIDCHGCFM;
3811    return (SPstTsk(pst,mBuf));
3812 }
3813
3814 \f
3815 /**
3816 * @brief UE ID Change Confirm from PHY to RRC.
3817 *
3818 * @details
3819 *
3820 *     Function: cmUnpkCtfUeIdChgCfm
3821 *
3822 *  @param[in]   Pst*  pst
3823 *  @param[in]   SuId  suId
3824 *  @param[in]   CtfCfgTransId  transId
3825 *  @param[in]   CtfUeInfo *  ueInfo
3826 *  @param[in]   U8  status
3827 *  @return   S16
3828 *      -# ROK
3829 **/
3830 #ifdef ANSI
3831 PUBLIC S16 cmUnpkCtfUeIdChgCfm
3832 (
3833 CtfUeIdChgCfm func,
3834 Pst *pst,
3835 Buffer *mBuf
3836 )
3837 #else
3838 PUBLIC S16 cmUnpkCtfUeIdChgCfm(func, pst, mBuf)
3839 CtfUeIdChgCfm func;
3840 Pst *pst;
3841 Buffer *mBuf;
3842 #endif
3843 {
3844    SuId suId = 0;
3845    CtfCfgTransId transId;
3846    CtfUeInfo *ueInfo = NULLP;
3847    CmStatus status;
3848    
3849    TRC3(cmUnpkCtfUeIdChgCfm)
3850
3851    if (SUnpkS16(&suId, mBuf) != ROK) {
3852       SPutMsg(mBuf);
3853 #if (ERRCLASS & ERRCLS_ADD_RES)
3854       /* ctf_c_001.main_3 Compilation warning fix with g++ */
3855       SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
3856          (Txt*)&__FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
3857          (ErrVal)ECTF055, (ErrVal)0, (Txt*)&"Packing failed");
3858 #endif
3859       return RFAILED;
3860    }
3861    if (cmUnpkCtfCfgTransId(&transId, mBuf) != ROK) {
3862       SPutMsg(mBuf);
3863 #if (ERRCLASS & ERRCLS_ADD_RES)
3864       /* ctf_c_001.main_3 Compilation warning fix with g++ */
3865       SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
3866          (Txt*)&__FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
3867          (ErrVal)ECTF056, (ErrVal)0, (Txt*)&"Packing failed");
3868 #endif
3869       return RFAILED;
3870    }
3871    if (pst->selector != ODU_SELECTOR_LWLC) {
3872       if ((SGetSBuf(pst->region, pst->pool, (Data **)&ueInfo, sizeof(CtfUeInfo))) != ROK) {
3873 #if (ERRCLASS & ERRCLS_ADD_RES)
3874       /* ctf_c_001.main_3 Compilation warning fix with g++ */
3875          SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
3876             (Txt*)&__FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
3877             (ErrVal)ECTF057, (ErrVal)0, (Txt*)&"Packing failed");
3878 #endif
3879          SPutMsg(mBuf);
3880          return RFAILED;
3881       }
3882    }
3883    if (pst->selector == ODU_SELECTOR_LWLC) {
3884       if (oduUnpackPointer((PTR *)&ueInfo, mBuf) != ROK) {
3885          SPutMsg(mBuf);
3886          return RFAILED;
3887       }
3888    }
3889    else if (pst->selector == ODU_SELECTOR_LC) 
3890       if (cmUnpkCtfUeInfo(ueInfo, mBuf) != ROK) {
3891       SPutSBuf(pst->region, pst->pool, (Data *)ueInfo, sizeof(CtfUeInfo));
3892       SPutMsg(mBuf);
3893 #if (ERRCLASS & ERRCLS_ADD_RES)
3894       /* ctf_c_001.main_3 Compilation warning fix with g++ */
3895       SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
3896          (Txt*)&__FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
3897          (ErrVal)ECTF058, (ErrVal)0, (Txt*)&"Packing failed");
3898 #endif
3899       return RFAILED;
3900    }
3901    if (cmUnpkCmStatus(&status, mBuf) != ROK) {
3902       SPutSBuf(pst->region, pst->pool, (Data *)ueInfo, sizeof(CtfUeInfo));
3903       SPutMsg(mBuf);
3904 #if (ERRCLASS & ERRCLS_ADD_RES)
3905       /* ctf_c_001.main_3 Compilation warning fix with g++ */
3906       SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
3907          (Txt*)&__FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
3908          (ErrVal)ECTF059, (ErrVal)0, (Txt*)&"Packing failed");
3909 #endif
3910       return RFAILED;
3911    }
3912    SPutMsg(mBuf);
3913    return ((*func)(pst, suId, transId, ueInfo, status));
3914 }
3915
3916 \f
3917 /***********************************************************
3918 *
3919 *     Func: cmPkCtfCfgTransId
3920 *
3921 *
3922 *     Desc: Transaction ID between CTF and RRC.
3923 *
3924 *
3925 *     Ret: S16
3926 *
3927 *     Notes:
3928 *
3929 *     File: 
3930 *
3931 **********************************************************/
3932 #ifdef ANSI
3933 PUBLIC S16 cmPkCtfCfgTransId
3934 (
3935 CtfCfgTransId *param,
3936 Buffer *mBuf
3937 )
3938 #else
3939 PUBLIC S16 cmPkCtfCfgTransId(param, mBuf)
3940 CtfCfgTransId *param;
3941 Buffer *mBuf;
3942 #endif
3943 {
3944
3945    S32 i;
3946    TRC3(cmPkCtfCfgTransId)
3947
3948    for (i=CTF_CFG_TRANSID_SIZE-1; i >= 0; i--) {
3949       CMCHKPK(oduUnpackUInt8, param->trans[i], mBuf);
3950    }
3951    return ROK;
3952 }
3953
3954
3955 \f
3956 /***********************************************************
3957 *
3958 *     Func: cmUnpkCtfCfgTransId
3959 *
3960 *
3961 *     Desc: Transaction ID between CTF and RRC.
3962 *
3963 *
3964 *     Ret: S16
3965 *
3966 *     Notes:
3967 *
3968 *     File: 
3969 *
3970 **********************************************************/
3971 #ifdef ANSI
3972 PUBLIC S16 cmUnpkCtfCfgTransId
3973 (
3974 CtfCfgTransId *param,
3975 Buffer *mBuf
3976 )
3977 #else
3978 PUBLIC S16 cmUnpkCtfCfgTransId(param, mBuf)
3979 CtfCfgTransId *param;
3980 Buffer *mBuf;
3981 #endif
3982 {
3983
3984    S32 i;
3985    TRC3(cmUnpkCtfCfgTransId)
3986
3987    for (i=0; i<CTF_CFG_TRANSID_SIZE; i++) {
3988       CMCHKUNPK(oduPackUInt8, &param->trans[i], mBuf);
3989    }
3990    return ROK;
3991 }
3992
3993
3994 \f
3995 /***********************************************************
3996 *
3997 *     Func: cmPkCtfUeInfo
3998 *
3999 *
4000 *     Desc: *  UE ID information
4001 *
4002 *
4003 *     Ret: S16
4004 *
4005 *     Notes:
4006 *
4007 *     File: 
4008 *
4009 **********************************************************/
4010 #ifdef ANSI
4011 PUBLIC S16 cmPkCtfUeInfo
4012 (
4013 CtfUeInfo *param,
4014 Buffer *mBuf
4015 )
4016 #else
4017 PUBLIC S16 cmPkCtfUeInfo(param, mBuf)
4018 CtfUeInfo *param;
4019 Buffer *mBuf;
4020 #endif
4021 {
4022
4023    TRC3(cmPkCtfUeInfo)
4024
4025    CMCHKPK(cmPkLteRnti, param->ueId, mBuf);
4026    CMCHKPK(cmPkLteCellId, param->cellId, mBuf);
4027    return ROK;
4028 }
4029
4030
4031 \f
4032 /***********************************************************
4033 *
4034 *     Func: cmUnpkCtfUeInfo
4035 *
4036 *
4037 *     Desc: *  UE ID information
4038 *
4039 *
4040 *     Ret: S16
4041 *
4042 *     Notes:
4043 *
4044 *     File: 
4045 *
4046 **********************************************************/
4047 #ifdef ANSI
4048 PUBLIC S16 cmUnpkCtfUeInfo
4049 (
4050 CtfUeInfo *param,
4051 Buffer *mBuf
4052 )
4053 #else
4054 PUBLIC S16 cmUnpkCtfUeInfo(param, mBuf)
4055 CtfUeInfo *param;
4056 Buffer *mBuf;
4057 #endif
4058 {
4059
4060    TRC3(cmUnpkCtfUeInfo)
4061
4062    CMCHKUNPK(cmUnpkLteCellId, &param->cellId, mBuf);
4063    CMCHKUNPK(cmUnpkLteRnti, &param->ueId, mBuf);
4064    return ROK;
4065 }
4066
4067
4068 \f
4069 /***********************************************************
4070 *
4071 *     Func: cmPkCtfBwCfgInfo
4072 *
4073 *
4074 *     Desc:   Bandwidth Configuration
4075  * @details This structure contains the uplink and downlink bandwidth 
4076  *          information for configuration at PHY.
4077 *
4078 *
4079 *     Ret: S16
4080 *
4081 *     Notes:
4082 *
4083 *     File: 
4084 *
4085 **********************************************************/
4086 #ifdef ANSI
4087 PUBLIC S16 cmPkCtfBwCfgInfo
4088 (
4089 CtfBwCfgInfo *param,
4090 Buffer *mBuf
4091 )
4092 #else
4093 PUBLIC S16 cmPkCtfBwCfgInfo(param, mBuf)
4094 CtfBwCfgInfo *param;
4095 Buffer *mBuf;
4096 #endif
4097 {
4098
4099    TRC3(cmPkCtfBwCfgInfo)
4100
4101    CMCHKPK(oduUnpackUInt8, param->eUtraBand, mBuf);
4102    CMCHKPK(oduUnpackUInt32, param->ulBw, mBuf);
4103    CMCHKPK(oduUnpackUInt32, param->dlBw, mBuf);
4104    /* ctf_c_001.main_4: Removed packing of param->pres */
4105    return ROK;
4106 }
4107
4108
4109 \f
4110 /***********************************************************
4111 *
4112 *     Func: cmUnpkCtfBwCfgInfo
4113 *
4114 *
4115 *     Desc:   Bandwidth Configuration
4116  * @details This structure contains the uplink and downlink bandwidth 
4117  *          information for configuration at PHY.
4118 *
4119 *
4120 *     Ret: S16
4121 *
4122 *     Notes:
4123 *
4124 *     File: 
4125 *
4126 **********************************************************/
4127 #ifdef ANSI
4128 PUBLIC S16 cmUnpkCtfBwCfgInfo
4129 (
4130 CtfBwCfgInfo *param,
4131 Buffer *mBuf
4132 )
4133 #else
4134 PUBLIC S16 cmUnpkCtfBwCfgInfo(param, mBuf)
4135 CtfBwCfgInfo *param;
4136 Buffer *mBuf;
4137 #endif
4138 {
4139
4140    U32 tmpEnum;
4141    TRC3(cmUnpkCtfBwCfgInfo)
4142
4143    /* ctf_c_001.main_4: Removed UnPacking of param->pres */
4144    CMCHKUNPK(oduPackUInt32, (U32 *)&tmpEnum, mBuf);
4145    param->dlBw = (CtfBandwidth)tmpEnum;
4146    CMCHKUNPK(oduPackUInt32, (U32 *)&tmpEnum, mBuf);
4147    param->ulBw = (CtfBandwidth)tmpEnum;
4148    CMCHKUNPK(oduPackUInt8, &param->eUtraBand, mBuf);
4149    return ROK;
4150 }
4151
4152
4153 \f
4154 /***********************************************************
4155 *
4156 *     Func: cmPkCtfTxSchemeCfg
4157 *
4158 *
4159 *     Desc:   Transmission Scheme Configuration
4160  * @details This structure contains the transmission scheme related information.
4161 *
4162 *
4163 *     Ret: S16
4164 *
4165 *     Notes:
4166 *
4167 *     File: 
4168 *
4169 **********************************************************/
4170 #ifdef ANSI
4171 PUBLIC S16 cmPkCtfTxSchemeCfg
4172 (
4173 CtfTxSchemeCfg *param,
4174 Buffer *mBuf
4175 )
4176 #else
4177 PUBLIC S16 cmPkCtfTxSchemeCfg(param, mBuf)
4178 CtfTxSchemeCfg *param;
4179 Buffer *mBuf;
4180 #endif
4181 {
4182
4183    TRC3(cmPkCtfTxSchemeCfg)
4184
4185    CMCHKPK(oduUnpackUInt32, param->cycPfx, mBuf);
4186    CMCHKPK(oduUnpackUInt32, param->scSpacing, mBuf);
4187    CMCHKPK(oduUnpackUInt32, param->duplexMode, mBuf);
4188    /* ctf_c_001.main_4: Removed packing of param->pres */
4189    return ROK;
4190 }
4191
4192
4193 \f
4194 /***********************************************************
4195 *
4196 *     Func: cmUnpkCtfTxSchemeCfg
4197 *
4198 *
4199 *     Desc:   Transmission Scheme Configuration
4200  * @details This structure contains the transmission scheme related information.
4201 *
4202 *
4203 *     Ret: S16
4204 *
4205 *     Notes:
4206 *
4207 *     File: 
4208 *
4209 **********************************************************/
4210 #ifdef ANSI
4211 PUBLIC S16 cmUnpkCtfTxSchemeCfg
4212 (
4213 CtfTxSchemeCfg *param,
4214 Buffer *mBuf
4215 )
4216 #else
4217 PUBLIC S16 cmUnpkCtfTxSchemeCfg(param, mBuf)
4218 CtfTxSchemeCfg *param;
4219 Buffer *mBuf;
4220 #endif
4221 {
4222    U32 tmpEnum;
4223
4224    TRC3(cmUnpkCtfTxSchemeCfg)
4225
4226    /* ctf_c_001.main_4: Removed UnPacking of param->pres */
4227    CMCHKUNPK(oduPackUInt32, (U32 *)&tmpEnum, mBuf);
4228    param->duplexMode = (CtfDuplexMode)tmpEnum;
4229    CMCHKUNPK(oduPackUInt32, (U32 *)&tmpEnum, mBuf);
4230    param->scSpacing = (CtfSCSpacing)tmpEnum;
4231    CMCHKUNPK(oduPackUInt32, (U32 *)&tmpEnum, mBuf);
4232    param->cycPfx = (CtfCPCfg)tmpEnum;
4233    return ROK;
4234 }
4235
4236
4237 \f
4238 /***********************************************************
4239 *
4240 *     Func: cmPkCtfAntennaCfgInfo
4241 *
4242 *
4243 *     Desc:   Antenna Ports configuration
4244  * @details This structure contains the antenna configuration information for 
4245  *          configuration at PHY.
4246 *
4247 *
4248 *     Ret: S16
4249 *
4250 *     Notes:
4251 *
4252 *     File: 
4253 *
4254 **********************************************************/
4255 #ifdef ANSI
4256 PUBLIC S16 cmPkCtfAntennaCfgInfo
4257 (
4258 CtfAntennaCfgInfo *param,
4259 Buffer *mBuf
4260 )
4261 #else
4262 PUBLIC S16 cmPkCtfAntennaCfgInfo(param, mBuf)
4263 CtfAntennaCfgInfo *param;
4264 Buffer *mBuf;
4265 #endif
4266 {
4267
4268    TRC3(cmPkCtfAntennaCfgInfo)
4269
4270    CMCHKPK(oduUnpackUInt32, param->antPortsCnt, mBuf);
4271    return ROK;
4272 }
4273
4274
4275 \f
4276 /***********************************************************
4277 *
4278 *     Func: cmUnpkCtfAntennaCfgInfo
4279 *
4280 *
4281 *     Desc:   Antenna Ports configuration
4282  * @details This structure contains the antenna configuration information for 
4283  *          configuration at PHY.
4284 *
4285 *
4286 *     Ret: S16
4287 *
4288 *     Notes:
4289 *
4290 *     File: 
4291 *
4292 **********************************************************/
4293 #ifdef ANSI
4294 PUBLIC S16 cmUnpkCtfAntennaCfgInfo
4295 (
4296 CtfAntennaCfgInfo *param,
4297 Buffer *mBuf
4298 )
4299 #else
4300 PUBLIC S16 cmUnpkCtfAntennaCfgInfo(param, mBuf)
4301 CtfAntennaCfgInfo *param;
4302 Buffer *mBuf;
4303 #endif
4304 {
4305    U32 tmpEnum;
4306
4307    TRC3(cmUnpkCtfAntennaCfgInfo)
4308    CMCHKUNPK(oduPackUInt32, (U32 *)&tmpEnum, mBuf);
4309    param->antPortsCnt = (CtfAntennaPortsCount)tmpEnum;
4310    return ROK;
4311 }
4312
4313
4314 \f
4315 /***********************************************************
4316 *
4317 *     Func: cmPkCtfPrachCfgInfo
4318 *
4319 *
4320 *     Desc:   PRACH configuration
4321  * @details This structure contains the configuration information for PRACH at PHY.
4322  *          -# PRACH preamble sequences are generated by PHY using Zadoff-Chu 
4323  *             sequences.[Ref: 36.211, 5.7.2]
4324  *          -# PRACH preamble format is derived from PRACH Configuration Index.
4325  *             [Ref: 36.211, Table 5.7.1-2]
4326  *          -# PrachFreqOffset is the first physical resource block allocated to 
4327  *             the PRACH opportunity considered for preamble format 0, 1, 2, and 3.
4328  *             [Ref: 36.211, 5.7.1]
4329 *
4330 *
4331 *     Ret: S16
4332 *
4333 *     Notes:
4334 *
4335 *     File: 
4336 *
4337 **********************************************************/
4338 #ifdef ANSI
4339 PUBLIC S16 cmPkCtfPrachCfgInfo
4340 (
4341 CtfPrachCfgInfo *param,
4342 Buffer *mBuf
4343 )
4344 #else
4345 PUBLIC S16 cmPkCtfPrachCfgInfo(param, mBuf)
4346 CtfPrachCfgInfo *param;
4347 Buffer *mBuf;
4348 #endif
4349 {
4350
4351    TRC3(cmPkCtfPrachCfgInfo)
4352
4353    /*ctf_c_001.main_1*/
4354    if(param->pres != FALSE)
4355    {
4356       CMCHKPK(oduUnpackUInt8, param->prachFreqOffset, mBuf);
4357       CMCHKPK(oduUnpackUInt8, param->highSpeedFlag, mBuf);
4358       CMCHKPK(oduUnpackUInt8, param->zeroCorrelationZoneCfg, mBuf);
4359       CMCHKPK(oduUnpackUInt8, param->prachCfgIndex, mBuf);
4360       CMCHKPK(oduUnpackUInt16, param->rootSequenceIndex, mBuf);
4361    }
4362    CMCHKPK(oduUnpackUInt8, param->pres, mBuf);
4363    return ROK;
4364 }
4365
4366
4367 \f
4368 /***********************************************************
4369 *
4370 *     Func: cmUnpkCtfPrachCfgInfo
4371 *
4372 *
4373 *     Desc:   PRACH configuration
4374  * @details This structure contains the configuration information for PRACH at PHY.
4375  *          -# PRACH preamble sequences are generated by PHY using Zadoff-Chu 
4376  *             sequences.[Ref: 36.211, 5.7.2]
4377  *          -# PRACH preamble format is derived from PRACH Configuration Index.
4378  *             [Ref: 36.211, Table 5.7.1-2]
4379  *          -# PrachFreqOffset is the first physical resource block allocated to 
4380  *             the PRACH opportunity considered for preamble format 0, 1, 2, and 3.
4381  *             [Ref: 36.211, 5.7.1]
4382 *
4383 *
4384 *     Ret: S16
4385 *
4386 *     Notes:
4387 *
4388 *     File: 
4389 *
4390 **********************************************************/
4391 #ifdef ANSI
4392 PUBLIC S16 cmUnpkCtfPrachCfgInfo
4393 (
4394 CtfPrachCfgInfo *param,
4395 Buffer *mBuf
4396 )
4397 #else
4398 PUBLIC S16 cmUnpkCtfPrachCfgInfo(param, mBuf)
4399 CtfPrachCfgInfo *param;
4400 Buffer *mBuf;
4401 #endif
4402 {
4403
4404    TRC3(cmUnpkCtfPrachCfgInfo)
4405
4406    CMCHKUNPK(oduPackUInt8, &param->pres, mBuf);
4407 /*ctf_c_001.main_1*/
4408    if(param->pres != FALSE)
4409    {
4410       CMCHKUNPK(oduPackUInt16, &param->rootSequenceIndex, mBuf);
4411       CMCHKUNPK(oduPackUInt8, &param->prachCfgIndex, mBuf);
4412       CMCHKUNPK(oduPackUInt8, &param->zeroCorrelationZoneCfg, mBuf);
4413       CMCHKUNPK(oduPackUInt8, &param->highSpeedFlag, mBuf);
4414       CMCHKUNPK(oduPackUInt8, &param->prachFreqOffset, mBuf);
4415    }
4416    return ROK;
4417 }
4418
4419
4420 \f
4421 /***********************************************************
4422 *
4423 *     Func: cmPkCtfPdschCfgInfo
4424 *
4425 *
4426 *     Desc:   PDSCH configuration
4427  * @details This structure contains the PDSCH configuration information for 
4428  *          configuration at PHY.
4429 *
4430 *
4431 *     Ret: S16
4432 *
4433 *     Notes:
4434 *
4435 *     File: 
4436 *
4437 **********************************************************/
4438 #ifdef ANSI
4439 PUBLIC S16 cmPkCtfPdschCfgInfo
4440 (
4441 CtfPdschCfgInfo *param,
4442 Buffer *mBuf
4443 )
4444 #else
4445 PUBLIC S16 cmPkCtfPdschCfgInfo(param, mBuf)
4446 CtfPdschCfgInfo *param;
4447 Buffer *mBuf;
4448 #endif
4449 {
4450
4451    TRC3(cmPkCtfPdschCfgInfo)
4452 /*ctf_c_001.main_1*/
4453    if(param->pres != FALSE)
4454    {
4455       CMCHKPK(oduUnpackUInt8, param->p_b, mBuf);
4456       CMCHKPK(SPkS16, param->refSigPwr, mBuf);
4457    }
4458    CMCHKPK(oduUnpackUInt8, param->pres, mBuf);
4459    return ROK;
4460 }
4461
4462
4463 \f
4464 /***********************************************************
4465 *
4466 *     Func: cmUnpkCtfPdschCfgInfo
4467 *
4468 *
4469 *     Desc:   PDSCH configuration
4470  * @details This structure contains the PDSCH configuration information for 
4471  *          configuration at PHY.
4472 *
4473 *
4474 *     Ret: S16
4475 *
4476 *     Notes:
4477 *
4478 *     File: 
4479 *
4480 **********************************************************/
4481 #ifdef ANSI
4482 PUBLIC S16 cmUnpkCtfPdschCfgInfo
4483 (
4484 CtfPdschCfgInfo *param,
4485 Buffer *mBuf
4486 )
4487 #else
4488 PUBLIC S16 cmUnpkCtfPdschCfgInfo(param, mBuf)
4489 CtfPdschCfgInfo *param;
4490 Buffer *mBuf;
4491 #endif
4492 {
4493
4494    TRC3(cmUnpkCtfPdschCfgInfo)
4495
4496    CMCHKUNPK(oduPackUInt8, &param->pres, mBuf);
4497 /*ctf_c_001.main_1*/
4498    if(param->pres != FALSE)
4499    {
4500      CMCHKUNPK(SUnpkS16, &param->refSigPwr, mBuf);
4501      CMCHKUNPK(oduPackUInt8, &param->p_b, mBuf);
4502    }
4503    return ROK;
4504 }
4505
4506
4507 \f
4508 /***********************************************************
4509 *
4510 *     Func: cmPkCtfPuschCfgBasic
4511 *
4512 *
4513 *     Desc:   Basic PUSCH configuration
4514  * @details This structure contains the basic PUSCH configuration information for 
4515  *          configuration at PHY.
4516 *
4517 *
4518 *     Ret: S16
4519 *
4520 *     Notes:
4521 *
4522 *     File: 
4523 *
4524 **********************************************************/
4525 #ifdef ANSI
4526 PUBLIC S16 cmPkCtfPuschCfgBasic
4527 (
4528 CtfPuschCfgBasic *param,
4529 Buffer *mBuf
4530 )
4531 #else
4532 PUBLIC S16 cmPkCtfPuschCfgBasic(param, mBuf)
4533 CtfPuschCfgBasic *param;
4534 Buffer *mBuf;
4535 #endif
4536 {
4537
4538    TRC3(cmPkCtfPuschCfgBasic)
4539
4540    CMCHKPK(oduUnpackUInt8, param->enable64QAM, mBuf);
4541    CMCHKPK(oduUnpackUInt8, param->hoppingOffset, mBuf);
4542    CMCHKPK(oduUnpackUInt32, param->hoppingMode, mBuf);
4543    CMCHKPK(oduUnpackUInt8, param->noOfsubBands, mBuf);
4544    return ROK;
4545 }
4546
4547
4548 \f
4549 /***********************************************************
4550 *
4551 *     Func: cmUnpkCtfPuschCfgBasic
4552 *
4553 *
4554 *     Desc:   Basic PUSCH configuration
4555  * @details This structure contains the basic PUSCH configuration information for 
4556  *          configuration at PHY.
4557 *
4558 *
4559 *     Ret: S16
4560 *
4561 *     Notes:
4562 *
4563 *     File: 
4564 *
4565 **********************************************************/
4566 #ifdef ANSI
4567 PUBLIC S16 cmUnpkCtfPuschCfgBasic
4568 (
4569 CtfPuschCfgBasic *param,
4570 Buffer *mBuf
4571 )
4572 #else
4573 PUBLIC S16 cmUnpkCtfPuschCfgBasic(param, mBuf)
4574 CtfPuschCfgBasic *param;
4575 Buffer *mBuf;
4576 #endif
4577 {
4578    U32 tmpEnum;
4579
4580    TRC3(cmUnpkCtfPuschCfgBasic)
4581
4582    CMCHKUNPK(oduPackUInt8, &param->noOfsubBands, mBuf);
4583    CMCHKUNPK(oduPackUInt32, (U32 *)&tmpEnum, mBuf);
4584    param->hoppingMode = (CtfPuschHoppingMode)tmpEnum;
4585    CMCHKUNPK(oduPackUInt8, &param->hoppingOffset, mBuf);
4586    CMCHKUNPK(oduPackUInt8, &param->enable64QAM, mBuf);
4587    return ROK;
4588 }
4589
4590
4591 \f
4592 /***********************************************************
4593 *
4594 *     Func: cmPkCtfPuschUlRS
4595 *
4596 *
4597 *     Desc:   PUSCH Uplink Reference Signals configuration
4598  * @details This structure contains the PUSCH configuration information for 
4599  *          uplink reference signals configuration at PHY.
4600 *
4601 *
4602 *     Ret: S16
4603 *
4604 *     Notes:
4605 *
4606 *     File: 
4607 *
4608 **********************************************************/
4609 #ifdef ANSI
4610 PUBLIC S16 cmPkCtfPuschUlRS
4611 (
4612 CtfPuschUlRS *param,
4613 Buffer *mBuf
4614 )
4615 #else
4616 PUBLIC S16 cmPkCtfPuschUlRS(param, mBuf)
4617 CtfPuschUlRS *param;
4618 Buffer *mBuf;
4619 #endif
4620 {
4621
4622    TRC3(cmPkCtfPuschUlRS)
4623
4624    CMCHKPK(oduUnpackUInt8, param->cycShift, mBuf);
4625    CMCHKPK(oduUnpackUInt8, param->grpNum, mBuf);
4626    CMCHKPK(oduUnpackUInt8, param->seqHopEnabled, mBuf);
4627    CMCHKPK(oduUnpackUInt8, param->grpHopEnabled, mBuf);
4628    return ROK;
4629 }
4630
4631
4632 \f
4633 /***********************************************************
4634 *
4635 *     Func: cmUnpkCtfPuschUlRS
4636 *
4637 *
4638 *     Desc:   PUSCH Uplink Reference Signals configuration
4639  * @details This structure contains the PUSCH configuration information for 
4640  *          uplink reference signals configuration at PHY.
4641 *
4642 *
4643 *     Ret: S16
4644 *
4645 *     Notes:
4646 *
4647 *     File: 
4648 *
4649 **********************************************************/
4650 #ifdef ANSI
4651 PUBLIC S16 cmUnpkCtfPuschUlRS
4652 (
4653 CtfPuschUlRS *param,
4654 Buffer *mBuf
4655 )
4656 #else
4657 PUBLIC S16 cmUnpkCtfPuschUlRS(param, mBuf)
4658 CtfPuschUlRS *param;
4659 Buffer *mBuf;
4660 #endif
4661 {
4662
4663    TRC3(cmUnpkCtfPuschUlRS)
4664
4665    CMCHKUNPK(oduPackUInt8, &param->grpHopEnabled, mBuf);
4666    CMCHKUNPK(oduPackUInt8, &param->seqHopEnabled, mBuf);
4667    CMCHKUNPK(oduPackUInt8, &param->grpNum, mBuf);
4668    CMCHKUNPK(oduPackUInt8, &param->cycShift, mBuf);
4669    return ROK;
4670 }
4671
4672
4673 \f
4674 /***********************************************************
4675 *
4676 *     Func: cmPkCtfPuschCfgInfo
4677 *
4678 *
4679 *     Desc:   PUSCH configuration
4680  * @details This structure contains the information for PUSCH 
4681  *          configuration at PHY.
4682 *
4683 *
4684 *     Ret: S16
4685 *
4686 *     Notes:
4687 *
4688 *     File: 
4689 *
4690 **********************************************************/
4691 #ifdef ANSI
4692 PUBLIC S16 cmPkCtfPuschCfgInfo
4693 (
4694 CtfPuschCfgInfo *param,
4695 Buffer *mBuf
4696 )
4697 #else
4698 PUBLIC S16 cmPkCtfPuschCfgInfo(param, mBuf)
4699 CtfPuschCfgInfo *param;
4700 Buffer *mBuf;
4701 #endif
4702 {
4703
4704    TRC3(cmPkCtfPuschCfgInfo)
4705
4706 /*ctf_c_001.main_1*/
4707    if(param->pres != FALSE)
4708    {
4709      CMCHKPK(cmPkCtfPuschUlRS, &param->puschUlRS, mBuf);
4710      CMCHKPK(cmPkCtfPuschCfgBasic, &param->puschBasicCfg, mBuf);
4711    }
4712    CMCHKPK(oduUnpackUInt8, param->pres, mBuf);
4713    return ROK;
4714 }
4715
4716
4717 \f
4718 /***********************************************************
4719 *
4720 *     Func: cmUnpkCtfPuschCfgInfo
4721 *
4722 *
4723 *     Desc:   PUSCH configuration
4724  * @details This structure contains the information for PUSCH 
4725  *          configuration at PHY.
4726 *
4727 *
4728 *     Ret: S16
4729 *
4730 *     Notes:
4731 *
4732 *     File: 
4733 *
4734 **********************************************************/
4735 #ifdef ANSI
4736 PUBLIC S16 cmUnpkCtfPuschCfgInfo
4737 (
4738 CtfPuschCfgInfo *param,
4739 Buffer *mBuf
4740 )
4741 #else
4742 PUBLIC S16 cmUnpkCtfPuschCfgInfo(param, mBuf)
4743 CtfPuschCfgInfo *param;
4744 Buffer *mBuf;
4745 #endif
4746 {
4747
4748    TRC3(cmUnpkCtfPuschCfgInfo)
4749
4750    CMCHKUNPK(oduPackUInt8, &param->pres, mBuf);
4751 /*ctf_c_001.main_1*/
4752    if(param->pres != FALSE)
4753    {
4754      CMCHKUNPK(cmUnpkCtfPuschCfgBasic, &param->puschBasicCfg, mBuf);
4755      CMCHKUNPK(cmUnpkCtfPuschUlRS, &param->puschUlRS, mBuf);
4756    }
4757    return ROK;
4758 }
4759
4760
4761 \f
4762 /***********************************************************
4763 *
4764 *     Func: cmPkCtfPhichCfgInfo
4765 *
4766 *
4767 *     Desc:   PHICH configuration
4768  * @details This structure contains the duration and resource information for
4769  *          PHICH configuration at PHY.
4770 *
4771 *
4772 *     Ret: S16
4773 *
4774 *     Notes:
4775 *
4776 *     File: 
4777 *
4778 **********************************************************/
4779 #ifdef ANSI
4780 PUBLIC S16 cmPkCtfPhichCfgInfo
4781 (
4782 CtfPhichCfgInfo *param,
4783 Buffer *mBuf
4784 )
4785 #else
4786 PUBLIC S16 cmPkCtfPhichCfgInfo(param, mBuf)
4787 CtfPhichCfgInfo *param;
4788 Buffer *mBuf;
4789 #endif
4790 {
4791
4792    TRC3(cmPkCtfPhichCfgInfo)
4793
4794 /*ctf_c_001.main_1*/
4795    if(param->pres != FALSE)
4796    {
4797       CMCHKPK(oduUnpackUInt32, param->resource, mBuf);
4798       CMCHKPK(oduUnpackUInt32, param->duration, mBuf);
4799    }
4800    CMCHKPK(oduUnpackUInt8, param->pres, mBuf);
4801    return ROK;
4802 }
4803
4804
4805 \f
4806 /***********************************************************
4807 *
4808 *     Func: cmUnpkCtfPhichCfgInfo
4809 *
4810 *
4811 *     Desc:   PHICH configuration
4812  * @details This structure contains the duration and resource information for
4813  *          PHICH configuration at PHY.
4814 *
4815 *
4816 *     Ret: S16
4817 *
4818 *     Notes:
4819 *
4820 *     File: 
4821 *
4822 **********************************************************/
4823 #ifdef ANSI
4824 PUBLIC S16 cmUnpkCtfPhichCfgInfo
4825 (
4826 CtfPhichCfgInfo *param,
4827 Buffer *mBuf
4828 )
4829 #else
4830 PUBLIC S16 cmUnpkCtfPhichCfgInfo(param, mBuf)
4831 CtfPhichCfgInfo *param;
4832 Buffer *mBuf;
4833 #endif
4834 {
4835    U32 tmpEnum;
4836
4837    TRC3(cmUnpkCtfPhichCfgInfo)
4838
4839    CMCHKUNPK(oduPackUInt8, &param->pres, mBuf);
4840 /*ctf_c_001.main_1*/
4841    if(param->pres != FALSE)
4842    {
4843      CMCHKUNPK(oduPackUInt32, (U32 *)&tmpEnum, mBuf);
4844      param->duration = (CtfPhichDuration)tmpEnum;
4845      CMCHKUNPK(oduPackUInt32, (U32 *)&tmpEnum, mBuf);
4846      param->resource = (CtfPhichResource)tmpEnum;
4847    }
4848    return ROK;
4849 }
4850
4851
4852 \f
4853 /***********************************************************
4854 *
4855 *     Func: cmPkCtfPucchCfgInfo
4856 *
4857 *
4858 *     Desc:   PUCCH configuration
4859  * @details This structure contains the information for PUCCH
4860  *          configuration at PHY.
4861 *
4862 *
4863 *     Ret: S16
4864 *
4865 *     Notes:
4866 *
4867 *     File: 
4868 *
4869 **********************************************************/
4870 #ifdef ANSI
4871 PUBLIC S16 cmPkCtfPucchCfgInfo
4872 (
4873 CtfPucchCfgInfo *param,
4874 Buffer *mBuf
4875 )
4876 #else
4877 PUBLIC S16 cmPkCtfPucchCfgInfo(param, mBuf)
4878 CtfPucchCfgInfo *param;
4879 Buffer *mBuf;
4880 #endif
4881 {
4882
4883    TRC3(cmPkCtfPucchCfgInfo)
4884
4885 /*ctf_c_001.main_1*/
4886    if(param->pres != FALSE)
4887    {
4888       CMCHKPK(oduUnpackUInt32, param->deltaShift, mBuf);
4889       CMCHKPK(oduUnpackUInt16, param->n1PUCCH, mBuf);
4890       CMCHKPK(oduUnpackUInt8, param->nCS, mBuf);
4891       CMCHKPK(oduUnpackUInt8, param->nRB, mBuf);
4892    }
4893    CMCHKPK(oduUnpackUInt8, param->pres, mBuf);
4894    return ROK;
4895 }
4896
4897
4898 \f
4899 /***********************************************************
4900 *
4901 *     Func: cmUnpkCtfPucchCfgInfo
4902 *
4903 *
4904 *     Desc:   PUCCH configuration
4905  * @details This structure contains the information for PUCCH
4906  *          configuration at PHY.
4907 *
4908 *
4909 *     Ret: S16
4910 *
4911 *     Notes:
4912 *
4913 *     File: 
4914 *
4915 **********************************************************/
4916 #ifdef ANSI
4917 PUBLIC S16 cmUnpkCtfPucchCfgInfo
4918 (
4919 CtfPucchCfgInfo *param,
4920 Buffer *mBuf
4921 )
4922 #else
4923 PUBLIC S16 cmUnpkCtfPucchCfgInfo(param, mBuf)
4924 CtfPucchCfgInfo *param;
4925 Buffer *mBuf;
4926 #endif
4927 {
4928    U32 tmpEnum;
4929
4930    TRC3(cmUnpkCtfPucchCfgInfo)
4931
4932    CMCHKUNPK(oduPackUInt8, &param->pres, mBuf);
4933 /*ctf_c_001.main_1*/
4934    if(param->pres != FALSE)
4935    {
4936       CMCHKUNPK(oduPackUInt8, &param->nRB, mBuf);
4937       CMCHKUNPK(oduPackUInt8, &param->nCS, mBuf);
4938       CMCHKUNPK(oduPackUInt16, &param->n1PUCCH, mBuf);
4939       CMCHKUNPK(oduPackUInt32, (U32 *)&tmpEnum, mBuf);
4940       param->deltaShift = (CtfPucchDeltaShift)tmpEnum;
4941    }
4942    return ROK;
4943 }
4944
4945
4946 \f
4947 /***********************************************************
4948 *
4949 *     Func: cmPkCtfSrsUlCfgInfo
4950 *
4951 *
4952 *     Desc:   SRS uplink configuration
4953  * @details This structure contains the information for setting-up/release
4954  *          of uplink SRS configuration at PHY.
4955 *
4956 *
4957 *     Ret: S16
4958 *
4959 *     Notes:
4960 *
4961 *     File: 
4962 *
4963 **********************************************************/
4964 #ifdef ANSI
4965 PUBLIC S16 cmPkCtfSrsUlCfgInfo
4966 (
4967 CtfSrsUlCfgInfo *param,
4968 Buffer *mBuf
4969 )
4970 #else
4971 PUBLIC S16 cmPkCtfSrsUlCfgInfo(param, mBuf)
4972 CtfSrsUlCfgInfo *param;
4973 Buffer *mBuf;
4974 #endif
4975 {
4976
4977    TRC3(cmPkCtfSrsUlCfgInfo)
4978
4979 /*ctf_c_001.main_1*/
4980    if(param->pres != FALSE)
4981    {
4982       CMCHKPK(oduUnpackUInt8, param->srsSetup.srsMaxUpPts, mBuf);
4983       CMCHKPK(oduUnpackUInt8, param->srsSetup.srsANSimultTx, mBuf);
4984       CMCHKPK(oduUnpackUInt8, param->srsSetup.sfCfg, mBuf);
4985       CMCHKPK(oduUnpackUInt8, param->srsSetup.srsBw, mBuf);
4986       CMCHKPK(oduUnpackUInt8, param->srsCfgType, mBuf);
4987    }
4988    CMCHKPK(oduUnpackUInt8, param->pres, mBuf);
4989    return ROK;
4990 }
4991
4992
4993 \f
4994 /***********************************************************
4995 *
4996 *     Func: cmUnpkCtfSrsUlCfgInfo
4997 *
4998 *
4999 *     Desc:   SRS uplink configuration
5000  * @details This structure contains the information for setting-up/release
5001  *          of uplink SRS configuration at PHY.
5002 *
5003 *
5004 *     Ret: S16
5005 *
5006 *     Notes:
5007 *
5008 *     File: 
5009 *
5010 **********************************************************/
5011 #ifdef ANSI
5012 PUBLIC S16 cmUnpkCtfSrsUlCfgInfo
5013 (
5014 CtfSrsUlCfgInfo *param,
5015 Buffer *mBuf
5016 )
5017 #else
5018 PUBLIC S16 cmUnpkCtfSrsUlCfgInfo(param, mBuf)
5019 CtfSrsUlCfgInfo *param;
5020 Buffer *mBuf;
5021 #endif
5022 {
5023
5024    TRC3(cmUnpkCtfSrsUlCfgInfo)
5025
5026    CMCHKUNPK(oduPackUInt8, &param->pres, mBuf);
5027 /*ctf_c_001.main_1*/
5028    if(param->pres != FALSE)
5029    {
5030       CMCHKUNPK(oduPackUInt8, &param->srsCfgType, mBuf);
5031       CMCHKUNPK(oduPackUInt8, &param->srsSetup.srsBw, mBuf);
5032       CMCHKUNPK(oduPackUInt8, &param->srsSetup.sfCfg, mBuf);
5033       CMCHKUNPK(oduPackUInt8, &param->srsSetup.srsANSimultTx, mBuf);
5034       CMCHKUNPK(oduPackUInt8, &param->srsSetup.srsMaxUpPts, mBuf);
5035    }
5036    return ROK;
5037 }
5038
5039
5040 \f
5041 /***********************************************************
5042 *
5043 *     Func: cmPkCtfTddSfCfgInfo
5044 *
5045 *
5046 *     Desc:   Subframe Configuration for TDD mode.
5047  * @details This structure contains the information for setting-up
5048  *          the subframe for TDD mode at PHY.
5049 *
5050 *
5051 *     Ret: S16
5052 *
5053 *     Notes:
5054 *
5055 *     File: 
5056 *
5057 **********************************************************/
5058 #ifdef ANSI
5059 PUBLIC S16 cmPkCtfTddSfCfgInfo
5060 (
5061 CtfTddSfCfgInfo *param,
5062 Buffer *mBuf
5063 )
5064 #else
5065 PUBLIC S16 cmPkCtfTddSfCfgInfo(param, mBuf)
5066 CtfTddSfCfgInfo *param;
5067 Buffer *mBuf;
5068 #endif
5069 {
5070
5071    TRC3(cmPkCtfTddSfCfgInfo)
5072
5073 /*ctf_c_001.main_1*/
5074    if(param->pres != FALSE)
5075    {
5076       CMCHKPK(oduUnpackUInt8, param->spclSfPatterns, mBuf);
5077       CMCHKPK(oduUnpackUInt8, param->sfAssignment, mBuf);
5078    }
5079    CMCHKPK(oduUnpackUInt8, param->pres, mBuf);
5080    return ROK;
5081 }
5082
5083 /* ctf_c_001.main_4: Added support for vendor specific parameters */
5084 #ifdef CTF_VER3
5085 /***********************************************************
5086 *
5087 *     Func: cmPkCtfVendorSpecParams
5088 *
5089 *
5090 *     Desc: Vendor Specific Parameter configuration 
5091 *   @details This structure contains the Parameters which is spaciftc to
5092 *            Vendor.
5093 *
5094 *
5095 *     Ret: S16
5096 *
5097 *     Notes:
5098 *
5099 *     File: 
5100 *
5101 **********************************************************/
5102 #ifdef ANSI
5103 PUBLIC S16 cmPkCtfVendorSpecParams
5104 (
5105 CtfVendorSpecific *param,
5106 Buffer *mBuf
5107 )
5108 #else
5109 PUBLIC S16 cmPkCtfVendorSpecParams(param, mBuf)
5110 CtfVendorSpecific *param;
5111 Buffer *mBuf;
5112 #endif
5113 {
5114
5115    TRC3(cmPkCtfVendorSpecParams)
5116    if( param->buffLen != 0) {
5117      SAddPreMsgMultInOrder(param->paramBuffer,param->buffLen,mBuf);   
5118    }
5119    CMCHKPK(oduUnpackUInt16,param->buffLen,mBuf);
5120
5121    return ROK;
5122 }
5123 \f
5124 /***********************************************************
5125 *
5126 *     Func: cmUnpkCtfVendorSpecParams
5127 *
5128 *
5129 *     Desc: Vendor Specific Parameter configuration  
5130 * @details  This structure contains the Parameters which is spaciftc to
5131 *           Vendor.
5132 *
5133 *
5134 *     Ret: S16
5135 *
5136 *     Notes:
5137 *
5138 *     File: 
5139 *
5140 **********************************************************/
5141 #ifdef ANSI
5142 PUBLIC S16 cmUnpkCtfVendorSpecParams
5143 (
5144 Pst *pst,
5145 CtfVendorSpecific *param,
5146 Buffer *mBuf
5147 )
5148 #else
5149 PUBLIC S16 cmUnpkCtfVendorSpecParams(pst, param, mBuf)
5150 Pst *pst;
5151 CtfVendorSpecific *param;
5152 Buffer *mBuf;
5153 #endif
5154 {
5155
5156    TRC3(cmUnpkCtfVendorSpecParams)
5157
5158    CMCHKUNPK(oduPackUInt16, &param->buffLen, mBuf);
5159
5160    if(param->buffLen != 0) {
5161       if ((SGetSBuf(pst->region, pst->pool, (Data **)&param->paramBuffer, param->buffLen)) != ROK) {
5162 #if (ERRCLASS & ERRCLS_ADD_RES)
5163          SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
5164                (Txt*)&__FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
5165                (ErrVal)ECTF060, (ErrVal)0, (Txt*)&"Unpacking failed");
5166 #endif
5167          return RFAILED ;
5168       }
5169       SRemPreMsgMult(param->paramBuffer, param->buffLen,mBuf) ;   
5170    }
5171    else {
5172       param->paramBuffer = NULLP ;
5173    }
5174
5175    return ROK;
5176 }
5177 #endif
5178 \f
5179 /***********************************************************
5180 *
5181 *     Func: cmUnpkCtfTddSfCfgInfo
5182 *
5183 *
5184 *     Desc:   Subframe Configuration for TDD mode.
5185  * @details This structure contains the information for setting-up
5186  *          the subframe for TDD mode at PHY.
5187 *
5188 *
5189 *     Ret: S16
5190 *
5191 *     Notes:
5192 *
5193 *     File: 
5194 *
5195 **********************************************************/
5196 #ifdef ANSI
5197 PUBLIC S16 cmUnpkCtfTddSfCfgInfo
5198 (
5199 CtfTddSfCfgInfo *param,
5200 Buffer *mBuf
5201 )
5202 #else
5203 PUBLIC S16 cmUnpkCtfTddSfCfgInfo(param, mBuf)
5204 CtfTddSfCfgInfo *param;
5205 Buffer *mBuf;
5206 #endif
5207 {
5208
5209    TRC3(cmUnpkCtfTddSfCfgInfo)
5210
5211    CMCHKUNPK(oduPackUInt8, &param->pres, mBuf);
5212 /*ctf_c_001.main_1*/
5213    if(param->pres != FALSE)
5214    {
5215       CMCHKUNPK(oduPackUInt8, &param->sfAssignment, mBuf);
5216       CMCHKUNPK(oduPackUInt8, &param->spclSfPatterns, mBuf);
5217    }
5218    return ROK;
5219 }
5220 /***********************************************************
5221 *
5222 *     Func: cmPkCtfUnLicnsdCellParam
5223 *
5224 *
5225 *     Desc:   Packing unlicensed SDL cell specific parameter
5226 *
5227 *
5228 *     Ret: S16
5229 *
5230 *     Notes:
5231 *
5232 *     File: 
5233 *
5234 **********************************************************/
5235 #ifdef ANSI
5236 PRIVATE S16 cmPkCtfUnLicnsdCellParam
5237 (
5238 CtfUnLicnsdCfgInfo *param,
5239 Buffer *mBuf
5240 )
5241 #else
5242 PRIVATE S16 cmPkCtfUnLicnsdCellParam(param, mBuf)
5243 CtfUnLicnsdCfgInfo  *param;
5244 Buffer *mBuf;
5245 #endif
5246 {
5247    U8  idx;
5248
5249    TRC3(cmPkCtfUnLicnsdCellParam)
5250
5251    CMCHKPK(SPkS32, param->txPowerLimit, mBuf);
5252    CMCHKPK(oduUnpackUInt8, param->coExistMethod, mBuf);
5253    CMCHKPK(oduUnpackUInt8, param->lteOnPeriod, mBuf);
5254    CMCHKPK(oduUnpackUInt8, param->ccaMethod, mBuf);
5255    CMCHKPK(oduUnpackUInt8, param->adaptiveTx, mBuf);
5256    CMCHKPK(oduUnpackUInt16, param->transPeriod, mBuf);
5257    CMCHKPK(oduUnpackUInt16, param->listenPrd, mBuf);
5258    CMCHKPK(SPkS16, param->energyTh, mBuf);
5259    CMCHKPK(oduUnpackUInt16, param->scanTimePrd, mBuf);
5260    CMCHKPK(oduUnpackUInt16, param->activityTh, mBuf);
5261
5262    for(idx = 0; idx < param->numFreq; idx++)
5263    {
5264       CMCHKPK(oduUnpackUInt32, param->earfcn[idx], mBuf);
5265    }   
5266
5267    CMCHKPK(oduUnpackUInt8, param->numFreq, mBuf);
5268
5269    return ROK;
5270
5271 \f
5272 /***********************************************************
5273 *
5274 *     Func: cmPkCtfCellCfgInfo
5275 *
5276 *
5277 *     Desc:   Cell Configuration Information
5278  * @details This structure contains the information for setting-up
5279  *          of a cell and its associated resources at PHY.
5280 *
5281 *
5282 *     Ret: S16
5283 *
5284 *     Notes:
5285 *
5286 *     File: 
5287 *
5288 **********************************************************/
5289 #ifdef ANSI
5290 PUBLIC S16 cmPkCtfCellCfgInfo
5291 (
5292 CtfCellCfgInfo *param,
5293 Buffer *mBuf
5294 )
5295 #else
5296 PUBLIC S16 cmPkCtfCellCfgInfo(param, mBuf)
5297 CtfCellCfgInfo *param;
5298 Buffer *mBuf;
5299 #endif
5300 {
5301 #ifdef EMTC_ENABLE
5302    S32 i;
5303 #endif
5304    TRC3(cmPkCtfCellCfgInfo)
5305
5306 #ifdef EMTC_ENABLE
5307    for (i = CTF_MAX_CE_LEVEL-1; i >= 0; i--) {
5308       CMCHKPK(oduUnpackUInt8, param->ceLevelInfo[i].emtcNumRepPerPreambleAtt, mBuf);
5309       CMCHKPK(oduUnpackUInt8, param->ceLevelInfo[i].lastPreamble, mBuf);
5310       CMCHKPK(oduUnpackUInt8, param->ceLevelInfo[i].firstPreamble, mBuf);
5311    }
5312    CMCHKPK(oduUnpackUInt8, param->mPdcchStart, mBuf);
5313    CMCHKPK(oduUnpackUInt8, param->catMenabled, mBuf);
5314 #endif
5315    if(param->unLicnsdCfgPres)
5316    {   
5317       printf("pverma param->unLicnsdCfgPres cm/ctf -->%d\n",param->unLicnsdCfgPres);
5318       CMCHKPK(cmPkCtfUnLicnsdCellParam, &param->lteUCfg, mBuf);
5319    }
5320    CMCHKPK(oduUnpackUInt8, param->unLicnsdCfgPres, mBuf);
5321    /*Added for rgu dynamic delta*/
5322    CMCHKPK(oduUnpackUInt8, param->numDlUePerTti, mBuf);
5323    CMCHKPK(SPkS16, param->pilotSigPwr, mBuf);
5324    CMCHKPK(oduUnpackUInt16, param->ulEarfcn, mBuf);
5325    CMCHKPK(oduUnpackUInt16, param->dlEarfcn, mBuf);
5326    CMCHKPK(SPkS16, param->priSigPwr, mBuf);
5327    CMCHKPK(SPkS16, param->secSigPwr, mBuf);
5328    /* Packing PHY configuration parameters */
5329    CMCHKPK(oduUnpackUInt32, param->period, mBuf);
5330    CMCHKPK(oduUnpackUInt32, param->counter, mBuf);
5331    CMCHKPK(oduUnpackUInt16, param->opMode, mBuf);
5332
5333    /* ctf_c_001.main_3: Added the pack for newly added fileds inside the CFG structure*/
5334    CMCHKPK(oduUnpackUInt8, param->rachSrRepModePres, mBuf);
5335    CMCHKPK(oduUnpackUInt16, param->rachSrRepMode, mBuf);
5336
5337    CMCHKPK(oduUnpackUInt8, param->dataRepModePres, mBuf);
5338    CMCHKPK(oduUnpackUInt16, param->dataRepMode, mBuf);
5339
5340    CMCHKPK(oduUnpackUInt8, param->phySyncModePres, mBuf);
5341    CMCHKPK(oduUnpackUInt16, param->phySyncMode, mBuf);
5342
5343    CMCHKPK(oduUnpackUInt8, param->rxAntennaPortsPres, mBuf);
5344    CMCHKPK(oduUnpackUInt16, param->rxAntennaPorts, mBuf);
5345
5346    CMCHKPK(oduUnpackUInt8, param->txAntennaPortsPres, mBuf);
5347    CMCHKPK(oduUnpackUInt16, param->txAntennaPorts, mBuf);
5348
5349    CMCHKPK(oduUnpackUInt8, param->pucchProbDtxAckPres, mBuf);
5350    CMCHKPK(oduUnpackUInt16, param->pucchProbDtxAck, mBuf);
5351
5352    CMCHKPK(oduUnpackUInt8, param->puschProbDtxAckPres, mBuf);
5353    CMCHKPK(oduUnpackUInt16, param->puschProbDtxAck, mBuf);
5354   
5355    CMCHKPK(oduUnpackUInt8, param->srsDopEstFactorPres, mBuf);
5356    CMCHKPK(oduUnpackUInt16, param->srsDopEstFactor, mBuf);
5357   
5358    CMCHKPK(oduUnpackUInt8, param->prachPkRatio0Pres, mBuf);
5359    CMCHKPK(oduUnpackUInt16, param->prachPkRatio0, mBuf);
5360   
5361    CMCHKPK(oduUnpackUInt8, param->prachPkRatio4Pres, mBuf);
5362    CMCHKPK(oduUnpackUInt16, param->prachPkRatio4, mBuf);
5363   
5364    CMCHKPK(oduUnpackUInt8, param->pucchNoiseGammaPres, mBuf);
5365    CMCHKPK(oduUnpackUInt16, param->pucchNoiseGamma, mBuf);
5366   
5367    CMCHKPK(oduUnpackUInt8, param->extWinMarginPres, mBuf);
5368    CMCHKPK(oduUnpackUInt16, param->extWinMargin, mBuf);
5369   
5370    CMCHKPK(oduUnpackUInt8, param->dciPowOsPres, mBuf);
5371    CMCHKPK(oduUnpackUInt16, param->dciPowOs, mBuf);
5372   
5373    CMCHKPK(oduUnpackUInt8, param->cfiPowOsPres, mBuf);
5374    CMCHKPK(oduUnpackUInt16, param->cfiPowOs, mBuf);
5375   
5376    CMCHKPK(oduUnpackUInt8, param->syncSigPowOsPres, mBuf);
5377    CMCHKPK(oduUnpackUInt16, param->syncSigPowOs, mBuf);
5378  
5379    CMCHKPK(cmPkCtfTddSfCfgInfo, &param->tddSfCfg, mBuf);
5380    CMCHKPK(cmPkCtfSrsUlCfgInfo, &param->srsUlCfg, mBuf);
5381    CMCHKPK(cmPkCtfPucchCfgInfo, &param->pucchCfg, mBuf);
5382    CMCHKPK(cmPkCtfPhichCfgInfo, &param->phichCfg, mBuf);
5383    CMCHKPK(cmPkCtfPuschCfgInfo, &param->puschCfg, mBuf);
5384    CMCHKPK(cmPkCtfPdschCfgInfo, &param->pdschCfg, mBuf);
5385    CMCHKPK(cmPkCtfPrachCfgInfo, &param->prachCfg, mBuf);
5386    CMCHKPK(cmPkCtfAntennaCfgInfo, &param->antennaCfg, mBuf);
5387    CMCHKPK(cmPkCtfTxSchemeCfg, &param->txCfg, mBuf);
5388    CMCHKPK(cmPkCtfBwCfgInfo, &param->bwCfg, mBuf);
5389    CMCHKPK(oduUnpackUInt8, param->physCellId, mBuf);
5390    CMCHKPK(oduUnpackUInt8, param->physCellIdPres, mBuf);
5391    
5392    CMCHKPK(SPkS16, param->macSapId, mBuf);
5393    CMCHKPK(SPkS16, param->schSapId, mBuf);
5394
5395    CMCHKPK(oduUnpackUInt8, param->cellIdGrpId, mBuf);
5396    CMCHKPK(cmPkLteCellId, param->cellId, mBuf);
5397    return ROK;
5398 }
5399 /***********************************************************
5400 *
5401 *     Func: cmUnpkCtfUnLicnsdCellParam
5402 *
5403 *
5404 *     Desc:   Unpacking unLicensed SDL cell specific parameter
5405 *
5406 *
5407 *     Ret: S16
5408 *
5409 *     Notes:
5410 *
5411 *     File: 
5412 *
5413 **********************************************************/
5414 #ifdef ANSI
5415 PRIVATE S16 cmUnpkCtfUnLicnsdCellParam
5416 (
5417 CtfUnLicnsdCfgInfo *param,
5418 Buffer *mBuf
5419 )
5420 #else
5421 PRIVATE S16 cmUnpkCtfUnLicnsdCellParam(param, mBuf)
5422 CtfUnLicnsdCfgInfo  *param;
5423 Buffer *mBuf;
5424 #endif
5425 {
5426    U8  idx;
5427
5428    TRC3(cmPkCtfUnLicnsdCellParam)
5429
5430    CMCHKUNPK(oduPackUInt8, &param->numFreq, mBuf);
5431
5432    for(idx = 0; idx < param->numFreq; idx++)
5433    {
5434       CMCHKUNPK(oduPackUInt32, &param->earfcn[idx], mBuf);
5435    }  
5436
5437    CMCHKUNPK(oduPackUInt16, &param->activityTh, mBuf);
5438    CMCHKUNPK(oduPackUInt16, &param->scanTimePrd, mBuf);
5439    CMCHKUNPK(SUnpkS16, &param->energyTh, mBuf);
5440    CMCHKUNPK(oduPackUInt16, &param->listenPrd, mBuf);
5441    CMCHKUNPK(oduPackUInt16, &param->transPeriod, mBuf);
5442    CMCHKUNPK(oduPackUInt8, &param->adaptiveTx, mBuf);
5443    CMCHKUNPK(oduPackUInt8, &param->ccaMethod, mBuf);
5444    CMCHKUNPK(oduPackUInt8, &param->lteOnPeriod, mBuf);
5445    CMCHKUNPK(oduPackUInt8, &param->coExistMethod, mBuf);
5446    CMCHKUNPK(SUnpkS32, &param->txPowerLimit, mBuf);
5447
5448    return ROK;
5449 }   
5450
5451 \f
5452 /***********************************************************
5453 *
5454 *     Func: cmUnpkCtfCellCfgInfo
5455 *
5456 *
5457 *     Desc:   Cell Configuration Information
5458  * @details This structure contains the information for setting-up
5459  *          of a cell and its associated resources at PHY.
5460 *
5461 *
5462 *     Ret: S16
5463 *
5464 *     Notes:
5465 *
5466 *     File: 
5467 *
5468 **********************************************************/
5469 #ifdef ANSI
5470 PUBLIC S16 cmUnpkCtfCellCfgInfo
5471 (
5472 CtfCellCfgInfo *param,
5473 Buffer *mBuf
5474 )
5475 #else
5476 PUBLIC S16 cmUnpkCtfCellCfgInfo(param, mBuf)
5477 CtfCellCfgInfo *param;
5478 Buffer *mBuf;
5479 #endif
5480 {
5481 #ifdef EMTC_ENABLE
5482    S32 i;
5483 #endif
5484    TRC3(cmUnpkCtfCellCfgInfo)
5485
5486    /* ctf_c_001.main_3: Added the unpack for newly added fileds inside the CFG structure*/
5487    CMCHKUNPK(cmUnpkLteCellId, &param->cellId, mBuf);
5488    CMCHKUNPK(oduPackUInt8, &param->cellIdGrpId, mBuf);
5489
5490    CMCHKUNPK(SUnpkS16, &param->schSapId, mBuf);
5491    CMCHKUNPK(SUnpkS16, &param->macSapId, mBuf);
5492
5493    CMCHKUNPK(oduPackUInt8, &param->physCellIdPres, mBuf);
5494    CMCHKUNPK(oduPackUInt8, &param->physCellId, mBuf);
5495    CMCHKUNPK(cmUnpkCtfBwCfgInfo, &param->bwCfg, mBuf);
5496    CMCHKUNPK(cmUnpkCtfTxSchemeCfg, &param->txCfg, mBuf);
5497    CMCHKUNPK(cmUnpkCtfAntennaCfgInfo, &param->antennaCfg, mBuf);
5498    CMCHKUNPK(cmUnpkCtfPrachCfgInfo, &param->prachCfg, mBuf);
5499    CMCHKUNPK(cmUnpkCtfPdschCfgInfo, &param->pdschCfg, mBuf);
5500    CMCHKUNPK(cmUnpkCtfPuschCfgInfo, &param->puschCfg, mBuf);
5501    CMCHKUNPK(cmUnpkCtfPhichCfgInfo, &param->phichCfg, mBuf);
5502    CMCHKUNPK(cmUnpkCtfPucchCfgInfo, &param->pucchCfg, mBuf);
5503    CMCHKUNPK(cmUnpkCtfSrsUlCfgInfo, &param->srsUlCfg, mBuf);
5504    CMCHKUNPK(cmUnpkCtfTddSfCfgInfo, &param->tddSfCfg, mBuf);
5505
5506    CMCHKUNPK(oduPackUInt16, &param->syncSigPowOs, mBuf);
5507    CMCHKUNPK(oduPackUInt8, &param->syncSigPowOsPres, mBuf);
5508
5509    CMCHKUNPK(oduPackUInt16, &param->cfiPowOs, mBuf);
5510    CMCHKUNPK(oduPackUInt8, &param->cfiPowOsPres, mBuf);
5511
5512    CMCHKUNPK(oduPackUInt16, &param->dciPowOs, mBuf);
5513    CMCHKUNPK(oduPackUInt8, &param->dciPowOsPres, mBuf);
5514
5515    CMCHKUNPK(oduPackUInt16, &param->extWinMargin, mBuf);
5516    CMCHKUNPK(oduPackUInt8, &param->extWinMarginPres, mBuf);
5517
5518    CMCHKUNPK(oduPackUInt16, &param->pucchNoiseGamma, mBuf);
5519    CMCHKUNPK(oduPackUInt8, &param->pucchNoiseGammaPres, mBuf);
5520
5521    CMCHKUNPK(oduPackUInt16, &param->prachPkRatio4, mBuf);
5522    CMCHKUNPK(oduPackUInt8, &param->prachPkRatio4Pres, mBuf);
5523
5524    CMCHKUNPK(oduPackUInt16, &param->prachPkRatio0, mBuf);
5525    CMCHKUNPK(oduPackUInt8, &param->prachPkRatio0Pres, mBuf);
5526
5527    CMCHKUNPK(oduPackUInt16, &param->srsDopEstFactor, mBuf);
5528    CMCHKUNPK(oduPackUInt8, &param->srsDopEstFactorPres, mBuf);
5529
5530    CMCHKUNPK(oduPackUInt16, &param->puschProbDtxAck, mBuf);
5531    CMCHKUNPK(oduPackUInt8, &param->puschProbDtxAckPres, mBuf);
5532
5533    CMCHKUNPK(oduPackUInt16, &param->pucchProbDtxAck, mBuf);
5534    CMCHKUNPK(oduPackUInt8, &param->pucchProbDtxAckPres, mBuf);
5535
5536    CMCHKUNPK(oduPackUInt16, &param->txAntennaPorts, mBuf);
5537    CMCHKUNPK(oduPackUInt8, &param->txAntennaPortsPres, mBuf);
5538
5539    CMCHKUNPK(oduPackUInt16, &param->rxAntennaPorts, mBuf);
5540    CMCHKUNPK(oduPackUInt8, &param->rxAntennaPortsPres, mBuf);
5541
5542    CMCHKUNPK(oduPackUInt16, &param->phySyncMode, mBuf);
5543    CMCHKUNPK(oduPackUInt8, &param->phySyncModePres, mBuf);
5544
5545    CMCHKUNPK(oduPackUInt16, &param->dataRepMode, mBuf);
5546    CMCHKUNPK(oduPackUInt8, &param->dataRepModePres, mBuf);
5547
5548    CMCHKUNPK(oduPackUInt16, &param->rachSrRepMode, mBuf);
5549    CMCHKUNPK(oduPackUInt8, &param->rachSrRepModePres, mBuf);
5550
5551    /* UnPacking PHY configuration parameters */
5552    CMCHKUNPK(oduPackUInt16, &param->opMode, mBuf);
5553    CMCHKUNPK(oduPackUInt32, &param->counter, mBuf);
5554    CMCHKUNPK(oduPackUInt32, &param->period, mBuf);
5555    CMCHKUNPK(SUnpkS16, &param->priSigPwr, mBuf);
5556    CMCHKUNPK(SUnpkS16, &param->secSigPwr, mBuf);
5557    CMCHKUNPK(oduPackUInt16, &param->dlEarfcn, mBuf);
5558    CMCHKUNPK(oduPackUInt16, &param->ulEarfcn, mBuf);
5559    CMCHKUNPK(SUnpkS16, &param->pilotSigPwr, mBuf);
5560    /* Added for rgu dynamic delta change*/
5561    CMCHKUNPK(oduPackUInt8, &param->numDlUePerTti, mBuf);
5562    CMCHKUNPK(oduPackUInt8, &param->unLicnsdCfgPres, mBuf);
5563
5564    if(param->unLicnsdCfgPres)
5565    {
5566       printf("pverma param->unLicnsdCfgPres 2 -->%d \n",param->unLicnsdCfgPres);
5567       CMCHKUNPK(cmUnpkCtfUnLicnsdCellParam, &param->lteUCfg, mBuf);
5568    }   
5569 #ifdef EMTC_ENABLE
5570    CMCHKUNPK(oduPackUInt8, &param->catMenabled, mBuf);
5571    CMCHKUNPK(oduPackUInt8, &param->mPdcchStart, mBuf);
5572    
5573    for (i = 0; i < CTF_MAX_CE_LEVEL; i++) {
5574       CMCHKUNPK(oduPackUInt8, &param->ceLevelInfo[i].firstPreamble, mBuf);
5575       CMCHKUNPK(oduPackUInt8, &param->ceLevelInfo[i].lastPreamble, mBuf);
5576       CMCHKUNPK(oduPackUInt8, &param->ceLevelInfo[i].emtcNumRepPerPreambleAtt, mBuf);
5577    }
5578 #endif 
5579    return ROK;
5580 }
5581
5582
5583 \f
5584 /* ctf_c_001.main_4: Modified cmPkCtfCellRecfgInfo() to Add support for
5585  * vendor specific parameters */
5586 /***********************************************************
5587 *
5588 *     Func: cmPkCtfCellRecfgInfo
5589 *
5590 *
5591 *     Desc:   Cell Re-configuration Information
5592  * @details This structure contains the information for reconfiguration
5593  *          of a cell and its associated resources at PHY.
5594 *
5595 *
5596 *     Ret: S16
5597 *
5598 *     Notes:
5599 *
5600 *     File: 
5601 *
5602 **********************************************************/
5603 #ifdef ANSI
5604 PUBLIC S16 cmPkCtfCellRecfgInfo
5605 (
5606 CtfCellRecfgInfo *param,
5607 Buffer *mBuf
5608 )
5609 #else
5610 PUBLIC S16 cmPkCtfCellRecfgInfo(param, mBuf)
5611 CtfCellRecfgInfo *param;
5612 Buffer *mBuf;
5613 #endif
5614 {
5615
5616    TRC3(cmPkCtfCellRecfgInfo)
5617
5618 #ifdef ENABLE_API_LOG
5619    CMCHKPK(oduUnpackUInt8, param->enableAPILog, mBuf);
5620 #endif /* ENABLE_API_LOG */
5621    /* ctf_c_001.main_3: Added the pack for newly added fileds inside the CFG structure*/
5622    CMCHKPK(SPkS16, param->secSigPwr, mBuf);
5623    CMCHKPK(SPkS16, param->priSigPwr, mBuf);
5624    CMCHKPK(SPkS16, param->pilotSigPwr, mBuf);
5625    CMCHKPK(oduUnpackUInt8, param->rachSrRepModePres, mBuf);
5626    CMCHKPK(oduUnpackUInt16, param->rachSrRepMode, mBuf);
5627
5628    CMCHKPK(oduUnpackUInt8, param->dataRepModePres, mBuf);
5629    CMCHKPK(oduUnpackUInt16, param->dataRepMode, mBuf);
5630
5631    CMCHKPK(oduUnpackUInt8, param->phySyncModePres, mBuf);
5632    CMCHKPK(oduUnpackUInt16, param->phySyncMode, mBuf);
5633
5634    CMCHKPK(oduUnpackUInt8, param->rxAntennaPortsPres, mBuf);
5635    CMCHKPK(oduUnpackUInt16, param->rxAntennaPorts, mBuf);
5636
5637    CMCHKPK(oduUnpackUInt8, param->txAntennaPortsPres, mBuf);
5638    CMCHKPK(oduUnpackUInt16, param->txAntennaPorts, mBuf);
5639
5640    CMCHKPK(oduUnpackUInt8, param->pucchProbDtxAckPres, mBuf);
5641    CMCHKPK(oduUnpackUInt16, param->pucchProbDtxAck, mBuf);
5642
5643
5644    CMCHKPK(oduUnpackUInt8, param->puschProbDtxAckPres, mBuf);
5645    CMCHKPK(oduUnpackUInt16, param->puschProbDtxAck, mBuf);
5646
5647    CMCHKPK(oduUnpackUInt8, param->srsDopEstFactorPres, mBuf);
5648    CMCHKPK(oduUnpackUInt16, param->srsDopEstFactor, mBuf);
5649
5650    CMCHKPK(oduUnpackUInt8, param->prachPkRatio0Pres, mBuf);
5651    CMCHKPK(oduUnpackUInt16, param->prachPkRatio0, mBuf);
5652
5653    CMCHKPK(oduUnpackUInt8, param->prachPkRatio4Pres, mBuf);
5654    CMCHKPK(oduUnpackUInt16, param->prachPkRatio4, mBuf);
5655
5656    CMCHKPK(oduUnpackUInt8, param->pucchNoiseGammaPres, mBuf);
5657    CMCHKPK(oduUnpackUInt16, param->pucchNoiseGamma, mBuf);
5658
5659    CMCHKPK(oduUnpackUInt8, param->extWinMarginPres, mBuf);
5660    CMCHKPK(oduUnpackUInt16, param->extWinMargin, mBuf);
5661
5662    CMCHKPK(oduUnpackUInt8, param->dciPowOsPres, mBuf);
5663    CMCHKPK(oduUnpackUInt16, param->dciPowOs, mBuf);
5664
5665    CMCHKPK(oduUnpackUInt8, param->cfiPowOsPres, mBuf);
5666    CMCHKPK(oduUnpackUInt16, param->cfiPowOs, mBuf);
5667
5668    CMCHKPK(oduUnpackUInt8, param->syncSigPowOsPres, mBuf);
5669    CMCHKPK(oduUnpackUInt16, param->syncSigPowOs, mBuf);
5670
5671    CMCHKPK(cmPkCtfTddSfCfgInfo, &param->tddSfCfg, mBuf);
5672    CMCHKPK(cmPkCtfSrsUlCfgInfo, &param->srsUlCfg, mBuf);
5673    CMCHKPK(cmPkCtfPucchCfgInfo, &param->pucchCfg, mBuf);
5674    CMCHKPK(cmPkCtfPhichCfgInfo, &param->phichCfg, mBuf);
5675    CMCHKPK(cmPkCtfPuschCfgInfo, &param->puschCfg, mBuf);
5676    CMCHKPK(cmPkCtfPdschCfgInfo, &param->pdschCfg, mBuf);
5677    CMCHKPK(cmPkCtfPrachCfgInfo, &param->prachCfg, mBuf);
5678    CMCHKPK(cmPkLteTimingInfo, &param->actvnTime, mBuf);
5679    
5680    CMCHKPK(cmPkCtfAntennaCfgInfo, &param->antennaCfg, mBuf);
5681    CMCHKPK(cmPkCtfTxSchemeCfg, &param->txCfg, mBuf);
5682    CMCHKPK(cmPkCtfBwCfgInfo, &param->bwCfg, mBuf);
5683    CMCHKPK(oduUnpackUInt8, param->physCellId, mBuf);
5684    CMCHKPK(oduUnpackUInt8, param->physCellIdPres, mBuf);
5685    CMCHKPK(oduUnpackUInt8, param->cellIdGrpId, mBuf);
5686    CMCHKPK(cmPkLteCellId, param->cellId, mBuf);
5687    CMCHKPK(oduUnpackUInt32, param->ctfReCfgType, mBuf);
5688    return ROK;
5689 }
5690
5691
5692 \f
5693 /***********************************************************
5694 *
5695 *     Func: cmUnpkCtfCellRecfgInfo
5696 *
5697 *
5698 *     Desc:   Cell Re-configuration Information
5699  * @details This structure contains the information for reconfiguration
5700  *          of a cell and its associated resources at PHY.
5701 *
5702 *
5703 *     Ret: S16
5704 *
5705 *     Notes:
5706 *
5707 *     File: 
5708 *
5709 **********************************************************/
5710 #ifdef ANSI
5711 PUBLIC S16 cmUnpkCtfCellRecfgInfo
5712 (
5713 CtfCellRecfgInfo *param,
5714 Buffer *mBuf
5715 )
5716 #else
5717 PUBLIC S16 cmUnpkCtfCellRecfgInfo(param, mBuf)
5718 CtfCellRecfgInfo *param;
5719 Buffer *mBuf;
5720 #endif
5721 {
5722
5723    U32 tmpEnum;
5724    TRC3(cmUnpkCtfCellRecfgInfo)
5725    
5726    /* ctf_c_001.main_3: Added the unpack for newly added fileds inside the CFG structure*/
5727    CMCHKUNPK(oduPackUInt32, (U32 *)&tmpEnum, mBuf);
5728    param->ctfReCfgType = (CtfReCfgType)tmpEnum;
5729    CMCHKUNPK(cmUnpkLteCellId, &param->cellId, mBuf);
5730    CMCHKUNPK(oduPackUInt8, &param->cellIdGrpId, mBuf);   
5731    CMCHKUNPK(oduPackUInt8, &param->physCellIdPres, mBuf);
5732    CMCHKUNPK(oduPackUInt8, &param->physCellId, mBuf);
5733    CMCHKUNPK(cmUnpkCtfBwCfgInfo, &param->bwCfg, mBuf);
5734    CMCHKUNPK(cmUnpkCtfTxSchemeCfg, &param->txCfg, mBuf);
5735    CMCHKUNPK(cmUnpkCtfAntennaCfgInfo, &param->antennaCfg, mBuf);
5736
5737    CMCHKUNPK(cmUnpkLteTimingInfo, &param->actvnTime, mBuf);
5738    CMCHKUNPK(cmUnpkCtfPrachCfgInfo, &param->prachCfg, mBuf);
5739    CMCHKUNPK(cmUnpkCtfPdschCfgInfo, &param->pdschCfg, mBuf);
5740    CMCHKUNPK(cmUnpkCtfPuschCfgInfo, &param->puschCfg, mBuf);
5741    CMCHKUNPK(cmUnpkCtfPhichCfgInfo, &param->phichCfg, mBuf);
5742    CMCHKUNPK(cmUnpkCtfPucchCfgInfo, &param->pucchCfg, mBuf);
5743    CMCHKUNPK(cmUnpkCtfSrsUlCfgInfo, &param->srsUlCfg, mBuf);
5744    CMCHKUNPK(cmUnpkCtfTddSfCfgInfo, &param->tddSfCfg, mBuf);
5745
5746    CMCHKUNPK(oduPackUInt16, &param->syncSigPowOs, mBuf);
5747    CMCHKUNPK(oduPackUInt8, &param->syncSigPowOsPres, mBuf);
5748
5749    CMCHKUNPK(oduPackUInt16, &param->cfiPowOs, mBuf);
5750    CMCHKUNPK(oduPackUInt8, &param->cfiPowOsPres, mBuf);
5751
5752    CMCHKUNPK(oduPackUInt16, &param->dciPowOs, mBuf);
5753    CMCHKUNPK(oduPackUInt8, &param->dciPowOsPres, mBuf);
5754
5755    CMCHKUNPK(oduPackUInt16, &param->extWinMargin, mBuf);
5756    CMCHKUNPK(oduPackUInt8, &param->extWinMarginPres, mBuf);
5757
5758    CMCHKUNPK(oduPackUInt16, &param->pucchNoiseGamma, mBuf);
5759    CMCHKUNPK(oduPackUInt8, &param->pucchNoiseGammaPres, mBuf);
5760
5761    CMCHKUNPK(oduPackUInt16, &param->prachPkRatio4, mBuf);
5762    CMCHKUNPK(oduPackUInt8, &param->prachPkRatio4Pres, mBuf);
5763
5764    CMCHKUNPK(oduPackUInt16, &param->prachPkRatio0, mBuf);
5765    CMCHKUNPK(oduPackUInt8, &param->prachPkRatio0Pres, mBuf);
5766
5767    CMCHKUNPK(oduPackUInt16, &param->srsDopEstFactor, mBuf);
5768    CMCHKUNPK(oduPackUInt8, &param->srsDopEstFactorPres, mBuf);
5769
5770    CMCHKUNPK(oduPackUInt16, &param->puschProbDtxAck, mBuf);
5771    CMCHKUNPK(oduPackUInt8, &param->puschProbDtxAckPres, mBuf);
5772
5773    CMCHKUNPK(oduPackUInt16, &param->pucchProbDtxAck, mBuf);
5774    CMCHKUNPK(oduPackUInt8, &param->pucchProbDtxAckPres, mBuf);
5775
5776    CMCHKUNPK(oduPackUInt16, &param->txAntennaPorts, mBuf);
5777    CMCHKUNPK(oduPackUInt8, &param->txAntennaPortsPres, mBuf);
5778
5779    CMCHKUNPK(oduPackUInt16, &param->rxAntennaPorts, mBuf);
5780    CMCHKUNPK(oduPackUInt8, &param->rxAntennaPortsPres, mBuf);
5781
5782    CMCHKUNPK(oduPackUInt16, &param->phySyncMode, mBuf);
5783    CMCHKUNPK(oduPackUInt8, &param->phySyncModePres, mBuf);
5784
5785    CMCHKUNPK(oduPackUInt16, &param->dataRepMode, mBuf);
5786    CMCHKUNPK(oduPackUInt8, &param->dataRepModePres, mBuf);
5787
5788    CMCHKUNPK(oduPackUInt16, &param->rachSrRepMode, mBuf);
5789    CMCHKUNPK(oduPackUInt8, &param->rachSrRepModePres, mBuf);
5790
5791    CMCHKUNPK(SUnpkS16, &param->pilotSigPwr, mBuf);
5792    CMCHKUNPK(SUnpkS16, &param->priSigPwr, mBuf);
5793    CMCHKUNPK(SUnpkS16, &param->secSigPwr, mBuf);
5794    printf("param->pilotSigPwr = %d\nparam->priSigPwr = %d\n param->secSigPwr = %d\n",param->pilotSigPwr,param->priSigPwr,param->secSigPwr); 
5795 #ifdef ENABLE_API_LOG
5796    CMCHKUNPK(oduPackUInt8, &param->enableAPILog, mBuf);
5797 #endif /* ENABLE_API_LOG */
5798    return ROK;
5799 }
5800
5801
5802 \f
5803 /***********************************************************
5804 *
5805 *     Func: cmPkCtfDedPdschCfgInfo
5806 *
5807 *
5808 *     Desc:   Dedicated PDSCH Configuration
5809  * @details This structure contains the information for PDSCH configuration
5810  *          specific to an UE.
5811 *
5812 *
5813 *     Ret: S16
5814 *
5815 *     Notes:
5816 *
5817 *     File: 
5818 *
5819 **********************************************************/
5820 #ifdef ANSI
5821 PUBLIC S16 cmPkCtfDedPdschCfgInfo
5822 (
5823 CtfDedPdschCfgInfo *param,
5824 Buffer *mBuf
5825 )
5826 #else
5827 PUBLIC S16 cmPkCtfDedPdschCfgInfo(param, mBuf)
5828 CtfDedPdschCfgInfo *param;
5829 Buffer *mBuf;
5830 #endif
5831 {
5832
5833    TRC3(cmPkCtfDedPdschCfgInfo)
5834
5835 /*ctf_c_001.main_1*/
5836    if(param->pres != FALSE)
5837       CMCHKPK(oduUnpackUInt32, param->pA, mBuf);
5838    CMCHKPK(oduUnpackUInt8, param->pres, mBuf);
5839    return ROK;
5840 }
5841
5842
5843 \f
5844 /***********************************************************
5845 *
5846 *     Func: cmUnpkCtfDedPdschCfgInfo
5847 *
5848 *
5849 *     Desc:   Dedicated PDSCH Configuration
5850  * @details This structure contains the information for PDSCH configuration
5851  *          specific to an UE.
5852 *
5853 *
5854 *     Ret: S16
5855 *
5856 *     Notes:
5857 *
5858 *     File: 
5859 *
5860 **********************************************************/
5861 #ifdef ANSI
5862 PUBLIC S16 cmUnpkCtfDedPdschCfgInfo
5863 (
5864 CtfDedPdschCfgInfo *param,
5865 Buffer *mBuf
5866 )
5867 #else
5868 PUBLIC S16 cmUnpkCtfDedPdschCfgInfo(param, mBuf)
5869 CtfDedPdschCfgInfo *param;
5870 Buffer *mBuf;
5871 #endif
5872 {
5873    U32 tmpEnum;
5874    TRC3(cmUnpkCtfDedPdschCfgInfo)
5875
5876    CMCHKUNPK(oduPackUInt8, &param->pres, mBuf);
5877 /*ctf_c_001.main_1*/
5878    if(param->pres != FALSE)
5879    {
5880       CMCHKUNPK(oduPackUInt32, (U32 *)&tmpEnum, mBuf);
5881       param->pA = (CtfPdschPaParam)tmpEnum;
5882    }
5883    return ROK;
5884 }
5885
5886
5887 \f
5888 /***********************************************************
5889 *
5890 *     Func: cmPkCtfDedPucchCfgInfo
5891 *
5892 *
5893 *     Desc:   Dedicated PUCCH Configuration
5894  * @details This structure contains the information for setting-up/release 
5895  *          PUCCH configuration specific to an UE.
5896 *
5897 *
5898 *     Ret: S16
5899 *
5900 *     Notes:
5901 *
5902 *     File: 
5903 *
5904 **********************************************************/
5905 #ifdef ANSI
5906 PUBLIC S16 cmPkCtfDedPucchCfgInfo
5907 (
5908 CtfDedPucchCfgInfo *param,
5909 Buffer *mBuf
5910 )
5911 #else
5912 PUBLIC S16 cmPkCtfDedPucchCfgInfo(param, mBuf)
5913 CtfDedPucchCfgInfo *param;
5914 Buffer *mBuf;
5915 #endif
5916 {
5917
5918    TRC3(cmPkCtfDedPucchCfgInfo)
5919
5920 /*ctf_c_001.main_1*/
5921   if(param->pres != FALSE)
5922   {
5923 #ifdef CTF_VER3
5924      /*ctf_c_001.main_4:115549: packing tddAckNackFBMode and tddAckNackCfgPres */
5925        if (param->tddAckNackCfgPres != FALSE)
5926        {
5927           CMCHKPK(oduUnpackUInt32, param->tddAckNackFBMode, mBuf);
5928        }
5929  
5930        CMCHKPK(oduUnpackUInt8, param->tddAckNackCfgPres, mBuf);
5931 #endif /* CTF_VER3 */
5932       CMCHKPK(oduUnpackUInt16, param->pucchSetup.n1PUCCHRep, mBuf);
5933 #ifdef CTF_VER3
5934       /*ctf_c_001.main_4:115549: packing pucchSetup.repFactPres */
5935        if (param->pucchSetup.repFactPres)
5936        {
5937           CMCHKPK(oduUnpackUInt32, param->pucchSetup.repFact, mBuf);
5938        }
5939  
5940        CMCHKPK(oduUnpackUInt8, param->pucchSetup.repFactPres, mBuf);
5941 #else
5942         CMCHKPK(oduUnpackUInt32, param->pucchSetup.repFact, mBuf);
5943 #endif /* CTF_VER3 */
5944       CMCHKPK(oduUnpackUInt8, param->dedPucchCfgType, mBuf);
5945   }
5946   CMCHKPK(oduUnpackUInt8, param->pres, mBuf);
5947   return ROK;
5948 }
5949
5950
5951 \f
5952 /***********************************************************
5953 *
5954 *     Func: cmUnpkCtfDedPucchCfgInfo
5955 *
5956 *
5957 *     Desc:   Dedicated PUCCH Configuration
5958  * @details This structure contains the information for setting-up/release 
5959  *          PUCCH configuration specific to an UE.
5960 *
5961 *
5962 *     Ret: S16
5963 *
5964 *     Notes:
5965 *
5966 *     File: 
5967 *
5968 **********************************************************/
5969 #ifdef ANSI
5970 PUBLIC S16 cmUnpkCtfDedPucchCfgInfo
5971 (
5972 CtfDedPucchCfgInfo *param,
5973 Buffer *mBuf
5974 )
5975 #else
5976 PUBLIC S16 cmUnpkCtfDedPucchCfgInfo(param, mBuf)
5977 CtfDedPucchCfgInfo *param;
5978 Buffer *mBuf;
5979 #endif
5980 {
5981
5982    TRC3(cmUnpkCtfDedPucchCfgInfo)
5983
5984    CMCHKUNPK(oduPackUInt8, &param->pres, mBuf);
5985 /*ctf_c_001.main_1*/
5986    if(param->pres != FALSE)
5987    {
5988       CMCHKUNPK(oduPackUInt8, &param->dedPucchCfgType, mBuf);
5989 #ifdef CTF_VER3
5990       /* ctf_c_001.main_4:115549: unpacking pucchSetup.repFactPres */
5991        CMCHKUNPK(oduPackUInt8, &param->pucchSetup.repFactPres, mBuf);
5992  
5993        if (param->pucchSetup.repFactPres)
5994        {
5995           CMCHKUNPK(oduPackUInt32, (U32 *)&param->pucchSetup.repFact, mBuf);
5996        }
5997 #else
5998         CMCHKUNPK(oduPackUInt32, (U32 *)&param->pucchSetup.repFact, mBuf);
5999 #endif /*CTF_VER3 */
6000       CMCHKUNPK(oduPackUInt16, &param->pucchSetup.n1PUCCHRep, mBuf);
6001 #ifdef CTF_VER3
6002       /*ctf_c_001.main_4:115549: unpacking tddAckNackCfgPres and tddAckNackFBMode */
6003       CMCHKUNPK(oduPackUInt8, &param->tddAckNackCfgPres, mBuf);
6004
6005       if (param->tddAckNackCfgPres != FALSE)
6006       {
6007          CMCHKUNPK(oduPackUInt32, (U32 *)&param->tddAckNackFBMode, mBuf);
6008       }
6009 #endif /* CTF_VER3 */
6010    }
6011    return ROK;
6012 }
6013
6014
6015 \f
6016 /***********************************************************
6017 *
6018 *     Func: cmPkCtfDedPuschCfgInfo
6019 *
6020 *
6021 *     Desc:   Dedicated PUSCH Configuration
6022  * @details This structure contains the information for PUCCH 
6023  *          configuration specific to an UE.
6024 *
6025 *
6026 *     Ret: S16
6027 *
6028 *     Notes:
6029 *
6030 *     File: 
6031 *
6032 **********************************************************/
6033 #ifdef ANSI
6034 PUBLIC S16 cmPkCtfDedPuschCfgInfo
6035 (
6036 CtfDedPuschCfgInfo *param,
6037 Buffer *mBuf
6038 )
6039 #else
6040 PUBLIC S16 cmPkCtfDedPuschCfgInfo(param, mBuf)
6041 CtfDedPuschCfgInfo *param;
6042 Buffer *mBuf;
6043 #endif
6044 {
6045
6046    TRC3(cmPkCtfDedPuschCfgInfo)
6047
6048 /*ctf_c_001.main_1*/
6049    if(param->pres != FALSE)
6050    {
6051       CMCHKPK(oduUnpackUInt8, param->betaOffsetCqiIdx, mBuf);
6052       CMCHKPK(oduUnpackUInt8, param->betaOffsetRiIdx, mBuf);
6053       CMCHKPK(oduUnpackUInt8, param->betaOffsetAckIdx, mBuf);
6054    }
6055    CMCHKPK(oduUnpackUInt8, param->pres, mBuf);
6056    return ROK;
6057 }
6058
6059
6060 \f
6061 /***********************************************************
6062 *
6063 *     Func: cmUnpkCtfDedPuschCfgInfo
6064 *
6065 *
6066 *     Desc:   Dedicated PUSCH Configuration
6067  * @details This structure contains the information for PUCCH 
6068  *          configuration specific to an UE.
6069 *
6070 *
6071 *     Ret: S16
6072 *
6073 *     Notes:
6074 *
6075 *     File: 
6076 *
6077 **********************************************************/
6078 #ifdef ANSI
6079 PUBLIC S16 cmUnpkCtfDedPuschCfgInfo
6080 (
6081 CtfDedPuschCfgInfo *param,
6082 Buffer *mBuf
6083 )
6084 #else
6085 PUBLIC S16 cmUnpkCtfDedPuschCfgInfo(param, mBuf)
6086 CtfDedPuschCfgInfo *param;
6087 Buffer *mBuf;
6088 #endif
6089 {
6090
6091    TRC3(cmUnpkCtfDedPuschCfgInfo)
6092
6093    CMCHKUNPK(oduPackUInt8, &param->pres, mBuf);
6094 /*ctf_c_001.main_1*/
6095    if(param->pres != FALSE)
6096    {
6097       CMCHKUNPK(oduPackUInt8, &param->betaOffsetAckIdx, mBuf);
6098       CMCHKUNPK(oduPackUInt8, &param->betaOffsetRiIdx, mBuf);
6099       CMCHKUNPK(oduPackUInt8, &param->betaOffsetCqiIdx, mBuf);
6100    }
6101    return ROK;
6102 }
6103
6104
6105 #ifndef TFU_UPGRADE
6106 \f
6107 /***********************************************************
6108 *
6109 *     Func: cmPkCtfCqiRptModePeriodic
6110 *
6111 *
6112 *     Desc:   Periodic CQI Report Configuration
6113  * @details This structure contains the information for periodic CQI report
6114  *          related configuration specific to an UE.
6115 *
6116 *
6117 *     Ret: S16
6118 *
6119 *     Notes:
6120 *
6121 *     File: 
6122 *
6123 **********************************************************/
6124 #ifdef ANSI
6125 PUBLIC S16 cmPkCtfCqiRptModePeriodic
6126 (
6127 CtfCqiRptModePeriodic *param,
6128 Buffer *mBuf
6129 )
6130 #else
6131 PUBLIC S16 cmPkCtfCqiRptModePeriodic(param, mBuf)
6132 CtfCqiRptModePeriodic *param;
6133 Buffer *mBuf;
6134 #endif
6135 {
6136
6137    TRC3(cmPkCtfCqiRptModePeriodic)
6138 /* ctf_c_001.main_2: added packning for cqiMask*/
6139 #ifdef CTF_VER1
6140       CMCHKPK(oduUnpackUInt32, (U32 )param->cqiSetup.cqiMask.cqiMaskSetup, mBuf);
6141       CMCHKPK(oduUnpackUInt8, param->cqiSetup.cqiMask.pres, mBuf);
6142 #endif /* CTF_VER1 */
6143       CMCHKPK(oduUnpackUInt8, param->cqiSetup.simultaneousAckNack, mBuf);
6144       CMCHKPK(oduUnpackUInt16, param->cqiSetup.riCfgIndx, mBuf);
6145       CMCHKPK(oduUnpackUInt8, param->cqiSetup.riCfgPres, mBuf);
6146       CMCHKPK(oduUnpackUInt8, param->cqiSetup.subbandCqi.k, mBuf);
6147       CMCHKPK(oduUnpackUInt8, param->cqiSetup.formatIndicator, mBuf);
6148       CMCHKPK(oduUnpackUInt16, param->cqiSetup.cqiPmiCfgIndx, mBuf);
6149       CMCHKPK(oduUnpackUInt16, param->cqiSetup.cqiPUCCHRsrcIndx, mBuf);
6150    CMCHKPK(oduUnpackUInt8, param->cqiPeriodicCfgType, mBuf);
6151    return ROK;
6152 }
6153
6154
6155 \f
6156 /***********************************************************
6157 *
6158 *     Func: cmUnpkCtfCqiRptModePeriodic
6159 *
6160 *
6161 *     Desc:   Periodic CQI Report Configuration
6162  * @details This structure contains the information for periodic CQI report
6163  *          related configuration specific to an UE.
6164 *
6165 *
6166 *     Ret: S16
6167 *
6168 *     Notes:
6169 *
6170 *     File: 
6171 *
6172 **********************************************************/
6173 #ifdef ANSI
6174 PUBLIC S16 cmUnpkCtfCqiRptModePeriodic
6175 (
6176 CtfCqiRptModePeriodic *param,
6177 Buffer *mBuf
6178 )
6179 #else
6180 PUBLIC S16 cmUnpkCtfCqiRptModePeriodic(param, mBuf)
6181 CtfCqiRptModePeriodic *param;
6182 Buffer *mBuf;
6183 #endif
6184 {
6185 #ifdef CTF_VER1    
6186    U32 tmpEnum;
6187 #endif   
6188    TRC3(cmUnpkCtfCqiRptModePeriodic)
6189
6190    CMCHKUNPK(oduPackUInt8, &param->cqiPeriodicCfgType, mBuf);
6191       CMCHKUNPK(oduPackUInt16, &param->cqiSetup.cqiPUCCHRsrcIndx, mBuf);
6192       CMCHKUNPK(oduPackUInt16, &param->cqiSetup.cqiPmiCfgIndx, mBuf);
6193       CMCHKUNPK(oduPackUInt8, &param->cqiSetup.formatIndicator, mBuf);
6194          CMCHKUNPK(oduPackUInt8, &param->cqiSetup.subbandCqi.k, mBuf);
6195       CMCHKUNPK(oduPackUInt8, &param->cqiSetup.riCfgPres, mBuf);
6196       CMCHKUNPK(oduPackUInt16, &param->cqiSetup.riCfgIndx, mBuf);
6197       CMCHKUNPK(oduPackUInt8, &param->cqiSetup.simultaneousAckNack, mBuf);
6198 /* ctf_c_001.main_2: added Unpackning for cqiMask*/
6199 #ifdef CTF_VER1
6200       CMCHKUNPK(oduPackUInt8, &param->cqiSetup.cqiMask.pres, mBuf);
6201       CMCHKUNPK(oduPackUInt32, (U32 *)&tmpEnum, mBuf);
6202       param->cqiSetup.cqiMask.cqiMaskSetup = tmpEnum;
6203 #endif /* CTF_VER1 */
6204    return ROK;
6205 }
6206
6207
6208 \f
6209 /***********************************************************
6210 *
6211 *     Func: cmPkCtfCqiReportCfgInfo
6212 *
6213 *
6214 *     Desc:   CQI Report Configuration
6215  * @details This structure contains the information for CQI report
6216  *          related configuration specific to an UE.
6217 *
6218 *
6219 *     Ret: S16
6220 *
6221 *     Notes:
6222 *
6223 *     File: 
6224 *
6225 **********************************************************/
6226 #ifdef ANSI
6227 PUBLIC S16 cmPkCtfCqiReportCfgInfo
6228 (
6229 CtfCqiReportCfgInfo *param,
6230 Buffer *mBuf
6231 )
6232 #else
6233 PUBLIC S16 cmPkCtfCqiReportCfgInfo(param, mBuf)
6234 CtfCqiReportCfgInfo *param;
6235 Buffer *mBuf;
6236 #endif
6237 {
6238
6239    TRC3(cmPkCtfCqiReportCfgInfo)
6240
6241 /*ctf_c_001.main_1*/
6242    if(param->pres != FALSE)
6243    {
6244 #ifdef CTF_VER2
6245       /* 
6246        * ctf_c_001.main_2: Added provision to send Periodic and aPeriodic CQI
6247        *report configuration in the same message
6248        */
6249        if(param->reportMode.aPeriodicRpt.pres != FALSE)
6250        {
6251            CMCHKPK(oduUnpackUInt32, param->reportMode.aPeriodicRpt.aPeriodicRptMode, mBuf);
6252        }
6253        CMCHKPK(oduUnpackUInt8, param->reportMode.aPeriodicRpt.pres, mBuf);
6254
6255        if(param->reportMode.periodicRpt.pres != FALSE)
6256        {
6257            CMCHKPK(cmPkCtfCqiRptModePeriodic, &param->reportMode.periodicRpt, mBuf);
6258        }
6259        CMCHKPK(oduUnpackUInt8, param->reportMode.periodicRpt.pres, mBuf);
6260
6261 #else /* CTF_VER2 */
6262
6263       switch(param->reportingMode) {
6264          case CTF_CQI_RPTMODE_PRDIOC:
6265             CMCHKPK(cmPkCtfCqiRptModePeriodic, &param->reportMode.periodicRpt, mBuf);
6266             break;
6267          case CTF_CQI_RPTMODE_APRDIOC:
6268             CMCHKPK(oduUnpackUInt32, param->reportMode.aPeriodicRpt, mBuf);
6269             break;
6270          default :
6271             return RFAILED;
6272       }
6273       CMCHKPK(oduUnpackUInt8, param->reportingMode, mBuf);
6274 #endif /* CTF_VER2 */
6275
6276 /* ctf_c_001.main_2: added packning for pmiRiRpt*/
6277 #ifdef CTF_VER1
6278        CMCHKPK(oduUnpackUInt32, param->pmiRiRpt.pmiRiRptSetup, mBuf);
6279        CMCHKPK(oduUnpackUInt8, param->pmiRiRpt.pres, mBuf);
6280 #endif /* CTF_VER1 */
6281    }
6282
6283    CMCHKPK(oduUnpackUInt8, param->pres, mBuf);
6284    return ROK;
6285 }
6286
6287
6288 \f
6289 /***********************************************************
6290 *
6291 *     Func: cmUnpkCtfCqiReportCfgInfo
6292 *
6293 *
6294 *     Desc:   CQI Report Configuration
6295  * @details This structure contains the information for CQI report
6296  *          related configuration specific to an UE.
6297 *
6298 *
6299 *     Ret: S16
6300 *
6301 *     Notes:
6302 *
6303 *     File: 
6304 *
6305 **********************************************************/
6306 #ifdef ANSI
6307 PUBLIC S16 cmUnpkCtfCqiReportCfgInfo
6308 (
6309 CtfCqiReportCfgInfo *param,
6310 Buffer *mBuf
6311 )
6312 #else
6313 PUBLIC S16 cmUnpkCtfCqiReportCfgInfo(param, mBuf)
6314 CtfCqiReportCfgInfo *param;
6315 Buffer *mBuf;
6316 #endif
6317 {
6318 #if defined (CTF_VER1) || defined (CTF_VER2)
6319    U32 tmpEnum;
6320 #endif
6321    TRC3(cmUnpkCtfCqiReportCfgInfo)
6322
6323    CMCHKUNPK(oduPackUInt8, &param->pres, mBuf);
6324 /*ctf_c_001.main_1*/
6325    if(param->pres != FALSE)
6326    {
6327 /* ctf_c_001.main_2: added Unpackning for cqiMask*/
6328 #ifdef CTF_VER1
6329       CMCHKUNPK(oduPackUInt8, &param->pmiRiRpt.pres, mBuf);
6330       CMCHKUNPK(oduPackUInt32, (U32 *)&tmpEnum, mBuf);
6331       param->pmiRiRpt.pmiRiRptSetup = tmpEnum;
6332 #endif /* CTF_VER1 */
6333
6334 #ifdef CTF_VER2
6335       /* 
6336        *ctf_c_001.main_2: Added provision to send Periodic and aPeriodic CQI
6337        *report configuration in the same message
6338        */
6339       CMCHKUNPK(oduPackUInt8, &param->reportMode.periodicRpt.pres, mBuf)
6340       if(param->reportMode.periodicRpt.pres != FALSE)
6341       {
6342          CMCHKUNPK(cmUnpkCtfCqiRptModePeriodic, &param->reportMode.periodicRpt, mBuf);
6343       }
6344        
6345       CMCHKUNPK(oduPackUInt8, &param->reportMode.aPeriodicRpt.pres, mBuf)
6346       if(param->reportMode.aPeriodicRpt.pres != FALSE)
6347       {
6348          CMCHKUNPK(oduPackUInt32, (U32 *)&tmpEnum, mBuf);
6349          param->reportMode.aPeriodicRpt.aPeriodicRptMode =
6350             (CtfCqiRptModeAperiodic)tmpEnum;
6351       }
6352
6353 #else /* CTF_VER2 */
6354
6355       CMCHKUNPK(oduPackUInt8, &param->reportingMode, mBuf);
6356       switch(param->reportingMode) {
6357          case CTF_CQI_RPTMODE_APRDIOC:
6358             CMCHKUNPK(oduPackUInt32, (U32 *)&param->reportMode.aPeriodicRpt, mBuf);
6359             break;
6360          case CTF_CQI_RPTMODE_PRDIOC:
6361             CMCHKUNPK(cmUnpkCtfCqiRptModePeriodic, &param->reportMode.periodicRpt, mBuf);
6362             break;
6363          default :
6364             return RFAILED;
6365       }
6366 #endif /* CTF_VER2 */
6367    }
6368    return ROK;
6369 }
6370
6371
6372 \f
6373 /***********************************************************
6374 *
6375 *     Func: cmPkCtfDedSrsUlCfgInfo
6376 *
6377 *
6378 *     Desc:   Dedicated Uplink SRS Configuration
6379  * @details This structure contains the information for setting-up/release
6380  *          UL SRS configuration specific to an UE.
6381 *
6382 *
6383 *     Ret: S16
6384 *
6385 *     Notes:
6386 *
6387 *     File: 
6388 *
6389 **********************************************************/
6390 #ifdef ANSI
6391 PUBLIC S16 cmPkCtfDedSrsUlCfgInfo
6392 (
6393 CtfDedSrsUlCfgInfo *param,
6394 Buffer *mBuf
6395 )
6396 #else
6397 PUBLIC S16 cmPkCtfDedSrsUlCfgInfo(param, mBuf)
6398 CtfDedSrsUlCfgInfo *param;
6399 Buffer *mBuf;
6400 #endif
6401 {
6402
6403    TRC3(cmPkCtfDedSrsUlCfgInfo)
6404
6405 /*ctf_c_001.main_1*/
6406    if(param->pres != FALSE)
6407    {
6408       CMCHKPK(oduUnpackUInt8, param->dedSrsSetup.cyclicShift, mBuf);
6409       CMCHKPK(oduUnpackUInt8, param->dedSrsSetup.txComb, mBuf);
6410       CMCHKPK(oduUnpackUInt16, param->dedSrsSetup.srsCfgIdx, mBuf);
6411       CMCHKPK(oduUnpackUInt8, param->dedSrsSetup.duration, mBuf);
6412       CMCHKPK(oduUnpackUInt8, param->dedSrsSetup.freqDmnPos, mBuf);
6413       CMCHKPK(oduUnpackUInt8, param->dedSrsSetup.srsHopngBw, mBuf);
6414       CMCHKPK(oduUnpackUInt8, param->dedSrsSetup.srsBw, mBuf);
6415       CMCHKPK(oduUnpackUInt8, param->dedSrsUlCfgType, mBuf);
6416    }
6417    CMCHKPK(oduUnpackUInt8, param->pres, mBuf);
6418    return ROK;
6419 }
6420
6421
6422 \f
6423 /***********************************************************
6424 *
6425 *     Func: cmUnpkCtfDedSrsUlCfgInfo
6426 *
6427 *
6428 *     Desc:   Dedicated Uplink SRS Configuration
6429  * @details This structure contains the information for setting-up/release
6430  *          UL SRS configuration specific to an UE.
6431 *
6432 *
6433 *     Ret: S16
6434 *
6435 *     Notes:
6436 *
6437 *     File: 
6438 *
6439 **********************************************************/
6440 #ifdef ANSI
6441 PUBLIC S16 cmUnpkCtfDedSrsUlCfgInfo
6442 (
6443 CtfDedSrsUlCfgInfo *param,
6444 Buffer *mBuf
6445 )
6446 #else
6447 PUBLIC S16 cmUnpkCtfDedSrsUlCfgInfo(param, mBuf)
6448 CtfDedSrsUlCfgInfo *param;
6449 Buffer *mBuf;
6450 #endif
6451 {
6452
6453    TRC3(cmUnpkCtfDedSrsUlCfgInfo)
6454
6455    CMCHKUNPK(oduPackUInt8, &param->pres, mBuf);
6456 /*ctf_c_001.main_1*/
6457    if(param->pres != FALSE)
6458    {
6459       CMCHKUNPK(oduPackUInt8, &param->dedSrsUlCfgType, mBuf);
6460       CMCHKUNPK(oduPackUInt8, &param->dedSrsSetup.srsBw, mBuf);
6461       CMCHKUNPK(oduPackUInt8, &param->dedSrsSetup.srsHopngBw, mBuf);
6462       CMCHKUNPK(oduPackUInt8, &param->dedSrsSetup.freqDmnPos, mBuf);
6463       CMCHKUNPK(oduPackUInt8, &param->dedSrsSetup.duration, mBuf);
6464       CMCHKUNPK(oduPackUInt16, &param->dedSrsSetup.srsCfgIdx, mBuf);
6465       CMCHKUNPK(oduPackUInt8, &param->dedSrsSetup.txComb, mBuf);
6466       CMCHKUNPK(oduPackUInt8, &param->dedSrsSetup.cyclicShift, mBuf);
6467    }
6468    return ROK;
6469 }
6470
6471
6472 \f
6473 /***********************************************************
6474 *
6475 *     Func: cmPkCtfDedSRCfgInfo
6476 *
6477 *
6478 *     Desc:   Dedicated SR Configuration
6479  * @details This structure contains the information for setting-up/release
6480  *          SR configuration specific to an UE at PHY.
6481 *
6482 *
6483 *     Ret: S16
6484 *
6485 *     Notes:
6486 *
6487 *     File: 
6488 *
6489 **********************************************************/
6490 #ifdef ANSI
6491 PUBLIC S16 cmPkCtfDedSRCfgInfo
6492 (
6493 CtfDedSRCfgInfo *param,
6494 Buffer *mBuf
6495 )
6496 #else
6497 PUBLIC S16 cmPkCtfDedSRCfgInfo(param, mBuf)
6498 CtfDedSRCfgInfo *param;
6499 Buffer *mBuf;
6500 #endif
6501 {
6502
6503    TRC3(cmPkCtfDedSRCfgInfo)
6504
6505 /*ctf_c_001.main_1*/
6506   if(param->pres != FALSE)
6507   {
6508      CMCHKPK(oduUnpackUInt8, param->dedSrSetup.srCfgIdx, mBuf);
6509      CMCHKPK(oduUnpackUInt16, param->dedSrSetup.srPUCCHRi, mBuf);
6510      CMCHKPK(oduUnpackUInt8, param->dedSRCfgType, mBuf);
6511   }
6512   CMCHKPK(oduUnpackUInt8, param->pres, mBuf);
6513   return ROK;
6514 }
6515
6516
6517 \f
6518 /***********************************************************
6519 *
6520 *     Func: cmUnpkCtfDedSRCfgInfo
6521 *
6522 *
6523 *     Desc:   Dedicated SR Configuration
6524  * @details This structure contains the information for setting-up/release
6525  *          SR configuration specific to an UE at PHY.
6526 *
6527 *
6528 *     Ret: S16
6529 *
6530 *     Notes:
6531 *
6532 *     File: 
6533 *
6534 **********************************************************/
6535 #ifdef ANSI
6536 PUBLIC S16 cmUnpkCtfDedSRCfgInfo
6537 (
6538 CtfDedSRCfgInfo *param,
6539 Buffer *mBuf
6540 )
6541 #else
6542 PUBLIC S16 cmUnpkCtfDedSRCfgInfo(param, mBuf)
6543 CtfDedSRCfgInfo *param;
6544 Buffer *mBuf;
6545 #endif
6546 {
6547
6548    TRC3(cmUnpkCtfDedSRCfgInfo)
6549
6550    CMCHKUNPK(oduPackUInt8, &param->pres, mBuf);
6551 /*ctf_c_001.main_1*/
6552    if(param->pres != FALSE)
6553    {
6554       CMCHKUNPK(oduPackUInt8, &param->dedSRCfgType, mBuf);
6555       CMCHKUNPK(oduPackUInt16, &param->dedSrSetup.srPUCCHRi, mBuf);
6556       CMCHKUNPK(oduPackUInt8, &param->dedSrSetup.srCfgIdx, mBuf);
6557    }
6558    return ROK;
6559 }
6560
6561 #endif /* TFU_UPGRADE */
6562
6563 \f
6564 /***********************************************************
6565 *
6566 *     Func: cmPkCtfDedAntCfgInfo
6567 *
6568 *
6569 *     Desc:   Dedicated Antenna Configuration
6570  * @details This structure contains the information for antenna related
6571  *          configuration specific to an UE at PHY.
6572 *
6573 *
6574 *     Ret : S16
6575 *
6576 *     Notes:
6577 *
6578 *     File: 
6579 *
6580 **********************************************************/
6581 #ifdef ANSI
6582 PUBLIC S16 cmPkCtfDedAntCfgInfo
6583 (
6584 CtfDedAntCfgInfo *param,
6585 Buffer *mBuf
6586 )
6587 #else
6588 PUBLIC S16 cmPkCtfDedAntCfgInfo(param, mBuf)
6589 CtfDedAntCfgInfo *param;
6590 Buffer *mBuf;
6591 #endif
6592 {
6593    
6594 #ifdef CTF_VER2
6595    U8  idx;
6596 #endif  /* CTF_VER2 */
6597
6598    TRC3(cmPkCtfDedAntCfgInfo)
6599
6600 /*ctf_c_001.main_1*/
6601    if(param->pres != FALSE)
6602    {
6603       CMCHKPK(oduUnpackUInt32, param->ueTxAntSelection.txAntSelect, mBuf);
6604       CMCHKPK(oduUnpackUInt8, param->ueTxAntSelection.cfgType, mBuf);
6605      /* ctf_c_001.main_3 txMode is of type enum and is 32bit length */
6606       CMCHKPK(oduUnpackUInt32, (U32)param->txMode, mBuf);
6607 #ifdef CTF_VER2
6608       /* 
6609        *ctf_c_001.main_2: Added Packing of CodeBookSubsetRestriction parameter
6610        */
6611       switch(param->codeBookSubsetRes.ctfCdBkRestType)
6612       {
6613           case N2TX_ANT_TM3:
6614               CMCHKPK(oduUnpackUInt8, param->codeBookSubsetRes.codeBookSubsetRestn.
6615                              n2TxAntTm3, mBuf);
6616               break;
6617
6618           case N4TX_ANT_TM3:
6619               CMCHKPK(oduUnpackUInt8, param->codeBookSubsetRes.codeBookSubsetRestn.
6620                              n4TxAntTm3, mBuf);
6621               break;
6622
6623           case N2TX_ANT_TM4:
6624               CMCHKPK(oduUnpackUInt8, param->codeBookSubsetRes.codeBookSubsetRestn.
6625                              n2TxAntTm4, mBuf);
6626               break;
6627
6628           case N4TX_ANT_TM4:
6629               for(idx = 0; idx < 8; idx++)
6630                   CMCHKPK(oduUnpackUInt8, param->codeBookSubsetRes.codeBookSubsetRestn.
6631                                  n4TxAntTm4[idx], mBuf);
6632               break;
6633
6634           case N2TX_ANT_TM5:
6635               CMCHKPK(oduUnpackUInt8, param->codeBookSubsetRes.codeBookSubsetRestn.
6636                              n2TxAntTm5, mBuf);
6637               break;
6638
6639           case N4TX_ANT_TM5:
6640               CMCHKPK(oduUnpackUInt16, param->codeBookSubsetRes.codeBookSubsetRestn.
6641                               n4TxAntTm5, mBuf);
6642               break;
6643
6644           case N2TX_ANT_TM6:
6645               CMCHKPK(oduUnpackUInt8, param->codeBookSubsetRes.codeBookSubsetRestn.
6646                              n2TxAntTm6, mBuf);
6647               break;
6648
6649           case N4TX_ANT_TM6:
6650               CMCHKPK(oduUnpackUInt16, param->codeBookSubsetRes.codeBookSubsetRestn.
6651                               n4TxAntTm6, mBuf);
6652               break;
6653           default :
6654               break;
6655
6656       }
6657       CMCHKPK(oduUnpackUInt32, param->codeBookSubsetRes.ctfCdBkRestType, mBuf);
6658 #endif /* CTF_VER2 */
6659    }
6660    CMCHKPK(oduUnpackUInt8, param->pres, mBuf);
6661    return ROK;
6662 }
6663
6664
6665 \f
6666 /***********************************************************
6667 *
6668 *     Func: cmUnpkCtfDedAntCfgInfo
6669 *
6670 *
6671 *     Desc:   Dedicated Antenna Configuration
6672  * @details This structure contains the information for antenna related
6673  *          configuration specific to an UE at PHY.
6674 *
6675 *
6676 *     Ret: S16
6677 *
6678 *     Notes:
6679 *
6680 *     File: 
6681 *
6682 **********************************************************/
6683 #ifdef ANSI
6684 PUBLIC S16 cmUnpkCtfDedAntCfgInfo
6685 (
6686 CtfDedAntCfgInfo *param,
6687 Buffer *mBuf
6688 )
6689 #else
6690 PUBLIC S16 cmUnpkCtfDedAntCfgInfo(param, mBuf)
6691 CtfDedAntCfgInfo *param;
6692 Buffer *mBuf;
6693 #endif
6694 {
6695 #ifdef CTF_VER2
6696    S16  idx;
6697 #endif /* CTF_VER2 */
6698    
6699    U32 tmpEnum;
6700
6701    TRC3(cmUnpkCtfDedAntCfgInfo)
6702
6703    CMCHKUNPK(oduPackUInt8, &param->pres, mBuf);
6704 /*ctf_c_001.main_1*/
6705    if(param->pres != FALSE)
6706    {
6707 #ifdef CTF_VER2
6708       /* 
6709        * Added Unpacking for CodeBookSubsetRestriction parameter
6710        */
6711       CMCHKUNPK(oduPackUInt32, (U32 *)&tmpEnum, mBuf);
6712       param->codeBookSubsetRes.ctfCdBkRestType = (CtfCdBkSubsetRestnType)tmpEnum;
6713       switch(param->codeBookSubsetRes.ctfCdBkRestType)
6714       {
6715           case N2TX_ANT_TM3:
6716               CMCHKUNPK(oduPackUInt8, &param->codeBookSubsetRes.codeBookSubsetRestn.
6717                              n2TxAntTm3, mBuf);
6718               break;
6719
6720           case N4TX_ANT_TM3:
6721               CMCHKUNPK(oduPackUInt8, &param->codeBookSubsetRes.codeBookSubsetRestn.
6722                              n4TxAntTm3, mBuf);
6723               break;
6724
6725           case N2TX_ANT_TM4:
6726               CMCHKUNPK(oduPackUInt8, &param->codeBookSubsetRes.codeBookSubsetRestn.
6727                              n2TxAntTm4, mBuf);
6728               break;
6729
6730           case N4TX_ANT_TM4:
6731               for(idx = 7; idx >= 0; idx--)
6732               {
6733                  CMCHKUNPK(oduPackUInt8, &(param->codeBookSubsetRes.codeBookSubsetRestn.
6734                        n4TxAntTm4[idx]), mBuf);
6735               }
6736               break;
6737
6738           case N2TX_ANT_TM5:
6739               CMCHKUNPK(oduPackUInt8, &param->codeBookSubsetRes.codeBookSubsetRestn.
6740                              n2TxAntTm5, mBuf);
6741               break;
6742
6743           case N4TX_ANT_TM5:
6744               CMCHKUNPK(oduPackUInt16, &param->codeBookSubsetRes.codeBookSubsetRestn.
6745                               n4TxAntTm5, mBuf);
6746               break;
6747
6748           case N2TX_ANT_TM6:
6749               CMCHKUNPK(oduPackUInt8, &param->codeBookSubsetRes.codeBookSubsetRestn.
6750                              n2TxAntTm6, mBuf);
6751               break;
6752
6753           case N4TX_ANT_TM6:
6754               CMCHKUNPK(oduPackUInt16, &param->codeBookSubsetRes.codeBookSubsetRestn.
6755                               n4TxAntTm6, mBuf);
6756               break;
6757           default :
6758               break;
6759       }
6760 #endif /* CTF_VER2 */
6761       /* ctf_c_001.main_3 Enum is 32bit length */
6762       CMCHKUNPK(oduPackUInt32, (U32 *)&tmpEnum, mBuf);
6763       param->txMode = (CtfUeTxAntMode)tmpEnum;
6764       CMCHKUNPK(oduPackUInt8, &param->ueTxAntSelection.cfgType, mBuf);
6765       CMCHKUNPK(oduPackUInt32, (U32 *)&tmpEnum, mBuf);
6766       param->ueTxAntSelection.txAntSelect = (CtfUeTxAntSelectType)tmpEnum;
6767    }
6768    return ROK;
6769 }
6770
6771 \f
6772 /***********************************************************
6773 *
6774 *     Func: cmPkCtfUeSecCellCfgInfo
6775 *
6776 *
6777 *     Desc:   Secondary Cell Configuration for a UE
6778  * @details This structure contains the information for 
6779 *           secondary cells for the UE
6780 *
6781 *     Ret: S16
6782 *
6783 *     Notes:
6784 *
6785 *     File: 
6786 *
6787 **********************************************************/
6788 #ifdef ANSI
6789 PUBLIC S16 cmPkCtfUeSecCellCfgInfo
6790 (
6791 CtfUeSecCellCfgInfo *param,
6792 Buffer *mBuf
6793 )
6794 #else
6795 PUBLIC S16 cmPkCtfUeSecCellCfgInfo(*param, mBuf)
6796 CtfUeSecCellCfgInfo *param;
6797 Buffer *mBuf;
6798 #endif
6799 {
6800    CMCHKPK(oduUnpackUInt16, param->sCellId, mBuf);
6801    CMCHKPK(oduUnpackUInt8, param->sCellIdx, mBuf);
6802
6803    return ROK;
6804 }
6805 /***********************************************************
6806 *
6807 *     Func: cmPkCtfSecCellCfgInfo
6808 *
6809 *
6810 *     Desc:   Secondary Cell Configuration for a UE
6811  * @details This structure contains the information for 
6812 *           secondary cells for the UE
6813 *
6814 *     Ret: S16
6815 *
6816 *     Notes:
6817 *
6818 *     File: 
6819 *
6820 **********************************************************/
6821 #ifdef ANSI
6822 PUBLIC S16 cmPkCtfSecCellCfgInfo
6823 (
6824 CtfSecCellCfgInfo *param,
6825 Buffer *mBuf
6826 )
6827 #else
6828 PUBLIC S16 cmPkCtfSecCellCfgInfo(*param, mBuf)
6829 CtfSecCellCfgInfo *param;
6830 Buffer *mBuf;
6831 #endif
6832 {
6833    S8 idx;
6834
6835    for(idx = param->numSCells - 1; idx >= 0; idx--)
6836    {
6837       CMCHKPK(cmPkCtfUeSecCellCfgInfo, &param->ueSCellDedCfg[(U8)idx], mBuf);
6838    }
6839    CMCHKPK(oduUnpackUInt32, param->sCellAction, mBuf);
6840    CMCHKPK(oduUnpackUInt8, param->numSCells, mBuf);
6841
6842    return ROK;
6843 }
6844
6845 /***********************************************************
6846 *
6847 *     Func: cmUnpkCtfUeSecCellCfgInfo
6848 *
6849 *
6850 *     Desc:   Secondary Cell Configuration for a UE
6851  * @details This structure contains the information for 
6852 *           secondary cells for the UE
6853 *
6854 *     Ret: S16
6855 *
6856 *     Notes:
6857 *
6858 *     File: 
6859 *
6860 **********************************************************/
6861 #ifdef ANSI
6862 PUBLIC S16 cmUnpkCtfUeSecCellCfgInfo
6863 (
6864 CtfUeSecCellCfgInfo *param,
6865 Buffer *mBuf
6866 )
6867 #else
6868 PUBLIC S16 cmUnpkCtfUeSecCellCfgInfo(*param, mBuf)
6869 CtfUeSecCellCfgInfo *param;
6870 Buffer *mBuf;
6871 #endif
6872 {
6873    CMCHKUNPK(oduPackUInt8, &param->sCellIdx, mBuf);
6874    CMCHKUNPK(oduPackUInt16, &param->sCellId, mBuf);
6875
6876    return ROK;
6877 }
6878 \f
6879 /***********************************************************
6880 *
6881 *     Func: cmUnpkCtfSecCellCfgInfo
6882 *
6883 *
6884 *     Desc:   Secondary Cell Configuration for a UE
6885  * @details This structure contains the information for 
6886 *           secondary cells for the UE
6887 *
6888 *     Ret: S16
6889 *
6890 *     Notes:
6891 *
6892 *     File: 
6893 *
6894 **********************************************************/
6895
6896 #ifdef ANSI
6897 PUBLIC S16 cmUnpkCtfSecCellCfgInfo
6898 (
6899 CtfSecCellCfgInfo *param,
6900 Buffer *mBuf
6901 )
6902 #else
6903 PUBLIC S16 cmUnpkCtfSecCellCfgInfo(*param, mBuf)
6904 CtfSecCellCfgInfo *param;
6905 Buffer *mBuf;
6906 #endif
6907 {
6908    U8 idx;
6909
6910    CMCHKUNPK(oduPackUInt8, &param->numSCells, mBuf);
6911    CMCHKUNPK(oduPackUInt32, (U32*)&param->sCellAction, mBuf);
6912    for(idx = 0 ; idx < param->numSCells; idx++)
6913    {
6914       CMCHKUNPK(cmUnpkCtfUeSecCellCfgInfo, &param->ueSCellDedCfg[idx], mBuf);
6915    }
6916
6917    return ROK;
6918 }
6919
6920 \f
6921 /***********************************************************
6922 *
6923 *     Func: cmPkCtfUeCatCfgInfo
6924 *
6925 *
6926 *     Desc:   UE Category Configuration
6927  * @details This structure contains the information for configuring
6928  *          the UE category at PHY.
6929 *
6930 *
6931 *     Ret : S16
6932 *
6933 *     Notes:
6934 *
6935 *     File: 
6936 *
6937 **********************************************************/
6938 #ifdef ANSI
6939 PUBLIC S16 cmPkCtfUeCatCfgInfo
6940 (
6941 CtfUeCatCfgInfo *param,
6942 Buffer *mBuf
6943 )
6944 #else
6945 PUBLIC S16 cmPkCtfUeCatCfgInfo(param, mBuf)
6946 CtfUeCatCfgInfo *param;
6947 Buffer *mBuf;
6948 #endif
6949 {
6950
6951    TRC3(cmPkCtfUeCatCfgInfo)
6952
6953 /*ctf_c_001.main_1*/
6954    if(param->pres != FALSE)
6955       CMCHKPK(oduUnpackUInt32, param->ueCategory, mBuf);
6956    CMCHKPK(oduUnpackUInt8, param->pres, mBuf);
6957    return ROK;
6958 }
6959
6960
6961 \f
6962 /***********************************************************
6963 *
6964 *     Func: cmUnpkCtfUeCatCfgInfo
6965 *
6966 *
6967 *     Desc:   UE Category Configuration
6968  * @details This structure contains the information for configuring
6969  *          the UE category at PHY.
6970 *
6971 *
6972 *     Ret: S16
6973 *
6974 *     Notes:
6975 *
6976 *     File: 
6977 *
6978 **********************************************************/
6979 #ifdef ANSI
6980 PUBLIC S16 cmUnpkCtfUeCatCfgInfo
6981 (
6982 CtfUeCatCfgInfo *param,
6983 Buffer *mBuf
6984 )
6985 #else
6986 PUBLIC S16 cmUnpkCtfUeCatCfgInfo(param, mBuf)
6987 CtfUeCatCfgInfo *param;
6988 Buffer *mBuf;
6989 #endif
6990 {
6991
6992    TRC3(cmUnpkCtfUeCatCfgInfo)
6993
6994    CMCHKUNPK(oduPackUInt8, &param->pres, mBuf);
6995 /*ctf_c_001.main_1*/
6996    if(param->pres != FALSE)
6997       CMCHKUNPK(oduPackUInt32, (U32 *)&param->ueCategory, mBuf);
6998    return ROK;
6999 }
7000
7001
7002 \f
7003 /***********************************************************
7004 *
7005 *     Func: cmPkCtfDedCfgInfo
7006 *
7007 *
7008 *     Desc:   Dedicated Configuration Information
7009  * @details This structure contains the information for configuration 
7010  *          of UE-specific physical channel resources at PHY.
7011 *
7012 *
7013 *     Ret: S16
7014 *
7015 *     Notes:
7016 *
7017 *     File: 
7018 *
7019 **********************************************************/
7020 #ifdef ANSI
7021 PUBLIC S16 cmPkCtfDedCfgInfo
7022 (
7023 CtfDedCfgInfo *param,
7024 Buffer *mBuf
7025 )
7026 #else
7027 PUBLIC S16 cmPkCtfDedCfgInfo(param, mBuf)
7028 CtfDedCfgInfo *param;
7029 Buffer *mBuf;
7030 #endif
7031 {
7032
7033    TRC3(cmPkCtfDedCfgInfo)
7034 #ifdef EMTC_ENABLE
7035    CMCHKPK(oduUnpackUInt8, param->isEmtcUe, mBuf);
7036 #endif
7037    CMCHKPK(cmPkCtfDedAntCfgInfo, &param->antInfo, mBuf);
7038 #ifndef TFU_UPGRADE
7039    CMCHKPK(cmPkCtfDedSRCfgInfo, &param->dedSRCfg, mBuf);
7040    CMCHKPK(cmPkCtfDedSrsUlCfgInfo, &param->srsUlCfg, mBuf);
7041    CMCHKPK(cmPkCtfCqiReportCfgInfo, &param->cqiRptCfg, mBuf);
7042 #endif /* TFU_UPGRADE */
7043    CMCHKPK(cmPkCtfDedPuschCfgInfo, &param->puschCfg, mBuf);
7044    CMCHKPK(cmPkCtfDedPucchCfgInfo, &param->pucchCfg, mBuf);
7045    CMCHKPK(cmPkCtfDedPdschCfgInfo, &param->pdschCfg, mBuf);
7046    CMCHKPK(cmPkCtfUeCatCfgInfo, &param->ueCatCfg, mBuf);
7047    CMCHKPK(cmPkLteRnti, param->ueId, mBuf);
7048    CMCHKPK(cmPkLteCellId, param->cellId, mBuf);
7049    return ROK;
7050 }
7051
7052
7053 \f
7054 /***********************************************************
7055 *
7056 *     Func: cmUnpkCtfDedCfgInfo
7057 *
7058 *
7059 *     Desc:   Dedicated Configuration Information
7060  * @details This structure contains the information for configuration 
7061  *          of UE-specific physical channel resources at PHY.
7062 *
7063 *
7064 *     Ret: S16
7065 *
7066 *     Notes:
7067 *
7068 *     File: 
7069 *
7070 **********************************************************/
7071 #ifdef ANSI
7072 PUBLIC S16 cmUnpkCtfDedCfgInfo
7073 (
7074 CtfDedCfgInfo *param,
7075 Buffer *mBuf
7076 )
7077 #else
7078 PUBLIC S16 cmUnpkCtfDedCfgInfo(param, mBuf)
7079 CtfDedCfgInfo *param;
7080 Buffer *mBuf;
7081 #endif
7082 {
7083
7084    TRC3(cmUnpkCtfDedCfgInfo)
7085
7086    CMCHKUNPK(cmUnpkLteCellId, &param->cellId, mBuf);
7087    CMCHKUNPK(cmUnpkLteRnti, &param->ueId, mBuf);
7088    CMCHKUNPK(cmUnpkCtfUeCatCfgInfo, &param->ueCatCfg, mBuf);
7089    CMCHKUNPK(cmUnpkCtfDedPdschCfgInfo, &param->pdschCfg, mBuf);
7090    CMCHKUNPK(cmUnpkCtfDedPucchCfgInfo, &param->pucchCfg, mBuf);
7091    CMCHKUNPK(cmUnpkCtfDedPuschCfgInfo, &param->puschCfg, mBuf);
7092 #ifndef TFU_UPGRADE
7093    CMCHKUNPK(cmUnpkCtfCqiReportCfgInfo, &param->cqiRptCfg, mBuf);
7094    CMCHKUNPK(cmUnpkCtfDedSrsUlCfgInfo, &param->srsUlCfg, mBuf);
7095    CMCHKUNPK(cmUnpkCtfDedSRCfgInfo, &param->dedSRCfg, mBuf);
7096 #endif /* TFU_UPGRADE */
7097    CMCHKUNPK(cmUnpkCtfDedAntCfgInfo, &param->antInfo, mBuf);
7098 #ifdef EMTC_ENABLE
7099    CMCHKUNPK(oduPackUInt8, &param->isEmtcUe, mBuf);
7100 #endif
7101    return ROK;
7102 }
7103
7104
7105 \f
7106 /***********************************************************
7107 *
7108 *     Func: cmPkCtfDedRecfgInfo
7109 *
7110 *
7111 *     Desc:   Dedicated Re-configuration Information
7112  * @details This structure contains the information for re-configuration 
7113  *          of UE-specific physical channel resources at PHY.
7114 *
7115 *
7116 *     Ret: S16
7117 *
7118 *     Notes:
7119 *
7120 *     File: 
7121 *
7122 **********************************************************/
7123 #ifdef ANSI
7124 PUBLIC S16 cmPkCtfDedRecfgInfo
7125 (
7126 CtfDedRecfgInfo *param,
7127 Buffer *mBuf
7128 )
7129 #else
7130 PUBLIC S16 cmPkCtfDedRecfgInfo(param, mBuf)
7131 CtfDedRecfgInfo *param;
7132 Buffer *mBuf;
7133 #endif
7134 {
7135
7136    TRC3(cmPkCtfDedRecfgInfo)
7137
7138    CMCHKPK(cmPkCtfSecCellCfgInfo, &param->sCellInfo,mBuf);
7139    /*ctf_c_001.main_1*/
7140    CMCHKPK(cmPkCtfDedAntCfgInfo, &param->antInfo, mBuf);
7141 #ifndef TFU_UPGRADE
7142    CMCHKPK(cmPkCtfCqiReportCfgInfo, &param->cqiRptCfg, mBuf);
7143    CMCHKPK(cmPkCtfDedSRCfgInfo, &param->dedSRCfg, mBuf);
7144    CMCHKPK(cmPkCtfDedSrsUlCfgInfo, &param->srsUlCfg, mBuf);
7145 #endif /* TFU_UPGRADE */
7146    CMCHKPK(cmPkCtfDedPuschCfgInfo, &param->puschCfg, mBuf);
7147    CMCHKPK(cmPkCtfDedPucchCfgInfo, &param->pucchCfg, mBuf);
7148    CMCHKPK(cmPkCtfDedPdschCfgInfo, &param->pdschCfg, mBuf);
7149    CMCHKPK(cmPkCtfUeCatCfgInfo, &param->ueCatCfg, mBuf);
7150    /* ctf_c_001.main_4: ReEst Fix */
7151 #ifdef CTF_VER3
7152    CMCHKPK(cmPkLteRnti, param->newUeId, mBuf);
7153 #else
7154    CMCHKPK(cmPkLteRnti, param->newUeId, mBuf);
7155 #endif
7156    CMCHKPK(cmPkLteRnti, param->ueId, mBuf);
7157    CMCHKPK(cmPkLteCellId, param->cellId, mBuf);
7158    return ROK;
7159 }
7160
7161
7162 \f
7163 /***********************************************************
7164 *
7165 *     Func: cmUnpkCtfDedRecfgInfo
7166 *
7167 *
7168 *     Desc:   Dedicated Re-configuration Information
7169  * @details This structure contains the information for re-configuration 
7170  *          of UE-specific physical channel resources at PHY.
7171 *
7172 *
7173 *     Ret: S16
7174 *
7175 *     Notes:
7176 *
7177 *     File: 
7178 *
7179 **********************************************************/
7180 #ifdef ANSI
7181 PUBLIC S16 cmUnpkCtfDedRecfgInfo
7182 (
7183 CtfDedRecfgInfo *param,
7184 Buffer *mBuf
7185 )
7186 #else
7187 PUBLIC S16 cmUnpkCtfDedRecfgInfo(param, mBuf)
7188 CtfDedRecfgInfo *param;
7189 Buffer *mBuf;
7190 #endif
7191 {
7192
7193    TRC3(cmUnpkCtfDedRecfgInfo)
7194
7195    CMCHKUNPK(cmUnpkLteCellId, &param->cellId, mBuf);
7196    CMCHKUNPK(cmUnpkLteRnti, &param->ueId, mBuf);
7197    /* ctf_c_001.main_4: ReEst Fix */
7198 #ifdef CTF_VER3
7199    CMCHKUNPK(cmUnpkLteRnti, &param->newUeId, mBuf);
7200 #else
7201    CMCHKUNPK(cmUnpkLteRnti, &param->newUeId, mBuf);
7202 #endif
7203    CMCHKUNPK(cmUnpkCtfUeCatCfgInfo, &param->ueCatCfg, mBuf);
7204    CMCHKUNPK(cmUnpkCtfDedPdschCfgInfo, &param->pdschCfg, mBuf);
7205    CMCHKUNPK(cmUnpkCtfDedPucchCfgInfo, &param->pucchCfg, mBuf);
7206    CMCHKUNPK(cmUnpkCtfDedPuschCfgInfo, &param->puschCfg, mBuf);
7207 #ifndef TFU_UPGRADE
7208    CMCHKUNPK(cmUnpkCtfDedSrsUlCfgInfo, &param->srsUlCfg, mBuf);
7209    CMCHKUNPK(cmUnpkCtfDedSRCfgInfo, &param->dedSRCfg, mBuf);
7210    /*ctf_c_001.main_1*/
7211    CMCHKUNPK(cmUnpkCtfCqiReportCfgInfo, &param->cqiRptCfg, mBuf);
7212 #endif /* TFU_UPGRADE */
7213    CMCHKUNPK(cmUnpkCtfDedAntCfgInfo, &param->antInfo, mBuf);
7214
7215    CMCHKUNPK(cmUnpkCtfSecCellCfgInfo, &param->sCellInfo,mBuf);
7216
7217    return ROK;
7218 }
7219
7220
7221 \f
7222 /***********************************************************
7223 *
7224 *     Func: cmPkCtfCellReleaseInfo
7225 *
7226 *
7227 *     Desc:   Cell Release Information
7228  * @details This structure contains the information for release/removal 
7229  *          of a cell and its assocated resources at PHY.
7230 *
7231 *
7232 *     Ret: S16
7233 *
7234 *     Notes:
7235 *
7236 *     File: 
7237 *
7238 **********************************************************/
7239 #ifdef ANSI
7240 PUBLIC S16 cmPkCtfCellReleaseInfo
7241 (
7242 CtfCellReleaseInfo *param,
7243 Buffer *mBuf
7244 )
7245 #else
7246 PUBLIC S16 cmPkCtfCellReleaseInfo(param, mBuf)
7247 CtfCellReleaseInfo *param;
7248 Buffer *mBuf;
7249 #endif
7250 {
7251
7252    TRC3(cmPkCtfCellReleaseInfo)
7253
7254    CMCHKPK(cmPkLteCellId, param->cellId, mBuf);
7255    return ROK;
7256 }
7257
7258
7259 \f
7260 /***********************************************************
7261 *
7262 *     Func: cmUnpkCtfCellReleaseInfo
7263 *
7264 *
7265 *     Desc:   Cell Release Information
7266  * @details This structure contains the information for release/removal 
7267  *          of a cell and its assocated resources at PHY.
7268 *
7269 *
7270 *     Ret: S16
7271 *
7272 *     Notes:
7273 *
7274 *     File: 
7275 *
7276 **********************************************************/
7277 #ifdef ANSI
7278 PUBLIC S16 cmUnpkCtfCellReleaseInfo
7279 (
7280 CtfCellReleaseInfo *param,
7281 Buffer *mBuf
7282 )
7283 #else
7284 PUBLIC S16 cmUnpkCtfCellReleaseInfo(param, mBuf)
7285 CtfCellReleaseInfo *param;
7286 Buffer *mBuf;
7287 #endif
7288 {
7289
7290    TRC3(cmUnpkCtfCellReleaseInfo)
7291
7292    CMCHKUNPK(cmUnpkLteCellId, &param->cellId, mBuf);
7293    return ROK;
7294 }
7295
7296
7297 \f
7298 /***********************************************************
7299 *
7300 *     Func: cmPkCtfDedReleaseInfo
7301 *
7302 *
7303 *     Desc:   Dedicated Release Information
7304  * @details This structure contains the information for release/removal 
7305  *          of dedicated/UE-specific configuration at PHY.
7306 *
7307 *
7308 *     Ret: S16
7309 *
7310 *     Notes:
7311 *
7312 *     File: 
7313 *
7314 **********************************************************/
7315 #ifdef ANSI
7316 PUBLIC S16 cmPkCtfDedReleaseInfo
7317 (
7318 CtfDedReleaseInfo *param,
7319 Buffer *mBuf
7320 )
7321 #else
7322 PUBLIC S16 cmPkCtfDedReleaseInfo(param, mBuf)
7323 CtfDedReleaseInfo *param;
7324 Buffer *mBuf;
7325 #endif
7326 {
7327
7328    TRC3(cmPkCtfDedReleaseInfo)
7329    CMCHKPK(cmPkCtfSecCellCfgInfo, &param->sCellInfo,mBuf);
7330    CMCHKPK(cmPkLteRnti, param->ueId, mBuf);
7331    CMCHKPK(cmPkLteCellId, param->cellId, mBuf);
7332    return ROK;
7333 }
7334
7335
7336 \f
7337 /***********************************************************
7338 *
7339 *     Func: cmUnpkCtfDedReleaseInfo
7340 *
7341 *
7342 *     Desc:   Dedicated Release Information
7343  * @details This structure contains the information for release/removal 
7344  *          of dedicated/UE-specific configuration at PHY.
7345 *
7346 *
7347 *     Ret: S16
7348 *
7349 *     Notes:
7350 *
7351 *     File: 
7352 *
7353 **********************************************************/
7354 #ifdef ANSI
7355 PUBLIC S16 cmUnpkCtfDedReleaseInfo
7356 (
7357 CtfDedReleaseInfo *param,
7358 Buffer *mBuf
7359 )
7360 #else
7361 PUBLIC S16 cmUnpkCtfDedReleaseInfo(param, mBuf)
7362 CtfDedReleaseInfo *param;
7363 Buffer *mBuf;
7364 #endif
7365 {
7366
7367    TRC3(cmUnpkCtfDedReleaseInfo)
7368
7369    CMCHKUNPK(cmUnpkLteCellId, &param->cellId, mBuf);
7370    CMCHKUNPK(cmUnpkLteRnti, &param->ueId, mBuf);
7371    CMCHKUNPK(cmUnpkCtfSecCellCfgInfo, &param->sCellInfo,mBuf);
7372    return ROK;
7373 }
7374
7375
7376 \f
7377 /***********************************************************
7378 *
7379 *     Func: cmPkCtfCfgInfo
7380 *
7381 *
7382 *     Desc:   Configuration Information
7383  * @details This structure contains the information for setting-up 
7384  *          cell or UE-specific configuration at PHY.
7385 *
7386 *
7387 *     Ret: S16
7388 *
7389 *     Notes:
7390 *
7391 *     File: 
7392 *
7393 **********************************************************/
7394 #ifdef ANSI
7395 PUBLIC S16 cmPkCtfCfgInfo
7396 (
7397 CtfCfgInfo *param,
7398 Buffer *mBuf
7399 )
7400 #else
7401 PUBLIC S16 cmPkCtfCfgInfo(param, mBuf)
7402 CtfCfgInfo *param;
7403 Buffer *mBuf;
7404 #endif
7405 {
7406
7407    TRC3(cmPkCtfCfgInfo)
7408
7409       switch(param->cfgElem) {
7410          case CTF_UE_CFG:
7411             CMCHKPK(cmPkCtfDedCfgInfo, &param->u.dedCfg, mBuf);
7412             break;
7413          case CTF_CELL_CFG:
7414             CMCHKPK(cmPkCtfCellCfgInfo, &param->u.cellCfg, mBuf);
7415             break;
7416          default :
7417             return RFAILED;
7418       }
7419    CMCHKPK(oduUnpackUInt8, param->cfgElem, mBuf);
7420    return ROK;
7421 }
7422
7423
7424 \f
7425 /***********************************************************
7426 *
7427 *     Func: cmUnpkCtfCfgInfo
7428 *
7429 *
7430 *     Desc:   Configuration Information
7431  * @details This structure contains the information for setting-up 
7432  *          cell or UE-specific configuration at PHY.
7433 *
7434 *
7435 *     Ret: S16
7436 *
7437 *     Notes:
7438 *
7439 *     File: 
7440 *
7441 **********************************************************/
7442 #ifdef ANSI
7443 PUBLIC S16 cmUnpkCtfCfgInfo
7444 (
7445 CtfCfgInfo *param,
7446 Buffer *mBuf
7447 )
7448 #else
7449 PUBLIC S16 cmUnpkCtfCfgInfo(param, mBuf)
7450 CtfCfgInfo *param;
7451 Buffer *mBuf;
7452 #endif
7453 {
7454
7455    TRC3(cmUnpkCtfCfgInfo)
7456
7457    CMCHKUNPK(oduPackUInt8, &param->cfgElem, mBuf);
7458       switch(param->cfgElem) {
7459          case CTF_CELL_CFG:
7460             CMCHKUNPK(cmUnpkCtfCellCfgInfo, &param->u.cellCfg, mBuf);
7461             break;
7462          case CTF_UE_CFG:
7463             CMCHKUNPK(cmUnpkCtfDedCfgInfo, &param->u.dedCfg, mBuf);
7464             break;
7465          default :
7466             return RFAILED;
7467       }
7468    return ROK;
7469 }
7470
7471
7472 \f
7473 /***********************************************************
7474 *
7475 *     Func: cmPkCtfReCfgInfo
7476 *
7477 *
7478 *     Desc:   Re-configuration Information
7479  * @details This structure contains the information for re-configuring 
7480  *          cell or UE-specific configuration at PHY.
7481 *
7482 *
7483 *     Ret: S16
7484 *
7485 *     Notes:
7486 *
7487 *     File: 
7488 *
7489 **********************************************************/
7490 #ifdef ANSI
7491 PUBLIC S16 cmPkCtfReCfgInfo
7492 (
7493 CtfReCfgInfo *param,
7494 Buffer *mBuf
7495 )
7496 #else
7497 PUBLIC S16 cmPkCtfReCfgInfo(param, mBuf)
7498 CtfReCfgInfo *param;
7499 Buffer *mBuf;
7500 #endif
7501 {
7502
7503    TRC3(cmPkCtfReCfgInfo)
7504
7505       switch(param->cfgElem) {
7506          case CTF_UE_CFG:
7507             CMCHKPK(cmPkCtfDedRecfgInfo, &param->u.dedRecfg, mBuf);
7508             break;
7509          case CTF_CELL_CFG:
7510             CMCHKPK(cmPkCtfCellRecfgInfo, &param->u.cellRecfg, mBuf);
7511             break;
7512          /* Starts - Fix for CR ccpu00123185 */
7513          case CTF_TX_PWR_CFG:
7514             CMCHKPK(cmPkCtfCellPwrcfgInfo, &param->u.cellRecfg, mBuf);
7515             break;
7516          /* ends - Fix for CR ccpu00123185 */
7517          case CTF_CELL_STOP:
7518             CMCHKPK(cmPkCtfCellStop, &param->u.cellRecfg, mBuf);
7519             break;
7520              
7521          default :
7522             return RFAILED;
7523       }
7524    CMCHKPK(oduUnpackUInt8, param->cfgElem, mBuf);
7525    return ROK;
7526 }
7527
7528
7529 \f
7530 /***********************************************************
7531 *
7532 *     Func: cmUnpkCtfReCfgInfo
7533 *
7534 *
7535 *     Desc:   Re-configuration Information
7536  * @details This structure contains the information for re-configuring 
7537  *          cell or UE-specific configuration at PHY.
7538 *
7539 *
7540 *     Ret: S16
7541 *
7542 *     Notes:
7543 *
7544 *     File: 
7545 *
7546 **********************************************************/
7547 #ifdef ANSI
7548 PUBLIC S16 cmUnpkCtfReCfgInfo
7549 (
7550 CtfReCfgInfo *param,
7551 Buffer *mBuf
7552 )
7553 #else
7554 PUBLIC S16 cmUnpkCtfReCfgInfo(param, mBuf)
7555 CtfReCfgInfo *param;
7556 Buffer *mBuf;
7557 #endif
7558 {
7559
7560    TRC3(cmUnpkCtfReCfgInfo)
7561
7562    CMCHKUNPK(oduPackUInt8, &param->cfgElem, mBuf);
7563       switch(param->cfgElem) {
7564          case CTF_CELL_CFG:
7565             CMCHKUNPK(cmUnpkCtfCellRecfgInfo, &param->u.cellRecfg, mBuf);
7566             break;
7567          case CTF_UE_CFG:
7568             CMCHKUNPK(cmUnpkCtfDedRecfgInfo, &param->u.dedRecfg, mBuf);
7569             break;
7570          /* Starts - Fix for CR ccpu00123185 */
7571          case CTF_TX_PWR_CFG:
7572             CMCHKUNPK(cmUnpkCtfCellPwrcfgInfo, &param->u.cellRecfg, mBuf);
7573             break;
7574          /* ends - Fix for CR ccpu00123185 */
7575          case CTF_CELL_STOP:
7576             CMCHKUNPK(cmUnpkCtfCellStop, &param->u.cellRecfg, mBuf);
7577             break;
7578          default :
7579             return RFAILED;
7580       }
7581    return ROK;
7582 }
7583
7584
7585 \f
7586 /***********************************************************
7587 *
7588 *     Func: cmPkCtfReleaseInfo
7589 *
7590 *
7591 *     Desc:   Release configuration Information
7592  * @details This structure contains the information for releasing 
7593  *          cell or UE-specific configuration at PHY.
7594 *
7595 *
7596 *     Ret: S16
7597 *
7598 *     Notes:
7599 *
7600 *     File: 
7601 *
7602 **********************************************************/
7603 #ifdef ANSI
7604 PUBLIC S16 cmPkCtfReleaseInfo
7605 (
7606 CtfReleaseInfo *param,
7607 Buffer *mBuf
7608 )
7609 #else
7610 PUBLIC S16 cmPkCtfReleaseInfo(param, mBuf)
7611 CtfReleaseInfo *param;
7612 Buffer *mBuf;
7613 #endif
7614 {
7615
7616    TRC3(cmPkCtfReleaseInfo)
7617
7618       switch(param->cfgElem) {
7619          case CTF_UE_CFG:
7620             CMCHKPK(cmPkCtfDedReleaseInfo, &param->u.dedRel, mBuf);
7621             break;
7622          case CTF_CELL_CFG:
7623             CMCHKPK(cmPkCtfCellReleaseInfo, &param->u.cellRel, mBuf);
7624             break;
7625          default :
7626             return RFAILED;
7627       }
7628    CMCHKPK(oduUnpackUInt8, param->cfgElem, mBuf);
7629    return ROK;
7630 }
7631
7632
7633 \f
7634 /***********************************************************
7635 *
7636 *     Func: cmUnpkCtfReleaseInfo
7637 *
7638 *
7639 *     Desc:   Release configuration Information
7640  * @details This structure contains the information for releasing 
7641  *          cell or UE-specific configuration at PHY.
7642 *
7643 *
7644 *     Ret: S16
7645 *
7646 *     Notes:
7647 *
7648 *     File: 
7649 *
7650 **********************************************************/
7651 #ifdef ANSI
7652 PUBLIC S16 cmUnpkCtfReleaseInfo
7653 (
7654 CtfReleaseInfo *param,
7655 Buffer *mBuf
7656 )
7657 #else
7658 PUBLIC S16 cmUnpkCtfReleaseInfo(param, mBuf)
7659 CtfReleaseInfo *param;
7660 Buffer *mBuf;
7661 #endif
7662 {
7663
7664    TRC3(cmUnpkCtfReleaseInfo)
7665
7666    CMCHKUNPK(oduPackUInt8, &param->cfgElem, mBuf);
7667       switch(param->cfgElem) {
7668          case CTF_CELL_CFG:
7669             CMCHKUNPK(cmUnpkCtfCellReleaseInfo, &param->u.cellRel, mBuf);
7670             break;
7671          case CTF_UE_CFG:
7672             CMCHKUNPK(cmUnpkCtfDedReleaseInfo, &param->u.dedRel, mBuf);
7673             break;
7674          default :
7675             return RFAILED;
7676       }
7677    return ROK;
7678 }
7679
7680
7681 \f
7682 /***********************************************************
7683 *
7684 *     Func: cmPkCtfCfgReqInfo
7685 *
7686 *
7687 *     Desc:   Configuration Request information
7688  * @details This is the main structure in the Configuration request primitive.
7689  *    -# This structure contains the configuration information as given by 
7690  *       the RRC to configure PHY layer for common/dedicated resources.
7691  *    -# It can contain Config/Reconfig/Release.
7692  *    -# The result of configuration is indicated in TfUiCtfCfgCfm.
7693 *
7694 *
7695 *     Ret: S16
7696 *
7697 *     Notes:
7698 *
7699 *     File: 
7700 *
7701 **********************************************************/
7702 #ifdef ANSI
7703 PUBLIC S16 cmPkCtfCfgReqInfo
7704 (
7705 CtfCfgReqInfo *param,
7706 Buffer *mBuf
7707 )
7708 #else
7709 PUBLIC S16 cmPkCtfCfgReqInfo(param, mBuf)
7710 CtfCfgReqInfo *param;
7711 Buffer *mBuf;
7712 #endif
7713 {
7714
7715    TRC3(cmPkCtfCfgReqInfo)
7716
7717    /* ctf_c_001.main_4: Added support for vendor specific parameters */
7718 #ifdef CTF_VER3
7719    CMCHKPK(cmPkCtfVendorSpecParams, &param->vendorParams, mBuf);
7720 #endif    
7721       switch(param->cfgType) {
7722          case CTF_DELETE:
7723             CMCHKPK(cmPkCtfReleaseInfo, &param->u.release, mBuf);
7724             break;
7725          case CTF_RECONFIG:
7726             CMCHKPK(cmPkCtfReCfgInfo, &param->u.reCfg, mBuf);
7727             break;
7728          case CTF_CONFIG:
7729             CMCHKPK(cmPkCtfCfgInfo, &param->u.cfg, mBuf);
7730             break;
7731          default :
7732             return RFAILED;
7733       }
7734    CMCHKPK(oduUnpackUInt8, param->cfgType, mBuf);
7735    return ROK;
7736 }
7737
7738
7739 \f
7740    /* ctf_c_001.main_4: Modified cmUnpkCtfCfgReqInfo() to add support
7741     * for vendor specific parameters */
7742 /***********************************************************
7743 *
7744 *     Func: cmUnpkCtfCfgReqInfo
7745 *
7746 *
7747 *     Desc:   Configuration Request information
7748  * @details This is the main structure in the Configuration request primitive.
7749  *    -# This structure contains the configuration information as given by 
7750  *       the RRC to configure PHY layer for common/dedicated resources.
7751  *    -# It can contain Config/Reconfig/Release.
7752  *    -# The result of configuration is indicated in TfUiCtfCfgCfm.
7753 *
7754 *
7755 *     Ret: S16
7756 *
7757 *     Notes:
7758 *
7759 *     File: 
7760 *
7761 **********************************************************/
7762 #ifdef ANSI
7763 PUBLIC S16 cmUnpkCtfCfgReqInfo
7764 (
7765 Pst  *pst,
7766 CtfCfgReqInfo *param,
7767 Buffer *mBuf
7768 )
7769 #else
7770 PUBLIC S16 cmUnpkCtfCfgReqInfo(param, mBuf)
7771 Pst  *pst;
7772 CtfCfgReqInfo *param;
7773 Buffer *mBuf;
7774 #endif
7775 {
7776
7777 #ifdef CTF_VER3
7778    S16 retVal;
7779 #endif
7780
7781    TRC3(cmUnpkCtfCfgReqInfo)
7782
7783    CMCHKUNPK(oduPackUInt8, &param->cfgType, mBuf);
7784       switch(param->cfgType) {
7785          case CTF_CONFIG:
7786             CMCHKUNPK(cmUnpkCtfCfgInfo, &param->u.cfg, mBuf);
7787             break;
7788          case CTF_RECONFIG:
7789             CMCHKUNPK(cmUnpkCtfReCfgInfo, &param->u.reCfg, mBuf);
7790             break;
7791          case CTF_DELETE:
7792             CMCHKUNPK(cmUnpkCtfReleaseInfo, &param->u.release, mBuf);
7793             break;
7794          default :
7795             return RFAILED;
7796       }
7797 #ifdef CTF_VER3
7798     if((retVal = cmUnpkCtfVendorSpecParams(pst, &param->vendorParams, mBuf)) != ROK)
7799         return (retVal);
7800 #endif
7801    return ROK;
7802 }
7803
7804          /* Starts - Fix for CR ccpu00123185 */
7805 /***********************************************************
7806 *
7807 *     Func: cmPkCtfCellPwrcfgInfo
7808 *
7809 *
7810 *     Desc:   Cell Re-configuration Information
7811  * @details This structure contains the information for reconfiguration of Reference Signal Power
7812  *          of a cell and its associated resources at PHY.
7813 *
7814 *
7815 *     Ret: S16
7816 *
7817 *     Notes:
7818 *
7819 *     File: 
7820 *
7821 **********************************************************/
7822 #ifdef ANSI
7823 PUBLIC S16 cmPkCtfCellPwrcfgInfo
7824 (
7825 CtfCellRecfgInfo *param,
7826 Buffer *mBuf
7827 )
7828 #else
7829 PUBLIC S16 cmPkCtfCellPwrcfgInfo(param, mBuf)
7830 CtfCellRecfgInfo *param;
7831 Buffer *mBuf;
7832 #endif
7833 {
7834
7835    TRC3(cmPkCtfCellPwrcfgInfo)
7836
7837    /* Added the pack for newly added reference signal Power*/
7838    CMCHKPK(oduUnpackUInt32, (U32)param->ctfCellStatus, mBuf);
7839    CMCHKPK(SPkS16, param->pilotSigPwr, mBuf);
7840    CMCHKPK(SPkS16, param->priSigPwr, mBuf);
7841    CMCHKPK(SPkS16, param->secSigPwr, mBuf);
7842    
7843    CMCHKPK(SPkS16, param->pdschCfg.refSigPwr, mBuf);
7844    CMCHKPK(cmPkLteCellId, param->cellId, mBuf);
7845    return ROK;
7846 }
7847
7848
7849 \f
7850 /***********************************************************
7851 *
7852 *     Func: cmUnpkCtfCellPwrcfgInfo
7853 *
7854 *
7855 *     Desc:   Cell Re-configuration Information
7856  * @details This structure contains the information for reconfiguration
7857  *          of a cell and its associated resources at PHY.
7858 *
7859 *
7860 *     Ret: S16
7861 *
7862 *     Notes:
7863 *
7864 *     File: 
7865 *
7866 **********************************************************/
7867 #ifdef ANSI
7868 PUBLIC S16 cmUnpkCtfCellPwrcfgInfo
7869 (
7870 CtfCellRecfgInfo *param,
7871 Buffer *mBuf
7872 )
7873 #else
7874 PUBLIC S16 cmUnpkCtfCellPwrcfgInfo(param, mBuf)
7875 CtfCellRecfgInfo *param;
7876 Buffer *mBuf;
7877 #endif
7878 {
7879
7880    TRC3(cmUnpkCtfCellPwrcfgInfo)
7881    
7882    /* ctf_c_001.main_3: Added the unpack for newly added fileds inside the CFG structure*/
7883    CMCHKUNPK(cmUnpkLteCellId, &param->cellId, mBuf);
7884
7885    CMCHKUNPK(SUnpkS16, &param->pdschCfg.refSigPwr, mBuf);
7886    CMCHKUNPK(SUnpkS16, &param->secSigPwr, mBuf);
7887    CMCHKUNPK(SUnpkS16, &param->priSigPwr, mBuf);
7888    CMCHKUNPK(SUnpkS16, &param->pilotSigPwr, mBuf);
7889    CMCHKUNPK(oduPackUInt32, (U32 *)&param->ctfCellStatus, mBuf);
7890
7891    return ROK;
7892 }
7893
7894 /***********************************************************
7895 *
7896 *     Func: cmPkCtfCellStop
7897 *
7898 *
7899 *     Desc:   Cell Re-configuration Information
7900  * @details This structure contains the information for reconfiguration of Reference Signal Power
7901  *          of a cell and its associated resources at PHY.
7902 *
7903 *
7904 *     Ret: S16
7905 *
7906 *     Notes:
7907 *
7908 *     File: 
7909 *
7910 **********************************************************/
7911 #ifdef ANSI
7912 PUBLIC S16 cmPkCtfCellStop
7913 (
7914 CtfCellRecfgInfo *param,
7915 Buffer *mBuf
7916 )
7917 #else
7918 PUBLIC S16 cmPkCtfCellStop(param, mBuf)
7919 CtfCellRecfgInfo *param;
7920 Buffer *mBuf;
7921 #endif
7922 {
7923
7924    TRC3(cmPkCtfCellStop)
7925
7926    /* Added the pack for newly added reference signal Power*/
7927    CMCHKPK(oduUnpackUInt32, (U32)param->ctfCellStatus, mBuf);
7928    CMCHKPK(SPkS16, param->pilotSigPwr, mBuf);
7929    CMCHKPK(SPkS16, param->priSigPwr, mBuf);
7930    CMCHKPK(SPkS16, param->secSigPwr, mBuf);
7931    
7932    CMCHKPK(SPkS16, param->pdschCfg.refSigPwr, mBuf);
7933    CMCHKPK(cmPkLteCellId, param->cellId, mBuf);
7934    return ROK;
7935 }
7936
7937 /***********************************************************
7938 *
7939 *     Func: cmUnpkCtfCellStop
7940 *
7941 *
7942 *     Desc:   Cell Re-configuration Information
7943  * @details This structure contains the information for reconfiguration
7944  *          of a cell and its associated resources at PHY.
7945 *
7946 *
7947 *     Ret: S16
7948 *
7949 *     Notes:
7950 *
7951 *     File: 
7952 *
7953 **********************************************************/
7954 #ifdef ANSI
7955 PUBLIC S16 cmUnpkCtfCellStop
7956 (
7957 CtfCellRecfgInfo *param,
7958 Buffer *mBuf
7959 )
7960 #else
7961 PUBLIC S16 cmUnpkCtfCellStop(param, mBuf)
7962 CtfCellRecfgInfo *param;
7963 Buffer *mBuf;
7964 #endif
7965 {
7966
7967    TRC3(cmUnpkCtfCellStop)
7968    
7969    CMCHKUNPK(cmUnpkLteCellId, &param->cellId, mBuf);
7970
7971    CMCHKUNPK(SUnpkS16, &param->pdschCfg.refSigPwr, mBuf);
7972    CMCHKUNPK(SUnpkS16, &param->secSigPwr, mBuf);
7973    CMCHKUNPK(SUnpkS16, &param->priSigPwr, mBuf);
7974    CMCHKUNPK(SUnpkS16, &param->pilotSigPwr, mBuf);
7975    CMCHKUNPK(oduPackUInt32, (U32 *)&param->ctfCellStatus, mBuf);
7976
7977    return ROK;
7978 }
7979
7980 /* Periodic REM Scan for TPM */
7981 /***********************************************************
7982 *
7983 *     Func: cmPkPerRemScanCellInfo
7984 *
7985 *
7986 *     Desc: Periodic REM cell search response
7987 *     @details This Message contains cell search results. 
7988 *
7989 *
7990 *     Ret: S16
7991 *
7992 *     Notes:
7993 *
7994 *     File: 
7995 *
7996 **********************************************************/
7997 #ifdef ANSI
7998 PUBLIC S16 cmPkPerRemScanCellInfo
7999 (
8000 CtfPeriodicRemCellInfo *param,
8001 Buffer *mBuf
8002 )
8003 #else
8004 PUBLIC S16 cmPkPerRemScanCellInfo(param, mBuf)
8005 CtfPeriodicRemCellInfo *param;
8006 Buffer *mBuf;
8007 #endif
8008 {
8009    TRC3(cmPkPerRemScanCellInfo)
8010
8011    CMCHKPK(oduUnpackUInt16,param->pci, mBuf);
8012    CMCHKPK(oduUnpackUInt8, param->rsrp, mBuf);
8013    CMCHKPK(oduUnpackUInt8, param->dlBw, mBuf);
8014    CMCHKPK(oduUnpackUInt8, param->numTx, mBuf);
8015    return ROK;
8016 }
8017
8018
8019 /***********************************************************
8020 *
8021 *     Func: cmPkCtfPeriodicCellSearchRsp
8022 *
8023 *
8024 *     Desc: Periodic REM cell search response
8025 *     @details This Message contains Periodic REM scan results. 
8026 *
8027 *
8028 *     Ret: S16
8029 *
8030 *     Notes:
8031 *
8032 *     File: 
8033 *
8034 **********************************************************/
8035 #ifdef ANSI
8036 PUBLIC S16 cmPkCtfPeriodicCellSearchRsp
8037 (
8038 CtfPeriodicRemCellSearchRsp *param,
8039 Buffer *mBuf
8040 )
8041 #else
8042 PUBLIC S16 cmPkCtfPeriodicCellSearchRsp(param, mBuf)
8043 CtfPeriodicRemCellSearchRsp *param;
8044 Buffer *mBuf;
8045 #endif
8046 {
8047    S16 idx;
8048    TRC3(cmPkCtfPeriodicCellSearchRsp)
8049
8050    for(idx = param->numCells - 1; idx >=0; idx--)
8051    {
8052       CMCHKPK(cmPkPerRemScanCellInfo, &param->cellInfo[idx], mBuf);
8053    }
8054    CMCHKPK(oduUnpackUInt8, param->numCells, mBuf);
8055   
8056    return ROK;
8057 }
8058
8059 /**
8060 * @brief Configuration Request from App to CL for
8061  * cnm Init Sync responce
8062 *
8063 * @details
8064 *
8065 *     Function: cmPkCtfPeriodicRemCellSearchRsp
8066 *
8067 *  @param[in]   Pst*  pst
8068 *  @param[in]   SpId  spId
8069 *  @param[in]   CtfCfgTransId  * transId
8070 *  @param[in]   CtfCnmInitSyncRsp* ctfcnmInitSyncRsp
8071 *  @return   S16
8072 *      -# ROK
8073 **/
8074 #ifdef ANSI
8075 PUBLIC S16 cmPkCtfPeriodicRemCellSearchRsp
8076 (
8077 Pst* pst,
8078 SpId spId,
8079 CtfCfgTransId *transId,
8080 CtfPeriodicRemCellSearchRsp *CellCfgRsp
8081 )
8082 #else
8083 PUBLIC S16 cmPkCtfPeriodicRemCellSearchRsp(pst, spId, transId, CellCfgRsp)
8084 Pst* pst;
8085 SpId spId;
8086 CtfCfgTransId *transId;
8087 CtfPeriodicRemCellSearchRsp *CellCfgRsp;
8088 #endif
8089 {
8090    Buffer *mBuf = NULLP;
8091    TRC3(cmPkCtfPeriodicRemCellSearchRsp)
8092
8093    if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) {
8094 #if (ERRCLASS & ERRCLS_ADD_RES)
8095       /* ctf_c_001.main_3 Compilation warning fix with g++ */
8096       SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
8097          (Txt*)&__FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
8098          (ErrVal)ECTF016, (ErrVal)0, (Txt*)&"Packing failed");
8099 #endif
8100       SPutSBuf(pst->region, pst->pool, (Data *)CellCfgRsp,
8101             sizeof(CtfPeriodicRemCellSearchRsp));
8102       return RFAILED;
8103    }
8104    if (pst->selector == ODU_SELECTOR_LC) {
8105       if (cmPkCtfPeriodicCellSearchRsp(CellCfgRsp, mBuf) != ROK) {
8106 #if (ERRCLASS & ERRCLS_ADD_RES)
8107       /* ctf_c_001.main_3 Compilation warning fix with g++ */
8108          SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
8109             (Txt*)&__FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
8110             (ErrVal)ECTF017, (ErrVal)0, (Txt*)&"Packing failed");
8111 #endif
8112          SPutSBuf(pst->region, pst->pool, (Data *)CellCfgRsp,
8113                sizeof(CtfPeriodicRemCellSearchRsp));
8114          SPutMsg(mBuf);
8115          return RFAILED;
8116       }
8117    }
8118    else if (pst->selector == ODU_SELECTOR_LWLC) {
8119
8120    if (oduPackPointer((PTR)CellCfgRsp, mBuf) != ROK) {
8121 #if (ERRCLASS & ERRCLS_ADD_RES)
8122       /* ctf_c_001.main_3 Compilation warning fix with g++ */
8123          SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
8124             __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
8125             (ErrVal)ECTF018, (ErrVal)0, "Packing failed");
8126 #endif
8127          SPutSBuf(pst->region, pst->pool, (Data *)CellCfgRsp,
8128                sizeof(CtfPeriodicRemCellSearchRsp));
8129          SPutMsg(mBuf);
8130          return RFAILED;
8131       }
8132
8133    }
8134  if(cmPkCtfCfgTransId(transId, mBuf) != ROK) {
8135 #if (ERRCLASS & ERRCLS_ADD_RES)
8136       /* ctf_c_001.main_3 Compilation warning fix with g++ */
8137       SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
8138          __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
8139          (ErrVal)ECTF019, (ErrVal)0, "Packing failed");
8140 #endif
8141       SPutSBuf(pst->region, pst->pool, (Data *)CellCfgRsp,
8142             sizeof(CtfPeriodicRemCellSearchRsp));
8143       SPutMsg(mBuf);
8144       return RFAILED;
8145    }
8146  if (SPkS16(spId, mBuf) != ROK) {
8147 #if (ERRCLASS & ERRCLS_ADD_RES)
8148       /* ctf_c_001.main_3 Compilation warning fix with g++ */
8149       SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
8150          __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
8151          (ErrVal)ECTF020, (ErrVal)0, "Packing failed");
8152 #endif
8153       SPutSBuf(pst->region, pst->pool, (Data *)CellCfgRsp,
8154             sizeof(CtfPeriodicRemCellSearchRsp));
8155       SPutMsg(mBuf);
8156       return RFAILED;
8157    }
8158    if (pst->selector != ODU_SELECTOR_LWLC) {
8159       SPutSBuf(pst->region, pst->pool, (Data *)CellCfgRsp,
8160             sizeof(CtfPeriodicRemCellSearchRsp));
8161    }
8162    pst->event = (Event)EVTCTFPREMCELLSRCHRSP;
8163    return (SPstTsk(pst,mBuf));
8164 }
8165
8166 #ifdef ANSI
8167 PUBLIC S16 cmUnpkCtfPerRemScanCellInfo
8168 (
8169 CtfPeriodicRemCellInfo *param,
8170 Buffer *mBuf
8171 )
8172 #else
8173 PUBLIC S16 cmUnpkCtfPerRemScanCellInfo(param, mBuf)
8174 CtfPeriodicRemCellInfo *param;
8175 Buffer *mBuf;
8176 #endif
8177 {
8178    TRC3(cmUnpkCtfPerRemScanCellInfo);
8179
8180    CMCHKUNPK(oduPackUInt8, &param->numTx, mBuf);
8181    CMCHKUNPK(oduPackUInt8, &param->dlBw, mBuf);
8182    CMCHKUNPK(oduPackUInt8, &param->rsrp, mBuf);
8183    CMCHKUNPK(oduPackUInt16, &param->pci, mBuf);
8184    return ROK;
8185 }
8186
8187 #ifdef ANSI
8188 PUBLIC S16 cmUnpkCtfPerRemCellSrch
8189 (
8190 CtfPeriodicRemCellSearchRsp *param,
8191 Buffer *mBuf
8192 )
8193 #else
8194 PUBLIC S16 cmUnpkCtfPerRemCellSrch(param, mBuf)
8195 CtfPeriodicRemCellSearchRsp *param;
8196 Buffer *mBuf;
8197 #endif
8198 {
8199    S16 idx;
8200    TRC3(cmUnpkCtfPerRemCellSrch);
8201
8202    CMCHKUNPK(oduPackUInt8, &param->numCells, mBuf);
8203    for(idx = 0; idx < (param->numCells); idx++)
8204    {
8205       CMCHKUNPK(cmUnpkCtfPerRemScanCellInfo, &param->cellInfo[idx], mBuf);
8206    }
8207
8208    return ROK;
8209 }
8210
8211 /**
8212 * @brief ENB STOP Indication from PHY to ENB-APP
8213 *
8214 * @details
8215 *
8216 *     Function: cmUnpkPerRemCellSrchRsp
8217 *
8218 *  @param[in]   Pst*  pst
8219 *  @param[in]   SuId  suId
8220 *  @param[in]   CtfCfgTransId  transId
8221 *  @return   S16
8222 *      -# ROK
8223 **/
8224 #ifdef ANSI
8225 PUBLIC S16 cmUnpkPerRemCellSrchRsp
8226 (
8227 CtfPerRemCellSrchRsp func,
8228 Pst *pst,
8229 Buffer *mBuf
8230 )
8231 #else
8232 PUBLIC S16 cmUnpkPerRemCellSrchRsp(func, pst, mBuf)
8233 CtfPerRemCellSrchRsp func;
8234 Pst *pst;
8235 Buffer *mBuf;
8236 #endif
8237 {
8238    SuId suId = 0;
8239    CtfCfgTransId transId;
8240    CtfPeriodicRemCellSearchRsp *CellSrchRsp = NULLP;  
8241    TRC3(cmUnpkPerRemCellSrchRsp)
8242
8243    if (SUnpkS16(&suId, mBuf) != ROK) {
8244       SPutMsg(mBuf);
8245 #if (ERRCLASS & ERRCLS_ADD_RES)
8246       /* ctf_c_001.main_3 Compilation warning fix with g++ */
8247       SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
8248          (Txt*)&__FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
8249          (ErrVal)ECTF030, (ErrVal)0, (Txt*)&"Packing failed");
8250 #endif
8251       return RFAILED;
8252    }
8253    if (cmUnpkCtfCfgTransId(&transId, mBuf) != ROK) {
8254       SPutMsg(mBuf);
8255 #if (ERRCLASS & ERRCLS_ADD_RES)
8256       /* ctf_c_001.main_3 Compilation warning fix with g++ */
8257       SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
8258          (Txt*)&__FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
8259          (ErrVal)ECTF031, (ErrVal)0, (Txt*)&"Packing failed");
8260 #endif
8261       return RFAILED;
8262    }
8263    if (pst->selector != ODU_SELECTOR_LWLC) {
8264       if ((SGetSBuf(pst->region, pst->pool, (Data **)&CellSrchRsp,
8265                   sizeof(CtfPeriodicRemCellSearchRsp))) != ROK) {
8266 #if (ERRCLASS & ERRCLS_ADD_RES)
8267       /* ctf_c_001.main_3 Compilation warning fix with g++ */
8268          SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
8269             (Txt*)&__FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
8270             (ErrVal)ECTF024, (ErrVal)0, (Txt*)&"Packing failed");
8271 #endif
8272          SPutMsg(mBuf);
8273          return RFAILED;
8274       }
8275    }
8276    if (pst->selector == ODU_SELECTOR_LWLC) {
8277       if (oduUnpackPointer((PTR *)&CellSrchRsp, mBuf) != ROK) {
8278          SPutMsg(mBuf);
8279          return RFAILED;
8280       }
8281    }
8282   else if (pst->selector == ODU_SELECTOR_LC)
8283       if (cmUnpkCtfPerRemCellSrch(CellSrchRsp, mBuf) != ROK) {
8284       SPutSBuf(pst->region, pst->pool, (Data *)CellSrchRsp,
8285             sizeof(CtfPeriodicRemCellSearchRsp));
8286       SPutMsg(mBuf);
8287 #if (ERRCLASS & ERRCLS_ADD_RES)
8288       /* ctf_c_001.main_3 Compilation warning fix with g++ */
8289       SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
8290          (Txt*)&__FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
8291          (ErrVal)ECTF025, (ErrVal)0, (Txt*)&"Packing failed");
8292 #endif
8293       return RFAILED;
8294    }
8295
8296    SPutMsg(mBuf);
8297    return ((*func)(pst, suId, &transId, CellSrchRsp));
8298 }
8299 /* Periodic REM Scan for TPM End */
8300
8301 /* ends - Fix for CR ccpu00123185 */
8302 #endif
8303
8304 /**********************************************************************
8305          End of file
8306 **********************************************************************/