Commit 4d5334ae authored by Vaibhav Shrivastava's avatar Vaibhav Shrivastava

Merge issue_19 and sidl_uplift_5G_Oai4Test_Delivery branch into 4G_5G_Merge...

Merge issue_19 and sidl_uplift_5G_Oai4Test_Delivery branch into 4G_5G_Merge branch and Create Unified 4G 5G Branch
parent b5ca6f71
...@@ -217,6 +217,17 @@ gNBs = ...@@ -217,6 +217,17 @@ gNBs =
} }
); );
# IP Address and port numbers for System Simulator
SSConfig = (
{
hostIp = "127.0.0.1"; #Host IP for System Simulator
Sys_port = 7777; #Port Number for System Simulator Sys Port
Srb_port = 7778; #Port Number for System Simulator Srb Port
Vng_port = 7779; #Port Number for System Simulator VNG Port
SSMode = 2; #SSMode: 0 - eNB , 1- SYS_PORT test , 2- Only SRB_PORT test
}
);
MACRLCs = ( MACRLCs = (
{ {
num_cc = 1; num_cc = 1;
......
...@@ -2,9 +2,13 @@ log_config = { ...@@ -2,9 +2,13 @@ log_config = {
global_log_level ="info"; global_log_level ="info";
hw_log_level ="info"; hw_log_level ="info";
phy_log_level ="info"; phy_log_level ="info";
mac_log_level ="info"; mac_log_level ="debug";
rlc_log_level ="info"; nr_mac_log_level ="debug";
pdcp_log_level ="info"; rlc_log_level ="debug";
nr_rlc_log_level ="debug";
pdcp_log_level ="debug";
nr_pdcp_log_level ="debug";
nr_rrc_log_level ="info";
rrc_log_level ="info"; rrc_log_level ="info";
}; };
......
...@@ -194,7 +194,7 @@ MACRLCs = ( ...@@ -194,7 +194,7 @@ MACRLCs = (
remote_s_portd = 50010; remote_s_portd = 50010;
tr_s_preference = "nfapi"; tr_s_preference = "nfapi";
tr_n_preference = "local_RRC"; tr_n_preference = "local_RRC";
#scheduler_mode = "fairRR"; #scheduler_mode = "fairRR";
} }
); );
...@@ -209,7 +209,7 @@ THREAD_STRUCT = ( ...@@ -209,7 +209,7 @@ THREAD_STRUCT = (
log_config = log_config =
{ {
global_log_level ="warn"; global_log_level ="debug";
global_log_verbosity ="low"; global_log_verbosity ="low";
hw_log_level ="error"; hw_log_level ="error";
hw_log_verbosity ="low"; hw_log_verbosity ="low";
......
...@@ -2080,6 +2080,7 @@ set(SS_SRC ...@@ -2080,6 +2080,7 @@ set(SS_SRC
${OPENAIR3_DIR}/SS/ss_eNB_vtp_task.c ${OPENAIR3_DIR}/SS/ss_eNB_vtp_task.c
${OPENAIR3_DIR}/SS/ss_eNB_drb_task.c ${OPENAIR3_DIR}/SS/ss_eNB_drb_task.c
${OPENAIR3_DIR}/SS/ss_eNB_vt_timer_task.c ${OPENAIR3_DIR}/SS/ss_eNB_vt_timer_task.c
${OPENAIR3_DIR}/SS/ss_gNB_srb_task.c
) )
file(GLOB ss_sidl ${SIDL_CMPLR}/src/*.c) file(GLOB ss_sidl ${SIDL_CMPLR}/src/*.c)
file(GLOB ss_acp ${SIDL_DIR}/acp/src/*.c) file(GLOB ss_acp ${SIDL_DIR}/acp/src/*.c)
...@@ -2761,6 +2762,9 @@ target_link_libraries (lte-uesoftmodem ${T_LIB}) ...@@ -2761,6 +2762,9 @@ target_link_libraries (lte-uesoftmodem ${T_LIB})
# nr-softmodem # nr-softmodem
################################################### ###################################################
add_boolean_option(NR_ENABLE False "Flag for NR compilation")
Message("NR_ENABLE flag is ${NR_ENABLE}")
add_executable(nr-softmodem add_executable(nr-softmodem
${rrc_h} ${rrc_h}
${nr_rrc_h} ${nr_rrc_h}
...@@ -2788,8 +2792,8 @@ add_executable(nr-softmodem ...@@ -2788,8 +2792,8 @@ add_executable(nr-softmodem
target_link_libraries (nr-softmodem target_link_libraries (nr-softmodem
-Wl,--start-group -Wl,--start-group
UTIL HASHTABLE SCTP_CLIENT UDP SCHED_LIB SCHED_RU_LIB SCHED_NR_LIB PHY_NR PHY PHY_COMMON PHY_NR_COMMON PHY_RU LFDS GTPV1U SECU_CN SECU_OSA UTIL HASHTABLE SCTP_CLIENT SS_SERVER SCHED_LIB SCHED_RU_LIB SCHED_NR_LIB PHY_NR PHY PHY_COMMON PHY_NR_COMMON PHY_RU LFDS GTPV1U SECU_CN SECU_OSA
ITTI ${FLPT_MSG_LIB} ${ASYNC_IF_LIB} ${FLEXRAN_AGENT_LIB} LFDS7 ${MSC_LIB} ${RAL_LIB} ${NAS_UE_LIB} RRC_LIB NR_RRC_LIB ITTI ${FLPT_MSG_LIB} ${ASYNC_IF_LIB} ${FLEXRAN_AGENT_LIB} LFDS7 ${RAL_LIB} ${NAS_UE_LIB} RRC_LIB NR_RRC_LIB
NGAP_LIB NGAP_GNB S1AP_LIB S1AP_ENB L2_LTE_NR L2_NR MAC_NR_COMMON NFAPI_COMMON_LIB NFAPI_LIB NFAPI_VNF_LIB NFAPI_PNF_LIB NFAPI_USER_LIB NGAP_LIB NGAP_GNB S1AP_LIB S1AP_ENB L2_LTE_NR L2_NR MAC_NR_COMMON NFAPI_COMMON_LIB NFAPI_LIB NFAPI_VNF_LIB NFAPI_PNF_LIB NFAPI_USER_LIB
X2AP_LIB X2AP_ENB F1AP_LIB F1AP M2AP_LIB M2AP_ENB M3AP_LIB M3AP_ENB ${FSPT_MSG_LIB} X2AP_LIB X2AP_ENB F1AP_LIB F1AP M2AP_LIB M2AP_ENB M3AP_LIB M3AP_ENB ${FSPT_MSG_LIB}
-Wl,--end-group z dl) -Wl,--end-group z dl)
......
...@@ -80,6 +80,7 @@ unsigned short config_frames[4] = {2,9,11,13}; ...@@ -80,6 +80,7 @@ unsigned short config_frames[4] = {2,9,11,13};
#include "gnb_paramdef.h" #include "gnb_paramdef.h"
#include <openair3/ocp-gtpu/gtp_itf.h> #include <openair3/ocp-gtpu/gtp_itf.h>
#include "nfapi/oai_integration/vendor_ext.h" #include "nfapi/oai_integration/vendor_ext.h"
#include "ss_gNB_srb_task.h"
pthread_cond_t nfapi_sync_cond; pthread_cond_t nfapi_sync_cond;
pthread_mutex_t nfapi_sync_mutex; pthread_mutex_t nfapi_sync_mutex;
...@@ -352,6 +353,11 @@ int create_gNB_tasks(uint32_t gnb_nb) { ...@@ -352,6 +353,11 @@ int create_gNB_tasks(uint32_t gnb_nb) {
return -1; return -1;
} }
if(itti_create_task(TASK_SS_SRB, ss_gNB_srb_task, NULL) < 0) {
LOG_E(SCTP, "Create task for SS SRB failed\n");
return -1;
}
LOG_I(NR_RRC,"Creating NR RRC gNB Task\n"); LOG_I(NR_RRC,"Creating NR RRC gNB Task\n");
if (itti_create_task (TASK_RRC_GNB, rrc_gnb_task, NULL) < 0) { if (itti_create_task (TASK_RRC_GNB, rrc_gnb_task, NULL) < 0) {
......
...@@ -273,6 +273,8 @@ static void process_queued_nr_nfapi_msgs(NR_UE_MAC_INST_t *mac, int sfn_slot) ...@@ -273,6 +273,8 @@ static void process_queued_nr_nfapi_msgs(NR_UE_MAC_INST_t *mac, int sfn_slot)
if (dl_tti_request) if (dl_tti_request)
{ {
int dl_tti_sfn_slot = NFAPI_SFNSLOT2HEX(dl_tti_request->SFN, dl_tti_request->Slot); int dl_tti_sfn_slot = NFAPI_SFNSLOT2HEX(dl_tti_request->SFN, dl_tti_request->Slot);
LOG_A(NR_MAC, "[%d %d] sfn/slot dl_tti_request received \n",
NFAPI_SFNSLOT2SFN(dl_tti_sfn_slot), NFAPI_SFNSLOT2SLOT(dl_tti_sfn_slot));
nfapi_nr_tx_data_request_t *tx_data_request = unqueue_matching(&nr_tx_req_queue, MAX_QUEUE_SIZE, sfn_slot_matcher, &dl_tti_sfn_slot); nfapi_nr_tx_data_request_t *tx_data_request = unqueue_matching(&nr_tx_req_queue, MAX_QUEUE_SIZE, sfn_slot_matcher, &dl_tti_sfn_slot);
if (!tx_data_request) if (!tx_data_request)
{ {
...@@ -338,6 +340,26 @@ static void check_nr_prach(NR_UE_MAC_INST_t *mac, nr_uplink_indication_t *ul_inf ...@@ -338,6 +340,26 @@ static void check_nr_prach(NR_UE_MAC_INST_t *mac, nr_uplink_indication_t *ul_inf
} }
} }
static void send_vt_slot_ack(nfapi_ue_slot_indication_vt_t *vt_ue_slot_ind, uint16_t sfn_slot)
{
/** Send VT ACK for SLOT */
if ( NULL != vt_ue_slot_ind)
{
LOG_D(NR_MAC, "Sfn [%d] Slot [%d] from %s\n", NFAPI_SFNSLOT2SFN(sfn_slot),
NFAPI_SFNSLOT2SLOT(sfn_slot), __FUNCTION__);
NR_UL_IND_t ul_info = {
.vt_ue_slot_ind = *vt_ue_slot_ind,
};
check_and_process_slot_ind(vt_ue_slot_ind, NFAPI_SFNSLOT2SFN(sfn_slot), NFAPI_SFNSLOT2SLOT(sfn_slot) );
send_nsa_standalone_msg(&ul_info, vt_ue_slot_ind->header.message_id);
ul_info.vt_ue_slot_ind.sfn = 0;
ul_info.vt_ue_slot_ind.slot = 0;
} else {
LOG_D(NR_MAC, "VT is NULL\n");
}
}
static void *NRUE_phy_stub_standalone_pnf_task(void *arg) static void *NRUE_phy_stub_standalone_pnf_task(void *arg)
{ {
LOG_I(MAC, "Clearing Queues\n"); LOG_I(MAC, "Clearing Queues\n");
...@@ -373,6 +395,7 @@ static void *NRUE_phy_stub_standalone_pnf_task(void *arg) ...@@ -373,6 +395,7 @@ static void *NRUE_phy_stub_standalone_pnf_task(void *arg)
LOG_E(NR_MAC, "sem_wait() error\n"); LOG_E(NR_MAC, "sem_wait() error\n");
abort(); abort();
} }
uint16_t *slot_ind = get_queue(&nr_sfn_slot_queue); uint16_t *slot_ind = get_queue(&nr_sfn_slot_queue);
nr_phy_channel_params_t *ch_info = get_queue(&nr_chan_param_queue); nr_phy_channel_params_t *ch_info = get_queue(&nr_chan_param_queue);
if (!slot_ind && !ch_info) if (!slot_ind && !ch_info)
...@@ -381,6 +404,10 @@ static void *NRUE_phy_stub_standalone_pnf_task(void *arg) ...@@ -381,6 +404,10 @@ static void *NRUE_phy_stub_standalone_pnf_task(void *arg)
continue; continue;
} }
if (slot_ind) { if (slot_ind) {
frame_t frame = NFAPI_SFNSLOT2SFN(sfn_slot);
int slot = NFAPI_SFNSLOT2SLOT(sfn_slot);
LOG_A(NR_MAC, "The received sfn/slot [%d %d] from proxy\n",
frame, slot);
sfn_slot = *slot_ind; sfn_slot = *slot_ind;
free_and_zero(slot_ind); free_and_zero(slot_ind);
} }
...@@ -389,18 +416,24 @@ static void *NRUE_phy_stub_standalone_pnf_task(void *arg) ...@@ -389,18 +416,24 @@ static void *NRUE_phy_stub_standalone_pnf_task(void *arg)
free_and_zero(ch_info); free_and_zero(ch_info);
} }
frame_t frame = NFAPI_SFNSLOT2SFN(sfn_slot); #if 1
struct timespec rqtp, rmtp;
rqtp.tv_sec = 2 / 1000;
rqtp.tv_nsec = 1e6 * (2 % 1000);
nanosleep(&rqtp, &rmtp);
#endif
frame_t frame = NFAPI_SFNSLOT2SFN(sfn_slot);
int slot = NFAPI_SFNSLOT2SLOT(sfn_slot); int slot = NFAPI_SFNSLOT2SLOT(sfn_slot);
if (sfn_slot == last_sfn_slot) if (sfn_slot == last_sfn_slot)
{ {
LOG_D(NR_MAC, "repeated sfn_sf = %d.%d\n", LOG_A(NR_MAC, "repeated sfn_sf = %d.%d\n",
frame, slot); frame, slot);
continue; continue;
} }
last_sfn_slot = sfn_slot; last_sfn_slot = sfn_slot;
LOG_D(NR_MAC, "The received sfn/slot [%d %d] from proxy\n",
frame, slot);
if (get_softmodem_params()->sa && mac->mib == NULL) if (get_softmodem_params()->sa && mac->mib == NULL)
{ {
...@@ -411,6 +444,8 @@ static void *NRUE_phy_stub_standalone_pnf_task(void *arg) ...@@ -411,6 +444,8 @@ static void *NRUE_phy_stub_standalone_pnf_task(void *arg)
if (mac->scc == NULL && mac->scc_SIB == NULL) if (mac->scc == NULL && mac->scc_SIB == NULL)
{ {
LOG_D(MAC, "[NSA] mac->scc == NULL and [SA] mac->scc_SIB == NULL!\n"); LOG_D(MAC, "[NSA] mac->scc == NULL and [SA] mac->scc_SIB == NULL!\n");
if (1 /** MODE == VT */)
send_vt_slot_ack(vt_ue_slot_ind, sfn_slot);
continue; continue;
} }
...@@ -446,6 +481,7 @@ static void *NRUE_phy_stub_standalone_pnf_task(void *arg) ...@@ -446,6 +481,7 @@ static void *NRUE_phy_stub_standalone_pnf_task(void *arg)
mac->scc_SIB->tdd_UL_DL_ConfigurationCommon, mac->scc_SIB->tdd_UL_DL_ConfigurationCommon,
ul_info.slot_rx)) ul_info.slot_rx))
{ {
LOG_D(NR_MAC, "slot_ind frame %d Slot %d. calling nr_ue_dl_ind() and nr_ue_dl_indication() from %s\n", ul_info.frame_rx, ul_info.slot_rx, __FUNCTION__);
nr_ue_dl_indication(&mac->dl_info, &ul_time_alignment); nr_ue_dl_indication(&mac->dl_info, &ul_time_alignment);
} }
...@@ -469,21 +505,8 @@ static void *NRUE_phy_stub_standalone_pnf_task(void *arg) ...@@ -469,21 +505,8 @@ static void *NRUE_phy_stub_standalone_pnf_task(void *arg)
pdcp_run(&ctxt); pdcp_run(&ctxt);
} }
process_queued_nr_nfapi_msgs(mac, sfn_slot); process_queued_nr_nfapi_msgs(mac, sfn_slot);
if (1 /** MODE == VT */)
/** Send VT ACK for SLOT */ send_vt_slot_ack(vt_ue_slot_ind, sfn_slot);
if ( 1 /** FIXME: UE is SS mode */ && vt_ue_slot_ind)
{
LOG_D(NR_MAC, "Sfn [%d] Slot [%d] from %s\n", NFAPI_SFNSLOT2SFN(sfn_slot),
NFAPI_SFNSLOT2SLOT(sfn_slot), __FUNCTION__);
NR_UL_IND_t ul_info = {
.vt_ue_slot_ind = *vt_ue_slot_ind,
};
check_and_process_slot_ind(vt_ue_slot_ind, NFAPI_SFNSLOT2SFN(sfn_slot), NFAPI_SFNSLOT2SLOT(sfn_slot) );
send_nsa_standalone_msg(&ul_info, vt_ue_slot_ind->header.message_id);
ul_info.vt_ue_slot_ind.sfn = 0;
ul_info.vt_ue_slot_ind.slot = 0;
}
} }
return NULL; return NULL;
} }
......
...@@ -1724,7 +1724,7 @@ int start_resp_cb(nfapi_vnf_config_t *config, int p5_idx, nfapi_start_response_t ...@@ -1724,7 +1724,7 @@ int start_resp_cb(nfapi_vnf_config_t *config, int p5_idx, nfapi_start_response_t
for(int i=0; i < pnf->num_phys; i++ ) for(int i=0; i < pnf->num_phys; i++ )
{ {
nfapi_vnf_p7_add_pnf((p7_vnf->config), remote_addr, (int)port, phy->id); nfapi_vnf_p7_add_pnf((p7_vnf->config), remote_addr, (int)port, phy->id);
LOG_D(NFAPI_VNF, "MultiCell: fxn:%s phy_id added:%d\n", p5_idx, resp->header.phy_id); LOG_D(NFAPI_VNF, "MultiCell: fxn:%d phy_id added:%d\n", p5_idx, resp->header.phy_id);
phy +=1; phy +=1;
} }
free(remote_addr); free(remote_addr);
......
...@@ -2729,7 +2729,13 @@ typedef struct { ...@@ -2729,7 +2729,13 @@ typedef struct {
} nfapi_cqi_indication_rel8_t; } nfapi_cqi_indication_rel8_t;
#define NFAPI_CQI_INDICATION_REL8_TAG 0x202f #define NFAPI_CQI_INDICATION_REL8_TAG 0x202f
#define NFAPI_CC_MAX MAX_NUM_CCs //#define NFAPI_CC_MAX MAX_NUM_CCs
#ifndef MAX_NUM_CCs
#define NFAPI_CC_MAX 1
#else
#define NFAPI_CC_MAX MAX_NUM_CCs
#endif
typedef struct { typedef struct {
nfapi_tl_t tl; nfapi_tl_t tl;
uint16_t length; uint16_t length;
......
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
#define _NFAPI_NR_INTERFACE_H_ #define _NFAPI_NR_INTERFACE_H_
#include "nfapi_interface.h" #include "nfapi_interface.h"
#include "nfapi/open-nFAPI/nfapi/public_inc/nfapi_nr_interface_scf.h" #include "nfapi_nr_interface_scf.h"
#define NFAPI_NR_MAX_NB_CCE_AGGREGATION_LEVELS 5 #define NFAPI_NR_MAX_NB_CCE_AGGREGATION_LEVELS 5
#define NFAPI_NR_MAX_NB_TCI_STATES_PDCCH 64 #define NFAPI_NR_MAX_NB_TCI_STATES_PDCCH 64
......
...@@ -3416,6 +3416,7 @@ int nfapi_nr_p7_message_pack(void *pMessageBuf, void *pPackedBuf, uint32_t packe ...@@ -3416,6 +3416,7 @@ int nfapi_nr_p7_message_pack(void *pMessageBuf, void *pPackedBuf, uint32_t packe
case NFAPI_NR_PHY_MSG_TYPE_SLOT_INDICATION: case NFAPI_NR_PHY_MSG_TYPE_SLOT_INDICATION:
result = pack_nr_slot_indication(pMessageHeader, &pWritePackedMessage, end, config); result = pack_nr_slot_indication(pMessageHeader, &pWritePackedMessage, end, config);
break;
case NFAPI_NR_PHY_MSG_TYPE_RX_DATA_INDICATION: case NFAPI_NR_PHY_MSG_TYPE_RX_DATA_INDICATION:
result = pack_nr_rx_data_indication(pMessageHeader, &pWritePackedMessage, end, config); result = pack_nr_rx_data_indication(pMessageHeader, &pWritePackedMessage, end, config);
......
...@@ -37,12 +37,17 @@ MESSAGE_DEF(SS_REQ_PDCP_CNT, MESSAGE_PRIORITY_MED, ss_req_pdcp_ ...@@ -37,12 +37,17 @@ MESSAGE_DEF(SS_REQ_PDCP_CNT, MESSAGE_PRIORITY_MED, ss_req_pdcp_
MESSAGE_DEF(SS_VNG_PROXY_REQ, MESSAGE_PRIORITY_MED, ss_vng_proxy_req_t , ss_vng_proxy_req) MESSAGE_DEF(SS_VNG_PROXY_REQ, MESSAGE_PRIORITY_MED, ss_vng_proxy_req_t , ss_vng_proxy_req)
MESSAGE_DEF(SS_VNG_PROXY_RESP, MESSAGE_PRIORITY_MED, ss_vng_proxy_resp_t , ss_vng_proxy_resp) MESSAGE_DEF(SS_VNG_PROXY_RESP, MESSAGE_PRIORITY_MED, ss_vng_proxy_resp_t , ss_vng_proxy_resp)
MESSAGE_DEF(SS_SS_PAGING_IND, MESSAGE_PRIORITY_MED, ss_paging_ind_t , ss_paging_ind)
MESSAGE_DEF(SS_NRRRC_PDU_REQ, MESSAGE_PRIORITY_MED, ss_nrrrc_pdu_req_t , ss_nrrrc_pdu_req)
MESSAGE_DEF(SS_NRRRC_PDU_IND, MESSAGE_PRIORITY_MED, ss_nrrrc_pdu_ind_t , ss_nrrrc_pdu_ind)
MESSAGE_DEF(SS_VTP_PROXY_UPD, MESSAGE_PRIORITY_MED, ss_vtp_proxy_upd_t , ss_vtp_proxy_upd) MESSAGE_DEF(SS_VTP_PROXY_UPD, MESSAGE_PRIORITY_MED, ss_vtp_proxy_upd_t , ss_vtp_proxy_upd)
MESSAGE_DEF(SS_VTP_PROXY_ACK, MESSAGE_PRIORITY_MED, ss_vtp_proxy_ack_t , ss_vtp_proxy_ack) MESSAGE_DEF(SS_VTP_PROXY_ACK, MESSAGE_PRIORITY_MED, ss_vtp_proxy_ack_t , ss_vtp_proxy_ack)
MESSAGE_DEF(SS_VT_TIME_OUT, MESSAGE_PRIORITY_MED, ss_vt_time_out_t , ss_vt_time_out) MESSAGE_DEF(SS_VT_TIME_OUT, MESSAGE_PRIORITY_MED, ss_vt_time_out_t , ss_vt_time_out)
MESSAGE_DEF(SS_SS_PAGING_IND, MESSAGE_PRIORITY_MED, ss_paging_ind_t , ss_paging_ind)
MESSAGE_DEF(SS_L1MACIND_CTRL, MESSAGE_PRIORITY_MED, ss_l1macind_ctrl_t , ss_l1macind_ctrl) MESSAGE_DEF(SS_L1MACIND_CTRL, MESSAGE_PRIORITY_MED, ss_l1macind_ctrl_t , ss_l1macind_ctrl)
MESSAGE_DEF(SS_SYSTEM_IND, MESSAGE_PRIORITY_MED, ss_system_ind_t , ss_system_ind) MESSAGE_DEF(SS_SYSTEM_IND, MESSAGE_PRIORITY_MED, ss_system_ind_t , ss_system_ind)
...@@ -38,6 +38,8 @@ ...@@ -38,6 +38,8 @@
#define SS_RRC_PDU_REQ(mSGpTR) (mSGpTR)->ittiMsg.ss_rrc_pdu_req #define SS_RRC_PDU_REQ(mSGpTR) (mSGpTR)->ittiMsg.ss_rrc_pdu_req
#define SS_RRC_PDU_IND(mSGpTR) (mSGpTR)->ittiMsg.ss_rrc_pdu_ind #define SS_RRC_PDU_IND(mSGpTR) (mSGpTR)->ittiMsg.ss_rrc_pdu_ind
#define SS_NRRRC_PDU_REQ(mSGpTR) (mSGpTR)->ittiMsg.ss_nrrrc_pdu_req
#define SS_NRRRC_PDU_IND(mSGpTR) (mSGpTR)->ittiMsg.ss_nrrrc_pdu_ind
#define SS_SYS_PROXY_MSG_CNF(mSGpTR) (mSGpTR)->ittiMsg.udp_data_ind #define SS_SYS_PROXY_MSG_CNF(mSGpTR) (mSGpTR)->ittiMsg.udp_data_ind
#define SS_PAGING_IND(mSGpTR) (mSGpTR)->ittiMsg.ss_paging_ind #define SS_PAGING_IND(mSGpTR) (mSGpTR)->ittiMsg.ss_paging_ind
#define SS_L1MACIND_CTRL(mSGpTR) (mSGpTR)->ittiMsg.ss_l1macind_ctrl #define SS_L1MACIND_CTRL(mSGpTR) (mSGpTR)->ittiMsg.ss_l1macind_ctrl
...@@ -59,6 +61,10 @@ ...@@ -59,6 +61,10 @@
/** SYS IND */ /** SYS IND */
#define SS_SYSTEM_IND(mSGpTR) (mSGpTR)->ittiMsg.ss_system_ind #define SS_SYSTEM_IND(mSGpTR) (mSGpTR)->ittiMsg.ss_system_ind
/** NR SRB */
#define SS_RRC_PDU_REQ(mSGpTR) (mSGpTR)->ittiMsg.ss_rrc_pdu_req
#define SS_RRC_PDU_IND(mSGpTR) (mSGpTR)->ittiMsg.ss_rrc_pdu_ind
/** PORTMAN */ /** PORTMAN */
typedef struct ss_sys_port_msg_ind { typedef struct ss_sys_port_msg_ind {
struct SYSTEM_CTRL_REQ* req; struct SYSTEM_CTRL_REQ* req;
...@@ -130,7 +136,7 @@ typedef struct ss_l1macind_ctrl_s { ...@@ -130,7 +136,7 @@ typedef struct ss_l1macind_ctrl_s {
bool rachpreamble_enable; bool rachpreamble_enable;
} ss_l1macind_ctrl_t; } ss_l1macind_ctrl_t;
/** SRB */ /** LTE SRB */
typedef struct ss_rrc_pdu_req_s { typedef struct ss_rrc_pdu_req_s {
uint8_t srb_id; uint8_t srb_id;
uint32_t sdu_size; uint32_t sdu_size;
...@@ -147,6 +153,23 @@ typedef struct ss_rrc_pdu_ind_s { ...@@ -147,6 +153,23 @@ typedef struct ss_rrc_pdu_ind_s {
sub_frame_t subframe; /*!< \brief LTE sub frame number.*/ sub_frame_t subframe; /*!< \brief LTE sub frame number.*/
} ss_rrc_pdu_ind_t; } ss_rrc_pdu_ind_t;
/** NR SRB */
typedef struct ss_nrrrc_pdu_req_s {
uint8_t srb_id;
uint32_t sdu_size;
uint8_t sdu[SDU_SIZE];
uint16_t rnti;
} ss_nrrrc_pdu_req_t;
typedef struct ss_nrrrc_pdu_ind_s {
uint8_t srb_id;
uint32_t sdu_size;
uint8_t sdu[SDU_SIZE];
uint16_t rnti;
frame_t frame; /*!< \brief NR frame number.*/
sub_frame_t subframe; /*!< \brief NR sub frame number.*/
} ss_nrrrc_pdu_ind_t;
/** VNG */ /** VNG */
typedef struct ss_vng_proxy_resp_s { typedef struct ss_vng_proxy_resp_s {
......
...@@ -158,6 +158,8 @@ void *gNB_app_task(void *args_p) ...@@ -158,6 +158,8 @@ void *gNB_app_task(void *args_p)
if (RC.nb_nr_macrlc_inst>0) RCconfig_nr_macrlc(); if (RC.nb_nr_macrlc_inst>0) RCconfig_nr_macrlc();
RCconfig_nr_ssparam();
LOG_I(PHY, "%s() RC.nb_nr_L1_inst:%d\n", __FUNCTION__, RC.nb_nr_L1_inst); LOG_I(PHY, "%s() RC.nb_nr_L1_inst:%d\n", __FUNCTION__, RC.nb_nr_L1_inst);
if (RC.nb_nr_L1_inst>0) AssertFatal(l1_north_init_gNB()==0,"could not initialize L1 north interface\n"); if (RC.nb_nr_L1_inst>0) AssertFatal(l1_north_init_gNB()==0,"could not initialize L1 north interface\n");
......
...@@ -721,6 +721,22 @@ void RCconfig_NR_L1(void) { ...@@ -721,6 +721,22 @@ void RCconfig_NR_L1(void) {
} }
} }
void RCconfig_nr_ssparam(void) {
paramdef_t SSConfig_Params[] = GNB_SSPARAMS_DESC;
paramlist_def_t SSConfig_ParamList = {CONFIG_SS,NULL,0};
config_getlist( &SSConfig_ParamList,SSConfig_Params,sizeof(SSConfig_Params)/sizeof(paramdef_t), NULL);
if ( SSConfig_ParamList.numelt > 0) {
RC.ss.hostIp = strdup(*(SSConfig_ParamList.paramarray[0][CONFIG_SS_HOSTIP_IDX].strptr));
RC.ss.Sysport = *(SSConfig_ParamList.paramarray[0][CONFIG_SS_SYSPORT_IDX].iptr);
RC.ss.Srbport = *(SSConfig_ParamList.paramarray[0][CONFIG_SS_SRBPORT_IDX].iptr);
RC.ss.Vngport = *(SSConfig_ParamList.paramarray[0][CONFIG_SS_VNGPORT_IDX].iptr);
RC.ss.mode = *(SSConfig_ParamList.paramarray[0][CONFIG_SS_MODE_IDX].iptr);
}
LOG_A(GNB_APP,"SS_Config:SSMode %d, hostIp=%s, Sysport=%d, Srbport=%d Vngport=%d\n",
RC.ss.mode, RC.ss.hostIp,RC.ss.Sysport,RC.ss.Srbport,RC.ss.Vngport);
}
void RCconfig_nr_macrlc() { void RCconfig_nr_macrlc() {
int j; int j;
...@@ -2182,6 +2198,7 @@ void nr_read_config_and_init(void) { ...@@ -2182,6 +2198,7 @@ void nr_read_config_and_init(void) {
RCconfig_NR_L1(); RCconfig_NR_L1();
set_node_type(); set_node_type();
RCconfig_nr_macrlc(); RCconfig_nr_macrlc();
RCconfig_nr_ssparam();
LOG_I(PHY, "%s() RC.nb_nr_L1_inst:%d\n", __FUNCTION__, RC.nb_nr_L1_inst); LOG_I(PHY, "%s() RC.nb_nr_L1_inst:%d\n", __FUNCTION__, RC.nb_nr_L1_inst);
......
...@@ -93,6 +93,7 @@ typedef struct ru_config_s { ...@@ -93,6 +93,7 @@ typedef struct ru_config_s {
extern void NRRCconfig_RU(void); extern void NRRCconfig_RU(void);
extern void RCconfig_nr_flexran(void); extern void RCconfig_nr_flexran(void);
extern void RCconfig_NR_L1(void); extern void RCconfig_NR_L1(void);
extern void RCconfig_nr_ssparam(void);
extern void RCconfig_nr_macrlc(void); extern void RCconfig_nr_macrlc(void);
extern int RCconfig_nr_gtpu(void ); extern int RCconfig_nr_gtpu(void );
extern void NRRCConfig(void); extern void NRRCConfig(void);
......
...@@ -227,7 +227,33 @@ typedef enum { ...@@ -227,7 +227,33 @@ typedef enum {
{ .s1 = { config_check_intval, MNC_DIGIT_LENGTH_OKVALUES, 2 } }, \ { .s1 = { config_check_intval, MNC_DIGIT_LENGTH_OKVALUES, 2 } }, \
} }
/*-------------------------------------------------------------------------------------------------------------------------------------------------*/
/*-------------------------------------------------------------------------------------------------------------------------------------------------*/
/* NR-SS configuration */
#define GNB_CONFIG_SS "SSConfig"
#define GNB_CONFIG_SS_HOSTIP "hostIp"
#define GNB_CONFIG_SS_SYSPORT "Sys_port"
#define GNB_CONFIG_SS_SRBPORT "Srb_port"
#define GNB_CONFIG_SS_VNGPORT "Vng_port"
#define GNB_CONFIG_SS_MODE "SSMode"
#define GNB_CONFIG_SS_HOSTIP_IDX 0
#define GNB_CONFIG_SS_SYSPORT_IDX 1
#define GNB_CONFIG_SS_SRBPORT_IDX 2
#define GNB_CONFIG_SS_VNGPORT_IDX 3
#define GNB_CONFIG_SS_MODE_IDX 4
#define GNB_SSPARAMS_DESC { \
{GNB_CONFIG_SS_HOSTIP , NULL, 0, uptr:NULL, defstrval:"0.0.0.0", TYPE_STRING, 0}, \
{GNB_CONFIG_SS_SYSPORT , NULL, 0, uptr:NULL, defintval:0000, TYPE_UINT, 0}, \
{GNB_CONFIG_SS_SRBPORT , NULL, 0, uptr:NULL, defintval:0000, TYPE_UINT, 0}, \
{GNB_CONFIG_SS_VNGPORT , NULL, 0, uptr:NULL, defintval:0000, TYPE_UINT, 0}, \
{GNB_CONFIG_SS_MODE , NULL, 0, uptr:NULL, defintval:0000, TYPE_UINT, 0}, \
}
/*-------------------------------------------------------------------------------------------------------------------------------------------------*/
/* SNSSAI ID configuration */ /* SNSSAI ID configuration */
#define GNB_CONFIG_STRING_SNSSAI_LIST "snssaiList" #define GNB_CONFIG_STRING_SNSSAI_LIST "snssaiList"
......
...@@ -173,6 +173,8 @@ int pdcp_netlink_dequeue_element(const protocol_ctxt_t* const ctxt_pP, ...@@ -173,6 +173,8 @@ int pdcp_netlink_dequeue_element(const protocol_ctxt_t* const ctxt_pP,
void pdcp_config_set_security(const protocol_ctxt_t* const ctxt_pP, pdcp_t *pdcp_pP, rb_id_t rb_idP, void pdcp_config_set_security(const protocol_ctxt_t* const ctxt_pP, pdcp_t *pdcp_pP, rb_id_t rb_idP,
uint16_t lc_idP, uint8_t security_modeP, uint8_t *kRRCenc_pP, uint8_t *kRRCint_pP, uint8_t *kUPenc_pP); uint16_t lc_idP, uint8_t security_modeP, uint8_t *kRRCenc_pP, uint8_t *kRRCint_pP, uint8_t *kUPenc_pP);
int pdcp_fill_ss_pdcp_cnt (pdcp_t *pdcp_p, uint32_t rb_id, ss_get_pdcp_cnt_t *pc);
void pdcp_config_set_security_cipher(pdcp_t *pdcp_pP,uint8_t security_modeP); void pdcp_config_set_security_cipher(pdcp_t *pdcp_pP,uint8_t security_modeP);
int pdcp_apply_security(const protocol_ctxt_t* const ctxt_pP, int pdcp_apply_security(const protocol_ctxt_t* const ctxt_pP,
......
...@@ -753,6 +753,25 @@ static void deliver_sdu_srb(void *_ue, nr_pdcp_entity_t *entity, ...@@ -753,6 +753,25 @@ static void deliver_sdu_srb(void *_ue, nr_pdcp_entity_t *entity,
exit(1); exit(1);
srb_found: srb_found:
{
LOG_I(PDCP,"PDCP Sending DCCH PDU_IND to SS \n");
MessageDef *message_p = itti_alloc_new_message (TASK_SS_SRB, 0, SS_NRRRC_PDU_IND);
if (message_p) {
/* Populate the message and send to SS */
SS_NRRRC_PDU_IND (message_p).sdu_size = size;
SS_NRRRC_PDU_IND (message_p).srb_id = srb_id;
SS_NRRRC_PDU_IND (message_p).frame = nr_pdcp_current_time_last_frame;
SS_NRRRC_PDU_IND (message_p).rnti = ue->rnti;
SS_NRRRC_PDU_IND (message_p).subframe = nr_pdcp_current_time_last_subframe;
memset (SS_NRRRC_PDU_IND (message_p).sdu, 0, SDU_SIZE);
memcpy (SS_NRRRC_PDU_IND (message_p).sdu, buf, size);
int send_res = itti_send_msg_to_task (TASK_SS_SRB, 0, message_p);
if(send_res < 0) {
LOG_E(PDCP,"Error in itti_send_msg_to_task");
}
}
}
{ {
uint8_t *rrc_buffer_p = entity->is_gnb ? uint8_t *rrc_buffer_p = entity->is_gnb ?
itti_malloc(TASK_PDCP_ENB, TASK_RRC_GNB, size): itti_malloc(TASK_PDCP_ENB, TASK_RRC_GNB, size):
......
...@@ -228,6 +228,31 @@ void send_nsa_standalone_msg(NR_UL_IND_t *UL_INFO, uint16_t msg_id) ...@@ -228,6 +228,31 @@ void send_nsa_standalone_msg(NR_UL_IND_t *UL_INFO, uint16_t msg_id)
} }
case NFAPI_NR_PHY_MSG_TYPE_SRS_INDICATION: case NFAPI_NR_PHY_MSG_TYPE_SRS_INDICATION:
break; break;
case NFAPI_NR_PHY_MSG_TYPE_SLOT_INDICATION:
{
char buffer[NFAPI_MAX_PACKED_MESSAGE_SIZE];
LOG_T(NR_MAC, "SLOT IND header id :%d\n", UL_INFO->vt_ue_slot_ind.header.message_id);
int encoded_size = nfapi_nr_p7_message_pack(&UL_INFO->vt_ue_slot_ind, buffer, sizeof(buffer), NULL);
if (encoded_size <= 0)
{
LOG_E(NR_MAC, "nfapi_nr_p7_message_pack has failed. Encoded size = %d\n", encoded_size);
return;
}
LOG_D(NR_MAC, "SLOT_IND sent to Proxy, Size: %d Frame %d Slot %d\n", encoded_size,
UL_INFO->rach_ind.sfn, UL_INFO->rach_ind.slot);
if (send(ue_tx_sock_descriptor, buffer, encoded_size, 0) < 0)
{
LOG_E(NR_MAC, "Send Proxy NR_UE failed\n");
return;
}
else
{
LOG_D(NR_MAC, "Send Proxy SLOT_IND Success\n");
}
break;
}
default: default:
break; break;
} }
...@@ -699,6 +724,9 @@ void check_and_process_slot_ind(nfapi_ue_slot_indication_vt_t *slot_ind, uint16_ ...@@ -699,6 +724,9 @@ void check_and_process_slot_ind(nfapi_ue_slot_indication_vt_t *slot_ind, uint16_
if (slot_ind) if (slot_ind)
{ {
slot_ind->header.message_id = NFAPI_NR_PHY_MSG_TYPE_SLOT_INDICATION;
slot_ind->header.message_length = sizeof(nfapi_ue_slot_indication_vt_t);
slot_ind->header.phy_id = 0;
slot_ind->sfn = frame; slot_ind->sfn = frame;
slot_ind->slot = slot; slot_ind->slot = slot;
LOG_D(NR_PHY, "[%d, %d] SLOT Indication\n", frame, slot); LOG_D(NR_PHY, "[%d, %d] SLOT Indication\n", frame, slot);
...@@ -948,41 +976,40 @@ static void enqueue_nr_nfapi_msg(void *buffer, ssize_t len, nfapi_p7_message_hea ...@@ -948,41 +976,40 @@ static void enqueue_nr_nfapi_msg(void *buffer, ssize_t len, nfapi_p7_message_hea
break; break;
} }
case P7_CELL_SEARCH_IND: case P7_CELL_SEARCH_IND:
{ {
vendor_nfapi_cell_search_indication_t cell_ind; vendor_nfapi_cell_search_indication_t cell_ind;
LOG_D(NR_PHY, "CELL SEARCH IND Receievd\n"); LOG_D(NR_PHY, "CELL SEARCH IND Receievd\n");
if (nfapi_p7_message_unpack((void *)buffer, len, &cell_ind, if (nfapi_p7_message_unpack((void *)buffer, len, &cell_ind,
sizeof(vendor_nfapi_cell_search_indication_t), NULL) < 0) sizeof(vendor_nfapi_cell_search_indication_t), NULL) < 0)
{ {
LOG_E(NR_PHY, "Message cell_ind failed to unpack\n"); LOG_E(NR_PHY, "Message cell_ind failed to unpack\n");
break; break;
} }
MessageDef *message_p; MessageDef *message_p;
int i; int i;
message_p = itti_alloc_new_message(TASK_UNKNOWN, 0, PHY_FIND_CELL_IND); message_p = itti_alloc_new_message(TASK_UNKNOWN, 0, PHY_FIND_CELL_IND);
for (i = 0 ; i < cell_ind.lte_cell_search_indication.number_of_lte_cells_found; i++) { for (i = 0 ; i < cell_ind.lte_cell_search_indication.number_of_lte_cells_found; i++) {
// TO DO // TO DO
PHY_FIND_CELL_IND (message_p).cell_nb = i+1; PHY_FIND_CELL_IND (message_p).cell_nb = i+1;
/** FIXME: What we need is EARFCN not Freq Offset. */ /** FIXME: What we need is EARFCN not Freq Offset. */
PHY_FIND_CELL_IND (message_p).cells[i].earfcn = cell_ind.lte_cell_search_indication.lte_found_cells[i].frequency_offset; PHY_FIND_CELL_IND (message_p).cells[i].earfcn = cell_ind.lte_cell_search_indication.lte_found_cells[i].frequency_offset;
// TO DO // TO DO
PHY_FIND_CELL_IND (message_p).cells[i].cell_id = cell_ind.lte_cell_search_indication.lte_found_cells[i].pci; PHY_FIND_CELL_IND (message_p).cells[i].cell_id = cell_ind.lte_cell_search_indication.lte_found_cells[i].pci;
PHY_FIND_CELL_IND (message_p).cells[i].rsrp = cell_ind.lte_cell_search_indication.lte_found_cells[i].rsrp; PHY_FIND_CELL_IND (message_p).cells[i].rsrp = cell_ind.lte_cell_search_indication.lte_found_cells[i].rsrp;
PHY_FIND_CELL_IND (message_p).cells[i].rsrq = cell_ind.lte_cell_search_indication.lte_found_cells[i].rsrq; PHY_FIND_CELL_IND (message_p).cells[i].rsrq = cell_ind.lte_cell_search_indication.lte_found_cells[i].rsrq;
LOG_A(NR_PHY, "Cell No: %d PCI: %d EARFCN: %d RSRP: %d RSRQ: %d \n", PHY_FIND_CELL_IND (message_p).cell_nb, LOG_A(NR_PHY, "Cell No: %d PCI: %d EARFCN: %d RSRP: %d RSRQ: %d \n", PHY_FIND_CELL_IND (message_p).cell_nb,
PHY_FIND_CELL_IND (message_p).cells[i].cell_id, PHY_FIND_CELL_IND (message_p).cells[i].cell_id,
PHY_FIND_CELL_IND (message_p).cells[i].earfcn, PHY_FIND_CELL_IND (message_p).cells[i].earfcn,
PHY_FIND_CELL_IND (message_p).cells[i].rsrp, PHY_FIND_CELL_IND (message_p).cells[i].rsrp,
PHY_FIND_CELL_IND (message_p).cells[i].rsrq); PHY_FIND_CELL_IND (message_p).cells[i].rsrq);
itti_send_msg_to_task(TASK_RRC_NRUE, INSTANCE_DEFAULT, message_p); itti_send_msg_to_task(TASK_RRC_NRUE, INSTANCE_DEFAULT, message_p);
} }
break;
break;
}
}
default: default:
LOG_E(NR_PHY, "Invalid nFAPI message. Header ID %d\n", LOG_E(NR_PHY, "Invalid nFAPI message. Header ID %d\n",
header.message_id); header.message_id);
......
...@@ -110,16 +110,6 @@ typedef enum { ...@@ -110,16 +110,6 @@ typedef enum {
GROUP_COMMUNICATION_RELEASE_FAILURE GROUP_COMMUNICATION_RELEASE_FAILURE
} Group_Communication_Status_t; } Group_Communication_Status_t;
typedef enum {
SS_STATE_NOT_CONFIGURED = 0,
SS_STATE_CELL_CONFIGURED,
SS_STATE_CELL_ACTIVE,
SS_STATE_AS_SECURITY_ACTIVE,
SS_STATE_AS_RBS_ACTIVE,
SS_STATE_CELL_BROADCASTING,
SS_STATE_MAX_STATE
} SS_STATE_t;
struct GroupCommunicationEstablishReq { struct GroupCommunicationEstablishReq {
uint32_t sourceL2Id; uint32_t sourceL2Id;
uint32_t groupL2Id; uint32_t groupL2Id;
......
This diff is collapsed.
...@@ -353,6 +353,23 @@ int8_t nr_mac_rrc_data_ind(const module_id_t module_idP, ...@@ -353,6 +353,23 @@ int8_t nr_mac_rrc_data_ind(const module_id_t module_idP,
LOG_D(NR_RRC, "[gNB %d] Received SDU for CCCH on SRB %ld\n", module_idP, srb_idP); LOG_D(NR_RRC, "[gNB %d] Received SDU for CCCH on SRB %ld\n", module_idP, srb_idP);
ctxt.brOption = brOption; ctxt.brOption = brOption;
if (sdu_lenP > 0) { if (sdu_lenP > 0) {
LOG_I(RRC,"RRC Sending CCCH PDU_IND to SS \n");
MessageDef *message_p = itti_alloc_new_message (TASK_SS_SRB, INSTANCE_DEFAULT, SS_NRRRC_PDU_IND);
if (message_p) {
/* Populate the message to SS */
SS_NRRRC_PDU_IND (message_p).sdu_size = sdu_lenP;
SS_NRRRC_PDU_IND (message_p).srb_id = 0;
SS_NRRRC_PDU_IND (message_p).rnti = rntiP;
SS_NRRRC_PDU_IND (message_p).frame = ctxt.frame;
SS_NRRRC_PDU_IND (message_p).subframe = ctxt.subframe;
memset (SS_NRRRC_PDU_IND (message_p).sdu, 0, SDU_SIZE);
memcpy (SS_NRRRC_PDU_IND (message_p).sdu, sduP, sdu_lenP);
int send_res = itti_send_msg_to_task (TASK_SS_SRB, INSTANCE_DEFAULT, message_p);
if(send_res < 0) {
LOG_E(RRC,"Error in itti_send_msg_to_task");
}
}
nr_rrc_gNB_decode_ccch(&ctxt, sduP, sdu_lenP, NULL, CC_id); nr_rrc_gNB_decode_ccch(&ctxt, sduP, sdu_lenP, NULL, CC_id);
} }
} }
......
...@@ -466,8 +466,6 @@ typedef struct { ...@@ -466,8 +466,6 @@ typedef struct {
} rrc_gNB_carrier_data_t; } rrc_gNB_carrier_data_t;
//--------------------------------------------------- //---------------------------------------------------
typedef struct { typedef struct {
/* nea0 = 0, nea1 = 1, ... */ /* nea0 = 0, nea1 = 1, ... */
int ciphering_algorithms[4]; int ciphering_algorithms[4];
......
...@@ -341,7 +341,7 @@ rrc_gNB_generate_RRCSetup( ...@@ -341,7 +341,7 @@ rrc_gNB_generate_RRCSetup(
gNB_RRC_INST *rrc = RC.nrrrc[ctxt_pP->module_id]; gNB_RRC_INST *rrc = RC.nrrrc[ctxt_pP->module_id];
ue_p->Srb0.Tx_buffer.payload_size = do_RRCSetup(ue_context_pP, ue_p->Srb0.Tx_buffer.payload_size = do_RRCSetup(ue_context_pP,
(uint8_t *) ue_p->Srb0.Tx_buffer.Payload, (uint8_t *) ue_p->Srb0.Tx_buffer.Payload,
rrc_gNB_get_next_transaction_identifier(ctxt_pP->module_id), 0/*rrc_gNB_get_next_transaction_identifier(ctxt_pP->module_id)*/,
masterCellGroup_from_DU, masterCellGroup_from_DU,
scc,&rrc->carrier); scc,&rrc->carrier);
...@@ -782,13 +782,16 @@ rrc_gNB_generate_defaultRRCReconfiguration( ...@@ -782,13 +782,16 @@ rrc_gNB_generate_defaultRRCReconfiguration(
rrc_gNB_mui, rrc_gNB_mui,
ctxt_pP->module_id, ctxt_pP->module_id,
DCCH); DCCH);
nr_rrc_data_req(ctxt_pP, if (RC.ss.mode == SS_GNB)
DCCH, {
rrc_gNB_mui++, nr_rrc_data_req(ctxt_pP,
SDU_CONFIRM_NO, DCCH,
size, rrc_gNB_mui++,
buffer, SDU_CONFIRM_NO,
PDCP_TRANSMISSION_MODE_CONTROL); size,
buffer,
PDCP_TRANSMISSION_MODE_CONTROL);
}
// rrc_pdcp_config_asn1_req // rrc_pdcp_config_asn1_req
#endif #endif
// rrc_rlc_config_asn1_req // rrc_rlc_config_asn1_req
...@@ -2517,7 +2520,10 @@ rrc_gNB_decode_dcch( ...@@ -2517,7 +2520,10 @@ rrc_gNB_decode_dcch(
/* configure ciphering */ /* configure ciphering */
nr_rrc_pdcp_config_security(ctxt_pP, ue_context_p, 1); nr_rrc_pdcp_config_security(ctxt_pP, ue_context_p, 1);
rrc_gNB_generate_UECapabilityEnquiry(ctxt_pP, ue_context_p); if (RC.ss.mode == SS_GNB)
{
rrc_gNB_generate_UECapabilityEnquiry(ctxt_pP, ue_context_p);
}
//rrc_gNB_generate_defaultRRCReconfiguration(ctxt_pP, ue_context_p); //rrc_gNB_generate_defaultRRCReconfiguration(ctxt_pP, ue_context_p);
break; break;
case NR_UL_DCCH_MessageType__c1_PR_securityModeFailure: case NR_UL_DCCH_MessageType__c1_PR_securityModeFailure:
...@@ -3683,6 +3689,41 @@ void *rrc_gnb_task(void *args_p) { ...@@ -3683,6 +3689,41 @@ void *rrc_gnb_task(void *args_p) {
rrc_gNB_process_NGAP_UE_CONTEXT_RELEASE_COMMAND(msg_p, msg_name_p, instance); rrc_gNB_process_NGAP_UE_CONTEXT_RELEASE_COMMAND(msg_p, msg_name_p, instance);
break; break;
case SS_NRRRC_PDU_REQ:
LOG_A(NR_RRC,"NR RRC received SS_NRRRC_PDU_REQ SRB_ID:%d SDU_SIZE:%d\n", SS_NRRRC_PDU_REQ (msg_p).srb_id, SS_NRRRC_PDU_REQ (msg_p).sdu_size);
PROTOCOL_CTXT_SET_BY_INSTANCE(&ctxt,
instance,
GNB_FLAG_YES,
SS_NRRRC_PDU_REQ(msg_p).rnti,
msg_p->ittiMsgHeader.lte_time.frame,
msg_p->ittiMsgHeader.lte_time.slot);
if ((SS_NRRRC_PDU_REQ(msg_p).srb_id) != 0)
{
NR_DL_DCCH_Message_t *dl_dcch_msg = NULL;
LOG_A(NR_RRC, "Sending NR RRC PDU by nr_rrc_data_req function \n");
uper_decode(NULL,
&asn_DEF_NR_DL_DCCH_Message,
(void **)&dl_dcch_msg,
(uint8_t *)SS_NRRRC_PDU_REQ(msg_p).sdu,
SS_NRRRC_PDU_REQ(msg_p).sdu_size, 0, 0);
if (LOG_DEBUGFLAG(DEBUG_ASN1))
{
xer_fprint(stdout, &asn_DEF_NR_DL_DCCH_Message, (void *)dl_dcch_msg);
}
nr_rrc_data_req(&ctxt,
DCCH,
rrc_gNB_mui++,
SDU_CONFIRM_NO,
SS_NRRRC_PDU_REQ (msg_p).sdu_size,
SS_NRRRC_PDU_REQ (msg_p).sdu,
PDCP_TRANSMISSION_MODE_CONTROL);
}
break;
default: default:
LOG_E(NR_RRC, "[gNB %ld] Received unexpected message %s\n", instance, msg_name_p); LOG_E(NR_RRC, "[gNB %ld] Received unexpected message %s\n", instance, msg_name_p);
break; break;
......
...@@ -74,6 +74,11 @@ ...@@ -74,6 +74,11 @@
#include "nr_nas_msg_sim.h" #include "nr_nas_msg_sim.h"
#include <openair2/RRC/NR/nr_rrc_proto.h> #include <openair2/RRC/NR/nr_rrc_proto.h>
/* Cell_Search_5G s */
int8_t rsrp_cell = -128;
int8_t rsrq_cell = -128;
/* Cell_Search_5G e */
NR_UE_RRC_INST_t *NR_UE_rrc_inst; NR_UE_RRC_INST_t *NR_UE_rrc_inst;
/* NAS Attach request with IMSI */ /* NAS Attach request with IMSI */
static const char nr_nas_attach_req_imsi[] = { static const char nr_nas_attach_req_imsi[] = {
...@@ -130,6 +135,21 @@ nr_rrc_ue_generate_rrcReestablishmentComplete( ...@@ -130,6 +135,21 @@ nr_rrc_ue_generate_rrcReestablishmentComplete(
mui_t nr_rrc_mui=0; mui_t nr_rrc_mui=0;
/* Cell_Search_5G s */
bool passes_cell_selection_criteria_nr (NR_SIB1_t *sib1)
{
int srxlev = rsrp_cell;
if ( srxlev > 80)
{
LOG_E (RRC, "cell selection criteria filed \n ");
return false;
}
LOG_A (RRC, "Passes cell selection criteria. \n ");
return true;
}
/* Cell_Search_5G e */
static Rrc_State_NR_t nr_rrc_get_state (module_id_t ue_mod_idP) { static Rrc_State_NR_t nr_rrc_get_state (module_id_t ue_mod_idP) {
return NR_UE_rrc_inst[ue_mod_idP].nrRrcState; return NR_UE_rrc_inst[ue_mod_idP].nrRrcState;
} }
...@@ -217,7 +237,6 @@ int8_t nr_rrc_ue_decode_secondary_cellgroup_config(const module_id_t module_id, ...@@ -217,7 +237,6 @@ int8_t nr_rrc_ue_decode_secondary_cellgroup_config(const module_id_t module_id,
// from LTE-RRC DL-DCCH RRCConnectionReconfiguration nr-secondary-cell-group-config (decoded) // from LTE-RRC DL-DCCH RRCConnectionReconfiguration nr-secondary-cell-group-config (decoded)
// RRCReconfiguration // RRCReconfiguration
int8_t nr_rrc_ue_process_rrcReconfiguration(const module_id_t module_id, NR_RRCReconfiguration_t *rrcReconfiguration){ int8_t nr_rrc_ue_process_rrcReconfiguration(const module_id_t module_id, NR_RRCReconfiguration_t *rrcReconfiguration){
switch(rrcReconfiguration->criticalExtensions.present){ switch(rrcReconfiguration->criticalExtensions.present){
case NR_RRCReconfiguration__criticalExtensions_PR_rrcReconfiguration: case NR_RRCReconfiguration__criticalExtensions_PR_rrcReconfiguration:
if(rrcReconfiguration->criticalExtensions.choice.rrcReconfiguration->radioBearerConfig != NULL){ if(rrcReconfiguration->criticalExtensions.choice.rrcReconfiguration->radioBearerConfig != NULL){
...@@ -1179,6 +1198,16 @@ int8_t nr_rrc_ue_decode_NR_BCCH_DL_SCH_Message(module_id_t module_id, ...@@ -1179,6 +1198,16 @@ int8_t nr_rrc_ue_decode_NR_BCCH_DL_SCH_Message(module_id_t module_id,
} }
LOG_A(NR_RRC, "SIB1 decoded\n"); LOG_A(NR_RRC, "SIB1 decoded\n");
/* Cell_Search_5G s */
//uint32_t cell_idx = BIT_STRING_to_uint32(
// &sib1->cellAccessRelatedInfo.plmn_IdentityList.list.array[0]->cellIdentity);
if (passes_cell_selection_criteria_nr(sib1) == false)
{
LOG_E(NR_RRC, "Cell Selection Crieteria not met \n");
break;
}
/* Cell_Search_5G e */
/// dump_SIB1(); /// dump_SIB1();
// FIXME: improve condition for the RA trigger // FIXME: improve condition for the RA trigger
// Check for on-demand not broadcasted SI // Check for on-demand not broadcasted SI
...@@ -2386,12 +2415,19 @@ nr_rrc_ue_establish_srb2( ...@@ -2386,12 +2415,19 @@ nr_rrc_ue_establish_srb2(
NR_DedicatedNAS_Message_t *dedicatedNAS_Message = NR_DedicatedNAS_Message_t *dedicatedNAS_Message =
dlInformationTransfer->criticalExtensions.choice.dlInformationTransfer->dedicatedNAS_Message; dlInformationTransfer->criticalExtensions.choice.dlInformationTransfer->dedicatedNAS_Message;
MessageDef *msg_p; MessageDef *msg_p,*message_p;
msg_p = itti_alloc_new_message(TASK_RRC_NRUE, 0, NAS_DOWNLINK_DATA_IND); msg_p = itti_alloc_new_message(TASK_RRC_NRUE, 0, NAS_DOWNLINK_DATA_IND);
NAS_DOWNLINK_DATA_IND(msg_p).UEid = ctxt_pP->module_id; // TODO set the UEid to something else ? NAS_DOWNLINK_DATA_IND(msg_p).UEid = ctxt_pP->module_id; // TODO set the UEid to something else ?
NAS_DOWNLINK_DATA_IND(msg_p).nasMsg.length = dedicatedNAS_Message->size; NAS_DOWNLINK_DATA_IND(msg_p).nasMsg.length = dedicatedNAS_Message->size;
NAS_DOWNLINK_DATA_IND(msg_p).nasMsg.data = dedicatedNAS_Message->buf; NAS_DOWNLINK_DATA_IND(msg_p).nasMsg.data = dedicatedNAS_Message->buf;
itti_send_msg_to_task(TASK_NAS_NRUE, ctxt_pP->instance, msg_p); itti_send_msg_to_task(TASK_NAS_NRUE, ctxt_pP->instance, msg_p);
/*Send NAS_CONN_ESTABLI_CNF for handling Registration Accept in DL-Info transfer*/
message_p = itti_alloc_new_message(TASK_RRC_NRUE, 0, NAS_CONN_ESTABLI_CNF);
NAS_CONN_ESTABLI_CNF(message_p).errCode = AS_SUCCESS;
NAS_CONN_ESTABLI_CNF(message_p).nasMsg.length = dedicatedNAS_Message->size;
NAS_CONN_ESTABLI_CNF(message_p).nasMsg.data = dedicatedNAS_Message->buf;
itti_send_msg_to_task(TASK_NAS_NRUE, ctxt_pP->instance, message_p);
} }
} }
...@@ -2428,6 +2464,7 @@ nr_rrc_ue_establish_srb2( ...@@ -2428,6 +2464,7 @@ nr_rrc_ue_establish_srb2(
int result; int result;
NR_SRB_INFO *srb_info_p; NR_SRB_INFO *srb_info_p;
protocol_ctxt_t ctxt; protocol_ctxt_t ctxt;
uint16_t nb_cells = 0;
itti_mark_task_ready (TASK_RRC_NRUE); itti_mark_task_ready (TASK_RRC_NRUE);
while(1) { while(1) {
...@@ -2563,6 +2600,24 @@ nr_rrc_ue_establish_srb2( ...@@ -2563,6 +2600,24 @@ nr_rrc_ue_establish_srb2(
#endif #endif
break; break;
} }
/* Cell_Search_5G s*/
case PHY_FIND_CELL_IND:
{
nb_cells = PHY_FIND_CELL_IND(msg_p).cell_nb;
LOG_D(RRC, "Received message %s with reports for %d cells.\n",
ITTI_MSG_NAME (msg_p), nb_cells);
for (int i = 0 ; i < nb_cells; i++)
{
rsrp_cell = PHY_FIND_CELL_IND(msg_p).cells[i].rsrp;
rsrq_cell = PHY_FIND_CELL_IND(msg_p).cells[i].rsrq;
LOG_A (RRC, "PHY_FIND_CELL_IND Cell: %d RSRP: %d RSRQ: %d \n",
PHY_FIND_CELL_IND(msg_p).cell_nb, rsrp_cell, rsrq_cell);
}
break;
}
/* Cell_Search_5G e*/
default: default:
LOG_E(NR_RRC, "[UE %d] Received unexpected message %s\n", ue_mod_id, ITTI_MSG_NAME (msg_p)); LOG_E(NR_RRC, "[UE %d] Received unexpected message %s\n", ue_mod_id, ITTI_MSG_NAME (msg_p));
......
...@@ -44,11 +44,15 @@ int encode_fgs_security_mode_complete(fgs_security_mode_complete_msg *fgs_securi ...@@ -44,11 +44,15 @@ int encode_fgs_security_mode_complete(fgs_security_mode_complete_msg *fgs_securi
int encoded = 0; int encoded = 0;
int encode_result = 0; int encode_result = 0;
/*Workaround fix for running OAI-UE with TTCN */
#if 0
if ((encode_result = if ((encode_result =
encode_5gs_mobile_identity(&fgs_security_mode_comp->fgsmobileidentity, 0x77, buffer + encode_5gs_mobile_identity(&fgs_security_mode_comp->fgsmobileidentity, 0x77, buffer +
encoded, len - encoded)) < 0) { //Return in case of error encoded, len - encoded)) < 0) { //Return in case of error
return encode_result; return encode_result;
} else { } else
#endif
{
encoded += encode_result; encoded += encode_result;
if ((encode_result = if ((encode_result =
encode_fgc_nas_message_container(&fgs_security_mode_comp->fgsnasmessagecontainer, 0x71, buffer + encode_fgc_nas_message_container(&fgs_security_mode_comp->fgsnasmessagecontainer, 0x71, buffer +
......
...@@ -132,18 +132,18 @@ int encode_fgs_uplink_nas_transport(fgs_uplink_nas_transport_msg *fgs_up_nas_tra ...@@ -132,18 +132,18 @@ int encode_fgs_uplink_nas_transport(fgs_uplink_nas_transport_msg *fgs_up_nas_tra
*(buffer + encoded) = (0x8<<4)|(fgs_up_nas_transport->requesttype &0x7); *(buffer + encoded) = (0x8<<4)|(fgs_up_nas_transport->requesttype &0x7);
encoded++; encoded++;
#if 0
if ((encode_result = encode_nssai(&fgs_up_nas_transport->snssai, 0x22, buffer +encoded)) < 0) { if ((encode_result = encode_nssai(&fgs_up_nas_transport->snssai, 0x22, buffer +encoded)) < 0) {
return encode_result; return encode_result;
} else { } else {
encoded += encode_result; encoded += encode_result;
} }
if ((encode_result = encode_dnn(&fgs_up_nas_transport->dnn, 0x25, buffer +encoded)) < 0) { if ((encode_result = encode_dnn(&fgs_up_nas_transport->dnn, 0x25, buffer +encoded)) < 0) {
return encode_result; return encode_result;
} else { } else {
encoded += encode_result; encoded += encode_result;
} }
#endif
return encoded; return encoded;
} }
......
This diff is collapsed.
/*
* Copyright 2022 Sequans Communications.
*
* 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.0 (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
*/
#pragma once
#include "SIDL_NR_SYSTEM_PORT.h"
#include "acp.h"
SIDL_BEGIN_C_INTERFACE
int acpNrSysProcessEncClt(acpCtx_t _ctx, unsigned char* _buffer, size_t* _size, const struct NR_SYSTEM_CTRL_REQ* FromSS);
int acpNrSysProcessDecSrv(acpCtx_t _ctx, const unsigned char* _buffer, size_t _size, struct NR_SYSTEM_CTRL_REQ** FromSS);
void acpNrSysProcessFreeSrv(struct NR_SYSTEM_CTRL_REQ* FromSS);
int acpNrSysProcessEncSrv(acpCtx_t _ctx, unsigned char* _buffer, size_t* _size, const struct NR_SYSTEM_CTRL_CNF* ToSS);
int acpNrSysProcessDecClt(acpCtx_t _ctx, const unsigned char* _buffer, size_t _size, struct NR_SYSTEM_CTRL_CNF** ToSS);
void acpNrSysProcessFreeClt(struct NR_SYSTEM_CTRL_CNF* ToSS);
SIDL_END_C_INTERFACE
/*
* Copyright 2022 Sequans Communications.
*
* 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.0 (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
*/
#pragma once
#include "SIDL_NASEMU_NR_SYSTEM_PORT.h"
#include "acp.h"
SIDL_BEGIN_C_INTERFACE
int acpNrSysSrbProcessToSSEncSrv(acpCtx_t _ctx, unsigned char* _buffer, size_t* _size, const struct NR_RRC_PDU_IND* ToSS);
int acpNrSysSrbProcessToSSDecClt(acpCtx_t _ctx, const unsigned char* _buffer, size_t _size, struct NR_RRC_PDU_IND** ToSS);
void acpNrSysSrbProcessToSSFreeClt(struct NR_RRC_PDU_IND* ToSS);
int acpNrSysSrbProcessFromSSEncClt(acpCtx_t _ctx, unsigned char* _buffer, size_t* _size, const struct NR_RRC_PDU_REQ* FromSS);
int acpNrSysSrbProcessFromSSDecSrv(acpCtx_t _ctx, const unsigned char* _buffer, size_t _size, struct NR_RRC_PDU_REQ** FromSS);
void acpNrSysSrbProcessFromSSFreeSrv(struct NR_RRC_PDU_REQ* FromSS);
SIDL_END_C_INTERFACE
/*
* Copyright 2022 Sequans Communications.
*
* 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.0 (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
*/
#include "acpNrSys.h"
#include "acpCtx.h"
#include "acpProto.h"
#include "acpMsgIds.h"
#include "serNrSys.h"
int acpNrSysProcessEncClt(acpCtx_t _ctx, unsigned char* _buffer, size_t* _size, const struct NR_SYSTEM_CTRL_REQ* FromSS)
{
if (!acpCtxIsValid(_ctx)) {
return -ACP_ERR_INVALID_CTX;
}
size_t _lidx = ACP_HEADER_SIZE;
int _ret = serNrSysProcessEncClt(_buffer, *_size, &_lidx, FromSS);
if (_ret == SIDL_STATUS_OK) {
acpBuildHeader(_ctx, ACP_LID_NrSysProcess, _lidx, _buffer);
}
*_size = _lidx;
return _ret;
}
int acpNrSysProcessDecSrv(acpCtx_t _ctx, const unsigned char* _buffer, size_t _size, struct NR_SYSTEM_CTRL_REQ** FromSS)
{
if (!acpCtxIsValid(_ctx)) {
return -ACP_ERR_INVALID_CTX;
}
return serNrSysProcessDecSrv(_buffer + ACP_HEADER_SIZE, _size - ACP_HEADER_SIZE, ACP_CTX_CAST(_ctx)->arena, ACP_CTX_CAST(_ctx)->aSize, FromSS);
}
void acpNrSysProcessFreeSrv(struct NR_SYSTEM_CTRL_REQ* FromSS)
{
serNrSysProcessFreeSrv(FromSS);
}
int acpNrSysProcessEncSrv(acpCtx_t _ctx, unsigned char* _buffer, size_t* _size, const struct NR_SYSTEM_CTRL_CNF* ToSS)
{
if (!acpCtxIsValid(_ctx)) {
return -ACP_ERR_INVALID_CTX;
}
size_t _lidx = ACP_HEADER_SIZE;
int _ret = serNrSysProcessEncSrv(_buffer, *_size, &_lidx, ToSS);
if (_ret == SIDL_STATUS_OK) {
acpBuildHeader(_ctx, ACP_LID_NrSysProcess, _lidx, _buffer);
}
*_size = _lidx;
return _ret;
}
int acpNrSysProcessDecClt(acpCtx_t _ctx, const unsigned char* _buffer, size_t _size, struct NR_SYSTEM_CTRL_CNF** ToSS)
{
if (!acpCtxIsValid(_ctx)) {
return -ACP_ERR_INVALID_CTX;
}
return serNrSysProcessDecClt(_buffer + ACP_HEADER_SIZE, _size - ACP_HEADER_SIZE, ACP_CTX_CAST(_ctx)->arena, ACP_CTX_CAST(_ctx)->aSize, ToSS);
}
void acpNrSysProcessFreeClt(struct NR_SYSTEM_CTRL_CNF* ToSS)
{
serNrSysProcessFreeClt(ToSS);
}
/*
* Copyright 2022 Sequans Communications.
*
* 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.0 (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
*/
#include "acpNrSysSrb.h"
#include "acpCtx.h"
#include "acpProto.h"
#include "acpMsgIds.h"
#include "serNrSysSrb.h"
int acpNrSysSrbProcessToSSEncSrv(acpCtx_t _ctx, unsigned char* _buffer, size_t* _size, const struct NR_RRC_PDU_IND* ToSS)
{
if (!acpCtxIsValid(_ctx)) {
return -ACP_ERR_INVALID_CTX;
}
size_t _lidx = ACP_HEADER_SIZE;
int _ret = serNrSysSrbProcessToSSEncSrv(_buffer, *_size, &_lidx, ToSS);
if (_ret == SIDL_STATUS_OK) {
acpBuildHeader(_ctx, ACP_LID_NrSysSrbProcessToSS, _lidx, _buffer);
}
*_size = _lidx;
return _ret;
}
int acpNrSysSrbProcessToSSDecClt(acpCtx_t _ctx, const unsigned char* _buffer, size_t _size, struct NR_RRC_PDU_IND** ToSS)
{
if (!acpCtxIsValid(_ctx)) {
return -ACP_ERR_INVALID_CTX;
}
return serNrSysSrbProcessToSSDecClt(_buffer + ACP_HEADER_SIZE, _size - ACP_HEADER_SIZE, ACP_CTX_CAST(_ctx)->arena, ACP_CTX_CAST(_ctx)->aSize, ToSS);
}
void acpNrSysSrbProcessToSSFreeClt(struct NR_RRC_PDU_IND* ToSS)
{
serNrSysSrbProcessToSSFreeClt(ToSS);
}
int acpNrSysSrbProcessFromSSEncClt(acpCtx_t _ctx, unsigned char* _buffer, size_t* _size, const struct NR_RRC_PDU_REQ* FromSS)
{
if (!acpCtxIsValid(_ctx)) {
return -ACP_ERR_INVALID_CTX;
}
size_t _lidx = ACP_HEADER_SIZE;
int _ret = serNrSysSrbProcessFromSSEncClt(_buffer, *_size, &_lidx, FromSS);
if (_ret == SIDL_STATUS_OK) {
acpBuildHeader(_ctx, ACP_LID_NrSysSrbProcessFromSS, _lidx, _buffer);
}
*_size = _lidx;
return _ret;
}
int acpNrSysSrbProcessFromSSDecSrv(acpCtx_t _ctx, const unsigned char* _buffer, size_t _size, struct NR_RRC_PDU_REQ** FromSS)
{
if (!acpCtxIsValid(_ctx)) {
return -ACP_ERR_INVALID_CTX;
}
return serNrSysSrbProcessFromSSDecSrv(_buffer + ACP_HEADER_SIZE, _size - ACP_HEADER_SIZE, ACP_CTX_CAST(_ctx)->arena, ACP_CTX_CAST(_ctx)->aSize, FromSS);
}
void acpNrSysSrbProcessFromSSFreeSrv(struct NR_RRC_PDU_REQ* FromSS)
{
serNrSysSrbProcessFromSSFreeSrv(FromSS);
}
/*
* Copyright 2022 Sequans Communications.
*
* 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.0 (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
*/
#pragma once
#include "SIDL_NR_SYSTEM_PORT.h"
#include "adbg.h"
SIDL_BEGIN_C_INTERFACE
void adbgNrSysProcessLogIn(acpCtx_t _ctx, const struct NR_SYSTEM_CTRL_REQ* FromSS);
void adbgNrSysProcessLogOut(acpCtx_t _ctx, const struct NR_SYSTEM_CTRL_CNF* ToSS);
SIDL_END_C_INTERFACE
/*
* Copyright 2022 Sequans Communications.
*
* 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.0 (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
*/
#pragma once
#include "SIDL_NASEMU_NR_SYSTEM_PORT.h"
#include "adbg.h"
SIDL_BEGIN_C_INTERFACE
void adbgNrSysSrbProcessToSSLogOut(acpCtx_t _ctx, const struct NR_RRC_PDU_IND* ToSS);
void adbgNrSysSrbProcessFromSSLogIn(acpCtx_t _ctx, const struct NR_RRC_PDU_REQ* FromSS);
SIDL_END_C_INTERFACE
/*
* Copyright 2022 Sequans Communications.
*
* 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.0 (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
*/
#pragma once
#include "SIDL_NR_SYSTEM_PORT.h"
SIDL_BEGIN_C_INTERFACE
const char* adbgUtilsNrSysNR_PdcpCountGetReq_TypeToStr(int select);
const char* adbgUtilsNrSysNR_PDCP_CountReq_TypeToStr(int select);
const char* adbgUtilsNrSysSdapConfigInfo_TypeToStr(int select);
const char* adbgUtilsNrSysSDAP_Configuration_TypeToStr(int select);
const char* adbgUtilsNrSysNR_PDCP_DRB_HeaderCompression_TypeToStr(int select);
const char* adbgUtilsNrSysNR_PDCP_RB_Config_Parameters_TypeToStr(int select);
const char* adbgUtilsNrSysNR_PDCP_RbConfig_TypeToStr(int select);
const char* adbgUtilsNrSysNR_PDCP_Configuration_TypeToStr(int select);
const char* adbgUtilsNrSysNR_ASN1_UL_AM_RLC_TypeToStr(int select);
const char* adbgUtilsNrSysNR_ASN1_DL_AM_RLC_TypeToStr(int select);
const char* adbgUtilsNrSysNR_ASN1_UL_UM_RLC_TypeToStr(int select);
const char* adbgUtilsNrSysNR_ASN1_DL_UM_RLC_TypeToStr(int select);
const char* adbgUtilsNrSysNR_RLC_RbConfig_TypeToStr(int select);
const char* adbgUtilsNrSysNR_RLC_TransparentModeToStr(int select);
const char* adbgUtilsNrSysNR_RLC_TestModeInfo_TypeToStr(int select);
const char* adbgUtilsNrSysNR_RLC_TestModeConfig_TypeToStr(int select);
const char* adbgUtilsNrSysNR_MAC_TestModeConfig_TypeToStr(int select);
const char* adbgUtilsNrSysNR_RlcBearerConfig_TypeToStr(int select);
const char* adbgUtilsNrSysNR_RadioBearerConfig_TypeToStr(int select);
const char* adbgUtilsNrSysNR_PDCP_ActTime_TypeToStr(int select);
const char* adbgUtilsNrSysNR_AS_Security_TypeToStr(int select);
const char* adbgUtilsNrSysNR_SystemRequest_TypeToStr(int select);
const char* adbgUtilsNrSysNR_SystemConfirm_TypeToStr(int select);
SIDL_END_C_INTERFACE
/*
* Copyright 2022 Sequans Communications.
*
* 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.0 (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
*/
#pragma once
#include "SIDL_NASEMU_NR_SYSTEM_PORT.h"
SIDL_BEGIN_C_INTERFACE
const char* adbgUtilsNrSysSrbNR_RRC_MSG_Request_TypeToStr(int select);
const char* adbgUtilsNrSysSrbNR_RRC_MSG_Indication_TypeToStr(int select);
SIDL_END_C_INTERFACE
This diff is collapsed.
This diff is collapsed.
/*
* Copyright 2022 Sequans Communications.
*
* 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.0 (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
*/
#include "adbgUtilsNrSys.h"
const char* adbgUtilsNrSysNR_PdcpCountGetReq_TypeToStr(int select)
{
switch (select) {
case NR_PdcpCountGetReq_Type_AllRBs: return "AllRBs";
case NR_PdcpCountGetReq_Type_SingleRB: return "SingleRB";
default: return "unknown";
}
}
const char* adbgUtilsNrSysNR_PDCP_CountReq_TypeToStr(int select)
{
switch (select) {
case NR_PDCP_CountReq_Type_Get: return "Get";
case NR_PDCP_CountReq_Type_Set: return "Set";
default: return "unknown";
}
}
const char* adbgUtilsNrSysSdapConfigInfo_TypeToStr(int select)
{
switch (select) {
case SdapConfigInfo_Type_SdapConfig: return "SdapConfig";
case SdapConfigInfo_Type_TransparentMode: return "TransparentMode";
default: return "unknown";
}
}
const char* adbgUtilsNrSysSDAP_Configuration_TypeToStr(int select)
{
switch (select) {
case SDAP_Configuration_Type_None: return "None";
case SDAP_Configuration_Type_Config: return "Config";
default: return "unknown";
}
}
const char* adbgUtilsNrSysNR_PDCP_DRB_HeaderCompression_TypeToStr(int select)
{
switch (select) {
case NR_PDCP_DRB_HeaderCompression_Type_None: return "None";
default: return "unknown";
}
}
const char* adbgUtilsNrSysNR_PDCP_RB_Config_Parameters_TypeToStr(int select)
{
switch (select) {
case NR_PDCP_RB_Config_Parameters_Type_Srb: return "Srb";
case NR_PDCP_RB_Config_Parameters_Type_Drb: return "Drb";
default: return "unknown";
}
}
const char* adbgUtilsNrSysNR_PDCP_RbConfig_TypeToStr(int select)
{
switch (select) {
case NR_PDCP_RbConfig_Type_Params: return "Params";
case NR_PDCP_RbConfig_Type_TransparentMode: return "TransparentMode";
default: return "unknown";
}
}
const char* adbgUtilsNrSysNR_PDCP_Configuration_TypeToStr(int select)
{
switch (select) {
case NR_PDCP_Configuration_Type_None: return "None";
case NR_PDCP_Configuration_Type_RBTerminating: return "RBTerminating";
case NR_PDCP_Configuration_Type_Proxy: return "Proxy";
default: return "unknown";
}
}
const char* adbgUtilsNrSysNR_ASN1_UL_AM_RLC_TypeToStr(int select)
{
switch (select) {
case NR_ASN1_UL_AM_RLC_Type_R15: return "R15";
default: return "unknown";
}
}
const char* adbgUtilsNrSysNR_ASN1_DL_AM_RLC_TypeToStr(int select)
{
switch (select) {
case NR_ASN1_DL_AM_RLC_Type_R15: return "R15";
default: return "unknown";
}
}
const char* adbgUtilsNrSysNR_ASN1_UL_UM_RLC_TypeToStr(int select)
{
switch (select) {
case NR_ASN1_UL_UM_RLC_Type_R15: return "R15";
default: return "unknown";
}
}
const char* adbgUtilsNrSysNR_ASN1_DL_UM_RLC_TypeToStr(int select)
{
switch (select) {
case NR_ASN1_DL_UM_RLC_Type_R15: return "R15";
default: return "unknown";
}
}
const char* adbgUtilsNrSysNR_RLC_RbConfig_TypeToStr(int select)
{
switch (select) {
case NR_RLC_RbConfig_Type_AM: return "AM";
case NR_RLC_RbConfig_Type_UM: return "UM";
case NR_RLC_RbConfig_Type_TM: return "TM";
default: return "unknown";
}
}
const char* adbgUtilsNrSysNR_RLC_TransparentModeToStr(int select)
{
switch (select) {
case NR_RLC_TransparentMode_Umd: return "Umd";
case NR_RLC_TransparentMode_Amd: return "Amd";
default: return "unknown";
}
}
const char* adbgUtilsNrSysNR_RLC_TestModeInfo_TypeToStr(int select)
{
switch (select) {
case NR_RLC_TestModeInfo_Type_AckProhibit: return "AckProhibit";
case NR_RLC_TestModeInfo_Type_NotACK_NextRLC_PDU: return "NotACK_NextRLC_PDU";
case NR_RLC_TestModeInfo_Type_TransparentMode: return "TransparentMode";
default: return "unknown";
}
}
const char* adbgUtilsNrSysNR_RLC_TestModeConfig_TypeToStr(int select)
{
switch (select) {
case NR_RLC_TestModeConfig_Type_None: return "None";
case NR_RLC_TestModeConfig_Type_Info: return "Info";
default: return "unknown";
}
}
const char* adbgUtilsNrSysNR_MAC_TestModeConfig_TypeToStr(int select)
{
switch (select) {
case NR_MAC_TestModeConfig_Type_None: return "None";
case NR_MAC_TestModeConfig_Type_Info: return "Info";
default: return "unknown";
}
}
const char* adbgUtilsNrSysNR_RlcBearerConfig_TypeToStr(int select)
{
switch (select) {
case NR_RlcBearerConfig_Type_Config: return "Config";
case NR_RlcBearerConfig_Type_None: return "None";
default: return "unknown";
}
}
const char* adbgUtilsNrSysNR_RadioBearerConfig_TypeToStr(int select)
{
switch (select) {
case NR_RadioBearerConfig_Type_AddOrReconfigure: return "AddOrReconfigure";
case NR_RadioBearerConfig_Type_Release: return "Release";
default: return "unknown";
}
}
const char* adbgUtilsNrSysNR_PDCP_ActTime_TypeToStr(int select)
{
switch (select) {
case NR_PDCP_ActTime_Type_None: return "None";
case NR_PDCP_ActTime_Type_SQN: return "SQN";
default: return "unknown";
}
}
const char* adbgUtilsNrSysNR_AS_Security_TypeToStr(int select)
{
switch (select) {
case NR_AS_Security_Type_StartRestart: return "StartRestart";
case NR_AS_Security_Type_Release: return "Release";
default: return "unknown";
}
}
const char* adbgUtilsNrSysNR_SystemRequest_TypeToStr(int select)
{
switch (select) {
case NR_SystemRequest_Type_Cell: return "Cell";
case NR_SystemRequest_Type_CellAttenuationList: return "CellAttenuationList";
case NR_SystemRequest_Type_RadioBearerList: return "RadioBearerList";
case NR_SystemRequest_Type_EnquireTiming: return "EnquireTiming";
case NR_SystemRequest_Type_AS_Security: return "AS_Security";
case NR_SystemRequest_Type_PdcpCount: return "PdcpCount";
case NR_SystemRequest_Type_Paging: return "Paging";
case NR_SystemRequest_Type_DeltaValues: return "DeltaValues";
default: return "unknown";
}
}
const char* adbgUtilsNrSysNR_SystemConfirm_TypeToStr(int select)
{
switch (select) {
case NR_SystemConfirm_Type_Cell: return "Cell";
case NR_SystemConfirm_Type_CellAttenuationList: return "CellAttenuationList";
case NR_SystemConfirm_Type_RadioBearerList: return "RadioBearerList";
case NR_SystemConfirm_Type_EnquireTiming: return "EnquireTiming";
case NR_SystemConfirm_Type_AS_Security: return "AS_Security";
case NR_SystemConfirm_Type_SystemIndCtrl: return "SystemIndCtrl";
case NR_SystemConfirm_Type_PdcpCount: return "PdcpCount";
case NR_SystemConfirm_Type_DciTrigger: return "DciTrigger";
case NR_SystemConfirm_Type_MacCommandTrigger: return "MacCommandTrigger";
case NR_SystemConfirm_Type_L1_TestMode: return "L1_TestMode";
case NR_SystemConfirm_Type_PdcpHandoverControl: return "PdcpHandoverControl";
case NR_SystemConfirm_Type_DeltaValues: return "DeltaValues";
case NR_SystemConfirm_Type_SpsCg: return "SpsCg";
default: return "unknown";
}
}
/*
* Copyright 2022 Sequans Communications.
*
* 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.0 (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
*/
#include "adbgUtilsNrSysSrb.h"
const char* adbgUtilsNrSysSrbNR_RRC_MSG_Request_TypeToStr(int select)
{
switch (select) {
case NR_RRC_MSG_Request_Type_Ccch: return "Ccch";
case NR_RRC_MSG_Request_Type_Dcch: return "Dcch";
default: return "unknown";
}
}
const char* adbgUtilsNrSysSrbNR_RRC_MSG_Indication_TypeToStr(int select)
{
switch (select) {
case NR_RRC_MSG_Indication_Type_Ccch: return "Ccch";
case NR_RRC_MSG_Indication_Type_Ccch1: return "Ccch1";
case NR_RRC_MSG_Indication_Type_Dcch: return "Dcch";
default: return "unknown";
}
}
/*
* Copyright 2022 Sequans Communications.
*
* 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.0 (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
*/
#pragma once
#include "SIDL_NR_SYSTEM_PORT.h"
#include "SidlCompiler.h"
SIDL_BEGIN_C_INTERFACE
int serNrSysProcessEncClt(unsigned char* _buffer, size_t _size, size_t* _lidx, const struct NR_SYSTEM_CTRL_REQ* FromSS);
int serNrSysProcessDecSrv(const unsigned char* _buffer, size_t _size, unsigned char* _arena, size_t _aSize, struct NR_SYSTEM_CTRL_REQ** FromSS);
void serNrSysProcessFreeSrv(struct NR_SYSTEM_CTRL_REQ* FromSS);
int serNrSysProcessEncSrv(unsigned char* _buffer, size_t _size, size_t* _lidx, const struct NR_SYSTEM_CTRL_CNF* ToSS);
int serNrSysProcessDecClt(const unsigned char* _buffer, size_t _size, unsigned char* _arena, size_t _aSize, struct NR_SYSTEM_CTRL_CNF** ToSS);
void serNrSysProcessFreeClt(struct NR_SYSTEM_CTRL_CNF* ToSS);
SIDL_END_C_INTERFACE
/*
* Copyright 2022 Sequans Communications.
*
* 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.0 (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
*/
#pragma once
#include "SIDL_NASEMU_NR_SYSTEM_PORT.h"
#include "SidlCompiler.h"
SIDL_BEGIN_C_INTERFACE
int serNrSysSrbProcessToSSEncSrv(unsigned char* _buffer, size_t _size, size_t* _lidx, const struct NR_RRC_PDU_IND* ToSS);
int serNrSysSrbProcessToSSDecClt(const unsigned char* _buffer, size_t _size, unsigned char* _arena, size_t _aSize, struct NR_RRC_PDU_IND** ToSS);
void serNrSysSrbProcessToSSFreeClt(struct NR_RRC_PDU_IND* ToSS);
int serNrSysSrbProcessFromSSEncClt(unsigned char* _buffer, size_t _size, size_t* _lidx, const struct NR_RRC_PDU_REQ* FromSS);
int serNrSysSrbProcessFromSSDecSrv(const unsigned char* _buffer, size_t _size, unsigned char* _arena, size_t _aSize, struct NR_RRC_PDU_REQ** FromSS);
void serNrSysSrbProcessFromSSFreeSrv(struct NR_RRC_PDU_REQ* FromSS);
SIDL_END_C_INTERFACE
This diff is collapsed.
This diff is collapsed.
/*
* Copyright 2022 Sequans Communications.
*
* 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.0 (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
*/
#pragma once
#include "SidlCompiler.h"
#include "SidlASN1.h"
#include "SidlASN1Base.h"
#include "SidlBase.h"
#include "SidlCommon.h"
#include "SidlCommonBase.h"
#include "SidlNrASN1.h"
#include "SidlNrCommon.h"
#include "SidlParts.h"
#include "SidlVals.h"
#include "TtcnCommon.h"
#include "SidlCommon_BcchConfig.h"
#include "SidlCommon_Bcch_BRConfig.h"
#include "SidlCommon_CcchDcchDtchConfig.h"
#include "SidlCommon_InitialCellPower.h"
#include "SidlCommon_PhysicalLayerConfigDL.h"
#include "SidlCommon_PhysicalLayerConfigUL.h"
#include "SidlCommon_RachProcedureConfig.h"
#include "SidlCommon_SciSchedulingConfig.h"
#include "SidlCommon_ServingCellConfig.h"
#include "SidlCommon_StaticCellInfo.h"
#include "SidlCommon_NR_BcchConfig_Type.h"
#include "SidlCommon_NR_CellConfigCommon_Type.h"
#include "SidlCommon_NR_CellConfigPhysicalLayer_Type.h"
#include "SidlCommon_NR_DcchDtchConfig_Type.h"
#include "SidlCommon_NR_PcchConfig_Type.h"
#include "SidlCommon_NR_RachProcedureConfig_Type.h"
#include "SidlCommon_NR_SS_StaticCellResourceConfig_Type.h"
#include "SidlCommon_NR_ServingCellConfig_Type.h"
#include "SidlCommon_CellConfigRequest.h"
#include "SidlCommon_NR_CellConfigRequest.h"
SIDL_BEGIN_C_INTERFACE
enum NR_RRC_MSG_Request_Type_Sel {
NR_RRC_MSG_Request_Type_UNBOUND_VALUE = 0,
NR_RRC_MSG_Request_Type_Ccch = 1,
NR_RRC_MSG_Request_Type_Dcch = 2,
};
struct uint8_t_NR_RRC_MSG_Request_Type_Ccch_Dynamic {
size_t d;
uint8_t* v;
};
struct uint8_t_NR_RRC_MSG_Request_Type_Dcch_Dynamic {
size_t d;
uint8_t* v;
};
union NR_RRC_MSG_Request_Type_Value {
struct uint8_t_NR_RRC_MSG_Request_Type_Ccch_Dynamic Ccch;
struct uint8_t_NR_RRC_MSG_Request_Type_Dcch_Dynamic Dcch;
};
struct NR_RRC_MSG_Request_Type {
enum NR_RRC_MSG_Request_Type_Sel d;
union NR_RRC_MSG_Request_Type_Value v;
};
enum NR_RRC_MSG_Indication_Type_Sel {
NR_RRC_MSG_Indication_Type_UNBOUND_VALUE = 0,
NR_RRC_MSG_Indication_Type_Ccch = 1,
NR_RRC_MSG_Indication_Type_Ccch1 = 2,
NR_RRC_MSG_Indication_Type_Dcch = 3,
};
struct uint8_t_NR_RRC_MSG_Indication_Type_Ccch_Dynamic {
size_t d;
uint8_t* v;
};
struct uint8_t_NR_RRC_MSG_Indication_Type_Ccch1_Dynamic {
size_t d;
uint8_t* v;
};
struct uint8_t_NR_RRC_MSG_Indication_Type_Dcch_Dynamic {
size_t d;
uint8_t* v;
};
union NR_RRC_MSG_Indication_Type_Value {
struct uint8_t_NR_RRC_MSG_Indication_Type_Ccch_Dynamic Ccch;
struct uint8_t_NR_RRC_MSG_Indication_Type_Ccch1_Dynamic Ccch1;
struct uint8_t_NR_RRC_MSG_Indication_Type_Dcch_Dynamic Dcch;
};
struct NR_RRC_MSG_Indication_Type {
enum NR_RRC_MSG_Indication_Type_Sel d;
union NR_RRC_MSG_Indication_Type_Value v;
};
struct NR_RRC_PDU_REQ {
struct NR_ReqAspCommonPart_Type Common;
struct NR_RRC_MSG_Request_Type RrcPdu;
};
struct NR_RRC_PDU_IND {
struct NR_IndAspCommonPart_Type Common;
struct NR_RRC_MSG_Indication_Type RrcPdu;
};
SIDL_END_C_INTERFACE
This diff is collapsed.
...@@ -437,7 +437,7 @@ int sys_add_reconfig_cell(struct CellConfigInfo_Type *AddOrReconfigure) ...@@ -437,7 +437,7 @@ int sys_add_reconfig_cell(struct CellConfigInfo_Type *AddOrReconfigure)
if (AddOrReconfigure->Basic.v.BcchConfig.v.BcchInfo.v.SIs.d == true) if (AddOrReconfigure->Basic.v.BcchConfig.v.BcchInfo.v.SIs.d == true)
{ {
LOG_A(ENB_SS, "[SYS] [SIs] size=%d", AddOrReconfigure->Basic.v.BcchConfig.v.BcchInfo.v.SIs.v.d); LOG_A(ENB_SS, "[SYS] [SIs] size=%ld", AddOrReconfigure->Basic.v.BcchConfig.v.BcchInfo.v.SIs.v.d);
for (int i=0; i< AddOrReconfigure->Basic.v.BcchConfig.v.BcchInfo.v.SIs.v.d; ++i) for (int i=0; i< AddOrReconfigure->Basic.v.BcchConfig.v.BcchInfo.v.SIs.v.d; ++i)
{ {
if (SQN_BCCH_DL_SCH_MessageType_c1 == AddOrReconfigure->Basic.v.BcchConfig.v.BcchInfo.v.SIs.v.v[i].message.d) if (SQN_BCCH_DL_SCH_MessageType_c1 == AddOrReconfigure->Basic.v.BcchConfig.v.BcchInfo.v.SIs.v.v[i].message.d)
......
/*
* 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 _SS_GNB_CONTEXT_
#define _SS_GNB_CONTEXT_
#include "SidlCommon.h"
typedef struct SSConfigContext_s {
uint16_t dl_earfcn;
uint16_t ul_earfcn;
uint32_t dl_freq;
uint32_t ul_freq;
uint16_t curr_attn;
uint16_t cellId;
int16_t maxRefPower;
//TO DO: Need to remove one of the following cellId
EUTRA_CellId_Type ttcn_cell_id;
uint16_t eutra_cellId;
uint16_t nr_cellId;
/** TODO: To add more */
} SSConfigContext_t;
#endif /* _SS_GNB_CONTEXT_ */
/*
* 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 _SS_ENB_PROXY_IFACE_
#define _SS_ENB_PROXY_IFACE_
#include "intertask_interface.h"
typedef enum proxy_ss_message_id {
SS_ATTN_LIST = 1,
SS_ATTN_LIST_CNF = 2,
SS_CELL_CONFIG = 3,
SS_CELL_CONFIG_CNF = 4,
SS_CELL_RELEASE = 5,
SS_CELL_RELEASE_CNF = 6,
SS_VNG_CMD_REQ = 7,
SS_VNG_CMD_RESP = 8,
SS_VTP_REQ = 9,
SS_VTP_RESP = 10,
SS_VTP_ENABLE = 11,
SS_INVALID_MSG = 0xFF
} proxy_ss_msgs_e;
/*
* Proxy SS Header: To be used for comunication between Proxy and SS-eNB.
*
* preamble: 0xFEEDC0DE for messages coming from SSeNB to Proxy
* 0xF00DC0DE for messages coming from Proxy to SSeNB
* msg_id : To identify the message that is sent.
* cell_id : Cell ID
* length : Length of the message in bytes.
*/
typedef struct proxy_ss_header_s {
uint32_t preamble;
proxy_ss_msgs_e msg_id;
uint8_t cell_id;
uint16_t length; /** NOTE: Not needed */
} proxy_ss_header_t,
*proxy_ss_header_p;
typedef struct attenuationConfigReq_s
{
proxy_ss_header_t header;
uint8_t attnVal;
} attenuationConfigReq_t;
typedef struct attenuationConfigCnf_s
{
proxy_ss_header_t header;
uint8_t status;
} attenuationConfigCnf_t;
typedef struct CellConfigReq_s
{
proxy_ss_header_t header;
int16_t maxRefPower;
uint8_t initialAttenuation;
uint16_t dl_earfcn;
} CellConfigReq_t;
typedef struct CellConfigCnf_s
{
proxy_ss_header_t header;
uint8_t status;
} CellConfigCnf_t;
typedef struct VngCmdReq_s
{
proxy_ss_header_t header;
uint8_t bw;
int32_t NocLevel;
uint8_t cmd;
} VngCmdReq_t;
typedef struct VngCmdResp_s
{
proxy_ss_header_t header;
uint8_t status;
} VngCmdResp_t;
typedef struct VtpCmdReq_s {
proxy_ss_header_t header;
ss_upd_timinfo_t tinfo;
} VtpCmdReq_t;
#endif /* _SS_ENB_PROXY_IFACE_ */
This diff is collapsed.
#ifndef SS_GNB_SRB_TASK_H_
#define SS_GNB_SRB_TASK_H_
void ss_gNB_srb_init(void);
void *ss_gNB_srb_process_itti_msg(void *);
void *ss_gNB_srb_task(void *arg);
#endif /* SS_GNB_SRB_TASK_H_ */
This diff is collapsed.
...@@ -39,6 +39,7 @@ typedef enum ss_mode { ...@@ -39,6 +39,7 @@ typedef enum ss_mode {
} ss_mode_e; } ss_mode_e;
#else #else
#define SS_ENB (0x00) #define SS_ENB (0x00)
#define SS_GNB (0x00)
#define SS_SOFTMODEM (0x01) #define SS_SOFTMODEM (0x01)
#define SS_SOFTMODEM_SRB (0x02) #define SS_SOFTMODEM_SRB (0x02)
#endif #endif
...@@ -69,6 +70,15 @@ typedef struct ss_config_s { ...@@ -69,6 +70,15 @@ typedef struct ss_config_s {
ss_l1macind_ctrl_t l1macind; ss_l1macind_ctrl_t l1macind;
} ss_config_t; } ss_config_t;
typedef enum {
SS_STATE_NOT_CONFIGURED = 0,
SS_STATE_CELL_CONFIGURED,
SS_STATE_CELL_ACTIVE,
SS_STATE_AS_SECURITY_ACTIVE,
SS_STATE_AS_RBS_ACTIVE,
SS_STATE_CELL_BROADCASTING,
SS_STATE_MAX_STATE
} SS_STATE_t;
#endif /** __SS_CONFIG_H__ */ #endif /** __SS_CONFIG_H__ */
/** @} */ /** @} */
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment