1 /******************************************************************************
3 * Copyright (c) 2019 Intel.
5 * Licensed under the Apache License, Version 2.0 (the "License");
6 * you may not use this file except in compliance with the License.
7 * You may obtain a copy of the License at
9 * http://www.apache.org/licenses/LICENSE-2.0
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
17 *******************************************************************************/
24 * @author Intel Corporation
27 #ifndef _SAMPLEAPP__CONFIG_H_
28 #define _SAMPLEAPP__CONFIG_H_
31 #include <rte_ether.h>
32 #include "xran_fh_o_du.h"
34 /** Run time configuration of application */
35 typedef struct _RuntimeConfig
37 uint8_t appMode; /**< Application mode: lls-CU or RU */
38 uint8_t xranMode; /**< xran mode: Categoty A | Category B */
39 uint8_t numCC; /**< Number of CC per ports supported by RU */
40 uint8_t numAxc; /**< Number of Antenna Carriers per CC */
41 uint32_t ttiPeriod; /**< TTI period */
42 uint32_t testVect; /**< Test Signal to send */
43 struct ether_addr o_du_addr; /**< lls-CU Ethernet Mac Address */
44 struct ether_addr o_ru_addr; /**< RU Ethernet Mac Address */
45 struct ether_addr tmp_addr; /**< Temp Ethernet Mac Address */
47 uint32_t mtu; /**< maximum transmission unit (MTU) is the size of the largest protocol data unit (PDU) that can be communicated in a single
48 xRAN network layer transaction. supported 1500 bytes and 9600 bytes (Jumbo Frame) */
49 int numSlots; /**< number of slots in IQ vector */
50 char ant_file[XRAN_MAX_SECTOR_NR*XRAN_MAX_ANTENNA_NR][512] /**< file to use for test vector */ ;
51 char prach_file[XRAN_MAX_SECTOR_NR*XRAN_MAX_ANTENNA_NR][512] /**< file to use for test vector */ ;
54 uint8_t enablePrach; /**< enable PRACH */
55 uint8_t prachOffset; /**< Sets the PRACH position in frequency / subcarrier position, n_PRBoffset^RA and is expressed as a physical resource block number.
56 Set by SIB2, prach-FreqOffset in E-UTRA. */
58 uint8_t prachConfigIndex; /**< TS36.211 - Table 5.7.1-2 : PRACH Configuration Index */
59 uint8_t iqswap; /**< do swap of IQ before send to ETH */
60 uint8_t nebyteorderswap; /**< do swap of byte order from host byte order to network byte order. ETH */
63 uint16_t T2a_min_cp_dl;
64 uint16_t T2a_max_cp_dl;
65 uint16_t T2a_min_cp_ul;
66 uint16_t T2a_max_cp_ul;
71 uint16_t T1a_min_cp_dl;
72 uint16_t T1a_max_cp_dl;
73 uint16_t T1a_min_cp_ul;
74 uint16_t T1a_max_cp_ul;
80 uint8_t enableCP; /**< enable C-plane */
81 uint8_t cp_vlan_tag; /**< C-plane vlan tag */
82 uint8_t up_vlan_tag; /**< U-plane vlan tag */
85 int32_t debugStopCount;
87 int32_t DynamicSectionEna;
89 uint8_t mu_number; /**< Mu numner as per 3GPP */
90 uint32_t nDLAbsFrePointA; /**< Abs Freq Point A of the Carrier Center Frequency for in KHz Value: 450000->52600000 */
91 uint32_t nULAbsFrePointA; /**< Abs Freq Point A of the Carrier Center Frequency for in KHz Value: 450000->52600000 */
92 uint32_t nDLBandwidth; /**< Carrier bandwidth for in MHz. Value: 5->400 */
93 uint32_t nULBandwidth; /**< Carrier bandwidth for in MHz. Value: 5->400 */
94 uint32_t nDLFftSize; /**< DL FFT size */
95 uint32_t nULFftSize; /**< UL FFT size */
98 uint8_t nFrameDuplexType;
100 struct xran_slot_config sSlotConfig[XRAN_MAX_TDD_PERIODICITY];
104 * Parse application configuration file.
106 * @param filename The name of the configuration file to be parsed.
107 * @param config The configuration structure to be filled with parsed data. */
108 int parseConfigFile(char *filename, RuntimeConfig *config);
110 #endif /* _SAMPLEAPP__CONFIG_H_ */