ran_context.h 4 KB
Newer Older
Raymond Knopp's avatar
Raymond Knopp committed
1 2 3 4 5
/*
 * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
 * contributor license agreements.  See the NOTICE file distributed with
 * this work for additional information regarding copyright ownership.
 * The OpenAirInterface Software Alliance licenses this file to You under
6
 * the OAI Public License, Version 1.1  (the "License"); you may not use this file
Raymond Knopp's avatar
Raymond Knopp committed
7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
 * except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.openairinterface.org/?page_id=698
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 *-------------------------------------------------------------------------------
 * For more information about the OpenAirInterface (OAI) Software Alliance:
 *      contact@openairinterface.org
 */

22
/*! \file common/ran_context.h
Raymond Knopp's avatar
Raymond Knopp committed
23 24 25 26 27
* \brief LTE Physical channel configuration and variable structure definitions
* \author R. Knopp, F. Kaltenberger
* \date 2011
* \version 0.1
* \company Eurecom
28
* \email: knopp@eurecom.fr, florian.kaltenberger@eurecom.fr
Raymond Knopp's avatar
Raymond Knopp committed
29 30 31 32 33 34 35 36 37
* \note
* \warning
*/

#ifndef __RAN_CONTEXT_H__
#define __RAN_CONTEXT_H__

#include <pthread.h>
#include "COMMON/platform_constants.h"
38
#include "PHY/defs_eNB.h"
Raymond Knopp's avatar
Raymond Knopp committed
39 40
#include "PHY/types.h"
#include "PHY/impl_defs_top.h"
41

42
//#include "ENB_APP/enb_config.h"
43
#include "flexran_agent_defs.h"
Raymond Knopp's avatar
Raymond Knopp committed
44

oai's avatar
oai committed
45
#include "PHY/defs_L1_NB_IoT.h"
46
#include "RRC/LTE/defs_NB_IoT.h"
47
#include "RRC/LTE/rrc_defs.h"
48
#include "RRC/NR/nr_rrc_defs.h"
Laurent THOMAS's avatar
Laurent THOMAS committed
49
#include <openair3/ocp-gtpu/gtpv1u_eNB_task.h>
WEI-TAI CHEN's avatar
WEI-TAI CHEN committed
50

Guy De Souza's avatar
Guy De Souza committed
51

Raymond Knopp's avatar
Raymond Knopp committed
52 53 54
typedef struct {
  /// RAN context config file name
  char *config_file_name;
55
  /// Number of RRC instances in this node
Raymond Knopp's avatar
Raymond Knopp committed
56
  int nb_inst;
WEI-TAI CHEN's avatar
WEI-TAI CHEN committed
57 58 59 60
  /// Number of NB_IoT RRC instances in this node
  int nb_nb_iot_rrc_inst;
  /// Number of NR RRC instances in this node
  int nb_nr_inst;
Raymond Knopp's avatar
Raymond Knopp committed
61 62
  /// Number of Component Carriers per instance in this node
  int *nb_CC;
WEI-TAI CHEN's avatar
WEI-TAI CHEN committed
63 64
  /// Number of NR Component Carriers per instance in this node
  int *nb_nr_CC;
65 66
  /// Number of MACRLC instances in this node
  int nb_macrlc_inst;
67 68
  /// Number of NB_IoT MACRLC instances in this node
  int nb_nb_iot_macrlc_inst;
69 70
  /// Number of NR MACRLC instances in this node
  int nb_nr_macrlc_inst;
71 72
  /// Number of component carriers per instance in this node
  int *nb_mac_CC;
WEI-TAI CHEN's avatar
WEI-TAI CHEN committed
73 74
  /// Number of component carriers per instance in this node
  int *nb_nr_mac_CC;
75 76
  /// Number of L1 instances in this node
  int nb_L1_inst;
77 78
  /// Number of NB_IoT L1 instances in this node
  int nb_nb_iot_L1_inst;
79 80
  /// Number of NR L1 instances in this node
  int nb_nr_L1_inst;  
81 82 83
  /// Number of Component Carriers per instance in this node
  int *nb_L1_CC;
  /// Number of RU instances in this node
Raymond Knopp's avatar
Raymond Knopp committed
84
  int nb_RU;
85 86
  /// FlexRAN context variables
  flexran_agent_info_t **flexran;
Raymond Knopp's avatar
Raymond Knopp committed
87 88
  /// eNB context variables
  struct PHY_VARS_eNB_s ***eNB;
89
  /// gNB context variables
90
  struct PHY_VARS_gNB_s **gNB;
91
  /// NB_IoT L1 context variables
oai's avatar
oai committed
92
  struct PHY_VARS_eNB_NB_IoT_s **L1_NB_IoT;
Raymond Knopp's avatar
Raymond Knopp committed
93 94
  /// RRC context variables
  struct eNB_RRC_INST_s **rrc;
95 96
  /// NB_IoT RRC context variables
  //struct eNB_RRC_INST_NB_IoT_s **nb_iot_rrc;
WEI-TAI CHEN's avatar
WEI-TAI CHEN committed
97
  /// NR RRC context variables
98
  struct gNB_RRC_INST_s **nrrrc;
99
  /// MAC context variables
Raymond Knopp's avatar
Raymond Knopp committed
100
  struct eNB_MAC_INST_s **mac;
101
  /// NB_IoT MAC context variables
oai's avatar
oai committed
102
  struct eNB_MAC_INST_NB_IoT_s **nb_iot_mac;
103 104
  /// NR MAC context variables
  struct gNB_MAC_INST_s **nrmac;
Raymond Knopp's avatar
Raymond Knopp committed
105 106 107 108 109 110 111 112 113 114 115 116
  /// GTPu descriptor 
  gtpv1u_data_t *gtpv1u_data_g;
  /// RU descriptors. These describe what each radio unit is supposed to do and contain the necessary functions for fronthaul interfaces
  struct RU_t_s **ru;
  /// Mask to indicate fronthaul setup status of RU (hard-limit to 64 RUs)
  uint64_t ru_mask;
  /// Mutex for protecting ru_mask
  pthread_mutex_t ru_mutex;
  /// condition variable for signaling setup completion of an RU
  pthread_cond_t ru_cond;
} RAN_CONTEXT_t;

117
extern RAN_CONTEXT_t RC;
Raymond Knopp's avatar
Raymond Knopp committed
118
#endif