[ Jira id - ODUHIGH-593 ] Pack and unpack function nomenclature correction
[o-du/l2.git] / src / du_app / du_cfg.h
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 #ifndef __DU_CONFIG_H_
20 #define __DU_CONFIG_H__
21
22 #ifdef O1_ENABLE
23 #include "CmInterface.h"
24 #endif
25
26 /* MACROS */
27 #define GNB_ID  1 /* As per 38.423,Sec 9.2.2.1, gnbId range b/w 0 to 4294967295 */
28
29 #define DU_INST 0
30
31 #define NR_PCI 1
32 #define NR_CELL_ID 1
33
34 #define TRANS_ID 1
35 #define PLMN_SIZE 3
36
37 #define MEAS_TIMING_ARFCN 630432
38 #define CARRIER_IDX 1
39 #define FREQ_SHIFT_7P5KHZ FALSE
40 #define SSB_MULT_CARRIER_BAND FALSE
41 #define MULT_CELL_CARRIER FALSE
42 #define NUM_SYMBOLS_PER_SLOT 14       /* Number of symbols within a slot */
43 #define CORESET0_END_PRB   48
44 #define CORESET1_NUM_PRB   24
45
46 /* MACRO defines for PRACH Configuration */
47 #define PRACH_MAX_PRB  24  /* As per (spec 38.211-Table 6.3.3.2-1), max allocated PRBs can go upto 24 */
48 #define NUM_UNUSED_ROOT_SEQ 0
49 #define UNUSED_ROOT_SEQ 1
50 #define PRACH_MULT_CARRIER_BAND FALSE
51
52 #define RSS_MEASUREMENT_UNIT DONT_REPORT_RSSI
53 #define RA_CONT_RES_TIMER 64
54
55 /* MACRCO Ddefine for PDCCH Configuration */
56 #define PDCCH_CTRL_RSRC_SET_ONE_ID  1
57 #define PDCCH_CTRL_RSRC_SET_ONE_DURATION 2  /* Duration for control resource set id i */
58 #define PDCCH_CTRL_RSRC_SET_ONE_PRECOD_GRANULARITY 1   /* Precoded granularity */
59 #define PDCCH_SRCH_SPC_TWO_ID 2
60 #define PDCCH_SRCH_SPC_TWO_AGG_LVL1_CANDIDATE 7   /* Num of candidate at aggregation level 1 */
61 #define PDCCH_SRCH_SPC_TWO_AGG_LVL2_CANDIDATE 7   /* Num of candidate at aggregation level 2 */
62 #define PDCCH_SRCH_SPC_TWO_AGG_LVL4_CANDIDATE 4   /* Num of candidate at aggregation level 4 */
63 #define PDCCH_SRCH_SPC_TWO_AGG_LVL8_CANDIDATE 2   /* Num of candidate at aggregation level 8 */
64 #define PDCCH_SRCH_SPC_TWO_AGG_LVL16_CANDIDATE 1  /* Num of candidate at aggregation level 16 */
65 #define PDCCH_SRCH_SPC_TWO_UE_SPEC_DCI_FORMAT  0  /* format 0-0 and 1-0 */
66 #define PDCCH_SYMBOL_WITHIN_SLOT 128     /* Symbol within Slot Value */
67
68 /* MACRO Ddefine for PDSCH Configuration */
69 #define NUM_TIME_DOM_RSRC_ALLOC 2
70 #define PDSCH_START_SYMBOL  3
71 #define PDSCH_LENGTH_SYMBOL 11
72 #define PDSCH_RES_ALLOC_TYPE       1          /* Resource allocation type */
73 #define PDSCH_MAX_CODEWORD_SCH_BY_DCI 0       /* Max num of codewords scheduled by DCI */
74 #define PDSCH_RBG_SIZE   0                    /* 0: config1 */
75 #define PDSCH_NUM_HARQ_PROC 5
76
77 /* MACRO Define for PUSCH Configuration */
78 #define MAX_UL_ALLOC 16
79 #define PUSCH_K2_CFG1  4
80 #define PUSCH_K2_CFG2  5
81 #define PUSCH_START_SYMBOL  3
82 #define PUSCH_LENGTH_SYMBOL 11
83
84 #define PUSCH_TRANSFORM_PRECODER    1      /* 1: Disabled */
85 #define PUSCH_MAX_MIMO_LAYERS       1
86 #define PUSCH_PROCESS_TYPE2_ENABLED false
87
88 /* MACRO defines for SRC config */
89 #define SRS_RSRC_ID  1
90 #define SRS_RSET_ID  1
91 #define SRS_COMB_OFFSET_N2   0
92 #define SRS_CYCLIC_SHIFT_N2  0
93 #define SRS_FREQ_DOM_POS     0
94 #define SRS_FREQ_DOM_SHIFT   0
95 #define C_SRS 0
96 #define B_SRS 0
97 #define B_HOP 0
98 #define SRS_SEQ_ID 0
99 #define APERIODIC_SRS_RESRC_TRIGGER 1 
100
101 #define DU_PROC  0
102 #define DU_INST 0
103 #define DU_POOL  1
104 #define MAX_DU_PORT 2
105 #define F1_INTERFACE 0
106 #define E2_INTERFACE 1
107
108 #define SCTP_INST 0
109 #define EGTP_INST 0
110
111 /* Events */
112 #define EVTCFG 0
113
114 /* Macro definitions for F1 procedures */
115 #define CU_DU_NAME_LEN_MAX 30      /* Max length of CU/DU name string */
116 #define MAX_F1_CONNECTIONS 65536    /* Max num of F1 connections */
117
118 #define MAXNRARFCN         3279165  /* Maximum values of NRAFCN */
119 #define MAX_NRCELL_BANDS   2       /* Maximum number of frequency bands */
120 #define MAX_NUM_OF_SLICE_ITEMS 1024     /* Maximum number of signalled slice support items */
121 #define MAX_BPLMN_NRCELL_MINUS_1   1       /* Maximum number of PLMN Ids broadcast in an NR cell minus 1 */
122 #define MAXNUMOFSIBTYPES   32       /* Maximum number of SIB types */
123 #define MAX_TNL_ASSOC      32       /* Max num of TNL Assoc between CU and DU */
124 #define MAXCELLINENB       256      /* Max num of cells served by eNB */
125 #define MAX_NUM_OF_UE_ID       65536    /* Max num of UEs served by DU */
126 #define MAXNUMOFUACPLMN    12       /* Maximum number of PLMN ids*/
127 #define MAXNUMOFUACPERPLMN 64       /* Maximum number of signalled categories per PLMN */
128 #define DEFAULT_CELLS      1        /* Max num of broadcast PLMN ids */
129 #define IE_EXTENSION_LIST_COUNT 1
130
131 /* Macro definitions for MIB/SIB1 */
132 #define SPARE 0
133 #define CELL_IDENTITY 1
134
135 /* Macro definitions for DUtoCuRrcContainer */
136 #define CELL_GRP_ID 0
137 #define SCH_REQ_ID  0
138 #define SR_PROHIBIT_TMR 5
139 #define SR_TRANS_MAX 2
140 #define PERIODIC_BSR_TMR 2
141 #define RETX_BSR_TMR     5
142 #define SR_DELAY_TMR     6
143 #define TAG_ID 0
144 #define TIME_ALIGNMENT_TMR 7
145 #define PHR_PERIODIC_TMR 7
146 #define PHR_PROHIBHIT_TMR 0
147 #define PHR_PWR_FACTOR_CHANGE 3
148 #define PHR_MODE_OTHER_CG 0
149 #define SN_FIELD_LEN_12BIT 0 /*As per Spec 38.331, The network configures only value size12 in SN-FieldLengthAM for SRB */
150 #define T_POLL_RETRANSMIT 8       /* Enum for 45ms */ 
151 #define T_POLL_RETRANSMIT_VAL 45  /* Value in ms */
152 #define POLL_PDU 0                /* Enum for 4 pdus */
153 #define POLL_PDU_VAL 4            /* Value of poll pdu */
154 #define POLL_BYTE 43              /* Enum for infinite poll bytes */
155 #define POLL_BYTE_VAL -1          /* Value for infinite poll byte */
156 #define MAX_RETX_THRESHOLD 5      /* Enum for 8 retransmissions */
157 #define MAX_RETX_THRESHOLD_VAL 8  /* Value for 8 retransmissions */
158 #define T_REASSEMBLY 8 /* enum for RE_ASM_40MS  */
159 #define T_REASSEMBLY_VAL 40 /* default re assembly timer */
160 #define T_STATUS_PROHIBHIT 7 /* enum for PROH_35MS */
161 #define T_STATUS_PROHIBHIT_VAL 35 /* default status prohibit timer */
162 #define MAC_LC_PRIORITY 1
163 #define PRIORTISIED_BIT_RATE 15
164 #define BUCKET_SIZE_DURATION 5
165 #define LC_GRP 0
166 #define P_NR_FR1 0
167 #define PDSCH_HARQ_ACK_CODEBOOK 1
168 #define SERV_CELL_IDX 0
169 #define RLM_SYNC_OUT_SYNC_THRESHOLD 0
170 #define ACTIVE_DL_BWP_ID 0
171 #define ACTIVE_UL_BWP_ID 0
172 #define SCRAMBLING_ID  NR_PCI
173 #define DMRS_ADDITIONAL_POS  0          /* DMRS Additional poistion */
174 #define RES_ALLOC_TYPE       1          /* Resource allocation type */
175
176 /* MACRO definitions for modulcation order */
177 #define MOD_ORDER_QPSK  2
178 #define MOD_ORDER_QAM16 4
179 #define MOD_ORDER_QAM64 6
180 #define MOD_ORDER_QAM256 8
181 #define PDSCH_MCS_INDEX 20  /* For 64QAM, valid mcs index: 17-28 in 38.214  - Table 5.1.3.1-1*/
182 #define PUSCH_MCS_INDEX 10  /* For 16QAM, valid mcs index: 10-16 in 38.214  - Table 5.1.3.1-1*/
183
184 /*VALID Tunnel ID*/
185 #define MIN_TEID 1   /*[Spec 29.281,Sec 5.1]: All Zero TEIDs are never assigned for setting up GTP-U Tunnel*/
186 #define MAX_TEID MAX_NUM_DRB * MAX_NUM_UE  /*[Spec 29.281]: Max limit is not mentioned but as per GTP-U Header Format, TEID occupies 4 octets */
187
188 /* Slice Ratio */
189 #define MAX_RATIO        30
190 #define MIN_RATIO        20
191 #define DEDICATED_RATIO  10
192
193 #ifdef NR_DRX
194 /* Macros for Drx configuration */
195 #define DRX_ONDURATION_TIMER_VALUE_PRESENT_IN_MS true
196 #define DRX_ONDURATION_TIMER_VALUE_IN_SUBMS 32
197 #define DRX_ONDURATION_TIMER_VALUE_IN_MS 10
198 #define DRX_INACTIVITY_TIMER 2
199 #define DRX_HARQ_RTT_TIMER_DL 56
200 #define DRX_HARQ_RTT_TIMER_UL 56
201 #define DRX_RETRANSMISSION_TIMER_DL 4
202 #define DRX_RETRANSMISSION_TIMER_UL 4
203 #define DRX_LONG_CYCLE_START_OFFSET_CHOICE 40
204 #define DRX_LONG_CYCLE_START_OFFSET_VAL 8
205 #define DRX_SHORT_CYCLE_PRESENT true
206 #define DRX_SHORT_CYCLE 2
207 #define DRX_SHORT_CYCLE_TIMER 2
208 #define DRX_SLOT_OFFSET 0
209 #endif
210
211 /* In case of initial configuration we are supporting only 2 measurement
212  * information RRU.PrbTotDl and RRU.PrbTotUl.
213  * In case of configuration modification we are supporting 3 measurement
214  * information RRU.PrbTotDl, RRU.PrbTotUl and UECNTX.RelReq */
215 #define NUM_OF_MEASUREMENT_INFO_SUPPORTED(_configType) \
216    ((_configType == CONFIG_ADD) ? 2 :3)
217
218 typedef enum
219 {
220    GNBDU,
221    GNBCU 
222 }F1Entity;
223
224 typedef enum
225 {
226    SERV_CELL_TO_MODIFY,
227    SERV_CELL_TO_DELETE
228 }ServCellAction;
229
230 typedef enum
231 {
232    UNSPECIFIED,
233    RL_FAILURE_RLC,
234    INVALID_CU_UE_F1AP_ID,
235    INVALID_DU_UE_F1AP_ID,
236    INTERACTION_WITH_OTHER_PROC,
237    INVALID_QCI_VALUE,
238    RADIO_RELATED_REASON,
239    INSUFFICIENT_RADIO_RESOURCE,
240    PROCEDURE_CANCELLED,
241    NORMAL_RELEASE,
242    UNAVAILABLE_CELL,
243    RL_FAILURE_OTHERS,
244    UE_ACCESS_REJECTED,
245    SLICE_RESOURCE_UNAVAILABLE,
246    AMF_ABNORMAL_RELEASE,
247    INVALID_PLMN
248 }RadioNwCause;
249
250 typedef enum
251 {
252    TRANS_CAUSE_UNSPECIFIED,
253    TRANSPORT_RESOURCE_UNAVAIL
254 }TransLayerCause;
255
256 typedef enum
257 {
258    TRANSFER_SYNTAX_ERR,
259    ABSTRACT_SYNTAX_ERR_REJECT,
260    ABSTRACT_SYNTAX_ERR_NOTIFY,
261    INCOMPATIBLE_MESSAGE,
262    SEMANTIC_ERROR,
263    ABSTRACT_SYNTAX_ERR_MSG_CONSTRUCT,
264    PROTOCOL_CAUSE_UNSPECIFIED
265 }ProtocolCause;
266
267 typedef enum
268 {
269    CONTROL_PROC_OVERLOAD,
270    INSUFF_USER_PLANE_RESOURCE,
271    HARDWARE_FAILURE,
272    O_AND_M_INTERVENTION,
273    MISC_CAUSE_UNSPECIFIED
274 }MiscCause;
275
276 typedef enum
277 {
278    ALL
279 }F1ResetAll;
280
281 typedef enum 
282 {
283    IN_SERVICE,
284    OUT_OF_SERVICE
285 }SrvState;
286
287 typedef enum
288 {
289    INITIATING_MSG,
290    SUCCESSFUL_OUTCOME,
291    UNSUCCESSFUL_OUTCOME
292 }F1TriggMsgVal;
293
294 typedef enum
295 {
296    CRIT_REJECT,
297    CRIT_IGNORE,
298    CRIT_NOTIFY
299 }F1ProcCritVal;
300
301 typedef enum
302 {
303    NOT_UNDERSTOOD,
304    MISSING_IE
305 }F1ErrorType;
306
307 typedef enum
308 {
309    SCS_15,
310    SCS_30,
311    SCS_60,
312    SCS_120
313 }F1NrScs;
314
315 typedef enum
316 {
317    NRB_11,
318    NRB_18,
319    NRB_24,
320    NRB_25,
321    NRB_31,
322    NRB_32,
323    NRB_38,
324    NRB_51,
325    NRB_52,
326    NRB_65,
327    NRB_66,
328    NRB_78,
329    NRB_79,
330    NRB_93,
331    NRB_106,
332    NRB_107,
333    NRB_121,
334    NRB_132,
335    NRB_133,
336    NRB_135,
337    NRB_160,
338    NRB_162,
339    NRB_189,
340    NRB_216,
341    NRB_217,
342    NRB_245,
343    NRB_264,
344    NRB_270,
345    NRB_273
346 }F1Nrb;
347
348 typedef enum
349 {
350    VERY_SMALL,
351    SMALL,
352    MEDIUM,
353    LARGE
354 }F1CellType;
355
356 typedef enum
357 {
358    DL,
359    UL,
360    DL_UL
361 }F1CellDir;
362
363 typedef enum
364 {
365    UE_USAGE,
366    NON_UE_USAGE,
367    BOTH
368 }F1AssocUsage;
369
370 typedef enum
371 {
372    BARRED,
373    NOT_BARRED
374 }CellBarred;
375
376 typedef enum
377 {
378    OFFER,
379    EXECUTION
380 }F1ReqType;
381
382 typedef enum
383 {
384    IGNORE_YES,
385    IGNORE_NO
386 }F1IgnoreReq;
387
388 typedef enum
389 {
390    OVERLOADED,
391    NOT_OVERLOADED
392 }F1GnbDuOvrloadInfo;
393
394 typedef enum
395 {
396    REJECT_RRC_CONN_NON_EMERG_MODT,
397    REJECT_RRC_CONN_SIGNALLING,
398    PERMIT_EMERG_SESSION_AND_MOBILE_TERM_SERVICE,
399    PERMIT_HIGH_PRIOR_SESSION_AND_MOBILE_TERM_SERVICE
400 }F1UacStandardAction;
401
402 typedef enum
403 {
404    PDSCH_MAPPING_TYPE_A,
405    PDSCH_MAPPING_TYPE_B,
406 }pdschMappingType;
407
408 typedef enum
409 {
410    PUSCH_MAPPING_TYPE_A,
411    PUSCH_MAPPING_TYPE_B,
412 }puschMappingType;
413
414 typedef struct f1RrcVersion
415 {
416    char    rrcVer[30];     /* Latest RRC Version */
417    uint32_t   extRrcVer;  /* Latest RRC version extended */
418 }F1RrcVersion;
419
420 typedef struct f1FailCause
421 {
422    union
423    {
424       RadioNwCause      radioNwCause;     /* Radio Network Layer Cause */
425       TransLayerCause   transLayerCause;  /* Transport Layer Cause */
426       ProtocolCause     protCause;        /* Protocol Cause */
427       MiscCause         miscCause;        /* Miscellaneous Cause */
428    }cause;
429 }F1FailCause;
430
431 typedef struct f1ProcCode
432 {
433    bool   pres;
434    uint8_t     value;
435 }F1ProcCode;
436
437 typedef struct f1TriggMsg
438 {
439    bool   pres;
440    F1TriggMsgVal   value;
441 }F1TriggMsg;
442
443 typedef struct f1ProcCrit
444 {
445    bool   pres;
446    F1ProcCritVal   value;
447 }F1ProcCrit;
448
449 typedef struct f1CritDignosIE
450 {
451    F1ProcCritVal   ieCritVal;
452    uint16_t             ieId;
453    F1ErrorType       type;
454 }F1CritDignosIE;
455
456 typedef struct f1CritDiagnostic
457 {
458    bool         pres;
459    F1ProcCode   procCode;      /* Procedure Code */
460    F1TriggMsg   triggeringMsg; /* Triggering Message */
461    F1ProcCrit   procCrit;      /* Criticality of Triggering msg/proc */
462    uint32_t          transId;
463    F1CritDignosIE diagnosIE;
464 }F1CritDiagnostic;
465
466 typedef struct f1FailureIE
467 {
468    uint32_t                transId;        /* Uniquely identify transaction */
469    F1FailCause        cause;          /* Failure cause */
470    uint8_t                 timeToWait;     /* Seconds to be waited before retry */
471    F1CritDiagnostic   critDiagnostic; /* Critical diagnostics */
472 }F1FailureIE;
473
474 typedef struct f1LogicalConnUeAssoc
475 {
476    uint32_t   gnbCuUeF1apId;
477    uint32_t   gnbDuUeF1apId;
478 }F1LogicalConnUeAssoc;
479
480 typedef struct f1ResetType
481 {
482    union
483    {
484       F1ResetAll             resetAll; /* Reset All */
485       F1LogicalConnUeAssoc   ueAssocLogicalConn[MAX_F1_CONNECTIONS]; /* In case of Partial Reset : UE associated logical F1 conn list*/
486    }type;
487 }F1ResetType;
488
489 typedef struct nrEcgi
490 {
491    Plmn  plmn;
492    uint16_t     cellId;
493 }NrEcgi;
494
495 typedef struct f1SibType
496 {
497    uint8_t   sibType;
498    uint8_t   sibMsg;
499    uint8_t   value;
500 }F1SibType;
501
502 typedef struct f1TxBw
503 {
504    F1NrScs   nrScs; /* NR subcarrier spacing */
505    F1Nrb     nrb;   /* Transmission bandwidth expressed in units of RBs */
506 }F1TxBw;
507
508 typedef struct f1SulInfo
509 {
510    uint32_t      sulArfcn; /* SUL ARFCN */
511    F1TxBw   sulTxBw;  /* SUL transmission bandwidth */ 
512 }F1SulInfo;
513
514 typedef struct f1FreqBand
515 {
516    uint16_t   nrFreqBand;
517    uint16_t   sulBand[MAX_NRCELL_BANDS];
518 }F1FreqBand;
519
520 typedef struct f1NrFreqInfo
521 {
522    uint32_t        nrArfcn;
523    F1SulInfo  sulInfo;
524    F1FreqBand freqBand[MAX_NRCELL_BANDS];
525 }F1NrFreqInfo;
526
527 typedef struct f1NrFddInfo
528 {
529    F1NrFreqInfo   ulNrFreqInfo;  /* UL NR Frequency Info */
530    F1NrFreqInfo   dlNrFreqInfo;  /* DL NR Frequency Info */
531    F1TxBw         ulTxBw;        /* UL Transmission bandwidth */
532    F1TxBw         dlTxBw;        /* DL Transmission bandwidth */
533 }F1NrFddInfo;
534
535 typedef struct f1NrTddInfo
536 {
537    F1NrFreqInfo   nrFreqInfo;   /* NR Frequency Info */
538    F1TxBw       nrTxBw;       /* NR Transmission Bandwidth */
539 }F1NrTddInfo;
540
541 typedef struct f1NrModeInfo
542 {
543    union
544    {
545       F1NrFddInfo  fdd;
546       F1NrTddInfo  tdd;
547    }mode;
548 }NrModeInfo;
549
550 typedef struct f1EutraFddInfo
551 {
552    uint16_t   ulOffset;   /* UL offset to Point A */
553    uint16_t   dlOffset;   /* DL offset to Point A */
554 }F1EutraFDDInfo;
555
556 typedef struct f1EutraTddInfo
557 {
558    uint16_t   tddOffset;  /* Offset to Point A */
559 }F1EutraTDDInfo;
560
561 typedef struct f1EutraModeInfo
562 {
563    union
564    {
565       F1EutraFDDInfo  fdd;
566       F1EutraTDDInfo  tdd;
567    }mode;
568 }F1EutraModeInfo;
569
570 typedef struct epIpAddr
571 {
572    char transportAddr[20]; /* Transport Layer Address */
573 }EpIpAddr;
574
575 typedef struct epIpAddrPort
576 {
577    EpIpAddr epIpAddr;
578    char   port[2];
579 }EpIpAddrPort;
580
581 typedef struct f1SrvdPlmn
582 {
583    Plmn   plmn;
584    Plmn   extPlmn;    /* Extended available PLMN list */
585    SupportedSliceList taiSliceSuppLst;
586 }F1SrvdPlmn;
587
588 typedef struct f1BrdcstPlmnInfo
589 {
590    Plmn   plmn[MAX_PLMN];     /* PLMN id list */
591    Plmn   extPlmn[MAX_PLMN];   /* Extended PLMN id list */
592    uint16_t      tac;                     /* 5GS-TAC */
593    uint32_t      nrCellId;                /* NR Cell id */
594    uint8_t       ranac;                   /* RAN Area code */
595 }F1BrdcstPlmnInfo;
596
597 typedef struct f1CellInfo
598 {
599    NrEcgi   nrCgi;                   /* Cell global Identity */
600    uint32_t nrPci;                   /* Physical Cell Identity */
601    F1SrvdPlmn srvdPlmn[MAX_PLMN];
602 }F1CellInfo;
603
604 typedef struct f1DuCellInfo
605 {
606    F1CellInfo         cellInfo;     /* cell info */
607    uint16_t           tac;          /* tracking area code */
608    uint16_t           epsTac;       /* Configured EPS TAC */
609    NrModeInfo         f1Mode;       /* NR mode info : FDD/TDD */
610    uint8_t            measTimeCfgDuration;  /* Measurement timing configuration */
611    F1CellDir          cellDir;      /* Cell Direction */
612    F1CellType         cellType;     /* Cell Type */
613    F1BrdcstPlmnInfo   brdcstPlmnInfo[MAX_BPLMN_NRCELL_MINUS_1]; /* Broadcast PLMN Identity Info List */
614 }F1DuCellInfo;
615
616 typedef struct f1DuSysInfo
617 {
618    uint8_t   *mibMsg;   /* MIB message */
619    uint16_t  mibLen;
620    uint8_t   *sib1Msg;  /* SIB1 message */
621    uint16_t  sib1Len;
622 }F1DuSysInfo;
623
624 typedef struct f1CuSysInfo
625 {
626    F1SibType   sibTypeToUpd[MAXNUMOFSIBTYPES];   /* SIB types to be updated */
627 }F1CuSysInfo;
628
629 typedef struct f1DuSrvdCellInfo
630 {
631    F1DuCellInfo   duCellInfo;   /* gNB-DU served cell info */
632    F1DuSysInfo    duSysInfo;    /* gNB-DU System Information */
633 }F1DuSrvdCellInfo;
634
635 typedef struct f1DuSrvdCellToDel
636 {
637    NrEcgi             oldNrCgi;     /* Old NR CGI */
638    F1DuSrvdCellInfo   srvdCellInfo; /* Info of served cell to be deleted */ 
639 }F1DuSrvdCellToDel;
640
641 typedef struct f1CuActCellInfo
642 {
643    F1CellInfo    cuCellInfo;   /* gNB-CU available cell info */
644    F1CuSysInfo   cuSysInfo;    /* gNB-CU System Information */
645 }F1CuActCellInfo;
646
647 typedef struct f1ActCellFail
648 {
649    NrEcgi        nrCgi;
650    F1FailCause   cause;
651 }F1ActCellFail;
652
653 typedef struct srvStatus
654 {
655    SrvState    state;
656    bool        switchOffOngoing;
657 }SrvStatus;
658
659 typedef struct f1CellStatus
660 {
661    NrEcgi      nrEcgi;
662    SrvStatus   status;   /* Service status */
663 }F1CellStatus;
664
665 typedef struct f1DedSIDelUE
666 {
667    uint32_t      gnbCuUeF1apId;
668    NrEcgi   nrEcgi;
669 }F1DedSIDelUE;
670
671 typedef struct tnlAssocInfo
672 {
673    bool           pres;
674    EpIpAddr       epIpAddr;      /* Endpoint-IP Address */
675    EpIpAddrPort   epIpAddrport;  /* Endpoint-IP Address and Port */
676 }F1TnlAssocAddr;
677
678 typedef struct f1TnlAssocUsage
679 {
680    bool           pres;
681    F1AssocUsage   usage;
682 }F1TnlAssocUsage;
683
684 typedef struct f1TnlAssoc
685 {
686    F1TnlAssocAddr   assocInfo;    /* TNL Assoc Transport Layer Info */
687    F1TnlAssocUsage  assocUsage;   /* TNL Assoc usage */
688 }F1TnlAssoc;
689
690 typedef struct f1TnlAssocToRmv
691 {
692    F1TnlAssocAddr   assocInfoCu;   /* TNL Assoc Transport Layer Info of CU */
693    F1TnlAssocAddr   assocInfoDu;   /* TNL Assoc Transport Layer Info of DU */
694 }F1TnlAssocToRmv;
695
696 typedef struct f1TnlAssocSetupFail
697 {
698    F1TnlAssocAddr   assocInfo;
699    F1FailCause      cause;
700 }F1TnlAssocSetupFail;
701
702
703 typedef struct f1CellBarred
704 {
705    NrEcgi       nrcgi;
706    CellBarred   cellBarred;
707 }F1CellBarred;
708
709 typedef struct f1EutraCell
710 {
711    uint32_t                eutraCellId; /* EUTRA cell id */
712    F1EutraModeInfo    mode;        /* EUTRA mode info : FDD/TDD */
713    uint8_t                 rsrcInd;     /* Protected EUTRA resource Indication */
714 }F1EutraCell;
715
716 typedef struct f1ProtectEUTRARsrc
717 {
718    uint32_t           specShareGrpId;               /* Spectrum sharing group id */
719    F1EutraCell   eutraCellList[MAXCELLINENB];  /* EUTRA cells list */
720 }F1ProtectEUTRARsrc;
721
722 typedef struct f1UacOperatorDefined
723 {
724    uint8_t   accessCategory;
725    uint8_t   accessId; 
726 }F1UacOperatorDefined;
727
728 typedef struct f1UacCategoryType
729 {
730    union
731    {
732       F1UacStandardAction    action;      /* UAC standardized action */
733       F1UacOperatorDefined   operatorDef; /* UAC operator defined */
734    }type;
735 }F1UacCategoryType;
736
737 typedef struct f1UacType
738 {
739    uint8_t                  uacReducInd;     /* Value 0 means no access rate reduction. Value 100 means full access rate reduction */
740    F1UacCategoryType   uacCategoryType; /* UAC Category type */
741 }F1UacType;
742
743 /* Unified Access Class Assistance Information */
744 typedef struct f1UacAssistInfo
745 {
746    Plmn      plmn[MAXNUMOFUACPLMN];        /* UAC PLMN list */
747    F1UacType   uacType[MAXNUMOFUACPERPLMN];  /* UAC Type list */
748 }F1UacAssistInfo;
749
750 /* F1 setup related structures */
751 #if 0
752 typedef struct f1SetupReq
753 {
754    uint32_t                transId;                       /* Uniquely identify transaction */
755    uint32_t                duId;                          /* DU ID */ 
756    char               duName[CU_DU_NAME_LEN_MAX];    /* DU name */
757    F1DuSrvdCellInfo   srvdCellLst[MAX_NUM_CELL];   /* Serving cell list */
758    F1RrcVersion       rrcVersion;                    /* RRC version */
759 }F1SetupReq;
760
761 typedef struct f1setupRsp
762 {
763    uint32_t               transId;                      /* Uniquely identify transaction */
764    char              cuName[CU_DU_NAME_LEN_MAX];   /* CU Name */
765    F1CuActCellInfo   actCellInfo;                  /* cells to be activated */
766    F1RrcVersion      rrcVersion;                   /* RRC version */
767 }F1SetupRsp;
768
769 typedef struct f1SetupFail
770 {
771    F1FailureIE   setupFail;
772 }F1SetupFail;
773
774 /* At reception of the RESET message the gNB-DU shall release all allocated resources on F1 
775  * and radio resources related to the UE association(s) indicated explicitly or implicitly in 
776  * the RESET message and remove the indicated UE contexts including F1AP ID. */
777 typedef struct f1Reset
778 {
779    uint32_t              transId;   /* Uniquely identify transaction */
780    F1FailCause      cause;     /* Failure cause */
781    F1ResetType      resetType; /* type of reset */
782 }F1Reset;
783
784 /* After the gNB-CU has released all assigned F1 resources and the UE F1AP IDs for all indicated
785  * UE associations which can be used for new UE-associated logical F1-connections over the F1 interface,
786  *  the gNB-CU shall respond with the RESET ACKNOWLEDGE message. */
787 typedef struct f1ResetAck
788 {
789    uint32_t                    transId;         /* Uniquely identify transaction */
790    F1LogicalConnUeAssoc   ueAssocLogicalConn[MAX_F1_CONNECTIONS]; /* UE associated logical F1-connection list */
791    F1CritDiagnostic       critDiagnostic;  /* Critical diagnostics */
792 }F1ResetAck;
793
794 typedef struct f1ErrorInd
795 {
796    uint32_t                transId;         /* Uniquely identify transaction */
797    F1Entity           errorOrigin;     /* Specifies if error is originated at DU or CU */
798    F1FailCause        cause;           /* Failure cause */
799    /* If failure is due to Ue related message. */
800    uint32_t                gnbCuUeF1apId;   /* gNB-CU UE F1AP Id */
801    uint32_t                gnbDuUeF1apId;   /* gNB-DU UE F1AP Id */
802    F1CritDiagnostic   critDiagnostic;  /* Critical diagnostics */
803 }F1ErrorInd;
804
805 typedef struct f1GnbDuCfgUpd
806 {
807    uint32_t                 transId;                             /* Uniquely identify transaction */
808    F1DuSrvdCellInfo    srvdCellLstAdd[MAX_NUM_CELL];      /* Served cell list to be added */
809    F1DuSrvdCellToDel   srvdCellLstMod[MAX_NUM_CELL];      /* Served cell list to be modified */
810    NrEcgi              srvdCellLstDel[MAX_NUM_CELL];      /* Served cell list to be deleted */
811    F1CellStatus        cellStatus[MAX_NUM_CELL];          /* Cell status */
812    F1DedSIDelUE        ueLst[MAX_NUM_UE];                     /* Ue list that requires dedicated SI delivery */
813    uint32_t            gnbDuId;
814    F1TnlAssocToRmv     gnbDuTnlAssocRmv[MAX_TNL_ASSOC];  /* TNL Assoc list to remove */ 
815 }F1GnbDuCfgUpd;
816
817 typedef struct f1GnbDuCfgUpdAck
818 {
819    uint32_t           transId;                      /* Uniquely identify transaction */
820    F1CuActCellInfo    cellLstAct[MAX_NUM_CELL];    /* List of cells to be activated */   
821    F1CritDiagnostic   critDiagnostic;               /* Critical diagnostics */
822    NrEcgi             cellLstDeact[MAX_NUM_CELL]; /* List of cells to be deactivated */
823 }F1GnbDuCfgUpdAck;
824
825 typedef struct f1GnbDuCfgUpdFail
826 {
827    F1FailureIE   gnbDuCfgUpdFail;
828 }F1GnbDuCfgUpdFail;
829
830 /* Sent by the gNB-CU to transfer updated information associated to an F1-C interface instance */
831 typedef struct f1GnbCuCfgUpd
832 {
833    uint32_t            transId;                            /* Uniquely identifies transaction */
834    F1CuActCellInfo     cellLstAct[MAX_NUM_CELL];         /* List of cells to be activated */
835    NrEcgi              cellLstDeact[MAX_NUM_CELL];       /* List of cells to be deactivated */
836    F1TnlAssoc          assocLstAdd[MAX_TNL_ASSOC];     /* List of TNL assocs to be added */
837    F1TnlAssoc          assocLstUpd[MAX_TNL_ASSOC];     /* List of TNL assocs to be updated */
838    F1TnlAssocToRmv     assocLstRmv[MAX_TNL_ASSOC];     /* List of TNL assocs to be removed */
839    F1CellBarred        cellToBarList[MAX_NUM_CELL];      /* List of Cells to be barred */
840    F1ProtectEUTRARsrc  protectEutraRsrcList[MAXCELLINENB]; /* List of Protected EUTRA resources */
841 }F1GnbCuCfgUpd;
842
843 /* Sent by a gNB-DU to a gNB-CU to acknowledge update of information
844  * associated to an F1-C interface instance */
845 typedef struct f1GnbCuCfgUpdAck
846 {
847    uint32_t              transId;                              /* Uniquely identify transaction */
848    F1ActCellFail         actCellFailList[MAX_NUM_CELL];      /* Cells failed to be activated list */
849    F1CritDiagnostic      critDiagnostic;                       /* Critical diagnostics */
850    F1TnlAssocAddr        assocSetupList[MAX_TNL_ASSOC];     /* TNL Assoc Setup list */
851    F1TnlAssocSetupFail   assocSetupFailList[MAX_TNL_ASSOC]; /* TNL Assoc Setup fail list */
852    F1DedSIDelUE          dedSiDelUelist[MAX_NUM_OF_UE_ID];          /* Dedicated SI delivery needed UE list */
853 }F1GnbCuCfgUpdAck;
854
855 typedef struct f1GnbCuCfgUpdFail
856 {
857    F1FailureIE   gnbCuCfgUpdFail;
858 }F1GnbCuCfgUpdFail;
859
860 /* This procedure enables coordination of radio resource allocation between a gNB-CU and
861  * a gNB-DU. Coordination request is sent by CU to DU */
862 typedef struct f1GnbDuRsrcCoordReq
863 {
864    uint32_t      transId;              /* Uniquely identifies transaction */
865    F1ReqType     reqType;              /* Request type */
866    uint8_t       cellResCoordReqCont;  /* Container for X2AP E-UTRA - NR cell resource coordination request */
867    F1IgnoreReq   ignoreReq;            /* Ignore coordination request */
868 }F1GnbDuRsrcCoordReq;
869
870 /* This message is sent by a gNB-DU to a gNB-CU, to express the desired resource allocation
871  * for data traffic, as a response to the GNB-DU RESOURCE COORDINATION REQUEST. */
872 typedef struct f1GnbDuRsrcCoordRsp
873 {
874    uint32_t   transId;               /* Uniquely identifies transaction */
875    uint8_t    cellResCoordRspCont;   /* Container for X2AP E-UTRA - NR cell resource coordination response */
876 }F1GnbDuRsrcCoordRsp;
877
878 /* This message is sent by the gNB-DU to indicate to the gNB-CU its status of overload */
879 typedef struct f1GnbDuStatusInd
880 {
881    uint32_t                  transId;      /* Uniquely identifies transaction */
882    F1GnbDuOvrloadInfo   ovrloadInfo;  /* gNB-DU overloaded information */
883 }F1GnbDuStatusInd;
884
885 /* This message is sent by either the gNB-DU or the gNB-CU to intiate the removal
886  * of the interface instance and the related resources */
887 typedef struct f1RmvReq
888 {
889    uint32_t   transId; /* Uniquely identifies transaction */
890 }F1RmvReq;
891
892 /* This message acknowledges the initiation of removal of the interface
893  * instance and the related resources */
894 typedef struct f1RmvRsp
895 {
896    uint32_t           transId;     /* Uniquely identifies transaction */
897    F1CritDiagnostic   critDiagnos; /* Crititcality diagnostics */
898 }F1RmvRsp;
899
900 /* This message indicates that removing the interface instance and the related
901  * resources cannot be accepted */
902 typedef struct f1RmvFail
903 {
904    uint32_t           transId;         /* Uniquely identifies transaction */
905    F1FailCause        cause;          /* Failure cause */
906    F1CritDiagnostic   critDiagnostic; /* Criticality diagnostics */
907 }F1RmvFail;
908
909 /* This message is sent by the gNB-CU to indicate to the gNB-DU a need to reduce
910  * the rate at which UEs access the network. */
911 typedef struct f1NwkAccessRateRed
912 {
913    uint32_t          transId;        /* Uniquely identifies transaction */
914    F1UacAssistInfo   uacAssistInfo;  /* UAC Assistance Information */
915 }F1NwkAccessRateRed;
916 #endif
917
918 typedef struct f1Ipaddr
919 {
920    bool ipV4Pres;
921    uint32_t  ipV4Addr; 
922 }F1IpAddr;
923
924 typedef struct sctpParams
925 {
926    F1IpAddr  duIpAddr;
927    uint16_t       duPort[MAX_DU_PORT];
928    F1IpAddr  cuIpAddr;
929    uint16_t       cuPort;
930    F1IpAddr  ricIpAddr;
931    uint16_t       ricPort;
932 }SctpParams;
933
934 typedef struct f1EgtpParams
935 {
936    F1IpAddr  localIp;      /* Ip address of local node */
937    uint16_t  localPort;    /* Sender Port at local node */
938    F1IpAddr  destIp;       /* Ip address of peer node */
939    uint16_t  destPort;     /* Sender port at peer node */
940    uint32_t  minTunnelId;
941    uint32_t  maxTunnelId;
942 }F1EgtpParams;
943
944 typedef struct schedulerCfg
945 {
946    uint8_t   numTxAntPorts;    /*!< Number of Tx antenna ports */
947    uint8_t   ulSchdType;     /*!< Indicates which UL scheduler to use, range
948                               * is 0..(number of schedulers - 1) */
949    uint8_t   dlSchdType;     /*!< Indicates which DL scheduler to use, range
950                               * is 0..(number of schedulers - 1) */
951    uint8_t   numCells;       /*!< Max number of cells */
952    uint8_t   maxUlUePerTti;  /*!< Max number of UE in UL per TTI */
953    uint8_t   maxDlUePerTti;  /*!< Max number of UE in DL per TTI */
954 }SchedulerCfg;
955
956 typedef struct mibParams
957 {
958    uint8_t sysFrmNum;
959    long    subCarrierSpacingCommon;
960    long    ssb_SubcarrierOffset;
961    long    dmrs_TypeA_Position;
962    long    controlResourceSetZero;
963    long    searchSpaceZero;
964    long    cellBarred;
965    long    intraFreqReselection;
966 }MibParams;
967
968 typedef struct siSchedInfo
969 {
970    long     winLen;         /* SI Window Length */
971    long     broadcastSta;   /* Broadcast status */
972    long     preiodicity;    /* si periodicity */
973    long     sibType;
974    long     sibValTag;      /* Value tag */
975 }SiSchedInfo;
976
977 typedef struct pdcchCfgCommon
978 {
979    uint8_t  present;
980    long     ctrlRsrcSetZero;  /* Control resource set zero */
981    long     searchSpcZero;    /* Search space zero */
982    long     searchSpcId;      /* Search space id */
983    long     ctrlRsrcSetId;    /* Control resource set id */
984    uint8_t  monitorSlotPrdAndOffPresent;
985    long     monitorSlotPrdAndOff;     /* Monitoring slot periodicity and offset */
986    uint8_t  monitorSymbolsInSlot[2];  /* Monitoring symbols within slot */
987    long     numCandAggLvl1;        /* Number of candiates at aggregation level 1 */
988    long     numCandAggLvl2;        /* Number of candiates at aggregation level 2 */
989    long     numCandAggLvl4;        /* Number of candiates at aggregation level 4 */
990    long     numCandAggLvl8;        /* Number of candiates at aggregation level 8 */
991    long     numCandAggLvl16;       /* Number of candiates at aggregation level 16 */
992    uint8_t  searchSpcType;        /*  Search Space type */
993    uint8_t  commSrchSpcDciFrmt;    /* DCI format of common search space type */
994    long     searchSpcSib1;         /* Id of serch space for SIB1 */
995    long     pagingSearchSpc;       /* Id of search space for paging */
996    long     raSearchSpc;           /* Id of search space for Random Access proc */
997 }PdcchCfgCommon;
998
999 typedef struct pdschTimeDomainRsrcAlloc
1000 {
1001    long     k0;
1002    long     mapType;              /* Mapping Type */
1003    uint16_t sliv;  
1004 }PdschTimeDomainRsrcAlloc;
1005
1006 typedef struct pdschCfgCommon
1007 {
1008    uint8_t  present;
1009    uint8_t  numTimeDomRsrcAlloc;
1010    PdschTimeDomainRsrcAlloc timeDomAlloc[MAX_NUM_DL_ALLOC];
1011 }PdschCfgCommon;
1012
1013 typedef struct bcchCfg
1014 {
1015    long   modPrdCoeff;          /* Modification period co-efficient */
1016 }BcchCfg;
1017
1018 typedef struct pcchCfg
1019 {
1020    uint16_t  dfltPagingCycle;                       /* Default paging cycle */
1021    uint8_t  nAndPagingFrmOffsetType;                /*Number of PagingFrames in PagingCycle defined in terms of T.*/
1022    uint8_t  pageFrameOffset;                        /* Paging Frame offset */
1023    uint8_t  ns;                                     /* Number of paging occassions in paging frame */
1024    uint8_t  firstPDCCHMontioringType;               /* First PDCCH Monitoring Paging Occasion Presence Type*/
1025    uint16_t firstPDCCHMontioringInfo[MAX_PO_PER_PF];/*Indicates the first PDCCH monitoring occasion of each PO of the PF*/
1026 }PcchCfg;
1027
1028 typedef struct scsSpecCarrier
1029 {
1030    long   scsOffset;    /* Offset to point A considering subcarrier spacing */
1031    long   scs;          /* subcarrier spacing */
1032    long   scsBw;        /* Carrier bandwidth considering subcarrier spacing */
1033
1034 }ScsSpecCarrier;
1035
1036 typedef struct dlCfgCommon
1037 {
1038    long   freqBandInd;  /* Downlink frequency band indicator */
1039    long   offsetToPointA;       /* DL ofset to point A */
1040    long   locAndBw;     /* Frequency location and bandwidth */
1041    ScsSpecCarrier   dlScsCarrier;  /* SCS Specific carrier */
1042    PdcchCfgCommon   pdcchCfg;
1043    PdschCfgCommon   pdschCfg;
1044    BcchCfg          bcchCfg;
1045    PcchCfg          pcchCfg;
1046 }DlCfgCommon;
1047
1048 typedef struct rachCfgCommon
1049 {
1050    uint8_t present;
1051    long   prachCfgIdx;       /* PRACH configuration index */
1052    long   msg1Fdm;           /* Num of PRACH transmission occassions */
1053    long   msg1FreqStart;     /* Offset of lowest msg1 transmission occassion */
1054    long   zeroCorrZoneCfg;   /* Zero correlation zone configuration */
1055    long   preambleRcvdTgtPwr; /* Traget power level */
1056    long   preambleTransMax;  /* Max num of preamble transmission */
1057    long   pwrRampingStep;    /* Power ramping steps for PRACH */
1058    long   raRspWindow;       /* RA response window */
1059    long   numRaPreamble;     /* Total num of preamble used in random access */
1060    long   numSsbPerRachOcc;  /* Numer of SSBs per RACH Occassion */
1061    long   numCbPreamblePerSsb; /* Number of Contention-Based preamble per SSB */
1062    long   contResTimer;      /* Contention resolution timer */
1063    long   rsrpThreshSsb;
1064    uint8_t rootSeqIdxPresent;
1065    long   rootSeqIdx;        /* PRACH root sequence index */
1066    long   msg1Scs;           /* Msg1 subcarrier spacing */
1067    long   restrictedSetCfg;  /* Restricted set configuration */
1068 }RachCfgCommon;
1069
1070 typedef struct puschCfgCmnTimeDomAlloc
1071 {
1072    long     k2;
1073    long     mapType;
1074    uint16_t sliv;
1075 }PuschCfgCmnTimeDomAlloc;
1076
1077 typedef struct  puschCfgCommon
1078 {
1079    uint8_t  puschCfgPresent;
1080    uint8_t  numTimeDomRsrcAlloc;
1081    PuschCfgCmnTimeDomAlloc timeDomAllocList[MAX_UL_ALLOC];
1082    long     msg3DeltaPreamble;
1083    long     p0NominalWithGrant;
1084 }PuschCfgCommon;
1085
1086 typedef struct pucchCfgCommon
1087 {
1088    uint8_t present;
1089    long   rsrcComm;
1090    long   grpHop;
1091    long   p0Nominal;
1092 }PucchCfgCommon;
1093
1094 typedef struct ulCfgCommon
1095 {
1096    long   freqBandInd;  /* Uplink frequency band indicator */
1097    long   pMax;         /* Max UL transmission power that UE applies */
1098    long   locAndBw;     /* Frequency location and bandwidth */
1099    ScsSpecCarrier   ulScsCarrier; /* SCS Specific carrier */
1100    RachCfgCommon    rachCfg;
1101    PuschCfgCommon   puschCfg;
1102    PucchCfgCommon   pucchCfg;
1103    long   timeAlignTimerComm;
1104 }UlCfgCommon;
1105
1106 typedef struct tddUlDlCfgCommon
1107 {
1108    long   refScs;     /* Reference subcarrier spacing */
1109    long   txPrd;      /* Transmission periodicity */
1110    long   numDlSlots;
1111    long   numDlSymbols;
1112    long   numUlSlots;
1113    long   numUlSymbols;
1114 }TddUlDlCfgCommon;
1115
1116 typedef struct srvCellCfgCommSib
1117
1118    long               scs;
1119    DlCfgCommon        dlCfg;
1120    UlCfgCommon        ulCfg;
1121    uint8_t            ssbPosInBurst;
1122    long               ssbPrdServingCell;
1123    TddUlDlCfgCommon   tddCfg;
1124    long               ssPbchBlockPwr;
1125 }SrvCellCfgCommSib;
1126
1127 typedef struct sib1Params
1128 {
1129    Plmn    plmn;
1130    uint8_t   tac;
1131    long      ranac;
1132    uint8_t   cellIdentity;
1133    long      cellResvdForOpUse;
1134    long      connEstFailCnt;
1135    long      connEstFailOffValidity;
1136    long      connEstFailOffset;
1137    SiSchedInfo           siSchedInfo;
1138    SrvCellCfgCommSib     srvCellCfgCommSib;
1139 }Sib1Params;
1140
1141 typedef struct threadInfo
1142 {
1143    SSTskId duAppSTskId;
1144    uint8_t duAppCoreId;
1145    SSTskId egtpSTskId;
1146    uint8_t egtpCoreId;
1147    SSTskId sctpSTskId;
1148    uint8_t sctpCoreId;
1149    SSTskId rlcUlSTskId;
1150    uint8_t rlcUlCoreId;
1151    SSTskId rlcMacSTskId;
1152    uint8_t rlcMacCoreId;
1153    SSTskId schSTskId;
1154    uint8_t schCoreId;
1155    SSTskId lwrMacSTskId;
1156    uint8_t lwrMacCoreId;
1157 }ThreadInfo;
1158
1159 typedef struct duCfgParams
1160 {  
1161    uint32_t           duId;
1162    char               *duName;
1163    uint16_t           maxNumDrb;
1164    ThreadInfo         threadInfo;
1165    SctpParams         sctpParams;                  /* SCTP Params */
1166    F1EgtpParams       egtpParams;                  /* EGTP Params */
1167    F1DuSrvdCellInfo   srvdCellLst[MAX_NUM_CELL];  /* Serving cell list *///TODO: this must be removed eventually
1168    MacCellCfg          macCellCfg;                    /* MAC cell configuration */
1169    MibParams          mibParams;                  /* MIB Params */
1170    Sib1Params         sib1Params;                 /* SIB1 Params */
1171    MacSliceCfgReq     tempSliceCfg;
1172 }DuCfgParams;
1173
1174 #ifndef O1_ENABLE
1175 //RRM POLICY STRUCT
1176
1177 typedef struct rRMPolicyMemberList
1178 {
1179    uint8_t mcc[3];
1180    uint8_t mnc[3];
1181    uint8_t sd[3];
1182    uint8_t sst;
1183 }RRMPolicyMemberList;
1184
1185 typedef enum
1186 {
1187   PRB,
1188   PRB_UL,
1189   PRB_DL,
1190   RRC,
1191   DRB
1192 }RrmResourceType;
1193
1194 typedef struct rrmPolicyList
1195 {
1196    char id[1];
1197    RrmResourceType resourceType;
1198    uint8_t rRMMemberNum;
1199    RRMPolicyMemberList rRMPolicyMemberList[2];
1200    uint8_t rRMPolicyMaxRatio;
1201    uint8_t rRMPolicyMinRatio;
1202    uint8_t rRMPolicyDedicatedRatio;
1203 }RrmPolicyList;
1204 #endif
1205
1206 extern DuCfgParams duCfgParam;
1207
1208 /*function declarations */
1209 uint8_t readClCfg();
1210 uint8_t readCfg();
1211 uint8_t duReadCfg(); 
1212 void printDuConfig();
1213
1214 uint8_t fillDuSrvdCellSysInfo(F1DuSysInfo *sysInfo);
1215
1216 uint16_t calcSliv(uint8_t startSymbol, uint8_t lengthSymbol);
1217 uint8_t cpyRrmPolicyInDuCfgParams(RrmPolicyList rrmPolicy[], uint8_t policyNum, MacSliceCfgReq *tempSliceCfg);
1218
1219 #endif /* __DU_CONFIG_H__ */
1220
1221 /**********************************************************************
1222   End of file
1223  **********************************************************************/