Commit 1d3c88cd authored by matzakos's avatar matzakos

Fixed some warnings and removed redundant files.

parent ea33b914
...@@ -2001,6 +2001,8 @@ add_executable(lte-softmodem ...@@ -2001,6 +2001,8 @@ add_executable(lte-softmodem
${OPENAIR_TARGETS}/COMMON/create_tasks.c ${OPENAIR_TARGETS}/COMMON/create_tasks.c
${OPENAIR_TARGETS}/ARCH/COMMON/common_lib.c ${OPENAIR_TARGETS}/ARCH/COMMON/common_lib.c
${OPENAIR1_DIR}/SIMULATION/ETH_TRANSPORT/netlink_init.c ${OPENAIR1_DIR}/SIMULATION/ETH_TRANSPORT/netlink_init.c
${OPENAIR1_DIR}/SIMULATION/ETH_TRANSPORT/multicast_link.c
${OPENAIR1_DIR}/SIMULATION/ETH_TRANSPORT/socket.c
${OPENAIR3_DIR}/NAS/UE/nas_ue_task.c ${OPENAIR3_DIR}/NAS/UE/nas_ue_task.c
${OPENAIR_DIR}/common/utils/utils.c ${OPENAIR_DIR}/common/utils/utils.c
${OPENAIR_DIR}/common/utils/system.c ${OPENAIR_DIR}/common/utils/system.c
...@@ -2143,96 +2145,6 @@ target_link_libraries (lte-uesoftmodem-nos1 pthread m ${CONFIG_LIBRARIES} rt cry ...@@ -2143,96 +2145,6 @@ target_link_libraries (lte-uesoftmodem-nos1 pthread m ${CONFIG_LIBRARIES} rt cry
target_link_libraries (lte-uesoftmodem-nos1 ${LIB_LMS_LIBRARIES}) target_link_libraries (lte-uesoftmodem-nos1 ${LIB_LMS_LIBRARIES})
target_link_libraries (lte-uesoftmodem-nos1 ${T_LIB}) target_link_libraries (lte-uesoftmodem-nos1 ${T_LIB})
# lte-softmodem-stub-nos1 is both eNB and UE implementation
###################################################
add_executable(lte-softmodem-stub-nos1
${rrc_h}
${s1ap_h}
${OPENAIR_BIN_DIR}/messages_xml.h
${OPENAIR_TARGETS}/RT/USER/rt_wrapper.c
${OPENAIR_TARGETS}/RT/USER/lte-ue.c
${OPENAIR_TARGETS}/RT/USER/lte-enb.c
${OPENAIR_TARGETS}/RT/USER/lte-softmodem-stub.c
${OPENAIR1_DIR}/SIMULATION/TOOLS/taus.c
${OPENAIR_TARGETS}/SIMU/USER/init_lte.c
${OPENAIR_TARGETS}/COMMON/create_tasks.c
${OPENAIR_TARGETS}/COMMON/create_tasks_ue.c
${OPENAIR_TARGETS}/ARCH/COMMON/common_lib.c
${OPENAIR1_DIR}/SIMULATION/ETH_TRANSPORT/netlink_init.c
${OPENAIR1_DIR}/SIMULATION/ETH_TRANSPORT/multicast_link.c
${OPENAIR1_DIR}/SIMULATION/ETH_TRANSPORT/socket.c
#${OPENAIR3_DIR}/NAS/UE/nas_ue_task.c
${OPENAIR_DIR}/common/utils/utils.c
${OPENAIR_DIR}/common/utils/system.c
#${GTPU_need_ITTI}
#${RTAI_SOURCE}
${XFORMS_SOURCE}
${XFORMS_SOURCE_SOFTMODEM}
${T_SOURCE}
${CONFIG_SOURCES}
${SHLIB_LOADER_SOURCES}
)
target_link_libraries (lte-softmodem-stub-nos1
-Wl,--start-group
RRC_LIB SECU_CN SECU_OSA UTIL HASHTABLE SCTP_CLIENT UDP SCHED_LIB PHY LFDS L2 ${MSC_LIB} ${RAL_LIB} ${ITTI_LIB} ${MIH_LIB} ${FLPT_MSG_LIB} ${ASYNC_IF_LIB} ${FLEXRAN_AGENT_LIB} LFDS7
NFAPI_COMMON_LIB NFAPI_LIB NFAPI_VNF_LIB NFAPI_PNF_LIB
NFAPI_USER_LIB
-Wl,--end-group z dl)
target_link_libraries (lte-softmodem-stub-nos1 ${LIBXML2_LIBRARIES})
target_link_libraries (lte-softmodem-stub-nos1 pthread m ${CONFIG_LIBRARIES} rt crypt ${CRYPTO_LIBRARIES} ${OPENSSL_LIBRARIES} ${NETTLE_LIBRARIES} sctp ${XFORMS_LIBRARIES} ${PROTOBUF_LIB} ${CMAKE_DL_LIBS} ${LIBYAML_LIBRARIES})
target_link_libraries (lte-softmodem-stub-nos1 ${LIB_LMS_LIBRARIES})
target_link_libraries (lte-softmodem-stub-nos1 ${T_LIB})
# lte-softmodem-stub is both eNB and UE implementation
###################################################
add_executable(lte-softmodem-stub
${rrc_h}
${s1ap_h}
${OPENAIR_BIN_DIR}/messages_xml.h
${OPENAIR_TARGETS}/RT/USER/rt_wrapper.c
${OPENAIR_TARGETS}/RT/USER/lte-ue.c
${OPENAIR_TARGETS}/RT/USER/lte-enb.c
${OPENAIR_TARGETS}/RT/USER/lte-softmodem-stub.c
${OPENAIR1_DIR}/SIMULATION/TOOLS/taus.c
${OPENAIR_TARGETS}/SIMU/USER/init_lte.c
${OPENAIR_TARGETS}/COMMON/create_tasks.c
${OPENAIR_TARGETS}/COMMON/create_tasks_ue.c
${OPENAIR_TARGETS}/ARCH/COMMON/common_lib.c
${OPENAIR1_DIR}/SIMULATION/ETH_TRANSPORT/netlink_init.c
${OPENAIR1_DIR}/SIMULATION/ETH_TRANSPORT/multicast_link.c
${OPENAIR1_DIR}/SIMULATION/ETH_TRANSPORT/socket.c
${OPENAIR3_DIR}/NAS/UE/nas_ue_task.c
${OPENAIR_DIR}/common/utils/utils.c
${OPENAIR_DIR}/common/utils/system.c
${GTPU_need_ITTI}
#${RTAI_SOURCE}
${XFORMS_SOURCE}
${XFORMS_SOURCE_SOFTMODEM}
${T_SOURCE}
${CONFIG_SOURCES}
${SHLIB_LOADER_SOURCES}
)
target_link_libraries (lte-softmodem-stub
-Wl,--start-group
RRC_LIB S1AP_LIB S1AP_ENB GTPV1U SECU_CN SECU_OSA UTIL HASHTABLE SCTP_CLIENT UDP SCHED_LIB PHY LFDS L2 ${MSC_LIB} ${RAL_LIB} ${NAS_UE_LIB} ${ITTI_LIB} ${MIH_LIB} ${FLPT_MSG_LIB} ${ASYNC_IF_LIB} ${FLEXRAN_AGENT_LIB} LFDS7
NFAPI_COMMON_LIB NFAPI_LIB NFAPI_VNF_LIB NFAPI_PNF_LIB
NFAPI_USER_LIB
-Wl,--end-group z dl)
target_link_libraries (lte-softmodem-stub ${LIBXML2_LIBRARIES})
target_link_libraries (lte-softmodem-stub pthread m ${CONFIG_LIBRARIES} rt crypt ${CRYPTO_LIBRARIES} ${OPENSSL_LIBRARIES} ${NETTLE_LIBRARIES} sctp ${XFORMS_LIBRARIES} ${PROTOBUF_LIB} ${CMAKE_DL_LIBS} ${LIBYAML_LIBRARIES})
target_link_libraries (lte-softmodem-stub ${LIB_LMS_LIBRARIES})
target_link_libraries (lte-softmodem-stub ${T_LIB})
# USIM process # USIM process
...@@ -2471,7 +2383,7 @@ endforeach(myExe) ...@@ -2471,7 +2383,7 @@ endforeach(myExe)
if (${T_TRACER}) if (${T_TRACER})
foreach(i foreach(i
#all "add_executable" definitions (except tests, rb_tool, updatefw) #all "add_executable" definitions (except tests, rb_tool, updatefw)
lte-softmodem lte-softmodem-stub lte-softmodem-nos1 oaisim oaisim_nos1 lte-softmodem lte-softmodem-nos1 oaisim oaisim_nos1
dlsim_tm4 dlsim dlsim_tm7 ulsim pbchsim scansim mbmssim dlsim_tm4 dlsim dlsim_tm7 ulsim pbchsim scansim mbmssim
pdcchsim pucchsim prachsim syncsim pdcchsim pucchsim prachsim syncsim
......
...@@ -499,14 +499,6 @@ function main() { ...@@ -499,14 +499,6 @@ function main() {
DIR=$OPENAIR_DIR/cmake_targets DIR=$OPENAIR_DIR/cmake_targets
if [ "$NOS1" = "1" ] ; then if [ "$NOS1" = "1" ] ; then
lte_build_dir=lte_noS1_build_oai lte_build_dir=lte_noS1_build_oai
#<<<<<<< HEAD
# #lte_exec=lte-softmodem-nos1
# lte_exec=lte-softmodem-stub-nos1
# else
# lte_build_dir=lte_build_oai
# #lte_exec=lte-softmodem
# lte_exec=lte-softmodem-stub
#=======
if [ "$eNB" = "1" ] ; then if [ "$eNB" = "1" ] ; then
lte_exec=lte-softmodem-nos1 lte_exec=lte-softmodem-nos1
fi fi
...@@ -521,7 +513,6 @@ function main() { ...@@ -521,7 +513,6 @@ function main() {
if [ "$UE" = "1" ] ; then if [ "$UE" = "1" ] ; then
lte_exec=lte-uesoftmodem lte_exec=lte-uesoftmodem
fi fi
#>>>>>>> main/develop
fi fi
# configuration module libraries, one currently available, using libconfig # configuration module libraries, one currently available, using libconfig
......
...@@ -1832,7 +1832,6 @@ static uint8_t pack_crc_indication_body_value(void* tlv, uint8_t **ppWritePacked ...@@ -1832,7 +1832,6 @@ static uint8_t pack_crc_indication_body_value(void* tlv, uint8_t **ppWritePacked
nfapi_crc_indication_body_t* value = (nfapi_crc_indication_body_t*)tlv; nfapi_crc_indication_body_t* value = (nfapi_crc_indication_body_t*)tlv;
if(push16(value->number_of_crcs, ppWritePackedMsg, end) == 0){ if(push16(value->number_of_crcs, ppWritePackedMsg, end) == 0){
printf("Panos-D: pack_crc_indication_body_value 0 \n");
return 0; return 0;
} }
...@@ -1844,13 +1843,11 @@ static uint8_t pack_crc_indication_body_value(void* tlv, uint8_t **ppWritePacked ...@@ -1844,13 +1843,11 @@ static uint8_t pack_crc_indication_body_value(void* tlv, uint8_t **ppWritePacked
uint8_t* instance_length_p = *ppWritePackedMsg; uint8_t* instance_length_p = *ppWritePackedMsg;
if(!push16(pdu->instance_length, ppWritePackedMsg, end)){ if(!push16(pdu->instance_length, ppWritePackedMsg, end)){
printf("Panos-D: pack_crc_indication_body_value 1 \n");
return 0; return 0;
} }
if(!(pack_tlv(NFAPI_RX_UE_INFORMATION_TAG, &pdu->rx_ue_information, ppWritePackedMsg, end, pack_rx_ue_information_value) && if(!(pack_tlv(NFAPI_RX_UE_INFORMATION_TAG, &pdu->rx_ue_information, ppWritePackedMsg, end, pack_rx_ue_information_value) &&
pack_tlv(NFAPI_CRC_INDICATION_REL8_TAG, &pdu->crc_indication_rel8, ppWritePackedMsg, end, pack_crc_indication_rel8_body))){ pack_tlv(NFAPI_CRC_INDICATION_REL8_TAG, &pdu->crc_indication_rel8, ppWritePackedMsg, end, pack_crc_indication_rel8_body))){
printf("Panos-D: pack_crc_indication_body_value 2 \n");
return 0; return 0;
} }
...@@ -1965,7 +1962,6 @@ static uint8_t pack_rx_ulsch_indication_body_value(void *tlv, uint8_t **ppWriteP ...@@ -1965,7 +1962,6 @@ static uint8_t pack_rx_ulsch_indication_body_value(void *tlv, uint8_t **ppWriteP
} }
if( pusharray8(value->rx_pdu_list[i].data, length, length, ppWritePackedMsg, end) == 0){ if( pusharray8(value->rx_pdu_list[i].data, length, length, ppWritePackedMsg, end) == 0){
printf("Panos-D: pack_rx_ulsch_indication_body_value() 2 about to return error \n");
return 0; return 0;
} }
} }
...@@ -2788,7 +2784,7 @@ int nfapi_p7_message_pack(void *pMessageBuf, void *pPackedBuf, uint32_t packedBu ...@@ -2788,7 +2784,7 @@ int nfapi_p7_message_pack(void *pMessageBuf, void *pPackedBuf, uint32_t packedBu
pMessageHeader->message_length = packedMsgLen16; pMessageHeader->message_length = packedMsgLen16;
if(!push16(packedMsgLen16, &pPackedLengthField, end)){ if(!push16(packedMsgLen16, &pPackedLengthField, end)){
printf("Panos-D: Pack function failed. Returning... \n"); //printf("Panos-D: Pack function failed. Returning... \n");
return -1; return -1;
} }
...@@ -2797,7 +2793,7 @@ int nfapi_p7_message_pack(void *pMessageBuf, void *pPackedBuf, uint32_t packedBu ...@@ -2797,7 +2793,7 @@ int nfapi_p7_message_pack(void *pMessageBuf, void *pPackedBuf, uint32_t packedBu
//quick test //quick test
if(pMessageHeader->message_length != packedMsgLen) if(pMessageHeader->message_length != packedMsgLen)
{ {
printf("Panos-D: nfapi packedMsgLen(%d) != message_length(%d) id %d\n", packedMsgLen, pMessageHeader->message_length, pMessageHeader->message_id); //printf("Panos-D: nfapi packedMsgLen(%d) != message_length(%d) id %d\n", packedMsgLen, pMessageHeader->message_length, pMessageHeader->message_id);
NFAPI_TRACE(NFAPI_TRACE_ERROR, "nfapi packedMsgLen(%d) != message_length(%d) id %d\n", packedMsgLen, pMessageHeader->message_length, pMessageHeader->message_id); NFAPI_TRACE(NFAPI_TRACE_ERROR, "nfapi packedMsgLen(%d) != message_length(%d) id %d\n", packedMsgLen, pMessageHeader->message_length, pMessageHeader->message_id);
} }
} }
......
...@@ -416,14 +416,14 @@ int pnf_p7_send_message(pnf_p7_t* pnf_p7, uint8_t* msg, uint32_t len) ...@@ -416,14 +416,14 @@ int pnf_p7_send_message(pnf_p7_t* pnf_p7, uint8_t* msg, uint32_t len)
int sendto_result; int sendto_result;
if ((sendto_result = sendto((int)pnf_p7->p7_sock, (const char*)msg, len, 0, (const struct sockaddr*)&remote_addr, remote_addr_len)) < 0) if ((sendto_result = sendto((int)pnf_p7->p7_sock, (const char*)msg, len, 0, (const struct sockaddr*)&remote_addr, remote_addr_len)) < 0)
{ {
printf("Panos-D: %s %s:%d sendto(%d, %p, %d) %d failed errno: %d\n", __FUNCTION__, pnf_p7->_public.remote_p7_addr, pnf_p7->_public.remote_p7_port, (int)pnf_p7->p7_sock, (const char*)msg, len, remote_addr_len, errno); //printf("Panos-D: %s %s:%d sendto(%d, %p, %d) %d failed errno: %d\n", __FUNCTION__, pnf_p7->_public.remote_p7_addr, pnf_p7->_public.remote_p7_port, (int)pnf_p7->p7_sock, (const char*)msg, len, remote_addr_len, errno);
NFAPI_TRACE(NFAPI_TRACE_ERROR, "%s %s:%d sendto(%d, %p, %d) %d failed errno: %d\n", __FUNCTION__, pnf_p7->_public.remote_p7_addr, pnf_p7->_public.remote_p7_port, (int)pnf_p7->p7_sock, (const char*)msg, len, remote_addr_len, errno); NFAPI_TRACE(NFAPI_TRACE_ERROR, "%s %s:%d sendto(%d, %p, %d) %d failed errno: %d\n", __FUNCTION__, pnf_p7->_public.remote_p7_addr, pnf_p7->_public.remote_p7_port, (int)pnf_p7->p7_sock, (const char*)msg, len, remote_addr_len, errno);
return -1; return -1;
} }
if(sendto_result != len) if(sendto_result != len)
{ {
printf("Panos-D: %s sendto failed to send the entire message %d %d\n", __FUNCTION__, sendto_result, len); //printf("Panos-D: %s sendto failed to send the entire message %d %d\n", __FUNCTION__, sendto_result, len);
NFAPI_TRACE(NFAPI_TRACE_ERROR, "%s sendto failed to send the entire message %d %d\n", __FUNCTION__, sendto_result, len); NFAPI_TRACE(NFAPI_TRACE_ERROR, "%s sendto failed to send the entire message %d %d\n", __FUNCTION__, sendto_result, len);
} }
return 0; return 0;
...@@ -436,7 +436,7 @@ int pnf_p7_pack_and_send_p7_message(pnf_p7_t* pnf_p7, nfapi_p7_message_header_t* ...@@ -436,7 +436,7 @@ int pnf_p7_pack_and_send_p7_message(pnf_p7_t* pnf_p7, nfapi_p7_message_header_t*
// Need to guard against different threads calling the encode function at the same time // Need to guard against different threads calling the encode function at the same time
if(pthread_mutex_lock(&(pnf_p7->pack_mutex)) != 0) if(pthread_mutex_lock(&(pnf_p7->pack_mutex)) != 0)
{ {
printf("Panos-D: failed to lock mutex 1\n"); //printf("Panos-D: failed to lock mutex 1\n");
NFAPI_TRACE(NFAPI_TRACE_INFO, "failed to lock mutex\n"); NFAPI_TRACE(NFAPI_TRACE_INFO, "failed to lock mutex\n");
return -1; return -1;
} }
...@@ -447,12 +447,12 @@ int pnf_p7_pack_and_send_p7_message(pnf_p7_t* pnf_p7, nfapi_p7_message_header_t* ...@@ -447,12 +447,12 @@ int pnf_p7_pack_and_send_p7_message(pnf_p7_t* pnf_p7, nfapi_p7_message_header_t*
{ {
if(pthread_mutex_unlock(&(pnf_p7->pack_mutex)) != 0) if(pthread_mutex_unlock(&(pnf_p7->pack_mutex)) != 0)
{ {
printf("Panos-D: failed to unlock mutex 2\n"); //printf("Panos-D: failed to unlock mutex 2\n");
NFAPI_TRACE(NFAPI_TRACE_INFO, "failed to unlock mutex\n"); NFAPI_TRACE(NFAPI_TRACE_INFO, "failed to unlock mutex\n");
return -1; return -1;
} }
printf("Panos-D: nfapi_p7_message_pack failed with return %d\n", len); //printf("Panos-D: nfapi_p7_message_pack failed with return %d\n", len);
NFAPI_TRACE(NFAPI_TRACE_ERROR, "nfapi_p7_message_pack failed with return %d\n", len ); NFAPI_TRACE(NFAPI_TRACE_ERROR, "nfapi_p7_message_pack failed with return %d\n", len );
return -1; return -1;
} }
...@@ -466,7 +466,7 @@ int pnf_p7_pack_and_send_p7_message(pnf_p7_t* pnf_p7, nfapi_p7_message_header_t* ...@@ -466,7 +466,7 @@ int pnf_p7_pack_and_send_p7_message(pnf_p7_t* pnf_p7, nfapi_p7_message_header_t*
int segment = 0; int segment = 0;
int offset = NFAPI_P7_HEADER_LENGTH; int offset = NFAPI_P7_HEADER_LENGTH;
uint8_t buffer[pnf_p7->_public.segment_size]; uint8_t buffer[pnf_p7->_public.segment_size];
printf("Panos-D: pnf_p7_pack_and_send_p7_message sending through multiple segments \n"); //printf("Panos-D: pnf_p7_pack_and_send_p7_message sending through multiple segments \n");
for(segment = 0; segment < segment_count; ++segment) for(segment = 0; segment < segment_count; ++segment)
{ {
uint8_t last = 0; uint8_t last = 0;
...@@ -826,7 +826,7 @@ int pnf_p7_subframe_ind(pnf_p7_t* pnf_p7, uint16_t phy_id, uint16_t sfn_sf) ...@@ -826,7 +826,7 @@ int pnf_p7_subframe_ind(pnf_p7_t* pnf_p7, uint16_t phy_id, uint16_t sfn_sf)
} }
else if(pnf_p7->_public.timing_info_mode_aperiodic && pnf_p7->timing_info_aperiodic_send) else if(pnf_p7->_public.timing_info_mode_aperiodic && pnf_p7->timing_info_aperiodic_send)
{ {
printf("Panos-D: Sending aperiodic timing info message \n"); printf("Sending aperiodic timing info message \n");
pnf_pack_and_send_timing_info(pnf_p7); pnf_pack_and_send_timing_info(pnf_p7);
pnf_p7->timing_info_aperiodic_send = 0; pnf_p7->timing_info_aperiodic_send = 0;
...@@ -1369,7 +1369,7 @@ void pnf_handle_dl_node_sync(void *pRecvMsg, int recvMsgLen, pnf_p7_t* pnf_p7, u ...@@ -1369,7 +1369,7 @@ void pnf_handle_dl_node_sync(void *pRecvMsg, int recvMsgLen, pnf_p7_t* pnf_p7, u
// unpack the message // unpack the message
if (nfapi_p7_message_unpack(pRecvMsg, recvMsgLen, &dl_node_sync, sizeof(dl_node_sync), &pnf_p7->_public.codec_config) < 0) if (nfapi_p7_message_unpack(pRecvMsg, recvMsgLen, &dl_node_sync, sizeof(dl_node_sync), &pnf_p7->_public.codec_config) < 0)
{ {
printf("Panos-D: %s: Unpack message failed, ignoring\n", __FUNCTION__); //printf("Panos-D: %s: Unpack message failed, ignoring\n", __FUNCTION__);
NFAPI_TRACE(NFAPI_TRACE_ERROR, "%s: Unpack message failed, ignoring\n", __FUNCTION__); NFAPI_TRACE(NFAPI_TRACE_ERROR, "%s: Unpack message failed, ignoring\n", __FUNCTION__);
return; return;
} }
......
...@@ -117,7 +117,6 @@ int nfapi_pnf_p7_crc_ind(nfapi_pnf_p7_config_t* config, nfapi_crc_indication_t* ...@@ -117,7 +117,6 @@ int nfapi_pnf_p7_crc_ind(nfapi_pnf_p7_config_t* config, nfapi_crc_indication_t*
{ {
if(config == NULL || ind == NULL) if(config == NULL || ind == NULL)
{ {
printf("Panos-D: %s: invalid input params\n", __FUNCTION__);
NFAPI_TRACE(NFAPI_TRACE_ERROR, "%s: invalid input params\n", __FUNCTION__); NFAPI_TRACE(NFAPI_TRACE_ERROR, "%s: invalid input params\n", __FUNCTION__);
return -1; return -1;
} }
...@@ -129,7 +128,6 @@ int nfapi_pnf_p7_rx_ind(nfapi_pnf_p7_config_t* config, nfapi_rx_indication_t* in ...@@ -129,7 +128,6 @@ int nfapi_pnf_p7_rx_ind(nfapi_pnf_p7_config_t* config, nfapi_rx_indication_t* in
{ {
if(config == NULL || ind == NULL) if(config == NULL || ind == NULL)
{ {
printf("Panos-D: %s: invalid input params\n", __FUNCTION__);
NFAPI_TRACE(NFAPI_TRACE_ERROR, "%s: invalid input params\n", __FUNCTION__); NFAPI_TRACE(NFAPI_TRACE_ERROR, "%s: invalid input params\n", __FUNCTION__);
return -1; return -1;
} }
......
...@@ -370,8 +370,6 @@ void phy_cleanup(void); ...@@ -370,8 +370,6 @@ void phy_cleanup(void);
void phy_config_request(PHY_Config_t *phy_config); void phy_config_request(PHY_Config_t *phy_config);
void phy_config_request_ue(UE_PHY_Config_t* UE_config_INFO);
int init_frame_parms(LTE_DL_FRAME_PARMS *frame_parms,uint8_t osf); int init_frame_parms(LTE_DL_FRAME_PARMS *frame_parms,uint8_t osf);
void dump_frame_parms(LTE_DL_FRAME_PARMS *frame_parms); void dump_frame_parms(LTE_DL_FRAME_PARMS *frame_parms);
......
...@@ -1278,7 +1278,7 @@ uint16_t pucchfmt3_ChannelEstimation( int16_t SubCarrierDeMapData[NB_ANTENNAS_RX ...@@ -1278,7 +1278,7 @@ uint16_t pucchfmt3_ChannelEstimation( int16_t SubCarrierDeMapData[NB_ANTENNAS_RX
int32_t IP_CsData_allsfavg[NB_ANTENNAS_RX][14][4][2]; int32_t IP_CsData_allsfavg[NB_ANTENNAS_RX][14][4][2];
int32_t IP_allavg[D_NPUCCH_SF5]; int32_t IP_allavg[D_NPUCCH_SF5];
//int16_t temp_ch[2]; //int16_t temp_ch[2];
int16_t m[NUMBER_OF_UE_MAX], m_self, same_m_number; int16_t m[NUMBER_OF_UE_MAX], m_self=0, same_m_number;
uint16_t n3_pucch_sameRB[NUMBER_OF_UE_MAX]; uint16_t n3_pucch_sameRB[NUMBER_OF_UE_MAX];
int16_t n_oc0[NUMBER_OF_UE_MAX]; int16_t n_oc0[NUMBER_OF_UE_MAX];
int16_t n_oc1[NUMBER_OF_UE_MAX]; int16_t n_oc1[NUMBER_OF_UE_MAX];
......
...@@ -33,6 +33,7 @@ ...@@ -33,6 +33,7 @@
#define __LTE_TRANSPORT_SLSS__C__ #define __LTE_TRANSPORT_SLSS__C__
#include "PHY/defs.h" #include "PHY/defs.h"
extern int multicast_link_write_sock(int groupP, char *dataP, uint32_t sizeP);
void generate_sldch(PHY_VARS_UE *ue,SLDCH_t *sldch,int frame_tx,int subframe_tx) { void generate_sldch(PHY_VARS_UE *ue,SLDCH_t *sldch,int frame_tx,int subframe_tx) {
......
...@@ -33,6 +33,9 @@ ...@@ -33,6 +33,9 @@
#define __LTE_TRANSPORT_SLSS__C__ #define __LTE_TRANSPORT_SLSS__C__
#include "PHY/defs.h" #include "PHY/defs.h"
extern int
multicast_link_write_sock(int groupP, char *dataP, uint32_t sizeP);
void generate_slsch(PHY_VARS_UE *ue,SLSCH_t *slsch,int frame_tx,int subframe_tx) { void generate_slsch(PHY_VARS_UE *ue,SLSCH_t *slsch,int frame_tx,int subframe_tx) {
......
...@@ -58,7 +58,7 @@ ...@@ -58,7 +58,7 @@
#include "msc.h" #include "msc.h"
#include "openair2/PHY_INTERFACE/IF_Module.h" #include "openair2/PHY_INTERFACE/IF_Module.h"
#include "openair2/PHY_INTERFACE/IF_Module_UE.h" //#include "openair2/PHY_INTERFACE/IF_Module_UE.h"
//#include <complex.h> //#include <complex.h>
#include "assertions.h" #include "assertions.h"
...@@ -1434,12 +1434,6 @@ typedef struct { ...@@ -1434,12 +1434,6 @@ typedef struct {
/// N0 (used for abstraction) /// N0 (used for abstraction)
double N0; double N0;
/// Panos: Pointer to IF_Module_UE instance of the UE.
IF_Module_UE_t *if_inst_ue;
/// Panos: Pointer to DL.indication structure of the UE.
UE_DL_IND_t UE_DL_INFO;
/// PDSCH Varaibles /// PDSCH Varaibles
PDSCH_CONFIG_DEDICATED pdsch_config_dedicated[NUMBER_OF_CONNECTED_eNB_MAX]; PDSCH_CONFIG_DEDICATED pdsch_config_dedicated[NUMBER_OF_CONNECTED_eNB_MAX];
......
...@@ -1169,8 +1169,8 @@ void pusch_procedures(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc) ...@@ -1169,8 +1169,8 @@ void pusch_procedures(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc)
LTE_DL_FRAME_PARMS *fp=&eNB->frame_parms; LTE_DL_FRAME_PARMS *fp=&eNB->frame_parms;
LTE_eNB_ULSCH_t *ulsch; LTE_eNB_ULSCH_t *ulsch;
LTE_UL_eNB_HARQ_t *ulsch_harq; LTE_UL_eNB_HARQ_t *ulsch_harq;
struct timespec t_decode, t_crc,t_rx_ind,t_rx_ind_b,t_harq_a,t_harq_b,t_end; struct timespec t_harq_a,t_harq_b;
//struct timespec t_decode, t_crc,t_rx_ind,t_rx_ind_b, t_end;
const int subframe = proc->subframe_rx; const int subframe = proc->subframe_rx;
const int frame = proc->frame_rx; const int frame = proc->frame_rx;
......
...@@ -2769,53 +2769,6 @@ void ue_pbch_procedures(uint8_t eNB_id,PHY_VARS_UE *ue,UE_rxtx_proc_t *proc, uin ...@@ -2769,53 +2769,6 @@ void ue_pbch_procedures(uint8_t eNB_id,PHY_VARS_UE *ue,UE_rxtx_proc_t *proc, uin
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_UE_PBCH_PROCEDURES, VCD_FUNCTION_OUT); VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_UE_PBCH_PROCEDURES, VCD_FUNCTION_OUT);
} }
// Panos: New function supporting the MAC interface
void fill_bch_indication(module_id_t module_idP,
frame_t frameP,
unsigned char eNB_index,
uint8_t first_sync,
uint8_t sync)
{
}
// Panos: New function supporting the MAC interface
void fill_dlsch_indication(module_id_t module_idP,
uint8_t CC_id,
frame_t frameP,
sub_frame_t subframeP,
uint8_t* sdu,
uint16_t sdu_len,
uint8_t eNB_index)
{
}
// Panos: New function supporting the MAC interface
void fill_dlsch_rar_indication(module_id_t module_idP,
int CC_id,
frame_t frameP,
rnti_t ra_rnti,
uint8_t* dlsch_buffer,
rnti_t* t_crnti,
uint8_t preamble_index,
uint8_t* selected_rar_buffer)
{
}
// PANOS: New function supporting the MAC interface
void fill_Tx_indication(module_id_t module_idP,uint8_t CC_id,frame_t frameP, uint8_t eNB_id, uint8_t Tx_ind_type)
{
switch (Tx_ind_type)
{
case UE_MAC_Tx_IND_Msg1_TYPE:
break;
case UE_MAC_Tx_IND_Msg3_TYPE:
break;
}
}
int ue_pdcch_procedures(uint8_t eNB_id,PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t abstraction_flag) int ue_pdcch_procedures(uint8_t eNB_id,PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t abstraction_flag)
......
This diff is collapsed.
...@@ -3204,7 +3204,7 @@ SLSS_t *ue_get_slss(module_id_t Mod_id,int CC_id,frame_t frame_tx,sub_frame_t su ...@@ -3204,7 +3204,7 @@ SLSS_t *ue_get_slss(module_id_t Mod_id,int CC_id,frame_t frame_tx,sub_frame_t su
SLDCH_t *ue_get_sldch(module_id_t Mod_id,int CC_id,frame_t frame_tx,sub_frame_t subframe_tx) { SLDCH_t *ue_get_sldch(module_id_t Mod_id,int CC_id,frame_t frame_tx,sub_frame_t subframe_tx) {
UE_MAC_INST *ue = &UE_mac_inst[Mod_id]; //UE_MAC_INST *ue = &UE_mac_inst[Mod_id];
SLDCH_t *sldch = &UE_mac_inst[Mod_id].sldch; SLDCH_t *sldch = &UE_mac_inst[Mod_id].sldch;
// Panos: Ask TTN if we should be calling mac_rrc_data_req_ue() instead of mac_rrc_data_req() now! // Panos: Ask TTN if we should be calling mac_rrc_data_req_ue() instead of mac_rrc_data_req() now!
/*sldch->payload_length = mac_rrc_data_req(Mod_id, /*sldch->payload_length = mac_rrc_data_req(Mod_id,
...@@ -3222,7 +3222,7 @@ SLDCH_t *ue_get_sldch(module_id_t Mod_id,int CC_id,frame_t frame_tx,sub_frame_t ...@@ -3222,7 +3222,7 @@ SLDCH_t *ue_get_sldch(module_id_t Mod_id,int CC_id,frame_t frame_tx,sub_frame_t
frame_tx, frame_tx,
SL_DISCOVERY, SL_DISCOVERY,
1, 1,
(char*)(sldch->payload), //&UE_mac_inst[Mod_id].SL_Discovery[0].Tx_buffer.Payload[0], (uint8_t*)(sldch->payload), //&UE_mac_inst[Mod_id].SL_Discovery[0].Tx_buffer.Payload[0],
0, //eNB_indexP 0, //eNB_indexP
0); 0);
...@@ -3240,7 +3240,7 @@ SLDCH_t *ue_get_sldch(module_id_t Mod_id,int CC_id,frame_t frame_tx,sub_frame_t ...@@ -3240,7 +3240,7 @@ SLDCH_t *ue_get_sldch(module_id_t Mod_id,int CC_id,frame_t frame_tx,sub_frame_t
SLSCH_t *ue_get_slsch(module_id_t module_idP,int CC_id,frame_t frameP,sub_frame_t subframeP) { SLSCH_t *ue_get_slsch(module_id_t module_idP,int CC_id,frame_t frameP,sub_frame_t subframeP) {
mac_rlc_status_resp_t rlc_status, rlc_status_data; mac_rlc_status_resp_t rlc_status; //, rlc_status_data;
uint32_t absSF = (frameP*10)+subframeP; uint32_t absSF = (frameP*10)+subframeP;
UE_MAC_INST *ue = &UE_mac_inst[module_idP]; UE_MAC_INST *ue = &UE_mac_inst[module_idP];
int rvtab[4] = {0,2,3,1}; int rvtab[4] = {0,2,3,1};
......
...@@ -469,7 +469,7 @@ int pdcp_pc5_sockfd; ...@@ -469,7 +469,7 @@ int pdcp_pc5_sockfd;
struct sockaddr_in prose_ctrl_addr; struct sockaddr_in prose_ctrl_addr;
struct sockaddr_in prose_pdcp_addr; struct sockaddr_in prose_pdcp_addr;
struct sockaddr_in pdcp_sin; struct sockaddr_in pdcp_sin;
int pdcp_pc5_socket_init(); void pdcp_pc5_socket_init(void);
typedef struct { typedef struct {
rb_id_t rb_id; rb_id_t rb_id;
......
...@@ -487,13 +487,14 @@ int pdcp_fifo_read_input_sdus (const protocol_ctxt_t* const ctxt_pP) ...@@ -487,13 +487,14 @@ int pdcp_fifo_read_input_sdus (const protocol_ctxt_t* const ctxt_pP)
#ifdef Rel14 #ifdef Rel14
int prose_addr_len; int prose_addr_len;
char send_buf[BUFSIZE], receive_buf[BUFSIZE]; char send_buf[BUFSIZE], receive_buf[BUFSIZE];
int optval; // Panos: Remove the following definitions due to warnings of unused variables.
//int optval;
int bytes_received; int bytes_received;
sidelink_pc5s_element *sl_pc5s_msg_recv = NULL; sidelink_pc5s_element *sl_pc5s_msg_recv = NULL;
sidelink_pc5s_element *sl_pc5s_msg_send = NULL; sidelink_pc5s_element *sl_pc5s_msg_send = NULL;
uint32_t sourceL2Id; //uint32_t sourceL2Id;
uint32_t groupL2Id; //uint32_t groupL2Id;
module_id_t module_id = 0; //module_id_t module_id = 0;
pc5s_header_t *pc5s_header; pc5s_header_t *pc5s_header;
#endif #endif
...@@ -633,7 +634,7 @@ int pdcp_fifo_read_input_sdus (const protocol_ctxt_t* const ctxt_pP) ...@@ -633,7 +634,7 @@ int pdcp_fifo_read_input_sdus (const protocol_ctxt_t* const ctxt_pP)
// receive a message from ProSe App // receive a message from ProSe App
memset(receive_buf, 0, BUFSIZE); memset(receive_buf, 0, BUFSIZE);
bytes_received = recvfrom(pdcp_pc5_sockfd, receive_buf, BUFSIZE, 0, bytes_received = recvfrom(pdcp_pc5_sockfd, receive_buf, BUFSIZE, 0,
(struct sockaddr *) &prose_pdcp_addr, &prose_addr_len); (struct sockaddr *) &prose_pdcp_addr, (socklen_t *)&prose_addr_len);
// if (bytes_received < 0){ // if (bytes_received < 0){
// LOG_E(RRC, "ERROR: Failed to receive from ProSe App\n"); // LOG_E(RRC, "ERROR: Failed to receive from ProSe App\n");
// exit(EXIT_FAILURE); // exit(EXIT_FAILURE);
...@@ -720,7 +721,7 @@ int pdcp_fifo_read_input_sdus (const protocol_ctxt_t* const ctxt_pP) ...@@ -720,7 +721,7 @@ int pdcp_fifo_read_input_sdus (const protocol_ctxt_t* const ctxt_pP)
key = PDCP_COLL_KEY_DEFAULT_DRB_VALUE(ctxt.module_id, ctxt.rnti, ctxt.enb_flag); key = PDCP_COLL_KEY_DEFAULT_DRB_VALUE(ctxt.module_id, ctxt.rnti, ctxt.enb_flag);
h_rc = hashtable_get(pdcp_coll_p, key, (void**)&pdcp_p); h_rc = hashtable_get(pdcp_coll_p, key, (void**)&pdcp_p);
LOG_I(PDCP,"request key %x : (%d,%x,%d,%d)\n", LOG_I(PDCP,"request key %x : (%d,%x,%d,%d)\n",
key,ctxt.module_id, ctxt.rnti, ctxt.enb_flag, rab_id); (uint8_t)key,ctxt.module_id, ctxt.rnti, ctxt.enb_flag, rab_id);
} else { } else {
rab_id = rab_id % maxDRB; rab_id = rab_id % maxDRB;
LOG_I(PDCP, "PDCP_COLL_KEY_VALUE(module_id=%d, rnti=%x, enb_flag=%d, rab_id=%d, SRB_FLAG=%d)\n", LOG_I(PDCP, "PDCP_COLL_KEY_VALUE(module_id=%d, rnti=%x, enb_flag=%d, rab_id=%d, SRB_FLAG=%d)\n",
...@@ -728,7 +729,7 @@ int pdcp_fifo_read_input_sdus (const protocol_ctxt_t* const ctxt_pP) ...@@ -728,7 +729,7 @@ int pdcp_fifo_read_input_sdus (const protocol_ctxt_t* const ctxt_pP)
key = PDCP_COLL_KEY_VALUE(ctxt.module_id, ctxt.rnti, ctxt.enb_flag, rab_id, SRB_FLAG_NO); key = PDCP_COLL_KEY_VALUE(ctxt.module_id, ctxt.rnti, ctxt.enb_flag, rab_id, SRB_FLAG_NO);
h_rc = hashtable_get(pdcp_coll_p, key, (void**)&pdcp_p); h_rc = hashtable_get(pdcp_coll_p, key, (void**)&pdcp_p);
LOG_I(PDCP,"request key %x : (%d,%x,%d,%d)\n", LOG_I(PDCP,"request key %x : (%d,%x,%d,%d)\n",
key,ctxt.module_id, ctxt.rnti, ctxt.enb_flag, rab_id); (uint8_t)key,ctxt.module_id, ctxt.rnti, ctxt.enb_flag, rab_id);
} }
if (h_rc == HASH_TABLE_OK) { if (h_rc == HASH_TABLE_OK) {
...@@ -1027,7 +1028,7 @@ int pdcp_fifo_read_input_sdus (const protocol_ctxt_t* const ctxt_pP) ...@@ -1027,7 +1028,7 @@ int pdcp_fifo_read_input_sdus (const protocol_ctxt_t* const ctxt_pP)
key = PDCP_COLL_KEY_DEFAULT_DRB_VALUE(ctxt.module_id, ctxt.rnti, ctxt.enb_flag); key = PDCP_COLL_KEY_DEFAULT_DRB_VALUE(ctxt.module_id, ctxt.rnti, ctxt.enb_flag);
h_rc = hashtable_get(pdcp_coll_p, key, (void**)&pdcp_p); h_rc = hashtable_get(pdcp_coll_p, key, (void**)&pdcp_p);
LOG_I(PDCP,"request key %x : (%d,%x,%d,%d)\n", LOG_I(PDCP,"request key %x : (%d,%x,%d,%d)\n",
key,ctxt.module_id, ctxt.rnti, ctxt.enb_flag, rab_id); (uint8_t)key,ctxt.module_id, ctxt.rnti, ctxt.enb_flag, rab_id);
} else { } else {
rab_id = rab_id % maxDRB; rab_id = rab_id % maxDRB;
LOG_I(PDCP, "PDCP_COLL_KEY_VALUE(module_id=%d, rnti=%x, enb_flag=%d, rab_id=%d, SRB_FLAG=%d)\n", LOG_I(PDCP, "PDCP_COLL_KEY_VALUE(module_id=%d, rnti=%x, enb_flag=%d, rab_id=%d, SRB_FLAG=%d)\n",
...@@ -1035,7 +1036,7 @@ int pdcp_fifo_read_input_sdus (const protocol_ctxt_t* const ctxt_pP) ...@@ -1035,7 +1036,7 @@ int pdcp_fifo_read_input_sdus (const protocol_ctxt_t* const ctxt_pP)
key = PDCP_COLL_KEY_VALUE(ctxt.module_id, ctxt.rnti, ctxt.enb_flag, rab_id, SRB_FLAG_NO); key = PDCP_COLL_KEY_VALUE(ctxt.module_id, ctxt.rnti, ctxt.enb_flag, rab_id, SRB_FLAG_NO);
h_rc = hashtable_get(pdcp_coll_p, key, (void**)&pdcp_p); h_rc = hashtable_get(pdcp_coll_p, key, (void**)&pdcp_p);
LOG_I(PDCP,"request key %x : (%d,%x,%d,%d)\n", LOG_I(PDCP,"request key %x : (%d,%x,%d,%d)\n",
key,ctxt.module_id, ctxt.rnti, ctxt.enb_flag, rab_id); (uint8_t)key,ctxt.module_id, ctxt.rnti, ctxt.enb_flag, rab_id);
} }
if (h_rc == HASH_TABLE_OK) { if (h_rc == HASH_TABLE_OK) {
...@@ -1186,12 +1187,12 @@ void pdcp_fifo_read_input_sdus_from_otg (const protocol_ctxt_t* const ctxt_pP) ...@@ -1186,12 +1187,12 @@ void pdcp_fifo_read_input_sdus_from_otg (const protocol_ctxt_t* const ctxt_pP)
//TTN for D2D (PC5S) //TTN for D2D (PC5S)
#ifdef Rel14 #ifdef Rel14
int void
pdcp_pc5_socket_init() { pdcp_pc5_socket_init() {
pthread_attr_t attr; //pthread_attr_t attr;
struct sched_param sched_param; //struct sched_param sched_param;
int optval; // flag value for setsockopt int optval; // flag value for setsockopt
int n; // message byte size