1 /******************************************************************************
3 * Copyright (c) 2020 ICT/CAS.
5 * Licensed under the O-RAN Software License, Version 1.0 (the "Software 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 * https://www.o-ran.org/software
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.
17 *******************************************************************************/
19 #ifndef _GNB_COMMON_H_
20 #define _GNB_COMMON_H_
25 #include "vos_common.h"
26 #include "vos_sockMgr.h"
27 #include <netinet/in.h>
28 #include "gnbServiceType.h"
32 extern struct timeval procStart, procEnd;
34 #define MARK_START_TIME() do{\
35 gettimeofday(&procStart,0);\
38 #define CU_CALC_ELAPSED_TIME(S) do{\
40 gettimeofday(&procEnd,0);\
41 diff = ( procEnd.tv_sec*1000000L + procEnd.tv_usec ) \
42 - ( procStart.tv_sec*1000000L + procStart.tv_usec ); \
43 vos_info_print("Msg %s spend time = %ld us\n",S ,diff);\
53 /***********************************************************************************************************
54 ************************************************define type in DU ****************************************
55 ************************************************************************************************************/
58 /***********************************************************************************************************
59 ************************************************** macro define ******************************************
60 ************************************************************************************************************/
63 /** @brief max logical channel id */
64 #define MAX_LCH_ID (MAX_LCH_NUM - 1)
66 #define MAX_LEN_AMF_NAME 150
67 #define MAX_GNB_DU_NAME 150
68 #define MAX_GNB_CU_NAME 150
69 #define MAX_GNB_DU_NUM 2
72 #define MAX_TASK_NUM 60
73 #define MAX_TASK_NAME_LEN 256
74 #define MAX_QUEUE_NUM 20
75 #define MAX_QUEUE_MSG_NUM 256
76 #define MAX_IP_ADDR_STRING_LEN 256
77 #define MAX_IP_ADDR_NUM COMM_SCTP_ADDR_MAX
79 #define MAX_LOCK_NUM 20
80 #define MAX_SEMA_NUM 20
81 #define MAX_TIMER_NUM 100
84 #define MAX_SI_MESSAGE 32
86 #define MAX_SIB_LEN 300
89 #define MAX_TX_PDU_NUM 256//1024
90 #define MAX_MULTI_BANDS 8
91 #define MAX_NR_NS_PMAX 8
92 #define MAX_ACCESS_CAT 64
93 #define MAX_BARRING_SET 8
95 #define MAXCELLINTRA 16 //Maximum number of intra-Freq cells listed in SIB3
96 #define MAXCELLBLACK 16 //Maximum number of NR blacklisted cell ranges in SIB3, SIB4
97 /** @brief max cell bands num */
98 #define MAX_NR_CELL_BANDS 16//32
99 /** @brief F1 max cell num */
100 #define F1_MAX_CELL_NUM MAX_CELL_NUM
103 #define COMMON_LOG_LEVEL (0)
104 #define MAJOR_LOG_LEVEL (1)
106 /*module msg marco define*/
107 #define MSG_HEAD_LEN (20)
108 #define MSG_TOTAL_LEN (8096)
109 #define MSG_MAX_BUFFER_LEN (MSG_TOTAL_LEN-MSG_HEAD_LEN)
111 #define MAX_MODULE_NAME_LEN (256)
113 /*MAX IPV6 ADDR LEN*/
114 #define MAX_IPV6ADDR_LEN (16)
116 #define MAX_ENTITY_MANAGE_MSG_NUM 100
117 #define CHECK_FUNCTION_RET(ret) \
119 if (VOS_OK != (ret)) { \
124 extern UINT32 f1apGetModuleId();
126 #define DUCP_MODULE_ID ducpGetModuleId()
127 #define F1AP_MODULE_ID f1apGetModuleId()
132 #define MAX_LENGTH_NGAP_RAN_NAME 150
136 /***********************************************************************************************************
137 ********************************************* enum define*************************************************
138 ************************************************************************************************************/
141 typedef enum ipAddrType
158 typedef enum gnbLogLevel
160 LOG_CRIT = 1, ///< critical conditions
161 LOG_ERR, ///< error conditions
162 LOG_WARNING, ///< warning conditions
163 LOG_INFO, ///< informational
164 LOG_DEBUG, ///< debug info
168 /***********************************************************************************************************
169 ****************************************************define typ *********************************************
170 ************************************************************************************************************/
171 typedef VOID (*FUNCPTR)(void *args);
172 typedef INT32 (*VOS_TASK_INIT_FUNCPTR)();
173 typedef VOID (*VOS_TASK_FUNCPTR)(ULONG ulArg1, ULONG ulArg2,ULONG ulArg3, ULONG ulArg4,ULONG ulArg5, ULONG ulArg6,ULONG ulArg7, ULONG ulArg8,ULONG ulArg9, ULONG ulArg10);
175 typedef INT32 (*USER_TASK_INIT_FUNCPTR)();
176 typedef LONG (*USER_TASK_FUNCPTR)(ULONG aulMsg[VOS_QUEUE_MSG_SIZE]);
179 typedef INT32 (*HOST_TASK_FUNCPTR)(ULONG aulMsg[VOS_QUEUE_MSG_SIZE]);
180 typedef INT32 (*HOST_TASK_INIT_FUNCPTR)(void);
183 /***********************************************************************************************************
184 ************************************************task info strcut *******************************************
185 ************************************************************************************************************/
195 typedef struct cmInetIpv6Addr
198 UINT8 IpAddr6[MAX_IPV6ADDR_LEN];
203 typedef struct ipAddress
205 IpAddrType_e ipType; /* type of transport address */
208 Ipv4Addr_t ipv4Addr; /* IPv4 transport address */
209 Ipv6Addr_t ipv6Addr; /* IPv6 transport address */
213 /* Ran name, a string */
214 typedef struct ngapRanName
216 char ranName[MAX_LENGTH_NGAP_RAN_NAME];
224 UINT8 userTaskName[MAX_TASK_NAME_LEN];
225 UINT32 userTaskPriority;
226 FUNCPTR userTaskEntry;
234 UINT8 hostTaskName[MAX_TASK_NAME_LEN];
235 UINT32 hostTaskpriority;
236 FUNCPTR hostTaskEntry;
239 /* user task table info */
244 CHAR userTaskName[MAX_TASK_NAME_LEN];/*线程名称*/
246 UINT32 userTaskPriority;/*优先级*/
247 USER_TASK_INIT_FUNCPTR userTaskInitPtr;
248 USER_TASK_FUNCPTR userTaskEntry;/*线程执行函数*/
251 /* Host task table info */
256 CHAR hostTaskName[MAX_TASK_NAME_LEN];/*线程名称*/
257 UINT32 priority;/*优先级*/
266 CHAR vosTaskName[MAX_TASK_NAME_LEN];/*线程名称*/
267 CHAR vosMoudleName[MAX_MODULE_NAME_LEN];
268 UINT8 vosTaskpriority;/*优先级*/
269 VOS_TASK_INIT_FUNCPTR vosTaskInitPtr;
270 VOS_TASK_FUNCPTR vosTaskEntry;/*线程执行函数*/
276 vos_module_t vosModule;
277 VOS_HANDLE taskHandle;
282 UCHAR ipAddrStr[MAX_IP_ADDR_STRING_LEN];
288 LONG Count;//最大个数为COMM_SCTP_ADDR_MAX
289 IpAddrStr_t ipList[MAX_IP_ADDR_NUM];
295 SockAddrStr_t ipAddrStr;
297 SockAddrStr_t clientAddrInfo;
303 CHAR vosTaskName[MAX_TASK_NAME_LEN];
304 SockAddrStr_t sockAddrInfo;
305 SockAddrStr_t clientSockAddrInfo;
307 vos_sock_para_t comPara;
308 vos_sock_info_t comOpInfo;
314 vos_sock_info_t opInfo;
315 }E1UpClientSockInfo_t;
331 UINT32 connectId;/*SOCKET INDEX*/
332 UINT32 fd;/*用于收消息的fd*/
333 vos_sockaddr_t fromAddr;/*用于消息来源地址*/
334 struct sctp_sndrcvinfo sri;/*收到的SCTP消息信息*/
335 LONG msg_flags;/*链路信息*/
336 UINT32 assocState;/*链路状态*/
355 UINT32 socketMsgType;
358 UdpSocketMsg_t udpMsg;
359 TcpSocketMsg_t tcpMsg;
360 SctpSocketMsg_t sctpMsg;
361 UnixUdpSocketMsg_t unixUdpSocketMsg;
362 UnixTcpSocketMsg_t unixTcpSocketMsg;
368 UINT32 associationId;
369 vos_sock_info_t op;/*发送时索引到该字段*/
376 1.非SOCKET msg 格式化为接口数据
377 2.SOCKET msg格式化为:SocketMsg_t数据+接口数据
386 UINT8 msgBuf[MSG_MAX_BUFFER_LEN];
391 /** 采用非VOS通信方式的模块需要提供的额外参数 */
394 module_comm_type_t type; ///< 通信方式
396 vos_sockaddr_t addr; ///< socket 通信
397 sctp_para_t sctp; ///< sctp 通信
399 receive_handler recv_handle; ///< 接收函数
400 LONG maxClient; ///< tcp server 允许的连接数
401 BOOL soloMode; ///< 如果为真,则单独创建接收线程;如果为假,则由 VOS socket代理任务负责接收
402 LONG fdIdx; ///< 无需关心
406 /***********************************************************************************************************
407 *********************************************protocol info strcut ******************************************
408 ************************************************************************************************************/
410 /*********************************** Mib_t ***************************************/
411 typedef enum mibSubCarrierSpacingCommon
413 MIB_subCarrierSpacingCommon_scs15or60 = 0,
414 MIB_subCarrierSpacingCommon_scs30or120 = 1
415 } MibSubCarrierSpacingCommon_e;
417 typedef enum mibDmrsTypeaPosition
419 MIB_dmrs_TypeA_Position_pos2 = 0,
420 MIB_dmrs_TypeA_Position_pos3 = 1
421 } MibDmrsTypeaPosition_e;
423 typedef enum mibCellBarred
425 MIB_cellBarred_barred = 0,
426 MIB_cellBarred_notBarred = 1
429 typedef enum mibIntraFreqReselection
431 MIB_intraFreqReselection_allowed = 0,
432 MIB_intraFreqReselection_notAllowed = 1
433 } MibIntraFreqReselection_e;
437 mibCellBarredBarred = 0,
438 mibCellBarredNotBarred = 1
443 mibIntraFreqReselectionAllowed = 0,
444 mibIntraFreqReselectionNotAllowed = 1
445 } IntraFreqReselection_e;
447 typedef struct PDCCHConfigSIB1
449 UINT8 controlResourceSetZero;
450 UINT8 searchSpaceZero;
456 UINT8 systemFrameNumber;
457 MibSubCarrierSpacingCommon_e subCarrierSpacingCommon;
458 UINT8 ssbSubcarrierOffset;
459 MibDmrsTypeaPosition_e dmrsTypeaPosition;
460 UINT8 searchSpaceZero;
461 UINT8 controlResourceSetZero;
462 CellBarred_e cellBarred;
463 IntraFreqReselection_e intraFreqReselection;
467 typedef struct macCellCfgPara_s
473 /*********************************** SIB1_t ***************************************/
474 typedef enum connEstFailureControlCount
476 NR_ConnEstFailureControl__connEstFailCount_n1 = 0,
477 NR_ConnEstFailureControl__connEstFailCount_n2 = 1,
478 NR_ConnEstFailureControl__connEstFailCount_n3 = 2,
479 NR_ConnEstFailureControl__connEstFailCount_n4 = 3
480 } ConnEstFailureControlCount_e;
482 typedef enum connEstFailureControlOffsetValidity
484 NR_ConnEstFailureControl__connEstFailOffsetValidity_s30 = 0,
485 NR_ConnEstFailureControl__connEstFailOffsetValidity_s60 = 1,
486 NR_ConnEstFailureControl__connEstFailOffsetValidity_s120 = 2,
487 NR_ConnEstFailureControl__connEstFailOffsetValidity_s240 = 3,
488 NR_ConnEstFailureControl__connEstFailOffsetValidity_s300 = 4,
489 NR_ConnEstFailureControl__connEstFailOffsetValidity_s420 = 5,
490 NR_ConnEstFailureControl__connEstFailOffsetValidity_s600 = 6,
491 NR_ConnEstFailureControl__connEstFailOffsetValidity_s900 = 7
492 } ConnEstFailureControlOffsetValidity_e;
494 #define CONN_EST_FAILOFFSET (1<<0)
495 typedef struct connEstFailCtrl
498 ConnEstFailureControlCount_e connEstFailCount;
499 ConnEstFailureControlOffsetValidity_e connEstFailOffsetValidity;
500 UINT8 connEstFailOffset; /*option*/
503 typedef enum timerT300
505 NR_UE_TimersAndConstants__t300_ms100 = 0,
506 NR_UE_TimersAndConstants__t300_ms200 = 1,
507 NR_UE_TimersAndConstants__t300_ms300 = 2,
508 NR_UE_TimersAndConstants__t300_ms400 = 3,
509 NR_UE_TimersAndConstants__t300_ms600 = 4,
510 NR_UE_TimersAndConstants__t300_ms1000 = 5,
511 NR_UE_TimersAndConstants__t300_ms1500 = 6,
512 NR_UE_TimersAndConstants__t300_ms2000 = 7
515 typedef enum timerT301
517 NR_UE_TimersAndConstants__t301_ms100 = 0,
518 NR_UE_TimersAndConstants__t301_ms200 = 1,
519 NR_UE_TimersAndConstants__t301_ms300 = 2,
520 NR_UE_TimersAndConstants__t301_ms400 = 3,
521 NR_UE_TimersAndConstants__t301_ms600 = 4,
522 NR_UE_TimersAndConstants__t301_ms1000 = 5,
523 NR_UE_TimersAndConstants__t301_ms1500 = 6,
524 NR_UE_TimersAndConstants__t301_ms2000 = 7
527 typedef enum timerT310
529 NR_UE_TimersAndConstants__t310_ms0 = 0,
530 NR_UE_TimersAndConstants__t310_ms50 = 1,
531 NR_UE_TimersAndConstants__t310_ms100 = 2,
532 NR_UE_TimersAndConstants__t310_ms200 = 3,
533 NR_UE_TimersAndConstants__t310_ms500 = 4,
534 NR_UE_TimersAndConstants__t310_ms1000 = 5,
535 NR_UE_TimersAndConstants__t310_ms2000 = 6
538 typedef enum timerN310
540 NR_UE_TimersAndConstants__n310_n1 = 0,
541 NR_UE_TimersAndConstants__n310_n2 = 1,
542 NR_UE_TimersAndConstants__n310_n3 = 2,
543 NR_UE_TimersAndConstants__n310_n4 = 3,
544 NR_UE_TimersAndConstants__n310_n6 = 4,
545 NR_UE_TimersAndConstants__n310_n8 = 5,
546 NR_UE_TimersAndConstants__n310_n10 = 6,
547 NR_UE_TimersAndConstants__n310_n20 = 7
550 typedef enum timerT311
552 NR_UE_TimersAndConstants__t311_ms1000 = 0,
553 NR_UE_TimersAndConstants__t311_ms3000 = 1,
554 NR_UE_TimersAndConstants__t311_ms5000 = 2,
555 NR_UE_TimersAndConstants__t311_ms10000 = 3,
556 NR_UE_TimersAndConstants__t311_ms15000 = 4,
557 NR_UE_TimersAndConstants__t311_ms20000 = 5,
558 NR_UE_TimersAndConstants__t311_ms30000 = 6
561 typedef enum timerN311
563 NR_UE_TimersAndConstants__n311_n1 = 0,
564 NR_UE_TimersAndConstants__n311_n2 = 1,
565 NR_UE_TimersAndConstants__n311_n3 = 2,
566 NR_UE_TimersAndConstants__n311_n4 = 3,
567 NR_UE_TimersAndConstants__n311_n5 = 4,
568 NR_UE_TimersAndConstants__n311_n6 = 5,
569 NR_UE_TimersAndConstants__n311_n8 = 6,
570 NR_UE_TimersAndConstants__n311_n10 = 7
573 typedef enum timerT319
575 NR_UE_TimersAndConstants__t319_ms100 = 0,
576 NR_UE_TimersAndConstants__t319_ms200 = 1,
577 NR_UE_TimersAndConstants__t319_ms300 = 2,
578 NR_UE_TimersAndConstants__t319_ms400 = 3,
579 NR_UE_TimersAndConstants__t319_ms600 = 4,
580 NR_UE_TimersAndConstants__t319_ms1000 = 5,
581 NR_UE_TimersAndConstants__t319_ms1500 = 6,
582 NR_UE_TimersAndConstants__t319_ms2000 = 7
585 typedef struct ueTimersAndConstants {
593 } UETimersAndConstants_t;
599 #define CELL_RESERVED_FOR_OTHERUSE (1<<0)
600 typedef struct cellAccessInfo
604 PlmnInformation_t plmnInfo[MAX_PLMN];
605 BOOL cellReservedForOtherUse; /*option*/
609 #define RA_ASSOCIATION_PERIOD_INDEX (1<<0)
610 #define RA_SSB_OCCASION_MASK_INDEX (1<<1)
611 typedef struct siReqRes
614 UINT8 raPreambleStartIndex;
615 UINT8 raAssociationPeriodIndex; /*option*/
616 UINT8 raSsbOccasionMaskIndex; /*option*/
620 #define PRACH_CONFIGURATION_INDEX (1<<0)
621 #define MSG1_FDM (1<<1)
622 #define MSG1_FREQUENCYSTART (1<<2)
623 #define ZERO_COR_RELATION_ZONECONFIG (1<<3)
624 #define PREAMBLE_RECEIVED_TARGETPOWER (1<<4)
625 #define PREAMBLE_TRANS_MAX (1<<5)
626 #define POWER_RAMPING_STEP (1<<6)
627 #define RA_RESPONSE_WINDOW (1<<7)
629 #define SI_REQUEST_PERIOD (1<<8)
630 typedef struct siRequestConfig
633 UINT8 prach_ConfigurationIndex; /*option*/
634 UINT8 msg1_FDM; /*option*/
635 UINT16 msg1_FrequencyStart; /*option*/
636 UINT8 zeroCorrelationZoneConfig; /*option*/
637 INT16 preambleReceivedTargetPower; /*option*/
638 UINT8 preambleTransMax; /*option*/
639 UINT8 powerRampingStep; /*option*/
640 UINT8 raResponseWindow; /*option*/
641 UINT8 ssbPerRachOccasion;
642 UINT8 siRequestPeriod; /*option*/
643 UINT16 siRequestResourcesNum;
644 SiReqRes_t siRequestResources[MAX_SI_MESSAGE];
647 typedef enum schInfoSiPeriod
649 NR_SchedulingInfo__si_Periodicity_rf8 = 0,
650 NR_SchedulingInfo__si_Periodicity_rf16 = 1,
651 NR_SchedulingInfo__si_Periodicity_rf32 = 2,
652 NR_SchedulingInfo__si_Periodicity_rf64 = 3,
653 NR_SchedulingInfo__si_Periodicity_rf128 = 4,
654 NR_SchedulingInfo__si_Periodicity_rf256 = 5,
655 NR_SchedulingInfo__si_Periodicity_rf512 = 6
660 NR_SIB_TypeInfo__type_sibType2 = 0,
661 NR_SIB_TypeInfo__type_sibType3 = 1,
662 NR_SIB_TypeInfo__type_sibType4 = 2,
663 NR_SIB_TypeInfo__type_sibType5 = 3,
664 NR_SIB_TypeInfo__type_sibType6 = 4,
665 NR_SIB_TypeInfo__type_sibType7 = 5,
666 NR_SIB_TypeInfo__type_sibType8 = 6,
667 NR_SIB_TypeInfo__type_sibType9 = 7
670 typedef enum sibAreaScope
672 NR_SIB_TypeInfo__areaScope_true = 0
675 #define VALUE_TAG (1<<0)
676 #define AREA_SCOPE (1<<1)
678 typedef struct sibTypeInfo
682 UINT8 valueTag; /*option*/
683 SibAreaScope_e areaScope; /*option*/
686 typedef struct siSchInfo
689 BOOL siBroadcastStatus;
690 SchInfoSiPeriod_e siPeriodicity;
691 UINT16 sibMappingNum;
692 SibTypeInfo_t sibMapping[MAX_SIB];
696 typedef enum nrControlResourceSet_cce_REG_MappingType_PR
698 NrControlResourceSet_cce_REG_MappingType_PR_NOTHING, /* No components present */
699 NrControlResourceSet_cce_REG_MappingType_PR_interleaved,
700 NrControlResourceSet_cce_REG_MappingType_PR_nonInterleaved
701 } NrControlResourceSet_cce_REG_MappingType_PR;
703 #define MAC_TCI_STATEID 64
704 #define NrControlResourceSetShiftIndexChosen 0x1
705 #define NrControlResourceSetTciPresentInDciChosen 0x2
706 #define NrControlResourceSetDmrsScramblingIDChosen 0x4
707 typedef struct nrControlResourceSet
710 long controlResourceSetId;
711 UINT64 frequencyDomainResources;
713 NrControlResourceSet_cce_REG_MappingType_PR present;
714 union ControlResourceSet_cce_REG_MappingType_u
716 struct ControlResourceSet_cce_REG_MappingType_interleaved
719 long interleaverSize;
720 long shiftIndex; /* OPTIONAL */
724 long precoderGranularity;
725 UINT8 tciPdcchToAddListNum;
726 long tciStateIdAddList[MAC_TCI_STATEID];
727 UINT8 tciPdcchToReleaseListNum;
728 long tciStateIdReleaseList[MAC_TCI_STATEID];
729 long tci_PresentInDCI; /* OPTIONAL */
730 long pdcch_DMRS_ScramblingID; /* OPTIONAL */
731 } NrControlResourceSet_t;
733 typedef struct nrofCandidates
735 long aggregationLevel1;
736 long aggregationLevel2;
737 long aggregationLevel4;
738 long aggregationLevel8;
739 long aggregationLevel16;
742 typedef enum nrSearchSpace_searchSpaceType_PR {
743 NrSearchSpace_searchSpaceType_PR_NOTHING, /* No components present */
744 NrSearchSpace_searchSpaceType_PR_common,
745 NrSearchSpace_searchSpaceType_PR_ue_Specific
746 } NrSearchSpace_searchSpaceType_PR;
748 #define NrSearchSpaceTypeCommonDciFormat0_0_AndFormat1_0_Presence 1
749 #define NrSearchSpaceTypeCommonDci_Format2_0_Presence 2
750 #define NrSearchSpaceTypeCommonDci_Format2_1_Presence 4
751 #define NrSearchSpaceTypeCommonDci_Format2_2_Presence 8
752 #define NrSearchSpaceTypeCommonDci_Format2_3_Presence 16
753 typedef struct nrSearchSpaceType
755 NrSearchSpace_searchSpaceType_PR present;
756 union SearchSpace_searchSpaceType_u
758 struct SearchSpace_searchSpaceType_common
761 struct SearchSpace_searchSpaceType_common_dci_Format0_0_AndFormat1_0
763 } dci_Format0_0_AndFormat1_0;//option
765 struct SearchSpace_searchSpaceType_common_dci_Format2_0
767 #define NrSearchSpaceTypeAggLevel1Chosen 1
768 #define NrSearchSpaceTypeAggLevel2Chosen 2
769 #define NrSearchSpaceTypeAggLevel4Chosen 4
770 #define NrSearchSpaceTypeAggLevel8Chosen 8
771 #define NrSearchSpaceTypeAggLevel16Chosen 16
774 long aggregationLevel1; /* OPTIONAL */
775 long aggregationLevel2; /* OPTIONAL */
776 long aggregationLevel4; /* OPTIONAL */
777 long aggregationLevel8; /* OPTIONAL */
778 long aggregationLevel16; /* OPTIONAL */
779 } dci_Format2_0;//optional
781 struct SearchSpace_searchSpaceType_common_dci_Format2_1
783 } dci_Format2_1;//optional
785 struct SearchSpace_searchSpaceType_common_dci_Format2_2
787 } dci_Format2_2;//optional
789 struct NrSearchSpace_searchSpaceType_common_dci_Format2_3
791 #define NrSearchSpaceTypeDciFormat2_3Dummy1Chosen 1
793 long dummy1; /* OPTIONAL */
795 } dci_Format2_3;//optional
797 struct SearchSpace_searchSpaceType_specific
803 }NrSearchSpaceType_t;
805 typedef enum nrSearchSpaceMonitoringSlotPeriodicityAndOffset_PR
807 NrSearchSpace_monitoringSlotPeriodicityAndOffset_PR_NOTHING, /* No components present */
808 NrSearchSpace_monitoringSlotPeriodicityAndOffset_PR_sl1,
809 NrSearchSpace_monitoringSlotPeriodicityAndOffset_PR_sl2,
810 NrSearchSpace_monitoringSlotPeriodicityAndOffset_PR_sl4,
811 NrSearchSpace_monitoringSlotPeriodicityAndOffset_PR_sl5,
812 NrSearchSpace_monitoringSlotPeriodicityAndOffset_PR_sl8,
813 NrSearchSpace_monitoringSlotPeriodicityAndOffset_PR_sl10,
814 NrSearchSpace_monitoringSlotPeriodicityAndOffset_PR_sl16,
815 NrSearchSpace_monitoringSlotPeriodicityAndOffset_PR_sl20,
816 NrSearchSpace_monitoringSlotPeriodicityAndOffset_PR_sl40,
817 NrSearchSpace_monitoringSlotPeriodicityAndOffset_PR_sl80,
818 NrSearchSpace_monitoringSlotPeriodicityAndOffset_PR_sl160,
819 NrSearchSpace_monitoringSlotPeriodicityAndOffset_PR_sl320,
820 NrSearchSpace_monitoringSlotPeriodicityAndOffset_PR_sl640,
821 NrSearchSpace_monitoringSlotPeriodicityAndOffset_PR_sl1280,
822 NrSearchSpace_monitoringSlotPeriodicityAndOffset_PR_sl2560
823 } NrSearchSpaceMonitoringSlotPeriodicityAndOffset_PR;
825 #define NrSearchSpaceControlResIdChosen 0x1
826 #define NrSearchSpaceMonSlotPeriodAndOddsetChosen 0x2
827 #define NrSearchSpaceDurationChosen 0x4
828 #define MONITORING_SYMBOLS_WITHIN_SLOT 0x08
829 typedef struct nrSearchSpace
833 long controlResourceSetId; /* OPTIONAL */
835 struct SearchSpaceMonitoringSlotPeriodicityAndOffset
837 NrSearchSpaceMonitoringSlotPeriodicityAndOffset_PR present;
838 union SearchSpaceMonitoringSlotPeriodicityAndOffset_u
856 } monitoringSlotPeriodicityAndOffset;/* OPTIONAL */
858 long duration; /* OPTIONAL */
859 UINT16 monitoringSymbolsWithinSlot; /* OPTIONAL */
860 NrofCandidates_t nrofCandidates;
861 NrSearchSpaceType_t searchSpaceType;
864 #define MAX_SEARCHSPACE_NUM 4
866 #define PdcchCfgCommonCtrlResSetZeroChosen 1
867 #define PdcchCfgCommonCtrlResSetChosen 2
868 #define PdcchCfgCommonSearchSpaceZeroChosen 4
869 #define PdcchCfgCommonSearchSpaceSIB1Chosen 8
870 #define PdcchCfgCommonSearchSpaceOtherSysInfoChosen 16
871 #define PdcchCfgCommonPagingSearchSpaceChosen 32
872 #define PdcchCfgCommonRaSearchSpaceChosen 64
874 typedef struct PDCCHCfgCommon
878 long controlResourceSetZero; /* OPTIONAL */
879 NrControlResourceSet_t commonControlResourceSet; /* OPTIONAL */
880 long searchSpaceZero; /* OPTIONAL */
881 UINT8 searchSpaceNum;
882 NrSearchSpace_t searchSpace[MAX_SEARCHSPACE_NUM];
884 long searchSpaceSIB1; /* OPTIONAL */
885 long searchSpaceOtherSystemInformation; /* OPTIONAL */
886 long pagingSearchSpace; /* OPTIONAL */
887 long raSearchSpace; /* OPTIONAL */
890 typedef enum setup_Release_PDCCH_PR
892 Setup_Release_PDCCH_PR_NOTHING, /* No components present */
893 Setup_Release_PDCCH_PR_release,
894 Setup_Release_PDCCH_PR_setup
896 }Setup_Release_PDCCH_PR;
897 typedef struct pdcchCfgCommon
899 Setup_Release_PDCCH_PR present;
900 union Setup_Release_PDCCH_PR_u {
902 Pdcch_Cfg_Common_t setup;
908 /* PUCCH-ConfigCommon */
909 #define PucchCfgCommonResourceCommonChosen 1
910 #define PucchCfgCommonHoppingIdChosen 2
911 #define PucchCfgCommonP0NominalChosen 4
912 typedef struct nrPucch_ConfigCommon
915 long pucchResourceCommon; /* OPTIONAL */
916 long pucchGroupHopping;
917 long hoppingId; /* OPTIONAL */
918 long p0Nominal; /* OPTIONAL */
919 }NrPucch_ConfigCommon_t;
921 typedef enum nrPucchCfgCommon_PR
923 NrPucchCfgCommon_PR_NOTHING, /* No components present */
924 NrPucchCfgCommon_PR_release,
925 NrPucchCfgCommon_PR_setup
926 }NrPucchCfgCommon_PR;
928 typedef struct nrPucchCfgCommon
931 NrPucchCfgCommon_PR present;
932 union NrPucchCfgCommon_u {
934 NrPucch_ConfigCommon_t setup;
937 } NrPucchCfgCommon_t;
939 #define PdschTimeDomainAllockOChosen 1
940 typedef struct pdschTimeDomainAlloc
943 long k0; /* OPTIONAL */
945 long startSymbolAndLength;
946 } PdschTimeDomainAlloc_t;
948 #define PuschTimeDomainAllock2Chosen 1
949 typedef struct puschTimeDomainAlloc
952 long k2; /* OPTIONAL */
954 long startSymbolAndLength;
955 } PuschTimeDomainAlloc_t;
958 #define MAX_TIME_DOMAIN_NUM 16
959 #define PdschTimeDomainAllocationChose (1 << 0)
960 typedef struct pdsch_Cfg_Common_t
964 PdschTimeDomainAlloc_t pdschTimeDomainAllocation[MAX_TIME_DOMAIN_NUM]; /* OPTIONAL */
965 } Pdsch_Cfg_Common_t;
967 typedef enum setup_Release_PDSCH_PR
969 Setup_Release_PDSCH_PR_NOTHING, /* No components present */
970 Setup_Release_PDSCH_PR_release,
971 Setup_Release_PDSCH_PR_setup
972 }Setup_Release_PDSCH_PR;
974 typedef struct pdschCfgCommon
976 Setup_Release_PDSCH_PR present;
977 union Setup_Release_PDSCH_PR_u {
979 Pdsch_Cfg_Common_t setup;
987 UINT16 locationAndBandwidth;
988 UINT8 subcarrierSpacing;
989 /*UINT8 cyclicPrefix; extension*/
992 #define NrBwpDownLinkCommonPdcchCfgChosen 0x1
993 #define NrBwpDownLinkCommonPdschCfgChosen 0x2
994 typedef struct nrBwpDownLinkCommon
998 PdcchCfgCommon_t pdcchCfgCommon; /* OPTIONAL */
999 PdschCfgCommon_t pdschCfgCommon; /* OPTIONAL */
1000 } NrBwpDownLinkCommon_t;
1002 #define ADDITIONAL_PMAX (1<<0)
1003 typedef struct pmaxValue
1006 INT8 additionalPmax; /*option*/
1007 UINT16 additionalSpectrumEmission;
1010 #define FREQ_BAND_INDICATOR_NR (1<<0)
1011 #define PMAX_LIST (1<<1)
1012 typedef struct nrMultiBand
1015 UINT16 freqBandIndicatorNR; /*option*/
1017 PmaxValue_t pmaxList[MAX_NR_NS_PMAX]; /*option*/
1020 typedef struct specificCarrier
1022 UINT16 offsetToCarrier;
1023 UINT8 subcarrierSpacing;
1024 UINT16 carrierBandwidth;
1025 /*UINT16 txDirectCurrentLocation_v1530; extension*/
1027 } SpecificCarrier_t;
1029 #define ABSOLUTE_FREQUENCY_POINTA (1<<0)
1032 typedef struct freqInfoUlSib
1035 UINT16 nrMulBandNum;
1036 NrMultiBand_t nrMulBand[MAX_MULTI_BANDS];
1037 UINT32 absoluteFrequencyPointA; /*option*/
1038 UINT16 speCarrierNum;
1039 SpecificCarrier_t speCarrier[MAX_SCS];
1040 INT8 pMax; /*option*/
1041 /*UINT8 frequencyShift7p5khz; extension*/
1044 /* RACH-ConfigGeneric */
1045 typedef struct nrRachCfgGeneric_t
1047 long prach_ConfigurationIndex;
1049 long msg1_FrequencyStart;
1050 long zeroCorrelationZoneConfig;
1051 long preambleReceivedTargetPower;
1052 long preambleTransMax;
1053 long powerRampingStep;
1054 long ra_ResponseWindow;
1055 } NrRachCfgGeneric_t;
1057 typedef enum nrRachCfgCommon_ssb_perRACH_OccasionAndCB_PreamblesPerSSB
1059 NrRACH_ConfigCommon_ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR_NOTHING, /* No components present */
1060 NrRACH_ConfigCommon_ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR_oneEighth,
1061 NrRACH_ConfigCommon_ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR_oneFourth,
1062 NrRACH_ConfigCommon_ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR_oneHalf,
1063 NrRACH_ConfigCommon_ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR_one,
1064 NrRACH_ConfigCommon_ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR_two,
1065 NrRACH_ConfigCommon_ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR_four,
1066 NrRACH_ConfigCommon_ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR_eight,
1067 NrRACH_ConfigCommon_ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR_sixteen
1068 } NrRachCfgCommon_ssb_perRACH_OccasionAndCB_PreamblesPerSSB_e;
1069 typedef enum nrRachCfgCommonPrachRootSequenceIndex
1071 NrRACH_ConfigCommon_prach_RootSequenceIndex_PR_NOTHING, /* No components present */
1072 NrRACH_ConfigCommon_prach_RootSequenceIndex_PR_l839,
1073 NrRACH_ConfigCommon_prach_RootSequenceIndex_PR_l139
1074 } NrRachCfgCommonPrachRootSequenceIndex_e;
1076 #define NrRachCfgCommonTotalNumberOfRaChosen (1<<0)
1077 #define NrRachCfgCommongroupBconfiguredChosen (1<<1)
1078 #define NrRachCfgCommonRsrpThresholdSSBChosen (1<<2)
1079 #define NrRachCfgCommonRsrpThresholdSSBSulChosen (1<<3)
1080 #define NrRachCfgCommonMsg1SubcarrierSpacingChosen (1<<4)
1081 #define NrRachCfgCommonMsg3TransformPrecoderChosen (1<<5)
1082 #define NrRachCfgCommonGroupBconfigChosen 32
1083 typedef struct RACH_Config_Common
1086 NrRachCfgGeneric_t rachCfgGeneric;
1087 long totalNumberOfRA_Preambles; /* OPTIONAL */
1088 struct RACH_ConfigCommon_ssb_perRACH_OccasionAndCB_PreamblesPerSSB
1090 NrRachCfgCommon_ssb_perRACH_OccasionAndCB_PreamblesPerSSB_e present;
1091 union ssbPerRachOccAndCBPreamblesPerSSB_u
1102 } ssbPerRachOccAndCBPreamblesPerSSB;
1104 struct rachCfgCommonGroupBconfigured
1106 long ra_Msg3SizeGroupA;
1107 long messagePowerOffsetGroupB;
1108 long numberOfRA_PreamblesGroupA;
1109 } groupBconfigured;/* OPTIONAL */
1111 long ra_ContentionResolutionTimer;
1112 long rsrp_ThresholdSSB; /* OPTIONAL */
1113 long rsrp_ThresholdSSB_SUL; /* OPTIONAL */
1114 struct rachCfgCommonPrachRootSequenceIndex
1116 NrRachCfgCommonPrachRootSequenceIndex_e present;
1117 union rachCfgCommonPrachRootSequenceIndex_u
1122 } prachRootSequenceIndex;
1123 long msg1_SubcarrierSpacing;/* OPTIONAL */
1124 long restrictedSetConfig;
1125 long msg3_transformPrecoder;/* OPTIONAL */
1127 }rACH_Config_Common_t;
1128 typedef enum setup_Release_903P7_PR
1130 NrRachCfgCommon_PR_NOTHING, /* No components present */
1131 NrRachCfgCommon_PR_release,
1132 NrRachCfgCommon_PR_setup
1133 }NrRachCfgCommon_PR;
1135 typedef struct nrRachCfgCommon
1137 NrRachCfgCommon_PR present;
1138 union NrRachCfgCommon_PR_u {
1140 rACH_Config_Common_t setup;
1142 } NrRachCfgCommon_t;
1144 /* PUSCH-ConfigCommon */
1145 #define NrPuschCfgCommonGroupHoppingChosen 1
1146 #define NrPuschCfgCommonMsg3DeltaChosen 2
1147 #define NrPuschCfgCommonPoNominalChosen 4
1148 #define NrPuschCfgCommonpuschTimeDomainAllocationChosen 8
1150 typedef struct nrPusch_ConfigCommon
1153 long groupHoppingEnabledTransformPrecoding; /* OPTIONAL */
1154 long msg3DeltaPreamble; /* OPTIONAL */
1155 long p0NominalWithGrant; /* OPTIONAL */
1156 UINT8 timeDomainNum;
1157 PuschTimeDomainAlloc_t puschTimeDomainAllocation[MAX_TIME_DOMAIN_NUM]; /* OPTIONAL */
1159 }NrPusch_ConfigCommon_t;
1163 NrPuschCfgCommon_PR_NOTHING, /* No components present */
1164 NrPuschCfgCommon_PR_release,
1165 NrPuschCfgCommon_PR_setup
1166 }NrPuschCfgCommon_PR;
1167 typedef struct nrPuschCfgCommon
1169 NrPuschCfgCommon_PR present;
1170 union NrPuschCfgCommon_u {
1172 NrPusch_ConfigCommon_t setup;
1175 } NrPuschCfgCommon_t;
1177 #define InitialUlBwpRachCfgChosen 1
1178 #define InitialUlBwpPuschCfgChosen 2
1179 #define InitialUlBwpPucchCfgChosen 4
1180 typedef struct initialUlBwp
1184 NrRachCfgCommon_t rachCfgCommon; /* OPTIONAL */
1185 NrPuschCfgCommon_t puschCfgCommon; /* OPTIONAL */
1186 NrPucchCfgCommon_t pucchCfgCommon; /* OPTIONAL */
1189 typedef struct ulCfgCommonSIB
1191 FreqInfoUlSib_t frequencyInfoUL;
1192 InitialUlBwp_t initialUplinkBWP;
1193 UINT8 timeAlignmentTimerCommon;
1196 typedef struct freqInfoDlSib
1198 UINT16 frequencyBandListNum;
1199 NrMultiBand_t frequencyBandList[MAX_MULTI_BANDS];
1200 UINT16 offsetToPointA;
1201 UINT16 speCarrierNum;
1202 SpecificCarrier_t speCarrier[MAX_SCS];
1205 #define FIRST_PDCCH_MONITORING_OCCASION_OF_PO_T (1<<0)
1208 PagingFrameOffset_PR_NOTHING, /* No components present */
1209 PagingFrameOffset_PR_oneT,
1210 PagingFrameOffset_PR_halfT,
1211 PagingFrameOffset_PR_quarterT,
1212 PagingFrameOffset_PR_oneEighthT,
1213 PagingFrameOffset_PR_oneSixteenthT,
1214 } PagingFrameOffset_e;
1218 PDCCH_Monitoring_PR_NOTHING, /* No components present */
1219 PDCCH_Monitoring_PR_sCS15KHZoneT,
1220 PDCCH_Monitoring_PR_sCS30KHZoneT_SCS15KHZhalfT,
1221 PDCCH_Monitoring_PR_sCS60KHZoneT_SCS30KHZhalfT_SCS15KHZquarterT,
1222 PDCCH_Monitoring_PR_sCS120KHZoneT_SCS60KHZhalfT_SCS30KHZquarterT_SCS15KHZoneEighthT,
1223 PDCCH_Monitoring_PR_sCS120KHZhalfT_SCS60KHZquarterT_SCS30KHZoneEighthT_SCS15KHZoneSixteenthT,
1224 PDCCH_Monitoring_PR_sCS120KHZquarterT_SCS60KHZoneEighthT_SCS30KHZoneSixteenthT,
1225 PDCCH_Monitoring_PR_sCS120KHZoneEighthT_SCS60KHZoneSixteenthT,
1226 PDCCH_Monitoring_PR_sCS120KHZoneSixteenthT,
1227 } FirstPDCCH_MonitoringOccasionOfPO_e;
1229 #define MAX_PDCCH_MONITORING_OCCASION 4
1231 typedef struct sCS15KHZoneT_s
1234 UINT16 firstMonitorOccasionOfPO[MAX_PDCCH_MONITORING_OCCASION];
1237 typedef struct sCS30KHZoneT_SCS15KHZhalfT_s
1241 UINT16 firstMonitorOccasionOfPO[MAX_PDCCH_MONITORING_OCCASION];
1243 }sCS30KHZoneT_SCS15KHZhalfT_t;
1245 typedef struct sCS60KHZoneT_SCS30KHZhalfT_SCS15KHZquarterT_s
1248 UINT16 firstMonitorOccasionOfPO[MAX_PDCCH_MONITORING_OCCASION];
1250 }sCS60KHZoneT_SCS30KHZhalfT_SCS15KHZquarterT_t;
1252 typedef struct sCS120KHZoneT_SCS60KHZhalfT_SCS30KHZquarterT_SCS15KHZoneEighthT_s
1255 UINT16 firstMonitorOccasionOfPO[MAX_PDCCH_MONITORING_OCCASION];
1257 }sCS120KHZoneT_SCS60KHZhalfT_SCS30KHZquarterT_SCS15KHZoneEighthT_t;
1259 typedef struct sCS120KHZhalfT_SCS60KHZquarterT_SCS30KHZoneEighthT_SCS15KHZoneSixteenthT_s
1262 UINT16 firstMonitorOccasionOfPO[MAX_PDCCH_MONITORING_OCCASION];
1264 }sCS120KHZhalfT_SCS60KHZquarterT_SCS30KHZoneEighthT_SCS15KHZoneSixteenthT_t;
1266 typedef struct sCS120KHZquarterT_SCS60KHZoneEighthT_SCS30KHZoneSixteenthT_s
1269 UINT16 firstMonitorOccasionOfPO[MAX_PDCCH_MONITORING_OCCASION];
1271 }sCS120KHZquarterT_SCS60KHZoneEighthT_SCS30KHZoneSixteenthT_t;
1273 typedef struct sCS120KHZoneEighthT_SCS60KHZoneSixteenthT_s
1276 UINT16 firstMonitorOccasionOfPO[MAX_PDCCH_MONITORING_OCCASION];
1278 }sCS120KHZoneEighthT_SCS60KHZoneSixteenthT_t;
1280 typedef struct sCS120KHZoneSixteenthT_s
1283 UINT16 firstMonitorOccasionOfPO[MAX_PDCCH_MONITORING_OCCASION];
1285 }sCS120KHZoneSixteenthT_t;
1287 #define FirstPDCCH_MonitoringOccasionOfpoChosen (1 << 0)
1288 typedef struct pcchConfig
1291 UINT8 defaultPagingCycle;
1293 struct PagingFrameOffset
1294 { PagingFrameOffset_e present;
1300 UINT8 oneSixteenthT;
1302 }pagingFrameOffset_t;
1304 struct FirstPDCCH_MonitoringOccasionOfPO
1305 { FirstPDCCH_MonitoringOccasionOfPO_e present;
1306 union PDCCH_MonitoringOccasion {
1308 SCS15KHZoneT_t SCS15KHZoneT;
1309 sCS30KHZoneT_SCS15KHZhalfT_t sCS30KHZoneT_SCS15KHZhalfT;
1310 sCS60KHZoneT_SCS30KHZhalfT_SCS15KHZquarterT_t sCS60KHZoneT_SCS30KHZhalfT_SCS15KHZquarterT;
1311 sCS120KHZoneT_SCS60KHZhalfT_SCS30KHZquarterT_SCS15KHZoneEighthT_t sCS120KHZoneT_SCS60KHZhalfT_SCS30KHZquarterT_SCS15KHZoneEighthT;
1312 sCS120KHZhalfT_SCS60KHZquarterT_SCS30KHZoneEighthT_SCS15KHZoneSixteenthT_t sCS120KHZhalfT_SCS60KHZquarterT_SCS30KHZoneEighthT_SCS15KHZoneSixteenthT;
1313 sCS120KHZquarterT_SCS60KHZoneEighthT_SCS30KHZoneSixteenthT_t sCS120KHZquarterT_SCS60KHZoneEighthT_SCS30KHZoneSixteenthT;
1314 sCS120KHZoneEighthT_SCS60KHZoneSixteenthT_t sCS120KHZoneEighthT_SCS60KHZoneSixteenthT;
1315 sCS120KHZoneSixteenthT_t sCS120KHZoneSixteenthT;
1317 }firstPDCCH_MonitoringOccasionOfPO_t; /*option*/
1321 typedef struct dlCfgCommonSIB
1323 FreqInfoDlSib_t frequencyInfoDL;
1324 NrBwpDownLinkCommon_t initialDownlinkBWP;
1325 UINT8 modificationPeriodCoeff;
1326 PcchConfig_t pcchConfig;
1329 typedef struct tddUlDlPattern
1331 UINT8 dlULTransmissionPeriodicity;
1332 UINT16 nrofDownlinkSlots;
1333 UINT8 nrofDownlinkSymbols;
1334 UINT16 nrofUplinkSlots;
1335 UINT8 nrofUplinkSymbols;
1336 /*UINT8 dlULTransmissionPeriodicity_v1530; extension*/
1340 typedef struct tddUlDlCfgCom
1342 UINT8 referenceSubcarrierSpacing;
1343 TddUlDlPattern_t pattern1;
1344 /*TddUlDlPattern_t pattern2; extension*/
1348 #define UPLINK_CONFIG_COMMON (1<<0)
1349 #define SUPPLEMENTARY_UPLINK (1<<1)
1350 #define NTIMING_ADVANCE_OFFSET (1<<2)
1351 #define GROUP_PRESENCE (1<<3)
1352 #define TDD_ULDL_CFG_COMMON (1<<4)
1353 typedef struct servingCellCfg
1356 DlCfgCommonSIB_t downlinkConfigCommon;
1357 UlCfgCommonSIB_t uplinkConfigCommon; /*option*/
1358 UlCfgCommonSIB_t supplementaryUplink; /*option*/
1359 UINT8 nTimingAdvanceOffset; /*option*/
1361 UINT8 groupPresence; /*option*/
1362 UINT8 ssbPeriodServingCell;
1363 TddUlDlCfgCom_t tddUlDlCfgCommon; /*option*/
1364 INT8 ssPBCHBlockPower;
1367 typedef struct uACBarringPerCat
1369 UINT8 accessCategory;
1370 UINT8 uacBarringInfoSetIndex;
1371 } UACBarringPerCat_t;
1373 #define UAC_AC_BARRING_LIST_TYPE (1 << 0)
1375 typedef enum UacAcBarringListType_PR {
1376 UacImplicitACBarringList_UacExplicitAcBarringListType_PR_NOTHING, /* No components present */
1377 UacImplicitACBarringList_UacExplicitAcBarringListType_PR_UacImplicitACBarringList,
1378 UacImplicitACBarringList_UacExplicitAcBarringListType_PR_UacExplicitAcBarringList
1379 } UacImplicitACBarringList_UacExplicitAcBarringList_PR;
1382 typedef struct uACBarringPerPLMN
1385 UINT8 plmnIdentityIndex;
1386 UINT16 BarringListNum;
1387 UacImplicitACBarringList_UacExplicitAcBarringList_PR present;
1388 union UacAcBarringListType_u {
1389 UINT8 uacImplicitACBarringList[MAX_ACCESS_CAT - 1];
1390 UACBarringPerCat_t uacExplicitAcBarringList[MAX_ACCESS_CAT - 1];
1392 } UACBarringPerPLMN_t;
1395 typedef struct uACBarringPerPLMN
1397 UINT8 plmnIdentityIndex;
1399 UINT8 uacImplicitACBarringList[MAX_ACCESS_CAT - 1];
1400 UACBarringPerCat_t uacExplicitAcBarringList[MAX_ACCESS_CAT - 1];
1402 } UACBarringPerPLMN_t;
1408 typedef struct uACBarringInfoSet
1410 UINT8 uacBarringFactor;
1411 UINT8 uacBarringTime;
1412 UINT8 uacBarringForAccessIdentity;
1413 } UACBarringInfoSet_t;
1415 #define UAC_BARRING_FOR_COMMON (1 << 0)
1416 #define UAC_BARRING_PER_PLMN_LIST (1 << 1)
1417 #define UAC_INDIVIDUAL_PLMN_LIST (1 << 2)
1418 #define UAC_ACT1_ESCLECT_ASSISTANCE_INFO (1 << 3)
1420 typedef enum uac_AccessCategory1_SelectionAssistanceInfo_PR
1422 uac_AccessCategory1_SelectionAssistanceInfo_nonthing,//guotingting
1423 uac_AccessCategory1_SelectionAssistanceInfo_plmnCommon,
1424 uac_AccessCategory1_SelectionAssistanceInfo_individualPLMNList
1425 } Uac_AccessCategory1_SelectionAssistanceInfo_PR;
1428 typedef struct sib1UacBarringInfo
1431 UINT16 uac_BarringForCommonNUM;
1432 UACBarringPerCat_t uac_BarringForCommon[MAX_ACCESS_CAT - 1]; /*option*/
1433 UINT16 uacBarringPerPLMNListNUM;
1434 UACBarringPerPLMN_t uacBarringPerPLMNList[MAX_PLMN]; /*option*/
1435 UINT16 uacBarringInfoSetListNUM;
1436 UACBarringInfoSet_t uacBarringInfoSetList[MAX_BARRING_SET];
1437 Uac_AccessCategory1_SelectionAssistanceInfo_PR present;
1438 UINT16 individualPLMNListNUM;
1439 union uac_AccessCategory1_SelectionAssistanceInfo
1442 UINT8 individualPLMNList[MAX_PLMN];
1446 } Sib1UacBarringInfo_t;
1450 #define Q_RXLEVMIN_OFFSETD (1 << 0)
1451 #define Q_RXLEVMIN_SUL (1 << 1)
1452 #define Q_QUAL_MIN (1 << 2)
1453 #define Q_QUALMIN_OFFSET (1 << 3)
1454 #define CONN_EST_FAILURE_CTRL (1 << 4)
1455 #define SI_SCHE_LIST_PRESENCE (1 << 5)
1456 #define SI_SCHEDUL_INFO (1 << 6)
1457 #define SI_REQ_CFG (1 << 7)
1458 #define SI_REQ_CFGSUL (1 << 8)
1459 #define SYSTEM_INFORMATION_AREAID (1 << 9)
1460 #define SERVING_CELL_CFGCOMMON (1 << 10)
1461 #define IMS_EMERGENCY_SUPPORT (1 << 11)
1462 #define E_CALL_OVERIMS_SUPPORT (1 << 12)
1463 #define UE_TIMERS_ANDCONSTS (1 << 13)
1464 #define SIB1_UAC_BARINFO (1 << 14)
1465 #define USEFULL_RESUMEID (1 << 15)
1472 UINT8 qRxLevMinOffsetd; /*option*/
1473 INT8 qRxLevMinSUL; /*option*/
1474 INT8 qQualMin; /*option*/
1475 UINT8 qQualMinOffset; /*option*/
1476 CellAccessInfo_t cellAccessRelateInfo;
1477 ConnEstFailCtrl_t connEstFailureCtrl; /*option*/
1480 SiSchInfo_t siSchedulInfo[MAX_SI_MESSAGE]; /*option*/
1481 SiRequestConfig_t siReqCfg; /*option*/
1482 SiRequestConfig_t siReqCfgSul; /*option*/
1483 UINT32 systemInformationAreaID; /*option*/
1484 ServingCellCfg_t servingCellCfgCommon; /*option*/
1485 BOOL ims_EmergencySupport; /*option*/
1486 BOOL eCallOverIMS_Support; /*option*/
1487 UETimersAndConstants_t ueTimersAndConsts; /*option*/
1488 Sib1UacBarringInfo_t sib1UacBarInfo; /*option*/
1489 BOOL useFullResumeID; /*option*/
1492 /********************** Sib2_t ************************/
1493 typedef enum cmSib2QHyst
1514 typedef enum cmSib2SfMedium
1516 qHystSFdBMedium0 = 0,
1517 qHystSFdBMedium2 = 1,
1518 qHystSFdBMedium4 = 2,
1519 qHystSFdBMedium6 = 3
1522 typedef enum cmSib2SfHigh
1530 typedef struct cmSib2QHystSf
1532 CmSib2SfMedium_e sfMedium;
1533 CmSib2SfHigh_e sfHigh;
1537 typedef enum cmSib2TEvaluation
1541 tEvaluationS120 = 2,
1542 tEvaluationS180 = 3,
1543 tEvaluationS240 = 4,
1544 tEvaluationSpare3 = 5,
1545 tEvaluationSpare2 = 6,
1546 tEvaluationSpare1 = 7
1547 }CmSib2TEvaluation_e;
1549 typedef enum cmSib2THystNormal
1553 tHystNormalS120 = 2,
1554 tHystNormalS180 = 3,
1555 tHystNormalS240 = 4,
1556 tHystNormalSpare3 = 5,
1557 tHystNormalSpare2 = 6,
1558 tHystNormalSpare1 = 7
1559 }CmSib2THystNormal_e;
1562 typedef struct cmSib2MobilityStateParameters
1564 CmSib2TEvaluation_e tEvaluation;
1565 CmSib2THystNormal_e tHystNormal;
1566 UINT8 nCellChangeMedium; /*1-16*/
1567 UINT8 nCellChangeHigh; /*1-16*/
1568 }CmSib2MobilityStateParameters_t;
1571 typedef struct cmSib2SpeedStateReselectionPars
1573 CmSib2MobilityStateParameters_t mobilityStateParameters;
1574 CmSib2QHystSf_t qHystSF;
1575 }CmSib2SpeedStateReselectionPars_t;
1577 #define THRESHOLD_RSRP_PRESENT (1 << 0)
1578 #define THRESHOLD_PSRQ_PRESENT (1 << 1)
1579 #define THRESHOLD_SINR_PRESENT (1 << 2)
1580 typedef struct cmSib2ThresholdNr
1583 UINT8 thresholdRSRP; /*0-127 OPTIONAL*/
1584 UINT8 thresholdRSRQ; /*0-127 OPTIONAL*/
1585 UINT8 thresholdSINR; /*0-127 OPTIONAL*/
1586 }CmSib2ThresholdNr_t;
1588 typedef enum cmSib2QOffsetRange
1590 sib2qOffsetRangeMinus24 = 0,
1591 sib2qOffsetRangeMinus22 = 1,
1592 sib2qOffsetRangeMinus20 = 2,
1593 sib2qOffsetRangeMinus18 = 3,
1594 sib2qOffsetRangeMinus16 = 4,
1595 sib2qOffsetRangeMinus14 = 5,
1596 sib2qOffsetRangeMinus12 = 6,
1597 sib2qOffsetRangeMinus10 = 7,
1598 sib2qOffsetRangeMinus8 = 8,
1599 sib2qOffsetRangeMinus6 = 9,
1600 sib2qOffsetRangeMinus5 = 10,
1601 sib2qOffsetRangeMinus4 = 11,
1602 sib2qOffsetRangeMinus3 = 12,
1603 sib2qOffsetRangeMinus2 = 13,
1604 sib2qOffsetRangeMinus1 = 14,
1605 sib2qOffsetRangePlus0 = 15,
1606 sib2qOffsetRangePlus1 = 16,
1607 sib2qOffsetRangePlus2 = 17,
1608 sib2qOffsetRangePlus3 = 18,
1609 sib2qOffsetRangePlus4 = 19,
1610 sib2qOffsetRangePlus5 = 20,
1611 sib2qOffsetRangePlus6 = 21,
1612 sib2qOffsetRangePlus8 = 22,
1613 sib2qOffsetRangePlus10 = 23,
1614 sib2qOffsetRangePlus12 = 24,
1615 sib2qOffsetRangePlus14 = 25,
1616 sib2qOffsetRangePlus16 = 26,
1617 sib2qOffsetRangePlus18 = 27,
1618 sib2qOffsetRangePlus20 = 28,
1619 sib2qOffsetRangePlus22 = 29,
1620 sib2qOffsetRangePlus24 = 30,
1622 }CmSib2QOffsetRange_e;
1624 #define NROF_SS_BLOCKS_TO_AVERAGE_PRESENT (1 << 0)
1625 #define ABS_THRESH_SS_BLOCKS_CONSOLIDATION_PRESENT (1 << 1)
1626 #define RANGE_TO_BEST_CELL_PRESENT (1 << 2)
1627 #define SPEED_STATE_RESELECTION_PARS_PRESENT (1 << 3)
1628 typedef struct cmSib2CellReselectionInfoCommon
1631 UINT8 nrofSsBlocksToAverage; /*2-16 OPTIONAL*/
1632 CmSib2ThresholdNr_t absThreshSsBlocksConsolidation; /*OPTIONAL*/
1633 CmSib2QOffsetRange_e rangeToBestCell; /*OPTIONAL*/
1634 CmSib2QHyst_e qHyst;
1635 CmSib2SpeedStateReselectionPars_t speedStateReselectionPars;
1636 } CmSib2CellReselectionInfoCommon_t;
1638 typedef enum cmSib2CellReselectionSubPriority
1640 cellReselectionSubPriorityoDot2 = 0,
1641 cellReselectionSubPriorityoDot4 = 1,
1642 cellReselectionSubPriorityoDot6 = 2,
1643 cellReselectionSubPriorityoDot8 = 3
1644 }CmSib2CellReselectionSubPriority_e;
1646 #define CM_SIB2_RESELECT_SERV_FREQ_SNON_INTRA_SEARCH_P (1 << 0)
1647 #define CM_SIB2_RESELECT_SERV_FREQ_SNON_INTRA_SEARCH_Q (1 << 1)
1648 #define CM_SIB2_RESELECT_SERV_FREQ_THRESH_SERV_LOWQ (1 << 2)
1649 #define CM_SIB2_RESELECT_SERV_FREQ_SUB_PRIORITY (1 << 3)
1650 typedef struct cmSib2CellReselectionServingFreqInfo
1653 UINT8 sNonIntraSearchP; //0-31
1654 UINT8 sNonIntraSearchQ; //0-31
1655 UINT8 threshServingLowP; //0-31
1656 UINT8 threshServingLowQ; //0-31
1657 UINT8 cellReselectionPriority; //0-7
1658 CmSib2CellReselectionSubPriority_e cellReselectionSubPriority;
1659 } CmSib2CellReselectionServingFreqInfo_t;
1662 typedef struct cmSib2SsRssiMeasurement
1664 UINT8 measurementSlots[10]; //BIT STRING SIZE(1-80)
1665 UINT8 endSymbol; //0-3
1666 } CmSib2SsRssiMeasurement_t;
1669 typedef struct cmSib2NrNsPmaxValue
1671 INT8 additionalPmax; /*-30~30 OPTIONAL*/
1672 UINT8 additionalSpectrumEmission; /*0-7*/
1673 } CmSib2NrNsPmaxValue_t;
1676 typedef struct cmSib2NrNsPmaxList
1678 CmSib2NrNsPmaxValue_t nRNsPmaxList[MAX_NR_NS_PMAX];
1679 } CmSib2NrNsPmaxList_t;
1682 typedef struct cmSib2NrMultiBandInfo
1684 UINT16 freqBandIndicatorNR; //1-1024
1685 CmSib2NrNsPmaxList_t nRNsPmaxList;
1686 } CmSib2NrMultiBandInfo_t;
1689 typedef struct cmSib2MultiFrequencyBandListNrSib
1691 CmSib2NrMultiBandInfo_t multiFrequencyBandListNrSib[MAX_MULTI_BANDS];
1693 } CmSib2MultiFrequencyBandListNrSib_t;
1696 typedef enum cmSib2Duration
1705 typedef enum cmSib2SsMtcPresent
1707 CM_SIB2_SSB_MTC_NOTHING = 0,
1708 CM_SIB2_SSB_MTC_SF5 = 1,
1709 CM_SIB2_SSB_MTC_SF10 = 2,
1710 CM_SIB2_SSB_MTC_SF20 = 3,
1711 CM_SIB2_SSB_MTC_SF40 = 4,
1712 CM_SIB2_SSB_MTC_SF80 = 5,
1713 CM_SIB2_SSB_MTC_SF160 = 6,
1714 }CmSib2SsMtcPresent_e;
1716 typedef struct cmSib2SsbMtc //choice sf5-sf160
1718 CmSib2SsMtcPresent_e present;
1724 UINT8 sf160; //0-159
1725 CmSib2Duration_e duration;
1729 typedef enum cmSib2SsbToMeasurePresent
1731 CM_SIB2_SSB_TO_MEASURE_NOTHING = 0,
1732 CM_SIB2_SSB_TO_MEASURE_SHORT_BITMAP = 1,
1733 CM_SIB2_SSB_TO_MEASURE_MEDIUM_BITMAP = 2,
1734 CM_SIB2_SSB_TO_MEASURE_LONG_BITMAP = 3,
1735 }CmSib2SsbToMeasurePresent_e;
1737 typedef struct cmSib2SsbToMeasure
1739 CmSib2SsbToMeasurePresent_e present;
1740 UINT8 shortBitmap; //BIT STRING SIZE(4)
1741 UINT8 mediumBitmap; //BIT STRING SIZE(8)
1742 UINT64 longBitmap; //BIT STRING SIZE(64)
1744 } CmSib2SsbToMeasure_t;
1746 #define CM_INTRA_FREQ_CELL_RESELECT_QRX_LEV_MIN_SUL_PRESENT (1 << 0)
1747 #define CM_INTRA_FREQ_CELL_RESELECT_QUAL_MIN_PRESENT (1 << 1)
1748 #define CM_INTRA_FREQ_CELL_RESELECT_SINTRA_SEARCH_Q_PRESENT (1 << 2)
1749 #define CM_INTRA_FREQ_CELL_RESELECT_FREQUENCY_BAND_LIST_PRESENT (1 << 3)
1750 #define CM_INTRA_FREQ_CELL_RESELECT_FREQUENCY_BAND_LIST_SUL_PRESENT (1 << 4)
1751 #define CM_INTRA_FREQ_CELL_RESELECT_PMAX_PRESENT (1 << 5)
1752 #define CM_INTRA_FREQ_CELL_RESELECT_CM_SIB2_SSB_MTC_PRSENT (1 << 6)
1753 #define CM_INTRA_FREQ_CELL_RESELECT_CM_SIB2_SS_RSSI_MEASUREMENT_PRSENT (1 << 7)
1754 #define CM_INTRA_FREQ_CELL_RESELECT_CM_SIB2_SSB_TO_MEASURE_PRSENT (1 << 8)
1755 typedef struct cmSib2IntraFreqCellReselectionInfo
1758 INT8 qRxLevMin; //-70~-22
1759 INT8 qRxLevMinSUL; //-70~-22
1760 INT8 qQualMin; //-34~-3
1761 UINT8 sIntraSearchP; //0-31
1762 UINT8 sIntraSearchQ; //0-31
1763 UINT8 tReselectionNR; //0-7
1764 CmSib2MultiFrequencyBandListNrSib_t frequencyBandList;
1765 CmSib2MultiFrequencyBandListNrSib_t frequencyBandListSUL;
1767 CmSib2SsbMtc_t smtc;
1768 CmSib2SsRssiMeasurement_t ssRssiMeasurement ;
1769 CmSib2SsbToMeasure_t ssbToMeasure;
1770 BOOL deriveSSBIndexFromCell;
1771 } CmSib2IntraFreqCellReselectionInfo_t;
1775 CmSib2CellReselectionInfoCommon_t cellReselectionCommon;
1776 CmSib2CellReselectionServingFreqInfo_t cellReselectionServingFreq;
1777 CmSib2IntraFreqCellReselectionInfo_t intraFreqCellReselection;
1780 /********************** Sib3_t ************************/
1781 typedef enum cmSib3QOffsetRange
1783 sib3qOffsetRangeMinus24 = 0,
1784 sib3qOffsetRangeMinus22 = 1,
1785 sib3qOffsetRangeMinus20 = 2,
1786 sib3qOffsetRangeMinus18 = 3,
1787 sib3qOffsetRangeMinus16 = 4,
1788 sib3qOffsetRangeMinus14 = 5,
1789 sib3qOffsetRangeMinus12 = 6,
1790 sib3qOffsetRangeMinus10 = 7,
1791 sib3qOffsetRangeMinus8 = 8,
1792 sib3qOffsetRangeMinus6 = 9,
1793 sib3qOffsetRangeMinus5 = 10,
1794 sib3qOffsetRangeMinus4 = 11,
1795 sib3qOffsetRangeMinus3 = 12,
1796 sib3qOffsetRangeMinus2 = 13,
1797 sib3qOffsetRangeMinus1 = 14,
1798 sib3qOffsetRangePlus0 = 15,
1799 sib3qOffsetRangePlus1 = 16,
1800 sib3qOffsetRangePlus2 = 17,
1801 sib3qOffsetRangePlus3 = 18,
1802 sib3qOffsetRangePlus4 = 19,
1803 sib3qOffsetRangePlus5 = 20,
1804 sib3qOffsetRangePlus6 = 21,
1805 sib3qOffsetRangePlus8 = 22,
1806 sib3qOffsetRangePlus10 = 23,
1807 sib3qOffsetRangePlus12 = 24,
1808 sib3qOffsetRangePlus14 = 25,
1809 sib3qOffsetRangePlus16 = 26,
1810 sib3qOffsetRangePlus18 = 27,
1811 sib3qOffsetRangePlus20 = 28,
1812 sib3qOffsetRangePlus22 = 29,
1813 sib3qOffsetRangePlus24 = 30
1814 }CmSib3QOffsetRange_e;
1816 #define CM_INTRA_FREQ_NEIGH_CELL_QRX_LEV_MIN_OFFSET_CELL (1 << 0)
1817 #define CM_INTRA_FREQ_NEIGH_CELL_QRX_LEV_MIN_OFFSET_SUL_CELL (1 << 1)
1818 #define CM_INTRA_FREQ_NEIGH_CELL_QUAL_MIN_OFFSET_CELL (1 << 2)
1819 typedef struct cmSib3IntraFreqNeighCellInfo
1822 UINT16 physCellId; //0-1007
1823 CmSib3QOffsetRange_e qOffsetCell;
1824 UINT8 qRxLevMinOffsetCell; //1-8
1825 UINT8 qRxLevMinOffsetCellSUL; //1-8
1826 UINT8 qQualMinOffsetCell; //1-8
1828 } CmSib3IntraFreqNeighCellInfo_t;
1831 typedef struct cmSib3IntraFreqNeighCellList
1834 CmSib3IntraFreqNeighCellInfo_t intraFrequenceNeighCellList[MAXCELLINTRA];
1836 } CmSib3IntraFreqNeighCellList_t;
1839 typedef enum cmSib3Range
1859 #define CM_SIB3_PCI_RANGE (1 << 0)
1860 typedef struct cmSib3PciRange
1863 UINT16 physCellId; //0-1007
1864 CmSib3Range_e range;
1868 typedef struct cmSib3IntraFreqBlackCellList
1871 CmSib3PciRange_t intraFrequenceBlackCellList[MAXCELLBLACK];
1873 } CmSib3IntraFreqBlackCellList_t;
1875 #define CM_SIB3_INTRA_FREQ_NEIGH_CELL_LIST (1 << 0)
1876 #define CM_SIB3_INTRA_FREQ_BLACK_CELL_LIST (1 << 1)
1880 CmSib3IntraFreqNeighCellList_t intraFreqNeighCell;
1881 CmSib3IntraFreqBlackCellList_t intraFreqBlackCell;
1884 /********************** SystemInfo_t ************************/
1885 typedef struct systemInfo
1899 /********************** SiConfig_t ************************/
1900 typedef struct siConfig
1906 SystemInfo_t si1Cfg;
1907 SystemInfo_t si2Cfg;
1927 typedef struct ngapConfig
1929 UINT32 gNBId; /* Global Ran Node ID of one gNB */
1930 NgapRanName_t ranNodeName; /* name of one gNB */
1931 IpAddress_t ranNodeIp; /* IP Address of gNB */
1933 /********************** OamCuCpConfig_t ************************/
1937 IpAddress_t gnbDuIp;/* IP Address of DU */
1938 UCHAR gnbDuName[MAX_GNB_DU_NAME];
1942 typedef struct f1apConfig
1947 IpAddress_t gnbCuIp;/* IP Address of CU */
1948 UCHAR gnbCuName[MAX_GNB_CU_NAME];
1950 F1apDuInfo_t gnbDuCfg[MAX_GNB_DU_NUM];
1954 * @struct Transmission BandWidth
1955 This structure is the Transmission BandWidth of Cell Configuration
1957 typedef struct transBandWidth
1965 This structure is the sul Info of Cell Configuration
1967 typedef struct sulInfo
1970 TransBandWidth_t sulTransBW;
1975 This structure is the freq Band of Cell Configuration
1977 typedef struct freqBand
1980 UINT8 supportedSulBandNum;
1981 UINT32 sulBand[MAX_NR_CELL_BANDS];
1986 This structure is the freq Info of Cell Configuration
1988 #define FreqInfoSulInfoChosen 0x01
1989 typedef struct freqInfo
1995 FreqBand_t freqBandItem[MAX_NR_CELL_BANDS];
2000 This structure is the FDD Mode Config Info of Cell Configuration
2002 typedef struct fddInfo
2004 FreqInfo_t ulFreqInfo;
2005 FreqInfo_t dlFreqInfo;
2006 TransBandWidth_t ulTransBW;
2007 TransBandWidth_t dlTransBW;
2012 This structure is the TDD Mode Config Info of Cell Configuration
2014 typedef struct tddInfo
2016 FreqInfo_t nrFreqInfo;
2017 TransBandWidth_t transBW;
2021 * @struct oamActCellInfo
2022 This structure is oam send this message to Du act cell
2024 typedef struct oamActCellInfo
2027 CmNrCellId actCellId[MAX_CELL_NUM];
2031 * @struct oamActCellRsp
2032 This structure is DU send reponse message to OAM
2034 typedef struct oamActCellRsp
2036 UINT8 actResult; //0: all failed 1: all success 2: some success and some failed
2038 CmNrCellId actSuccessCellId[MAX_CELL_NUM];
2039 CmNrCellId actFailedCellId[MAX_CELL_NUM];
2043 /** 从原始消息中获取SOCKET msg */
2044 #define GNB_GET_SOCKET_MSG(src,dst) VOS_MemCpy((CHAR*)dst,(CHAR*)src,sizeof(vos_sock_info_t))
2046 /** 从原始消息中拷贝消息到dst中 */
2047 #define GNB_GET_DATA(src,dst,len) if(len > sizeof(vos_sock_info_t)) \
2049 VOS_MemCpy((CHAR*)dst,((CHAR*)src+sizeof(vos_sock_info_t)),(len-sizeof(vos_sock_info_t))); \
2053 printf("msg len invalid, len = %d \r\n",len);\
2058 #define GNB_GET_MODULE_MSG_DATA_PTR(dataType,pData,buf) do{ \
2059 ULONG ulBufAddr = 0; \
2060 VOS_MemCpy((CHAR*)&ulBufAddr,(CHAR*)buf,sizeof(ULONG));\
2061 pData =(dataType*)(ULONG*)ulBufAddr; \
2064 #define GNB_SET_MODULE_MSG_DATA_PTR(src,dst) do{ \
2065 ULONG ulBufAddr = 0; \
2066 ulBufAddr= (ULONG)((ULONG*)src); \
2067 VOS_MemCpy(dst, &ulBufAddr, sizeof(ULONG)); \
2071 #define GNB_SET_MODULE_MSG(msg,pModuleMsg) do{ \
2072 CHAR* bufPtr = NULL; \
2073 ULONG ulBufAddr = 0; \
2074 bufPtr = (CHAR*)VOS_Malloc((pModuleMsg)->msgLen,(pModuleMsg)->srcModuleId); \
2075 if(NULL == bufPtr) \
2080 VOS_MemCpy(bufPtr,&msg,sizeof(msg)); \
2081 ulBufAddr= (ULONG)((ULONG*)bufPtr); \
2082 VOS_MemCpy((pModuleMsg)->msgBuf, &ulBufAddr, sizeof(ULONG)); \
2084 #define BUFFER_TO_UINT32(buf, x) \
2086 x = ((uint32_t)((buf)[0]) ) | \
2087 ((uint32_t)((buf)[1]) << 8) | \
2088 ((uint32_t)((buf)[2]) << 16) | \
2089 ((uint32_t)((buf)[3]) << 24); \
2092 #define INT32_TO_BUFFER(x, buf) \
2094 (buf)[0] = (x) >> 24; \
2095 (buf)[1] = (x) >> 16; \
2096 (buf)[2] = (x) >> 8; \
2103 extern void fillSocketPara(UINT32 sockType,SockAddrStr_t* pSockAddr,SockAddrStr_t* clientSockAddrInfo,vos_sock_para_t *para);
2104 extern INT32 get_file_len(FILE *file_p);
2105 extern INT32 tell_file(FILE *file_p);
2106 extern INT32 getpos_file(FILE *file_p, fpos_t *pos);
2107 extern INT32 putpos_file(FILE *file_p, fpos_t *pos);
2108 extern INT32 seek_file(FILE *file_p, INT32 offset, INT32 whence);
2109 extern INT32 eof_file(FILE *file_p);
2110 extern INT32 error_file(FILE *file_p);
2111 extern FILE *open_file(const char *path, const char *flag);
2112 extern INT32 close_file(FILE *file_p);
2113 extern INT32 read_file(void *buf, INT32 size, INT32 count, FILE *file_p);
2115 extern VOID sctpMsgNotifyProc(vos_sock_info_t* opval,VOID* buffer);
2117 void gnbPrintRrcMsg(int direction, int msgType, UINT8 *buf, INT32 size);
2123 #endif /* _CU_COMMON_H_*/