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>
33 /** Run time configuration of application */
34 typedef struct _RuntimeConfig
36 uint8_t appMode; /**< Application mode: lls-CU or RU */
37 uint8_t xranMode; /**< xran mode: Categoty A | Category B */
38 uint8_t numCC; /**< Number of CC per ports supported by RU */
39 uint8_t mu_number; /**< Mu numner as per 3GPP */
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 lls_cu_addr; /**< lls-CU Ethernet Mac Address */
44 struct ether_addr ru_addr; /**< RU Ethernet Mac Address */
45 char ant_file[16][512] /**< file to use for test vector */ ;
48 uint8_t enablePrach; /**< enable PRACH */
49 uint8_t prachOffset; /**< Sets the PRACH position in frequency / subcarrier position, n_PRBoffset^RA and is expressed as a physical resource block number.
50 Set by SIB2, prach-FreqOffset in E-UTRA. */
52 uint8_t prachConfigIndex; /**< TS36.211 - Table 5.7.1-2 : PRACH Configuration Index */
53 uint8_t iqswap; /**< do swap of IQ before send to ETH */
54 uint8_t nebyteorderswap; /**< do swap of byte order from host byte order to network byte order. ETH */
57 uint16_t T2a_min_cp_dl;
58 uint16_t T2a_max_cp_dl;
59 uint16_t T2a_min_cp_ul;
60 uint16_t T2a_max_cp_ul;
65 uint16_t T1a_min_cp_dl;
66 uint16_t T1a_max_cp_dl;
67 uint16_t T1a_min_cp_ul;
68 uint16_t T1a_max_cp_ul;
74 uint8_t enableCP; /**< enable C-plane */
75 uint8_t cp_vlan_tag; /**< C-plane vlan tag */
76 uint8_t up_vlan_tag; /**< U-plane vlan tag */
84 * Parse application configuration file.
86 * @param filename The name of the configuration file to be parsed.
87 * @param config The configuration structure to be filled with parsed data. */
88 int parseConfigFile(char *filename, RuntimeConfig *config);
90 #endif /* _SAMPLEAPP__CONFIG_H_ */