Merge remote-tracking branch 'origin/develop' into develop-entv
This commit is contained in:
@@ -0,0 +1,48 @@
|
||||
/*
|
||||
* 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
|
||||
* the OAI Public License, Version 1.1 (the "License"); you may not use this file
|
||||
* 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
|
||||
*/
|
||||
|
||||
/* F1AP -> SCTP */
|
||||
MESSAGE_DEF(F1AP_CU_SCTP_REQ , MESSAGE_PRIORITY_MED, f1ap_cu_setup_req_t , f1ap_cu_setup_req)
|
||||
|
||||
/* eNB_DU application layer -> F1AP messages or CU F1AP -> RRC*/
|
||||
MESSAGE_DEF(F1AP_SETUP_REQ , MESSAGE_PRIORITY_MED, f1ap_setup_req_t , f1ap_setup_req)
|
||||
|
||||
/* F1AP -> eNB_DU or eNB_CU_RRC -> F1AP application layer messages */
|
||||
MESSAGE_DEF(F1AP_SETUP_RESP , MESSAGE_PRIORITY_MED, f1ap_setup_resp_t , f1ap_setup_resp)
|
||||
MESSAGE_DEF(F1AP_SETUP_FAILURE , MESSAGE_PRIORITY_MED, f1ap_setup_failure_t , f1ap_setup_failure)
|
||||
|
||||
/* MAC -> F1AP messages */
|
||||
MESSAGE_DEF(F1AP_INITIAL_UL_RRC_MESSAGE , MESSAGE_PRIORITY_MED, f1ap_initial_ul_rrc_message_t , f1ap_initial_ul_rrc_message)
|
||||
MESSAGE_DEF(F1AP_UL_RRC_MESSAGE , MESSAGE_PRIORITY_MED, f1ap_ul_rrc_message_t , f1ap_ul_rrc_message)
|
||||
//MESSAGE_DEF(F1AP_INITIAL_CONTEXT_SETUP_RESP, MESSAGE_PRIORITY_MED, f1ap_initial_context_setup_resp_t, f1ap_initial_context_setup_resp)
|
||||
//MESSAGE_DEF(F1AP_INITIAL_CONTEXT_SETUP_FAILURE, MESSAGE_PRIORITY_MED, f1ap_initial_context_setup_failure_t, f1ap_initial_context_setup_failure)
|
||||
MESSAGE_DEF(F1AP_UE_CONTEXT_RELEASE_REQ, MESSAGE_PRIORITY_MED, f1ap_ue_context_release_req_t, f1ap_ue_context_release_req)
|
||||
MESSAGE_DEF(F1AP_UE_CONTEXT_RELEASE_CMD, MESSAGE_PRIORITY_MED, f1ap_ue_context_release_cmd_t, f1ap_ue_context_release_cmd)
|
||||
|
||||
|
||||
/* RRC -> F1AP messages */
|
||||
MESSAGE_DEF(F1AP_DL_RRC_MESSAGE , MESSAGE_PRIORITY_MED, f1ap_dl_rrc_message_t , f1ap_dl_rrc_message )
|
||||
//MESSAGE_DEF(F1AP_INITIAL_CONTEXT_SETUP_REQ , MESSAGE_PRIORITY_MED, f1ap_initial_context_setup_req_t , f1ap_initial_context_setup_req )
|
||||
MESSAGE_DEF(F1AP_UE_CONTEXT_SETUP_REQ, MESSAGE_PRIORITY_MED, f1ap_ue_context_setup_req_t, f1ap_ue_context_setup_req)
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,308 @@
|
||||
/*
|
||||
* 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
|
||||
* the OAI Public License, Version 1.1 (the "License"); you may not use this file
|
||||
* 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
|
||||
*/
|
||||
|
||||
#ifndef F1AP_MESSAGES_TYPES_H_
|
||||
#define F1AP_MESSAGES_TYPES_H_
|
||||
|
||||
#include "rlc.h"
|
||||
|
||||
//-------------------------------------------------------------------------------------------//
|
||||
// Defines to access message fields.
|
||||
|
||||
#define F1AP_CU_SCTP_REQ(mSGpTR) (mSGpTR)->ittiMsg.f1ap_cu_sctp_req
|
||||
|
||||
#define F1AP_SETUP_REQ(mSGpTR) (mSGpTR)->ittiMsg.f1ap_setup_req
|
||||
#define F1AP_SETUP_RESP(mSGpTR) (mSGpTR)->ittiMsg.f1ap_setup_resp
|
||||
#define F1AP_SETUP_FAILURE(mSGpTR) (mSGpTR)->ittiMsg.f1ap_setup_failure
|
||||
|
||||
#define F1AP_INITIAL_UL_RRC_MESSAGE(mSGpTR) (mSGpTR)->ittiMsg.f1ap_initial_ul_rrc_message
|
||||
#define F1AP_UL_RRC_MESSAGE(mSGpTR) (mSGpTR)->ittiMsg.f1ap_ul_rrc_message
|
||||
#define F1AP_UE_CONTEXT_SETUP_REQ(mSGpTR) (mSGpTR)->ittiMsg.f1ap_ue_context_setup_req
|
||||
#define F1AP_UE_CONTEXT_RELEASE_RESP(mSGpTR) (mSGpTR)->ittiMsg.f1ap_ue_context_release_resp
|
||||
#define F1AP_UE_CONTEXT_MODIFICATION_RESP(mSGpTR) (mSGpTR)->ittiMsg.f1ap_ue_context_modification_resp
|
||||
#define F1AP_UE_CONTEXT_MODIFICATION_FAIL(mSGpTR) (mSGpTR)->ittiMsg.f1ap_ue_context_modification_fail
|
||||
|
||||
#define F1AP_DL_RRC_MESSAGE(mSGpTR) (mSGpTR)->ittiMsg.f1ap_dl_rrc_message
|
||||
#define F1AP_UE_CONTEXT_RELEASE_REQ(mSGpTR) (mSGpTR)->ittiMsg.f1ap_ue_context_release_req
|
||||
#define F1AP_UE_CONTEXT_RELEASE_CMD(mSGpTR) (mSGpTR)->ittiMsg.f1ap_ue_context_release_req
|
||||
#define F1AP_UE_CONTEXT_MODIFICATION_REQ(mSGpTR) (mSGpTR)->ittiMsg.f1ap_ue_context_modification_req
|
||||
|
||||
/* Length of the transport layer address string
|
||||
* 160 bits / 8 bits by char.
|
||||
*/
|
||||
#define F1AP_TRANSPORT_LAYER_ADDRESS_SIZE (160 / 8)
|
||||
|
||||
#define F1AP_MAX_NB_CU_IP_ADDRESS 10
|
||||
|
||||
// Note this should be 512 from maxval in 38.473
|
||||
#define F1AP_MAX_NB_CELLS 2
|
||||
|
||||
typedef struct f1ap_net_ip_address_s {
|
||||
unsigned ipv4:1;
|
||||
unsigned ipv6:1;
|
||||
char ipv4_address[16];
|
||||
char ipv6_address[46];
|
||||
} f1ap_net_ip_address_t;
|
||||
|
||||
typedef struct f1ap_cu_setup_req_s {
|
||||
//
|
||||
} f1ap_cu_setup_req_t;
|
||||
|
||||
typedef struct f1ap_setup_req_s {
|
||||
|
||||
// Midhaul networking parameters
|
||||
|
||||
/* Connexion id used between SCTP/F1AP */
|
||||
uint16_t cnx_id;
|
||||
|
||||
/* SCTP association id */
|
||||
int32_t assoc_id;
|
||||
|
||||
/* The eNB IP address to bind */
|
||||
f1ap_net_ip_address_t CU_f1_ip_address;
|
||||
f1ap_net_ip_address_t DU_f1_ip_address;
|
||||
|
||||
/* Number of SCTP streams used for a mme association */
|
||||
uint16_t sctp_in_streams;
|
||||
uint16_t sctp_out_streams;
|
||||
|
||||
uint16_t default_sctp_stream_id;
|
||||
|
||||
// F1_Setup_Req payload
|
||||
uint64_t gNB_DU_id;
|
||||
char *gNB_DU_name;
|
||||
|
||||
/* The type of the cell */
|
||||
enum cell_type_e cell_type;
|
||||
|
||||
/// number of DU cells available
|
||||
uint16_t num_cells_available; //0< num_cells_available <= 512;
|
||||
|
||||
// Served Cell Information
|
||||
/* Tracking area code */
|
||||
uint16_t tac[F1AP_MAX_NB_CELLS];
|
||||
|
||||
/* Mobile Country Codes
|
||||
* Mobile Network Codes
|
||||
*/
|
||||
uint16_t mcc[F1AP_MAX_NB_CELLS];//[6];
|
||||
uint16_t mnc[F1AP_MAX_NB_CELLS];//[6];
|
||||
uint8_t mnc_digit_length[F1AP_MAX_NB_CELLS];//[6];
|
||||
|
||||
// NR Global Cell Id
|
||||
uint64_t nr_cellid[F1AP_MAX_NB_CELLS];
|
||||
// NR Physical Cell Ids
|
||||
uint16_t nr_pci[F1AP_MAX_NB_CELLS];
|
||||
// Number of slide support items (max 16, could be increased to as much as 1024)
|
||||
uint16_t num_ssi[F1AP_MAX_NB_CELLS];//[6];
|
||||
uint8_t sst[F1AP_MAX_NB_CELLS];//[16][6];
|
||||
uint8_t sd[F1AP_MAX_NB_CELLS];//[16][6];
|
||||
// fdd_flag = 1 means FDD, 0 means TDD
|
||||
int fdd_flag;
|
||||
|
||||
union {
|
||||
struct {
|
||||
uint32_t ul_nr_arfcn;
|
||||
uint8_t ul_scs;
|
||||
uint8_t ul_nrb;
|
||||
|
||||
uint32_t dl_nr_arfcn;
|
||||
uint8_t dl_scs;
|
||||
uint8_t dl_nrb;
|
||||
|
||||
uint32_t sul_active;
|
||||
uint32_t sul_nr_arfcn;
|
||||
uint8_t sul_scs;
|
||||
uint8_t sul_nrb;
|
||||
|
||||
uint8_t ul_num_frequency_bands;
|
||||
uint16_t ul_nr_band[32];
|
||||
uint8_t ul_num_sul_frequency_bands;
|
||||
uint16_t ul_nr_sul_band[32];
|
||||
|
||||
uint8_t dl_num_frequency_bands;
|
||||
uint16_t dl_nr_band[32];
|
||||
uint8_t dl_num_sul_frequency_bands;
|
||||
uint16_t dl_nr_sul_band[32];
|
||||
} fdd;
|
||||
struct {
|
||||
|
||||
uint32_t nr_arfcn;
|
||||
uint8_t scs;
|
||||
uint8_t nrb;
|
||||
|
||||
uint32_t sul_active;
|
||||
uint32_t sul_nr_arfcn;
|
||||
uint8_t sul_scs;
|
||||
uint8_t sul_nrb;
|
||||
|
||||
uint8_t num_frequency_bands;
|
||||
uint16_t nr_band[32];
|
||||
uint8_t num_sul_frequency_bands;
|
||||
uint16_t nr_sul_band[32];
|
||||
|
||||
} tdd;
|
||||
} nr_mode_info[F1AP_MAX_NB_CELLS];
|
||||
|
||||
char *measurement_timing_information[F1AP_MAX_NB_CELLS];
|
||||
uint8_t ranac[F1AP_MAX_NB_CELLS];
|
||||
|
||||
// System Information
|
||||
uint8_t *mib[F1AP_MAX_NB_CELLS];
|
||||
int mib_length[F1AP_MAX_NB_CELLS];
|
||||
uint8_t *sib1[F1AP_MAX_NB_CELLS];
|
||||
int sib1_length[F1AP_MAX_NB_CELLS];
|
||||
|
||||
|
||||
} f1ap_setup_req_t;
|
||||
|
||||
typedef struct f1ap_setup_resp_s {
|
||||
/* Connexion id used between SCTP/F1AP */
|
||||
uint16_t cnx_id;
|
||||
|
||||
/* SCTP association id */
|
||||
int32_t assoc_id;
|
||||
|
||||
/* Number of SCTP streams used for a mme association */
|
||||
uint16_t sctp_in_streams;
|
||||
uint16_t sctp_out_streams;
|
||||
|
||||
/// string holding gNB_CU_name
|
||||
char *gNB_CU_name;
|
||||
/// number of DU cells to activate
|
||||
uint16_t num_cells_to_activate; //0< num_cells_to_activate <= 512;
|
||||
/// mcc of DU cells
|
||||
uint16_t mcc[F1AP_MAX_NB_CELLS];
|
||||
/// mnc of DU cells
|
||||
uint16_t mnc[F1AP_MAX_NB_CELLS];
|
||||
/// mnc digit length of DU cells
|
||||
uint8_t mnc_digit_length[F1AP_MAX_NB_CELLS];
|
||||
// NR Global Cell Id
|
||||
uint64_t nr_cellid[F1AP_MAX_NB_CELLS];
|
||||
/// NRPCI
|
||||
uint16_t nrpci[F1AP_MAX_NB_CELLS];
|
||||
/// num SI messages per DU cell
|
||||
uint8_t num_SI[F1AP_MAX_NB_CELLS];
|
||||
/// SI message containers (up to 21 messages per cell)
|
||||
uint8_t *SI_container[F1AP_MAX_NB_CELLS][21];
|
||||
int SI_container_length[F1AP_MAX_NB_CELLS][21];
|
||||
} f1ap_setup_resp_t;
|
||||
|
||||
typedef struct f1ap_setup_failure_s {
|
||||
uint16_t cause;
|
||||
uint16_t time_to_wait;
|
||||
uint16_t criticality_diagnostics;
|
||||
} f1ap_setup_failure_t;
|
||||
|
||||
typedef struct f1ap_dl_rrc_message_s {
|
||||
|
||||
uint32_t gNB_CU_ue_id;
|
||||
uint32_t gNB_DU_ue_id;
|
||||
uint32_t old_gNB_DU_ue_id;
|
||||
uint16_t rnti;
|
||||
uint8_t srb_id;
|
||||
uint8_t execute_duplication;
|
||||
uint8_t *rrc_container;
|
||||
int rrc_container_length;
|
||||
union {
|
||||
// both map 0..255 => 1..256
|
||||
uint8_t en_dc;
|
||||
uint8_t ngran;
|
||||
} RAT_frequency_priority_information;
|
||||
} f1ap_dl_rrc_message_t;
|
||||
|
||||
typedef struct f1ap_initial_ul_rrc_message_s {
|
||||
uint32_t gNB_DU_ue_id;
|
||||
/// mcc of DU cell
|
||||
uint16_t mcc;
|
||||
/// mnc of DU cell
|
||||
uint16_t mnc;
|
||||
/// mnc digit length of DU cells
|
||||
uint8_t mnc_digit_length;
|
||||
/// nr cell id
|
||||
uint64_t nr_cellid;
|
||||
/// crnti
|
||||
uint16_t crnti;
|
||||
uint8_t *rrc_container;
|
||||
int rrc_container_length;
|
||||
uint8_t *du2cu_rrc_container;
|
||||
int du2cu_rrc_container_length;
|
||||
} f1ap_initial_ul_rrc_message_t;
|
||||
|
||||
typedef struct f1ap_ul_rrc_message_s {
|
||||
uint16_t rnti;
|
||||
uint8_t srb_id;
|
||||
uint8_t *rrc_container;
|
||||
int rrc_container_length;
|
||||
} f1ap_ul_rrc_message_t;
|
||||
|
||||
typedef struct f1ap_up_tnl_s {
|
||||
in_addr_t tl_address; // currently only IPv4 supported
|
||||
uint32_t gtp_teid;
|
||||
} f1ap_up_tnl_t;
|
||||
|
||||
typedef struct f1ap_drb_to_be_setup_s {
|
||||
uint8_t drb_id;
|
||||
f1ap_up_tnl_t up_ul_tnl[2];
|
||||
uint8_t up_ul_tnl_length;
|
||||
rlc_mode_t rlc_mode;
|
||||
} f1ap_drb_to_be_setup_t;
|
||||
|
||||
typedef struct f1ap_ue_context_setup_req_s {
|
||||
uint32_t gNB_CU_ue_id; // BK: need to replace by use from rnti
|
||||
uint32_t *gNB_DU_ue_id;
|
||||
uint16_t rnti;
|
||||
// SpCell Info
|
||||
uint16_t mcc;
|
||||
uint16_t mnc;
|
||||
uint8_t mnc_digit_length;
|
||||
uint64_t nr_cellid;
|
||||
uint8_t servCellIndex;
|
||||
uint8_t *cellULConfigured;
|
||||
uint32_t servCellId;
|
||||
uint8_t *cu_to_du_rrc_information;
|
||||
uint8_t cu_to_du_rrc_information_length;
|
||||
f1ap_drb_to_be_setup_t *drbs_to_be_setup; // BK: need to replace by s1ap_initial_context_setup_req
|
||||
uint8_t drbs_to_be_setup_length; // BK: need to replace by s1ap_initial_context_setup_req
|
||||
s1ap_initial_context_setup_req_t *s1ap_initial_context_setup_req;
|
||||
// coniatner for the rrc_eNB_generate_SecurityModeCommand message
|
||||
uint8_t *rrc_container;
|
||||
int rrc_container_length;
|
||||
} f1ap_ue_context_setup_req_t;
|
||||
|
||||
typedef enum F1ap_Cause_e {
|
||||
F1AP_CAUSE_NOTHING, /* No components present */
|
||||
F1AP_CAUSE_RADIO_NETWORK,
|
||||
F1AP_CAUSE_TRANSPORT,
|
||||
F1AP_CAUSE_PROTOCOL,
|
||||
F1AP_CAUSE_MISC,
|
||||
} f1ap_Cause_t;
|
||||
|
||||
typedef struct f1ap_ue_context_release_s {
|
||||
uint16_t rnti;
|
||||
f1ap_Cause_t cause;
|
||||
long cause_value;
|
||||
uint8_t *rrc_container;
|
||||
int rrc_container_length;
|
||||
} f1ap_ue_context_release_req_t, f1ap_ue_context_release_cmd_t,
|
||||
f1ap_ue_context_release_cplt_t;
|
||||
|
||||
#endif /* F1AP_MESSAGES_TYPES_H_ */
|
||||
@@ -390,7 +390,7 @@ typedef struct {
|
||||
|
||||
|
||||
|
||||
#define IDLE 0
|
||||
//#define IDLE 0
|
||||
#define NEED_RADIO_CONFIG 3
|
||||
#define RADIO_CONFIG_TX 2
|
||||
#define RADIO_CONFIG_OK 1
|
||||
|
||||
@@ -34,6 +34,7 @@
|
||||
#include "ral_messages_def.h"
|
||||
#endif
|
||||
#include "s1ap_messages_def.h"
|
||||
#include "f1ap_messages_def.h"
|
||||
#include "x2ap_messages_def.h"
|
||||
#include "sctp_messages_def.h"
|
||||
#include "udp_messages_def.h"
|
||||
|
||||
@@ -26,7 +26,6 @@
|
||||
* Author: winckel
|
||||
*/
|
||||
|
||||
#if defined(ENABLE_USE_MME) && defined(ENABLE_NAS_UE_LOGGING)
|
||||
//-------------------------------------------------------------------------------------------//
|
||||
// Messages for NAS logging
|
||||
MESSAGE_DEF(NAS_DL_EMM_RAW_MSG, MESSAGE_PRIORITY_MED, nas_raw_msg_t, nas_dl_emm_raw_msg)
|
||||
@@ -46,4 +45,4 @@ MESSAGE_DEF(NAS_DL_ESM_PROTECTED_MSG, MESSAGE_PRIORITY_MED, nas_esm_
|
||||
MESSAGE_DEF(NAS_UL_ESM_PROTECTED_MSG, MESSAGE_PRIORITY_MED, nas_esm_protected_msg_t, nas_ul_esm_protected_msg)
|
||||
|
||||
//-------------------------------------------------------------------------------------------//
|
||||
#endif /* ENABLE_USE_MME */
|
||||
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
#ifndef NAS_MESSAGES_TYPES_H_
|
||||
#define NAS_MESSAGES_TYPES_H_
|
||||
|
||||
# if defined(ENABLE_USE_MME) && defined(ENABLE_NAS_UE_LOGGING)
|
||||
|
||||
|
||||
#include "nas_message.h"
|
||||
|
||||
@@ -142,5 +142,4 @@ typedef struct nas_esm_protected_msg_s {
|
||||
ESM_msg choice;
|
||||
} nas_esm_protected_msg_t;
|
||||
|
||||
# endif /* ENABLE_USE_MME */
|
||||
#endif /* NAS_MESSAGES_TYPES_H_ */
|
||||
|
||||
@@ -236,9 +236,7 @@ typedef struct protocol_ctxt_s {
|
||||
sub_frame_t subframe; /*!< \brief LTE sub frame number.*/
|
||||
eNB_index_t eNB_index; /*!< \brief valid for UE indicating the index of connected eNB(s) */
|
||||
boolean_t configured; /*!< \brief flag indicating whether the instance is configured or not */
|
||||
#ifdef Rel14
|
||||
boolean_t brOption;
|
||||
#endif
|
||||
} protocol_ctxt_t;
|
||||
// warning time hardcoded
|
||||
#define PROTOCOL_CTXT_TIME_MILLI_SECONDS(CtXt_h) ((CtXt_h)->frame*10+(CtXt_h)->subframe)
|
||||
|
||||
@@ -72,3 +72,6 @@ MESSAGE_DEF(NAS_CONN_ESTABLI_CNF, MESSAGE_PRIORITY_MED, NasConnEstab
|
||||
MESSAGE_DEF(NAS_CONN_RELEASE_IND, MESSAGE_PRIORITY_MED, NasConnReleaseInd, nas_conn_release_ind)
|
||||
MESSAGE_DEF(NAS_UPLINK_DATA_CNF, MESSAGE_PRIORITY_MED, NasUlDataCnf, nas_ul_data_cnf)
|
||||
MESSAGE_DEF(NAS_DOWNLINK_DATA_IND, MESSAGE_PRIORITY_MED, NasDlDataInd, nas_dl_data_ind)
|
||||
|
||||
// eNB: realtime -> RRC messages
|
||||
MESSAGE_DEF(RRC_SUBFRAME_PROCESS, MESSAGE_PRIORITY_MED, RrcSubframeProcess, rrc_subframe_process)
|
||||
|
||||
@@ -32,9 +32,11 @@
|
||||
#include "as_message.h"
|
||||
#include "rrc_types.h"
|
||||
#include "s1ap_messages_types.h"
|
||||
#include "LTE_SystemInformationBlockType2.h"
|
||||
#include "f1ap_messages_types.h"
|
||||
#include "LTE_SystemInformationBlockType2.h"
|
||||
#include "LTE_SL-OffsetIndicator-r12.h"
|
||||
#include "LTE_SubframeBitmapSL-r12.h"
|
||||
#include "LTE_DRX-Config.h"
|
||||
#include "LTE_SL-CP-Len-r12.h"
|
||||
#include "LTE_SL-PeriodComm-r12.h"
|
||||
#include "LTE_SL-DiscResourcePool-r12.h"
|
||||
@@ -81,6 +83,8 @@
|
||||
#define NAS_UPLINK_DATA_CNF(mSGpTR) (mSGpTR)->ittiMsg.nas_ul_data_cnf
|
||||
#define NAS_DOWNLINK_DATA_IND(mSGpTR) (mSGpTR)->ittiMsg.nas_dl_data_ind
|
||||
|
||||
#define RRC_SUBFRAME_PROCESS(mSGpTR) (mSGpTR)->ittiMsg.rrc_subframe_process
|
||||
|
||||
//-------------------------------------------------------------------------------------------//
|
||||
typedef struct RrcStateInd_s {
|
||||
Rrc_State_t state;
|
||||
@@ -138,6 +142,14 @@ typedef struct RadioResourceConfig_s {
|
||||
long bcch_modificationPeriodCoeff;
|
||||
long pcch_defaultPagingCycle;
|
||||
long pcch_nB;
|
||||
LTE_DRX_Config_PR drx_Config_present;
|
||||
long drx_onDurationTimer;
|
||||
long drx_InactivityTimer;
|
||||
long drx_RetransmissionTimer;
|
||||
LTE_DRX_Config__setup__longDRX_CycleStartOffset_PR drx_longDrx_CycleStartOffset_present;
|
||||
long drx_longDrx_CycleStartOffset;
|
||||
long drx_shortDrx_Cycle;
|
||||
long drx_shortDrx_ShortCycleTimer;
|
||||
long ue_TimersAndConstants_t300;
|
||||
long ue_TimersAndConstants_t301;
|
||||
long ue_TimersAndConstants_t310;
|
||||
@@ -146,7 +158,7 @@ typedef struct RadioResourceConfig_s {
|
||||
long ue_TimersAndConstants_n311;
|
||||
long ue_TransmissionMode;
|
||||
long ue_multiple_max;
|
||||
#ifdef Rel14
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
//SIB2 BR Options
|
||||
long* preambleTransMax_CE_r13;
|
||||
BOOLEAN_t prach_ConfigCommon_v1310;
|
||||
@@ -190,7 +202,7 @@ typedef struct RrcConfigurationReq_s {
|
||||
|
||||
RadioResourceConfig radioresourceconfig[MAX_NUM_CCs];
|
||||
RadioResourceConfig radioresourceconfig_BR[MAX_NUM_CCs];
|
||||
|
||||
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(13, 0, 0))
|
||||
//MIB
|
||||
long schedulingInfoSIB1_BR_r13[MAX_NUM_CCs];
|
||||
@@ -253,11 +265,11 @@ typedef struct RrcConfigurationReq_s {
|
||||
bool sib2_freq_hoppingParameters_r13_exists [MAX_NUM_CCs];
|
||||
long *sib2_mpdcch_pdsch_hoppingNB_r13 [MAX_NUM_CCs];
|
||||
long *sib2_interval_DLHoppingConfigCommonModeA_r13 [MAX_NUM_CCs];
|
||||
long sib2_interval_DLHoppingConfigCommonModeA_r13_val [MAX_NUM_CCs];
|
||||
long *sib2_interval_DLHoppingConfigCommonModeB_r13 [MAX_NUM_CCs];
|
||||
long sib2_interval_DLHoppingConfigCommonModeB_r13_val [MAX_NUM_CCs];
|
||||
long sib2_interval_DLHoppingConfigCommonModeA_r13_val [MAX_NUM_CCs];
|
||||
long *sib2_interval_DLHoppingConfigCommonModeB_r13 [MAX_NUM_CCs];
|
||||
long sib2_interval_DLHoppingConfigCommonModeB_r13_val [MAX_NUM_CCs];
|
||||
long *sib2_interval_ULHoppingConfigCommonModeA_r13 [MAX_NUM_CCs];
|
||||
long sib2_interval_ULHoppingConfigCommonModeA_r13_val [MAX_NUM_CCs];
|
||||
long sib2_interval_ULHoppingConfigCommonModeA_r13_val [MAX_NUM_CCs];
|
||||
long *sib2_interval_ULHoppingConfigCommonModeB_r13 [MAX_NUM_CCs];
|
||||
long sib2_interval_ULHoppingConfigCommonModeB_r13_val [MAX_NUM_CCs];
|
||||
long *sib2_mpdcch_pdsch_hoppingOffset_r13 [MAX_NUM_CCs];
|
||||
@@ -400,4 +412,10 @@ typedef nas_release_ind_t NasConnReleaseInd;
|
||||
typedef ul_info_transfer_cnf_t NasUlDataCnf;
|
||||
typedef dl_info_transfer_ind_t NasDlDataInd;
|
||||
|
||||
// eNB: realtime -> RRC messages
|
||||
typedef struct rrc_subframe_process_s {
|
||||
protocol_ctxt_t ctxt;
|
||||
int CC_id;
|
||||
} RrcSubframeProcess;
|
||||
|
||||
#endif /* RRC_MESSAGES_TYPES_H_ */
|
||||
|
||||
@@ -39,6 +39,8 @@ MESSAGE_DEF(S1AP_PAGING_LOG , MESSAGE_PRIORITY_MED, IttiMsgText
|
||||
MESSAGE_DEF(S1AP_E_RAB_RELEASE_REQUEST_LOG , MESSAGE_PRIORITY_MED, IttiMsgText , s1ap_e_rab_release_request_log)
|
||||
MESSAGE_DEF(S1AP_E_RAB_RELEASE_RESPONSE_LOG , MESSAGE_PRIORITY_MED, IttiMsgText , s1ap_e_rab_release_response_log)
|
||||
MESSAGE_DEF(S1AP_ERROR_INDICATION_LOG , MESSAGE_PRIORITY_MED, IttiMsgText , s1ap_error_indication_log)
|
||||
MESSAGE_DEF(S1AP_PATH_SWITCH_REQ_LOG , MESSAGE_PRIORITY_MED, IttiMsgText , s1ap_path_switch_req_log)
|
||||
MESSAGE_DEF(S1AP_PATH_SWITCH_REQ_ACK_LOG , MESSAGE_PRIORITY_MED, IttiMsgText , s1ap_path_switch_req_ack_log)
|
||||
|
||||
/* eNB application layer -> S1AP messages */
|
||||
MESSAGE_DEF(S1AP_REGISTER_ENB_REQ , MESSAGE_PRIORITY_MED, s1ap_register_enb_req_t , s1ap_register_enb_req)
|
||||
@@ -62,6 +64,8 @@ MESSAGE_DEF(S1AP_E_RAB_SETUP_RESP , MESSAGE_PRIORITY_MED, s1ap_e_rab_se
|
||||
MESSAGE_DEF(S1AP_E_RAB_SETUP_REQUEST_FAIL , MESSAGE_PRIORITY_MED, s1ap_e_rab_setup_req_fail_t , s1ap_e_rab_setup_request_fail)
|
||||
MESSAGE_DEF(S1AP_E_RAB_MODIFY_RESP , MESSAGE_PRIORITY_MED, s1ap_e_rab_modify_resp_t , s1ap_e_rab_modify_resp)
|
||||
MESSAGE_DEF(S1AP_E_RAB_RELEASE_RESPONSE , MESSAGE_PRIORITY_MED, s1ap_e_rab_release_resp_t , s1ap_e_rab_release_resp)
|
||||
MESSAGE_DEF(S1AP_PATH_SWITCH_REQ , MESSAGE_PRIORITY_MED, s1ap_path_switch_req_t , s1ap_path_switch_req)
|
||||
MESSAGE_DEF(S1AP_PATH_SWITCH_REQ_ACK , MESSAGE_PRIORITY_MED, s1ap_path_switch_req_ack_t , s1ap_path_switch_req_ack)
|
||||
|
||||
/* S1AP -> RRC messages */
|
||||
MESSAGE_DEF(S1AP_DOWNLINK_NAS , MESSAGE_PRIORITY_MED, s1ap_downlink_nas_t , s1ap_downlink_nas )
|
||||
|
||||
@@ -42,6 +42,8 @@
|
||||
#define S1AP_E_RAB_SETUP_RESP(mSGpTR) (mSGpTR)->ittiMsg.s1ap_e_rab_setup_resp
|
||||
#define S1AP_E_RAB_SETUP_FAIL(mSGpTR) (mSGpTR)->ittiMsg.s1ap_e_rab_setup_req_fail
|
||||
#define S1AP_E_RAB_MODIFY_RESP(mSGpTR) (mSGpTR)->ittiMsg.s1ap_e_rab_modify_resp
|
||||
#define S1AP_PATH_SWITCH_REQ(mSGpTR) (mSGpTR)->ittiMsg.s1ap_path_switch_req
|
||||
#define S1AP_PATH_SWITCH_REQ_ACK(mSGpTR) (mSGpTR)->ittiMsg.s1ap_path_switch_req_ack
|
||||
|
||||
#define S1AP_DOWNLINK_NAS(mSGpTR) (mSGpTR)->ittiMsg.s1ap_downlink_nas
|
||||
#define S1AP_INITIAL_CONTEXT_SETUP_REQ(mSGpTR) (mSGpTR)->ittiMsg.s1ap_initial_context_setup_req
|
||||
@@ -269,6 +271,17 @@ typedef struct e_rab_setup_s {
|
||||
uint32_t gtp_teid;
|
||||
} e_rab_setup_t;
|
||||
|
||||
typedef struct e_rab_tobeswitched_s {
|
||||
/* Unique e_rab_id for the UE. */
|
||||
uint8_t e_rab_id;
|
||||
|
||||
/* The transport layer address for the IP packets */
|
||||
transport_layer_addr_t sgw_addr;
|
||||
|
||||
/* S-GW Tunnel endpoint identifier */
|
||||
uint32_t gtp_teid;
|
||||
} e_rab_tobeswitched_t;
|
||||
|
||||
typedef struct e_rab_modify_s {
|
||||
/* Unique e_rab_id for the UE. */
|
||||
uint8_t e_rab_id;
|
||||
@@ -480,6 +493,8 @@ typedef struct s1ap_initial_context_setup_req_s {
|
||||
/* eNB ue s1ap id as initialized by S1AP layer */
|
||||
unsigned eNB_ue_s1ap_id:24;
|
||||
|
||||
uint32_t mme_ue_s1ap_id;
|
||||
|
||||
/* UE aggregate maximum bitrate */
|
||||
ambr_t ue_ambr;
|
||||
|
||||
@@ -533,7 +548,7 @@ typedef struct s1ap_e_rab_setup_req_s {
|
||||
uint16_t ue_initial_id;
|
||||
|
||||
/* MME UE id */
|
||||
uint16_t mme_ue_s1ap_id;
|
||||
uint32_t mme_ue_s1ap_id;
|
||||
|
||||
/* eNB ue s1ap id as initialized by S1AP layer */
|
||||
unsigned eNB_ue_s1ap_id:24;
|
||||
@@ -560,6 +575,58 @@ typedef struct s1ap_e_rab_setup_resp_s {
|
||||
e_rab_failed_t e_rabs_failed[S1AP_MAX_E_RAB];
|
||||
} s1ap_e_rab_setup_resp_t;
|
||||
|
||||
typedef struct s1ap_path_switch_req_s {
|
||||
|
||||
unsigned eNB_ue_s1ap_id:24;
|
||||
|
||||
/* Number of e_rab setup-ed in the list */
|
||||
uint8_t nb_of_e_rabs;
|
||||
|
||||
/* list of e_rab setup-ed by RRC layers */
|
||||
e_rab_setup_t e_rabs_tobeswitched[S1AP_MAX_E_RAB];
|
||||
|
||||
/* MME UE id */
|
||||
uint32_t mme_ue_s1ap_id;
|
||||
|
||||
s1ap_gummei_t ue_gummei;
|
||||
|
||||
uint16_t ue_initial_id;
|
||||
|
||||
/* Security algorithms */
|
||||
security_capabilities_t security_capabilities;
|
||||
|
||||
} s1ap_path_switch_req_t;
|
||||
|
||||
typedef struct s1ap_path_switch_req_ack_s {
|
||||
|
||||
/* UE id for initial connection to S1AP */
|
||||
uint16_t ue_initial_id;
|
||||
|
||||
unsigned eNB_ue_s1ap_id:24;
|
||||
|
||||
/* MME UE id */
|
||||
uint32_t mme_ue_s1ap_id;
|
||||
|
||||
/* UE aggregate maximum bitrate */
|
||||
ambr_t ue_ambr;
|
||||
|
||||
/* Number of e_rab setup-ed in the list */
|
||||
uint8_t nb_e_rabs_tobeswitched;
|
||||
|
||||
/* list of e_rab to be switched by RRC layers */
|
||||
e_rab_tobeswitched_t e_rabs_tobeswitched[S1AP_MAX_E_RAB];
|
||||
|
||||
/* Number of e_rabs to be released by RRC */
|
||||
uint8_t nb_e_rabs_tobereleased;
|
||||
|
||||
/* list of e_rabs to be released */
|
||||
e_rab_failed_t e_rabs_tobereleased[S1AP_MAX_E_RAB];
|
||||
|
||||
/* Security key */
|
||||
int next_hop_chain_count;
|
||||
uint8_t next_security_key[SECURITY_KEY_LENGTH];
|
||||
|
||||
} s1ap_path_switch_req_ack_t;
|
||||
|
||||
// S1AP --> RRC messages
|
||||
typedef struct s1ap_ue_release_command_s {
|
||||
@@ -582,7 +649,7 @@ typedef struct s1ap_e_rab_modify_req_s {
|
||||
uint16_t ue_initial_id;
|
||||
|
||||
/* MME UE id */
|
||||
uint16_t mme_ue_s1ap_id;
|
||||
uint32_t mme_ue_s1ap_id;
|
||||
|
||||
/* eNB ue s1ap id as initialized by S1AP layer */
|
||||
unsigned eNB_ue_s1ap_id:24;
|
||||
@@ -615,7 +682,7 @@ typedef struct e_rab_release_s {
|
||||
|
||||
typedef struct s1ap_e_rab_release_command_s {
|
||||
/* MME UE id */
|
||||
uint16_t mme_ue_s1ap_id;
|
||||
uint32_t mme_ue_s1ap_id;
|
||||
|
||||
/* eNB ue s1ap id as initialized by S1AP layer */
|
||||
unsigned eNB_ue_s1ap_id:24;
|
||||
@@ -633,7 +700,7 @@ typedef struct s1ap_e_rab_release_command_s {
|
||||
|
||||
typedef struct s1ap_e_rab_release_resp_s {
|
||||
/* MME UE id */
|
||||
uint16_t mme_ue_s1ap_id;
|
||||
uint32_t mme_ue_s1ap_id;
|
||||
|
||||
/* eNB ue s1ap id as initialized by S1AP layer */
|
||||
unsigned eNB_ue_s1ap_id:24;
|
||||
|
||||
@@ -46,6 +46,8 @@ TASK_DEF(TASK_UDP, TASK_PRIORITY_MED, 1000)
|
||||
// GTP_V1U task
|
||||
TASK_DEF(TASK_GTPV1_U, TASK_PRIORITY_MED, 1000)
|
||||
TASK_DEF(TASK_S1AP, TASK_PRIORITY_MED, 200)
|
||||
TASK_DEF(TASK_CU_F1, TASK_PRIORITY_MED, 200)
|
||||
TASK_DEF(TASK_DU_F1, TASK_PRIORITY_MED, 200)
|
||||
/// X2ap task, acts as both source and target
|
||||
TASK_DEF(TASK_X2AP, TASK_PRIORITY_MED, 200)
|
||||
/// Sctp task (Used by both S1AP and X2AP)
|
||||
@@ -54,7 +56,7 @@ TASK_DEF(TASK_SCTP, TASK_PRIORITY_MED, 200)
|
||||
TASK_DEF(TASK_ENB_APP, TASK_PRIORITY_MED, 200)
|
||||
/// eNB Agent task
|
||||
TASK_DEF(TASK_FLEXRAN_AGENT, TASK_PRIORITY_MED, 200)
|
||||
|
||||
TASK_DEF(TASK_PROTO_AGENT, TASK_PRIORITY_MED, 200)
|
||||
// UE tasks and sub-tasks:
|
||||
|
||||
/// Radio Resource Control task
|
||||
|
||||
@@ -32,6 +32,7 @@ MESSAGE_DEF(X2AP_SETUP_REQUEST_LOG , MESSAGE_PRIORITY_MED, IttiMsgT
|
||||
|
||||
/* eNB application layer -> X2AP messages */
|
||||
MESSAGE_DEF(X2AP_REGISTER_ENB_REQ , MESSAGE_PRIORITY_MED, x2ap_register_enb_req_t , x2ap_register_enb_req)
|
||||
MESSAGE_DEF(X2AP_SUBFRAME_PROCESS , MESSAGE_PRIORITY_MED, x2ap_subframe_process_t , x2ap_subframe_process)
|
||||
|
||||
/* X2AP -> eNB application layer messages */
|
||||
MESSAGE_DEF(X2AP_REGISTER_ENB_CNF , MESSAGE_PRIORITY_MED, x2ap_register_enb_cnf_t , x2ap_register_enb_cnf)
|
||||
@@ -40,3 +41,7 @@ MESSAGE_DEF(X2AP_DEREGISTERED_ENB_IND , MESSAGE_PRIORITY_MED, x2ap_der
|
||||
/* handover messages X2AP <-> RRC */
|
||||
MESSAGE_DEF(X2AP_HANDOVER_REQ , MESSAGE_PRIORITY_MED, x2ap_handover_req_t , x2ap_handover_req)
|
||||
MESSAGE_DEF(X2AP_HANDOVER_REQ_ACK , MESSAGE_PRIORITY_MED, x2ap_handover_req_ack_t , x2ap_handover_req_ack)
|
||||
MESSAGE_DEF(X2AP_HANDOVER_CANCEL , MESSAGE_PRIORITY_MED, x2ap_handover_cancel_t , x2ap_handover_cancel)
|
||||
|
||||
/* handover messages X2AP <-> S1AP */
|
||||
MESSAGE_DEF(X2AP_UE_CONTEXT_RELEASE , MESSAGE_PRIORITY_MED, x2ap_ue_context_release_t , x2ap_ue_context_release)
|
||||
|
||||
@@ -22,6 +22,7 @@
|
||||
#ifndef X2AP_MESSAGES_TYPES_H_
|
||||
#define X2AP_MESSAGES_TYPES_H_
|
||||
|
||||
#include "s1ap_messages_types.h"
|
||||
#include "LTE_PhysCellId.h"
|
||||
|
||||
//-------------------------------------------------------------------------------------------//
|
||||
@@ -32,11 +33,32 @@
|
||||
#define X2AP_HANDOVER_REQ_ACK(mSGpTR) (mSGpTR)->ittiMsg.x2ap_handover_req_ack
|
||||
#define X2AP_REGISTER_ENB_CNF(mSGpTR) (mSGpTR)->ittiMsg.x2ap_register_enb_cnf
|
||||
#define X2AP_DEREGISTERED_ENB_IND(mSGpTR) (mSGpTR)->ittiMsg.x2ap_deregistered_enb_ind
|
||||
#define X2AP_UE_CONTEXT_RELEASE(mSGpTR) (mSGpTR)->ittiMsg.x2ap_ue_context_release
|
||||
#define X2AP_HANDOVER_CANCEL(mSGpTR) (mSGpTR)->ittiMsg.x2ap_handover_cancel
|
||||
|
||||
|
||||
#define X2AP_MAX_NB_ENB_IP_ADDRESS 2
|
||||
|
||||
// eNB application layer -> X2AP messages
|
||||
|
||||
/* X2AP UE CONTEXT RELEASE */
|
||||
typedef struct x2ap_ue_context_release_s {
|
||||
/* used for X2AP->RRC in source and RRC->X2AP in target */
|
||||
int rnti;
|
||||
|
||||
int source_assoc_id;
|
||||
} x2ap_ue_context_release_t;
|
||||
|
||||
typedef enum {
|
||||
X2AP_T_RELOC_PREP_TIMEOUT,
|
||||
X2AP_TX2_RELOC_OVERALL_TIMEOUT
|
||||
} x2ap_handover_cancel_cause_t;
|
||||
|
||||
typedef struct x2ap_handover_cancel_s {
|
||||
int rnti;
|
||||
x2ap_handover_cancel_cause_t cause;
|
||||
} x2ap_handover_cancel_t;
|
||||
|
||||
typedef struct x2ap_register_enb_req_s {
|
||||
/* Unique eNB_id to identify the eNB within EPC.
|
||||
* For macro eNB ids this field should be 20 bits long.
|
||||
@@ -94,8 +116,16 @@ typedef struct x2ap_register_enb_req_s {
|
||||
|
||||
/* eNB port for X2C*/
|
||||
uint32_t enb_port_for_X2C;
|
||||
|
||||
/* timers (unit: millisecond) */
|
||||
int t_reloc_prep;
|
||||
int tx2_reloc_overall;
|
||||
} x2ap_register_enb_req_t;
|
||||
|
||||
typedef struct x2ap_subframe_process_s {
|
||||
/* nothing, we simply use the module ID in the header */
|
||||
} x2ap_subframe_process_t;
|
||||
|
||||
//-------------------------------------------------------------------------------------------//
|
||||
// X2AP -> eNB application layer messages
|
||||
typedef struct x2ap_register_enb_cnf_s {
|
||||
@@ -127,12 +157,12 @@ typedef struct x2ap_lastvisitedcell_info_s {
|
||||
uint64_t time_UE_StayedInCell;
|
||||
}x2ap_lastvisitedcell_info_t;
|
||||
|
||||
//used for src
|
||||
typedef struct x2ap_handover_req_s {
|
||||
int source_rnti; /* TODO: to be fixed/remove */
|
||||
int source_x2id; /* TODO: to be fixed/remove */
|
||||
/* used for RRC->X2AP in source eNB */
|
||||
int rnti;
|
||||
|
||||
unsigned old_eNB_ue_s1ap_id:24;
|
||||
/* used for X2AP->RRC in target eNB */
|
||||
int x2_id;
|
||||
|
||||
LTE_PhysCellId_t target_physCellId;
|
||||
|
||||
@@ -158,19 +188,34 @@ typedef struct x2ap_handover_req_s {
|
||||
/* list of e_rab setup-ed by RRC layers */
|
||||
e_rab_setup_t e_rabs_tobesetup[S1AP_MAX_E_RAB];
|
||||
|
||||
/* ue_context_pP->ue_context.e_rab[i].param.sgw_addr; */
|
||||
/* list of e_rab to be setup by RRC layers */
|
||||
e_rab_t e_rab_param[S1AP_MAX_E_RAB];
|
||||
|
||||
x2ap_lastvisitedcell_info_t lastvisitedcell_info;
|
||||
|
||||
/* TODO: this parameter has to be removed */
|
||||
int target_mod_id;
|
||||
uint8_t rrc_buffer[1024 /* arbitrary, big enough */];
|
||||
int rrc_buffer_size;
|
||||
|
||||
int target_assoc_id;
|
||||
} x2ap_handover_req_t;
|
||||
|
||||
typedef struct x2ap_handover_req_ack_s {
|
||||
int source_rnti; /* TODO: to be fixed/remove */
|
||||
int source_x2id; /* TODO: to be fixed/remove */
|
||||
/* TODO: this parameter has to be removed */
|
||||
int target_mod_id;
|
||||
/* used for RRC->X2AP in target and X2AP->RRC in source */
|
||||
int rnti;
|
||||
|
||||
/* used for RRC->X2AP in target */
|
||||
int x2_id_target;
|
||||
|
||||
int source_assoc_id;
|
||||
|
||||
uint8_t nb_e_rabs_tobesetup;
|
||||
|
||||
/* list of e_rab setup-ed by RRC layers */
|
||||
e_rab_setup_t e_rabs_tobesetup[S1AP_MAX_E_RAB];
|
||||
|
||||
/* list of e_rab to be setup by RRC layers */
|
||||
e_rab_t e_rab_param[S1AP_MAX_E_RAB];
|
||||
|
||||
uint8_t rrc_buffer[1024 /* arbitrary, big enough */];
|
||||
int rrc_buffer_size;
|
||||
|
||||
|
||||
@@ -40,9 +40,6 @@
|
||||
|
||||
#include "common/utils/LOG/log.h"
|
||||
|
||||
/*Flags showing if a mac agent has already been registered*/
|
||||
unsigned int mac_agent_registered[NUM_MAX_ENB];
|
||||
|
||||
/*Array containing the Agent-MAC interfaces*/
|
||||
AGENT_MAC_xface *agent_mac_xface[NUM_MAX_ENB];
|
||||
|
||||
@@ -83,7 +80,7 @@ int flexran_agent_mac_stats_reply(mid_t mod_id,
|
||||
|
||||
for (i = 0; i < report_config->nr_ue; i++) {
|
||||
|
||||
UE_id = flexran_get_ue_id(mod_id, i);
|
||||
UE_id = flexran_get_mac_ue_id(mod_id, i);
|
||||
|
||||
ue_report[i]->rnti = report_config->ue_report_type[i].ue_rnti;
|
||||
ue_report[i]->has_rnti = 1;
|
||||
@@ -102,12 +99,14 @@ int flexran_agent_mac_stats_reply(mid_t mod_id,
|
||||
}
|
||||
|
||||
ue_report[i]->bsr = elem;
|
||||
ue_report[i]->flags |= PROTOCOL__FLEX_UE_STATS_TYPE__FLUST_BSR;
|
||||
}
|
||||
|
||||
/* Check flag for creation of PHR report */
|
||||
if (report_config->ue_report_type[i].ue_report_flags & PROTOCOL__FLEX_UE_STATS_TYPE__FLUST_PHR) {
|
||||
ue_report[i]->phr = flexran_get_ue_phr (enb_id, UE_id); // eNB_UE_list->UE_template[UE_PCCID(enb_id,UE_id)][UE_id].phr_info;
|
||||
ue_report[i]->has_phr = 1;
|
||||
ue_report[i]->flags |= PROTOCOL__FLEX_UE_STATS_TYPE__FLUST_PHR;
|
||||
|
||||
}
|
||||
|
||||
@@ -148,7 +147,7 @@ int flexran_agent_mac_stats_reply(mid_t mod_id,
|
||||
// Add RLC buffer status reports to the full report
|
||||
if (ue_report[i]->n_rlc_report > 0)
|
||||
ue_report[i]->rlc_report = rlc_reports;
|
||||
|
||||
ue_report[i]->flags |= PROTOCOL__FLEX_UE_STATS_TYPE__FLUST_RLC_BS;
|
||||
|
||||
}
|
||||
|
||||
@@ -161,7 +160,7 @@ int flexran_agent_mac_stats_reply(mid_t mod_id,
|
||||
// found in stats_common.pb-c.h. See
|
||||
// flex_ce_type in FlexRAN specification
|
||||
ue_report[i]->has_pending_mac_ces = 1;
|
||||
|
||||
ue_report[i]->flags |= PROTOCOL__FLEX_UE_STATS_TYPE__FLUST_MAC_CE_BS;
|
||||
}
|
||||
|
||||
/* Check flag for creation of DL CQI report */
|
||||
@@ -386,7 +385,7 @@ int flexran_agent_mac_stats_reply(mid_t mod_id,
|
||||
dl_report->csi_report = csi_reports;
|
||||
//Add the DL CQI report to the stats report
|
||||
ue_report[i]->dl_cqi_report = dl_report;
|
||||
|
||||
ue_report[i]->flags |= PROTOCOL__FLEX_UE_STATS_TYPE__FLUST_DL_CQI;
|
||||
}
|
||||
|
||||
/* Check flag for creation of paging buffer status report */
|
||||
@@ -431,6 +430,7 @@ int flexran_agent_mac_stats_reply(mid_t mod_id,
|
||||
paging_report->paging_info = p_info;
|
||||
//Add the paging report to the UE report
|
||||
ue_report[i]->pbr = paging_report;
|
||||
ue_report[i]->flags |= PROTOCOL__FLEX_UE_STATS_TYPE__FLUST_PBS;
|
||||
}
|
||||
|
||||
/* Check flag for creation of UL CQI report */
|
||||
@@ -502,7 +502,7 @@ int flexran_agent_mac_stats_reply(mid_t mod_id,
|
||||
}
|
||||
// Add full UL CQI report to the UE report
|
||||
ue_report[i]->ul_cqi_report = full_ul_report;
|
||||
|
||||
ue_report[i]->flags |= PROTOCOL__FLEX_UE_STATS_TYPE__FLUST_UL_CQI;
|
||||
|
||||
}
|
||||
if (report_config->ue_report_type[i].ue_report_flags & PROTOCOL__FLEX_UE_STATS_TYPE__FLUST_MAC_STATS) {
|
||||
@@ -598,7 +598,7 @@ int flexran_agent_mac_stats_reply(mid_t mod_id,
|
||||
|
||||
|
||||
ue_report[i]->mac_stats = macstats;
|
||||
|
||||
ue_report[i]->flags |= PROTOCOL__FLEX_UE_STATS_TYPE__FLUST_MAC_STATS;
|
||||
}
|
||||
|
||||
|
||||
@@ -640,6 +640,7 @@ int flexran_agent_mac_stats_reply(mid_t mod_id,
|
||||
ni_report->p0_nominal_pucch = flexran_get_p0_nominal_pucch(enb_id, 0);
|
||||
ni_report->has_p0_nominal_pucch = 1;
|
||||
cell_report[i]->noise_inter_report = ni_report;
|
||||
cell_report[i]->flags |= PROTOCOL__FLEX_CELL_STATS_TYPE__FLCST_NOISE_INTERFERENCE;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -660,14 +661,9 @@ int flexran_agent_mac_stats_reply(mid_t mod_id,
|
||||
return -1;
|
||||
}
|
||||
|
||||
int flexran_agent_mac_destroy_stats_reply(Protocol__FlexranMessage *msg) {
|
||||
//TODO: Need to deallocate memory for the stats reply message
|
||||
if(msg->msg_case != PROTOCOL__FLEXRAN_MESSAGE__MSG_STATS_REPLY_MSG)
|
||||
goto error;
|
||||
free(msg->stats_reply_msg->header);
|
||||
int flexran_agent_mac_destroy_stats_reply(Protocol__FlexStatsReply *reply) {
|
||||
int i, j, k;
|
||||
|
||||
Protocol__FlexStatsReply *reply = msg->stats_reply_msg;
|
||||
Protocol__FlexDlCqiReport *dl_report;
|
||||
Protocol__FlexUlCqiReport *ul_report;
|
||||
Protocol__FlexPagingBufferReport *paging_report;
|
||||
@@ -758,25 +754,24 @@ int flexran_agent_mac_destroy_stats_reply(Protocol__FlexranMessage *msg) {
|
||||
free(ul_report->pucch_dbm[j]);
|
||||
}
|
||||
free(ul_report->pucch_dbm);
|
||||
free(ul_report);
|
||||
}
|
||||
if (reply->ue_report[i]->flags & PROTOCOL__FLEX_UE_STATS_TYPE__FLUST_MAC_STATS) {
|
||||
for (j = 0; j < reply->ue_report[i]->mac_stats->n_mac_sdus_dl; j++)
|
||||
free(reply->ue_report[i]->mac_stats->mac_sdus_dl[j]);
|
||||
free(reply->ue_report[i]->mac_stats->mac_sdus_dl);
|
||||
free(reply->ue_report[i]->mac_stats);
|
||||
}
|
||||
free(reply->ue_report[i]);
|
||||
}
|
||||
free(reply->ue_report);
|
||||
|
||||
// Free memory for all Cell reports
|
||||
for (i = 0; i < reply->n_cell_report; i++) {
|
||||
free(reply->cell_report[i]->noise_inter_report);
|
||||
free(reply->cell_report[i]);
|
||||
if (reply->cell_report[i]->flags & PROTOCOL__FLEX_CELL_STATS_TYPE__FLCST_NOISE_INTERFERENCE) {
|
||||
free(reply->cell_report[i]->noise_inter_report);
|
||||
}
|
||||
}
|
||||
free(reply->cell_report);
|
||||
|
||||
free(reply);
|
||||
free(msg);
|
||||
return 0;
|
||||
|
||||
error:
|
||||
//LOG_E(MAC, "%s: an error occured\n", __FUNCTION__);
|
||||
return -1;
|
||||
}
|
||||
|
||||
int flexran_agent_mac_sr_info(mid_t mod_id, const void *params, Protocol__FlexranMessage **msg) {
|
||||
@@ -905,7 +900,7 @@ int flexran_agent_mac_sf_trigger(mid_t mod_id, const void *params, Protocol__Fle
|
||||
|
||||
// LOG_I(FLEXRAN_AGENT, "Sending subframe trigger for frame %d and subframe %d\n", flexran_get_current_frame(mod_id), (flexran_get_current_subframe(mod_id) + 1) % 10);
|
||||
|
||||
sf_trigger_msg->n_dl_info = flexran_get_num_ues(mod_id);
|
||||
sf_trigger_msg->n_dl_info = flexran_get_mac_num_ues(mod_id);
|
||||
|
||||
Protocol__FlexDlInfo **dl_info = NULL;
|
||||
|
||||
@@ -921,9 +916,9 @@ int flexran_agent_mac_sf_trigger(mid_t mod_id, const void *params, Protocol__Fle
|
||||
dl_info[i] = malloc(sizeof(Protocol__FlexDlInfo));
|
||||
if(dl_info[i] == NULL)
|
||||
goto error;
|
||||
UE_id = flexran_get_ue_id(mod_id, i);
|
||||
UE_id = flexran_get_mac_ue_id(mod_id, i);
|
||||
protocol__flex_dl_info__init(dl_info[i]);
|
||||
dl_info[i]->rnti = flexran_get_ue_crnti(mod_id, UE_id);
|
||||
dl_info[i]->rnti = flexran_get_mac_ue_crnti(mod_id, UE_id);
|
||||
dl_info[i]->has_rnti = 1;
|
||||
/*Fill in the right id of this round's HARQ process for this UE*/
|
||||
// uint8_t harq_id;
|
||||
@@ -957,7 +952,7 @@ int flexran_agent_mac_sf_trigger(mid_t mod_id, const void *params, Protocol__Fle
|
||||
/* Fill in the number of UL reception status related info, based on the number of currently
|
||||
* transmitting UEs
|
||||
*/
|
||||
sf_trigger_msg->n_ul_info = flexran_get_num_ues(mod_id);
|
||||
sf_trigger_msg->n_ul_info = flexran_get_mac_num_ues(mod_id);
|
||||
|
||||
Protocol__FlexUlInfo **ul_info = NULL;
|
||||
|
||||
@@ -972,9 +967,9 @@ int flexran_agent_mac_sf_trigger(mid_t mod_id, const void *params, Protocol__Fle
|
||||
goto error;
|
||||
protocol__flex_ul_info__init(ul_info[i]);
|
||||
|
||||
UE_id = flexran_get_ue_id(mod_id, i);
|
||||
UE_id = flexran_get_mac_ue_id(mod_id, i);
|
||||
|
||||
ul_info[i]->rnti = flexran_get_ue_crnti(mod_id, UE_id);
|
||||
ul_info[i]->rnti = flexran_get_mac_ue_crnti(mod_id, UE_id);
|
||||
ul_info[i]->has_rnti = 1;
|
||||
/* Fill in the Tx power control command for this UE (if available),
|
||||
* primary carrier */
|
||||
@@ -1357,11 +1352,17 @@ void flexran_agent_send_sf_trigger(mid_t mod_id) {
|
||||
|
||||
|
||||
|
||||
int flexran_agent_register_mac_xface(mid_t mod_id, AGENT_MAC_xface *xface) {
|
||||
if (mac_agent_registered[mod_id]) {
|
||||
int flexran_agent_register_mac_xface(mid_t mod_id)
|
||||
{
|
||||
if (agent_mac_xface[mod_id]) {
|
||||
LOG_E(MAC, "MAC agent for eNB %d is already registered\n", mod_id);
|
||||
return -1;
|
||||
}
|
||||
AGENT_MAC_xface *xface = malloc(sizeof(AGENT_MAC_xface));
|
||||
if (!xface) {
|
||||
LOG_E(FLEXRAN_AGENT, "could not allocate memory for MAC agent xface %d\n", mod_id);
|
||||
return -1;
|
||||
}
|
||||
|
||||
//xface->agent_ctxt = &shared_ctxt[mod_id];
|
||||
xface->flexran_agent_send_sr_info = flexran_agent_send_sr_info;
|
||||
@@ -1371,14 +1372,125 @@ int flexran_agent_register_mac_xface(mid_t mod_id, AGENT_MAC_xface *xface) {
|
||||
|
||||
xface->dl_scheduler_loaded_lib = NULL;
|
||||
xface->ul_scheduler_loaded_lib = NULL;
|
||||
mac_agent_registered[mod_id] = 1;
|
||||
agent_mac_xface[mod_id] = xface;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int flexran_agent_unregister_mac_xface(mid_t mod_id, AGENT_MAC_xface *xface) {
|
||||
void flexran_agent_fill_mac_cell_config(mid_t mod_id, uint8_t cc_id,
|
||||
Protocol__FlexCellConfig *conf) {
|
||||
if (!conf->si_config) {
|
||||
conf->si_config = malloc(sizeof(Protocol__FlexSiConfig));
|
||||
if (conf->si_config)
|
||||
protocol__flex_si_config__init(conf->si_config);
|
||||
}
|
||||
|
||||
if (conf->si_config) {
|
||||
conf->si_config->sfn = flexran_get_current_system_frame_num(mod_id);
|
||||
conf->si_config->has_sfn = 1;
|
||||
}
|
||||
|
||||
/* get a pointer to the config which is maintained in the agent throughout
|
||||
* its lifetime */
|
||||
conf->slice_config = flexran_agent_get_slice_config(mod_id);
|
||||
}
|
||||
|
||||
void flexran_agent_fill_mac_ue_config(mid_t mod_id, mid_t ue_id,
|
||||
Protocol__FlexUeConfig *ue_conf)
|
||||
{
|
||||
if (ue_conf->has_rnti && ue_conf->rnti != flexran_get_mac_ue_crnti(mod_id, ue_id)) {
|
||||
LOG_E(FLEXRAN_AGENT, "ue_config existing RNTI %x does not match MAC RNTI %x\n",
|
||||
ue_conf->rnti, flexran_get_mac_ue_crnti(mod_id, ue_id));
|
||||
return;
|
||||
}
|
||||
ue_conf->rnti = flexran_get_mac_ue_crnti(mod_id, ue_id);
|
||||
ue_conf->has_rnti = 1;
|
||||
|
||||
ue_conf->dl_slice_id = flexran_get_ue_dl_slice_id(mod_id, ue_id);
|
||||
ue_conf->has_dl_slice_id = 1;
|
||||
ue_conf->ul_slice_id = flexran_get_ue_ul_slice_id(mod_id, ue_id);
|
||||
ue_conf->has_ul_slice_id = 1;
|
||||
|
||||
ue_conf->ue_aggregated_max_bitrate_ul = flexran_get_ue_aggregated_max_bitrate_ul(mod_id, ue_id);
|
||||
ue_conf->has_ue_aggregated_max_bitrate_ul = 1;
|
||||
|
||||
ue_conf->ue_aggregated_max_bitrate_dl = flexran_get_ue_aggregated_max_bitrate_dl(mod_id, ue_id);
|
||||
ue_conf->has_ue_aggregated_max_bitrate_dl = 1;
|
||||
|
||||
/* TODO update through RAN API */
|
||||
//config->has_pcell_carrier_index = 1;
|
||||
//config->pcell_carrier_index = UE_PCCID(mod_id, i);
|
||||
|
||||
//TODO: Set carrier aggregation support (boolean)
|
||||
}
|
||||
|
||||
void flexran_agent_fill_mac_lc_ue_config(mid_t mod_id, mid_t ue_id,
|
||||
Protocol__FlexLcUeConfig *lc_ue_conf)
|
||||
{
|
||||
lc_ue_conf->rnti = flexran_get_mac_ue_crnti(mod_id, ue_id);
|
||||
lc_ue_conf->has_rnti = 1;
|
||||
|
||||
lc_ue_conf->n_lc_config = flexran_get_num_ue_lcs(mod_id, ue_id);
|
||||
if (lc_ue_conf->n_lc_config == 0)
|
||||
return;
|
||||
|
||||
Protocol__FlexLcConfig **lc_config =
|
||||
calloc(lc_ue_conf->n_lc_config, sizeof(Protocol__FlexLcConfig *));
|
||||
if (!lc_config) {
|
||||
LOG_E(FLEXRAN_AGENT, "could not allocate memory for lc_config of UE %x\n", lc_ue_conf->rnti);
|
||||
lc_ue_conf->n_lc_config = 0;
|
||||
return; // can not allocate memory, skip rest
|
||||
}
|
||||
for (int j = 0; j < lc_ue_conf->n_lc_config; j++) {
|
||||
lc_config[j] = malloc(sizeof(Protocol__FlexLcConfig));
|
||||
if (!lc_config[j]) continue; // go over this error, try entry
|
||||
protocol__flex_lc_config__init(lc_config[j]);
|
||||
|
||||
lc_config[j]->has_lcid = 1;
|
||||
lc_config[j]->lcid = j+1;
|
||||
|
||||
const int lcg = flexran_get_lcg(mod_id, ue_id, j+1);
|
||||
if (lcg >= 0 && lcg <= 3) {
|
||||
lc_config[j]->has_lcg = 1;
|
||||
lc_config[j]->lcg = flexran_get_lcg(mod_id, ue_id, j+1);
|
||||
}
|
||||
|
||||
lc_config[j]->has_direction = 1;
|
||||
lc_config[j]->direction = flexran_get_direction(ue_id, j+1);
|
||||
//TODO: Bearer type. One of FLQBT_* values. Currently only default bearer supported
|
||||
lc_config[j]->has_qos_bearer_type = 1;
|
||||
lc_config[j]->qos_bearer_type = PROTOCOL__FLEX_QOS_BEARER_TYPE__FLQBT_NON_GBR;
|
||||
|
||||
//TODO: Set the QCI defined in TS 23.203, coded as defined in TS 36.413
|
||||
// One less than the actual QCI value. Needs to be generalized
|
||||
lc_config[j]->has_qci = 1;
|
||||
lc_config[j]->qci = 1;
|
||||
if (lc_config[j]->direction == PROTOCOL__FLEX_QOS_BEARER_TYPE__FLQBT_GBR) {
|
||||
/* TODO all of the need to be taken from API */
|
||||
//TODO: Set the max bitrate (UL)
|
||||
lc_config[j]->has_e_rab_max_bitrate_ul = 0;
|
||||
lc_config[j]->e_rab_max_bitrate_ul = 0;
|
||||
//TODO: Set the max bitrate (DL)
|
||||
lc_config[j]->has_e_rab_max_bitrate_dl = 0;
|
||||
lc_config[j]->e_rab_max_bitrate_dl = 0;
|
||||
//TODO: Set the guaranteed bitrate (UL)
|
||||
lc_config[j]->has_e_rab_guaranteed_bitrate_ul = 0;
|
||||
lc_config[j]->e_rab_guaranteed_bitrate_ul = 0;
|
||||
//TODO: Set the guaranteed bitrate (DL)
|
||||
lc_config[j]->has_e_rab_guaranteed_bitrate_dl = 0;
|
||||
lc_config[j]->e_rab_guaranteed_bitrate_dl = 0;
|
||||
}
|
||||
}
|
||||
lc_ue_conf->lc_config = lc_config;
|
||||
}
|
||||
|
||||
int flexran_agent_unregister_mac_xface(mid_t mod_id)
|
||||
{
|
||||
if (!agent_mac_xface[mod_id]) {
|
||||
LOG_E(FLEXRAN_AGENT, "MAC agent CM for eNB %d is not registered\n", mod_id);
|
||||
return -1;
|
||||
}
|
||||
AGENT_MAC_xface *xface = agent_mac_xface[mod_id];
|
||||
//xface->agent_ctxt = NULL;
|
||||
xface->flexran_agent_send_sr_info = NULL;
|
||||
xface->flexran_agent_send_sf_trigger = NULL;
|
||||
@@ -1387,12 +1499,17 @@ int flexran_agent_unregister_mac_xface(mid_t mod_id, AGENT_MAC_xface *xface) {
|
||||
|
||||
xface->dl_scheduler_loaded_lib = NULL;
|
||||
xface->ul_scheduler_loaded_lib = NULL;
|
||||
mac_agent_registered[mod_id] = 0;
|
||||
free(xface);
|
||||
agent_mac_xface[mod_id] = NULL;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
AGENT_MAC_xface *flexran_agent_get_mac_xface(mid_t mod_id)
|
||||
{
|
||||
return agent_mac_xface[mod_id];
|
||||
}
|
||||
|
||||
void flexran_create_config_structures(mid_t mod_id)
|
||||
{
|
||||
int i;
|
||||
|
||||
@@ -36,6 +36,8 @@
|
||||
|
||||
#include "flexran_agent_common.h"
|
||||
#include "flexran_agent_extern.h"
|
||||
// for flexran_agent_get_mac_xface()
|
||||
#include "flexran_agent_extern.h"
|
||||
|
||||
|
||||
/* Initialization function for the agent structures etc */
|
||||
@@ -51,7 +53,7 @@ int flexran_agent_mac_destroy_sf_trigger(Protocol__FlexranMessage *msg);
|
||||
|
||||
/* Statistics reply protocol message constructor and destructor */
|
||||
int flexran_agent_mac_stats_reply(mid_t mod_id, const report_config_t *report_config, Protocol__FlexUeStatsReport **ue_report, Protocol__FlexCellStatsReport **cell_report);
|
||||
int flexran_agent_mac_destroy_stats_reply(Protocol__FlexranMessage *msg);
|
||||
int flexran_agent_mac_destroy_stats_reply(Protocol__FlexStatsReply *reply);
|
||||
|
||||
/* DL MAC scheduling decision protocol message constructor (empty command) and destructor */
|
||||
int flexran_agent_mac_create_empty_dl_config(mid_t mod_id, Protocol__FlexranMessage **msg);
|
||||
@@ -81,11 +83,23 @@ void flexran_agent_send_update_mac_stats(mid_t mod_id);
|
||||
/// Provide to the scheduler a pending dl_mac_config message
|
||||
void flexran_agent_get_pending_dl_mac_config(mid_t mod_id, Protocol__FlexranMessage **msg);
|
||||
|
||||
/* Fill the MAC part of an cell_config message */
|
||||
void flexran_agent_fill_mac_cell_config(mid_t mod_id, uint8_t cc_id,
|
||||
Protocol__FlexCellConfig *conf);
|
||||
|
||||
/* Fill the MAC part of a ue_config message */
|
||||
void flexran_agent_fill_mac_ue_config(mid_t mod_id, mid_t ue_id,
|
||||
Protocol__FlexUeConfig *ue_conf);
|
||||
|
||||
/* Fill the lc_ue_config->lc_config message */
|
||||
void flexran_agent_fill_mac_lc_ue_config(mid_t mod_id, mid_t ue_id,
|
||||
Protocol__FlexLcUeConfig *lc_ue_conf);
|
||||
|
||||
/*Register technology specific interface callbacks*/
|
||||
int flexran_agent_register_mac_xface(mid_t mod_id, AGENT_MAC_xface *xface);
|
||||
int flexran_agent_register_mac_xface(mid_t mod_id);
|
||||
|
||||
/*Unregister technology specific callbacks*/
|
||||
int flexran_agent_unregister_mac_xface(mid_t mod_id, AGENT_MAC_xface*xface);
|
||||
int flexran_agent_unregister_mac_xface(mid_t mod_id);
|
||||
|
||||
/***************************************
|
||||
* FlexRAN agent - slice configuration *
|
||||
|
||||
@@ -790,9 +790,9 @@ int parse_dl_scheduler_parameters(mid_t mod_id, yaml_parser_t *parser) {
|
||||
goto error;
|
||||
}
|
||||
// Check what key needs to be set
|
||||
if (mac_agent_registered[mod_id]) {
|
||||
if (flexran_agent_get_mac_xface(mod_id)) {
|
||||
LOG_D(ENB_APP, "Setting parameter %s\n", event.data.scalar.value);
|
||||
param = dlsym(agent_mac_xface[mod_id]->dl_scheduler_loaded_lib,
|
||||
param = dlsym(flexran_agent_get_mac_xface(mod_id)->dl_scheduler_loaded_lib,
|
||||
(char *) event.data.scalar.value);
|
||||
if (param == NULL) {
|
||||
goto error;
|
||||
@@ -845,9 +845,9 @@ int parse_ul_scheduler_parameters(mid_t mod_id, yaml_parser_t *parser) {
|
||||
goto error;
|
||||
}
|
||||
// Check what key needs to be set
|
||||
if (mac_agent_registered[mod_id]) {
|
||||
if (flexran_agent_get_mac_xface(mod_id)) {
|
||||
LOG_D(ENB_APP, "Setting parameter %s\n", event.data.scalar.value);
|
||||
param = dlsym(agent_mac_xface[mod_id]->ul_scheduler_loaded_lib,
|
||||
param = dlsym(flexran_agent_get_mac_xface(mod_id)->ul_scheduler_loaded_lib,
|
||||
(char *) event.data.scalar.value);
|
||||
if (param == NULL) {
|
||||
goto error;
|
||||
@@ -891,11 +891,11 @@ int load_dl_scheduler_function(mid_t mod_id, const char *function_name) {
|
||||
LOG_I(FLEXRAN_AGENT, "Loading function: %s\n", function_name);
|
||||
void *loaded_scheduler = dlsym(lib, function_name);
|
||||
if (loaded_scheduler) {
|
||||
if (mac_agent_registered[mod_id]) {
|
||||
if (agent_mac_xface[mod_id]->dl_scheduler_loaded_lib != NULL) {
|
||||
dlclose(agent_mac_xface[mod_id]->dl_scheduler_loaded_lib);
|
||||
if (flexran_agent_get_mac_xface(mod_id)) {
|
||||
if (flexran_agent_get_mac_xface(mod_id)->dl_scheduler_loaded_lib != NULL) {
|
||||
dlclose(flexran_agent_get_mac_xface(mod_id)->dl_scheduler_loaded_lib);
|
||||
}
|
||||
agent_mac_xface[mod_id]->dl_scheduler_loaded_lib = lib;
|
||||
flexran_agent_get_mac_xface(mod_id)->dl_scheduler_loaded_lib = lib;
|
||||
LOG_I(FLEXRAN_AGENT, "New DL UE scheduler: %s\n", function_name);
|
||||
}
|
||||
} else {
|
||||
|
||||
@@ -28,42 +28,36 @@
|
||||
|
||||
#include "flexran_agent_pdcp.h"
|
||||
|
||||
|
||||
/*Trigger boolean for PDCP measurement*/
|
||||
bool triggered_pdcp = false;
|
||||
/*Flags showing if a pdcp agent has already been registered*/
|
||||
unsigned int pdcp_agent_registered[NUM_MAX_ENB];
|
||||
|
||||
/*Array containing the Agent-PDCP interfaces*/
|
||||
AGENT_PDCP_xface *agent_pdcp_xface[NUM_MAX_ENB];
|
||||
|
||||
// MAX_MOBILES_PER_ENB
|
||||
|
||||
void flexran_agent_pdcp_aggregate_stats(const mid_t mod_id,
|
||||
const mid_t ue_id,
|
||||
uint16_t uid,
|
||||
Protocol__FlexPdcpStats *pdcp_aggr_stats){
|
||||
|
||||
int lcid=0;
|
||||
/* only calculate the DRBs */
|
||||
//LOG_I(FLEXRAN_AGENT, "enb %d ue %d \n", mod_id, ue_id);
|
||||
//LOG_I(FLEXRAN_AGENT, "enb %d ue %d \n", mod_id, uid);
|
||||
|
||||
for (lcid=NUM_MAX_SRB ; lcid < NUM_MAX_SRB + NUM_MAX_DRB; lcid++){
|
||||
|
||||
pdcp_aggr_stats->pkt_tx += flexran_get_pdcp_tx(mod_id,ue_id,lcid);
|
||||
pdcp_aggr_stats->pkt_tx_bytes += flexran_get_pdcp_tx_bytes(mod_id,ue_id,lcid);
|
||||
pdcp_aggr_stats->pkt_tx_w += flexran_get_pdcp_tx_w(mod_id,ue_id,lcid);
|
||||
pdcp_aggr_stats->pkt_tx_bytes_w += flexran_get_pdcp_tx_bytes_w(mod_id,ue_id,lcid);
|
||||
pdcp_aggr_stats->pkt_tx_aiat += flexran_get_pdcp_tx_aiat(mod_id,ue_id,lcid);
|
||||
pdcp_aggr_stats->pkt_tx_aiat_w += flexran_get_pdcp_tx_aiat_w(mod_id,ue_id,lcid);
|
||||
pdcp_aggr_stats->pkt_tx += flexran_get_pdcp_tx(mod_id, uid, lcid);
|
||||
pdcp_aggr_stats->pkt_tx_bytes += flexran_get_pdcp_tx_bytes(mod_id, uid, lcid);
|
||||
pdcp_aggr_stats->pkt_tx_w += flexran_get_pdcp_tx_w(mod_id, uid, lcid);
|
||||
pdcp_aggr_stats->pkt_tx_bytes_w += flexran_get_pdcp_tx_bytes_w(mod_id, uid, lcid);
|
||||
pdcp_aggr_stats->pkt_tx_aiat += flexran_get_pdcp_tx_aiat(mod_id, uid, lcid);
|
||||
pdcp_aggr_stats->pkt_tx_aiat_w += flexran_get_pdcp_tx_aiat_w(mod_id, uid, lcid);
|
||||
|
||||
|
||||
pdcp_aggr_stats->pkt_rx += flexran_get_pdcp_rx(mod_id,ue_id,lcid);
|
||||
pdcp_aggr_stats->pkt_rx_bytes += flexran_get_pdcp_rx_bytes(mod_id,ue_id,lcid);
|
||||
pdcp_aggr_stats->pkt_rx_w += flexran_get_pdcp_rx_w(mod_id,ue_id,lcid);
|
||||
pdcp_aggr_stats->pkt_rx_bytes_w += flexran_get_pdcp_rx_bytes_w(mod_id,ue_id,lcid);
|
||||
pdcp_aggr_stats->pkt_rx_aiat += flexran_get_pdcp_rx_aiat(mod_id,ue_id,lcid);
|
||||
pdcp_aggr_stats->pkt_rx_aiat_w += flexran_get_pdcp_rx_aiat_w(mod_id,ue_id,lcid);
|
||||
pdcp_aggr_stats->pkt_rx_oo += flexran_get_pdcp_rx_oo(mod_id,ue_id,lcid);
|
||||
pdcp_aggr_stats->pkt_rx += flexran_get_pdcp_rx(mod_id, uid, lcid);
|
||||
pdcp_aggr_stats->pkt_rx_bytes += flexran_get_pdcp_rx_bytes(mod_id, uid, lcid);
|
||||
pdcp_aggr_stats->pkt_rx_w += flexran_get_pdcp_rx_w(mod_id, uid, lcid);
|
||||
pdcp_aggr_stats->pkt_rx_bytes_w += flexran_get_pdcp_rx_bytes_w(mod_id, uid, lcid);
|
||||
pdcp_aggr_stats->pkt_rx_aiat += flexran_get_pdcp_rx_aiat(mod_id, uid, lcid);
|
||||
pdcp_aggr_stats->pkt_rx_aiat_w += flexran_get_pdcp_rx_aiat_w(mod_id, uid, lcid);
|
||||
pdcp_aggr_stats->pkt_rx_oo += flexran_get_pdcp_rx_oo(mod_id, uid, lcid);
|
||||
|
||||
}
|
||||
|
||||
@@ -78,7 +72,6 @@ int flexran_agent_pdcp_stats_reply(mid_t mod_id,
|
||||
|
||||
// Protocol__FlexHeader *header;
|
||||
int i;
|
||||
int UE_id;
|
||||
// int cc_id = 0;
|
||||
|
||||
|
||||
@@ -86,7 +79,8 @@ int flexran_agent_pdcp_stats_reply(mid_t mod_id,
|
||||
if (report_config->nr_ue > 0) {
|
||||
|
||||
for (i = 0; i < report_config->nr_ue; i++) {
|
||||
UE_id = flexran_get_ue_id(mod_id, i);
|
||||
const rnti_t rnti = report_config->ue_report_type[i].ue_rnti;
|
||||
const uint16_t uid = flexran_get_pdcp_uid_from_rnti(mod_id, rnti);
|
||||
|
||||
/* Check flag for creation of buffer status report */
|
||||
if (report_config->ue_report_type[i].ue_report_flags & PROTOCOL__FLEX_UE_STATS_TYPE__FLUST_PDCP_STATS) {
|
||||
@@ -97,7 +91,7 @@ int flexran_agent_pdcp_stats_reply(mid_t mod_id,
|
||||
goto error;
|
||||
protocol__flex_pdcp_stats__init(pdcp_aggr_stats);
|
||||
|
||||
flexran_agent_pdcp_aggregate_stats(mod_id, UE_id, pdcp_aggr_stats);
|
||||
flexran_agent_pdcp_aggregate_stats(mod_id, uid, pdcp_aggr_stats);
|
||||
|
||||
pdcp_aggr_stats->has_pkt_tx=1;
|
||||
pdcp_aggr_stats->has_pkt_tx_bytes =1;
|
||||
@@ -106,7 +100,7 @@ int flexran_agent_pdcp_stats_reply(mid_t mod_id,
|
||||
pdcp_aggr_stats->has_pkt_tx_aiat =1;
|
||||
pdcp_aggr_stats->has_pkt_tx_aiat_w =1;
|
||||
|
||||
pdcp_aggr_stats->pkt_tx_sn = flexran_get_pdcp_tx_sn(mod_id, UE_id, DEFAULT_DRB);
|
||||
pdcp_aggr_stats->pkt_tx_sn = flexran_get_pdcp_tx_sn(mod_id, uid, DEFAULT_DRB);
|
||||
pdcp_aggr_stats->has_pkt_tx_sn =1;
|
||||
|
||||
pdcp_aggr_stats->has_pkt_rx =1;
|
||||
@@ -117,14 +111,14 @@ int flexran_agent_pdcp_stats_reply(mid_t mod_id,
|
||||
pdcp_aggr_stats->has_pkt_rx_aiat_w =1;
|
||||
pdcp_aggr_stats->has_pkt_rx_oo =1;
|
||||
|
||||
pdcp_aggr_stats->pkt_rx_sn = flexran_get_pdcp_rx_sn(mod_id, UE_id, DEFAULT_DRB);
|
||||
pdcp_aggr_stats->pkt_rx_sn = flexran_get_pdcp_rx_sn(mod_id, uid, DEFAULT_DRB);
|
||||
pdcp_aggr_stats->has_pkt_rx_sn =1;
|
||||
|
||||
pdcp_aggr_stats->sfn = flexran_get_pdcp_sfn(mod_id);
|
||||
pdcp_aggr_stats->has_sfn =1;
|
||||
|
||||
ue_report[i]->pdcp_stats = pdcp_aggr_stats;
|
||||
|
||||
ue_report[i]->flags |= PROTOCOL__FLEX_UE_STATS_TYPE__FLUST_PDCP_STATS;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
@@ -144,30 +138,51 @@ int flexran_agent_pdcp_stats_reply(mid_t mod_id,
|
||||
return -1;
|
||||
}
|
||||
|
||||
int flexran_agent_pdcp_destroy_stats_reply(Protocol__FlexStatsReply *reply)
|
||||
{
|
||||
for (int i = 0; i < reply->n_ue_report; ++i) {
|
||||
if (reply->ue_report[i]->pdcp_stats)
|
||||
free(reply->ue_report[i]->pdcp_stats);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
int flexran_agent_register_pdcp_xface(mid_t mod_id, AGENT_PDCP_xface *xface) {
|
||||
if (pdcp_agent_registered[mod_id]) {
|
||||
LOG_E(PDCP, "PDCP agent for eNB %d is already registered\n", mod_id);
|
||||
int flexran_agent_register_pdcp_xface(mid_t mod_id)
|
||||
{
|
||||
if (agent_pdcp_xface[mod_id]) {
|
||||
LOG_E(FLEXRAN_AGENT, "PDCP agent CM for eNB %d is already registered\n", mod_id);
|
||||
return -1;
|
||||
}
|
||||
AGENT_PDCP_xface *xface = malloc(sizeof(AGENT_PDCP_xface));
|
||||
if (!xface) {
|
||||
LOG_E(FLEXRAN_AGENT, "could not allocate memory for PDCP agent xface %d\n", mod_id);
|
||||
return -1;
|
||||
}
|
||||
|
||||
//xface->flexran_pdcp_stats_measurement = NULL;
|
||||
|
||||
pdcp_agent_registered[mod_id] = 1;
|
||||
agent_pdcp_xface[mod_id] = xface;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int flexran_agent_unregister_pdcp_xface(mid_t mod_id, AGENT_PDCP_xface *xface) {
|
||||
|
||||
int flexran_agent_unregister_pdcp_xface(mid_t mod_id)
|
||||
{
|
||||
if (!agent_pdcp_xface[mod_id]) {
|
||||
LOG_E(FLEXRAN_AGENT, "PDCP agent CM for eNB %d is not registered\n", mod_id);
|
||||
return -1;
|
||||
}
|
||||
//xface->agent_ctxt = NULL;
|
||||
//xface->flexran_pdcp_stats_measurement = NULL;
|
||||
|
||||
|
||||
pdcp_agent_registered[mod_id] = 0;
|
||||
free(agent_pdcp_xface[mod_id]);
|
||||
agent_pdcp_xface[mod_id] = NULL;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
AGENT_PDCP_xface *flexran_agent_get_pdcp_xface(mid_t mod_id)
|
||||
{
|
||||
return agent_pdcp_xface[mod_id];
|
||||
}
|
||||
|
||||
@@ -39,6 +39,8 @@
|
||||
#include "flexran_agent_defs.h"
|
||||
#include "flexran_agent_pdcp_defs.h"
|
||||
#include "flexran_agent_ran_api.h"
|
||||
// for flexran_agent_get_pdcp_xface()
|
||||
#include "flexran_agent_extern.h"
|
||||
|
||||
/**********************************
|
||||
* FlexRAN agent - technology PDCP API
|
||||
@@ -49,16 +51,17 @@ int flexran_agent_pdcp_stats_reply(mid_t mod_id,
|
||||
const report_config_t *report_config,
|
||||
Protocol__FlexUeStatsReport **ue_report,
|
||||
Protocol__FlexCellStatsReport **cell_report);
|
||||
int flexran_agent_pdcp_destroy_stats_reply(Protocol__FlexStatsReply *reply);
|
||||
|
||||
/* Get the stats from RAN API and aggregate them per USER*/
|
||||
void flexran_agent_pdcp_aggregate_stats(const mid_t mod_id,
|
||||
const mid_t ue_id,
|
||||
uint16_t uid,
|
||||
Protocol__FlexPdcpStats *pdcp_aggr_stats);
|
||||
|
||||
/*Register technology specific interface callbacks*/
|
||||
int flexran_agent_register_pdcp_xface(mid_t mod_id, AGENT_PDCP_xface *xface);
|
||||
int flexran_agent_register_pdcp_xface(mid_t mod_id);
|
||||
|
||||
/*Unregister technology specific callbacks*/
|
||||
int flexran_agent_unregister_pdcp_xface(mid_t mod_id, AGENT_PDCP_xface*xface);
|
||||
int flexran_agent_unregister_pdcp_xface(mid_t mod_id);
|
||||
|
||||
#endif
|
||||
|
||||
@@ -0,0 +1,179 @@
|
||||
/*
|
||||
* 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
|
||||
* the OAI Public License, Version 1.1 (the "License"); you may not use this file
|
||||
* 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 flexran_agent_phy.c
|
||||
* \brief FlexRAN agent Control Module PHY
|
||||
* \author Robert Schmidt
|
||||
* \date Oct 2018
|
||||
*/
|
||||
|
||||
#include "flexran_agent_phy.h"
|
||||
#include "flexran_agent_ran_api.h"
|
||||
|
||||
/* Array containing the Agent-PHY interfaces */
|
||||
AGENT_PHY_xface *agent_phy_xface[NUM_MAX_ENB];
|
||||
|
||||
void flexran_agent_fill_phy_cell_config(mid_t mod_id, uint8_t cc_id,
|
||||
Protocol__FlexCellConfig *conf) {
|
||||
conf->phy_cell_id = flexran_get_cell_id(mod_id, cc_id);
|
||||
conf->has_phy_cell_id = 1;
|
||||
|
||||
conf->pusch_hopping_offset = flexran_get_hopping_offset(mod_id, cc_id);
|
||||
conf->has_pusch_hopping_offset = 1;
|
||||
|
||||
conf->hopping_mode = flexran_get_hopping_mode(mod_id, cc_id);
|
||||
conf->has_hopping_mode = 1;
|
||||
|
||||
conf->n_sb = flexran_get_n_SB(mod_id, cc_id);
|
||||
conf->has_n_sb = 1;
|
||||
|
||||
conf->phich_resource = flexran_get_phich_resource(mod_id, cc_id);
|
||||
conf->has_phich_resource = 1;
|
||||
|
||||
conf->phich_duration = flexran_get_phich_duration(mod_id, cc_id);
|
||||
conf->has_phich_duration = 1;
|
||||
|
||||
conf->init_nr_pdcch_ofdm_sym = flexran_get_num_pdcch_symb(mod_id, cc_id);
|
||||
conf->has_init_nr_pdcch_ofdm_sym = 1;
|
||||
|
||||
conf->dl_bandwidth = flexran_get_N_RB_DL(mod_id, cc_id);
|
||||
conf->has_dl_bandwidth = 1;
|
||||
|
||||
conf->ul_bandwidth = flexran_get_N_RB_UL(mod_id, cc_id);
|
||||
conf->has_ul_bandwidth = 1;
|
||||
|
||||
conf->ul_cyclic_prefix_length = flexran_get_ul_cyclic_prefix_length(mod_id, cc_id);
|
||||
conf->has_ul_cyclic_prefix_length = 1;
|
||||
|
||||
conf->dl_cyclic_prefix_length = flexran_get_dl_cyclic_prefix_length(mod_id, cc_id);
|
||||
conf->has_dl_cyclic_prefix_length = 1;
|
||||
|
||||
conf->antenna_ports_count = flexran_get_antenna_ports(mod_id, cc_id);
|
||||
conf->has_antenna_ports_count = 1;
|
||||
|
||||
conf->duplex_mode = flexran_get_duplex_mode(mod_id, cc_id);
|
||||
conf->has_duplex_mode = 1;
|
||||
|
||||
conf->subframe_assignment = flexran_get_subframe_assignment(mod_id, cc_id);
|
||||
conf->has_subframe_assignment = 1;
|
||||
|
||||
conf->special_subframe_patterns = flexran_get_special_subframe_assignment(mod_id, cc_id);
|
||||
conf->has_special_subframe_patterns = 1;
|
||||
|
||||
//TODO: Fill in with actual value, The MBSFN radio frame period
|
||||
conf->n_mbsfn_subframe_config_rfperiod = 0;
|
||||
uint32_t *elem_rfperiod = malloc(sizeof(uint32_t) * conf->n_mbsfn_subframe_config_rfperiod);
|
||||
if (elem_rfperiod)
|
||||
for(int j = 0; j < conf->n_mbsfn_subframe_config_rfperiod; j++)
|
||||
elem_rfperiod[j] = 1;
|
||||
conf->mbsfn_subframe_config_rfperiod = elem_rfperiod;
|
||||
|
||||
//TODO: Fill in with actual value, The MBSFN radio frame offset
|
||||
conf->n_mbsfn_subframe_config_rfoffset = 0;
|
||||
uint32_t *elem_rfoffset = malloc(sizeof(uint32_t) * conf->n_mbsfn_subframe_config_rfoffset);
|
||||
if (elem_rfoffset)
|
||||
for(int j = 0; j < conf->n_mbsfn_subframe_config_rfoffset; j++)
|
||||
elem_rfoffset[j] = 1;
|
||||
conf->mbsfn_subframe_config_rfoffset = elem_rfoffset;
|
||||
|
||||
//TODO: Fill in with actual value, Bitmap indicating the MBSFN subframes
|
||||
conf->n_mbsfn_subframe_config_sfalloc = 0;
|
||||
uint32_t *elem_sfalloc = malloc(sizeof(uint32_t) * conf->n_mbsfn_subframe_config_sfalloc);
|
||||
if (elem_sfalloc)
|
||||
for(int j = 0; j < conf->n_mbsfn_subframe_config_sfalloc; j++)
|
||||
elem_sfalloc[j] = 1;
|
||||
conf->mbsfn_subframe_config_sfalloc = elem_sfalloc;
|
||||
|
||||
conf->prach_config_index = flexran_get_prach_ConfigIndex(mod_id, cc_id);
|
||||
conf->has_prach_config_index = 1;
|
||||
|
||||
conf->prach_freq_offset = flexran_get_prach_FreqOffset(mod_id, cc_id);
|
||||
conf->has_prach_freq_offset = 1;
|
||||
|
||||
conf->max_harq_msg3tx = flexran_get_maxHARQ_Msg3Tx(mod_id, cc_id);
|
||||
conf->has_max_harq_msg3tx = 1;
|
||||
|
||||
conf->n1pucch_an = flexran_get_n1pucch_an(mod_id, cc_id);
|
||||
conf->has_n1pucch_an = 1;
|
||||
|
||||
conf->deltapucch_shift = flexran_get_deltaPUCCH_Shift(mod_id, cc_id);
|
||||
conf->has_deltapucch_shift = 1;
|
||||
|
||||
conf->nrb_cqi = flexran_get_nRB_CQI(mod_id, cc_id);
|
||||
conf->has_nrb_cqi = 1;
|
||||
|
||||
conf->srs_subframe_config = flexran_get_srs_SubframeConfig(mod_id, cc_id);
|
||||
conf->has_srs_subframe_config = 1;
|
||||
|
||||
conf->srs_bw_config = flexran_get_srs_BandwidthConfig(mod_id, cc_id);
|
||||
conf->has_srs_bw_config = 1;
|
||||
|
||||
conf->srs_mac_up_pts = flexran_get_srs_MaxUpPts(mod_id, cc_id);
|
||||
conf->has_srs_mac_up_pts = 1;
|
||||
|
||||
conf->dl_freq = flexran_agent_get_operating_dl_freq (mod_id, cc_id);
|
||||
conf->has_dl_freq = 1;
|
||||
|
||||
conf->ul_freq = flexran_agent_get_operating_ul_freq (mod_id, cc_id);
|
||||
conf->has_ul_freq = 1;
|
||||
|
||||
conf->eutra_band = flexran_agent_get_operating_eutra_band (mod_id, cc_id);
|
||||
conf->has_eutra_band = 1;
|
||||
|
||||
conf->dl_pdsch_power = flexran_agent_get_operating_pdsch_refpower(mod_id, cc_id);
|
||||
conf->has_dl_pdsch_power = 1;
|
||||
|
||||
conf->enable_64qam = flexran_get_enable64QAM(mod_id, cc_id);
|
||||
conf->has_enable_64qam = 1;
|
||||
}
|
||||
|
||||
int flexran_agent_register_phy_xface(mid_t mod_id) {
|
||||
if (agent_phy_xface[mod_id]) {
|
||||
LOG_E(PHY, "PHY agent for eNB %d is already registered\n", mod_id);
|
||||
return -1;
|
||||
}
|
||||
|
||||
AGENT_PHY_xface *xface = malloc(sizeof(AGENT_PHY_xface));
|
||||
|
||||
if (!xface) {
|
||||
LOG_E(FLEXRAN_AGENT, "could not allocate memory for PHY agent xface %d\n", mod_id);
|
||||
return -1;
|
||||
}
|
||||
|
||||
agent_phy_xface[mod_id] = xface;
|
||||
return 0;
|
||||
}
|
||||
|
||||
int flexran_agent_unregister_phy_xface(mid_t mod_id)
|
||||
{
|
||||
if (!agent_phy_xface[mod_id]) {
|
||||
LOG_E(FLEXRAN_AGENT, "PHY agent for eNB %d is not registered\n", mod_id);
|
||||
return -1;
|
||||
}
|
||||
free(agent_phy_xface[mod_id]);
|
||||
agent_phy_xface[mod_id] = NULL;
|
||||
return 0;
|
||||
}
|
||||
|
||||
AGENT_PHY_xface *flexran_agent_get_phy_xface(mid_t mod_id)
|
||||
{
|
||||
return agent_phy_xface[mod_id];
|
||||
}
|
||||
@@ -0,0 +1,58 @@
|
||||
/*
|
||||
* 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
|
||||
* the OAI Public License, Version 1.1 (the "License"); you may not use this file
|
||||
* 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 flexran_agent_phy.h
|
||||
* \brief FlexRAN agent Control Module PHY header
|
||||
* \author Robert Schmidt
|
||||
* \date Oct 2018
|
||||
*/
|
||||
|
||||
#ifndef FLEXRAN_AGENT_PHY_H_
|
||||
#define FLEXRAN_AGENT_PHY_H_
|
||||
|
||||
#include "header.pb-c.h"
|
||||
#include "flexran.pb-c.h"
|
||||
#include "stats_messages.pb-c.h"
|
||||
#include "stats_common.pb-c.h"
|
||||
|
||||
|
||||
#include "flexran_agent_common.h"
|
||||
#include "flexran_agent_defs.h"
|
||||
#include "flexran_agent_phy_defs.h"
|
||||
#include "flexran_agent_ran_api.h"
|
||||
// for flexran_agent_get_phy_xface()
|
||||
#include "flexran_agent_extern.h"
|
||||
|
||||
/**********************************
|
||||
* FlexRAN agent - technology PHY API
|
||||
**********************************/
|
||||
|
||||
/* Fill the PHY part of an cell_config message */
|
||||
void flexran_agent_fill_phy_cell_config(mid_t mod_id, uint8_t cc_id,
|
||||
Protocol__FlexCellConfig *conf);
|
||||
|
||||
/* Register technology specific interface callbacks */
|
||||
int flexran_agent_register_phy_xface(mid_t mod_id);
|
||||
|
||||
/* Unregister technology specific callbacks */
|
||||
int flexran_agent_unregister_phy_xface(mid_t mod_id);
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,35 @@
|
||||
/*
|
||||
* 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
|
||||
* the OAI Public License, Version 1.1 (the "License"); you may not use this file
|
||||
* 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
|
||||
*/
|
||||
#ifndef __FLEXRAN_AGENT_PHY_PRIMITIVES_H__
|
||||
#define __FLEXRAN_AGENT_PHY_PRIMITIVES_H__
|
||||
|
||||
#include "flexran_agent_defs.h"
|
||||
#include "flexran.pb-c.h"
|
||||
#include "header.pb-c.h"
|
||||
|
||||
/* FLEXRAN AGENT-PHY Interface */
|
||||
typedef struct {
|
||||
|
||||
/* currently empty, will be used to control RU */
|
||||
|
||||
} AGENT_PHY_xface;
|
||||
|
||||
#endif /* __FLEXRAN_AGENT_PHY_PRIMITIVES_H__ */
|
||||
@@ -27,7 +27,7 @@
|
||||
*/
|
||||
|
||||
#include "flexran_agent_rrc.h"
|
||||
|
||||
#include "flexran_agent_ran_api.h"
|
||||
|
||||
#include "liblfds700.h"
|
||||
|
||||
@@ -36,9 +36,6 @@
|
||||
/*Trigger boolean for RRC measurement*/
|
||||
bool triggered_rrc = false;
|
||||
|
||||
/*Flags showing if an rrc agent has already been registered*/
|
||||
unsigned int rrc_agent_registered[NUM_MAX_ENB];
|
||||
|
||||
/*Array containing the Agent-RRC interfaces*/
|
||||
AGENT_RRC_xface *agent_rrc_xface[NUM_MAX_ENB];
|
||||
|
||||
@@ -71,154 +68,21 @@ void flexran_agent_ue_state_change(mid_t mod_id, uint32_t rnti, uint8_t state_ch
|
||||
goto error;
|
||||
}
|
||||
protocol__flex_ue_config__init(config);
|
||||
if (state_change == PROTOCOL__FLEX_UE_STATE_CHANGE_TYPE__FLUESC_DEACTIVATED) {
|
||||
// Simply set the rnti of the UE
|
||||
switch (state_change) {
|
||||
case PROTOCOL__FLEX_UE_STATE_CHANGE_TYPE__FLUESC_DEACTIVATED:
|
||||
config->has_rnti = 1;
|
||||
config->rnti = rnti;
|
||||
} else if (state_change == PROTOCOL__FLEX_UE_STATE_CHANGE_TYPE__FLUESC_UPDATED
|
||||
|| state_change == PROTOCOL__FLEX_UE_STATE_CHANGE_TYPE__FLUESC_ACTIVATED) {
|
||||
int i = find_UE_id(mod_id, rnti);
|
||||
config->has_rnti = 1;
|
||||
config->rnti = rnti;
|
||||
config->imsi = flexran_get_ue_imsi(mod_id, i);
|
||||
config->has_imsi = 1;
|
||||
config->dl_slice_id = flexran_get_ue_dl_slice_id(mod_id, i);
|
||||
config->has_dl_slice_id = 1;
|
||||
config->ul_slice_id = flexran_get_ue_ul_slice_id(mod_id, i);
|
||||
config->has_ul_slice_id = 1;
|
||||
if(flexran_get_time_alignment_timer(mod_id,i) != -1) {
|
||||
config->time_alignment_timer = flexran_get_time_alignment_timer(mod_id,i);
|
||||
config->has_time_alignment_timer = 1;
|
||||
}
|
||||
if(flexran_get_meas_gap_config(mod_id,i) != -1){
|
||||
config->meas_gap_config_pattern = flexran_get_meas_gap_config(mod_id,i);
|
||||
config->has_meas_gap_config_pattern = 1;
|
||||
}
|
||||
if(config->has_meas_gap_config_pattern == 1 &&
|
||||
config->meas_gap_config_pattern != PROTOCOL__FLEX_MEAS_GAP_CONFIG_PATTERN__FLMGCP_OFF) {
|
||||
config->meas_gap_config_sf_offset = flexran_get_meas_gap_config_offset(mod_id,i);
|
||||
config->has_meas_gap_config_sf_offset = 1;
|
||||
}
|
||||
//TODO: Set the SPS configuration (Optional)
|
||||
//Not supported for now, so we do not set it
|
||||
|
||||
//TODO: Set the SR configuration (Optional)
|
||||
//We do not set it for now
|
||||
|
||||
//TODO: Set the CQI configuration (Optional)
|
||||
//We do not set it for now
|
||||
|
||||
if(flexran_get_ue_transmission_mode(mod_id,i) != -1) {
|
||||
config->transmission_mode = flexran_get_ue_transmission_mode(mod_id,i);
|
||||
config->has_transmission_mode = 1;
|
||||
}
|
||||
|
||||
config->ue_aggregated_max_bitrate_ul = flexran_get_ue_aggregated_max_bitrate_ul(mod_id,i);
|
||||
config->has_ue_aggregated_max_bitrate_ul = 1;
|
||||
|
||||
config->ue_aggregated_max_bitrate_dl = flexran_get_ue_aggregated_max_bitrate_dl(mod_id,i);
|
||||
config->has_ue_aggregated_max_bitrate_dl = 1;
|
||||
|
||||
Protocol__FlexUeCapabilities *c_capabilities;
|
||||
c_capabilities = malloc(sizeof(Protocol__FlexUeCapabilities));
|
||||
protocol__flex_ue_capabilities__init(c_capabilities);
|
||||
c_capabilities->has_half_duplex = 1;
|
||||
c_capabilities->half_duplex = flexran_get_half_duplex(mod_id, i);
|
||||
c_capabilities->has_intra_sf_hopping = 1;
|
||||
c_capabilities->intra_sf_hopping = flexran_get_intra_sf_hopping(mod_id, i);
|
||||
c_capabilities->has_type2_sb_1 = 1;
|
||||
c_capabilities->type2_sb_1 = flexran_get_type2_sb_1(mod_id, i);
|
||||
c_capabilities->has_ue_category = 1;
|
||||
c_capabilities->ue_category = flexran_get_ue_category(mod_id, i);
|
||||
c_capabilities->has_res_alloc_type1 = 1;
|
||||
c_capabilities->res_alloc_type1 = flexran_get_res_alloc_type1(mod_id, i);
|
||||
//Set the capabilites to the message
|
||||
config->capabilities = c_capabilities;
|
||||
|
||||
if(flexran_get_ue_transmission_antenna(mod_id,i) != -1) {
|
||||
config->has_ue_transmission_antenna = 1;
|
||||
config->ue_transmission_antenna = flexran_get_ue_transmission_antenna(mod_id,i);
|
||||
}
|
||||
|
||||
if(flexran_get_tti_bundling(mod_id,i) != -1) {
|
||||
config->has_tti_bundling = 1;
|
||||
config->tti_bundling = flexran_get_tti_bundling(mod_id,i);
|
||||
}
|
||||
|
||||
if(flexran_get_maxHARQ_TX(mod_id,i) != -1){
|
||||
config->has_max_harq_tx = 1;
|
||||
config->max_harq_tx = flexran_get_maxHARQ_TX(mod_id,i);
|
||||
}
|
||||
|
||||
if(flexran_get_beta_offset_ack_index(mod_id,i) != -1) {
|
||||
config->has_beta_offset_ack_index = 1;
|
||||
config->beta_offset_ack_index = flexran_get_beta_offset_ack_index(mod_id,i);
|
||||
}
|
||||
|
||||
if(flexran_get_beta_offset_ri_index(mod_id,i) != -1) {
|
||||
config->has_beta_offset_ri_index = 1;
|
||||
config->beta_offset_ri_index = flexran_get_beta_offset_ri_index(mod_id,i);
|
||||
}
|
||||
|
||||
if(flexran_get_beta_offset_cqi_index(mod_id,i) != -1) {
|
||||
config->has_beta_offset_cqi_index = 1;
|
||||
config->beta_offset_cqi_index = flexran_get_beta_offset_cqi_index(mod_id,i);
|
||||
}
|
||||
|
||||
/* assume primary carrier */
|
||||
if(flexran_get_ack_nack_simultaneous_trans(mod_id,i,0) != -1) {
|
||||
config->has_ack_nack_simultaneous_trans = 1;
|
||||
config->ack_nack_simultaneous_trans = flexran_get_ack_nack_simultaneous_trans(mod_id,i,0);
|
||||
}
|
||||
|
||||
if(flexran_get_simultaneous_ack_nack_cqi(mod_id,i) != -1) {
|
||||
config->has_simultaneous_ack_nack_cqi = 1;
|
||||
config->simultaneous_ack_nack_cqi = flexran_get_simultaneous_ack_nack_cqi(mod_id,i);
|
||||
}
|
||||
|
||||
if(flexran_get_aperiodic_cqi_rep_mode(mod_id,i) != -1) {
|
||||
config->has_aperiodic_cqi_rep_mode = 1;
|
||||
int mode = flexran_get_aperiodic_cqi_rep_mode(mod_id,i);
|
||||
if (mode > 4) {
|
||||
config->aperiodic_cqi_rep_mode = PROTOCOL__FLEX_APERIODIC_CQI_REPORT_MODE__FLACRM_NONE;
|
||||
} else {
|
||||
config->aperiodic_cqi_rep_mode = mode;
|
||||
}
|
||||
}
|
||||
|
||||
if(flexran_get_tdd_ack_nack_feedback_mode(mod_id, i) != -1) {
|
||||
config->has_tdd_ack_nack_feedback = 1;
|
||||
config->tdd_ack_nack_feedback = flexran_get_tdd_ack_nack_feedback_mode(mod_id,i);
|
||||
}
|
||||
|
||||
if(flexran_get_ack_nack_repetition_factor(mod_id, i) != -1) {
|
||||
config->has_ack_nack_repetition_factor = 1;
|
||||
config->ack_nack_repetition_factor = flexran_get_ack_nack_repetition_factor(mod_id,i);
|
||||
}
|
||||
|
||||
if(flexran_get_extended_bsr_size(mod_id, i) != -1) {
|
||||
config->has_extended_bsr_size = 1;
|
||||
config->extended_bsr_size = flexran_get_extended_bsr_size(mod_id,i);
|
||||
}
|
||||
|
||||
config->has_pcell_carrier_index = 1;
|
||||
config->pcell_carrier_index = UE_PCCID(mod_id, i);
|
||||
//TODO: Set carrier aggregation support (boolean)
|
||||
config->has_ca_support = 0;
|
||||
config->ca_support = 0;
|
||||
if(config->has_ca_support){
|
||||
//TODO: Set cross carrier scheduling support (boolean)
|
||||
config->has_cross_carrier_sched_support = 1;
|
||||
config->cross_carrier_sched_support = 0;
|
||||
//TODO: Set secondary cells configuration
|
||||
// We do not set it for now. No carrier aggregation support
|
||||
|
||||
//TODO: Set deactivation timer for secondary cell
|
||||
config->has_scell_deactivation_timer = 0;
|
||||
config->scell_deactivation_timer = 0;
|
||||
}
|
||||
} else if (state_change == PROTOCOL__FLEX_UE_STATE_CHANGE_TYPE__FLUESC_MOVED) {
|
||||
// TODO: Not supported for now. Leave blank
|
||||
break;
|
||||
case PROTOCOL__FLEX_UE_STATE_CHANGE_TYPE__FLUESC_UPDATED:
|
||||
case PROTOCOL__FLEX_UE_STATE_CHANGE_TYPE__FLUESC_ACTIVATED:
|
||||
flexran_agent_fill_rrc_ue_config(mod_id, rnti, config);
|
||||
/* we don't call into the MAC CM here; it will be called later through an
|
||||
* ue_config_request */
|
||||
break;
|
||||
case PROTOCOL__FLEX_UE_STATE_CHANGE_TYPE__FLUESC_MOVED:
|
||||
default:
|
||||
LOG_E(FLEXRAN_AGENT, "state change FLUESC_MOVED or unknown state occured for RNTI %x\n",
|
||||
rnti);
|
||||
}
|
||||
|
||||
ue_state_change_msg->config = config;
|
||||
@@ -242,16 +106,18 @@ void flexran_agent_ue_state_change(mid_t mod_id, uint32_t rnti, uint8_t state_ch
|
||||
return;
|
||||
error:
|
||||
if (err_code != 0)
|
||||
LOG_E(FLEXRAN_AGENT, "Could not send UE state message becasue of %d \n",err_code);
|
||||
LOG_E(FLEXRAN_AGENT, "Could not send UE state message becasue of %d for RNTI %x\n",
|
||||
err_code, rnti);
|
||||
}
|
||||
|
||||
|
||||
|
||||
int flexran_agent_destroy_ue_state_change(Protocol__FlexranMessage *msg) {
|
||||
if(msg->msg_case != PROTOCOL__FLEXRAN_MESSAGE__MSG_UE_STATE_CHANGE_MSG)
|
||||
goto error;
|
||||
free(msg->ue_state_change_msg->header);
|
||||
//TODO: Free the contents of the UE config structure
|
||||
if (msg->ue_state_change_msg->config->capabilities)
|
||||
free(msg->ue_state_change_msg->config->capabilities);
|
||||
free(msg->ue_state_change_msg->config);
|
||||
free(msg->ue_state_change_msg);
|
||||
free(msg);
|
||||
return 0;
|
||||
@@ -264,30 +130,27 @@ int flexran_agent_destroy_ue_state_change(Protocol__FlexranMessage *msg) {
|
||||
/* this is called by RRC as a part of rrc xface . The controller previously requested this*/
|
||||
void flexran_trigger_rrc_measurements (mid_t mod_id, LTE_MeasResults_t* measResults) {
|
||||
|
||||
//int i;
|
||||
// int priority = 0; // Warning Preventing
|
||||
// void *data;
|
||||
// int size;
|
||||
// err_code_t err_code = -100;
|
||||
triggered_rrc = true;
|
||||
//int num;
|
||||
|
||||
/* TODO do we need this at the current state? meas_stats is never put into a
|
||||
* protobuf message?!
|
||||
num = flexran_get_num_ues (mod_id);
|
||||
int num = flexran_get_rrc_num_ues (mod_id);
|
||||
rnti_t rntis[num];
|
||||
flexran_get_rrc_rnti_list(mod_id, rntis, num);
|
||||
|
||||
meas_stats = malloc(sizeof(rrc_meas_stats) * num);
|
||||
|
||||
for (i = 0; i < num; i++){
|
||||
UE_id = flexran_get_ue_id(mod_id, i);
|
||||
meas_stats[i].rnti = flexran_get_ue_crnti(mod_id, UE_id);
|
||||
meas_stats[i].meas_id = flexran_get_rrc_pcell_measid(mod_id, UE_id);
|
||||
meas_stats[i].rsrp = flexran_get_rrc_pcell_rsrp(mod_id, UE_id) - 140;
|
||||
for (int i = 0; i < num; i++){
|
||||
const rnti_t rnti = rntis[i];
|
||||
meas_stats[i].rnti = rnti;
|
||||
meas_stats[i].meas_id = flexran_get_rrc_pcell_measid(mod_id, rnti);
|
||||
meas_stats[i].rsrp = flexran_get_rrc_pcell_rsrp(mod_id, rnti) - 140;
|
||||
// measResults->measResultPCell.rsrpResult - 140;
|
||||
meas_stats[i].rsrq = flexran_get_rrc_pcell_rsrq(mod_id, UE_id)/2 - 20;
|
||||
// (measResults->measResultPCell.rsrqResult)/2 - 20;
|
||||
|
||||
}
|
||||
meas_stats[i].rsrq = flexran_get_rrc_pcell_rsrq(mod_id, rnti)/2 - 20;
|
||||
*/
|
||||
// repl->neigh_meas = NULL;
|
||||
|
||||
@@ -496,17 +359,11 @@ int flexran_agent_rrc_stats_reply(mid_t mod_id,
|
||||
Protocol__FlexUeStatsReport **ue_report,
|
||||
Protocol__FlexCellStatsReport **cell_report) {
|
||||
|
||||
|
||||
// Protocol__FlexHeader *header;
|
||||
int i,j;
|
||||
int UE_id;
|
||||
|
||||
/* Allocate memory for list of UE reports */
|
||||
if (report_config->nr_ue > 0) {
|
||||
|
||||
for (i = 0; i < report_config->nr_ue; i++) {
|
||||
|
||||
UE_id = flexran_get_ue_id(mod_id, i);
|
||||
rnti_t rntis[report_config->nr_ue];
|
||||
flexran_get_rrc_rnti_list(mod_id, rntis, report_config->nr_ue);
|
||||
for (int i = 0; i < report_config->nr_ue; i++) {
|
||||
const rnti_t rnti = rntis[i];
|
||||
|
||||
/* Check flag for creation of buffer status report */
|
||||
if (report_config->ue_report_type[i].ue_report_flags & PROTOCOL__FLEX_UE_STATS_TYPE__FLUST_RRC_MEASUREMENTS) {
|
||||
@@ -518,15 +375,14 @@ int flexran_agent_rrc_stats_reply(mid_t mod_id,
|
||||
goto error;
|
||||
protocol__flex_rrc_measurements__init(rrc_measurements);
|
||||
|
||||
rrc_measurements->measid = flexran_get_rrc_pcell_measid(mod_id, UE_id);
|
||||
rrc_measurements->has_measid = 1;
|
||||
|
||||
rrc_measurements->pcell_rsrp = flexran_get_rrc_pcell_rsrp(mod_id, UE_id);
|
||||
rrc_measurements->has_pcell_rsrp = 1;
|
||||
|
||||
rrc_measurements->pcell_rsrq = flexran_get_rrc_pcell_rsrq(mod_id, UE_id);
|
||||
rrc_measurements->has_pcell_rsrq = 1 ;
|
||||
|
||||
rrc_measurements->measid = flexran_get_rrc_pcell_measid(mod_id, rnti);
|
||||
rrc_measurements->has_measid = 1;
|
||||
|
||||
rrc_measurements->pcell_rsrp = flexran_get_rrc_pcell_rsrp(mod_id, rnti);
|
||||
rrc_measurements->has_pcell_rsrp = 1;
|
||||
|
||||
rrc_measurements->pcell_rsrq = flexran_get_rrc_pcell_rsrq(mod_id, rnti);
|
||||
rrc_measurements->has_pcell_rsrq = 1 ;
|
||||
|
||||
/* Target Cell, Neghibouring*/
|
||||
Protocol__FlexNeighCellsMeasurements *neigh_meas;
|
||||
@@ -536,7 +392,7 @@ int flexran_agent_rrc_stats_reply(mid_t mod_id,
|
||||
protocol__flex_neigh_cells_measurements__init(neigh_meas);
|
||||
|
||||
|
||||
neigh_meas->n_eutra_meas = flexran_get_rrc_num_ncell(mod_id, UE_id);
|
||||
neigh_meas->n_eutra_meas = flexran_get_rrc_num_ncell(mod_id, rnti);
|
||||
|
||||
Protocol__FlexEutraMeasurements **eutra_meas = NULL;
|
||||
|
||||
@@ -546,7 +402,7 @@ int flexran_agent_rrc_stats_reply(mid_t mod_id,
|
||||
if (eutra_meas == NULL)
|
||||
goto error;
|
||||
|
||||
for (j = 0; j < neigh_meas->n_eutra_meas; j++ ){
|
||||
for (int j = 0; j < neigh_meas->n_eutra_meas; j++ ){
|
||||
|
||||
eutra_meas[j] = malloc(sizeof(Protocol__FlexEutraMeasurements));
|
||||
if (eutra_meas[j] == NULL)
|
||||
@@ -554,7 +410,7 @@ int flexran_agent_rrc_stats_reply(mid_t mod_id,
|
||||
|
||||
protocol__flex_eutra_measurements__init(eutra_meas[j]);
|
||||
|
||||
eutra_meas[j]->phys_cell_id = flexran_get_rrc_neigh_phy_cell_id(mod_id, UE_id, j);
|
||||
eutra_meas[j]->phys_cell_id = flexran_get_rrc_neigh_phy_cell_id(mod_id, rnti, j);
|
||||
eutra_meas[j]->has_phys_cell_id = 1;
|
||||
|
||||
|
||||
@@ -565,10 +421,10 @@ int flexran_agent_rrc_stats_reply(mid_t mod_id,
|
||||
|
||||
protocol__flex_eutra_ref_signal_meas__init(meas_result);
|
||||
|
||||
meas_result->rsrp = flexran_get_rrc_neigh_rsrp(mod_id, UE_id, eutra_meas[j]->phys_cell_id);
|
||||
meas_result->rsrp = flexran_get_rrc_neigh_rsrp(mod_id, rnti, eutra_meas[j]->phys_cell_id);
|
||||
meas_result->has_rsrp = 1;
|
||||
|
||||
meas_result->rsrq = flexran_get_rrc_neigh_rsrq(mod_id, UE_id, eutra_meas[j]->phys_cell_id);
|
||||
meas_result->rsrq = flexran_get_rrc_neigh_rsrq(mod_id, rnti, eutra_meas[j]->phys_cell_id);
|
||||
meas_result->has_rsrq = 1;
|
||||
|
||||
eutra_meas[j]->meas_result = meas_result;
|
||||
@@ -582,6 +438,7 @@ int flexran_agent_rrc_stats_reply(mid_t mod_id,
|
||||
}
|
||||
|
||||
ue_report[i]->rrc_measurements = rrc_measurements;
|
||||
ue_report[i]->flags |= PROTOCOL__FLEX_UE_STATS_TYPE__FLUST_RRC_MEASUREMENTS;
|
||||
|
||||
}
|
||||
|
||||
@@ -618,6 +475,7 @@ int flexran_agent_rrc_stats_reply(mid_t mod_id,
|
||||
// ni_report->p0_nominal_pucch = flexran_get_p0_nominal_pucch(enb_id, 0);
|
||||
// ni_report->has_p0_nominal_pucch = 1;
|
||||
// cell_report[i]->noise_inter_report = ni_report;
|
||||
// cell_report[i]->flags |= PROTOCOL__FLEX_CELL_STATS_TYPE__FLCST_NOISE_INTERFERENCE;
|
||||
// }
|
||||
// }
|
||||
|
||||
@@ -630,12 +488,10 @@ int flexran_agent_rrc_stats_reply(mid_t mod_id,
|
||||
|
||||
error:
|
||||
|
||||
for (i = 0; i < report_config->nr_ue; i++){
|
||||
for (int i = 0; i < report_config->nr_ue; i++){
|
||||
|
||||
UE_id = flexran_get_ue_id(mod_id, i);
|
||||
|
||||
if (ue_report[i]->rrc_measurements->neigh_meas != NULL){
|
||||
for (j = 0; j < flexran_get_rrc_num_ncell(mod_id, UE_id); j++){
|
||||
if (ue_report[i]->rrc_measurements && ue_report[i]->rrc_measurements->neigh_meas != NULL){
|
||||
for (int j = 0; j < ue_report[i]->rrc_measurements->neigh_meas->n_eutra_meas; j++){
|
||||
|
||||
free(ue_report[i]->rrc_measurements->neigh_meas->eutra_meas[j]);
|
||||
}
|
||||
@@ -651,10 +507,131 @@ int flexran_agent_rrc_stats_reply(mid_t mod_id,
|
||||
return -1;
|
||||
}
|
||||
|
||||
int flexran_agent_rrc_destroy_stats_reply(Protocol__FlexStatsReply *reply)
|
||||
{
|
||||
for (int i = 0; i < reply->n_ue_report; i++){
|
||||
if (reply->ue_report[i]->rrc_measurements && reply->ue_report[i]->rrc_measurements->neigh_meas){
|
||||
for (int j = 0; j < reply->ue_report[i]->rrc_measurements->neigh_meas->n_eutra_meas; j++){
|
||||
free(reply->ue_report[i]->rrc_measurements->neigh_meas->eutra_meas[j]->meas_result);
|
||||
free(reply->ue_report[i]->rrc_measurements->neigh_meas->eutra_meas[j]);
|
||||
}
|
||||
free(reply->ue_report[i]->rrc_measurements->neigh_meas->eutra_meas);
|
||||
free(reply->ue_report[i]->rrc_measurements->neigh_meas);
|
||||
free(reply->ue_report[i]->rrc_measurements);
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
int flexran_agent_register_rrc_xface(mid_t mod_id, AGENT_RRC_xface *xface) {
|
||||
if (rrc_agent_registered[mod_id]) {
|
||||
LOG_E(RRC, "RRC agent for eNB %d is already registered\n", mod_id);
|
||||
void flexran_agent_fill_rrc_ue_config(mid_t mod_id, rnti_t rnti,
|
||||
Protocol__FlexUeConfig *ue_conf)
|
||||
{
|
||||
if (ue_conf->has_rnti && ue_conf->rnti != rnti) {
|
||||
LOG_E(FLEXRAN_AGENT, "ue_config existing RNTI %x does not match RRC RNTI %x\n",
|
||||
ue_conf->rnti, rnti);
|
||||
return;
|
||||
}
|
||||
ue_conf->has_rnti = 1;
|
||||
ue_conf->rnti = rnti;
|
||||
ue_conf->imsi = flexran_get_ue_imsi(mod_id, rnti);
|
||||
ue_conf->has_imsi = 1;
|
||||
|
||||
//TODO: Set the DRX configuration (optional)
|
||||
//Not supported for now, so we do not set it
|
||||
|
||||
ue_conf->time_alignment_timer = flexran_get_time_alignment_timer(mod_id, rnti);
|
||||
ue_conf->has_time_alignment_timer = 1;
|
||||
|
||||
ue_conf->meas_gap_config_pattern = flexran_get_meas_gap_config(mod_id, rnti);
|
||||
ue_conf->has_meas_gap_config_pattern = 1;
|
||||
|
||||
if(ue_conf->meas_gap_config_pattern != PROTOCOL__FLEX_MEAS_GAP_CONFIG_PATTERN__FLMGCP_OFF) {
|
||||
ue_conf->meas_gap_config_sf_offset = flexran_get_meas_gap_config_offset(mod_id, rnti);
|
||||
ue_conf->has_meas_gap_config_sf_offset = 1;
|
||||
}
|
||||
|
||||
//TODO: Set the SPS configuration (Optional)
|
||||
//Not supported for now, so we do not set it
|
||||
|
||||
//TODO: Set the SR configuration (Optional)
|
||||
//We do not set it for now
|
||||
|
||||
//TODO: Set the CQI configuration (Optional)
|
||||
//We do not set it for now
|
||||
|
||||
ue_conf->transmission_mode = flexran_get_ue_transmission_mode(mod_id, rnti);
|
||||
ue_conf->has_transmission_mode = 1;
|
||||
|
||||
Protocol__FlexUeCapabilities *c_capabilities;
|
||||
c_capabilities = malloc(sizeof(Protocol__FlexUeCapabilities));
|
||||
if (c_capabilities) {
|
||||
protocol__flex_ue_capabilities__init(c_capabilities);
|
||||
|
||||
c_capabilities->has_half_duplex = 1;
|
||||
c_capabilities->half_duplex = flexran_get_half_duplex(mod_id, rnti);
|
||||
|
||||
c_capabilities->has_intra_sf_hopping = 1;
|
||||
c_capabilities->intra_sf_hopping = flexran_get_intra_sf_hopping(mod_id, rnti);
|
||||
|
||||
c_capabilities->has_type2_sb_1 = 1;
|
||||
c_capabilities->type2_sb_1 = flexran_get_type2_sb_1(mod_id, rnti);
|
||||
|
||||
c_capabilities->has_ue_category = 1;
|
||||
c_capabilities->ue_category = flexran_get_ue_category(mod_id, rnti);
|
||||
|
||||
c_capabilities->has_res_alloc_type1 = 1;
|
||||
c_capabilities->res_alloc_type1 = flexran_get_res_alloc_type1(mod_id, rnti);
|
||||
|
||||
ue_conf->capabilities = c_capabilities;
|
||||
}
|
||||
|
||||
ue_conf->has_ue_transmission_antenna = 1;
|
||||
ue_conf->ue_transmission_antenna = flexran_get_ue_transmission_antenna(mod_id, rnti);
|
||||
|
||||
ue_conf->has_tti_bundling = 1;
|
||||
ue_conf->tti_bundling = flexran_get_tti_bundling(mod_id, rnti);
|
||||
|
||||
ue_conf->has_max_harq_tx = 1;
|
||||
ue_conf->max_harq_tx = flexran_get_maxHARQ_TX(mod_id, rnti);
|
||||
|
||||
ue_conf->has_beta_offset_ack_index = 1;
|
||||
ue_conf->beta_offset_ack_index = flexran_get_beta_offset_ack_index(mod_id, rnti);
|
||||
|
||||
ue_conf->has_beta_offset_ri_index = 1;
|
||||
ue_conf->beta_offset_ri_index = flexran_get_beta_offset_ri_index(mod_id, rnti);
|
||||
|
||||
ue_conf->has_beta_offset_cqi_index = 1;
|
||||
ue_conf->beta_offset_cqi_index = flexran_get_beta_offset_cqi_index(mod_id, rnti);
|
||||
|
||||
/* assume primary carrier */
|
||||
ue_conf->has_ack_nack_simultaneous_trans = 1;
|
||||
ue_conf->ack_nack_simultaneous_trans = flexran_get_ack_nack_simultaneous_trans(mod_id,0);
|
||||
|
||||
ue_conf->has_simultaneous_ack_nack_cqi = 1;
|
||||
ue_conf->simultaneous_ack_nack_cqi = flexran_get_simultaneous_ack_nack_cqi(mod_id, rnti);
|
||||
|
||||
ue_conf->has_aperiodic_cqi_rep_mode = 1;
|
||||
ue_conf->aperiodic_cqi_rep_mode = flexran_get_aperiodic_cqi_rep_mode(mod_id, rnti);
|
||||
|
||||
ue_conf->has_tdd_ack_nack_feedback = 1;
|
||||
ue_conf->tdd_ack_nack_feedback = flexran_get_tdd_ack_nack_feedback_mode(mod_id, rnti);
|
||||
|
||||
ue_conf->has_ack_nack_repetition_factor = 1;
|
||||
ue_conf->ack_nack_repetition_factor = flexran_get_ack_nack_repetition_factor(mod_id, rnti);
|
||||
|
||||
ue_conf->has_extended_bsr_size = 1;
|
||||
ue_conf->extended_bsr_size = flexran_get_extended_bsr_size(mod_id, rnti);
|
||||
}
|
||||
|
||||
int flexran_agent_register_rrc_xface(mid_t mod_id)
|
||||
{
|
||||
if (agent_rrc_xface[mod_id]) {
|
||||
LOG_E(FLEXRAN_AGENT, "RRC agent for eNB %d is already registered\n", mod_id);
|
||||
return -1;
|
||||
}
|
||||
AGENT_RRC_xface *xface = malloc(sizeof(AGENT_RRC_xface));
|
||||
if (!xface) {
|
||||
LOG_E(FLEXRAN_AGENT, "could not allocate memory for RRC agent xface %d\n", mod_id);
|
||||
return -1;
|
||||
}
|
||||
|
||||
@@ -663,21 +640,98 @@ int flexran_agent_register_rrc_xface(mid_t mod_id, AGENT_RRC_xface *xface) {
|
||||
xface->flexran_agent_notify_ue_state_change = flexran_agent_ue_state_change;
|
||||
xface->flexran_trigger_rrc_measurements = flexran_trigger_rrc_measurements;
|
||||
|
||||
rrc_agent_registered[mod_id] = 1;
|
||||
agent_rrc_xface[mod_id] = xface;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int flexran_agent_unregister_rrc_xface(mid_t mod_id, AGENT_RRC_xface *xface) {
|
||||
void flexran_agent_fill_rrc_cell_config(mid_t mod_id, uint8_t cc_id,
|
||||
Protocol__FlexCellConfig *conf) {
|
||||
|
||||
if (!conf->si_config) {
|
||||
conf->si_config = malloc(sizeof(Protocol__FlexSiConfig));
|
||||
if (conf->si_config)
|
||||
protocol__flex_si_config__init(conf->si_config);
|
||||
}
|
||||
|
||||
if (conf->si_config) {
|
||||
// TODO THIS IS DU RRC
|
||||
conf->si_config->sib1_length = flexran_get_sib1_length(mod_id, cc_id);
|
||||
conf->si_config->has_sib1_length = 1;
|
||||
|
||||
conf->si_config->si_window_length = (uint32_t) flexran_get_si_window_length(mod_id, cc_id);
|
||||
conf->si_config->has_si_window_length = 1;
|
||||
|
||||
conf->si_config->n_si_message = 0;
|
||||
|
||||
/* Protocol__FlexSiMessage **si_message; */
|
||||
/* si_message = malloc(sizeof(Protocol__FlexSiMessage *) * si_config->n_si_message); */
|
||||
/* if(si_message == NULL) */
|
||||
/* goto error; */
|
||||
/* for(j = 0; j < si_config->n_si_message; j++){ */
|
||||
/* si_message[j] = malloc(sizeof(Protocol__FlexSiMessage)); */
|
||||
/* if(si_message[j] == NULL) */
|
||||
/* goto error; */
|
||||
/* protocol__flex_si_message__init(si_message[j]); */
|
||||
/* //TODO: Fill in with actual value, Periodicity of SI msg in radio frames */
|
||||
/* si_message[j]->periodicity = 1; //SIPeriod */
|
||||
/* si_message[j]->has_periodicity = 1; */
|
||||
/* //TODO: Fill in with actual value, rhe length of the SI message in bytes */
|
||||
/* si_message[j]->length = 10; */
|
||||
/* si_message[j]->has_length = 1; */
|
||||
/* } */
|
||||
/* if(si_config->n_si_message > 0){ */
|
||||
/* si_config->si_message = si_message; */
|
||||
/* } */
|
||||
}
|
||||
|
||||
conf->ra_response_window_size = flexran_get_ra_ResponseWindowSize(mod_id, cc_id);
|
||||
conf->has_ra_response_window_size = 1;
|
||||
|
||||
// belongs to MAC but is read in RRC
|
||||
conf->mac_contention_resolution_timer = flexran_get_mac_ContentionResolutionTimer(mod_id, cc_id);
|
||||
conf->has_mac_contention_resolution_timer = 1;
|
||||
|
||||
conf->ul_pusch_power = flexran_agent_get_operating_pusch_p0 (mod_id, cc_id);
|
||||
conf->has_ul_pusch_power = 1;
|
||||
|
||||
conf->n_plmn_id = flexran_get_rrc_num_plmn_ids(mod_id);
|
||||
conf->plmn_id = calloc(conf->n_plmn_id, sizeof(Protocol__FlexPlmn *));
|
||||
if (conf->plmn_id) {
|
||||
for (int i = 0; i < conf->n_plmn_id; i++) {
|
||||
conf->plmn_id[i] = malloc(sizeof(Protocol__FlexPlmn));
|
||||
if (!conf->plmn_id[i]) continue;
|
||||
protocol__flex_plmn__init(conf->plmn_id[i]);
|
||||
conf->plmn_id[i]->mcc = flexran_get_rrc_mcc(mod_id, i);
|
||||
conf->plmn_id[i]->has_mcc = 1;
|
||||
conf->plmn_id[i]->mnc = flexran_get_rrc_mnc(mod_id, i);
|
||||
conf->plmn_id[i]->has_mnc = 1;
|
||||
conf->plmn_id[i]->mnc_length = flexran_get_rrc_mnc_digit_length(mod_id, i);
|
||||
conf->plmn_id[i]->has_mnc_length = 1;
|
||||
}
|
||||
} else {
|
||||
conf->n_plmn_id = 0;
|
||||
}
|
||||
}
|
||||
|
||||
int flexran_agent_unregister_rrc_xface(mid_t mod_id)
|
||||
{
|
||||
if (!agent_rrc_xface[mod_id]) {
|
||||
LOG_E(FLEXRAN_AGENT, "RRC agent for eNB %d is not registered\n", mod_id);
|
||||
return -1;
|
||||
}
|
||||
//xface->agent_ctxt = NULL;
|
||||
// xface->flexran_agent_send_update_rrc_stats = NULL;
|
||||
|
||||
xface->flexran_agent_notify_ue_state_change = NULL;
|
||||
xface->flexran_trigger_rrc_measurements = NULL;
|
||||
rrc_agent_registered[mod_id] = 0;
|
||||
agent_rrc_xface[mod_id]->flexran_agent_notify_ue_state_change = NULL;
|
||||
agent_rrc_xface[mod_id]->flexran_trigger_rrc_measurements = NULL;
|
||||
free(agent_rrc_xface[mod_id]);
|
||||
agent_rrc_xface[mod_id] = NULL;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
AGENT_RRC_xface *flexran_agent_get_rrc_xface(mid_t mod_id)
|
||||
{
|
||||
return agent_rrc_xface[mod_id];
|
||||
}
|
||||
|
||||
@@ -37,11 +37,10 @@
|
||||
|
||||
#include "flexran_agent_common.h"
|
||||
#include "flexran_agent_rrc_defs.h"
|
||||
// for flexran_agent_get_rrc_xface()
|
||||
#include "flexran_agent_extern.h"
|
||||
|
||||
|
||||
/* Initialization function for the agent structures etc */
|
||||
void flexran_agent_init_rrc_agent(mid_t mod_id);
|
||||
|
||||
/* UE state change message constructor and destructor */
|
||||
void flexran_agent_ue_state_change(mid_t mod_id, uint32_t rnti, uint8_t state_change);
|
||||
int flexran_agent_destroy_ue_state_change(Protocol__FlexranMessage *msg);
|
||||
@@ -59,12 +58,20 @@ void flexran_trigger_rrc_measurements (mid_t mod_id, LTE_MeasResults_t *);
|
||||
|
||||
/* Statistics reply protocol message constructor and destructor */
|
||||
int flexran_agent_rrc_stats_reply(mid_t mod_id, const report_config_t *report_config, Protocol__FlexUeStatsReport **ue_report, Protocol__FlexCellStatsReport **cell_report);
|
||||
int flexran_agent_rrc_destroy_stats_reply(Protocol__FlexranMessage *msg);
|
||||
int flexran_agent_rrc_destroy_stats_reply(Protocol__FlexStatsReply *reply);
|
||||
|
||||
/* Fill the RRC part of a ue_config message */
|
||||
void flexran_agent_fill_rrc_ue_config(mid_t mod_id, rnti_t rnti,
|
||||
Protocol__FlexUeConfig *ue_conf);
|
||||
|
||||
/* Fill the RRC part of an cell_config message */
|
||||
void flexran_agent_fill_rrc_cell_config(mid_t mod_id, uint8_t cc_id,
|
||||
Protocol__FlexCellConfig *conf);
|
||||
|
||||
/*Register technology specific interface callbacks*/
|
||||
int flexran_agent_register_rrc_xface(mid_t mod_id, AGENT_RRC_xface *xface);
|
||||
int flexran_agent_register_rrc_xface(mid_t mod_id);
|
||||
|
||||
/*Unregister technology specific callbacks*/
|
||||
int flexran_agent_unregister_rrc_xface(mid_t mod_id, AGENT_RRC_xface*xface);
|
||||
int flexran_agent_unregister_rrc_xface(mid_t mod_id);
|
||||
|
||||
#endif
|
||||
|
||||
@@ -44,7 +44,21 @@
|
||||
#define CONFIG_STRING_L1_LOCAL_N_PORTD "local_n_portd"
|
||||
#define CONFIG_STRING_L1_REMOTE_N_PORTD "remote_n_portd"
|
||||
#define CONFIG_STRING_L1_TRANSPORT_N_PREFERENCE "tr_n_preference"
|
||||
|
||||
#define CONFIG_STRING_L1_PRACH_DTX_THRESHOLD "prach_dtx_threshold"
|
||||
#define CONFIG_STRING_L1_PUCCH1_DTX_THRESHOLD "pucch1_dtx_threshold"
|
||||
#define CONFIG_STRING_L1_PUCCH1AB_DTX_THRESHOLD "pucch1ab_dtx_threshold"
|
||||
#define CONFIG_STRING_L1_PRACH_DTX_EMTC0_THRESHOLD "prach_dtx_emtc0_threshold"
|
||||
#define CONFIG_STRING_L1_PUCCH1_DTX_EMTC0_THRESHOLD "pucch1_dtx_emtc0_threshold"
|
||||
#define CONFIG_STRING_L1_PUCCH1AB_DTX_EMTC0_THRESHOLD "pucch1ab_dtx_emtc0_threshold"
|
||||
#define CONFIG_STRING_L1_PRACH_DTX_EMTC1_THRESHOLD "prach_dtx_emtc1_threshold"
|
||||
#define CONFIG_STRING_L1_PUCCH1_DTX_EMTC1_THRESHOLD "pucch1_dtx_emtc1_threshold"
|
||||
#define CONFIG_STRING_L1_PUCCH1AB_DTX_EMTC1_THRESHOLD "pucch1ab_dtx_emtc1_threshold"
|
||||
#define CONFIG_STRING_L1_PRACH_DTX_EMTC2_THRESHOLD "prach_dtx_emtc2_threshold"
|
||||
#define CONFIG_STRING_L1_PUCCH1_DTX_EMTC2_THRESHOLD "pucch1_dtx_emtc2_threshold"
|
||||
#define CONFIG_STRING_L1_PUCCH1AB_DTX_EMTC2_THRESHOLD "pucch1ab_dtx_emtc2_threshold"
|
||||
#define CONFIG_STRING_L1_PRACH_DTX_EMTC3_THRESHOLD "prach_dtx_emtc3_threshold"
|
||||
#define CONFIG_STRING_L1_PUCCH1_DTX_EMTC3_THRESHOLD "pucch1_dtx_emtc3_threshold"
|
||||
#define CONFIG_STRING_L1_PUCCH1AB_DTX_EMTC3_THRESHOLD "pucch1ab_dtx_emtc3_threshold"
|
||||
/*----------------------------------------------------------------------------------------------------------------------------------------------------*/
|
||||
/* L1 configuration parameters */
|
||||
/* optname helpstr paramflags XXXptr defXXXval type numelt */
|
||||
@@ -59,7 +73,22 @@
|
||||
{CONFIG_STRING_L1_REMOTE_N_PORTC, NULL, 0, uptr:NULL, defintval:50030, TYPE_UINT, 0}, \
|
||||
{CONFIG_STRING_L1_LOCAL_N_PORTD, NULL, 0, uptr:NULL, defintval:50031, TYPE_UINT, 0}, \
|
||||
{CONFIG_STRING_L1_REMOTE_N_PORTD, NULL, 0, uptr:NULL, defintval:50031, TYPE_UINT, 0}, \
|
||||
}
|
||||
{CONFIG_STRING_L1_PRACH_DTX_THRESHOLD, NULL, 0, iptr:NULL, defintval:100, TYPE_INT, 0}, \
|
||||
{CONFIG_STRING_L1_PUCCH1_DTX_THRESHOLD, NULL, 0, iptr:NULL, defintval:0, TYPE_INT, 0}, \
|
||||
{CONFIG_STRING_L1_PUCCH1AB_DTX_THRESHOLD, NULL, 0, iptr:NULL, defintval:4, TYPE_INT, 0}, \
|
||||
{CONFIG_STRING_L1_PRACH_DTX_EMTC0_THRESHOLD, NULL, 0, iptr:NULL, defintval:200, TYPE_INT, 0}, \
|
||||
{CONFIG_STRING_L1_PUCCH1_DTX_EMTC0_THRESHOLD, NULL, 0, iptr:NULL, defintval:0, TYPE_INT, 0}, \
|
||||
{CONFIG_STRING_L1_PUCCH1AB_DTX_EMTC0_THRESHOLD, NULL, 0, iptr:NULL, defintval:4, TYPE_INT, 0}, \
|
||||
{CONFIG_STRING_L1_PRACH_DTX_EMTC1_THRESHOLD, NULL, 0, iptr:NULL, defintval:200, TYPE_INT, 0}, \
|
||||
{CONFIG_STRING_L1_PUCCH1_DTX_EMTC1_THRESHOLD, NULL, 0, iptr:NULL, defintval:0, TYPE_INT, 0}, \
|
||||
{CONFIG_STRING_L1_PUCCH1AB_DTX_EMTC1_THRESHOLD, NULL, 0, iptr:NULL, defintval:4, TYPE_INT, 0}, \
|
||||
{CONFIG_STRING_L1_PRACH_DTX_EMTC2_THRESHOLD, NULL, 0, iptr:NULL, defintval:200, TYPE_INT, 0}, \
|
||||
{CONFIG_STRING_L1_PUCCH1_DTX_EMTC2_THRESHOLD, NULL, 0, iptr:NULL, defintval:0, TYPE_INT, 0}, \
|
||||
{CONFIG_STRING_L1_PUCCH1AB_DTX_EMTC2_THRESHOLD, NULL, 0, iptr:NULL, defintval:4, TYPE_INT, 0}, \
|
||||
{CONFIG_STRING_L1_PRACH_DTX_EMTC3_THRESHOLD, NULL, 0, iptr:NULL, defintval:200, TYPE_INT, 0}, \
|
||||
{CONFIG_STRING_L1_PUCCH1_DTX_EMTC3_THRESHOLD, NULL, 0, iptr:NULL, defintval:0, TYPE_INT, 0}, \
|
||||
{CONFIG_STRING_L1_PUCCH1AB_DTX_EMTC3_THRESHOLD, NULL, 0, iptr:NULL, defintval:4, TYPE_INT, 0} \
|
||||
}
|
||||
#define L1_CC_IDX 0
|
||||
#define L1_TRANSPORT_N_PREFERENCE_IDX 1
|
||||
#define L1_LOCAL_N_IF_NAME_IDX 2
|
||||
@@ -69,5 +98,19 @@
|
||||
#define L1_REMOTE_N_PORTC_IDX 6
|
||||
#define L1_LOCAL_N_PORTD_IDX 7
|
||||
#define L1_REMOTE_N_PORTD_IDX 8
|
||||
|
||||
#define L1_PRACH_DTX_THRESHOLD_IDX 9
|
||||
#define L1_PUCCH1_DTX_THRESHOLD_IDX 10
|
||||
#define L1_PUCCH1AB_DTX_THRESHOLD_IDX 11
|
||||
#define L1_PRACH_DTX_EMTC0_THRESHOLD_IDX 12
|
||||
#define L1_PUCCH1_DTX_EMTC0_THRESHOLD_IDX 13
|
||||
#define L1_PUCCH1AB_DTX_EMTC0_THRESHOLD_IDX 14
|
||||
#define L1_PRACH_DTX_EMTC1_THRESHOLD_IDX 15
|
||||
#define L1_PUCCH1_DTX_EMTC1_THRESHOLD_IDX 16
|
||||
#define L1_PUCCH1AB_DTX_EMTC1_THRESHOLD_IDX 17
|
||||
#define L1_PRACH_DTX_EMTC2_THRESHOLD_IDX 18
|
||||
#define L1_PUCCH1_DTX_EMTC2_THRESHOLD_IDX 19
|
||||
#define L1_PUCCH1AB_DTX_EMTC2_THRESHOLD_IDX 20
|
||||
#define L1_PRACH_DTX_EMTC3_THRESHOLD_IDX 21
|
||||
#define L1_PUCCH1_DTX_EMTC3_THRESHOLD_IDX 22
|
||||
#define L1_PUCCH1AB_DTX_EMTC3_THRESHOLD_IDX 23
|
||||
/*----------------------------------------------------------------------------------------------------------------------------------------------------*/
|
||||
|
||||
@@ -218,6 +218,9 @@ enum flex_aperiodic_cqi_report_mode {
|
||||
FLACRM_RM30 = 3;
|
||||
FLACRM_RM31 = 4;
|
||||
FLACRM_NONE = 5;
|
||||
FLACRM_RM32_v1250 = 6;
|
||||
FLACRM_RM10_v1310 = 7;
|
||||
FLACRM_RM11_v1310 = 8;
|
||||
}
|
||||
|
||||
enum flex_tdd_ack_nack_feedback_mode {
|
||||
@@ -259,3 +262,9 @@ enum flex_ue_state_change_type {
|
||||
FLUESC_DEACTIVATED = 2;
|
||||
FLUESC_MOVED = 3;
|
||||
}
|
||||
|
||||
message flex_plmn {
|
||||
optional uint32 mcc = 1;
|
||||
optional uint32 mnc = 2;
|
||||
optional uint32 mnc_length = 3;
|
||||
}
|
||||
|
||||
@@ -5,7 +5,6 @@ import "config_common.proto";
|
||||
|
||||
message flex_cell_config {
|
||||
optional uint32 phy_cell_id = 1; // The PCI of this cell
|
||||
optional uint32 cell_id = 2; // The PLMN cell id of this cell
|
||||
optional uint32 pusch_hopping_offset = 3; // PUSCH resources in RBs for hopping
|
||||
optional uint32 hopping_mode = 4; // One of the FLHM_* enum values
|
||||
optional uint32 n_sb = 5; // The number of subbands
|
||||
@@ -43,6 +42,7 @@ message flex_cell_config {
|
||||
optional uint32 eutra_band= 37; // operating band
|
||||
optional int32 dl_pdsch_power = 38; // operating downlink power
|
||||
optional int32 ul_pusch_power = 39; // operating uplink power
|
||||
repeated flex_plmn plmn_id = 40; // The PLMN cell id of this cell
|
||||
|
||||
optional flex_slice_config slice_config = 42;
|
||||
}
|
||||
|
||||
@@ -31,6 +31,7 @@ message flexran_message {
|
||||
flex_agent_reconfiguration agent_reconfiguration_msg = 17;
|
||||
flex_rrc_triggering rrc_triggering = 18;
|
||||
flex_ul_mac_config ul_mac_config_msg = 19;
|
||||
flex_disconnect disconnect_msg = 20;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -64,9 +65,21 @@ enum flexran_err {
|
||||
//
|
||||
// Maintenance and discovery messages
|
||||
//
|
||||
enum flex_bs_capability {
|
||||
LOPHY = 0;
|
||||
HIPHY = 1;
|
||||
LOMAC = 2;
|
||||
HIMAC = 3;
|
||||
RLC = 4;
|
||||
PDCP = 5;
|
||||
SDAP = 6;
|
||||
RRC = 7;
|
||||
}
|
||||
|
||||
message flex_hello {
|
||||
optional flex_header header = 1;
|
||||
optional flex_header header = 1;
|
||||
optional uint64 bs_id = 2; // Unique id to distinguish the eNB
|
||||
repeated flex_bs_capability capabilities = 3;
|
||||
}
|
||||
|
||||
message flex_echo_request {
|
||||
@@ -131,7 +144,6 @@ message flex_enb_config_request {
|
||||
|
||||
message flex_enb_config_reply {
|
||||
optional flex_header header = 1;
|
||||
optional uint64 eNB_id = 2; // Unique id to distinguish the eNB
|
||||
repeated flex_cell_config cell_config = 3;
|
||||
optional uint32 device_spec = 4;
|
||||
}
|
||||
@@ -223,4 +235,6 @@ message flex_echo_reply_latency {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
message flex_disconnect {
|
||||
optional flex_header header = 1;
|
||||
}
|
||||
|
||||
@@ -12,6 +12,7 @@ enum flex_type {
|
||||
FLPT_HELLO = 0;
|
||||
FLPT_ECHO_REQUEST = 1;
|
||||
FLPT_ECHO_REPLY = 2;
|
||||
FLPT_DISCONNECT = 20;
|
||||
|
||||
// Statistics and measurement messages
|
||||
FLPT_STATS_REQUEST = 3;
|
||||
|
||||
+120
-154
@@ -33,13 +33,9 @@
|
||||
#include "log.h"
|
||||
#include "log_extern.h"
|
||||
#include "assertions.h"
|
||||
#if defined(ENABLE_ITTI)
|
||||
# include "intertask_interface.h"
|
||||
# if defined(ENABLE_USE_MME)
|
||||
# include "s1ap_eNB.h"
|
||||
# include "sctp_eNB_task.h"
|
||||
# endif
|
||||
#endif
|
||||
#include "intertask_interface.h"
|
||||
#include "s1ap_eNB.h"
|
||||
#include "sctp_eNB_task.h"
|
||||
#include "SystemInformationBlockType2.h"
|
||||
|
||||
#include "PHY/phy_extern.h"
|
||||
@@ -56,11 +52,10 @@
|
||||
void RCconfig_NbIoTL1(void) {
|
||||
paramdef_t NbIoT_L1_Params[] = L1PARAMS_DESC;
|
||||
paramlist_def_t NbIoT_L1_ParamList = {NBIOT_L1LIST_CONFIG_STRING,NULL,0};
|
||||
/* No component carrier for NbIoT, ignore number of CC */
|
||||
// NbIoT_L1_Params[L1_CC_IDX ].paramflags = PARAMFLAG_DONOTREAD;
|
||||
config_getlist( &NbIoT_L1_ParamList,NbIoT_L1_Params,sizeof(NbIoT_L1_Params)/sizeof(paramdef_t), NULL);
|
||||
|
||||
/* No component carrier for NbIoT, ignore number of CC */
|
||||
// NbIoT_L1_Params[L1_CC_IDX ].paramflags = PARAMFLAG_DONOTREAD;
|
||||
|
||||
config_getlist( &NbIoT_L1_ParamList,NbIoT_L1_Params,sizeof(NbIoT_L1_Params)/sizeof(paramdef_t), NULL);
|
||||
if (NbIoT_L1_ParamList.numelt > 0) {
|
||||
if (RC.L1_NB_IoT == NULL) {
|
||||
RC.L1_NB_IoT = (PHY_VARS_eNB_NB_IoT **)malloc(RC.nb_nb_iot_L1_inst*sizeof(PHY_VARS_eNB_NB_IoT *));
|
||||
@@ -68,219 +63,190 @@ void RCconfig_NbIoTL1(void) {
|
||||
memset(RC.L1_NB_IoT,0,RC.nb_nb_iot_L1_inst*sizeof(PHY_VARS_eNB_NB_IoT *));
|
||||
}
|
||||
|
||||
|
||||
for(int j = 0; j <NbIoT_L1_ParamList.numelt ; j++) {
|
||||
for(int j = 0; j <NbIoT_L1_ParamList.numelt ; j++) {
|
||||
if (RC.L1_NB_IoT[j] == NULL) {
|
||||
RC.L1_NB_IoT[j] = (PHY_VARS_eNB_NB_IoT *)malloc(sizeof(PHY_VARS_eNB_NB_IoT));
|
||||
LOG_I(PHY,"RC.L1_NB_IoT[%d] = %p\n",j,RC.L1_NB_IoT[j]);
|
||||
memset(RC.L1_NB_IoT[j],0,sizeof(PHY_VARS_eNB_NB_IoT));
|
||||
RC.L1_NB_IoT[j] = (PHY_VARS_eNB_NB_IoT *)malloc(sizeof(PHY_VARS_eNB_NB_IoT));
|
||||
LOG_I(PHY,"RC.L1_NB_IoT[%d] = %p\n",j,RC.L1_NB_IoT[j]);
|
||||
memset(RC.L1_NB_IoT[j],0,sizeof(PHY_VARS_eNB_NB_IoT));
|
||||
}
|
||||
if (strcmp(*(NbIoT_L1_ParamList.paramarray[j][L1_TRANSPORT_N_PREFERENCE_IDX].strptr), "local_mac") == 0) {
|
||||
|
||||
if (strcmp(*(NbIoT_L1_ParamList.paramarray[j][L1_TRANSPORT_N_PREFERENCE_IDX].strptr), "local_mac") == 0) {
|
||||
} else if (strcmp(*(NbIoT_L1_ParamList.paramarray[j][L1_TRANSPORT_N_PREFERENCE_IDX].strptr), "nfapi") == 0) {
|
||||
RC.L1_NB_IoT[j]->eth_params_n.local_if_name = strdup(*(NbIoT_L1_ParamList.paramarray[j][L1_LOCAL_N_IF_NAME_IDX].strptr));
|
||||
RC.L1_NB_IoT[j]->eth_params_n.my_addr = strdup(*(NbIoT_L1_ParamList.paramarray[j][L1_LOCAL_N_ADDRESS_IDX].strptr));
|
||||
RC.L1_NB_IoT[j]->eth_params_n.remote_addr = strdup(*(NbIoT_L1_ParamList.paramarray[j][L1_REMOTE_N_ADDRESS_IDX].strptr));
|
||||
RC.L1_NB_IoT[j]->eth_params_n.my_portc = *(NbIoT_L1_ParamList.paramarray[j][L1_LOCAL_N_PORTC_IDX].iptr);
|
||||
RC.L1_NB_IoT[j]->eth_params_n.remote_portc = *(NbIoT_L1_ParamList.paramarray[j][L1_REMOTE_N_PORTC_IDX].iptr);
|
||||
RC.L1_NB_IoT[j]->eth_params_n.my_portd = *(NbIoT_L1_ParamList.paramarray[j][L1_LOCAL_N_PORTD_IDX].iptr);
|
||||
RC.L1_NB_IoT[j]->eth_params_n.remote_portd = *(NbIoT_L1_ParamList.paramarray[j][L1_REMOTE_N_PORTD_IDX].iptr);
|
||||
RC.L1_NB_IoT[j]->eth_params_n.transp_preference = ETH_UDP_MODE;
|
||||
} else { // other midhaul
|
||||
}
|
||||
else if (strcmp(*(NbIoT_L1_ParamList.paramarray[j][L1_TRANSPORT_N_PREFERENCE_IDX].strptr), "nfapi") == 0) {
|
||||
RC.L1_NB_IoT[j]->eth_params_n.local_if_name = strdup(*(NbIoT_L1_ParamList.paramarray[j][L1_LOCAL_N_IF_NAME_IDX].strptr));
|
||||
RC.L1_NB_IoT[j]->eth_params_n.my_addr = strdup(*(NbIoT_L1_ParamList.paramarray[j][L1_LOCAL_N_ADDRESS_IDX].strptr));
|
||||
RC.L1_NB_IoT[j]->eth_params_n.remote_addr = strdup(*(NbIoT_L1_ParamList.paramarray[j][L1_REMOTE_N_ADDRESS_IDX].strptr));
|
||||
RC.L1_NB_IoT[j]->eth_params_n.my_portc = *(NbIoT_L1_ParamList.paramarray[j][L1_LOCAL_N_PORTC_IDX].iptr);
|
||||
RC.L1_NB_IoT[j]->eth_params_n.remote_portc = *(NbIoT_L1_ParamList.paramarray[j][L1_REMOTE_N_PORTC_IDX].iptr);
|
||||
RC.L1_NB_IoT[j]->eth_params_n.my_portd = *(NbIoT_L1_ParamList.paramarray[j][L1_LOCAL_N_PORTD_IDX].iptr);
|
||||
RC.L1_NB_IoT[j]->eth_params_n.remote_portd = *(NbIoT_L1_ParamList.paramarray[j][L1_REMOTE_N_PORTD_IDX].iptr);
|
||||
RC.L1_NB_IoT[j]->eth_params_n.transp_preference = ETH_UDP_MODE;
|
||||
}
|
||||
|
||||
else { // other midhaul
|
||||
}
|
||||
}// j=0..num_inst
|
||||
|
||||
printf("Initializing northbound interface for NB-IoT L1\n");
|
||||
l1_north_init_NB_IoT();
|
||||
} else {
|
||||
LOG_I(PHY,"No " NBIOT_L1LIST_CONFIG_STRING " configuration found");
|
||||
LOG_I(PHY,"No " NBIOT_L1LIST_CONFIG_STRING " configuration found");
|
||||
}
|
||||
}
|
||||
|
||||
void RCconfig_NbIoTmacrlc(void) {
|
||||
|
||||
|
||||
|
||||
paramdef_t NbIoT_MacRLC_Params[] = MACRLCPARAMS_DESC;
|
||||
paramlist_def_t NbIoT_MacRLC_ParamList = {NBIOT_MACRLCLIST_CONFIG_STRING,NULL,0};
|
||||
|
||||
|
||||
/* No component carrier for NbIoT, ignore number of CC */
|
||||
// NbIoT_MacRLC_Params[MACRLC_CC_IDX ].paramflags = PARAMFLAG_DONOTREAD;
|
||||
|
||||
config_getlist( &NbIoT_MacRLC_ParamList,NbIoT_MacRLC_Params,sizeof(NbIoT_MacRLC_Params)/sizeof(paramdef_t), NULL);
|
||||
|
||||
/* No component carrier for NbIoT, ignore number of CC */
|
||||
// NbIoT_MacRLC_Params[MACRLC_CC_IDX ].paramflags = PARAMFLAG_DONOTREAD;
|
||||
config_getlist( &NbIoT_MacRLC_ParamList,NbIoT_MacRLC_Params,sizeof(NbIoT_MacRLC_Params)/sizeof(paramdef_t), NULL);
|
||||
|
||||
if ( NbIoT_MacRLC_ParamList.numelt > 0) {
|
||||
mac_top_init_eNB_NB_IoT();
|
||||
for (int j=0;j<RC.nb_nb_iot_macrlc_inst;j++) {
|
||||
|
||||
for (int j=0; j<RC.nb_nb_iot_macrlc_inst; j++) {
|
||||
if (strcmp(*(NbIoT_MacRLC_ParamList.paramarray[j][MACRLC_TRANSPORT_N_PREFERENCE_IDX].strptr), "local_RRC") == 0) {
|
||||
// check number of instances is same as RRC/PDCP
|
||||
|
||||
// check number of instances is same as RRC/PDCP
|
||||
} else if (strcmp(*(NbIoT_MacRLC_ParamList.paramarray[j][MACRLC_TRANSPORT_N_PREFERENCE_IDX].strptr), "cudu") == 0) {
|
||||
RC.nb_iot_mac[j]->eth_params_n.local_if_name = strdup(*(NbIoT_MacRLC_ParamList.paramarray[j][MACRLC_LOCAL_N_IF_NAME_IDX].strptr));
|
||||
RC.nb_iot_mac[j]->eth_params_n.my_addr = strdup(*(NbIoT_MacRLC_ParamList.paramarray[j][MACRLC_LOCAL_N_ADDRESS_IDX].strptr));
|
||||
RC.nb_iot_mac[j]->eth_params_n.remote_addr = strdup(*(NbIoT_MacRLC_ParamList.paramarray[j][MACRLC_REMOTE_N_ADDRESS_IDX].strptr));
|
||||
RC.nb_iot_mac[j]->eth_params_n.my_portc = *(NbIoT_MacRLC_ParamList.paramarray[j][MACRLC_LOCAL_N_PORTC_IDX].iptr);
|
||||
RC.nb_iot_mac[j]->eth_params_n.remote_portc = *(NbIoT_MacRLC_ParamList.paramarray[j][MACRLC_REMOTE_N_PORTC_IDX].iptr);
|
||||
RC.nb_iot_mac[j]->eth_params_n.my_portd = *(NbIoT_MacRLC_ParamList.paramarray[j][MACRLC_LOCAL_N_PORTD_IDX].iptr);
|
||||
RC.nb_iot_mac[j]->eth_params_n.remote_portd = *(NbIoT_MacRLC_ParamList.paramarray[j][MACRLC_REMOTE_N_PORTD_IDX].iptr);;
|
||||
RC.nb_iot_mac[j]->eth_params_n.transp_preference = ETH_UDP_MODE;
|
||||
RC.nb_iot_mac[j]->eth_params_n.local_if_name = strdup(*(NbIoT_MacRLC_ParamList.paramarray[j][MACRLC_LOCAL_N_IF_NAME_IDX].strptr));
|
||||
RC.nb_iot_mac[j]->eth_params_n.my_addr = strdup(*(NbIoT_MacRLC_ParamList.paramarray[j][MACRLC_LOCAL_N_ADDRESS_IDX].strptr));
|
||||
RC.nb_iot_mac[j]->eth_params_n.remote_addr = strdup(*(NbIoT_MacRLC_ParamList.paramarray[j][MACRLC_REMOTE_N_ADDRESS_IDX].strptr));
|
||||
RC.nb_iot_mac[j]->eth_params_n.my_portc = *(NbIoT_MacRLC_ParamList.paramarray[j][MACRLC_LOCAL_N_PORTC_IDX].iptr);
|
||||
RC.nb_iot_mac[j]->eth_params_n.remote_portc = *(NbIoT_MacRLC_ParamList.paramarray[j][MACRLC_REMOTE_N_PORTC_IDX].iptr);
|
||||
RC.nb_iot_mac[j]->eth_params_n.my_portd = *(NbIoT_MacRLC_ParamList.paramarray[j][MACRLC_LOCAL_N_PORTD_IDX].iptr);
|
||||
RC.nb_iot_mac[j]->eth_params_n.remote_portd = *(NbIoT_MacRLC_ParamList.paramarray[j][MACRLC_REMOTE_N_PORTD_IDX].iptr);;
|
||||
RC.nb_iot_mac[j]->eth_params_n.transp_preference = ETH_UDP_MODE;
|
||||
} else { // other midhaul
|
||||
AssertFatal(1==0,"MACRLC %d: %s unknown northbound midhaul\n",j, *(NbIoT_MacRLC_ParamList.paramarray[j][MACRLC_TRANSPORT_N_PREFERENCE_IDX].strptr));
|
||||
}
|
||||
AssertFatal(1==0,"MACRLC %d: %s unknown northbound midhaul\n",j, *(NbIoT_MacRLC_ParamList.paramarray[j][MACRLC_TRANSPORT_N_PREFERENCE_IDX].strptr));
|
||||
}
|
||||
|
||||
if (strcmp(*(NbIoT_MacRLC_ParamList.paramarray[j][MACRLC_TRANSPORT_S_PREFERENCE_IDX].strptr), "local_L1") == 0) {
|
||||
|
||||
|
||||
} else if (strcmp(*(NbIoT_MacRLC_ParamList.paramarray[j][MACRLC_TRANSPORT_S_PREFERENCE_IDX].strptr), "nfapi") == 0) {
|
||||
RC.nb_iot_mac[j]->eth_params_s.local_if_name = strdup(*(NbIoT_MacRLC_ParamList.paramarray[j][MACRLC_LOCAL_S_IF_NAME_IDX].strptr));
|
||||
RC.nb_iot_mac[j]->eth_params_s.my_addr = strdup(*(NbIoT_MacRLC_ParamList.paramarray[j][MACRLC_LOCAL_S_ADDRESS_IDX].strptr));
|
||||
RC.nb_iot_mac[j]->eth_params_s.remote_addr = strdup(*(NbIoT_MacRLC_ParamList.paramarray[j][MACRLC_REMOTE_S_ADDRESS_IDX].strptr));
|
||||
RC.nb_iot_mac[j]->eth_params_s.my_portc = *(NbIoT_MacRLC_ParamList.paramarray[j][MACRLC_LOCAL_S_PORTC_IDX].iptr);
|
||||
RC.nb_iot_mac[j]->eth_params_s.remote_portc = *(NbIoT_MacRLC_ParamList.paramarray[j][MACRLC_REMOTE_S_PORTC_IDX].iptr);
|
||||
RC.nb_iot_mac[j]->eth_params_s.my_portd = *(NbIoT_MacRLC_ParamList.paramarray[j][MACRLC_LOCAL_S_PORTD_IDX].iptr);
|
||||
RC.nb_iot_mac[j]->eth_params_s.remote_portd = *(NbIoT_MacRLC_ParamList.paramarray[j][MACRLC_REMOTE_S_PORTD_IDX].iptr);
|
||||
RC.nb_iot_mac[j]->eth_params_s.transp_preference = ETH_UDP_MODE;
|
||||
RC.nb_iot_mac[j]->eth_params_s.local_if_name = strdup(*(NbIoT_MacRLC_ParamList.paramarray[j][MACRLC_LOCAL_S_IF_NAME_IDX].strptr));
|
||||
RC.nb_iot_mac[j]->eth_params_s.my_addr = strdup(*(NbIoT_MacRLC_ParamList.paramarray[j][MACRLC_LOCAL_S_ADDRESS_IDX].strptr));
|
||||
RC.nb_iot_mac[j]->eth_params_s.remote_addr = strdup(*(NbIoT_MacRLC_ParamList.paramarray[j][MACRLC_REMOTE_S_ADDRESS_IDX].strptr));
|
||||
RC.nb_iot_mac[j]->eth_params_s.my_portc = *(NbIoT_MacRLC_ParamList.paramarray[j][MACRLC_LOCAL_S_PORTC_IDX].iptr);
|
||||
RC.nb_iot_mac[j]->eth_params_s.remote_portc = *(NbIoT_MacRLC_ParamList.paramarray[j][MACRLC_REMOTE_S_PORTC_IDX].iptr);
|
||||
RC.nb_iot_mac[j]->eth_params_s.my_portd = *(NbIoT_MacRLC_ParamList.paramarray[j][MACRLC_LOCAL_S_PORTD_IDX].iptr);
|
||||
RC.nb_iot_mac[j]->eth_params_s.remote_portd = *(NbIoT_MacRLC_ParamList.paramarray[j][MACRLC_REMOTE_S_PORTD_IDX].iptr);
|
||||
RC.nb_iot_mac[j]->eth_params_s.transp_preference = ETH_UDP_MODE;
|
||||
} else { // other midhaul
|
||||
AssertFatal(1==0,"MACRLC %d: %s unknown southbound midhaul\n",j,*(NbIoT_MacRLC_ParamList.paramarray[j][MACRLC_TRANSPORT_S_PREFERENCE_IDX].strptr));
|
||||
}
|
||||
AssertFatal(1==0,"MACRLC %d: %s unknown southbound midhaul\n",j,*(NbIoT_MacRLC_ParamList.paramarray[j][MACRLC_TRANSPORT_S_PREFERENCE_IDX].strptr));
|
||||
}
|
||||
}// j=0..num_inst */
|
||||
} else {// MacRLC_ParamList.numelt > 0
|
||||
AssertFatal (0,
|
||||
"No " NBIOT_MACRLCLIST_CONFIG_STRING " configuration found");
|
||||
AssertFatal (0,
|
||||
"No " NBIOT_MACRLCLIST_CONFIG_STRING " configuration found");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
int RCconfig_NbIoTRRC(MessageDef *msg_p, int nbiotrrc_id,eNB_RRC_INST_NB_IoT *nbiotrrc) {
|
||||
|
||||
|
||||
char instprefix[MAX_OPTNAME_SIZE*3 + 32];
|
||||
|
||||
|
||||
checkedparam_t NBIoTCheckParams[] = NBIOT_RRCPARAMS_CHECK_DESC;
|
||||
checkedparam_t NBIoTCheckParams[] = NBIOT_RRCPARAMS_CHECK_DESC_0_14;
|
||||
checkedparam_t NBIoTCheckParamsB[] = NBIOT_RRCPARAMS_CHECK_DESC_15_end;
|
||||
paramdef_t NBIoTParams[] = NBIOTRRCPARAMS_DESC;
|
||||
|
||||
paramdef_t NBIoTPrachParams[] = NBIOTRRC_NPRACH_PARAMS_DESC;
|
||||
checkedparam_t NBIoTPrachCheckParams[] = NBIOT_RRCLIST_NPRACHPARAMSCHECK_DESC;
|
||||
|
||||
paramdef_t NBIoTRRCRefParams[] = NBIOTRRCPARAMS_RRCREF_DESC;
|
||||
|
||||
paramdef_t NBIoTLteCCParams[] = NBIOT_LTECCPARAMS_DESC;
|
||||
checkedparam_t NBIoTLteCCCheckParams[] = NBIOT_LTECCPARAMS_CHECK_DESC;
|
||||
/* map parameter checking array instances to parameter definition array instances */
|
||||
|
||||
/* map parameter checking array instances to parameter definition array instances */
|
||||
for (int i=0; (i<sizeof(NBIoTParams)/sizeof(paramdef_t)) && (i<sizeof(NBIoTCheckParams)/sizeof(checkedparam_t)); i++ ) {
|
||||
NBIoTParams[i].chkPptr = &(NBIoTCheckParams[i]);
|
||||
}
|
||||
for (int i=0; (i<sizeof(NBIoTPrachParams)/sizeof(paramdef_t)) && (i<sizeof(NBIoTPrachCheckParams)/sizeof(checkedparam_t)); i++ ) {
|
||||
NBIoTPrachParams[i].chkPptr = &(NBIoTPrachCheckParams[i]);
|
||||
NBIoTParams[i].chkPptr = &(NBIoTCheckParams[i]);
|
||||
}
|
||||
|
||||
/* brut force itti message fields assignment, to be redesigned with itti replacement */
|
||||
for (int i=0; (i<sizeof(NBIoTParams)/sizeof(paramdef_t)) && (i<sizeof(NBIoTCheckParamsB)/sizeof(checkedparam_t)); i++ ) {
|
||||
NBIoTParams[i+15].chkPptr = &(NBIoTCheckParamsB[i]);
|
||||
}
|
||||
|
||||
for (int i=0; (i<sizeof(NBIoTPrachParams)/sizeof(paramdef_t)) && (i<sizeof(NBIoTPrachCheckParams)/sizeof(checkedparam_t)); i++ ) {
|
||||
NBIoTPrachParams[i].chkPptr = &(NBIoTPrachCheckParams[i]);
|
||||
}
|
||||
|
||||
/* brut force itti message fields assignment, to be redesigned with itti replacement */
|
||||
NBIoTParams[NBIOT_RACH_RARESPONSEWINDOWSIZE_NB_IDX].uptr = (uint32_t *)&(NBIOTRRC_CONFIGURATION_REQ (msg_p).rach_raResponseWindowSize_NB);
|
||||
NBIoTParams[NBIOT_RACH_MACCONTENTIONRESOLUTIONTIMER_NB_IDX].uptr = (uint32_t *)&(NBIOTRRC_CONFIGURATION_REQ (msg_p).rach_macContentionResolutionTimer_NB);
|
||||
NBIoTParams[NBIOT_RACH_POWERRAMPINGSTEP_NB_IDX].uptr = (uint32_t *)&(NBIOTRRC_CONFIGURATION_REQ (msg_p).rach_powerRampingStep_NB);
|
||||
NBIoTParams[NBIOT_RACH_POWERRAMPINGSTEP_NB_IDX].uptr = (uint32_t *)&(NBIOTRRC_CONFIGURATION_REQ (msg_p).rach_powerRampingStep_NB);
|
||||
NBIoTParams[NBIOT_RACH_PREAMBLEINITIALRECEIVEDTARGETPOWER_NB_IDX].uptr = (uint32_t *)&(NBIOTRRC_CONFIGURATION_REQ (msg_p).rach_preambleInitialReceivedTargetPower_NB);
|
||||
NBIoTParams[NBIOT_RACH_PREAMBLETRANSMAX_CE_NB_IDX].uptr = (uint32_t *)&(NBIOTRRC_CONFIGURATION_REQ (msg_p).rach_preambleTransMax_CE_NB);
|
||||
NBIoTParams[NBIOT_BCCH_MODIFICATIONPERIODCOEFF_NB_IDX].uptr = (uint32_t *)&(NBIOTRRC_CONFIGURATION_REQ (msg_p).bcch_modificationPeriodCoeff_NB);
|
||||
NBIoTParams[NBIOT_PCCH_DEFAULTPAGINGCYCLE_NB_IDX].uptr = (uint32_t *)&(NBIOTRRC_CONFIGURATION_REQ (msg_p).pcch_defaultPagingCycle_NB);
|
||||
NBIoTParams[NBIOT_NPRACH_CP_LENGTH_IDX].uptr = (uint32_t *)&(NBIOTRRC_CONFIGURATION_REQ (msg_p).nprach_CP_Length);
|
||||
NBIoTParams[NBIOT_NPRACH_RSRP_RANGE_IDX].uptr = (uint32_t *)&(NBIOTRRC_CONFIGURATION_REQ (msg_p).nprach_rsrp_range);
|
||||
|
||||
|
||||
|
||||
NBIoTParams[NBIOT_RACH_PREAMBLETRANSMAX_CE_NB_IDX].uptr = (uint32_t *)&(NBIOTRRC_CONFIGURATION_REQ (msg_p).rach_preambleTransMax_CE_NB);
|
||||
NBIoTParams[NBIOT_BCCH_MODIFICATIONPERIODCOEFF_NB_IDX].uptr = (uint32_t *)&(NBIOTRRC_CONFIGURATION_REQ (msg_p).bcch_modificationPeriodCoeff_NB);
|
||||
NBIoTParams[NBIOT_PCCH_DEFAULTPAGINGCYCLE_NB_IDX].uptr = (uint32_t *)&(NBIOTRRC_CONFIGURATION_REQ (msg_p).pcch_defaultPagingCycle_NB);
|
||||
NBIoTParams[NBIOT_NPRACH_CP_LENGTH_IDX].uptr = (uint32_t *)&(NBIOTRRC_CONFIGURATION_REQ (msg_p).nprach_CP_Length);
|
||||
NBIoTParams[NBIOT_NPRACH_RSRP_RANGE_IDX].uptr = (uint32_t *)&(NBIOTRRC_CONFIGURATION_REQ (msg_p).nprach_rsrp_range);
|
||||
NBIoTParams[NBIOT_MAXNUMPREAMBLEATTEMPTCE_NB_IDX].uptr = (uint32_t *)&(NBIOTRRC_CONFIGURATION_REQ (msg_p).maxNumPreambleAttemptCE_NB);
|
||||
|
||||
NBIoTParams[NBIOT_NPDSCH_NRS_POWER_IDX].uptr = (uint32_t *)&(NBIOTRRC_CONFIGURATION_REQ (msg_p).npdsch_nrs_Power);
|
||||
NBIoTParams[NBIOT_NPUSCH_ACK_NACK_NUMREPETITIONS_NB_IDX].uptr = (uint32_t *)&(NBIOTRRC_CONFIGURATION_REQ (msg_p). npusch_ack_nack_numRepetitions_NB);
|
||||
NBIoTParams[NBIOT_NPUSCH_SRS_SUBFRAMECONFIG_NB_IDX].uptr = (uint32_t *)&(NBIOTRRC_CONFIGURATION_REQ (msg_p). npusch_srs_SubframeConfig_NB);
|
||||
NBIoTParams[NBIOT_NPUSCH_THREETONE_CYCLICSHIFT_R13_IDX].uptr = (uint32_t *)&(NBIOTRRC_CONFIGURATION_REQ (msg_p).npusch_threeTone_CyclicShift_r13);
|
||||
NBIoTParams[NBIOT_NPDSCH_NRS_POWER_IDX].uptr = (uint32_t *)&(NBIOTRRC_CONFIGURATION_REQ (msg_p).npdsch_nrs_Power);
|
||||
NBIoTParams[NBIOT_NPUSCH_ACK_NACK_NUMREPETITIONS_NB_IDX].uptr = (uint32_t *)&(NBIOTRRC_CONFIGURATION_REQ (msg_p). npusch_ack_nack_numRepetitions_NB);
|
||||
NBIoTParams[NBIOT_NPUSCH_SRS_SUBFRAMECONFIG_NB_IDX].uptr = (uint32_t *)&(NBIOTRRC_CONFIGURATION_REQ (msg_p). npusch_srs_SubframeConfig_NB);
|
||||
NBIoTParams[NBIOT_NPUSCH_THREETONE_CYCLICSHIFT_R13_IDX].uptr = (uint32_t *)&(NBIOTRRC_CONFIGURATION_REQ (msg_p).npusch_threeTone_CyclicShift_r13);
|
||||
NBIoTParams[NBIOT_NPUSCH_SIXTONE_CYCLICSHIFT_R13_IDX].uptr = (uint32_t *)&(NBIOTRRC_CONFIGURATION_REQ (msg_p).npusch_sixTone_CyclicShift_r13);
|
||||
|
||||
NBIoTParams[NBIOT_NPUSCH_GROUPASSIGNMENTNPUSCH_R13_IDX].uptr = (uint32_t *)&(NBIOTRRC_CONFIGURATION_REQ (msg_p).npusch_groupAssignmentNPUSCH_r13);
|
||||
NBIoTParams[NBIOT_DL_GAPTHRESHOLD_NB_IDX].uptr = (uint32_t *)&(NBIOTRRC_CONFIGURATION_REQ (msg_p).dl_GapThreshold_NB);
|
||||
NBIoTParams[NBIOT_DL_GAPPERIODICITY_NB_IDX].uptr = (uint32_t *)&(NBIOTRRC_CONFIGURATION_REQ (msg_p).dl_GapPeriodicity_NB);
|
||||
|
||||
NBIoTParams[NBIOT_NPUSCH_P0_NOMINALNPUSCH_IDX].uptr = (uint32_t *)&(NBIOTRRC_CONFIGURATION_REQ (msg_p).npusch_p0_NominalNPUSCH);
|
||||
|
||||
NBIoTParams[NBIOT_DELTAPREAMBLEMSG3_IDX].uptr = (uint32_t *)&(NBIOTRRC_CONFIGURATION_REQ (msg_p).deltaPreambleMsg3);
|
||||
NBIoTParams[NBIOT_UE_TIMERSANDCONSTANTS_T300_NB_IDX].uptr = (uint32_t *)&(NBIOTRRC_CONFIGURATION_REQ (msg_p).ue_TimersAndConstants_t300_NB);
|
||||
NBIoTParams[NBIOT_DL_GAPTHRESHOLD_NB_IDX].uptr = (uint32_t *)&(NBIOTRRC_CONFIGURATION_REQ (msg_p).dl_GapThreshold_NB);
|
||||
NBIoTParams[NBIOT_DL_GAPPERIODICITY_NB_IDX].uptr = (uint32_t *)&(NBIOTRRC_CONFIGURATION_REQ (msg_p).dl_GapPeriodicity_NB);
|
||||
NBIoTParams[NBIOT_NPUSCH_P0_NOMINALNPUSCH_IDX].uptr = (uint32_t *)&(NBIOTRRC_CONFIGURATION_REQ (msg_p).npusch_p0_NominalNPUSCH);
|
||||
NBIoTParams[NBIOT_DELTAPREAMBLEMSG3_IDX].uptr = (uint32_t *)&(NBIOTRRC_CONFIGURATION_REQ (msg_p).deltaPreambleMsg3);
|
||||
NBIoTParams[NBIOT_UE_TIMERSANDCONSTANTS_T300_NB_IDX].uptr = (uint32_t *)&(NBIOTRRC_CONFIGURATION_REQ (msg_p).ue_TimersAndConstants_t300_NB);
|
||||
NBIoTParams[NBIOT_UE_TIMERSANDCONSTANTS_T301_NB_IDX].uptr = (uint32_t *)&(NBIOTRRC_CONFIGURATION_REQ (msg_p).ue_TimersAndConstants_t301_NB);
|
||||
NBIoTParams[NBIOT_UE_TIMERSANDCONSTANTS_T310_NB_IDX].uptr = (uint32_t *)&(NBIOTRRC_CONFIGURATION_REQ (msg_p).ue_TimersAndConstants_t310_NB);
|
||||
NBIoTParams[NBIOT_UE_TIMERSANDCONSTANTS_T311_NB_IDX].uptr = (uint32_t *)&(NBIOTRRC_CONFIGURATION_REQ (msg_p).ue_TimersAndConstants_t311_NB);
|
||||
NBIoTParams[NBIOT_UE_TIMERSANDCONSTANTS_N310_NB_IDX].uptr = (uint32_t *)&(NBIOTRRC_CONFIGURATION_REQ (msg_p).ue_TimersAndConstants_n310_NB);
|
||||
NBIoTParams[NBIOT_UE_TIMERSANDCONSTANTS_T310_NB_IDX].uptr = (uint32_t *)&(NBIOTRRC_CONFIGURATION_REQ (msg_p).ue_TimersAndConstants_t310_NB);
|
||||
NBIoTParams[NBIOT_UE_TIMERSANDCONSTANTS_T311_NB_IDX].uptr = (uint32_t *)&(NBIOTRRC_CONFIGURATION_REQ (msg_p).ue_TimersAndConstants_t311_NB);
|
||||
NBIoTParams[NBIOT_UE_TIMERSANDCONSTANTS_N310_NB_IDX].uptr = (uint32_t *)&(NBIOTRRC_CONFIGURATION_REQ (msg_p).ue_TimersAndConstants_n310_NB);
|
||||
NBIoTParams[NBIOT_UE_TIMERSANDCONSTANTS_N311_NB_IDX].uptr = (uint32_t *)&(NBIOTRRC_CONFIGURATION_REQ (msg_p).ue_TimersAndConstants_n311_NB);
|
||||
|
||||
sprintf(instprefix, NBIOT_RRCLIST_CONFIG_STRING ".[%i]",nbiotrrc_id);
|
||||
config_get( NBIoTParams,sizeof(NBIoTParams)/sizeof(paramdef_t),instprefix);
|
||||
|
||||
config_get( NBIoTParams,sizeof(NBIoTParams)/sizeof(paramdef_t),instprefix);
|
||||
NBIOTRRC_CONFIGURATION_REQ (msg_p).nprach_SubcarrierMSG3_RangeStart = config_get_processedint( &(NBIoTParams[NBIOT_NPRACH_SUBCARRIERMSG3_RANGESTART_IDX]) );
|
||||
NBIOTRRC_CONFIGURATION_REQ (msg_p).npusch_groupHoppingEnabled = config_get_processedint( &(NBIoTParams[NBIOT_NPUSCH_GROUPHOPPINGENABLED_IDX] ) );
|
||||
NBIOTRRC_CONFIGURATION_REQ (msg_p).dl_GapDurationCoeff_NB = config_get_processedint( &(NBIoTParams[NBIOT_DL_GAPDURATIONCOEFF_NB_IDX] ) );
|
||||
NBIOTRRC_CONFIGURATION_REQ (msg_p).npusch_groupHoppingEnabled = config_get_processedint( &(NBIoTParams[NBIOT_NPUSCH_GROUPHOPPINGENABLED_IDX] ) );
|
||||
NBIOTRRC_CONFIGURATION_REQ (msg_p).dl_GapDurationCoeff_NB = config_get_processedint( &(NBIoTParams[NBIOT_DL_GAPDURATIONCOEFF_NB_IDX] ) );
|
||||
NBIOTRRC_CONFIGURATION_REQ (msg_p).npusch_alpha = config_get_processedint( &(NBIoTParams[NBIOT_NPUSCH_ALPHA_IDX] ) );
|
||||
|
||||
for (int i=0; i<MAX_NUM_NBIOT_CELEVELS; i++) {
|
||||
char *tmpptr=NULL;
|
||||
NBIoTPrachParams[NBIOT_NPRACH_PERIODICITY_IDX ].uptr = (uint32_t *)&(NBIOTRRC_CONFIGURATION_REQ (msg_p).nprach_Periodicity[i]);
|
||||
NBIoTPrachParams[NBIOT_NPRACH_STARTTIME_IDX].uptr = (uint32_t *)&(NBIOTRRC_CONFIGURATION_REQ (msg_p).nprach_StartTime[i]);
|
||||
NBIoTPrachParams[NBIOT_NPRACH_SUBCARRIEROFFSET_IDX].uptr = (uint32_t *)&(NBIOTRRC_CONFIGURATION_REQ (msg_p).nprach_SubcarrierOffset[i]);
|
||||
NBIoTPrachParams[NBIOT_NPRACH_NUMSUBCARRIERS_IDX].uptr = (uint32_t *)&(NBIOTRRC_CONFIGURATION_REQ (msg_p).nprach_NumSubcarriers[i]);
|
||||
NBIoTPrachParams[NBIOT_NUMREPETITIONSPERPREAMBLEATTEMPT_NB_IDX].uptr = (uint32_t *)&(NBIOTRRC_CONFIGURATION_REQ (msg_p).numRepetitionsPerPreambleAttempt_NB[i]);
|
||||
NBIoTParams[NBIOT_NPDCCH_NUMREPETITIONS_RA_IDX].uptr = (uint32_t *)&(NBIOTRRC_CONFIGURATION_REQ (msg_p).npdcch_NumRepetitions_RA[i]);
|
||||
NBIoTParams[NBIOT_NPDCCH_STARTSF_CSS_RA_IDX].uptr = (uint32_t *)&(NBIOTRRC_CONFIGURATION_REQ (msg_p).npdcch_StartSF_CSS_RA[i]);
|
||||
NBIoTParams[NBIOT_NPDCCH_OFFSET_RA_IDX].strptr = &tmpptr;
|
||||
sprintf(instprefix, "%s.[%i].%s.[%i]",NBIOT_RRCLIST_CONFIG_STRING, nbiotrrc_id,NBIOT_RRCLIST_NPRACHPARAMS_CONFIG_STRING,i);
|
||||
config_get( NBIoTPrachParams,sizeof(NBIoTPrachParams)/sizeof(paramdef_t),instprefix);
|
||||
NBIOTRRC_CONFIGURATION_REQ (msg_p).npdcch_Offset_RA[i] = config_get_processedint( &(NBIoTPrachParams[NBIOT_NPDCCH_OFFSET_RA_IDX]) );
|
||||
char *tmpptr=NULL;
|
||||
NBIoTPrachParams[NBIOT_NPRACH_PERIODICITY_IDX ].uptr = (uint32_t *)&(NBIOTRRC_CONFIGURATION_REQ (msg_p).nprach_Periodicity[i]);
|
||||
NBIoTPrachParams[NBIOT_NPRACH_STARTTIME_IDX].uptr = (uint32_t *)&(NBIOTRRC_CONFIGURATION_REQ (msg_p).nprach_StartTime[i]);
|
||||
NBIoTPrachParams[NBIOT_NPRACH_SUBCARRIEROFFSET_IDX].uptr = (uint32_t *)&(NBIOTRRC_CONFIGURATION_REQ (msg_p).nprach_SubcarrierOffset[i]);
|
||||
NBIoTPrachParams[NBIOT_NPRACH_NUMSUBCARRIERS_IDX].uptr = (uint32_t *)&(NBIOTRRC_CONFIGURATION_REQ (msg_p).nprach_NumSubcarriers[i]);
|
||||
NBIoTPrachParams[NBIOT_NUMREPETITIONSPERPREAMBLEATTEMPT_NB_IDX].uptr = (uint32_t *)&(NBIOTRRC_CONFIGURATION_REQ (msg_p).numRepetitionsPerPreambleAttempt_NB[i]);
|
||||
NBIoTParams[NBIOT_NPDCCH_NUMREPETITIONS_RA_IDX].uptr = (uint32_t *)&(NBIOTRRC_CONFIGURATION_REQ (msg_p).npdcch_NumRepetitions_RA[i]);
|
||||
NBIoTParams[NBIOT_NPDCCH_STARTSF_CSS_RA_IDX].uptr = (uint32_t *)&(NBIOTRRC_CONFIGURATION_REQ (msg_p).npdcch_StartSF_CSS_RA[i]);
|
||||
NBIoTParams[NBIOT_NPDCCH_OFFSET_RA_IDX].strptr = &tmpptr;
|
||||
sprintf(instprefix, "%s.[%i].%s.[%i]",NBIOT_RRCLIST_CONFIG_STRING, nbiotrrc_id,NBIOT_RRCLIST_NPRACHPARAMS_CONFIG_STRING,i);
|
||||
config_get( NBIoTPrachParams,sizeof(NBIoTPrachParams)/sizeof(paramdef_t),instprefix);
|
||||
NBIOTRRC_CONFIGURATION_REQ (msg_p).npdcch_Offset_RA[i] = config_get_processedint( &(NBIoTPrachParams[NBIOT_NPDCCH_OFFSET_RA_IDX]) );
|
||||
}
|
||||
/* get the LTE RRC and CC this NB-IoT RRC instance is attached to */
|
||||
|
||||
/* get the LTE RRC and CC this NB-IoT RRC instance is attached to */
|
||||
sprintf(instprefix, NBIOT_RRCLIST_CONFIG_STRING ".[%i]." NBIOT_LTERRCREF_CONFIG_STRING, nbiotrrc_id );
|
||||
config_get( NBIoTRRCRefParams,sizeof(NBIoTRRCRefParams)/sizeof(paramdef_t),instprefix);
|
||||
|
||||
/* read SIB1 parameters in the LTE RRC and CC sections */
|
||||
config_get( NBIoTRRCRefParams,sizeof(NBIoTRRCRefParams)/sizeof(paramdef_t),instprefix);
|
||||
/* read SIB1 parameters in the LTE RRC and CC sections */
|
||||
sprintf(instprefix, ENB_CONFIG_STRING_ENB_LIST ".[%i]." ENB_CONFIG_STRING_COMPONENT_CARRIERS ".[%i]",
|
||||
*(NBIoTRRCRefParams[NBIOT_RRCINST_IDX].uptr), *(NBIoTRRCRefParams[NBIOT_CCINST_IDX].uptr));
|
||||
|
||||
NBIoTLteCCParams[LTECCPARAMS_TDD_CONFIG_IDX ].uptr = (uint32_t *)&(NBIOTRRC_CONFIGURATION_REQ (msg_p).tdd_config);
|
||||
NBIoTLteCCParams[LTECCPARAMS_TDD_CONFIG_S_IDX].uptr = (uint32_t *)&(NBIOTRRC_CONFIGURATION_REQ (msg_p).tdd_config_s);
|
||||
NBIoTLteCCParams[LTECCPARAMS_EUTRA_BAND_IDX ].uptr = (uint32_t *)&(NBIOTRRC_CONFIGURATION_REQ (msg_p).eutra_band);
|
||||
NBIoTLteCCParams[LTECCPARAMS_DOWNLINK_FREQUENCY_IDX].uptr = (uint32_t *)&(NBIOTRRC_CONFIGURATION_REQ (msg_p).downlink_frequency);
|
||||
*(NBIoTRRCRefParams[NBIOT_RRCINST_IDX].uptr), *(NBIoTRRCRefParams[NBIOT_CCINST_IDX].uptr));
|
||||
NBIoTLteCCParams[LTECCPARAMS_TDD_CONFIG_IDX ].uptr = (uint32_t *)&(NBIOTRRC_CONFIGURATION_REQ (msg_p).tdd_config);
|
||||
NBIoTLteCCParams[LTECCPARAMS_TDD_CONFIG_S_IDX].uptr = (uint32_t *)&(NBIOTRRC_CONFIGURATION_REQ (msg_p).tdd_config_s);
|
||||
NBIoTLteCCParams[LTECCPARAMS_EUTRA_BAND_IDX ].uptr = (uint32_t *)&(NBIOTRRC_CONFIGURATION_REQ (msg_p).eutra_band);
|
||||
NBIoTLteCCParams[LTECCPARAMS_DOWNLINK_FREQUENCY_IDX].uptr = (uint32_t *)&(NBIOTRRC_CONFIGURATION_REQ (msg_p).downlink_frequency);
|
||||
NBIoTLteCCParams[LTECCPARAMS_UPLINK_FREQUENCY_OFFSET_IDX].uptr = (uint32_t *)&(NBIOTRRC_CONFIGURATION_REQ (msg_p).uplink_frequency_offset);
|
||||
NBIoTLteCCParams[LTECCPARAMS_NID_CELL_IDX].uptr = (uint32_t *)&(NBIOTRRC_CONFIGURATION_REQ (msg_p).Nid_cell);
|
||||
NBIoTLteCCParams[LTECCPARAMS_N_RB_DL_IDX].uptr = (uint32_t *)&(NBIOTRRC_CONFIGURATION_REQ (msg_p).N_RB_DL);
|
||||
NBIoTLteCCParams[LTECCPARAMS_NID_CELL_IDX].uptr = (uint32_t *)&(NBIOTRRC_CONFIGURATION_REQ (msg_p).Nid_cell);
|
||||
NBIoTLteCCParams[LTECCPARAMS_N_RB_DL_IDX].uptr = (uint32_t *)&(NBIOTRRC_CONFIGURATION_REQ (msg_p).N_RB_DL);
|
||||
|
||||
for (int i=0; (i<sizeof(NBIoTLteCCParams)/sizeof(paramdef_t)) && (i<sizeof(NBIoTLteCCCheckParams)/sizeof(checkedparam_t)); i++ ) {
|
||||
NBIoTLteCCParams[i].chkPptr = &(NBIoTLteCCCheckParams[i]);
|
||||
NBIoTLteCCParams[i].chkPptr = &(NBIoTLteCCCheckParams[i]);
|
||||
}
|
||||
config_get( NBIoTLteCCParams,sizeof(NBIoTLteCCParams)/sizeof(paramdef_t),instprefix);
|
||||
NBIOTRRC_CONFIGURATION_REQ (msg_p).frame_type = config_get_processedint( &(NBIoTLteCCParams[LTECCPARAMS_FRAME_TYPE_IDX]) );
|
||||
|
||||
config_get( NBIoTLteCCParams,sizeof(NBIoTLteCCParams)/sizeof(paramdef_t),instprefix);
|
||||
NBIOTRRC_CONFIGURATION_REQ (msg_p).frame_type = config_get_processedint( &(NBIoTLteCCParams[LTECCPARAMS_FRAME_TYPE_IDX]) );
|
||||
NBIOTRRC_CONFIGURATION_REQ (msg_p).prefix_type = config_get_processedint( &(NBIoTLteCCParams[LTECCPARAMS_PREFIX_TYPE_IDX]) );
|
||||
NBIOTRRC_CONFIGURATION_REQ (msg_p).prefix_type = config_get_processedint( &(NBIoTLteCCParams[LTECCPARAMS_PREFIX_TYPE_UL_IDX]) );
|
||||
return 0;
|
||||
return 0;
|
||||
}
|
||||
|
||||
void RCConfig_NbIoT(RAN_CONTEXT_t *RC) {
|
||||
|
||||
paramlist_def_t NbIoT_MACRLCParamList = {NBIOT_MACRLCLIST_CONFIG_STRING,NULL,0};
|
||||
paramlist_def_t NbIoT_L1ParamList = {NBIOT_L1LIST_CONFIG_STRING,NULL,0};
|
||||
paramlist_def_t NbIoT_ParamList = {NBIOT_RRCLIST_CONFIG_STRING,NULL,0};
|
||||
|
||||
|
||||
config_getlist( &NbIoT_ParamList,NULL,0,NULL);
|
||||
RC->nb_nb_iot_rrc_inst = NbIoT_ParamList.numelt;
|
||||
|
||||
|
||||
|
||||
|
||||
config_getlist( &NbIoT_MACRLCParamList,NULL,0, NULL);
|
||||
RC->nb_nb_iot_macrlc_inst = NbIoT_MACRLCParamList.numelt;
|
||||
// Get num L1 instances
|
||||
config_getlist( &NbIoT_L1ParamList,NULL,0, NULL);
|
||||
RC->nb_nb_iot_L1_inst = NbIoT_L1ParamList.numelt;
|
||||
|
||||
config_getlist( &NbIoT_MACRLCParamList,NULL,0, NULL);
|
||||
RC->nb_nb_iot_macrlc_inst = NbIoT_MACRLCParamList.numelt;
|
||||
// Get num L1 instances
|
||||
config_getlist( &NbIoT_L1ParamList,NULL,0, NULL);
|
||||
RC->nb_nb_iot_L1_inst = NbIoT_L1ParamList.numelt;
|
||||
}
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
-------------------
|
||||
AUTHOR : Francois TABURET
|
||||
COMPANY : NOKIA BellLabs France
|
||||
EMAIL : francois.taburet@nokia-bell-labs.com
|
||||
EMAIL : francois.taburet@nokia-bell-labs.com
|
||||
|
||||
*/
|
||||
|
||||
@@ -33,13 +33,9 @@
|
||||
|
||||
#include "common/utils/LOG/log.h"
|
||||
#include "assertions.h"
|
||||
#if defined(ENABLE_ITTI)
|
||||
# include "intertask_interface.h"
|
||||
# if defined(ENABLE_USE_MME)
|
||||
# include "s1ap_eNB.h"
|
||||
# include "sctp_eNB_task.h"
|
||||
# endif
|
||||
#endif
|
||||
#include "intertask_interface.h"
|
||||
#include "s1ap_eNB.h"
|
||||
#include "sctp_eNB_task.h"
|
||||
#include "LTE_SystemInformationBlockType2.h"
|
||||
#include "common/config/config_userapi.h"
|
||||
#include "RRC_config_tools.h"
|
||||
@@ -84,8 +80,7 @@ int config_check_band_frequencies( int ind,
|
||||
int16_t band,
|
||||
uint32_t downlink_frequency,
|
||||
int32_t uplink_frequency_offset,
|
||||
uint32_t frame_type)
|
||||
{
|
||||
uint32_t frame_type) {
|
||||
int errors = 0;
|
||||
|
||||
if (band > 0) {
|
||||
@@ -94,21 +89,18 @@ int config_check_band_frequencies( int ind,
|
||||
for (band_index = 0; band_index < sizeof (eutra_bands) / sizeof (eutra_bands[0]); band_index++) {
|
||||
if (band == eutra_bands[band_index].band) {
|
||||
uint32_t uplink_frequency = downlink_frequency + uplink_frequency_offset;
|
||||
|
||||
AssertError (eutra_bands[band_index].dl_min < downlink_frequency, errors ++,
|
||||
"enb %d downlink frequency %u too low (%u) for band %d!",
|
||||
ind, downlink_frequency, eutra_bands[band_index].dl_min, band);
|
||||
AssertError (downlink_frequency < eutra_bands[band_index].dl_max, errors ++,
|
||||
"enb %d downlink frequency %u too high (%u) for band %d!",
|
||||
ind, downlink_frequency, eutra_bands[band_index].dl_max, band);
|
||||
|
||||
AssertError (eutra_bands[band_index].ul_min < uplink_frequency, errors ++,
|
||||
"enb %d uplink frequency %u too low (%u) for band %d!",
|
||||
ind, uplink_frequency, eutra_bands[band_index].ul_min, band);
|
||||
AssertError (uplink_frequency < eutra_bands[band_index].ul_max, errors ++,
|
||||
"enb %d uplink frequency %u too high (%u) for band %d!",
|
||||
ind, uplink_frequency, eutra_bands[band_index].ul_max, band);
|
||||
|
||||
AssertError (eutra_bands[band_index].frame_type == frame_type, errors ++,
|
||||
"enb %d invalid frame type (%d/%d) for band %d!",
|
||||
ind, eutra_bands[band_index].frame_type, frame_type, band);
|
||||
@@ -116,7 +108,6 @@ int config_check_band_frequencies( int ind,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return errors;
|
||||
}
|
||||
|
||||
|
||||
+121
-171
@@ -34,108 +34,63 @@
|
||||
#include "enb_config.h"
|
||||
#include "assertions.h"
|
||||
#include "common/ran_context.h"
|
||||
#include "targets/RT/USER/lte-softmodem.h"
|
||||
|
||||
#include "common/utils/LOG/log.h"
|
||||
|
||||
#if defined(ENABLE_ITTI)
|
||||
# include "intertask_interface.h"
|
||||
# if defined(ENABLE_USE_MME)
|
||||
# include "s1ap_eNB.h"
|
||||
# include "sctp_eNB_task.h"
|
||||
# include "gtpv1u_eNB_task.h"
|
||||
/* temporary warning removale while implementing noS1 */
|
||||
/* as config option */
|
||||
# else
|
||||
# ifdef EPC_MODE_ENABLED
|
||||
# undef EPC_MODE_ENABLED
|
||||
# endif
|
||||
# define EPC_MODE_ENABLED 0
|
||||
# endif
|
||||
# include "flexran_agent.h"
|
||||
|
||||
# include "x2ap_eNB.h"
|
||||
# include "x2ap_messages_types.h"
|
||||
# define X2AP_ENB_REGISTER_RETRY_DELAY 10
|
||||
|
||||
#include "openair1/PHY/INIT/phy_init.h"
|
||||
extern unsigned char NB_eNB_INST;
|
||||
#endif
|
||||
|
||||
extern RAN_CONTEXT_t RC;
|
||||
|
||||
#if defined(ENABLE_ITTI)
|
||||
|
||||
/*------------------------------------------------------------------------------*/
|
||||
# if defined(ENABLE_USE_MME)
|
||||
# define ENB_REGISTER_RETRY_DELAY 10
|
||||
# endif
|
||||
|
||||
#include "targets/RT/USER/lte-softmodem.h"
|
||||
|
||||
/*------------------------------------------------------------------------------*/
|
||||
|
||||
/*
|
||||
static void configure_phy(module_id_t enb_id, const Enb_properties_array_t* enb_properties)
|
||||
{
|
||||
MessageDef *msg_p;
|
||||
int CC_id;
|
||||
|
||||
msg_p = itti_alloc_new_message (TASK_ENB_APP, PHY_CONFIGURATION_REQ);
|
||||
|
||||
for (CC_id=0; CC_id<MAX_NUM_CCs; CC_id++) {
|
||||
PHY_CONFIGURATION_REQ (msg_p).frame_type[CC_id] = enb_properties->properties[enb_id]->frame_type[CC_id];
|
||||
PHY_CONFIGURATION_REQ (msg_p).prefix_type[CC_id] = enb_properties->properties[enb_id]->prefix_type[CC_id];
|
||||
PHY_CONFIGURATION_REQ (msg_p).downlink_frequency[CC_id] = enb_properties->properties[enb_id]->downlink_frequency[CC_id];
|
||||
PHY_CONFIGURATION_REQ (msg_p).uplink_frequency_offset[CC_id] = enb_properties->properties[enb_id]->uplink_frequency_offset[CC_id];
|
||||
PHY_CONFIGURATION_REQ (msg_p).nb_antennas_tx[CC_id] = enb_properties->properties[enb_id]->nb_antennas_tx[CC_id];
|
||||
PHY_CONFIGURATION_REQ (msg_p).nb_antennas_rx[CC_id] = enb_properties->properties[enb_id]->nb_antennas_rx[CC_id];
|
||||
PHY_CONFIGURATION_REQ (msg_p).tx_gain[CC_id] = enb_properties->properties[enb_id]->tx_gain[CC_id];
|
||||
PHY_CONFIGURATION_REQ (msg_p).rx_gain[CC_id] = enb_properties->properties[enb_id]->rx_gain[CC_id];
|
||||
}
|
||||
|
||||
itti_send_msg_to_task (TASK_PHY_ENB, ENB_MODULE_ID_TO_INSTANCE(enb_id), msg_p);
|
||||
}
|
||||
*/
|
||||
|
||||
/*------------------------------------------------------------------------------*/
|
||||
static void configure_rrc(uint32_t enb_id)
|
||||
{
|
||||
MessageDef *msg_p = NULL;
|
||||
// int CC_id;
|
||||
|
||||
msg_p = itti_alloc_new_message (TASK_ENB_APP, RRC_CONFIGURATION_REQ);
|
||||
|
||||
if (RC.rrc[enb_id]) {
|
||||
RCconfig_RRC(msg_p,enb_id, RC.rrc[enb_id]);
|
||||
|
||||
|
||||
LOG_I(ENB_APP,"Sending configuration message to RRC task\n");
|
||||
itti_send_msg_to_task (TASK_RRC_ENB, ENB_MODULE_ID_TO_INSTANCE(enb_id), msg_p);
|
||||
|
||||
}
|
||||
else AssertFatal(0,"RRC context for eNB %d not allocated\n",enb_id);
|
||||
}
|
||||
|
||||
/*------------------------------------------------------------------------------*/
|
||||
# if defined(ENABLE_USE_MME)
|
||||
static uint32_t eNB_app_register(uint32_t enb_id_start, uint32_t enb_id_end)//, const Enb_properties_array_t *enb_properties)
|
||||
{
|
||||
static uint32_t eNB_app_register(ngran_node_t node_type,uint32_t enb_id_start, uint32_t enb_id_end) {
|
||||
uint32_t enb_id;
|
||||
MessageDef *msg_p;
|
||||
uint32_t register_enb_pending = 0;
|
||||
|
||||
for (enb_id = enb_id_start; (enb_id < enb_id_end) ; enb_id++) {
|
||||
{
|
||||
/* note: there is an implicit relationship between the data structure and the message name */
|
||||
msg_p = itti_alloc_new_message (TASK_ENB_APP, S1AP_REGISTER_ENB_REQ);
|
||||
if (NODE_IS_DU(node_type)) { // F1AP registration
|
||||
// configure F1AP here for F1C
|
||||
LOG_I(ENB_APP,"ngran_eNB_DU: Allocating ITTI message for F1AP_SETUP_REQ\n");
|
||||
msg_p = itti_alloc_new_message (TASK_ENB_APP, F1AP_SETUP_REQ);
|
||||
RCconfig_DU_F1(msg_p, enb_id);
|
||||
|
||||
RCconfig_S1(msg_p, enb_id);
|
||||
LOG_I(ENB_APP,"[eNB %d] eNB_app_register via F1AP for instance %d\n", enb_id, ENB_MODULE_ID_TO_INSTANCE(enb_id));
|
||||
itti_send_msg_to_task (TASK_DU_F1, ENB_MODULE_ID_TO_INSTANCE(enb_id), msg_p);
|
||||
// configure GTPu here for F1U
|
||||
}
|
||||
else { // S1AP registration
|
||||
/* note: there is an implicit relationship between the data structure and the message name */
|
||||
msg_p = itti_alloc_new_message (TASK_ENB_APP, S1AP_REGISTER_ENB_REQ);
|
||||
RCconfig_S1(msg_p, enb_id);
|
||||
|
||||
if (enb_id == 0) RCconfig_gtpu();
|
||||
if (enb_id == 0) RCconfig_gtpu();
|
||||
|
||||
LOG_I(ENB_APP,"default drx %d\n",((S1AP_REGISTER_ENB_REQ(msg_p)).default_drx));
|
||||
LOG_I(ENB_APP,"default drx %d\n",((S1AP_REGISTER_ENB_REQ(msg_p)).default_drx));
|
||||
|
||||
LOG_I(ENB_APP,"[eNB %d] eNB_app_register for instance %d\n", enb_id, ENB_MODULE_ID_TO_INSTANCE(enb_id));
|
||||
|
||||
itti_send_msg_to_task (TASK_S1AP, ENB_MODULE_ID_TO_INSTANCE(enb_id), msg_p);
|
||||
LOG_I(ENB_APP,"[eNB %d] eNB_app_register via S1AP for instance %d\n", enb_id, ENB_MODULE_ID_TO_INSTANCE(enb_id));
|
||||
itti_send_msg_to_task (TASK_S1AP, ENB_MODULE_ID_TO_INSTANCE(enb_id), msg_p);
|
||||
}
|
||||
|
||||
register_enb_pending++;
|
||||
}
|
||||
@@ -143,26 +98,19 @@ static uint32_t eNB_app_register(uint32_t enb_id_start, uint32_t enb_id_end)//,
|
||||
|
||||
return register_enb_pending;
|
||||
}
|
||||
# endif
|
||||
#endif
|
||||
|
||||
|
||||
/*------------------------------------------------------------------------------*/
|
||||
static uint32_t eNB_app_register_x2(uint32_t enb_id_start, uint32_t enb_id_end)
|
||||
{
|
||||
static uint32_t eNB_app_register_x2(uint32_t enb_id_start, uint32_t enb_id_end) {
|
||||
uint32_t enb_id;
|
||||
MessageDef *msg_p;
|
||||
uint32_t register_enb_x2_pending = 0;
|
||||
|
||||
for (enb_id = enb_id_start; (enb_id < enb_id_end) ; enb_id++) {
|
||||
|
||||
{
|
||||
|
||||
msg_p = itti_alloc_new_message (TASK_ENB_APP, X2AP_REGISTER_ENB_REQ);
|
||||
|
||||
RCconfig_X2(msg_p, enb_id);
|
||||
|
||||
itti_send_msg_to_task (TASK_X2AP, ENB_MODULE_ID_TO_INSTANCE(enb_id), msg_p);
|
||||
|
||||
register_enb_x2_pending++;
|
||||
}
|
||||
}
|
||||
@@ -171,73 +119,37 @@ static uint32_t eNB_app_register_x2(uint32_t enb_id_start, uint32_t enb_id_end)
|
||||
}
|
||||
|
||||
/*------------------------------------------------------------------------------*/
|
||||
void *eNB_app_task(void *args_p)
|
||||
{
|
||||
#if defined(ENABLE_ITTI)
|
||||
void *eNB_app_task(void *args_p) {
|
||||
uint32_t enb_nb = RC.nb_inst;
|
||||
uint32_t enb_id_start = 0;
|
||||
uint32_t enb_id_end = enb_id_start + enb_nb;
|
||||
# if defined(ENABLE_USE_MME)
|
||||
uint32_t register_enb_pending=0;
|
||||
uint32_t registered_enb;
|
||||
uint32_t registered_enb=0;
|
||||
long enb_register_retry_timer_id;
|
||||
# endif
|
||||
uint32_t x2_register_enb_pending;
|
||||
uint32_t x2_registered_enb;
|
||||
uint32_t x2_register_enb_pending = 0;
|
||||
uint32_t x2_registered_enb = 0;
|
||||
long x2_enb_register_retry_timer_id;
|
||||
uint32_t enb_id;
|
||||
MessageDef *msg_p = NULL;
|
||||
instance_t instance;
|
||||
int result;
|
||||
/* for no gcc warnings */
|
||||
(void)instance;
|
||||
|
||||
itti_mark_task_ready (TASK_ENB_APP);
|
||||
|
||||
LOG_I(PHY, "%s() Task ready initialise structures\n", __FUNCTION__);
|
||||
|
||||
RCconfig_L1();
|
||||
|
||||
RCconfig_macrlc();
|
||||
|
||||
LOG_I(PHY, "%s() RC.nb_L1_inst:%d\n", __FUNCTION__, RC.nb_L1_inst);
|
||||
|
||||
if (RC.nb_L1_inst>0) AssertFatal(l1_north_init_eNB()==0,"could not initialize L1 north interface\n");
|
||||
|
||||
AssertFatal (enb_nb <= RC.nb_inst,
|
||||
"Number of eNB is greater than eNB defined in configuration file (%d/%d)!",
|
||||
enb_nb, RC.nb_inst);
|
||||
|
||||
LOG_I(ENB_APP,"Allocating eNB_RRC_INST for %d instances\n",RC.nb_inst);
|
||||
|
||||
RC.rrc = (eNB_RRC_INST **)malloc(RC.nb_inst*sizeof(eNB_RRC_INST *));
|
||||
LOG_I(PHY, "%s() RC.nb_inst:%d RC.rrc:%p\n", __FUNCTION__, RC.nb_inst, RC.rrc);
|
||||
|
||||
for (enb_id = enb_id_start; (enb_id < enb_id_end) ; enb_id++) {
|
||||
RC.rrc[enb_id] = (eNB_RRC_INST*)malloc(sizeof(eNB_RRC_INST));
|
||||
LOG_I(PHY, "%s() Creating RRC instance RC.rrc[%d]:%p (%d of %d)\n", __FUNCTION__, enb_id, RC.rrc[enb_id], enb_id+1, enb_id_end);
|
||||
memset((void *)RC.rrc[enb_id],0,sizeof(eNB_RRC_INST));
|
||||
configure_rrc(enb_id);
|
||||
/* Try to register each eNB */
|
||||
// This assumes that node_type of all RRC instances is the same
|
||||
if (EPC_MODE_ENABLED) {
|
||||
register_enb_pending = eNB_app_register(RC.rrc[0]->node_type, enb_id_start, enb_id_end);
|
||||
}
|
||||
|
||||
# if defined(ENABLE_USE_MME)
|
||||
/* Try to register each eNB */
|
||||
registered_enb = 0;
|
||||
register_enb_pending = eNB_app_register (enb_id_start, enb_id_end);//, enb_properties_p);
|
||||
#else
|
||||
/* Start L2L1 task */
|
||||
msg_p = itti_alloc_new_message(TASK_ENB_APP, INITIALIZE_MESSAGE);
|
||||
itti_send_msg_to_task(TASK_L2L1, INSTANCE_DEFAULT, msg_p);
|
||||
#endif
|
||||
|
||||
/* Try to register each eNB with each other */
|
||||
x2_registered_enb = 0;
|
||||
x2_register_enb_pending = eNB_app_register_x2 (enb_id_start, enb_id_end);
|
||||
/* Try to register each eNB with each other */
|
||||
if (is_x2ap_enabled() && !NODE_IS_DU(RC.rrc[0]->node_type)) {
|
||||
x2_register_enb_pending = eNB_app_register_x2 (enb_id_start, enb_id_end);
|
||||
}
|
||||
|
||||
do {
|
||||
// Wait for a message
|
||||
itti_receive_msg (TASK_ENB_APP, &msg_p);
|
||||
|
||||
instance = ITTI_MSG_INSTANCE (msg_p);
|
||||
|
||||
switch (ITTI_MSG_ID(msg_p)) {
|
||||
@@ -255,63 +167,105 @@ void *eNB_app_task(void *args_p)
|
||||
break;
|
||||
|
||||
case S1AP_REGISTER_ENB_CNF:
|
||||
# if defined(ENABLE_USE_MME)
|
||||
LOG_I(ENB_APP, "[eNB %d] Received %s: associated MME %d\n", instance, ITTI_MSG_NAME (msg_p),
|
||||
S1AP_REGISTER_ENB_CNF(msg_p).nb_mme);
|
||||
AssertFatal(!NODE_IS_DU(RC.rrc[0]->node_type), "Should not have received S1AP_REGISTER_ENB_CNF\n");
|
||||
if (EPC_MODE_ENABLED) {
|
||||
LOG_I(ENB_APP, "[eNB %d] Received %s: associated MME %d\n", instance, ITTI_MSG_NAME (msg_p),
|
||||
S1AP_REGISTER_ENB_CNF(msg_p).nb_mme);
|
||||
DevAssert(register_enb_pending > 0);
|
||||
register_enb_pending--;
|
||||
|
||||
DevAssert(register_enb_pending > 0);
|
||||
register_enb_pending--;
|
||||
/* Check if at least eNB is registered with one MME */
|
||||
if (S1AP_REGISTER_ENB_CNF(msg_p).nb_mme > 0) {
|
||||
registered_enb++;
|
||||
}
|
||||
|
||||
/* Check if at least eNB is registered with one MME */
|
||||
if (S1AP_REGISTER_ENB_CNF(msg_p).nb_mme > 0) {
|
||||
registered_enb++;
|
||||
}
|
||||
/* Check if all register eNB requests have been processed */
|
||||
if (register_enb_pending == 0) {
|
||||
if (registered_enb == enb_nb) {
|
||||
/* If all eNB are registered, start L2L1 task */
|
||||
MessageDef *msg_init_p;
|
||||
msg_init_p = itti_alloc_new_message (TASK_ENB_APP, INITIALIZE_MESSAGE);
|
||||
itti_send_msg_to_task (TASK_L2L1, INSTANCE_DEFAULT, msg_init_p);
|
||||
} else {
|
||||
LOG_W(ENB_APP, " %d eNB not associated with a MME, retrying registration in %d seconds ...\n",
|
||||
enb_nb - registered_enb, ENB_REGISTER_RETRY_DELAY);
|
||||
|
||||
/* Check if all register eNB requests have been processed */
|
||||
if (register_enb_pending == 0) {
|
||||
if (registered_enb == enb_nb) {
|
||||
/* If all eNB are registered, start L2L1 task */
|
||||
MessageDef *msg_init_p;
|
||||
/* Restart the eNB registration process in ENB_REGISTER_RETRY_DELAY seconds */
|
||||
if (timer_setup (ENB_REGISTER_RETRY_DELAY, 0, TASK_ENB_APP, INSTANCE_DEFAULT, TIMER_ONE_SHOT,
|
||||
NULL, &enb_register_retry_timer_id) < 0) {
|
||||
LOG_E(ENB_APP, " Can not start eNB register retry timer, use \"sleep\" instead!\n");
|
||||
sleep(ENB_REGISTER_RETRY_DELAY);
|
||||
/* Restart the registration process */
|
||||
registered_enb = 0;
|
||||
register_enb_pending = eNB_app_register (RC.rrc[0]->node_type,enb_id_start, enb_id_end);
|
||||
}
|
||||
}
|
||||
}
|
||||
} /* if (EPC_MODE_ENABLED) */
|
||||
|
||||
msg_init_p = itti_alloc_new_message (TASK_ENB_APP, INITIALIZE_MESSAGE);
|
||||
itti_send_msg_to_task (TASK_L2L1, INSTANCE_DEFAULT, msg_init_p);
|
||||
break;
|
||||
|
||||
} else {
|
||||
LOG_W(ENB_APP, " %d eNB not associated with a MME, retrying registration in %d seconds ...\n",
|
||||
enb_nb - registered_enb, ENB_REGISTER_RETRY_DELAY);
|
||||
case F1AP_SETUP_RESP:
|
||||
AssertFatal(NODE_IS_DU(RC.rrc[0]->node_type), "Should not have received F1AP_REGISTER_ENB_CNF in CU/eNB\n");
|
||||
|
||||
/* Restart the eNB registration process in ENB_REGISTER_RETRY_DELAY seconds */
|
||||
if (timer_setup (ENB_REGISTER_RETRY_DELAY, 0, TASK_ENB_APP, INSTANCE_DEFAULT, TIMER_ONE_SHOT,
|
||||
NULL, &enb_register_retry_timer_id) < 0) {
|
||||
LOG_E(ENB_APP, " Can not start eNB register retry timer, use \"sleep\" instead!\n");
|
||||
LOG_I(ENB_APP, "Received %s: associated ngran_eNB_CU %s with %d cells to activate\n", ITTI_MSG_NAME (msg_p),
|
||||
F1AP_SETUP_RESP(msg_p).gNB_CU_name,F1AP_SETUP_RESP(msg_p).num_cells_to_activate);
|
||||
|
||||
handle_f1ap_setup_resp(&F1AP_SETUP_RESP(msg_p));
|
||||
|
||||
DevAssert(register_enb_pending > 0);
|
||||
register_enb_pending--;
|
||||
|
||||
/* Check if at least eNB is registered with one MME */
|
||||
if (F1AP_SETUP_RESP(msg_p).num_cells_to_activate > 0) {
|
||||
registered_enb++;
|
||||
}
|
||||
|
||||
/* Check if all register eNB requests have been processed */
|
||||
if (register_enb_pending == 0) {
|
||||
if (registered_enb == enb_nb) {
|
||||
/* If all eNB cells are registered, start L2L1 task */
|
||||
MessageDef *msg_init_p;
|
||||
|
||||
msg_init_p = itti_alloc_new_message (TASK_ENB_APP, INITIALIZE_MESSAGE);
|
||||
itti_send_msg_to_task (TASK_L2L1, INSTANCE_DEFAULT, msg_init_p);
|
||||
|
||||
} else {
|
||||
LOG_W(ENB_APP, " %d eNB not associated with a MME, retrying registration in %d seconds ...\n",
|
||||
enb_nb - registered_enb, ENB_REGISTER_RETRY_DELAY);
|
||||
|
||||
/* Restart the eNB registration process in ENB_REGISTER_RETRY_DELAY seconds */
|
||||
if (timer_setup (ENB_REGISTER_RETRY_DELAY, 0, TASK_ENB_APP, INSTANCE_DEFAULT, TIMER_ONE_SHOT,
|
||||
NULL, &enb_register_retry_timer_id) < 0) {
|
||||
LOG_E(ENB_APP, " Can not start eNB register retry timer, use \"sleep\" instead!\n");
|
||||
|
||||
sleep(ENB_REGISTER_RETRY_DELAY);
|
||||
/* Restart the registration process */
|
||||
registered_enb = 0;
|
||||
register_enb_pending = eNB_app_register (RC.rrc[0]->node_type,enb_id_start, enb_id_end);//, enb_properties_p);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
sleep(ENB_REGISTER_RETRY_DELAY);
|
||||
/* Restart the registration process */
|
||||
registered_enb = 0;
|
||||
register_enb_pending = eNB_app_register (enb_id_start, enb_id_end);//, enb_properties_p);
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
break;
|
||||
|
||||
case S1AP_DEREGISTERED_ENB_IND:
|
||||
if (EPC_MODE_ENABLED) {
|
||||
LOG_W(ENB_APP, "[eNB %d] Received %s: associated MME %d\n", instance, ITTI_MSG_NAME (msg_p),
|
||||
S1AP_DEREGISTERED_ENB_IND(msg_p).nb_mme);
|
||||
|
||||
/* TODO handle recovering of registration */
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case TIMER_HAS_EXPIRED:
|
||||
# if defined(ENABLE_USE_MME)
|
||||
if (EPC_MODE_ENABLED) {
|
||||
LOG_I(ENB_APP, " Received %s: timer_id %ld\n", ITTI_MSG_NAME (msg_p), TIMER_HAS_EXPIRED(msg_p).timer_id);
|
||||
|
||||
if (TIMER_HAS_EXPIRED (msg_p).timer_id == enb_register_retry_timer_id) {
|
||||
/* Restart the registration process */
|
||||
registered_enb = 0;
|
||||
register_enb_pending = eNB_app_register (enb_id_start, enb_id_end);//, enb_properties_p);
|
||||
register_enb_pending = eNB_app_register (RC.rrc[0]->node_type, enb_id_start, enb_id_end);
|
||||
}
|
||||
|
||||
if (TIMER_HAS_EXPIRED (msg_p).timer_id == x2_enb_register_retry_timer_id) {
|
||||
@@ -319,20 +273,19 @@ void *eNB_app_task(void *args_p)
|
||||
x2_registered_enb = 0;
|
||||
x2_register_enb_pending = eNB_app_register_x2 (enb_id_start, enb_id_end);
|
||||
}
|
||||
# endif
|
||||
} /* if (EPC_MODE_ENABLED) */
|
||||
|
||||
break;
|
||||
|
||||
case X2AP_DEREGISTERED_ENB_IND:
|
||||
LOG_W(ENB_APP, "[eNB %d] Received %s: associated eNB %d\n", instance, ITTI_MSG_NAME (msg_p),
|
||||
X2AP_DEREGISTERED_ENB_IND(msg_p).nb_x2);
|
||||
|
||||
/* TODO handle recovering of registration */
|
||||
break;
|
||||
|
||||
case X2AP_REGISTER_ENB_CNF:
|
||||
LOG_I(ENB_APP, "[eNB %d] Received %s: associated eNB %d\n", instance, ITTI_MSG_NAME (msg_p),
|
||||
X2AP_REGISTER_ENB_CNF(msg_p).nb_x2);
|
||||
|
||||
DevAssert(x2_register_enb_pending > 0);
|
||||
x2_register_enb_pending--;
|
||||
|
||||
@@ -345,19 +298,17 @@ void *eNB_app_task(void *args_p)
|
||||
if (x2_register_enb_pending == 0) {
|
||||
if (x2_registered_enb == enb_nb) {
|
||||
/* If all eNB are registered, start RRC HO task */
|
||||
|
||||
}else {
|
||||
} else {
|
||||
uint32_t x2_not_associated = enb_nb - x2_registered_enb;
|
||||
|
||||
LOG_W(ENB_APP, " %d eNB %s not associated with the target\n",
|
||||
x2_not_associated, x2_not_associated > 1 ? "are" : "is");
|
||||
|
||||
// timer to retry
|
||||
/* Restart the eNB registration process in ENB_REGISTER_RETRY_DELAY seconds */
|
||||
if (timer_setup (X2AP_ENB_REGISTER_RETRY_DELAY, 0, TASK_ENB_APP,
|
||||
INSTANCE_DEFAULT, TIMER_ONE_SHOT, NULL,
|
||||
&x2_enb_register_retry_timer_id) < 0) {
|
||||
LOG_E(ENB_APP, " Can not start eNB X2AP register: retry timer, use \"sleep\" instead!\n");
|
||||
|
||||
sleep(X2AP_ENB_REGISTER_RETRY_DELAY);
|
||||
/* Restart the registration process */
|
||||
x2_registered_enb = 0;
|
||||
@@ -377,18 +328,13 @@ void *eNB_app_task(void *args_p)
|
||||
AssertFatal (result == EXIT_SUCCESS, "Failed to free memory (%d)!\n", result);
|
||||
} while (1);
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
void handle_reconfiguration(module_id_t mod_id)
|
||||
{
|
||||
void handle_reconfiguration(module_id_t mod_id) {
|
||||
struct timespec start, end;
|
||||
clock_gettime(CLOCK_MONOTONIC, &start);
|
||||
flexran_agent_info_t *flexran = RC.flexran[mod_id];
|
||||
|
||||
LOG_I(ENB_APP, "lte-softmodem soft-restart requested\n");
|
||||
|
||||
if (ENB_WAIT == flexran->node_ctrl_state) {
|
||||
@@ -411,8 +357,10 @@ void handle_reconfiguration(module_id_t mod_id)
|
||||
LOG_I(ENB_APP, " * eNB %d: Waiting for FlexRAN RTController command *\n", mod_id);
|
||||
pthread_mutex_lock(&flexran->mutex_node_ctrl);
|
||||
flexran->node_ctrl_state = ENB_WAIT;
|
||||
|
||||
while (ENB_NORMAL_OPERATION != flexran->node_ctrl_state)
|
||||
pthread_cond_wait(&flexran->cond_node_ctrl, &flexran->mutex_node_ctrl);
|
||||
|
||||
pthread_mutex_unlock(&flexran->mutex_node_ctrl);
|
||||
}
|
||||
|
||||
@@ -424,11 +372,13 @@ void handle_reconfiguration(module_id_t mod_id)
|
||||
|
||||
clock_gettime(CLOCK_MONOTONIC, &end);
|
||||
end.tv_sec -= start.tv_sec;
|
||||
|
||||
if (end.tv_nsec >= start.tv_nsec) {
|
||||
end.tv_nsec -= start.tv_nsec;
|
||||
} else {
|
||||
end.tv_sec -= 1;
|
||||
end.tv_nsec = end.tv_nsec - start.tv_nsec + 1000000000;
|
||||
}
|
||||
|
||||
LOG_I(ENB_APP, "lte-softmodem restart succeeded in %ld.%ld s\n", end.tv_sec, end.tv_nsec / 1000000);
|
||||
}
|
||||
|
||||
+2062
-1422
File diff suppressed because it is too large
Load Diff
@@ -40,6 +40,7 @@
|
||||
#include "PHY/impl_defs_lte.h"
|
||||
#include "PHY/defs_eNB.h"
|
||||
#include "s1ap_messages_types.h"
|
||||
#include "f1ap_messages_types.h"
|
||||
#include "LTE_SystemInformationBlockType2.h"
|
||||
#include "rrc_messages_types.h"
|
||||
#include "RRC/LTE/rrc_defs.h"
|
||||
@@ -63,6 +64,9 @@
|
||||
// Hard to find a defined value for max enb...
|
||||
#define MAX_ENB 16
|
||||
|
||||
#define MAX_DU 4
|
||||
#define CU_BALANCING_ALL 127
|
||||
#define CU_BALANCING_ROUND_ROBIN 126
|
||||
|
||||
typedef struct mme_ip_address_s {
|
||||
unsigned ipv4:1;
|
||||
@@ -72,6 +76,13 @@ typedef struct mme_ip_address_s {
|
||||
char *ipv6_address;
|
||||
} mme_ip_address_t;
|
||||
|
||||
typedef struct cu_params {
|
||||
const char *local_ipv4_address;
|
||||
const uint16_t local_port;
|
||||
const char *remote_ipv4_address;
|
||||
const int16_t remote_port;
|
||||
} cudu_params_t;
|
||||
|
||||
typedef struct ru_config_s {
|
||||
// indicates if local or remote rf is used (1 == LOCAL)
|
||||
unsigned local_rf:1;
|
||||
@@ -93,7 +104,7 @@ typedef struct ru_config_s {
|
||||
extern void RCconfig_RU(void);
|
||||
extern void RCconfig_flexran(void);
|
||||
extern void RCconfig_L1(void);
|
||||
extern void RCconfig_macrlc(void);
|
||||
extern void RCconfig_macrlc(int macrlc_has_f1[MAX_MAC_INST]);
|
||||
extern void UE_config_stub_pnf(void);
|
||||
extern int RCconfig_gtpu(void );
|
||||
extern void RCConfig(void);
|
||||
@@ -101,12 +112,17 @@ extern void RCConfig(void);
|
||||
void enb_config_display(void);
|
||||
void ru_config_display(void);
|
||||
|
||||
int RCconfig_RRC(MessageDef *msg_p, uint32_t i, eNB_RRC_INST *rrc);
|
||||
int RCconfig_RRC(uint32_t i, eNB_RRC_INST *rrc, int macrlc_has_f1);
|
||||
int RCconfig_S1(MessageDef *msg_p, uint32_t i);
|
||||
|
||||
void read_config_and_init(void);
|
||||
int RCconfig_X2(MessageDef *msg_p, uint32_t i);
|
||||
|
||||
void fill_SL_configuration(MessageDef *msg_p, ccparams_sidelink_t *SLconfig,int cell_idx,int cc_idx,char *config_fname);
|
||||
void fill_eMTC_configuration(MessageDef *msg_p, ccparams_eMTC_t *eMTCconfig, int cell_idx,int cc_idx,char *config_fname,char *brparamspath);
|
||||
|
||||
int RCconfig_DU_F1(MessageDef *msg_p, uint32_t i);
|
||||
void handle_f1ap_setup_resp(f1ap_setup_resp_t *resp);
|
||||
|
||||
#endif /* ENB_CONFIG_H_ */
|
||||
/** @} */
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
#include "RRC_config_tools.h"
|
||||
#include "enb_paramdef.h"
|
||||
#include "enb_paramdef_sidelink.h"
|
||||
|
||||
|
||||
void fill_SL_configuration(MessageDef *msg_p, ccparams_sidelink_t *SLconfig,int cell_idx,int cc_idx,char *config_fname) {
|
||||
|
||||
printf("Configuring SL\n");
|
||||
@@ -52,7 +52,7 @@ void fill_SL_configuration(MessageDef *msg_p, ccparams_sidelink_t *SLconfig,int
|
||||
AssertFatal (0,
|
||||
"Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for rxPool_sc_CP_Len choice: normal,extended!\n",
|
||||
config_fname, cell_idx, SLconfig->rxPool_sc_CP_Len);
|
||||
|
||||
|
||||
if (strcmp(SLconfig->rxPool_sc_Period,"sf40")==0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).rxPool_sc_Period[cc_idx] = LTE_SL_PeriodComm_r12_sf40;
|
||||
} else if (strcmp(SLconfig->rxPool_sc_Period,"sf60")==0) {
|
||||
@@ -89,7 +89,7 @@ void fill_SL_configuration(MessageDef *msg_p, ccparams_sidelink_t *SLconfig,int
|
||||
AssertFatal (0,
|
||||
"Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for rxPool_sc_Period choice: sf40,sf60,sf70,sf80,sf120,sf140,sf160,sf240,sf280,sf320,spare6,spare5,spare4,spare3,spare2,spare!\n",
|
||||
config_fname, cell_idx, SLconfig->rxPool_sc_Period);
|
||||
|
||||
|
||||
if (strcmp(SLconfig->rxPool_data_CP_Len,"normal")==0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).rxPool_data_CP_Len[cc_idx] = LTE_SL_CP_Len_r12_normal;
|
||||
} else if (strcmp(SLconfig->rxPool_data_CP_Len,"extended")==0) {
|
||||
@@ -98,11 +98,11 @@ void fill_SL_configuration(MessageDef *msg_p, ccparams_sidelink_t *SLconfig,int
|
||||
AssertFatal (0,
|
||||
"Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for rxPool_data_CP_Len choice: normal,extended!\n",
|
||||
config_fname, cell_idx, SLconfig->rxPool_data_CP_Len);
|
||||
|
||||
|
||||
RRC_CONFIGURATION_REQ (msg_p).rxPool_ResourceConfig_prb_Num[cc_idx] = SLconfig->rxPool_ResourceConfig_prb_Num;
|
||||
RRC_CONFIGURATION_REQ (msg_p).rxPool_ResourceConfig_prb_Start[cc_idx] = SLconfig->rxPool_ResourceConfig_prb_Start;
|
||||
RRC_CONFIGURATION_REQ (msg_p).rxPool_ResourceConfig_prb_End[cc_idx] = SLconfig->rxPool_ResourceConfig_prb_End;
|
||||
|
||||
|
||||
if (strcmp(SLconfig->rxPool_ResourceConfig_offsetIndicator_present,"prNothing")==0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).rxPool_ResourceConfig_offsetIndicator_present[cc_idx] = LTE_SL_OffsetIndicator_r12_PR_NOTHING;
|
||||
} else if (strcmp(SLconfig->rxPool_ResourceConfig_offsetIndicator_present,"prSmall")==0) {
|
||||
@@ -113,9 +113,9 @@ void fill_SL_configuration(MessageDef *msg_p, ccparams_sidelink_t *SLconfig,int
|
||||
AssertFatal (0,
|
||||
"Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for rxPool_ResourceConfig_offsetIndicator_present choice: prNothing,prSmal,prLarge!\n",
|
||||
config_fname, cell_idx, SLconfig->rxPool_ResourceConfig_offsetIndicator_present);
|
||||
|
||||
|
||||
RRC_CONFIGURATION_REQ (msg_p).rxPool_ResourceConfig_offsetIndicator_choice[cc_idx] = SLconfig->rxPool_ResourceConfig_offsetIndicator_choice;
|
||||
|
||||
|
||||
if (strcmp(SLconfig->rxPool_ResourceConfig_subframeBitmap_present,"prNothing")==0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).rxPool_ResourceConfig_subframeBitmap_present[cc_idx] = LTE_SubframeBitmapSL_r12_PR_NOTHING;
|
||||
} else if (strcmp(SLconfig->rxPool_ResourceConfig_subframeBitmap_present,"prBs4")==0) {
|
||||
@@ -136,11 +136,11 @@ void fill_SL_configuration(MessageDef *msg_p, ccparams_sidelink_t *SLconfig,int
|
||||
AssertFatal (0,
|
||||
"Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for rxPool_ResourceConfig_subframeBitmap_present choice: prNothing,prBs4,prBs8,prBs12,prBs16,prBs30,prBs40,prBs42!\n",
|
||||
config_fname, cell_idx, SLconfig->rxPool_ResourceConfig_subframeBitmap_present);
|
||||
|
||||
|
||||
RRC_CONFIGURATION_REQ (msg_p).rxPool_ResourceConfig_subframeBitmap_choice_bs_buf[cc_idx] = SLconfig->rxPool_ResourceConfig_subframeBitmap_choice_bs_buf;
|
||||
RRC_CONFIGURATION_REQ (msg_p).rxPool_ResourceConfig_subframeBitmap_choice_bs_size[cc_idx] = SLconfig->rxPool_ResourceConfig_subframeBitmap_choice_bs_size;
|
||||
RRC_CONFIGURATION_REQ (msg_p).rxPool_ResourceConfig_subframeBitmap_choice_bs_bits_unused[cc_idx] = SLconfig->rxPool_ResourceConfig_subframeBitmap_choice_bs_bits_unused;
|
||||
|
||||
|
||||
//SIB19 - for discRxPool
|
||||
if (strcmp(SLconfig->discRxPool_cp_Len,"normal")==0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).discRxPool_cp_Len[cc_idx] = LTE_SL_CP_Len_r12_normal;
|
||||
@@ -150,7 +150,7 @@ void fill_SL_configuration(MessageDef *msg_p, ccparams_sidelink_t *SLconfig,int
|
||||
AssertFatal (0,
|
||||
"Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for discRxPool_cp_Len choice: normal,extended!\n",
|
||||
config_fname, cell_idx, SLconfig->discRxPool_cp_Len);
|
||||
|
||||
|
||||
if (strcmp(SLconfig->discRxPool_discPeriod,"rf32")==0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).discRxPool_discPeriod[cc_idx] = LTE_SL_DiscResourcePool_r12__discPeriod_r12_rf32;
|
||||
} else if (strcmp(SLconfig->discRxPool_discPeriod,"rf64")==0) {
|
||||
@@ -171,13 +171,13 @@ void fill_SL_configuration(MessageDef *msg_p, ccparams_sidelink_t *SLconfig,int
|
||||
AssertFatal (0,
|
||||
"Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for discRxPool_discPeriod choice: rf32,rf64,rf128,rf512,rf1024,rf16,spare!\n",
|
||||
config_fname, cell_idx, SLconfig->discRxPool_discPeriod);
|
||||
|
||||
|
||||
RRC_CONFIGURATION_REQ (msg_p).discRxPool_numRetx[cc_idx] = SLconfig->discRxPool_numRetx;
|
||||
RRC_CONFIGURATION_REQ (msg_p).discRxPool_numRepetition[cc_idx] = SLconfig->discRxPool_numRepetition;
|
||||
RRC_CONFIGURATION_REQ (msg_p).discRxPool_ResourceConfig_prb_Num[cc_idx] = SLconfig->discRxPool_ResourceConfig_prb_Num;
|
||||
RRC_CONFIGURATION_REQ (msg_p).discRxPool_ResourceConfig_prb_Start[cc_idx] = SLconfig->discRxPool_ResourceConfig_prb_Start;
|
||||
RRC_CONFIGURATION_REQ (msg_p).discRxPool_ResourceConfig_prb_End[cc_idx] = SLconfig->discRxPool_ResourceConfig_prb_End;
|
||||
|
||||
|
||||
if (strcmp(SLconfig->discRxPool_ResourceConfig_offsetIndicator_present,"prNothing")==0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).discRxPool_ResourceConfig_offsetIndicator_present[cc_idx] = LTE_SL_OffsetIndicator_r12_PR_NOTHING;
|
||||
} else if (strcmp(SLconfig->discRxPool_ResourceConfig_offsetIndicator_present,"prSmall")==0) {
|
||||
@@ -188,9 +188,9 @@ void fill_SL_configuration(MessageDef *msg_p, ccparams_sidelink_t *SLconfig,int
|
||||
AssertFatal (0,
|
||||
"Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for discRxPool_ResourceConfig_offsetIndicator_present choice: prNothing,prSmal,prLarge!\n",
|
||||
config_fname, cell_idx, SLconfig->discRxPool_ResourceConfig_offsetIndicator_present);
|
||||
|
||||
|
||||
RRC_CONFIGURATION_REQ (msg_p).discRxPool_ResourceConfig_offsetIndicator_choice[cc_idx] = SLconfig->discRxPool_ResourceConfig_offsetIndicator_choice;
|
||||
|
||||
|
||||
if (strcmp(SLconfig->discRxPool_ResourceConfig_subframeBitmap_present,"prNothing")==0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).discRxPool_ResourceConfig_subframeBitmap_present[cc_idx] = LTE_SubframeBitmapSL_r12_PR_NOTHING;
|
||||
} else if (strcmp(SLconfig->discRxPool_ResourceConfig_subframeBitmap_present,"prBs4")==0) {
|
||||
@@ -211,11 +211,11 @@ void fill_SL_configuration(MessageDef *msg_p, ccparams_sidelink_t *SLconfig,int
|
||||
AssertFatal (0,
|
||||
"Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for discRxPool_ResourceConfig_subframeBitmap_present choice: prNothing,prBs4,prBs8,prBs12,prBs16,prBs30,prBs40,prBs42!\n",
|
||||
config_fname, cell_idx, SLconfig->discRxPool_ResourceConfig_subframeBitmap_present);
|
||||
|
||||
|
||||
RRC_CONFIGURATION_REQ (msg_p).discRxPool_ResourceConfig_subframeBitmap_choice_bs_buf[cc_idx] = SLconfig->discRxPool_ResourceConfig_subframeBitmap_choice_bs_buf;
|
||||
RRC_CONFIGURATION_REQ (msg_p).discRxPool_ResourceConfig_subframeBitmap_choice_bs_size[cc_idx] = SLconfig->discRxPool_ResourceConfig_subframeBitmap_choice_bs_size;
|
||||
RRC_CONFIGURATION_REQ (msg_p).discRxPool_ResourceConfig_subframeBitmap_choice_bs_bits_unused[cc_idx] = SLconfig->discRxPool_ResourceConfig_subframeBitmap_choice_bs_bits_unused;
|
||||
|
||||
|
||||
//SIB19 - For discRxPoolPS
|
||||
if (strcmp(SLconfig->discRxPoolPS_cp_Len,"normal")==0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).discRxPoolPS_cp_Len[cc_idx] = LTE_SL_CP_Len_r12_normal;
|
||||
@@ -225,7 +225,7 @@ void fill_SL_configuration(MessageDef *msg_p, ccparams_sidelink_t *SLconfig,int
|
||||
AssertFatal (0,
|
||||
"Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for discRxPoolPS_cp_Len choice: normal,extended!\n",
|
||||
config_fname, cell_idx, SLconfig->discRxPoolPS_cp_Len);
|
||||
|
||||
|
||||
if (strcmp(SLconfig->discRxPoolPS_discPeriod,"rf32")==0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).discRxPoolPS_discPeriod[cc_idx] = LTE_SL_DiscResourcePool_r12__discPeriod_r12_rf32;
|
||||
} else if (strcmp(SLconfig->discRxPoolPS_discPeriod,"rf64")==0) {
|
||||
@@ -246,13 +246,13 @@ void fill_SL_configuration(MessageDef *msg_p, ccparams_sidelink_t *SLconfig,int
|
||||
AssertFatal (0,
|
||||
"Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for discRxPoolPS_discPeriod choice: rf32,rf64,rf128,rf512,rf1024,rf16,spare!\n",
|
||||
config_fname, cell_idx, SLconfig->discRxPoolPS_discPeriod);
|
||||
|
||||
|
||||
RRC_CONFIGURATION_REQ (msg_p).discRxPoolPS_numRetx[cc_idx] = SLconfig->discRxPoolPS_numRetx;
|
||||
RRC_CONFIGURATION_REQ (msg_p).discRxPoolPS_numRepetition[cc_idx] = SLconfig->discRxPoolPS_numRepetition;
|
||||
RRC_CONFIGURATION_REQ (msg_p).discRxPoolPS_ResourceConfig_prb_Num[cc_idx] = SLconfig->discRxPoolPS_ResourceConfig_prb_Num;
|
||||
RRC_CONFIGURATION_REQ (msg_p).discRxPoolPS_ResourceConfig_prb_Start[cc_idx] = SLconfig->discRxPoolPS_ResourceConfig_prb_Start;
|
||||
RRC_CONFIGURATION_REQ (msg_p).discRxPoolPS_ResourceConfig_prb_End[cc_idx] = SLconfig->discRxPoolPS_ResourceConfig_prb_End;
|
||||
|
||||
|
||||
if (strcmp(SLconfig->discRxPoolPS_ResourceConfig_offsetIndicator_present,"prNothing")==0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).discRxPoolPS_ResourceConfig_offsetIndicator_present[cc_idx] = LTE_SL_OffsetIndicator_r12_PR_NOTHING;
|
||||
} else if (strcmp(SLconfig->discRxPoolPS_ResourceConfig_offsetIndicator_present,"prSmall")==0) {
|
||||
@@ -263,9 +263,9 @@ void fill_SL_configuration(MessageDef *msg_p, ccparams_sidelink_t *SLconfig,int
|
||||
AssertFatal (0,
|
||||
"Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for discRxPoolPS_ResourceConfig_offsetIndicator_present choice: prNothing,prSmal,prLarge!\n",
|
||||
config_fname, cell_idx, SLconfig->discRxPoolPS_ResourceConfig_offsetIndicator_present);
|
||||
|
||||
|
||||
RRC_CONFIGURATION_REQ (msg_p).discRxPoolPS_ResourceConfig_offsetIndicator_choice[cc_idx] = SLconfig->discRxPoolPS_ResourceConfig_offsetIndicator_choice;
|
||||
|
||||
|
||||
if (strcmp(SLconfig->discRxPoolPS_ResourceConfig_subframeBitmap_present,"prNothing")==0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).discRxPoolPS_ResourceConfig_subframeBitmap_present[cc_idx] = LTE_SubframeBitmapSL_r12_PR_NOTHING;
|
||||
} else if (strcmp(SLconfig->discRxPoolPS_ResourceConfig_subframeBitmap_present,"prBs4")==0) {
|
||||
@@ -286,7 +286,7 @@ void fill_SL_configuration(MessageDef *msg_p, ccparams_sidelink_t *SLconfig,int
|
||||
AssertFatal (0,
|
||||
"Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for discRxPoolPS_ResourceConfig_subframeBitmap_present choice: prNothing,prBs4,prBs8,prBs12,prBs16,prBs30,prBs40,prBs42!\n",
|
||||
config_fname, cell_idx, SLconfig->discRxPoolPS_ResourceConfig_subframeBitmap_present);
|
||||
|
||||
|
||||
RRC_CONFIGURATION_REQ (msg_p).discRxPoolPS_ResourceConfig_subframeBitmap_choice_bs_buf[cc_idx] = SLconfig->discRxPoolPS_ResourceConfig_subframeBitmap_choice_bs_buf;
|
||||
RRC_CONFIGURATION_REQ (msg_p).discRxPoolPS_ResourceConfig_subframeBitmap_choice_bs_size[cc_idx] = SLconfig->discRxPoolPS_ResourceConfig_subframeBitmap_choice_bs_size;
|
||||
RRC_CONFIGURATION_REQ (msg_p).discRxPoolPS_ResourceConfig_subframeBitmap_choice_bs_bits_unused[cc_idx] = SLconfig->discRxPoolPS_ResourceConfig_subframeBitmap_choice_bs_bits_unused;
|
||||
|
||||
+189
-188
@@ -38,7 +38,7 @@
|
||||
#include "common/config/config_userapi.h"
|
||||
#include "RRC_config_tools.h"
|
||||
#include "enb_paramdef.h"
|
||||
|
||||
|
||||
void fill_eMTC_configuration(MessageDef *msg_p, ccparams_eMTC_t *eMTCconfig, int cell_idx,int cc_idx,char *config_fname,char *brparamspath) {
|
||||
|
||||
paramdef_t schedulingInfoBrParams[] = SI_INFO_BR_DESC(eMTCconfig);
|
||||
@@ -58,8 +58,8 @@ void fill_eMTC_configuration(MessageDef *msg_p, ccparams_eMTC_t *eMTCconfig, in
|
||||
|
||||
printf("Found parameters for eMTC from %s : %s\n",config_fname,brparamspath);
|
||||
RRC_CONFIGURATION_REQ(msg_p).schedulingInfoSIB1_BR_r13[cc_idx] = eMTCconfig->schedulingInfoSIB1_BR_r13;
|
||||
|
||||
|
||||
|
||||
|
||||
if (!strcmp(eMTCconfig->cellSelectionInfoCE_r13, "ENABLE")) {
|
||||
RRC_CONFIGURATION_REQ(msg_p).cellSelectionInfoCE_r13[cc_idx] = TRUE;
|
||||
RRC_CONFIGURATION_REQ(msg_p).q_RxLevMinCE_r13[cc_idx]= eMTCconfig->q_RxLevMinCE_r13;
|
||||
@@ -68,14 +68,14 @@ void fill_eMTC_configuration(MessageDef *msg_p, ccparams_eMTC_t *eMTCconfig, in
|
||||
} else {
|
||||
RRC_CONFIGURATION_REQ(msg_p).cellSelectionInfoCE_r13[cc_idx] = FALSE;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
if (!strcmp(eMTCconfig->bandwidthReducedAccessRelatedInfo_r13, "ENABLE")) {
|
||||
RRC_CONFIGURATION_REQ(msg_p).bandwidthReducedAccessRelatedInfo_r13[cc_idx] = TRUE;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
if (!strcmp(eMTCconfig->si_WindowLength_BR_r13, "ms20")) {
|
||||
RRC_CONFIGURATION_REQ(msg_p).si_WindowLength_BR_r13[cc_idx] = 0;
|
||||
} else if (!strcmp(eMTCconfig->si_WindowLength_BR_r13, "ms40")) {
|
||||
@@ -93,8 +93,8 @@ void fill_eMTC_configuration(MessageDef *msg_p, ccparams_eMTC_t *eMTCconfig, in
|
||||
} else if (!strcmp(eMTCconfig->si_WindowLength_BR_r13, "spare")) {
|
||||
RRC_CONFIGURATION_REQ(msg_p).si_WindowLength_BR_r13[cc_idx] = 7;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
if (!strcmp(eMTCconfig->si_RepetitionPattern_r13, "everyRF")) {
|
||||
RRC_CONFIGURATION_REQ(msg_p).si_RepetitionPattern_r13[cc_idx] = 0;
|
||||
} else if (!strcmp(eMTCconfig->si_RepetitionPattern_r13, "every2ndRF")) {
|
||||
@@ -104,11 +104,11 @@ void fill_eMTC_configuration(MessageDef *msg_p, ccparams_eMTC_t *eMTCconfig, in
|
||||
} else if (!strcmp(eMTCconfig->si_RepetitionPattern_r13, "every8thRF")) {
|
||||
RRC_CONFIGURATION_REQ(msg_p).si_RepetitionPattern_r13[cc_idx] = 3;
|
||||
}
|
||||
|
||||
|
||||
} else {
|
||||
RRC_CONFIGURATION_REQ(msg_p).bandwidthReducedAccessRelatedInfo_r13[cc_idx] = FALSE;
|
||||
}
|
||||
|
||||
|
||||
char schedulingInfoBrPath[MAX_OPTNAME_SIZE * 2];
|
||||
config_getlist(&schedulingInfoBrParamList, NULL, 0, brparamspath);
|
||||
RRC_CONFIGURATION_REQ (msg_p).scheduling_info_br_size[cc_idx] = schedulingInfoBrParamList.numelt;
|
||||
@@ -119,12 +119,12 @@ void fill_eMTC_configuration(MessageDef *msg_p, ccparams_eMTC_t *eMTCconfig, in
|
||||
RRC_CONFIGURATION_REQ (msg_p).si_Narrowband_r13[cc_idx][siInfoindex] = eMTCconfig->si_Narrowband_r13;
|
||||
RRC_CONFIGURATION_REQ (msg_p).si_TBS_r13[cc_idx][siInfoindex] = eMTCconfig->si_TBS_r13;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[cc_idx].system_info_value_tag_SI_size[cc_idx] = 0;
|
||||
|
||||
|
||||
|
||||
|
||||
RRC_CONFIGURATION_REQ(msg_p).fdd_DownlinkOrTddSubframeBitmapBR_r13[cc_idx] = CALLOC(1, sizeof(BOOLEAN_t));
|
||||
if (!strcmp(eMTCconfig->fdd_DownlinkOrTddSubframeBitmapBR_r13, "subframePattern40-r13")) {
|
||||
*RRC_CONFIGURATION_REQ(msg_p).fdd_DownlinkOrTddSubframeBitmapBR_r13[cc_idx] = FALSE;
|
||||
@@ -133,17 +133,17 @@ void fill_eMTC_configuration(MessageDef *msg_p, ccparams_eMTC_t *eMTCconfig, in
|
||||
*RRC_CONFIGURATION_REQ(msg_p).fdd_DownlinkOrTddSubframeBitmapBR_r13[cc_idx] = TRUE;
|
||||
RRC_CONFIGURATION_REQ(msg_p).fdd_DownlinkOrTddSubframeBitmapBR_val_r13[cc_idx] = eMTCconfig->fdd_DownlinkOrTddSubframeBitmapBR_val_r13;
|
||||
}
|
||||
|
||||
|
||||
RRC_CONFIGURATION_REQ(msg_p).startSymbolBR_r13[cc_idx] = eMTCconfig->startSymbolBR_r13;
|
||||
|
||||
|
||||
|
||||
|
||||
if (!strcmp(eMTCconfig->si_HoppingConfigCommon_r13, "off")) {
|
||||
RRC_CONFIGURATION_REQ(msg_p).si_HoppingConfigCommon_r13[cc_idx] = 1;
|
||||
} else if (!strcmp(eMTCconfig->si_HoppingConfigCommon_r13, "on")) {
|
||||
RRC_CONFIGURATION_REQ(msg_p).si_HoppingConfigCommon_r13[cc_idx] = 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
RRC_CONFIGURATION_REQ(msg_p).si_ValidityTime_r13[cc_idx] = calloc(1, sizeof(long));
|
||||
if (!strcmp(eMTCconfig->si_ValidityTime_r13, "true")) {
|
||||
*RRC_CONFIGURATION_REQ(msg_p).si_ValidityTime_r13[cc_idx] = 0;
|
||||
@@ -152,24 +152,24 @@ void fill_eMTC_configuration(MessageDef *msg_p, ccparams_eMTC_t *eMTCconfig, in
|
||||
"Failed to parse eNB configuration file %s, enb %d si_ValidityTime_r13 unknown value!\n",
|
||||
config_fname, cell_idx);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
if (!strcmp(eMTCconfig->freqHoppingParametersDL_r13, "ENABLE"))
|
||||
{
|
||||
RRC_CONFIGURATION_REQ(msg_p).freqHoppingParametersDL_r13[cc_idx] = TRUE;
|
||||
|
||||
|
||||
if (!strcmp(eMTCconfig->interval_DLHoppingConfigCommonModeA_r13, "interval-TDD-r13"))
|
||||
RRC_CONFIGURATION_REQ(msg_p).interval_DLHoppingConfigCommonModeA_r13[cc_idx] = FALSE;
|
||||
else
|
||||
RRC_CONFIGURATION_REQ(msg_p).interval_DLHoppingConfigCommonModeA_r13[cc_idx] = TRUE;
|
||||
RRC_CONFIGURATION_REQ(msg_p).interval_DLHoppingConfigCommonModeA_r13_val[cc_idx] = eMTCconfig->interval_DLHoppingConfigCommonModeA_r13_val;
|
||||
|
||||
|
||||
if (!strcmp(eMTCconfig->interval_DLHoppingConfigCommonModeB_r13, "interval-TDD-r13"))
|
||||
RRC_CONFIGURATION_REQ(msg_p).interval_DLHoppingConfigCommonModeB_r13[cc_idx] = FALSE;
|
||||
else
|
||||
RRC_CONFIGURATION_REQ(msg_p).interval_DLHoppingConfigCommonModeB_r13[cc_idx] = TRUE;
|
||||
RRC_CONFIGURATION_REQ(msg_p).interval_DLHoppingConfigCommonModeB_r13_val[cc_idx] = eMTCconfig->interval_DLHoppingConfigCommonModeB_r13_val;
|
||||
|
||||
|
||||
RRC_CONFIGURATION_REQ(msg_p).mpdcch_pdsch_HoppingNB_r13[cc_idx] = calloc(1, sizeof(long));
|
||||
if (!strcmp(eMTCconfig->mpdcch_pdsch_HoppingNB_r13, "nb2")) {
|
||||
*RRC_CONFIGURATION_REQ(msg_p).mpdcch_pdsch_HoppingNB_r13[cc_idx] = 0;
|
||||
@@ -184,30 +184,30 @@ void fill_eMTC_configuration(MessageDef *msg_p, ccparams_eMTC_t *eMTCconfig, in
|
||||
|
||||
RRC_CONFIGURATION_REQ(msg_p).mpdcch_pdsch_HoppingOffset_r13[cc_idx] = calloc(1, sizeof(long));
|
||||
*RRC_CONFIGURATION_REQ(msg_p).mpdcch_pdsch_HoppingOffset_r13[cc_idx] = eMTCconfig->mpdcch_pdsch_HoppingOffset_r13;
|
||||
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
RRC_CONFIGURATION_REQ(msg_p).freqHoppingParametersDL_r13[cc_idx] = FALSE;
|
||||
}
|
||||
|
||||
|
||||
/** ------------------------------SIB2/3 BR------------------------------------------ */
|
||||
|
||||
|
||||
|
||||
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].prach_root = eMTCconfig->ccparams.prach_root;
|
||||
|
||||
|
||||
if ((eMTCconfig->ccparams.prach_root <0) || (eMTCconfig->ccparams.prach_root > 1023))
|
||||
AssertFatal (0,
|
||||
"Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for prach_root choice: 0..1023 !\n",
|
||||
config_fname, cell_idx,eMTCconfig->ccparams.prach_root);
|
||||
|
||||
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].prach_config_index = eMTCconfig->ccparams.prach_config_index;
|
||||
|
||||
|
||||
if ((eMTCconfig->ccparams.prach_config_index <0) || (eMTCconfig->ccparams.prach_config_index > 63))
|
||||
AssertFatal (0,
|
||||
"Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for prach_config_index choice: 0..1023 !\n",
|
||||
config_fname, cell_idx,eMTCconfig->ccparams.prach_config_index);
|
||||
|
||||
|
||||
if (!eMTCconfig->ccparams.prach_high_speed)
|
||||
AssertFatal (0,
|
||||
"Failed to parse eNB configuration file %s, enb %d define %s: ENABLE,DISABLE!\n",
|
||||
@@ -220,71 +220,71 @@ void fill_eMTC_configuration(MessageDef *msg_p, ccparams_eMTC_t *eMTCconfig, in
|
||||
AssertFatal (0,
|
||||
"Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for prach_config choice: ENABLE,DISABLE !\n",
|
||||
config_fname, cell_idx,eMTCconfig->ccparams.prach_high_speed);
|
||||
|
||||
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].prach_zero_correlation = eMTCconfig->ccparams.prach_zero_correlation;
|
||||
|
||||
|
||||
if ((eMTCconfig->ccparams.prach_zero_correlation <0) || (eMTCconfig->ccparams.prach_zero_correlation > 15))
|
||||
AssertFatal (0,
|
||||
"Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for prach_zero_correlation choice: 0..15!\n",
|
||||
config_fname, cell_idx,eMTCconfig->ccparams.prach_zero_correlation);
|
||||
|
||||
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].prach_freq_offset = eMTCconfig->ccparams.prach_freq_offset;
|
||||
|
||||
|
||||
if ((eMTCconfig->ccparams.prach_freq_offset <0) || (eMTCconfig->ccparams.prach_freq_offset > 94))
|
||||
AssertFatal (0,
|
||||
"Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for prach_freq_offset choice: 0..94!\n",
|
||||
config_fname, cell_idx,eMTCconfig->ccparams.prach_freq_offset);
|
||||
|
||||
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].pucch_delta_shift = eMTCconfig->ccparams.pucch_delta_shift-1;
|
||||
|
||||
|
||||
if ((eMTCconfig->ccparams.pucch_delta_shift <1) || (eMTCconfig->ccparams.pucch_delta_shift > 3))
|
||||
AssertFatal (0,
|
||||
"Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for pucch_delta_shift choice: 1..3!\n",
|
||||
config_fname, cell_idx,eMTCconfig->ccparams.pucch_delta_shift);
|
||||
|
||||
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].pucch_nRB_CQI = eMTCconfig->ccparams.pucch_nRB_CQI;
|
||||
|
||||
|
||||
if ((eMTCconfig->ccparams.pucch_nRB_CQI <0) || (eMTCconfig->ccparams.pucch_nRB_CQI > 98))
|
||||
AssertFatal (0,
|
||||
"Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for pucch_nRB_CQI choice: 0..98!\n",
|
||||
config_fname, cell_idx,eMTCconfig->ccparams.pucch_nRB_CQI);
|
||||
|
||||
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].pucch_nCS_AN = eMTCconfig->ccparams.pucch_nCS_AN;
|
||||
|
||||
|
||||
if ((eMTCconfig->ccparams.pucch_nCS_AN <0) || (eMTCconfig->ccparams.pucch_nCS_AN > 7))
|
||||
AssertFatal (0,
|
||||
"Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for pucch_nCS_AN choice: 0..7!\n",
|
||||
config_fname, cell_idx,eMTCconfig->ccparams.pucch_nCS_AN);
|
||||
|
||||
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].pucch_n1_AN = eMTCconfig->ccparams.pucch_n1_AN;
|
||||
|
||||
|
||||
if ((eMTCconfig->ccparams.pucch_n1_AN <0) || (eMTCconfig->ccparams.pucch_n1_AN > 2047))
|
||||
AssertFatal (0,
|
||||
"Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for pucch_n1_AN choice: 0..2047!\n",
|
||||
config_fname, cell_idx,eMTCconfig->ccparams.pucch_n1_AN);
|
||||
|
||||
|
||||
//#endif
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].pdsch_referenceSignalPower = eMTCconfig->ccparams.pdsch_referenceSignalPower;
|
||||
|
||||
|
||||
if ((eMTCconfig->ccparams.pdsch_referenceSignalPower <-60) || (eMTCconfig->ccparams.pdsch_referenceSignalPower > 50))
|
||||
AssertFatal (0,
|
||||
"Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for pdsch_referenceSignalPower choice:-60..50!\n",
|
||||
config_fname, cell_idx,eMTCconfig->ccparams.pdsch_referenceSignalPower);
|
||||
|
||||
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].pdsch_p_b = eMTCconfig->ccparams.pdsch_p_b;
|
||||
|
||||
|
||||
if ((eMTCconfig->ccparams.pdsch_p_b <0) || (eMTCconfig->ccparams.pdsch_p_b > 3))
|
||||
AssertFatal (0,
|
||||
"Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for pdsch_p_b choice: 0..3!\n",
|
||||
config_fname, cell_idx,eMTCconfig->ccparams.pdsch_p_b);
|
||||
|
||||
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].pusch_n_SB = eMTCconfig->ccparams.pusch_n_SB;
|
||||
|
||||
|
||||
if ((eMTCconfig->ccparams.pusch_n_SB <1) || (eMTCconfig->ccparams.pusch_n_SB > 4))
|
||||
AssertFatal (0,
|
||||
"Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for pusch_n_SB choice: 1..4!\n",
|
||||
config_fname, cell_idx,eMTCconfig->ccparams.pusch_n_SB);
|
||||
|
||||
|
||||
if (!eMTCconfig->ccparams.pusch_hoppingMode)
|
||||
AssertFatal (0,
|
||||
"Failed to parse eNB configuration file %s, enb %d define %s: interSubframe,intraAndInterSubframe!\n",
|
||||
@@ -297,14 +297,14 @@ void fill_eMTC_configuration(MessageDef *msg_p, ccparams_eMTC_t *eMTCconfig, in
|
||||
AssertFatal (0,
|
||||
"Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for pusch_hoppingMode choice: interSubframe,intraAndInterSubframe!\n",
|
||||
config_fname, cell_idx,eMTCconfig->ccparams.pusch_hoppingMode);
|
||||
|
||||
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].pusch_hoppingOffset = eMTCconfig->ccparams.pusch_hoppingOffset;
|
||||
|
||||
|
||||
if ((eMTCconfig->ccparams.pusch_hoppingOffset<0) || (eMTCconfig->ccparams.pusch_hoppingOffset>98))
|
||||
AssertFatal (0,
|
||||
"Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for pusch_hoppingOffset choice: 0..98!\n",
|
||||
config_fname, cell_idx,eMTCconfig->ccparams.pusch_hoppingMode);
|
||||
|
||||
|
||||
if (!eMTCconfig->ccparams.pusch_enable64QAM)
|
||||
AssertFatal (0,
|
||||
"Failed to parse eNB configuration file %s, enb %d define %s: ENABLE,DISABLE!\n",
|
||||
@@ -317,7 +317,7 @@ void fill_eMTC_configuration(MessageDef *msg_p, ccparams_eMTC_t *eMTCconfig, in
|
||||
AssertFatal (0,
|
||||
"Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for pusch_enable64QAM choice: ENABLE,DISABLE!\n",
|
||||
config_fname, cell_idx,eMTCconfig->ccparams.pusch_enable64QAM);
|
||||
|
||||
|
||||
if (!eMTCconfig->ccparams.pusch_groupHoppingEnabled)
|
||||
AssertFatal (0,
|
||||
"Failed to parse eNB configuration file %s, enb %d define %s: ENABLE,DISABLE!\n",
|
||||
@@ -330,14 +330,14 @@ void fill_eMTC_configuration(MessageDef *msg_p, ccparams_eMTC_t *eMTCconfig, in
|
||||
AssertFatal (0,
|
||||
"Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for pusch_groupHoppingEnabled choice: ENABLE,DISABLE!\n",
|
||||
config_fname, cell_idx,eMTCconfig->ccparams.pusch_groupHoppingEnabled);
|
||||
|
||||
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].pusch_groupAssignment = eMTCconfig->ccparams.pusch_groupAssignment;
|
||||
|
||||
|
||||
if ((eMTCconfig->ccparams.pusch_groupAssignment<0)||(eMTCconfig->ccparams.pusch_groupAssignment>29))
|
||||
AssertFatal (0,
|
||||
"Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for pusch_groupAssignment choice: 0..29!\n",
|
||||
config_fname, cell_idx,eMTCconfig->ccparams.pusch_groupAssignment);
|
||||
|
||||
|
||||
if (!eMTCconfig->ccparams.pusch_sequenceHoppingEnabled)
|
||||
AssertFatal (0,
|
||||
"Failed to parse eNB configuration file %s, enb %d define %s: ENABLE,DISABLE!\n",
|
||||
@@ -350,14 +350,14 @@ void fill_eMTC_configuration(MessageDef *msg_p, ccparams_eMTC_t *eMTCconfig, in
|
||||
AssertFatal (0,
|
||||
"Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for pusch_sequenceHoppingEnabled choice: ENABLE,DISABLE!\n",
|
||||
config_fname, cell_idx,eMTCconfig->ccparams.pusch_sequenceHoppingEnabled);
|
||||
|
||||
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].pusch_nDMRS1= eMTCconfig->ccparams.pusch_nDMRS1; //cyclic_shift in RRC!
|
||||
|
||||
|
||||
if ((eMTCconfig->ccparams.pusch_nDMRS1 <0) || (eMTCconfig->ccparams.pusch_nDMRS1>7))
|
||||
AssertFatal (0,
|
||||
"Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for pusch_nDMRS1 choice: 0..7!\n",
|
||||
config_fname, cell_idx,eMTCconfig->ccparams.pusch_nDMRS1);
|
||||
|
||||
|
||||
if (strcmp(eMTCconfig->ccparams.phich_duration,"NORMAL")==0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].phich_duration= LTE_PHICH_Config__phich_Duration_normal;
|
||||
} else if (strcmp(eMTCconfig->ccparams.phich_duration,"EXTENDED")==0) {
|
||||
@@ -366,7 +366,7 @@ void fill_eMTC_configuration(MessageDef *msg_p, ccparams_eMTC_t *eMTCconfig, in
|
||||
AssertFatal (0,
|
||||
"Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for phich_duration choice: NORMAL,EXTENDED!\n",
|
||||
config_fname, cell_idx,eMTCconfig->ccparams.phich_duration);
|
||||
|
||||
|
||||
if (strcmp(eMTCconfig->ccparams.phich_resource,"ONESIXTH")==0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].phich_resource= LTE_PHICH_Config__phich_Resource_oneSixth ;
|
||||
} else if (strcmp(eMTCconfig->ccparams.phich_resource,"HALF")==0) {
|
||||
@@ -379,11 +379,11 @@ void fill_eMTC_configuration(MessageDef *msg_p, ccparams_eMTC_t *eMTCconfig, in
|
||||
AssertFatal (0,
|
||||
"Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for phich_resource choice: ONESIXTH,HALF,ONE,TWO!\n",
|
||||
config_fname, cell_idx,eMTCconfig->ccparams.phich_resource);
|
||||
|
||||
|
||||
printf("phich.resource eMTC %ld (%s), phich.duration eMTC %ld (%s)\n",
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].phich_resource,eMTCconfig->ccparams.phich_resource,
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].phich_duration,eMTCconfig->ccparams.phich_duration);
|
||||
|
||||
|
||||
if (strcmp(eMTCconfig->ccparams.srs_enable, "ENABLE") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].srs_enable= TRUE;
|
||||
} else if (strcmp(eMTCconfig->ccparams.srs_enable, "DISABLE") == 0) {
|
||||
@@ -392,21 +392,21 @@ void fill_eMTC_configuration(MessageDef *msg_p, ccparams_eMTC_t *eMTCconfig, in
|
||||
AssertFatal (0,
|
||||
"Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for srs_BandwidthConfig choice: ENABLE,DISABLE !\n",
|
||||
config_fname, cell_idx,eMTCconfig->ccparams.srs_enable);
|
||||
|
||||
|
||||
if (RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].srs_enable== TRUE) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].srs_BandwidthConfig= eMTCconfig->ccparams.srs_BandwidthConfig;
|
||||
|
||||
|
||||
if ((eMTCconfig->ccparams.srs_BandwidthConfig < 0) || (eMTCconfig->ccparams.srs_BandwidthConfig >7))
|
||||
AssertFatal (0, "Failed to parse eNB configuration file %s, enb %d unknown value %d for srs_BandwidthConfig choice: 0...7\n",
|
||||
config_fname, cell_idx,eMTCconfig->ccparams.srs_BandwidthConfig);
|
||||
|
||||
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].srs_SubframeConfig= eMTCconfig->ccparams.srs_SubframeConfig;
|
||||
|
||||
|
||||
if ((eMTCconfig->ccparams.srs_SubframeConfig<0) || (eMTCconfig->ccparams.srs_SubframeConfig>15))
|
||||
AssertFatal (0,
|
||||
"Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for srs_SubframeConfig choice: 0..15 !\n",
|
||||
config_fname, cell_idx,eMTCconfig->ccparams.srs_SubframeConfig);
|
||||
|
||||
|
||||
if (strcmp(eMTCconfig->ccparams.srs_ackNackST, "ENABLE") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].srs_ackNackST= TRUE;
|
||||
} else if (strcmp(eMTCconfig->ccparams.srs_ackNackST, "DISABLE") == 0) {
|
||||
@@ -415,7 +415,7 @@ void fill_eMTC_configuration(MessageDef *msg_p, ccparams_eMTC_t *eMTCconfig, in
|
||||
AssertFatal (0,
|
||||
"Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for srs_BandwidthConfig choice: ENABLE,DISABLE !\n",
|
||||
config_fname, cell_idx,eMTCconfig->ccparams.srs_ackNackST);
|
||||
|
||||
|
||||
if (strcmp(eMTCconfig->ccparams.srs_MaxUpPts, "ENABLE") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].srs_MaxUpPts= TRUE;
|
||||
} else if (strcmp(eMTCconfig->ccparams.srs_MaxUpPts, "DISABLE") == 0) {
|
||||
@@ -425,14 +425,14 @@ void fill_eMTC_configuration(MessageDef *msg_p, ccparams_eMTC_t *eMTCconfig, in
|
||||
"Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for srs_MaxUpPts choice: ENABLE,DISABLE !\n",
|
||||
config_fname, cell_idx,eMTCconfig->ccparams.srs_MaxUpPts);
|
||||
}
|
||||
|
||||
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].pusch_p0_Nominal= eMTCconfig->ccparams.pusch_p0_Nominal;
|
||||
|
||||
|
||||
if ((eMTCconfig->ccparams.pusch_p0_Nominal<-126) || (eMTCconfig->ccparams.pusch_p0_Nominal>24))
|
||||
AssertFatal (0,
|
||||
"Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for pusch_p0_Nominal choice: -126..24 !\n",
|
||||
config_fname, cell_idx,eMTCconfig->ccparams.pusch_p0_Nominal);
|
||||
|
||||
|
||||
if (strcmp(eMTCconfig->ccparams.pusch_alpha,"AL0")==0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].pusch_alpha= LTE_Alpha_r12_al0;
|
||||
} else if (strcmp(eMTCconfig->ccparams.pusch_alpha,"AL04")==0) {
|
||||
@@ -450,26 +450,26 @@ void fill_eMTC_configuration(MessageDef *msg_p, ccparams_eMTC_t *eMTCconfig, in
|
||||
} else if (strcmp(eMTCconfig->ccparams.pusch_alpha,"AL1")==0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].pusch_alpha= LTE_Alpha_r12_al1;
|
||||
}
|
||||
|
||||
|
||||
else
|
||||
AssertFatal (0,
|
||||
"Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for pucch_Alpha choice: AL0,AL04,AL05,AL06,AL07,AL08,AL09,AL1!\n",
|
||||
config_fname, cell_idx,eMTCconfig->ccparams.pusch_alpha);
|
||||
|
||||
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].pucch_p0_Nominal= eMTCconfig->ccparams.pucch_p0_Nominal;
|
||||
|
||||
|
||||
if ((eMTCconfig->ccparams.pucch_p0_Nominal<-127) || (eMTCconfig->ccparams.pucch_p0_Nominal>-96))
|
||||
AssertFatal (0,
|
||||
"Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for pucch_p0_Nominal choice: -127..-96 !\n",
|
||||
config_fname, cell_idx,eMTCconfig->ccparams.pucch_p0_Nominal);
|
||||
|
||||
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].msg3_delta_Preamble= eMTCconfig->ccparams.msg3_delta_Preamble;
|
||||
|
||||
|
||||
if ((eMTCconfig->ccparams.msg3_delta_Preamble<-1) || (eMTCconfig->ccparams.msg3_delta_Preamble>6))
|
||||
AssertFatal (0,
|
||||
"Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for msg3_delta_Preamble choice: -1..6 !\n",
|
||||
config_fname, cell_idx,eMTCconfig->ccparams.msg3_delta_Preamble);
|
||||
|
||||
|
||||
if (strcmp(eMTCconfig->ccparams.pucch_deltaF_Format1,"deltaF_2")==0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].pucch_deltaF_Format1= LTE_DeltaFList_PUCCH__deltaF_PUCCH_Format1_deltaF_2;
|
||||
} else if (strcmp(eMTCconfig->ccparams.pucch_deltaF_Format1,"deltaF0")==0) {
|
||||
@@ -480,7 +480,7 @@ void fill_eMTC_configuration(MessageDef *msg_p, ccparams_eMTC_t *eMTCconfig, in
|
||||
AssertFatal (0,
|
||||
"Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for pucch_deltaF_Format1 choice: deltaF_2,dltaF0,deltaF2!\n",
|
||||
config_fname, cell_idx,eMTCconfig->ccparams.pucch_deltaF_Format1);
|
||||
|
||||
|
||||
if (strcmp(eMTCconfig->ccparams.pucch_deltaF_Format1b,"deltaF1")==0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].pucch_deltaF_Format1b= LTE_DeltaFList_PUCCH__deltaF_PUCCH_Format1b_deltaF1;
|
||||
} else if (strcmp(eMTCconfig->ccparams.pucch_deltaF_Format1b,"deltaF3")==0) {
|
||||
@@ -491,7 +491,7 @@ void fill_eMTC_configuration(MessageDef *msg_p, ccparams_eMTC_t *eMTCconfig, in
|
||||
AssertFatal (0,
|
||||
"Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for pucch_deltaF_Format1b choice: deltaF1,dltaF3,deltaF5!\n",
|
||||
config_fname, cell_idx,eMTCconfig->ccparams.pucch_deltaF_Format1b);
|
||||
|
||||
|
||||
if (strcmp(eMTCconfig->ccparams.pucch_deltaF_Format2,"deltaF_2")==0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].pucch_deltaF_Format2= LTE_DeltaFList_PUCCH__deltaF_PUCCH_Format2_deltaF_2;
|
||||
} else if (strcmp(eMTCconfig->ccparams.pucch_deltaF_Format2,"deltaF0")==0) {
|
||||
@@ -504,7 +504,7 @@ void fill_eMTC_configuration(MessageDef *msg_p, ccparams_eMTC_t *eMTCconfig, in
|
||||
AssertFatal (0,
|
||||
"Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for pucch_deltaF_Format2 choice: deltaF_2,dltaF0,deltaF1,deltaF2!\n",
|
||||
config_fname, cell_idx,eMTCconfig->ccparams.pucch_deltaF_Format2);
|
||||
|
||||
|
||||
if (strcmp(eMTCconfig->ccparams.pucch_deltaF_Format2a,"deltaF_2")==0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].pucch_deltaF_Format2a= LTE_DeltaFList_PUCCH__deltaF_PUCCH_Format2a_deltaF_2;
|
||||
} else if (strcmp(eMTCconfig->ccparams.pucch_deltaF_Format2a,"deltaF0")==0) {
|
||||
@@ -515,7 +515,7 @@ void fill_eMTC_configuration(MessageDef *msg_p, ccparams_eMTC_t *eMTCconfig, in
|
||||
AssertFatal (0,
|
||||
"Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for pucch_deltaF_Format2a choice: deltaF_2,dltaF0,deltaF2!\n",
|
||||
config_fname, cell_idx,eMTCconfig->ccparams.pucch_deltaF_Format2a);
|
||||
|
||||
|
||||
if (strcmp(eMTCconfig->ccparams.pucch_deltaF_Format2b,"deltaF_2")==0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].pucch_deltaF_Format2b= LTE_DeltaFList_PUCCH__deltaF_PUCCH_Format2b_deltaF_2;
|
||||
} else if (strcmp(eMTCconfig->ccparams.pucch_deltaF_Format2b,"deltaF0")==0) {
|
||||
@@ -526,47 +526,47 @@ void fill_eMTC_configuration(MessageDef *msg_p, ccparams_eMTC_t *eMTCconfig, in
|
||||
AssertFatal (0,
|
||||
"Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for pucch_deltaF_Format2b choice: deltaF_2,dltaF0,deltaF2!\n",
|
||||
config_fname, cell_idx,eMTCconfig->ccparams.pucch_deltaF_Format2b);
|
||||
|
||||
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].rach_numberOfRA_Preambles= (eMTCconfig->ccparams.rach_numberOfRA_Preambles/4)-1;
|
||||
|
||||
|
||||
if ((eMTCconfig->ccparams.rach_numberOfRA_Preambles <4) || (eMTCconfig->ccparams.rach_numberOfRA_Preambles >64) || ((eMTCconfig->ccparams.rach_numberOfRA_Preambles&3)!=0))
|
||||
AssertFatal (0,
|
||||
"Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for rach_numberOfRA_Preambles choice: 4,8,12,...,64!\n",
|
||||
config_fname, cell_idx,eMTCconfig->ccparams.rach_numberOfRA_Preambles);
|
||||
|
||||
|
||||
if (strcmp(eMTCconfig->ccparams.rach_preamblesGroupAConfig, "ENABLE") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].rach_preamblesGroupAConfig= TRUE;
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].rach_sizeOfRA_PreamblesGroupA= (eMTCconfig->ccparams.rach_sizeOfRA_PreamblesGroupA/4)-1;
|
||||
|
||||
|
||||
if ((eMTCconfig->ccparams.rach_numberOfRA_Preambles <4) || (eMTCconfig->ccparams.rach_numberOfRA_Preambles>60) || ((eMTCconfig->ccparams.rach_numberOfRA_Preambles&3)!=0))
|
||||
AssertFatal (0,
|
||||
"Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for rach_sizeOfRA_PreamblesGroupA choice: 4,8,12,...,60!\n",
|
||||
config_fname, cell_idx,eMTCconfig->ccparams.rach_sizeOfRA_PreamblesGroupA);
|
||||
|
||||
|
||||
switch (eMTCconfig->ccparams.rach_messageSizeGroupA) {
|
||||
case 56:
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].rach_messageSizeGroupA= LTE_RACH_ConfigCommon__preambleInfo__preamblesGroupAConfig__messageSizeGroupA_b56;
|
||||
break;
|
||||
|
||||
|
||||
case 144:
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].rach_messageSizeGroupA= LTE_RACH_ConfigCommon__preambleInfo__preamblesGroupAConfig__messageSizeGroupA_b144;
|
||||
break;
|
||||
|
||||
|
||||
case 208:
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].rach_messageSizeGroupA= LTE_RACH_ConfigCommon__preambleInfo__preamblesGroupAConfig__messageSizeGroupA_b208;
|
||||
break;
|
||||
|
||||
|
||||
case 256:
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].rach_messageSizeGroupA= LTE_RACH_ConfigCommon__preambleInfo__preamblesGroupAConfig__messageSizeGroupA_b256;
|
||||
break;
|
||||
|
||||
|
||||
default:
|
||||
AssertFatal (0,
|
||||
"Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for rach_messageSizeGroupA choice: 56,144,208,256!\n",
|
||||
config_fname, cell_idx,eMTCconfig->ccparams.rach_messageSizeGroupA);
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
if (strcmp(eMTCconfig->ccparams.rach_messagePowerOffsetGroupB,"minusinfinity")==0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].rach_messagePowerOffsetGroupB= LTE_RACH_ConfigCommon__preambleInfo__preamblesGroupAConfig__messagePowerOffsetGroupB_minusinfinity;
|
||||
} else if (strcmp(eMTCconfig->ccparams.rach_messagePowerOffsetGroupB,"dB0")==0) {
|
||||
@@ -593,118 +593,118 @@ void fill_eMTC_configuration(MessageDef *msg_p, ccparams_eMTC_t *eMTCconfig, in
|
||||
AssertFatal (0,
|
||||
"Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for rach_preamblesGroupAConfig choice: ENABLE,DISABLE !\n",
|
||||
config_fname, cell_idx,eMTCconfig->ccparams.rach_preamblesGroupAConfig);
|
||||
|
||||
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].rach_preambleInitialReceivedTargetPower= (eMTCconfig->ccparams.rach_preambleInitialReceivedTargetPower+120)/2;
|
||||
|
||||
|
||||
if ((eMTCconfig->ccparams.rach_preambleInitialReceivedTargetPower<-120) || (eMTCconfig->ccparams.rach_preambleInitialReceivedTargetPower>-90) || ((eMTCconfig->ccparams.rach_preambleInitialReceivedTargetPower&1)!=0))
|
||||
AssertFatal (0,
|
||||
"Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for rach_preambleInitialReceivedTargetPower choice: -120,-118,...,-90 !\n",
|
||||
config_fname, cell_idx,eMTCconfig->ccparams.rach_preambleInitialReceivedTargetPower);
|
||||
|
||||
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].rach_powerRampingStep= eMTCconfig->ccparams.rach_powerRampingStep/2;
|
||||
|
||||
|
||||
if ((eMTCconfig->ccparams.rach_powerRampingStep<0) || (eMTCconfig->ccparams.rach_powerRampingStep>6) || ((eMTCconfig->ccparams.rach_powerRampingStep&1)!=0))
|
||||
AssertFatal (0,
|
||||
"Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for rach_powerRampingStep choice: 0,2,4,6 !\n",
|
||||
config_fname, cell_idx,eMTCconfig->ccparams.rach_powerRampingStep);
|
||||
|
||||
|
||||
switch (eMTCconfig->ccparams.rach_preambleTransMax) {
|
||||
case 3:
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].rach_preambleTransMax= LTE_PreambleTransMax_n3;
|
||||
break;
|
||||
|
||||
|
||||
case 4:
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].rach_preambleTransMax= LTE_PreambleTransMax_n4;
|
||||
break;
|
||||
|
||||
|
||||
case 5:
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].rach_preambleTransMax= LTE_PreambleTransMax_n5;
|
||||
break;
|
||||
|
||||
|
||||
case 6:
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].rach_preambleTransMax= LTE_PreambleTransMax_n6;
|
||||
break;
|
||||
|
||||
|
||||
case 7:
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].rach_preambleTransMax= LTE_PreambleTransMax_n7;
|
||||
break;
|
||||
|
||||
|
||||
case 8:
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].rach_preambleTransMax= LTE_PreambleTransMax_n8;
|
||||
break;
|
||||
|
||||
|
||||
case 10:
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].rach_preambleTransMax= LTE_PreambleTransMax_n10;
|
||||
break;
|
||||
|
||||
|
||||
case 20:
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].rach_preambleTransMax= LTE_PreambleTransMax_n20;
|
||||
break;
|
||||
|
||||
|
||||
case 50:
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].rach_preambleTransMax= LTE_PreambleTransMax_n50;
|
||||
break;
|
||||
|
||||
|
||||
case 100:
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].rach_preambleTransMax= LTE_PreambleTransMax_n100;
|
||||
break;
|
||||
|
||||
|
||||
case 200:
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].rach_preambleTransMax= LTE_PreambleTransMax_n200;
|
||||
break;
|
||||
|
||||
|
||||
default:
|
||||
AssertFatal (0,
|
||||
"Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for rach_preambleTransMax choice: 3,4,5,6,7,8,10,20,50,100,200!\n",
|
||||
config_fname, cell_idx,eMTCconfig->ccparams.rach_preambleTransMax);
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].rach_raResponseWindowSize= (eMTCconfig->ccparams.rach_raResponseWindowSize==10)?7:eMTCconfig->ccparams.rach_raResponseWindowSize-2;
|
||||
|
||||
|
||||
if ((eMTCconfig->ccparams.rach_raResponseWindowSize<0)||(eMTCconfig->ccparams.rach_raResponseWindowSize==9)||(eMTCconfig->ccparams.rach_raResponseWindowSize>10))
|
||||
AssertFatal (0,
|
||||
"Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for rach_raResponseWindowSize choice: 2,3,4,5,6,7,8,10!\n",
|
||||
config_fname, cell_idx,eMTCconfig->ccparams.rach_raResponseWindowSize);
|
||||
|
||||
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].rach_macContentionResolutionTimer= (eMTCconfig->ccparams.rach_macContentionResolutionTimer/8)-1;
|
||||
|
||||
|
||||
if ((eMTCconfig->ccparams.rach_macContentionResolutionTimer<8) || (eMTCconfig->ccparams.rach_macContentionResolutionTimer>64) || ((eMTCconfig->ccparams.rach_macContentionResolutionTimer&7)!=0))
|
||||
AssertFatal (0,
|
||||
"Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for rach_macContentionResolutionTimer choice: 8,16,...,56,64!\n",
|
||||
config_fname, cell_idx,eMTCconfig->ccparams.rach_macContentionResolutionTimer);
|
||||
|
||||
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].rach_maxHARQ_Msg3Tx= eMTCconfig->ccparams.rach_maxHARQ_Msg3Tx;
|
||||
|
||||
|
||||
if ((eMTCconfig->ccparams.rach_maxHARQ_Msg3Tx<0) || (eMTCconfig->ccparams.rach_maxHARQ_Msg3Tx>8))
|
||||
AssertFatal (0,
|
||||
"Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for rach_maxHARQ_Msg3Tx choice: 1..8!\n",
|
||||
config_fname, cell_idx,eMTCconfig->ccparams.rach_maxHARQ_Msg3Tx);
|
||||
|
||||
|
||||
switch (eMTCconfig->ccparams.pcch_defaultPagingCycle) {
|
||||
case 32:
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].pcch_defaultPagingCycle= LTE_PCCH_Config__defaultPagingCycle_rf32;
|
||||
break;
|
||||
|
||||
|
||||
case 64:
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].pcch_defaultPagingCycle= LTE_PCCH_Config__defaultPagingCycle_rf64;
|
||||
break;
|
||||
|
||||
|
||||
case 128:
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].pcch_defaultPagingCycle= LTE_PCCH_Config__defaultPagingCycle_rf128;
|
||||
break;
|
||||
|
||||
|
||||
case 256:
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].pcch_defaultPagingCycle= LTE_PCCH_Config__defaultPagingCycle_rf256;
|
||||
break;
|
||||
|
||||
|
||||
default:
|
||||
AssertFatal (0,
|
||||
"Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for pcch_defaultPagingCycle choice: 32,64,128,256!\n",
|
||||
config_fname, cell_idx,eMTCconfig->ccparams.pcch_defaultPagingCycle);
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
if (strcmp(eMTCconfig->ccparams.pcch_nB, "fourT") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].pcch_nB= LTE_PCCH_Config__nB_fourT;
|
||||
} else if (strcmp(eMTCconfig->ccparams.pcch_nB, "twoT") == 0) {
|
||||
@@ -725,86 +725,86 @@ void fill_eMTC_configuration(MessageDef *msg_p, ccparams_eMTC_t *eMTCconfig, in
|
||||
AssertFatal (0,
|
||||
"Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for pcch_nB choice: fourT,twoT,oneT,halfT,quarterT,oneighthT,oneSixteenthT,oneThirtySecondT !\n",
|
||||
config_fname, cell_idx,eMTCconfig->ccparams.pcch_nB);
|
||||
|
||||
|
||||
switch (eMTCconfig->ccparams.bcch_modificationPeriodCoeff) {
|
||||
case 2:
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].bcch_modificationPeriodCoeff= LTE_BCCH_Config__modificationPeriodCoeff_n2;
|
||||
break;
|
||||
|
||||
|
||||
case 4:
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].bcch_modificationPeriodCoeff= LTE_BCCH_Config__modificationPeriodCoeff_n4;
|
||||
break;
|
||||
|
||||
|
||||
case 8:
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].bcch_modificationPeriodCoeff= LTE_BCCH_Config__modificationPeriodCoeff_n8;
|
||||
break;
|
||||
|
||||
|
||||
case 16:
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].bcch_modificationPeriodCoeff= LTE_BCCH_Config__modificationPeriodCoeff_n16;
|
||||
break;
|
||||
|
||||
|
||||
default:
|
||||
AssertFatal (0,
|
||||
"Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for bcch_modificationPeriodCoeff choice: 2,4,8,16",
|
||||
config_fname, cell_idx,eMTCconfig->ccparams.bcch_modificationPeriodCoeff);
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].ue_TimersAndConstants_t300= eMTCconfig->ccparams.ue_TimersAndConstants_t300;
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].ue_TimersAndConstants_t301= eMTCconfig->ccparams.ue_TimersAndConstants_t301;
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].ue_TimersAndConstants_t310= eMTCconfig->ccparams.ue_TimersAndConstants_t310;
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].ue_TimersAndConstants_t311= eMTCconfig->ccparams.ue_TimersAndConstants_t311;
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].ue_TimersAndConstants_n310= eMTCconfig->ccparams.ue_TimersAndConstants_n310;
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].ue_TimersAndConstants_n311= eMTCconfig->ccparams.ue_TimersAndConstants_n311;
|
||||
|
||||
|
||||
switch (eMTCconfig->ccparams.ue_TransmissionMode) {
|
||||
case 1:
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].ue_TransmissionMode= LTE_AntennaInfoDedicated__transmissionMode_tm1;
|
||||
break;
|
||||
|
||||
|
||||
case 2:
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].ue_TransmissionMode= LTE_AntennaInfoDedicated__transmissionMode_tm2;
|
||||
break;
|
||||
|
||||
|
||||
case 3:
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].ue_TransmissionMode= LTE_AntennaInfoDedicated__transmissionMode_tm3;
|
||||
break;
|
||||
|
||||
|
||||
case 4:
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].ue_TransmissionMode= LTE_AntennaInfoDedicated__transmissionMode_tm4;
|
||||
break;
|
||||
|
||||
|
||||
case 5:
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].ue_TransmissionMode= LTE_AntennaInfoDedicated__transmissionMode_tm5;
|
||||
break;
|
||||
|
||||
|
||||
case 6:
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].ue_TransmissionMode= LTE_AntennaInfoDedicated__transmissionMode_tm6;
|
||||
break;
|
||||
|
||||
|
||||
case 7:
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].ue_TransmissionMode= LTE_AntennaInfoDedicated__transmissionMode_tm7;
|
||||
break;
|
||||
|
||||
|
||||
default:
|
||||
AssertFatal (0,
|
||||
"Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for ue_TransmissionMode choice: 1,2,3,4,5,6,7",
|
||||
config_fname, cell_idx, eMTCconfig->ccparams.ue_TransmissionMode);
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
if (!strcmp(eMTCconfig->prach_ConfigCommon_v1310, "ENABLE")) {
|
||||
RRC_CONFIGURATION_REQ(msg_p).radioresourceconfig_BR[cc_idx].prach_ConfigCommon_v1310 = TRUE;
|
||||
|
||||
|
||||
RRC_CONFIGURATION_REQ(msg_p).radioresourceconfig_BR[cc_idx].mpdcch_startSF_CSS_RA_r13 = calloc(1, sizeof(BOOLEAN_t));
|
||||
|
||||
|
||||
if (!strcmp(eMTCconfig->mpdcch_startSF_CSS_RA_r13, "tdd-r13")) {
|
||||
*RRC_CONFIGURATION_REQ(msg_p).radioresourceconfig_BR[cc_idx].mpdcch_startSF_CSS_RA_r13 = FALSE;
|
||||
} else {
|
||||
*RRC_CONFIGURATION_REQ(msg_p).radioresourceconfig_BR[cc_idx].mpdcch_startSF_CSS_RA_r13 = TRUE;
|
||||
}
|
||||
|
||||
|
||||
if (!strcmp(eMTCconfig->mpdcch_startSF_CSS_RA_r13_val, "v1")) {
|
||||
RRC_CONFIGURATION_REQ(msg_p).radioresourceconfig_BR[cc_idx].mpdcch_startSF_CSS_RA_r13_val = 0;
|
||||
} else if (!strcmp(eMTCconfig->mpdcch_startSF_CSS_RA_r13_val, "v1dot5")) {
|
||||
@@ -832,8 +832,8 @@ void fill_eMTC_configuration(MessageDef *msg_p, ccparams_eMTC_t *eMTCconfig, in
|
||||
} else {
|
||||
RRC_CONFIGURATION_REQ(msg_p).radioresourceconfig_BR[cc_idx].prach_ConfigCommon_v1310 = FALSE;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
RRC_CONFIGURATION_REQ(msg_p).pdsch_maxNumRepetitionCEmodeA_r13[cc_idx] = CALLOC(1, sizeof(long));
|
||||
if (!strcmp(eMTCconfig->pdsch_maxNumRepetitionCEmodeA_r13, "r16")) {
|
||||
*RRC_CONFIGURATION_REQ(msg_p).pdsch_maxNumRepetitionCEmodeA_r13[cc_idx] = 0;
|
||||
@@ -844,8 +844,8 @@ void fill_eMTC_configuration(MessageDef *msg_p, ccparams_eMTC_t *eMTCconfig, in
|
||||
"Failed to parse eNB configuration file %s, pdsch_maxNumRepetitionCEmodeA_r13 unknown value!\n",
|
||||
config_fname);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
RRC_CONFIGURATION_REQ(msg_p).pusch_maxNumRepetitionCEmodeA_r13[cc_idx] = CALLOC(1, sizeof(long));
|
||||
if (!strcmp(eMTCconfig->pusch_maxNumRepetitionCEmodeA_r13, "r8")) {
|
||||
*RRC_CONFIGURATION_REQ(msg_p).pusch_maxNumRepetitionCEmodeA_r13[cc_idx] = 0;
|
||||
@@ -858,7 +858,7 @@ void fill_eMTC_configuration(MessageDef *msg_p, ccparams_eMTC_t *eMTCconfig, in
|
||||
"Failed to parse eNB configuration file %s, pusch_maxNumRepetitionCEmodeA_r13 unknown value!\n",
|
||||
config_fname);
|
||||
}
|
||||
|
||||
|
||||
char rachCELevelInfoListPath[MAX_OPTNAME_SIZE * 2];
|
||||
config_getlist(&rachcelevellist, NULL, 0, brparamspath);
|
||||
RRC_CONFIGURATION_REQ (msg_p).rach_CE_LevelInfoList_r13_size[cc_idx] = rachcelevellist.numelt;
|
||||
@@ -866,7 +866,7 @@ void fill_eMTC_configuration(MessageDef *msg_p, ccparams_eMTC_t *eMTCconfig, in
|
||||
for (rachCEInfoIndex = 0; rachCEInfoIndex < rachcelevellist.numelt; rachCEInfoIndex++) {
|
||||
sprintf(rachCELevelInfoListPath, "%s.%s.[%i]", brparamspath, ENB_CONFIG_STRING_RACH_CE_LEVELINFOLIST_R13, rachCEInfoIndex);
|
||||
config_get(rachcelevelParams, sizeof(rachcelevelParams) / sizeof(paramdef_t), rachCELevelInfoListPath);
|
||||
|
||||
|
||||
RRC_CONFIGURATION_REQ (msg_p).firstPreamble_r13[cc_idx][rachCEInfoIndex] = eMTCconfig->firstPreamble_r13;
|
||||
RRC_CONFIGURATION_REQ (msg_p).lastPreamble_r13[cc_idx][rachCEInfoIndex] = eMTCconfig->lastPreamble_r13;
|
||||
|
||||
@@ -899,7 +899,7 @@ void fill_eMTC_configuration(MessageDef *msg_p, ccparams_eMTC_t *eMTCconfig, in
|
||||
AssertFatal(1==0,
|
||||
"Illegal ra_ResponseWindowSize_r13 %d\n",eMTCconfig->ra_ResponseWindowSize_r13);
|
||||
}
|
||||
|
||||
|
||||
|
||||
switch(eMTCconfig->mac_ContentionResolutionTimer_r13) {
|
||||
case 80:
|
||||
@@ -932,36 +932,37 @@ void fill_eMTC_configuration(MessageDef *msg_p, ccparams_eMTC_t *eMTCconfig, in
|
||||
break;
|
||||
}
|
||||
RRC_CONFIGURATION_REQ (msg_p).rar_HoppingConfig_r13[cc_idx][rachCEInfoIndex] = eMTCconfig->rar_HoppingConfig_r13;
|
||||
|
||||
AssertFatal(eMTCconfig->rar_HoppingConfig_r13 == 0 || eMTCconfig->rar_HoppingConfig_r13 == 1,
|
||||
"illegal rar_HoppingConfig_r13 %d\n",eMTCconfig->rar_HoppingConfig_r13);
|
||||
"illegal rar_HoppingConfig_r13 %d\n",eMTCconfig->rar_HoppingConfig_r13);
|
||||
} // end for loop (rach ce level info)
|
||||
|
||||
|
||||
char rsrpRangeListPath[MAX_OPTNAME_SIZE * 2];
|
||||
config_getlist(&rsrprangelist, NULL, 0, brparamspath);
|
||||
RRC_CONFIGURATION_REQ (msg_p).rsrp_range_list_size[cc_idx] = rsrprangelist.numelt;
|
||||
|
||||
|
||||
|
||||
|
||||
int rsrprangeindex;
|
||||
for (rsrprangeindex = 0; rsrprangeindex < rsrprangelist.numelt; rsrprangeindex++) {
|
||||
sprintf(rsrpRangeListPath, "%s.%s.[%i]", brparamspath, ENB_CONFIG_STRING_RSRP_RANGE_LIST, rsrprangeindex);
|
||||
config_get(rsrprangeParams, sizeof(rsrprangeParams) / sizeof(paramdef_t), rsrpRangeListPath);
|
||||
RRC_CONFIGURATION_REQ (msg_p).rsrp_range[cc_idx][rsrprangeindex] = eMTCconfig->rsrp_range_br;
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
char prachparameterscePath[MAX_OPTNAME_SIZE * 2];
|
||||
config_getlist(&prachParamslist, NULL, 0, brparamspath);
|
||||
RRC_CONFIGURATION_REQ (msg_p).prach_parameters_list_size[cc_idx] = prachParamslist.numelt;
|
||||
|
||||
|
||||
int prachparamsindex;
|
||||
for (prachparamsindex = 0; prachparamsindex < prachParamslist.numelt; prachparamsindex++) {
|
||||
sprintf(prachparameterscePath, "%s.%s.[%i]", brparamspath, ENB_CONFIG_STRING_PRACH_PARAMETERS_CE_R13, prachparamsindex);
|
||||
config_get(prachParams, sizeof(prachParams) / sizeof(paramdef_t), prachparameterscePath);
|
||||
|
||||
|
||||
RRC_CONFIGURATION_REQ (msg_p).prach_config_index[cc_idx][prachparamsindex] = eMTCconfig->prach_config_index_br;
|
||||
RRC_CONFIGURATION_REQ (msg_p).prach_freq_offset[cc_idx][prachparamsindex] = eMTCconfig->prach_freq_offset_br;
|
||||
|
||||
|
||||
RRC_CONFIGURATION_REQ (msg_p).prach_StartingSubframe_r13[cc_idx][prachparamsindex] = calloc(1, sizeof(long));
|
||||
switch(eMTCconfig->prach_StartingSubframe_r13) {
|
||||
case 2:
|
||||
@@ -1000,9 +1001,9 @@ void fill_eMTC_configuration(MessageDef *msg_p, ccparams_eMTC_t *eMTCconfig, in
|
||||
AssertFatal(eMTCconfig->maxNumPreambleAttemptCE_r13 > 2 && eMTCconfig->maxNumPreambleAttemptCE_r13 <11,
|
||||
"prachparamsindex %d: Illegal maxNumPreambleAttemptCE_r13 %d\n",
|
||||
prachparamsindex,eMTCconfig->maxNumPreambleAttemptCE_r13);
|
||||
|
||||
|
||||
switch(eMTCconfig->numRepetitionPerPreambleAttempt_r13) {
|
||||
|
||||
switch(eMTCconfig->numRepetitionPerPreambleAttempt_r13) {
|
||||
case 1:
|
||||
RRC_CONFIGURATION_REQ (msg_p).numRepetitionPerPreambleAttempt_r13[cc_idx][prachparamsindex] = LTE_PRACH_ParametersCE_r13__numRepetitionPerPreambleAttempt_r13_n1;
|
||||
break;
|
||||
@@ -1067,15 +1068,15 @@ void fill_eMTC_configuration(MessageDef *msg_p, ccparams_eMTC_t *eMTCconfig, in
|
||||
eMTCconfig->mpdcch_NumRepetition_RA_r13);
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
RRC_CONFIGURATION_REQ (msg_p).prach_HoppingConfig_r13[cc_idx][prachparamsindex] = eMTCconfig->prach_HoppingConfig_r13;
|
||||
|
||||
|
||||
AssertFatal (eMTCconfig->prach_HoppingConfig_r13 >=0 && eMTCconfig->prach_HoppingConfig_r13 < 2,
|
||||
"Illegal prach_HoppingConfig_r13 %d\n",eMTCconfig->prach_HoppingConfig_r13);
|
||||
|
||||
|
||||
|
||||
|
||||
int maxavailablenarrowband_count = prachParams[7].numelt;
|
||||
|
||||
|
||||
RRC_CONFIGURATION_REQ (msg_p).max_available_narrow_band_size[cc_idx][prachparamsindex] = maxavailablenarrowband_count;
|
||||
int narrow_band_index;
|
||||
for (narrow_band_index = 0; narrow_band_index < maxavailablenarrowband_count; narrow_band_index++) {
|
||||
@@ -1086,26 +1087,27 @@ void fill_eMTC_configuration(MessageDef *msg_p, ccparams_eMTC_t *eMTCconfig, in
|
||||
char n1PUCCHInfoParamsPath[MAX_OPTNAME_SIZE * 2];
|
||||
config_getlist(&n1PUCCHInfoList, NULL, 0, brparamspath);
|
||||
RRC_CONFIGURATION_REQ (msg_p).pucch_info_value_size[cc_idx] = n1PUCCHInfoList.numelt;
|
||||
|
||||
|
||||
int n1PUCCHinfolistindex;
|
||||
for (n1PUCCHinfolistindex = 0; n1PUCCHinfolistindex < n1PUCCHInfoList.numelt; n1PUCCHinfolistindex++) {
|
||||
sprintf(n1PUCCHInfoParamsPath, "%s.%s.[%i]", brparamspath, ENB_CONFIG_STRING_N1PUCCH_AN_INFOLIST_R13, n1PUCCHinfolistindex);
|
||||
config_get(n1PUCCH_ANR13Params, sizeof(n1PUCCH_ANR13Params) / sizeof(paramdef_t), n1PUCCHInfoParamsPath);
|
||||
RRC_CONFIGURATION_REQ (msg_p).pucch_info_value[cc_idx][n1PUCCHinfolistindex] = eMTCconfig->pucch_info_value;
|
||||
}
|
||||
|
||||
|
||||
char PCCHConfigv1310Path[MAX_OPTNAME_SIZE*2 + 16];
|
||||
sprintf(PCCHConfigv1310Path, "%s.%s", brparamspath, ENB_CONFIG_STRING_PCCH_CONFIG_V1310);
|
||||
config_get(pcchv1310Params, sizeof(pcchv1310Params)/sizeof(paramdef_t), PCCHConfigv1310Path);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/** PCCH CONFIG V1310 */
|
||||
|
||||
RRC_CONFIGURATION_REQ(msg_p).pcch_config_v1310[cc_idx] = TRUE;
|
||||
RRC_CONFIGURATION_REQ(msg_p).paging_narrowbands_r13[cc_idx] = eMTCconfig->paging_narrowbands_r13;
|
||||
RRC_CONFIGURATION_REQ(msg_p).mpdcch_numrepetition_paging_r13[cc_idx] = eMTCconfig->mpdcch_numrepetition_paging_r13;
|
||||
AssertFatal (eMTCconfig->mpdcch_numrepetition_paging_r13 == 1 ||
|
||||
|
||||
AssertFatal (eMTCconfig->mpdcch_numrepetition_paging_r13 == 0 ||
|
||||
eMTCconfig->mpdcch_numrepetition_paging_r13 == 1 ||
|
||||
eMTCconfig->mpdcch_numrepetition_paging_r13 == 2 ||
|
||||
eMTCconfig->mpdcch_numrepetition_paging_r13 == 4 ||
|
||||
eMTCconfig->mpdcch_numrepetition_paging_r13 == 8 ||
|
||||
@@ -1116,8 +1118,7 @@ void fill_eMTC_configuration(MessageDef *msg_p, ccparams_eMTC_t *eMTCconfig, in
|
||||
eMTCconfig->mpdcch_numrepetition_paging_r13 == 256,
|
||||
"illegal mpdcch_numrepetition_paging_r13 %d\n",
|
||||
eMTCconfig->mpdcch_numrepetition_paging_r13);
|
||||
|
||||
|
||||
|
||||
// RRC_CONFIGURATION_REQ(msg_p).nb_v1310[cc_idx] = CALLOC(1, sizeof(long));
|
||||
// if (!strcmp(nb_v1310, "one64thT")) {
|
||||
// *RRC_CONFIGURATION_REQ(msg_p).nb_v1310[cc_idx] = 0;
|
||||
@@ -1130,9 +1131,9 @@ void fill_eMTC_configuration(MessageDef *msg_p, ccparams_eMTC_t *eMTCconfig, in
|
||||
// "Failed to parse eNB configuration file %s, nb_v1310, unknown value !\n",
|
||||
// config_fname);
|
||||
// }
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
RRC_CONFIGURATION_REQ (msg_p).pucch_NumRepetitionCE_Msg4_Level0_r13[cc_idx] = CALLOC(1, sizeof(long));
|
||||
// ++cnt; // check this ,, the conter is up above
|
||||
if (!strcmp(eMTCconfig->pucch_NumRepetitionCE_Msg4_Level0_r13, "n1")) {
|
||||
@@ -1148,21 +1149,21 @@ void fill_eMTC_configuration(MessageDef *msg_p, ccparams_eMTC_t *eMTCconfig, in
|
||||
"Failed to parse eNB configuration file %s, pucch_NumRepetitionCE_Msg4_Level0_r13 unknown value!\n",
|
||||
config_fname);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/** SIB2 FREQ HOPPING PARAMETERS R13 */
|
||||
RRC_CONFIGURATION_REQ(msg_p).sib2_freq_hoppingParameters_r13_exists[cc_idx] = TRUE;
|
||||
|
||||
|
||||
char sib2FreqHoppingParametersR13Path[MAX_OPTNAME_SIZE*2 + 16];
|
||||
sprintf(sib2FreqHoppingParametersR13Path, "%s.%s", brparamspath, ENB_CONFIG_STRING_SIB2_FREQ_HOPPINGPARAMETERS_R13);
|
||||
config_get(sib2freqhoppingParams, sizeof(sib2freqhoppingParams)/sizeof(paramdef_t), sib2FreqHoppingParametersR13Path);
|
||||
|
||||
|
||||
|
||||
|
||||
RRC_CONFIGURATION_REQ(msg_p).sib2_interval_ULHoppingConfigCommonModeA_r13[cc_idx] = CALLOC(1, sizeof(long));
|
||||
if (!strcmp(eMTCconfig->sib2_interval_ULHoppingConfigCommonModeA_r13, "FDD")) {
|
||||
*RRC_CONFIGURATION_REQ(msg_p).sib2_interval_ULHoppingConfigCommonModeA_r13[cc_idx] = 0;
|
||||
|
||||
|
||||
switch(eMTCconfig->sib2_interval_ULHoppingConfigCommonModeA_r13_val) {
|
||||
case 1:
|
||||
RRC_CONFIGURATION_REQ(msg_p).sib2_interval_ULHoppingConfigCommonModeA_r13_val[cc_idx] = 0;
|
||||
@@ -1207,4 +1208,4 @@ void fill_eMTC_configuration(MessageDef *msg_p, ccparams_eMTC_t *eMTCconfig, in
|
||||
"Failed to parse eNB configuration file %s, sib2_interval_ULHoppingConfigCommonModeA_r13 unknown value !!\n",
|
||||
config_fname);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+114
-15
@@ -101,6 +101,8 @@ typedef enum {
|
||||
#define CONFIG_STRING_RU_NBIOTRRC_LIST "NbIoT_RRC_instances"
|
||||
#define CONFIG_STRING_RU_SDR_ADDRS "sdr_addrs"
|
||||
#define CONFIG_STRING_RU_SDR_CLK_SRC "clock_src"
|
||||
#define CONFIG_STRING_RU_SF_EXTENSION "sf_extension"
|
||||
#define CONFIG_STRING_RU_END_OF_BURST_DELAY "end_of_burst_delay"
|
||||
|
||||
#define RU_LOCAL_IF_NAME_IDX 0
|
||||
#define RU_LOCAL_ADDRESS_IDX 1
|
||||
@@ -122,6 +124,8 @@ typedef enum {
|
||||
#define RU_NBIOTRRC_LIST_IDX 17
|
||||
#define RU_SDR_ADDRS 18
|
||||
#define RU_SDR_CLK_SRC 19
|
||||
#define RU_SF_EXTENSION_IDX 20
|
||||
#define RU_END_OF_BURST_DELAY_IDX 21
|
||||
|
||||
|
||||
|
||||
@@ -149,7 +153,9 @@ typedef enum {
|
||||
{CONFIG_STRING_RU_ATT_RX, NULL, 0, uptr:NULL, defintval:0, TYPE_UINT, 0}, \
|
||||
{CONFIG_STRING_RU_NBIOTRRC_LIST, NULL, 0, uptr:NULL, defintarrayval:DEFENBS, TYPE_INTARRAY, 1}, \
|
||||
{CONFIG_STRING_RU_SDR_ADDRS, NULL, 0, strptr:NULL, defstrval:"type=b200", TYPE_STRING, 0}, \
|
||||
{CONFIG_STRING_RU_SDR_CLK_SRC, NULL, 0, strptr:NULL, defstrval:"internal", TYPE_STRING, 0}, \
|
||||
{CONFIG_STRING_RU_SDR_CLK_SRC, NULL, 0, strptr:NULL, defstrval:"internal", TYPE_STRING, 0}, \
|
||||
{CONFIG_STRING_RU_SF_EXTENSION, NULL, 0, uptr:NULL, defuintval:312, TYPE_UINT, 0}, \
|
||||
{CONFIG_STRING_RU_END_OF_BURST_DELAY, NULL, 0, uptr:NULL, defuintval:400, TYPE_UINT, 0}, \
|
||||
}
|
||||
|
||||
/*---------------------------------------------------------------------------------------------------------------------------------------*/
|
||||
@@ -197,7 +203,7 @@ typedef enum {
|
||||
#define ENB_CONFIG_STRING_REMOTE_S_PORTC "remote_s_portc"
|
||||
#define ENB_CONFIG_STRING_LOCAL_S_PORTD "local_s_portd"
|
||||
#define ENB_CONFIG_STRING_REMOTE_S_PORTD "remote_s_portd"
|
||||
|
||||
#define ENB_CONFIG_STRING_NR_CELLID "nr_cellid"
|
||||
/*-----------------------------------------------------------------------------------------------------------------------------------------*/
|
||||
/* cell configuration parameters */
|
||||
/* optname helpstr paramflags XXXptr defXXXval type numelt */
|
||||
@@ -217,6 +223,7 @@ typedef enum {
|
||||
{ENB_CONFIG_STRING_REMOTE_S_PORTC, NULL, 0, uptr:NULL, defuintval:50000, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_LOCAL_S_PORTD, NULL, 0, uptr:NULL, defuintval:50001, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_REMOTE_S_PORTD, NULL, 0, uptr:NULL, defuintval:50001, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_NR_CELLID, NULL, 0, u64ptr:NULL, defint64val:0, TYPE_UINT64, 0}, \
|
||||
}
|
||||
#define ENB_ENB_ID_IDX 0
|
||||
#define ENB_CELL_TYPE_IDX 1
|
||||
@@ -232,6 +239,7 @@ typedef enum {
|
||||
#define ENB_REMOTE_S_PORTC_IDX 11
|
||||
#define ENB_LOCAL_S_PORTD_IDX 12
|
||||
#define ENB_REMOTE_S_PORTD_IDX 13
|
||||
#define ENB_NRCELLID_IDX 14
|
||||
|
||||
#define TRACKING_AREA_CODE_OKRANGE {0x0001,0xFFFD}
|
||||
#define ENBPARAMS_CHECK { \
|
||||
@@ -308,13 +316,12 @@ typedef enum {
|
||||
#define ENB_CONFIG_STRING_NB_V1310 "nb_v1310"
|
||||
|
||||
|
||||
#define ENB_CONFIG_STRING_PUCCH_NUM_REPETITION_CE_MSG4_LEVEL0 "pucch_NumRepetitionCE_Msg4_Level0_r13"
|
||||
#define ENB_CONFIG_STRING_PUCCH_NUM_REPETITION_CE_MSG4_LEVEL0 "pucch_NumRepetitionCE_Msg4_Level0_r13"
|
||||
#define ENB_CONFIG_STRING_PUCCH_NUM_REPETITION_CE_MSG4_LEVEL1 "pucch_NumRepetitionCE_Msg4_Level1_r13"
|
||||
#define ENB_CONFIG_STRING_PUCCH_NUM_REPETITION_CE_MSG4_LEVEL2 "pucch_NumRepetitionCE_Msg4_Level2_r13"
|
||||
#define ENB_CONFIG_STRING_PUCCH_NUM_REPETITION_CE_MSG4_LEVEL3 "pucch_NumRepetitionCE_Msg4_Level3_r13"
|
||||
|
||||
#define ENB_CONFIG_STRING_FREQ_HOPPING_PARAMETERS_R13 "sib2_freq_hoppingParameters_r13"
|
||||
|
||||
#define ENB_CONFIG_STRING_FREQ_HOPPING_PARAMETERS_R13 "sib2_freq_hoppingParameters_r13"
|
||||
|
||||
#define ENB_CONFIG_STRING_PDSCH_RS_EPRE "pdsch_referenceSignalPower"
|
||||
#define ENB_CONFIG_STRING_PDSCH_PB "pdsch_p_b"
|
||||
@@ -356,6 +363,14 @@ typedef enum {
|
||||
#define ENB_CONFIG_STRING_RACH_MAXHARQMSG3TX "rach_maxHARQ_Msg3Tx"
|
||||
#define ENB_CONFIG_STRING_PCCH_DEFAULT_PAGING_CYCLE "pcch_default_PagingCycle"
|
||||
#define ENB_CONFIG_STRING_PCCH_NB "pcch_nB"
|
||||
#define ENB_CONFIG_STRING_DRX_CONFIG_PRESENT "drx_Config_present"
|
||||
#define ENB_CONFIG_STRING_DRX_ONDURATIONTIMER "drx_onDurationTimer"
|
||||
#define ENB_CONFIG_STRING_DRX_INACTIVITYTIMER "drx_InactivityTimer"
|
||||
#define ENB_CONFIG_STRING_DRX_RETRANSMISSIONTIMER "drx_RetransmissionTimer"
|
||||
#define ENB_CONFIG_STRING_DRX_LONGDRX_CYCLESTARTOFFSET_PRESENT "drx_longDrx_CycleStartOffset_present"
|
||||
#define ENB_CONFIG_STRING_DRX_LONGDRX_CYCLESTARTOFFSET "drx_longDrx_CycleStartOffset"
|
||||
#define ENB_CONFIG_STRING_DRX_SHORTDRX_CYCLE "drx_shortDrx_Cycle"
|
||||
#define ENB_CONFIG_STRING_DRX_SHORTDRX_SHORTCYCLETIMER "drx_shortDrx_ShortCycleTimer"
|
||||
#define ENB_CONFIG_STRING_BCCH_MODIFICATIONPERIODCOEFF "bcch_modificationPeriodCoeff"
|
||||
#define ENB_CONFIG_STRING_UETIMERS_T300 "ue_TimersAndConstants_t300"
|
||||
#define ENB_CONFIG_STRING_UETIMERS_T301 "ue_TimersAndConstants_t301"
|
||||
@@ -377,7 +392,7 @@ typedef enum {
|
||||
#define ENB_CONFIG_STRING_PUSCH_MAX_NUM_REPETITION_CE_MODE_B_R13 "pusch_maxNumRepetitionCEmodeB_r13"
|
||||
#define ENB_CONFIG_STRING_PUSCH_HOPPING_OFFSET_V1310 "pusch_HoppingOffset_v1310"
|
||||
|
||||
|
||||
|
||||
//TTN - for D2D
|
||||
//SIB18
|
||||
#define ENB_CONFIG_STRING_RXPOOL_SC_CP_LEN "rxPool_sc_CP_Len"
|
||||
@@ -491,6 +506,14 @@ typedef struct ccparams_lte_s {
|
||||
int32_t rach_maxHARQ_Msg3Tx;
|
||||
int32_t pcch_defaultPagingCycle;
|
||||
char *pcch_nB;
|
||||
char *drx_Config_present;
|
||||
char *drx_onDurationTimer;
|
||||
char *drx_InactivityTimer;
|
||||
char *drx_RetransmissionTimer;
|
||||
char *drx_longDrx_CycleStartOffset_present;
|
||||
int32_t drx_longDrx_CycleStartOffset;
|
||||
char *drx_shortDrx_Cycle;
|
||||
int32_t drx_shortDrx_ShortCycleTimer;
|
||||
int32_t bcch_modificationPeriodCoeff;
|
||||
int32_t ue_TimersAndConstants_t300;
|
||||
int32_t ue_TimersAndConstants_t301;
|
||||
@@ -570,6 +593,14 @@ typedef struct ccparams_lte_s {
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s1a= { config_check_modify_integer, UETIMER_T300_OKVALUES, UETIMER_T300_MODVALUES,8}} , \
|
||||
{ .s1a= { config_check_modify_integer, UETIMER_T301_OKVALUES, UETIMER_T301_MODVALUES,8}} , \
|
||||
@@ -685,6 +716,14 @@ typedef struct ccparams_lte_s {
|
||||
{ENB_CONFIG_STRING_RACH_MAXHARQMSG3TX, NULL, 0, iptr:&ccparams.rach_maxHARQ_Msg3Tx, defintval:4, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_PCCH_DEFAULT_PAGING_CYCLE, NULL, 0, iptr:&ccparams.pcch_defaultPagingCycle, defintval:128, TYPE_INT, 0}, \
|
||||
{ENB_CONFIG_STRING_PCCH_NB, NULL, 0, strptr:&ccparams.pcch_nB, defstrval:"oneT", TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_DRX_CONFIG_PRESENT, NULL, 0, strptr:&ccparams.drx_Config_present, defstrval:"prNothing", TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_DRX_ONDURATIONTIMER, NULL, 0, strptr:&ccparams.drx_onDurationTimer, defstrval:"psf10", TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_DRX_INACTIVITYTIMER, NULL, 0, strptr:&ccparams.drx_InactivityTimer, defstrval:"psf10", TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_DRX_RETRANSMISSIONTIMER, NULL, 0, strptr:&ccparams.drx_RetransmissionTimer, defstrval:"psf8", TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_DRX_LONGDRX_CYCLESTARTOFFSET_PRESENT, NULL, 0, strptr:&ccparams.drx_longDrx_CycleStartOffset_present, defstrval:"prSf128", TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_DRX_LONGDRX_CYCLESTARTOFFSET, NULL, 0, iptr:&ccparams.drx_longDrx_CycleStartOffset, defintval:0, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_DRX_SHORTDRX_CYCLE, NULL, 0, strptr:&ccparams.drx_shortDrx_Cycle, defstrval:"sf32", TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_DRX_SHORTDRX_SHORTCYCLETIMER, NULL, 0, iptr:&ccparams.drx_shortDrx_ShortCycleTimer, defintval:3, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_BCCH_MODIFICATIONPERIODCOEFF, NULL, 0, iptr:&ccparams.bcch_modificationPeriodCoeff, defintval:2, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_UETIMERS_T300, NULL, 0, iptr:&ccparams.ue_TimersAndConstants_t300, defintval:1000, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_UETIMERS_T301, NULL, 0, iptr:&ccparams.ue_TimersAndConstants_t301, defintval:1000, TYPE_UINT, 0}, \
|
||||
@@ -759,15 +798,23 @@ typedef struct ccparams_lte_s {
|
||||
#define ENB_CONFIG_RACH_MAXHARQMSG3TX_IDX 57
|
||||
#define ENB_CONFIG_PCCH_DEFAULT_PAGING_CYCLE_IDX 58
|
||||
#define ENB_CONFIG_PCCH_NB_IDX 59
|
||||
#define ENB_CONFIG_BCCH_MODIFICATIONPERIODCOEFF_IDX 60
|
||||
#define ENB_CONFIG_UETIMERS_T300_IDX 61
|
||||
#define ENB_CONFIG_UETIMERS_T301_IDX 62
|
||||
#define ENB_CONFIG_UETIMERS_T310_IDX 63
|
||||
#define ENB_CONFIG_UETIMERS_T311_IDX 64
|
||||
#define ENB_CONFIG_UETIMERS_N310_IDX 65
|
||||
#define ENB_CONFIG_UETIMERS_N311_IDX 66
|
||||
#define ENB_CONFIG_UE_TRANSMISSION_MODE_IDX 67
|
||||
#define ENB_CONFIG_MBMS_DEDICATED_SERVING_CELL_IDX 68
|
||||
#define ENB_CONFIG_STRING_DRX_CONFIG_PRESENT_IDX 60
|
||||
#define ENB_CONFIG_STRING_DRX_ONDURATIONTIMER_IDX 61
|
||||
#define ENB_CONFIG_STRING_DRX_INACTIVITYTIMER_IDX 62
|
||||
#define ENB_CONFIG_STRING_DRX_RETRANSMISSIONTIMER_IDX 63
|
||||
#define ENB_CONFIG_STRING_DRX_LONGDRX_CYCLESTARTOFFSET_PRESENT_IDX 64
|
||||
#define ENB_CONFIG_STRING_DRX_LONGDRX_CYCLESTARTOFFSET_IDX 65
|
||||
#define ENB_CONFIG_STRING_DRX_SHORTDRX_CYCLE_IDX 66
|
||||
#define ENB_CONFIG_STRING_DRX_SHORTDRX_SHORTCYCLETIMER_IDX 67
|
||||
#define ENB_CONFIG_BCCH_MODIFICATIONPERIODCOEFF_IDX 68
|
||||
#define ENB_CONFIG_UETIMERS_T300_IDX 69
|
||||
#define ENB_CONFIG_UETIMERS_T301_IDX 70
|
||||
#define ENB_CONFIG_UETIMERS_T310_IDX 71
|
||||
#define ENB_CONFIG_UETIMERS_T311_IDX 72
|
||||
#define ENB_CONFIG_UETIMERS_N310_IDX 73
|
||||
#define ENB_CONFIG_UETIMERS_N311_IDX 74
|
||||
#define ENB_CONFIG_UE_TRANSMISSION_MODE_IDX 75
|
||||
#define ENB_CONFIG_MBMS_DEDICATED_SERVING_CELL_IDX 76
|
||||
|
||||
/*------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------*/
|
||||
/* SRB1 configuration parameters section name */
|
||||
@@ -964,6 +1011,58 @@ typedef struct srb1_params_s {
|
||||
{CONFIG_STRING_FLEXRAN_AWAIT_RECONF, NULL, 0, strptr:NULL, defstrval:"no", TYPE_STRING, 0} \
|
||||
}
|
||||
|
||||
/*----------------------------------------------------------------------------------------------------------------------------------------------------*/
|
||||
/*----------------------------------------------------------------------------------------------------------------------------------------------------*/
|
||||
/* CU/DU configuration section names*/
|
||||
#define CONFIG_STRING_DU_LIST "DU"
|
||||
#define CONFIG_STRING_CU_LIST "CU"
|
||||
#define DU_TYPE_LTE 0
|
||||
#define DU_TYPE_WIFI 1
|
||||
#define ENB_CONFIG_STRING_CU_INTERFACES_CONFIG "CU_INTERFACES"
|
||||
#define ENB_CONFIG_STRING_CU_INTERFACE_NAME_FOR_F1U "CU_INTERFACE_NAME_FOR_F1U"
|
||||
#define ENB_CONFIG_STRING_CU_IPV4_ADDRESS_FOR_F1U "CU_IPV4_ADDRESS_FOR_F1U"
|
||||
#define ENB_CONFIG_STRING_CU_PORT_FOR_F1U "CU_PORT_FOR_F1U"
|
||||
#define ENB_CONFIG_STRING_DU_TYPE "DU_TYPE"
|
||||
#define ENB_CONFIG_STRING_F1_U_CU_TRANSPORT_TYPE "F1_U_CU_TRANSPORT_TYPE"
|
||||
|
||||
#define ENB_CONFIG_STRING_DU_INTERFACES_CONFIG "DU_INTERFACES"
|
||||
#define ENB_CONFIG_STRING_DU_INTERFACE_NAME_FOR_F1U "DU_INTERFACE_NAME_FOR_F1U"
|
||||
#define ENB_CONFIG_STRING_DU_IPV4_ADDRESS_FOR_F1U "DU_IPV4_ADDRESS_FOR_F1U"
|
||||
#define ENB_CONFIG_STRING_DU_PORT_FOR_F1U "DU_PORT_FOR_F1U"
|
||||
#define ENB_CONFIG_STRING_F1_U_DU_TRANSPORT_TYPE "F1_U_DU_TRANSPORT_TYPE"
|
||||
|
||||
#define CONFIG_STRING_CU_BALANCING "CU_BALANCING"
|
||||
|
||||
#define CUPARAMS_DESC { \
|
||||
{ENB_CONFIG_STRING_CU_INTERFACE_NAME_FOR_F1U, NULL, 0, strptr:NULL, defstrval:"eth0", TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_CU_IPV4_ADDRESS_FOR_F1U, NULL, 0, strptr:NULL, defstrval:"127.0.0.1", TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_CU_PORT_FOR_F1U, NULL, 0, uptr:NULL, defintval:2210, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_F1_U_CU_TRANSPORT_TYPE, NULL, 0, strptr:NULL, defstrval:"TCP", TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_DU_TYPE, NULL, 0, strptr:NULL, defstrval:"LTE", TYPE_STRING, 0}, \
|
||||
}
|
||||
|
||||
#define DUPARAMS_DESC { \
|
||||
{ENB_CONFIG_STRING_DU_INTERFACE_NAME_FOR_F1U, NULL, 0, strptr:NULL, defstrval:"eth0", TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_DU_IPV4_ADDRESS_FOR_F1U, NULL, 0, strptr:NULL, defstrval:"127.0.0.1", TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_DU_PORT_FOR_F1U, NULL, 0, uptr:NULL, defintval:2210, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_F1_U_DU_TRANSPORT_TYPE, NULL, 0, strptr:NULL, defstrval:"TCP", TYPE_STRING, 0}, \
|
||||
}
|
||||
|
||||
#define CU_BAL_DESC { \
|
||||
{CONFIG_STRING_CU_BALANCING, NULL, 0, strptr:NULL, defstrval:"ALL", TYPE_STRING, 0}, \
|
||||
}
|
||||
|
||||
#define CU_INTERFACE_F1U 0
|
||||
#define CU_ADDRESS_F1U 1
|
||||
#define CU_PORT_F1U 2
|
||||
#define CU_TYPE_F1U 3
|
||||
|
||||
#define DU_INTERFACE_F1U 0
|
||||
#define DU_ADDRESS_F1U 1
|
||||
#define DU_PORT_F1U 2
|
||||
#define DU_TYPE_F1U 3
|
||||
#define DU_TECH 4
|
||||
|
||||
/*----------------------------------------------------------------------------------------------------------------------------------------------------*/
|
||||
/*----------------------------------------------------------------------------------------------------------------------------------------------------*/
|
||||
/* MACRLC configuration section names */
|
||||
|
||||
@@ -61,13 +61,16 @@
|
||||
#define ENB_CONFIG_STRING_PREAMBLE_TRANSMAX_CE_R13 "preamble_TransMax_ce_r13"
|
||||
#define ENB_CONFIG_STRING_PREAMBLE_TRANSMAX_CE_R13_VAL "preamble_TransMax_ce_r13_val"
|
||||
#define ENB_CONFIG_STRING_PDSCH_MAX_NUM_REPETITION_CE_MODE_A_R13 "pdsch_maxNumRepetitionCEmodeA_r13"
|
||||
#define ENB_CONFIG_STRING_PDSCH_MAX_NUM_REPETITION_CE_MODE_B_R13 "pdsch_maxNumRepetitionCEmodeB_r13"
|
||||
#define ENB_CONFIG_STRING_PUSCH_MAX_NUM_REPETITION_CE_MODE_A_R13 "pusch_maxNumRepetitionCEmodeA_r13"
|
||||
#define ENB_CONFIG_STRING_PUSCH_MAX_NUM_REPETITION_CE_MODE_B_R13 "pusch_maxNumRepetitionCEmodeB_r13"
|
||||
#define ENB_CONFIG_STRING_PUSCH_HOPPING_OFFSET_V1310 "pusch_HoppingOffset_v1310"
|
||||
#define ENB_CONFIG_STRING_SYSTEM_INFO_VALUE_TAG_LIST "system_info_value_tag_SI"
|
||||
#define ENB_CONFIG_STRING_FIRST_PREAMBLE_R13 "firstPreamble_r13"
|
||||
#define ENB_CONFIG_STRING_LAST_PREAMBLE_R13 "lastPreamble_r13"
|
||||
#define ENB_CONFIG_STRING_RA_RESPONSE_WINDOW_SIZE_R13 "ra_ResponseWindowSize_r13"
|
||||
#define ENB_CONFIG_STRING_MAC_CONTENTION_RESOLUTION_TIMER_R13 "mac_ContentionResolutionTimer_r13"
|
||||
#define ENB_CONFIG_STRING_RAR_HOPPING_CONFIG_R13 "rar_HoppingConfig_r13 "
|
||||
#define ENB_CONFIG_STRING_RAR_HOPPING_CONFIG_R13 "rar_HoppingConfig_r13"
|
||||
#define ENB_CONFIG_STRING_RACH_CE_LEVELINFOLIST_R13 "rach_CE_LevelInfoList_r13"
|
||||
#define ENB_CONFIG_STRING_PRACH_CONFIG_INDEX_BR "prach_config_index_br"
|
||||
#define ENB_CONFIG_STRING_PRACH_FREQ_OFFSET_BR "prach_freq_offset_br"
|
||||
@@ -81,6 +84,9 @@
|
||||
#define ENB_CONFIG_STRING_PUCCH_INFO_VALUE "pucch_info_value"
|
||||
#define ENB_CONFIG_STRING_N1PUCCH_AN_INFOLIST_R13 "n1PUCCH_AN_InfoList_r13"
|
||||
#define ENB_CONFIG_STRING_PCCH_CONFIG_V1310 "pcch_config_v1310"
|
||||
#define ENB_CONFIG_STRING_PAGING_NARROWBANDS_R13 "paging_narrowbands_r13"
|
||||
#define ENB_CONFIG_STRING_MPDCCH_NUMREPETITION_PAGING_R13 "mpdcch_numrepetition_paging_r13"
|
||||
#define ENB_CONFIG_STRING_NB_V1310 "nb_v1310"
|
||||
#define ENB_CONFIG_STRING_SIB2_FREQ_HOPPINGPARAMETERS_R13 "sib2_freq_hoppingParameters_r13"
|
||||
|
||||
typedef struct ccparams_eMTC_s {
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
*/
|
||||
|
||||
/*! \file openair2/ENB_APP/enb_paramdef_sidelink.h
|
||||
* \brief definition of configuration parameters for sidelink eNodeB modules
|
||||
* \brief definition of configuration parameters for sidelink eNodeB modules
|
||||
* \author Raymond KNOPP
|
||||
* \date 2018
|
||||
* \version 0.1
|
||||
@@ -180,4 +180,3 @@ typedef struct ccparams_sidelink_s {
|
||||
{ENB_CONFIG_STRING_DISCRXPOOLPS_RC_SFBITMAP_CHOICE_BS_ASN_BITS_UNUSED,NULL, 0, iptr:(int32_t *)&SLparams.discRxPoolPS_ResourceConfig_subframeBitmap_choice_bs_bits_unused, defintval:1, TYPE_UINT, 0} \
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
@@ -26,11 +26,12 @@
|
||||
* \version 0.1
|
||||
*/
|
||||
|
||||
#define _GNU_SOURCE
|
||||
#include "flexran_agent.h"
|
||||
|
||||
#include <pthread.h>
|
||||
#include <arpa/inet.h>
|
||||
|
||||
void *send_thread(void *args);
|
||||
void *receive_thread(void *args);
|
||||
pthread_t new_thread(void *(*f)(void *), void *b);
|
||||
Protocol__FlexranMessage *flexran_agent_timeout(void* args);
|
||||
@@ -110,10 +111,11 @@ void *receive_thread(void *args) {
|
||||
err_code_t err_code=0;
|
||||
|
||||
Protocol__FlexranMessage *msg;
|
||||
pthread_setname_np(pthread_self(), "flexran_rx_thr");
|
||||
|
||||
while (1) {
|
||||
|
||||
while (flexran_agent_msg_recv(d->mod_id, FLEXRAN_AGENT_DEFAULT, &data, &size, &priority) == 0) {
|
||||
while ((size = flexran_agent_msg_recv(d->mod_id, FLEXRAN_AGENT_DEFAULT, &data, &priority)) > 0) {
|
||||
|
||||
LOG_D(FLEXRAN_AGENT,"received message with size %d\n", size);
|
||||
|
||||
@@ -201,6 +203,11 @@ int flexran_agent_start(mid_t mod_id)
|
||||
/*Create the async channel info*/
|
||||
flexran_agent_async_channel_t *channel_info = flexran_agent_async_channel_info(mod_id, in_ip, in_port);
|
||||
|
||||
if (!channel_info) {
|
||||
LOG_E(FLEXRAN_AGENT, "could not create channel_info\n");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
/*Create a channel using the async channel info*/
|
||||
channel_id = flexran_agent_create_channel((void *) channel_info,
|
||||
flexran_agent_async_msg_send,
|
||||
@@ -209,12 +216,14 @@ int flexran_agent_start(mid_t mod_id)
|
||||
|
||||
|
||||
if (channel_id <= 0) {
|
||||
LOG_E(FLEXRAN_AGENT, "could not create channel\n");
|
||||
goto error;
|
||||
}
|
||||
|
||||
flexran_agent_channel_t *channel = get_channel(channel_id);
|
||||
|
||||
if (channel == NULL) {
|
||||
LOG_E(FLEXRAN_AGENT, "could not get channel for channel_id %d\n", channel_id);
|
||||
goto error;
|
||||
}
|
||||
|
||||
@@ -226,21 +235,48 @@ int flexran_agent_start(mid_t mod_id)
|
||||
*/
|
||||
|
||||
/*Initialize the continuous stats update mechanism*/
|
||||
flexran_agent_init_cont_stats_update(mod_id);
|
||||
|
||||
if (flexran_agent_init_cont_stats_update(mod_id) < 0) {
|
||||
LOG_E(FLEXRAN_AGENT, "could not initialize continuous stats updates\n");
|
||||
goto error;
|
||||
}
|
||||
|
||||
new_thread(receive_thread, flexran);
|
||||
|
||||
/*Initialize and register the mac xface. Must be modified later
|
||||
*for more flexibility in agent management */
|
||||
/* Register and initialize the control modules depending on capabilities.
|
||||
* After registering, calling flexran_agent_get_*_xface() tells whether a
|
||||
* control module is operational */
|
||||
uint16_t caps = flexran_get_capabilities_mask(mod_id);
|
||||
LOG_I(FLEXRAN_AGENT, "Agent handles BS ID %ld, capabilities=0x%x => handling%s%s%s%s%s%s%s%s\n",
|
||||
flexran_get_bs_id(mod_id), caps,
|
||||
FLEXRAN_CAP_LOPHY(caps) ? " LOPHY" : "",
|
||||
FLEXRAN_CAP_HIPHY(caps) ? " HIPHY" : "",
|
||||
FLEXRAN_CAP_LOMAC(caps) ? " LOMAC" : "",
|
||||
FLEXRAN_CAP_HIMAC(caps) ? " HIMAC" : "",
|
||||
FLEXRAN_CAP_RLC(caps) ? " RLC" : "",
|
||||
FLEXRAN_CAP_PDCP(caps) ? " PDCP" : "",
|
||||
FLEXRAN_CAP_SDAP(caps) ? " SDAP" : "",
|
||||
FLEXRAN_CAP_RRC(caps) ? " RRC" : "");
|
||||
|
||||
AGENT_MAC_xface *mac_agent_xface = (AGENT_MAC_xface *) malloc(sizeof(AGENT_MAC_xface));
|
||||
flexran_agent_register_mac_xface(mod_id, mac_agent_xface);
|
||||
|
||||
AGENT_RRC_xface *rrc_agent_xface = (AGENT_RRC_xface *) malloc(sizeof(AGENT_RRC_xface));
|
||||
flexran_agent_register_rrc_xface(mod_id, rrc_agent_xface);
|
||||
if (FLEXRAN_CAP_LOPHY(caps) || FLEXRAN_CAP_HIPHY(caps)) {
|
||||
flexran_agent_register_phy_xface(mod_id);
|
||||
LOG_I(FLEXRAN_AGENT, "registered PHY interface/CM for eNB %d\n", mod_id);
|
||||
}
|
||||
|
||||
AGENT_PDCP_xface *pdcp_agent_xface = (AGENT_PDCP_xface *) malloc(sizeof(AGENT_PDCP_xface));
|
||||
flexran_agent_register_pdcp_xface(mod_id, pdcp_agent_xface);
|
||||
if (FLEXRAN_CAP_LOMAC(caps) || FLEXRAN_CAP_HIMAC(caps)) {
|
||||
flexran_agent_register_mac_xface(mod_id);
|
||||
flexran_agent_init_mac_agent(mod_id);
|
||||
LOG_I(FLEXRAN_AGENT, "registered MAC interface/CM for eNB %d\n", mod_id);
|
||||
}
|
||||
|
||||
if (FLEXRAN_CAP_RRC(caps)) {
|
||||
flexran_agent_register_rrc_xface(mod_id);
|
||||
LOG_I(FLEXRAN_AGENT, "registered RRC interface/CM for eNB %d\n", mod_id);
|
||||
}
|
||||
|
||||
if (FLEXRAN_CAP_PDCP(caps)) {
|
||||
flexran_agent_register_pdcp_xface(mod_id);
|
||||
LOG_I(FLEXRAN_AGENT, "registered PDCP interface/CM for eNB %d\n", mod_id);
|
||||
}
|
||||
|
||||
/*
|
||||
* initilize a timer
|
||||
@@ -248,11 +284,6 @@ int flexran_agent_start(mid_t mod_id)
|
||||
|
||||
flexran_agent_init_timer();
|
||||
|
||||
/*
|
||||
* Initialize the mac agent
|
||||
*/
|
||||
flexran_agent_init_mac_agent(mod_id);
|
||||
|
||||
/*
|
||||
* start the enb agent task for tx and interaction with the underlying network function
|
||||
*/
|
||||
@@ -288,7 +319,7 @@ int flexran_agent_start(mid_t mod_id)
|
||||
return 0;
|
||||
|
||||
error:
|
||||
LOG_I(FLEXRAN_AGENT,"there was an error\n");
|
||||
LOG_E(FLEXRAN_AGENT, "%s(): there was an error\n", __func__);
|
||||
return 1;
|
||||
|
||||
}
|
||||
|
||||
@@ -36,6 +36,7 @@
|
||||
#include "flexran_agent_defs.h"
|
||||
#include "flexran_agent_net_comm.h"
|
||||
#include "flexran_agent_ran_api.h"
|
||||
#include "flexran_agent_phy.h"
|
||||
#include "flexran_agent_mac.h"
|
||||
#include "flexran_agent_rrc.h"
|
||||
#include "flexran_agent_pdcp.h"
|
||||
|
||||
@@ -36,13 +36,18 @@ flexran_agent_async_channel_t * flexran_agent_async_channel_info(mid_t mod_id, c
|
||||
flexran_agent_async_channel_t *channel;
|
||||
channel = (flexran_agent_async_channel_t *) malloc(sizeof(flexran_agent_channel_t));
|
||||
|
||||
if (channel == NULL)
|
||||
goto error;
|
||||
if (channel == NULL) {
|
||||
LOG_E(FLEXRAN_AGENT, "could not allocate memory for flexran_agent_async_channel_t\n");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
channel->enb_id = mod_id;
|
||||
/*Create a socket*/
|
||||
channel->link = new_link_client(dst_ip, dst_port);
|
||||
if (channel->link == NULL) goto error;
|
||||
if (channel->link == NULL) {
|
||||
LOG_E(FLEXRAN_AGENT, "could not create new link client\n");
|
||||
goto error;
|
||||
}
|
||||
|
||||
LOG_I(FLEXRAN_AGENT,"starting enb agent client for module id %d on ipv4 %s, port %d\n",
|
||||
channel->enb_id,
|
||||
@@ -53,21 +58,32 @@ flexran_agent_async_channel_t * flexran_agent_async_channel_info(mid_t mod_id, c
|
||||
* create a message queue
|
||||
*/
|
||||
// Set size of queues statically for now
|
||||
channel->send_queue = new_message_queue(500);
|
||||
if (channel->send_queue == NULL) goto error;
|
||||
channel->receive_queue = new_message_queue(500);
|
||||
if (channel->receive_queue == NULL) goto error;
|
||||
// channel->send_queue = new_message_queue(500);
|
||||
// not using the circular buffer: affects the PDCP split
|
||||
channel->send_queue = new_message_queue();
|
||||
if (channel->send_queue == NULL) {
|
||||
LOG_E(FLEXRAN_AGENT, "could not create send_queue\n");
|
||||
goto error;
|
||||
}
|
||||
// not using the circular buffer: affects the PDCP split
|
||||
//channel->receive_queue = new_message_queue(500);
|
||||
channel->receive_queue = new_message_queue();
|
||||
if (channel->receive_queue == NULL) {
|
||||
LOG_E(FLEXRAN_AGENT, "could not create send_queue\n");
|
||||
goto error;
|
||||
}
|
||||
|
||||
/*
|
||||
* create a link manager
|
||||
*/
|
||||
/* create a link manager */
|
||||
channel->manager = create_link_manager(channel->send_queue, channel->receive_queue, channel->link);
|
||||
if (channel->manager == NULL) goto error;
|
||||
if (channel->manager == NULL) {
|
||||
LOG_E(FLEXRAN_AGENT, "could not create link_manager\n");
|
||||
goto error;
|
||||
}
|
||||
|
||||
return channel;
|
||||
|
||||
error:
|
||||
LOG_I(FLEXRAN_AGENT,"there was an error\n");
|
||||
LOG_I(FLEXRAN_AGENT, "%s(): there was an error\n", __func__);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@@ -78,11 +94,11 @@ int flexran_agent_async_msg_send(void *data, int size, int priority, void *chann
|
||||
return message_put(channel->send_queue, data, size, priority);
|
||||
}
|
||||
|
||||
int flexran_agent_async_msg_recv(void **data, int *size, int *priority, void *channel_info) {
|
||||
int flexran_agent_async_msg_recv(void **data, int *priority, void *channel_info) {
|
||||
flexran_agent_async_channel_t *channel;
|
||||
channel = (flexran_agent_async_channel_t *)channel_info;
|
||||
|
||||
return message_get(channel->receive_queue, data, size, priority);
|
||||
return message_get(channel->receive_queue, data, priority);
|
||||
}
|
||||
|
||||
void flexran_agent_async_release(flexran_agent_channel_t *channel) {
|
||||
|
||||
@@ -46,7 +46,7 @@ flexran_agent_async_channel_t * flexran_agent_async_channel_info(mid_t mod_id, c
|
||||
int flexran_agent_async_msg_send(void *data, int size, int priority, void *channel_info);
|
||||
|
||||
/* Receive a message from a given channel */
|
||||
int flexran_agent_async_msg_recv(void **data, int *size, int *priority, void *channel_info);
|
||||
int flexran_agent_async_msg_recv(void **data, int *priority, void *channel_info);
|
||||
|
||||
/* Release a channel */
|
||||
void flexran_agent_async_release(flexran_agent_channel_t *channel);
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -154,6 +154,7 @@ int flexran_agent_handle_stats(mid_t mod_id, const void *params, Protocol__Flexr
|
||||
|
||||
/* Function to be used to handle reply message . */
|
||||
int flexran_agent_stats_reply(mid_t enb_id, xid_t xid, const report_config_t *report_config, Protocol__FlexranMessage **msg);
|
||||
int flexran_agent_destroy_stats_reply(Protocol__FlexranMessage *msg);
|
||||
|
||||
/* Top level Statistics request protocol message constructor and destructor */
|
||||
int flexran_agent_stats_request(mid_t mod_id, xid_t xid, const stats_request_config_t *report_config, Protocol__FlexranMessage **msg);
|
||||
@@ -161,8 +162,6 @@ int flexran_agent_destroy_stats_request(Protocol__FlexranMessage *msg);
|
||||
|
||||
err_code_t flexran_agent_init_cont_stats_update(mid_t mod_id);
|
||||
|
||||
void flexran_agent_send_update_stats(mid_t mod_id);
|
||||
|
||||
err_code_t flexran_agent_enable_cont_stats_update(mid_t mod_id, xid_t xid, stats_request_config_t *stats_req) ;
|
||||
err_code_t flexran_agent_disable_cont_stats_update(mid_t mod_id);
|
||||
|
||||
|
||||
@@ -159,7 +159,7 @@ int parse_enb_id(mid_t mod_id, yaml_parser_t *parser) {
|
||||
}
|
||||
// Check what key needs to be set
|
||||
// use eNB egistered
|
||||
if (mac_agent_registered[mod_id]) {
|
||||
if (flexran_agent_get_mac_xface(mod_id)) {
|
||||
LOG_I(ENB_APP, "Setting parameter for eNB %s\n", event.data.scalar.value);
|
||||
if (strcmp((char *) event.data.scalar.tag, YAML_INT_TAG) == 0) { // if int
|
||||
if ((strtol((char *) event.data.scalar.value, &endptr, 10))== mod_id ) { // enb_id == mod_id: right enb instance to be configured
|
||||
@@ -542,7 +542,7 @@ int apply_parameter_modification(void *parameter, yaml_parser_t *parser) {
|
||||
|
||||
void initiate_soft_restart(module_id_t mod_id, Protocol__FlexCellConfig *c)
|
||||
{
|
||||
uint8_t cc_id = c->has_cell_id ? c->cell_id : 0;
|
||||
const uint8_t cc_id = 0;
|
||||
if (c->has_eutra_band) {
|
||||
flexran_agent_set_operating_eutra_band(mod_id, cc_id, c->eutra_band);
|
||||
LOG_I(ENB_APP, "Setting eutra_band to %d\n", c->eutra_band);
|
||||
|
||||
@@ -138,14 +138,14 @@ typedef enum {
|
||||
FLEXRAN_AGENT_TIMER_STATE_MAX,
|
||||
} flexran_agent_timer_state_t;
|
||||
|
||||
#define FLEXRAN_CAP_LOPHY 1
|
||||
#define FLEXRAN_CAP_HIPHY 2
|
||||
#define FLEXRAN_CAP_LOMAC 4
|
||||
#define FLEXRAN_CAP_HIMAC 8
|
||||
#define FLEXRAN_CAP_RLC 16
|
||||
#define FLEXRAN_CAP_PDCP 32
|
||||
#define FLEXRAN_CAP_SDAP 64
|
||||
#define FLEXRAN_CAP_RRC 128
|
||||
#define FLEXRAN_CAP_LOPHY(cApS) (((cApS) & (1 << PROTOCOL__FLEX_BS_CAPABILITY__LOPHY)) > 0)
|
||||
#define FLEXRAN_CAP_HIPHY(cApS) (((cApS) & (1 << PROTOCOL__FLEX_BS_CAPABILITY__HIPHY)) > 0)
|
||||
#define FLEXRAN_CAP_LOMAC(cApS) (((cApS) & (1 << PROTOCOL__FLEX_BS_CAPABILITY__LOMAC)) > 0)
|
||||
#define FLEXRAN_CAP_HIMAC(cApS) (((cApS) & (1 << PROTOCOL__FLEX_BS_CAPABILITY__HIMAC)) > 0)
|
||||
#define FLEXRAN_CAP_RLC(cApS) (((cApS) & (1 << PROTOCOL__FLEX_BS_CAPABILITY__RLC)) > 0)
|
||||
#define FLEXRAN_CAP_PDCP(cApS) (((cApS) & (1 << PROTOCOL__FLEX_BS_CAPABILITY__PDCP)) > 0)
|
||||
#define FLEXRAN_CAP_SDAP(cApS) (((cApS) & (1 << PROTOCOL__FLEX_BS_CAPABILITY__SDAP)) > 0)
|
||||
#define FLEXRAN_CAP_RRC(cApS) (((cApS) & (1 << PROTOCOL__FLEX_BS_CAPABILITY__RRC)) > 0)
|
||||
|
||||
typedef enum {
|
||||
ENB_NORMAL_OPERATION = 0x0,
|
||||
@@ -162,8 +162,6 @@ typedef struct {
|
||||
char *cache_name;
|
||||
|
||||
mid_t mod_id;
|
||||
uint64_t agent_id;
|
||||
uint8_t capability_mask;
|
||||
|
||||
/* lock for waiting before starting or soft-restart */
|
||||
pthread_cond_t cond_node_ctrl;
|
||||
|
||||
@@ -31,27 +31,22 @@
|
||||
#define __FLEXRAN_AGENT_EXTERN_H__
|
||||
|
||||
#include "flexran_agent_defs.h"
|
||||
#include "flexran_agent_phy_defs.h"
|
||||
#include "flexran_agent_mac_defs.h"
|
||||
#include "flexran_agent_rrc_defs.h"
|
||||
#include "flexran_agent_pdcp_defs.h"
|
||||
|
||||
/* Control module interface for the communication of the PHY control module with the agent */
|
||||
AGENT_PHY_xface *flexran_agent_get_phy_xface(mid_t mod_id);
|
||||
|
||||
/* Control module interface for the communication of the MAC Control Module with the agent */
|
||||
extern AGENT_MAC_xface *agent_mac_xface[NUM_MAX_ENB];
|
||||
|
||||
/* Flag indicating whether the VSFs for the MAC control module have been registered */
|
||||
extern unsigned int mac_agent_registered[NUM_MAX_ENB];
|
||||
AGENT_MAC_xface *flexran_agent_get_mac_xface(mid_t mod_id);
|
||||
|
||||
/* Control module interface for the communication of the RRC Control Module with the agent */
|
||||
extern AGENT_RRC_xface *agent_rrc_xface[NUM_MAX_ENB];
|
||||
|
||||
/* Flag indicating whether the VSFs for the RRC control module have been registered */
|
||||
extern unsigned int rrc_agent_registered[NUM_MAX_ENB];
|
||||
AGENT_RRC_xface *flexran_agent_get_rrc_xface(mid_t mod_id);
|
||||
|
||||
/* Control module interface for the communication of the RRC Control Module with the agent */
|
||||
extern AGENT_PDCP_xface *agent_pdcp_xface[NUM_MAX_ENB];
|
||||
|
||||
/* Flag indicating whether the VSFs for the RRC control module have been registered */
|
||||
extern unsigned int pdcp_agent_registered[NUM_MAX_ENB];
|
||||
AGENT_PDCP_xface *flexran_agent_get_pdcp_xface(mid_t mod_id);
|
||||
|
||||
/* Requried to know which UEs had a harq updated over some subframe */
|
||||
extern int harq_pid_updated[NUM_MAX_UE][8];
|
||||
|
||||
@@ -63,7 +63,7 @@ flexran_agent_message_destruction_callback message_destruction_callback[] = {
|
||||
flexran_agent_destroy_echo_request,
|
||||
flexran_agent_destroy_echo_reply,
|
||||
flexran_agent_destroy_stats_request,
|
||||
flexran_agent_mac_destroy_stats_reply,
|
||||
flexran_agent_destroy_stats_reply,
|
||||
flexran_agent_mac_destroy_sf_trigger,
|
||||
flexran_agent_mac_destroy_sr_info,
|
||||
flexran_agent_destroy_enb_config_request,
|
||||
@@ -90,7 +90,8 @@ Protocol__FlexranMessage* flexran_agent_handle_message (mid_t mod_id,
|
||||
uint8_t *data,
|
||||
uint32_t size){
|
||||
|
||||
Protocol__FlexranMessage *decoded_message, *reply_message;
|
||||
Protocol__FlexranMessage *decoded_message = NULL;
|
||||
Protocol__FlexranMessage *reply_message = NULL;
|
||||
err_code_t err_code;
|
||||
DevAssert(data != NULL);
|
||||
|
||||
@@ -113,7 +114,7 @@ Protocol__FlexranMessage* flexran_agent_handle_message (mid_t mod_id,
|
||||
err_code = ((*agent_messages_callback[decoded_message->msg_case-1][decoded_message->msg_dir-1])(mod_id, (void *) decoded_message, &reply_message));
|
||||
if ( err_code < 0 ){
|
||||
goto error;
|
||||
} else if (err_code == 1) { //If err_code > 1, we do not want to dispose the message yet
|
||||
} else if (err_code == 0) { //If err_code > 1, we do not want to dispose the message yet
|
||||
protocol__flexran_message__free_unpacked(decoded_message, NULL);
|
||||
}
|
||||
return reply_message;
|
||||
@@ -204,13 +205,12 @@ int flexran_agent_handle_stats(mid_t mod_id, const void *params, Protocol__Flexr
|
||||
// TODO: Must resolve conflicts among stats requests
|
||||
|
||||
int i;
|
||||
err_code_t err_code;
|
||||
err_code_t err_code = 0;
|
||||
xid_t xid;
|
||||
uint32_t usec_interval, sec_interval;
|
||||
|
||||
//TODO: We do not deal with multiple CCs at the moment and eNB id is 0
|
||||
int enb_id = mod_id;
|
||||
int UE_id;
|
||||
|
||||
//eNB_MAC_INST *eNB = &eNB_mac_inst[enb_id];
|
||||
//UE_list_t *eNB_UE_list= &eNB->UE_list;
|
||||
@@ -242,91 +242,115 @@ int flexran_agent_handle_stats(mid_t mod_id, const void *params, Protocol__Flexr
|
||||
//Create a list of all eNB RNTIs and cells
|
||||
|
||||
//Set the number of UEs and create list with their RNTIs stats configs
|
||||
report_config.nr_ue = flexran_get_num_ues(mod_id); //eNB_UE_list->num_UEs
|
||||
report_config.ue_report_type = (ue_report_type_t *) malloc(sizeof(ue_report_type_t) * report_config.nr_ue);
|
||||
if (report_config.ue_report_type == NULL) {
|
||||
// TODO: Add appropriate error code
|
||||
err_code = -100;
|
||||
goto error;
|
||||
report_config.nr_ue = 0;
|
||||
if (flexran_agent_get_rrc_xface(mod_id))
|
||||
report_config.nr_ue = flexran_get_rrc_num_ues(mod_id);
|
||||
else if (flexran_agent_get_mac_xface(mod_id))
|
||||
report_config.nr_ue = flexran_get_mac_num_ues(mod_id);
|
||||
|
||||
if (flexran_agent_get_rrc_xface(mod_id) && flexran_agent_get_mac_xface(mod_id)
|
||||
&& flexran_get_rrc_num_ues(mod_id) != flexran_get_mac_num_ues(mod_id)) {
|
||||
const int nrrc = flexran_get_rrc_num_ues(mod_id);
|
||||
const int nmac = flexran_get_mac_num_ues(mod_id);
|
||||
report_config.nr_ue = nrrc < nmac ? nrrc : nmac;
|
||||
LOG_E(FLEXRAN_AGENT, "%s(): different numbers of UEs in RRC (%d) and MAC (%d), reporting for %d UEs\n",
|
||||
__func__, nrrc, nmac, report_config.nr_ue);
|
||||
}
|
||||
for (i = 0; i < report_config.nr_ue; i++) {
|
||||
UE_id = flexran_get_ue_id(mod_id, i);
|
||||
report_config.ue_report_type[i].ue_rnti = flexran_get_ue_crnti(enb_id, UE_id); //eNB_UE_list->eNB_UE_stats[UE_PCCID(enb_id,i)][i].crnti;
|
||||
report_config.ue_report_type[i].ue_report_flags = ue_flags;
|
||||
report_config.ue_report_type = malloc(sizeof(ue_report_type_t) * report_config.nr_ue);
|
||||
if (report_config.ue_report_type == NULL) {
|
||||
// TODO: Add appropriate error code
|
||||
err_code = -100;
|
||||
goto error;
|
||||
}
|
||||
if (flexran_agent_get_rrc_xface(mod_id)) {
|
||||
rnti_t rntis[report_config.nr_ue];
|
||||
flexran_get_rrc_rnti_list(mod_id, rntis, report_config.nr_ue);
|
||||
for (i = 0; i < report_config.nr_ue; i++) {
|
||||
report_config.ue_report_type[i].ue_rnti = rntis[i];
|
||||
report_config.ue_report_type[i].ue_report_flags = ue_flags;
|
||||
}
|
||||
}
|
||||
if (flexran_agent_get_mac_xface(mod_id) && !flexran_agent_get_rrc_xface(mod_id)) {
|
||||
for (i = 0; i < report_config.nr_ue; i++) {
|
||||
const int UE_id = flexran_get_mac_ue_id(mod_id, i);
|
||||
report_config.ue_report_type[i].ue_rnti = flexran_get_mac_ue_crnti(enb_id, UE_id);
|
||||
report_config.ue_report_type[i].ue_report_flags = ue_flags;
|
||||
}
|
||||
}
|
||||
//Set the number of CCs and create a list with the cell stats configs
|
||||
report_config.nr_cc = MAX_NUM_CCs;
|
||||
report_config.cc_report_type = (cc_report_type_t *) malloc(sizeof(cc_report_type_t) * report_config.nr_cc);
|
||||
report_config.cc_report_type = malloc(sizeof(cc_report_type_t) * report_config.nr_cc);
|
||||
if (report_config.cc_report_type == NULL) {
|
||||
// TODO: Add appropriate error code
|
||||
err_code = -100;
|
||||
goto error;
|
||||
// TODO: Add appropriate error code
|
||||
err_code = -100;
|
||||
goto error;
|
||||
}
|
||||
for (i = 0; i < report_config.nr_cc; i++) {
|
||||
//TODO: Must fill in the proper cell ids
|
||||
report_config.cc_report_type[i].cc_id = i;
|
||||
report_config.cc_report_type[i].cc_report_flags = c_flags;
|
||||
//TODO: Must fill in the proper cell ids
|
||||
report_config.cc_report_type[i].cc_id = i;
|
||||
report_config.cc_report_type[i].cc_report_flags = c_flags;
|
||||
}
|
||||
/* Check if request was periodical */
|
||||
if (comp_req->report_frequency == PROTOCOL__FLEX_STATS_REPORT_FREQ__FLSRF_PERIODICAL) {
|
||||
/* Create a one off flexran message as an argument for the periodical task */
|
||||
Protocol__FlexranMessage *timer_msg;
|
||||
stats_request_config_t request_config;
|
||||
request_config.report_type = PROTOCOL__FLEX_STATS_TYPE__FLST_COMPLETE_STATS;
|
||||
request_config.report_frequency = PROTOCOL__FLEX_STATS_REPORT_FREQ__FLSRF_ONCE;
|
||||
request_config.period = 0;
|
||||
/* Need to make sure that the ue flags are saved (Bug) */
|
||||
if (report_config.nr_ue == 0) {
|
||||
report_config.nr_ue = 1;
|
||||
report_config.ue_report_type = (ue_report_type_t *) malloc(sizeof(ue_report_type_t));
|
||||
if (report_config.ue_report_type == NULL) {
|
||||
// TODO: Add appropriate error code
|
||||
err_code = -100;
|
||||
goto error;
|
||||
}
|
||||
report_config.ue_report_type[0].ue_rnti = 0; // Dummy value
|
||||
report_config.ue_report_type[0].ue_report_flags = ue_flags;
|
||||
}
|
||||
request_config.config = &report_config;
|
||||
flexran_agent_stats_request(enb_id, xid, &request_config, &timer_msg);
|
||||
/* Create a timer */
|
||||
long timer_id = 0;
|
||||
flexran_agent_timer_args_t *timer_args;
|
||||
timer_args = malloc(sizeof(flexran_agent_timer_args_t));
|
||||
memset (timer_args, 0, sizeof(flexran_agent_timer_args_t));
|
||||
timer_args->mod_id = enb_id;
|
||||
timer_args->msg = timer_msg;
|
||||
/*Convert subframes to usec time*/
|
||||
usec_interval = 1000*comp_req->sf;
|
||||
sec_interval = 0;
|
||||
/*add seconds if required*/
|
||||
if (usec_interval >= 1000*1000) {
|
||||
sec_interval = usec_interval/(1000*1000);
|
||||
usec_interval = usec_interval%(1000*1000);
|
||||
}
|
||||
flexran_agent_create_timer(sec_interval, usec_interval, FLEXRAN_AGENT_DEFAULT, enb_id, FLEXRAN_AGENT_TIMER_TYPE_PERIODIC, xid, flexran_agent_handle_timed_task,(void*) timer_args, &timer_id);
|
||||
/* Create a one off flexran message as an argument for the periodical task */
|
||||
Protocol__FlexranMessage *timer_msg;
|
||||
stats_request_config_t request_config;
|
||||
request_config.report_type = PROTOCOL__FLEX_STATS_TYPE__FLST_COMPLETE_STATS;
|
||||
request_config.report_frequency = PROTOCOL__FLEX_STATS_REPORT_FREQ__FLSRF_ONCE;
|
||||
request_config.period = 0;
|
||||
/* Need to make sure that the ue flags are saved (Bug) */
|
||||
if (report_config.nr_ue == 0) {
|
||||
report_config.nr_ue = 1;
|
||||
report_config.ue_report_type = malloc(sizeof(ue_report_type_t));
|
||||
if (report_config.ue_report_type == NULL) {
|
||||
// TODO: Add appropriate error code
|
||||
err_code = -100;
|
||||
goto error;
|
||||
}
|
||||
report_config.ue_report_type[0].ue_rnti = 0; // Dummy value
|
||||
report_config.ue_report_type[0].ue_report_flags = ue_flags;
|
||||
}
|
||||
request_config.config = &report_config;
|
||||
flexran_agent_stats_request(enb_id, xid, &request_config, &timer_msg);
|
||||
/* Create a timer */
|
||||
long timer_id = 0;
|
||||
flexran_agent_timer_args_t *timer_args = malloc(sizeof(flexran_agent_timer_args_t));
|
||||
memset (timer_args, 0, sizeof(flexran_agent_timer_args_t));
|
||||
timer_args->mod_id = enb_id;
|
||||
timer_args->msg = timer_msg;
|
||||
/*Convert subframes to usec time*/
|
||||
usec_interval = 1000*comp_req->sf;
|
||||
sec_interval = 0;
|
||||
/*add seconds if required*/
|
||||
if (usec_interval >= 1000*1000) {
|
||||
sec_interval = usec_interval/(1000*1000);
|
||||
usec_interval = usec_interval%(1000*1000);
|
||||
}
|
||||
flexran_agent_create_timer(sec_interval, usec_interval, FLEXRAN_AGENT_DEFAULT,
|
||||
enb_id, FLEXRAN_AGENT_TIMER_TYPE_PERIODIC, xid,
|
||||
flexran_agent_handle_timed_task,(void*) timer_args, &timer_id);
|
||||
} else if (comp_req->report_frequency == PROTOCOL__FLEX_STATS_REPORT_FREQ__FLSRF_CONTINUOUS) {
|
||||
/*If request was for continuous updates, disable the previous configuration and
|
||||
set up a new one*/
|
||||
flexran_agent_disable_cont_stats_update(mod_id);
|
||||
stats_request_config_t request_config;
|
||||
request_config.report_type = PROTOCOL__FLEX_STATS_TYPE__FLST_COMPLETE_STATS;
|
||||
request_config.report_frequency = PROTOCOL__FLEX_STATS_REPORT_FREQ__FLSRF_ONCE;
|
||||
request_config.period = 0;
|
||||
/* Need to make sure that the ue flags are saved (Bug) */
|
||||
if (report_config.nr_ue == 0) {
|
||||
report_config.nr_ue = 1;
|
||||
report_config.ue_report_type = (ue_report_type_t *) malloc(sizeof(ue_report_type_t));
|
||||
if (report_config.ue_report_type == NULL) {
|
||||
// TODO: Add appropriate error code
|
||||
err_code = -100;
|
||||
goto error;
|
||||
}
|
||||
report_config.ue_report_type[0].ue_rnti = 0; // Dummy value
|
||||
report_config.ue_report_type[0].ue_report_flags = ue_flags;
|
||||
}
|
||||
request_config.config = &report_config;
|
||||
flexran_agent_enable_cont_stats_update(enb_id, xid, &request_config);
|
||||
/*If request was for continuous updates, disable the previous configuration and
|
||||
set up a new one*/
|
||||
flexran_agent_disable_cont_stats_update(mod_id);
|
||||
stats_request_config_t request_config;
|
||||
request_config.report_type = PROTOCOL__FLEX_STATS_TYPE__FLST_COMPLETE_STATS;
|
||||
request_config.report_frequency = PROTOCOL__FLEX_STATS_REPORT_FREQ__FLSRF_ONCE;
|
||||
request_config.period = 0;
|
||||
/* Need to make sure that the ue flags are saved (Bug) */
|
||||
if (report_config.nr_ue == 0) {
|
||||
report_config.nr_ue = 1;
|
||||
report_config.ue_report_type = malloc(sizeof(ue_report_type_t));
|
||||
if (report_config.ue_report_type == NULL) {
|
||||
// TODO: Add appropriate error code
|
||||
err_code = -100;
|
||||
goto error;
|
||||
}
|
||||
report_config.ue_report_type[0].ue_rnti = 0; // Dummy value
|
||||
report_config.ue_report_type[0].ue_report_flags = ue_flags;
|
||||
}
|
||||
request_config.config = &report_config;
|
||||
flexran_agent_enable_cont_stats_update(enb_id, xid, &request_config);
|
||||
}
|
||||
}
|
||||
break;
|
||||
@@ -336,14 +360,14 @@ int flexran_agent_handle_stats(mid_t mod_id, const void *params, Protocol__Flexr
|
||||
report_config.nr_ue = 0;
|
||||
report_config.ue_report_type = NULL;
|
||||
report_config.nr_cc = cell_req->n_cell;
|
||||
report_config.cc_report_type = (cc_report_type_t *) malloc(sizeof(cc_report_type_t) * report_config.nr_cc);
|
||||
report_config.cc_report_type = malloc(sizeof(cc_report_type_t) * report_config.nr_cc);
|
||||
if (report_config.cc_report_type == NULL) {
|
||||
// TODO: Add appropriate error code
|
||||
err_code = -100;
|
||||
goto error;
|
||||
}
|
||||
for (i = 0; i < report_config.nr_cc; i++) {
|
||||
//TODO: Must fill in the proper cell ids
|
||||
//TODO: Must fill in the proper cell ids
|
||||
report_config.cc_report_type[i].cc_id = cell_req->cell[i];
|
||||
report_config.cc_report_type[i].cc_report_flags = cell_req->flags;
|
||||
}
|
||||
@@ -354,14 +378,14 @@ int flexran_agent_handle_stats(mid_t mod_id, const void *params, Protocol__Flexr
|
||||
report_config.nr_cc = 0;
|
||||
report_config.cc_report_type = NULL;
|
||||
report_config.nr_ue = ue_req->n_rnti;
|
||||
report_config.ue_report_type = (ue_report_type_t *) malloc(sizeof(ue_report_type_t) * report_config.nr_ue);
|
||||
report_config.ue_report_type = malloc(sizeof(ue_report_type_t) * report_config.nr_ue);
|
||||
if (report_config.ue_report_type == NULL) {
|
||||
// TODO: Add appropriate error code
|
||||
err_code = -100;
|
||||
goto error;
|
||||
}
|
||||
for (i = 0; i < report_config.nr_ue; i++) {
|
||||
UE_id = flexran_get_ue_id(mod_id, i);
|
||||
const int UE_id = flexran_get_mac_ue_id(mod_id, i);
|
||||
report_config.ue_report_type[i].ue_rnti = ue_req->rnti[UE_id];
|
||||
report_config.ue_report_type[i].ue_report_flags = ue_req->flags;
|
||||
}
|
||||
@@ -372,18 +396,20 @@ int flexran_agent_handle_stats(mid_t mod_id, const void *params, Protocol__Flexr
|
||||
goto error;
|
||||
}
|
||||
|
||||
if (flexran_agent_stats_reply(enb_id, xid, &report_config, msg )){
|
||||
err_code = PROTOCOL__FLEXRAN_ERR__MSG_BUILD;
|
||||
goto error;
|
||||
}
|
||||
if (flexran_agent_stats_reply(enb_id, xid, &report_config, msg )) {
|
||||
err_code = PROTOCOL__FLEXRAN_ERR__MSG_BUILD;
|
||||
goto error;
|
||||
}
|
||||
|
||||
free(report_config.ue_report_type);
|
||||
free(report_config.cc_report_type);
|
||||
if (report_config.ue_report_type)
|
||||
free(report_config.ue_report_type);
|
||||
if (report_config.cc_report_type)
|
||||
free(report_config.cc_report_type);
|
||||
|
||||
return 0;
|
||||
|
||||
error :
|
||||
LOG_E(FLEXRAN_AGENT, "errno %d occured\n", err_code);
|
||||
LOG_E(FLEXRAN_AGENT, "%s(): errno %d occured\n", __func__, err_code);
|
||||
return err_code;
|
||||
}
|
||||
|
||||
@@ -429,8 +455,7 @@ int flexran_agent_stats_reply(mid_t enb_id, xid_t xid, const report_config_t *re
|
||||
protocol__flex_ue_stats_report__init(ue_report[i]);
|
||||
ue_report[i]->rnti = report_config->ue_report_type[i].ue_rnti;
|
||||
ue_report[i]->has_rnti = 1;
|
||||
ue_report[i]->flags = report_config->ue_report_type[i].ue_report_flags;
|
||||
ue_report[i]->has_flags = 1;
|
||||
ue_report[i]->has_flags = 1; /* actual flags are filled in the CMs below */
|
||||
|
||||
}
|
||||
|
||||
@@ -452,39 +477,30 @@ int flexran_agent_stats_reply(mid_t enb_id, xid_t xid, const report_config_t *re
|
||||
protocol__flex_cell_stats_report__init(cell_report[i]);
|
||||
cell_report[i]->carrier_index = report_config->cc_report_type[i].cc_id;
|
||||
cell_report[i]->has_carrier_index = 1;
|
||||
cell_report[i]->flags = report_config->cc_report_type[i].cc_report_flags;
|
||||
cell_report[i]->has_flags = 1;
|
||||
cell_report[i]->has_flags = 1; /* actual flags are filled in the CMs below */
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
MAC reply split
|
||||
*/
|
||||
/* MAC reply split */
|
||||
if (flexran_agent_get_mac_xface(enb_id)
|
||||
&& flexran_agent_mac_stats_reply(enb_id, report_config, ue_report, cell_report) < 0) {
|
||||
err_code = PROTOCOL__FLEXRAN_ERR__MSG_BUILD;
|
||||
goto error;
|
||||
}
|
||||
|
||||
/* RRC reply split */
|
||||
if (flexran_agent_get_rrc_xface(enb_id)
|
||||
&& flexran_agent_rrc_stats_reply(enb_id, report_config, ue_report, cell_report) < 0) {
|
||||
err_code = PROTOCOL__FLEXRAN_ERR__MSG_BUILD;
|
||||
goto error;
|
||||
}
|
||||
|
||||
if (flexran_agent_mac_stats_reply(enb_id, report_config, ue_report, cell_report) < 0 ) {
|
||||
err_code = PROTOCOL__FLEXRAN_ERR__MSG_BUILD;
|
||||
goto error;
|
||||
}
|
||||
|
||||
/*
|
||||
RRC reply split
|
||||
*/
|
||||
|
||||
if (flexran_agent_rrc_stats_reply(enb_id, report_config, ue_report, cell_report) < 0 ) {
|
||||
err_code = PROTOCOL__FLEXRAN_ERR__MSG_BUILD;
|
||||
goto error;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
PDCP reply split
|
||||
*/
|
||||
|
||||
if (flexran_agent_pdcp_stats_reply(enb_id, report_config, ue_report, cell_report) < 0 ) {
|
||||
err_code = PROTOCOL__FLEXRAN_ERR__MSG_BUILD;
|
||||
goto error;
|
||||
}
|
||||
/* PDCP reply split */
|
||||
if (flexran_agent_get_pdcp_xface(enb_id)
|
||||
&& flexran_agent_pdcp_stats_reply(enb_id, report_config, ue_report, cell_report) < 0) {
|
||||
err_code = PROTOCOL__FLEXRAN_ERR__MSG_BUILD;
|
||||
goto error;
|
||||
}
|
||||
|
||||
|
||||
stats_reply_msg->cell_report = cell_report;
|
||||
@@ -636,61 +652,26 @@ int flexran_agent_destroy_stats_request(Protocol__FlexranMessage *msg) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
/*
|
||||
Top Level Update
|
||||
*/
|
||||
|
||||
void flexran_agent_send_update_stats(mid_t mod_id) {
|
||||
|
||||
Protocol__FlexranMessage *current_report = NULL;
|
||||
void *data;
|
||||
int size;
|
||||
err_code_t err_code;
|
||||
int priority = 0;
|
||||
|
||||
if (pthread_mutex_lock(stats_context[mod_id].mutex)) {
|
||||
goto error;
|
||||
int flexran_agent_destroy_stats_reply(Protocol__FlexranMessage *msg)
|
||||
{
|
||||
if (msg->msg_case != PROTOCOL__FLEXRAN_MESSAGE__MSG_STATS_REPLY_MSG) {
|
||||
LOG_E(FLEXRAN_AGENT, "%s(): message is not a msg_stats_reply\n", __func__);
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (stats_context[mod_id].cont_update == 1) {
|
||||
|
||||
/*Create a fresh report with the required flags*/
|
||||
err_code = flexran_agent_handle_stats(mod_id, (void *) stats_context[mod_id].stats_req, ¤t_report);
|
||||
if (err_code < 0) {
|
||||
goto error;
|
||||
}
|
||||
}
|
||||
/* /\*TODO:Check if a previous reports exists and if yes, generate a report */
|
||||
/* *that is the diff between the old and the new report, */
|
||||
/* *respecting the thresholds. Otherwise send the new report*\/ */
|
||||
/* if (stats_context[mod_id].prev_stats_reply != NULL) { */
|
||||
|
||||
/* msg = flexran_agent_generate_diff_mac_stats_report(current_report, stats_context[mod_id].prev_stats_reply); */
|
||||
|
||||
/* /\*Destroy the old stats*\/ */
|
||||
/* flexran_agent_destroy_flexran_message(stats_context[mod_id].prev_stats_reply); */
|
||||
/* } */
|
||||
/* /\*Use the current report for future comparissons*\/ */
|
||||
/* stats_context[mod_id].prev_stats_reply = current_report; */
|
||||
|
||||
|
||||
if (pthread_mutex_unlock(stats_context[mod_id].mutex)) {
|
||||
goto error;
|
||||
}
|
||||
|
||||
if (current_report != NULL){
|
||||
data=flexran_agent_pack_message(current_report, &size);
|
||||
/*Send any stats updates using the MAC channel of the eNB*/
|
||||
if (flexran_agent_msg_send(mod_id, FLEXRAN_AGENT_MAC, data, size, priority)) {
|
||||
err_code = PROTOCOL__FLEXRAN_ERR__MSG_ENQUEUING;
|
||||
goto error;
|
||||
}
|
||||
|
||||
LOG_D(FLEXRAN_AGENT,"sent message with size %d\n", size);
|
||||
return;
|
||||
}
|
||||
error:
|
||||
LOG_D(FLEXRAN_AGENT, "Could not send sf trigger message\n");
|
||||
flexran_agent_mac_destroy_stats_reply(msg->stats_reply_msg);
|
||||
flexran_agent_rrc_destroy_stats_reply(msg->stats_reply_msg);
|
||||
flexran_agent_pdcp_destroy_stats_reply(msg->stats_reply_msg);
|
||||
for (int i = 0; i < msg->stats_reply_msg->n_cell_report; ++i)
|
||||
free(msg->stats_reply_msg->cell_report[i]);
|
||||
for (int i = 0; i < msg->stats_reply_msg->n_ue_report; ++i)
|
||||
free(msg->stats_reply_msg->ue_report[i]);
|
||||
free(msg->stats_reply_msg->cell_report);
|
||||
free(msg->stats_reply_msg->ue_report);
|
||||
free(msg->stats_reply_msg->header);
|
||||
free(msg->stats_reply_msg);
|
||||
free(msg);
|
||||
return 0;
|
||||
}
|
||||
|
||||
err_code_t flexran_agent_disable_cont_stats_update(mid_t mod_id) {
|
||||
@@ -755,7 +736,7 @@ err_code_t flexran_agent_init_cont_stats_update(mid_t mod_id) {
|
||||
stats_context[mod_id].mutex = calloc(1, sizeof(pthread_mutex_t));
|
||||
if (stats_context[mod_id].mutex == NULL)
|
||||
goto error;
|
||||
if (pthread_mutex_init(stats_context[mod_id].mutex, NULL))
|
||||
if (pthread_mutex_init(stats_context[mod_id].mutex, NULL) != 0)
|
||||
goto error;
|
||||
|
||||
return 0;
|
||||
@@ -772,6 +753,5 @@ err_code_t flexran_agent_destroy_cont_stats_update(mid_t mod_id) {
|
||||
flexran_agent_destroy_flexran_message(stats_context[mod_id].prev_stats_reply);
|
||||
free(stats_context[mod_id].mutex);
|
||||
|
||||
// mac_agent_registered[mod_id] = 0;
|
||||
return 1;
|
||||
}
|
||||
|
||||
@@ -53,7 +53,7 @@ int flexran_agent_msg_send(mid_t mod_id, agent_id_t agent_id, void *data, int si
|
||||
return -1;
|
||||
}
|
||||
|
||||
int flexran_agent_msg_recv(mid_t mod_id, agent_id_t agent_id, void **data, int *size, int *priority) {
|
||||
int flexran_agent_msg_recv(mid_t mod_id, agent_id_t agent_id, void **data, int *priority) {
|
||||
/*Check if agent id is valid*/
|
||||
if (agent_id >= FLEXRAN_AGENT_MAX || agent_id < 0) {
|
||||
goto error;
|
||||
@@ -66,7 +66,7 @@ int flexran_agent_msg_recv(mid_t mod_id, agent_id_t agent_id, void **data, int *
|
||||
goto error;
|
||||
}
|
||||
|
||||
return channel->msg_recv(data, size, priority, channel->channel_info);
|
||||
return channel->msg_recv(data, priority, channel->channel_info);
|
||||
|
||||
error:
|
||||
LOG_E(FLEXRAN_AGENT, "No channel registered for agent with id %d\n", agent_id);
|
||||
@@ -104,7 +104,7 @@ void flexran_agent_unregister_channel(mid_t mod_id, agent_id_t agent_id) {
|
||||
|
||||
int flexran_agent_create_channel(void *channel_info,
|
||||
int (*msg_send)(void *data, int size, int priority, void *channel_info),
|
||||
int (*msg_recv)(void **data, int *size, int *priority, void *channel_info),
|
||||
int (*msg_recv)(void **data, int *priority, void *channel_info),
|
||||
void (*release)(flexran_agent_channel_t *channel)) {
|
||||
|
||||
int channel_id = ++flexran_agent_channel_id;
|
||||
|
||||
@@ -39,7 +39,7 @@ int channel_id;
|
||||
void *channel_info;
|
||||
/*Callbacks for channel message Tx and Rx*/
|
||||
int (*msg_send)(void *data, int size, int priority, void *channel_info);
|
||||
int (*msg_recv)(void **data, int *size, int *priority, void *channel_info);
|
||||
int (*msg_recv)(void **data, int *priority, void *channel_info);
|
||||
void (*release)(struct flexran_agent_channel_s *channel);
|
||||
} flexran_agent_channel_t;
|
||||
|
||||
@@ -49,7 +49,7 @@ typedef struct flexran_agent_channel_instance_s{
|
||||
|
||||
/*Send and receive messages using the channel registered for a specific agent*/
|
||||
int flexran_agent_msg_send(mid_t mod_id, agent_id_t agent_id, void *data, int size, int priority);
|
||||
int flexran_agent_msg_recv(mid_t mod_id, agent_id_t agent_id, void **data, int *size, int *priority);
|
||||
int flexran_agent_msg_recv(mid_t mod_id, agent_id_t agent_id, void **data, int *priority);
|
||||
|
||||
/*Register a channel to an agent. Use FLEXRAN_AGENT_MAX to register the
|
||||
*same channel to all agents*/
|
||||
@@ -61,7 +61,7 @@ void flexran_agent_unregister_channel(mid_t mod_id, agent_id_t agent_id);
|
||||
/*Create a new channel. Returns the id of the new channel or negative number otherwise*/
|
||||
int flexran_agent_create_channel(void *channel_info,
|
||||
int (*msg_send)(void *data, int size, int priority, void *channel_info),
|
||||
int (*msg_recv)(void **data, int *size, int *priority, void *channel_info),
|
||||
int (*msg_recv)(void **data, int *priority, void *channel_info),
|
||||
void (*release)(flexran_agent_channel_t *channel));
|
||||
|
||||
/*Unregister a channel from all agents and destroy it. Returns 0 in case of success*/
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -70,15 +70,21 @@ uint16_t flexran_get_sfn_sf(mid_t mod_id);
|
||||
rest for frame */
|
||||
uint16_t flexran_get_future_sfn_sf(mid_t mod_id, int ahead_of_time);
|
||||
|
||||
/* Return the number of attached UEs */
|
||||
int flexran_get_num_ues(mid_t mod_id);
|
||||
/* Return the number of attached UEs for the MAC */
|
||||
int flexran_get_mac_num_ues(mid_t mod_id);
|
||||
|
||||
/* Get the number of logical channels per UE. This function does not consider
|
||||
* dedicated bearers yet */
|
||||
int flexran_get_num_ue_lcs(mid_t mod_id, mid_t ue_id);
|
||||
|
||||
/* Get the rnti of a UE with id ue_id from MAC */
|
||||
rnti_t flexran_get_mac_ue_crnti(mid_t mod_id, mid_t ue_id);
|
||||
|
||||
int flexran_get_mac_ue_id_rnti(mid_t mod_id, rnti_t rnti);
|
||||
|
||||
/* Return the UE id of attached UE as opposed to the index [0,NUM UEs] (i.e.,
|
||||
* the i'th active UE). Returns 0 if the i'th active UE could not be found. */
|
||||
int flexran_get_ue_id(mid_t mod_id, int i);
|
||||
|
||||
/* Get the rnti of a UE with id ue_id */
|
||||
rnti_t flexran_get_ue_crnti(mid_t mod_id, mid_t ue_id);
|
||||
int flexran_get_mac_ue_id(mid_t mod_id, int i);
|
||||
|
||||
/* Get the RLC buffer status report in bytes of a ue for a designated
|
||||
* logical channel id */
|
||||
@@ -210,10 +216,10 @@ uint8_t flexran_get_prach_FreqOffset(mid_t mod_id, uint8_t cc_id);
|
||||
uint8_t flexran_get_maxHARQ_Msg3Tx(mid_t mod_id, uint8_t cc_id);
|
||||
|
||||
/* Get the length of the UL cyclic prefix */
|
||||
lte_prefix_type_t flexran_get_ul_cyclic_prefix_length(mid_t mod_id, uint8_t cc_id);
|
||||
Protocol__FlexUlCyclicPrefixLength flexran_get_ul_cyclic_prefix_length(mid_t mod_id, uint8_t cc_id);
|
||||
|
||||
/* Get the length of the DL cyclic prefix */
|
||||
lte_prefix_type_t flexran_get_dl_cyclic_prefix_length(mid_t mod_id, uint8_t cc_id);
|
||||
Protocol__FlexDlCyclicPrefixLength flexran_get_dl_cyclic_prefix_length(mid_t mod_id, uint8_t cc_id);
|
||||
|
||||
/* Get the physical cell id of a cell */
|
||||
uint16_t flexran_get_cell_id(mid_t mod_id, uint8_t cc_id);
|
||||
@@ -287,34 +293,44 @@ int flexran_update_p0_pucch(mid_t mod_id, mid_t ue_id, uint8_t cc_id);
|
||||
|
||||
uint8_t flexran_get_threequarter_fs(mid_t mod_id, uint8_t cc_id);
|
||||
|
||||
PUSCH_HOPPING_t flexran_get_hopping_mode(mid_t mod_id, uint8_t cc_id);
|
||||
Protocol__FlexHoppingMode flexran_get_hopping_mode(mid_t mod_id, uint8_t cc_id);
|
||||
|
||||
uint8_t flexran_get_hopping_offset(mid_t mod_id, uint8_t cc_id);
|
||||
|
||||
uint8_t flexran_get_n_SB(mid_t mod_id, uint8_t cc_id);
|
||||
|
||||
int flexran_get_phich_resource(mid_t mod_id, uint8_t cc_id);
|
||||
Protocol__FlexPhichResource flexran_get_phich_resource(mid_t mod_id, uint8_t cc_id);
|
||||
|
||||
uint8_t flexran_get_enable64QAM(mid_t mod_id, uint8_t cc_id);
|
||||
Protocol__FlexQam flexran_get_enable64QAM(mid_t mod_id, uint8_t cc_id);
|
||||
|
||||
PHICH_DURATION_t flexran_get_phich_duration(mid_t mod_id, uint8_t cc_id);
|
||||
Protocol__FlexPhichDuration flexran_get_phich_duration(mid_t mod_id, uint8_t cc_id);
|
||||
|
||||
/*
|
||||
* ************************************
|
||||
* Get Messages for UE Configuration Reply
|
||||
* ************************************
|
||||
*/
|
||||
/* Get the number of attached UEs for the RRC */
|
||||
int flexran_get_rrc_num_ues(mid_t mod_id);
|
||||
|
||||
/* Get the RNTI of UE at index 'index' in RRC list */
|
||||
rnti_t flexran_get_rrc_rnti_nth_ue(mid_t mod_id, int index);
|
||||
|
||||
/* Get the list of RNTIs of up to max_list entries. When max_list >=
|
||||
* flexran_get_rrc_num_ues(), gets a list of all UEs registered in the RRC. UE
|
||||
* RNTIs are saved in list, returns number of saved RNTIs */
|
||||
int flexran_get_rrc_rnti_list(mid_t mod_id, rnti_t *list, int max_list);
|
||||
|
||||
/* Get timer in subframes. Controls the synchronization
|
||||
status of the UE, not the actual timing
|
||||
advance procedure. See TS 36.321 */
|
||||
LTE_TimeAlignmentTimer_t flexran_get_time_alignment_timer(mid_t mod_id, mid_t ue_id);
|
||||
LTE_TimeAlignmentTimer_t flexran_get_time_alignment_timer(mid_t mod_id, rnti_t rnti);
|
||||
|
||||
/* Get measurement gap configuration. See TS 36.133 */
|
||||
Protocol__FlexMeasGapConfigPattern flexran_get_meas_gap_config(mid_t mod_id, mid_t ue_id);
|
||||
Protocol__FlexMeasGapConfigPattern flexran_get_meas_gap_config(mid_t mod_id, rnti_t rnti);
|
||||
|
||||
/* Get measurement gap configuration offset if applicable */
|
||||
long flexran_get_meas_gap_config_offset(mid_t mod_id, mid_t ue_id);
|
||||
long flexran_get_meas_gap_config_offset(mid_t mod_id, rnti_t rnti);
|
||||
|
||||
/* DL aggregated bit-rate of non-gbr bearer
|
||||
per UE. See TS 36.413 */
|
||||
@@ -325,62 +341,62 @@ uint64_t flexran_get_ue_aggregated_max_bitrate_dl(mid_t mod_id, mid_t ue_id);
|
||||
uint64_t flexran_get_ue_aggregated_max_bitrate_ul(mid_t mod_id, mid_t ue_id);
|
||||
|
||||
/* Only half-duplex support. FDD operation. Boolean value */
|
||||
int flexran_get_half_duplex(mid_t mod_id, mid_t ue_id);
|
||||
int flexran_get_half_duplex(mid_t mod_id, rnti_t rnti);
|
||||
|
||||
/* Support of intra-subframe hopping. Boolean value */
|
||||
int flexran_get_intra_sf_hopping(mid_t mod_id, mid_t ue_id);
|
||||
int flexran_get_intra_sf_hopping(mid_t mod_id, rnti_t rnti);
|
||||
|
||||
/* UE support for type 2 hopping with n_sb>1 */
|
||||
int flexran_get_type2_sb_1(mid_t mod_id, mid_t ue_id);
|
||||
int flexran_get_type2_sb_1(mid_t mod_id, rnti_t rnti);
|
||||
|
||||
/* Get the UE category */
|
||||
long flexran_get_ue_category(mid_t mod_id, mid_t ue_id);
|
||||
long flexran_get_ue_category(mid_t mod_id, rnti_t rnti);
|
||||
|
||||
/* UE support for resource allocation type 1 */
|
||||
int flexran_get_res_alloc_type1(mid_t mod_id, mid_t ue_id);
|
||||
int flexran_get_res_alloc_type1(mid_t mod_id, rnti_t rnti);
|
||||
|
||||
/* Get UE transmission mode */
|
||||
long flexran_get_ue_transmission_mode(mid_t mod_id, mid_t ue_id);
|
||||
long flexran_get_ue_transmission_mode(mid_t mod_id, rnti_t rnti);
|
||||
|
||||
/* Boolean value. See TS 36.321 */
|
||||
BOOLEAN_t flexran_get_tti_bundling(mid_t mod_id, mid_t ue_id);
|
||||
BOOLEAN_t flexran_get_tti_bundling(mid_t mod_id, rnti_t rnti);
|
||||
|
||||
/* The max HARQ retransmission for UL.
|
||||
See TS 36.321 */
|
||||
long flexran_get_maxHARQ_TX(mid_t mod_id, mid_t ue_id);
|
||||
long flexran_get_maxHARQ_TX(mid_t mod_id, rnti_t rnti);
|
||||
|
||||
/* See TS 36.213 */
|
||||
long flexran_get_beta_offset_ack_index(mid_t mod_id, mid_t ue_id);
|
||||
long flexran_get_beta_offset_ack_index(mid_t mod_id, rnti_t rnti);
|
||||
|
||||
/* See TS 36.213 */
|
||||
long flexran_get_beta_offset_ri_index(mid_t mod_id, mid_t ue_id);
|
||||
long flexran_get_beta_offset_ri_index(mid_t mod_id, rnti_t rnti);
|
||||
|
||||
/* See TS 36.213 */
|
||||
long flexran_get_beta_offset_cqi_index(mid_t mod_id, mid_t ue_id);
|
||||
long flexran_get_beta_offset_cqi_index(mid_t mod_id, rnti_t rnti);
|
||||
|
||||
/* Boolean. See TS36.213, Section 10.1 */
|
||||
BOOLEAN_t flexran_get_simultaneous_ack_nack_cqi(mid_t mod_id, mid_t ue_id);
|
||||
BOOLEAN_t flexran_get_simultaneous_ack_nack_cqi(mid_t mod_id, rnti_t rnti);
|
||||
|
||||
/* Boolean. See TS 36.213, Section 8.2 */
|
||||
BOOLEAN_t flexran_get_ack_nack_simultaneous_trans(mid_t mod_id, mid_t ue_id, uint8_t cc_id);
|
||||
BOOLEAN_t flexran_get_ack_nack_simultaneous_trans(mid_t mod_id, uint8_t cc_id);
|
||||
|
||||
/* Get aperiodic CQI report mode */
|
||||
LTE_CQI_ReportModeAperiodic_t flexran_get_aperiodic_cqi_rep_mode(mid_t mod_id,mid_t ue_id);
|
||||
Protocol__FlexAperiodicCqiReportMode flexran_get_aperiodic_cqi_rep_mode(mid_t mod_id, rnti_t rnti);
|
||||
|
||||
/* Get ACK/NACK feedback mode. TDD only */
|
||||
long flexran_get_tdd_ack_nack_feedback_mode(mid_t mod_id, mid_t ue_id);
|
||||
long flexran_get_tdd_ack_nack_feedback_mode(mid_t mod_id, rnti_t rnti);
|
||||
|
||||
/* See TS36.213, section 10.1 */
|
||||
long flexran_get_ack_nack_repetition_factor(mid_t mod_id, mid_t ue_id);
|
||||
long flexran_get_ack_nack_repetition_factor(mid_t mod_id, rnti_t rnti);
|
||||
|
||||
/* Boolean. Extended buffer status report size */
|
||||
long flexran_get_extended_bsr_size(mid_t mod_id, mid_t ue_id);
|
||||
long flexran_get_extended_bsr_size(mid_t mod_id, rnti_t rnti);
|
||||
|
||||
/* Get number of UE transmission antennas */
|
||||
int flexran_get_ue_transmission_antenna(mid_t mod_id, mid_t ue_id);
|
||||
int flexran_get_ue_transmission_antenna(mid_t mod_id, rnti_t rnti);
|
||||
|
||||
/* Get the IMSI of UE */
|
||||
uint64_t flexran_get_ue_imsi(mid_t mod_id, mid_t ue_id);
|
||||
uint64_t flexran_get_ue_imsi(mid_t mod_id, rnti_t rnti);
|
||||
|
||||
/* Get logical channel group of a channel with id lc_id */
|
||||
long flexran_get_lcg(mid_t mod_id, mid_t ue_id, mid_t lc_id);
|
||||
@@ -419,96 +435,110 @@ void flexran_agent_set_operating_bandwidth(mid_t mod_id, uint8_t cc_id, uint8_t
|
||||
void flexran_agent_set_operating_frame_type(mid_t mod_id, uint8_t cc_id, lte_frame_type_t frame_type);
|
||||
|
||||
/*RRC status flexRAN*/
|
||||
uint8_t flexran_get_rrc_status(mid_t mod_id, mid_t ue_id);
|
||||
uint8_t flexran_get_rrc_status(mid_t mod_id, rnti_t rnti);
|
||||
|
||||
|
||||
/***************************** PDCP ***********************/
|
||||
/* PDCP uid obtained through the RNTI */
|
||||
uint16_t flexran_get_pdcp_uid_from_rnti(mid_t mod_id, rnti_t rnti);
|
||||
|
||||
/*PDCP superframe numberflexRAN*/
|
||||
uint32_t flexran_get_pdcp_sfn(mid_t mod_id);
|
||||
|
||||
/*PDCP pdcp tx stats window*/
|
||||
void flexran_set_pdcp_tx_stat_window(mid_t mod_id, mid_t ue_id, uint16_t obs_window);
|
||||
void flexran_set_pdcp_tx_stat_window(mid_t mod_id, uint16_t uid, uint16_t obs_window);
|
||||
|
||||
/*PDCP pdcp rx stats window*/
|
||||
void flexran_set_pdcp_rx_stat_window(mid_t mod_id, mid_t ue_id, uint16_t obs_window);
|
||||
void flexran_set_pdcp_rx_stat_window(mid_t mod_id, uint16_t uid, uint16_t obs_window);
|
||||
|
||||
/*PDCP num tx pdu status flexRAN*/
|
||||
uint32_t flexran_get_pdcp_tx(mid_t mod_id, mid_t ue_id, lcid_t lcid);
|
||||
uint32_t flexran_get_pdcp_tx(mid_t mod_id, uint16_t uid, lcid_t lcid);
|
||||
|
||||
/*PDCP num tx bytes status flexRAN*/
|
||||
uint32_t flexran_get_pdcp_tx_bytes(mid_t mod_id, mid_t ue_id, lcid_t lcid);
|
||||
uint32_t flexran_get_pdcp_tx_bytes(mid_t mod_id, uint16_t uid, lcid_t lcid);
|
||||
|
||||
/*PDCP number of transmit packet / second status flexRAN*/
|
||||
uint32_t flexran_get_pdcp_tx_w(mid_t mod_id, mid_t ue_id, lcid_t lcid);
|
||||
uint32_t flexran_get_pdcp_tx_w(mid_t mod_id, uint16_t uid, lcid_t lcid);
|
||||
|
||||
/*PDCP pdcp tx bytes in a given window flexRAN*/
|
||||
uint32_t flexran_get_pdcp_tx_bytes_w(mid_t mod_id, mid_t ue_id, lcid_t lcid);
|
||||
uint32_t flexran_get_pdcp_tx_bytes_w(mid_t mod_id, uint16_t uid, lcid_t lcid);
|
||||
|
||||
/*PDCP tx sequence number flexRAN*/
|
||||
uint32_t flexran_get_pdcp_tx_sn(mid_t mod_id, mid_t ue_id, lcid_t lcid);
|
||||
uint32_t flexran_get_pdcp_tx_sn(mid_t mod_id, uint16_t uid, lcid_t lcid);
|
||||
|
||||
/*PDCP tx aggregated packet arrival flexRAN*/
|
||||
uint32_t flexran_get_pdcp_tx_aiat(mid_t mod_id, mid_t ue_id, lcid_t lcid);
|
||||
uint32_t flexran_get_pdcp_tx_aiat(mid_t mod_id, uint16_t uid, lcid_t lcid);
|
||||
|
||||
/*PDCP tx aggregated packet arrival per second flexRAN*/
|
||||
uint32_t flexran_get_pdcp_tx_aiat_w(mid_t mod_id, mid_t ue_id, lcid_t lcid);
|
||||
uint32_t flexran_get_pdcp_tx_aiat_w(mid_t mod_id, uint16_t uid, lcid_t lcid);
|
||||
|
||||
|
||||
/*PDCP num rx pdu status flexRAN*/
|
||||
uint32_t flexran_get_pdcp_rx(mid_t mod_id, mid_t ue_id, lcid_t lcid);
|
||||
uint32_t flexran_get_pdcp_rx(mid_t mod_id, uint16_t uid, lcid_t lcid);
|
||||
|
||||
/*PDCP num rx bytes status flexRAN*/
|
||||
uint32_t flexran_get_pdcp_rx_bytes(mid_t mod_id, mid_t ue_id, lcid_t lcid);
|
||||
uint32_t flexran_get_pdcp_rx_bytes(mid_t mod_id, uint16_t uid, lcid_t lcid);
|
||||
|
||||
/*PDCP number of received packet / second flexRAN*/
|
||||
uint32_t flexran_get_pdcp_rx_w(mid_t mod_id, mid_t ue_id, lcid_t lcid);
|
||||
uint32_t flexran_get_pdcp_rx_w(mid_t mod_id, uint16_t uid, lcid_t lcid);
|
||||
|
||||
/*PDCP gootput (bit/s) status flexRAN*/
|
||||
uint32_t flexran_get_pdcp_rx_bytes_w(mid_t mod_id, mid_t ue_id, lcid_t lcid);
|
||||
uint32_t flexran_get_pdcp_rx_bytes_w(mid_t mod_id, uint16_t uid, lcid_t lcid);
|
||||
|
||||
/*PDCP rx sequence number flexRAN*/
|
||||
uint32_t flexran_get_pdcp_rx_sn(mid_t mod_id, mid_t ue_id, lcid_t lcid);
|
||||
uint32_t flexran_get_pdcp_rx_sn(mid_t mod_id, uint16_t uid, lcid_t lcid);
|
||||
|
||||
/*PDCP rx aggregated packet arrival flexRAN*/
|
||||
uint32_t flexran_get_pdcp_rx_aiat(mid_t mod_id, mid_t ue_id, lcid_t lcid);
|
||||
uint32_t flexran_get_pdcp_rx_aiat(mid_t mod_id, uint16_t uid, lcid_t lcid);
|
||||
|
||||
/*PDCP rx aggregated packet arrival per second flexRAN*/
|
||||
uint32_t flexran_get_pdcp_rx_aiat_w(mid_t mod_id, mid_t ue_id, lcid_t lcid);
|
||||
uint32_t flexran_get_pdcp_rx_aiat_w(mid_t mod_id, uint16_t uid, lcid_t lcid);
|
||||
|
||||
/*PDCP num of received outoforder pdu status flexRAN*/
|
||||
uint32_t flexran_get_pdcp_rx_oo(mid_t mod_id, mid_t ue_id, lcid_t lcid);
|
||||
uint32_t flexran_get_pdcp_rx_oo(mid_t mod_id, uint16_t uid, lcid_t lcid);
|
||||
|
||||
/*********************RRC**********************/
|
||||
/*Get primary cell measuremeant id flexRAN*/
|
||||
LTE_MeasId_t flexran_get_rrc_pcell_measid(mid_t mod_id, mid_t ue_id);
|
||||
LTE_MeasId_t flexran_get_rrc_pcell_measid(mid_t mod_id, rnti_t rnti);
|
||||
|
||||
/*Get primary cell RSRP measurement flexRAN*/
|
||||
float flexran_get_rrc_pcell_rsrp(mid_t mod_id, mid_t ue_id);
|
||||
float flexran_get_rrc_pcell_rsrp(mid_t mod_id, rnti_t rnti);
|
||||
|
||||
/*Get primary cell RSRQ measurement flexRAN*/
|
||||
float flexran_get_rrc_pcell_rsrq(mid_t mod_id, mid_t ue_id);
|
||||
float flexran_get_rrc_pcell_rsrq(mid_t mod_id, rnti_t rnti);
|
||||
|
||||
/* Get RRC neighbouring measurement */
|
||||
int flexran_get_rrc_num_ncell(mid_t mod_id, mid_t ue_id);
|
||||
int flexran_get_rrc_num_ncell(mid_t mod_id, rnti_t rnti);
|
||||
|
||||
/*Get physical cell id*/
|
||||
LTE_PhysCellId_t flexran_get_rrc_neigh_phy_cell_id(mid_t mod_id, mid_t ue_id, int cell_id);
|
||||
/* Get physical cell id */
|
||||
long flexran_get_rrc_neigh_phy_cell_id(mid_t mod_id, rnti_t rnti, long cell_id);
|
||||
|
||||
/*Get RSRP of neighbouring Cell*/
|
||||
float flexran_get_rrc_neigh_rsrp(mid_t mod_id, mid_t ue_id, int cell_id);
|
||||
/* Get RSRP of neighbouring Cell */
|
||||
float flexran_get_rrc_neigh_rsrp(mid_t mod_id, rnti_t rnti, long cell_id);
|
||||
|
||||
/*Get RSRQ of neighbouring Cell*/
|
||||
float flexran_get_rrc_neigh_rsrq(mid_t mod_id, mid_t ue_id, int cell_id);
|
||||
/* Get RSRQ of neighbouring Cell */
|
||||
float flexran_get_rrc_neigh_rsrq(mid_t mod_id, rnti_t rnti, long cell_id);
|
||||
|
||||
/*Get MCC PLMN identity neighbouring Cell*/
|
||||
/* currently not implemented
|
||||
int flexran_get_rrc_neigh_plmn_mcc(mid_t mod_id, mid_t ue_id, int cell_id); */
|
||||
int flexran_get_rrc_neigh_plmn_mcc(mid_t mod_id, rnti_t rnti, int cell_id); */
|
||||
|
||||
/*Get MNC PLMN identity neighbouring Cell*/
|
||||
/* currently not implemented
|
||||
int flexran_get_rrc_neigh_plmn_mnc(mid_t mod_id, mid_t ue_id, int cell_id); */
|
||||
|
||||
/* Get number of PLMNs that is broadcasted in SIB1 */
|
||||
uint8_t flexran_get_rrc_num_plmn_ids(mid_t mod_id);
|
||||
|
||||
/* Get index'th MCC broadcasted in SIB1 */
|
||||
uint16_t flexran_get_rrc_mcc(mid_t mod_id, uint8_t index);
|
||||
|
||||
/* Get index'th MNC broadcasted in SIB1 */
|
||||
uint16_t flexran_get_rrc_mnc(mid_t mod_id, uint8_t index);
|
||||
|
||||
/* Get index'th MNC's digit length broadcasted in SIB1 */
|
||||
uint8_t flexran_get_rrc_mnc_digit_length(mid_t mod_id, uint8_t index);
|
||||
|
||||
/************************** Slice configuration **************************/
|
||||
|
||||
/* Get the DL slice ID for a UE */
|
||||
@@ -660,3 +690,16 @@ void flexran_set_ul_slice_maxmcs(mid_t mod_id, int slice_idx, int maxmcs);
|
||||
char *flexran_get_ul_slice_scheduler(mid_t mod_id, int slice_idx);
|
||||
/* Set the scheduler name for a slice in UL */
|
||||
int flexran_set_ul_slice_scheduler(mid_t mod_id, int slice_idx, char *name);
|
||||
|
||||
/********************* general information *****************/
|
||||
/* get an ID for this BS (or part of a BS) */
|
||||
uint64_t flexran_get_bs_id(mid_t mod_id);
|
||||
|
||||
/* get the capabilities supported by the underlying network function,
|
||||
* returns the number and stores list of this length in caps. If there are zero
|
||||
* capabilities, *caps will be NULL */
|
||||
size_t flexran_get_capabilities(mid_t mod_id, Protocol__FlexBsCapability **caps);
|
||||
|
||||
/* get the capabilities supported by the underlying network function as a bit
|
||||
* mask. */
|
||||
uint16_t flexran_get_capabilities_mask(mid_t mod_id);
|
||||
|
||||
@@ -17,10 +17,10 @@
|
||||
*-------------------------------------------------------------------------------
|
||||
* For more information about the OpenAirInterface (OAI) Software Alliance:
|
||||
* contact@openairinterface.org
|
||||
*/
|
||||
*/
|
||||
|
||||
/*! \file flexran_agent_timer.c
|
||||
* \brief FlexRAN Timer
|
||||
* \brief FlexRAN Timer
|
||||
* \author shahab SHARIAT BAGHERI
|
||||
* \date 2017
|
||||
* \version 0.1
|
||||
@@ -35,23 +35,23 @@
|
||||
//struct flexran_agent_map agent_map;
|
||||
flexran_agent_timer_instance_t timer_instance;
|
||||
int agent_timer_init = 0;
|
||||
err_code_t flexran_agent_init_timer(void){
|
||||
|
||||
err_code_t flexran_agent_init_timer(void) {
|
||||
LOG_I(FLEXRAN_AGENT, "init RB tree\n");
|
||||
|
||||
if (!agent_timer_init) {
|
||||
RB_INIT(&timer_instance.flexran_agent_head);
|
||||
agent_timer_init = 1;
|
||||
}
|
||||
|
||||
return PROTOCOL__FLEXRAN_ERR__NO_ERR;
|
||||
|
||||
return PROTOCOL__FLEXRAN_ERR__NO_ERR;
|
||||
}
|
||||
|
||||
RB_GENERATE(flexran_agent_map, flexran_agent_timer_element_s, entry, flexran_agent_compare_timer);
|
||||
|
||||
/* The timer_id might not be the best choice for the comparison */
|
||||
int flexran_agent_compare_timer(struct flexran_agent_timer_element_s *a, struct flexran_agent_timer_element_s *b){
|
||||
|
||||
int flexran_agent_compare_timer(struct flexran_agent_timer_element_s *a, struct flexran_agent_timer_element_s *b) {
|
||||
if (a->timer_id < b->timer_id) return -1;
|
||||
|
||||
if (a->timer_id > b->timer_id) return 1;
|
||||
|
||||
// equal timers
|
||||
@@ -59,52 +59,53 @@ int flexran_agent_compare_timer(struct flexran_agent_timer_element_s *a, struct
|
||||
}
|
||||
|
||||
err_code_t flexran_agent_create_timer(uint32_t interval_sec,
|
||||
uint32_t interval_usec,
|
||||
agent_id_t agent_id,
|
||||
instance_t instance,
|
||||
uint32_t timer_type,
|
||||
xid_t xid,
|
||||
flexran_agent_timer_callback_t cb,
|
||||
void* timer_args,
|
||||
long *timer_id){
|
||||
|
||||
uint32_t interval_usec,
|
||||
agent_id_t agent_id,
|
||||
instance_t instance,
|
||||
uint32_t timer_type,
|
||||
xid_t xid,
|
||||
flexran_agent_timer_callback_t cb,
|
||||
void *timer_args,
|
||||
long *timer_id) {
|
||||
struct flexran_agent_timer_element_s *e = calloc(1, sizeof(*e));
|
||||
DevAssert(e != NULL);
|
||||
|
||||
//uint32_t timer_id;
|
||||
//uint32_t timer_id;
|
||||
int ret=-1;
|
||||
|
||||
if ((interval_sec == 0) && (interval_usec == 0 ))
|
||||
|
||||
if ((interval_sec == 0) && (interval_usec == 0 )) {
|
||||
free(e);
|
||||
return TIMER_NULL;
|
||||
|
||||
if (timer_type >= FLEXRAN_AGENT_TIMER_TYPE_MAX)
|
||||
return TIMER_TYPE_INVALIDE;
|
||||
|
||||
if (timer_type == FLEXRAN_AGENT_TIMER_TYPE_ONESHOT){
|
||||
ret = timer_setup(interval_sec,
|
||||
interval_usec,
|
||||
TASK_FLEXRAN_AGENT,
|
||||
instance,
|
||||
TIMER_ONE_SHOT,
|
||||
timer_args,
|
||||
timer_id);
|
||||
|
||||
e->type = TIMER_ONE_SHOT;
|
||||
}
|
||||
else if (timer_type == FLEXRAN_AGENT_TIMER_TYPE_PERIODIC ){
|
||||
ret = timer_setup(interval_sec,
|
||||
interval_usec,
|
||||
TASK_FLEXRAN_AGENT,
|
||||
instance,
|
||||
TIMER_PERIODIC,
|
||||
timer_args,
|
||||
timer_id);
|
||||
|
||||
|
||||
if (timer_type >= FLEXRAN_AGENT_TIMER_TYPE_MAX) {
|
||||
free(e);
|
||||
return TIMER_TYPE_INVALIDE;
|
||||
}
|
||||
|
||||
if (timer_type == FLEXRAN_AGENT_TIMER_TYPE_ONESHOT) {
|
||||
ret = timer_setup(interval_sec,
|
||||
interval_usec,
|
||||
TASK_FLEXRAN_AGENT,
|
||||
instance,
|
||||
TIMER_ONE_SHOT,
|
||||
timer_args,
|
||||
timer_id);
|
||||
|
||||
e->type = TIMER_ONE_SHOT;
|
||||
} else if (timer_type == FLEXRAN_AGENT_TIMER_TYPE_PERIODIC ) {
|
||||
ret = timer_setup(interval_sec,
|
||||
interval_usec,
|
||||
TASK_FLEXRAN_AGENT,
|
||||
instance,
|
||||
TIMER_PERIODIC,
|
||||
timer_args,
|
||||
timer_id);
|
||||
e->type = TIMER_PERIODIC;
|
||||
}
|
||||
|
||||
|
||||
if (ret < 0 ) {
|
||||
return TIMER_SETUP_FAILED;
|
||||
free(e);
|
||||
return TIMER_SETUP_FAILED;
|
||||
}
|
||||
|
||||
e->agent_id = agent_id;
|
||||
@@ -112,19 +113,16 @@ err_code_t flexran_agent_create_timer(uint32_t interval_sec,
|
||||
e->state = FLEXRAN_AGENT_TIMER_STATE_ACTIVE;
|
||||
e->timer_id = *timer_id;
|
||||
e->xid = xid;
|
||||
e->timer_args = timer_args;
|
||||
e->timer_args = timer_args;
|
||||
e->cb = cb;
|
||||
/*element should be a real pointer*/
|
||||
RB_INSERT(flexran_agent_map, &timer_instance.flexran_agent_head, e);
|
||||
|
||||
RB_INSERT(flexran_agent_map, &timer_instance.flexran_agent_head, e);
|
||||
LOG_I(FLEXRAN_AGENT,"Created a new timer with id 0x%lx for agent %d, instance %d \n",
|
||||
e->timer_id, e->agent_id, e->instance);
|
||||
|
||||
return 0;
|
||||
e->timer_id, e->agent_id, e->instance);
|
||||
return 0;
|
||||
}
|
||||
|
||||
err_code_t flexran_agent_destroy_timer(long timer_id){
|
||||
|
||||
err_code_t flexran_agent_destroy_timer(long timer_id) {
|
||||
struct flexran_agent_timer_element_s *e = get_timer_entry(timer_id);
|
||||
|
||||
if (e != NULL ) {
|
||||
@@ -132,13 +130,12 @@ err_code_t flexran_agent_destroy_timer(long timer_id){
|
||||
flexran_agent_destroy_flexran_message(e->timer_args->msg);
|
||||
free(e);
|
||||
}
|
||||
|
||||
if (timer_remove(timer_id) < 0 )
|
||||
goto error;
|
||||
|
||||
return 0;
|
||||
|
||||
error:
|
||||
if (timer_remove(timer_id) < 0 )
|
||||
goto error;
|
||||
|
||||
return 0;
|
||||
error:
|
||||
LOG_E(FLEXRAN_AGENT, "timer can't be removed\n");
|
||||
return TIMER_REMOVED_FAILED ;
|
||||
}
|
||||
@@ -152,66 +149,59 @@ err_code_t flexran_agent_destroy_timer_by_task_id(xid_t xid) {
|
||||
RB_REMOVE(flexran_agent_map, &timer_instance.flexran_agent_head, e);
|
||||
flexran_agent_destroy_flexran_message(e->timer_args->msg);
|
||||
free(e);
|
||||
if (timer_remove(timer_id) < 0 ) {
|
||||
goto error;
|
||||
|
||||
if (timer_remove(timer_id) < 0 ) {
|
||||
goto error;
|
||||
}
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
|
||||
error:
|
||||
error:
|
||||
LOG_E(FLEXRAN_AGENT, "timer can't be removed\n");
|
||||
return TIMER_REMOVED_FAILED ;
|
||||
}
|
||||
|
||||
err_code_t flexran_agent_destroy_timers(void){
|
||||
|
||||
err_code_t flexran_agent_destroy_timers(void) {
|
||||
struct flexran_agent_timer_element_s *e = NULL;
|
||||
|
||||
RB_FOREACH(e, flexran_agent_map, &timer_instance.flexran_agent_head) {
|
||||
RB_REMOVE(flexran_agent_map, &timer_instance.flexran_agent_head, e);
|
||||
timer_remove(e->timer_id);
|
||||
flexran_agent_destroy_flexran_message(e->timer_args->msg);
|
||||
free(e);
|
||||
}
|
||||
|
||||
}
|
||||
return 0;
|
||||
|
||||
}
|
||||
|
||||
void flexran_agent_sleep_until(struct timespec *ts, int delay) {
|
||||
ts->tv_nsec += delay;
|
||||
if(ts->tv_nsec >= 1000*1000*1000){
|
||||
|
||||
if(ts->tv_nsec >= 1000*1000*1000) {
|
||||
ts->tv_nsec -= 1000*1000*1000;
|
||||
ts->tv_sec++;
|
||||
}
|
||||
|
||||
clock_nanosleep(CLOCK_MONOTONIC, TIMER_ABSTIME, ts, NULL);
|
||||
}
|
||||
|
||||
|
||||
err_code_t flexran_agent_stop_timer(long timer_id){
|
||||
|
||||
err_code_t flexran_agent_stop_timer(long timer_id) {
|
||||
struct flexran_agent_timer_element_s *e=NULL;
|
||||
struct flexran_agent_timer_element_s search;
|
||||
memset(&search, 0, sizeof(struct flexran_agent_timer_element_s));
|
||||
search.timer_id = timer_id;
|
||||
|
||||
e = RB_FIND(flexran_agent_map, &timer_instance.flexran_agent_head, &search);
|
||||
|
||||
if (e != NULL ) {
|
||||
e->state = FLEXRAN_AGENT_TIMER_STATE_STOPPED;
|
||||
}
|
||||
|
||||
|
||||
timer_remove(timer_id);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
struct flexran_agent_timer_element_s * get_timer_entry(long timer_id) {
|
||||
|
||||
struct flexran_agent_timer_element_s *get_timer_entry(long timer_id) {
|
||||
struct flexran_agent_timer_element_s search;
|
||||
memset(&search, 0, sizeof(struct flexran_agent_timer_element_s));
|
||||
search.timer_id = timer_id;
|
||||
|
||||
return RB_FIND(flexran_agent_map, &timer_instance.flexran_agent_head, &search);
|
||||
return RB_FIND(flexran_agent_map, &timer_instance.flexran_agent_head, &search);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
-- **************************************************************
|
||||
--
|
||||
-- Common definitions
|
||||
--
|
||||
-- **************************************************************
|
||||
|
||||
F1AP-CommonDataTypes {
|
||||
itu-t (0) identified-organization (4) etsi (0) mobileDomain (0)
|
||||
ngran-access (22) modules (3) f1ap (3) version1 (1) f1ap-CommonDataTypes (3) }
|
||||
|
||||
DEFINITIONS AUTOMATIC TAGS ::=
|
||||
|
||||
BEGIN
|
||||
|
||||
Criticality ::= ENUMERATED { reject, ignore, notify }
|
||||
|
||||
Presence ::= ENUMERATED { optional, conditional, mandatory }
|
||||
|
||||
PrivateIE-ID ::= CHOICE {
|
||||
local INTEGER (0..65535),
|
||||
global OBJECT IDENTIFIER
|
||||
}
|
||||
|
||||
ProcedureCode ::= INTEGER (0..255)
|
||||
|
||||
ProtocolExtensionID ::= INTEGER (0..65535)
|
||||
|
||||
ProtocolIE-ID ::= INTEGER (0..65535)
|
||||
|
||||
TriggeringMessage ::= ENUMERATED { initiating-message, successful-outcome, unsuccessfull-outcome }
|
||||
|
||||
END
|
||||
@@ -0,0 +1,179 @@
|
||||
-- **************************************************************
|
||||
--
|
||||
-- Constant definitions
|
||||
--
|
||||
-- **************************************************************
|
||||
|
||||
F1AP-Constants {
|
||||
itu-t (0) identified-organization (4) etsi (0) mobileDomain (0)
|
||||
ngran-access (22) modules (3) f1ap (3) version1 (1) f1ap-Constants (4) }
|
||||
|
||||
DEFINITIONS AUTOMATIC TAGS ::=
|
||||
|
||||
BEGIN
|
||||
|
||||
-- **************************************************************
|
||||
--
|
||||
-- IE parameter types from other modules.
|
||||
--
|
||||
-- **************************************************************
|
||||
|
||||
IMPORTS
|
||||
ProcedureCode,
|
||||
ProtocolIE-ID
|
||||
|
||||
FROM F1AP-CommonDataTypes;
|
||||
|
||||
|
||||
-- **************************************************************
|
||||
--
|
||||
-- Elementary Procedures
|
||||
--
|
||||
-- **************************************************************
|
||||
|
||||
id-Reset ProcedureCode ::= 0
|
||||
id-F1Setup ProcedureCode ::= 1
|
||||
id-ErrorIndication ProcedureCode ::= 2
|
||||
id-gNBDUConfigurationUpdate ProcedureCode ::= 3
|
||||
id-gNBCUConfigurationUpdate ProcedureCode ::= 4
|
||||
id-UEContextSetup ProcedureCode ::= 5
|
||||
id-UEContextRelease ProcedureCode ::= 6
|
||||
id-UEContextModification ProcedureCode ::= 7
|
||||
id-UEContextModificationRequired ProcedureCode ::= 8
|
||||
id-UEMobilityCommand ProcedureCode ::= 9
|
||||
id-UEContextReleaseRequest ProcedureCode ::= 10
|
||||
id-InitialULRRCMessageTransfer ProcedureCode ::= 11
|
||||
id-DLRRCMessageTransfer ProcedureCode ::= 12
|
||||
id-ULRRCMessageTransfer ProcedureCode ::= 13
|
||||
id-privateMessage ProcedureCode ::= 14
|
||||
|
||||
-- **************************************************************
|
||||
--
|
||||
-- Extension constants
|
||||
--
|
||||
-- **************************************************************
|
||||
|
||||
maxPrivateIEs INTEGER ::= 65535
|
||||
maxProtocolExtensions INTEGER ::= 65535
|
||||
maxProtocolIEs INTEGER ::= 65535
|
||||
-- **************************************************************
|
||||
--
|
||||
-- Lists
|
||||
--
|
||||
-- **************************************************************
|
||||
|
||||
maxNRARFCN INTEGER ::= 3266667
|
||||
maxnoofErrors INTEGER ::= 256
|
||||
maxnoofIndividualF1ConnectionsToReset INTEGER ::= 65536
|
||||
maxCellingNBDU INTEGER ::= 512
|
||||
maxnoofSCells INTEGER ::= 64
|
||||
maxnoofSRBs INTEGER ::= 8
|
||||
maxnoofDRBs INTEGER ::= 64
|
||||
maxnoofULTunnels INTEGER ::= 2
|
||||
maxnoofDLTunnels INTEGER ::= 2
|
||||
maxnoofBPLMNs INTEGER ::= 6
|
||||
maxnoofCandidateSpCells INTEGER ::= 64
|
||||
maxnoofPotentialSpCells INTEGER ::= 64
|
||||
|
||||
-- **************************************************************
|
||||
--
|
||||
-- IEs
|
||||
--
|
||||
-- **************************************************************
|
||||
|
||||
id-Cause ProtocolIE-ID ::= 0
|
||||
id-Cells-Failed-to-be-Activated-List ProtocolIE-ID ::= 1
|
||||
id-Cells-Failed-to-be-Activated-List-Item ProtocolIE-ID ::= 2
|
||||
id-Cells-to-be-Activated-List ProtocolIE-ID ::= 3
|
||||
id-Cells-to-be-Activated-List-Item ProtocolIE-ID ::= 4
|
||||
id-Cells-to-be-Deactivated-List ProtocolIE-ID ::= 5
|
||||
id-Cells-to-be-Deactivated-List-Item ProtocolIE-ID ::= 6
|
||||
id-CriticalityDiagnostics ProtocolIE-ID ::= 7
|
||||
id-CUtoDURRCInformation ProtocolIE-ID ::= 9
|
||||
id-DRBs-FailedToBeModifiedConf-Item ProtocolIE-ID ::= 10
|
||||
id-DRBs-FailedToBeModifiedConf-List ProtocolIE-ID ::= 11
|
||||
id-DRBs-FailedToBeModified-Item ProtocolIE-ID ::= 12
|
||||
id-DRBs-FailedToBeModified-List ProtocolIE-ID ::= 13
|
||||
id-DRBs-FailedToBeSetup-Item ProtocolIE-ID ::= 14
|
||||
id-DRBs-FailedToBeSetup-List ProtocolIE-ID ::= 15
|
||||
id-DRBs-FailedToBeSetupMod-Item ProtocolIE-ID ::= 16
|
||||
id-DRBs-FailedToBeSetupMod-List ProtocolIE-ID ::= 17
|
||||
id-DRBs-ModifiedConf-Item ProtocolIE-ID ::= 18
|
||||
id-DRBs-ModifiedConf-List ProtocolIE-ID ::= 19
|
||||
id-DRBs-Modified-Item ProtocolIE-ID ::= 20
|
||||
id-DRBs-Modified-List ProtocolIE-ID ::= 21
|
||||
id-DRBs-Required-ToBeModified-Item ProtocolIE-ID ::= 22
|
||||
id-DRBs-Required-ToBeModified-List ProtocolIE-ID ::= 23
|
||||
id-DRBs-Required-ToBeReleased-Item ProtocolIE-ID ::= 24
|
||||
id-DRBs-Required-ToBeReleased-List ProtocolIE-ID ::= 25
|
||||
id-DRBs-Setup-Item ProtocolIE-ID ::= 26
|
||||
id-DRBs-Setup-List ProtocolIE-ID ::= 27
|
||||
id-DRBs-SetupMod-Item ProtocolIE-ID ::= 28
|
||||
id-DRBs-SetupMod-List ProtocolIE-ID ::= 29
|
||||
id-DRBs-ToBeModified-Item ProtocolIE-ID ::= 30
|
||||
id-DRBs-ToBeModified-List ProtocolIE-ID ::= 31
|
||||
id-DRBs-ToBeReleased-Item ProtocolIE-ID ::= 32
|
||||
id-DRBs-ToBeReleased-List ProtocolIE-ID ::= 33
|
||||
id-DRBs-ToBeSetup-Item ProtocolIE-ID ::= 34
|
||||
id-DRBs-ToBeSetup-List ProtocolIE-ID ::= 35
|
||||
id-DRBs-ToBeSetupMod-Item ProtocolIE-ID ::= 36
|
||||
id-DRBs-ToBeSetupMod-List ProtocolIE-ID ::= 37
|
||||
id-DRXCycle ProtocolIE-ID ::= 38
|
||||
id-DUtoCURRCInformation ProtocolIE-ID ::= 39
|
||||
id-gNB-CU-UE-F1AP-ID ProtocolIE-ID ::= 40
|
||||
id-gNB-DU-UE-F1AP-ID ProtocolIE-ID ::= 41
|
||||
id-gNB-DU-ID ProtocolIE-ID ::= 42
|
||||
id-GNB-DU-Served-Cells-Item ProtocolIE-ID ::= 43
|
||||
id-gNB-DU-Served-Cells-List ProtocolIE-ID ::= 44
|
||||
id-gNB-DU-Name ProtocolIE-ID ::= 45
|
||||
id-NRCellID ProtocolIE-ID ::= 46
|
||||
id-oldgNB-DU-UE-F1AP-ID ProtocolIE-ID ::= 47
|
||||
id-ResetType ProtocolIE-ID ::= 48
|
||||
id-ResourceCoordinationTransferContainer ProtocolIE-ID ::= 49
|
||||
id-RRCContainer ProtocolIE-ID ::= 50
|
||||
id-SCell-ToBeRemoved-Item ProtocolIE-ID ::= 51
|
||||
id-SCell-ToBeRemoved-List ProtocolIE-ID ::= 52
|
||||
id-SCell-ToBeSetup-Item ProtocolIE-ID ::= 53
|
||||
id-SCell-ToBeSetup-List ProtocolIE-ID ::= 54
|
||||
id-SCell-ToBeSetupMod-Item ProtocolIE-ID ::= 55
|
||||
id-SCell-ToBeSetupMod-List ProtocolIE-ID ::= 56
|
||||
id-Served-Cells-To-Add-Item ProtocolIE-ID ::= 57
|
||||
id-Served-Cells-To-Add-List ProtocolIE-ID ::= 58
|
||||
id-Served-Cells-To-Delete-Item ProtocolIE-ID ::= 59
|
||||
id-Served-Cells-To-Delete-List ProtocolIE-ID ::= 60
|
||||
id-Served-Cells-To-Modify-Item ProtocolIE-ID ::= 61
|
||||
id-Served-Cells-To-Modify-List ProtocolIE-ID ::= 62
|
||||
id-SpCell-ID ProtocolIE-ID ::= 63
|
||||
id-SRBID ProtocolIE-ID ::= 64
|
||||
id-SRBs-FailedToBeSetup-Item ProtocolIE-ID ::= 65
|
||||
id-SRBs-FailedToBeSetup-List ProtocolIE-ID ::= 66
|
||||
id-SRBs-FailedToBeSetupMod-Item ProtocolIE-ID ::= 67
|
||||
id-SRBs-FailedToBeSetupMod-List ProtocolIE-ID ::= 68
|
||||
id-SRBs-Required-ToBeReleased-Item ProtocolIE-ID ::= 69
|
||||
id-SRBs-Required-ToBeReleased-List ProtocolIE-ID ::= 70
|
||||
id-SRBs-ToBeReleased-Item ProtocolIE-ID ::= 71
|
||||
id-SRBs-ToBeReleased-List ProtocolIE-ID ::= 72
|
||||
id-SRBs-ToBeSetup-Item ProtocolIE-ID ::= 73
|
||||
id-SRBs-ToBeSetup-List ProtocolIE-ID ::= 74
|
||||
id-SRBs-ToBeSetupMod-Item ProtocolIE-ID ::= 75
|
||||
id-SRBs-ToBeSetupMod-List ProtocolIE-ID ::= 76
|
||||
id-TimeToWait ProtocolIE-ID ::= 77
|
||||
id-TransactionID ProtocolIE-ID ::= 78
|
||||
id-TransmissionStopIndicator ProtocolIE-ID ::= 79
|
||||
id-UE-associatedLogicalF1-ConnectionItem ProtocolIE-ID ::= 80
|
||||
id-UE-associatedLogicalF1-ConnectionListResAck ProtocolIE-ID ::= 81
|
||||
id-gNB-CU-Name ProtocolIE-ID ::= 82
|
||||
id-SCell-FailedtoSetup-List ProtocolIE-ID ::= 83
|
||||
id-SCell-FailedtoSetup-Item ProtocolIE-ID ::= 84
|
||||
id-SCell-FailedtoSetupMod-List ProtocolIE-ID ::= 85
|
||||
id-SCell-FailedtoSetupMod-Item ProtocolIE-ID ::= 86
|
||||
id-RRCRconfigurationCompleteIndicator ProtocolIE-ID ::= 87
|
||||
id-Active-Cells-Item ProtocolIE-ID ::= 88
|
||||
id-Active-Cells-List ProtocolIE-ID ::= 89
|
||||
id-Candidate-SpCell-List ProtocolIE-ID ::= 90
|
||||
id-Candidate-SpCell-Item ProtocolIE-ID ::= 91
|
||||
id-Potential-SpCell-List ProtocolIE-ID ::= 92
|
||||
id-Potential-SpCell-Item ProtocolIE-ID ::= 93
|
||||
|
||||
|
||||
END
|
||||
@@ -0,0 +1,184 @@
|
||||
-- **************************************************************
|
||||
--
|
||||
-- Container definitions
|
||||
--
|
||||
-- **************************************************************
|
||||
|
||||
F1AP-Containers {
|
||||
itu-t (0) identified-organization (4) etsi (0) mobileDomain (0)
|
||||
ngran-access (22) modules (3) f1ap (3) version1 (1) f1ap-Containers (5) }
|
||||
|
||||
DEFINITIONS AUTOMATIC TAGS ::=
|
||||
|
||||
BEGIN
|
||||
|
||||
-- **************************************************************
|
||||
--
|
||||
-- IE parameter types from other modules.
|
||||
--
|
||||
-- **************************************************************
|
||||
|
||||
IMPORTS
|
||||
Criticality,
|
||||
Presence,
|
||||
PrivateIE-ID,
|
||||
ProtocolExtensionID,
|
||||
ProtocolIE-ID
|
||||
|
||||
FROM F1AP-CommonDataTypes
|
||||
maxPrivateIEs,
|
||||
maxProtocolExtensions,
|
||||
maxProtocolIEs
|
||||
|
||||
FROM F1AP-Constants;
|
||||
|
||||
-- **************************************************************
|
||||
--
|
||||
-- Class Definition for Protocol IEs
|
||||
--
|
||||
-- **************************************************************
|
||||
|
||||
F1AP-PROTOCOL-IES ::= CLASS {
|
||||
&id ProtocolIE-ID UNIQUE,
|
||||
&criticality Criticality,
|
||||
&Value,
|
||||
&presence Presence
|
||||
}
|
||||
WITH SYNTAX {
|
||||
ID &id
|
||||
CRITICALITY &criticality
|
||||
TYPE &Value
|
||||
PRESENCE &presence
|
||||
}
|
||||
|
||||
-- **************************************************************
|
||||
--
|
||||
-- Class Definition for Protocol IEs
|
||||
--
|
||||
-- **************************************************************
|
||||
|
||||
F1AP-PROTOCOL-IES-PAIR ::= CLASS {
|
||||
&id ProtocolIE-ID UNIQUE,
|
||||
&firstCriticality Criticality,
|
||||
&FirstValue,
|
||||
&secondCriticality Criticality,
|
||||
&SecondValue,
|
||||
&presence Presence
|
||||
}
|
||||
WITH SYNTAX {
|
||||
ID &id
|
||||
FIRST CRITICALITY &firstCriticality
|
||||
FIRST TYPE &FirstValue
|
||||
SECOND CRITICALITY &secondCriticality
|
||||
SECOND TYPE &SecondValue
|
||||
PRESENCE &presence
|
||||
}
|
||||
|
||||
-- **************************************************************
|
||||
--
|
||||
-- Class Definition for Protocol Extensions
|
||||
--
|
||||
-- **************************************************************
|
||||
|
||||
F1AP-PROTOCOL-EXTENSION ::= CLASS {
|
||||
&id ProtocolExtensionID UNIQUE,
|
||||
&criticality Criticality,
|
||||
&Extension,
|
||||
&presence Presence
|
||||
}
|
||||
WITH SYNTAX {
|
||||
ID &id
|
||||
CRITICALITY &criticality
|
||||
EXTENSION &Extension
|
||||
PRESENCE &presence
|
||||
}
|
||||
|
||||
-- **************************************************************
|
||||
--
|
||||
-- Class Definition for Private IEs
|
||||
--
|
||||
-- **************************************************************
|
||||
|
||||
F1AP-PRIVATE-IES ::= CLASS {
|
||||
&id PrivateIE-ID,
|
||||
&criticality Criticality,
|
||||
&Value,
|
||||
&presence Presence
|
||||
}
|
||||
WITH SYNTAX {
|
||||
ID &id
|
||||
CRITICALITY &criticality
|
||||
TYPE &Value
|
||||
PRESENCE &presence
|
||||
}
|
||||
|
||||
-- **************************************************************
|
||||
--
|
||||
-- Container for Protocol IEs
|
||||
--
|
||||
-- **************************************************************
|
||||
|
||||
ProtocolIE-Container {F1AP-PROTOCOL-IES : IEsSetParam} ::=
|
||||
SEQUENCE (SIZE (0..maxProtocolIEs)) OF
|
||||
ProtocolIE-Field {{IEsSetParam}}
|
||||
|
||||
ProtocolIE-SingleContainer {F1AP-PROTOCOL-IES : IEsSetParam} ::=
|
||||
ProtocolIE-Field {{IEsSetParam}}
|
||||
|
||||
ProtocolIE-Field {F1AP-PROTOCOL-IES : IEsSetParam} ::= SEQUENCE {
|
||||
id F1AP-PROTOCOL-IES.&id ({IEsSetParam}),
|
||||
criticality F1AP-PROTOCOL-IES.&criticality ({IEsSetParam}{@id}),
|
||||
value F1AP-PROTOCOL-IES.&Value ({IEsSetParam}{@id})
|
||||
}
|
||||
|
||||
-- **************************************************************
|
||||
--
|
||||
-- Container for Protocol IE Pairs
|
||||
--
|
||||
-- **************************************************************
|
||||
|
||||
ProtocolIE-ContainerPair {F1AP-PROTOCOL-IES-PAIR : IEsSetParam} ::=
|
||||
SEQUENCE (SIZE (0..maxProtocolIEs)) OF
|
||||
ProtocolIE-FieldPair {{IEsSetParam}}
|
||||
|
||||
ProtocolIE-FieldPair {F1AP-PROTOCOL-IES-PAIR : IEsSetParam} ::= SEQUENCE {
|
||||
id F1AP-PROTOCOL-IES-PAIR.&id ({IEsSetParam}),
|
||||
firstCriticality F1AP-PROTOCOL-IES-PAIR.&firstCriticality ({IEsSetParam}{@id}),
|
||||
firstValue F1AP-PROTOCOL-IES-PAIR.&FirstValue ({IEsSetParam}{@id}),
|
||||
secondCriticality F1AP-PROTOCOL-IES-PAIR.&secondCriticality ({IEsSetParam}{@id}),
|
||||
secondValue F1AP-PROTOCOL-IES-PAIR.&SecondValue ({IEsSetParam}{@id})
|
||||
}
|
||||
|
||||
-- **************************************************************
|
||||
--
|
||||
-- Container for Protocol Extensions
|
||||
--
|
||||
-- **************************************************************
|
||||
|
||||
ProtocolExtensionContainer {F1AP-PROTOCOL-EXTENSION : ExtensionSetParam} ::=
|
||||
SEQUENCE (SIZE (1..maxProtocolExtensions)) OF
|
||||
ProtocolExtensionField {{ExtensionSetParam}}
|
||||
|
||||
ProtocolExtensionField {F1AP-PROTOCOL-EXTENSION : ExtensionSetParam} ::= SEQUENCE {
|
||||
id F1AP-PROTOCOL-EXTENSION.&id ({ExtensionSetParam}),
|
||||
criticality F1AP-PROTOCOL-EXTENSION.&criticality ({ExtensionSetParam}{@id}),
|
||||
extensionValue F1AP-PROTOCOL-EXTENSION.&Extension ({ExtensionSetParam}{@id})
|
||||
}
|
||||
|
||||
-- **************************************************************
|
||||
--
|
||||
-- Container for Private IEs
|
||||
--
|
||||
-- **************************************************************
|
||||
|
||||
PrivateIE-Container {F1AP-PRIVATE-IES : IEsSetParam } ::=
|
||||
SEQUENCE (SIZE (1.. maxPrivateIEs)) OF
|
||||
PrivateIE-Field {{IEsSetParam}}
|
||||
|
||||
PrivateIE-Field {F1AP-PRIVATE-IES : IEsSetParam} ::= SEQUENCE {
|
||||
id F1AP-PRIVATE-IES.&id ({IEsSetParam}),
|
||||
criticality F1AP-PRIVATE-IES.&criticality ({IEsSetParam}{@id}),
|
||||
value F1AP-PRIVATE-IES.&Value ({IEsSetParam}{@id})
|
||||
}
|
||||
|
||||
END
|
||||
@@ -0,0 +1,870 @@
|
||||
-- **************************************************************
|
||||
--
|
||||
-- Information Element Definitions
|
||||
--
|
||||
-- **************************************************************
|
||||
|
||||
F1AP-IEs {
|
||||
itu-t (0) identified-organization (4) etsi (0) mobileDomain (0)
|
||||
ngran-access (22) modules (3) f1ap (3) version1 (1) f1ap-IEs (2) }
|
||||
|
||||
DEFINITIONS AUTOMATIC TAGS ::=
|
||||
|
||||
BEGIN
|
||||
|
||||
IMPORTS
|
||||
maxNRARFCN,
|
||||
maxnoofErrors,
|
||||
maxnoofBPLMNs,
|
||||
maxnoofDLTunnels,
|
||||
maxnoofULTunnels
|
||||
|
||||
FROM F1AP-Constants
|
||||
|
||||
Criticality,
|
||||
ProcedureCode,
|
||||
ProtocolIE-ID,
|
||||
TriggeringMessage
|
||||
|
||||
FROM F1AP-CommonDataTypes
|
||||
|
||||
ProtocolExtensionContainer{},
|
||||
F1AP-PROTOCOL-EXTENSION,
|
||||
ProtocolIE-SingleContainer{},
|
||||
F1AP-PROTOCOL-IES
|
||||
|
||||
FROM F1AP-Containers;
|
||||
|
||||
-- A
|
||||
|
||||
Active-Cells-Item ::= SEQUENCE {
|
||||
nRCGI NRCGI ,
|
||||
iE-Extensions ProtocolExtensionContainer { { Active-Cells-ItemExtIEs } } OPTIONAL,
|
||||
...
|
||||
}
|
||||
|
||||
Active-Cells-ItemExtIEs F1AP-PROTOCOL-EXTENSION ::= {
|
||||
...
|
||||
}
|
||||
|
||||
|
||||
AllocationAndRetentionPriority ::= SEQUENCE {
|
||||
priorityLevel PriorityLevel,
|
||||
pre-emptionCapability Pre-emptionCapability,
|
||||
pre-emptionVulnerability Pre-emptionVulnerability,
|
||||
iE-Extensions ProtocolExtensionContainer { {AllocationAndRetentionPriority-ExtIEs} } OPTIONAL,
|
||||
...
|
||||
}
|
||||
|
||||
AllocationAndRetentionPriority-ExtIEs F1AP-PROTOCOL-EXTENSION ::= {
|
||||
...
|
||||
}
|
||||
-- B
|
||||
|
||||
BitRate ::= INTEGER (0..4000000000000,...)
|
||||
|
||||
BroadcastPLMNs-Item ::= SEQUENCE (SIZE(1..maxnoofBPLMNs)) OF PLMN-Identity
|
||||
|
||||
-- C
|
||||
|
||||
Candidate-SpCell-Item ::= SEQUENCE {
|
||||
candidate-SpCell-ID NRCGI ,
|
||||
iE-Extensions ProtocolExtensionContainer { { Candidate-SpCell-ItemExtIEs } } OPTIONAL,
|
||||
...
|
||||
}
|
||||
|
||||
Candidate-SpCell-ItemExtIEs F1AP-PROTOCOL-EXTENSION ::= {
|
||||
...
|
||||
}
|
||||
|
||||
Cause ::= CHOICE {
|
||||
radioNetwork CauseRadioNetwork,
|
||||
transport CauseTransport,
|
||||
protocol CauseProtocol,
|
||||
misc CauseMisc,
|
||||
...
|
||||
}
|
||||
|
||||
CauseMisc ::= ENUMERATED {
|
||||
control-processing-overload,
|
||||
not-enough-user-plane-processing-resources,
|
||||
hardware-failure,
|
||||
om-intervention,
|
||||
unspecified,
|
||||
...
|
||||
}
|
||||
|
||||
CauseProtocol ::= ENUMERATED {
|
||||
transfer-syntax-error,
|
||||
abstract-syntax-error-reject,
|
||||
abstract-syntax-error-ignore-and-notify,
|
||||
message-not-compatible-with-receiver-state,
|
||||
semantic-error,
|
||||
abstract-syntax-error-falsely-constructed-message,
|
||||
unspecified,
|
||||
...
|
||||
}
|
||||
|
||||
CauseRadioNetwork ::= ENUMERATED {
|
||||
unspecified,
|
||||
rlc-failure,
|
||||
unknown-or-already-allocated-gnb-cu-ue-f1ap-id,
|
||||
unknown-or-already-allocated-gnd-du-ue-f1ap-id,
|
||||
unknown-or-inconsistent-pair-of-ue-f1ap-id,
|
||||
interaction-with-other-procedure,
|
||||
not-supported-qci-Value,
|
||||
action-desirable-for-radio-reasons,
|
||||
no-radio-resources-available,
|
||||
procedure-cancelled,
|
||||
normal-release,
|
||||
...
|
||||
}
|
||||
|
||||
CauseTransport ::= ENUMERATED {
|
||||
unspecified,
|
||||
transport-resource-unavailable,
|
||||
...
|
||||
}
|
||||
|
||||
|
||||
|
||||
CellGroupConfig ::= OCTET STRING
|
||||
|
||||
Cells-Failed-to-be-Activated-List-Item ::= SEQUENCE {
|
||||
nRCGI NRCGI,
|
||||
cause Cause,
|
||||
iE-Extensions ProtocolExtensionContainer { { Cells-Failed-to-be-Activated-List-ItemExtIEs } } OPTIONAL,
|
||||
...
|
||||
}
|
||||
|
||||
Cells-Failed-to-be-Activated-List-ItemExtIEs F1AP-PROTOCOL-EXTENSION ::= {
|
||||
...
|
||||
}
|
||||
|
||||
Cells-to-be-Activated-List-Item ::= SEQUENCE {
|
||||
nRCGI NRCGI,
|
||||
nRPCI NRPCI OPTIONAL,
|
||||
iE-Extensions ProtocolExtensionContainer { { Cells-to-be-Activated-List-ItemExtIEs} } OPTIONAL,
|
||||
...
|
||||
}
|
||||
|
||||
Cells-to-be-Activated-List-ItemExtIEs F1AP-PROTOCOL-EXTENSION ::= {
|
||||
...
|
||||
}
|
||||
|
||||
Cells-to-be-Deactivated-List-Item ::= SEQUENCE {
|
||||
nRCGI NRCGI ,
|
||||
iE-Extensions ProtocolExtensionContainer { { Cells-to-be-Deactivated-List-ItemExtIEs } } OPTIONAL,
|
||||
...
|
||||
}
|
||||
|
||||
Cells-to-be-Deactivated-List-ItemExtIEs F1AP-PROTOCOL-EXTENSION ::= {
|
||||
...
|
||||
}
|
||||
|
||||
CriticalityDiagnostics ::= SEQUENCE {
|
||||
procedureCode ProcedureCode OPTIONAL,
|
||||
triggeringMessage TriggeringMessage OPTIONAL,
|
||||
procedureCriticality Criticality OPTIONAL,
|
||||
transactionID TransactionID OPTIONAL,
|
||||
iEsCriticalityDiagnostics CriticalityDiagnostics-IE-List OPTIONAL,
|
||||
iE-Extensions ProtocolExtensionContainer {{CriticalityDiagnostics-ExtIEs}} OPTIONAL,
|
||||
...
|
||||
}
|
||||
|
||||
CriticalityDiagnostics-ExtIEs F1AP-PROTOCOL-EXTENSION ::= {
|
||||
...
|
||||
}
|
||||
|
||||
CriticalityDiagnostics-IE-List ::= SEQUENCE (SIZE (1.. maxnoofErrors)) OF CriticalityDiagnostics-IE-Item
|
||||
|
||||
CriticalityDiagnostics-IE-Item ::= SEQUENCE {
|
||||
iECriticality Criticality,
|
||||
iE-ID ProtocolIE-ID,
|
||||
typeOfError TypeOfError,
|
||||
iE-Extensions ProtocolExtensionContainer {{CriticalityDiagnostics-IE-Item-ExtIEs}} OPTIONAL,
|
||||
...
|
||||
}
|
||||
|
||||
CriticalityDiagnostics-IE-Item-ExtIEs F1AP-PROTOCOL-EXTENSION ::= {
|
||||
...
|
||||
}
|
||||
|
||||
CUtoDURRCInformation ::= SEQUENCE {
|
||||
cG-ConfigInfo CG-ConfigInfo OPTIONAL,
|
||||
uE-CapabilityRAT-ContainerList UE-CapabilityRAT-ContainerList OPTIONAL,
|
||||
iE-Extensions ProtocolExtensionContainer { { CUtoDURRCInformation-ExtIEs} } OPTIONAL,
|
||||
...
|
||||
}
|
||||
|
||||
CUtoDURRCInformation-ExtIEs F1AP-PROTOCOL-EXTENSION ::= {
|
||||
...
|
||||
}
|
||||
|
||||
-- D
|
||||
|
||||
DLTunnels-ToBeSetup-List ::= SEQUENCE (SIZE(1..maxnoofDLTunnels)) OF DLTunnels-ToBeSetup-Item
|
||||
|
||||
DLTunnels-ToBeSetup-Item ::= SEQUENCE {
|
||||
dL-GTP-Tunnel-EndPoint GTPTunnelEndpoint ,
|
||||
iE-Extensions ProtocolExtensionContainer { { DLTunnels-ToBeSetup-ItemExtIEs } } OPTIONAL,
|
||||
...
|
||||
}
|
||||
|
||||
DLTunnels-ToBeSetup-ItemExtIEs F1AP-PROTOCOL-EXTENSION ::= {
|
||||
...
|
||||
}
|
||||
|
||||
DRBID ::= INTEGER (1..32, ...)
|
||||
|
||||
DRBs-FailedToBeModified-Item ::= SEQUENCE {
|
||||
dRBID DRBID ,
|
||||
cause Cause OPTIONAL,
|
||||
iE-Extensions ProtocolExtensionContainer { { DRBs-FailedToBeModified-ItemExtIEs } } OPTIONAL,
|
||||
...
|
||||
}
|
||||
|
||||
DRBs-FailedToBeModified-ItemExtIEs F1AP-PROTOCOL-EXTENSION ::= {
|
||||
...
|
||||
}
|
||||
|
||||
DRBs-FailedToBeModifiedConf-Item ::= SEQUENCE {
|
||||
dRBID DRBID ,
|
||||
cause Cause OPTIONAL,
|
||||
iE-Extensions ProtocolExtensionContainer { { DRBs-FailedToBeModifiedConf-ItemExtIEs } } OPTIONAL,
|
||||
...
|
||||
}
|
||||
|
||||
DRBs-FailedToBeModifiedConf-ItemExtIEs F1AP-PROTOCOL-EXTENSION ::= {
|
||||
...
|
||||
}
|
||||
|
||||
DRBs-FailedToBeSetup-Item ::= SEQUENCE {
|
||||
dRBID DRBID,
|
||||
cause Cause OPTIONAL,
|
||||
iE-Extensions ProtocolExtensionContainer { { DRBs-FailedToBeSetup-ItemExtIEs } } OPTIONAL,
|
||||
...
|
||||
}
|
||||
|
||||
DRBs-FailedToBeSetup-ItemExtIEs F1AP-PROTOCOL-EXTENSION ::= {
|
||||
...
|
||||
}
|
||||
|
||||
|
||||
DRBs-FailedToBeSetupMod-Item ::= SEQUENCE {
|
||||
dRBID DRBID ,
|
||||
cause Cause OPTIONAL ,
|
||||
iE-Extensions ProtocolExtensionContainer { { DRBs-FailedToBeSetupMod-ItemExtIEs } } OPTIONAL,
|
||||
...
|
||||
}
|
||||
|
||||
DRBs-FailedToBeSetupMod-ItemExtIEs F1AP-PROTOCOL-EXTENSION ::= {
|
||||
...
|
||||
}
|
||||
|
||||
DRBs-Modified-Item ::= SEQUENCE {
|
||||
dRBID DRBID,
|
||||
dLTunnels-ToBeSetup-List DLTunnels-ToBeSetup-List,
|
||||
iE-Extensions ProtocolExtensionContainer { { DRBs-Modified-ItemExtIEs } } OPTIONAL,
|
||||
...
|
||||
}
|
||||
|
||||
DRBs-Modified-ItemExtIEs F1AP-PROTOCOL-EXTENSION ::= {
|
||||
...
|
||||
}
|
||||
|
||||
DRBs-ModifiedConf-Item ::= SEQUENCE {
|
||||
dRBID DRBID,
|
||||
uLTunnels-ToBeSetup-List ULTunnels-ToBeSetup-List ,
|
||||
iE-Extensions ProtocolExtensionContainer { { DRBs-ModifiedConf-ItemExtIEs } } OPTIONAL,
|
||||
...
|
||||
}
|
||||
|
||||
DRBs-ModifiedConf-ItemExtIEs F1AP-PROTOCOL-EXTENSION ::= {
|
||||
...
|
||||
}
|
||||
|
||||
DRBs-Required-ToBeModified-Item ::= SEQUENCE {
|
||||
dRBID DRBID,
|
||||
dLTunnels-ToBeSetup-List DLTunnels-ToBeSetup-List ,
|
||||
iE-Extensions ProtocolExtensionContainer { { DRBs-Required-ToBeModified-ItemExtIEs } } OPTIONAL,
|
||||
...
|
||||
}
|
||||
|
||||
DRBs-Required-ToBeModified-ItemExtIEs F1AP-PROTOCOL-EXTENSION ::= {
|
||||
...
|
||||
}
|
||||
|
||||
DRBs-Required-ToBeReleased-Item ::= SEQUENCE {
|
||||
dRBID DRBID,
|
||||
iE-Extensions ProtocolExtensionContainer { { DRBs-Required-ToBeReleased-ItemExtIEs } } OPTIONAL,
|
||||
...
|
||||
}
|
||||
|
||||
DRBs-Required-ToBeReleased-ItemExtIEs F1AP-PROTOCOL-EXTENSION ::= {
|
||||
...
|
||||
}
|
||||
|
||||
DRBs-Setup-Item ::= SEQUENCE {
|
||||
dRBID DRBID,
|
||||
dLTunnels-ToBeSetup-List DLTunnels-ToBeSetup-List ,
|
||||
iE-Extensions ProtocolExtensionContainer { { DRBs-Setup-ItemExtIEs } } OPTIONAL,
|
||||
...
|
||||
}
|
||||
|
||||
DRBs-Setup-ItemExtIEs F1AP-PROTOCOL-EXTENSION ::= {
|
||||
...
|
||||
}
|
||||
|
||||
DRBs-SetupMod-Item ::= SEQUENCE {
|
||||
dRBID DRBID,
|
||||
dLTunnels-ToBeSetup-List DLTunnels-ToBeSetup-List ,
|
||||
iE-Extensions ProtocolExtensionContainer { { DRBs-SetupMod-ItemExtIEs } } OPTIONAL,
|
||||
...
|
||||
}
|
||||
|
||||
DRBs-SetupMod-ItemExtIEs F1AP-PROTOCOL-EXTENSION ::= {
|
||||
...
|
||||
}
|
||||
|
||||
|
||||
DRBs-ToBeModified-Item ::= SEQUENCE {
|
||||
dRBID DRBID,
|
||||
eUTRANQoS EUTRANQoS OPTIONAL,
|
||||
uLTunnels-ToBeSetup-List ULTunnels-ToBeSetup-List ,
|
||||
uLConfiguration ULConfiguration OPTIONAL,
|
||||
iE-Extensions ProtocolExtensionContainer { { DRBs-ToBeModified-ItemExtIEs } } OPTIONAL,
|
||||
...
|
||||
}
|
||||
|
||||
DRBs-ToBeModified-ItemExtIEs F1AP-PROTOCOL-EXTENSION ::= {
|
||||
...
|
||||
}
|
||||
|
||||
DRBs-ToBeReleased-Item ::= SEQUENCE {
|
||||
dRBID DRBID,
|
||||
iE-Extensions ProtocolExtensionContainer { { DRBs-ToBeReleased-ItemExtIEs } } OPTIONAL,
|
||||
...
|
||||
}
|
||||
|
||||
DRBs-ToBeReleased-ItemExtIEs F1AP-PROTOCOL-EXTENSION ::= {
|
||||
...
|
||||
}
|
||||
|
||||
DRBs-ToBeSetup-Item ::= SEQUENCE {
|
||||
dRBID DRBID,
|
||||
eUTRANQoS EUTRANQoS OPTIONAL,
|
||||
uLTunnels-ToBeSetup-List ULTunnels-ToBeSetup-List ,
|
||||
rLCMode RLCMode,
|
||||
uLConfiguration ULConfiguration OPTIONAL,
|
||||
iE-Extensions ProtocolExtensionContainer { { DRBs-ToBeSetup-ItemExtIEs } } OPTIONAL,
|
||||
...
|
||||
}
|
||||
|
||||
DRBs-ToBeSetup-ItemExtIEs F1AP-PROTOCOL-EXTENSION ::= {
|
||||
...
|
||||
}
|
||||
|
||||
|
||||
DRBs-ToBeSetupMod-Item ::= SEQUENCE {
|
||||
dRBID DRBID,
|
||||
eUTRANQoS EUTRANQoS OPTIONAL,
|
||||
rLCMode RLCMode,
|
||||
uLConfiguration ULConfiguration OPTIONAL,
|
||||
uLTunnels-ToBeSetup-List ULTunnels-ToBeSetup-List,
|
||||
iE-Extensions ProtocolExtensionContainer { { DRBs-ToBeSetupMod-ItemExtIEs } } OPTIONAL,
|
||||
...
|
||||
}
|
||||
|
||||
DRBs-ToBeSetupMod-ItemExtIEs F1AP-PROTOCOL-EXTENSION ::= {
|
||||
...
|
||||
}
|
||||
|
||||
DRXCycle ::= SEQUENCE {
|
||||
longDRXCycleLength LongDRXCycleLength,
|
||||
shortDRXCycleLength ShortDRXCycleLength OPTIONAL,
|
||||
shortDRXCycleTimer ShortDRXCycleTimer OPTIONAL,
|
||||
iE-Extensions ProtocolExtensionContainer { { DRXCycle-ExtIEs} } OPTIONAL,
|
||||
...
|
||||
}
|
||||
|
||||
DRXCycle-ExtIEs F1AP-PROTOCOL-EXTENSION ::= {
|
||||
...
|
||||
}
|
||||
DUtoCURRCInformation ::= SEQUENCE {
|
||||
cellGroupConfig CellGroupConfig,
|
||||
gapOffset GapOffset OPTIONAL,
|
||||
iE-Extensions ProtocolExtensionContainer { { DUtoCURRCInformation-ExtIEs} } OPTIONAL,
|
||||
...
|
||||
}
|
||||
|
||||
DUtoCURRCInformation-ExtIEs F1AP-PROTOCOL-EXTENSION ::= {
|
||||
...
|
||||
}
|
||||
-- E
|
||||
|
||||
EUTRANQoS ::= SEQUENCE {
|
||||
qCI QCI,
|
||||
allocationAndRetentionPriority AllocationAndRetentionPriority,
|
||||
gbrQosInformation GBR-QosInformation OPTIONAL,
|
||||
iE-Extensions ProtocolExtensionContainer { { EUTRANQoS-ExtIEs} } OPTIONAL,
|
||||
...
|
||||
}
|
||||
|
||||
EUTRANQoS-ExtIEs F1AP-PROTOCOL-EXTENSION ::= {
|
||||
...
|
||||
}
|
||||
|
||||
Extended-TAC ::= OCTET STRING (SIZE(3))
|
||||
|
||||
-- F
|
||||
|
||||
FDD-Info ::= SEQUENCE {
|
||||
uL-NRARFCN NRARFCN,
|
||||
dL-NRARFCN NRARFCN,
|
||||
uL-Transmission-Bandwidth Transmission-Bandwidth,
|
||||
dL-Transmission-Bandwidth Transmission-Bandwidth,
|
||||
iE-Extensions ProtocolExtensionContainer { {FDD-Info-ExtIEs} } OPTIONAL,
|
||||
...
|
||||
}
|
||||
|
||||
FDD-Info-ExtIEs F1AP-PROTOCOL-EXTENSION ::= {
|
||||
...
|
||||
}
|
||||
|
||||
-- G
|
||||
|
||||
GapOffset ::= OCTET STRING
|
||||
|
||||
GBR-QosInformation ::= SEQUENCE {
|
||||
e-RAB-MaximumBitrateDL BitRate,
|
||||
e-RAB-MaximumBitrateUL BitRate,
|
||||
e-RAB-GuaranteedBitrateDL BitRate,
|
||||
e-RAB-GuaranteedBitrateUL BitRate,
|
||||
iE-Extensions ProtocolExtensionContainer { { GBR-QosInformation-ExtIEs} } OPTIONAL,
|
||||
...
|
||||
}
|
||||
|
||||
GBR-QosInformation-ExtIEs F1AP-PROTOCOL-EXTENSION ::= {
|
||||
...
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
GNB-CU-UE-F1AP-ID ::= INTEGER (0..4294967295)
|
||||
|
||||
GNB-DU-UE-F1AP-ID ::= INTEGER (0..4294967295)
|
||||
|
||||
GNB-DU-ID ::= INTEGER (0..68719476735)
|
||||
|
||||
GNB-CU-Name ::= PrintableString(SIZE(1..150,...))
|
||||
|
||||
GNB-DU-Name ::= PrintableString(SIZE(1..150,...))
|
||||
|
||||
GNB-DU-Served-Cells-Item ::= SEQUENCE {
|
||||
served-Cell-Information Served-Cell-Information,
|
||||
gNB-DU-System-Information GNB-DU-System-Information OPTIONAL,
|
||||
iE-Extensions ProtocolExtensionContainer { { GNB-DU-Served-Cells-ItemExtIEs} } OPTIONAL,
|
||||
...
|
||||
}
|
||||
|
||||
GNB-DU-Served-Cells-ItemExtIEs F1AP-PROTOCOL-EXTENSION ::= {
|
||||
...
|
||||
}
|
||||
|
||||
GNB-DU-System-Information ::= SEQUENCE {
|
||||
mIB-message MIB-message,
|
||||
sIB1-message SIB1-message,
|
||||
iE-Extensions ProtocolExtensionContainer { { GNB-DU-System-Information-ExtIEs } } OPTIONAL,
|
||||
...
|
||||
}
|
||||
|
||||
GNB-DU-System-Information-ExtIEs F1AP-PROTOCOL-EXTENSION ::= {
|
||||
...
|
||||
}
|
||||
|
||||
GTP-TEID ::= OCTET STRING (SIZE (4))
|
||||
|
||||
GTPTunnelEndpoint ::= SEQUENCE {
|
||||
transportLayerAddress TransportLayerAddress,
|
||||
gTP-TEID GTP-TEID,
|
||||
iE-Extensions ProtocolExtensionContainer { { GTPTunnelEndpoint-ExtIEs} } OPTIONAL,
|
||||
...
|
||||
}
|
||||
|
||||
|
||||
GTPTunnelEndpoint-ExtIEs F1AP-PROTOCOL-EXTENSION ::= {
|
||||
...
|
||||
}
|
||||
|
||||
-- H
|
||||
|
||||
-- I
|
||||
|
||||
-- J
|
||||
|
||||
-- K
|
||||
|
||||
-- L
|
||||
|
||||
LongDRXCycleLength ::= ENUMERATED
|
||||
{ms10, ms20, ms32, ms40, ms60, ms64, ms70, ms80, ms128, ms160, ms256, ms320, ms512, ms640, ms1024, ms1280, ms2048, ms2560, ms5120, ms10240, ...}
|
||||
|
||||
-- M
|
||||
|
||||
MIB-message ::= OCTET STRING
|
||||
|
||||
-- N
|
||||
|
||||
NRARFCN ::= INTEGER (0..maxNRARFCN)
|
||||
|
||||
NRCGI ::= SEQUENCE {
|
||||
pLMN-Identity PLMN-Identity,
|
||||
nRCellIdentity NRCellIdentity,
|
||||
iE-Extensions ProtocolExtensionContainer { {NRCGI-ExtIEs} } OPTIONAL,
|
||||
...
|
||||
}
|
||||
|
||||
NRCGI-ExtIEs F1AP-PROTOCOL-EXTENSION ::= {
|
||||
...
|
||||
}
|
||||
|
||||
NR-Mode-Info ::= CHOICE {
|
||||
fDD FDD-Info,
|
||||
tDD TDD-Info,
|
||||
...
|
||||
}
|
||||
|
||||
NRCellIdentity ::= BIT STRING (SIZE(36))
|
||||
|
||||
NRNRB ::= ENUMERATED { nrb11, nrb18, nrb24, nrb25, nrb31, nrb32, nrb38, nrb51, nrb52, nrb65, nrb66, nrb78, nrb79, nrb93, nrb106, nrb107, nrb121, nrb132, nrb133, nrb135, nrb160, nrb162, nrb189, nrb216, nrb217, nrb245, nrb264, nrb270, nrb273, ...}
|
||||
|
||||
NRPCI ::= INTEGER(0..1007)
|
||||
|
||||
NRSCS ::= ENUMERATED { scs15, scs30, scs60, scs120, ...}
|
||||
|
||||
-- O
|
||||
|
||||
-- P
|
||||
|
||||
PLMN-Identity ::= OCTET STRING (SIZE(3))
|
||||
|
||||
Pre-emptionCapability ::= ENUMERATED {
|
||||
shall-not-trigger-pre-emption,
|
||||
may-trigger-pre-emption
|
||||
}
|
||||
|
||||
Pre-emptionVulnerability ::= ENUMERATED {
|
||||
not-pre-emptable,
|
||||
pre-emptable
|
||||
}
|
||||
|
||||
PriorityLevel ::= INTEGER { spare (0), highest (1), lowest (14), no-priority (15) } (0..15)
|
||||
|
||||
Potential-SpCell-Item ::= SEQUENCE {
|
||||
potential-SpCell-ID NRCGI ,
|
||||
iE-Extensions ProtocolExtensionContainer { { Potential-SpCell-ItemExtIEs } } OPTIONAL,
|
||||
...
|
||||
}
|
||||
|
||||
Potential-SpCell-ItemExtIEs F1AP-PROTOCOL-EXTENSION ::= {
|
||||
...
|
||||
}
|
||||
|
||||
-- Q
|
||||
|
||||
QCI ::= INTEGER (0..255)
|
||||
|
||||
-- R
|
||||
|
||||
ResourceCoordinationTransferContainer ::= OCTET STRING
|
||||
|
||||
RLCMode ::= ENUMERATED {
|
||||
rlc-am,
|
||||
rlc-um
|
||||
}
|
||||
|
||||
RRCContainer ::= OCTET STRING
|
||||
|
||||
RRCRconfigurationCompleteIndicator ::= ENUMERATED {true, ...}
|
||||
|
||||
-- S
|
||||
|
||||
SCell-FailedtoSetup-Item ::= SEQUENCE {
|
||||
sCell-ID NRCGI ,
|
||||
cause Cause OPTIONAL ,
|
||||
iE-Extensions ProtocolExtensionContainer { { SCell-FailedtoSetup-ItemExtIEs } } OPTIONAL,
|
||||
...
|
||||
}
|
||||
|
||||
SCell-FailedtoSetup-ItemExtIEs F1AP-PROTOCOL-EXTENSION ::= {
|
||||
...
|
||||
}
|
||||
|
||||
SCell-FailedtoSetupMod-Item ::= SEQUENCE {
|
||||
sCell-ID NRCGI ,
|
||||
cause Cause OPTIONAL ,
|
||||
iE-Extensions ProtocolExtensionContainer { { SCell-FailedtoSetupMod-ItemExtIEs } } OPTIONAL,
|
||||
...
|
||||
}
|
||||
|
||||
SCell-FailedtoSetupMod-ItemExtIEs F1AP-PROTOCOL-EXTENSION ::= {
|
||||
...
|
||||
}
|
||||
|
||||
SCell-ToBeRemoved-Item ::= SEQUENCE {
|
||||
sCell-ID NRCGI ,
|
||||
iE-Extensions ProtocolExtensionContainer { { SCell-ToBeRemoved-ItemExtIEs } } OPTIONAL,
|
||||
...
|
||||
}
|
||||
|
||||
SCell-ToBeRemoved-ItemExtIEs F1AP-PROTOCOL-EXTENSION ::= {
|
||||
...
|
||||
}
|
||||
|
||||
SCell-ToBeSetup-Item ::= SEQUENCE {
|
||||
sCell-ID NRCGI ,
|
||||
sCellIndex SCellIndex,
|
||||
iE-Extensions ProtocolExtensionContainer { { SCell-ToBeSetup-ItemExtIEs } } OPTIONAL,
|
||||
...
|
||||
}
|
||||
|
||||
SCell-ToBeSetup-ItemExtIEs F1AP-PROTOCOL-EXTENSION ::= {
|
||||
...
|
||||
}
|
||||
|
||||
SCell-ToBeSetupMod-Item ::= SEQUENCE {
|
||||
sCell-ID NRCGI ,
|
||||
sCellIndex SCellIndex,
|
||||
iE-Extensions ProtocolExtensionContainer { { SCell-ToBeSetupMod-ItemExtIEs } } OPTIONAL,
|
||||
...
|
||||
}
|
||||
|
||||
SCell-ToBeSetupMod-ItemExtIEs F1AP-PROTOCOL-EXTENSION ::= {
|
||||
...
|
||||
}
|
||||
|
||||
SCellIndex ::=INTEGER (0..31, ...)
|
||||
|
||||
CG-ConfigInfo ::= OCTET STRING
|
||||
|
||||
Served-Cell-Information ::= SEQUENCE {
|
||||
nRCGI NRCGI,
|
||||
nRPCI NRPCI,
|
||||
extended-TAC Extended-TAC,
|
||||
broadcastPLMNs BroadcastPLMNs-Item,
|
||||
nR-Mode-Info NR-Mode-Info,
|
||||
sUL-Information SUL-Information OPTIONAL,
|
||||
measurementTimingConfiguration OCTET STRING,
|
||||
iE-Extensions ProtocolExtensionContainer { {Served-Cell-Information-ExtIEs} } OPTIONAL,
|
||||
...
|
||||
}
|
||||
|
||||
Served-Cell-Information-ExtIEs F1AP-PROTOCOL-EXTENSION ::= {
|
||||
...
|
||||
}
|
||||
|
||||
Served-Cells-To-Add-Item ::= SEQUENCE {
|
||||
served-Cell-Information Served-Cell-Information,
|
||||
gNB-DU-System-Information GNB-DU-System-Information OPTIONAL,
|
||||
iE-Extensions ProtocolExtensionContainer { { Served-Cells-To-Add-ItemExtIEs} } OPTIONAL,
|
||||
...
|
||||
}
|
||||
|
||||
Served-Cells-To-Add-ItemExtIEs F1AP-PROTOCOL-EXTENSION ::= {
|
||||
...
|
||||
}
|
||||
|
||||
Served-Cells-To-Delete-Item ::= SEQUENCE {
|
||||
oldNRCGI NRCGI ,
|
||||
iE-Extensions ProtocolExtensionContainer { { Served-Cells-To-Delete-ItemExtIEs } } OPTIONAL,
|
||||
...
|
||||
}
|
||||
|
||||
Served-Cells-To-Delete-ItemExtIEs F1AP-PROTOCOL-EXTENSION ::= {
|
||||
...
|
||||
}
|
||||
|
||||
Served-Cells-To-Modify-Item ::= SEQUENCE {
|
||||
oldNRCGI NRCGI ,
|
||||
served-Cell-Information Served-Cell-Information ,
|
||||
gNB-DU-System-Information GNB-DU-System-Information OPTIONAL ,
|
||||
iE-Extensions ProtocolExtensionContainer { { Served-Cells-To-Modify-ItemExtIEs } } OPTIONAL,
|
||||
...
|
||||
}
|
||||
|
||||
Served-Cells-To-Modify-ItemExtIEs F1AP-PROTOCOL-EXTENSION ::= {
|
||||
...
|
||||
}
|
||||
|
||||
ShortDRXCycleLength ::= ENUMERATED {ms2, ms3, ms4, ms5, ms6, ms7, ms8, ms10, ms14, ms16, ms20, ms30, ms32, ms35, ms40, ms64, ms80, ms128, ms160, ms256, ms320, ms512, ms640, ...}
|
||||
|
||||
ShortDRXCycleTimer ::= INTEGER (1..16)
|
||||
|
||||
SIB1-message ::= OCTET STRING
|
||||
|
||||
SRBID ::= INTEGER (1..3, ...)
|
||||
|
||||
SRBs-FailedToBeSetup-Item ::= SEQUENCE {
|
||||
sRBID SRBID ,
|
||||
cause Cause OPTIONAL,
|
||||
iE-Extensions ProtocolExtensionContainer { { SRBs-FailedToBeSetup-ItemExtIEs } } OPTIONAL,
|
||||
...
|
||||
}
|
||||
|
||||
SRBs-FailedToBeSetup-ItemExtIEs F1AP-PROTOCOL-EXTENSION ::= {
|
||||
...
|
||||
}
|
||||
|
||||
SRBs-FailedToBeSetupMod-Item ::= SEQUENCE {
|
||||
sRBID SRBID ,
|
||||
cause Cause OPTIONAL,
|
||||
iE-Extensions ProtocolExtensionContainer { { SRBs-FailedToBeSetupMod-ItemExtIEs } } OPTIONAL,
|
||||
...
|
||||
}
|
||||
|
||||
SRBs-FailedToBeSetupMod-ItemExtIEs F1AP-PROTOCOL-EXTENSION ::= {
|
||||
...
|
||||
}
|
||||
|
||||
|
||||
SRBs-Required-ToBeReleased-Item ::= SEQUENCE {
|
||||
sRBID SRBID,
|
||||
iE-Extensions ProtocolExtensionContainer { { SRBs-Required-ToBeReleased-ItemExtIEs } } OPTIONAL,
|
||||
...
|
||||
}
|
||||
|
||||
SRBs-Required-ToBeReleased-ItemExtIEs F1AP-PROTOCOL-EXTENSION ::= {
|
||||
...
|
||||
}
|
||||
|
||||
SRBs-ToBeReleased-Item ::= SEQUENCE {
|
||||
sRBID SRBID,
|
||||
iE-Extensions ProtocolExtensionContainer { { SRBs-ToBeReleased-ItemExtIEs } } OPTIONAL,
|
||||
...
|
||||
}
|
||||
|
||||
SRBs-ToBeReleased-ItemExtIEs F1AP-PROTOCOL-EXTENSION ::= {
|
||||
...
|
||||
}
|
||||
|
||||
SRBs-ToBeSetup-Item ::= SEQUENCE {
|
||||
sRBID SRBID ,
|
||||
iE-Extensions ProtocolExtensionContainer { { SRBs-ToBeSetup-ItemExtIEs } } OPTIONAL,
|
||||
...
|
||||
}
|
||||
|
||||
SRBs-ToBeSetup-ItemExtIEs F1AP-PROTOCOL-EXTENSION ::= {
|
||||
...
|
||||
}
|
||||
|
||||
SRBs-ToBeSetupMod-Item ::= SEQUENCE {
|
||||
sRBID SRBID,
|
||||
iE-Extensions ProtocolExtensionContainer { { SRBs-ToBeSetupMod-ItemExtIEs } } OPTIONAL,
|
||||
...
|
||||
}
|
||||
|
||||
SRBs-ToBeSetupMod-ItemExtIEs F1AP-PROTOCOL-EXTENSION ::= {
|
||||
...
|
||||
}
|
||||
|
||||
SUL-Information ::= SEQUENCE {
|
||||
sUL-NRARFCN NRARFCN,
|
||||
sUL-transmission-Bandwidth Transmission-Bandwidth,
|
||||
iE-Extensions ProtocolExtensionContainer { { SUL-InformationExtIEs} } OPTIONAL,
|
||||
...
|
||||
}
|
||||
|
||||
SUL-InformationExtIEs F1AP-PROTOCOL-EXTENSION ::= {
|
||||
...
|
||||
}
|
||||
|
||||
-- T
|
||||
|
||||
TDD-Info ::= SEQUENCE {
|
||||
nRARFCN NRARFCN,
|
||||
transmission-Bandwidth Transmission-Bandwidth,
|
||||
iE-Extensions ProtocolExtensionContainer { {TDD-Info-ExtIEs} } OPTIONAL,
|
||||
...
|
||||
}
|
||||
|
||||
TDD-Info-ExtIEs F1AP-PROTOCOL-EXTENSION ::= {
|
||||
...
|
||||
}
|
||||
|
||||
TimeToWait ::= ENUMERATED {v1s, v2s, v5s, v10s, v20s, v60s, ...}
|
||||
|
||||
TransportLayerAddress ::= BIT STRING (SIZE(1..160, ...))
|
||||
|
||||
TransactionID ::= INTEGER (0..255, ...)
|
||||
|
||||
Transmission-Bandwidth ::= SEQUENCE {
|
||||
nRSCS NRSCS,
|
||||
nRNRB NRNRB,
|
||||
iE-Extensions ProtocolExtensionContainer { { Transmission-Bandwidth-ExtIEs} } OPTIONAL,
|
||||
...
|
||||
}
|
||||
|
||||
Transmission-Bandwidth-ExtIEs F1AP-PROTOCOL-EXTENSION ::= {
|
||||
...
|
||||
}
|
||||
|
||||
TransmissionStopIndicator ::= ENUMERATED {true, ...}
|
||||
|
||||
TypeOfError ::= ENUMERATED {
|
||||
not-understood,
|
||||
missing,
|
||||
...
|
||||
}
|
||||
|
||||
-- U
|
||||
|
||||
UE-associatedLogicalF1-ConnectionItem ::= SEQUENCE {
|
||||
gNB-CU-UE-F1AP-ID GNB-CU-UE-F1AP-ID OPTIONAL,
|
||||
gNB-DU-UE-F1AP-ID GNB-DU-UE-F1AP-ID OPTIONAL,
|
||||
iE-Extensions ProtocolExtensionContainer { { UE-associatedLogicalF1-ConnectionItemExtIEs} } OPTIONAL,
|
||||
...
|
||||
}
|
||||
|
||||
UE-associatedLogicalF1-ConnectionItemExtIEs F1AP-PROTOCOL-EXTENSION ::= {
|
||||
...
|
||||
}
|
||||
|
||||
UE-CapabilityRAT-ContainerList::= OCTET STRING
|
||||
|
||||
ULConfiguration ::= SEQUENCE {
|
||||
uLUEConfiguration ULUEConfiguration,
|
||||
iE-Extensions ProtocolExtensionContainer { { ULConfigurationExtIEs } } OPTIONAL,
|
||||
...
|
||||
}
|
||||
ULConfigurationExtIEs F1AP-PROTOCOL-EXTENSION ::= {
|
||||
...
|
||||
}
|
||||
|
||||
ULUEConfiguration ::= ENUMERATED {no-data, shared, only, ...}
|
||||
|
||||
|
||||
ULTunnels-ToBeSetup-List ::= SEQUENCE (SIZE(1..maxnoofULTunnels)) OF ULTunnels-ToBeSetup-Item
|
||||
|
||||
ULTunnels-ToBeSetup-Item ::=SEQUENCE {
|
||||
uL-GTP-Tunnel-EndPoint GTPTunnelEndpoint,
|
||||
iE-Extensions ProtocolExtensionContainer { { ULTunnels-ToBeSetup-ItemExtIEs } } OPTIONAL,
|
||||
...
|
||||
}
|
||||
|
||||
ULTunnels-ToBeSetup-ItemExtIEs F1AP-PROTOCOL-EXTENSION ::= {
|
||||
...
|
||||
}
|
||||
|
||||
-- V
|
||||
|
||||
-- W
|
||||
|
||||
-- X
|
||||
|
||||
-- Y
|
||||
|
||||
-- Z
|
||||
|
||||
END
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,258 @@
|
||||
-- **************************************************************
|
||||
--
|
||||
-- Elementary Procedure definitions
|
||||
--
|
||||
-- **************************************************************
|
||||
|
||||
F1AP-PDU-Descriptions {
|
||||
itu-t (0) identified-organization (4) etsi (0) mobileDomain (0)
|
||||
ngran-access (22) modules (3) f1ap (3) version1 (1) f1ap-PDU-Descriptions (0)}
|
||||
|
||||
DEFINITIONS AUTOMATIC TAGS ::=
|
||||
|
||||
BEGIN
|
||||
|
||||
-- **************************************************************
|
||||
--
|
||||
-- IE parameter types from other modules.
|
||||
--
|
||||
-- **************************************************************
|
||||
|
||||
IMPORTS
|
||||
Criticality,
|
||||
ProcedureCode
|
||||
|
||||
FROM F1AP-CommonDataTypes
|
||||
Reset,
|
||||
ResetAcknowledge,
|
||||
F1SetupRequest,
|
||||
F1SetupResponse,
|
||||
F1SetupFailure,
|
||||
GNBDUConfigurationUpdate,
|
||||
GNBDUConfigurationUpdateAcknowledge,
|
||||
GNBDUConfigurationUpdateFailure,
|
||||
GNBCUConfigurationUpdate,
|
||||
GNBCUConfigurationUpdateAcknowledge,
|
||||
GNBCUConfigurationUpdateFailure,
|
||||
UEContextSetupRequest,
|
||||
UEContextSetupResponse,
|
||||
UEContextSetupFailure,
|
||||
UEContextReleaseCommand,
|
||||
UEContextReleaseComplete,
|
||||
UEContextModificationRequest,
|
||||
UEContextModificationResponse,
|
||||
UEContextModificationFailure,
|
||||
UEContextModificationRequired,
|
||||
UEContextModificationConfirm,
|
||||
ErrorIndication,
|
||||
UEContextReleaseRequest,
|
||||
DLRRCMessageTransfer,
|
||||
ULRRCMessageTransfer,
|
||||
PrivateMessage
|
||||
|
||||
FROM F1AP-PDU-Contents
|
||||
id-Reset,
|
||||
id-F1Setup,
|
||||
id-gNBDUConfigurationUpdate,
|
||||
id-gNBCUConfigurationUpdate,
|
||||
id-UEContextSetup,
|
||||
id-UEContextRelease,
|
||||
id-UEContextModification,
|
||||
id-UEContextModificationRequired,
|
||||
id-ErrorIndication,
|
||||
id-UEContextReleaseRequest,
|
||||
id-DLRRCMessageTransfer,
|
||||
id-ULRRCMessageTransfer,
|
||||
id-privateMessage
|
||||
|
||||
|
||||
FROM F1AP-Constants;
|
||||
|
||||
|
||||
-- **************************************************************
|
||||
--
|
||||
-- Interface Elementary Procedure Class
|
||||
--
|
||||
-- **************************************************************
|
||||
|
||||
F1AP-ELEMENTARY-PROCEDURE ::= CLASS {
|
||||
&InitiatingMessage ,
|
||||
&SuccessfulOutcome OPTIONAL,
|
||||
&UnsuccessfulOutcome OPTIONAL,
|
||||
&procedureCode ProcedureCode UNIQUE,
|
||||
&criticality Criticality DEFAULT ignore
|
||||
}
|
||||
WITH SYNTAX {
|
||||
INITIATING MESSAGE &InitiatingMessage
|
||||
[SUCCESSFUL OUTCOME &SuccessfulOutcome]
|
||||
[UNSUCCESSFUL OUTCOME &UnsuccessfulOutcome]
|
||||
PROCEDURE CODE &procedureCode
|
||||
[CRITICALITY &criticality]
|
||||
}
|
||||
|
||||
-- **************************************************************
|
||||
--
|
||||
-- Interface PDU Definition
|
||||
--
|
||||
-- **************************************************************
|
||||
|
||||
F1AP-PDU ::= CHOICE {
|
||||
initiatingMessage InitiatingMessage,
|
||||
successfulOutcome SuccessfulOutcome,
|
||||
unsuccessfulOutcome UnsuccessfulOutcome,
|
||||
...
|
||||
}
|
||||
|
||||
InitiatingMessage ::= SEQUENCE {
|
||||
procedureCode F1AP-ELEMENTARY-PROCEDURE.&procedureCode ({F1AP-ELEMENTARY-PROCEDURES}),
|
||||
criticality F1AP-ELEMENTARY-PROCEDURE.&criticality ({F1AP-ELEMENTARY-PROCEDURES}{@procedureCode}),
|
||||
value F1AP-ELEMENTARY-PROCEDURE.&InitiatingMessage ({F1AP-ELEMENTARY-PROCEDURES}{@procedureCode})
|
||||
}
|
||||
|
||||
SuccessfulOutcome ::= SEQUENCE {
|
||||
procedureCode F1AP-ELEMENTARY-PROCEDURE.&procedureCode ({F1AP-ELEMENTARY-PROCEDURES}),
|
||||
criticality F1AP-ELEMENTARY-PROCEDURE.&criticality ({F1AP-ELEMENTARY-PROCEDURES}{@procedureCode}),
|
||||
value F1AP-ELEMENTARY-PROCEDURE.&SuccessfulOutcome ({F1AP-ELEMENTARY-PROCEDURES}{@procedureCode})
|
||||
}
|
||||
|
||||
UnsuccessfulOutcome ::= SEQUENCE {
|
||||
procedureCode F1AP-ELEMENTARY-PROCEDURE.&procedureCode ({F1AP-ELEMENTARY-PROCEDURES}),
|
||||
criticality F1AP-ELEMENTARY-PROCEDURE.&criticality ({F1AP-ELEMENTARY-PROCEDURES}{@procedureCode}),
|
||||
value F1AP-ELEMENTARY-PROCEDURE.&UnsuccessfulOutcome ({F1AP-ELEMENTARY-PROCEDURES}{@procedureCode})
|
||||
}
|
||||
|
||||
-- **************************************************************
|
||||
--
|
||||
-- Interface Elementary Procedure List
|
||||
--
|
||||
-- **************************************************************
|
||||
|
||||
F1AP-ELEMENTARY-PROCEDURES F1AP-ELEMENTARY-PROCEDURE ::= {
|
||||
F1AP-ELEMENTARY-PROCEDURES-CLASS-1 |
|
||||
F1AP-ELEMENTARY-PROCEDURES-CLASS-2,
|
||||
...
|
||||
}
|
||||
|
||||
|
||||
F1AP-ELEMENTARY-PROCEDURES-CLASS-1 F1AP-ELEMENTARY-PROCEDURE ::= {
|
||||
reset |
|
||||
f1Setup |
|
||||
gNBDUConfigurationUpdate |
|
||||
gNBCUConfigurationUpdate |
|
||||
uEContextSetup |
|
||||
uEContextRelease |
|
||||
uEContextModification |
|
||||
uEContextModificationRequired ,
|
||||
...}
|
||||
|
||||
F1AP-ELEMENTARY-PROCEDURES-CLASS-2 F1AP-ELEMENTARY-PROCEDURE ::= {
|
||||
errorIndication |
|
||||
uEContextReleaseRequest |
|
||||
dLRRCMessageTransfer |
|
||||
uLRRCMessageTransfer |
|
||||
privateMessage ,
|
||||
...
|
||||
}
|
||||
-- **************************************************************
|
||||
--
|
||||
-- Interface Elementary Procedures
|
||||
--
|
||||
-- **************************************************************
|
||||
|
||||
reset F1AP-ELEMENTARY-PROCEDURE ::= {
|
||||
INITIATING MESSAGE Reset
|
||||
SUCCESSFUL OUTCOME ResetAcknowledge
|
||||
PROCEDURE CODE id-Reset
|
||||
CRITICALITY reject
|
||||
}
|
||||
|
||||
f1Setup F1AP-ELEMENTARY-PROCEDURE ::= {
|
||||
INITIATING MESSAGE F1SetupRequest
|
||||
SUCCESSFUL OUTCOME F1SetupResponse
|
||||
UNSUCCESSFUL OUTCOME F1SetupFailure
|
||||
PROCEDURE CODE id-F1Setup
|
||||
CRITICALITY reject
|
||||
}
|
||||
|
||||
gNBDUConfigurationUpdate F1AP-ELEMENTARY-PROCEDURE ::= {
|
||||
INITIATING MESSAGE GNBDUConfigurationUpdate
|
||||
SUCCESSFUL OUTCOME GNBDUConfigurationUpdateAcknowledge
|
||||
UNSUCCESSFUL OUTCOME GNBDUConfigurationUpdateFailure
|
||||
PROCEDURE CODE id-gNBDUConfigurationUpdate
|
||||
CRITICALITY reject
|
||||
}
|
||||
|
||||
gNBCUConfigurationUpdate F1AP-ELEMENTARY-PROCEDURE ::= {
|
||||
INITIATING MESSAGE GNBCUConfigurationUpdate
|
||||
SUCCESSFUL OUTCOME GNBCUConfigurationUpdateAcknowledge
|
||||
UNSUCCESSFUL OUTCOME GNBCUConfigurationUpdateFailure
|
||||
PROCEDURE CODE id-gNBCUConfigurationUpdate
|
||||
CRITICALITY reject
|
||||
}
|
||||
|
||||
uEContextSetup F1AP-ELEMENTARY-PROCEDURE ::= {
|
||||
INITIATING MESSAGE UEContextSetupRequest
|
||||
SUCCESSFUL OUTCOME UEContextSetupResponse
|
||||
UNSUCCESSFUL OUTCOME UEContextSetupFailure
|
||||
PROCEDURE CODE id-UEContextSetup
|
||||
CRITICALITY reject
|
||||
}
|
||||
|
||||
uEContextRelease F1AP-ELEMENTARY-PROCEDURE ::= {
|
||||
INITIATING MESSAGE UEContextReleaseCommand
|
||||
SUCCESSFUL OUTCOME UEContextReleaseComplete
|
||||
PROCEDURE CODE id-UEContextRelease
|
||||
CRITICALITY reject
|
||||
}
|
||||
|
||||
uEContextModification F1AP-ELEMENTARY-PROCEDURE ::= {
|
||||
INITIATING MESSAGE UEContextModificationRequest
|
||||
SUCCESSFUL OUTCOME UEContextModificationResponse
|
||||
UNSUCCESSFUL OUTCOME UEContextModificationFailure
|
||||
PROCEDURE CODE id-UEContextModification
|
||||
CRITICALITY reject
|
||||
}
|
||||
|
||||
uEContextModificationRequired F1AP-ELEMENTARY-PROCEDURE ::= {
|
||||
INITIATING MESSAGE UEContextModificationRequired
|
||||
SUCCESSFUL OUTCOME UEContextModificationConfirm
|
||||
PROCEDURE CODE id-UEContextModificationRequired
|
||||
CRITICALITY reject
|
||||
}
|
||||
|
||||
|
||||
errorIndication F1AP-ELEMENTARY-PROCEDURE ::= {
|
||||
INITIATING MESSAGE ErrorIndication
|
||||
PROCEDURE CODE id-ErrorIndication
|
||||
CRITICALITY ignore
|
||||
}
|
||||
|
||||
uEContextReleaseRequest F1AP-ELEMENTARY-PROCEDURE ::= {
|
||||
INITIATING MESSAGE UEContextReleaseRequest
|
||||
PROCEDURE CODE id-UEContextReleaseRequest
|
||||
CRITICALITY ignore
|
||||
}
|
||||
|
||||
|
||||
dLRRCMessageTransfer F1AP-ELEMENTARY-PROCEDURE ::= {
|
||||
INITIATING MESSAGE DLRRCMessageTransfer
|
||||
PROCEDURE CODE id-DLRRCMessageTransfer
|
||||
CRITICALITY ignore
|
||||
}
|
||||
|
||||
uLRRCMessageTransfer F1AP-ELEMENTARY-PROCEDURE ::= {
|
||||
INITIATING MESSAGE ULRRCMessageTransfer
|
||||
PROCEDURE CODE id-ULRRCMessageTransfer
|
||||
CRITICALITY ignore
|
||||
}
|
||||
|
||||
|
||||
privateMessage F1AP-ELEMENTARY-PROCEDURE ::= {
|
||||
INITIATING MESSAGE PrivateMessage
|
||||
PROCEDURE CODE id-privateMessage
|
||||
CRITICALITY ignore
|
||||
}
|
||||
|
||||
|
||||
|
||||
END
|
||||
@@ -0,0 +1,3 @@
|
||||
#ifndef __ASN1_CONSTANTS_H__
|
||||
#define __ASN1_CONSTANTS_H__
|
||||
#endif
|
||||
@@ -0,0 +1,32 @@
|
||||
-- **************************************************************
|
||||
--
|
||||
-- Common definitions
|
||||
--
|
||||
-- **************************************************************
|
||||
|
||||
F1AP-CommonDataTypes {
|
||||
itu-t (0) identified-organization (4) etsi (0) mobileDomain (0)
|
||||
ngran-access (22) modules (3) f1ap (3) version1 (1) f1ap-CommonDataTypes (3) }
|
||||
|
||||
DEFINITIONS AUTOMATIC TAGS ::=
|
||||
|
||||
BEGIN
|
||||
|
||||
Criticality ::= ENUMERATED { reject, ignore, notify }
|
||||
|
||||
Presence ::= ENUMERATED { optional, conditional, mandatory }
|
||||
|
||||
PrivateIE-ID ::= CHOICE {
|
||||
local INTEGER (0..65535),
|
||||
global OBJECT IDENTIFIER
|
||||
}
|
||||
|
||||
ProcedureCode ::= INTEGER (0..255)
|
||||
|
||||
ProtocolExtensionID ::= INTEGER (0..65535)
|
||||
|
||||
ProtocolIE-ID ::= INTEGER (0..65535)
|
||||
|
||||
TriggeringMessage ::= ENUMERATED { initiating-message, successful-outcome, unsuccessfull-outcome }
|
||||
|
||||
END
|
||||
@@ -0,0 +1,256 @@
|
||||
-- **************************************************************
|
||||
--
|
||||
-- Constant definitions
|
||||
--
|
||||
-- **************************************************************
|
||||
|
||||
F1AP-Constants {
|
||||
itu-t (0) identified-organization (4) etsi (0) mobileDomain (0)
|
||||
ngran-access (22) modules (3) f1ap (3) version1 (1) f1ap-Constants (4) }
|
||||
|
||||
DEFINITIONS AUTOMATIC TAGS ::=
|
||||
|
||||
BEGIN
|
||||
|
||||
-- **************************************************************
|
||||
--
|
||||
-- IE parameter types from other modules.
|
||||
--
|
||||
-- **************************************************************
|
||||
|
||||
IMPORTS
|
||||
ProcedureCode,
|
||||
ProtocolIE-ID
|
||||
|
||||
FROM F1AP-CommonDataTypes;
|
||||
|
||||
|
||||
-- **************************************************************
|
||||
--
|
||||
-- Elementary Procedures
|
||||
--
|
||||
-- **************************************************************
|
||||
|
||||
id-Reset ProcedureCode ::= 0
|
||||
id-F1Setup ProcedureCode ::= 1
|
||||
id-ErrorIndication ProcedureCode ::= 2
|
||||
id-gNBDUConfigurationUpdate ProcedureCode ::= 3
|
||||
id-gNBCUConfigurationUpdate ProcedureCode ::= 4
|
||||
id-UEContextSetup ProcedureCode ::= 5
|
||||
id-UEContextRelease ProcedureCode ::= 6
|
||||
id-UEContextModification ProcedureCode ::= 7
|
||||
id-UEContextModificationRequired ProcedureCode ::= 8
|
||||
id-UEMobilityCommand ProcedureCode ::= 9
|
||||
id-UEContextReleaseRequest ProcedureCode ::= 10
|
||||
id-InitialULRRCMessageTransfer ProcedureCode ::= 11
|
||||
id-DLRRCMessageTransfer ProcedureCode ::= 12
|
||||
id-ULRRCMessageTransfer ProcedureCode ::= 13
|
||||
id-privateMessage ProcedureCode ::= 14
|
||||
id-UEInactivityNotification ProcedureCode ::= 15
|
||||
id-GNBDUResourceCoordination ProcedureCode ::= 16
|
||||
id-SystemInformationDeliveryCommand ProcedureCode ::= 17
|
||||
id-Paging ProcedureCode ::= 18
|
||||
id-Notify ProcedureCode ::= 19
|
||||
id-WriteReplaceWarning ProcedureCode ::= 20
|
||||
id-PWSCancel ProcedureCode ::= 21
|
||||
id-PWSRestartIndication ProcedureCode ::= 22
|
||||
id-PWSFailureIndication ProcedureCode ::= 23
|
||||
|
||||
-- **************************************************************
|
||||
--
|
||||
-- Extension constants
|
||||
--
|
||||
-- **************************************************************
|
||||
|
||||
maxPrivateIEs INTEGER ::= 65535
|
||||
maxProtocolExtensions INTEGER ::= 65535
|
||||
maxProtocolIEs INTEGER ::= 65535
|
||||
-- **************************************************************
|
||||
--
|
||||
-- Lists
|
||||
--
|
||||
-- **************************************************************
|
||||
|
||||
maxNRARFCN INTEGER ::= 3279165
|
||||
maxnoofErrors INTEGER ::= 256
|
||||
maxnoofIndividualF1ConnectionsToReset INTEGER ::= 65536
|
||||
maxCellingNBDU INTEGER ::= 512
|
||||
maxnoofSCells INTEGER ::= 32
|
||||
maxnoofSRBs INTEGER ::= 8
|
||||
maxnoofDRBs INTEGER ::= 64
|
||||
maxnoofULUPTNLInformation INTEGER ::= 2
|
||||
maxnoofDLUPTNLInformation INTEGER ::= 2
|
||||
maxnoofBPLMNs INTEGER ::= 6
|
||||
maxnoofCandidateSpCells INTEGER ::= 64
|
||||
maxnoofPotentialSpCells INTEGER ::= 64
|
||||
maxnoofNrCellBands INTEGER ::= 32
|
||||
maxnoofSIBTypes INTEGER ::= 16
|
||||
maxnoofPagingCells INTEGER ::= 512
|
||||
maxnoofTNLAssociations INTEGER ::= 32
|
||||
maxnoofQoSFlows INTEGER ::= 64
|
||||
maxnoofSliceItems INTEGER ::= 1024
|
||||
maxCellineNB INTEGER ::= 256
|
||||
|
||||
|
||||
-- **************************************************************
|
||||
--
|
||||
-- IEs
|
||||
--
|
||||
-- **************************************************************
|
||||
|
||||
id-Cause ProtocolIE-ID ::= 0
|
||||
id-Cells-Failed-to-be-Activated-List ProtocolIE-ID ::= 1
|
||||
id-Cells-Failed-to-be-Activated-List-Item ProtocolIE-ID ::= 2
|
||||
id-Cells-to-be-Activated-List ProtocolIE-ID ::= 3
|
||||
id-Cells-to-be-Activated-List-Item ProtocolIE-ID ::= 4
|
||||
id-Cells-to-be-Deactivated-List ProtocolIE-ID ::= 5
|
||||
id-Cells-to-be-Deactivated-List-Item ProtocolIE-ID ::= 6
|
||||
id-CriticalityDiagnostics ProtocolIE-ID ::= 7
|
||||
id-CUtoDURRCInformation ProtocolIE-ID ::= 9
|
||||
id-DRBs-FailedToBeModified-Item ProtocolIE-ID ::= 12
|
||||
id-DRBs-FailedToBeModified-List ProtocolIE-ID ::= 13
|
||||
id-DRBs-FailedToBeSetup-Item ProtocolIE-ID ::= 14
|
||||
id-DRBs-FailedToBeSetup-List ProtocolIE-ID ::= 15
|
||||
id-DRBs-FailedToBeSetupMod-Item ProtocolIE-ID ::= 16
|
||||
id-DRBs-FailedToBeSetupMod-List ProtocolIE-ID ::= 17
|
||||
id-DRBs-ModifiedConf-Item ProtocolIE-ID ::= 18
|
||||
id-DRBs-ModifiedConf-List ProtocolIE-ID ::= 19
|
||||
id-DRBs-Modified-Item ProtocolIE-ID ::= 20
|
||||
id-DRBs-Modified-List ProtocolIE-ID ::= 21
|
||||
id-DRBs-Required-ToBeModified-Item ProtocolIE-ID ::= 22
|
||||
id-DRBs-Required-ToBeModified-List ProtocolIE-ID ::= 23
|
||||
id-DRBs-Required-ToBeReleased-Item ProtocolIE-ID ::= 24
|
||||
id-DRBs-Required-ToBeReleased-List ProtocolIE-ID ::= 25
|
||||
id-DRBs-Setup-Item ProtocolIE-ID ::= 26
|
||||
id-DRBs-Setup-List ProtocolIE-ID ::= 27
|
||||
id-DRBs-SetupMod-Item ProtocolIE-ID ::= 28
|
||||
id-DRBs-SetupMod-List ProtocolIE-ID ::= 29
|
||||
id-DRBs-ToBeModified-Item ProtocolIE-ID ::= 30
|
||||
id-DRBs-ToBeModified-List ProtocolIE-ID ::= 31
|
||||
id-DRBs-ToBeReleased-Item ProtocolIE-ID ::= 32
|
||||
id-DRBs-ToBeReleased-List ProtocolIE-ID ::= 33
|
||||
id-DRBs-ToBeSetup-Item ProtocolIE-ID ::= 34
|
||||
id-DRBs-ToBeSetup-List ProtocolIE-ID ::= 35
|
||||
id-DRBs-ToBeSetupMod-Item ProtocolIE-ID ::= 36
|
||||
id-DRBs-ToBeSetupMod-List ProtocolIE-ID ::= 37
|
||||
id-DRXCycle ProtocolIE-ID ::= 38
|
||||
id-DUtoCURRCInformation ProtocolIE-ID ::= 39
|
||||
id-gNB-CU-UE-F1AP-ID ProtocolIE-ID ::= 40
|
||||
id-gNB-DU-UE-F1AP-ID ProtocolIE-ID ::= 41
|
||||
id-gNB-DU-ID ProtocolIE-ID ::= 42
|
||||
id-GNB-DU-Served-Cells-Item ProtocolIE-ID ::= 43
|
||||
id-gNB-DU-Served-Cells-List ProtocolIE-ID ::= 44
|
||||
id-gNB-DU-Name ProtocolIE-ID ::= 45
|
||||
id-NRCellID ProtocolIE-ID ::= 46
|
||||
id-oldgNB-DU-UE-F1AP-ID ProtocolIE-ID ::= 47
|
||||
id-ResetType ProtocolIE-ID ::= 48
|
||||
id-ResourceCoordinationTransferContainer ProtocolIE-ID ::= 49
|
||||
id-RRCContainer ProtocolIE-ID ::= 50
|
||||
id-SCell-ToBeRemoved-Item ProtocolIE-ID ::= 51
|
||||
id-SCell-ToBeRemoved-List ProtocolIE-ID ::= 52
|
||||
id-SCell-ToBeSetup-Item ProtocolIE-ID ::= 53
|
||||
id-SCell-ToBeSetup-List ProtocolIE-ID ::= 54
|
||||
id-SCell-ToBeSetupMod-Item ProtocolIE-ID ::= 55
|
||||
id-SCell-ToBeSetupMod-List ProtocolIE-ID ::= 56
|
||||
id-Served-Cells-To-Add-Item ProtocolIE-ID ::= 57
|
||||
id-Served-Cells-To-Add-List ProtocolIE-ID ::= 58
|
||||
id-Served-Cells-To-Delete-Item ProtocolIE-ID ::= 59
|
||||
id-Served-Cells-To-Delete-List ProtocolIE-ID ::= 60
|
||||
id-Served-Cells-To-Modify-Item ProtocolIE-ID ::= 61
|
||||
id-Served-Cells-To-Modify-List ProtocolIE-ID ::= 62
|
||||
id-SpCell-ID ProtocolIE-ID ::= 63
|
||||
id-SRBID ProtocolIE-ID ::= 64
|
||||
id-SRBs-FailedToBeSetup-Item ProtocolIE-ID ::= 65
|
||||
id-SRBs-FailedToBeSetup-List ProtocolIE-ID ::= 66
|
||||
id-SRBs-FailedToBeSetupMod-Item ProtocolIE-ID ::= 67
|
||||
id-SRBs-FailedToBeSetupMod-List ProtocolIE-ID ::= 68
|
||||
id-SRBs-Required-ToBeReleased-Item ProtocolIE-ID ::= 69
|
||||
id-SRBs-Required-ToBeReleased-List ProtocolIE-ID ::= 70
|
||||
id-SRBs-ToBeReleased-Item ProtocolIE-ID ::= 71
|
||||
id-SRBs-ToBeReleased-List ProtocolIE-ID ::= 72
|
||||
id-SRBs-ToBeSetup-Item ProtocolIE-ID ::= 73
|
||||
id-SRBs-ToBeSetup-List ProtocolIE-ID ::= 74
|
||||
id-SRBs-ToBeSetupMod-Item ProtocolIE-ID ::= 75
|
||||
id-SRBs-ToBeSetupMod-List ProtocolIE-ID ::= 76
|
||||
id-TimeToWait ProtocolIE-ID ::= 77
|
||||
id-TransactionID ProtocolIE-ID ::= 78
|
||||
id-TransmissionStopIndicator ProtocolIE-ID ::= 79
|
||||
id-UE-associatedLogicalF1-ConnectionItem ProtocolIE-ID ::= 80
|
||||
id-UE-associatedLogicalF1-ConnectionListResAck ProtocolIE-ID ::= 81
|
||||
id-gNB-CU-Name ProtocolIE-ID ::= 82
|
||||
id-SCell-FailedtoSetup-List ProtocolIE-ID ::= 83
|
||||
id-SCell-FailedtoSetup-Item ProtocolIE-ID ::= 84
|
||||
id-SCell-FailedtoSetupMod-List ProtocolIE-ID ::= 85
|
||||
id-SCell-FailedtoSetupMod-Item ProtocolIE-ID ::= 86
|
||||
id-RRCRconfigurationCompleteIndicator ProtocolIE-ID ::= 87
|
||||
id-Active-Cells-Item ProtocolIE-ID ::= 88
|
||||
id-Active-Cells-List ProtocolIE-ID ::= 89
|
||||
id-Candidate-SpCell-List ProtocolIE-ID ::= 90
|
||||
id-Candidate-SpCell-Item ProtocolIE-ID ::= 91
|
||||
id-Potential-SpCell-List ProtocolIE-ID ::= 92
|
||||
id-Potential-SpCell-Item ProtocolIE-ID ::= 93
|
||||
id-FullConfiguration ProtocolIE-ID ::= 94
|
||||
id-C-RNTI ProtocolIE-ID ::= 95
|
||||
id-SpCellULConfigured ProtocolIE-ID ::= 96
|
||||
id-InactivityMonitoringRequest ProtocolIE-ID ::= 97
|
||||
id-InactivityMonitoringResponse ProtocolIE-ID ::= 98
|
||||
id-DRB-Activity-Item ProtocolIE-ID ::= 99
|
||||
id-DRB-Activity-List ProtocolIE-ID ::= 100
|
||||
id-EUTRA-NR-CellResourceCoordinationReq-Container ProtocolIE-ID ::= 101
|
||||
id-EUTRA-NR-CellResourceCoordinationReqAck-Container ProtocolIE-ID ::= 102
|
||||
id-SpectrumSharingGroupID ProtocolIE-ID ::= 103
|
||||
id-ListofEUTRACellsinGNBDUCoordination ProtocolIE-ID ::= 104
|
||||
id-Protected-EUTRA-Resources-List ProtocolIE-ID ::= 105
|
||||
id-RequestType ProtocolIE-ID ::= 106
|
||||
id-ServCellndex ProtocolIE-ID ::= 107
|
||||
id-RAT-FrequencyPriorityInformation ProtocolIE-ID ::= 108
|
||||
id-ExecuteDuplication ProtocolIE-ID ::= 109
|
||||
id-NRCGI ProtocolIE-ID ::= 111
|
||||
id-PagingCell-Item ProtocolIE-ID ::= 112
|
||||
id-PagingCell-List ProtocolIE-ID ::= 113
|
||||
id-PagingDRX ProtocolIE-ID ::= 114
|
||||
id-PagingPriority ProtocolIE-ID ::= 115
|
||||
id-SIBtype-List ProtocolIE-ID ::= 116
|
||||
id-UEIdentityIndexValue ProtocolIE-ID ::= 117
|
||||
id-gNB-CUSystemInformation ProtocolIE-ID ::= 118
|
||||
id-HandoverPreparationInformation ProtocolIE-ID ::= 119
|
||||
id-GNB-CU-TNL-Association-To-Add-Item ProtocolIE-ID ::= 120
|
||||
id-GNB-CU-TNL-Association-To-Add-List ProtocolIE-ID ::= 121
|
||||
id-GNB-CU-TNL-Association-To-Remove-Item ProtocolIE-ID ::= 122
|
||||
id-GNB-CU-TNL-Association-To-Remove-List ProtocolIE-ID ::= 123
|
||||
id-GNB-CU-TNL-Association-To-Update-Item ProtocolIE-ID ::= 124
|
||||
id-GNB-CU-TNL-Association-To-Update-List ProtocolIE-ID ::= 125
|
||||
id-MaskedIMEISV ProtocolIE-ID ::= 126
|
||||
id-PagingIdentity ProtocolIE-ID ::= 127
|
||||
id-DUtoCURRCContainer ProtocolIE-ID ::= 128
|
||||
id-Cells-to-be-Barred-List ProtocolIE-ID ::= 129
|
||||
id-Cells-to-be-Barred-Item ProtocolIE-ID ::= 130
|
||||
id-TAISliceSupportList ProtocolIE-ID ::= 131
|
||||
id-GNB-CU-TNL-Association-Setup-List ProtocolIE-ID ::= 132
|
||||
id-GNB-CU-TNL-Association-Setup-Item ProtocolIE-ID ::= 133
|
||||
id-GNB-CU-TNL-Association-Failed-To-Setup-List ProtocolIE-ID ::= 134
|
||||
id-GNB-CU-TNL-Association-Failed-To-Setup-Item ProtocolIE-ID ::= 135
|
||||
id-DRB-Notify-Item ProtocolIE-ID ::= 136
|
||||
id-DRB-Notify-List ProtocolIE-ID ::= 137
|
||||
id-NotficationControl ProtocolIE-ID ::= 138
|
||||
id-RANAC ProtocolIE-ID ::= 139
|
||||
id-PWSSystemInformation ProtocolIE-ID ::= 140
|
||||
id-RepetitionPeriod ProtocolIE-ID ::= 141
|
||||
id-NumberofBroadcastRequest ProtocolIE-ID ::= 142
|
||||
id-ConcurrentWarningMessageIndicator ProtocolIE-ID ::= 143
|
||||
id-Cells-To-Be-Broadcast-List ProtocolIE-ID ::= 144
|
||||
id-Cells-To-Be-Broadcast-Item ProtocolIE-ID ::= 145
|
||||
id-Cells-Broadcast-Completed-List ProtocolIE-ID ::= 146
|
||||
id-Cells-Broadcast-Completed-Item ProtocolIE-ID ::= 147
|
||||
id-Broadcast-To-Be-Cancelled-List ProtocolIE-ID ::= 148
|
||||
id-Broadcast-To-Be-Cancelled-Item ProtocolIE-ID ::= 149
|
||||
id-Cells-Broadcast-Cancelled-List ProtocolIE-ID ::= 150
|
||||
id-Cells-Broadcast-Cancelled-Item ProtocolIE-ID ::= 151
|
||||
id-NR-CGI-List-For-Restart-List ProtocolIE-ID ::= 152
|
||||
id-NR-CGI-List-For-Restart-Item ProtocolIE-ID ::= 153
|
||||
id-PWS-Failed-NR-CGI-List ProtocolIE-ID ::= 154
|
||||
id-PWS-Failed-NR-CGI-Item ProtocolIE-ID ::= 155
|
||||
id-ConfirmedUEID ProtocolIE-ID ::= 156
|
||||
id-Cancel-all-Warning-Messages-Indicator ProtocolIE-ID ::= 157
|
||||
|
||||
END
|
||||
@@ -0,0 +1,184 @@
|
||||
-- **************************************************************
|
||||
--
|
||||
-- Container definitions
|
||||
--
|
||||
-- **************************************************************
|
||||
|
||||
F1AP-Containers {
|
||||
itu-t (0) identified-organization (4) etsi (0) mobileDomain (0)
|
||||
ngran-access (22) modules (3) f1ap (3) version1 (1) f1ap-Containers (5) }
|
||||
|
||||
DEFINITIONS AUTOMATIC TAGS ::=
|
||||
|
||||
BEGIN
|
||||
|
||||
-- **************************************************************
|
||||
--
|
||||
-- IE parameter types from other modules.
|
||||
--
|
||||
-- **************************************************************
|
||||
|
||||
IMPORTS
|
||||
Criticality,
|
||||
Presence,
|
||||
PrivateIE-ID,
|
||||
ProtocolExtensionID,
|
||||
ProtocolIE-ID
|
||||
|
||||
FROM F1AP-CommonDataTypes
|
||||
maxPrivateIEs,
|
||||
maxProtocolExtensions,
|
||||
maxProtocolIEs
|
||||
|
||||
FROM F1AP-Constants;
|
||||
|
||||
-- **************************************************************
|
||||
--
|
||||
-- Class Definition for Protocol IEs
|
||||
--
|
||||
-- **************************************************************
|
||||
|
||||
F1AP-PROTOCOL-IES ::= CLASS {
|
||||
&id ProtocolIE-ID UNIQUE,
|
||||
&criticality Criticality,
|
||||
&Value,
|
||||
&presence Presence
|
||||
}
|
||||
WITH SYNTAX {
|
||||
ID &id
|
||||
CRITICALITY &criticality
|
||||
TYPE &Value
|
||||
PRESENCE &presence
|
||||
}
|
||||
|
||||
-- **************************************************************
|
||||
--
|
||||
-- Class Definition for Protocol IEs
|
||||
--
|
||||
-- **************************************************************
|
||||
|
||||
F1AP-PROTOCOL-IES-PAIR ::= CLASS {
|
||||
&id ProtocolIE-ID UNIQUE,
|
||||
&firstCriticality Criticality,
|
||||
&FirstValue,
|
||||
&secondCriticality Criticality,
|
||||
&SecondValue,
|
||||
&presence Presence
|
||||
}
|
||||
WITH SYNTAX {
|
||||
ID &id
|
||||
FIRST CRITICALITY &firstCriticality
|
||||
FIRST TYPE &FirstValue
|
||||
SECOND CRITICALITY &secondCriticality
|
||||
SECOND TYPE &SecondValue
|
||||
PRESENCE &presence
|
||||
}
|
||||
|
||||
-- **************************************************************
|
||||
--
|
||||
-- Class Definition for Protocol Extensions
|
||||
--
|
||||
-- **************************************************************
|
||||
|
||||
F1AP-PROTOCOL-EXTENSION ::= CLASS {
|
||||
&id ProtocolExtensionID UNIQUE,
|
||||
&criticality Criticality,
|
||||
&Extension,
|
||||
&presence Presence
|
||||
}
|
||||
WITH SYNTAX {
|
||||
ID &id
|
||||
CRITICALITY &criticality
|
||||
EXTENSION &Extension
|
||||
PRESENCE &presence
|
||||
}
|
||||
|
||||
-- **************************************************************
|
||||
--
|
||||
-- Class Definition for Private IEs
|
||||
--
|
||||
-- **************************************************************
|
||||
|
||||
F1AP-PRIVATE-IES ::= CLASS {
|
||||
&id PrivateIE-ID,
|
||||
&criticality Criticality,
|
||||
&Value,
|
||||
&presence Presence
|
||||
}
|
||||
WITH SYNTAX {
|
||||
ID &id
|
||||
CRITICALITY &criticality
|
||||
TYPE &Value
|
||||
PRESENCE &presence
|
||||
}
|
||||
|
||||
-- **************************************************************
|
||||
--
|
||||
-- Container for Protocol IEs
|
||||
--
|
||||
-- **************************************************************
|
||||
|
||||
ProtocolIE-Container {F1AP-PROTOCOL-IES : IEsSetParam} ::=
|
||||
SEQUENCE (SIZE (0..maxProtocolIEs)) OF
|
||||
ProtocolIE-Field {{IEsSetParam}}
|
||||
|
||||
ProtocolIE-SingleContainer {F1AP-PROTOCOL-IES : IEsSetParam} ::=
|
||||
ProtocolIE-Field {{IEsSetParam}}
|
||||
|
||||
ProtocolIE-Field {F1AP-PROTOCOL-IES : IEsSetParam} ::= SEQUENCE {
|
||||
id F1AP-PROTOCOL-IES.&id ({IEsSetParam}),
|
||||
criticality F1AP-PROTOCOL-IES.&criticality ({IEsSetParam}{@id}),
|
||||
value F1AP-PROTOCOL-IES.&Value ({IEsSetParam}{@id})
|
||||
}
|
||||
|
||||
-- **************************************************************
|
||||
--
|
||||
-- Container for Protocol IE Pairs
|
||||
--
|
||||
-- **************************************************************
|
||||
|
||||
ProtocolIE-ContainerPair {F1AP-PROTOCOL-IES-PAIR : IEsSetParam} ::=
|
||||
SEQUENCE (SIZE (0..maxProtocolIEs)) OF
|
||||
ProtocolIE-FieldPair {{IEsSetParam}}
|
||||
|
||||
ProtocolIE-FieldPair {F1AP-PROTOCOL-IES-PAIR : IEsSetParam} ::= SEQUENCE {
|
||||
id F1AP-PROTOCOL-IES-PAIR.&id ({IEsSetParam}),
|
||||
firstCriticality F1AP-PROTOCOL-IES-PAIR.&firstCriticality ({IEsSetParam}{@id}),
|
||||
firstValue F1AP-PROTOCOL-IES-PAIR.&FirstValue ({IEsSetParam}{@id}),
|
||||
secondCriticality F1AP-PROTOCOL-IES-PAIR.&secondCriticality ({IEsSetParam}{@id}),
|
||||
secondValue F1AP-PROTOCOL-IES-PAIR.&SecondValue ({IEsSetParam}{@id})
|
||||
}
|
||||
|
||||
-- **************************************************************
|
||||
--
|
||||
-- Container for Protocol Extensions
|
||||
--
|
||||
-- **************************************************************
|
||||
|
||||
ProtocolExtensionContainer {F1AP-PROTOCOL-EXTENSION : ExtensionSetParam} ::=
|
||||
SEQUENCE (SIZE (1..maxProtocolExtensions)) OF
|
||||
ProtocolExtensionField {{ExtensionSetParam}}
|
||||
|
||||
ProtocolExtensionField {F1AP-PROTOCOL-EXTENSION : ExtensionSetParam} ::= SEQUENCE {
|
||||
id F1AP-PROTOCOL-EXTENSION.&id ({ExtensionSetParam}),
|
||||
criticality F1AP-PROTOCOL-EXTENSION.&criticality ({ExtensionSetParam}{@id}),
|
||||
extensionValue F1AP-PROTOCOL-EXTENSION.&Extension ({ExtensionSetParam}{@id})
|
||||
}
|
||||
|
||||
-- **************************************************************
|
||||
--
|
||||
-- Container for Private IEs
|
||||
--
|
||||
-- **************************************************************
|
||||
|
||||
PrivateIE-Container {F1AP-PRIVATE-IES : IEsSetParam } ::=
|
||||
SEQUENCE (SIZE (1.. maxPrivateIEs)) OF
|
||||
PrivateIE-Field {{IEsSetParam}}
|
||||
|
||||
PrivateIE-Field {F1AP-PRIVATE-IES : IEsSetParam} ::= SEQUENCE {
|
||||
id F1AP-PRIVATE-IES.&id ({IEsSetParam}),
|
||||
criticality F1AP-PRIVATE-IES.&criticality ({IEsSetParam}{@id}),
|
||||
value F1AP-PRIVATE-IES.&Value ({IEsSetParam}{@id})
|
||||
}
|
||||
|
||||
END
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,353 @@
|
||||
-- **************************************************************
|
||||
--
|
||||
-- Elementary Procedure definitions
|
||||
--
|
||||
-- **************************************************************
|
||||
|
||||
F1AP-PDU-Descriptions {
|
||||
itu-t (0) identified-organization (4) etsi (0) mobileDomain (0)
|
||||
ngran-access (22) modules (3) f1ap (3) version1 (1) f1ap-PDU-Descriptions (0)}
|
||||
|
||||
DEFINITIONS AUTOMATIC TAGS ::=
|
||||
|
||||
BEGIN
|
||||
|
||||
-- **************************************************************
|
||||
--
|
||||
-- IE parameter types from other modules.
|
||||
--
|
||||
-- **************************************************************
|
||||
|
||||
IMPORTS
|
||||
Criticality,
|
||||
ProcedureCode
|
||||
|
||||
FROM F1AP-CommonDataTypes
|
||||
Reset,
|
||||
ResetAcknowledge,
|
||||
F1SetupRequest,
|
||||
F1SetupResponse,
|
||||
F1SetupFailure,
|
||||
GNBDUConfigurationUpdate,
|
||||
GNBDUConfigurationUpdateAcknowledge,
|
||||
GNBDUConfigurationUpdateFailure,
|
||||
GNBCUConfigurationUpdate,
|
||||
GNBCUConfigurationUpdateAcknowledge,
|
||||
GNBCUConfigurationUpdateFailure,
|
||||
UEContextSetupRequest,
|
||||
UEContextSetupResponse,
|
||||
UEContextSetupFailure,
|
||||
UEContextReleaseCommand,
|
||||
UEContextReleaseComplete,
|
||||
UEContextModificationRequest,
|
||||
UEContextModificationResponse,
|
||||
UEContextModificationFailure,
|
||||
UEContextModificationRequired,
|
||||
UEContextModificationConfirm,
|
||||
ErrorIndication,
|
||||
UEContextReleaseRequest,
|
||||
DLRRCMessageTransfer,
|
||||
ULRRCMessageTransfer,
|
||||
GNBDUResourceCoordinationRequest,
|
||||
GNBDUResourceCoordinationResponse,
|
||||
PrivateMessage,
|
||||
UEInactivityNotification,
|
||||
InitialULRRCMessageTransfer,
|
||||
SystemInformationDeliveryCommand,
|
||||
Paging,
|
||||
Notify,
|
||||
WriteReplaceWarningRequest,
|
||||
WriteReplaceWarningResponse,
|
||||
PWSCancelRequest,
|
||||
PWSCancelResponse,
|
||||
PWSRestartIndication,
|
||||
PWSFailureIndication
|
||||
|
||||
FROM F1AP-PDU-Contents
|
||||
id-Reset,
|
||||
id-F1Setup,
|
||||
id-gNBDUConfigurationUpdate,
|
||||
id-gNBCUConfigurationUpdate,
|
||||
id-UEContextSetup,
|
||||
id-UEContextRelease,
|
||||
id-UEContextModification,
|
||||
id-UEContextModificationRequired,
|
||||
id-ErrorIndication,
|
||||
id-UEContextReleaseRequest,
|
||||
id-DLRRCMessageTransfer,
|
||||
id-ULRRCMessageTransfer,
|
||||
id-GNBDUResourceCoordination,
|
||||
id-privateMessage,
|
||||
id-UEInactivityNotification,
|
||||
id-InitialULRRCMessageTransfer,
|
||||
id-SystemInformationDeliveryCommand,
|
||||
id-Paging,
|
||||
id-Notify,
|
||||
id-WriteReplaceWarning,
|
||||
id-PWSCancel,
|
||||
id-PWSRestartIndication,
|
||||
id-PWSFailureIndication
|
||||
|
||||
|
||||
FROM F1AP-Constants;
|
||||
|
||||
|
||||
-- **************************************************************
|
||||
--
|
||||
-- Interface Elementary Procedure Class
|
||||
--
|
||||
-- **************************************************************
|
||||
|
||||
F1AP-ELEMENTARY-PROCEDURE ::= CLASS {
|
||||
&InitiatingMessage ,
|
||||
&SuccessfulOutcome OPTIONAL,
|
||||
&UnsuccessfulOutcome OPTIONAL,
|
||||
&procedureCode ProcedureCode UNIQUE,
|
||||
&criticality Criticality DEFAULT ignore
|
||||
}
|
||||
WITH SYNTAX {
|
||||
INITIATING MESSAGE &InitiatingMessage
|
||||
[SUCCESSFUL OUTCOME &SuccessfulOutcome]
|
||||
[UNSUCCESSFUL OUTCOME &UnsuccessfulOutcome]
|
||||
PROCEDURE CODE &procedureCode
|
||||
[CRITICALITY &criticality]
|
||||
}
|
||||
|
||||
-- **************************************************************
|
||||
--
|
||||
-- Interface PDU Definition
|
||||
--
|
||||
-- **************************************************************
|
||||
|
||||
F1AP-PDU ::= CHOICE {
|
||||
initiatingMessage InitiatingMessage,
|
||||
successfulOutcome SuccessfulOutcome,
|
||||
unsuccessfulOutcome UnsuccessfulOutcome,
|
||||
...
|
||||
}
|
||||
|
||||
InitiatingMessage ::= SEQUENCE {
|
||||
procedureCode F1AP-ELEMENTARY-PROCEDURE.&procedureCode ({F1AP-ELEMENTARY-PROCEDURES}),
|
||||
criticality F1AP-ELEMENTARY-PROCEDURE.&criticality ({F1AP-ELEMENTARY-PROCEDURES}{@procedureCode}),
|
||||
value F1AP-ELEMENTARY-PROCEDURE.&InitiatingMessage ({F1AP-ELEMENTARY-PROCEDURES}{@procedureCode})
|
||||
}
|
||||
|
||||
SuccessfulOutcome ::= SEQUENCE {
|
||||
procedureCode F1AP-ELEMENTARY-PROCEDURE.&procedureCode ({F1AP-ELEMENTARY-PROCEDURES}),
|
||||
criticality F1AP-ELEMENTARY-PROCEDURE.&criticality ({F1AP-ELEMENTARY-PROCEDURES}{@procedureCode}),
|
||||
value F1AP-ELEMENTARY-PROCEDURE.&SuccessfulOutcome ({F1AP-ELEMENTARY-PROCEDURES}{@procedureCode})
|
||||
}
|
||||
|
||||
UnsuccessfulOutcome ::= SEQUENCE {
|
||||
procedureCode F1AP-ELEMENTARY-PROCEDURE.&procedureCode ({F1AP-ELEMENTARY-PROCEDURES}),
|
||||
criticality F1AP-ELEMENTARY-PROCEDURE.&criticality ({F1AP-ELEMENTARY-PROCEDURES}{@procedureCode}),
|
||||
value F1AP-ELEMENTARY-PROCEDURE.&UnsuccessfulOutcome ({F1AP-ELEMENTARY-PROCEDURES}{@procedureCode})
|
||||
}
|
||||
|
||||
-- **************************************************************
|
||||
--
|
||||
-- Interface Elementary Procedure List
|
||||
--
|
||||
-- **************************************************************
|
||||
|
||||
F1AP-ELEMENTARY-PROCEDURES F1AP-ELEMENTARY-PROCEDURE ::= {
|
||||
F1AP-ELEMENTARY-PROCEDURES-CLASS-1 |
|
||||
F1AP-ELEMENTARY-PROCEDURES-CLASS-2,
|
||||
...
|
||||
}
|
||||
|
||||
|
||||
F1AP-ELEMENTARY-PROCEDURES-CLASS-1 F1AP-ELEMENTARY-PROCEDURE ::= {
|
||||
reset |
|
||||
f1Setup |
|
||||
gNBDUConfigurationUpdate |
|
||||
gNBCUConfigurationUpdate |
|
||||
uEContextSetup |
|
||||
uEContextRelease |
|
||||
uEContextModification |
|
||||
uEContextModificationRequired |
|
||||
writeReplaceWarning |
|
||||
pWSCancel |
|
||||
gNBDUResourceCoordination ,
|
||||
...}
|
||||
|
||||
F1AP-ELEMENTARY-PROCEDURES-CLASS-2 F1AP-ELEMENTARY-PROCEDURE ::= {
|
||||
errorIndication |
|
||||
uEContextReleaseRequest |
|
||||
dLRRCMessageTransfer |
|
||||
uLRRCMessageTransfer |
|
||||
uEInactivityNotification |
|
||||
privateMessage |
|
||||
initialULRRCMessageTransfer |
|
||||
systemInformationDelivery |
|
||||
paging |
|
||||
notify |
|
||||
pWSRestartIndication |
|
||||
pWSFailureIndication ,
|
||||
...
|
||||
}
|
||||
-- **************************************************************
|
||||
--
|
||||
-- Interface Elementary Procedures
|
||||
--
|
||||
-- **************************************************************
|
||||
|
||||
reset F1AP-ELEMENTARY-PROCEDURE ::= {
|
||||
INITIATING MESSAGE Reset
|
||||
SUCCESSFUL OUTCOME ResetAcknowledge
|
||||
PROCEDURE CODE id-Reset
|
||||
CRITICALITY reject
|
||||
}
|
||||
|
||||
f1Setup F1AP-ELEMENTARY-PROCEDURE ::= {
|
||||
INITIATING MESSAGE F1SetupRequest
|
||||
SUCCESSFUL OUTCOME F1SetupResponse
|
||||
UNSUCCESSFUL OUTCOME F1SetupFailure
|
||||
PROCEDURE CODE id-F1Setup
|
||||
CRITICALITY reject
|
||||
}
|
||||
|
||||
gNBDUConfigurationUpdate F1AP-ELEMENTARY-PROCEDURE ::= {
|
||||
INITIATING MESSAGE GNBDUConfigurationUpdate
|
||||
SUCCESSFUL OUTCOME GNBDUConfigurationUpdateAcknowledge
|
||||
UNSUCCESSFUL OUTCOME GNBDUConfigurationUpdateFailure
|
||||
PROCEDURE CODE id-gNBDUConfigurationUpdate
|
||||
CRITICALITY reject
|
||||
}
|
||||
|
||||
gNBCUConfigurationUpdate F1AP-ELEMENTARY-PROCEDURE ::= {
|
||||
INITIATING MESSAGE GNBCUConfigurationUpdate
|
||||
SUCCESSFUL OUTCOME GNBCUConfigurationUpdateAcknowledge
|
||||
UNSUCCESSFUL OUTCOME GNBCUConfigurationUpdateFailure
|
||||
PROCEDURE CODE id-gNBCUConfigurationUpdate
|
||||
CRITICALITY reject
|
||||
}
|
||||
|
||||
uEContextSetup F1AP-ELEMENTARY-PROCEDURE ::= {
|
||||
INITIATING MESSAGE UEContextSetupRequest
|
||||
SUCCESSFUL OUTCOME UEContextSetupResponse
|
||||
UNSUCCESSFUL OUTCOME UEContextSetupFailure
|
||||
PROCEDURE CODE id-UEContextSetup
|
||||
CRITICALITY reject
|
||||
}
|
||||
|
||||
uEContextRelease F1AP-ELEMENTARY-PROCEDURE ::= {
|
||||
INITIATING MESSAGE UEContextReleaseCommand
|
||||
SUCCESSFUL OUTCOME UEContextReleaseComplete
|
||||
PROCEDURE CODE id-UEContextRelease
|
||||
CRITICALITY reject
|
||||
}
|
||||
|
||||
uEContextModification F1AP-ELEMENTARY-PROCEDURE ::= {
|
||||
INITIATING MESSAGE UEContextModificationRequest
|
||||
SUCCESSFUL OUTCOME UEContextModificationResponse
|
||||
UNSUCCESSFUL OUTCOME UEContextModificationFailure
|
||||
PROCEDURE CODE id-UEContextModification
|
||||
CRITICALITY reject
|
||||
}
|
||||
|
||||
uEContextModificationRequired F1AP-ELEMENTARY-PROCEDURE ::= {
|
||||
INITIATING MESSAGE UEContextModificationRequired
|
||||
SUCCESSFUL OUTCOME UEContextModificationConfirm
|
||||
PROCEDURE CODE id-UEContextModificationRequired
|
||||
CRITICALITY reject
|
||||
}
|
||||
|
||||
writeReplaceWarning F1AP-ELEMENTARY-PROCEDURE ::= {
|
||||
INITIATING MESSAGE WriteReplaceWarningRequest
|
||||
SUCCESSFUL OUTCOME WriteReplaceWarningResponse
|
||||
PROCEDURE CODE id-WriteReplaceWarning
|
||||
CRITICALITY reject
|
||||
}
|
||||
|
||||
pWSCancel F1AP-ELEMENTARY-PROCEDURE ::= {
|
||||
INITIATING MESSAGE PWSCancelRequest
|
||||
SUCCESSFUL OUTCOME PWSCancelResponse
|
||||
PROCEDURE CODE id-PWSCancel
|
||||
CRITICALITY reject
|
||||
}
|
||||
|
||||
errorIndication F1AP-ELEMENTARY-PROCEDURE ::= {
|
||||
INITIATING MESSAGE ErrorIndication
|
||||
PROCEDURE CODE id-ErrorIndication
|
||||
CRITICALITY ignore
|
||||
}
|
||||
|
||||
uEContextReleaseRequest F1AP-ELEMENTARY-PROCEDURE ::= {
|
||||
INITIATING MESSAGE UEContextReleaseRequest
|
||||
PROCEDURE CODE id-UEContextReleaseRequest
|
||||
CRITICALITY ignore
|
||||
}
|
||||
|
||||
|
||||
initialULRRCMessageTransfer F1AP-ELEMENTARY-PROCEDURE ::= {
|
||||
INITIATING MESSAGE InitialULRRCMessageTransfer
|
||||
PROCEDURE CODE id-InitialULRRCMessageTransfer
|
||||
CRITICALITY ignore
|
||||
}
|
||||
|
||||
dLRRCMessageTransfer F1AP-ELEMENTARY-PROCEDURE ::= {
|
||||
INITIATING MESSAGE DLRRCMessageTransfer
|
||||
PROCEDURE CODE id-DLRRCMessageTransfer
|
||||
CRITICALITY ignore
|
||||
}
|
||||
|
||||
uLRRCMessageTransfer F1AP-ELEMENTARY-PROCEDURE ::= {
|
||||
INITIATING MESSAGE ULRRCMessageTransfer
|
||||
PROCEDURE CODE id-ULRRCMessageTransfer
|
||||
CRITICALITY ignore
|
||||
}
|
||||
|
||||
|
||||
uEInactivityNotification F1AP-ELEMENTARY-PROCEDURE ::= {
|
||||
INITIATING MESSAGE UEInactivityNotification
|
||||
PROCEDURE CODE id-UEInactivityNotification
|
||||
CRITICALITY ignore
|
||||
}
|
||||
|
||||
gNBDUResourceCoordination F1AP-ELEMENTARY-PROCEDURE ::= {
|
||||
INITIATING MESSAGE GNBDUResourceCoordinationRequest
|
||||
SUCCESSFUL OUTCOME GNBDUResourceCoordinationResponse
|
||||
PROCEDURE CODE id-GNBDUResourceCoordination
|
||||
CRITICALITY reject
|
||||
}
|
||||
|
||||
privateMessage F1AP-ELEMENTARY-PROCEDURE ::= {
|
||||
INITIATING MESSAGE PrivateMessage
|
||||
PROCEDURE CODE id-privateMessage
|
||||
CRITICALITY ignore
|
||||
}
|
||||
|
||||
systemInformationDelivery F1AP-ELEMENTARY-PROCEDURE ::= {
|
||||
INITIATING MESSAGE SystemInformationDeliveryCommand
|
||||
PROCEDURE CODE id-SystemInformationDeliveryCommand
|
||||
CRITICALITY ignore
|
||||
}
|
||||
|
||||
|
||||
paging F1AP-ELEMENTARY-PROCEDURE ::= {
|
||||
INITIATING MESSAGE Paging
|
||||
PROCEDURE CODE id-Paging
|
||||
CRITICALITY ignore
|
||||
}
|
||||
|
||||
notify F1AP-ELEMENTARY-PROCEDURE ::= {
|
||||
INITIATING MESSAGE Notify
|
||||
PROCEDURE CODE id-Notify
|
||||
CRITICALITY ignore
|
||||
}
|
||||
|
||||
pWSRestartIndication F1AP-ELEMENTARY-PROCEDURE ::= {
|
||||
INITIATING MESSAGE PWSRestartIndication
|
||||
PROCEDURE CODE id-PWSRestartIndication
|
||||
CRITICALITY ignore
|
||||
}
|
||||
|
||||
pWSFailureIndication F1AP-ELEMENTARY-PROCEDURE ::= {
|
||||
INITIATING MESSAGE PWSFailureIndication
|
||||
PROCEDURE CODE id-PWSFailureIndication
|
||||
CRITICALITY ignore
|
||||
}
|
||||
|
||||
|
||||
END
|
||||
@@ -0,0 +1,697 @@
|
||||
import re, os, sys, string
|
||||
import datetime
|
||||
import getopt
|
||||
import getpass
|
||||
|
||||
version = "1.0.2"
|
||||
|
||||
lines = ""
|
||||
iesDefs = {}
|
||||
ieofielist = {}
|
||||
outdir = './'
|
||||
|
||||
filenames = []
|
||||
verbosity = 0
|
||||
prefix = ""
|
||||
|
||||
FAIL = '\033[91m'
|
||||
WARN = '\033[93m'
|
||||
ENDC = '\033[0m'
|
||||
|
||||
fileprefix = ""
|
||||
fileprefix_first_upper = ""
|
||||
|
||||
def printFail(string):
|
||||
sys.stderr.write(FAIL + string + ENDC + "\n")
|
||||
|
||||
def printWarning(string):
|
||||
print WARN + string + ENDC
|
||||
|
||||
def printDebug(string):
|
||||
if verbosity > 0:
|
||||
print string
|
||||
|
||||
def outputHeaderToFile(f, filename):
|
||||
now = datetime.datetime.now()
|
||||
f.write("""/*
|
||||
* 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
|
||||
* the OAI Public License, Version 1.1 (the "License"); you may not use this file
|
||||
* 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
|
||||
*/
|
||||
|
||||
""")
|
||||
f.write("/*******************************************************************************\n")
|
||||
f.write(" * This file had been created by asn1tostruct.py script v%s\n" % (version))
|
||||
f.write(" * Please do not modify this file but regenerate it via script.\n")
|
||||
f.write(" * Created on: %s by %s\n * from %s\n" % (str(now), getpass.getuser(), filenames))
|
||||
f.write(" ******************************************************************************/\n")
|
||||
|
||||
def lowerFirstCamelWord(word):
|
||||
""" puts the first word in a CamelCase Word in lowercase.
|
||||
|
||||
I.e. CustomerID becomes customerID, XMLInfoTest becomes xmlInfoTest
|
||||
"""
|
||||
newstr = ''
|
||||
swapped = word.swapcase()
|
||||
idx = 0
|
||||
|
||||
# if it's all-caps, return an all-lowered version
|
||||
lowered = word.lower()
|
||||
|
||||
if swapped == lowered:
|
||||
return lowered
|
||||
|
||||
for c in swapped:
|
||||
if c in string.lowercase:
|
||||
newstr += c
|
||||
idx += 1
|
||||
else:
|
||||
break
|
||||
if idx < 2:
|
||||
newstr += word[idx:]
|
||||
else:
|
||||
newstr = newstr[:-1]+ word[idx-1:]
|
||||
|
||||
return newstr
|
||||
|
||||
def usage():
|
||||
print "Python parser for asn1 v%s" % (version)
|
||||
print "Usage: python asn1tostruct.py [options]"
|
||||
print "Available options:"
|
||||
print "-d Enable script debug"
|
||||
print "-f [file] Input file to parse"
|
||||
print "-o [dir] Output files to given directory"
|
||||
print "-h Print this help and return"
|
||||
|
||||
try:
|
||||
opts, args = getopt.getopt(sys.argv[1:], "df:ho:", ["debug", "file", "help", "outdir"])
|
||||
except getopt.GetoptError as err:
|
||||
# print help information and exit:
|
||||
usage()
|
||||
sys.exit(2)
|
||||
|
||||
for o, a in opts:
|
||||
if o in ("-f", "--file"):
|
||||
filenames.append(a)
|
||||
if o in ("-d", "--debug"):
|
||||
verbosity = 1
|
||||
if o in ("-o", "--outdir"):
|
||||
outdir = a
|
||||
if outdir.rfind('/') != len(outdir):
|
||||
outdir += '/'
|
||||
if o in ("-h", "--help"):
|
||||
usage()
|
||||
sys.exit(2)
|
||||
|
||||
for filename in filenames:
|
||||
file = open(filename, 'r')
|
||||
for line in file:
|
||||
# Removing any comment
|
||||
if line.find('--') >= 0:
|
||||
line = line[:line.find('--')]
|
||||
# Removing any carriage return
|
||||
lines += re.sub('\r', '', line)
|
||||
|
||||
for m in re.findall(r'([a-zA-Z0-9-]+)\s*::=\s+SEQUENCE\s+\(\s*SIZE\s*\(\s*\d+\s*\.\.\s*[0-9a-zA-Z-]+\s*\)\s*\)\s*OF\s+[a-zA-Z-]+\s*\{\s*\{\s*([0-9a-zA-Z-]+)\s*\}\s*\}', lines, re.MULTILINE):
|
||||
ieofielist[m[0]] = m[1]
|
||||
for m in re.findall(r'([a-zA-Z0-9-]+)\s*::=\s+E-RAB-IE-ContainerList\s*\{\s*\{\s*([a-zA-Z0-9-]+)\s*\}\s*\}', lines, re.MULTILINE):
|
||||
ieofielist[m[0]] = m[1]
|
||||
|
||||
for i in re.findall(r'([a-zA-Z0-9-]+)\s+([A-Z0-9-]+)\s*::=\s*\{\s+([\,\|\{\}\t\n\.{3}\ \-a-zA-Z0-9]+)\s+}\n?', lines, re.MULTILINE):
|
||||
ies = []
|
||||
maxLength = 0
|
||||
# TODO: handle extensions
|
||||
if i[1].find('EXTENSION') >= 0:
|
||||
continue
|
||||
if fileprefix == "":
|
||||
fileprefix = i[1][:i[1].find('-')].lower()
|
||||
for j in re.findall(r'\s*\{\s*([a-zA-Z0-9-\ \t]+)\s*\}\s*[\|,]*', i[2], re.MULTILINE):
|
||||
for k in re.findall(r'ID\s*([a-zA-Z0-9\-]+)\s*CRITICALITY\s*([a-zA-Z0-9\-]+)\s+[A-Z]+\s+([a-zA-Z0-9\-]+)\s*PRESENCE\s*([a-zA-Z0-9\-]+)', j, re.MULTILINE):
|
||||
printDebug("Got new ie for message " + i[0] + ": " + str(k))
|
||||
if len(k[2]) > maxLength:
|
||||
maxLength = len(k[2])
|
||||
ies.append(k)
|
||||
|
||||
if len(ies) > 0:
|
||||
iesDefs[i[0]] = { "length": maxLength, "ies": ies }
|
||||
else:
|
||||
printWarning("Didn't find any information element for message: " + i[0])
|
||||
|
||||
if len(iesDefs) == 0:
|
||||
printFail("No Information Element parsed, exiting")
|
||||
sys.exit(0)
|
||||
|
||||
fileprefix_first_upper = fileprefix[0].upper() + fileprefix[1:]
|
||||
|
||||
f = open(outdir + fileprefix + '_ies_defs.h', 'w')
|
||||
outputHeaderToFile(f, filename)
|
||||
f.write("#include \"%s_common.h\"\n\n" % (fileprefix))
|
||||
f.write("#ifndef %s_IES_DEFS_H_\n#define %s_IES_DEFS_H_\n\n" % (fileprefix.upper(), fileprefix.upper()))
|
||||
f.write("/* Define the version of script used to generate this file */\n")
|
||||
f.write("#define %s_SCRIPT_VERSION (%s)\n\n" % (fileprefix.upper(), re.sub('\.', '', version)))
|
||||
|
||||
for key in iesDefs:
|
||||
|
||||
if key not in ieofielist.values():
|
||||
continue
|
||||
|
||||
for (i, j) in ieofielist.items():
|
||||
if j == key:
|
||||
break
|
||||
|
||||
f.write("typedef struct %sIEs_s {\n" % (re.sub('-', '_', i)))
|
||||
f.write(" A_SEQUENCE_OF(struct %s_s) %s;\n" % (re.sub('IEs', '', re.sub('-', '_', ieofielist[i])), lowerFirstCamelWord(re.sub('IEs', '', re.sub('-', '_', ieofielist[i])))))
|
||||
f.write("} %sIEs_t;\n\n" % (re.sub('-', '_', i)))
|
||||
|
||||
for key in iesDefs:
|
||||
keyupperunderscore = re.sub('-', '_', key.upper())
|
||||
keylowerunderscore = re.sub('-', '_', key.lower())
|
||||
shift = 0
|
||||
|
||||
if len(iesDefs[key]["ies"]) == 0:
|
||||
continue
|
||||
|
||||
# Presence mask
|
||||
for ie in iesDefs[key]["ies"]:
|
||||
ieupperunderscore = re.sub('-', '_', re.sub('id-', '', ie[0])).upper()
|
||||
|
||||
if ie[3] == "optional" or ie[3] == "conditional":
|
||||
f.write("#define {0:<{pad}} {1}\n".format("%s_%s_PRESENT" % (keyupperunderscore, ieupperunderscore), "(1 << %d)" % shift,
|
||||
pad=iesDefs[key]["length"] + len(keyupperunderscore) + 9))
|
||||
shift += 1
|
||||
if (shift > 0):
|
||||
f.write("\n")
|
||||
|
||||
f.write("typedef struct %s_s {\n" % (re.sub('-', '_', key)))
|
||||
if (shift > 0):
|
||||
f.write(" {0:<{pad}} {1};\n".format("uint16_t", "presenceMask", pad=iesDefs[key]["length"] + 2))
|
||||
for ie in iesDefs[key]["ies"]:
|
||||
ieunderscore = re.sub('-', '_', ie[2])
|
||||
iename = re.sub('id-', '', ie[0])
|
||||
ienameunderscore = lowerFirstCamelWord(re.sub('-', '_', iename))
|
||||
if ie[2] in ieofielist:
|
||||
f.write(" %sIEs_t %s;" % (re.sub('-', '_', ie[2]), ienameunderscore))
|
||||
else:
|
||||
f.write(" {0:<{pad}} {1};".format("%s_t" % ieunderscore, ienameunderscore, pad=iesDefs[key]["length"] + 2))
|
||||
if ie[3] == "optional":
|
||||
f.write(" ///< Optional field")
|
||||
elif ie[3] == "conditional":
|
||||
f.write(" ///< Conditional field")
|
||||
f.write("\n")
|
||||
|
||||
f.write("} %s_t;\n\n" % (re.sub('-', '_', key)))
|
||||
|
||||
f.write("typedef struct %s_message_s {\n" % (fileprefix))
|
||||
f.write(" %s_ProcedureCode_t procedureCode;\n" % (fileprefix_first_upper))
|
||||
f.write(" %s_Criticality_t criticality;\n" % (fileprefix_first_upper))
|
||||
f.write(" uint8_t direction;\n")
|
||||
f.write(" union {\n")
|
||||
|
||||
messageList = iesDefs.keys()
|
||||
messageList.sort()
|
||||
for message in messageList:
|
||||
if message in ieofielist.values():
|
||||
continue
|
||||
if len(iesDefs[message]["ies"]) == 0:
|
||||
continue
|
||||
f.write(" %s_t %s;\n" % (re.sub('-', '_', message), lowerFirstCamelWord(re.sub('-', '_', message))))
|
||||
f.write(" } msg;\n")
|
||||
f.write("} %s_message;\n\n" % (fileprefix))
|
||||
|
||||
for key in iesDefs:
|
||||
if key in ieofielist.values():
|
||||
continue
|
||||
structName = re.sub('ies', '', key)
|
||||
asn1cStruct = re.sub('-', '_', re.sub('IEs', '', re.sub('-IEs', '', key)))
|
||||
asn1cStruct = re.sub('Item', 'List', asn1cStruct)
|
||||
keylowerunderscore = re.sub('-', '_', key.lower())
|
||||
firstlower = re.sub('Item', 'List', re.sub('enb', 'eNB', lowerFirstCamelWord(asn1cStruct)))
|
||||
f.write("/** \\brief Decode function for %s ies.\n" % (key))
|
||||
if len(iesDefs[key]["ies"]) != 0:
|
||||
f.write(" * \\param %s Pointer to ASN1 structure in which data will be stored\n" % (lowerFirstCamelWord(re.sub('-', '_', key))))
|
||||
f.write(" * \\param any_p Pointer to the ANY value to decode.\n")
|
||||
f.write(" **/\n")
|
||||
f.write("int %s_decode_%s(\n" % (fileprefix, keylowerunderscore))
|
||||
|
||||
if len(iesDefs[key]["ies"]) != 0:
|
||||
f.write(" %s_t *%s,\n" % (re.sub('-', '_', key), lowerFirstCamelWord(re.sub('-', '_', key))))
|
||||
f.write(" ANY_t *any_p);\n\n")
|
||||
|
||||
if len(iesDefs[key]["ies"]) == 0:
|
||||
continue
|
||||
|
||||
f.write("/** \\brief Encode function for %s ies.\n" % (key))
|
||||
f.write(" * \\param %s Pointer to the ASN1 structure.\n" % (firstlower))
|
||||
f.write(" * \\param %s Pointer to the IES structure.\n" % (lowerFirstCamelWord(re.sub('-', '_', key))))
|
||||
f.write(" **/\n")
|
||||
f.write("int %s_encode_%s(\n" % (fileprefix, re.sub('-', '_', structName.lower())))
|
||||
f.write(" %s_t *%s,\n" % (asn1cStruct, firstlower))
|
||||
f.write(" %s_t *%s);\n\n" % (re.sub('-', '_', key), lowerFirstCamelWord(re.sub('-', '_', key))))
|
||||
|
||||
for key in iesDefs:
|
||||
if key not in ieofielist.values():
|
||||
continue
|
||||
asn1cStruct = re.sub('-', '_', re.sub('IEs', '', key))
|
||||
asn1cStruct = re.sub('Item', 'List', asn1cStruct)
|
||||
firstlower = re.sub('Item', 'List', re.sub('enb', 'eNB', lowerFirstCamelWord(asn1cStruct)))
|
||||
f.write("/** \\brief Encode function for %s ies.\n" % (key))
|
||||
f.write(" * \\param %s Pointer to the ASN1 structure.\n" % (firstlower))
|
||||
f.write(" * \\param %s Pointer to the IES structure.\n" % (lowerFirstCamelWord(re.sub('-', '_', key))))
|
||||
f.write(" **/\n")
|
||||
f.write("int %s_encode_%s(\n" % (fileprefix, firstlower.lower()))
|
||||
f.write(" %s_t *%s,\n" % (asn1cStruct, firstlower))
|
||||
f.write(" %sIEs_t *%sIEs);\n\n" % (asn1cStruct, firstlower))
|
||||
f.write("/** \\brief Decode function for %s ies.\n" % (key))
|
||||
f.write(" * \\param any_p Pointer to the ANY value to decode.\n")
|
||||
f.write(" * \\param callback Callback function called when any_p is successfully decoded.\n")
|
||||
f.write(" **/\n")
|
||||
f.write("int %s_decode_%s(\n" % (fileprefix, firstlower.lower()))
|
||||
f.write(" %sIEs_t *%sIEs,\n" % (asn1cStruct, firstlower))
|
||||
f.write(" %s_t *%s);\n\n" % (asn1cStruct, lowerFirstCamelWord(asn1cStruct)))
|
||||
|
||||
for key in iesDefs:
|
||||
asn1cStruct = re.sub('-', '_', re.sub('IEs', '', key))
|
||||
asn1cStruct = re.sub('Item', 'List', asn1cStruct)
|
||||
firstlower = re.sub('Item', 'List', re.sub('enb', 'eNB', lowerFirstCamelWord(asn1cStruct)))
|
||||
|
||||
if key in ieofielist.values():
|
||||
f.write("/** \\brief Display %s encapsulated IE using XER encoding.\n" % (asn1cStruct))
|
||||
f.write(" * \\param %s Pointer to the IES structure.\n" % (lowerFirstCamelWord(re.sub('-', '_', key))))
|
||||
f.write(" * \\param file File descriptor to write output.\n")
|
||||
f.write(" **/\n")
|
||||
f.write("asn_enc_rval_t %s_xer_print_%s(\n" % (fileprefix, re.sub('item', 'list', firstlower.lower())))
|
||||
f.write(" asn_app_consume_bytes_f *cb,\n")
|
||||
f.write(" void *app_key,\n")
|
||||
f.write(" %sIEs_t *%sIEs);\n\n" % (re.sub('item', 'list', asn1cStruct), firstlower))
|
||||
else:
|
||||
f.write("/** \\brief Display %s message using XER encoding.\n" % (asn1cStruct))
|
||||
f.write(" * \\param message_p Pointer to root message.\n")
|
||||
f.write(" * \\param file File descriptor to write output.\n")
|
||||
f.write(" **/\n")
|
||||
f.write("asn_enc_rval_t %s_xer_print_%s(\n" % (fileprefix, firstlower.lower()))
|
||||
f.write(" asn_app_consume_bytes_f *cb,\n")
|
||||
f.write(" void *app_key,\n")
|
||||
f.write(" %s_message *message_p);\n\n" % (fileprefix))
|
||||
|
||||
f.write("int %s_xer__print2sp(const void *buffer, size_t size, void *app_key);\n\n" % (fileprefix.lower()))
|
||||
f.write("int %s_xer__print2fp(const void *buffer, size_t size, void *app_key);\n\n" % (fileprefix.lower()))
|
||||
f.write("extern size_t %s_string_total_size;\n\n" % (fileprefix.lower()))
|
||||
f.write("#endif /* %s_IES_DEFS_H_ */\n\n" % (fileprefix.upper()))
|
||||
|
||||
#Generate Decode functions
|
||||
f = open(outdir + fileprefix + '_decoder.c', 'w')
|
||||
outputHeaderToFile(f, filename)
|
||||
f.write("#include \"%s_common.h\"\n#include \"%s_ies_defs.h\"\n\n" % (fileprefix, fileprefix))
|
||||
for key in iesDefs:
|
||||
if key in ieofielist.values():
|
||||
continue
|
||||
structName = re.sub('ies', '', key)
|
||||
asn1cStruct = re.sub('-', '_', re.sub('IEs', '', key))
|
||||
if asn1cStruct.rfind('_') == len(asn1cStruct) - 1:
|
||||
asn1cStruct = asn1cStruct[:-1]
|
||||
asn1cStruct = re.sub('Item', 'List', asn1cStruct)
|
||||
ielistname = re.sub('UE', 'ue', asn1cStruct)
|
||||
ielistnamefirstlower = ielistname[:1].lower() + ielistname[1:]
|
||||
asn1cStructfirstlower = asn1cStruct[:1].lower() + asn1cStruct[1:]
|
||||
keyName = re.sub('-', '_', key)
|
||||
keyupperunderscore = keyName.upper()
|
||||
firstlower = re.sub('Item', 'List', re.sub('enb', 'eNB', lowerFirstCamelWord(asn1cStruct)))
|
||||
|
||||
iesaccess = ""
|
||||
if key not in ieofielist.values():
|
||||
iesaccess = "%s_ies." % (firstlower)
|
||||
|
||||
f.write("int %s_decode_%s(\n" % (fileprefix, re.sub('-', '_', structName.lower())))
|
||||
if len(iesDefs[key]["ies"]) != 0:
|
||||
f.write(" %s_t *%s,\n" % (re.sub('-', '_', key), lowerFirstCamelWord(re.sub('-', '_', key))))
|
||||
f.write(" ANY_t *any_p) {\n\n")
|
||||
|
||||
f.write(" %s_t %s;\n %s_t *%s_p = &%s;\n" % (asn1cStruct, asn1cStructfirstlower, asn1cStruct, asn1cStructfirstlower, asn1cStructfirstlower))
|
||||
f.write(" int i, decoded = 0;\n")
|
||||
if len(iesDefs[key]["ies"]) != 0:
|
||||
f.write(" int tempDecoded = 0;\n")
|
||||
|
||||
f.write(" assert(any_p != NULL);\n")
|
||||
if len(iesDefs[key]["ies"]) != 0:
|
||||
f.write(" assert(%s != NULL);\n\n" % (lowerFirstCamelWord(re.sub('-', '_', key))))
|
||||
|
||||
f.write(" %s_DEBUG(\"Decoding message %s (%%s:%%d)\\n\", __FILE__, __LINE__);\n\n" % (fileprefix.upper(), re.sub('-', '_', keyName)))
|
||||
f.write(" ANY_to_type_aper(any_p, &asn_DEF_%s, (void**)&%s_p);\n\n" % (asn1cStruct, asn1cStructfirstlower))
|
||||
f.write(" for (i = 0; i < %s_p->%slist.count; i++) {\n" % (asn1cStructfirstlower, iesaccess))
|
||||
f.write(" %s_IE_t *ie_p;\n" % (fileprefix[0].upper() + fileprefix[1:]))
|
||||
f.write(" ie_p = %s_p->%slist.array[i];\n" % (asn1cStructfirstlower, iesaccess))
|
||||
f.write(" switch(ie_p->id) {\n")
|
||||
for ie in iesDefs[key]["ies"]:
|
||||
iename = re.sub('id-', '', ie[0])
|
||||
ienameunderscore = lowerFirstCamelWord(re.sub('-', '_', iename))
|
||||
ienameunderscorefirstlower = lowerFirstCamelWord(ienameunderscore)
|
||||
ietypesubst = re.sub('-', '', ie[2])
|
||||
ietypeunderscore = re.sub('-', '_', ie[2])
|
||||
ieupperunderscore = re.sub('-', '_', re.sub('id-', '', ie[0])).upper()
|
||||
|
||||
if ie[3] == "optional":
|
||||
f.write(" /* Optional field */\n")
|
||||
elif ie[3] == "conditional":
|
||||
f.write(" /* Conditional field */\n")
|
||||
f.write(" case %s_ProtocolIE_ID_%s:\n" % (fileprefix_first_upper, re.sub('-', '_', ie[0])))
|
||||
f.write(" {\n")
|
||||
f.write(" %s_t *%s_p = NULL;\n" % (ietypeunderscore, lowerFirstCamelWord(ietypesubst)))
|
||||
if ie[3] != "mandatory":
|
||||
f.write(" %s->presenceMask |= %s_%s_PRESENT;\n" % (lowerFirstCamelWord(re.sub('-', '_', key)), keyupperunderscore, ieupperunderscore))
|
||||
f.write(" tempDecoded = ANY_to_type_aper(&ie_p->value, &asn_DEF_%s, (void**)&%s_p);\n" % (ietypeunderscore, lowerFirstCamelWord(ietypesubst)))
|
||||
f.write(" if (tempDecoded < 0 || %s_p == NULL) {\n" % (lowerFirstCamelWord(ietypesubst)))
|
||||
f.write(" %s_ERROR(\"Decoding of IE %s failed\\n\");\n" % (fileprefix.upper(), ienameunderscore))
|
||||
f.write(" if (%s_p)\n" % (lowerFirstCamelWord(ietypesubst)))
|
||||
f.write(" ASN_STRUCT_FREE(asn_DEF_%s, %s_p);\n" % (ietypeunderscore, lowerFirstCamelWord(ietypesubst)))
|
||||
f.write(" return -1;\n")
|
||||
f.write(" }\n")
|
||||
f.write(" decoded += tempDecoded;\n")
|
||||
f.write(" if (asn1_xer_print)\n")
|
||||
f.write(" xer_fprint(stdout, &asn_DEF_%s, %s_p);\n" % (ietypeunderscore, lowerFirstCamelWord(ietypesubst)))
|
||||
if ie[2] in ieofielist.keys():
|
||||
f.write(" if (%s_decode_%s(&%s->%s, %s_p) < 0) {\n" % (fileprefix, ietypeunderscore.lower(), lowerFirstCamelWord(re.sub('-', '_', key)), ienameunderscore, lowerFirstCamelWord(ietypesubst)))
|
||||
f.write(" %s_ERROR(\"Decoding of encapsulated IE %s failed\\n\");\n" % (fileprefix.upper(), lowerFirstCamelWord(ietypesubst)))
|
||||
f.write(" ASN_STRUCT_FREE(asn_DEF_%s, %s_p);\n" % (ietypeunderscore, lowerFirstCamelWord(ietypesubst)))
|
||||
f.write(" }\n")
|
||||
else:
|
||||
f.write(" memcpy(&%s->%s, %s_p, sizeof(%s_t));\n" % (lowerFirstCamelWord(re.sub('-', '_', key)), ienameunderscore, lowerFirstCamelWord(ietypesubst), ietypeunderscore))
|
||||
#f.write(" ASN_STRUCT_FREE(asn_DEF_%s, %s_p);\n" % (ietypeunderscore, lowerFirstCamelWord(ietypesubst)))
|
||||
f.write(" } break;\n")
|
||||
f.write(" default:\n")
|
||||
f.write(" %s_ERROR(\"Unknown protocol IE id (%%d) for message %s\\n\", (int)ie_p->id);\n" % (fileprefix.upper(), re.sub('-', '_', structName.lower())))
|
||||
f.write(" return -1;\n")
|
||||
f.write(" }\n")
|
||||
f.write(" }\n")
|
||||
f.write(" return decoded;\n")
|
||||
f.write("}\n\n")
|
||||
|
||||
for key in iesDefs:
|
||||
if key not in ieofielist.values():
|
||||
continue
|
||||
|
||||
keyname = re.sub('IEs', '', re.sub('Item', 'List', key))
|
||||
|
||||
f.write("int %s_decode_%s(\n" % (fileprefix, re.sub('-', '_', keyname).lower()))
|
||||
f.write(" %sIEs_t *%sIEs,\n" % (re.sub('-', '_', keyname), lowerFirstCamelWord(re.sub('-', '_', keyname))))
|
||||
f.write(" %s_t *%s) {\n\n" % (re.sub('-', '_', keyname), lowerFirstCamelWord(re.sub('-', '_', keyname))))
|
||||
f.write(" int i, decoded = 0;\n")
|
||||
f.write(" int tempDecoded = 0;\n\n")
|
||||
|
||||
f.write(" assert(%s != NULL);\n" % (lowerFirstCamelWord(re.sub('-', '_', keyname))));
|
||||
f.write(" assert(%sIEs != NULL);\n\n" % (lowerFirstCamelWord(re.sub('-', '_', keyname))));
|
||||
|
||||
f.write(" for (i = 0; i < %s->list.count; i++) {\n" % (lowerFirstCamelWord(re.sub('-', '_', keyname))))
|
||||
f.write(" %s_IE_t *ie_p = %s->list.array[i];\n" % (fileprefix[0].upper() + fileprefix[1:], lowerFirstCamelWord(re.sub('-', '_', keyname))))
|
||||
f.write(" switch (ie_p->id) {\n")
|
||||
for ie in iesDefs[key]["ies"]:
|
||||
iename = re.sub('id-', '', ie[0])
|
||||
ienameunderscore = lowerFirstCamelWord(re.sub('-', '_', iename))
|
||||
f.write(" case %s_ProtocolIE_ID_%s:\n" % (fileprefix_first_upper, re.sub('-', '_', ie[0])))
|
||||
f.write(" {\n")
|
||||
f.write(" %s_t *%s_p = NULL;\n" % (re.sub('-', '_', ie[2]), lowerFirstCamelWord(re.sub('-', '', ie[2]))))
|
||||
f.write(" tempDecoded = ANY_to_type_aper(&ie_p->value, &asn_DEF_%s, (void**)&%s_p);\n" % (re.sub('-', '_', ie[2]), lowerFirstCamelWord(re.sub('-', '', ie[2]))))
|
||||
f.write(" if (tempDecoded < 0 || %s_p == NULL) {\n" % (lowerFirstCamelWord(re.sub('-', '', ie[2]))))
|
||||
f.write(" %s_ERROR(\"Decoding of IE %s for message %s failed\\n\");\n" % (fileprefix.upper(), ienameunderscore, re.sub('-', '_', keyname)))
|
||||
f.write(" if (%s_p)\n" % (lowerFirstCamelWord(re.sub('-', '', ie[2]))))
|
||||
#f.write(" free(%s_p);\n" % (lowerFirstCamelWord(re.sub('-', '', ie[2]))))
|
||||
f.write(" ASN_STRUCT_FREE(asn_DEF_%s, %s_p);\n" % (re.sub('-', '_', ie[2]), lowerFirstCamelWord(re.sub('-', '', ie[2]))))
|
||||
f.write(" return -1;\n")
|
||||
f.write(" }\n")
|
||||
f.write(" decoded += tempDecoded;\n")
|
||||
f.write(" if (asn1_xer_print)\n")
|
||||
f.write(" xer_fprint(stdout, &asn_DEF_%s, %s_p);\n" % (re.sub('-', '_', ie[2]), lowerFirstCamelWord(re.sub('-', '', ie[2]))))
|
||||
f.write(" ASN_SEQUENCE_ADD(&%sIEs->%s, %s_p);\n" % (lowerFirstCamelWord(re.sub('-', '_', keyname)),
|
||||
re.sub('IEs', '', lowerFirstCamelWord(re.sub('-', '_', key))), lowerFirstCamelWord(re.sub('-', '', ie[2]))))
|
||||
f.write(" } break;\n")
|
||||
f.write(" default:\n")
|
||||
f.write(" %s_ERROR(\"Unknown protocol IE id (%%d) for message %s\\n\", (int)ie_p->id);\n" % (fileprefix.upper(), re.sub('-', '_', structName.lower())))
|
||||
f.write(" return -1;\n")
|
||||
f.write(" }\n")
|
||||
f.write(" }\n")
|
||||
f.write(" return decoded;\n")
|
||||
f.write("}\n\n")
|
||||
|
||||
|
||||
#Generate IES Encode functions
|
||||
f = open(outdir + fileprefix + '_encoder.c', 'w')
|
||||
outputHeaderToFile(f,filename)
|
||||
f.write("#include \"%s_common.h\"\n" % (fileprefix))
|
||||
f.write("#include \"%s_ies_defs.h\"\n\n" % (fileprefix))
|
||||
for key in iesDefs:
|
||||
if key in ieofielist.values():
|
||||
continue
|
||||
|
||||
structName = re.sub('ies', '', key)
|
||||
asn1cStruct = re.sub('-', '_', re.sub('IEs', '', key))
|
||||
asn1cStruct = re.sub('Item', 'List', asn1cStruct)
|
||||
if asn1cStruct.rfind('_') == len(asn1cStruct) - 1:
|
||||
asn1cStruct = asn1cStruct[:-1]
|
||||
asn1cStructfirstlower = asn1cStruct[:1].lower() + asn1cStruct[1:]
|
||||
firstwordlower = re.sub('Item', 'List', re.sub('enb', 'eNB', lowerFirstCamelWord(asn1cStruct)))
|
||||
|
||||
iesaccess = ""
|
||||
if key not in ieofielist.values():
|
||||
iesaccess = "%s_ies." % (firstwordlower)
|
||||
|
||||
keyName = re.sub('-', '_', key)
|
||||
keyupperunderscore = keyName.upper()
|
||||
# No IE to encode...
|
||||
if len(iesDefs[key]["ies"]) == 0:
|
||||
continue
|
||||
|
||||
f.write("int %s_encode_%s(\n" % (fileprefix, re.sub('-', '_', structName.lower())))
|
||||
f.write(" %s_t *%s,\n" % (asn1cStruct, firstwordlower))
|
||||
f.write(" %s_t *%s) {\n\n" % (re.sub('-', '_', key), lowerFirstCamelWord(re.sub('-', '_', key))))
|
||||
|
||||
f.write(" %s_IE_t *ie;\n\n" % (fileprefix_first_upper))
|
||||
|
||||
f.write(" assert(%s != NULL);\n" % (firstwordlower));
|
||||
f.write(" assert(%s != NULL);\n\n" % (lowerFirstCamelWord(re.sub('-', '_', key))));
|
||||
|
||||
for ie in iesDefs[key]["ies"]:
|
||||
iename = re.sub('-', '_', re.sub('id-', '', ie[0]))
|
||||
ienameunderscore = re.sub('-', '_', iename)
|
||||
ienamefirstwordlower = lowerFirstCamelWord(iename)
|
||||
ieupperunderscore = re.sub('-', '_', re.sub('id-', '', ie[0])).upper()
|
||||
ietypeunderscore = re.sub('-', '_', ie[2])
|
||||
|
||||
if ie[3] != "mandatory":
|
||||
if ie[3] == "optional":
|
||||
f.write(" /* Optional field */\n")
|
||||
elif ie[3] == "conditional":
|
||||
f.write(" /* Conditional field */\n")
|
||||
f.write(" if (%s->presenceMask & %s_%s_PRESENT) {\n" % (lowerFirstCamelWord(re.sub('-', '_', key)), keyupperunderscore, ieupperunderscore))
|
||||
#f.write(" == %s_%s_PRESENT) {\n" % (keyupperunderscore, ieupperunderscore))
|
||||
f.write(" if ((ie = %s_new_ie(%s_ProtocolIE_ID_%s,\n" % (fileprefix, fileprefix_first_upper, re.sub('-', '_', ie[0])))
|
||||
f.write(" %s_Criticality_%s,\n" % (fileprefix_first_upper, ie[1]))
|
||||
f.write(" &asn_DEF_%s,\n" % (ietypeunderscore))
|
||||
f.write(" &%s->%s)) == NULL) {\n" % (lowerFirstCamelWord(re.sub('-', '_', key)), ienamefirstwordlower))
|
||||
f.write(" return -1;\n")
|
||||
f.write(" }\n")
|
||||
f.write(" ASN_SEQUENCE_ADD(&%s->%slist, ie);\n" % (firstwordlower, iesaccess))
|
||||
f.write(" }\n\n")
|
||||
else:
|
||||
if ie[2] in ieofielist.keys():
|
||||
f.write(" %s_t %s;\n\n" % (ietypeunderscore, ienamefirstwordlower))
|
||||
f.write(" memset(&%s, 0, sizeof(%s_t));\n" % (ienamefirstwordlower, ietypeunderscore))
|
||||
f.write("\n")
|
||||
f.write(" if (%s_encode_%s(&%s, &%s->%s) < 0) return -1;\n" % (fileprefix, ietypeunderscore.lower(), ienamefirstwordlower, lowerFirstCamelWord(re.sub('-', '_', key)), ienamefirstwordlower))
|
||||
f.write(" if ((ie = %s_new_ie(%s_ProtocolIE_ID_%s,\n" % (fileprefix, fileprefix_first_upper, re.sub('-', '_', ie[0])))
|
||||
f.write(" %s_Criticality_%s,\n" % (fileprefix_first_upper, ie[1]))
|
||||
f.write(" &asn_DEF_%s,\n" % (ietypeunderscore))
|
||||
if ie[2] in ieofielist.keys():
|
||||
f.write(" &%s)) == NULL) {\n" % (ienamefirstwordlower))
|
||||
else:
|
||||
f.write(" &%s->%s)) == NULL) {\n" % (lowerFirstCamelWord(re.sub('-', '_', key)), ienamefirstwordlower))
|
||||
f.write(" return -1;\n")
|
||||
f.write(" }\n")
|
||||
f.write(" ASN_SEQUENCE_ADD(&%s->%slist, ie);\n\n" % (firstwordlower, iesaccess))
|
||||
if ie[2] in ieofielist.keys():
|
||||
f.write(" /* Free any dynamic allocation that is no more used */\n")
|
||||
f.write(" ASN_STRUCT_FREE_CONTENTS_ONLY(asn_DEF_%s, &%s);\n\n" % (ietypeunderscore, ienamefirstwordlower))
|
||||
|
||||
f.write(" return 0;\n")
|
||||
f.write("}\n\n")
|
||||
|
||||
for (key, value) in iesDefs.items():
|
||||
if key not in ieofielist.values():
|
||||
continue
|
||||
|
||||
ie = value["ies"][0]
|
||||
ietypeunderscore = re.sub('-', '_', ie[2])
|
||||
asn1cStruct = re.sub('-', '_', re.sub('IEs', '', re.sub('-IEs', '', key)))
|
||||
asn1cStruct = re.sub('Item', 'List', asn1cStruct)
|
||||
firstwordlower = re.sub('Item', 'List', re.sub('enb', 'eNB', lowerFirstCamelWord(asn1cStruct)))
|
||||
|
||||
for (i, j) in ieofielist.items():
|
||||
if j == key:
|
||||
break
|
||||
f.write("int %s_encode_%s(\n" % (fileprefix, re.sub('-', '_', i).lower()))
|
||||
f.write(" %s_t *%s,\n" % (asn1cStruct, firstwordlower))
|
||||
f.write(" %sIEs_t *%sIEs) {\n\n" % (re.sub('-', '_', i), lowerFirstCamelWord(re.sub('-', '_', i))))
|
||||
f.write(" int i;\n")
|
||||
|
||||
f.write(" %s_IE_t *ie;\n\n" % (fileprefix_first_upper))
|
||||
|
||||
f.write(" assert(%s != NULL);\n" % (firstwordlower));
|
||||
f.write(" assert(%sIEs != NULL);\n\n" % (lowerFirstCamelWord(re.sub('-', '_', i))));
|
||||
|
||||
f.write(" for (i = 0; i < %sIEs->%s.count; i++) {\n" % (firstwordlower, re.sub('IEs', '', lowerFirstCamelWord(re.sub('-', '_', key)))))
|
||||
f.write(" if ((ie = %s_new_ie(%s_ProtocolIE_ID_%s,\n" % (fileprefix, fileprefix_first_upper, re.sub('-', '_', ie[0])))
|
||||
f.write(" %s_Criticality_%s,\n" % (fileprefix_first_upper, ie[1]))
|
||||
f.write(" &asn_DEF_%s,\n" % (ietypeunderscore))
|
||||
f.write(" %sIEs->%s.array[i])) == NULL) {\n" % (firstwordlower, re.sub('IEs', '', lowerFirstCamelWord(re.sub('-', '_', key)))))
|
||||
f.write(" return -1;\n")
|
||||
f.write(" }\n")
|
||||
f.write(" ASN_SEQUENCE_ADD(&%s->list, ie);\n" % (firstwordlower))
|
||||
f.write(" }\n")
|
||||
f.write(" return 0;\n")
|
||||
f.write("}\n\n")
|
||||
|
||||
#Generate xer print functions
|
||||
f = open(outdir + fileprefix + '_xer_print.c', 'w')
|
||||
outputHeaderToFile(f, filename)
|
||||
f.write("#include <stdlib.h>\n")
|
||||
f.write("#include <stdio.h>\n\n")
|
||||
f.write("#include <asn_application.h>\n#include <asn_internal.h>\n\n")
|
||||
f.write("#include \"%s_common.h\"\n#include \"%s_ies_defs.h\"\n\n" % (fileprefix, fileprefix))
|
||||
|
||||
f.write("size_t %s_string_total_size = 0;\n\n" % (fileprefix.lower()))
|
||||
f.write("""int
|
||||
%s_xer__print2fp(const void *buffer, size_t size, void *app_key) {
|
||||
FILE *stream = (FILE *)app_key;
|
||||
|
||||
if(fwrite(buffer, 1, size, stream) != size)
|
||||
return -1;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
""" % (fileprefix.lower()))
|
||||
|
||||
f.write("""int %s_xer__print2sp(const void *buffer, size_t size, void *app_key) {
|
||||
char *string = (char *)app_key;
|
||||
|
||||
/* Copy buffer to the formatted string */
|
||||
memcpy(&string[%s_string_total_size], buffer, size);
|
||||
|
||||
%s_string_total_size += size;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
""" % (fileprefix.lower(), fileprefix.lower(), fileprefix.lower()))
|
||||
|
||||
f.write("""static asn_enc_rval_t
|
||||
xer_encode_local(asn_TYPE_descriptor_t *td, void *sptr,
|
||||
asn_app_consume_bytes_f *cb, void *app_key, int indent) {
|
||||
asn_enc_rval_t er, tmper;
|
||||
const char *mname;
|
||||
size_t mlen;
|
||||
int xcan = 2;
|
||||
|
||||
if(!td || !sptr) goto cb_failed;
|
||||
|
||||
mname = td->xml_tag;
|
||||
mlen = strlen(mname);
|
||||
|
||||
_i_ASN_TEXT_INDENT(0, indent);
|
||||
_ASN_CALLBACK3("<", 1, mname, mlen, ">", 1);
|
||||
|
||||
tmper = td->xer_encoder(td, sptr, indent + 1, XER_F_BASIC, cb, app_key);
|
||||
if(tmper.encoded == -1) return tmper;
|
||||
|
||||
_ASN_CALLBACK3("</", 2, mname, mlen, ">\\n", xcan);
|
||||
|
||||
er.encoded = 4 + xcan + (2 * mlen) + tmper.encoded;
|
||||
|
||||
_ASN_ENCODED_OK(er);
|
||||
cb_failed:
|
||||
_ASN_ENCODE_FAILED;
|
||||
}
|
||||
""")
|
||||
|
||||
for (key, value) in iesDefs.items():
|
||||
keyName = re.sub('-', '_', key)
|
||||
keyupperunderscore = keyName.upper()
|
||||
iesStructName = lowerFirstCamelWord(re.sub('-', '_', key))
|
||||
|
||||
ie = value["ies"][0]
|
||||
ietypeunderscore = re.sub('-', '_', ie[2])
|
||||
|
||||
if key in ieofielist.values():
|
||||
f.write("asn_enc_rval_t %s_xer_print_%s(\n" % (fileprefix, re.sub('ies', '', re.sub('item', 'list', re.sub('-', '_', key).lower()))))
|
||||
else:
|
||||
f.write("asn_enc_rval_t %s_xer_print_%s(\n" % (fileprefix, re.sub('ies', '', re.sub('-', '_', key).lower())))
|
||||
#f.write(" FILE *file,\n")
|
||||
f.write(" asn_app_consume_bytes_f *cb,\n")
|
||||
f.write(" void *app_key,\n")
|
||||
if key in ieofielist.values():
|
||||
iesStructName = lowerFirstCamelWord(re.sub('Item', 'List', re.sub('-', '_', key)))
|
||||
f.write(" %sIEs_t *%s) {\n\n" % (re.sub('IEs', '', re.sub('Item', 'List', re.sub('-', '_', key))), iesStructName))
|
||||
f.write(" int i;\n")
|
||||
f.write(" asn_enc_rval_t er;\n")
|
||||
else:
|
||||
f.write(" %s_message *message_p)\n{\n" % (fileprefix))
|
||||
f.write(" %s_t *%s;\n" % (re.sub('-', '_', key), iesStructName))
|
||||
f.write(" asn_enc_rval_t er;\n")
|
||||
#f.write(" void *app_key = (void *)file;\n")
|
||||
#f.write(" asn_app_consume_bytes_f *cb = %s_xer__print2fp;\n\n" % (fileprefix.lower()))
|
||||
|
||||
f.write(" %s = &message_p->msg.%s;\n\n" % (iesStructName, iesStructName))
|
||||
|
||||
if key in ieofielist.values():
|
||||
# Increase indentation level
|
||||
f.write(" for (i = 0; i < %s->%s.count; i++) {\n" % (iesStructName, re.sub('IEs', '', lowerFirstCamelWord(re.sub('-', '_', key)))))
|
||||
#f.write(" xer_fprint(file, &asn_DEF_%s, %s->%s.array[i]);\n" % (ietypeunderscore, iesStructName, re.sub('IEs', '', lowerFirstCamelWord(re.sub('-', '_', key)))))
|
||||
f.write(" er = xer_encode(&asn_DEF_%s, %s->%s.array[i], XER_F_BASIC, cb, app_key);\n" % (ietypeunderscore, iesStructName, re.sub('IEs', '', lowerFirstCamelWord(re.sub('-', '_', key)))))
|
||||
f.write(" }\n")
|
||||
else:
|
||||
f.write(" cb(\"<%s-PDU>\\n\", %d, app_key);\n" % (key, len("<%s-PDU>\n" % (key))))
|
||||
f.write(" xer_encode_local(&asn_DEF_%s_Criticality, &message_p->criticality, cb, app_key, 1);\n" % fileprefix_first_upper)
|
||||
f.write(" xer_encode_local(&asn_DEF_%s_ProcedureCode, &message_p->procedureCode, cb, app_key, 1);\n" % fileprefix_first_upper)
|
||||
|
||||
f.write(" cb(\" <%s>\\n\", %d, app_key);\n" % (key, len(" <%s>\n" % (key))))
|
||||
|
||||
for ie in iesDefs[key]["ies"]:
|
||||
iename = re.sub('-', '_', re.sub('id-', '', ie[0]))
|
||||
ienameunderscore = re.sub('-', '_', iename)
|
||||
ienamefirstwordlower = lowerFirstCamelWord(iename)
|
||||
ietypeunderscore = re.sub('-', '_', ie[2])
|
||||
ieupperunderscore = re.sub('-', '_', re.sub('id-', '', ie[0])).upper()
|
||||
|
||||
if ie[3] != "mandatory":
|
||||
if ie[3] == "optional":
|
||||
f.write(" /* Optional field */\n")
|
||||
elif ie[3] == "conditional":
|
||||
f.write(" /* Conditional field */\n")
|
||||
f.write(" if (%s->presenceMask & %s_%s_PRESENT)\n " % (iesStructName, keyupperunderscore, ieupperunderscore))
|
||||
|
||||
# Is it an encapsulated IE ?
|
||||
if ie[2] in ieofielist.keys():
|
||||
f.write(" %s_xer_print_%s(cb, app_key, &%s->%s);\n" % (fileprefix, re.sub('ies', '', re.sub('-', '_', ie[2]).lower()), iesStructName, ienamefirstwordlower))
|
||||
else:
|
||||
f.write(" xer_encode_local(&asn_DEF_%s, &%s->%s, cb, app_key, 2);\n" % (ietypeunderscore, iesStructName, ienamefirstwordlower))
|
||||
f.write(" cb(\" </%s>\\n\", %d, app_key);\n" % (key, len(" </%s>\n" % (key))))
|
||||
f.write(" cb(\"</%s-PDU>\\n\", %d, app_key);\n" % (key, len("</%s-PDU>\n" % (key))))
|
||||
|
||||
f.write(" _ASN_ENCODED_OK(er);\n")
|
||||
#if key not in ieofielist.values():
|
||||
#f.write("cb_failed:\n")
|
||||
#f.write(" return er;\n")
|
||||
f.write("}\n\n")
|
||||
@@ -0,0 +1,194 @@
|
||||
/*
|
||||
* 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
|
||||
* the OAI Public License, Version 1.1 (the "License"); you may not use this file
|
||||
* 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 f1ap_common.c
|
||||
* \brief f1ap procedures for both CU and DU
|
||||
* \author EURECOM/NTUST
|
||||
* \date 2018
|
||||
* \version 0.1
|
||||
* \company Eurecom
|
||||
* \email: navid.nikaein@eurecom.fr, bing-kai.hong@eurecom.fr
|
||||
* \note
|
||||
* \warning
|
||||
*/
|
||||
|
||||
#include "f1ap_common.h"
|
||||
|
||||
#if defined(EMIT_ASN_DEBUG_EXTERN)
|
||||
int asn_debug = 0;
|
||||
int asn1_xer_print = 0;
|
||||
|
||||
inline void ASN_DEBUG(const char *fmt, ...)
|
||||
{
|
||||
if (asn_debug) {
|
||||
int adi = asn_debug_indent;
|
||||
va_list ap;
|
||||
va_start(ap, fmt);
|
||||
fprintf(stderr, "[ASN1]");
|
||||
|
||||
while(adi--) fprintf(stderr, " ");
|
||||
|
||||
vfprintf(stderr, fmt, ap);
|
||||
fprintf(stderr, "\n");
|
||||
va_end(ap);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
uint8_t F1AP_get_next_transaction_identifier(module_id_t enb_mod_idP, module_id_t cu_mod_idP)
|
||||
{
|
||||
static uint8_t transaction_identifier[NUMBER_OF_eNB_MAX];
|
||||
transaction_identifier[enb_mod_idP+cu_mod_idP] =
|
||||
(transaction_identifier[enb_mod_idP+cu_mod_idP] + 1) % F1AP_TRANSACTION_IDENTIFIER_NUMBER;
|
||||
//LOG_T(F1AP,"generated xid is %d\n",transaction_identifier[enb_mod_idP+cu_mod_idP]);
|
||||
return transaction_identifier[enb_mod_idP+cu_mod_idP];
|
||||
}
|
||||
|
||||
int f1ap_add_ue(f1ap_cudu_inst_t *f1_inst,
|
||||
module_id_t module_idP,
|
||||
int CC_idP,
|
||||
int UE_id,
|
||||
rnti_t rntiP) {
|
||||
for (int i = 0; i < MAX_MOBILES_PER_ENB; i++) {
|
||||
if (f1_inst->f1ap_ue[i].rnti == rntiP) {
|
||||
f1_inst->f1ap_ue[i].f1ap_uid = i;
|
||||
f1_inst->f1ap_ue[i].mac_uid = UE_id;
|
||||
LOG_I(F1AP, "Updating the index of UE with RNTI %x and du_ue_f1ap_id %d\n", f1_inst->f1ap_ue[i].rnti, f1_inst->f1ap_ue[i].du_ue_f1ap_id);
|
||||
return i;
|
||||
}
|
||||
}
|
||||
for (int i = 0; i < MAX_MOBILES_PER_ENB; i++) {
|
||||
if (f1_inst->f1ap_ue[i].rnti == 0 ) {
|
||||
f1_inst->f1ap_ue[i].rnti = rntiP;
|
||||
f1_inst->f1ap_ue[i].f1ap_uid = i;
|
||||
f1_inst->f1ap_ue[i].mac_uid = UE_id;
|
||||
f1_inst->f1ap_ue[i].du_ue_f1ap_id = rntiP;
|
||||
f1_inst->f1ap_ue[i].cu_ue_f1ap_id = rntiP;
|
||||
f1_inst->num_ues++;
|
||||
LOG_I(F1AP, "Adding a new UE with RNTI %x and cu/du ue_f1ap_id %d\n", f1_inst->f1ap_ue[i].rnti, f1_inst->f1ap_ue[i].du_ue_f1ap_id);
|
||||
return i;
|
||||
}
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
int f1ap_remove_ue(f1ap_cudu_inst_t *f1_inst,
|
||||
rnti_t rntiP) {
|
||||
for (int i = 0; i < MAX_MOBILES_PER_ENB; i++) {
|
||||
if (f1_inst->f1ap_ue[i].rnti == rntiP) {
|
||||
f1_inst->f1ap_ue[i].rnti = 0;
|
||||
break;
|
||||
}
|
||||
}
|
||||
f1_inst->num_ues--;
|
||||
return 0;
|
||||
}
|
||||
|
||||
int f1ap_get_du_ue_f1ap_id(f1ap_cudu_inst_t *f1_inst,
|
||||
rnti_t rntiP) {
|
||||
for (int i = 0; i < MAX_MOBILES_PER_ENB; i++) {
|
||||
if (f1_inst->f1ap_ue[i].rnti == rntiP) {
|
||||
return f1_inst->f1ap_ue[i].du_ue_f1ap_id;
|
||||
}
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
int f1ap_get_cu_ue_f1ap_id(f1ap_cudu_inst_t *f1_inst,
|
||||
rnti_t rntiP) {
|
||||
for (int i = 0; i < MAX_MOBILES_PER_ENB; i++) {
|
||||
if (f1_inst->f1ap_ue[i].rnti == rntiP) {
|
||||
return f1_inst->f1ap_ue[i].cu_ue_f1ap_id;
|
||||
}
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
int f1ap_get_rnti_by_du_id(f1ap_cudu_inst_t *f1_inst,
|
||||
module_id_t du_ue_f1ap_id ) {
|
||||
for (int i = 0; i < MAX_MOBILES_PER_ENB; i++) {
|
||||
if (f1_inst->f1ap_ue[i].du_ue_f1ap_id == du_ue_f1ap_id) {
|
||||
return f1_inst->f1ap_ue[i].rnti;
|
||||
}
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
int f1ap_get_rnti_by_cu_id(f1ap_cudu_inst_t *f1_inst,
|
||||
module_id_t cu_ue_f1ap_id ) {
|
||||
for (int i = 0; i < MAX_MOBILES_PER_ENB; i++) {
|
||||
if (f1_inst->f1ap_ue[i].cu_ue_f1ap_id == cu_ue_f1ap_id) {
|
||||
return f1_inst->f1ap_ue[i].rnti;
|
||||
}
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
int f1ap_get_du_uid(f1ap_cudu_inst_t *f1_inst,
|
||||
module_id_t du_ue_f1ap_id ) {
|
||||
for (int i = 0; i < MAX_MOBILES_PER_ENB; i++) {
|
||||
if (f1_inst->f1ap_ue[i].du_ue_f1ap_id == du_ue_f1ap_id) {
|
||||
return i;
|
||||
}
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
int f1ap_get_cu_uid(f1ap_cudu_inst_t *f1_inst,
|
||||
module_id_t cu_ue_f1ap_id ) {
|
||||
for (int i = 0; i < MAX_MOBILES_PER_ENB; i++) {
|
||||
if (f1_inst->f1ap_ue[i].cu_ue_f1ap_id == cu_ue_f1ap_id) {
|
||||
return i;
|
||||
}
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
int f1ap_get_uid_by_rnti(f1ap_cudu_inst_t *f1_inst,
|
||||
rnti_t rntiP ) {
|
||||
for (int i = 0; i < MAX_MOBILES_PER_ENB; i++) {
|
||||
if (f1_inst->f1ap_ue[i].rnti == rntiP) {
|
||||
return i;
|
||||
}
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
int f1ap_du_add_cu_ue_id(f1ap_cudu_inst_t *f1_inst,
|
||||
module_id_t du_ue_f1ap_id,
|
||||
module_id_t cu_ue_f1ap_id) {
|
||||
module_id_t f1ap_uid = f1ap_get_du_uid(f1_inst,du_ue_f1ap_id);
|
||||
if (f1ap_uid < 0) return -1;
|
||||
f1_inst->f1ap_ue[f1ap_uid].cu_ue_f1ap_id = cu_ue_f1ap_id;
|
||||
LOG_I(F1AP, "Adding cu_ue_f1ap_id %d for UE with RNTI %x\n", cu_ue_f1ap_id, f1_inst->f1ap_ue[f1ap_uid].rnti);
|
||||
return 0;
|
||||
}
|
||||
|
||||
int f1ap_cu_add_du_ue_id(f1ap_cudu_inst_t *f1_inst,
|
||||
module_id_t cu_ue_f1ap_id,
|
||||
module_id_t du_ue_f1ap_id) {
|
||||
module_id_t f1ap_uid = f1ap_get_cu_uid(f1_inst,cu_ue_f1ap_id);
|
||||
if (f1ap_uid < 0) return -1;
|
||||
f1_inst->f1ap_ue[f1ap_uid].du_ue_f1ap_id = du_ue_f1ap_id;
|
||||
LOG_I(F1AP, "Adding du_ue_f1ap_id %d for UE with RNTI %x\n", du_ue_f1ap_id, f1_inst->f1ap_ue[f1ap_uid].rnti);
|
||||
return 0;
|
||||
}
|
||||
@@ -0,0 +1,488 @@
|
||||
/*
|
||||
* 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
|
||||
* the OAI Public License, Version 1.1 (the "License"); you may not use this file
|
||||
* 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 f1ap_common.h
|
||||
* \brief f1ap procedures for both CU and DU
|
||||
* \author EURECOM/NTUST
|
||||
* \date 2018
|
||||
* \version 0.1
|
||||
* \company Eurecom
|
||||
* \email: navid.nikaein@eurecom.fr, bing-kai.hong@eurecom.fr
|
||||
* \note
|
||||
* \warning
|
||||
*/
|
||||
|
||||
#if HAVE_CONFIG_H_
|
||||
# include "config.h"
|
||||
#endif
|
||||
|
||||
#ifndef F1AP_COMMON_H_
|
||||
#define F1AP_COMMON_H_
|
||||
|
||||
#include "openairinterface5g_limits.h"
|
||||
|
||||
#define F1AP_UE_IDENTIFIER_NUMBER 3
|
||||
#define F1AP_TRANSACTION_IDENTIFIER_NUMBER 3
|
||||
|
||||
#if defined(EMIT_ASN_DEBUG_EXTERN)
|
||||
inline void ASN_DEBUG(const char *fmt, ...);
|
||||
#endif
|
||||
|
||||
#include "F1AP_Active-Cells-List.h"
|
||||
#include "F1AP_RAT-FrequencyPriorityInformation.h"
|
||||
#include "F1AP_DLUPTNLInformation-ToBeSetup-Item.h"
|
||||
#include "F1AP_PrivateMessage.h"
|
||||
#include "F1AP_Cause.h"
|
||||
#include "F1AP_Pre-emptionVulnerability.h"
|
||||
#include "F1AP_NRPCI.h"
|
||||
#include "F1AP_Transmission-Bandwidth.h"
|
||||
#include "F1AP_SIB1-message.h"
|
||||
#include "F1AP_GNBCUConfigurationUpdateAcknowledge.h"
|
||||
#include "F1AP_DRBs-Setup-Item.h"
|
||||
#include "F1AP_EUTRA-NR-CellResourceCoordinationReqAck-Container.h"
|
||||
#include "F1AP_NR-CGI-List-For-Restart-Item.h"
|
||||
#include "F1AP_GNB-CU-Name.h"
|
||||
#include "F1AP_PagingDRX.h"
|
||||
#include "F1AP_RepetitionPeriod.h"
|
||||
#include "F1AP_DRBs-ToBeModified-List.h"
|
||||
#include "F1AP_ExecuteDuplication.h"
|
||||
#include "F1AP_SCell-FailedtoSetupMod-List.h"
|
||||
#include "F1AP_NRNRB.h"
|
||||
#include "F1AP_SCell-ToBeSetup-List.h"
|
||||
#include "F1AP_F1AP-PDU.h"
|
||||
#include "F1AP_MaskedIMEISV.h"
|
||||
#include "F1AP_ProtocolIE-Container.h"
|
||||
#include "F1AP_GNB-CU-TNL-Association-To-Update-Item.h"
|
||||
#include "F1AP_Cells-to-be-Activated-List-Item.h"
|
||||
#include "F1AP_DRBs-Required-ToBeModified-Item.h"
|
||||
#include "F1AP_BitRate.h"
|
||||
#include "F1AP_SRBs-ToBeSetup-List.h"
|
||||
#include "F1AP_ConcurrentWarningMessageIndicator.h"
|
||||
#include "F1AP_CriticalityDiagnostics-IE-Item.h"
|
||||
#include "F1AP_GNB-CU-TNL-Association-To-Update-List.h"
|
||||
#include "F1AP_DRB-Notify-List.h"
|
||||
#include "F1AP_UEContextReleaseCommand.h"
|
||||
#include "F1AP_ProtocolIE-SingleContainer.h"
|
||||
#include "F1AP_DRBs-ToBeReleased-List.h"
|
||||
#include "F1AP_PWS-Failed-NR-CGI-List.h"
|
||||
#include "F1AP_InitialULRRCMessageTransfer.h"
|
||||
#include "F1AP_Served-Cell-Information.h"
|
||||
#include "F1AP_Served-EUTRA-Cells-Information.h"
|
||||
#include "F1AP_Cells-Broadcast-Cancelled-Item.h"
|
||||
#include "F1AP_F1SetupRequest.h"
|
||||
#include "F1AP_Served-Cells-To-Add-Item.h"
|
||||
#include "F1AP_F1SetupFailure.h"
|
||||
#include "F1AP_ULUPTNLInformation-ToBeSetup-Item.h"
|
||||
#include "F1AP_GNB-CU-TNL-Association-To-Add-Item.h"
|
||||
#include "F1AP_DUtoCURRCContainer.h"
|
||||
#include "F1AP_GNBDUResourceCoordinationRequest.h"
|
||||
#include "F1AP_DRBs-FailedToBeSetup-List.h"
|
||||
#include "F1AP_UPTransportLayerInformation.h"
|
||||
#include "F1AP_RRCContainer.h"
|
||||
#include "F1AP_Notification-Cause.h"
|
||||
#include "F1AP_UEIdentityIndexValue.h"
|
||||
#include "F1AP_SRBs-ToBeSetupMod-List.h"
|
||||
#include "F1AP_GNB-DU-Served-Cells-Item.h"
|
||||
#include "F1AP_RLCMode.h"
|
||||
#include "F1AP_NRSCS.h"
|
||||
#include "F1AP_SliceSupportList.h"
|
||||
#include "F1AP_GTP-TEID.h"
|
||||
#include "F1AP_UEContextModificationRequest.h"
|
||||
#include "F1AP_MeasConfig.h"
|
||||
#include "F1AP_Flows-Mapped-To-DRB-List.h"
|
||||
#include "F1AP_Cells-to-be-Deactivated-List-Item.h"
|
||||
#include "F1AP_QoSFlowLevelQoSParameters.h"
|
||||
#include "F1AP_GNB-CU-UE-F1AP-ID.h"
|
||||
#include "F1AP_CauseTransport.h"
|
||||
#include "F1AP_DRBs-ToBeReleased-Item.h"
|
||||
#include "F1AP_SCell-ToBeSetupMod-Item.h"
|
||||
#include "F1AP_CellGroupConfig.h"
|
||||
#include "F1AP_PWSSystemInformation.h"
|
||||
#include "F1AP_DRBs-Modified-List.h"
|
||||
#include "F1AP_HandoverPreparationInformation.h"
|
||||
#include "F1AP_InactivityMonitoringResponse.h"
|
||||
#include "F1AP_Served-Cells-To-Delete-List.h"
|
||||
#include "F1AP_ProtocolExtensionField.h"
|
||||
#include "F1AP_GNB-CU-TNL-Association-To-Remove-List.h"
|
||||
#include "F1AP_SRBID.h"
|
||||
#include "F1AP_DRB-Activity-List.h"
|
||||
#include "F1AP_DRBs-FailedToBeModified-Item.h"
|
||||
#include "F1AP_TransactionID.h"
|
||||
#include "F1AP_AllocationAndRetentionPriority.h"
|
||||
#include "F1AP_ShortDRXCycleLength.h"
|
||||
#include "F1AP_BroadcastPLMNs-Item.h"
|
||||
#include "F1AP_DRB-Information.h"
|
||||
#include "F1AP_TimeToWait.h"
|
||||
#include "F1AP_NonDynamic5QIDescriptor.h"
|
||||
#include "F1AP_C-RNTI.h"
|
||||
#include "F1AP_MIB-message.h"
|
||||
#include "F1AP_SIBtype-Item.h"
|
||||
#include "F1AP_Served-Cells-To-Modify-List.h"
|
||||
#include "F1AP_NRCGI.h"
|
||||
#include "F1AP_DuplicationActivation.h"
|
||||
#include "F1AP_CauseProtocol.h"
|
||||
#include "F1AP_SCell-FailedtoSetup-Item.h"
|
||||
#include "F1AP_PagingIdentity.h"
|
||||
#include "F1AP_NGRANAllocationAndRetentionPriority.h"
|
||||
#include "F1AP_TypeOfError.h"
|
||||
#include "F1AP_GNB-CU-TNL-Association-To-Add-List.h"
|
||||
#include "F1AP_DRBs-Required-ToBeReleased-Item.h"
|
||||
#include "F1AP_EUTRA-Mode-Info.h"
|
||||
#include "F1AP_FiveGS-TAC.h"
|
||||
#include "F1AP_Cells-to-be-Activated-List.h"
|
||||
#include "F1AP_PagingCell-list.h"
|
||||
#include "F1AP_NotificationControl.h"
|
||||
#include "F1AP_ProtectedEUTRAResourceIndication.h"
|
||||
#include "F1AP_CUtoDURRCInformation.h"
|
||||
#include "F1AP_SystemInformationDeliveryCommand.h"
|
||||
#include "F1AP_AveragingWindow.h"
|
||||
#include "F1AP_SRBs-ToBeSetupMod-Item.h"
|
||||
#include "F1AP_NumberOfBroadcasts.h"
|
||||
#include "F1AP_Cells-Broadcast-Completed-List.h"
|
||||
#include "F1AP_GNB-CU-TNL-Association-Setup-Item.h"
|
||||
#include "F1AP_PWSCancelResponse.h"
|
||||
#include "F1AP_SpectrumSharingGroupID.h"
|
||||
#include "F1AP_RANUEPagingIdentity.h"
|
||||
#include "F1AP_CG-ConfigInfo.h"
|
||||
#include "F1AP_PagingCell-Item.h"
|
||||
#include "F1AP_GNB-CU-TNL-Association-To-Remove-Item.h"
|
||||
#include "F1AP_UE-CapabilityRAT-ContainerList.h"
|
||||
#include "F1AP_PWSCancelRequest.h"
|
||||
#include "F1AP_PriorityLevel.h"
|
||||
#include "F1AP_ProtocolIE-ContainerPair.h"
|
||||
#include "F1AP_FullConfiguration.h"
|
||||
#include "F1AP_NRCellIdentity.h"
|
||||
#include "F1AP_ProtocolExtensionContainer.h"
|
||||
#include "F1AP_PWSRestartIndication.h"
|
||||
#include "F1AP_DRBs-ModifiedConf-List.h"
|
||||
#include "F1AP_GNB-CU-TNL-Association-Failed-To-Setup-List.h"
|
||||
#include "F1AP_UEContextSetupRequest.h"
|
||||
#include "F1AP_PWSFailureIndication.h"
|
||||
#include "F1AP_UE-associatedLogicalF1-ConnectionListResAck.h"
|
||||
#include "F1AP_DRBs-ToBeSetupMod-Item.h"
|
||||
#include "F1AP_SRBs-FailedToBeSetup-List.h"
|
||||
#include "F1AP_Criticality.h"
|
||||
#include "F1AP_UEContextModificationConfirm.h"
|
||||
#include "F1AP_Broadcast-To-Be-Cancelled-List.h"
|
||||
#include "F1AP_UEContextReleaseComplete.h"
|
||||
#include "F1AP_PrivateIE-Container.h"
|
||||
#include "F1AP_CellULConfigured.h"
|
||||
#include "F1AP_DRB-Activity.h"
|
||||
#include "F1AP_GNB-CU-TNL-Association-Failed-To-Setup-Item.h"
|
||||
#include "F1AP_PrivateIE-ID.h"
|
||||
#include "F1AP_WriteReplaceWarningResponse.h"
|
||||
#include "F1AP_CauseMisc.h"
|
||||
#include "F1AP_SRBs-Required-ToBeReleased-Item.h"
|
||||
#include "F1AP_Cells-Broadcast-Cancelled-List.h"
|
||||
#include "F1AP_ULUEConfiguration.h"
|
||||
#include "F1AP_RAT-FrequencySelectionPriority.h"
|
||||
#include "F1AP_UEInactivityNotification.h"
|
||||
#include "F1AP_DLRRCMessageTransfer.h"
|
||||
#include "F1AP_TriggeringMessage.h"
|
||||
#include "F1AP_DRBs-ToBeSetup-List.h"
|
||||
#include "F1AP_Cells-to-be-Barred-Item.h"
|
||||
#include "F1AP_UE-associatedLogicalF1-ConnectionItem.h"
|
||||
#include "F1AP_Cancel-all-Warning-Messages-Indicator.h"
|
||||
#include "F1AP_SCell-FailedtoSetupMod-Item.h"
|
||||
#include "F1AP_DRBs-FailedToBeSetupMod-List.h"
|
||||
#include "F1AP_ProtocolIE-ID.h"
|
||||
#include "F1AP_TransportLayerAddress.h"
|
||||
#include "F1AP_GNB-DU-System-Information.h"
|
||||
#include "F1AP_PWS-Failed-NR-CGI-Item.h"
|
||||
#include "F1AP_Notify.h"
|
||||
#include "F1AP_UEContextModificationResponse.h"
|
||||
#include "F1AP_DRBID.h"
|
||||
#include "F1AP_GNBDUResourceCoordinationResponse.h"
|
||||
#include "F1AP_UEContextModificationRequired.h"
|
||||
#include "F1AP_InitiatingMessage.h"
|
||||
#include "F1AP_SliceSupportItem.h"
|
||||
#include "F1AP_ProtocolIE-FieldPair.h"
|
||||
#include "F1AP_EUTRA-TDD-Info.h"
|
||||
#include "F1AP_GNBDUConfigurationUpdateFailure.h"
|
||||
#include "F1AP_ULUPTNLInformation-ToBeSetup-List.h"
|
||||
#include "F1AP_WriteReplaceWarningRequest.h"
|
||||
#include "F1AP_ServCellIndex.h"
|
||||
#include "F1AP_ResetAcknowledge.h"
|
||||
#include "F1AP_SRBs-FailedToBeSetupMod-Item.h"
|
||||
#include "F1AP_OffsetToPointA.h"
|
||||
#include "F1AP_ProcedureCode.h"
|
||||
#include "F1AP_GTPTunnel.h"
|
||||
#include "F1AP_TDD-Info.h"
|
||||
#include "F1AP_Pre-emptionCapability.h"
|
||||
#include "F1AP_MaxDataBurstVolume.h"
|
||||
#include "F1AP_SUL-Information.h"
|
||||
#include "F1AP_CriticalityDiagnostics-IE-List.h"
|
||||
#include "F1AP_EUTRA-FDD-Info.h"
|
||||
#include "F1AP_BroadcastPLMNs-List.h"
|
||||
#include "F1AP_Served-Cells-To-Delete-Item.h"
|
||||
#include "F1AP_ListofEUTRACellsinGNBDUCoordination.h"
|
||||
#include "F1AP_Candidate-SpCell-Item.h"
|
||||
#include "F1AP_Cells-To-Be-Broadcast-List.h"
|
||||
#include "F1AP_ULRRCMessageTransfer.h"
|
||||
#include "F1AP_Cells-to-be-Deactivated-List.h"
|
||||
#include "F1AP_DRBs-Required-ToBeReleased-List.h"
|
||||
#include "F1AP_Served-Cells-To-Add-List.h"
|
||||
#include "F1AP_Potential-SpCell-List.h"
|
||||
#include "F1AP_EUTRANQoS.h"
|
||||
#include "F1AP_Dynamic5QIDescriptor.h"
|
||||
#include "F1AP_GNBCUConfigurationUpdateFailure.h"
|
||||
#include "F1AP_DuplicationIndication.h"
|
||||
#include "F1AP_GNB-DU-Served-Cells-List.h"
|
||||
#include "F1AP_QoS-Characteristics.h"
|
||||
#include "F1AP_UE-associatedLogicalF1-ConnectionListRes.h"
|
||||
#include "F1AP_ResourceCoordinationTransferContainer.h"
|
||||
#include "F1AP_DRXCycle.h"
|
||||
#include "F1AP_DRBs-FailedToBeSetup-Item.h"
|
||||
#include "F1AP_PrivateIE-Field.h"
|
||||
#include "F1AP_SRBs-ToBeReleased-List.h"
|
||||
#include "F1AP_MeasGapConfig.h"
|
||||
#include "F1AP_NR-Mode-Info.h"
|
||||
#include "F1AP_Active-Cells-Item.h"
|
||||
#include "F1AP_Protected-EUTRA-Resources-List.h"
|
||||
#include "F1AP_SRBs-FailedToBeSetup-Item.h"
|
||||
#include "F1AP_ResetAll.h"
|
||||
#include "F1AP_SCell-FailedtoSetup-List.h"
|
||||
#include "F1AP_UEContextModificationFailure.h"
|
||||
#include "F1AP_CNUEPagingIdentity.h"
|
||||
#include "F1AP_DRBs-ToBeSetupMod-List.h"
|
||||
#include "F1AP_GNBDUConfigurationUpdate.h"
|
||||
#include "F1AP_DRBs-ToBeSetup-Item.h"
|
||||
#include "F1AP_UnsuccessfulOutcome.h"
|
||||
#include "F1AP_SRBs-FailedToBeSetupMod-List.h"
|
||||
#include "F1AP_SCell-ToBeRemoved-Item.h"
|
||||
#include "F1AP_InactivityMonitoringRequest.h"
|
||||
#include "F1AP_Cells-Failed-to-be-Activated-List-Item.h"
|
||||
#include "F1AP_DRBs-Modified-Item.h"
|
||||
#include "F1AP_SRBs-Required-ToBeReleased-List.h"
|
||||
#include "F1AP_GBR-QosInformation.h"
|
||||
#include "F1AP_SCell-ToBeRemoved-List.h"
|
||||
#include "F1AP_RANAC.h"
|
||||
#include "F1AP_GNB-DU-UE-F1AP-ID.h"
|
||||
#include "F1AP_CauseRadioNetwork.h"
|
||||
#include "F1AP_DRB-Notify-Item.h"
|
||||
#include "F1AP_GNBDUConfigurationUpdateAcknowledge.h"
|
||||
#include "F1AP_GNB-CUSystemInformation.h"
|
||||
#include "F1AP_ProtocolIE-Field.h"
|
||||
#include "F1AP_Served-Cells-To-Modify-Item.h"
|
||||
#include "F1AP_Flows-Mapped-To-DRB-Item.h"
|
||||
#include "F1AP_SupportedSULFreqBandItem.h"
|
||||
#include "F1AP_UEContextReleaseRequest.h"
|
||||
#include "F1AP_GNB-DU-Name.h"
|
||||
#include "F1AP_DRBs-ToBeModified-Item.h"
|
||||
#include "F1AP_SIBtype-List.h"
|
||||
#include "F1AP_EUTRA-NR-CellResourceCoordinationReq-Container.h"
|
||||
#include "F1AP_DRBs-SetupMod-List.h"
|
||||
#include "F1AP_DRBs-Required-ToBeModified-List.h"
|
||||
#include "F1AP_DUtoCURRCInformation.h"
|
||||
#include "F1AP_MaxPacketLossRate.h"
|
||||
#include "F1AP_PacketDelayBudget.h"
|
||||
#include "F1AP_GNBCUConfigurationUpdate.h"
|
||||
#include "F1AP_Cells-Broadcast-Completed-Item.h"
|
||||
#include "F1AP_RRCRconfigurationCompleteIndicator.h"
|
||||
#include "F1AP_PagingPriority.h"
|
||||
#include "F1AP_Cells-Failed-to-be-Activated-List.h"
|
||||
#include "F1AP_Endpoint-IP-address-and-port.h"
|
||||
#include "F1AP_PacketErrorRate.h"
|
||||
#include "F1AP_PLMN-Identity.h"
|
||||
#include "F1AP_asn_constant.h"
|
||||
#include "F1AP_ResetType.h"
|
||||
#include "F1AP_FDD-Info.h"
|
||||
#include "F1AP_DLUPTNLInformation-ToBeSetup-List.h"
|
||||
#include "F1AP_QoSFlowIndicator.h"
|
||||
#include "F1AP_NR-CGI-List-For-Restart-List.h"
|
||||
#include "F1AP_F1SetupResponse.h"
|
||||
#include "F1AP_UEContextSetupResponse.h"
|
||||
#include "F1AP_CP-TransportLayerAddress.h"
|
||||
#include "F1AP_Broadcast-To-Be-Cancelled-Item.h"
|
||||
#include "F1AP_ErrorIndication.h"
|
||||
#include "F1AP_SubscriberProfileIDforRFP.h"
|
||||
#include "F1AP_SNSSAI.h"
|
||||
#include "F1AP_DRBs-ModifiedConf-Item.h"
|
||||
#include "F1AP_GNB-CU-TNL-Association-Setup-List.h"
|
||||
#include "F1AP_DRB-Activity-Item.h"
|
||||
#include "F1AP_LCID.h"
|
||||
#include "F1AP_ULConfiguration.h"
|
||||
#include "F1AP_ShortDRXCycleTimer.h"
|
||||
#include "F1AP_FreqBandNrItem.h"
|
||||
#include "F1AP_Cells-to-be-Barred-List.h"
|
||||
#include "F1AP_Presence.h"
|
||||
#include "F1AP_CellBarred.h"
|
||||
#include "F1AP_SIBtype.h"
|
||||
#include "F1AP_RequestType.h"
|
||||
#include "F1AP_NRFreqInfo.h"
|
||||
#include "F1AP_Potential-SpCell-Item.h"
|
||||
#include "F1AP_NumberofBroadcastRequest.h"
|
||||
#include "F1AP_TNLAssociationUsage.h"
|
||||
#include "F1AP_SCell-ToBeSetupMod-List.h"
|
||||
#include "F1AP_DRBs-Setup-List.h"
|
||||
#include "F1AP_Reset.h"
|
||||
#include "F1AP_CriticalityDiagnostics.h"
|
||||
#include "F1AP_Paging.h"
|
||||
#include "F1AP_LongDRXCycleLength.h"
|
||||
#include "F1AP_GNB-DU-ID.h"
|
||||
#include "F1AP_SuccessfulOutcome.h"
|
||||
#include "F1AP_Configured-EPS-TAC.h"
|
||||
#include "F1AP_Candidate-SpCell-List.h"
|
||||
#include "F1AP_SRBs-ToBeReleased-Item.h"
|
||||
#include "F1AP_QoSInformation.h"
|
||||
#include "F1AP_SCell-ToBeSetup-Item.h"
|
||||
#include "F1AP_SRBs-ToBeSetup-Item.h"
|
||||
#include "F1AP_GBR-QoSFlowInformation.h"
|
||||
#include "F1AP_SCellIndex.h"
|
||||
#include "F1AP_DRBs-SetupMod-Item.h"
|
||||
#include "F1AP_TransmissionStopIndicator.h"
|
||||
#include "F1AP_UEContextSetupFailure.h"
|
||||
#include "F1AP_DRBs-FailedToBeModified-List.h"
|
||||
#include "F1AP_DRBs-FailedToBeSetupMod-Item.h"
|
||||
#include "F1AP_ProtocolExtensionID.h"
|
||||
#include "F1AP_Cells-To-Be-Broadcast-Item.h"
|
||||
#include "F1AP_QCI.h"
|
||||
|
||||
#include "conversions.h"
|
||||
#include "platform_types.h"
|
||||
#include "common/utils/LOG/log.h"
|
||||
#include "intertask_interface.h"
|
||||
#include "sctp_messages_types.h"
|
||||
#include "f1ap_messages_types.h"
|
||||
#include <arpa/inet.h>
|
||||
#include "T.h"
|
||||
#include "common/ran_context.h"
|
||||
#include "msc.h"
|
||||
|
||||
/* Checking version of ASN1C compiler */
|
||||
#if (ASN1C_ENVIRONMENT_VERSION < ASN1C_MINIMUM_VERSION)
|
||||
# error "You are compiling f1ap with the wrong version of ASN1C"
|
||||
#endif
|
||||
|
||||
#ifndef FALSE
|
||||
# define FALSE (0)
|
||||
#endif
|
||||
#ifndef TRUE
|
||||
# define TRUE (!FALSE)
|
||||
#endif
|
||||
|
||||
#define F1AP_UE_ID_FMT "0x%06"PRIX32
|
||||
|
||||
#include "assertions.h"
|
||||
|
||||
#if defined(ENB_MODE)
|
||||
# include "common/utils/LOG/log.h"
|
||||
# include "f1ap_default_values.h"
|
||||
# define F1AP_ERROR(x, args...) LOG_E(F1AP, x, ##args)
|
||||
# define F1AP_WARN(x, args...) LOG_W(F1AP, x, ##args)
|
||||
# define F1AP_TRAF(x, args...) LOG_I(F1AP, x, ##args)
|
||||
# define F1AP_INFO(x, args...) LOG_I(F1AP, x, ##args)
|
||||
# define F1AP_DEBUG(x, args...) LOG_I(F1AP, x, ##args)
|
||||
#else
|
||||
//# include "mme_default_values.h"
|
||||
# define F1AP_ERROR(x, args...) do { fprintf(stdout, "[F1AP][E]"x, ##args); } while(0)
|
||||
# define F1AP_WARN(x, args...) do { fprintf(stdout, "[F1AP][W]"x, ##args); } while(0)
|
||||
# define F1AP_TRAF(x, args...) do { fprintf(stdout, "[F1AP][T]"x, ##args); } while(0)
|
||||
# define F1AP_INFO(x, args...) do { fprintf(stdout, "[F1AP][I]"x, ##args); } while(0)
|
||||
# define F1AP_DEBUG(x, args...) do { fprintf(stdout, "[F1AP][D]"x, ##args); } while(0)
|
||||
#endif
|
||||
|
||||
//Forward declaration
|
||||
#define F1AP_FIND_PROTOCOLIE_BY_ID(IE_TYPE, ie, container, IE_ID, mandatory) \
|
||||
do {\
|
||||
IE_TYPE **ptr; \
|
||||
ie = NULL; \
|
||||
for (ptr = container->protocolIEs.list.array; \
|
||||
ptr < &container->protocolIEs.list.array[container->protocolIEs.list.count]; \
|
||||
ptr++) { \
|
||||
if((*ptr)->id == IE_ID) { \
|
||||
ie = *ptr; \
|
||||
break; \
|
||||
} \
|
||||
} \
|
||||
if (mandatory) DevAssert(ie != NULL); \
|
||||
} while(0)
|
||||
|
||||
/** \brief Function callback prototype.
|
||||
**/
|
||||
typedef int (*f1ap_message_decoded_callback)(
|
||||
instance_t instance,
|
||||
uint32_t assoc_id,
|
||||
uint32_t stream,
|
||||
F1AP_F1AP_PDU_t *message_p
|
||||
);
|
||||
|
||||
typedef struct f1ap_cudu_ue_inst_s {
|
||||
// used for eNB stats generation
|
||||
rnti_t rnti;
|
||||
module_id_t f1ap_uid;
|
||||
module_id_t mac_uid;
|
||||
module_id_t du_ue_f1ap_id;
|
||||
module_id_t cu_ue_f1ap_id;
|
||||
} f1ap_cudu_ue_t;
|
||||
|
||||
typedef struct f1ap_cudu_inst_s {
|
||||
uint16_t num_ues;
|
||||
f1ap_cudu_ue_t f1ap_ue[MAX_MOBILES_PER_ENB];
|
||||
} f1ap_cudu_inst_t;
|
||||
|
||||
|
||||
|
||||
uint8_t F1AP_get_next_transaction_identifier(module_id_t enb_mod_idP, module_id_t cu_mod_idP);
|
||||
|
||||
|
||||
int f1ap_add_ue(f1ap_cudu_inst_t *f1_inst,
|
||||
module_id_t module_idP,
|
||||
int CC_idP,
|
||||
int UE_id,
|
||||
rnti_t rntiP);
|
||||
|
||||
int f1ap_remove_ue(f1ap_cudu_inst_t *f1_inst,
|
||||
rnti_t rntiP);
|
||||
|
||||
int f1ap_get_du_ue_f1ap_id (f1ap_cudu_inst_t *f1_inst,
|
||||
rnti_t rntiP);
|
||||
|
||||
int f1ap_get_cu_ue_f1ap_id (f1ap_cudu_inst_t *f1_inst,
|
||||
rnti_t rntiP);
|
||||
|
||||
|
||||
int f1ap_get_rnti_by_du_id(f1ap_cudu_inst_t *f1_inst,
|
||||
module_id_t du_ue_f1ap_id );
|
||||
|
||||
|
||||
int f1ap_get_rnti_by_cu_id(f1ap_cudu_inst_t *f1_inst,
|
||||
module_id_t cu_ue_f1ap_id );
|
||||
|
||||
|
||||
int f1ap_get_du_uid(f1ap_cudu_inst_t *f1_inst,
|
||||
module_id_t du_ue_f1ap_id );
|
||||
|
||||
int f1ap_get_cu_uid(f1ap_cudu_inst_t *f1_inst,
|
||||
module_id_t cu_ue_f1ap_id );
|
||||
|
||||
int f1ap_get_uid_by_rnti(f1ap_cudu_inst_t *f1_inst,
|
||||
rnti_t rntiP );
|
||||
|
||||
int f1ap_du_add_cu_ue_id(f1ap_cudu_inst_t *f1_inst,
|
||||
module_id_t du_ue_f1ap_id,
|
||||
module_id_t cu_ue_f1ap_id);
|
||||
|
||||
int f1ap_cu_add_du_ue_id(f1ap_cudu_inst_t *f1_inst,
|
||||
module_id_t cu_ue_f1ap_id,
|
||||
module_id_t du_ue_f1ap_id);
|
||||
|
||||
#endif /* F1AP_COMMON_H_ */
|
||||
@@ -0,0 +1,905 @@
|
||||
/*
|
||||
* 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
|
||||
* the OAI Public License, Version 1.1 (the "License"); you may not use this file
|
||||
* 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 f1ap_cu_interface_management.c
|
||||
* \brief f1ap interface management for CU
|
||||
* \author EURECOM/NTUST
|
||||
* \date 2018
|
||||
* \version 0.1
|
||||
* \company Eurecom
|
||||
* \email: navid.nikaein@eurecom.fr, bing-kai.hong@eurecom.fr
|
||||
* \note
|
||||
* \warning
|
||||
*/
|
||||
|
||||
#include "f1ap_common.h"
|
||||
#include "f1ap_encoder.h"
|
||||
#include "f1ap_decoder.h"
|
||||
#include "f1ap_itti_messaging.h"
|
||||
#include "f1ap_cu_interface_management.h"
|
||||
|
||||
extern f1ap_setup_req_t *f1ap_du_data_from_du;
|
||||
|
||||
int CU_send_RESET(instance_t instance, F1AP_Reset_t *Reset) {
|
||||
AssertFatal(1==0,"Not implemented yet\n");
|
||||
}
|
||||
|
||||
int CU_handle_RESET_ACKKNOWLEDGE(instance_t instance,
|
||||
uint32_t assoc_id,
|
||||
uint32_t stream,
|
||||
F1AP_F1AP_PDU_t *pdu) {
|
||||
AssertFatal(1==0,"Not implemented yet\n");
|
||||
}
|
||||
|
||||
int CU_handle_RESET(instance_t instance,
|
||||
uint32_t assoc_id,
|
||||
uint32_t stream,
|
||||
F1AP_F1AP_PDU_t *pdu) {
|
||||
AssertFatal(1==0,"Not implemented yet\n");
|
||||
}
|
||||
|
||||
int CU_send_RESET_ACKNOWLEDGE(instance_t instance, F1AP_ResetAcknowledge_t *ResetAcknowledge) {
|
||||
AssertFatal(1==0,"Not implemented yet\n");
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
Error Indication
|
||||
*/
|
||||
int CU_handle_ERROR_INDICATION(instance_t instance,
|
||||
uint32_t assoc_id,
|
||||
uint32_t stream,
|
||||
F1AP_F1AP_PDU_t *pdu) {
|
||||
AssertFatal(1==0,"Not implemented yet\n");
|
||||
}
|
||||
|
||||
int CU_send_ERROR_INDICATION(instance_t instance, F1AP_ErrorIndication_t *ErrorIndication) {
|
||||
AssertFatal(1==0,"Not implemented yet\n");
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
F1 Setup
|
||||
*/
|
||||
int CU_handle_F1_SETUP_REQUEST(instance_t instance,
|
||||
uint32_t assoc_id,
|
||||
uint32_t stream,
|
||||
F1AP_F1AP_PDU_t *pdu)
|
||||
{
|
||||
LOG_D(F1AP, "CU_handle_F1_SETUP_REQUEST\n");
|
||||
|
||||
MessageDef *message_p;
|
||||
F1AP_F1SetupRequest_t *container;
|
||||
F1AP_F1SetupRequestIEs_t *ie;
|
||||
int i = 0;
|
||||
|
||||
|
||||
DevAssert(pdu != NULL);
|
||||
|
||||
container = &pdu->choice.initiatingMessage->value.choice.F1SetupRequest;
|
||||
|
||||
/* F1 Setup Request == Non UE-related procedure -> stream 0 */
|
||||
if (stream != 0) {
|
||||
LOG_W(F1AP, "[SCTP %d] Received f1 setup request on stream != 0 (%d)\n",
|
||||
assoc_id, stream);
|
||||
}
|
||||
|
||||
message_p = itti_alloc_new_message(TASK_RRC_ENB, F1AP_SETUP_REQ);
|
||||
|
||||
/* assoc_id */
|
||||
F1AP_SETUP_REQ(message_p).assoc_id = assoc_id;
|
||||
|
||||
/* gNB_DU_id */
|
||||
// this function exits if the ie is mandatory
|
||||
F1AP_FIND_PROTOCOLIE_BY_ID(F1AP_F1SetupRequestIEs_t, ie, container,
|
||||
F1AP_ProtocolIE_ID_id_gNB_DU_ID, true);
|
||||
asn_INTEGER2ulong(&ie->value.choice.GNB_DU_ID, &F1AP_SETUP_REQ(message_p).gNB_DU_id);
|
||||
LOG_D(F1AP, "F1AP_SETUP_REQ(message_p).gNB_DU_id %lu \n", F1AP_SETUP_REQ(message_p).gNB_DU_id);
|
||||
|
||||
/* gNB_DU_name */
|
||||
F1AP_FIND_PROTOCOLIE_BY_ID(F1AP_F1SetupRequestIEs_t, ie, container,
|
||||
F1AP_ProtocolIE_ID_id_gNB_DU_Name, true);
|
||||
F1AP_SETUP_REQ(message_p).gNB_DU_name = calloc(ie->value.choice.GNB_DU_Name.size + 1, sizeof(char));
|
||||
memcpy(F1AP_SETUP_REQ(message_p).gNB_DU_name, ie->value.choice.GNB_DU_Name.buf,
|
||||
ie->value.choice.GNB_DU_Name.size);
|
||||
/* Convert the mme name to a printable string */
|
||||
F1AP_SETUP_REQ(message_p).gNB_DU_name[ie->value.choice.GNB_DU_Name.size] = '\0';
|
||||
LOG_D(F1AP, "F1AP_SETUP_REQ(message_p).gNB_DU_name %s \n", F1AP_SETUP_REQ(message_p).gNB_DU_name);
|
||||
|
||||
/* GNB_DU_Served_Cells_List */
|
||||
F1AP_FIND_PROTOCOLIE_BY_ID(F1AP_F1SetupRequestIEs_t, ie, container,
|
||||
F1AP_ProtocolIE_ID_id_gNB_DU_Served_Cells_List, true);
|
||||
F1AP_SETUP_REQ(message_p).num_cells_available = ie->value.choice.GNB_DU_Served_Cells_List.list.count;
|
||||
LOG_D(F1AP, "F1AP_SETUP_REQ(message_p).num_cells_available %d \n",
|
||||
F1AP_SETUP_REQ(message_p).num_cells_available);
|
||||
|
||||
int num_cells_available = F1AP_SETUP_REQ(message_p).num_cells_available;
|
||||
|
||||
for (i=0; i<num_cells_available; i++) {
|
||||
F1AP_GNB_DU_Served_Cells_Item_t *served_celles_item_p;
|
||||
|
||||
served_celles_item_p = &(((F1AP_GNB_DU_Served_Cells_ItemIEs_t *)ie->value.choice.GNB_DU_Served_Cells_List.list.array[i])->value.choice.GNB_DU_Served_Cells_Item);
|
||||
|
||||
/* tac */
|
||||
OCTET_STRING_TO_INT16(&(served_celles_item_p->served_Cell_Information.fiveGS_TAC), F1AP_SETUP_REQ(message_p).tac[i]);
|
||||
LOG_D(F1AP, "F1AP_SETUP_REQ(message_p).tac[%d] %d \n",
|
||||
i, F1AP_SETUP_REQ(message_p).tac[i]);
|
||||
|
||||
/* - nRCGI */
|
||||
TBCD_TO_MCC_MNC(&(served_celles_item_p->served_Cell_Information.nRCGI.pLMN_Identity), F1AP_SETUP_REQ(message_p).mcc[i],
|
||||
F1AP_SETUP_REQ(message_p).mnc[i],
|
||||
F1AP_SETUP_REQ(message_p).mnc_digit_length[i]);
|
||||
|
||||
|
||||
// NR cellID
|
||||
BIT_STRING_TO_NR_CELL_IDENTITY(&served_celles_item_p->served_Cell_Information.nRCGI.nRCellIdentity,
|
||||
F1AP_SETUP_REQ(message_p).nr_cellid[i]);
|
||||
LOG_D(F1AP, "[SCTP %d] Received nRCGI: MCC %d, MNC %d, CELL_ID %llu\n", assoc_id,
|
||||
F1AP_SETUP_REQ(message_p).mcc[i],
|
||||
F1AP_SETUP_REQ(message_p).mnc[i],
|
||||
(long long unsigned int)F1AP_SETUP_REQ(message_p).nr_cellid[i]);
|
||||
LOG_D(F1AP, "nr_cellId : %x %x %x %x %x\n",
|
||||
served_celles_item_p->served_Cell_Information.nRCGI.nRCellIdentity.buf[0],
|
||||
served_celles_item_p->served_Cell_Information.nRCGI.nRCellIdentity.buf[1],
|
||||
served_celles_item_p->served_Cell_Information.nRCGI.nRCellIdentity.buf[2],
|
||||
served_celles_item_p->served_Cell_Information.nRCGI.nRCellIdentity.buf[3],
|
||||
served_celles_item_p->served_Cell_Information.nRCGI.nRCellIdentity.buf[4]);
|
||||
/* - nRPCI */
|
||||
F1AP_SETUP_REQ(message_p).nr_pci[i] = served_celles_item_p->served_Cell_Information.nRPCI;
|
||||
LOG_D(F1AP, "F1AP_SETUP_REQ(message_p).nr_pci[%d] %d \n",
|
||||
i, F1AP_SETUP_REQ(message_p).nr_pci[i]);
|
||||
|
||||
// System Information
|
||||
/* mib */
|
||||
F1AP_SETUP_REQ(message_p).mib[i] = calloc(served_celles_item_p->gNB_DU_System_Information->mIB_message.size + 1, sizeof(char));
|
||||
memcpy(F1AP_SETUP_REQ(message_p).mib[i], served_celles_item_p->gNB_DU_System_Information->mIB_message.buf,
|
||||
served_celles_item_p->gNB_DU_System_Information->mIB_message.size);
|
||||
/* Convert the mme name to a printable string */
|
||||
F1AP_SETUP_REQ(message_p).mib[i][served_celles_item_p->gNB_DU_System_Information->mIB_message.size] = '\0';
|
||||
F1AP_SETUP_REQ(message_p).mib_length[i] = served_celles_item_p->gNB_DU_System_Information->mIB_message.size;
|
||||
LOG_D(F1AP, "F1AP_SETUP_REQ(message_p).mib[%d] %s , len = %d \n",
|
||||
i, F1AP_SETUP_REQ(message_p).mib[i], F1AP_SETUP_REQ(message_p).mib_length[i]);
|
||||
|
||||
/* sib1 */
|
||||
F1AP_SETUP_REQ(message_p).sib1[i] = calloc(served_celles_item_p->gNB_DU_System_Information->sIB1_message.size + 1, sizeof(char));
|
||||
memcpy(F1AP_SETUP_REQ(message_p).sib1[i], served_celles_item_p->gNB_DU_System_Information->sIB1_message.buf,
|
||||
served_celles_item_p->gNB_DU_System_Information->sIB1_message.size);
|
||||
/* Convert the mme name to a printable string */
|
||||
F1AP_SETUP_REQ(message_p).sib1[i][served_celles_item_p->gNB_DU_System_Information->sIB1_message.size] = '\0';
|
||||
F1AP_SETUP_REQ(message_p).sib1_length[i] = served_celles_item_p->gNB_DU_System_Information->sIB1_message.size;
|
||||
LOG_D(F1AP, "F1AP_SETUP_REQ(message_p).sib1[%d] %s , len = %d \n",
|
||||
i, F1AP_SETUP_REQ(message_p).sib1[i], F1AP_SETUP_REQ(message_p).sib1_length[i]);
|
||||
}
|
||||
|
||||
|
||||
*f1ap_du_data_from_du = F1AP_SETUP_REQ(message_p);
|
||||
// char *measurement_timing_information[F1AP_MAX_NB_CELLS];
|
||||
// uint8_t ranac[F1AP_MAX_NB_CELLS];
|
||||
|
||||
// int fdd_flag = f1ap_setup_req->fdd_flag;
|
||||
|
||||
// union {
|
||||
// struct {
|
||||
// uint32_t ul_nr_arfcn;
|
||||
// uint8_t ul_scs;
|
||||
// uint8_t ul_nrb;
|
||||
|
||||
// uint32_t dl_nr_arfcn;
|
||||
// uint8_t dl_scs;
|
||||
// uint8_t dl_nrb;
|
||||
|
||||
// uint32_t sul_active;
|
||||
// uint32_t sul_nr_arfcn;
|
||||
// uint8_t sul_scs;
|
||||
// uint8_t sul_nrb;
|
||||
|
||||
// uint8_t num_frequency_bands;
|
||||
// uint16_t nr_band[32];
|
||||
// uint8_t num_sul_frequency_bands;
|
||||
// uint16_t nr_sul_band[32];
|
||||
// } fdd;
|
||||
// struct {
|
||||
|
||||
// uint32_t nr_arfcn;
|
||||
// uint8_t scs;
|
||||
// uint8_t nrb;
|
||||
|
||||
// uint32_t sul_active;
|
||||
// uint32_t sul_nr_arfcn;
|
||||
// uint8_t sul_scs;
|
||||
// uint8_t sul_nrb;
|
||||
|
||||
// uint8_t num_frequency_bands;
|
||||
// uint16_t nr_band[32];
|
||||
// uint8_t num_sul_frequency_bands;
|
||||
// uint16_t nr_sul_band[32];
|
||||
|
||||
// } tdd;
|
||||
// } nr_mode_info[F1AP_MAX_NB_CELLS];
|
||||
|
||||
MSC_LOG_TX_MESSAGE(
|
||||
MSC_F1AP_CU,
|
||||
MSC_RRC_ENB,
|
||||
0,
|
||||
0,
|
||||
MSC_AS_TIME_FMT" CU_handle_F1_SETUP_REQUEST",
|
||||
0,0//MSC_AS_TIME_ARGS(ctxt_pP),
|
||||
);
|
||||
|
||||
if (num_cells_available > 0) {
|
||||
itti_send_msg_to_task(TASK_RRC_ENB, ENB_MODULE_ID_TO_INSTANCE(instance), message_p);
|
||||
} else {
|
||||
CU_send_F1_SETUP_FAILURE(instance);
|
||||
return -1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
int CU_send_F1_SETUP_RESPONSE(instance_t instance,
|
||||
f1ap_setup_resp_t *f1ap_setup_resp) {
|
||||
|
||||
module_id_t enb_mod_idP;
|
||||
module_id_t cu_mod_idP;
|
||||
|
||||
// This should be fixed
|
||||
enb_mod_idP = (module_id_t)0;
|
||||
cu_mod_idP = (module_id_t)0;
|
||||
|
||||
F1AP_F1AP_PDU_t pdu;
|
||||
F1AP_F1SetupResponse_t *out;
|
||||
F1AP_F1SetupResponseIEs_t *ie;
|
||||
|
||||
uint8_t *buffer;
|
||||
uint32_t len;
|
||||
int i = 0;
|
||||
|
||||
/* Create */
|
||||
/* 0. Message Type */
|
||||
memset(&pdu, 0, sizeof(pdu));
|
||||
pdu.present = F1AP_F1AP_PDU_PR_successfulOutcome;
|
||||
pdu.choice.successfulOutcome = (F1AP_SuccessfulOutcome_t *)calloc(1, sizeof(F1AP_SuccessfulOutcome_t));
|
||||
pdu.choice.successfulOutcome->procedureCode = F1AP_ProcedureCode_id_F1Setup;
|
||||
pdu.choice.successfulOutcome->criticality = F1AP_Criticality_reject;
|
||||
pdu.choice.successfulOutcome->value.present = F1AP_SuccessfulOutcome__value_PR_F1SetupResponse;
|
||||
out = &pdu.choice.successfulOutcome->value.choice.F1SetupResponse;
|
||||
|
||||
/* mandatory */
|
||||
/* c1. Transaction ID (integer value)*/
|
||||
ie = (F1AP_F1SetupResponseIEs_t *)calloc(1, sizeof(F1AP_F1SetupResponseIEs_t));
|
||||
ie->id = F1AP_ProtocolIE_ID_id_TransactionID;
|
||||
ie->criticality = F1AP_Criticality_reject;
|
||||
ie->value.present = F1AP_F1SetupResponseIEs__value_PR_TransactionID;
|
||||
ie->value.choice.TransactionID = F1AP_get_next_transaction_identifier(enb_mod_idP, cu_mod_idP);
|
||||
ASN_SEQUENCE_ADD(&out->protocolIEs.list, ie);
|
||||
|
||||
/* optional */
|
||||
/* c2. GNB_CU_Name */
|
||||
if (f1ap_setup_resp->gNB_CU_name != NULL) {
|
||||
ie = (F1AP_F1SetupResponseIEs_t *)calloc(1, sizeof(F1AP_F1SetupResponseIEs_t));
|
||||
ie->id = F1AP_ProtocolIE_ID_id_gNB_CU_Name;
|
||||
ie->criticality = F1AP_Criticality_ignore;
|
||||
ie->value.present = F1AP_F1SetupResponseIEs__value_PR_GNB_CU_Name;
|
||||
OCTET_STRING_fromBuf(&ie->value.choice.GNB_CU_Name, f1ap_setup_resp->gNB_CU_name,
|
||||
strlen(f1ap_setup_resp->gNB_CU_name));
|
||||
ASN_SEQUENCE_ADD(&out->protocolIEs.list, ie);
|
||||
}
|
||||
|
||||
/* mandatory */
|
||||
/* c3. cells to be Activated list */
|
||||
ie = (F1AP_F1SetupResponseIEs_t *)calloc(1, sizeof(F1AP_F1SetupResponseIEs_t));
|
||||
ie->id = F1AP_ProtocolIE_ID_id_Cells_to_be_Activated_List;
|
||||
ie->criticality = F1AP_Criticality_reject;
|
||||
ie->value.present = F1AP_F1SetupResponseIEs__value_PR_Cells_to_be_Activated_List;
|
||||
|
||||
int num_cells_to_activate = f1ap_setup_resp->num_cells_to_activate;
|
||||
LOG_D(F1AP, "num_cells_to_activate = %d \n", num_cells_to_activate);
|
||||
for (i=0;
|
||||
i<num_cells_to_activate;
|
||||
i++) {
|
||||
|
||||
F1AP_Cells_to_be_Activated_List_ItemIEs_t *cells_to_be_activated_list_item_ies;
|
||||
cells_to_be_activated_list_item_ies = (F1AP_Cells_to_be_Activated_List_ItemIEs_t *)calloc(1, sizeof(F1AP_Cells_to_be_Activated_List_ItemIEs_t));
|
||||
cells_to_be_activated_list_item_ies->id = F1AP_ProtocolIE_ID_id_Cells_to_be_Activated_List_Item;
|
||||
cells_to_be_activated_list_item_ies->criticality = F1AP_Criticality_reject;
|
||||
cells_to_be_activated_list_item_ies->value.present = F1AP_Cells_to_be_Activated_List_ItemIEs__value_PR_Cells_to_be_Activated_List_Item;
|
||||
|
||||
/* 3.1 cells to be Activated list item */
|
||||
F1AP_Cells_to_be_Activated_List_Item_t cells_to_be_activated_list_item;
|
||||
memset((void *)&cells_to_be_activated_list_item, 0, sizeof(F1AP_Cells_to_be_Activated_List_Item_t));
|
||||
|
||||
/* - nRCGI */
|
||||
F1AP_NRCGI_t nRCGI;
|
||||
MCC_MNC_TO_PLMNID(f1ap_setup_resp->mcc[i], f1ap_setup_resp->mnc[i], f1ap_setup_resp->mnc_digit_length[i],
|
||||
&nRCGI.pLMN_Identity);
|
||||
NR_CELL_ID_TO_BIT_STRING(f1ap_setup_resp->nr_cellid[i], &nRCGI.nRCellIdentity);
|
||||
cells_to_be_activated_list_item.nRCGI = nRCGI;
|
||||
|
||||
/* optional */
|
||||
/* - nRPCI */
|
||||
if (1) {
|
||||
cells_to_be_activated_list_item.nRPCI = (F1AP_NRPCI_t *)calloc(1, sizeof(F1AP_NRPCI_t));
|
||||
*cells_to_be_activated_list_item.nRPCI = f1ap_setup_resp->nrpci[i]; // int 0..1007
|
||||
}
|
||||
|
||||
/* optional */
|
||||
/* - gNB-CU System Information */
|
||||
if (1) {
|
||||
/* 3.1.2 gNB-CUSystem Information */
|
||||
F1AP_Cells_to_be_Activated_List_ItemExtIEs_t *cells_to_be_activated_list_itemExtIEs;
|
||||
cells_to_be_activated_list_itemExtIEs = (F1AP_Cells_to_be_Activated_List_ItemExtIEs_t *)calloc(1, sizeof(F1AP_Cells_to_be_Activated_List_ItemExtIEs_t));
|
||||
cells_to_be_activated_list_itemExtIEs->id = F1AP_ProtocolIE_ID_id_gNB_CUSystemInformation;
|
||||
cells_to_be_activated_list_itemExtIEs->criticality = F1AP_Criticality_reject;
|
||||
cells_to_be_activated_list_itemExtIEs->extensionValue.present = F1AP_Cells_to_be_Activated_List_ItemExtIEs__extensionValue_PR_GNB_CUSystemInformation;
|
||||
|
||||
F1AP_GNB_CUSystemInformation_t *gNB_CUSystemInformation = (F1AP_GNB_CUSystemInformation_t *)calloc(1, sizeof(F1AP_GNB_CUSystemInformation_t));
|
||||
//LOG_I(F1AP, "%s() SI %d size %d: ", __func__, i, f1ap_setup_resp->SI_container_length[i][0]);
|
||||
//for (int n = 0; n < f1ap_setup_resp->SI_container_length[i][0]; n++)
|
||||
// printf("%02x ", f1ap_setup_resp->SI_container[i][0][n]);
|
||||
//printf("\n");
|
||||
OCTET_STRING_fromBuf(&gNB_CUSystemInformation->sImessage,
|
||||
(const char*)f1ap_setup_resp->SI_container[i][0],
|
||||
f1ap_setup_resp->SI_container_length[i][0]);
|
||||
|
||||
LOG_D(F1AP, "f1ap_setup_resp->SI_container_length = %d \n", f1ap_setup_resp->SI_container_length[0][0]);
|
||||
cells_to_be_activated_list_itemExtIEs->extensionValue.choice.GNB_CUSystemInformation = *gNB_CUSystemInformation;
|
||||
|
||||
|
||||
F1AP_ProtocolExtensionContainer_160P9_t p_160P9_t;
|
||||
memset((void *)&p_160P9_t, 0, sizeof(F1AP_ProtocolExtensionContainer_160P9_t));
|
||||
|
||||
ASN_SEQUENCE_ADD(&p_160P9_t.list,
|
||||
cells_to_be_activated_list_itemExtIEs);
|
||||
cells_to_be_activated_list_item.iE_Extensions = (struct F1AP_ProtocolExtensionContainer*)&p_160P9_t;
|
||||
|
||||
}
|
||||
/* ADD */
|
||||
cells_to_be_activated_list_item_ies->value.choice.Cells_to_be_Activated_List_Item = cells_to_be_activated_list_item;
|
||||
ASN_SEQUENCE_ADD(&ie->value.choice.Cells_to_be_Activated_List.list,
|
||||
cells_to_be_activated_list_item_ies);
|
||||
}
|
||||
ASN_SEQUENCE_ADD(&out->protocolIEs.list, ie);
|
||||
|
||||
/* encode */
|
||||
if (f1ap_encode_pdu(&pdu, &buffer, &len) < 0) {
|
||||
LOG_E(F1AP, "Failed to encode F1 setup request\n");
|
||||
return -1;
|
||||
}
|
||||
|
||||
cu_f1ap_itti_send_sctp_data_req(instance, f1ap_du_data_from_du->assoc_id, buffer, len, 0);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int CU_send_F1_SETUP_FAILURE(instance_t instance) {
|
||||
LOG_D(F1AP, "CU_send_F1_SETUP_FAILURE\n");
|
||||
|
||||
module_id_t enb_mod_idP;
|
||||
module_id_t cu_mod_idP;
|
||||
|
||||
// This should be fixed
|
||||
enb_mod_idP = (module_id_t)0;
|
||||
cu_mod_idP = (module_id_t)0;
|
||||
|
||||
F1AP_F1AP_PDU_t pdu;
|
||||
F1AP_F1SetupFailure_t *out;
|
||||
F1AP_F1SetupFailureIEs_t *ie;
|
||||
|
||||
uint8_t *buffer;
|
||||
uint32_t len;
|
||||
|
||||
/* Create */
|
||||
/* 0. Message Type */
|
||||
memset(&pdu, 0, sizeof(pdu));
|
||||
pdu.present = F1AP_F1AP_PDU_PR_unsuccessfulOutcome;
|
||||
pdu.choice.unsuccessfulOutcome = (F1AP_UnsuccessfulOutcome_t *)calloc(1, sizeof(F1AP_UnsuccessfulOutcome_t));
|
||||
pdu.choice.unsuccessfulOutcome->procedureCode = F1AP_ProcedureCode_id_F1Setup;
|
||||
pdu.choice.unsuccessfulOutcome->criticality = F1AP_Criticality_reject;
|
||||
pdu.choice.unsuccessfulOutcome->value.present = F1AP_UnsuccessfulOutcome__value_PR_F1SetupFailure;
|
||||
out = &pdu.choice.unsuccessfulOutcome->value.choice.F1SetupFailure;
|
||||
|
||||
/* mandatory */
|
||||
/* c1. Transaction ID (integer value)*/
|
||||
ie = (F1AP_F1SetupFailureIEs_t *)calloc(1, sizeof(F1AP_F1SetupFailureIEs_t));
|
||||
ie->id = F1AP_ProtocolIE_ID_id_TransactionID;
|
||||
ie->criticality = F1AP_Criticality_reject;
|
||||
ie->value.present = F1AP_F1SetupFailureIEs__value_PR_TransactionID;
|
||||
ie->value.choice.TransactionID = F1AP_get_next_transaction_identifier(enb_mod_idP, cu_mod_idP);
|
||||
ASN_SEQUENCE_ADD(&out->protocolIEs.list, ie);
|
||||
|
||||
/* mandatory */
|
||||
/* c2. Cause */
|
||||
ie = (F1AP_F1SetupFailureIEs_t *)calloc(1, sizeof(F1AP_F1SetupFailureIEs_t));
|
||||
ie->id = F1AP_ProtocolIE_ID_id_Cause;
|
||||
ie->criticality = F1AP_Criticality_ignore;
|
||||
ie->value.present = F1AP_F1SetupFailureIEs__value_PR_Cause;
|
||||
ie->value.choice.Cause.present = F1AP_Cause_PR_radioNetwork;
|
||||
ie->value.choice.Cause.choice.radioNetwork = F1AP_CauseRadioNetwork_unspecified;
|
||||
ASN_SEQUENCE_ADD(&out->protocolIEs.list, ie);
|
||||
|
||||
/* optional */
|
||||
/* c3. TimeToWait */
|
||||
if (0) {
|
||||
ie = (F1AP_F1SetupFailureIEs_t *)calloc(1, sizeof(F1AP_F1SetupFailureIEs_t));
|
||||
ie->id = F1AP_ProtocolIE_ID_id_TimeToWait;
|
||||
ie->criticality = F1AP_Criticality_ignore;
|
||||
ie->value.present = F1AP_F1SetupFailureIEs__value_PR_TimeToWait;
|
||||
ie->value.choice.TimeToWait = F1AP_TimeToWait_v10s;
|
||||
ASN_SEQUENCE_ADD(&out->protocolIEs.list, ie);
|
||||
}
|
||||
|
||||
/* optional */
|
||||
/* c4. CriticalityDiagnostics*/
|
||||
if (0) {
|
||||
ie = (F1AP_F1SetupFailureIEs_t *)calloc(1, sizeof(F1AP_F1SetupFailureIEs_t));
|
||||
ie->id = F1AP_ProtocolIE_ID_id_CriticalityDiagnostics;
|
||||
ie->criticality = F1AP_Criticality_ignore;
|
||||
ie->value.present = F1AP_F1SetupFailureIEs__value_PR_CriticalityDiagnostics;
|
||||
ie->value.choice.CriticalityDiagnostics.procedureCode = (F1AP_ProcedureCode_t *)calloc(1, sizeof(F1AP_ProcedureCode_t));
|
||||
*ie->value.choice.CriticalityDiagnostics.procedureCode = F1AP_ProcedureCode_id_UEContextSetup;
|
||||
ie->value.choice.CriticalityDiagnostics.triggeringMessage = (F1AP_TriggeringMessage_t *)calloc(1, sizeof(F1AP_TriggeringMessage_t));
|
||||
*ie->value.choice.CriticalityDiagnostics.triggeringMessage = F1AP_TriggeringMessage_initiating_message;
|
||||
ie->value.choice.CriticalityDiagnostics.procedureCriticality = (F1AP_Criticality_t *)calloc(1, sizeof(F1AP_Criticality_t));
|
||||
*ie->value.choice.CriticalityDiagnostics.procedureCriticality = F1AP_Criticality_reject;
|
||||
ie->value.choice.CriticalityDiagnostics.transactionID = (F1AP_TransactionID_t *)calloc(1, sizeof(F1AP_TransactionID_t));
|
||||
*ie->value.choice.CriticalityDiagnostics.transactionID = 0;
|
||||
ASN_SEQUENCE_ADD(&out->protocolIEs.list, ie);
|
||||
}
|
||||
|
||||
/* encode */
|
||||
if (f1ap_encode_pdu(&pdu, &buffer, &len) < 0) {
|
||||
LOG_E(F1AP, "Failed to encode F1 setup request\n");
|
||||
return -1;
|
||||
}
|
||||
|
||||
cu_f1ap_itti_send_sctp_data_req(instance, f1ap_du_data_from_du->assoc_id, buffer, len, 0);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*
|
||||
gNB-DU Configuration Update
|
||||
*/
|
||||
|
||||
int CU_handle_gNB_DU_CONFIGURATION_UPDATE(instance_t instance,
|
||||
uint32_t assoc_id,
|
||||
uint32_t stream,
|
||||
F1AP_F1AP_PDU_t *pdu) {
|
||||
AssertFatal(1==0,"Not implemented yet\n");
|
||||
}
|
||||
|
||||
int CU_send_gNB_DU_CONFIGURATION_FAILURE(instance_t instance,
|
||||
F1AP_GNBDUConfigurationUpdateFailure_t *GNBDUConfigurationUpdateFailure) {
|
||||
AssertFatal(1==0,"Not implemented yet\n");
|
||||
}
|
||||
|
||||
int CU_send_gNB_DU_CONFIGURATION_UPDATE_ACKNOWLEDGE(instance_t instance,
|
||||
F1AP_GNBDUConfigurationUpdateAcknowledge_t *GNBDUConfigurationUpdateAcknowledge) {
|
||||
AssertFatal(1==0,"Not implemented yet\n");
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*
|
||||
gNB-CU Configuration Update
|
||||
*/
|
||||
|
||||
//void CU_send_gNB_CU_CONFIGURATION_UPDATE(F1AP_GNBCUConfigurationUpdate_t *GNBCUConfigurationUpdate) {
|
||||
int CU_send_gNB_CU_CONFIGURATION_UPDATE(instance_t instance, module_id_t du_mod_idP) {
|
||||
F1AP_F1AP_PDU_t pdu;
|
||||
F1AP_GNBCUConfigurationUpdate_t *out;
|
||||
F1AP_GNBCUConfigurationUpdateIEs_t *ie;
|
||||
|
||||
uint8_t *buffer;
|
||||
uint32_t len;
|
||||
int i = 0;
|
||||
|
||||
// for test
|
||||
int mcc = 208;
|
||||
int mnc = 93;
|
||||
int mnc_digit_length = 8;
|
||||
|
||||
/* Create */
|
||||
/* 0. Message Type */
|
||||
memset(&pdu, 0, sizeof(pdu));
|
||||
pdu.present = F1AP_F1AP_PDU_PR_initiatingMessage;
|
||||
pdu.choice.initiatingMessage = (F1AP_InitiatingMessage_t *)calloc(1, sizeof(F1AP_InitiatingMessage_t));
|
||||
pdu.choice.initiatingMessage->procedureCode = F1AP_ProcedureCode_id_gNBCUConfigurationUpdate;
|
||||
pdu.choice.initiatingMessage->criticality = F1AP_Criticality_ignore;
|
||||
pdu.choice.initiatingMessage->value.present = F1AP_InitiatingMessage__value_PR_GNBCUConfigurationUpdate;
|
||||
out = &pdu.choice.initiatingMessage->value.choice.GNBCUConfigurationUpdate;
|
||||
|
||||
/* mandatory */
|
||||
/* c1. Transaction ID (integer value) */
|
||||
ie = (F1AP_GNBCUConfigurationUpdateIEs_t *)calloc(1, sizeof(F1AP_GNBCUConfigurationUpdateIEs_t));
|
||||
ie->id = F1AP_ProtocolIE_ID_id_TransactionID;
|
||||
ie->criticality = F1AP_Criticality_reject;
|
||||
ie->value.present = F1AP_GNBCUConfigurationUpdateIEs__value_PR_TransactionID;
|
||||
ie->value.choice.TransactionID = F1AP_get_next_transaction_identifier(instance, du_mod_idP);
|
||||
ASN_SEQUENCE_ADD(&out->protocolIEs.list, ie);
|
||||
|
||||
|
||||
|
||||
/* mandatory */
|
||||
/* c2. Cells_to_be_Activated_List */
|
||||
ie = (F1AP_GNBCUConfigurationUpdateIEs_t *)calloc(1, sizeof(F1AP_GNBCUConfigurationUpdateIEs_t));
|
||||
ie->id = F1AP_ProtocolIE_ID_id_Cells_to_be_Activated_List;
|
||||
ie->criticality = F1AP_Criticality_reject;
|
||||
ie->value.present = F1AP_GNBCUConfigurationUpdateIEs__value_PR_Cells_to_be_Activated_List;
|
||||
|
||||
for (i=0;
|
||||
i<1;
|
||||
i++) {
|
||||
|
||||
F1AP_Cells_to_be_Activated_List_ItemIEs_t *cells_to_be_activated_list_item_ies;
|
||||
cells_to_be_activated_list_item_ies = (F1AP_Cells_to_be_Activated_List_ItemIEs_t *)calloc(1, sizeof(F1AP_Cells_to_be_Activated_List_ItemIEs_t));
|
||||
cells_to_be_activated_list_item_ies->id = F1AP_ProtocolIE_ID_id_Cells_to_be_Activated_List_Item;
|
||||
cells_to_be_activated_list_item_ies->criticality = F1AP_Criticality_reject;
|
||||
cells_to_be_activated_list_item_ies->value.present = F1AP_Cells_to_be_Activated_List_ItemIEs__value_PR_Cells_to_be_Activated_List_Item;
|
||||
|
||||
/* 2.1 cells to be Activated list item */
|
||||
F1AP_Cells_to_be_Activated_List_Item_t cells_to_be_activated_list_item;
|
||||
memset((void *)&cells_to_be_activated_list_item, 0, sizeof(F1AP_Cells_to_be_Activated_List_Item_t));
|
||||
|
||||
/* - nRCGI */
|
||||
F1AP_NRCGI_t nRCGI;
|
||||
MCC_MNC_TO_PLMNID(mcc, mnc, mnc_digit_length,
|
||||
&nRCGI.pLMN_Identity);
|
||||
NR_CELL_ID_TO_BIT_STRING(123456, &nRCGI.nRCellIdentity);
|
||||
cells_to_be_activated_list_item.nRCGI = nRCGI;
|
||||
|
||||
/* optional */
|
||||
/* - nRPCI */
|
||||
if (0) {
|
||||
cells_to_be_activated_list_item.nRPCI = (F1AP_NRPCI_t *)calloc(1, sizeof(F1AP_NRPCI_t));
|
||||
*cells_to_be_activated_list_item.nRPCI = 321L; // int 0..1007
|
||||
}
|
||||
|
||||
/* optional */
|
||||
/* - gNB-CU System Information */
|
||||
//if (1) {
|
||||
|
||||
//}
|
||||
/* ADD */
|
||||
cells_to_be_activated_list_item_ies->value.choice.Cells_to_be_Activated_List_Item = cells_to_be_activated_list_item;
|
||||
ASN_SEQUENCE_ADD(&ie->value.choice.Cells_to_be_Activated_List.list,
|
||||
cells_to_be_activated_list_item_ies);
|
||||
}
|
||||
ASN_SEQUENCE_ADD(&out->protocolIEs.list, ie);
|
||||
|
||||
|
||||
|
||||
/* mandatory */
|
||||
/* c3. Cells_to_be_Deactivated_List */
|
||||
ie = (F1AP_GNBCUConfigurationUpdateIEs_t *)calloc(1, sizeof(F1AP_GNBCUConfigurationUpdateIEs_t));
|
||||
ie->id = F1AP_ProtocolIE_ID_id_Cells_to_be_Deactivated_List;
|
||||
ie->criticality = F1AP_Criticality_reject;
|
||||
ie->value.present = F1AP_GNBCUConfigurationUpdateIEs__value_PR_Cells_to_be_Deactivated_List;
|
||||
|
||||
for (i=0;
|
||||
i<1;
|
||||
i++) {
|
||||
|
||||
F1AP_Cells_to_be_Deactivated_List_ItemIEs_t *cells_to_be_deactivated_list_item_ies;
|
||||
cells_to_be_deactivated_list_item_ies = (F1AP_Cells_to_be_Deactivated_List_ItemIEs_t *)calloc(1, sizeof(F1AP_Cells_to_be_Deactivated_List_ItemIEs_t));
|
||||
cells_to_be_deactivated_list_item_ies->id = F1AP_ProtocolIE_ID_id_Cells_to_be_Activated_List_Item;
|
||||
cells_to_be_deactivated_list_item_ies->criticality = F1AP_Criticality_reject;
|
||||
cells_to_be_deactivated_list_item_ies->value.present = F1AP_Cells_to_be_Deactivated_List_ItemIEs__value_PR_Cells_to_be_Deactivated_List_Item;
|
||||
|
||||
/* 3.1 cells to be Deactivated list item */
|
||||
F1AP_Cells_to_be_Deactivated_List_Item_t cells_to_be_deactivated_list_item;
|
||||
memset((void *)&cells_to_be_deactivated_list_item, 0, sizeof(F1AP_Cells_to_be_Deactivated_List_Item_t));
|
||||
|
||||
/* - nRCGI */
|
||||
F1AP_NRCGI_t nRCGI;
|
||||
MCC_MNC_TO_PLMNID(mcc, mnc, mnc_digit_length,
|
||||
&nRCGI.pLMN_Identity);
|
||||
NR_CELL_ID_TO_BIT_STRING(123456, &nRCGI.nRCellIdentity);
|
||||
cells_to_be_deactivated_list_item.nRCGI = nRCGI;
|
||||
|
||||
//}
|
||||
/* ADD */
|
||||
cells_to_be_deactivated_list_item_ies->value.choice.Cells_to_be_Deactivated_List_Item = cells_to_be_deactivated_list_item;
|
||||
ASN_SEQUENCE_ADD(&ie->value.choice.Cells_to_be_Deactivated_List.list,
|
||||
cells_to_be_deactivated_list_item_ies);
|
||||
}
|
||||
ASN_SEQUENCE_ADD(&out->protocolIEs.list, ie);
|
||||
|
||||
|
||||
/* mandatory */
|
||||
/* c4. GNB_CU_TNL_Association_To_Add_List */
|
||||
ie = (F1AP_GNBCUConfigurationUpdateIEs_t *)calloc(1, sizeof(F1AP_GNBCUConfigurationUpdateIEs_t));
|
||||
ie->id = F1AP_ProtocolIE_ID_id_GNB_CU_TNL_Association_To_Add_List;
|
||||
ie->criticality = F1AP_Criticality_reject;
|
||||
ie->value.present = F1AP_GNBCUConfigurationUpdateIEs__value_PR_GNB_CU_TNL_Association_To_Add_List;
|
||||
|
||||
for (i=0;
|
||||
i<1;
|
||||
i++) {
|
||||
|
||||
F1AP_GNB_CU_TNL_Association_To_Add_ItemIEs_t *gnb_cu_tnl_association_to_add_item_ies;
|
||||
gnb_cu_tnl_association_to_add_item_ies = (F1AP_GNB_CU_TNL_Association_To_Add_ItemIEs_t *)calloc(1, sizeof(F1AP_GNB_CU_TNL_Association_To_Add_ItemIEs_t));
|
||||
gnb_cu_tnl_association_to_add_item_ies->id = F1AP_ProtocolIE_ID_id_GNB_CU_TNL_Association_To_Add_Item;
|
||||
gnb_cu_tnl_association_to_add_item_ies->criticality = F1AP_Criticality_reject;
|
||||
gnb_cu_tnl_association_to_add_item_ies->value.present = F1AP_GNB_CU_TNL_Association_To_Add_ItemIEs__value_PR_GNB_CU_TNL_Association_To_Add_Item;
|
||||
|
||||
/* 4.1 GNB_CU_TNL_Association_To_Add_Item */
|
||||
F1AP_GNB_CU_TNL_Association_To_Add_Item_t gnb_cu_tnl_association_to_add_item;
|
||||
memset((void *)&gnb_cu_tnl_association_to_add_item, 0, sizeof(F1AP_GNB_CU_TNL_Association_To_Add_Item_t));
|
||||
|
||||
|
||||
/* 4.1.1 tNLAssociationTransportLayerAddress */
|
||||
F1AP_CP_TransportLayerAddress_t transportLayerAddress;
|
||||
memset((void *)&transportLayerAddress, 0, sizeof(F1AP_CP_TransportLayerAddress_t));
|
||||
transportLayerAddress.present = F1AP_CP_TransportLayerAddress_PR_endpoint_IP_address;
|
||||
TRANSPORT_LAYER_ADDRESS_IPv4_TO_BIT_STRING(1234, &transportLayerAddress.choice.endpoint_IP_address);
|
||||
|
||||
// memset((void *)&transportLayerAddress, 0, sizeof(F1AP_CP_TransportLayerAddress_t));
|
||||
// transportLayerAddress.present = F1AP_CP_TransportLayerAddress_PR_endpoint_IP_address_and_port;
|
||||
// transportLayerAddress.choice.endpoint_IP_address_and_port = (F1AP_Endpoint_IP_address_and_port_t *)calloc(1, sizeof(F1AP_Endpoint_IP_address_and_port_t));
|
||||
// TRANSPORT_LAYER_ADDRESS_IPv4_TO_BIT_STRING(1234, &transportLayerAddress.choice.endpoint_IP_address_and_port.endpoint_IP_address);
|
||||
|
||||
gnb_cu_tnl_association_to_add_item.tNLAssociationTransportLayerAddress = transportLayerAddress;
|
||||
|
||||
/* 4.1.2 tNLAssociationUsage */
|
||||
gnb_cu_tnl_association_to_add_item.tNLAssociationUsage = F1AP_TNLAssociationUsage_non_ue;
|
||||
|
||||
|
||||
/* ADD */
|
||||
gnb_cu_tnl_association_to_add_item_ies->value.choice.GNB_CU_TNL_Association_To_Add_Item = gnb_cu_tnl_association_to_add_item;
|
||||
ASN_SEQUENCE_ADD(&ie->value.choice.GNB_CU_TNL_Association_To_Add_List.list,
|
||||
gnb_cu_tnl_association_to_add_item_ies);
|
||||
}
|
||||
ASN_SEQUENCE_ADD(&out->protocolIEs.list, ie);
|
||||
|
||||
|
||||
|
||||
/* mandatory */
|
||||
/* c5. GNB_CU_TNL_Association_To_Remove_List */
|
||||
ie = (F1AP_GNBCUConfigurationUpdateIEs_t *)calloc(1, sizeof(F1AP_GNBCUConfigurationUpdateIEs_t));
|
||||
ie->id = F1AP_ProtocolIE_ID_id_GNB_CU_TNL_Association_To_Remove_List;
|
||||
ie->criticality = F1AP_Criticality_reject;
|
||||
ie->value.present = F1AP_GNBCUConfigurationUpdateIEs__value_PR_GNB_CU_TNL_Association_To_Remove_List;
|
||||
for (i=0;
|
||||
i<1;
|
||||
i++) {
|
||||
|
||||
F1AP_GNB_CU_TNL_Association_To_Remove_ItemIEs_t *gnb_cu_tnl_association_to_remove_item_ies;
|
||||
gnb_cu_tnl_association_to_remove_item_ies = (F1AP_GNB_CU_TNL_Association_To_Remove_ItemIEs_t *)calloc(1, sizeof(F1AP_GNB_CU_TNL_Association_To_Remove_ItemIEs_t));
|
||||
gnb_cu_tnl_association_to_remove_item_ies->id = F1AP_ProtocolIE_ID_id_GNB_CU_TNL_Association_To_Remove_Item;
|
||||
gnb_cu_tnl_association_to_remove_item_ies->criticality = F1AP_Criticality_reject;
|
||||
gnb_cu_tnl_association_to_remove_item_ies->value.present = F1AP_GNB_CU_TNL_Association_To_Remove_ItemIEs__value_PR_GNB_CU_TNL_Association_To_Remove_Item;
|
||||
|
||||
/* 4.1 GNB_CU_TNL_Association_To_Remove_Item */
|
||||
F1AP_GNB_CU_TNL_Association_To_Remove_Item_t gnb_cu_tnl_association_to_remove_item;
|
||||
memset((void *)&gnb_cu_tnl_association_to_remove_item, 0, sizeof(F1AP_GNB_CU_TNL_Association_To_Remove_Item_t));
|
||||
|
||||
|
||||
/* 4.1.1 tNLAssociationTransportLayerAddress */
|
||||
F1AP_CP_TransportLayerAddress_t transportLayerAddress;
|
||||
memset((void *)&transportLayerAddress, 0, sizeof(F1AP_CP_TransportLayerAddress_t));
|
||||
transportLayerAddress.present = F1AP_CP_TransportLayerAddress_PR_endpoint_IP_address;
|
||||
TRANSPORT_LAYER_ADDRESS_IPv4_TO_BIT_STRING(1234, &transportLayerAddress.choice.endpoint_IP_address);
|
||||
|
||||
// memset((void *)&transportLayerAddress, 0, sizeof(F1AP_CP_TransportLayerAddress_t));
|
||||
// transportLayerAddress.present = F1AP_CP_TransportLayerAddress_PR_endpoint_IP_address_and_port;
|
||||
// transportLayerAddress.choice.endpoint_IP_address_and_port = (F1AP_Endpoint_IP_address_and_port_t *)calloc(1, sizeof(F1AP_Endpoint_IP_address_and_port_t));
|
||||
// TRANSPORT_LAYER_ADDRESS_IPv4_TO_BIT_STRING(1234, &transportLayerAddress.choice.endpoint_IP_address_and_port.endpoint_IP_address);
|
||||
|
||||
gnb_cu_tnl_association_to_remove_item.tNLAssociationTransportLayerAddress = transportLayerAddress;
|
||||
|
||||
|
||||
/* ADD */
|
||||
gnb_cu_tnl_association_to_remove_item_ies->value.choice.GNB_CU_TNL_Association_To_Remove_Item = gnb_cu_tnl_association_to_remove_item;
|
||||
ASN_SEQUENCE_ADD(&ie->value.choice.GNB_CU_TNL_Association_To_Remove_List.list,
|
||||
gnb_cu_tnl_association_to_remove_item_ies);
|
||||
}
|
||||
ASN_SEQUENCE_ADD(&out->protocolIEs.list, ie);
|
||||
|
||||
/* mandatory */
|
||||
/* c6. GNB_CU_TNL_Association_To_Update_List */
|
||||
ie = (F1AP_GNBCUConfigurationUpdateIEs_t *)calloc(1, sizeof(F1AP_GNBCUConfigurationUpdateIEs_t));
|
||||
ie->id = F1AP_ProtocolIE_ID_id_GNB_CU_TNL_Association_To_Update_List;
|
||||
ie->criticality = F1AP_Criticality_reject;
|
||||
ie->value.present = F1AP_GNBCUConfigurationUpdateIEs__value_PR_GNB_CU_TNL_Association_To_Update_List;
|
||||
for (i=0;
|
||||
i<1;
|
||||
i++) {
|
||||
|
||||
F1AP_GNB_CU_TNL_Association_To_Update_ItemIEs_t *gnb_cu_tnl_association_to_update_item_ies;
|
||||
gnb_cu_tnl_association_to_update_item_ies = (F1AP_GNB_CU_TNL_Association_To_Update_ItemIEs_t *)calloc(1, sizeof(F1AP_GNB_CU_TNL_Association_To_Update_ItemIEs_t));
|
||||
gnb_cu_tnl_association_to_update_item_ies->id = F1AP_ProtocolIE_ID_id_GNB_CU_TNL_Association_To_Update_Item;
|
||||
gnb_cu_tnl_association_to_update_item_ies->criticality = F1AP_Criticality_reject;
|
||||
gnb_cu_tnl_association_to_update_item_ies->value.present = F1AP_GNB_CU_TNL_Association_To_Update_ItemIEs__value_PR_GNB_CU_TNL_Association_To_Update_Item;
|
||||
|
||||
/* 4.1 GNB_CU_TNL_Association_To_Update_Item */
|
||||
F1AP_GNB_CU_TNL_Association_To_Update_Item_t gnb_cu_tnl_association_to_update_item;
|
||||
memset((void *)&gnb_cu_tnl_association_to_update_item, 0, sizeof(F1AP_GNB_CU_TNL_Association_To_Update_Item_t));
|
||||
|
||||
|
||||
/* 4.1.1 tNLAssociationTransportLayerAddress */
|
||||
F1AP_CP_TransportLayerAddress_t transportLayerAddress;
|
||||
memset((void *)&transportLayerAddress, 0, sizeof(F1AP_CP_TransportLayerAddress_t));
|
||||
transportLayerAddress.present = F1AP_CP_TransportLayerAddress_PR_endpoint_IP_address;
|
||||
TRANSPORT_LAYER_ADDRESS_IPv4_TO_BIT_STRING(1234, &transportLayerAddress.choice.endpoint_IP_address);
|
||||
|
||||
// memset((void *)&transportLayerAddress, 0, sizeof(F1AP_CP_TransportLayerAddress_t));
|
||||
// transportLayerAddress.present = F1AP_CP_TransportLayerAddress_PR_endpoint_IP_address_and_port;
|
||||
// transportLayerAddress.choice.endpoint_IP_address_and_port = (F1AP_Endpoint_IP_address_and_port_t *)calloc(1, sizeof(F1AP_Endpoint_IP_address_and_port_t));
|
||||
// TRANSPORT_LAYER_ADDRESS_IPv4_TO_BIT_STRING(1234, &transportLayerAddress.choice.endpoint_IP_address_and_port.endpoint_IP_address);
|
||||
|
||||
gnb_cu_tnl_association_to_update_item.tNLAssociationTransportLayerAddress = transportLayerAddress;
|
||||
|
||||
|
||||
/* 4.1.2 tNLAssociationUsage */
|
||||
if (1) {
|
||||
gnb_cu_tnl_association_to_update_item.tNLAssociationUsage = (F1AP_TNLAssociationUsage_t *)calloc(1, sizeof(F1AP_TNLAssociationUsage_t));
|
||||
*gnb_cu_tnl_association_to_update_item.tNLAssociationUsage = F1AP_TNLAssociationUsage_non_ue;
|
||||
}
|
||||
|
||||
/* ADD */
|
||||
gnb_cu_tnl_association_to_update_item_ies->value.choice.GNB_CU_TNL_Association_To_Update_Item = gnb_cu_tnl_association_to_update_item;
|
||||
ASN_SEQUENCE_ADD(&ie->value.choice.GNB_CU_TNL_Association_To_Update_List.list,
|
||||
gnb_cu_tnl_association_to_update_item_ies);
|
||||
}
|
||||
ASN_SEQUENCE_ADD(&out->protocolIEs.list, ie);
|
||||
|
||||
|
||||
|
||||
/* mandatory */
|
||||
/* c7. Cells_to_be_Barred_List */
|
||||
ie = (F1AP_GNBCUConfigurationUpdateIEs_t *)calloc(1, sizeof(F1AP_GNBCUConfigurationUpdateIEs_t));
|
||||
ie->id = F1AP_ProtocolIE_ID_id_Cells_to_be_Barred_List;
|
||||
ie->criticality = F1AP_Criticality_reject;
|
||||
ie->value.present = F1AP_GNBCUConfigurationUpdateIEs__value_PR_Cells_to_be_Barred_List;
|
||||
for (i=0;
|
||||
i<1;
|
||||
i++) {
|
||||
|
||||
F1AP_Cells_to_be_Barred_ItemIEs_t *cells_to_be_barred_item_ies;
|
||||
cells_to_be_barred_item_ies = (F1AP_Cells_to_be_Barred_ItemIEs_t *)calloc(1, sizeof(F1AP_Cells_to_be_Barred_ItemIEs_t));
|
||||
cells_to_be_barred_item_ies->id = F1AP_ProtocolIE_ID_id_Cells_to_be_Activated_List_Item;
|
||||
cells_to_be_barred_item_ies->criticality = F1AP_Criticality_reject;
|
||||
cells_to_be_barred_item_ies->value.present = F1AP_Cells_to_be_Barred_ItemIEs__value_PR_Cells_to_be_Barred_Item;
|
||||
|
||||
/* 7.1 cells to be Deactivated list item */
|
||||
F1AP_Cells_to_be_Barred_Item_t cells_to_be_barred_item;
|
||||
memset((void *)&cells_to_be_barred_item, 0, sizeof(F1AP_Cells_to_be_Barred_Item_t));
|
||||
|
||||
/* - nRCGI */
|
||||
F1AP_NRCGI_t nRCGI;
|
||||
MCC_MNC_TO_PLMNID(mcc, mnc, mnc_digit_length,
|
||||
&nRCGI.pLMN_Identity);
|
||||
NR_CELL_ID_TO_BIT_STRING(123456, &nRCGI.nRCellIdentity);
|
||||
cells_to_be_barred_item.nRCGI = nRCGI;
|
||||
|
||||
/* 7.2 cellBarred*/
|
||||
cells_to_be_barred_item.cellBarred = F1AP_CellBarred_not_barred;
|
||||
|
||||
/* ADD */
|
||||
cells_to_be_barred_item_ies->value.choice.Cells_to_be_Barred_Item = cells_to_be_barred_item;
|
||||
ASN_SEQUENCE_ADD(&ie->value.choice.Cells_to_be_Barred_List.list,
|
||||
cells_to_be_barred_item_ies);
|
||||
}
|
||||
ASN_SEQUENCE_ADD(&out->protocolIEs.list, ie);
|
||||
|
||||
|
||||
|
||||
/* mandatory */
|
||||
/* c8. Protected_EUTRA_Resources_List */
|
||||
ie = (F1AP_GNBCUConfigurationUpdateIEs_t *)calloc(1, sizeof(F1AP_GNBCUConfigurationUpdateIEs_t));
|
||||
ie->id = F1AP_ProtocolIE_ID_id_Protected_EUTRA_Resources_List;
|
||||
ie->criticality = F1AP_Criticality_reject;
|
||||
ie->value.present = F1AP_GNBCUConfigurationUpdateIEs__value_PR_Protected_EUTRA_Resources_List;
|
||||
|
||||
for (i=0;
|
||||
i<1;
|
||||
i++) {
|
||||
|
||||
|
||||
F1AP_Protected_EUTRA_Resources_ItemIEs_t *protected_eutra_resources_item_ies;
|
||||
|
||||
/* 8.1 SpectrumSharingGroupID */
|
||||
protected_eutra_resources_item_ies = (F1AP_Protected_EUTRA_Resources_ItemIEs_t *)calloc(1, sizeof(F1AP_Protected_EUTRA_Resources_ItemIEs_t));
|
||||
protected_eutra_resources_item_ies->id = F1AP_ProtocolIE_ID_id_Protected_EUTRA_Resources_List;
|
||||
protected_eutra_resources_item_ies->criticality = F1AP_Criticality_reject;
|
||||
protected_eutra_resources_item_ies->value.present = F1AP_Protected_EUTRA_Resources_ItemIEs__value_PR_SpectrumSharingGroupID;
|
||||
protected_eutra_resources_item_ies->value.choice.SpectrumSharingGroupID = 1L;
|
||||
|
||||
ASN_SEQUENCE_ADD(&ie->value.choice.Protected_EUTRA_Resources_List.list, protected_eutra_resources_item_ies);
|
||||
|
||||
/* 8.2 ListofEUTRACellsinGNBDUCoordination */
|
||||
protected_eutra_resources_item_ies = (F1AP_Protected_EUTRA_Resources_ItemIEs_t *)calloc(1, sizeof(F1AP_Protected_EUTRA_Resources_ItemIEs_t));
|
||||
protected_eutra_resources_item_ies->id = F1AP_ProtocolIE_ID_id_Protected_EUTRA_Resources_List;
|
||||
protected_eutra_resources_item_ies->criticality = F1AP_Criticality_reject;
|
||||
protected_eutra_resources_item_ies->value.present = F1AP_Protected_EUTRA_Resources_ItemIEs__value_PR_ListofEUTRACellsinGNBDUCoordination;
|
||||
|
||||
F1AP_Served_EUTRA_Cells_Information_t served_eutra_cells_information;
|
||||
memset((void *)&served_eutra_cells_information, 0, sizeof(F1AP_Served_EUTRA_Cells_Information_t));
|
||||
|
||||
F1AP_EUTRA_Mode_Info_t eUTRA_Mode_Info;
|
||||
memset((void *)&eUTRA_Mode_Info, 0, sizeof(F1AP_EUTRA_Mode_Info_t));
|
||||
|
||||
// eUTRAFDD
|
||||
eUTRA_Mode_Info.present = F1AP_EUTRA_Mode_Info_PR_eUTRAFDD;
|
||||
F1AP_EUTRA_FDD_Info_t *eutra_fdd_info;
|
||||
eutra_fdd_info = (F1AP_EUTRA_FDD_Info_t *)calloc(1, sizeof(F1AP_EUTRA_FDD_Info_t));
|
||||
eutra_fdd_info->uL_offsetToPointA = 123L;
|
||||
eutra_fdd_info->dL_offsetToPointA = 456L;
|
||||
eUTRA_Mode_Info.choice.eUTRAFDD = eutra_fdd_info;
|
||||
|
||||
// eUTRATDD
|
||||
// eUTRA_Mode_Info.present = F1AP_EUTRA_Mode_Info_PR_eUTRATDD;
|
||||
// F1AP_EUTRA_TDD_Info_t *eutra_tdd_info;
|
||||
// eutra_tdd_info = (F1AP_EUTRA_TDD_Info_t *)calloc(1, sizeof(F1AP_EUTRA_TDD_Info_t));
|
||||
// eutra_tdd_info->uL_offsetToPointA = 123L;
|
||||
// eutra_tdd_info->dL_offsetToPointA = 456L;
|
||||
// eUTRA_Mode_Info.choice.eUTRATDD = eutra_tdd_info;
|
||||
|
||||
served_eutra_cells_information.eUTRA_Mode_Info = eUTRA_Mode_Info;
|
||||
|
||||
OCTET_STRING_fromBuf(&served_eutra_cells_information.protectedEUTRAResourceIndication, "asdsa1d32sa1d31asd31as",
|
||||
strlen("asdsa1d32sa1d31asd31as"));
|
||||
|
||||
ASN_SEQUENCE_ADD(&protected_eutra_resources_item_ies->value.choice.ListofEUTRACellsinGNBDUCoordination.list, &served_eutra_cells_information);
|
||||
|
||||
ASN_SEQUENCE_ADD(&ie->value.choice.Protected_EUTRA_Resources_List.list, protected_eutra_resources_item_ies);
|
||||
}
|
||||
ASN_SEQUENCE_ADD(&out->protocolIEs.list, ie);
|
||||
|
||||
|
||||
/* encode */
|
||||
if (f1ap_encode_pdu(&pdu, &buffer, &len) < 0) {
|
||||
LOG_E(F1AP, "Failed to encode F1 setup request\n");
|
||||
return -1;
|
||||
}
|
||||
|
||||
cu_f1ap_itti_send_sctp_data_req(instance, f1ap_du_data_from_du->assoc_id, buffer, len, 0);
|
||||
return 0;
|
||||
}
|
||||
|
||||
int CU_handle_gNB_CU_CONFIGURATION_UPDATE_FAILURE(instance_t instance,
|
||||
uint32_t assoc_id,
|
||||
uint32_t stream,
|
||||
F1AP_F1AP_PDU_t *pdu) {
|
||||
AssertFatal(1==0,"Not implemented yet\n");
|
||||
}
|
||||
|
||||
int CU_handle_gNB_CU_CONFIGURATION_UPDATE_ACKNOWLEDGE(instance_t instance,
|
||||
uint32_t assoc_id,
|
||||
uint32_t stream,
|
||||
F1AP_F1AP_PDU_t *pdu) {
|
||||
AssertFatal(1==0,"Not implemented yet\n");
|
||||
}
|
||||
|
||||
|
||||
int CU_handle_gNB_DU_RESOURCE_COORDINATION_REQUEST(instance_t instance,
|
||||
uint32_t assoc_id,
|
||||
uint32_t stream,
|
||||
F1AP_F1AP_PDU_t *pdu) {
|
||||
AssertFatal(0, "Not implemented yet\n");
|
||||
}
|
||||
|
||||
int CU_send_gNB_DU_RESOURCE_COORDINATION_RESPONSE(instance_t instance,
|
||||
F1AP_GNBDUResourceCoordinationResponse_t *GNBDUResourceCoordinationResponse) {
|
||||
AssertFatal(0, "Not implemented yet\n");
|
||||
}
|
||||
@@ -0,0 +1,111 @@
|
||||
/*
|
||||
* 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
|
||||
* the OAI Public License, Version 1.1 (the "License"); you may not use this file
|
||||
* 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 f1ap_cu_interface_management.h
|
||||
* \brief f1ap interface management for CU
|
||||
* \author EURECOM/NTUST
|
||||
* \date 2018
|
||||
* \version 0.1
|
||||
* \company Eurecom
|
||||
* \email: navid.nikaein@eurecom.fr, bing-kai.hong@eurecom.fr
|
||||
* \note
|
||||
* \warning
|
||||
*/
|
||||
|
||||
#ifndef F1AP_CU_INTERFACE_MANAGEMENT_H_
|
||||
#define F1AP_CU_INTERFACE_MANAGEMENT_H_
|
||||
|
||||
/*
|
||||
* Reset
|
||||
*/
|
||||
int CU_send_RESET(instance_t instance, F1AP_Reset_t *Reset);
|
||||
int CU_handle_RESET_ACKKNOWLEDGE(instance_t instance,
|
||||
uint32_t assoc_id,
|
||||
uint32_t stream,
|
||||
F1AP_F1AP_PDU_t *pdu);
|
||||
int CU_handle_RESET(instance_t instance,
|
||||
uint32_t assoc_id,
|
||||
uint32_t stream,
|
||||
F1AP_F1AP_PDU_t *pdu);
|
||||
int CU_send_RESET_ACKNOWLEDGE(instance_t instance, F1AP_ResetAcknowledge_t *ResetAcknowledge);
|
||||
|
||||
/*
|
||||
* Error Indication
|
||||
*/
|
||||
int CU_handle_ERROR_INDICATION(instance_t instance,
|
||||
uint32_t assoc_id,
|
||||
uint32_t stream,
|
||||
F1AP_F1AP_PDU_t *pdu);
|
||||
int CU_send_ERROR_INDICATION(instance_t instance, F1AP_ErrorIndication_t *ErrorIndication);
|
||||
|
||||
/*
|
||||
* F1 Setup
|
||||
*/
|
||||
int CU_handle_F1_SETUP_REQUEST(instance_t instance,
|
||||
uint32_t assoc_id,
|
||||
uint32_t stream,
|
||||
F1AP_F1AP_PDU_t *pdu);
|
||||
|
||||
int CU_send_F1_SETUP_RESPONSE(instance_t instance, f1ap_setup_resp_t *f1ap_setup_resp);
|
||||
|
||||
int CU_send_F1_SETUP_FAILURE(instance_t instance);
|
||||
|
||||
/*
|
||||
* gNB-DU Configuration Update
|
||||
*/
|
||||
int CU_handle_gNB_DU_CONFIGURATION_UPDATE(instance_t instance,
|
||||
uint32_t assoc_id,
|
||||
uint32_t stream,
|
||||
F1AP_F1AP_PDU_t *pdu);
|
||||
|
||||
int CU_send_gNB_DU_CONFIGURATION_FAILURE(instance_t instance,
|
||||
F1AP_GNBDUConfigurationUpdateFailure_t *GNBDUConfigurationUpdateFailure);
|
||||
|
||||
int CU_send_gNB_DU_CONFIGURATION_UPDATE_ACKNOWLEDGE(instance_t instance,
|
||||
F1AP_GNBDUConfigurationUpdateAcknowledge_t *GNBDUConfigurationUpdateAcknowledge);
|
||||
|
||||
/*
|
||||
* gNB-CU Configuration Update
|
||||
*/
|
||||
int CU_send_gNB_CU_CONFIGURATION_UPDATE(instance_t instance, module_id_t du_mod_idP);
|
||||
|
||||
int CU_handle_gNB_CU_CONFIGURATION_UPDATE_FAILURE(instance_t instance,
|
||||
uint32_t assoc_id,
|
||||
uint32_t stream,
|
||||
F1AP_F1AP_PDU_t *pdu);
|
||||
|
||||
int CU_handle_gNB_CU_CONFIGURATION_UPDATE_ACKNOWLEDGE(instance_t instance,
|
||||
uint32_t assoc_id,
|
||||
uint32_t stream,
|
||||
F1AP_F1AP_PDU_t *pdu);
|
||||
|
||||
/*
|
||||
* gNB-DU Resource Coordination
|
||||
*/
|
||||
int CU_handle_gNB_DU_RESOURCE_COORDINATION_REQUEST(instance_t instance,
|
||||
uint32_t assoc_id,
|
||||
uint32_t stream,
|
||||
F1AP_F1AP_PDU_t *pdu);
|
||||
|
||||
int CU_send_gNB_DU_RESOURCE_COORDINATION_RESPONSE(instance_t instance,
|
||||
F1AP_GNBDUResourceCoordinationResponse_t *GNBDUResourceCoordinationResponse);
|
||||
|
||||
#endif /* F1AP_CU_INTERFACE_MANAGEMENT_H_ */
|
||||
@@ -0,0 +1,31 @@
|
||||
/*
|
||||
* 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
|
||||
* the OAI Public License, Version 1.1 (the "License"); you may not use this file
|
||||
* 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 f1ap_du_interface_management.h
|
||||
* \brief f1ap interface management for DU
|
||||
* \author EURECOM/NTUST
|
||||
* \date 2018
|
||||
* \version 0.1
|
||||
* \company Eurecom
|
||||
* \email: navid.nikaein@eurecom.fr, bing-kai.hong@eurecom.fr
|
||||
* \note
|
||||
* \warning
|
||||
*/
|
||||
@@ -0,0 +1,31 @@
|
||||
/*
|
||||
* 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
|
||||
* the OAI Public License, Version 1.1 (the "License"); you may not use this file
|
||||
* 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 f1ap_du_interface_management.h
|
||||
* \brief f1ap interface management for DU
|
||||
* \author EURECOM/NTUST
|
||||
* \date 2018
|
||||
* \version 0.1
|
||||
* \company Eurecom
|
||||
* \email: navid.nikaein@eurecom.fr, bing-kai.hong@eurecom.fr
|
||||
* \note
|
||||
* \warning
|
||||
*/
|
||||
@@ -0,0 +1,388 @@
|
||||
/*
|
||||
* 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
|
||||
* the OAI Public License, Version 1.1 (the "License"); you may not use this file
|
||||
* 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 f1ap_cu_rrc_message_transfer.c
|
||||
* \brief f1ap rrc message transfer for CU
|
||||
* \author EURECOM/NTUST
|
||||
* \date 2018
|
||||
* \version 0.1
|
||||
* \company Eurecom
|
||||
* \email: navid.nikaein@eurecom.fr, bing-kai.hong@eurecom.fr
|
||||
* \note
|
||||
* \warning
|
||||
*/
|
||||
|
||||
#include "f1ap_common.h"
|
||||
#include "f1ap_encoder.h"
|
||||
#include "f1ap_decoder.h"
|
||||
#include "f1ap_itti_messaging.h"
|
||||
#include "f1ap_cu_rrc_message_transfer.h"
|
||||
#include "common/ran_context.h"
|
||||
#include "openair3/UTILS/conversions.h"
|
||||
|
||||
// undefine C_RNTI from
|
||||
// openair1/PHY/LTE_TRANSPORT/transport_common.h which
|
||||
// replaces in ie->value.choice.C_RNTI, causing
|
||||
// a compile error
|
||||
#undef C_RNTI
|
||||
|
||||
|
||||
// Bing Kai: create CU and DU context, and put all the information there.
|
||||
uint64_t du_ue_f1ap_id = 0;
|
||||
uint32_t f1ap_assoc_id = 0;
|
||||
uint32_t f1ap_stream = 0;
|
||||
|
||||
|
||||
extern f1ap_cudu_inst_t f1ap_cu_inst[MAX_eNB];
|
||||
|
||||
/*
|
||||
Initial UL RRC Message Transfer
|
||||
*/
|
||||
|
||||
extern RAN_CONTEXT_t RC;
|
||||
|
||||
int CU_handle_INITIAL_UL_RRC_MESSAGE_TRANSFER(instance_t instance,
|
||||
uint32_t assoc_id,
|
||||
uint32_t stream,
|
||||
F1AP_F1AP_PDU_t *pdu) {
|
||||
|
||||
LOG_D(F1AP, "CU_handle_INITIAL_UL_RRC_MESSAGE_TRANSFER\n");
|
||||
// decode the F1 message
|
||||
// get the rrc message from the contauiner
|
||||
// call func rrc_eNB_decode_ccch: <-- needs some update here
|
||||
MessageDef *message_p;
|
||||
F1AP_InitialULRRCMessageTransfer_t *container;
|
||||
F1AP_InitialULRRCMessageTransferIEs_t *ie;
|
||||
|
||||
rnti_t rnti;
|
||||
sdu_size_t ccch_sdu_len;
|
||||
int CC_id =0;
|
||||
|
||||
|
||||
DevAssert(pdu != NULL);
|
||||
|
||||
if (stream != 0) {
|
||||
LOG_E(F1AP, "[SCTP %d] Received F1 on stream != 0 (%d)\n",
|
||||
assoc_id, stream);
|
||||
return -1;
|
||||
}
|
||||
// TODO: use context
|
||||
f1ap_stream = stream;
|
||||
f1ap_assoc_id = assoc_id;
|
||||
|
||||
container = &pdu->choice.initiatingMessage->value.choice.InitialULRRCMessageTransfer;
|
||||
|
||||
/* GNB_DU_UE_F1AP_ID */
|
||||
F1AP_FIND_PROTOCOLIE_BY_ID(F1AP_InitialULRRCMessageTransferIEs_t, ie, container,
|
||||
F1AP_ProtocolIE_ID_id_gNB_DU_UE_F1AP_ID, true);
|
||||
du_ue_f1ap_id = ie->value.choice.GNB_DU_UE_F1AP_ID;
|
||||
LOG_D(F1AP, "du_ue_f1ap_id %lu \n", du_ue_f1ap_id);
|
||||
|
||||
/* NRCGI
|
||||
* TODO: process NRCGI
|
||||
*/
|
||||
F1AP_FIND_PROTOCOLIE_BY_ID(F1AP_InitialULRRCMessageTransferIEs_t, ie, container,
|
||||
F1AP_ProtocolIE_ID_id_NRCGI, true);
|
||||
|
||||
|
||||
uint64_t nr_cellid;
|
||||
BIT_STRING_TO_NR_CELL_IDENTITY(&ie->value.choice.NRCGI.nRCellIdentity,nr_cellid);
|
||||
|
||||
/* RNTI */
|
||||
F1AP_FIND_PROTOCOLIE_BY_ID(F1AP_InitialULRRCMessageTransferIEs_t, ie, container,
|
||||
F1AP_ProtocolIE_ID_id_C_RNTI, true);
|
||||
BUFFER_TO_INT16(ie->value.choice.C_RNTI.buf, rnti);
|
||||
|
||||
/* RRC Container */
|
||||
F1AP_FIND_PROTOCOLIE_BY_ID(F1AP_InitialULRRCMessageTransferIEs_t, ie, container,
|
||||
F1AP_ProtocolIE_ID_id_RRCContainer, true);
|
||||
|
||||
// create an ITTI message and copy SDU
|
||||
message_p = itti_alloc_new_message (TASK_CU_F1, RRC_MAC_CCCH_DATA_IND);
|
||||
memset (RRC_MAC_CCCH_DATA_IND (message_p).sdu, 0, CCCH_SDU_SIZE);
|
||||
ccch_sdu_len = ie->value.choice.RRCContainer.size;
|
||||
memcpy(RRC_MAC_CCCH_DATA_IND (message_p).sdu, ie->value.choice.RRCContainer.buf,
|
||||
ccch_sdu_len);
|
||||
|
||||
//LOG_I(F1AP, "%s() RRCContainer (CCCH) size %ld: ", __func__,
|
||||
// ie->value.choice.RRCContainer.size);
|
||||
//for (int i = 0; i < ie->value.choice.RRCContainer.size; i++)
|
||||
// printf("%02x ", RRC_MAC_CCCH_DATA_IND (message_p).sdu[i]);
|
||||
//printf("\n");
|
||||
|
||||
// Find instance from nr_cellid
|
||||
int rrc_inst = -1;
|
||||
for (int i=0;i<RC.nb_inst;i++) {
|
||||
// first get RRC instance (note, no the ITTI instance)
|
||||
eNB_RRC_INST *rrc = RC.rrc[i];
|
||||
if (rrc->nr_cellid == nr_cellid) {
|
||||
rrc_inst = i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
AssertFatal(rrc_inst>=0,"couldn't find an RRC instance for nr_cell %llu\n",(unsigned long long int)nr_cellid);
|
||||
|
||||
int f1ap_uid = f1ap_add_ue(&f1ap_cu_inst[rrc_inst], rrc_inst, CC_id, 0, rnti);
|
||||
if (f1ap_uid < 0 ) {
|
||||
LOG_E(F1AP, "Failed to add UE \n");
|
||||
return -1;
|
||||
}
|
||||
f1ap_cu_inst[rrc_inst].f1ap_ue[f1ap_uid].du_ue_f1ap_id = du_ue_f1ap_id;
|
||||
|
||||
|
||||
RRC_MAC_CCCH_DATA_IND (message_p).frame = 0;
|
||||
RRC_MAC_CCCH_DATA_IND (message_p).sub_frame = 0;
|
||||
RRC_MAC_CCCH_DATA_IND (message_p).sdu_size = ccch_sdu_len;
|
||||
RRC_MAC_CCCH_DATA_IND (message_p).enb_index = rrc_inst; // CU instance
|
||||
RRC_MAC_CCCH_DATA_IND (message_p).rnti = rnti;
|
||||
RRC_MAC_CCCH_DATA_IND (message_p).CC_id = CC_id;
|
||||
itti_send_msg_to_task (TASK_RRC_ENB, instance, message_p);
|
||||
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
DL RRC Message Transfer.
|
||||
*/
|
||||
|
||||
//void CU_send_DL_RRC_MESSAGE_TRANSFER(F1AP_DLRRCMessageTransfer_t *DLRRCMessageTransfer) {
|
||||
int CU_send_DL_RRC_MESSAGE_TRANSFER(instance_t instance,
|
||||
f1ap_dl_rrc_message_t *f1ap_dl_rrc)
|
||||
{
|
||||
|
||||
F1AP_F1AP_PDU_t pdu;
|
||||
F1AP_DLRRCMessageTransfer_t *out;
|
||||
F1AP_DLRRCMessageTransferIEs_t *ie;
|
||||
|
||||
uint8_t *buffer;
|
||||
uint32_t len;
|
||||
|
||||
/* Create */
|
||||
/* 0. Message Type */
|
||||
memset(&pdu, 0, sizeof(pdu));
|
||||
pdu.present = F1AP_F1AP_PDU_PR_initiatingMessage;
|
||||
pdu.choice.initiatingMessage = (F1AP_InitiatingMessage_t *)calloc(1, sizeof(F1AP_InitiatingMessage_t));
|
||||
pdu.choice.initiatingMessage->procedureCode = F1AP_ProcedureCode_id_DLRRCMessageTransfer;
|
||||
pdu.choice.initiatingMessage->criticality = F1AP_Criticality_ignore;
|
||||
pdu.choice.initiatingMessage->value.present = F1AP_InitiatingMessage__value_PR_DLRRCMessageTransfer;
|
||||
out = &pdu.choice.initiatingMessage->value.choice.DLRRCMessageTransfer;
|
||||
|
||||
/* mandatory */
|
||||
/* c1. GNB_CU_UE_F1AP_ID */
|
||||
|
||||
ie = (F1AP_DLRRCMessageTransferIEs_t *)calloc(1, sizeof(F1AP_DLRRCMessageTransferIEs_t));
|
||||
ie->id = F1AP_ProtocolIE_ID_id_gNB_CU_UE_F1AP_ID;
|
||||
ie->criticality = F1AP_Criticality_reject;
|
||||
ie->value.present = F1AP_DLRRCMessageTransferIEs__value_PR_GNB_CU_UE_F1AP_ID;
|
||||
ie->value.choice.GNB_CU_UE_F1AP_ID = f1ap_get_cu_ue_f1ap_id(&f1ap_cu_inst[instance], f1ap_dl_rrc->rnti);
|
||||
ASN_SEQUENCE_ADD(&out->protocolIEs.list, ie);
|
||||
LOG_I(F1AP, "Setting GNB_CU_UE_F1AP_ID %llu associated with UE RNTI %x (instance %d)\n",
|
||||
(unsigned long long int)ie->value.choice.GNB_CU_UE_F1AP_ID, f1ap_dl_rrc->rnti, instance);
|
||||
|
||||
|
||||
/* mandatory */
|
||||
/* c2. GNB_DU_UE_F1AP_ID */
|
||||
ie = (F1AP_DLRRCMessageTransferIEs_t *)calloc(1, sizeof(F1AP_DLRRCMessageTransferIEs_t));
|
||||
ie->id = F1AP_ProtocolIE_ID_id_gNB_DU_UE_F1AP_ID;
|
||||
ie->criticality = F1AP_Criticality_reject;
|
||||
ie->value.present = F1AP_DLRRCMessageTransferIEs__value_PR_GNB_DU_UE_F1AP_ID;
|
||||
ie->value.choice.GNB_DU_UE_F1AP_ID = f1ap_get_du_ue_f1ap_id(&f1ap_cu_inst[instance], f1ap_dl_rrc->rnti);
|
||||
ASN_SEQUENCE_ADD(&out->protocolIEs.list, ie);
|
||||
LOG_I(F1AP, "GNB_DU_UE_F1AP_ID %llu associated with UE RNTI %x \n", (unsigned long long int)ie->value.choice.GNB_DU_UE_F1AP_ID, f1ap_dl_rrc->rnti);
|
||||
|
||||
/* optional */
|
||||
/* c3. oldgNB_DU_UE_F1AP_ID */
|
||||
/* if (f1ap_dl_rrc->old_gNB_DU_ue_id != 0xFFFFFFFF) {
|
||||
ie = (F1AP_DLRRCMessageTransferIEs_t *)calloc(1, sizeof(F1AP_DLRRCMessageTransferIEs_t));
|
||||
ie->id = F1AP_ProtocolIE_ID_id_oldgNB_DU_UE_F1AP_ID;
|
||||
ie->criticality = F1AP_Criticality_reject;
|
||||
ie->value.present = F1AP_DLRRCMessageTransferIEs__value_PR_NOTHING;
|
||||
ie->value.choice.oldgNB_DU_UE_F1AP_ID = f1ap_dl_rrc->old_gNB_DU_ue_id;
|
||||
ASN_SEQUENCE_ADD(&out->protocolIEs.list, ie);
|
||||
}*/
|
||||
|
||||
/* mandatory */
|
||||
/* c4. SRBID */
|
||||
ie = (F1AP_DLRRCMessageTransferIEs_t *)calloc(1, sizeof(F1AP_DLRRCMessageTransferIEs_t));
|
||||
ie->id = F1AP_ProtocolIE_ID_id_SRBID;
|
||||
ie->criticality = F1AP_Criticality_reject;
|
||||
ie->value.present = F1AP_DLRRCMessageTransferIEs__value_PR_SRBID;
|
||||
ie->value.choice.SRBID = f1ap_dl_rrc->srb_id;
|
||||
ASN_SEQUENCE_ADD(&out->protocolIEs.list, ie);
|
||||
|
||||
/* optional */
|
||||
/* c5. ExecuteDuplication */
|
||||
if (f1ap_dl_rrc->execute_duplication) {
|
||||
ie = (F1AP_DLRRCMessageTransferIEs_t *)calloc(1, sizeof(F1AP_DLRRCMessageTransferIEs_t));
|
||||
ie->id = F1AP_ProtocolIE_ID_id_ExecuteDuplication;
|
||||
ie->criticality = F1AP_Criticality_ignore;
|
||||
ie->value.present = F1AP_DLRRCMessageTransferIEs__value_PR_ExecuteDuplication;
|
||||
ie->value.choice.ExecuteDuplication = F1AP_ExecuteDuplication_true;
|
||||
ASN_SEQUENCE_ADD(&out->protocolIEs.list, ie);
|
||||
}
|
||||
|
||||
// issue in here
|
||||
/* mandatory */
|
||||
/* c6. RRCContainer */
|
||||
ie = (F1AP_DLRRCMessageTransferIEs_t *)calloc(1, sizeof(F1AP_DLRRCMessageTransferIEs_t));
|
||||
ie->id = F1AP_ProtocolIE_ID_id_RRCContainer;
|
||||
ie->criticality = F1AP_Criticality_reject;
|
||||
ie->value.present = F1AP_DLRRCMessageTransferIEs__value_PR_RRCContainer;
|
||||
OCTET_STRING_fromBuf(&ie->value.choice.RRCContainer, (const char*)f1ap_dl_rrc->rrc_container, f1ap_dl_rrc->rrc_container_length);
|
||||
ASN_SEQUENCE_ADD(&out->protocolIEs.list, ie);
|
||||
|
||||
//LOG_I(F1AP, "%s() RRCContainer size %d: ", __func__, f1ap_dl_rrc->rrc_container_length);
|
||||
//for (int i = 0; i < ie->value.choice.RRCContainer.size; i++)
|
||||
// printf("%02x ", f1ap_dl_rrc->rrc_container[i]);
|
||||
//printf("\n");
|
||||
|
||||
/* optional */
|
||||
/* c7. RAT_FrequencyPriorityInformation */
|
||||
/* TODO */
|
||||
if (0) {
|
||||
ie = (F1AP_DLRRCMessageTransferIEs_t *)calloc(1, sizeof(F1AP_DLRRCMessageTransferIEs_t));
|
||||
ie->id = F1AP_ProtocolIE_ID_id_RAT_FrequencyPriorityInformation;
|
||||
ie->criticality = F1AP_Criticality_reject;
|
||||
ie->value.present = F1AP_DLRRCMessageTransferIEs__value_PR_RAT_FrequencyPriorityInformation;
|
||||
|
||||
ie->value.choice.RAT_FrequencyPriorityInformation.present = F1AP_RAT_FrequencyPriorityInformation_PR_subscriberProfileIDforRFP;
|
||||
ie->value.choice.RAT_FrequencyPriorityInformation.choice.subscriberProfileIDforRFP = 123L;
|
||||
|
||||
//ie->value.choice.RAT_FrequencyPriorityInformation.present = F1AP_RAT_FrequencyPriorityInformation_PR_rAT_FrequencySelectionPriority;
|
||||
//ie->value.choice.RAT_FrequencyPriorityInformation.choice.rAT_FrequencySelectionPriority = 123L;
|
||||
ASN_SEQUENCE_ADD(&out->protocolIEs.list, ie);
|
||||
}
|
||||
|
||||
/* encode */
|
||||
if (f1ap_encode_pdu(&pdu, &buffer, &len) < 0) {
|
||||
LOG_E(F1AP, "Failed to encode F1 setup request\n");
|
||||
return -1;
|
||||
}
|
||||
|
||||
cu_f1ap_itti_send_sctp_data_req(instance, f1ap_assoc_id /* BK: fix me*/ , buffer, len, 0 /* BK: fix me*/);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
UL RRC Message Transfer
|
||||
*/
|
||||
|
||||
int CU_handle_UL_RRC_MESSAGE_TRANSFER(instance_t instance,
|
||||
uint32_t assoc_id,
|
||||
uint32_t stream,
|
||||
F1AP_F1AP_PDU_t *pdu) {
|
||||
|
||||
LOG_D(F1AP, "CU_handle_UL_RRC_MESSAGE_TRANSFER \n");
|
||||
|
||||
F1AP_ULRRCMessageTransfer_t *container;
|
||||
F1AP_ULRRCMessageTransferIEs_t *ie;
|
||||
|
||||
|
||||
uint64_t cu_ue_f1ap_id;
|
||||
uint64_t du_ue_f1ap_id;
|
||||
uint64_t srb_id;
|
||||
|
||||
DevAssert(pdu != NULL);
|
||||
|
||||
if (stream != 0) {
|
||||
LOG_E(F1AP, "[SCTP %d] Received F1 on stream != 0 (%d)\n",
|
||||
assoc_id, stream);
|
||||
return -1;
|
||||
}
|
||||
|
||||
container = &pdu->choice.initiatingMessage->value.choice.ULRRCMessageTransfer;
|
||||
|
||||
|
||||
/* GNB_CU_UE_F1AP_ID */
|
||||
F1AP_FIND_PROTOCOLIE_BY_ID(F1AP_ULRRCMessageTransferIEs_t, ie, container,
|
||||
F1AP_ProtocolIE_ID_id_gNB_CU_UE_F1AP_ID, true);
|
||||
cu_ue_f1ap_id = ie->value.choice.GNB_CU_UE_F1AP_ID;
|
||||
LOG_D(F1AP, "cu_ue_f1ap_id %lu associated with RNTI %x\n", cu_ue_f1ap_id, f1ap_get_rnti_by_cu_id(&f1ap_cu_inst[instance], cu_ue_f1ap_id));
|
||||
|
||||
|
||||
/* GNB_DU_UE_F1AP_ID */
|
||||
F1AP_FIND_PROTOCOLIE_BY_ID(F1AP_ULRRCMessageTransferIEs_t, ie, container,
|
||||
F1AP_ProtocolIE_ID_id_gNB_DU_UE_F1AP_ID, true);
|
||||
du_ue_f1ap_id = ie->value.choice.GNB_DU_UE_F1AP_ID;
|
||||
LOG_D(F1AP, "du_ue_f1ap_id %lu associated with RNTI %x\n", du_ue_f1ap_id, f1ap_get_rnti_by_cu_id(&f1ap_cu_inst[instance], du_ue_f1ap_id));
|
||||
|
||||
|
||||
/* mandatory */
|
||||
/* SRBID */
|
||||
F1AP_FIND_PROTOCOLIE_BY_ID(F1AP_ULRRCMessageTransferIEs_t, ie, container,
|
||||
F1AP_ProtocolIE_ID_id_SRBID, true);
|
||||
srb_id = ie->value.choice.SRBID;
|
||||
if (srb_id < 1 )
|
||||
LOG_E(F1AP, "Unexpected UL RRC MESSAGE for srb_id %lu \n", srb_id);
|
||||
else
|
||||
LOG_D(F1AP, "UL RRC MESSAGE for srb_id %lu in DCCH \n", srb_id);
|
||||
|
||||
|
||||
// issue in here
|
||||
/* mandatory */
|
||||
/* RRC Container */
|
||||
F1AP_FIND_PROTOCOLIE_BY_ID(F1AP_ULRRCMessageTransferIEs_t, ie, container,
|
||||
F1AP_ProtocolIE_ID_id_RRCContainer, true);
|
||||
// print message in debug mode
|
||||
|
||||
// create an ITTI message and copy SDU
|
||||
/*
|
||||
|
||||
message_p = itti_alloc_new_message (TASK_CU_F1, RRC_DCCH_DATA_IND);
|
||||
|
||||
RRC_DCCH_DATA_IND (message_p).sdu_p = malloc(ie->value.choice.RRCContainer.size);
|
||||
|
||||
RRC_DCCH_DATA_IND (message_p).sdu_size = ie->value.choice.RRCContainer.size;
|
||||
memcpy(RRC_DCCH_DATA_IND (message_p).sdu_p, ie->value.choice.RRCContainer.buf,
|
||||
ie->value.choice.RRCContainer.size);
|
||||
|
||||
RRC_DCCH_DATA_IND (message_p).dcch_index = srb_id;
|
||||
RRC_DCCH_DATA_IND (message_p).rnti = f1ap_get_rnti_by_cu_id(&f1ap_cu_inst[instance], cu_ue_f1ap_id);
|
||||
RRC_DCCH_DATA_IND (message_p).module_id = instance;
|
||||
RRC_DCCH_DATA_IND (message_p).eNB_index = instance; // not needed for CU
|
||||
|
||||
itti_send_msg_to_task(TASK_RRC_ENB, instance, message_p);
|
||||
*/
|
||||
protocol_ctxt_t ctxt;
|
||||
ctxt.module_id = instance;
|
||||
ctxt.instance = instance;
|
||||
ctxt.rnti = f1ap_get_rnti_by_cu_id(&f1ap_cu_inst[instance], cu_ue_f1ap_id);
|
||||
ctxt.enb_flag = 1;
|
||||
mem_block_t *mb = get_free_mem_block(ie->value.choice.RRCContainer.size,__func__);
|
||||
memcpy((void*)mb->data,(void*)ie->value.choice.RRCContainer.buf,ie->value.choice.RRCContainer.size);
|
||||
LOG_I(F1AP, "Calling pdcp_data_ind for UE RNTI %x srb_id %lu with size %ld (DCCH) \n", ctxt.rnti, srb_id, ie->value.choice.RRCContainer.size);
|
||||
|
||||
//LOG_I(F1AP, "%s() RRCContainer size %lu: ", __func__, ie->value.choice.RRCContainer.size);
|
||||
//for (int i = 0; i < ie->value.choice.RRCContainer.size; i++)
|
||||
// printf("%02x ", mb->data[i]);
|
||||
//printf("\n");
|
||||
|
||||
pdcp_data_ind (&ctxt,
|
||||
1, // srb_flag
|
||||
0, // embms_flag
|
||||
srb_id,
|
||||
ie->value.choice.RRCContainer.size,
|
||||
mb);
|
||||
return 0;
|
||||
}
|
||||
@@ -0,0 +1,50 @@
|
||||
/*
|
||||
* 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
|
||||
* the OAI Public License, Version 1.1 (the "License"); you may not use this file
|
||||
* 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 f1ap_cu_rrc_message_transfer.h
|
||||
* \brief f1ap rrc message transfer for CU
|
||||
* \author EURECOM/NTUST
|
||||
* \date 2018
|
||||
* \version 0.1
|
||||
* \company Eurecom
|
||||
* \email: navid.nikaein@eurecom.fr, bing-kai.hong@eurecom.fr
|
||||
* \note
|
||||
* \warning
|
||||
*/
|
||||
|
||||
#ifndef F1AP_CU_RRC_MESSAGE_TRANSFER_H_
|
||||
#define F1AP_CU_RRC_MESSAGE_TRANSFER_H_
|
||||
|
||||
int CU_handle_INITIAL_UL_RRC_MESSAGE_TRANSFER(instance_t instance,
|
||||
uint32_t assoc_id,
|
||||
uint32_t stream,
|
||||
F1AP_F1AP_PDU_t *pdu);
|
||||
|
||||
int CU_send_DL_RRC_MESSAGE_TRANSFER(instance_t instance,
|
||||
f1ap_dl_rrc_message_t *f1ap_dl_rrc);
|
||||
|
||||
int CU_handle_UL_RRC_MESSAGE_TRANSFER(instance_t instance,
|
||||
uint32_t assoc_id,
|
||||
uint32_t stream,
|
||||
F1AP_F1AP_PDU_t *pdu);
|
||||
|
||||
|
||||
#endif /* F1AP_CU_RRC_MESSAGE_TRANSFER_H_ */
|
||||
@@ -0,0 +1,31 @@
|
||||
/*
|
||||
* 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
|
||||
* the OAI Public License, Version 1.1 (the "License"); you may not use this file
|
||||
* 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 f1ap_du_interface_management.h
|
||||
* \brief f1ap interface management for DU
|
||||
* \author EURECOM/NTUST
|
||||
* \date 2018
|
||||
* \version 0.1
|
||||
* \company Eurecom
|
||||
* \email: navid.nikaein@eurecom.fr, bing-kai.hong@eurecom.fr
|
||||
* \note
|
||||
* \warning
|
||||
*/
|
||||
@@ -0,0 +1,31 @@
|
||||
/*
|
||||
* 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
|
||||
* the OAI Public License, Version 1.1 (the "License"); you may not use this file
|
||||
* 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 f1ap_du_interface_management.h
|
||||
* \brief f1ap interface management for DU
|
||||
* \author EURECOM/NTUST
|
||||
* \date 2018
|
||||
* \version 0.1
|
||||
* \company Eurecom
|
||||
* \email: navid.nikaein@eurecom.fr, bing-kai.hong@eurecom.fr
|
||||
* \note
|
||||
* \warning
|
||||
*/
|
||||
@@ -0,0 +1,206 @@
|
||||
/*
|
||||
* 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
|
||||
* the OAI Public License, Version 1.1 (the "License"); you may not use this file
|
||||
* 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 openair2/F1AP/f1ap_cu_task.c
|
||||
* \brief data structures for F1 interface modules
|
||||
* \author EURECOM/NTUST
|
||||
* \date 2018
|
||||
* \version 0.1
|
||||
* \company Eurecom
|
||||
* \email: navid.nikaein@eurecom.fr, raymond.knopp@eurecom.fr, bing-kai.hong@eurecom.fr
|
||||
* \note
|
||||
* \warning
|
||||
*/
|
||||
|
||||
#include "f1ap_common.h"
|
||||
#include "f1ap_handlers.h"
|
||||
#include "f1ap_cu_interface_management.h"
|
||||
#include "f1ap_cu_rrc_message_transfer.h"
|
||||
#include "f1ap_cu_ue_context_management.h"
|
||||
#include "f1ap_cu_task.h"
|
||||
#include "proto_agent.h"
|
||||
|
||||
extern RAN_CONTEXT_t RC;
|
||||
|
||||
f1ap_setup_req_t *f1ap_du_data_from_du;
|
||||
f1ap_cudu_inst_t f1ap_cu_inst[MAX_eNB];
|
||||
|
||||
void cu_task_handle_sctp_association_ind(instance_t instance, sctp_new_association_ind_t *sctp_new_association_ind) {
|
||||
// Nothing
|
||||
}
|
||||
|
||||
void cu_task_handle_sctp_association_resp(instance_t instance, sctp_new_association_resp_t *sctp_new_association_resp) {
|
||||
|
||||
DevAssert(sctp_new_association_resp != NULL);
|
||||
|
||||
if (sctp_new_association_resp->sctp_state != SCTP_STATE_ESTABLISHED) {
|
||||
LOG_W(F1AP, "Received unsuccessful result for SCTP association (%u), instance %d, cnx_id %u\n",
|
||||
sctp_new_association_resp->sctp_state,
|
||||
instance,
|
||||
sctp_new_association_resp->ulp_cnx_id);
|
||||
|
||||
if (sctp_new_association_resp->sctp_state == SCTP_STATE_SHUTDOWN)
|
||||
proto_agent_stop(instance);
|
||||
//f1ap_handle_setup_message(instance, sctp_new_association_resp->sctp_state == SCTP_STATE_SHUTDOWN);
|
||||
return; // exit -1 for debugging
|
||||
}
|
||||
|
||||
// go to an init func
|
||||
f1ap_du_data_from_du = (f1ap_setup_req_t *)calloc(1, sizeof(f1ap_setup_req_t));
|
||||
// save the assoc id
|
||||
f1ap_du_data_from_du->assoc_id = sctp_new_association_resp->assoc_id;
|
||||
f1ap_du_data_from_du->sctp_in_streams = sctp_new_association_resp->in_streams;
|
||||
f1ap_du_data_from_du->sctp_out_streams = sctp_new_association_resp->out_streams;
|
||||
|
||||
/* setup parameters for F1U and start the server */
|
||||
const cudu_params_t params = {
|
||||
.local_ipv4_address = RC.rrc[instance]->eth_params_s.my_addr,
|
||||
.local_port = RC.rrc[instance]->eth_params_s.my_portd,
|
||||
.remote_ipv4_address = RC.rrc[instance]->eth_params_s.remote_addr,
|
||||
.remote_port = RC.rrc[instance]->eth_params_s.remote_portd
|
||||
};
|
||||
AssertFatal(proto_agent_start(instance, ¶ms) == 0,
|
||||
"could not start PROTO_AGENT for F1U on instance %d!\n", instance);
|
||||
}
|
||||
|
||||
void cu_task_handle_sctp_data_ind(instance_t instance, sctp_data_ind_t *sctp_data_ind) {
|
||||
int result;
|
||||
|
||||
DevAssert(sctp_data_ind != NULL);
|
||||
|
||||
f1ap_handle_message(instance, sctp_data_ind->assoc_id, sctp_data_ind->stream,
|
||||
sctp_data_ind->buffer, sctp_data_ind->buffer_length);
|
||||
|
||||
result = itti_free(TASK_UNKNOWN, sctp_data_ind->buffer);
|
||||
AssertFatal (result == EXIT_SUCCESS, "Failed to free memory (%d)!\n", result);
|
||||
}
|
||||
|
||||
void cu_task_send_sctp_init_req(instance_t enb_id) {
|
||||
// 1. get the itti msg, and retrive the enb_id from the message
|
||||
// 2. use RC.rrc[enb_id] to fill the sctp_init_t with the ip, port
|
||||
// 3. creat an itti message to init
|
||||
|
||||
LOG_I(F1AP, "F1AP_CU_SCTP_REQ(create socket)\n");
|
||||
MessageDef *message_p = NULL;
|
||||
|
||||
message_p = itti_alloc_new_message (TASK_CU_F1, SCTP_INIT_MSG);
|
||||
message_p->ittiMsg.sctp_init.port = F1AP_PORT_NUMBER;
|
||||
message_p->ittiMsg.sctp_init.ppid = F1AP_SCTP_PPID;
|
||||
message_p->ittiMsg.sctp_init.ipv4 = 1;
|
||||
message_p->ittiMsg.sctp_init.ipv6 = 0;
|
||||
message_p->ittiMsg.sctp_init.nb_ipv4_addr = 1;
|
||||
message_p->ittiMsg.sctp_init.ipv4_address[0] = inet_addr(RC.rrc[enb_id]->eth_params_s.my_addr);
|
||||
/*
|
||||
* SR WARNING: ipv6 multi-homing fails sometimes for localhost.
|
||||
* * * * Disable it for now.
|
||||
*/
|
||||
message_p->ittiMsg.sctp_init.nb_ipv6_addr = 0;
|
||||
message_p->ittiMsg.sctp_init.ipv6_address[0] = "0:0:0:0:0:0:0:1";
|
||||
|
||||
itti_send_msg_to_task(TASK_SCTP, enb_id, message_p);
|
||||
}
|
||||
|
||||
|
||||
void *F1AP_CU_task(void *arg) {
|
||||
|
||||
MessageDef *received_msg = NULL;
|
||||
int result;
|
||||
|
||||
LOG_I(F1AP, "Starting F1AP at CU\n");
|
||||
|
||||
// no RLC in CU, initialize mem pool for PDCP
|
||||
pool_buffer_init();
|
||||
|
||||
itti_mark_task_ready(TASK_CU_F1);
|
||||
|
||||
cu_task_send_sctp_init_req(0);
|
||||
|
||||
while (1) {
|
||||
itti_receive_msg(TASK_CU_F1, &received_msg);
|
||||
switch (ITTI_MSG_ID(received_msg)) {
|
||||
|
||||
case SCTP_NEW_ASSOCIATION_IND:
|
||||
LOG_I(F1AP, "CU Task Received SCTP_NEW_ASSOCIATION_IND for instance %d\n",
|
||||
ITTI_MESSAGE_GET_INSTANCE(received_msg));
|
||||
cu_task_handle_sctp_association_ind(ITTI_MESSAGE_GET_INSTANCE(received_msg),
|
||||
&received_msg->ittiMsg.sctp_new_association_ind);
|
||||
break;
|
||||
|
||||
case SCTP_NEW_ASSOCIATION_RESP:
|
||||
LOG_I(F1AP, "CU Task Received SCTP_NEW_ASSOCIATION_RESP for instance %d\n",
|
||||
ITTI_MESSAGE_GET_INSTANCE(received_msg));
|
||||
cu_task_handle_sctp_association_resp(ITTI_MESSAGE_GET_INSTANCE(received_msg),
|
||||
&received_msg->ittiMsg.sctp_new_association_resp);
|
||||
break;
|
||||
|
||||
case SCTP_DATA_IND:
|
||||
LOG_I(F1AP, "CU Task Received SCTP_DATA_IND for Instance %d\n",
|
||||
ITTI_MESSAGE_GET_INSTANCE(received_msg));
|
||||
cu_task_handle_sctp_data_ind(ITTI_MESSAGE_GET_INSTANCE(received_msg),
|
||||
&received_msg->ittiMsg.sctp_data_ind);
|
||||
break;
|
||||
|
||||
case F1AP_SETUP_RESP: // from rrc
|
||||
LOG_I(F1AP, "CU Task Received F1AP_SETUP_RESP\n");
|
||||
// CU_send_f1setup_resp(ITTI_MESSAGE_GET_INSTANCE(received_msg),
|
||||
// &F1AP_SETUP_RESP(received_msg));
|
||||
CU_send_F1_SETUP_RESPONSE(ITTI_MESSAGE_GET_INSTANCE(received_msg),
|
||||
&F1AP_SETUP_RESP(received_msg));
|
||||
break;
|
||||
|
||||
case F1AP_DL_RRC_MESSAGE: // from rrc
|
||||
LOG_I(F1AP, "CU Task Received F1AP_DL_RRC_MESSAGE\n");
|
||||
CU_send_DL_RRC_MESSAGE_TRANSFER(ITTI_MESSAGE_GET_INSTANCE(received_msg),
|
||||
&F1AP_DL_RRC_MESSAGE(received_msg));
|
||||
break;
|
||||
|
||||
case F1AP_UE_CONTEXT_RELEASE_CMD: // from rrc
|
||||
LOG_I(F1AP, "CU Task Received F1AP_UE_CONTEXT_RELEASE_CMD\n");
|
||||
CU_send_UE_CONTEXT_RELEASE_COMMAND(ITTI_MESSAGE_GET_INSTANCE(received_msg),
|
||||
&F1AP_UE_CONTEXT_RELEASE_CMD(received_msg));
|
||||
break;
|
||||
|
||||
// case F1AP_SETUP_RESPONSE: // This is from RRC
|
||||
// CU_send_F1_SETUP_RESPONSE(instance, *f1ap_setup_ind, &(F1AP_SETUP_RESP) f1ap_setup_resp)
|
||||
// break;
|
||||
|
||||
// case F1AP_SETUP_FAILURE: // This is from RRC
|
||||
// CU_send_F1_SETUP_FAILURE(instance, *f1ap_setup_ind, &(F1AP_SETUP_FAILURE) f1ap_setup_failure)
|
||||
// break;
|
||||
|
||||
case TERMINATE_MESSAGE:
|
||||
LOG_W(F1AP, " *** Exiting F1AP thread\n");
|
||||
itti_exit_task();
|
||||
break;
|
||||
|
||||
default:
|
||||
LOG_E(F1AP, "CU Received unhandled message: %d:%s\n",
|
||||
ITTI_MSG_ID(received_msg), ITTI_MSG_NAME(received_msg));
|
||||
break;
|
||||
} // switch
|
||||
result = itti_free (ITTI_MSG_ORIGIN_ID(received_msg), received_msg);
|
||||
AssertFatal (result == EXIT_SUCCESS, "Failed to free memory (%d)!\n", result);
|
||||
|
||||
received_msg = NULL;
|
||||
} // while
|
||||
|
||||
return NULL;
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
/*
|
||||
* 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
|
||||
* the OAI Public License, Version 1.1 (the "License"); you may not use this file
|
||||
* 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
|
||||
*/
|
||||
|
||||
#ifndef F1AP_CU_TASK_H_
|
||||
#define F1AP_CU_TASK_H_
|
||||
|
||||
void cu_task_handle_sctp_association_ind(instance_t instance, sctp_new_association_ind_t *sctp_new_association_ind);
|
||||
void cu_task_handle_sctp_association_resp(instance_t instance, sctp_new_association_resp_t *sctp_new_association_resp);
|
||||
void cu_task_handle_sctp_data_ind(instance_t instance, sctp_data_ind_t *sctp_data_ind);
|
||||
void cu_task_send_sctp_init_req(instance_t enb_id);
|
||||
|
||||
void *F1AP_CU_task(void *arg);
|
||||
|
||||
#endif /* F1AP_CU_TASK_H_ */
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,103 @@
|
||||
/*
|
||||
* 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
|
||||
* the OAI Public License, Version 1.1 (the "License"); you may not use this file
|
||||
* 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 f1ap_cu_ue_context_management.h
|
||||
* \brief header file of CU UE Context management
|
||||
* \author EURECOM/NTUST
|
||||
* \date 2018
|
||||
* \version 0.1
|
||||
* \company Eurecom
|
||||
* \email: navid.nikaein@eurecom.fr, bing-kai.hong@eurecom.fr
|
||||
* \note
|
||||
* \warning
|
||||
*/
|
||||
|
||||
#ifndef F1AP_CU_UE_CONTEXT_MANAGEMENT_H_
|
||||
#define F1AP_CU_UE_CONTEXT_MANAGEMENT_H_
|
||||
|
||||
/*
|
||||
* UE Context Setup
|
||||
*/
|
||||
int CU_send_UE_CONTEXT_SETUP_REQUEST(instance_t instance,
|
||||
f1ap_ue_context_setup_req_t *f1ap_ue_context_setup_req);
|
||||
|
||||
int CU_handle_UE_CONTEXT_SETUP_RESPONSE(instance_t instance,
|
||||
uint32_t assoc_id,
|
||||
uint32_t stream,
|
||||
F1AP_F1AP_PDU_t *pdu);
|
||||
|
||||
int CU_handle_UE_CONTEXT_SETUP_FAILURE(instance_t instance,
|
||||
uint32_t assoc_id,
|
||||
uint32_t stream,
|
||||
F1AP_F1AP_PDU_t *pdu);
|
||||
|
||||
|
||||
/*
|
||||
* UE Context Release Request (gNB-DU initiated)
|
||||
*/
|
||||
int CU_handle_UE_CONTEXT_RELEASE_REQUEST(instance_t instance,
|
||||
uint32_t assoc_id,
|
||||
uint32_t stream,
|
||||
F1AP_F1AP_PDU_t *pdu);
|
||||
|
||||
/*
|
||||
* UE Context Release (gNB-CU initiated)
|
||||
*/
|
||||
int CU_send_UE_CONTEXT_RELEASE_COMMAND(instance_t instance,
|
||||
f1ap_ue_context_release_cmd_t *cmd);
|
||||
|
||||
int CU_handle_UE_CONTEXT_RELEASE_COMPLETE(instance_t instance,
|
||||
uint32_t assoc_id,
|
||||
uint32_t stream,
|
||||
F1AP_F1AP_PDU_t *pdu);
|
||||
|
||||
/*
|
||||
* UE Context Modification (gNB-CU initiated)
|
||||
*/
|
||||
int CU_send_UE_CONTEXT_MODIFICATION_REQUEST(instance_t instance);
|
||||
int CU_handle_UE_CONTEXT_MODIFICATION_RESPONSE(instance_t instance,
|
||||
uint32_t assoc_id,
|
||||
uint32_t stream,
|
||||
F1AP_F1AP_PDU_t *pdu);
|
||||
int CU_handle_UE_CONTEXT_MODIFICATION_FAILURE(instance_t instance,
|
||||
uint32_t assoc_id,
|
||||
uint32_t stream,
|
||||
F1AP_F1AP_PDU_t *pdu);
|
||||
|
||||
/*
|
||||
* UE Context Modification Required (gNB-DU initiated)
|
||||
*/
|
||||
int CU_handle_UE_CONTEXT_MODIFICATION_REQUIRED(instance_t instance,
|
||||
uint32_t assoc_id,
|
||||
uint32_t stream,
|
||||
F1AP_F1AP_PDU_t *pdu);
|
||||
int CU_send_UE_CONTEXT_MODIFICATION_CONFIRM(instance_t instance,
|
||||
F1AP_UEContextModificationConfirm_t UEContextModificationConfirm_t);
|
||||
|
||||
/*
|
||||
* UE Inactivity Notification
|
||||
*/
|
||||
|
||||
/*
|
||||
* Notify
|
||||
*/
|
||||
|
||||
#endif /* F1AP_CU_UE_CONTEXT_MANAGEMENT_H_ */
|
||||
@@ -0,0 +1,31 @@
|
||||
/*
|
||||
* 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
|
||||
* the OAI Public License, Version 1.1 (the "License"); you may not use this file
|
||||
* 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 f1ap_du_interface_management.h
|
||||
* \brief f1ap interface management for DU
|
||||
* \author EURECOM/NTUST
|
||||
* \date 2018
|
||||
* \version 0.1
|
||||
* \company Eurecom
|
||||
* \email: navid.nikaein@eurecom.fr, bing-kai.hong@eurecom.fr
|
||||
* \note
|
||||
* \warning
|
||||
*/
|
||||
@@ -0,0 +1,31 @@
|
||||
/*
|
||||
* 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
|
||||
* the OAI Public License, Version 1.1 (the "License"); you may not use this file
|
||||
* 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 f1ap_du_interface_management.h
|
||||
* \brief f1ap interface management for DU
|
||||
* \author EURECOM/NTUST
|
||||
* \date 2018
|
||||
* \version 0.1
|
||||
* \company Eurecom
|
||||
* \email: navid.nikaein@eurecom.fr, bing-kai.hong@eurecom.fr
|
||||
* \note
|
||||
* \warning
|
||||
*/
|
||||
@@ -0,0 +1,181 @@
|
||||
/*
|
||||
* 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
|
||||
* the OAI Public License, Version 1.1 (the "License"); you may not use this file
|
||||
* 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 f1ap_decoder.c
|
||||
* \brief f1ap pdu decode procedures
|
||||
* \author EURECOM/NTUST
|
||||
* \date 2018
|
||||
* \version 0.1
|
||||
* \company Eurecom
|
||||
* \email: navid.nikaein@eurecom.fr, bing-kai.hong@eurecom.fr
|
||||
* \note
|
||||
* \warning
|
||||
*/
|
||||
|
||||
#include "f1ap_common.h"
|
||||
#include "f1ap_decoder.h"
|
||||
|
||||
int asn1_decoder_xer_print = 0;
|
||||
|
||||
static int f1ap_decode_initiating_message(F1AP_F1AP_PDU_t *pdu)
|
||||
{
|
||||
//MessageDef *message_p;
|
||||
//MessagesIds message_id;
|
||||
//asn_encode_to_new_buffer_result_t res = { NULL, {0, NULL, NULL} };
|
||||
DevAssert(pdu != NULL);
|
||||
|
||||
switch(pdu->choice.initiatingMessage->procedureCode) {
|
||||
|
||||
case F1AP_ProcedureCode_id_F1Setup:
|
||||
//res = asn_encode_to_new_buffer(NULL, ATS_CANONICAL_XER, &asn_DEF_F1AP_F1AP_PDU, pdu);
|
||||
LOG_I(F1AP, "%s(): F1AP_ProcedureCode_id_F1Setup\n", __func__);
|
||||
break;
|
||||
|
||||
case F1AP_ProcedureCode_id_InitialULRRCMessageTransfer:
|
||||
//res = asn_encode_to_new_buffer(NULL, ATS_CANONICAL_XER, &asn_DEF_F1AP_F1AP_PDU, pdu);
|
||||
LOG_I(F1AP, "%s(): F1AP_ProcedureCode_id_InitialULRRCMessageTransfer\n", __func__);
|
||||
break;
|
||||
|
||||
case F1AP_ProcedureCode_id_DLRRCMessageTransfer:
|
||||
//res = asn_encode_to_new_buffer(NULL, ATS_CANONICAL_XER, &asn_DEF_F1AP_F1AP_PDU, pdu);
|
||||
LOG_I(F1AP, "%s(): F1AP_ProcedureCode_id_DLRRCMessageTransfer\n", __func__);
|
||||
break;
|
||||
|
||||
case F1AP_ProcedureCode_id_ULRRCMessageTransfer:
|
||||
//res = asn_encode_to_new_buffer(NULL, ATS_CANONICAL_XER, &asn_DEF_F1AP_F1AP_PDU, pdu);
|
||||
LOG_I(F1AP, "%s(): F1AP_ProcedureCode_id_ULRRCMessageTransfer\n", __func__);
|
||||
break;
|
||||
case F1AP_ProcedureCode_id_UEContextRelease:
|
||||
LOG_I(F1AP, "%s(): F1AP_ProcedureCode_id_UEContextRelease\n", __func__);
|
||||
break;
|
||||
case F1AP_ProcedureCode_id_UEContextReleaseRequest:
|
||||
LOG_I(F1AP, "%s(): F1AP_ProcedureCode_id_UEContextReleaseRequest\n", __func__);
|
||||
break;
|
||||
// case F1AP_ProcedureCode_id_InitialContextSetup:
|
||||
// res = asn_encode_to_new_buffer(NULL, ATS_CANONICAL_XER, &asn_DEF_F1AP_F1AP_PDU, pdu);
|
||||
// message_id = F1AP_INITIAL_CONTEXT_SETUP_LOG;
|
||||
// message_p = itti_alloc_new_message_sized(TASK_F1AP, message_id,
|
||||
// res.result.encoded + sizeof (IttiMsgText));
|
||||
// message_p->ittiMsg.f1ap_initial_context_setup_log.size = res.result.encoded;
|
||||
// memcpy(&message_p->ittiMsg.f1ap_initial_context_setup_log.text, res.buffer, res.result.encoded);
|
||||
// itti_send_msg_to_task(TASK_UNKNOWN, INSTANCE_DEFAULT, message_p);
|
||||
// free(res.buffer);
|
||||
// break;
|
||||
|
||||
default:
|
||||
// F1AP_ERROR("Unknown procedure ID (%d) for initiating message\n",
|
||||
// (int)pdu->choice.initiatingMessage->procedureCode);
|
||||
LOG_E(F1AP, "Unknown procedure ID (%d) for initiating message\n",
|
||||
(int)pdu->choice.initiatingMessage->procedureCode);
|
||||
AssertFatal( 0, "Unknown procedure ID (%d) for initiating message\n",
|
||||
(int)pdu->choice.initiatingMessage->procedureCode);
|
||||
return -1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int f1ap_decode_successful_outcome(F1AP_F1AP_PDU_t *pdu)
|
||||
{
|
||||
DevAssert(pdu != NULL);
|
||||
|
||||
switch(pdu->choice.successfulOutcome->procedureCode) {
|
||||
case F1AP_ProcedureCode_id_F1Setup:
|
||||
LOG_I(F1AP, "%s(): F1AP_ProcedureCode_id_F1Setup\n", __func__);
|
||||
break;
|
||||
|
||||
case F1AP_ProcedureCode_id_UEContextRelease:
|
||||
LOG_I(F1AP, "%s(): F1AP_ProcedureCode_id_UEContextRelease\n", __func__);
|
||||
break;
|
||||
|
||||
default:
|
||||
LOG_E(F1AP,"Unknown procedure ID (%d) for successfull outcome message\n",
|
||||
(int)pdu->choice.successfulOutcome->procedureCode);
|
||||
return -1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int f1ap_decode_unsuccessful_outcome(F1AP_F1AP_PDU_t *pdu)
|
||||
{
|
||||
DevAssert(pdu != NULL);
|
||||
|
||||
switch(pdu->choice.unsuccessfulOutcome->procedureCode) {
|
||||
case F1AP_ProcedureCode_id_F1Setup:
|
||||
LOG_I(F1AP, "%s(): F1AP_ProcedureCode_id_F1Setup\n", __func__);
|
||||
break;
|
||||
|
||||
default:
|
||||
// F1AP_ERROR("Unknown procedure ID (%d) for unsuccessfull outcome message\n",
|
||||
// (int)pdu->choice.unsuccessfulOutcome->procedureCode);
|
||||
LOG_E(F1AP, "Unknown procedure ID (%d) for unsuccessfull outcome message\n",
|
||||
(int)pdu->choice.unsuccessfulOutcome->procedureCode);
|
||||
return -1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int f1ap_decode_pdu(F1AP_F1AP_PDU_t *pdu, const uint8_t *const buffer, uint32_t length)
|
||||
{
|
||||
asn_dec_rval_t dec_ret;
|
||||
|
||||
DevAssert(buffer != NULL);
|
||||
|
||||
dec_ret = aper_decode(NULL,
|
||||
&asn_DEF_F1AP_F1AP_PDU,
|
||||
(void **)&pdu,
|
||||
buffer,
|
||||
length,
|
||||
0,
|
||||
0);
|
||||
|
||||
if (asn1_decoder_xer_print) {
|
||||
LOG_E(F1AP, "----------------- ASN1 DECODER PRINT START----------------- \n");
|
||||
xer_fprint(stdout, &asn_DEF_F1AP_F1AP_PDU, pdu);
|
||||
LOG_E(F1AP, "----------------- ASN1 DECODER PRINT END ----------------- \n");
|
||||
}
|
||||
//LOG_I(F1AP, "f1ap_decode_pdu.dec_ret.code = %d\n", dec_ret.code);
|
||||
|
||||
if (dec_ret.code != RC_OK) {
|
||||
LOG_E(F1AP, "Failed to decode pdu\n");
|
||||
return -1;
|
||||
}
|
||||
|
||||
switch(pdu->present) {
|
||||
case F1AP_F1AP_PDU_PR_initiatingMessage:
|
||||
return f1ap_decode_initiating_message(pdu);
|
||||
|
||||
case F1AP_F1AP_PDU_PR_successfulOutcome:
|
||||
return f1ap_decode_successful_outcome(pdu);
|
||||
|
||||
case F1AP_F1AP_PDU_PR_unsuccessfulOutcome:
|
||||
return f1ap_decode_unsuccessful_outcome(pdu);
|
||||
|
||||
default:
|
||||
LOG_E(F1AP, "Unknown presence (%d) or not implemented\n", (int)pdu->present);
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
return -1;
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
/*
|
||||
* 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
|
||||
* the OAI Public License, Version 1.1 (the "License"); you may not use this file
|
||||
* 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 f1ap_decoder.h
|
||||
* \brief f1ap pdu decode procedures
|
||||
* \author EURECOM/NTUST
|
||||
* \date 2018
|
||||
* \version 0.1
|
||||
* \company Eurecom
|
||||
* \email: navid.nikaein@eurecom.fr, bing-kai.hong@eurecom.fr
|
||||
* \note
|
||||
* \warning
|
||||
*/
|
||||
|
||||
#ifndef F1AP_ENB_ENCODER_H_
|
||||
#define F1AP_ENB_ENCODER_H_
|
||||
|
||||
int f1ap_decode_pdu(F1AP_F1AP_PDU_t *pdu, const uint8_t *const buffer, uint32_t length)
|
||||
__attribute__ ((warn_unused_result));
|
||||
|
||||
#endif /* F1AP_ENB_ENCODER_H_ */
|
||||
@@ -0,0 +1,46 @@
|
||||
/*
|
||||
* 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
|
||||
* the OAI Public License, Version 1.1 (the "License"); you may not use this file
|
||||
* 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 f1ap_default_values.h
|
||||
* \brief default values for f1ap procedures
|
||||
* \author EURECOM/NTUST
|
||||
* \date 2018
|
||||
* \version 0.1
|
||||
* \company Eurecom
|
||||
* \email: navid.nikaein@eurecom.fr, bing-kai.hong@eurecom.fr
|
||||
* \note
|
||||
* \warning
|
||||
*/
|
||||
|
||||
#ifndef F1AP_DEFAULT_VALUES_H_
|
||||
#define F1AP_DEFAULT_VALUES_H_
|
||||
|
||||
#define ENB_TAC (1)
|
||||
#define ENB_MCC (208)
|
||||
#define ENB_MNC (92)
|
||||
|
||||
#define ENB_NAME "Eurecom ENB"
|
||||
#define ENB_NAME_FORMAT (ENB_NAME" %u")
|
||||
|
||||
#define F1AP_PORT_NUMBER (30923)
|
||||
#define F1AP_SCTP_PPID (62)
|
||||
|
||||
#endif /* F1AP_DEFAULT_VALUES_H_ */
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,118 @@
|
||||
/*
|
||||
* 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
|
||||
* the OAI Public License, Version 1.1 (the "License"); you may not use this file
|
||||
* 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 f1ap_du_interface_management.h
|
||||
* \brief f1ap interface management for DU
|
||||
* \author EURECOM/NTUST
|
||||
* \date 2018
|
||||
* \version 0.1
|
||||
* \company Eurecom
|
||||
* \email: navid.nikaein@eurecom.fr, bing-kai.hong@eurecom.fr
|
||||
* \note
|
||||
* \warning
|
||||
*/
|
||||
|
||||
#ifndef F1AP_DU_INTERFACE_MANAGEMENT_H_
|
||||
#define F1AP_DU_INTERFACE_MANAGEMENT_H_
|
||||
|
||||
/*
|
||||
* Reset
|
||||
*/
|
||||
int DU_handle_RESET(instance_t instance,
|
||||
uint32_t assoc_id,
|
||||
uint32_t stream,
|
||||
F1AP_F1AP_PDU_t *pdu);
|
||||
int DU_send_RESET_ACKKNOWLEDGE(instance_t instance, F1AP_ResetAcknowledge_t *ResetAcknowledge);
|
||||
int DU_send_RESET(instance_t instance, F1AP_Reset_t *Reset);
|
||||
int DU_handle_RESET_ACKNOWLEDGE(instance_t instance,
|
||||
uint32_t assoc_id,
|
||||
uint32_t stream,
|
||||
F1AP_F1AP_PDU_t *pdu);
|
||||
|
||||
/*
|
||||
* Error Indication
|
||||
*/
|
||||
int DU_send_ERROR_INDICATION(instance_t instance, F1AP_F1AP_PDU_t *pdu_p);
|
||||
int DU_handle_ERROR_INDICATION(instance_t instance,
|
||||
uint32_t assoc_id,
|
||||
uint32_t stream,
|
||||
F1AP_F1AP_PDU_t *pdu);
|
||||
|
||||
|
||||
/*
|
||||
* F1 Setup
|
||||
*/
|
||||
int DU_send_F1_SETUP_REQUEST(instance_t instance);
|
||||
|
||||
int DU_handle_F1_SETUP_RESPONSE(instance_t instance,
|
||||
uint32_t assoc_id,
|
||||
uint32_t stream,
|
||||
F1AP_F1AP_PDU_t *pdu);
|
||||
|
||||
int DU_handle_F1_SETUP_FAILURE(instance_t instance,
|
||||
uint32_t assoc_id,
|
||||
uint32_t stream,
|
||||
F1AP_F1AP_PDU_t *pdu);
|
||||
|
||||
/*
|
||||
* gNB-DU Configuration Update
|
||||
*/
|
||||
int DU_send_gNB_DU_CONFIGURATION_UPDATE(instance_t instance,
|
||||
instance_t du_mod_idP,
|
||||
f1ap_setup_req_t *f1ap_du_data);
|
||||
|
||||
int DU_handle_gNB_DU_CONFIGURATION_FAILURE(instance_t instance,
|
||||
uint32_t assoc_id,
|
||||
uint32_t stream,
|
||||
F1AP_F1AP_PDU_t *pdu);
|
||||
|
||||
int DU_handle_gNB_DU_CONFIGURATION_UPDATE_ACKNOWLEDGE(instance_t instance,
|
||||
uint32_t assoc_id,
|
||||
uint32_t stream,
|
||||
F1AP_F1AP_PDU_t *pdu);
|
||||
|
||||
/*
|
||||
* gNB-CU Configuration Update
|
||||
*/
|
||||
int DU_handle_gNB_CU_CONFIGURATION_UPDATE(instance_t instance,
|
||||
uint32_t assoc_id,
|
||||
uint32_t stream,
|
||||
F1AP_F1AP_PDU_t *pdu);
|
||||
|
||||
int DU_send_gNB_CU_CONFIGURATION_UPDATE_FAILURE(instance_t instance,
|
||||
F1AP_GNBCUConfigurationUpdateFailure_t *GNBCUConfigurationUpdateFailure);
|
||||
|
||||
int DU_send_gNB_CU_CONFIGURATION_UPDATE_ACKNOWLEDGE(instance_t instance,
|
||||
F1AP_GNBCUConfigurationUpdateAcknowledge_t *GNBCUConfigurationUpdateAcknowledge);
|
||||
|
||||
|
||||
/*
|
||||
* gNB-DU Resource Coordination
|
||||
*/
|
||||
int DU_send_gNB_DU_RESOURCE_COORDINATION_REQUEST(instance_t instance,
|
||||
F1AP_GNBDUResourceCoordinationRequest_t *GNBDUResourceCoordinationRequest);
|
||||
|
||||
int DU_handle_gNB_DU_RESOURCE_COORDINATION_RESPONSE(instance_t instance,
|
||||
uint32_t assoc_id,
|
||||
uint32_t stream,
|
||||
F1AP_F1AP_PDU_t *pdu);
|
||||
|
||||
#endif /* F1AP_DU_INTERFACE_MANAGEMENT_H_ */
|
||||
@@ -0,0 +1,31 @@
|
||||
/*
|
||||
* 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
|
||||
* the OAI Public License, Version 1.1 (the "License"); you may not use this file
|
||||
* 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 f1ap_du_interface_management.h
|
||||
* \brief f1ap interface management for DU
|
||||
* \author EURECOM/NTUST
|
||||
* \date 2018
|
||||
* \version 0.1
|
||||
* \company Eurecom
|
||||
* \email: navid.nikaein@eurecom.fr, bing-kai.hong@eurecom.fr
|
||||
* \note
|
||||
* \warning
|
||||
*/
|
||||
@@ -0,0 +1,31 @@
|
||||
/*
|
||||
* 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
|
||||
* the OAI Public License, Version 1.1 (the "License"); you may not use this file
|
||||
* 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 f1ap_du_interface_management.h
|
||||
* \brief f1ap interface management for DU
|
||||
* \author EURECOM/NTUST
|
||||
* \date 2018
|
||||
* \version 0.1
|
||||
* \company Eurecom
|
||||
* \email: navid.nikaein@eurecom.fr, bing-kai.hong@eurecom.fr
|
||||
* \note
|
||||
* \warning
|
||||
*/
|
||||
@@ -0,0 +1,881 @@
|
||||
/*
|
||||
* 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
|
||||
* the OAI Public License, Version 1.1 (the "License"); you may not use this file
|
||||
* 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 f1ap_du_rrc_message_transfer.c
|
||||
* \brief f1ap rrc message transfer for DU
|
||||
* \author EURECOM/NTUST
|
||||
* \date 2018
|
||||
* \version 0.1
|
||||
* \company Eurecom
|
||||
* \email: navid.nikaein@eurecom.fr, bing-kai.hong@eurecom.fr
|
||||
* \note
|
||||
* \warning
|
||||
*/
|
||||
|
||||
#include "f1ap_common.h"
|
||||
#include "f1ap_encoder.h"
|
||||
#include "f1ap_decoder.h"
|
||||
#include "f1ap_itti_messaging.h"
|
||||
|
||||
#include "f1ap_du_rrc_message_transfer.h"
|
||||
|
||||
|
||||
#include "LTE_DL-CCCH-Message.h"
|
||||
#include "LTE_DL-DCCH-Message.h"
|
||||
#include "LTE_UL-DCCH-Message.h"
|
||||
|
||||
// for SRB1_logicalChannelConfig_defaultValue
|
||||
#include "rrc_extern.h"
|
||||
#include "common/ran_context.h"
|
||||
|
||||
#include "rrc_eNB_UE_context.h"
|
||||
|
||||
// undefine C_RNTI from
|
||||
// openair1/PHY/LTE_TRANSPORT/transport_common.h which
|
||||
// replaces in ie->value.choice.C_RNTI, causing
|
||||
// a compile error
|
||||
|
||||
#undef C_RNTI
|
||||
|
||||
extern f1ap_setup_req_t *f1ap_du_data;
|
||||
extern RAN_CONTEXT_t RC;
|
||||
extern f1ap_cudu_inst_t f1ap_du_inst[MAX_eNB];
|
||||
|
||||
|
||||
|
||||
/* DL RRC Message Transfer */
|
||||
int DU_handle_DL_RRC_MESSAGE_TRANSFER(instance_t instance,
|
||||
uint32_t assoc_id,
|
||||
uint32_t stream,
|
||||
F1AP_F1AP_PDU_t *pdu) {
|
||||
LOG_D(F1AP, "DU_handle_DL_RRC_MESSAGE_TRANSFER \n");
|
||||
|
||||
F1AP_DLRRCMessageTransfer_t *container;
|
||||
F1AP_DLRRCMessageTransferIEs_t *ie;
|
||||
|
||||
uint64_t cu_ue_f1ap_id;
|
||||
uint64_t du_ue_f1ap_id;
|
||||
uint64_t srb_id;
|
||||
int executeDuplication;
|
||||
sdu_size_t rrc_dl_sdu_len;
|
||||
//uint64_t subscriberProfileIDforRFP;
|
||||
//uint64_t rAT_FrequencySelectionPriority;
|
||||
|
||||
DevAssert(pdu != NULL);
|
||||
|
||||
if (stream != 0) {
|
||||
LOG_E(F1AP, "[SCTP %d] Received F1 on stream != 0 (%d)\n",
|
||||
assoc_id, stream);
|
||||
return -1;
|
||||
}
|
||||
|
||||
container = &pdu->choice.initiatingMessage->value.choice.DLRRCMessageTransfer;
|
||||
|
||||
|
||||
/* GNB_CU_UE_F1AP_ID */
|
||||
F1AP_FIND_PROTOCOLIE_BY_ID(F1AP_DLRRCMessageTransferIEs_t, ie, container,
|
||||
F1AP_ProtocolIE_ID_id_gNB_CU_UE_F1AP_ID, true);
|
||||
cu_ue_f1ap_id = ie->value.choice.GNB_CU_UE_F1AP_ID;
|
||||
LOG_D(F1AP, "cu_ue_f1ap_id %lu \n", cu_ue_f1ap_id);
|
||||
|
||||
|
||||
/* GNB_DU_UE_F1AP_ID */
|
||||
F1AP_FIND_PROTOCOLIE_BY_ID(F1AP_DLRRCMessageTransferIEs_t, ie, container,
|
||||
F1AP_ProtocolIE_ID_id_gNB_DU_UE_F1AP_ID, true);
|
||||
du_ue_f1ap_id = ie->value.choice.GNB_DU_UE_F1AP_ID;
|
||||
LOG_D(F1AP, "du_ue_f1ap_id %lu associated with UE RNTI %x \n",
|
||||
du_ue_f1ap_id,
|
||||
f1ap_get_rnti_by_du_id(&f1ap_du_inst[instance], du_ue_f1ap_id)); // this should be the one transmitted via initial ul rrc message transfer
|
||||
|
||||
if (f1ap_du_add_cu_ue_id(&f1ap_du_inst[instance],du_ue_f1ap_id, cu_ue_f1ap_id) < 0 ) {
|
||||
LOG_E(F1AP, "Failed to find the F1AP UID \n");
|
||||
//return -1;
|
||||
}
|
||||
|
||||
/* optional */
|
||||
/* oldgNB_DU_UE_F1AP_ID */
|
||||
if (0) {
|
||||
F1AP_FIND_PROTOCOLIE_BY_ID(F1AP_DLRRCMessageTransferIEs_t, ie, container,
|
||||
F1AP_ProtocolIE_ID_id_oldgNB_DU_UE_F1AP_ID, true);
|
||||
}
|
||||
|
||||
/* mandatory */
|
||||
/* SRBID */
|
||||
F1AP_FIND_PROTOCOLIE_BY_ID(F1AP_DLRRCMessageTransferIEs_t, ie, container,
|
||||
F1AP_ProtocolIE_ID_id_SRBID, true);
|
||||
srb_id = ie->value.choice.SRBID;
|
||||
LOG_D(F1AP, "srb_id %lu \n", srb_id);
|
||||
|
||||
/* optional */
|
||||
/* ExecuteDuplication */
|
||||
if (0) {
|
||||
F1AP_FIND_PROTOCOLIE_BY_ID(F1AP_DLRRCMessageTransferIEs_t, ie, container,
|
||||
F1AP_ProtocolIE_ID_id_ExecuteDuplication, true);
|
||||
executeDuplication = ie->value.choice.ExecuteDuplication;
|
||||
LOG_D(F1AP, "ExecuteDuplication %d \n", executeDuplication);
|
||||
}
|
||||
|
||||
// issue in here
|
||||
/* mandatory */
|
||||
/* RRC Container */
|
||||
F1AP_FIND_PROTOCOLIE_BY_ID(F1AP_DLRRCMessageTransferIEs_t, ie, container,
|
||||
F1AP_ProtocolIE_ID_id_RRCContainer, true);
|
||||
// BK: need check
|
||||
// create an ITTI message and copy SDU
|
||||
|
||||
// message_p = itti_alloc_new_message (TASK_CU_F1, RRC_MAC_CCCH_DATA_IND);
|
||||
// memset (RRC_MAC_CCCH_DATA_IND (message_p).sdu, 0, CCCH_SDU_SIZE);
|
||||
rrc_dl_sdu_len = ie->value.choice.RRCContainer.size;
|
||||
// memcpy(RRC_MAC_CCCH_DATA_IND (message_p).sdu, ie->value.choice.RRCContainer.buf,
|
||||
// ccch_sdu_len);
|
||||
|
||||
//LOG_I(F1AP, "%s() RRCContainer size %lu: ", __func__, ie->value.choice.RRCContainer.size);
|
||||
//for (int i = 0;i < ie->value.choice.RRCContainer.size; i++)
|
||||
// printf("%02x ", ie->value.choice.RRCContainer.buf[i]);
|
||||
//printf("\n");
|
||||
|
||||
/* optional */
|
||||
/* RAT_FrequencyPriorityInformation */
|
||||
if (0) {
|
||||
F1AP_FIND_PROTOCOLIE_BY_ID(F1AP_DLRRCMessageTransferIEs_t, ie, container,
|
||||
F1AP_ProtocolIE_ID_id_RAT_FrequencyPriorityInformation, true);
|
||||
|
||||
switch(ie->value.choice.RAT_FrequencyPriorityInformation.present) {
|
||||
case F1AP_RAT_FrequencyPriorityInformation_PR_subscriberProfileIDforRFP:
|
||||
//subscriberProfileIDforRFP = ie->value.choice.RAT_FrequencyPriorityInformation.choice.subscriberProfileIDforRFP;
|
||||
break;
|
||||
case F1AP_RAT_FrequencyPriorityInformation_PR_rAT_FrequencySelectionPriority:
|
||||
//rAT_FrequencySelectionPriority = ie->value.choice.RAT_FrequencyPriorityInformation.choice.rAT_FrequencySelectionPriority;
|
||||
break;
|
||||
default:
|
||||
LOG_W(F1AP, "unhandled IE RAT_FrequencyPriorityInformation.present\n");
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// decode RRC Container and act on the message type
|
||||
AssertFatal(srb_id<3,"illegal srb_id\n");
|
||||
|
||||
protocol_ctxt_t ctxt;
|
||||
ctxt.rnti = f1ap_get_rnti_by_du_id(&f1ap_du_inst[instance], du_ue_f1ap_id);
|
||||
ctxt.module_id = instance;
|
||||
ctxt.instance = instance;
|
||||
ctxt.enb_flag = 1;
|
||||
|
||||
struct rrc_eNB_ue_context_s* ue_context_p = rrc_eNB_get_ue_context(
|
||||
RC.rrc[ctxt.module_id],
|
||||
ctxt.rnti);
|
||||
|
||||
if (srb_id == 0) {
|
||||
LTE_DL_CCCH_Message_t* dl_ccch_msg=NULL;
|
||||
asn_dec_rval_t dec_rval;
|
||||
dec_rval = uper_decode(NULL,
|
||||
&asn_DEF_LTE_DL_CCCH_Message,
|
||||
(void**)&dl_ccch_msg,
|
||||
ie->value.choice.RRCContainer.buf,
|
||||
rrc_dl_sdu_len,0,0);
|
||||
AssertFatal(dec_rval.code == RC_OK, "could not decode F1AP message\n");
|
||||
switch (dl_ccch_msg->message.choice.c1.present) {
|
||||
|
||||
case LTE_DL_CCCH_MessageType__c1_PR_NOTHING:
|
||||
LOG_I(F1AP, "Received PR_NOTHING on DL-CCCH-Message\n");
|
||||
break;
|
||||
|
||||
case LTE_DL_CCCH_MessageType__c1_PR_rrcConnectionReestablishment:
|
||||
LOG_I(F1AP,
|
||||
"Logical Channel DL-CCCH (SRB0), Received RRCConnectionReestablishment\n");
|
||||
break;
|
||||
|
||||
case LTE_DL_CCCH_MessageType__c1_PR_rrcConnectionReestablishmentReject:
|
||||
LOG_I(F1AP,
|
||||
"Logical Channel DL-CCCH (SRB0), Received RRCConnectionReestablishmentReject\n");
|
||||
break;
|
||||
|
||||
case LTE_DL_CCCH_MessageType__c1_PR_rrcConnectionReject:
|
||||
LOG_I(F1AP,
|
||||
"Logical Channel DL-CCCH (SRB0), Received RRCConnectionReject \n");
|
||||
break;
|
||||
|
||||
case LTE_DL_CCCH_MessageType__c1_PR_rrcConnectionSetup:
|
||||
{
|
||||
LOG_I(F1AP,
|
||||
"Logical Channel DL-CCCH (SRB0), Received RRCConnectionSetup DU_ID %lx/RNTI %x\n",
|
||||
du_ue_f1ap_id,
|
||||
f1ap_get_rnti_by_du_id(&f1ap_du_inst[instance], du_ue_f1ap_id));
|
||||
// Get configuration
|
||||
|
||||
LTE_RRCConnectionSetup_t* rrcConnectionSetup = &dl_ccch_msg->message.choice.c1.choice.rrcConnectionSetup;
|
||||
AssertFatal(rrcConnectionSetup!=NULL,"rrcConnectionSetup is null\n");
|
||||
LTE_RadioResourceConfigDedicated_t* radioResourceConfigDedicated = &rrcConnectionSetup->criticalExtensions.choice.c1.choice.rrcConnectionSetup_r8.radioResourceConfigDedicated;
|
||||
|
||||
// get SRB logical channel information
|
||||
LTE_SRB_ToAddModList_t *SRB_configList;
|
||||
LTE_SRB_ToAddMod_t *SRB1_config;
|
||||
LTE_LogicalChannelConfig_t *SRB1_logicalChannelConfig = NULL;
|
||||
SRB_configList = radioResourceConfigDedicated->srb_ToAddModList;
|
||||
|
||||
AssertFatal(SRB_configList!=NULL,"SRB_configList is null\n");
|
||||
for (int cnt = 0; cnt < (SRB_configList)->list.count; cnt++) {
|
||||
if ((SRB_configList)->list.array[cnt]->srb_Identity == 1) {
|
||||
SRB1_config = (SRB_configList)->list.array[cnt];
|
||||
|
||||
if (SRB1_config->logicalChannelConfig) {
|
||||
if (SRB1_config->logicalChannelConfig->present ==
|
||||
LTE_SRB_ToAddMod__logicalChannelConfig_PR_explicitValue) {
|
||||
SRB1_logicalChannelConfig = &SRB1_config->logicalChannelConfig->choice.explicitValue;
|
||||
} else {
|
||||
SRB1_logicalChannelConfig = &SRB1_logicalChannelConfig_defaultValue;
|
||||
}
|
||||
} else {
|
||||
SRB1_logicalChannelConfig = &SRB1_logicalChannelConfig_defaultValue;
|
||||
}
|
||||
}
|
||||
} // for
|
||||
rrc_rlc_config_asn1_req(&ctxt,
|
||||
SRB_configList,
|
||||
(LTE_DRB_ToAddModList_t*) NULL,
|
||||
(LTE_DRB_ToReleaseList_t*) NULL
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(9, 0, 0))
|
||||
, (LTE_PMCH_InfoList_r9_t *) NULL,
|
||||
0,0
|
||||
# endif
|
||||
);
|
||||
|
||||
// This should be somewhere in the f1ap_cudu_ue_inst_t
|
||||
/*int macrlc_instance = 0;
|
||||
|
||||
rnti_t rnti = f1ap_get_rnti_by_du_id(&f1ap_du_inst[0], du_ue_f1ap_id);
|
||||
struct rrc_eNB_ue_context_s *ue_context_p = rrc_eNB_get_ue_context(RC.rrc[macrlc_instance],rnti);
|
||||
*/
|
||||
eNB_RRC_UE_t *ue_p = &ue_context_p->ue_context;
|
||||
AssertFatal(ue_p->Srb0.Active == 1,"SRB0 is not active\n");
|
||||
|
||||
memcpy((void*)ue_p->Srb0.Tx_buffer.Payload,
|
||||
(void*)ie->value.choice.RRCContainer.buf,
|
||||
rrc_dl_sdu_len); // ie->value.choice.RRCContainer.size
|
||||
|
||||
ue_p->Srb0.Tx_buffer.payload_size = rrc_dl_sdu_len;
|
||||
|
||||
LTE_MAC_MainConfig_t *mac_MainConfig = NULL;
|
||||
if (radioResourceConfigDedicated->mac_MainConfig)
|
||||
mac_MainConfig = &radioResourceConfigDedicated->mac_MainConfig->choice.explicitValue;
|
||||
|
||||
rrc_mac_config_req_eNB(
|
||||
ctxt.module_id,
|
||||
0, //primaryCC_id,
|
||||
0,0,0,0,0,
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
0,
|
||||
#endif
|
||||
ctxt.rnti,
|
||||
(LTE_BCCH_BCH_Message_t *) NULL,
|
||||
(LTE_RadioResourceConfigCommonSIB_t *) NULL,
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
(LTE_RadioResourceConfigCommonSIB_t *) NULL,
|
||||
#endif
|
||||
radioResourceConfigDedicated->physicalConfigDedicated,
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
|
||||
(LTE_SCellToAddMod_r10_t *)NULL,
|
||||
//(struct PhysicalConfigDedicatedSCell_r10 *)NULL,
|
||||
#endif
|
||||
(LTE_MeasObjectToAddMod_t **) NULL,
|
||||
mac_MainConfig,
|
||||
1,
|
||||
SRB1_logicalChannelConfig,
|
||||
NULL, // measGapConfig,
|
||||
(LTE_TDD_Config_t *) NULL,
|
||||
NULL,
|
||||
(LTE_SchedulingInfoList_t *) NULL,
|
||||
0, NULL, NULL, (LTE_MBSFN_SubframeConfigList_t *) NULL
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(9, 0, 0))
|
||||
, 0, (LTE_MBSFN_AreaInfoList_r9_t *) NULL, (LTE_PMCH_InfoList_r9_t *) NULL
|
||||
#endif
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(13, 0, 0))
|
||||
,
|
||||
(LTE_SystemInformationBlockType1_v1310_IEs_t *)NULL
|
||||
#endif
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
,
|
||||
0,
|
||||
(LTE_BCCH_DL_SCH_Message_MBMS_t *) NULL,
|
||||
(LTE_SchedulingInfo_MBMS_r14_t *) NULL,
|
||||
(struct LTE_NonMBSFN_SubframeConfig_r14 *) NULL,
|
||||
(LTE_SystemInformationBlockType1_MBMS_r14_t *) NULL,
|
||||
(LTE_MBSFN_AreaInfoList_r9_t *) NULL
|
||||
#endif
|
||||
);
|
||||
break;
|
||||
} // case
|
||||
|
||||
default:
|
||||
AssertFatal(1==0,
|
||||
"Unknown message\n");
|
||||
break;
|
||||
}// switch case
|
||||
return(0);
|
||||
} else if (srb_id == 1) {
|
||||
|
||||
LTE_DL_DCCH_Message_t* dl_dcch_msg=NULL;
|
||||
asn_dec_rval_t dec_rval;
|
||||
dec_rval = uper_decode(NULL,
|
||||
&asn_DEF_LTE_DL_DCCH_Message,
|
||||
(void**)&dl_dcch_msg,
|
||||
&ie->value.choice.RRCContainer.buf[1], // buf[0] includes the pdcp header
|
||||
rrc_dl_sdu_len,0,0);
|
||||
|
||||
if ((dec_rval.code != RC_OK) && (dec_rval.consumed == 0))
|
||||
LOG_E(F1AP," Failed to decode DL-DCCH (%zu bytes)\n",dec_rval.consumed);
|
||||
else
|
||||
LOG_D(F1AP, "Received message: present %d and c1 present %d\n",
|
||||
dl_dcch_msg->message.present, dl_dcch_msg->message.choice.c1.present);
|
||||
|
||||
if (dl_dcch_msg->message.present == LTE_DL_DCCH_MessageType_PR_c1) {
|
||||
|
||||
switch (dl_dcch_msg->message.choice.c1.present) {
|
||||
|
||||
case LTE_DL_DCCH_MessageType__c1_PR_NOTHING:
|
||||
LOG_I(F1AP, "Received PR_NOTHING on DL-DCCH-Message\n");
|
||||
return 0;
|
||||
case LTE_DL_DCCH_MessageType__c1_PR_dlInformationTransfer:
|
||||
LOG_I(F1AP,"Received NAS DL Information Transfer\n");
|
||||
break;
|
||||
case LTE_DL_DCCH_MessageType__c1_PR_csfbParametersResponseCDMA2000:
|
||||
LOG_I(F1AP,"Received NAS sfbParametersResponseCDMA2000\n");
|
||||
break;
|
||||
case LTE_DL_DCCH_MessageType__c1_PR_handoverFromEUTRAPreparationRequest:
|
||||
LOG_I(F1AP,"Received NAS andoverFromEUTRAPreparationRequest\n");
|
||||
break;
|
||||
case LTE_DL_DCCH_MessageType__c1_PR_mobilityFromEUTRACommand:
|
||||
LOG_I(F1AP,"Received NAS mobilityFromEUTRACommand\n");
|
||||
break;
|
||||
case LTE_DL_DCCH_MessageType__c1_PR_rrcConnectionReconfiguration:
|
||||
// handle RRCConnectionReconfiguration
|
||||
LOG_I(F1AP,
|
||||
"Logical Channel DL-DCCH (SRB1), Received RRCConnectionReconfiguration DU_ID %lx/RNTI %x\n",
|
||||
du_ue_f1ap_id,
|
||||
f1ap_get_rnti_by_du_id(&f1ap_du_inst[instance], du_ue_f1ap_id));
|
||||
|
||||
LTE_RRCConnectionReconfiguration_t* rrcConnectionReconfiguration = &dl_dcch_msg->message.choice.c1.choice.rrcConnectionReconfiguration;
|
||||
|
||||
if (rrcConnectionReconfiguration->criticalExtensions.present == LTE_RRCConnectionReconfiguration__criticalExtensions_PR_c1) {
|
||||
if (rrcConnectionReconfiguration->criticalExtensions.choice.c1.present ==
|
||||
LTE_RRCConnectionReconfiguration__criticalExtensions__c1_PR_rrcConnectionReconfiguration_r8) {
|
||||
LTE_RRCConnectionReconfiguration_r8_IEs_t* rrcConnectionReconfiguration_r8 =
|
||||
&rrcConnectionReconfiguration->criticalExtensions.choice.c1.choice.rrcConnectionReconfiguration_r8;
|
||||
|
||||
if (rrcConnectionReconfiguration_r8->mobilityControlInfo) {
|
||||
LOG_I(F1AP, "Mobility Control Information is present\n");
|
||||
AssertFatal(1==0,"Can't handle this yet in DU\n");
|
||||
}
|
||||
if (rrcConnectionReconfiguration_r8->measConfig != NULL) {
|
||||
LOG_I(F1AP, "Measurement Configuration is present\n");
|
||||
}
|
||||
|
||||
if (rrcConnectionReconfiguration_r8->radioResourceConfigDedicated) {
|
||||
LOG_I(F1AP, "Radio Resource Configuration is present\n");
|
||||
uint8_t DRB2LCHAN[8];
|
||||
long drb_id;
|
||||
int i;
|
||||
LTE_DRB_ToAddModList_t *DRB_configList = rrcConnectionReconfiguration_r8->radioResourceConfigDedicated->drb_ToAddModList;
|
||||
LTE_SRB_ToAddModList_t *SRB_configList = rrcConnectionReconfiguration_r8->radioResourceConfigDedicated->srb_ToAddModList;
|
||||
LTE_DRB_ToReleaseList_t *DRB_ReleaseList = rrcConnectionReconfiguration_r8->radioResourceConfigDedicated->drb_ToReleaseList;
|
||||
LTE_MAC_MainConfig_t *mac_MainConfig = NULL;
|
||||
if (rrcConnectionReconfiguration_r8->radioResourceConfigDedicated->mac_MainConfig)
|
||||
mac_MainConfig = &rrcConnectionReconfiguration_r8->radioResourceConfigDedicated->mac_MainConfig->choice.explicitValue;
|
||||
LTE_MeasGapConfig_t *measGapConfig = NULL;
|
||||
struct LTE_PhysicalConfigDedicated* physicalConfigDedicated = rrcConnectionReconfiguration_r8->radioResourceConfigDedicated->physicalConfigDedicated;
|
||||
rrc_rlc_config_asn1_req(
|
||||
&ctxt,
|
||||
SRB_configList, // NULL, //LG-RK 14/05/2014 SRB_configList,
|
||||
DRB_configList,
|
||||
DRB_ReleaseList
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(9, 0, 0))
|
||||
, (LTE_PMCH_InfoList_r9_t *) NULL
|
||||
, 0, 0
|
||||
#endif
|
||||
);
|
||||
|
||||
if (SRB_configList != NULL) {
|
||||
for (i = 0; (i < SRB_configList->list.count) && (i < 3); i++) {
|
||||
if (SRB_configList->list.array[i]->srb_Identity == 1 ){
|
||||
ue_context_p->ue_context.Srb1.Active=1;
|
||||
}
|
||||
else if (SRB_configList->list.array[i]->srb_Identity == 2 ) {
|
||||
ue_context_p->ue_context.Srb2.Active=1;
|
||||
ue_context_p->ue_context.Srb2.Srb_info.Srb_id=2;
|
||||
LOG_I(F1AP, "[DU %d] SRB2 is now active\n",ctxt.module_id);
|
||||
} else {
|
||||
LOG_W(F1AP, "[DU %d] invalide SRB identity %ld\n",ctxt.module_id,
|
||||
SRB_configList->list.array[i]->srb_Identity);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (DRB_configList != NULL) {
|
||||
for (i = 0; i < DRB_configList->list.count; i++) { // num max DRB (11-3-8)
|
||||
if (DRB_configList->list.array[i]) {
|
||||
drb_id = (int)DRB_configList->list.array[i]->drb_Identity;
|
||||
LOG_I(F1AP,
|
||||
"[DU %d] Logical Channel UL-DCCH, Received RRCConnectionReconfiguration for UE rnti %x, reconfiguring DRB %d/LCID %d\n",
|
||||
ctxt.module_id,
|
||||
ctxt.rnti,
|
||||
(int)DRB_configList->list.array[i]->drb_Identity,
|
||||
(int)*DRB_configList->list.array[i]->logicalChannelIdentity);
|
||||
|
||||
if (ue_context_p->ue_context.DRB_active[drb_id] == 0) {
|
||||
ue_context_p->ue_context.DRB_active[drb_id] = 1;
|
||||
|
||||
if (DRB_configList->list.array[i]->logicalChannelIdentity) {
|
||||
DRB2LCHAN[i] = (uint8_t) * DRB_configList->list.array[i]->logicalChannelIdentity;
|
||||
}
|
||||
|
||||
rrc_mac_config_req_eNB(
|
||||
ctxt.module_id,
|
||||
0,0,0,0,0,0,
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
0,
|
||||
#endif
|
||||
ue_context_p->ue_context.rnti,
|
||||
(LTE_BCCH_BCH_Message_t *) NULL,
|
||||
(LTE_RadioResourceConfigCommonSIB_t *) NULL,
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
(LTE_RadioResourceConfigCommonSIB_t *) NULL,
|
||||
#endif
|
||||
physicalConfigDedicated,
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
|
||||
(LTE_SCellToAddMod_r10_t *)NULL,
|
||||
//(struct PhysicalConfigDedicatedSCell_r10 *)NULL,
|
||||
#endif
|
||||
(LTE_MeasObjectToAddMod_t **) NULL,
|
||||
mac_MainConfig,
|
||||
DRB2LCHAN[i],
|
||||
DRB_configList->list.array[i]->logicalChannelConfig,
|
||||
measGapConfig,
|
||||
(LTE_TDD_Config_t *) NULL,
|
||||
NULL,
|
||||
(LTE_SchedulingInfoList_t *) NULL,
|
||||
0, NULL, NULL, (LTE_MBSFN_SubframeConfigList_t *) NULL
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(9, 0, 0))
|
||||
, 0, (LTE_MBSFN_AreaInfoList_r9_t *) NULL, (LTE_PMCH_InfoList_r9_t *) NULL
|
||||
#endif
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(13, 0, 0))
|
||||
,
|
||||
(LTE_SystemInformationBlockType1_v1310_IEs_t *)NULL
|
||||
#endif
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
,
|
||||
0,
|
||||
(LTE_BCCH_DL_SCH_Message_MBMS_t *) NULL,
|
||||
(LTE_SchedulingInfo_MBMS_r14_t *) NULL,
|
||||
(struct LTE_NonMBSFN_SubframeConfig_r14 *) NULL,
|
||||
(LTE_SystemInformationBlockType1_MBMS_r14_t *) NULL,
|
||||
(LTE_MBSFN_AreaInfoList_r9_t *) NULL
|
||||
#endif
|
||||
);
|
||||
}
|
||||
|
||||
} else { // remove LCHAN from MAC/PHY
|
||||
AssertFatal(1==0,"Can't handle this yet in DU\n");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
case LTE_DL_DCCH_MessageType__c1_PR_rrcConnectionRelease:
|
||||
// handle RRCConnectionRelease
|
||||
LOG_I(F1AP, "Received RRCConnectionRelease\n");
|
||||
break;
|
||||
case LTE_DL_DCCH_MessageType__c1_PR_securityModeCommand:
|
||||
LOG_I(F1AP, "Received securityModeCommand\n");
|
||||
break;
|
||||
case LTE_DL_DCCH_MessageType__c1_PR_ueCapabilityEnquiry:
|
||||
LOG_I(F1AP, "Received ueCapabilityEnquiry\n");
|
||||
break;
|
||||
case LTE_DL_DCCH_MessageType__c1_PR_counterCheck:
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
|
||||
case LTE_DL_DCCH_MessageType__c1_PR_loggedMeasurementConfiguration_r10:
|
||||
case LTE_DL_DCCH_MessageType__c1_PR_rnReconfiguration_r10:
|
||||
#endif
|
||||
case LTE_DL_DCCH_MessageType__c1_PR_spare1:
|
||||
case LTE_DL_DCCH_MessageType__c1_PR_spare2:
|
||||
case LTE_DL_DCCH_MessageType__c1_PR_spare3:
|
||||
#if (LTE_RRC_VERSION < MAKE_VERSION(14, 0, 0))
|
||||
case LTE_DL_DCCH_MessageType__c1_PR_spare4:
|
||||
#endif
|
||||
break;
|
||||
case LTE_DL_DCCH_MessageType__c1_PR_ueInformationRequest_r9:
|
||||
LOG_I(F1AP, "Received ueInformationRequest_r9\n");
|
||||
break;
|
||||
case LTE_DL_DCCH_MessageType__c1_PR_rrcConnectionResume_r13:
|
||||
LOG_I(F1AP, "Received rrcConnectionResume_r13\n");
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (srb_id == 2) {
|
||||
|
||||
}
|
||||
|
||||
LOG_I(F1AP, "Received DL RRC Transfer on srb_id %ld\n", srb_id);
|
||||
rlc_op_status_t rlc_status;
|
||||
boolean_t ret = TRUE;
|
||||
mem_block_t *pdcp_pdu_p = NULL;
|
||||
pdcp_pdu_p = get_free_mem_block(rrc_dl_sdu_len, __func__);
|
||||
|
||||
//LOG_I(F1AP, "PRRCContainer size %lu:", ie->value.choice.RRCContainer.size);
|
||||
//for (int i = 0; i < ie->value.choice.RRCContainer.size; i++)
|
||||
// printf("%02x ", ie->value.choice.RRCContainer.buf[i]);
|
||||
|
||||
//printf (", PDCP PDU size %d:", rrc_dl_sdu_len);
|
||||
//for (int i=0;i<rrc_dl_sdu_len;i++) printf("%2x ",pdcp_pdu_p->data[i]);
|
||||
//printf("\n");
|
||||
|
||||
|
||||
if (pdcp_pdu_p != NULL) {
|
||||
memset(pdcp_pdu_p->data, 0, rrc_dl_sdu_len);
|
||||
memcpy(&pdcp_pdu_p->data[0], ie->value.choice.RRCContainer.buf, rrc_dl_sdu_len);
|
||||
rlc_status = rlc_data_req(&ctxt
|
||||
, 1
|
||||
, MBMS_FLAG_NO
|
||||
, srb_id
|
||||
, 0
|
||||
, 0
|
||||
, rrc_dl_sdu_len
|
||||
, pdcp_pdu_p
|
||||
#ifdef Rel14
|
||||
,NULL
|
||||
,NULL
|
||||
#endif
|
||||
);
|
||||
switch (rlc_status) {
|
||||
case RLC_OP_STATUS_OK:
|
||||
//LOG_I(F1AP, "Data sending request over RLC succeeded!\n");
|
||||
ret=TRUE;
|
||||
break;
|
||||
|
||||
case RLC_OP_STATUS_BAD_PARAMETER:
|
||||
LOG_W(F1AP, "Data sending request over RLC failed with 'Bad Parameter' reason!\n");
|
||||
ret= FALSE;
|
||||
break;
|
||||
|
||||
case RLC_OP_STATUS_INTERNAL_ERROR:
|
||||
LOG_W(F1AP, "Data sending request over RLC failed with 'Internal Error' reason!\n");
|
||||
ret= FALSE;
|
||||
break;
|
||||
|
||||
case RLC_OP_STATUS_OUT_OF_RESSOURCES:
|
||||
LOG_W(F1AP, "Data sending request over RLC failed with 'Out of Resources' reason!\n");
|
||||
ret= FALSE;
|
||||
break;
|
||||
|
||||
default:
|
||||
LOG_W(F1AP, "RLC returned an unknown status code after PDCP placed the order to send some data (Status Code:%d)\n", rlc_status);
|
||||
ret= FALSE;
|
||||
break;
|
||||
} // switch case
|
||||
return ret;
|
||||
} // if pdcp_pdu_p
|
||||
|
||||
return 0;
|
||||
|
||||
}
|
||||
|
||||
int DU_send_UL_RRC_MESSAGE_TRANSFER(instance_t instance, const f1ap_ul_rrc_message_t *msg) {
|
||||
const rnti_t rnti = msg->rnti;
|
||||
|
||||
F1AP_F1AP_PDU_t pdu;
|
||||
F1AP_ULRRCMessageTransfer_t *out;
|
||||
F1AP_ULRRCMessageTransferIEs_t *ie;
|
||||
|
||||
uint8_t *buffer = NULL;
|
||||
uint32_t len;
|
||||
|
||||
|
||||
LOG_I(F1AP, "[DU %d] %s: size %d UE RNTI %x in SRB %d\n",
|
||||
instance, __func__, msg->rrc_container_length, rnti, msg->srb_id);
|
||||
|
||||
//LOG_I(F1AP, "%s() RRCContainer size %d: ", __func__, msg->rrc_container_length);
|
||||
//for (int i = 0;i < msg->rrc_container_length; i++)
|
||||
// printf("%02x ", msg->rrc_container[i]);
|
||||
//printf("\n");
|
||||
|
||||
/* Create */
|
||||
/* 0. Message Type */
|
||||
memset(&pdu, 0, sizeof(pdu));
|
||||
pdu.present = F1AP_F1AP_PDU_PR_initiatingMessage;
|
||||
pdu.choice.initiatingMessage = (F1AP_InitiatingMessage_t *)calloc(1, sizeof(F1AP_InitiatingMessage_t));
|
||||
pdu.choice.initiatingMessage->procedureCode = F1AP_ProcedureCode_id_ULRRCMessageTransfer;
|
||||
pdu.choice.initiatingMessage->criticality = F1AP_Criticality_ignore;
|
||||
pdu.choice.initiatingMessage->value.present = F1AP_InitiatingMessage__value_PR_ULRRCMessageTransfer;
|
||||
out = &pdu.choice.initiatingMessage->value.choice.ULRRCMessageTransfer;
|
||||
|
||||
/* mandatory */
|
||||
/* c1. GNB_CU_UE_F1AP_ID */
|
||||
ie = (F1AP_ULRRCMessageTransferIEs_t *)calloc(1, sizeof(F1AP_ULRRCMessageTransferIEs_t));
|
||||
ie->id = F1AP_ProtocolIE_ID_id_gNB_CU_UE_F1AP_ID;
|
||||
ie->criticality = F1AP_Criticality_reject;
|
||||
ie->value.present = F1AP_ULRRCMessageTransferIEs__value_PR_GNB_CU_UE_F1AP_ID;
|
||||
|
||||
ie->value.choice.GNB_CU_UE_F1AP_ID = f1ap_get_cu_ue_f1ap_id(&f1ap_du_inst[instance], rnti);
|
||||
|
||||
ASN_SEQUENCE_ADD(&out->protocolIEs.list, ie);
|
||||
|
||||
/* mandatory */
|
||||
/* c2. GNB_DU_UE_F1AP_ID */
|
||||
ie = (F1AP_ULRRCMessageTransferIEs_t *)calloc(1, sizeof(F1AP_ULRRCMessageTransferIEs_t));
|
||||
ie->id = F1AP_ProtocolIE_ID_id_gNB_DU_UE_F1AP_ID;
|
||||
ie->criticality = F1AP_Criticality_reject;
|
||||
ie->value.present = F1AP_ULRRCMessageTransferIEs__value_PR_GNB_DU_UE_F1AP_ID;
|
||||
ie->value.choice.GNB_DU_UE_F1AP_ID = f1ap_get_du_ue_f1ap_id(&f1ap_du_inst[instance], rnti);
|
||||
ASN_SEQUENCE_ADD(&out->protocolIEs.list, ie);
|
||||
|
||||
/* mandatory */
|
||||
/* c3. SRBID */
|
||||
ie = (F1AP_ULRRCMessageTransferIEs_t *)calloc(1, sizeof(F1AP_ULRRCMessageTransferIEs_t));
|
||||
ie->id = F1AP_ProtocolIE_ID_id_SRBID;
|
||||
ie->criticality = F1AP_Criticality_reject;
|
||||
ie->value.present = F1AP_ULRRCMessageTransferIEs__value_PR_SRBID;
|
||||
ie->value.choice.SRBID = msg->srb_id;
|
||||
ASN_SEQUENCE_ADD(&out->protocolIEs.list, ie);
|
||||
|
||||
// issue in here
|
||||
/* mandatory */
|
||||
/* c4. RRCContainer */
|
||||
ie = (F1AP_ULRRCMessageTransferIEs_t *)calloc(1, sizeof(F1AP_ULRRCMessageTransferIEs_t));
|
||||
ie->id = F1AP_ProtocolIE_ID_id_RRCContainer;
|
||||
ie->criticality = F1AP_Criticality_reject;
|
||||
ie->value.present = F1AP_ULRRCMessageTransferIEs__value_PR_RRCContainer;
|
||||
OCTET_STRING_fromBuf(&ie->value.choice.RRCContainer,
|
||||
(const char *) msg->rrc_container,
|
||||
msg->rrc_container_length);
|
||||
ASN_SEQUENCE_ADD(&out->protocolIEs.list, ie);
|
||||
|
||||
if (msg->srb_id == 1 || msg->srb_id == 2) {
|
||||
struct rrc_eNB_ue_context_s* ue_context_p = rrc_eNB_get_ue_context(RC.rrc[instance], rnti);
|
||||
|
||||
|
||||
LTE_UL_DCCH_Message_t* ul_dcch_msg=NULL;
|
||||
asn_dec_rval_t dec_rval;
|
||||
dec_rval = uper_decode(NULL,
|
||||
&asn_DEF_LTE_UL_DCCH_Message,
|
||||
(void**)&ul_dcch_msg,
|
||||
&ie->value.choice.RRCContainer.buf[1], // buf[0] includes the pdcp header
|
||||
msg->rrc_container_length, 0, 0);
|
||||
|
||||
if ((dec_rval.code != RC_OK) && (dec_rval.consumed == 0))
|
||||
LOG_E(F1AP, " Failed to decode UL-DCCH (%zu bytes)\n",dec_rval.consumed);
|
||||
else
|
||||
LOG_I(F1AP, "Received message: present %d and c1 present %d\n",
|
||||
ul_dcch_msg->message.present, ul_dcch_msg->message.choice.c1.present);
|
||||
|
||||
if (ul_dcch_msg->message.present == LTE_UL_DCCH_MessageType_PR_c1) {
|
||||
|
||||
switch (ul_dcch_msg->message.choice.c1.present) {
|
||||
case LTE_UL_DCCH_MessageType__c1_PR_NOTHING: /* No components present */
|
||||
break;
|
||||
|
||||
case LTE_UL_DCCH_MessageType__c1_PR_csfbParametersRequestCDMA2000:
|
||||
break;
|
||||
|
||||
case LTE_UL_DCCH_MessageType__c1_PR_measurementReport:
|
||||
break;
|
||||
|
||||
case LTE_UL_DCCH_MessageType__c1_PR_rrcConnectionReconfigurationComplete:
|
||||
break;
|
||||
|
||||
case LTE_UL_DCCH_MessageType__c1_PR_rrcConnectionReestablishmentComplete:
|
||||
break;
|
||||
|
||||
case LTE_UL_DCCH_MessageType__c1_PR_rrcConnectionSetupComplete:
|
||||
LOG_I(F1AP, "[MSG] RRC UL rrcConnectionSetupComplete \n");
|
||||
if(!ue_context_p){
|
||||
LOG_E(F1AP, "Did not find the UE context associated with UE RNTOI %x, ue_context_p is NULL\n", rnti);
|
||||
}else {
|
||||
LOG_I(F1AP, "Processing RRCConnectionSetupComplete UE %x\n", rnti);
|
||||
ue_context_p->ue_context.Status = RRC_CONNECTED;
|
||||
}
|
||||
|
||||
break;
|
||||
case LTE_UL_DCCH_MessageType__c1_PR_securityModeComplete:
|
||||
LOG_I(F1AP, "[MSG] RRC securityModeComplete \n");
|
||||
break;
|
||||
|
||||
case LTE_UL_DCCH_MessageType__c1_PR_securityModeFailure:
|
||||
break;
|
||||
|
||||
case LTE_UL_DCCH_MessageType__c1_PR_ueCapabilityInformation:
|
||||
LOG_I(F1AP, "[MSG] RRC ueCapabilityInformation \n");
|
||||
break;
|
||||
|
||||
case LTE_UL_DCCH_MessageType__c1_PR_ulHandoverPreparationTransfer:
|
||||
break;
|
||||
|
||||
case LTE_UL_DCCH_MessageType__c1_PR_ulInformationTransfer:
|
||||
LOG_I(F1AP,"[MSG] RRC UL Information Transfer \n");
|
||||
break;
|
||||
|
||||
case LTE_UL_DCCH_MessageType__c1_PR_counterCheckResponse:
|
||||
break;
|
||||
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(9, 0, 0))
|
||||
|
||||
case LTE_UL_DCCH_MessageType__c1_PR_ueInformationResponse_r9:
|
||||
break;
|
||||
case LTE_UL_DCCH_MessageType__c1_PR_proximityIndication_r9:
|
||||
break;
|
||||
#endif
|
||||
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
|
||||
case LTE_UL_DCCH_MessageType__c1_PR_rnReconfigurationComplete_r10:
|
||||
break;
|
||||
|
||||
case LTE_UL_DCCH_MessageType__c1_PR_mbmsCountingResponse_r10:
|
||||
break;
|
||||
|
||||
case LTE_UL_DCCH_MessageType__c1_PR_interFreqRSTDMeasurementIndication_r10:
|
||||
break;
|
||||
#endif
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
/* encode */
|
||||
if (f1ap_encode_pdu(&pdu, &buffer, &len) < 0) {
|
||||
LOG_E(F1AP, "Failed to encode F1 setup request\n");
|
||||
return -1;
|
||||
}
|
||||
|
||||
du_f1ap_itti_send_sctp_data_req(instance, f1ap_du_data->assoc_id, buffer, len, f1ap_du_data->default_sctp_stream_id);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
/* UL RRC Message Transfer */
|
||||
int DU_send_INITIAL_UL_RRC_MESSAGE_TRANSFER(module_id_t module_idP,
|
||||
int CC_idP,
|
||||
int UE_id,
|
||||
rnti_t rntiP,
|
||||
const uint8_t *sduP,
|
||||
sdu_size_t sdu_lenP) {
|
||||
F1AP_F1AP_PDU_t pdu;
|
||||
F1AP_InitialULRRCMessageTransfer_t *out;
|
||||
F1AP_InitialULRRCMessageTransferIEs_t *ie;
|
||||
|
||||
uint8_t *buffer;
|
||||
uint32_t len;
|
||||
int f1ap_uid = f1ap_add_ue (&f1ap_du_inst[module_idP], module_idP, CC_idP,UE_id, rntiP);
|
||||
|
||||
if (f1ap_uid < 0 ) {
|
||||
LOG_E(F1AP, "Failed to add UE \n");
|
||||
return -1;
|
||||
}
|
||||
|
||||
/* Create */
|
||||
/* 0. Message Type */
|
||||
memset(&pdu, 0, sizeof(pdu));
|
||||
pdu.present = F1AP_F1AP_PDU_PR_initiatingMessage;
|
||||
pdu.choice.initiatingMessage = (F1AP_InitiatingMessage_t *)calloc(1, sizeof(F1AP_InitiatingMessage_t));
|
||||
pdu.choice.initiatingMessage->procedureCode = F1AP_ProcedureCode_id_InitialULRRCMessageTransfer;
|
||||
pdu.choice.initiatingMessage->criticality = F1AP_Criticality_ignore;
|
||||
pdu.choice.initiatingMessage->value.present = F1AP_InitiatingMessage__value_PR_InitialULRRCMessageTransfer;
|
||||
out = &pdu.choice.initiatingMessage->value.choice.InitialULRRCMessageTransfer;
|
||||
|
||||
|
||||
/* mandatory */
|
||||
/* c1. GNB_DU_UE_F1AP_ID */
|
||||
ie = (F1AP_InitialULRRCMessageTransferIEs_t *)calloc(1, sizeof(F1AP_InitialULRRCMessageTransferIEs_t));
|
||||
ie->id = F1AP_ProtocolIE_ID_id_gNB_DU_UE_F1AP_ID;
|
||||
ie->criticality = F1AP_Criticality_reject;
|
||||
ie->value.present = F1AP_InitialULRRCMessageTransferIEs__value_PR_GNB_DU_UE_F1AP_ID;
|
||||
ie->value.choice.GNB_DU_UE_F1AP_ID = f1ap_du_inst[module_idP].f1ap_ue[f1ap_uid].du_ue_f1ap_id;
|
||||
ASN_SEQUENCE_ADD(&out->protocolIEs.list, ie);
|
||||
|
||||
/* mandatory */
|
||||
/* c2. NRCGI */
|
||||
ie = (F1AP_InitialULRRCMessageTransferIEs_t *)calloc(1, sizeof(F1AP_InitialULRRCMessageTransferIEs_t));
|
||||
ie->id = F1AP_ProtocolIE_ID_id_NRCGI;
|
||||
ie->criticality = F1AP_Criticality_reject;
|
||||
ie->value.present = F1AP_InitialULRRCMessageTransferIEs__value_PR_NRCGI;
|
||||
|
||||
F1AP_NRCGI_t nRCGI;
|
||||
MCC_MNC_TO_PLMNID(f1ap_du_data->mcc[0], f1ap_du_data->mnc[0], f1ap_du_data->mnc_digit_length[0],
|
||||
&nRCGI.pLMN_Identity);
|
||||
NR_CELL_ID_TO_BIT_STRING(f1ap_du_data->nr_cellid[0], &nRCGI.nRCellIdentity);
|
||||
ie->value.choice.NRCGI = nRCGI;
|
||||
|
||||
ASN_SEQUENCE_ADD(&out->protocolIEs.list, ie);
|
||||
|
||||
/* mandatory */
|
||||
/* c3. C_RNTI */ // 16
|
||||
ie = (F1AP_InitialULRRCMessageTransferIEs_t *)calloc(1, sizeof(F1AP_InitialULRRCMessageTransferIEs_t));
|
||||
ie->id = F1AP_ProtocolIE_ID_id_C_RNTI;
|
||||
ie->criticality = F1AP_Criticality_reject;
|
||||
ie->value.present = F1AP_InitialULRRCMessageTransferIEs__value_PR_C_RNTI;
|
||||
C_RNTI_TO_BIT_STRING(rntiP, &ie->value.choice.C_RNTI);
|
||||
ASN_SEQUENCE_ADD(&out->protocolIEs.list, ie);
|
||||
|
||||
/* mandatory */
|
||||
/* c4. RRCContainer */
|
||||
ie = (F1AP_InitialULRRCMessageTransferIEs_t *)calloc(1, sizeof(F1AP_InitialULRRCMessageTransferIEs_t));
|
||||
ie->id = F1AP_ProtocolIE_ID_id_RRCContainer;
|
||||
ie->criticality = F1AP_Criticality_reject;
|
||||
ie->value.present = F1AP_InitialULRRCMessageTransferIEs__value_PR_RRCContainer;
|
||||
OCTET_STRING_fromBuf(&ie->value.choice.RRCContainer, (const char *)sduP, sdu_lenP);
|
||||
ASN_SEQUENCE_ADD(&out->protocolIEs.list, ie);
|
||||
|
||||
/* optional */
|
||||
/* c5. DUtoCURRCContainer */
|
||||
if (0) {
|
||||
ie = (F1AP_InitialULRRCMessageTransferIEs_t *)calloc(1, sizeof(F1AP_InitialULRRCMessageTransferIEs_t));
|
||||
ie->id = F1AP_ProtocolIE_ID_id_DUtoCURRCContainer;
|
||||
ie->criticality = F1AP_Criticality_reject;
|
||||
ie->value.present = F1AP_InitialULRRCMessageTransferIEs__value_PR_DUtoCURRCContainer;
|
||||
OCTET_STRING_fromBuf(&ie->value.choice.DUtoCURRCContainer, "dummy_val",
|
||||
strlen("dummy_val"));
|
||||
ASN_SEQUENCE_ADD(&out->protocolIEs.list, ie);
|
||||
}
|
||||
|
||||
/* encode */
|
||||
if (f1ap_encode_pdu(&pdu, &buffer, &len) < 0) {
|
||||
LOG_E(F1AP, "Failed to encode F1 setup request\n");
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
struct rrc_eNB_ue_context_s* ue_context_p = rrc_eNB_allocate_new_UE_context(RC.rrc[module_idP]);
|
||||
ue_context_p->ue_id_rnti = rntiP;
|
||||
ue_context_p->ue_context.rnti = rntiP;
|
||||
ue_context_p->ue_context.random_ue_identity = rntiP;
|
||||
ue_context_p->ue_context.Srb0.Active = 1;
|
||||
RB_INSERT(rrc_ue_tree_s, &RC.rrc[module_idP]->rrc_ue_head, ue_context_p);
|
||||
du_f1ap_itti_send_sctp_data_req(module_idP, f1ap_du_data->assoc_id, buffer, len, f1ap_du_data->default_sctp_stream_id);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
void init_f1ap_du_ue_inst (void) {
|
||||
|
||||
memset(f1ap_du_inst, 0, sizeof(f1ap_du_inst));
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,53 @@
|
||||
/*
|
||||
* 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
|
||||
* the OAI Public License, Version 1.1 (the "License"); you may not use this file
|
||||
* 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 f1ap_du_rrc_message_transfer.h
|
||||
* \brief f1ap rrc message transfer for DU
|
||||
* \author EURECOM/NTUST
|
||||
* \date 2018
|
||||
* \version 0.1
|
||||
* \company Eurecom
|
||||
* \email: navid.nikaein@eurecom.fr, bing-kai.hong@eurecom.fr
|
||||
* \note
|
||||
* \warning
|
||||
*/
|
||||
|
||||
|
||||
#ifndef F1AP_DU_RRC_MESSAGE_TRANSFER_H_
|
||||
#define F1AP_DU_RRC_MESSAGE_TRANSFER_H_
|
||||
|
||||
#include "f1ap_common.h"
|
||||
|
||||
int DU_handle_DL_RRC_MESSAGE_TRANSFER(instance_t instance,
|
||||
uint32_t assoc_id,
|
||||
uint32_t stream,
|
||||
F1AP_F1AP_PDU_t *pdu);
|
||||
|
||||
int DU_send_UL_RRC_MESSAGE_TRANSFER(instance_t instance, const f1ap_ul_rrc_message_t *msg);
|
||||
|
||||
int DU_send_INITIAL_UL_RRC_MESSAGE_TRANSFER(module_id_t module_idP,
|
||||
int CC_idP,
|
||||
int UE_id,
|
||||
rnti_t rntiP,
|
||||
const uint8_t *sduP,
|
||||
sdu_size_t sdu_lenP);
|
||||
|
||||
#endif /* F1AP_DU_RRC_MESSAGE_TRANSFER_H_ */
|
||||
@@ -0,0 +1,31 @@
|
||||
/*
|
||||
* 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
|
||||
* the OAI Public License, Version 1.1 (the "License"); you may not use this file
|
||||
* 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 f1ap_du_interface_management.h
|
||||
* \brief f1ap interface management for DU
|
||||
* \author EURECOM/NTUST
|
||||
* \date 2018
|
||||
* \version 0.1
|
||||
* \company Eurecom
|
||||
* \email: navid.nikaein@eurecom.fr, bing-kai.hong@eurecom.fr
|
||||
* \note
|
||||
* \warning
|
||||
*/
|
||||
@@ -0,0 +1,31 @@
|
||||
/*
|
||||
* 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
|
||||
* the OAI Public License, Version 1.1 (the "License"); you may not use this file
|
||||
* 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 f1ap_du_interface_management.h
|
||||
* \brief f1ap interface management for DU
|
||||
* \author EURECOM/NTUST
|
||||
* \date 2018
|
||||
* \version 0.1
|
||||
* \company Eurecom
|
||||
* \email: navid.nikaein@eurecom.fr, bing-kai.hong@eurecom.fr
|
||||
* \note
|
||||
* \warning
|
||||
*/
|
||||
@@ -0,0 +1,207 @@
|
||||
/*
|
||||
* 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
|
||||
* the OAI Public License, Version 1.1 (the "License"); you may not use this file
|
||||
* 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 openair2/F1AP/f1ap_du_task.c
|
||||
* \brief data structures for F1 interface modules
|
||||
* \author EURECOM/NTUST
|
||||
* \date 2018
|
||||
* \version 0.1
|
||||
* \company Eurecom
|
||||
* \email: navid.nikaein@eurecom.fr, raymond.knopp@eurecom.fr, bing-kai.hong@eurecom.fr
|
||||
* \note
|
||||
* \warning
|
||||
*/
|
||||
|
||||
#include "f1ap_common.h"
|
||||
#include "f1ap_handlers.h"
|
||||
#include "f1ap_du_interface_management.h"
|
||||
#include "f1ap_du_ue_context_management.h"
|
||||
#include "f1ap_du_rrc_message_transfer.h"
|
||||
#include "f1ap_du_task.h"
|
||||
#include "proto_agent.h"
|
||||
|
||||
extern RAN_CONTEXT_t RC;
|
||||
|
||||
f1ap_setup_req_t *f1ap_du_data;
|
||||
f1ap_cudu_inst_t f1ap_du_inst[MAX_eNB];
|
||||
|
||||
void du_task_send_sctp_association_req(instance_t instance, f1ap_setup_req_t *f1ap_setup_req) {
|
||||
|
||||
DevAssert(f1ap_setup_req != NULL);
|
||||
|
||||
MessageDef *message_p = NULL;
|
||||
sctp_new_association_req_t *sctp_new_association_req_p = NULL;
|
||||
|
||||
message_p = itti_alloc_new_message(TASK_DU_F1, SCTP_NEW_ASSOCIATION_REQ);
|
||||
|
||||
sctp_new_association_req_p = &message_p->ittiMsg.sctp_new_association_req;
|
||||
sctp_new_association_req_p->ulp_cnx_id = instance;
|
||||
sctp_new_association_req_p->port = F1AP_PORT_NUMBER;
|
||||
sctp_new_association_req_p->ppid = F1AP_SCTP_PPID;
|
||||
|
||||
sctp_new_association_req_p->in_streams = f1ap_setup_req->sctp_in_streams;
|
||||
sctp_new_association_req_p->out_streams = f1ap_setup_req->sctp_out_streams;
|
||||
|
||||
// remote
|
||||
memcpy(&sctp_new_association_req_p->remote_address,
|
||||
&f1ap_setup_req->CU_f1_ip_address,
|
||||
sizeof(f1ap_setup_req->CU_f1_ip_address));
|
||||
|
||||
// local
|
||||
memcpy(&sctp_new_association_req_p->local_address,
|
||||
&f1ap_setup_req->DU_f1_ip_address,
|
||||
sizeof(f1ap_setup_req->DU_f1_ip_address));
|
||||
|
||||
// store data
|
||||
f1ap_du_data = (f1ap_setup_req_t *)calloc(1, sizeof(f1ap_setup_req_t));
|
||||
*f1ap_du_data = *f1ap_setup_req;
|
||||
//printf("sib itti message %s\n", f1ap_setup_req_t->sib1[0]);
|
||||
|
||||
//printf("nr_cellid : %llx (%lld)",f1ap_setup_req->nr_cellid[0],f1ap_setup_req->nr_cellid[0]);
|
||||
|
||||
//du_f1ap_register_to_sctp
|
||||
itti_send_msg_to_task(TASK_SCTP, instance, message_p);
|
||||
}
|
||||
|
||||
void du_task_handle_sctp_association_resp(instance_t instance, sctp_new_association_resp_t *sctp_new_association_resp) {
|
||||
|
||||
DevAssert(sctp_new_association_resp != NULL);
|
||||
|
||||
if (sctp_new_association_resp->sctp_state != SCTP_STATE_ESTABLISHED) {
|
||||
LOG_W(F1AP, "Received unsuccessful result for SCTP association (%u), instance %d, cnx_id %u\n",
|
||||
sctp_new_association_resp->sctp_state,
|
||||
instance,
|
||||
sctp_new_association_resp->ulp_cnx_id);
|
||||
|
||||
//f1ap_handle_setup_message(instance, sctp_new_association_resp->sctp_state == SCTP_STATE_SHUTDOWN);
|
||||
return; // exit -1 for debugging
|
||||
}
|
||||
|
||||
// save the assoc id
|
||||
f1ap_du_data->assoc_id = sctp_new_association_resp->assoc_id;
|
||||
f1ap_du_data->sctp_in_streams = sctp_new_association_resp->in_streams;
|
||||
f1ap_du_data->sctp_out_streams = sctp_new_association_resp->out_streams;
|
||||
f1ap_du_data->default_sctp_stream_id = 0;
|
||||
|
||||
/* setup parameters for F1U and start the server */
|
||||
const cudu_params_t params = {
|
||||
.local_ipv4_address = RC.mac[instance]->eth_params_n.my_addr,
|
||||
.local_port = RC.mac[instance]->eth_params_n.my_portd,
|
||||
.remote_ipv4_address = RC.mac[instance]->eth_params_n.remote_addr,
|
||||
.remote_port = RC.mac[instance]->eth_params_n.remote_portd
|
||||
};
|
||||
AssertFatal(proto_agent_start(instance, ¶ms) == 0,
|
||||
"could not start PROTO_AGENT for F1U on instance %d!\n", instance);
|
||||
|
||||
DU_send_F1_SETUP_REQUEST(instance);
|
||||
}
|
||||
|
||||
void du_task_handle_sctp_data_ind(instance_t instance, sctp_data_ind_t *sctp_data_ind)
|
||||
{
|
||||
int result;
|
||||
|
||||
DevAssert(sctp_data_ind != NULL);
|
||||
|
||||
f1ap_handle_message(instance, sctp_data_ind->assoc_id, sctp_data_ind->stream,
|
||||
sctp_data_ind->buffer, sctp_data_ind->buffer_length);
|
||||
|
||||
result = itti_free(TASK_UNKNOWN, sctp_data_ind->buffer);
|
||||
AssertFatal (result == EXIT_SUCCESS, "Failed to free memory (%d)!\n", result);
|
||||
}
|
||||
|
||||
|
||||
void *F1AP_DU_task(void *arg) {
|
||||
|
||||
//sctp_cu_init();
|
||||
MessageDef *received_msg = NULL;
|
||||
int result;
|
||||
|
||||
LOG_I(F1AP, "Starting F1AP at DU\n");
|
||||
|
||||
//f1ap_eNB_prepare_internal_data();
|
||||
|
||||
itti_mark_task_ready(TASK_DU_F1);
|
||||
|
||||
// SCTP
|
||||
while (1) {
|
||||
itti_receive_msg(TASK_DU_F1, &received_msg);
|
||||
|
||||
switch (ITTI_MSG_ID(received_msg)) {
|
||||
|
||||
// case TERMINATE_MESSAGE:
|
||||
// //F1AP_WARN(" *** Exiting F1AP DU thread\n");
|
||||
// itti_exit_task();
|
||||
// break;
|
||||
|
||||
case F1AP_SETUP_REQ: // this is not a true F1 message, but rather an ITTI message sent by enb_app
|
||||
// 1. save the itti msg so that you can use it to sen f1ap_setup_req, fill the f1ap_setup_req message,
|
||||
// 2. store the message in f1ap context, that is also stored in RC
|
||||
// 2. send a sctp_association req
|
||||
LOG_I(F1AP, "DU Task Received F1AP_SETUP_REQ\n");
|
||||
du_task_send_sctp_association_req(ITTI_MESSAGE_GET_INSTANCE(received_msg),
|
||||
&F1AP_SETUP_REQ(received_msg));
|
||||
break;
|
||||
|
||||
case SCTP_NEW_ASSOCIATION_RESP:
|
||||
// 1. store the respon
|
||||
// 2. send the f1setup_req
|
||||
LOG_I(F1AP, "DU Task Received SCTP_NEW_ASSOCIATION_RESP\n");
|
||||
du_task_handle_sctp_association_resp(ITTI_MESSAGE_GET_INSTANCE(received_msg),
|
||||
&received_msg->ittiMsg.sctp_new_association_resp);
|
||||
break;
|
||||
|
||||
case SCTP_DATA_IND:
|
||||
// ex: any F1 incoming message for DU ends here
|
||||
LOG_I(F1AP, "DU Task Received SCTP_DATA_IND\n");
|
||||
du_task_handle_sctp_data_ind(ITTI_MESSAGE_GET_INSTANCE(received_msg),
|
||||
&received_msg->ittiMsg.sctp_data_ind);
|
||||
break;
|
||||
|
||||
case F1AP_UL_RRC_MESSAGE: // from rrc
|
||||
LOG_I(F1AP, "DU Task Received F1AP_UL_RRC_MESSAGE\n");
|
||||
DU_send_UL_RRC_MESSAGE_TRANSFER(ITTI_MESSAGE_GET_INSTANCE(received_msg),
|
||||
&F1AP_UL_RRC_MESSAGE(received_msg));
|
||||
break;
|
||||
|
||||
case F1AP_UE_CONTEXT_RELEASE_REQ: // from MAC
|
||||
LOG_I(F1AP, "DU Task Received F1AP_UE_CONTEXT_RELEASE_REQ\n");
|
||||
DU_send_UE_CONTEXT_RELEASE_REQUEST(ITTI_MESSAGE_GET_INSTANCE(received_msg),
|
||||
&F1AP_UE_CONTEXT_RELEASE_REQ(received_msg));
|
||||
break;
|
||||
|
||||
case TERMINATE_MESSAGE:
|
||||
LOG_W(F1AP, " *** Exiting F1AP thread\n");
|
||||
itti_exit_task();
|
||||
break;
|
||||
|
||||
default:
|
||||
LOG_E(F1AP, "DU Received unhandled message: %d:%s\n",
|
||||
ITTI_MSG_ID(received_msg), ITTI_MSG_NAME(received_msg));
|
||||
break;
|
||||
} // switch
|
||||
result = itti_free (ITTI_MSG_ORIGIN_ID(received_msg), received_msg);
|
||||
AssertFatal (result == EXIT_SUCCESS, "Failed to free memory (%d)!\n", result);
|
||||
|
||||
received_msg = NULL;
|
||||
} // while
|
||||
|
||||
return NULL;
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
/*
|
||||
* 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
|
||||
* the OAI Public License, Version 1.1 (the "License"); you may not use this file
|
||||
* 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
|
||||
*/
|
||||
|
||||
#ifndef F1AP_DU_TASK_H_
|
||||
#define F1AP_DU_TASK_H_
|
||||
|
||||
void du_task_send_sctp_association_req(instance_t instance, f1ap_setup_req_t *f1ap_setup_req);
|
||||
void du_task_handle_sctp_association_resp(instance_t instance, sctp_new_association_resp_t *sctp_new_association_resp);
|
||||
void du_task_handle_sctp_data_ind(instance_t instance, sctp_data_ind_t *sctp_data_ind);
|
||||
void *F1AP_DU_task(void *arg);
|
||||
|
||||
#endif /* F1AP_DU_TASK_H_ */
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,97 @@
|
||||
/*
|
||||
* 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
|
||||
* the OAI Public License, Version 1.1 (the "License"); you may not use this file
|
||||
* 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 f1ap_du_ue_context_management.h
|
||||
* \brief f1ap ue context management for DU
|
||||
* \author EURECOM/NTUST
|
||||
* \date 2018
|
||||
* \version 0.1
|
||||
* \company Eurecom
|
||||
* \email: navid.nikaein@eurecom.fr, bing-kai.hong@eurecom.fr
|
||||
* \note
|
||||
* \warning
|
||||
*/
|
||||
|
||||
#ifndef F1AP_DU_UE_CONTEXT_MANAGEMENT_H_
|
||||
#define F1AP_DU_UE_CONTEXT_MANAGEMENT_H_
|
||||
|
||||
/*
|
||||
* UE Context Setup
|
||||
*/
|
||||
int DU_handle_UE_CONTEXT_SETUP_REQUEST(instance_t instance,
|
||||
uint32_t assoc_id,
|
||||
uint32_t stream,
|
||||
F1AP_F1AP_PDU_t *pdu);
|
||||
int DU_send_UE_CONTEXT_SETUP_RESPONSE(instance_t instance);
|
||||
int DU_send_UE_CONTEXT_SETUP_FAILURE(instance_t instance);
|
||||
|
||||
|
||||
/*
|
||||
* UE Context Release Request (gNB-DU initiated)
|
||||
*/
|
||||
int DU_send_UE_CONTEXT_RELEASE_REQUEST(instance_t instance,
|
||||
f1ap_ue_context_release_req_t *req);
|
||||
|
||||
|
||||
/*
|
||||
* UE Context Release Command (gNB-CU initiated)
|
||||
*/
|
||||
int DU_handle_UE_CONTEXT_RELEASE_COMMAND(instance_t instance,
|
||||
uint32_t assoc_id,
|
||||
uint32_t stream,
|
||||
F1AP_F1AP_PDU_t *pdu);
|
||||
|
||||
/*
|
||||
* UE Context Release Complete (gNB-DU initiated)
|
||||
*/
|
||||
int DU_send_UE_CONTEXT_RELEASE_COMPLETE(instance_t instance,
|
||||
f1ap_ue_context_release_cplt_t *cplt);
|
||||
|
||||
|
||||
/*
|
||||
* UE Context Modification (gNB-CU initiated)
|
||||
*/
|
||||
int DU_handle_UE_CONTEXT_MODIFICATION_REQUEST(instance_t instance,
|
||||
uint32_t assoc_id,
|
||||
uint32_t stream,
|
||||
F1AP_F1AP_PDU_t *pdu);
|
||||
int DU_send_UE_CONTEXT_MODIFICATION_RESPONSE(instance_t instance);
|
||||
int DU_send_UE_CONTEXT_MODIFICATION_FAILURE(instance_t instance);
|
||||
|
||||
|
||||
/*
|
||||
* UE Context Modification Required (gNB-DU initiated)
|
||||
*/
|
||||
int DU_send_UE_CONTEXT_MODIFICATION_REQUIRED(instance_t instance);
|
||||
int DU_handle_UE_CONTEXT_MODIFICATION_CONFIRM(instance_t instance,
|
||||
uint32_t assoc_id,
|
||||
uint32_t stream,
|
||||
F1AP_F1AP_PDU_t *pdu);
|
||||
|
||||
/*
|
||||
* UE Inactivity Notification
|
||||
*/
|
||||
|
||||
/*
|
||||
* Notify
|
||||
*/
|
||||
|
||||
#endif /* F1AP_DU_UE_CONTEXT_MANAGEMENT_H_ */
|
||||
@@ -0,0 +1,31 @@
|
||||
/*
|
||||
* 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
|
||||
* the OAI Public License, Version 1.1 (the "License"); you may not use this file
|
||||
* 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 f1ap_du_interface_management.h
|
||||
* \brief f1ap interface management for DU
|
||||
* \author EURECOM/NTUST
|
||||
* \date 2018
|
||||
* \version 0.1
|
||||
* \company Eurecom
|
||||
* \email: navid.nikaein@eurecom.fr, bing-kai.hong@eurecom.fr
|
||||
* \note
|
||||
* \warning
|
||||
*/
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user