Commit c2cb5678 authored by gauthier's avatar gauthier

make build test work after the removal of RAL, MIH (802.21), minor coding...

make build test work after the removal of RAL, MIH (802.21), minor coding guidelines corrections in RLCs

git-svn-id: http://svn.eurecom.fr/openair4G/trunk@7753 818b1a75-f10b-46b9-bf7c-635c3b92a50f
parent aff0b849
......@@ -545,7 +545,7 @@ add_boolean_option(RRC_DEFAULT_RAB_IS_AM False "Otherwise it is UM, confi
# SPECIFIC OPTIONS
##########################
add_boolean_option(SPECTRA False "???")
add_boolean_option(MIH_C_MEDIEVAL_EXTENSIONS True "EXTENSIONS TO MIH 802.21 IN CONTEXT OF IST PROJECT CALLED MEDIEVAL")
add_boolean_option(MIH_C_MEDIEVAL_EXTENSIONS False "EXTENSIONS TO MIH 802.21 IN CONTEXT OF IST PROJECT CALLED MEDIEVAL")
......@@ -646,7 +646,8 @@ include_directories(${OPENAIR_DIR}/common/utils/collection/hashtable)
if (MESSAGE_CHART_GENERATOR)
add_library(MSC
${OPENAIR_DIR}/common/utils/msc/msc.c
)
)
set(MSC_LIB MSC)
endif()
include_directories(${OPENAIR_DIR}/common/utils/msc)
......@@ -1560,17 +1561,11 @@ add_executable(lte-softmodem
${XFORMS_SOURCE_SOFTMODEM}
)
if (MESSAGE_CHART_GENERATOR)
target_link_libraries (lte-softmodem
-Wl,--start-group
RRC_LIB S1AP_LIB S1AP_ENB GTPV1U SECU_CN SECU_OSA UTIL HASHTABLE SCTP_CLIENT UDP SCHED_LIB PHY LFDS MSC L2 ${RAL_LIB} ${NAS_UE_LIB} ${ITTI_LIB} ${MIH_LIB}
-Wl,--end-group )
else (MESSAGE_CHART_GENERATOR)
target_link_libraries (lte-softmodem
-Wl,--start-group
RRC_LIB S1AP_LIB S1AP_ENB GTPV1U SECU_CN SECU_OSA UTIL HASHTABLE SCTP_CLIENT UDP SCHED_LIB PHY LFDS L2 ${RAL_LIB} ${NAS_UE_LIB} ${ITTI_LIB} ${MIH_LIB}
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}
-Wl,--end-group )
endif(MESSAGE_CHART_GENERATOR)
target_link_libraries (lte-softmodem ${LIBXML2_LIBRARIES})
target_link_libraries (lte-softmodem pthread m ${CONFIG_LIBRARIES} rt crypt ${CRYPTO_LIBRARIES} ${OPENSSL_LIBRARIES} ${NETTLE_LIBRARIES} sctp ${option_HW_lib} ${XFORMS_LIBRARIES} )
......@@ -1598,17 +1593,11 @@ add_executable(lte-softmodem-nos1
${XFORMS_SOURCE}
${XFORMS_SOURCE_SOFTMODEM}
)
if (MESSAGE_CHART_GENERATOR)
target_link_libraries (lte-softmodem-nos1
-Wl,--start-group
RRC_LIB SECU_CN SECU_OSA UTIL HASHTABLE SCHED_LIB PHY LFDS MSC L2 ${RAL_LIB} ${ITTI_LIB} ${MIH_LIB}
-Wl,--end-group )
else (MESSAGE_CHART_GENERATOR)
target_link_libraries (lte-softmodem-nos1
-Wl,--start-group
RRC_LIB SECU_CN SECU_OSA UTIL HASHTABLE SCHED_LIB PHY LFDS L2 ${RAL_LIB} ${ITTI_LIB} ${MIH_LIB}
RRC_LIB SECU_CN SECU_OSA UTIL HASHTABLE SCHED_LIB PHY LFDS L2 ${MSC_LIB} ${RAL_LIB} ${ITTI_LIB} ${MIH_LIB}
-Wl,--end-group )
endif(MESSAGE_CHART_GENERATOR)
target_link_libraries (lte-softmodem-nos1 ${LIBXML2_LIBRARIES})
target_link_libraries (lte-softmodem-nos1 pthread m ${CONFIG_LIBRARIES} rt crypt ${CRYPTO_LIBRARIES} ${OPENSSL_LIBRARIES} ${NETTLE_LIBRARIES} ${option_HW_lib} ${XFORMS_LIBRARIES} )
target_link_libraries (lte-softmodem-nos1 ${LIBBOOST_LIBRARIES})
......@@ -1625,21 +1614,13 @@ add_executable(mme_gw
${OPENAIRCN_DIR}/SCTP/sctp_primitives_server.c
${OPENAIRCN_DIR}/NAS/MME/nas_mme_task.c
)
if (MESSAGE_CHART_GENERATOR)
target_link_libraries (mme_gw
-Wl,--start-group
LIB_NAS_MME S1AP_LIB S1AP_EPC GTPV1U GTPV2C SCTP_SERVER UDP_SERVER SECU_CN SECU_OSA S6A SGW MME_APP LFDS MSC ${ITTI_LIB} CN_UTILS HASHTABLE
LIB_NAS_MME S1AP_LIB S1AP_EPC GTPV1U GTPV2C SCTP_SERVER UDP_SERVER SECU_CN SECU_OSA S6A SGW MME_APP LFDS ${MSC_LIB} ${ITTI_LIB} CN_UTILS HASHTABLE
-Wl,--end-group
pthread m sctp rt crypt ${CRYPTO_LIBRARIES} ${OPENSSL_LIBRARIES} ${NETTLE_LIBRARIES} ${CONFIG_LIBRARIES} fdproto fdcore
)
else (MESSAGE_CHART_GENERATOR)
target_link_libraries (mme_gw
-Wl,--start-group
LIB_NAS_MME S1AP_LIB S1AP_EPC GTPV1U GTPV2C SCTP_SERVER UDP_SERVER SECU_CN SECU_OSA S6A SGW MME_APP LFDS ${ITTI_LIB} CN_UTILS HASHTABLE
-Wl,--end-group
pthread m sctp rt crypt ${CRYPTO_LIBRARIES} ${OPENSSL_LIBRARIES} ${NETTLE_LIBRARIES} ${CONFIG_LIBRARIES} fdproto fdcore
)
endif(MESSAGE_CHART_GENERATOR)
# Default parameters
# Does not work on simple install (fqdn in /etc/hosts 127.0.1.1)
......@@ -1720,21 +1701,13 @@ add_executable(oai_sgw
${OPENAIRCN_DIR}/OAI_SGW/oai_sgw_log.c
${OPENAIRCN_DIR}/OAI_SGW/oai_sgw.c
)
if (MESSAGE_CHART_GENERATOR)
target_link_libraries (oai_sgw
-Wl,--start-group
GTPV1U SECU_CN SECU_OSA S6A SGW CN_UTILS LFDS MSC ${ITTI_LIB}
GTPV1U SECU_CN SECU_OSA S6A SGW CN_UTILS LFDS ${MSC_LIB} ${ITTI_LIB}
-Wl,--end-group
pthread m sctp rt crypt ${CRYPTO_LIBRARIES} ${OPENSSL_LIBRARIES} ${NETTLE_LIBRARIES} ${CONFIG_LIBRARIES} fdproto fdcore
)
else (MESSAGE_CHART_GENERATOR)
target_link_libraries (oai_sgw
-Wl,--start-group
GTPV1U SECU_CN SECU_OSA S6A SGW CN_UTILS LFDS ${ITTI_LIB}
-Wl,--end-group
pthread m sctp rt crypt ${CRYPTO_LIBRARIES} ${OPENSSL_LIBRARIES} ${NETTLE_LIBRARIES} ${CONFIG_LIBRARIES} fdproto fdcore
)
endif(MESSAGE_CHART_GENERATOR)
# rrh
......@@ -1814,18 +1787,14 @@ add_executable(oaisim
${HW_SOURCE}
${XFORMS_SOURCE}
)
target_include_directories(oaisim PUBLIC ${OPENAIR_TARGETS}/SIMU/USER)
if (MESSAGE_CHART_GENERATOR)
target_link_libraries (oaisim
-Wl,--start-group
RRC_LIB S1AP_LIB S1AP_ENB GTPV1U SECU_CN UTIL HASHTABLE SCTP_CLIENT UDP SCHED_LIB PHY LFDS MSC L2 ${RAL_LIB} LIB_NAS_UE SIMU SIMU_ETH SECU_OSA ${ITTI_LIB} ${MIH_LIB}
RRC_LIB S1AP_LIB S1AP_ENB GTPV1U SECU_CN UTIL HASHTABLE SCTP_CLIENT UDP SCHED_LIB PHY LFDS ${MSC_LIB} L2 ${RAL_LIB} LIB_NAS_UE SIMU SIMU_ETH SECU_OSA ${ITTI_LIB} ${MIH_LIB}
-Wl,--end-group )
else(MESSAGE_CHART_GENERATOR)
target_link_libraries (oaisim
-Wl,--start-group
RRC_LIB S1AP_LIB S1AP_ENB GTPV1U SECU_CN UTIL HASHTABLE SCTP_CLIENT UDP SCHED_LIB PHY LFDS L2 ${RAL_LIB} LIB_NAS_UE SIMU SIMU_ETH SECU_OSA ${ITTI_LIB} ${MIH_LIB}
-Wl,--end-group )
endif(MESSAGE_CHART_GENERATOR)
target_link_libraries (oaisim ${LIBXML2_LIBRARIES} ${LAPACK_LIBRARIES})
target_link_libraries (oaisim pthread m ${CONFIG_LIBRARIES} rt crypt ${CRYPTO_LIBRARIES} ${OPENSSL_LIBRARIES} ${NETTLE_LIBRARIES} sctp ${option_HW_lib}
${ATLAS_LIBRARIES} ${XFORMS_LIBRARIES} ${OPENPGM_LIBRARIES})
......@@ -1856,17 +1825,11 @@ add_executable(oaisim_nos1
${XFORMS_SOURCE}
)
target_include_directories(oaisim_nos1 PUBLIC ${OPENAIR_TARGETS}/SIMU/USER)
if (MESSAGE_CHART_GENERATOR)
target_link_libraries (oaisim_nos1
-Wl,--start-group
RRC_LIB SECU_CN UTIL HASHTABLE SCHED_LIB PHY LFDS MSC L2 ${RAL_LIB} SIMU SIMU_ETH SECU_OSA ${ITTI_LIB} ${MIH_LIB}
RRC_LIB SECU_CN UTIL HASHTABLE SCHED_LIB PHY LFDS ${MSC_LIB} L2 ${RAL_LIB} SIMU SIMU_ETH SECU_OSA ${ITTI_LIB} ${MIH_LIB}
-Wl,--end-group )
else(MESSAGE_CHART_GENERATOR)
target_link_libraries (oaisim_nos1
-Wl,--start-group
RRC_LIB SECU_CN UTIL HASHTABLE SCHED_LIB PHY LFDS L2 ${RAL_LIB} SIMU SIMU_ETH SECU_OSA ${ITTI_LIB} ${MIH_LIB}
-Wl,--end-group )
endif(MESSAGE_CHART_GENERATOR)
target_link_libraries (oaisim_nos1 ${LIBXML2_LIBRARIES} ${LAPACK_LIBRARIES})
target_link_libraries (oaisim_nos1 pthread m ${CONFIG_LIBRARIES} rt crypt ${CRYPTO_LIBRARIES} ${OPENSSL_LIBRARIES} ${NETTLE_LIBRARIES} ${option_HW_lib}
${ATLAS_LIBRARIES} ${XFORMS_LIBRARIES} ${OPENPGM_LIBRARIES})
......
......@@ -82,13 +82,13 @@ test_compile \
test.0108 oaisim \
oaisim $tdir/bin/oaisim.r10.itti rel10.itti
test_compile \
test.0114 oaisim \
oaisim $tdir/bin/oaisim.r8.itti.ral rel8.itti.ral
#test_compile \ LG: RAL REMOVED
# test.0114 oaisim \
# oaisim $tdir/bin/oaisim.r8.itti.ral rel8.itti.ral
test_compile \
test.0115 oaisim \
oaisim $tdir/bin/oaisim.r10.itti.ral rel10.itti.ral
#test_compile \ LG: RAL REMOVED
# test.0115 oaisim \
# oaisim $tdir/bin/oaisim.r10.itti.ral rel10.itti.ral
test_compile \
test.0120 nasmesh \
......
......@@ -34,7 +34,7 @@ set ( MAX_NUM_CCs 1 )
set ( MESSAGE_CHART_GENERATOR False )
set ( MESSAGE_CHART_GENERATOR_RLC_MAC False )
set ( MESSAGE_CHART_GENERATOR_PHY False )
set ( MIH_C_MEDIEVAL_EXTENSIONS True )
set ( MIH_C_MEDIEVAL_EXTENSIONS False )
set ( MSG_PRINT False )
set ( MU_RECEIVER False )
set ( NAS_ADDRESS_FIX False )
......
......@@ -34,7 +34,7 @@ set ( MAX_NUM_CCs 1 )
set ( MESSAGE_CHART_GENERATOR False )
set ( MESSAGE_CHART_GENERATOR_RLC_MAC False )
set ( MESSAGE_CHART_GENERATOR_PHY False )
set ( MIH_C_MEDIEVAL_EXTENSIONS True )
set ( MIH_C_MEDIEVAL_EXTENSIONS False )
set ( MSG_PRINT False )
set ( MU_RECEIVER False )
set ( NAS_ADDRESS_FIX False )
......
......@@ -34,7 +34,7 @@ set ( MAX_NUM_CCs 1 )
set ( MESSAGE_CHART_GENERATOR False )
set ( MESSAGE_CHART_GENERATOR_RLC_MAC False )
set ( MESSAGE_CHART_GENERATOR_PHY False )
set ( MIH_C_MEDIEVAL_EXTENSIONS True )
set ( MIH_C_MEDIEVAL_EXTENSIONS False )
set ( MSG_PRINT False )
set ( MU_RECEIVER False )
set ( NAS_ADDRESS_FIX False )
......
......@@ -34,7 +34,7 @@ set ( MAX_NUM_CCs 1 )
set ( MESSAGE_CHART_GENERATOR False )
set ( MESSAGE_CHART_GENERATOR_RLC_MAC False )
set ( MESSAGE_CHART_GENERATOR_PHY False )
set ( MIH_C_MEDIEVAL_EXTENSIONS True )
set ( MIH_C_MEDIEVAL_EXTENSIONS False )
set ( MSG_PRINT False )
set ( MU_RECEIVER False )
set ( NAS_ADDRESS_FIX False )
......
......@@ -34,7 +34,7 @@ set ( MAX_NUM_CCs 1 )
set ( MESSAGE_CHART_GENERATOR False )
set ( MESSAGE_CHART_GENERATOR_RLC_MAC False )
set ( MESSAGE_CHART_GENERATOR_PHY False )
set ( MIH_C_MEDIEVAL_EXTENSIONS True )
set ( MIH_C_MEDIEVAL_EXTENSIONS False )
set ( MSG_PRINT False )
set ( MU_RECEIVER False )
set ( NAS_ADDRESS_FIX False )
......
......@@ -34,7 +34,7 @@ set ( MAX_NUM_CCs 1 )
set ( MESSAGE_CHART_GENERATOR False )
set ( MESSAGE_CHART_GENERATOR_RLC_MAC False )
set ( MESSAGE_CHART_GENERATOR_PHY False )
set ( MIH_C_MEDIEVAL_EXTENSIONS True )
set ( MIH_C_MEDIEVAL_EXTENSIONS False )
set ( MSG_PRINT False )
set ( MU_RECEIVER False )
set ( NAS_ADDRESS_FIX False )
......
......@@ -28,7 +28,7 @@ set(MAX_NUM_CCs 1)
set(MESSAGE_CHART_GENERATOR False )
set(MESSAGE_CHART_GENERATOR_RLC_MAC False )
set(MESSAGE_CHART_GENERATOR_PHY False )
set(MIH_C_MEDIEVAL_EXTENSIONS True)
set(MIH_C_MEDIEVAL_EXTENSIONS False)
set(MSG_PRINT False)
set(MU_RECEIVER False)
set(NAS_ADDRESS_FIX true)
......
......@@ -34,7 +34,7 @@ set ( MAX_NUM_CCs 1 )
set ( MESSAGE_CHART_GENERATOR False )
set ( MESSAGE_CHART_GENERATOR_RLC_MAC False )
set ( MESSAGE_CHART_GENERATOR_PHY False )
set ( MIH_C_MEDIEVAL_EXTENSIONS True )
set ( MIH_C_MEDIEVAL_EXTENSIONS False )
set ( MSG_PRINT False )
set ( MU_RECEIVER False )
set ( NAS_ADDRESS_FIX False )
......
......@@ -28,7 +28,7 @@ set(MAX_NUM_CCs 1)
set(MESSAGE_CHART_GENERATOR False)
set(MESSAGE_CHART_GENERATOR_RLC_MAC False)
set(MESSAGE_CHART_GENERATOR_PHY False)
set(MIH_C_MEDIEVAL_EXTENSIONS True)
set(MIH_C_MEDIEVAL_EXTENSIONS False)
set(MSG_PRINT False)
set(MU_RECEIVER False)
set(NAS_ADDRESS_FIX true)
......
......@@ -9,7 +9,7 @@ set(ENABLE_ITTI True)
set(ENABLE_NAS_UE_LOGGING False)
set(ENABLE_NEW_MULTICAST True)
set(ENABLE_PGM_TRANSPORT True)
set(ENABLE_RAL True)
set(ENABLE_RAL False)
set(ENABLE_SECURITY False)
set(ENABLE_USE_CPU_EXECUTION_TIME True)
set(ENABLE_USE_MME False)
......@@ -25,7 +25,7 @@ set(LOG_NO_THREAD True)
set(LOWLATENCY False)
set(MAC_CONTEXT 1)
set(MAX_NUM_CCs 1)
set(MIH_C_MEDIEVAL_EXTENSIONS True)
set(MIH_C_MEDIEVAL_EXTENSIONS False)
set(MSG_PRINT False)
set(MU_RECEIVER False)
set(NAS_ADDRESS_FIX true)
......
......@@ -11,7 +11,7 @@ set ( ENABLE_ITTI True )
set ( ENABLE_NAS_UE_LOGGING False )
set ( ENABLE_NEW_MULTICAST True )
set ( ENABLE_PGM_TRANSPORT True )
set ( ENABLE_RAL True )
set ( ENABLE_RAL False )
set ( ENABLE_SECURITY False )
set ( ENABLE_STANDALONE_EPC False )
set ( ENABLE_USE_CPU_EXECUTION_TIME True )
......@@ -34,7 +34,7 @@ set ( MAX_NUM_CCs 1 )
set ( MESSAGE_CHART_GENERATOR False )
set ( MESSAGE_CHART_GENERATOR_RLC_MAC False )
set ( MESSAGE_CHART_GENERATOR_PHY False )
set ( MIH_C_MEDIEVAL_EXTENSIONS True )
set ( MIH_C_MEDIEVAL_EXTENSIONS False )
set ( MSG_PRINT False )
set ( MU_RECEIVER False )
set ( NAS_ADDRESS_FIX False )
......
......@@ -34,7 +34,7 @@ set ( MAX_NUM_CCs 1 )
set ( MESSAGE_CHART_GENERATOR False )
set ( MESSAGE_CHART_GENERATOR_RLC_MAC False )
set ( MESSAGE_CHART_GENERATOR_PHY False )
set ( MIH_C_MEDIEVAL_EXTENSIONS True )
set ( MIH_C_MEDIEVAL_EXTENSIONS False )
set ( MSG_PRINT False )
set ( MU_RECEIVER False )
set ( NAS_ADDRESS_FIX False )
......
......@@ -37,6 +37,7 @@
#define INTERTASK_INTERFACE_TYPES_H_
#include "itti_types.h"
#include "platform_types.h"
/* Defines to handle bit fields on unsigned long values */
#define UL_BIT_MASK(lENGTH) ((1UL << (lENGTH)) - 1UL)
......
......@@ -362,7 +362,7 @@ void msc_flush_messages(void)
int rv;
msc_queue_item_t *item_p = NULL;
while ((rv = lfds611_queue_dequeue( g_msc_message_queue_p, &item_p )) == 1) {
while ((rv = lfds611_queue_dequeue( g_msc_message_queue_p, (void**)&item_p )) == 1) {
if (NULL != item_p->message_str) {
fputs(item_p->message_str, g_msc_fd);
// TODO BIN DATA
......
......@@ -84,6 +84,7 @@ typedef enum {
#if defined(MESSAGE_CHART_GENERATOR)
int msc_init(const msc_env_t envP, const int max_threadsP);
void msc_start_use(void);
void msc_flush_messages(void);
void msc_end(void);
void msc_log_declare_proto(const msc_proto_t protoP);
void msc_log_event(const msc_proto_t protoP,char *format, ...);
......
......@@ -35,7 +35,7 @@
*/
#include "hashtable.h"
#include "asn1_constants.h"
#ifndef GTPV1U_ENB_DEFS_H_
#define GTPV1U_ENB_DEFS_H_
......
......@@ -38,7 +38,6 @@
#include <string.h>
#include <stdint.h>
#include "assertions.h"
#include "conversions.h"
#include "intertask_interface.h"
......
......@@ -51,7 +51,7 @@
# define msg mexPrintf
#else
# ifdef OPENAIR2
# if defined(ENABLE_RAL)
# if ENABLE_RAL
# include "collection/hashtable/hashtable.h"
# include "COMMON/ral_messages_types.h"
# include "UTIL/queue.h"
......@@ -145,7 +145,7 @@ typedef struct UE_SCAN_INFO_s {
int32_t freq_offset_Hz[3][10];
} UE_SCAN_INFO_t;
#if defined(ENABLE_RAL)
#if ENABLE_RAL
typedef struct ral_threshold_phy_s {
SLIST_ENTRY(ral_threshold_phy_s) ral_thresholds;
ral_threshold_t threshold;
......@@ -368,7 +368,7 @@ typedef struct PHY_VARS_eNB_s {
time_stats_t localization_stats;
#endif
#if defined(ENABLE_RAL)
#if ENABLE_RAL
hash_table_t *ral_thresholds_timed;
SLIST_HEAD(ral_thresholds_gen_poll_enb_s, ral_threshold_phy_t) ral_thresholds_gen_polled[RAL_LINK_PARAM_GEN_MAX];
SLIST_HEAD(ral_thresholds_lte_poll_enb_s, ral_threshold_phy_t) ral_thresholds_lte_polled[RAL_LINK_PARAM_LTE_MAX];
......@@ -644,7 +644,7 @@ typedef struct {
time_stats_t dlsch_tc_intl2_stats;
time_stats_t tx_prach;
#if defined(ENABLE_RAL)
#if ENABLE_RAL
hash_table_t *ral_thresholds_timed;
SLIST_HEAD(ral_thresholds_gen_poll_s, ral_threshold_phy_t) ral_thresholds_gen_polled[RAL_LINK_PARAM_GEN_MAX];
SLIST_HEAD(ral_thresholds_lte_poll_s, ral_threshold_phy_t) ral_thresholds_lte_polled[RAL_LINK_PARAM_LTE_MAX];
......
......@@ -64,7 +64,7 @@
#if defined(ENABLE_ITTI)
# include "intertask_interface.h"
# if defined(ENABLE_RAL)
# if ENABLE_RAL
# include "timer.h"
# endif
#endif
......@@ -1239,7 +1239,7 @@ int QPSK2[4]= {AMP_OVER_2|(AMP_OVER_2<<16),AMP_OVER_2|((65536-AMP_OVER_2)<<16),(
#if defined(ENABLE_ITTI)
# if defined(ENABLE_RAL)
# if ENABLE_RAL
extern PHY_MEASUREMENTS PHY_measurements;
void phy_eNB_lte_measurement_thresholds_test_and_report(instance_t instanceP, ral_threshold_phy_t* threshold_phy_pP, uint16_t valP)
......@@ -4408,7 +4408,7 @@ void phy_procedures_eNB_lte(unsigned char subframe,PHY_VARS_eNB **phy_vars_eNB,u
Mod_id = instance;
switch (ITTI_MSG_ID(msg_p)) {
# if defined(ENABLE_RAL)
# if ENABLE_RAL
case TIMER_HAS_EXPIRED:
// check if it is a measurement timer
......
......@@ -82,7 +82,7 @@ fifo_dump_emos_UE emos_dump_UE;
#if defined(ENABLE_ITTI)
# include "intertask_interface.h"
# if defined(ENABLE_RAL)
# if ENABLE_RAL
# include "timer.h"
# endif
#endif
......@@ -3488,7 +3488,7 @@ int phy_procedures_RN_UE_RX(uint8_t slot_rx, uint8_t next_slot, relaying_type_t
#if defined(ENABLE_ITTI)
# if defined(ENABLE_RAL)
# if ENABLE_RAL
extern PHY_MEASUREMENTS PHY_measurements;
void phy_UE_lte_measurement_thresholds_test_and_report(instance_t instanceP, ral_threshold_phy_t* threshold_phy_pP, uint16_t valP)
......@@ -3626,7 +3626,7 @@ void phy_procedures_UE_lte(PHY_VARS_UE *phy_vars_ue,uint8_t eNB_id,uint8_t abstr
unsigned int Mod_id;
int result;
#endif
# if defined(ENABLE_RAL)
# if ENABLE_RAL
int CC_id =0;
#endif
int frame_rx = phy_vars_ue->frame_rx;
......@@ -3673,7 +3673,7 @@ void phy_procedures_UE_lte(PHY_VARS_UE *phy_vars_ue,uint8_t eNB_id,uint8_t abstr
LOG_I(PHY, "[UE %d] Received %s\n", Mod_id, msg_name);
/* TODO process the message */
# if defined(ENABLE_RAL)
# if ENABLE_RAL
{
MessageDef *message_p;
......@@ -3692,7 +3692,7 @@ void phy_procedures_UE_lte(PHY_VARS_UE *phy_vars_ue,uint8_t eNB_id,uint8_t abstr
# endif
break;
# if defined(ENABLE_RAL)
# if ENABLE_RAL
case TIMER_HAS_EXPIRED:
// check if it is a measurement timer
......
......@@ -30,6 +30,9 @@
#ifndef GTPV1_U_MESSAGES_TYPES_H_
#define GTPV1_U_MESSAGES_TYPES_H_
#include "asn1_constants.h"
#define GTPV1U_MAX_BEARERS_PER_UE max_val_DRB_Identity
#define GTPV1U_ENB_CREATE_TUNNEL_REQ(mSGpTR) (mSGpTR)->ittiMsg.Gtpv1uCreateTunnelReq
......
......@@ -38,7 +38,9 @@
#include "pdcp_messages_def.h"
#include "rrc_messages_def.h"
#include "nas_messages_def.h"
#if ENABLE_RAL
#include "ral_messages_def.h"
#endif
#include "s1ap_messages_def.h"
#include "x2ap_messages_def.h"
#include "sctp_messages_def.h"
......
......@@ -46,7 +46,9 @@
#include "pdcp_messages_types.h"
#include "rrc_messages_types.h"
#include "nas_messages_types.h"
#if ENABLE_RAL
#include "ral_messages_types.h"
#endif
#include "s1ap_messages_types.h"
#include "x2ap_messages_types.h"
#include "sctp_messages_types.h"
......
......@@ -38,7 +38,9 @@
#define PHY_MESSAGES_TYPES_H_
#include "PHY/impl_defs_lte.h"
#include "ral_messages_types.h"
#if ENABLE_RAL
#include "ral_messages_types.h" //LG: MIH moved from repository/trunk to repository/extras
#endif
//-------------------------------------------------------------------------------------------//
// Defines to access message fields.
#define PHY_CONFIGURATION_REQ(mSGpTR) (mSGpTR)->ittiMsg.phy_configuration_req
......@@ -93,9 +95,9 @@ typedef struct PhyDeactivateReq_s {
} PhyDeactivateReq;
typedef struct PhyFindCellReq_s {
//# if defined(ENABLE_RAL)
# if ENABLE_RAL
ral_transaction_id_t transaction_id;
//# endif
# endif
Earfcn earfcn_start;
Earfcn earfcn_end;
} PhyFindCellReq;
......@@ -104,28 +106,34 @@ typedef struct PhyFindNextCellReq_s {
} PhyFindNextCellReq;
typedef struct PhyMeasThresholdReq_s {
# if ENABLE_RAL
ral_transaction_id_t transaction_id;
ral_link_cfg_param_t cfg_param;
#endif
} PhyMeasThresholdReq;
typedef struct PhyMeasReportInd_s {
# if ENABLE_RAL
ral_threshold_t threshold;
ral_link_param_t link_param;
#endif
} PhyMeasReportInd;
// UE: PHY -> RRC messages
typedef struct PhyFindCellInd_s {
//# if defined(ENABLE_RAL)
# if ENABLE_RAL
ral_transaction_id_t transaction_id;
//# endif
# endif
uint8_t cell_nb;
CellInfo cells[MAX_REPORTED_CELL];
} PhyFindCellInd;
typedef struct PhyMeasThresholdConf_s {
# if ENABLE_RAL
ral_transaction_id_t transaction_id;
ral_status_t status;
uint8_t num_link_cfg_params;
ral_link_cfg_status_t cfg_status[RAL_MAX_LINK_CFG_PARAMS];
#endif
} PhyMeasThresholdConf;
#endif /* PHY_MESSAGES_TYPES_H_ */
This diff is collapsed.
......@@ -33,20 +33,19 @@
COMPANY : EURECOM
EMAIL : Lionel.Gauthier@eurecom.fr
***************************************************************************/
#define RLC_AM_MODULE
#define RLC_AM_IN_SDU_C
#define RLC_AM_MODULE 1
#define RLC_AM_IN_SDU_C 1
//-----------------------------------------------------------------------------
#include "rlc_am.h"
#include "LAYER2/MAC/extern.h"
#include "UTIL/LOG/log.h"
#define TRACE_RLC_AM_FREE_SDU
#define TRACE_RLC_AM_FREE_SDU 0
//-----------------------------------------------------------------------------
void rlc_am_free_in_sdu(
const protocol_ctxt_t* const ctxt_pP,
rlc_am_entity_t *const rlcP,
const unsigned int index_in_bufferP)
//-----------------------------------------------------------------------------
{
if (index_in_bufferP <= RLC_AM_SDU_CONTROL_BUFFER_SIZE) {
if (rlcP->input_sdus[index_in_bufferP].mem_block != NULL) {
......@@ -70,7 +69,7 @@ void rlc_am_free_in_sdu(
}
}
#ifdef TRACE_RLC_AM_FREE_SDU
#if TRACE_RLC_AM_FREE_SDU
LOG_D(RLC, PROTOCOL_RLC_AM_CTXT_FMT"[FREE SDU] SDU INDEX %03u current_sdu_index=%u next_sdu_index=%u nb_sdu_no_segmented=%u\n",
PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,rlcP),
index_in_bufferP,
......@@ -86,7 +85,6 @@ rlc_am_free_in_sdu_data(
const protocol_ctxt_t* const ctxt_pP,
rlc_am_entity_t* const rlcP,
const unsigned int index_in_bufferP)
//-----------------------------------------------------------------------------
{
if (index_in_bufferP <= RLC_AM_SDU_CONTROL_BUFFER_SIZE) {
if (rlcP->input_sdus[index_in_bufferP].mem_block != NULL) {
......@@ -102,7 +100,6 @@ signed int
rlc_am_in_sdu_is_empty(
const protocol_ctxt_t* const ctxt_pP,
rlc_am_entity_t *const rlcP)
//-----------------------------------------------------------------------------
{
if (rlcP->nb_sdu == 0) {
return 1;
......
......@@ -26,8 +26,8 @@
Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE
*******************************************************************************/
#define RLC_AM_MODULE
#define RLC_AM_INIT_C
#define RLC_AM_MODULE 1
#define RLC_AM_INIT_C 1
#ifdef USER_MODE
#include <string.h>
#endif
......@@ -40,7 +40,6 @@ void
rlc_am_init(
const protocol_ctxt_t* const ctxt_pP,
rlc_am_entity_t *const rlc_pP)
//-----------------------------------------------------------------------------
{
if (rlc_pP->initialized == TRUE) {
LOG_D(RLC, PROTOCOL_RLC_AM_CTXT_FMT"[AM INIT] INITIALIZATION ALREADY DONE, DOING NOTHING\n",
......@@ -97,7 +96,6 @@ void
rlc_am_reestablish(
const protocol_ctxt_t* const ctxt_pP,
rlc_am_entity_t* const rlc_pP)
//-----------------------------------------------------------------------------
{
/*
* RLC re-establishment is performed upon request by RRC, and the function
......@@ -153,7 +151,6 @@ void
rlc_am_cleanup(
rlc_am_entity_t* const rlc_pP
)
//-----------------------------------------------------------------------------
{
list2_free(&rlc_pP->receiver_buffer);
list_free(&rlc_pP->pdus_to_mac_layer);
......@@ -207,7 +204,6 @@ rlc_am_configure(
const uint32_t t_poll_retransmitP,
const uint32_t t_reorderingP,
const uint32_t t_status_prohibitP)
//-----------------------------------------------------------------------------
{
if (rlc_pP->configured == TRUE) {
LOG_I(RLC, PROTOCOL_RLC_AM_CTXT_FMT"[RECONFIGURE] max_retx_threshold %d poll_pdu %d poll_byte %d t_poll_retransmit %d t_reordering %d t_status_prohibit %d\n",
......@@ -258,7 +254,6 @@ rlc_am_set_debug_infos(
rlc_am_entity_t *const rlc_pP,
const srb_flag_t srb_flagP,
const rb_id_t rb_idP)
//-----------------------------------------------------------------------------
{
rlc_pP->rb_id = rb_idP;
......
......@@ -26,11 +26,11 @@
Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE
*******************************************************************************/
#define RLC_AM_MODULE
#define RLC_AM_REASSEMBLY_C
#define RLC_AM_MODULE 1
#define RLC_AM_REASSEMBLY_C 1
#include "platform_types.h"
//-----------------------------------------------------------------------------
#if defined(ENABLE_ITTI)
#if ENABLE_ITTI
# include "intertask_interface.h"
#endif
#include "assertions.h"
......@@ -41,13 +41,11 @@
#include "UTIL/LOG/log.h"
#include "msc.h"
//#define TRACE_RLC_AM_RX_DECODE
//-----------------------------------------------------------------------------
inline void
rlc_am_clear_rx_sdu (
const protocol_ctxt_t* const ctxt_pP,
rlc_am_entity_t * const rlc_pP)
//-----------------------------------------------------------------------------
{
rlc_pP->output_sdu_size_to_write = 0;
}
......@@ -58,7 +56,6 @@ rlc_am_reassembly (
rlc_am_entity_t * const rlc_pP,
uint8_t * src_pP,
const int32_t lengthP)
//-----------------------------------------------------------------------------
{
LOG_D(RLC, PROTOCOL_RLC_AM_CTXT_FMT"[REASSEMBLY PAYLOAD] reassembly() %d bytes\n",
PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,rlc_pP),
......@@ -79,7 +76,7 @@ rlc_am_reassembly (
} else {
LOG_E(RLC, PROTOCOL_RLC_AM_CTXT_FMT"[REASSEMBLY PAYLOAD] ERROR SDU SIZE OVERFLOW SDU GARBAGED\n",
PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,rlc_pP));
#if defined(STOP_ON_IP_TRAFFIC_OVERLOAD)
#if STOP_ON_IP_TRAFFIC_OVERLOAD
AssertFatal(0, PROTOCOL_RLC_AM_CTXT_FMT" RLC_AM_DATA_IND, SDU SIZE OVERFLOW SDU GARBAGED\n",
PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,rlc_pP));
#endif
......@@ -89,7 +86,7 @@ rlc_am_reassembly (
} else {
LOG_E(RLC, PROTOCOL_RLC_AM_CTXT_FMT"[REASSEMBLY PAYLOAD] ERROR OUTPUT SDU IS NULL\n",
PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,rlc_pP));
#if defined(STOP_ON_IP_TRAFFIC_OVERLOAD)
#if STOP_ON_IP_TRAFFIC_OVERLOAD
AssertFatal(0, PROTOCOL_RLC_AM_CTXT_FMT" RLC_AM_DATA_IND, SDU DROPPED, OUT OF MEMORY\n",
PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,rlc_pP));
#endif
......@@ -100,12 +97,11 @@ void
rlc_am_send_sdu (
const protocol_ctxt_t* const ctxt_pP,
rlc_am_entity_t * const rlc_pP)
//-----------------------------------------------------------------------------
{
# if defined(TRACE_RLC_UM_PDU)
# if TRACE_RLC_UM_PDU
char message_string[7000];
size_t message_string_size = 0;
#if defined(ENABLE_ITTI)
#if ENABLE_ITTI
MessageDef *msg_p;
#endif
int octet_index, index;
......@@ -120,13 +116,13 @@ rlc_am_send_sdu (
if (rlc_pP->output_sdu_size_to_write > 0) {
rlc_pP->stat_rx_pdcp_sdu += 1;
rlc_pP->stat_rx_pdcp_bytes += rlc_pP->output_sdu_size_to_write;
#ifdef TEST_RLC_AM
#if TEST_RLC_AM
rlc_am_v9_3_0_test_data_ind (rlc_pP->module_id,
rlc_pP->rb_id,
rlc_pP->output_sdu_size_to_write,
rlc_pP->output_sdu_in_construction);
#else
# if defined(TRACE_RLC_AM_PDU)
# if TRACE_RLC_AM_PDU
message_string_size += sprintf(&message_string[message_string_size], "Bearer : %u\n", rlc_pP->rb_id);
message_string_size += sprintf(&message_string[message_string_size], "SDU size : %u\n", rlc_pP->output_sdu_size_to_write);
......@@ -166,7 +162,7 @@ rlc_am_send_sdu (
# if defined(ENABLE_ITTI)
# if ENABLE_ITTI
msg_p = itti_alloc_new_message_sized (ctxt_pP->enb_flag > 0 ? TASK_RLC_ENB:TASK_RLC_UE ,
RLC_AM_SDU_IND,
message_string_size + sizeof (IttiMsgText));
......@@ -179,7 +175,7 @@ rlc_am_send_sdu (
LOG_T(RLC, "%s", message_string);
# endif
# endif
#if !defined(ENABLE_ITTI)
#if !ENABLE_ITTI
RLC_AM_MUTEX_UNLOCK(&rlc_pP->lock_input_sdus);
#endif
MSC_LOG_TX_MESSAGE(
......@@ -199,7 +195,7 @@ rlc_am_send_sdu (
rlc_pP->rb_id,
rlc_pP->output_sdu_size_to_write,
rlc_pP->output_sdu_in_construction);
#if !defined(ENABLE_ITTI)
#if !ENABLE_ITTI
RLC_AM_MUTEX_LOCK(&rlc_pP->lock_input_sdus, ctxt_pP, rlc_pP);
#endif
#endif
......@@ -225,14 +221,13 @@ rlc_am_reassemble_pdu(
rlc_am_entity_t * const rlc_pP,
mem_block_t * const tb_pP)
{
//-----------------------------------------------------------------------------
int i,j;
rlc_am_pdu_info_t* pdu_info = &((rlc_am_rx_pdu_management_t*)(tb_pP->data))->pdu_info;
LOG_D(RLC, PROTOCOL_RLC_AM_CTXT_FMT"[REASSEMBLY PDU] TRY REASSEMBLY PDU SN=%03d\n",
PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,rlc_pP),
pdu_info->sn);
#ifdef TRACE_RLC_AM_RX_DECODE
#if TRACE_RLC_AM_RX_DECODE
rlc_am_display_data_pdu_infos(ctxt_pP, rlc_pP, pdu_info);
#endif
......@@ -279,7 +274,7 @@ rlc_am_reassemble_pdu(
//}
break;
#ifdef USER_MODE
#if USER_MODE
default:
assert(0 != 0);
......@@ -394,14 +389,14 @@ rlc_am_reassemble_pdu(
// data is already ok, done by last loop above
rlc_am_reassembly (ctxt_pP, rlc_pP, &pdu_info->payload[j], pdu_info->hidden_size);
} else {
#ifdef USER_MODE
#if USER_MODE
//assert (5!=5);
#endif
}
//rlc_pP->reassembly_missing_sn_detected = 0;
break;
#ifdef USER_MODE
#if USER_MODE
default:
assert(1 != 1);
......
......@@ -26,9 +26,8 @@
Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE
*******************************************************************************/
#define RLC_AM_MODULE
#define RLC_AM_RECEIVER_C
//#include "rtos_header.h"
#define RLC_AM_MODULE 1
#define RLC_AM_RECEIVER_C 1
#include "platform_types.h"
//-----------------------------------------------------------------------------
#include "assertions.h"
......@@ -39,9 +38,6 @@
#include "LAYER2/MAC/extern.h"
#include "UTIL/LOG/log.h"
#define TRACE_RLC_AM_RX
//#define DEBUG_RLC_AM_DISPLAY_TB_DATA
//#define RLC_AM_GENERATE_ERRORS
//-----------------------------------------------------------------------------
signed int
rlc_am_get_data_pdu_infos(
......@@ -50,7 +46,6 @@ rlc_am_get_data_pdu_infos(
rlc_am_pdu_sn_10_t* header_pP,
int16_t total_sizeP,
rlc_am_pdu_info_t* pdu_info_pP)
//-----------------------------------------------------------------------------
{
memset(pdu_info_pP, 0, sizeof (rlc_am_pdu_info_t));
......@@ -142,7 +137,6 @@ rlc_am_display_data_pdu_infos(
const protocol_ctxt_t* const ctxt_pP,
rlc_am_entity_t * const rlc_pP,
rlc_am_pdu_info_t* pdu_info_pP)
//-----------------------------------------------------------------------------
{
int num_li;
......@@ -183,7 +177,6 @@ rlc_am_rx_update_vr_ms(
const protocol_ctxt_t* const ctxt_pP,
rlc_am_entity_t * const rlc_pP,
mem_block_t* tb_pP)
//-----------------------------------------------------------------------------
{
//rlc_am_pdu_info_t* pdu_info_p = &((rlc_am_rx_pdu_management_t*)(tb_pP->data))->pdu_info;
rlc_am_pdu_info_t* pdu_info_cursor_p = NULL;
......@@ -196,7 +189,7 @@ rlc_am_rx_update_vr_ms(
pdu_info_cursor_p = &((rlc_am_rx_pdu_management_t*)(cursor_p->data))->pdu_info;
if (((rlc_am_rx_pdu_management_t*)(cursor_p->data))->all_segments_received == 0) {
#ifdef TRACE_RLC_AM_RX
#if TRACE_RLC_AM_RX
LOG_D(RLC, PROTOCOL_RLC_AM_CTXT_FMT"[UPDATE VR(MS)] UPDATED VR(MS) %04d -> %04d\n",
PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,rlc_pP),
rlc_pP->vr_ms, pdu_info_cursor_p->sn);
......@@ -208,7 +201,7 @@ rlc_am_rx_update_vr_ms(
cursor_p = cursor_p->next;
} while (cursor_p != NULL);
#ifdef TRACE_RLC_AM_RX
#if TRACE_RLC_AM_RX
LOG_D(RLC, PROTOCOL_RLC_AM_CTXT_FMT"[UPDATE VR(MS)] UPDATED VR(MS) %04d -> %04d\n",
PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,rlc_pP),
rlc_pP->vr_ms,
......@@ -224,7 +217,6 @@ rlc_am_rx_update_vr_r(
const protocol_ctxt_t* const ctxt_pP,
rlc_am_entity_t * const rlc_pP,
mem_block_t* tb_pP)
//-----------------------------------------------------------------------------
{
rlc_am_pdu_info_t* pdu_info_cursor_p = NULL;
mem_block_t* cursor_p;
......@@ -240,7 +232,7 @@ rlc_am_rx_update_vr_r(
return;
}
#ifdef TRACE_RLC_AM_RX
#if TRACE_RLC_AM_RX
LOG_D(RLC, PROTOCOL_RLC_AM_CTXT_FMT"[UPDATE VR(R)] UPDATED VR(R) %04d -> %04d\n",
PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,rlc_pP),
rlc_pP->vr_r,
......@@ -267,7 +259,6 @@ rlc_am_receive_routing (
const protocol_ctxt_t* const ctxt_pP,
rlc_am_entity_t * const rlc_pP,
struct mac_data_ind data_indP)
//-----------------------------------------------------------------------------
{
mem_block_t *tb_p = NULL;
uint8_t *first_byte_p = NULL;
......@@ -309,7 +300,6 @@ rlc_am_receive_process_data_pdu (
mem_block_t* tb_pP,
uint8_t* first_byte_pP,
uint16_t tb_size_in_bytesP)
//-----------------------------------------------------------------------------
{
// 5.1.3.2 Receive operations
// 5.1.3.2.1 General
......@@ -367,7 +357,7 @@ rlc_am_receive_process_data_pdu (
LOG_D(RLC, PROTOCOL_RLC_AM_CTXT_FMT"[PROCESS RX PDU] PDU DISCARDED, STATUS REQUESTED:\n",
PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,rlc_pP));
rlc_pP->status_requested = 1;
#if defined(RLC_STOP_ON_LOST_PDU)
#if RLC_STOP_ON_LOST_PDU
AssertFatal( 0 == 1,
PROTOCOL_RLC_AM_CTXT_FMT" LOST PDU DETECTED\n",
PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,rlc_pP));
......@@ -405,7 +395,7 @@ rlc_am_receive_process_data_pdu (
// - set VR(X) to VR(H).
#ifdef TRACE_RLC_AM_RX
#if TRACE_RLC_AM_RX
LOG_D(RLC, PROTOCOL_RLC_AM_CTXT_FMT"[PROCESS RX PDU] RX LIST AFTER INSERTION:\n",
PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,rlc_pP));
rlc_am_rx_list_display(rlc_pP, "rlc_am_receive_process_data_pdu AFTER INSERTION ");
......
......@@ -26,8 +26,8 @@
Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE
*******************************************************************************/
#define RLC_AM_MODULE
#define RLC_AM_RETRANSMIT_C
#define RLC_AM_MODULE 1
#define RLC_AM_RETRANSMIT_C 1
//-----------------------------------------------------------------------------
//#include "rtos_header.h"
//-----------------------------------------------------------------------------
......@@ -43,7 +43,6 @@ void rlc_am_nack_pdu (
const rlc_sn_t snP,
const sdu_size_t so_startP,
const sdu_size_t so_endP)
//-----------------------------------------------------------------------------
{
// 5.2.1 Retransmission
// ...
......@@ -112,7 +111,7 @@ void rlc_am_nack_pdu (
rlc_pP->input_sdus[sdu_index].nb_pdus_ack += 1;
if (rlc_pP->input_sdus[sdu_index].nb_pdus_ack == rlc_pP->input_sdus[sdu_index].nb_pdus) {
#ifdef TEST_RLC_AM
#if TEST_RLC_AM
rlc_am_v9_3_0_test_data_conf (rlc_pP->module_id, rlc_pP->rb_id, rlc_pP->input_sdus[sdu_index].mui, RLC_SDU_CONFIRM_NO);
#else
rlc_data_conf(ctxt_pP, rlc_pP->rb_id, rlc_pP->input_sdus[sdu_index].mui, RLC_SDU_CONFIRM_NO, rlc_pP->is_data_plane);
......@@ -142,7 +141,6 @@ void rlc_am_ack_pdu (
const protocol_ctxt_t* const ctxt_pP,
rlc_am_entity_t *const rlc_pP,
const rlc_sn_t snP)
//-----------------------------------------------------------------------------
{
mem_block_t* mb_p = rlc_pP->pdu_retrans_buffer[snP].mem_block;
int pdu_sdu_index;
......@@ -173,7 +171,7 @@ void rlc_am_ack_pdu (
if ((rlc_pP->input_sdus[sdu_index].nb_pdus_ack == rlc_pP->input_sdus[sdu_index].nb_pdus) &&
(rlc_pP->input_sdus[sdu_index].sdu_remaining_size == 0)) {
#ifdef TEST_RLC_AM
#if TEST_RLC_AM
rlc_am_v9_3_0_test_data_conf (
rlc_pP->module_id,
rlc_pP->rb_id,
......@@ -276,7 +274,6 @@ mem_block_t* rlc_am_retransmit_get_copy (
const protocol_ctxt_t* const ctxt_pP,
rlc_am_entity_t *const rlc_pP,
const rlc_sn_t snP)
//-----------------------------------------------------------------------------
{
mem_block_t* mb_original_p = rlc_pP->pdu_retrans_buffer[snP].mem_block;
......@@ -305,7 +302,6 @@ mem_block_t* rlc_am_retransmit_get_subsegment(
rlc_am_entity_t *const rlc_pP,
const rlc_sn_t snP,
sdu_size_t * const sizeP /* in-out*/)
//-----------------------------------------------------------------------------
{
// 5.2 ARQ procedures
......@@ -487,7 +483,7 @@ mem_block_t* rlc_am_retransmit_get_subsegment(
test_start_offset,
test_li_sum);
/*if (test_max_copy_payload_size > (test_li_sum - test_start_offset)) {
#ifdef TRACE_RLC_AM_RESEGMENT
#if TRACE_RLC_AM_RESEGMENT
LOG_D(RLC, "[FRAME %5u][%s][RLC_AM][MOD %u/%u][RB %u][RE-SEGMENT] CUT test_max_copy_payload_size with test_li_sum - test_start_offset %d -> %d\n",ctxt_pP->frame, rlc_pP->module_id, rlc_pP->rb_id, test_max_copy_payload_size, test_li_sum - test_start_offset);
#endif
test_max_copy_payload_size = test_li_sum - test_start_offset;
......@@ -771,7 +767,6 @@ void rlc_am_tx_buffer_display (
const protocol_ctxt_t* const ctxt_pP,
rlc_am_entity_t* const rlc_pP,
char* const message_pP)
//-----------------------------------------------------------------------------
{
rlc_sn_t sn = rlc_pP->vt_a;
int i, loop = 0;
......@@ -824,7 +819,6 @@ void rlc_am_tx_buffer_display (
void rlc_am_retransmit_any_pdu(
const protocol_ctxt_t* const ctxt_pP,
rlc_am_entity_t* const rlc_pP)
//-----------------------------------------------------------------------------
{
rlc_sn_t sn = (rlc_pP->vt_s - 1) & RLC_AM_SN_MASK;
rlc_sn_t sn_end = (rlc_pP->vt_a - 1) & RLC_AM_SN_MASK;
......@@ -847,7 +841,7 @@ void rlc_am_retransmit_any_pdu(
LOG_D(RLC, PROTOCOL_RLC_AM_CTXT_FMT"[FORCE-TRAFFIC] RE-SEND DATA PDU SN %04d\n",
PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,rlc_pP),
sn);
#if defined(MESSAGE_CHART_GENERATOR_RLC_MAC)
#if MESSAGE_CHART_GENERATOR_RLC_MAC
MSC_LOG_EVENT((ctxt_pP->enb_flag == ENB_FLAG_YES) ? MSC_RLC_ENB:MSC_RLC_UE,\
"0 "PROTOCOL_RLC_AM_MSC_FMT" RTX any pdu found SN %u",\
PROTOCOL_RLC_AM_MSC_ARGS(ctxt_pP,rlc_pP), sn);
......@@ -882,7 +876,7 @@ void rlc_am_retransmit_any_pdu(
found_pdu_sn);
if (rlc_pP->nb_bytes_requested_by_mac > 4) {
#if defined(MESSAGE_CHART_GENERATOR_RLC_MAC)
#if MESSAGE_CHART_GENERATOR_RLC_MAC
MSC_LOG_EVENT((ctxt_pP->enb_flag == ENB_FLAG_YES) ? MSC_RLC_ENB:MSC_RLC_UE,\
"0 "PROTOCOL_RLC_AM_MSC_FMT" RTX any pdu found SN %u (subseg)",\
PROTOCOL_RLC_AM_MSC_ARGS(ctxt_pP,rlc_pP), found_pdu_sn);
......
......@@ -26,11 +26,9 @@
Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE
*******************************************************************************/
#define RLC_AM_MODULE
#define RLC_AM_RX_LIST_C
#define RLC_AM_MODULE 1
#define RLC_AM_RX_LIST_C 1
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
//#include "rtos_header.h"
#include "platform_types.h"
//-----------------------------------------------------------------------------
#include "assertions.h"
......@@ -49,7 +47,6 @@ rlc_am_rx_list_insert_pdu(
const protocol_ctxt_t* const ctxt_pP,
rlc_am_entity_t* const rlc_pP,
mem_block_t* const tb_pP)
//-----------------------------------------------------------------------------
{
rlc_am_pdu_info_t* pdu_info_p = &((rlc_am_rx_pdu_management_t*)(tb_pP->data))->pdu_info;
rlc_am_pdu_info_t* pdu_info_cursor_p = NULL;
......@@ -496,7 +493,6 @@ rlc_am_rx_check_all_byte_segments(
const protocol_ctxt_t* const ctxt_pP,
rlc_am_entity_t* const rlc_pP,
mem_block_t* const tb_pP)
//-----------------------------------------------------------------------------
{
rlc_am_pdu_info_t *pdu_info_p = &((rlc_am_rx_pdu_management_t*)(tb_pP->data))->pdu_info;
mem_block_t *cursor_p = NULL;
......@@ -584,7 +580,6 @@ rlc_am_rx_mark_all_segments_received(
const protocol_ctxt_t* const ctxt_pP,
rlc_am_entity_t* const rlc_pP,
mem_block_t* const fisrt_segment_tbP)
//-----------------------------------------------------------------------------
{
rlc_am_pdu_info_t* pdu_info_p = &((rlc_am_rx_pdu_management_t*)(fisrt_segment_tbP->data))->pdu_info;
rlc_am_pdu_info_t* pdu_info_cursor_p = NULL;
......@@ -616,7 +611,6 @@ void
rlc_am_rx_list_reassemble_rlc_sdus(
const protocol_ctxt_t* const ctxt_pP,
rlc_am_entity_t* const rlc_pP)
//-----------------------------------------------------------------------------
{
mem_block_t* cursor_p = NULL;
rlc_am_rx_pdu_management_t* rlc_am_rx_old_pdu_management = NULL;
......@@ -642,7 +636,7 @@ rlc_am_rx_list_reassemble_rlc_sdus(
rlc_am_rx_pdu_management_p = ((rlc_am_rx_pdu_management_t*)(cursor_p->data));
} else {
#if defined(RLC_STOP_ON_LOST_PDU)
#if RLC_STOP_ON_LOST_PDU
if (list2_get_head(&rlc_pP->receiver_buffer) != cursor_p) {
AssertFatal( 0 == 1,
......@@ -663,7 +657,6 @@ list2_insert_before_element (
mem_block_t * element_to_insert_pP,
mem_block_t * element_pP,
list2_t * list_pP)
//-----------------------------------------------------------------------------
{
if ((element_to_insert_pP != NULL) && (element_pP != NULL)) {
list_pP->nb_elements = list_pP->nb_elements + 1;
......@@ -690,7 +683,6 @@ list2_insert_after_element (
mem_block_t * element_to_insert_pP,
mem_block_t * element_pP,
list2_t * list_pP)
//-----------------------------------------------------------------------------
{
if ((element_to_insert_pP != NULL) && (element_pP != NULL)) {
......@@ -717,7 +709,6 @@ void
rlc_am_rx_list_display (
const rlc_am_entity_t* const rlc_pP,
char* message_pP)
//-----------------------------------------------------------------------------
{
mem_block_t *cursor_p = NULL;
unsigned int loop = 0;
......
......@@ -26,14 +26,13 @@
Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE
*******************************************************************************/
#define RLC_AM_MODULE
#define RLC_AM_SEGMENT_C
#define RLC_AM_MODULE 1
#define RLC_AM_SEGMENT_C 1
//-----------------------------------------------------------------------------
#ifdef USER_MODE
#if USER_MODE
#include <assert.h>
#endif
//-----------------------------------------------------------------------------
//#include "rtos_header.h"
#include "platform_types.h"
//-----------------------------------------------------------------------------
#include "msc.h"
......@@ -48,7 +47,6 @@ void rlc_am_pdu_polling (
rlc_am_entity_t *const rlc_pP,
rlc_am_pdu_sn_10_t *const pdu_pP,
const int16_t payload_sizeP)
//-----------------------------------------------------------------------------
{
// 5.2.2 Polling
// An AM RLC entity can poll its peer AM RLC entity in order to trigger STATUS reporting at the peer AM RLC entity.
......@@ -127,7 +125,6 @@ void rlc_am_segment_10 (
const protocol_ctxt_t* const ctxt_pP,
rlc_am_entity_t *const rlc_pP)
{
//-----------------------------------------------------------------------------
list_t pdus;
sdu_size_t pdu_remaining_size = 0;
sdu_size_t test_pdu_remaining_size = 0;
......@@ -465,7 +462,7 @@ void rlc_am_segment_10 (
PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,rlc_pP),
sdu_mngt_p->sdu_remaining_size,
pdu_remaining_size - sdu_mngt_p->sdu_remaining_size);
#ifdef USER_MODE
#if USER_MODE
assert(1!=1);
#endif
memcpy(data, data_sdu_p, sdu_mngt_p->sdu_remaining_size);
......
......@@ -26,20 +26,18 @@
Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE
*******************************************************************************/
#define RLC_AM_MODULE
#define RLC_AM_SEGMENT_HOLES_C
#define RLC_AM_MODULE 1
#define RLC_AM_SEGMENT_HOLES_C 1
//-----------------------------------------------------------------------------
#include "rlc_am.h"
#include "LAYER2/MAC/extern.h"
#include "UTIL/LOG/log.h"
#define TRACE_RLC_AM_HOLE
//-----------------------------------------------------------------------------
void rlc_am_clear_holes (
const protocol_ctxt_t* const ctxt_pP,
rlc_am_entity_t *const rlc_pP,
const rlc_sn_t snP)
//-----------------------------------------------------------------------------
{
rlc_pP->pdu_retrans_buffer[snP].num_holes = 0;
}
......@@ -49,7 +47,6 @@ void rlc_am_shift_down_holes (
rlc_am_entity_t *const rlc_pP,
const rlc_sn_t snP,
const int indexP)
//-----------------------------------------------------------------------------
{
int i;
......@@ -66,7 +63,6 @@ void rlc_am_shift_up_holes (
rlc_am_entity_t *const rlc_pP,
const rlc_sn_t snP,
const int indexP)
//-----------------------------------------------------------------------------
{
// shift include indexP
int i;
......@@ -86,10 +82,9 @@ void rlc_am_remove_hole (
const rlc_sn_t snP,
const sdu_size_t so_startP,
const sdu_size_t so_stopP)
//-----------------------------------------------------------------------------
{
int i;
#ifdef TRACE_RLC_AM_HOLE
#if TRACE_RLC_AM_HOLE
LOG_D(RLC,
PROTOCOL_RLC_AM_CTXT_FMT"[HOLE] REMOVE HOLE SN %04d so_startP %05d so_stopP %05d rlc_pP->pdu_retrans_buffer[snP].nack_so_start %05d rlc_pP->pdu_retrans_buffer[snP].nack_so_stop %05d\n",
PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,rlc_pP),
......@@ -104,7 +99,7 @@ void rlc_am_remove_hole (
if (rlc_pP->pdu_retrans_buffer[snP].num_holes == 0) {
assert(so_startP == rlc_pP->pdu_retrans_buffer[snP].nack_so_start);
assert(so_stopP <= rlc_pP->pdu_retrans_buffer[snP].nack_so_stop);
#ifdef TRACE_RLC_AM_HOLE
#if TRACE_RLC_AM_HOLE
LOG_D(RLC, PROTOCOL_RLC_AM_CTXT_FMT"[HOLE] REMOVE HOLE SN %04d MODIFIED nack_so_start %05d->%05d\n",
PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,rlc_pP),
snP,
......@@ -135,7 +130,7 @@ void rlc_am_remove_hole (
rlc_pP->pdu_retrans_buffer[snP].nack_so_stop = rlc_pP->pdu_retrans_buffer[snP].hole_so_stop[rlc_pP->pdu_retrans_buffer[snP].num_holes - 1];
}
#ifdef TRACE_RLC_AM_HOLE
#if TRACE_RLC_AM_HOLE
LOG_D(RLC, PROTOCOL_RLC_AM_CTXT_FMT"[HOLE] REMOVE HOLE SN %04d NOW nack_so_start %05d nack_so_stop %05d num holes %d\n",
PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,rlc_pP),
snP,
......@@ -169,7 +164,7 @@ void rlc_am_remove_hole (
}
}
#ifdef TRACE_RLC_AM_HOLE
#if TRACE_RLC_AM_HOLE
LOG_D(RLC, PROTOCOL_RLC_AM_CTXT_FMT"[HOLE] REMOVE HOLE SN %04d NOW nack_so_start %05d nack_so_stop %05d num holes %d\n",
PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,rlc_pP),
snP,
......@@ -186,12 +181,11 @@ void rlc_am_get_next_hole (
const rlc_sn_t snP,
sdu_size_t* const so_startP,
sdu_size_t* const so_stopP)
//-----------------------------------------------------------------------------
{
if (rlc_pP->pdu_retrans_buffer[snP].num_holes == 0) {
*so_startP = rlc_pP->pdu_retrans_buffer[snP].nack_so_start;
*so_stopP = rlc_pP->pdu_retrans_buffer[snP].nack_so_stop;
#ifdef TRACE_RLC_AM_HOLE
#if TRACE_RLC_AM_HOLE
LOG_D(RLC, PROTOCOL_RLC_AM_CTXT_FMT"[HOLE] rlc_am_get_next_hole(SN %04d) %05d->%05d (NUM HOLES == 0)\n",
PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,rlc_pP),
snP,
......@@ -201,7 +195,7 @@ void rlc_am_get_next_hole (
} else {
*so_startP = rlc_pP->pdu_retrans_buffer[snP].hole_so_start[0];
*so_stopP = rlc_pP->pdu_retrans_buffer[snP].hole_so_stop[0];
#ifdef TRACE_RLC_AM_HOLE
#if TRACE_RLC_AM_HOLE
LOG_D(RLC, PROTOCOL_RLC_AM_CTXT_FMT"[HOLE] rlc_am_get_next_hole(SN %04d) %05d->%05d (NUM HOLES == %d)\n",
PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,rlc_pP),
snP,
......@@ -218,7 +212,6 @@ void rlc_am_add_hole (
const rlc_sn_t snP,
const sdu_size_t so_startP,
sdu_size_t so_stopP)
//-----------------------------------------------------------------------------
{
int i, hole_index;
......@@ -232,7 +225,7 @@ void rlc_am_add_hole (
rlc_pP->pdu_retrans_buffer[snP].num_holes = 0;
rlc_pP->pdu_retrans_buffer[snP].nack_so_start = so_startP;
rlc_pP->pdu_retrans_buffer[snP].nack_so_stop = so_stopP;
#ifdef TRACE_RLC_AM_HOLE
#if TRACE_RLC_AM_HOLE
LOG_D(RLC, PROTOCOL_RLC_AM_CTXT_FMT"[HOLE] SN %04d GLOBAL NACK 0->%05d\n",
PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,rlc_pP),
snP,
......@@ -255,7 +248,7 @@ void rlc_am_add_hole (
rlc_pP->pdu_retrans_buffer[snP].nack_so_start = so_startP;
rlc_pP->pdu_retrans_buffer[snP].nack_so_stop = so_stopP;
#ifdef TRACE_RLC_AM_HOLE
#if TRACE_RLC_AM_HOLE
LOG_D(RLC, PROTOCOL_RLC_AM_CTXT_FMT"[HOLE] FIRST HOLE SN %04d GLOBAL NACK %05d->%05d\n",
PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,rlc_pP),
snP,
......@@ -290,7 +283,7 @@ void rlc_am_add_hole (
}
rlc_pP->pdu_retrans_buffer[snP].num_holes += 1;
#ifdef TRACE_RLC_AM_HOLE
#if TRACE_RLC_AM_HOLE
LOG_D(RLC, PROTOCOL_RLC_AM_CTXT_FMT"[HOLE] INSERT %d th HOLE SN %04d GLOBAL NACK %05d->%05d\n",
PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,rlc_pP),
rlc_pP->pdu_retrans_buffer[snP].num_holes,
......@@ -314,7 +307,7 @@ void rlc_am_add_hole (
rlc_pP->pdu_retrans_buffer[snP].num_holes += 1;
// update nack "window" vars nack_so_start, nack_so_stop
rlc_pP->pdu_retrans_buffer[snP].nack_so_stop = so_stopP;
#ifdef TRACE_RLC_AM_HOLE
#if TRACE_RLC_AM_HOLE
LOG_D(RLC, PROTOCOL_RLC_AM_CTXT_FMT"[HOLE] INSERT THE %d th LAST HOLE SN %04d GLOBAL NACK %05d->%05d\n",
PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,rlc_pP),
rlc_pP->pdu_retrans_buffer[snP].num_holes,
......
......@@ -26,9 +26,9 @@
Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE
*******************************************************************************/
#define RLC_AM_MODULE
#define RLC_AM_TEST_C
#define RLC_C
#define RLC_AM_MODULE 1
#define RLC_AM_TEST_C 1
#define RLC_C 1
#include <execinfo.h>
#include <stdio.h>
......
......@@ -26,8 +26,8 @@
Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE
*******************************************************************************/
#define RLC_AM_MODULE
#define RLC_AM_TIMER_POLL_RETRANSMIT_C
#define RLC_AM_MODULE 1
#define RLC_AM_TIMER_POLL_RETRANSMIT_C 1
//-----------------------------------------------------------------------------
//#include "rtos_header.h"
#include "platform_types.h"
......@@ -43,7 +43,6 @@ rlc_am_check_timer_poll_retransmit(
const protocol_ctxt_t* const ctxt_pP,
rlc_am_entity_t * const rlc_pP
)
//-----------------------------------------------------------------------------
{
// 5.2.2.3 Expiry of t-PollRetransmit
// Upon expiry of t-PollRetransmit, the transmitting side of an AM RLC entity shall:
......@@ -77,7 +76,7 @@ rlc_am_check_timer_poll_retransmit(
rlc_pP->t_poll_retransmit.running = 0;
rlc_pP->t_poll_retransmit.timed_out = 1;
rlc_pP->stat_timer_poll_retransmit_timed_out += 1;
#if defined(MESSAGE_CHART_GENERATOR_RLC_MAC)
#if MESSAGE_CHART_GENERATOR_RLC_MAC
MSC_LOG_EVENT((ctxt_pP->enb_flag == ENB_FLAG_YES) ? MSC_RLC_ENB:MSC_RLC_UE,\
"0 "PROTOCOL_RLC_AM_MSC_FMT" t_poll_retransmit timed-out",\
PROTOCOL_RLC_AM_MSC_ARGS(ctxt_pP,rlc_pP));
......@@ -98,7 +97,6 @@ rlc_am_is_timer_poll_retransmit_timed_out(
const protocol_ctxt_t* const ctxt_pP,
rlc_am_entity_t * const rlc_pP
)
//-----------------------------------------------------------------------------
{
return rlc_pP->t_poll_retransmit.timed_out;
}
......@@ -108,7 +106,6 @@ rlc_am_stop_and_reset_timer_poll_retransmit(
const protocol_ctxt_t* const ctxt_pP,
rlc_am_entity_t * const rlc_pP
)
//-----------------------------------------------------------------------------
{
LOG_D(RLC, PROTOCOL_RLC_AM_CTXT_FMT"[T_POLL_RETRANSMIT] STOPPED AND RESET\n",
PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,rlc_pP));
......@@ -116,7 +113,7 @@ rlc_am_stop_and_reset_timer_poll_retransmit(
rlc_pP->t_poll_retransmit.ms_time_out = 0;
rlc_pP->t_poll_retransmit.ms_start = 0;
rlc_pP->t_poll_retransmit.timed_out = 0;
#if defined(MESSAGE_CHART_GENERATOR_RLC_MAC)
#if MESSAGE_CHART_GENERATOR_RLC_MAC
MSC_LOG_EVENT((ctxt_pP->enb_flag == ENB_FLAG_YES) ? MSC_RLC_ENB:MSC_RLC_UE,\
"0 "PROTOCOL_RLC_AM_MSC_FMT" t_poll_retransmit stopped & reseted",\
PROTOCOL_RLC_AM_MSC_ARGS(ctxt_pP,rlc_pP));
......@@ -128,7 +125,6 @@ rlc_am_start_timer_poll_retransmit(
const protocol_ctxt_t* const ctxt_pP,
rlc_am_entity_t * const rlc_pP
)
//-----------------------------------------------------------------------------
{
rlc_pP->t_poll_retransmit.timed_out = 0;
......@@ -140,7 +136,7 @@ rlc_am_start_timer_poll_retransmit(
LOG_D(RLC, PROTOCOL_RLC_AM_CTXT_FMT"[T_POLL_RETRANSMIT] STARTED (TIME-OUT = FRAME %05d)\n",
PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,rlc_pP),
rlc_pP->t_poll_retransmit.ms_time_out);
#if defined(MESSAGE_CHART_GENERATOR_RLC_MAC)
#if MESSAGE_CHART_GENERATOR_RLC_MAC
MSC_LOG_EVENT((ctxt_pP->enb_flag == ENB_FLAG_YES) ? MSC_RLC_ENB:MSC_RLC_UE,\
"0 "PROTOCOL_RLC_AM_MSC_FMT" t_poll_retransmit started (TO %u ms)",\
PROTOCOL_RLC_AM_MSC_ARGS(ctxt_pP,rlc_pP), rlc_pP->t_poll_retransmit.ms_time_out);
......@@ -150,7 +146,7 @@ rlc_am_start_timer_poll_retransmit(
PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,rlc_pP));
}
} else {
#if defined(MESSAGE_CHART_GENERATOR_RLC_MAC)
#if MESSAGE_CHART_GENERATOR_RLC_MAC
MSC_LOG_EVENT((ctxt_pP->enb_flag == ENB_FLAG_YES) ? MSC_RLC_ENB:MSC_RLC_UE,\
"0 "PROTOCOL_RLC_AM_MSC_FMT" t_poll_retransmit not restarted (TO %u ms)",\
PROTOCOL_RLC_AM_MSC_ARGS(ctxt_pP,rlc_pP), rlc_pP->t_poll_retransmit.ms_time_out);
......@@ -164,7 +160,6 @@ rlc_am_init_timer_poll_retransmit(
const protocol_ctxt_t* const ctxt_pP,
rlc_am_entity_t * const rlc_pP,
const uint32_t ms_durationP)
//-----------------------------------------------------------------------------
{
rlc_pP->t_poll_retransmit.running = 0;
rlc_pP->t_poll_retransmit.ms_time_out = 0;
......
......@@ -26,10 +26,9 @@
Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE
*******************************************************************************/
#define RLC_AM_MODULE
#define RLC_AM_TIMER_POLL_REORDERING_C
#define RLC_AM_MODULE 1
#define RLC_AM_TIMER_POLL_REORDERING_C 1
//-----------------------------------------------------------------------------
//#include "rtos_header.h"
#include "platform_types.h"
#include "platform_constants.h"
//-----------------------------------------------------------------------------
......@@ -42,7 +41,6 @@ void
rlc_am_check_timer_reordering(
const protocol_ctxt_t* const ctxt_pP,
rlc_am_entity_t * const rlc_pP)
//-----------------------------------------------------------------------------
{
if (rlc_pP->t_reordering.running) {
......@@ -73,7 +71,7 @@ rlc_am_check_timer_reordering(
// - start t-Reordering;
// - set VR(X) to VR(H).
#if defined(MESSAGE_CHART_GENERATOR_RLC_MAC)
#if MESSAGE_CHART_GENERATOR_RLC_MAC
MSC_LOG_EVENT((ctxt_pP->enb_flag == ENB_FLAG_YES) ? MSC_RLC_ENB:MSC_RLC_UE,\
"0 "PROTOCOL_RLC_AM_MSC_FMT" t_reordering timed out",\
PROTOCOL_RLC_AM_MSC_ARGS(ctxt_pP,rlc_pP));
......@@ -126,7 +124,6 @@ void
rlc_am_stop_and_reset_timer_reordering(
const protocol_ctxt_t* const ctxt_pP,
rlc_am_entity_t * const rlc_pP)
//-----------------------------------------------------------------------------
{
LOG_D(RLC, PROTOCOL_RLC_AM_CTXT_FMT"[T-REORDERING] STOPPED AND RESET\n",
PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,rlc_pP));
......@@ -134,7 +131,7 @@ rlc_am_stop_and_reset_timer_reordering(
rlc_pP->t_reordering.ms_time_out = 0;
rlc_pP->t_reordering.ms_start = 0;
rlc_pP->t_reordering.timed_out = 0;
#if defined(MESSAGE_CHART_GENERATOR_RLC_MAC)
#if MESSAGE_CHART_GENERATOR_RLC_MAC
MSC_LOG_EVENT((ctxt_pP->enb_flag == ENB_FLAG_YES) ? MSC_RLC_ENB:MSC_RLC_UE,\
"0 "PROTOCOL_RLC_AM_MSC_FMT" t_reordering stopped & reseted",\
PROTOCOL_RLC_AM_MSC_ARGS(ctxt_pP,rlc_pP));
......@@ -145,7 +142,6 @@ void
rlc_am_start_timer_reordering(
const protocol_ctxt_t* const ctxt_pP,
rlc_am_entity_t * const rlc_pP)
//-----------------------------------------------------------------------------
{
rlc_pP->t_reordering.timed_out = 0;
......@@ -157,7 +153,7 @@ rlc_am_start_timer_reordering(
LOG_D(RLC, PROTOCOL_RLC_AM_CTXT_FMT"[T-REORDERING] STARTED (TIME-OUT = %5u ms)\n",
PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,rlc_pP),
rlc_pP->t_reordering.ms_time_out);
#if defined(MESSAGE_CHART_GENERATOR_RLC_MAC)
#if MESSAGE_CHART_GENERATOR_RLC_MAC
MSC_LOG_EVENT((ctxt_pP->enb_flag == ENB_FLAG_YES) ? MSC_RLC_ENB:MSC_RLC_UE,\
"0 "PROTOCOL_RLC_AM_MSC_FMT" t_reordering started (TO %u ms)",\
PROTOCOL_RLC_AM_MSC_ARGS(ctxt_pP,rlc_pP), rlc_pP->t_reordering.ms_time_out);
......@@ -174,7 +170,6 @@ rlc_am_init_timer_reordering(
const protocol_ctxt_t* const ctxt_pP,
rlc_am_entity_t * const rlc_pP,
const uint32_t ms_durationP)
//-----------------------------------------------------------------------------
{
rlc_pP->t_reordering.running = 0;
rlc_pP->t_reordering.ms_time_out = 0;
......
......@@ -26,10 +26,9 @@
Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE
*******************************************************************************/
#define RLC_AM_MODULE
#define RLC_AM_TIMER_STATUS_PROHIBIT_C
#define RLC_AM_MODULE 1
#define RLC_AM_TIMER_STATUS_PROHIBIT_C 1
//-----------------------------------------------------------------------------
//#include "rtos_header.h"
#include "platform_types.h"
#include "platform_constants.h"
//-----------------------------------------------------------------------------
......@@ -42,7 +41,6 @@ void
rlc_am_check_timer_status_prohibit(
const protocol_ctxt_t* const ctxt_pP,
rlc_am_entity_t * const rlc_pP)
//-----------------------------------------------------------------------------
{
if (rlc_pP->t_status_prohibit.ms_duration > 0) {
if (rlc_pP->t_status_prohibit.running) {
......@@ -70,7 +68,7 @@ rlc_am_check_timer_status_prohibit(
rlc_pP->t_status_prohibit.timed_out = 1;
rlc_pP->stat_timer_status_prohibit_timed_out += 1;
#if defined(MESSAGE_CHART_GENERATOR_RLC_MAC)
#if MESSAGE_CHART_GENERATOR_RLC_MAC
MSC_LOG_EVENT((ctxt_pP->enb_flag == ENB_FLAG_YES) ? MSC_RLC_ENB:MSC_RLC_UE,\
"0 "PROTOCOL_RLC_AM_MSC_FMT" t_status_prohibit timed out",\
PROTOCOL_RLC_AM_MSC_ARGS(ctxt_pP,rlc_pP));
......@@ -90,7 +88,6 @@ rlc_am_stop_and_reset_timer_status_prohibit(
const protocol_ctxt_t* const ctxt_pP,
rlc_am_entity_t *const rlc_pP
)
//-----------------------------------------------------------------------------
{
if (rlc_pP->t_status_prohibit.ms_duration > 0) {
LOG_D(RLC, PROTOCOL_RLC_AM_CTXT_FMT"[T-STATUS-PROHIBIT] STOPPED AND RESET\n",
......@@ -99,7 +96,7 @@ rlc_am_stop_and_reset_timer_status_prohibit(
rlc_pP->t_status_prohibit.ms_time_out = 0;
rlc_pP->t_status_prohibit.ms_start = 0;
rlc_pP->t_status_prohibit.timed_out = 0;
#if defined(MESSAGE_CHART_GENERATOR_RLC_MAC)
#if MESSAGE_CHART_GENERATOR_RLC_MAC
MSC_LOG_EVENT((ctxt_pP->enb_flag == ENB_FLAG_YES) ? MSC_RLC_ENB:MSC_RLC_UE,\
"0 "PROTOCOL_RLC_AM_MSC_FMT" t_status_prohibit stopped & reseted",\
PROTOCOL_RLC_AM_MSC_ARGS(ctxt_pP,rlc_pP));
......@@ -112,7 +109,6 @@ rlc_am_start_timer_status_prohibit(
const protocol_ctxt_t* const ctxt_pP,
rlc_am_entity_t *const rlc_pP
)
//-----------------------------------------------------------------------------
{
rlc_pP->t_status_prohibit.timed_out = 0;
......@@ -125,7 +121,7 @@ rlc_am_start_timer_status_prohibit(
PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,rlc_pP),
rlc_pP->t_status_prohibit.ms_time_out);
LOG_D(RLC, "TIME-OUT = FRAME %u\n", rlc_pP->t_status_prohibit.ms_time_out);
#if defined(MESSAGE_CHART_GENERATOR_RLC_MAC)
#if MESSAGE_CHART_GENERATOR_RLC_MAC
MSC_LOG_EVENT((ctxt_pP->enb_flag == ENB_FLAG_YES) ? MSC_RLC_ENB:MSC_RLC_UE,\
"0 "PROTOCOL_RLC_AM_MSC_FMT" t_status_prohibit started (TO %u ms)",\
PROTOCOL_RLC_AM_MSC_ARGS(ctxt_pP,rlc_pP), rlc_pP->t_status_prohibit.ms_time_out);
......@@ -141,7 +137,6 @@ void rlc_am_init_timer_status_prohibit(
const protocol_ctxt_t* const ctxt_pP,
rlc_am_entity_t *const rlc_pP,
const uint32_t ms_durationP)
//-----------------------------------------------------------------------------
{
rlc_pP->t_status_prohibit.running = 0;
rlc_pP->t_status_prohibit.ms_time_out = 0;
......
......@@ -26,14 +26,13 @@
Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE
*******************************************************************************/
#define RLC_AM_MODULE
#define RLC_AM_WINDOWS_C
#define RLC_AM_MODULE 1
#define RLC_AM_WINDOWS_C 1
//-----------------------------------------------------------------------------
#ifdef USER_MODE
#if USER_MODE
#include <assert.h>
#endif
//-----------------------------------------------------------------------------
//#include "rtos_header.h"
#include "platform_types.h"
//-----------------------------------------------------------------------------
#include "rlc_am.h"
......@@ -43,7 +42,6 @@ signed int rlc_am_in_tx_window(
const protocol_ctxt_t* const ctxt_pP,
const rlc_am_entity_t* const rlc_pP,
const rlc_sn_t snP)
//-----------------------------------------------------------------------------
{
rlc_usn_t shifted_sn;
rlc_usn_t upper_bound;
......@@ -67,7 +65,6 @@ rlc_am_in_rx_window(
const protocol_ctxt_t* const ctxt_pP,
const rlc_am_entity_t* const rlc_pP,
const rlc_sn_t snP)
//-----------------------------------------------------------------------------
{
rlc_usn_t shifted_sn;
rlc_usn_t upper_bound;
......@@ -91,7 +88,6 @@ rlc_am_sn_gte_vr_h(
const protocol_ctxt_t* const ctxt_pP,
const rlc_am_entity_t* const rlc_pP,
const rlc_sn_t snP)
//-----------------------------------------------------------------------------
{
rlc_usn_t shifted_sn;
rlc_usn_t upper_bound;
......@@ -114,7 +110,6 @@ signed int rlc_am_sn_gte_vr_x(
const protocol_ctxt_t* const ctxt_pP,
const rlc_am_entity_t* const rlc_pP,
const rlc_sn_t snP)
//-----------------------------------------------------------------------------
{
rlc_usn_t shifted_sn;
rlc_usn_t upper_bound;
......@@ -138,7 +133,6 @@ rlc_am_sn_gt_vr_ms(
const protocol_ctxt_t* const ctxt_pP,
const rlc_am_entity_t* const rlc_pP,
const rlc_sn_t snP)
//-----------------------------------------------------------------------------
{
rlc_usn_t shifted_sn;
rlc_usn_t upper_bound;
......@@ -163,7 +157,6 @@ rlc_am_tx_sn1_gt_sn2(
const rlc_am_entity_t* const rlc_pP,
const rlc_sn_t sn1P,
const rlc_sn_t sn2P)
//-----------------------------------------------------------------------------
{
rlc_usn_t shifted_sn;
rlc_usn_t upper_bound;
......@@ -188,7 +181,6 @@ rlc_am_rx_sn1_gt_sn2(
const rlc_am_entity_t* const rlc_pP,
const rlc_sn_t sn1P,
const rlc_sn_t sn2P)
//-----------------------------------------------------------------------------
{
rlc_usn_t shifted_sn;
rlc_usn_t upper_bound;
......
......@@ -26,8 +26,8 @@
Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE
*******************************************************************************/
#define RLC_TM_MODULE
#define RLC_TM_C
#define RLC_TM_MODULE 1
#define RLC_TM_C 1
//-----------------------------------------------------------------------------
#include "platform_types.h"
#include "platform_constants.h"
......@@ -46,12 +46,11 @@ rlc_tm_send_sdu (
uint8_t * const srcP,
const sdu_size_t length_in_bitsP)
{
//-----------------------------------------------------------------------------
int length_in_bytes;
#ifdef DEBUG_RLC_TM_DISPLAY_ASCII_DATA
#if DEBUG_RLC_TM_DISPLAY_ASCII_DATA
int index;
#endif
#ifdef DEBUG_RLC_TM_REASSEMBLY
#if DEBUG_RLC_TM_REASSEMBLY
LOG_D(RLC, PROTOCOL_RLC_TM_CTXT_FMT"[SEND_SDU] %d bits\n",
PROTOCOL_RLC_TM_CTXT_ARGS(ctxt_pP, rlc_pP),
length_in_bitsP);
......@@ -63,7 +62,7 @@ rlc_tm_send_sdu (
}
if ((rlc_pP->output_sdu_in_construction)) {
#ifdef DEBUG_RLC_TM_DISPLAY_ASCII_DATA
#if DEBUG_RLC_TM_DISPLAY_ASCII_DATA
LOG_D(RLC, PROTOCOL_RLC_TM_CTXT_FMT"[SEND_SDU] DATA :",
PROTOCOL_RLC_TM_CTXT_ARGS(ctxt_pP, rlc_pP));
......@@ -95,7 +94,6 @@ rlc_tm_no_segment (
rlc_tm_entity_t *const rlc_pP
)
{
//-----------------------------------------------------------------------------
mem_block_t *pdu_p = NULL;
struct rlc_tm_tx_sdu_management *sdu_mngt_p = NULL;
struct rlc_tm_tx_pdu_management *pdu_mngt_p = NULL;
......@@ -138,7 +136,6 @@ rlc_tm_rx (
void * const argP,
struct mac_data_ind data_indP)
{
//-----------------------------------------------------------------------------
rlc_tm_entity_t * const rlc_p = (rlc_tm_entity_t *) argP;
mem_block_t *tb_p;
......@@ -164,7 +161,6 @@ rlc_tm_mac_status_indication (
const tb_size_t tb_sizeP,
struct mac_status_ind tx_statusP)
{
//-----------------------------------------------------------------------------
struct mac_status_resp status_resp;
((rlc_tm_entity_t *) rlc_pP)->rlc_pdu_size = tb_sizeP;
......@@ -181,7 +177,6 @@ rlc_tm_mac_data_request (
const protocol_ctxt_t* const ctxt_pP,
void * const rlc_pP)
{
//-----------------------------------------------------------------------------
rlc_tm_entity_t* rlc_p = (rlc_tm_entity_t*) rlc_pP;
struct mac_data_req data_req;
......@@ -208,7 +203,6 @@ rlc_tm_mac_data_indication (
void * const rlc_pP,
struct mac_data_ind data_indP)
{
//-----------------------------------------------------------------------------
rlc_tm_entity_t* rlc_p = (rlc_tm_entity_t*) rlc_pP;
if (data_indP.data.nb_elements > 0) {
......@@ -227,10 +221,9 @@ rlc_tm_data_req (
void *const rlc_pP,
mem_block_t *const sdu_pP)
{
//-----------------------------------------------------------------------------
rlc_tm_entity_t *rlc_p = (rlc_tm_entity_t *) rlc_pP;
#ifdef DEBUG_RLC_TM_DATA_REQUEST
#if DEBUG_RLC_TM_DATA_REQUEST
LOG_D (RLC, PROTOCOL_RLC_TM_CTXT_FMT" RLC_TM_DATA_REQ size %d Bytes, BO %ld , NB SDU %d current_sdu_index=%d next_sdu_index=%d\n",
PROTOCOL_RLC_TM_CTXT_ARGS(ctxt_pP, rlc_p),
((struct rlc_um_data_req *) (sdu_pP->data))->data_size,
......
......@@ -26,8 +26,8 @@
Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE
*******************************************************************************/
#define RLC_TM_MODULE
#define RLC_TM_INIT_C
#define RLC_TM_MODULE 1
#define RLC_TM_INIT_C 1
//-----------------------------------------------------------------------------
#include "rlc_tm.h"
#include "LAYER2/MAC/extern.h"
......@@ -39,7 +39,6 @@ void config_req_rlc_tm (
const rb_id_t rb_idP
)
{
//-----------------------------------------------------------------------------
rlc_union_t *rlc_union_p = NULL;
rlc_tm_entity_t *rlc_p = NULL;
hash_key_t key = RLC_COLL_KEY_VALUE(ctxt_pP->module_id, ctxt_pP->rnti, ctxt_pP->enb_flag, rb_idP, srb_flagP);
......@@ -71,7 +70,6 @@ void rlc_tm_init (
rlc_tm_entity_t * const rlcP
)
{
//-----------------------------------------------------------------------------
int saved_allocation = rlcP->allocation;
memset (rlcP, 0, sizeof (struct rlc_tm_entity));
rlcP->allocation = saved_allocation;
......@@ -103,7 +101,6 @@ rlc_tm_reset_state_variables (
struct rlc_tm_entity * const rlcP
)
{
//-----------------------------------------------------------------------------
rlcP->output_sdu_size_to_write = 0;
rlcP->buffer_occupancy = 0;
rlcP->nb_sdu = 0;
......@@ -116,7 +113,6 @@ rlc_tm_cleanup (
rlc_tm_entity_t * const rlcP
)
{
//-----------------------------------------------------------------------------
int index;
// TX SIDE
list_free (&rlcP->pdus_to_mac_layer);
......@@ -146,7 +142,6 @@ void rlc_tm_configure(
rlc_tm_entity_t * const rlcP,
const boolean_t is_uplink_downlinkP)
{
//-----------------------------------------------------------------------------
rlcP->is_uplink_downlink = is_uplink_downlinkP;
rlc_tm_reset_state_variables (ctxt_pP, rlcP);
}
......@@ -157,7 +152,6 @@ void rlc_tm_set_debug_infos(
rlc_tm_entity_t * const rlcP,
const srb_flag_t srb_flagP,
const rb_id_t rb_idP)
//-----------------------------------------------------------------------------
{
rlcP->rb_id = rb_idP;
......
This diff is collapsed.
......@@ -26,8 +26,8 @@
Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE
*******************************************************************************/
#define RLC_UM_MODULE
#define RLC_UM_CONTROL_PRIMITIVES_C
#define RLC_UM_MODULE 1
#define RLC_UM_CONTROL_PRIMITIVES_C 1
#include "platform_types.h"
#include "assertions.h"
//-----------------------------------------------------------------------------
......@@ -49,7 +49,6 @@ void config_req_rlc_um (
const rlc_um_info_t * const config_um_pP,
const rb_id_t rb_idP)
{
//-----------------------------------------------------------------------------
rlc_union_t *rlc_union_p = NULL;
rlc_um_entity_t *rlc_p = NULL;
hash_key_t key = RLC_COLL_KEY_VALUE(ctxt_pP->module_id, ctxt_pP->rnti, ctxt_pP->enb_flag, rb_idP, srb_flagP);
......@@ -105,7 +104,7 @@ void config_req_rlc_um_asn1 (
hash_key_t key = RLC_COLL_KEY_VALUE(ctxt_pP->module_id, ctxt_pP->rnti, ctxt_pP->enb_flag, rb_idP, srb_flagP);
hashtable_rc_t h_rc;
#if defined(Rel10)
#if Rel10
if (mbms_flagP) {
AssertFatal(dl_rlc_pP, "No RLC UM DL config");
......@@ -266,7 +265,6 @@ rlc_um_init (
rlc_um_entity_t * const rlc_pP
)
{
//-----------------------------------------------------------------------------
AssertFatal(rlc_pP, "Bad RLC UM pointer (NULL)");
......@@ -316,7 +314,6 @@ rlc_um_reset_state_variables (
rlc_um_entity_t * const rlc_pP
)
{
//-----------------------------------------------------------------------------
rlc_pP->buffer_occupancy = 0;
......@@ -332,7 +329,6 @@ void
rlc_um_cleanup (
rlc_um_entity_t * const rlc_pP)
{
//-----------------------------------------------------------------------------
int index;
// TX SIDE
list_free (&rlc_pP->pdus_to_mac_layer);
......@@ -369,7 +365,6 @@ void rlc_um_configure(
const uint32_t rx_sn_field_lengthP,
const uint32_t tx_sn_field_lengthP,
const uint32_t is_mXchP)
//-----------------------------------------------------------------------------
{
if (rx_sn_field_lengthP == 10) {
rlc_pP->rx_sn_length = 10;
......@@ -430,7 +425,6 @@ void rlc_um_set_debug_infos(
rlc_um_entity_t * const rlc_pP,
const srb_flag_t srb_flagP,
const rb_id_t rb_idP)
//-----------------------------------------------------------------------------
{
LOG_D(RLC, PROTOCOL_RLC_UM_CTXT_FMT" [SET DEBUG INFOS] rb_id %d srb_flag %d\n",
PROTOCOL_RLC_UM_CTXT_ARGS(ctxt_pP,rlc_pP),
......
This diff is collapsed.
......@@ -26,14 +26,13 @@
Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE
*******************************************************************************/
#define RLC_UM_MODULE
#define RLC_UM_FSM_C
#define RLC_UM_MODULE 1
#define RLC_UM_FSM_C 1
#include "platform_types.h"
//-----------------------------------------------------------------------------
#include "rlc_um.h"
#include "LAYER2/MAC/extern.h"
#include "UTIL/LOG/log.h"
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
......@@ -42,7 +41,6 @@ rlc_um_fsm_notify_event (
const protocol_ctxt_t* const ctxt_pP,
rlc_um_entity_t *rlc_pP, uint8_t eventP)
{
//-----------------------------------------------------------------------------
switch (rlc_pP->protocol_state) {
//-------------------------------
......
......@@ -26,14 +26,15 @@
Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE
*******************************************************************************/
#define RLC_UM_MODULE
#define RLC_UM_REASSEMBLY_C
#define RLC_UM_MODULE 1
#define RLC_UM_REASSEMBLY_C 1
#include "platform_types.h"
//-----------------------------------------------------------------------------
#ifdef USER_MODE
#if USER_MODE
#include <string.h>
#endif
#if defined(ENABLE_ITTI)
#if ENABLE_ITTI
# include "platform_types.h"
# include "intertask_interface.h"
#endif
#include "assertions.h"
......@@ -45,13 +46,10 @@
#include "UTIL/LOG/log.h"
#include "msc.h"
//#define TRACE_RLC_UM_DISPLAY_ASCII_DATA 1
//-----------------------------------------------------------------------------
inline void
rlc_um_clear_rx_sdu (const protocol_ctxt_t* const ctxt_pP, rlc_um_entity_t* rlc_pP)
{
//-----------------------------------------------------------------------------
rlc_pP->output_sdu_size_to_write = 0;
}
......@@ -59,7 +57,6 @@ rlc_um_clear_rx_sdu (const protocol_ctxt_t* const ctxt_pP, rlc_um_entity_t* rlc_
void
rlc_um_reassembly (const protocol_ctxt_t* const ctxt_pP, rlc_um_entity_t *rlc_pP, uint8_t * src_pP, int32_t lengthP)
{
//-----------------------------------------------------------------------------
sdu_size_t sdu_max_size;
LOG_D(RLC, PROTOCOL_RLC_UM_CTXT_FMT"[REASSEMBLY] reassembly() %d bytes %d bytes already reassemblied\n",
......@@ -88,14 +85,14 @@ rlc_um_reassembly (const protocol_ctxt_t* const ctxt_pP, rlc_um_entity_t *rlc_pP
if ((rlc_pP->output_sdu_size_to_write + lengthP) <= sdu_max_size) {
memcpy (&rlc_pP->output_sdu_in_construction->data[rlc_pP->output_sdu_size_to_write], src_pP, lengthP);
rlc_pP->output_sdu_size_to_write += lengthP;
#ifdef TRACE_RLC_UM_DISPLAY_ASCII_DATA
#if TRACE_RLC_UM_DISPLAY_ASCII_DATA
rlc_pP->output_sdu_in_construction->data[rlc_pP->output_sdu_size_to_write] = 0;
LOG_T(RLC, PROTOCOL_RLC_UM_CTXT_FMT"[REASSEMBLY] DATA :",
PROTOCOL_RLC_UM_CTXT_ARGS(ctxt_pP,rlc_pP));
rlc_util_print_hex_octets(RLC, (unsigned char*)rlc_pP->output_sdu_in_construction->data, rlc_pP->output_sdu_size_to_write);
#endif
} else {
#if defined(STOP_ON_IP_TRAFFIC_OVERLOAD)
#if STOP_ON_IP_TRAFFIC_OVERLOAD
AssertFatal(0, PROTOCOL_RLC_UM_CTXT_FMT" RLC_UM_DATA_IND, SDU TOO BIG, DROPPED\n",
PROTOCOL_RLC_UM_CTXT_ARGS(ctxt_pP,rlc_pP));
#endif
......@@ -108,7 +105,7 @@ rlc_um_reassembly (const protocol_ctxt_t* const ctxt_pP, rlc_um_entity_t *rlc_pP
} else {
LOG_E(RLC, PROTOCOL_RLC_UM_CTXT_FMT"[REASSEMBLY]ERROR OUTPUT SDU IS NULL\n",
PROTOCOL_RLC_UM_CTXT_ARGS(ctxt_pP,rlc_pP));
#if defined(STOP_ON_IP_TRAFFIC_OVERLOAD)
#if STOP_ON_IP_TRAFFIC_OVERLOAD
AssertFatal(0, PROTOCOL_RLC_UM_CTXT_FMT" RLC_UM_DATA_IND, SDU DROPPED, OUT OF MEMORY\n",
PROTOCOL_RLC_UM_CTXT_ARGS(ctxt_pP,rlc_pP));
#endif
......@@ -119,8 +116,6 @@ rlc_um_reassembly (const protocol_ctxt_t* const ctxt_pP, rlc_um_entity_t *rlc_pP
void
rlc_um_send_sdu (const protocol_ctxt_t* const ctxt_pP, rlc_um_entity_t *rlc_pP)
{
//-----------------------------------------------------------------------------
if ((rlc_pP->output_sdu_in_construction)) {
LOG_D(RLC, PROTOCOL_RLC_UM_CTXT_FMT" SEND_SDU to upper layers %d bytes sdu %p\n",
PROTOCOL_RLC_UM_CTXT_ARGS(ctxt_pP,rlc_pP),
......@@ -142,8 +137,8 @@ rlc_um_send_sdu (const protocol_ctxt_t* const ctxt_pP, rlc_um_entity_t *rlc_pP)
rlc_pP->output_sdu_size_to_write
);
#ifdef TEST_RLC_UM
#ifdef TRACE_RLC_UM_DISPLAY_ASCII_DATA
#if TEST_RLC_UM
#if TRACE_RLC_UM_DISPLAY_ASCII_DATA
rlc_pP->output_sdu_in_construction->data[rlc_pP->output_sdu_size_to_write] = 0;
LOG_T(RLC, PROTOCOL_RLC_UM_CTXT_FMT"[SEND_SDU] DATA :",
PROTOCOL_RLC_UM_CTXT_ARGS(ctxt_pP,rlc_pP));
......
......@@ -26,8 +26,8 @@
Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE
*******************************************************************************/
#define RLC_UM_MODULE
#define RLC_UM_RECEIVER_C
#define RLC_UM_MODULE 1
#define RLC_UM_RECEIVER_C 1
#include "platform_types.h"
//-----------------------------------------------------------------------------
#include "rlc.h"
......@@ -39,15 +39,12 @@
#include "MAC_INTERFACE/extern.h"
#include "UTIL/LOG/log.h"
//#define TRACE_RLC_UM_RX 1
//-----------------------------------------------------------------------------
void
rlc_um_display_rx_window(
const protocol_ctxt_t* const ctxt_pP,
rlc_um_entity_t * const rlc_pP
)
//-----------------------------------------------------------------------------
{
unsigned long sn = 0;
unsigned long end_sn = 0;
......@@ -139,7 +136,6 @@ rlc_um_receive (
rlc_um_entity_t * const rlc_pP,
struct mac_data_ind data_indP)
{
//-----------------------------------------------------------------------------
mem_block_t *tb_p = NULL;
uint8_t *first_byte_p = NULL;
......
......@@ -115,7 +115,7 @@
# include "commonDef.h"
#endif
#if defined(ENABLE_RAL)
#if ENABLE_RAL
# include "collection/hashtable/obj_hashtable.h"
#endif
......@@ -140,7 +140,7 @@ typedef struct uid_linear_allocator_s {
* @{
*/
#if defined(ENABLE_RAL)
#if ENABLE_RAL
typedef struct rrc_ral_threshold_key_s {
ral_link_param_type_t link_param_type;
ral_threshold_t threshold;
......@@ -414,7 +414,7 @@ typedef struct eNB_RRC_INST_s {
RB_HEAD(rrc_ue_tree_s, rrc_eNB_ue_context_s) rrc_ue_head; // ue_context tree key search by rnti
uint8_t HO_flag;
uint8_t Nb_ue;
#if defined(ENABLE_RAL)
#if ENABLE_RAL
obj_hash_table_t *ral_meas_thresholds;
#endif
hash_table_t *initial_id2_s1ap_ids; // key is content is rrc_ue_s1ap_ids_t
......@@ -509,7 +509,7 @@ typedef struct UE_RRC_INST_s {
float rsrq_db[7];
float rsrp_db_filtered[7];
float rsrq_db_filtered[7];
#if defined(ENABLE_RAL)
#if ENABLE_RAL
obj_hash_table_t *ral_meas_thresholds;
ral_transaction_id_t scan_transaction_id;
#endif
......
......@@ -75,7 +75,7 @@
#include "RRC/NAS/nas_config.h"
#include "RRC/NAS/rb_config.h"
#endif
#ifdef ENABLE_RAL
#if ENABLE_RAL
#include "rrc_UE_ral.h"
#endif
......@@ -189,7 +189,7 @@ static int rrc_set_state (module_id_t ue_mod_idP, Rrc_State_t state)
//-----------------------------------------------------------------------------
static int rrc_set_sub_state( module_id_t ue_mod_idP, Rrc_Sub_State_t subState )
{
#if (defined(ENABLE_ITTI) && (defined(ENABLE_USE_MME) || defined(ENABLE_RAL)))
#if (defined(ENABLE_ITTI) && (defined(ENABLE_USE_MME) || ENABLE_RAL))
switch (UE_rrc_inst[ue_mod_idP].RrcState) {
case RRC_STATE_INACTIVE:
......@@ -1061,7 +1061,7 @@ rrc_ue_process_radioResourceConfigDedicated(
#endif
);
#ifdef ENABLE_RAL
#if ENABLE_RAL
// first msg that includes srb config
UE_rrc_inst[ctxt_pP->module_id].num_srb=radioResourceConfigDedicated->srb_ToAddModList->list.count;
#endif
......@@ -1613,7 +1613,7 @@ rrc_ue_process_rrcConnectionReconfiguration(
free (rrcConnectionReconfiguration_r8->dedicatedInfoNASList);
}
#ifdef ENABLE_RAL
#if ENABLE_RAL
{
MessageDef *message_ral_p = NULL;
rrc_ral_connection_reestablishment_ind_t connection_reestablishment_ind;
......@@ -1975,7 +1975,7 @@ rrc_ue_decode_dcch(
LOG_I(RRC, "[UE %d] State = RRC_RECONFIGURED during HO (eNB %d)\n",
ctxt_pP->module_id, target_eNB_index);
#if defined(ENABLE_ITTI)
#ifdef ENABLE_RAL
#if ENABLE_RAL
{
MessageDef *message_ral_p = NULL;
rrc_ral_connection_reconfiguration_ho_ind_t connection_reconfiguration_ho_ind;
......@@ -2032,7 +2032,7 @@ rrc_ue_decode_dcch(
ctxt_pP->module_id,
eNB_indexP);
#if defined(ENABLE_ITTI)
#ifdef ENABLE_RAL
#if ENABLE_RAL
{
MessageDef *message_ral_p = NULL;
rrc_ral_connection_reconfiguration_ind_t connection_reconfiguration_ind;
......@@ -2097,7 +2097,7 @@ rrc_ue_decode_dcch(
}
itti_send_msg_to_task(TASK_NAS_UE, ctxt_pP->instance, msg_p);
#if defined(ENABLE_RAL)
#if ENABLE_RAL
msg_p = itti_alloc_new_message(TASK_RRC_UE, RRC_RAL_CONNECTION_RELEASE_IND);
RRC_RAL_CONNECTION_RELEASE_IND(msg_p).ue_id = ctxt_pP->module_id;
itti_send_msg_to_task(TASK_RAL_UE, ctxt_pP->instance, msg_p);
......@@ -3243,7 +3243,7 @@ static int decode_SI( const protocol_ctxt_t* const ctxt_pP, const uint8_t eNB_in
if (UE_rrc_inst[ctxt_pP->module_id].Info[eNB_index].State == RRC_IDLE) {
LOG_I( RRC, "[UE %d] Received SIB1/SIB2/SIB3 Switching to RRC_SI_RECEIVED\n", ctxt_pP->module_id );
UE_rrc_inst[ctxt_pP->module_id].Info[eNB_index].State = RRC_SI_RECEIVED;
#ifdef ENABLE_RAL
#if ENABLE_RAL
{
MessageDef *message_ral_p = NULL;
rrc_ral_system_information_ind_t ral_si_ind;
......@@ -4171,7 +4171,7 @@ void *rrc_ue_task( void *args_p )
# endif
# if defined(ENABLE_RAL)
# if ENABLE_RAL
case RRC_RAL_SCAN_REQ:
LOG_D(RRC, "[UE %d] Received %s: state %d\n", ue_mod_id, msg_name);
......
......@@ -93,7 +93,7 @@
# include "intertask_interface.h"
#endif
#ifdef ENABLE_RAL
#if ENABLE_RAL
# include "rrc_eNB_ral.h"
#endif
......@@ -2947,7 +2947,7 @@ rrc_eNB_process_RRCConnectionReconfigurationComplete(
ue_context_pP->ue_context.kenb, &kRRCint);
#endif
#ifdef ENABLE_RAL
#if ENABLE_RAL
{
MessageDef *message_ral_p = NULL;
rrc_ral_connection_reconfiguration_ind_t connection_reconfiguration_ind;
......@@ -4353,12 +4353,11 @@ rrc_enb_task(
openair_rrc_lite_eNB_configuration(ENB_INSTANCE_TO_MODULE_ID(instance), &RRC_CONFIGURATION_REQ(msg_p));
break;
# ifdef ENABLE_RAL
# if ENABLE_RAL
case RRC_RAL_CONFIGURE_THRESHOLD_REQ:
rrc_enb_ral_handle_configure_threshold_request(instance, msg_p);
break;
# endif
//SPECTRA: Add the RRC connection reconfiguration with Second cell configuration
case RRC_RAL_CONNECTION_RECONFIGURATION_REQ:
......@@ -4372,13 +4371,11 @@ rrc_enb_task(
msg_p->ittiMsgHeader.lte_time.slot);
LOG_I(RRC, "[eNB %d] Send RRC_RAL_CONNECTION_RECONFIGURATION_REQ to UE %s\n", instance, msg_name_p);
//Method RRC connection reconfiguration command with Second cell configuration
# ifdef ENABLE_RAL
//rrc_eNB_generate_RRCConnectionReconfiguration_SCell(instance, 0/* TODO put frameP number ! */, /*ue_mod_id force ue_mod_id to first UE*/0, 36126);
# else
//rrc_eNB_generate_defaultRRCConnectionReconfiguration(instance, 0/* TODO put frameP number ! */, /*ue_mod_id force ue_mod_id to first UE*/0,
// eNB_rrc_inst[instance].HO_flag);
# endif
break;
# endif
default:
LOG_E(RRC, "[eNB %d] Received unexpected message %s\n", instance, msg_name_p);
......
......@@ -40,7 +40,7 @@
# include "udp_eNB_task.h"
# include "gtpv1u_eNB_task.h"
# endif
# if defined(ENABLE_RAL)
# if ENABLE_RAL
# include "lteRALue.h"
# include "lteRALenb.h"
# endif
......@@ -94,7 +94,7 @@ int create_tasks(uint32_t enb_nb, uint32_t ue_nb)
return -1;
}
# if defined(ENABLE_RAL)
# if ENABLE_RAL
if (itti_create_task (TASK_RAL_ENB, eRAL_task, NULL) < 0) {
LOG_E(RAL_ENB, "Create task for RAL eNB failed\n");
......@@ -110,7 +110,7 @@ int create_tasks(uint32_t enb_nb, uint32_t ue_nb)
return -1;
}
# if defined(ENABLE_RAL)
# if ENABLE_RAL
if (itti_create_task (TASK_RAL_UE, mRAL_task, NULL) < 0) {
LOG_E(RAL_UE, "Create task for RAL UE failed\n");
......
......@@ -55,7 +55,7 @@
#include "UTIL/OTG/otg_externs.h"
#include "oml.h"
#include "msc.h"
#ifdef ENABLE_RAL
#if ENABLE_RAL
#include "lteRALenb.h"
#include "lteRALue.h"
#endif
......@@ -353,7 +353,7 @@ void oaisim_config(void)
}
#ifdef ENABLE_RAL
#if ENABLE_RAL
mRAL_init_default_values();
eRAL_init_default_values();
#endif
......@@ -432,7 +432,7 @@ int olg_config(void)
set_comp_log(SCTP, LOG_DEBUG, LOG_MED,1);
#endif
#if defined(ENABLE_RAL)
#if ENABLE_RAL
set_comp_log(RAL_ENB, LOG_TRACE, LOG_MED,1);
set_comp_log(RAL_UE, LOG_TRACE, LOG_MED,1);
set_log(RAL_ENB, LOG_DEBUG, 1);
......
......@@ -69,7 +69,7 @@
#include "UTIL/OPT/opt.h"
#include "UTIL/OTG/otg_config.h"
#include "UTIL/OTG/otg_tx.h"
#if defined (ENABLE_RAL)
#if ENABLE_RAL
#include "lteRALenb.h"
#include "lteRALue.h"
#endif
......@@ -281,7 +281,7 @@ void get_simulation_options(int argc, char *argv[])
printf("setting CBA backoff to %d\n", cba_backoff);
break;
#if defined(ENABLE_RAL)
#if ENABLE_RAL
case LONG_OPTION_ENB_RAL_LISTENING_PORT:
if (optarg) {
......@@ -900,7 +900,7 @@ void init_openair1(void)
{
module_id_t UE_id, eNB_id;
uint8_t CC_id;
#if defined(ENABLE_RAL)
#if ENABLE_RAL
int list_index;
#endif
......@@ -996,7 +996,7 @@ void init_openair1(void)
PHY_vars_UE_g[UE_id][CC_id]->current_dlsch_cqi[0] = 10;
LOG_I(EMU, "UE %d mode is initialized to %d\n", UE_id, PHY_vars_UE_g[UE_id][CC_id]->UE_mode[0] );
#if defined(ENABLE_RAL)
#if ENABLE_RAL
PHY_vars_UE_g[UE_id][CC_id]->ral_thresholds_timed = hashtable_create (64, NULL, NULL);
for (list_index = 0; list_index < RAL_LINK_PARAM_GEN_MAX; list_index++) {
......
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