1 /*******************************************************************************
2 ################################################################################
3 # Copyright (c) [2017-2019] [Radisys] #
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 #
9 # http://www.apache.org/licenses/LICENSE-2.0 #
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 *******************************************************************************/
19 /********************************************************************20**
25 Desc: This file Contains the Data structures for Common LTE
29 Sid: cm_lte.x@@/main/2 - Fri Nov 13 14:09:17 2009
33 *********************************************************************21*/
40 #define cmPkLteRbId oduUnpackUInt8
41 #define cmPkLteRnti oduUnpackUInt16
42 #define cmPkLteCellId oduUnpackUInt16
43 #define cmPkLteRlcMode oduUnpackUInt8
44 #define cmPkLteLcId oduUnpackUInt8
45 #define cmPkLteLcType oduUnpackUInt8
46 #define cmPkLteAggrLvl oduUnpackUInt32
48 /* Unpacking Defines */
49 #define cmUnpkLteRbId oduPackUInt8
50 #define cmUnpkLteRnti oduPackUInt16
51 #define cmUnpkLteCellId oduPackUInt16
52 #define cmUnpkLteRlcMode oduPackUInt8
53 #define cmUnpkLteLcId oduPackUInt8
54 #define cmUnpkLteLcType oduPackUInt8
55 #define cmUnpkLteAggrLvl oduPackUInt32
57 #define MAX_POOL_SIZE 6 /*!< Maximum pool size */
58 #define MAX_REGION_SIZE 5 /*!< Maximum Region size */
60 #define CM_PACK_STRUCT __attribute__((packed))
62 #define CM_PACK_STRUCT
70 #endif /*__cplusplus*/
73 @brief CM_LTE Interface File (cm_lte.x)
76 /* definitions for Common LTE */
78 /** @brief Radio Bearer ID */
79 typedef uint8_t CmLteRbId;
82 typedef uint16_t CmLteCellId;
85 typedef uint16_t CmLteRnti;
87 /** @brief Mode Type TM/UM/AM */
88 typedef uint8_t CmLteRlcMode;
90 /** @brief Logical Channel ID */
91 typedef uint8_t CmLteLcId;
93 /** @brief Logical Channel Type */
94 typedef uint8_t CmLteLcType;
96 /** @brief Transport Channel Type */
97 typedef uint8_t CmLteTrchType;
99 /** @brief Contention Resolution ID */
100 typedef uint8_t CmLteContResId[6];
103 typedef struct cmLteRlcId
105 CmLteRbId rbId; /*!< Radio Bearer ID */
106 uint8_t rbType; /*!< RB Type */
107 CmLteRnti ueId; /*!< UE ID */
108 CmLteCellId cellId; /*!< Cell ID */
111 /** @brief LTE Timing Info */
112 typedef struct cmLteTimingInfo
115 uint16_t hSfn; /*!< Hyper System Frame Number */
117 uint16_t sfn; /*!< System Frame Number */
118 uint16_t slot; /*!< Subframe number */
121 /** @brief PDCP ID */
122 typedef struct cmLtePdcpId
124 CmLteCellId cellId; /*!< Cell ID */
125 CmLteRnti ueId; /*!< UE ID */
126 CmLteRbId rbId; /*!< PDCP Instance ID */
127 uint8_t rbType; /*!< RB type */
130 /* Defining structures for Memory Information for L2-MEAS */
131 typedef struct cmLtePoolInfo
134 uint32_t totAvailable;
139 typedef struct cmLteRegionInfo
141 uint8_t regionType; /* 0-SSI 1-Shared */
144 uint8_t isGenMemInfoUpdated;
145 CmLtePoolInfo poolInfo[MAX_POOL_SIZE];
148 typedef struct cmLteMemInfo
152 CmLteRegionInfo regInfo[MAX_REGION_SIZE];
155 /** @brief CPU Utilization INFO */
156 typedef struct cmLteCpuUtilInfo
158 uint32_t avgCpuUtil; /*!< average cpu utilization */
159 uint32_t maxCpuUtil; /*!< Max cpu utilization */
162 /** @brief CPU INFO */
163 typedef struct cmLteCpuInfo
165 uint8_t numCores; /*!< number of cores*/
166 CmLteCpuUtilInfo cpuUtil[CM_MAX_CPU_CORES]; /*!< cpu measurement info*/
168 /** @brief CPU Utilization INFO */
169 typedef struct cmCpuUtilStatsInfo
172 uint32_t maxCpuUtil; /*!< Max cpu utilization */
173 uint32_t totCpuUtil; /*!< Total cpu utilization */
176 /** @brief CPU INFO */
177 typedef struct cmCpuStatsInfo
179 uint8_t numCores; /*!< number of cores*/
180 CmCpuUtilStatsInfo cpuUtil[CM_MAX_CPU_CORES]; /*!< cpu measurement info*/
186 /** @brief Counter Statistics */
187 typedef uint32_t CntrSts;
189 /** @brief Aggregation Level */
190 typedef enum cmLteAggrLvl
192 CM_LTE_AGGR_LVL2 = 2, /*!< Aggregation level 2 */
193 CM_LTE_AGGR_LVL4 = 4, /*!< Aggregation level 4 */
194 CM_LTE_AGGR_LVL8 = 8, /*!< Aggregation level 8 */
195 CM_LTE_AGGR_LVL16= 16 /*!< Aggregation level 16 */
198 /** @brief UE Category */
199 typedef enum cmLteUeCategory
207 CM_LTE_UE_CAT_7, /* RRC-REL10-Upgrade */
211 /****************************************************************************
212 * PACK/UNPACK Functions
213 ***************************************************************************/
215 S16 cmUpdateSsiMemInfo(CmLteMemInfo *mInfo);
217 S16 cmFillMemUtilizationMeas(CmLteMemInfo *memoryInfo,CmLteMemInfo *memInfo);
219 S16 cmClearMemUtilizationCounter(CmLteMemInfo *memInfo);
220 S16 UpdateSocMemInfo(uint8_t area , CmLteMemInfo *mInfo);
222 S16 cmFillCpuUtilizationMeas(CmLteCpuInfo *cpuMeasInfo,CmCpuStatsInfo *cpuInfo);
224 S16 cmClearCpuUtilizationCounter(CmCpuStatsInfo *cpuInfo);
225 Void UpdateSocCpuInfo(CmCpuStatsInfo *cpuInfo,uint8_t Idx);
227 S16 SGetRegPoolInfo(uint8_t* numRegion, uint8_t* numPool);
229 /* Packing Functions */
230 S16 cmPkLteRlcId ARGS ((
235 S16 cmPkLteTimingInfo ARGS ((
236 CmLteTimingInfo *param,
240 S16 cmPkLtePdcpId ARGS ((
245 /* Unpack Function */
246 S16 cmUnpkLteRlcId ARGS ((
251 S16 cmUnpkLteTimingInfo ARGS ((
252 CmLteTimingInfo *param,
256 S16 cmUnpkLtePdcpId ARGS ((
263 typedef struct cmTtiProc
265 uint32_t totTtiProcessingTime;
267 uint32_t maxTtiProcessingTime;
268 uint32_t ttiStretchCount;
269 uint32_t ttiThresholdExceedCount;
270 /* this count is added to compare phy reported tti stretch and calculated tti stretch */
271 uint32_t phyReptTtiStretchCount;
276 Void cmUpdateTtiCounters(uint32_t ttiProcessingTime);
277 Void cmResetTtiCounters(Void);
282 #endif /* __cplusplus */
283 #endif /* __CM_LTE_X__ */
285 /********************************************************************30**
288 **********************************************************************/