ran_context.h 4.1 KB
Newer Older
knopp's avatar
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
knopp's avatar
knopp committed
7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37
 * 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
 */

/*! \file PHY/impl_defs_lte.h
* \brief LTE Physical channel configuration and variable structure definitions
* \author R. Knopp, F. Kaltenberger
* \date 2011
* \version 0.1
* \company Eurecom
* \email: knopp@eurecom.fr,florian.kaltenberger@eurecom.fr
* \note
* \warning
*/

#ifndef __RAN_CONTEXT_H__
#define __RAN_CONTEXT_H__

#include <pthread.h>
#include "COMMON/platform_constants.h"
38
#include "PHY/defs_eNB.h"
knopp's avatar
knopp committed
39 40
#include "PHY/types.h"
#include "PHY/impl_defs_top.h"
41
#include "RRC/LTE/rrc_defs.h"
42
#include "flexran_agent_defs.h"
knopp's avatar
knopp committed
43 44 45 46 47 48 49

#include "gtpv1u.h"
#include "NwGtpv1u.h"
#include "NwGtpv1uMsg.h"
#include "NwGtpv1uPrivate.h"
#include "gtpv1u_eNB_defs.h"

oai's avatar
oai committed
50
#include "PHY/defs_L1_NB_IoT.h"
51
#include "RRC/LTE/defs_NB_IoT.h"
52
#include "RRC/NR/nr_rrc_defs.h"
ChenWeiTai's avatar
ChenWeiTai committed
53

54

knopp's avatar
knopp committed
55 56 57
typedef struct {
  /// RAN context config file name
  char *config_file_name;
58
  /// Number of RRC instances in this node
knopp's avatar
knopp committed
59
  int nb_inst;
ChenWeiTai's avatar
ChenWeiTai committed
60 61 62 63
  /// 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;
knopp's avatar
knopp committed
64 65
  /// Number of Component Carriers per instance in this node
  int *nb_CC;
ChenWeiTai's avatar
ChenWeiTai committed
66 67
  /// Number of NR Component Carriers per instance in this node
  int *nb_nr_CC;
68 69
  /// Number of MACRLC instances in this node
  int nb_macrlc_inst;
70 71
  /// Number of NB_IoT MACRLC instances in this node
  int nb_nb_iot_macrlc_inst;
72 73
  /// Number of NR MACRLC instances in this node
  int nb_nr_macrlc_inst;
74 75
  /// Number of component carriers per instance in this node
  int *nb_mac_CC;
ChenWeiTai's avatar
ChenWeiTai committed
76 77
  /// Number of component carriers per instance in this node
  int *nb_nr_mac_CC;
78 79
  /// Number of L1 instances in this node
  int nb_L1_inst;
80 81
  /// Number of NB_IoT L1 instances in this node
  int nb_nb_iot_L1_inst;
82 83
  /// Number of NR L1 instances in this node
  int nb_nr_L1_inst;  
84 85
  /// Number of Component Carriers per instance in this node
  int *nb_L1_CC;
86 87
  /// Number of NR Component Carriers per instance in this node
  int *nb_nr_L1_CC;
88
  /// Number of RU instances in this node
knopp's avatar
knopp committed
89
  int nb_RU;
90 91
  /// FlexRAN context variables
  flexran_agent_info_t **flexran;
knopp's avatar
knopp committed
92 93
  /// eNB context variables
  struct PHY_VARS_eNB_s ***eNB;
94 95
  /// gNB context variables
  struct PHY_VARS_gNB_s ***gNB;
96
  /// NB_IoT L1 context variables
oai's avatar
oai committed
97
  struct PHY_VARS_eNB_NB_IoT_s **L1_NB_IoT;
knopp's avatar
knopp committed
98 99
  /// RRC context variables
  struct eNB_RRC_INST_s **rrc;
100 101
  /// NB_IoT RRC context variables
  //struct eNB_RRC_INST_NB_IoT_s **nb_iot_rrc;
ChenWeiTai's avatar
ChenWeiTai committed
102
  /// NR RRC context variables
103
  struct gNB_RRC_INST_s **nrrrc;
104
  /// MAC context variables
knopp's avatar
knopp committed
105
  struct eNB_MAC_INST_s **mac;
106
  /// NB_IoT MAC context variables
oai's avatar
oai committed
107
  struct eNB_MAC_INST_NB_IoT_s **nb_iot_mac;
108 109
  /// NR MAC context variables
  struct gNB_MAC_INST_s **nrmac;
knopp's avatar
knopp committed
110 111 112 113 114 115 116 117 118 119 120 121 122 123
  /// 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;


#endif