U8, U16, U32 data type changes
[o-du/l2.git] / src / cm / cm_tenb_stats.c
1 /*******************************************************************************
2 ################################################################################
3 #   Copyright (c) [2017-2019] [Radisys]                                        #
4 #                                                                              #
5 #   Licensed under the Apache License, Version 2.0 (the "License");            #
6 #   you may not use this file except in compliance with the License.           #
7 #   You may obtain a copy of the License at                                    #
8 #                                                                              #
9 #       http://www.apache.org/licenses/LICENSE-2.0                             #
10 #                                                                              #
11 #   Unless required by applicable law or agreed to in writing, software        #
12 #   distributed under the License is distributed on an "AS IS" BASIS,          #
13 #   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.   #
14 #   See the License for the specific language governing permissions and        #
15 #   limitations under the License.                                             #
16 ################################################################################
17 *******************************************************************************/
18
19 /**********************************************************************
20  
21     Name:  
22  
23     Type:   C include file
24  
25     Desc:   
26  
27     File:  cm_tenb_stats.c
28  
29 **********************************************************************/
30  
31 /** @file cm_tenb_stats.c
32 @brief This file contains 
33 */
34
35 /*
36 *     The defines in this file correspond to structures and variables 
37 *     used by the following TRILLIUM software:
38 *
39 *     part no.             description
40 *     --------     ----------------------------------------------
41 *
42 */
43 /* header include files (.h) */
44   
45 #include "envopt.h"             /* Environment options */  
46 #include "envdep.h"             /* Environment dependent */
47 #include "envind.h"             /* Environment independent */
48 #include "gen.h"                /* General */
49 #include "ssi.h"                /* System services interface */
50 #include "cm_lte.h"             /* Common LTE header file */
51 #include "cm_llist.h"           /* Linked list header file */
52 #include "cm_tkns.h"            /* Common tokens header file */
53
54
55 /* header/extern include files (.x) */
56
57 #include "gen.x"                /* General */
58 #include "ssi.x"                /* System services interface */
59 #include "cm_lib.x"             /* Common lib header file */
60 #include "cm_llist.x"           /* Linked list header file */
61 #include "cm_tkns.x"            /* Common tokens header file */
62 #include "cm_lte.x"             /* Common LTE header file */
63
64 #include "ss_queue.h"
65 #include "ss_queue.x"
66 #include "ss_task.x"
67 #include "ss_msg.x"
68 #include "cm_tenb_stats.x"    /* Total EnodeB Stats declarations */
69
70 #ifdef TENB_STATS
71 PRIVATE Void TSInfUtlPackUeInfo ARGS((
72  Buffer            *mBuf,
73  TSInfL2UeStats     *stats 
74 ));
75 PRIVATE Void TSInfUtlPackCellInfo ARGS((
76  Buffer              *mBuf,
77  TSInfL2CellStats     *stats 
78 ));
79 PRIVATE Void TSInfUtlUnpkUeInfo ARGS((
80  Buffer            *mBuf,
81  TSInfL2UeStats     *stats 
82 ));
83 PRIVATE Void TSInfUtlUnpkCellInfo ARGS((
84  Buffer              *mBuf,
85  TSInfL2CellStats     *stats
86 ));
87 PRIVATE Buffer* TSInfUtlAllocMsg ARGS((
88  Pst   *pst
89 ));
90  
91 /*
92 *
93 *       Fun:   TSInfTrigL2Stats 
94 *
95 *       Desc:  Indicate PDCP UL to initiate Stats procedure 
96 *
97 *       Ret:   
98 *
99 *       Notes: None
100 *
101 *
102 */
103 #ifdef ANSI
104 PRIVATE Void TSInfTrigL2Stats
105 (
106  Region    region,
107  Pool      pool
108 )
109 #else
110 PRIVATE Void TSInfTrigL2Stats(region, pool)
111  Region    region;
112  Pool      pool;
113 #endif
114 {
115    Buffer* pBuf;
116    Pst pst = {0};
117
118
119    SGetMsg(region, pool, &pBuf);
120 //#if defined(SCH_STATS) || defined(TENB_STATS)
121    pst.dstEnt = STATS_DSTENT;
122    pst.dstInst = STATS_DSTINST;
123    pst.selector = CL_DSTENT_SELECTOR;
124
125    pst.srcProcId = STATS_SRCPROCID;
126    pst.dstProcId = STATS_DSTPROCID;
127    pst.srcEnt = STATS_SRCENT;
128    pst.event = TENBSTATSINIT; 
129    SPstTsk(&pst, pBuf);
130
131    return;
132 }
133
134 /*
135 *
136 *       Fun:   TSInfTrigStats
137 *
138 *       Desc:  Trigger Sending L2 Stats
139 *
140 *       Ret:   
141 *
142 *       Notes: None
143 *
144 *
145 */
146 #ifdef ANSI
147 Void TSInfTrigStats
148 (
149  Region    region,
150  Pool      pool
151 )
152 #else
153 Void TSInfTrigStats(region, pool)
154  Region    region;
155  Pool      pool;
156 #endif
157 {
158 //TODO
159    TSInfTrigL2Stats(region, pool);
160
161    return;
162 }
163
164          
165 #ifdef ANSI
166 PRIVATE Buffer* TSInfUtlAllocMsg
167 (
168  Pst   *pst
169 )
170 #else
171 PRIVATE Buffer* TSInfUtlAllocMsg(pst)
172  Pst   *pst;
173 #endif
174 {
175    Buffer *mBuf; 
176
177
178    if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) {
179       printf("\n MBuf Allocation failed\n");
180    }
181    return (mBuf);
182 }
183
184 #ifdef ANSI
185 PRIVATE Void TSInfUtlPackUeInfo
186 (
187  Buffer            *mBuf,
188  TSInfL2UeStats     *stats
189 )
190 #else
191 PRIVATE Void TSInfUtlPackUeInfo(mBuf, stats)
192  Buffer            *mBuf;
193  TSInfL2UeStats     *stats; 
194 #endif
195 {
196    S32 i;
197    uint32_t k;
198
199
200    CMCHKPK(oduUnpackUInt32, stats->persistent.numDeactivation, mBuf);
201    CMCHKPK(oduUnpackUInt32, stats->persistent.numActivation, mBuf);
202    CMCHKPK(oduUnpackUInt32, stats->persistent.activatedSCells, mBuf);
203
204    CMCHKPK(oduUnpackUInt32, stats->nonPersistent.rlc.dlMaxWindowSz, mBuf);
205    CMCHKPK(oduUnpackUInt32, stats->nonPersistent.rlc.dlMaxPktsInSduQ, mBuf);
206    CMCHKPK(oduUnpackUInt32, stats->nonPersistent.rlc.ulReOdrTmrExpCnt, mBuf);
207
208    CMCHKPK(oduUnpackUInt32, stats->nonPersistent.pdcp.dlFlowCtrlDropCnt, mBuf);
209    CMCHKPK(oduUnpackUInt32, stats->nonPersistent.pdcp.dlPdcpAckWaitDropCnt, mBuf);
210    CMCHKPK(oduUnpackUInt32, stats->nonPersistent.pdcp.dlPdcpDropCnt, mBuf);
211
212
213    for (k = 0; k < L2_STATS_MAX_CELLS; k++)
214    {
215       CMCHKPK(oduUnpackUInt32, stats->nonPersistent.sch[k].ulTpt, mBuf);
216       CMCHKPK(oduUnpackUInt32, stats->nonPersistent.sch[k].ulNumiTbs, mBuf);
217       CMCHKPK(oduUnpackUInt32, stats->nonPersistent.sch[k].ulSumiTbs, mBuf);
218       CMCHKPK(oduUnpackUInt32, stats->nonPersistent.sch[k].ulNumCqi, mBuf);
219       CMCHKPK(oduUnpackUInt32, stats->nonPersistent.sch[k].ulSumCqi, mBuf);
220       CMCHKPK(oduUnpackUInt32, stats->nonPersistent.sch[k].ulDtxCnt, mBuf);
221       CMCHKPK(oduUnpackUInt32, stats->nonPersistent.sch[k].ulNackCnt, mBuf);
222       CMCHKPK(oduUnpackUInt32, stats->nonPersistent.sch[k].ulAckNackCnt, mBuf);
223       CMCHKPK(oduUnpackUInt32, stats->nonPersistent.sch[k].ulPrbUsg, mBuf);
224       CMCHKPK(oduUnpackUInt32, stats->nonPersistent.sch[k].ulRetxOccns, mBuf);
225       CMCHKPK(oduUnpackUInt32, stats->nonPersistent.sch[k].ulTxOccns, mBuf);
226       CMCHKPK(oduUnpackUInt32, stats->nonPersistent.sch[k].dlTpt, mBuf);
227       CMCHKPK(oduUnpackUInt32, stats->nonPersistent.sch[k].dlBo, mBuf);
228       for (i=0; i<4; i++)
229       {
230          CMCHKPK(oduUnpackUInt32, stats->nonPersistent.sch[k].riCnt[i], mBuf);
231       }
232       for (i=0; i<5; i++)
233       {
234          CMCHKPK(oduUnpackUInt32, stats->nonPersistent.sch[k].dlPdbLvl[i], mBuf);
235       }
236       CMCHKPK(oduUnpackUInt32, stats->nonPersistent.sch[k].cqiDropCnt, mBuf);
237       CMCHKPK(oduUnpackUInt32, stats->nonPersistent.sch[k].dlNumCw1iTbs, mBuf);
238       CMCHKPK(oduUnpackUInt32, stats->nonPersistent.sch[k].dlSumCw1iTbs, mBuf);
239       CMCHKPK(oduUnpackUInt32, stats->nonPersistent.sch[k].dlNumCw0iTbs, mBuf);
240       CMCHKPK(oduUnpackUInt32, stats->nonPersistent.sch[k].dlSumCw0iTbs, mBuf);
241       CMCHKPK(oduUnpackUInt32, stats->nonPersistent.sch[k].dlNumCw1Cqi, mBuf);
242       CMCHKPK(oduUnpackUInt32, stats->nonPersistent.sch[k].dlSumCw1Cqi, mBuf);
243       CMCHKPK(oduUnpackUInt32, stats->nonPersistent.sch[k].dlNumCw0Cqi, mBuf);
244       CMCHKPK(oduUnpackUInt32, stats->nonPersistent.sch[k].dlSumCw0Cqi, mBuf);
245       for (i=0; i<2; i++)
246       {
247          CMCHKPK(oduUnpackUInt32, stats->nonPersistent.sch[k].dlDtxCnt[i], mBuf);
248       }
249       for (i=0; i<2; i++)
250       {
251          CMCHKPK(oduUnpackUInt32, stats->nonPersistent.sch[k].dlAckNackCnt[i], mBuf);
252       }
253       for (i=0; i<2; i++)
254       {
255          CMCHKPK(oduUnpackUInt32, stats->nonPersistent.sch[k].dlNackCnt[i], mBuf);
256       }
257       CMCHKPK(oduUnpackUInt32, stats->nonPersistent.sch[k].dlPrbUsg, mBuf);
258       CMCHKPK(oduUnpackUInt32, stats->nonPersistent.sch[k].dlRetxOccns, mBuf);
259       CMCHKPK(oduUnpackUInt32, stats->nonPersistent.sch[k].dlTxOccns, mBuf);
260    }
261    CMCHKPK(oduUnpackUInt32, stats->rnti, mBuf);
262    return;
263 }
264
265 #ifdef ANSI
266 PRIVATE Void TSInfUtlPackCellInfo
267 (
268  Buffer              *mBuf,
269  TSInfL2CellStats     *stats  
270 )
271 #else
272 PRIVATE Void TSInfUtlPackCellInfo(mBuf, stats)
273  Buffer              *mBuf;
274  TSInfL2CellStats     *stats; 
275 #endif
276 {
277    S32 i,j;
278
279
280    CMCHKPK(oduUnpackUInt32, stats->rlc.reOdrTmrExp, mBuf);
281    CMCHKPK(oduUnpackUInt32, stats->rlc.maxRlcDrbRetxFail, mBuf);
282    CMCHKPK(oduUnpackUInt32, stats->rlc.maxRlcSrbRetxFail, mBuf);
283
284    CMCHKPK(oduUnpackUInt32, stats->sch.ulNumiTbs, mBuf);
285    CMCHKPK(oduUnpackUInt32, stats->sch.ulSumiTbs, mBuf);
286    CMCHKPK(oduUnpackUInt32, stats->sch.ulNumCqi, mBuf);
287    CMCHKPK(oduUnpackUInt32, stats->sch.ulSumCqi, mBuf);
288 #ifdef RG_5GTF
289    CMCHKPK(oduUnpackUInt32, stats->sch.ul5gtfRbAllocFail, mBuf);
290    CMCHKPK(oduUnpackUInt32, stats->sch.ul5gtfPdcchSend, mBuf);
291    CMCHKPK(oduUnpackUInt32, stats->sch.ul5gtfUeFnlzReAdd, mBuf);
292    CMCHKPK(oduUnpackUInt32, stats->sch.ul5gtfUeRmvFnlzZeroBo, mBuf);
293    CMCHKPK(oduUnpackUInt32, stats->sch.ul5gtfUeRbAllocDone, mBuf);
294    CMCHKPK(oduUnpackUInt32, stats->sch.ul5gtfAllocAllocated, mBuf);
295    CMCHKPK(oduUnpackUInt32, stats->sch.ul5gtfPdcchSchd, mBuf);
296    CMCHKPK(oduUnpackUInt32, stats->sch.ul5gtfUeSchPick, mBuf);
297    CMCHKPK(oduUnpackUInt32, stats->sch.ul5gtfBsrRecv, mBuf);
298    CMCHKPK(oduUnpackUInt32, stats->sch.ul5gtfSrRecv, mBuf);
299
300    CMCHKPK(oduUnpackUInt32, stats->sch.dl5gtfPdschCons, mBuf);
301    CMCHKPK(oduUnpackUInt32, stats->sch.dl5gtfPdcchSend, mBuf);
302    CMCHKPK(oduUnpackUInt32, stats->sch.dl5gtfBoUpd, mBuf);
303    CMCHKPK(oduUnpackUInt32, stats->sch.dl5gtfFnlzFail, mBuf);
304    CMCHKPK(oduUnpackUInt32, stats->sch.dl5gtfFnlzPass, mBuf);
305    CMCHKPK(oduUnpackUInt32, stats->sch.dl5gtfRbAllocFail, mBuf);
306    CMCHKPK(oduUnpackUInt32, stats->sch.dl5gtfRbAllocPass, mBuf);
307    CMCHKPK(oduUnpackUInt32, stats->sch.dl5gtfUePick, mBuf);
308 #endif
309    CMCHKPK(oduUnpackUInt32, stats->sch.cntTtiProcTime500, mBuf);
310    CMCHKPK(oduUnpackUInt32, stats->sch.cntTtiProcTime600, mBuf);
311    CMCHKPK(oduUnpackUInt32, stats->sch.cntTtiProcTime700, mBuf);
312    CMCHKPK(oduUnpackUInt32, stats->sch.cntTtiProcTime800, mBuf);
313    CMCHKPK(oduUnpackUInt32, stats->sch.cntTtiProcTime900, mBuf);
314    CMCHKPK(oduUnpackUInt32, stats->sch.cntTtiProcTime1000, mBuf);
315    CMCHKPK(oduUnpackUInt32, stats->sch.avgTtiProcTime, mBuf);
316    for (i=9; i>=0; i--)
317    {
318       CMCHKPK(oduUnpackUInt32, stats->sch.dlPdbRatio[i], mBuf);
319    }
320    for (i=9; i>=0; i--)
321    {
322       CMCHKPK(oduUnpackUInt32, stats->sch.ulPrbUsage[i], mBuf);
323    }
324    for (i=9; i>=0; i--)
325    {
326       CMCHKPK(oduUnpackUInt32, stats->sch.dlPrbUsage[i], mBuf);
327    }
328    for (i=3; i>=0; i--)
329    {
330       CMCHKPK(oduUnpackUInt32, stats->sch.ulDtx[i], mBuf);
331    }
332    for (i=3; i>=0; i--)
333    {
334       CMCHKPK(oduUnpackUInt32, stats->sch.ulAckNack[i], mBuf);
335    }
336    for (i=3; i>=0; i--)
337    {
338       CMCHKPK(oduUnpackUInt32, stats->sch.ulNack[i], mBuf);
339    }
340    for (i=1; i>=0; i--)
341    {
342       for (j=3; j>=0; j--)
343       {
344          CMCHKPK(oduUnpackUInt32, stats->sch.dlDtx[i][j], mBuf);
345       }
346    }
347    for (i=1; i>=0; i--)
348    {
349       for (j=3; j>=0; j--)
350       {
351          CMCHKPK(oduUnpackUInt32, stats->sch.dlAckNack[i][j], mBuf);
352       }
353    }
354    for (i=1; i>=0; i--)
355    {
356       for (j=3; j>=0; j--)
357       {
358          CMCHKPK(oduUnpackUInt32, stats->sch.dlNack[i][j], mBuf);
359       }
360    }
361    for (i=3; i>=0; i--)
362    {
363       CMCHKPK(oduUnpackUInt32, stats->sch.riCnt[i], mBuf);
364    }
365    CMCHKPK(oduUnpackUInt32, stats->sch.dlNumCw1iTbs, mBuf);
366    CMCHKPK(oduUnpackUInt32, stats->sch.dlSumCw1iTbs, mBuf);
367    CMCHKPK(oduUnpackUInt32, stats->sch.dlNumCw0iTbs, mBuf);
368    CMCHKPK(oduUnpackUInt32, stats->sch.dlSumCw0iTbs, mBuf);
369    CMCHKPK(oduUnpackUInt32, stats->sch.dlNumCw1Cqi, mBuf);
370    CMCHKPK(oduUnpackUInt32, stats->sch.dlSumCw1Cqi, mBuf);
371    CMCHKPK(oduUnpackUInt32, stats->sch.dlNumCw0Cqi, mBuf);
372    CMCHKPK(oduUnpackUInt32, stats->sch.dlSumCw0Cqi, mBuf);
373    CMCHKPK(oduUnpackUInt32, stats->sch.msg3Fail, mBuf);
374    CMCHKPK(oduUnpackUInt32, stats->sch.msg4Fail, mBuf);
375
376    CMCHKPK(oduUnpackUInt32, stats->cellId, mBuf);
377
378    return;
379 }
380
381 #ifdef ANSI
382 PRIVATE Void TSInfUtlUnpkUeInfo
383 (
384  Buffer            *mBuf,
385  TSInfL2UeStats     *stats 
386 )
387 #else
388 PRIVATE Void TSInfUtlUnpkUeInfo(mBuf, stats)
389  Buffer            *mBuf;
390  TSInfL2UeStats     *stats; 
391 #endif
392 {
393    S32 i;
394    uint32_t k;
395
396
397    CMCHKUNPK(oduPackUInt32, &stats->rnti, mBuf);
398
399    for (k = L2_STATS_MAX_CELLS; k > 0; k--)
400    {
401       CMCHKUNPK(oduPackUInt32, &stats->nonPersistent.sch[k-1].dlTxOccns, mBuf);
402       CMCHKUNPK(oduPackUInt32, &stats->nonPersistent.sch[k-1].dlRetxOccns, mBuf);
403       CMCHKUNPK(oduPackUInt32, &stats->nonPersistent.sch[k-1].dlPrbUsg, mBuf);
404       for (i=1; i>=0; i--)
405       {
406          CMCHKUNPK(oduPackUInt32, &stats->nonPersistent.sch[k-1].dlNackCnt[i], mBuf);
407       }
408       for (i=1; i>=0; i--)
409       {
410          CMCHKUNPK(oduPackUInt32, &stats->nonPersistent.sch[k-1].dlAckNackCnt[i], mBuf);
411       }
412       for (i=1; i>=0; i--)
413       {
414          CMCHKUNPK(oduPackUInt32, &stats->nonPersistent.sch[k-1].dlDtxCnt[i], mBuf);
415       }
416       CMCHKUNPK(oduPackUInt32, &stats->nonPersistent.sch[k-1].dlSumCw0Cqi, mBuf);
417       CMCHKUNPK(oduPackUInt32, &stats->nonPersistent.sch[k-1].dlNumCw0Cqi, mBuf);
418       CMCHKUNPK(oduPackUInt32, &stats->nonPersistent.sch[k-1].dlSumCw1Cqi, mBuf);
419       CMCHKUNPK(oduPackUInt32, &stats->nonPersistent.sch[k-1].dlNumCw1Cqi, mBuf);
420       CMCHKUNPK(oduPackUInt32, &stats->nonPersistent.sch[k-1].dlSumCw0iTbs, mBuf);
421       CMCHKUNPK(oduPackUInt32, &stats->nonPersistent.sch[k-1].dlNumCw0iTbs, mBuf);
422       CMCHKUNPK(oduPackUInt32, &stats->nonPersistent.sch[k-1].dlSumCw1iTbs, mBuf);
423       CMCHKUNPK(oduPackUInt32, &stats->nonPersistent.sch[k-1].dlNumCw1iTbs, mBuf);
424       CMCHKUNPK(oduPackUInt32, &stats->nonPersistent.sch[k-1].cqiDropCnt, mBuf);
425       for (i=4; i>=0; i--)
426       {
427          CMCHKUNPK(oduPackUInt32, &stats->nonPersistent.sch[k-1].dlPdbLvl[i], mBuf);
428       }
429       for (i=3; i>=0; i--)
430       {
431          CMCHKUNPK(oduPackUInt32, &stats->nonPersistent.sch[k-1].riCnt[i], mBuf);
432       }
433       CMCHKUNPK(oduPackUInt32, &stats->nonPersistent.sch[k-1].dlBo, mBuf);
434       CMCHKUNPK(oduPackUInt32, &stats->nonPersistent.sch[k-1].dlTpt, mBuf);
435       CMCHKUNPK(oduPackUInt32, &stats->nonPersistent.sch[k-1].ulTxOccns, mBuf);
436       CMCHKUNPK(oduPackUInt32, &stats->nonPersistent.sch[k-1].ulRetxOccns, mBuf);
437       CMCHKUNPK(oduPackUInt32, &stats->nonPersistent.sch[k-1].ulPrbUsg, mBuf);
438       CMCHKUNPK(oduPackUInt32, &stats->nonPersistent.sch[k-1].ulAckNackCnt, mBuf);
439       CMCHKUNPK(oduPackUInt32, &stats->nonPersistent.sch[k-1].ulNackCnt, mBuf);
440       CMCHKUNPK(oduPackUInt32, &stats->nonPersistent.sch[k-1].ulDtxCnt, mBuf);
441       CMCHKUNPK(oduPackUInt32, &stats->nonPersistent.sch[k-1].ulSumCqi, mBuf);
442       CMCHKUNPK(oduPackUInt32, &stats->nonPersistent.sch[k-1].ulNumCqi, mBuf);
443       CMCHKUNPK(oduPackUInt32, &stats->nonPersistent.sch[k-1].ulSumiTbs, mBuf);
444       CMCHKUNPK(oduPackUInt32, &stats->nonPersistent.sch[k-1].ulNumiTbs, mBuf);
445       CMCHKUNPK(oduPackUInt32, &stats->nonPersistent.sch[k-1].ulTpt, mBuf);
446    }
447
448    CMCHKUNPK(oduPackUInt32, &stats->nonPersistent.pdcp.dlPdcpDropCnt, mBuf);
449    CMCHKUNPK(oduPackUInt32, &stats->nonPersistent.pdcp.dlPdcpAckWaitDropCnt, mBuf);
450    CMCHKUNPK(oduPackUInt32, &stats->nonPersistent.pdcp.dlFlowCtrlDropCnt, mBuf);
451
452    CMCHKUNPK(oduPackUInt32, &stats->nonPersistent.rlc.ulReOdrTmrExpCnt, mBuf);
453    CMCHKUNPK(oduPackUInt32, &stats->nonPersistent.rlc.dlMaxPktsInSduQ, mBuf);
454    CMCHKUNPK(oduPackUInt32, &stats->nonPersistent.rlc.dlMaxWindowSz, mBuf);
455
456    CMCHKUNPK(oduPackUInt32, &stats->persistent.activatedSCells, mBuf);
457    CMCHKUNPK(oduPackUInt32, &stats->persistent.numActivation, mBuf);
458    CMCHKUNPK(oduPackUInt32, &stats->persistent.numDeactivation, mBuf);
459
460    return;
461 }
462
463 #ifdef ANSI
464 PRIVATE Void TSInfUtlUnpkCellInfo
465 (
466  Buffer              *mBuf,
467  TSInfL2CellStats     *stats 
468 )
469 #else
470 PRIVATE Void TSInfUtlUnpkCellInfo(mBuf, stats)
471  Buffer              *mBuf;
472  TSInfL2CellStats     *stats; 
473 #endif
474 {
475    S32 i,j;
476
477
478       CMCHKUNPK(oduPackUInt32, &stats->cellId, mBuf);
479
480    CMCHKUNPK(oduPackUInt32, &stats->sch.msg4Fail, mBuf);
481    CMCHKUNPK(oduPackUInt32, &stats->sch.msg3Fail, mBuf);
482    CMCHKUNPK(oduPackUInt32, &stats->sch.dlSumCw0Cqi, mBuf);
483    CMCHKUNPK(oduPackUInt32, &stats->sch.dlNumCw0Cqi, mBuf);
484    CMCHKUNPK(oduPackUInt32, &stats->sch.dlSumCw1Cqi, mBuf);
485    CMCHKUNPK(oduPackUInt32, &stats->sch.dlNumCw1Cqi, mBuf);
486    CMCHKUNPK(oduPackUInt32, &stats->sch.dlSumCw0iTbs, mBuf);
487    CMCHKUNPK(oduPackUInt32, &stats->sch.dlNumCw0iTbs, mBuf);
488    CMCHKUNPK(oduPackUInt32, &stats->sch.dlSumCw1iTbs, mBuf);
489    CMCHKUNPK(oduPackUInt32, &stats->sch.dlNumCw1iTbs, mBuf);
490    for (i=0; i<4; i++)
491    {
492       CMCHKUNPK(oduPackUInt32, &stats->sch.riCnt[i], mBuf);
493    }
494    for (i=0; i<2; i++)
495    {
496       for (j=0; j<4; j++)
497       {
498          CMCHKUNPK(oduPackUInt32, &stats->sch.dlNack[i][j], mBuf);
499       }
500    }
501    for (i=0; i<2; i++)
502    {
503       for (j=0; j<4; j++)
504       {
505          CMCHKUNPK(oduPackUInt32, &stats->sch.dlAckNack[i][j], mBuf);
506       }
507    }
508    for (i=0; i<2; i++)
509    {
510       for (j=0; j<4; j++)
511       {
512          CMCHKUNPK(oduPackUInt32, &stats->sch.dlDtx[i][j], mBuf);
513       }
514    }
515    for (i=0; i<4; i++)
516    {
517       CMCHKUNPK(oduPackUInt32, &stats->sch.ulNack[i], mBuf);
518    }
519    for (i=0; i<4; i++)
520    {
521       CMCHKUNPK(oduPackUInt32, &stats->sch.ulAckNack[i], mBuf);
522    }
523    for (i=0; i<4; i++)
524    {
525       CMCHKUNPK(oduPackUInt32, &stats->sch.ulDtx[i], mBuf);
526    }
527    for (i=0; i<10; i++)
528    {
529       CMCHKUNPK(oduPackUInt32, &stats->sch.dlPrbUsage[i], mBuf);
530    }
531    for (i=0; i<10; i++)
532    {
533       CMCHKUNPK(oduPackUInt32, &stats->sch.ulPrbUsage[i], mBuf);
534    }
535    for (i=0; i<10; i++)
536    {
537       CMCHKUNPK(oduPackUInt32, &stats->sch.dlPdbRatio[i], mBuf);
538    }
539    CMCHKUNPK(oduPackUInt32, &stats->sch.avgTtiProcTime, mBuf);
540    CMCHKUNPK(oduPackUInt32, &stats->sch.cntTtiProcTime1000, mBuf);
541    CMCHKUNPK(oduPackUInt32, &stats->sch.cntTtiProcTime900, mBuf);
542    CMCHKUNPK(oduPackUInt32, &stats->sch.cntTtiProcTime800, mBuf);
543    CMCHKUNPK(oduPackUInt32, &stats->sch.cntTtiProcTime700, mBuf);
544    CMCHKUNPK(oduPackUInt32, &stats->sch.cntTtiProcTime600, mBuf);
545    CMCHKUNPK(oduPackUInt32, &stats->sch.cntTtiProcTime500, mBuf);
546 #ifdef RG_5GTF
547    CMCHKUNPK(oduPackUInt32, &stats->sch.dl5gtfUePick, mBuf);
548    CMCHKUNPK(oduPackUInt32, &stats->sch.dl5gtfRbAllocPass, mBuf);
549    CMCHKUNPK(oduPackUInt32, &stats->sch.dl5gtfRbAllocFail, mBuf);
550    CMCHKUNPK(oduPackUInt32, &stats->sch.dl5gtfFnlzPass, mBuf);
551    CMCHKUNPK(oduPackUInt32, &stats->sch.dl5gtfFnlzFail, mBuf);
552    CMCHKUNPK(oduPackUInt32, &stats->sch.dl5gtfBoUpd, mBuf);
553    CMCHKUNPK(oduPackUInt32, &stats->sch.dl5gtfPdcchSend, mBuf);
554    CMCHKUNPK(oduPackUInt32, &stats->sch.dl5gtfPdschCons, mBuf);
555
556    CMCHKUNPK(oduPackUInt32, &stats->sch.ul5gtfSrRecv, mBuf);
557    CMCHKUNPK(oduPackUInt32, &stats->sch.ul5gtfBsrRecv, mBuf);
558    CMCHKUNPK(oduPackUInt32, &stats->sch.ul5gtfUeSchPick, mBuf);
559    CMCHKUNPK(oduPackUInt32, &stats->sch.ul5gtfPdcchSchd, mBuf);
560    CMCHKUNPK(oduPackUInt32, &stats->sch.ul5gtfAllocAllocated, mBuf);
561    CMCHKUNPK(oduPackUInt32, &stats->sch.ul5gtfUeRbAllocDone, mBuf);
562    CMCHKUNPK(oduPackUInt32, &stats->sch.ul5gtfUeRmvFnlzZeroBo, mBuf);
563    CMCHKUNPK(oduPackUInt32, &stats->sch.ul5gtfUeFnlzReAdd, mBuf);
564    CMCHKUNPK(oduPackUInt32, &stats->sch.ul5gtfPdcchSend, mBuf);
565    CMCHKUNPK(oduPackUInt32, &stats->sch.ul5gtfRbAllocFail, mBuf);
566 #endif
567    CMCHKUNPK(oduPackUInt32, &stats->sch.ulSumCqi, mBuf);
568    CMCHKUNPK(oduPackUInt32, &stats->sch.ulNumCqi, mBuf);
569    CMCHKUNPK(oduPackUInt32, &stats->sch.ulSumiTbs, mBuf);
570    CMCHKUNPK(oduPackUInt32, &stats->sch.ulNumiTbs, mBuf);
571
572    CMCHKUNPK(oduPackUInt32, &stats->rlc.maxRlcSrbRetxFail, mBuf);
573    CMCHKUNPK(oduPackUInt32, &stats->rlc.maxRlcDrbRetxFail, mBuf);
574    CMCHKUNPK(oduPackUInt32, &stats->rlc.reOdrTmrExp, mBuf);
575
576    return;
577 }
578
579 #ifdef ANSI
580 Void TSInfPkSndL2UeStats
581 (
582  Pst               *pst,
583  SuId              suId,
584  TSInfL2UeStats     *stats  
585 )
586 #else
587 Void TSInfPkSndL2UeStats(pst, suId, stats)
588  Pst               *pst;
589  SuId              suId;
590  TSInfL2UeStats     *stats;
591 #endif
592 {
593    Buffer *mBuf;
594
595
596    mBuf = TSInfUtlAllocMsg(pst);
597    TSInfUtlPackUeInfo(mBuf, stats);
598    SPkS16(suId, mBuf);
599    pst->event = (Event) EVTTENBL2UESTATS;
600    SPstTsk(pst, mBuf);
601    return;
602 }
603
604 #ifdef ANSI
605 Void TSInfUnpkL2UeStats
606 (
607  TSInfL2UeStatsInd   func,
608  Pst                *pst,
609  Buffer             *mBuf
610 )
611 #else
612 Void TSInfUnpkL2UeStats(func, pst, mBuf)
613  TSInfL2UeStatsInd   func;
614  Pst                *pst;
615  Buffer             *mBuf;
616 #endif
617 {
618    SuId              suId;
619    TSInfL2UeStats     stats; 
620
621
622    SUnpkS16(&suId, mBuf);
623    TSInfUtlUnpkUeInfo(mBuf, &stats);
624    SPutMsg(mBuf);
625    (*func)(pst, suId, &stats);
626    return;
627 }
628
629 #ifdef ANSI
630 Void TSInfPkSndL2CellStats
631 (
632  Pst                 *pst,
633  SuId                suId,
634  TSInfL2CellStats   *stats 
635 )
636 #else
637 Void TSInfPkSndL2CellStats(pst, suId, stats)
638  Pst                 *pst;
639  SuId                suId;
640  TSInfL2Cellstats   *stats;
641 #endif
642 {
643    Buffer *mBuf;
644
645
646    mBuf = TSInfUtlAllocMsg(pst);
647    TSInfUtlPackCellInfo(mBuf, stats);
648    SPkS16(suId, mBuf);
649    pst->event = (Event) EVTTENBL2CELLSTATS;
650    SPstTsk(pst, mBuf);
651    return;
652 }
653
654 #ifdef ANSI
655 Void TSInfUnpkL2CellStats
656 (
657  TSInfL2CellStatsInd   func,
658  Pst                *pst,
659  Buffer             *mBuf
660 )
661 #else
662 Void TSInfUnpkL2CellStats(func, pst, mBuf)
663  TSInfL2CellStatsInd   func;
664  Pst                *pst;
665  Buffer             *mBuf;
666 #endif
667 {
668    SuId                suId;
669    TSInfL2CellStats    stats; 
670
671
672    SUnpkS16(&suId, mBuf);
673    TSInfUtlUnpkCellInfo(mBuf, &stats);
674    SPutMsg(mBuf);
675    (*func)(pst, suId, &stats);
676    return;
677 }
678 #endif /* TENB_STATS */
679
680 /**********************************************************************
681          End of file
682  **********************************************************************/