defs.h 19.1 KB
Newer Older
1
/*******************************************************************************
2 3
    OpenAirInterface
    Copyright(c) 1999 - 2014 Eurecom
4

5 6 7 8
    OpenAirInterface is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.
9 10


11 12 13 14
    OpenAirInterface is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.
15

16 17 18 19
    You should have received a copy of the GNU General Public License
    along with OpenAirInterface.The full GNU General Public License is
    included in this distribution in the file called "COPYING". If not,
    see <http://www.gnu.org/licenses/>.
20 21

  Contact Information
22 23
  OpenAirInterface Admin: openair_admin@eurecom.fr
  OpenAirInterface Tech : openair_tech@eurecom.fr
24
  OpenAirInterface Dev  : openair4g-devel@lists.eurecom.fr
25

ghaddab's avatar
ghaddab committed
26
  Address      : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE
27 28 29 30

*******************************************************************************/


31
/*! \file RRC/LITE/defs.h
32 33 34
* \brief RRC struct definitions and function prototypes
* \author Navid Nikaein and Raymond Knopp
* \date 2010 - 2014
35 36
* \version 1.0
* \company Eurecom
37
* \email: navid.nikaein@eurecom.fr, raymond.knopp@eurecom.fr
38 39 40 41 42 43 44 45 46 47 48
*/

#ifndef __OPENAIR_RRC_DEFS_H__
#define __OPENAIR_RRC_DEFS_H__

#ifdef USER_MODE
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#endif

49
#include "collection/tree.h"
winckel's avatar
winckel committed
50
#include "rrc_types.h"
51 52
#include "PHY/defs.h"
#include "COMMON/platform_constants.h"
53
#include "COMMON/platform_types.h"
54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69

#include "COMMON/mac_rrc_primitives.h"
#include "LAYER2/MAC/defs.h"

//#include "COMMON/openair_defs.h"
#ifndef USER_MODE
#include <rtai.h>
#endif

#include "SystemInformationBlockType1.h"
#include "SystemInformation.h"
#include "RRCConnectionReconfiguration.h"
#include "RRCConnectionReconfigurationComplete.h"
#include "RRCConnectionSetup.h"
#include "RRCConnectionSetupComplete.h"
#include "RRCConnectionRequest.h"
70
#include "RRCConnectionReestablishmentRequest.h"
71 72 73 74 75
#include "BCCH-DL-SCH-Message.h"
#include "BCCH-BCH-Message.h"
#ifdef Rel10
#include "MCCH-Message.h"
#include "MBSFNAreaConfiguration-r9.h"
76
#include "SCellToAddMod-r10.h"
77
#endif
78 79
#include "AS-Config.h"
#include "AS-Context.h"
80 81 82
#include "UE-EUTRA-Capability.h"
#include "MeasResults.h"

83 84 85 86 87 88 89 90 91 92 93 94 95 96
// This corrects something generated by asn1c which is different between Rel8 and Rel10
#ifndef Rel10
#define SystemInformation_r8_IEs__sib_TypeAndInfo__Member SystemInformation_r8_IEs_sib_TypeAndInfo_Member
#define SystemInformation_r8_IEs__sib_TypeAndInfo__Member_PR_sib2 SystemInformation_r8_IEs_sib_TypeAndInfo_Member_PR_sib2
#define SystemInformation_r8_IEs__sib_TypeAndInfo__Member_PR_sib3 SystemInformation_r8_IEs_sib_TypeAndInfo_Member_PR_sib3
#define SystemInformation_r8_IEs__sib_TypeAndInfo__Member_PR_sib4 SystemInformation_r8_IEs_sib_TypeAndInfo_Member_PR_sib4
#define SystemInformation_r8_IEs__sib_TypeAndInfo__Member_PR_sib5 SystemInformation_r8_IEs_sib_TypeAndInfo_Member_PR_sib5
#define SystemInformation_r8_IEs__sib_TypeAndInfo__Member_PR_sib6 SystemInformation_r8_IEs_sib_TypeAndInfo_Member_PR_sib6
#define SystemInformation_r8_IEs__sib_TypeAndInfo__Member_PR_sib7 SystemInformation_r8_IEs_sib_TypeAndInfo_Member_PR_sib7
#define SystemInformation_r8_IEs__sib_TypeAndInfo__Member_PR_sib8 SystemInformation_r8_IEs_sib_TypeAndInfo_Member_PR_sib8
#define SystemInformation_r8_IEs__sib_TypeAndInfo__Member_PR_sib9 SystemInformation_r8_IEs_sib_TypeAndInfo_Member_PR_sib9
#define SystemInformation_r8_IEs__sib_TypeAndInfo__Member_PR_sib10 SystemInformation_r8_IEs_sib_TypeAndInfo_Member_PR_sib10
#define SystemInformation_r8_IEs__sib_TypeAndInfo__Member_PR_sib11 SystemInformation_r8_IEs_sib_TypeAndInfo_Member_PR_sib11
#endif
97 98 99 100
/*
#ifdef Rel10
#define SystemInformation_r8_IEs__sib_TypeAndInfo__Member_PR_sib12_v920 SystemInformation_r8_IEs_sib_TypeAndInfo_Member_PR_sib12_v920
#define SystemInformation_r8_IEs__sib_TypeAndInfo__Member_PR_sib13_v920 SystemInformation_r8_IEs_sib_TypeAndInfo_Member_PR_sib13_v920
101
#endif
102
*/
103 104 105 106 107 108 109
//#include "L3_rrc_defs.h"
#ifndef NO_RRM
#include "L3_rrc_interface.h"
#include "rrc_rrm_msg.h"
#include "rrc_rrm_interface.h"
#endif

110 111 112 113
#if defined(ENABLE_ITTI)
# include "intertask_interface.h"
#endif

114 115 116 117
#if defined(ENABLE_USE_MME)
# include "commonDef.h"
#endif

118
#if ENABLE_RAL
Lionel Gauthier's avatar
Lionel Gauthier committed
119 120 121
# include "collection/hashtable/obj_hashtable.h"
#endif

122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137
//--------
typedef unsigned int uid_t;
#define UID_LINEAR_ALLOCATOR_BITMAP_SIZE (((NUMBER_OF_UE_MAX/8)/sizeof(unsigned int)) + 1)
typedef struct uid_linear_allocator_s {
  unsigned int   bitmap[UID_LINEAR_ALLOCATOR_BITMAP_SIZE];
} uid_allocator_t;

//--------



#define PROTOCOL_RRC_CTXT_UE_FMT           PROTOCOL_CTXT_FMT
#define PROTOCOL_RRC_CTXT_UE_ARGS(CTXT_Pp) PROTOCOL_CTXT_ARGS(CTXT_Pp)

#define PROTOCOL_RRC_CTXT_FMT           PROTOCOL_CTXT_FMT
#define PROTOCOL_RRC_CTXT_ARGS(CTXT_Pp) PROTOCOL_CTXT_ARGS(CTXT_Pp)
138 139
/** @defgroup _rrc RRC 
 * @ingroup _oai2
140 141 142
 * @{
 */

143
#if ENABLE_RAL
Lionel Gauthier's avatar
Lionel Gauthier committed
144
typedef struct rrc_ral_threshold_key_s {
145 146 147
  ral_link_param_type_t   link_param_type;
  ral_threshold_t         threshold;
} rrc_ral_threshold_key_t;
Lionel Gauthier's avatar
Lionel Gauthier committed
148 149
#endif

150 151
//#define NUM_PRECONFIGURED_LCHAN (NB_CH_CX*2)  //BCCH, CCCH

152 153
#define UE_MODULE_INVALID ((module_id_t) ~0) // FIXME attention! depends on type uint8_t!!!
#define UE_INDEX_INVALID  ((module_id_t) ~0) // FIXME attention! depends on type uint8_t!!! used to be -1
winckel's avatar
winckel committed
154

winckel's avatar
winckel committed
155
typedef enum UE_STATE_e {
winckel's avatar
winckel committed
156 157
  RRC_INACTIVE=0,
  RRC_IDLE,
158 159
  RRC_SI_RECEIVED,
  RRC_CONNECTED,
160 161
  RRC_RECONFIGURED,
  RRC_HO_EXECUTION
162 163
} UE_STATE_t;

winckel's avatar
winckel committed
164
typedef enum HO_STATE_e {
165 166 167 168 169 170 171
  HO_IDLE=0,
  HO_MEASURMENT,
  HO_PREPARE,
  HO_CMD, // initiated by the src eNB
  HO_COMPLETE // initiated by the target eNB
} HO_STATE_t;

172 173
//#define NUMBER_OF_UE_MAX MAX_MOBILES_PER_RG
#define RRM_FREE(p)       if ( (p) != NULL) { free(p) ; p=NULL ; }
174 175 176
#define RRM_MALLOC(t,n)   (t *) malloc16( sizeof(t) * n )
#define RRM_CALLOC(t,n)   (t *) malloc16( sizeof(t) * n)
#define RRM_CALLOC2(t,s)  (t *) malloc16( s )
177

178 179 180
#define MAX_MEAS_OBJ 6
#define MAX_MEAS_CONFIG 6
#define MAX_MEAS_ID 6
181 182

#define PAYLOAD_SIZE_MAX 1024
183
#define RRC_BUF_SIZE 255
184 185 186 187 188 189
#define UNDEF_SECURITY_MODE 0xff
#define NO_SECURITY_MODE 0x33

#define CBA_OFFSET        0xfff4
// #define NUM_MAX_CBA_GROUP 4 // in the platform_constants

190 191 192
/* TS 36.331: RRC-TransactionIdentifier ::= INTEGER (0..3) */
#define RRC_TRANSACTION_IDENTIFIER_NUMBER  3

winckel's avatar
winckel committed
193
typedef struct UE_RRC_INFO_s {
194
  UE_STATE_t State;
195
  uint8_t SIB1systemInfoValueTag;
196 197
  uint32_t SIStatus;
  uint32_t SIcnt;
198
#ifdef Rel10
199
  uint8_t MCCHStatus[8]; // MAX_MBSFN_AREA
200
#endif
201
  uint8_t SIwindowsize; //!< Corresponds to the SIB1 si-WindowLength parameter. The unit is ms. Possible values are (final): 1,2,5,10,15,20,40
202
  uint8_t handoverTarget;
203
  HO_STATE_t ho_state;
204
  uint16_t SIperiod; //!< Corresponds to the SIB1 si-Periodicity parameter (multiplied by 10). Possible values are (final): 80,160,320,640,1280,2560,5120
205
  unsigned short UE_index;
206 207 208 209 210 211 212 213
  uint32_t T300_active;
  uint32_t T300_cnt;
  uint32_t T304_active;
  uint32_t T304_cnt;
  uint32_t T310_active;
  uint32_t T310_cnt;
  uint32_t N310_cnt;
  uint32_t N311_cnt;
214
  rnti_t   rnti;
winckel's avatar
winckel committed
215
} __attribute__ ((__packed__)) UE_RRC_INFO;
216

217
typedef struct UE_S_TMSI_s {
gauthier's avatar
gauthier committed
218 219 220
  boolean_t  presence;
  mme_code_t mme_code;
  m_tmsi_t   m_tmsi;
winckel's avatar
winckel committed
221
} __attribute__ ((__packed__)) UE_S_TMSI;
222

223
#if defined(ENABLE_ITTI)
winckel's avatar
winckel committed
224
typedef enum e_rab_satus_e {
225
  E_RAB_STATUS_NEW,
226 227
  E_RAB_STATUS_DONE, // from the eNB perspective
  E_RAB_STATUS_ESTABLISHED, // get the reconfigurationcomplete form UE
228
  E_RAB_STATUS_FAILED,
winckel's avatar
winckel committed
229 230
} e_rab_status_t;

231
typedef struct e_rab_param_s {
232 233
  e_rab_t param;
  uint8_t status;
234
  uint8_t xid; // transaction_id
winckel's avatar
winckel committed
235
} __attribute__ ((__packed__)) e_rab_param_t;
236 237
#endif

238 239


240
/* Intermediate structure for Handover management. Associated per-UE in eNB_RRC_INST */
winckel's avatar
winckel committed
241
typedef struct HANDOVER_INFO_s {
242 243 244 245 246 247
  uint8_t ho_prepare;
  uint8_t ho_complete;
  uint8_t modid_s; //module_idP of serving cell
  uint8_t modid_t; //module_idP of target cell
  uint8_t ueid_s; //UE index in serving cell
  uint8_t ueid_t; //UE index in target cell
248 249
  AS_Config_t as_config; /* these two parameters are taken from 36.331 section 10.2.2: HandoverPreparationInformation-r8-IEs */
  AS_Context_t as_context; /* They are mandatory for HO */
250 251
  uint8_t buf[RRC_BUF_SIZE];  /* ASN.1 encoded handoverCommandMessage */
  int size;   /* size of above message in bytes */
winckel's avatar
winckel committed
252
} HANDOVER_INFO;
253 254 255

#define RRC_HEADER_SIZE_MAX 64
#define RRC_BUFFER_SIZE_MAX 1024
256
typedef struct {
257
  char Payload[RRC_BUFFER_SIZE_MAX];
258
  char Header[RRC_HEADER_SIZE_MAX];
259
  char payload_size;
260
} RRC_BUFFER;
261 262
#define RRC_BUFFER_SIZE sizeof(RRC_BUFFER)

winckel's avatar
winckel committed
263
typedef struct RB_INFO_s {
264
  uint16_t Rb_id;  //=Lchan_id
265 266
  LCHAN_DESC Lchan_desc[2];
  MAC_MEAS_REQ_ENTRY *Meas_entry;
winckel's avatar
winckel committed
267
} RB_INFO;
268

winckel's avatar
winckel committed
269
typedef struct SRB_INFO_s {
270
  uint16_t Srb_id;  //=Lchan_id
271 272
  RRC_BUFFER Rx_buffer;
  RRC_BUFFER Tx_buffer;
273 274
  LCHAN_DESC Lchan_desc[2];
  unsigned int Trans_id;
275
  uint8_t Active;
winckel's avatar
winckel committed
276
} SRB_INFO;
277

winckel's avatar
winckel committed
278
typedef struct RB_INFO_TABLE_ENTRY_s {
279
  RB_INFO Rb_info;
280 281 282
  uint8_t Active;
  uint32_t Next_check_frame;
  uint8_t Status;
winckel's avatar
winckel committed
283
} RB_INFO_TABLE_ENTRY;
284

winckel's avatar
winckel committed
285
typedef struct SRB_INFO_TABLE_ENTRY_s {
286
  SRB_INFO Srb_info;
287 288
  uint8_t Active;
  uint8_t Status;
289
  uint32_t Next_check_frame; 
290
} SRB_INFO_TABLE_ENTRY;
291

winckel's avatar
winckel committed
292
typedef struct MEAS_REPORT_LIST_s {
293
  MeasId_t measId;
294
  //CellsTriggeredList  cellsTriggeredList;//OPTIONAL
295
  uint32_t numberOfReportsSent;
296
} MEAS_REPORT_LIST;
297

winckel's avatar
winckel committed
298
typedef struct HANDOVER_INFO_UE_s {
299
  PhysCellId_t targetCellId;
300
  uint8_t measFlag;
winckel's avatar
winckel committed
301
} HANDOVER_INFO_UE;
302

303
typedef struct eNB_RRC_UE_s {
304
  uint8_t                            primaryCC_id;
305 306 307 308
#ifdef Rel10
  SCellToAddMod_r10_t                sCell_config[2];
#endif
  SRB_ToAddModList_t*                SRB_configList;
309
  SRB_ToAddModList_t*                SRB_configList2[RRC_TRANSACTION_IDENTIFIER_NUMBER];
310
  DRB_ToAddModList_t*                DRB_configList;
311
  DRB_ToAddModList_t*                DRB_configList2[RRC_TRANSACTION_IDENTIFIER_NUMBER];
312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355
  uint8_t                            DRB_active[8];
  struct PhysicalConfigDedicated*    physicalConfigDedicated;
  struct SPS_Config*                 sps_Config;
  MeasObjectToAddMod_t*              MeasObj[MAX_MEAS_OBJ];
  struct ReportConfigToAddMod*       ReportConfig[MAX_MEAS_CONFIG];
  struct QuantityConfig*             QuantityConfig;
  struct MeasIdToAddMod*             MeasId[MAX_MEAS_ID];
  MAC_MainConfig_t*                  mac_MainConfig;
  MeasGapConfig_t*                   measGapConfig;
  SRB_INFO                           SI;
  SRB_INFO                           Srb0;
  SRB_INFO_TABLE_ENTRY               Srb1;
  SRB_INFO_TABLE_ENTRY               Srb2;
  MeasConfig_t*                      measConfig;
  HANDOVER_INFO*                     handover_info;

#if defined(ENABLE_SECURITY)
  /* KeNB as derived from KASME received from EPC */
  uint8_t kenb[32];
#endif
  /* Used integrity/ciphering algorithms */
  e_SecurityAlgorithmConfig__cipheringAlgorithm     ciphering_algorithm;
  e_SecurityAlgorithmConfig__integrityProtAlgorithm integrity_algorithm;

  uint8_t                            Status;
  rnti_t                             rnti;
  uint64_t                           random_ue_identity;

#if defined(ENABLE_ITTI)
  /* Information from UE RRC ConnectionRequest */
  UE_S_TMSI                          Initialue_identity_s_TMSI;
  EstablishmentCause_t               establishment_cause;

  /* Information from UE RRC ConnectionReestablishmentRequest */
  ReestablishmentCause_t             reestablishment_cause;

  /* UE id for initial connection to S1AP */
  uint16_t                           ue_initial_id;

  /* Information from S1AP initial_context_setup_req */
  uint32_t                           eNB_ue_s1ap_id :24;

  security_capabilities_t            security_capabilities;

356 357
  /* Total number of e_rab already setup in the list */
  uint8_t                           setup_e_rabs;
358 359 360
  /* Number of e_rab to be setup in the list */
  uint8_t                            nb_of_e_rabs;
  /* list of e_rab to be setup by RRC layers */
361
  e_rab_param_t                      e_rab[NB_RB_MAX];//[S1AP_MAX_E_RAB];
362 363 364 365 366 367

  // LG: For GTPV1 TUNNELS
  uint32_t                           enb_gtp_teid[S1AP_MAX_E_RAB];
  transport_layer_addr_t             enb_gtp_addrs[S1AP_MAX_E_RAB];
  rb_id_t                            enb_gtp_ebi[S1AP_MAX_E_RAB];
#endif
368
  uint32_t                           ul_failure_timer;
369
  uint32_t                           ue_release_timer;
370 371 372
} eNB_RRC_UE_t;

typedef uid_t ue_uid_t;
373

374 375 376 377 378 379 380 381 382
typedef struct rrc_eNB_ue_context_s {
  /* Tree related data */
  RB_ENTRY(rrc_eNB_ue_context_s) entries;

  /* Uniquely identifies the UE between MME and eNB within the eNB.
   * This id is encoded on 24bits.
   */
  rnti_t         ue_id_rnti;

383
  // another key for protocol layers but should not be used as a key for RB tree
384 385 386 387 388
  ue_uid_t       local_uid;

  /* UE id for initial connection to S1AP */
  struct eNB_RRC_UE_s   ue_context;
} rrc_eNB_ue_context_t;
389

390
typedef struct {
391 392 393 394 395 396 397 398 399 400 401 402 403 404 405
  uint8_t                           *SIB1;
  uint8_t                           sizeof_SIB1;
  uint8_t                           *SIB23;
  uint8_t                           sizeof_SIB23;
  uint16_t                          physCellId;
  BCCH_BCH_Message_t                mib;
  BCCH_DL_SCH_Message_t             siblock1;
  BCCH_DL_SCH_Message_t             systemInformation;
  //  SystemInformation_t               systemInformation;
  SystemInformationBlockType1_t     *sib1;
  SystemInformationBlockType2_t     *sib2;
  SystemInformationBlockType3_t     *sib3;
#ifdef Rel10
  SystemInformationBlockType13_r9_t *sib13;
  uint8_t                           MBMS_flag;
406 407 408
  uint8_t                           num_mbsfn_sync_area;
  uint8_t                           **MCCH_MESSAGE; //  MAX_MBSFN_AREA
  uint8_t                           sizeof_MCCH_MESSAGE[8];// MAX_MBSFN_AREA
409
  MCCH_Message_t            mcch;
410
  MBSFNAreaConfiguration_r9_t       *mcch_message;
411
  SRB_INFO                          MCCH_MESS[8];// MAX_MBSFN_AREA
412
#endif
413 414 415 416
#ifdef CBA
  uint8_t                        num_active_cba_groups;
  uint16_t                       cba_rnti[NUM_MAX_CBA_GROUP];
#endif
417 418
  SRB_INFO                          SI;
  SRB_INFO                          Srb0;
419
} rrc_eNB_carrier_data_t;
420 421

typedef struct eNB_RRC_INST_s {
422
  rrc_eNB_carrier_data_t          carrier[MAX_NUM_CCs];
423 424
  uid_allocator_t                    uid_allocator; // for rrc_ue_head
  RB_HEAD(rrc_ue_tree_s, rrc_eNB_ue_context_s)     rrc_ue_head; // ue_context tree key search by rnti
425
  uint8_t                           HO_flag;
426
  uint8_t                            Nb_ue;
427
#if ENABLE_RAL
Lionel Gauthier's avatar
Lionel Gauthier committed
428 429
  obj_hash_table_t                  *ral_meas_thresholds;
#endif
430 431 432
  hash_table_t                      *initial_id2_s1ap_ids; // key is    content is rrc_ue_s1ap_ids_t
  hash_table_t                      *s1ap_id2_s1ap_ids   ; // key is    content is rrc_ue_s1ap_ids_t

433 434 435 436 437 438
#ifdef LOCALIZATION
  /// localization type, 0: power based, 1: time based
  uint8_t loc_type;
  /// epoch timestamp in millisecond, RRC
  int32_t reference_timestamp_ms;
  /// aggregate physical states every n millisecond
439
  int32_t aggregation_period_ms;
440 441
  /// localization list for aggregated measurements from PHY
  struct list loc_list;
442
#endif
443

444
  //RRC configuration
445
#if defined(ENABLE_ITTI)
446
  RrcConfigurationReq configuration;
447
#endif
448 449 450
} eNB_RRC_INST;

#define MAX_UE_CAPABILITY_SIZE 255
winckel's avatar
winckel committed
451
typedef struct OAI_UECapability_s {
452 453 454 455 456
  uint8_t sdu[MAX_UE_CAPABILITY_SIZE];
  uint8_t sdu_size;
  UE_EUTRA_Capability_t *UE_EUTRA_Capability;
} OAI_UECapability_t;

winckel's avatar
winckel committed
457
typedef struct UE_RRC_INST_s {
winckel's avatar
winckel committed
458 459
  Rrc_State_t     RrcState;
  Rrc_Sub_State_t RrcSubState;
460
# if defined(ENABLE_USE_MME)
winckel's avatar
winckel committed
461 462 463
  plmn_t          plmnID;
  Byte_t          rat;
  as_nas_info_t   initialNasMsg;
464
# endif
Raymond Knopp's avatar
 
Raymond Knopp committed
465
  OAI_UECapability_t *UECap;
466 467 468 469 470 471
  uint8_t *UECapability;
  uint8_t UECapability_size;
  UE_RRC_INFO Info[NB_SIG_CNX_UE];
  SRB_INFO Srb0[NB_SIG_CNX_UE];
  SRB_INFO_TABLE_ENTRY Srb1[NB_CNX_UE];
  SRB_INFO_TABLE_ENTRY Srb2[NB_CNX_UE];
472
  HANDOVER_INFO_UE HandoverInfoUe;
473 474 475 476 477 478
  uint8_t *SIB1[NB_CNX_UE];
  uint8_t sizeof_SIB1[NB_CNX_UE];
  uint8_t *SI[NB_CNX_UE];
  uint8_t sizeof_SI[NB_CNX_UE];
  uint8_t SIB1Status[NB_CNX_UE];
  uint8_t SIStatus[NB_CNX_UE];
479
  SystemInformationBlockType1_t *sib1[NB_CNX_UE];
480
  SystemInformation_t *si[NB_CNX_UE]; //!< Temporary storage for an SI message. Decoding happens in decode_SI().
481 482 483 484 485 486 487 488 489 490
  SystemInformationBlockType2_t *sib2[NB_CNX_UE];
  SystemInformationBlockType3_t *sib3[NB_CNX_UE];
  SystemInformationBlockType4_t *sib4[NB_CNX_UE];
  SystemInformationBlockType5_t *sib5[NB_CNX_UE];
  SystemInformationBlockType6_t *sib6[NB_CNX_UE];
  SystemInformationBlockType7_t *sib7[NB_CNX_UE];
  SystemInformationBlockType8_t *sib8[NB_CNX_UE];
  SystemInformationBlockType9_t *sib9[NB_CNX_UE];
  SystemInformationBlockType10_t *sib10[NB_CNX_UE];
  SystemInformationBlockType11_t *sib11[NB_CNX_UE];
491

492
#ifdef Rel10
493
  uint8_t                           MBMS_flag;
494 495 496
  uint8_t *MCCH_MESSAGE[NB_CNX_UE];
  uint8_t sizeof_MCCH_MESSAGE[NB_CNX_UE];
  uint8_t MCCH_MESSAGEStatus[NB_CNX_UE];
497
  MBSFNAreaConfiguration_r9_t       *mcch_message[NB_CNX_UE];
498 499
  SystemInformationBlockType12_r9_t *sib12[NB_CNX_UE];
  SystemInformationBlockType13_r9_t *sib13[NB_CNX_UE];
500
#endif
501 502 503 504
#ifdef CBA
  uint8_t                         num_active_cba_groups;
  uint16_t                        cba_rnti[NUM_MAX_CBA_GROUP];
#endif
505
  uint8_t                         num_srb;
506 507 508
  struct SRB_ToAddMod             *SRB1_config[NB_CNX_UE];
  struct SRB_ToAddMod             *SRB2_config[NB_CNX_UE];
  struct DRB_ToAddMod             *DRB_config[NB_CNX_UE][8];
509 510 511
#ifndef ASTRI_FIX
  rb_id_t                         *defaultDRB; // 2015-05-27 wilson : remember the default DRB ID
#endif
512 513 514 515
  MeasObjectToAddMod_t            *MeasObj[NB_CNX_UE][MAX_MEAS_OBJ];
  struct ReportConfigToAddMod     *ReportConfig[NB_CNX_UE][MAX_MEAS_CONFIG];
  struct QuantityConfig           *QuantityConfig[NB_CNX_UE];
  struct MeasIdToAddMod           *MeasId[NB_CNX_UE][MAX_MEAS_ID];
516 517
  MEAS_REPORT_LIST      *measReportList[NB_CNX_UE][MAX_MEAS_ID];
  uint32_t           measTimer[NB_CNX_UE][MAX_MEAS_ID][6]; // 6 neighboring cells
518
  RSRP_Range_t                    s_measure;
519
  struct MeasConfig__speedStatePars *speedStatePars;
520 521 522 523
  struct PhysicalConfigDedicated  *physicalConfigDedicated[NB_CNX_UE];
  struct SPS_Config               *sps_Config[NB_CNX_UE];
  MAC_MainConfig_t                *mac_MainConfig[NB_CNX_UE];
  MeasGapConfig_t                 *measGapConfig[NB_CNX_UE];
524
  double                          filter_coeff_rsrp; // [7] ???
525
  double                          filter_coeff_rsrq; // [7] ???
526 527 528 529
  float                           rsrp_db[7];
  float                           rsrq_db[7];
  float                           rsrp_db_filtered[7];
  float                           rsrq_db_filtered[7];
530
#if ENABLE_RAL
Lionel Gauthier's avatar
Lionel Gauthier committed
531
  obj_hash_table_t               *ral_meas_thresholds;
532
  ral_transaction_id_t            scan_transaction_id;
Lionel Gauthier's avatar
Lionel Gauthier committed
533
#endif
534 535 536 537 538 539 540 541
#if defined(ENABLE_SECURITY)
  /* KeNB as computed from parameters within USIM card */
  uint8_t kenb[32];
#endif

  /* Used integrity/ciphering algorithms */
  e_SecurityAlgorithmConfig__cipheringAlgorithm     ciphering_algorithm;
  e_SecurityAlgorithmConfig__integrityProtAlgorithm integrity_algorithm;
winckel's avatar
winckel committed
542
} UE_RRC_INST;
543

544
#include "proto.h"
winckel's avatar
winckel committed
545

546
#endif
547
/** @} */