Commit 8612173c authored by gauthier's avatar gauthier

MESSAGE_CHART_GENERATOR with macros

git-svn-id: http://svn.eurecom.fr/openair4G/trunk@7154 818b1a75-f10b-46b9-bf7c-635c3b92a50f
parent 671ab0ab
...@@ -33,6 +33,7 @@ set ( LOG_NO_THREAD False ) ...@@ -33,6 +33,7 @@ set ( LOG_NO_THREAD False )
set ( LOWLATENCY False ) set ( LOWLATENCY False )
set ( MAC_CONTEXT 1 ) set ( MAC_CONTEXT 1 )
set ( MAX_NUM_CCs 1 ) set ( MAX_NUM_CCs 1 )
set ( MESSAGE_CHART_GENERATOR True)
set ( MIH_C_MEDIEVAL_EXTENSIONS False ) set ( MIH_C_MEDIEVAL_EXTENSIONS False )
set ( MSG_PRINT False ) set ( MSG_PRINT False )
set ( MU_RECEIVER False ) set ( MU_RECEIVER False )
......
...@@ -72,7 +72,7 @@ typedef enum { ...@@ -72,7 +72,7 @@ typedef enum {
#define MSC_AS_TIME_ARGS(CTXT_Pp) \ #define MSC_AS_TIME_ARGS(CTXT_Pp) \
(CTXT_Pp)->frame, \ (CTXT_Pp)->frame, \
(CTXT_Pp)->subframe (CTXT_Pp)->subframe
#if defined(MESSAGE_CHART_GENERATOR)
int msc_init(msc_env_t envP); int msc_init(msc_env_t envP);
void msc_end(void); void msc_end(void);
void msc_log_declare_proto(const msc_proto_t protoP); void msc_log_declare_proto(const msc_proto_t protoP);
...@@ -95,5 +95,18 @@ void msc_log_tx_message( ...@@ -95,5 +95,18 @@ void msc_log_tx_message(
const char* bytesP, const char* bytesP,
const unsigned int num_bytes, const unsigned int num_bytes,
char *format, ...); char *format, ...);
#define MSC_INIT(mScPaRaMs) msc_init(mScPaRaMs)
#define MSC_END msc_end
#define MSC_LOG_EVENT(mScPaRaMs, fORMAT, aRGS...) msc_log_event(mScPaRaMs, fORMAT, ##aRGS)
#define MSC_LOG_RX_MESSAGE(mScPaRaMs, fORMAT, aRGS...) msc_log_rx_message(mScPaRaMs, fORMAT, ##aRGS)
#define MSC_LOG_RX_DISCARDED_MESSAGE(mScPaRaMs, fORMAT, aRGS...) msc_log_rx_discarded_message(mScPaRaMs, fORMAT, ##aRGS)
#define MSC_LOG_TX_MESSAGE(mScPaRaMs, fORMAT, aRGS...) msc_log_tx_message(mScPaRaMs, fORMAT, ##aRGS)
#else
#define MSC_INIT(mScPaRaMs)
#define MSC_END
#define MSC_LOG_EVENT(mScPaRaMs, fORMAT, aRGS...)
#define MSC_LOG_RX_MESSAGE(mScPaRaMs, fORMAT, aRGS...)
#define MSC_LOG_RX_DISCARDED_MESSAGE(mScPaRaMs, fORMAT, aRGS...)
#define MSC_LOG_TX_MESSAGE(mScPaRaMs, fORMAT, aRGS...)
#endif
#endif #endif
...@@ -48,9 +48,7 @@ ...@@ -48,9 +48,7 @@
#include "s1ap_eNB_nas_procedures.h" #include "s1ap_eNB_nas_procedures.h"
#include "s1ap_eNB_management_procedures.h" #include "s1ap_eNB_management_procedures.h"
#include "s1ap_eNB_context_management_procedures.h" #include "s1ap_eNB_context_management_procedures.h"
#ifdef MESSAGE_CHART_GENERATOR
#include "msc.h" #include "msc.h"
#endif
int s1ap_ue_context_release_complete(instance_t instance, int s1ap_ue_context_release_complete(instance_t instance,
...@@ -101,8 +99,7 @@ int s1ap_ue_context_release_complete(instance_t instance, ...@@ -101,8 +99,7 @@ int s1ap_ue_context_release_complete(instance_t instance,
return -1; return -1;
} }
#ifdef MESSAGE_CHART_GENERATOR MSC_LOG_TX_MESSAGE(
msc_log_tx_message(
MSC_S1AP_ENB, MSC_S1AP_ENB,
MSC_S1AP_MME, MSC_S1AP_MME,
buffer, buffer,
...@@ -111,7 +108,6 @@ int s1ap_ue_context_release_complete(instance_t instance, ...@@ -111,7 +108,6 @@ int s1ap_ue_context_release_complete(instance_t instance,
0,0, //MSC_AS_TIME_ARGS(ctxt_pP), 0,0, //MSC_AS_TIME_ARGS(ctxt_pP),
ue_ctxt_release_complete_ies_p->eNB_UE_S1AP_ID, ue_ctxt_release_complete_ies_p->eNB_UE_S1AP_ID,
ue_ctxt_release_complete_ies_p->mme_ue_s1ap_id); ue_ctxt_release_complete_ies_p->mme_ue_s1ap_id);
#endif
/* UE associated signalling -> use the allocated stream */ /* UE associated signalling -> use the allocated stream */
s1ap_eNB_itti_send_sctp_data_req(s1ap_eNB_instance_p->instance, s1ap_eNB_itti_send_sctp_data_req(s1ap_eNB_instance_p->instance,
...@@ -215,8 +211,7 @@ int s1ap_ue_context_release_req(instance_t instance, ...@@ -215,8 +211,7 @@ int s1ap_ue_context_release_req(instance_t instance,
return -1; return -1;
} }
#ifdef MESSAGE_CHART_GENERATOR MSC_LOG_TX_MESSAGE(
msc_log_tx_message(
MSC_S1AP_ENB, MSC_S1AP_ENB,
MSC_S1AP_MME, MSC_S1AP_MME,
buffer, buffer,
...@@ -225,7 +220,6 @@ int s1ap_ue_context_release_req(instance_t instance, ...@@ -225,7 +220,6 @@ int s1ap_ue_context_release_req(instance_t instance,
0,0,//MSC_AS_TIME_ARGS(ctxt_pP), 0,0,//MSC_AS_TIME_ARGS(ctxt_pP),
ue_ctxt_release_request_ies_p->eNB_UE_S1AP_ID, ue_ctxt_release_request_ies_p->eNB_UE_S1AP_ID,
ue_ctxt_release_request_ies_p->mme_ue_s1ap_id); ue_ctxt_release_request_ies_p->mme_ue_s1ap_id);
#endif
/* UE associated signalling -> use the allocated stream */ /* UE associated signalling -> use the allocated stream */
s1ap_eNB_itti_send_sctp_data_req(s1ap_eNB_instance_p->instance, s1ap_eNB_itti_send_sctp_data_req(s1ap_eNB_instance_p->instance,
......
...@@ -47,9 +47,7 @@ ...@@ -47,9 +47,7 @@
#include "s1ap_eNB_ue_context.h" #include "s1ap_eNB_ue_context.h"
#include "s1ap_eNB_nas_procedures.h" #include "s1ap_eNB_nas_procedures.h"
#include "s1ap_eNB_management_procedures.h" #include "s1ap_eNB_management_procedures.h"
#ifdef MESSAGE_CHART_GENERATOR
#include "msc.h" #include "msc.h"
#endif
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
int s1ap_eNB_handle_nas_first_req( int s1ap_eNB_handle_nas_first_req(
...@@ -231,8 +229,7 @@ int s1ap_eNB_handle_nas_first_req( ...@@ -231,8 +229,7 @@ int s1ap_eNB_handle_nas_first_req(
#endif #endif
ue_desc_p->stream = mme_desc_p->nextstream; ue_desc_p->stream = mme_desc_p->nextstream;
#ifdef MESSAGE_CHART_GENERATOR MSC_LOG_TX_MESSAGE(
msc_log_tx_message(
MSC_S1AP_ENB, MSC_S1AP_ENB,
MSC_S1AP_MME, MSC_S1AP_MME,
(const char *)NULL, (const char *)NULL,
...@@ -240,7 +237,7 @@ int s1ap_eNB_handle_nas_first_req( ...@@ -240,7 +237,7 @@ int s1ap_eNB_handle_nas_first_req(
MSC_AS_TIME_FMT" initialUEMessage initiatingMessage eNB_ue_s1ap_id %u", MSC_AS_TIME_FMT" initialUEMessage initiatingMessage eNB_ue_s1ap_id %u",
0,0,//MSC_AS_TIME_ARGS(ctxt_pP), 0,0,//MSC_AS_TIME_ARGS(ctxt_pP),
initial_ue_message_p->eNB_UE_S1AP_ID); initial_ue_message_p->eNB_UE_S1AP_ID);
#endif
/* Send encoded message over sctp */ /* Send encoded message over sctp */
s1ap_eNB_itti_send_sctp_data_req(instance_p->instance, mme_desc_p->assoc_id, s1ap_eNB_itti_send_sctp_data_req(instance_p->instance, mme_desc_p->assoc_id,
buffer, length, ue_desc_p->stream); buffer, length, ue_desc_p->stream);
...@@ -282,8 +279,7 @@ int s1ap_eNB_handle_nas_downlink(const uint32_t assoc_id, ...@@ -282,8 +279,7 @@ int s1ap_eNB_handle_nas_downlink(const uint32_t assoc_id,
if ((ue_desc_p = s1ap_eNB_get_ue_context(s1ap_eNB_instance, if ((ue_desc_p = s1ap_eNB_get_ue_context(s1ap_eNB_instance,
downlink_NAS_transport_p->eNB_UE_S1AP_ID)) == NULL) { downlink_NAS_transport_p->eNB_UE_S1AP_ID)) == NULL) {
#ifdef MESSAGE_CHART_GENERATOR MSC_LOG_RX_DISCARDED_MESSAGE(
msc_log_rx_discarded_message(
MSC_S1AP_ENB, MSC_S1AP_ENB,
MSC_S1AP_MME, MSC_S1AP_MME,
(const char *)downlink_NAS_transport_p, (const char *)downlink_NAS_transport_p,
...@@ -292,7 +288,6 @@ int s1ap_eNB_handle_nas_downlink(const uint32_t assoc_id, ...@@ -292,7 +288,6 @@ int s1ap_eNB_handle_nas_downlink(const uint32_t assoc_id,
0,0,//MSC_AS_TIME_ARGS(ctxt_pP), 0,0,//MSC_AS_TIME_ARGS(ctxt_pP),
downlink_NAS_transport_p->eNB_UE_S1AP_ID, downlink_NAS_transport_p->eNB_UE_S1AP_ID,
downlink_NAS_transport_p->mme_ue_s1ap_id); downlink_NAS_transport_p->mme_ue_s1ap_id);
#endif
S1AP_ERROR("[SCTP %d] Received NAS downlink message for non existing UE context eNB_UE_S1AP_ID: 0x%"PRIx32" %u\n", S1AP_ERROR("[SCTP %d] Received NAS downlink message for non existing UE context eNB_UE_S1AP_ID: 0x%"PRIx32" %u\n",
assoc_id, assoc_id,
...@@ -317,8 +312,7 @@ int s1ap_eNB_handle_nas_downlink(const uint32_t assoc_id, ...@@ -317,8 +312,7 @@ int s1ap_eNB_handle_nas_downlink(const uint32_t assoc_id,
} }
} }
#ifdef MESSAGE_CHART_GENERATOR MSC_LOG_RX_MESSAGE(
msc_log_rx_message(
MSC_S1AP_ENB, MSC_S1AP_ENB,
MSC_S1AP_MME, MSC_S1AP_MME,
(const char *)downlink_NAS_transport_p, (const char *)downlink_NAS_transport_p,
...@@ -327,7 +321,6 @@ int s1ap_eNB_handle_nas_downlink(const uint32_t assoc_id, ...@@ -327,7 +321,6 @@ int s1ap_eNB_handle_nas_downlink(const uint32_t assoc_id,
0,0,//MSC_AS_TIME_ARGS(ctxt_pP), 0,0,//MSC_AS_TIME_ARGS(ctxt_pP),
downlink_NAS_transport_p->eNB_UE_S1AP_ID, downlink_NAS_transport_p->eNB_UE_S1AP_ID,
downlink_NAS_transport_p->mme_ue_s1ap_id); downlink_NAS_transport_p->mme_ue_s1ap_id);
#endif
/* Forward the NAS PDU to RRC */ /* Forward the NAS PDU to RRC */
s1ap_eNB_itti_send_nas_downlink_ind(s1ap_eNB_instance->instance, s1ap_eNB_itti_send_nas_downlink_ind(s1ap_eNB_instance->instance,
...@@ -417,8 +410,7 @@ int s1ap_eNB_nas_uplink(instance_t instance, s1ap_uplink_nas_t *s1ap_uplink_nas_ ...@@ -417,8 +410,7 @@ int s1ap_eNB_nas_uplink(instance_t instance, s1ap_uplink_nas_t *s1ap_uplink_nas_
return -1; return -1;
} }
#ifdef MESSAGE_CHART_GENERATOR MSC_LOG_TX_MESSAGE(
msc_log_tx_message(
MSC_S1AP_ENB, MSC_S1AP_ENB,
MSC_S1AP_MME, MSC_S1AP_MME,
(const char *)NULL, (const char *)NULL,
...@@ -427,7 +419,7 @@ int s1ap_eNB_nas_uplink(instance_t instance, s1ap_uplink_nas_t *s1ap_uplink_nas_ ...@@ -427,7 +419,7 @@ int s1ap_eNB_nas_uplink(instance_t instance, s1ap_uplink_nas_t *s1ap_uplink_nas_
0,0,//MSC_AS_TIME_ARGS(ctxt_pP), 0,0,//MSC_AS_TIME_ARGS(ctxt_pP),
uplink_NAS_transport_p->eNB_UE_S1AP_ID, uplink_NAS_transport_p->eNB_UE_S1AP_ID,
uplink_NAS_transport_p->mme_ue_s1ap_id); uplink_NAS_transport_p->mme_ue_s1ap_id);
#endif
/* UE associated signalling -> use the allocated stream */ /* UE associated signalling -> use the allocated stream */
s1ap_eNB_itti_send_sctp_data_req(s1ap_eNB_instance_p->instance, s1ap_eNB_itti_send_sctp_data_req(s1ap_eNB_instance_p->instance,
...@@ -488,8 +480,8 @@ void s1ap_eNB_nas_non_delivery_ind(instance_t instance, ...@@ -488,8 +480,8 @@ void s1ap_eNB_nas_non_delivery_ind(instance_t instance,
/* Send a dummy cause */ /* Send a dummy cause */
nas_non_delivery_p->cause.present = S1ap_Cause_PR_radioNetwork; nas_non_delivery_p->cause.present = S1ap_Cause_PR_radioNetwork;
nas_non_delivery_p->cause.choice.radioNetwork = S1ap_CauseRadioNetwork_radio_connection_with_ue_lost; nas_non_delivery_p->cause.choice.radioNetwork = S1ap_CauseRadioNetwork_radio_connection_with_ue_lost;
#ifdef MESSAGE_CHART_GENERATOR
msc_log_tx_message( MSC_LOG_TX_MESSAGE(
MSC_S1AP_ENB, MSC_S1AP_ENB,
MSC_S1AP_MME, MSC_S1AP_MME,
(const char *)s1ap_nas_non_delivery_ind, (const char *)s1ap_nas_non_delivery_ind,
...@@ -498,7 +490,7 @@ void s1ap_eNB_nas_non_delivery_ind(instance_t instance, ...@@ -498,7 +490,7 @@ void s1ap_eNB_nas_non_delivery_ind(instance_t instance,
0,0,//MSC_AS_TIME_ARGS(ctxt_pP), 0,0,//MSC_AS_TIME_ARGS(ctxt_pP),
nas_non_delivery_p->eNB_UE_S1AP_ID, nas_non_delivery_p->eNB_UE_S1AP_ID,
nas_non_delivery_p->mme_ue_s1ap_id); nas_non_delivery_p->mme_ue_s1ap_id);
#endif
/* UE associated signalling -> use the allocated stream */ /* UE associated signalling -> use the allocated stream */
s1ap_eNB_itti_send_sctp_data_req(s1ap_eNB_instance_p->instance, s1ap_eNB_itti_send_sctp_data_req(s1ap_eNB_instance_p->instance,
...@@ -580,8 +572,7 @@ int s1ap_eNB_initial_ctxt_resp( ...@@ -580,8 +572,7 @@ int s1ap_eNB_initial_ctxt_resp(
return -1; return -1;
} }
#ifdef MESSAGE_CHART_GENERATOR MSC_LOG_TX_MESSAGE(
msc_log_tx_message(
MSC_S1AP_ENB, MSC_S1AP_ENB,
MSC_S1AP_MME, MSC_S1AP_MME,
(const char *)buffer, (const char *)buffer,
...@@ -590,7 +581,6 @@ int s1ap_eNB_initial_ctxt_resp( ...@@ -590,7 +581,6 @@ int s1ap_eNB_initial_ctxt_resp(
0,0,//MSC_AS_TIME_ARGS(ctxt_pP), 0,0,//MSC_AS_TIME_ARGS(ctxt_pP),
initial_ies_p->eNB_UE_S1AP_ID, initial_ies_p->eNB_UE_S1AP_ID,
initial_ies_p->mme_ue_s1ap_id); initial_ies_p->mme_ue_s1ap_id);
#endif
/* UE associated signalling -> use the allocated stream */ /* UE associated signalling -> use the allocated stream */
s1ap_eNB_itti_send_sctp_data_req(s1ap_eNB_instance_p->instance, s1ap_eNB_itti_send_sctp_data_req(s1ap_eNB_instance_p->instance,
...@@ -661,8 +651,7 @@ int s1ap_eNB_ue_capabilities(instance_t instance, ...@@ -661,8 +651,7 @@ int s1ap_eNB_ue_capabilities(instance_t instance,
return -1; return -1;
} }
#ifdef MESSAGE_CHART_GENERATOR MSC_LOG_TX_MESSAGE(
msc_log_tx_message(
MSC_S1AP_ENB, MSC_S1AP_ENB,
MSC_S1AP_MME, MSC_S1AP_MME,
(const char *)buffer, (const char *)buffer,
...@@ -671,7 +660,6 @@ int s1ap_eNB_ue_capabilities(instance_t instance, ...@@ -671,7 +660,6 @@ int s1ap_eNB_ue_capabilities(instance_t instance,
0,0,//MSC_AS_TIME_ARGS(ctxt_pP), 0,0,//MSC_AS_TIME_ARGS(ctxt_pP),
ue_cap_info_ind_ies_p->eNB_UE_S1AP_ID, ue_cap_info_ind_ies_p->eNB_UE_S1AP_ID,
ue_cap_info_ind_ies_p->mme_ue_s1ap_id); ue_cap_info_ind_ies_p->mme_ue_s1ap_id);
#endif
/* UE associated signalling -> use the allocated stream */ /* UE associated signalling -> use the allocated stream */
s1ap_eNB_itti_send_sctp_data_req(s1ap_eNB_instance_p->instance, s1ap_eNB_itti_send_sctp_data_req(s1ap_eNB_instance_p->instance,
......
...@@ -47,9 +47,7 @@ ...@@ -47,9 +47,7 @@
#include "UTIL/LOG/log.h" #include "UTIL/LOG/log.h"
#include "UL-AM-RLC.h" #include "UL-AM-RLC.h"
#include "DL-AM-RLC.h" #include "DL-AM-RLC.h"
#ifdef MESSAGE_CHART_GENERATOR
#include "msc.h" #include "msc.h"
#endif
//#define TRACE_RLC_AM_DATA_REQUEST //#define TRACE_RLC_AM_DATA_REQUEST
//#define TRACE_RLC_AM_TX_STATUS //#define TRACE_RLC_AM_TX_STATUS
//#define TRACE_RLC_AM_TX //#define TRACE_RLC_AM_TX
...@@ -198,8 +196,7 @@ void config_req_rlc_am_asn1 ( ...@@ -198,8 +196,7 @@ void config_req_rlc_am_asn1 (
(config_am_pP->dl_AM_RLC.t_Reordering<T_Reordering_spare1) && (config_am_pP->dl_AM_RLC.t_Reordering<T_Reordering_spare1) &&
(config_am_pP->dl_AM_RLC.t_StatusProhibit<T_StatusProhibit_spare8) ) { (config_am_pP->dl_AM_RLC.t_StatusProhibit<T_StatusProhibit_spare8) ) {
#ifdef MESSAGE_CHART_GENERATOR MSC_LOG_RX_MESSAGE(
msc_log_rx_message(
(ctxt_pP->enb_flag == ENB_FLAG_YES) ? MSC_RLC_ENB:MSC_RLC_UE, (ctxt_pP->enb_flag == ENB_FLAG_YES) ? MSC_RLC_ENB:MSC_RLC_UE,
(ctxt_pP->enb_flag == ENB_FLAG_YES) ? MSC_RRC_ENB:MSC_RRC_UE, (ctxt_pP->enb_flag == ENB_FLAG_YES) ? MSC_RRC_ENB:MSC_RRC_UE,
NULL, NULL,
...@@ -210,7 +207,7 @@ void config_req_rlc_am_asn1 ( ...@@ -210,7 +207,7 @@ void config_req_rlc_am_asn1 (
PollRetransmit_tab[config_am_pP->ul_AM_RLC.t_PollRetransmit], PollRetransmit_tab[config_am_pP->ul_AM_RLC.t_PollRetransmit],
am_t_Reordering_tab[config_am_pP->dl_AM_RLC.t_Reordering], am_t_Reordering_tab[config_am_pP->dl_AM_RLC.t_Reordering],
t_StatusProhibit_tab[config_am_pP->dl_AM_RLC.t_StatusProhibit]); t_StatusProhibit_tab[config_am_pP->dl_AM_RLC.t_StatusProhibit]);
#endif
LOG_D(RLC, PROTOCOL_RLC_AM_CTXT_FMT" CONFIG_REQ (max_retx_threshold=%d poll_pdu=%d poll_byte=%d t_poll_retransmit=%d t_reord=%d t_status_prohibit=%d)\n", LOG_D(RLC, PROTOCOL_RLC_AM_CTXT_FMT" CONFIG_REQ (max_retx_threshold=%d poll_pdu=%d poll_byte=%d t_poll_retransmit=%d t_reord=%d t_status_prohibit=%d)\n",
PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,l_rlc_p), PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,l_rlc_p),
maxRetxThreshold_tab[config_am_pP->ul_AM_RLC.maxRetxThreshold], maxRetxThreshold_tab[config_am_pP->ul_AM_RLC.maxRetxThreshold],
...@@ -230,8 +227,7 @@ void config_req_rlc_am_asn1 ( ...@@ -230,8 +227,7 @@ void config_req_rlc_am_asn1 (
am_t_Reordering_tab[config_am_pP->dl_AM_RLC.t_Reordering], am_t_Reordering_tab[config_am_pP->dl_AM_RLC.t_Reordering],
t_StatusProhibit_tab[config_am_pP->dl_AM_RLC.t_StatusProhibit]); t_StatusProhibit_tab[config_am_pP->dl_AM_RLC.t_StatusProhibit]);
} else { } else {
#ifdef MESSAGE_CHART_GENERATOR MSC_LOG_RX_DISCARDED_MESSAGE(
msc_log_rx_discarded_message(
(ctxt_pP->enb_flag == ENB_FLAG_YES) ? MSC_RLC_ENB:MSC_RLC_UE, (ctxt_pP->enb_flag == ENB_FLAG_YES) ? MSC_RLC_ENB:MSC_RLC_UE,
(ctxt_pP->enb_flag == ENB_FLAG_YES) ? MSC_RRC_ENB:MSC_RRC_UE, (ctxt_pP->enb_flag == ENB_FLAG_YES) ? MSC_RRC_ENB:MSC_RRC_UE,
NULL, NULL,
...@@ -239,7 +235,7 @@ void config_req_rlc_am_asn1 ( ...@@ -239,7 +235,7 @@ void config_req_rlc_am_asn1 (
MSC_AS_TIME_FMT" "PROTOCOL_RLC_AM_MSC_FMT" CONFIG-REQ", MSC_AS_TIME_FMT" "PROTOCOL_RLC_AM_MSC_FMT" CONFIG-REQ",
MSC_AS_TIME_ARGS(ctxt_pP), MSC_AS_TIME_ARGS(ctxt_pP),
PROTOCOL_RLC_AM_MSC_ARGS(ctxt_pP, l_rlc_p)); PROTOCOL_RLC_AM_MSC_ARGS(ctxt_pP, l_rlc_p));
#endif
LOG_D(RLC, LOG_D(RLC,
PROTOCOL_RLC_AM_CTXT_FMT"ILLEGAL CONFIG_REQ (max_retx_threshold=%d poll_pdu=%d poll_byte=%d t_poll_retransmit=%d t_reord=%d t_status_prohibit=%d), RLC-AM NOT CONFIGURED\n", PROTOCOL_RLC_AM_CTXT_FMT"ILLEGAL CONFIG_REQ (max_retx_threshold=%d poll_pdu=%d poll_byte=%d t_poll_retransmit=%d t_reord=%d t_status_prohibit=%d), RLC-AM NOT CONFIGURED\n",
PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,l_rlc_p), PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,l_rlc_p),
...@@ -713,7 +709,7 @@ rlc_am_mac_data_request ( ...@@ -713,7 +709,7 @@ rlc_am_mac_data_request (
} }
} }
msc_log_tx_message( MSC_LOG_TX_MESSAGE(
(ctxt_pP->enb_flag == ENB_FLAG_YES) ? MSC_RLC_ENB:MSC_RLC_UE, (ctxt_pP->enb_flag == ENB_FLAG_YES) ? MSC_RLC_ENB:MSC_RLC_UE,
(ctxt_pP->enb_flag == ENB_FLAG_YES) ? MSC_RLC_UE:MSC_RLC_ENB, (ctxt_pP->enb_flag == ENB_FLAG_YES) ? MSC_RLC_UE:MSC_RLC_ENB,
(char*)rlc_am_pdu_sn_10_p, (char*)rlc_am_pdu_sn_10_p,
...@@ -803,11 +799,9 @@ rlc_am_mac_data_request ( ...@@ -803,11 +799,9 @@ rlc_am_mac_data_request (
#ifdef MESSAGE_CHART_GENERATOR #ifdef MESSAGE_CHART_GENERATOR
message_string_size = 0; message_string_size = 0;
message_string_size += sprintf(&message_string[message_string_size], message_string_size += sprintf(&message_string[message_string_size],
MSC_AS_TIME_FMT" "PROTOCOL_RLC_AM_MSC_FMT" STATUS size %u D/C %u ACK_SN %u", MSC_AS_TIME_FMT" "PROTOCOL_RLC_AM_MSC_FMT" STATUS ACK_SN %u",
MSC_AS_TIME_ARGS(ctxt_pP), MSC_AS_TIME_ARGS(ctxt_pP),
PROTOCOL_RLC_AM_MSC_ARGS(ctxt_pP, l_rlc_p), PROTOCOL_RLC_AM_MSC_ARGS(ctxt_pP, l_rlc_p),
tb_size_in_bytes,
g_rlc_am_control_pdu_info.d_c,
g_rlc_am_control_pdu_info.ack_sn); g_rlc_am_control_pdu_info.ack_sn);
for (num_nack = 0; num_nack < g_rlc_am_control_pdu_info.num_nack; num_nack++) { for (num_nack = 0; num_nack < g_rlc_am_control_pdu_info.num_nack; num_nack++) {
...@@ -823,7 +817,7 @@ rlc_am_mac_data_request ( ...@@ -823,7 +817,7 @@ rlc_am_mac_data_request (
} }
} }
msc_log_tx_message( MSC_LOG_TX_MESSAGE(
(ctxt_pP->enb_flag == ENB_FLAG_YES) ? MSC_RLC_ENB:MSC_RLC_UE, (ctxt_pP->enb_flag == ENB_FLAG_YES) ? MSC_RLC_ENB:MSC_RLC_UE,
(ctxt_pP->enb_flag == ENB_FLAG_YES) ? MSC_RLC_UE:MSC_RLC_ENB, (ctxt_pP->enb_flag == ENB_FLAG_YES) ? MSC_RLC_UE:MSC_RLC_ENB,
(char*)rlc_am_pdu_sn_10_p, (char*)rlc_am_pdu_sn_10_p,
...@@ -935,7 +929,7 @@ rlc_am_mac_data_indication ( ...@@ -935,7 +929,7 @@ rlc_am_mac_data_indication (
} }
} }
msc_log_rx_message( MSC_LOG_RX_MESSAGE(
(ctxt_pP->enb_flag == ENB_FLAG_YES) ? MSC_RLC_ENB:MSC_RLC_UE, (ctxt_pP->enb_flag == ENB_FLAG_YES) ? MSC_RLC_ENB:MSC_RLC_UE,
(ctxt_pP->enb_flag == ENB_FLAG_YES) ? MSC_RLC_UE:MSC_RLC_ENB, (ctxt_pP->enb_flag == ENB_FLAG_YES) ? MSC_RLC_UE:MSC_RLC_ENB,
(char*)rlc_am_pdu_sn_10_p, (char*)rlc_am_pdu_sn_10_p,
...@@ -1024,11 +1018,9 @@ rlc_am_mac_data_indication ( ...@@ -1024,11 +1018,9 @@ rlc_am_mac_data_indication (
#ifdef MESSAGE_CHART_GENERATOR #ifdef MESSAGE_CHART_GENERATOR
message_string_size = 0; message_string_size = 0;
message_string_size += sprintf(&message_string[message_string_size], message_string_size += sprintf(&message_string[message_string_size],
MSC_AS_TIME_FMT" "PROTOCOL_RLC_AM_MSC_FMT" STATUS size %u D/C %u ACK_SN %u", MSC_AS_TIME_FMT" "PROTOCOL_RLC_AM_MSC_FMT" STATUS size ACK_SN %u",
MSC_AS_TIME_ARGS(ctxt_pP), MSC_AS_TIME_ARGS(ctxt_pP),
PROTOCOL_RLC_AM_MSC_ARGS(ctxt_pP, l_rlc_p), PROTOCOL_RLC_AM_MSC_ARGS(ctxt_pP, l_rlc_p),
tb_size_in_bytes,
g_rlc_am_control_pdu_info.d_c,
g_rlc_am_control_pdu_info.ack_sn); g_rlc_am_control_pdu_info.ack_sn);
for (num_nack = 0; num_nack < g_rlc_am_control_pdu_info.num_nack; num_nack++) { for (num_nack = 0; num_nack < g_rlc_am_control_pdu_info.num_nack; num_nack++) {
...@@ -1044,7 +1036,7 @@ rlc_am_mac_data_indication ( ...@@ -1044,7 +1036,7 @@ rlc_am_mac_data_indication (
} }
} }
msc_log_rx_message( MSC_LOG_RX_MESSAGE(
(ctxt_pP->enb_flag == ENB_FLAG_YES) ? MSC_RLC_ENB:MSC_RLC_UE, (ctxt_pP->enb_flag == ENB_FLAG_YES) ? MSC_RLC_ENB:MSC_RLC_UE,
(ctxt_pP->enb_flag == ENB_FLAG_YES) ? MSC_RLC_UE:MSC_RLC_ENB, (ctxt_pP->enb_flag == ENB_FLAG_YES) ? MSC_RLC_UE:MSC_RLC_ENB,
(char*)rlc_am_pdu_sn_10_p, (char*)rlc_am_pdu_sn_10_p,
...@@ -1129,8 +1121,8 @@ rlc_am_data_req ( ...@@ -1129,8 +1121,8 @@ rlc_am_data_req (
data_offset = ((struct rlc_am_data_req *) (sdu_pP->data))->data_offset; data_offset = ((struct rlc_am_data_req *) (sdu_pP->data))->data_offset;
data_size = ((struct rlc_am_data_req *) (sdu_pP->data))->data_size; data_size = ((struct rlc_am_data_req *) (sdu_pP->data))->data_size;
conf = ((struct rlc_am_data_req *) (sdu_pP->data))->conf; conf = ((struct rlc_am_data_req *) (sdu_pP->data))->conf;
#ifdef MESSAGE_CHART_GENERATOR
msc_log_rx_message( MSC_LOG_RX_MESSAGE(
(ctxt_pP->enb_flag == ENB_FLAG_YES) ? MSC_RLC_ENB:MSC_RLC_UE, (ctxt_pP->enb_flag == ENB_FLAG_YES) ? MSC_RLC_ENB:MSC_RLC_UE,
(ctxt_pP->enb_flag == ENB_FLAG_YES) ? MSC_PDCP_ENB:MSC_PDCP_UE, (ctxt_pP->enb_flag == ENB_FLAG_YES) ? MSC_PDCP_ENB:MSC_PDCP_UE,
(const char*)(&sdu_pP->data[data_offset]), (const char*)(&sdu_pP->data[data_offset]),
...@@ -1140,7 +1132,7 @@ rlc_am_data_req ( ...@@ -1140,7 +1132,7 @@ rlc_am_data_req (
PROTOCOL_RLC_AM_MSC_ARGS(ctxt_pP, l_rlc_p), PROTOCOL_RLC_AM_MSC_ARGS(ctxt_pP, l_rlc_p),
data_size, data_size,
mui); mui);
#endif
#if defined(TRACE_RLC_AM_PDU) #if defined(TRACE_RLC_AM_PDU)
message_string_size += sprintf(&message_string[message_string_size], "Bearer : %u\n", l_rlc_p->rb_id); message_string_size += sprintf(&message_string[message_string_size], "Bearer : %u\n", l_rlc_p->rb_id);
...@@ -1230,7 +1222,7 @@ rlc_am_data_req ( ...@@ -1230,7 +1222,7 @@ rlc_am_data_req (
mui = ((struct rlc_am_data_req*) (sdu_pP->data))->mui; mui = ((struct rlc_am_data_req*) (sdu_pP->data))->mui;
data_offset = ((struct rlc_am_data_req*) (sdu_pP->data))->data_offset; data_offset = ((struct rlc_am_data_req*) (sdu_pP->data))->data_offset;
data_size = ((struct rlc_am_data_req*) (sdu_pP->data))->data_size; data_size = ((struct rlc_am_data_req*) (sdu_pP->data))->data_size;
msc_log_rx_discarded_message( MSC_LOG_RX_DISCARDED_MESSAGE(
(ctxt_pP->enb_flag == ENB_FLAG_YES) ? MSC_RLC_ENB:MSC_RLC_UE, (ctxt_pP->enb_flag == ENB_FLAG_YES) ? MSC_RLC_ENB:MSC_RLC_UE,
(ctxt_pP->enb_flag == ENB_FLAG_YES) ? MSC_PDCP_ENB:MSC_PDCP_UE, (ctxt_pP->enb_flag == ENB_FLAG_YES) ? MSC_PDCP_ENB:MSC_PDCP_UE,
(const char*)(&sdu_pP->data[data_offset]), (const char*)(&sdu_pP->data[data_offset]),
......
...@@ -39,9 +39,7 @@ ...@@ -39,9 +39,7 @@
#include "list.h" #include "list.h"
#include "LAYER2/MAC/extern.h" #include "LAYER2/MAC/extern.h"
#include "UTIL/LOG/log.h" #include "UTIL/LOG/log.h"
#ifdef MESSAGE_CHART_GENERATOR
#include "msc.h" #include "msc.h"
#endif
//#define TRACE_RLC_AM_RX_DECODE //#define TRACE_RLC_AM_RX_DECODE
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
...@@ -166,8 +164,7 @@ rlc_am_send_sdu ( ...@@ -166,8 +164,7 @@ rlc_am_send_sdu (
message_string_size += sprintf(&message_string[message_string_size], " |\n"); message_string_size += sprintf(&message_string[message_string_size], " |\n");
#ifdef MESSAGE_CHART_GENERATOR MSC_LOG_TX_MESSAGE(
msc_log_tx_message(
(ctxt_pP->enb_flag == ENB_FLAG_YES) ? MSC_RLC_ENB:MSC_RLC_UE, (ctxt_pP->enb_flag == ENB_FLAG_YES) ? MSC_RLC_ENB:MSC_RLC_UE,
(ctxt_pP->enb_flag == ENB_FLAG_YES) ? MSC_PDCP_ENB:MSC_PDCP_UE, (ctxt_pP->enb_flag == ENB_FLAG_YES) ? MSC_PDCP_ENB:MSC_PDCP_UE,
(const char*)(rlc_pP->output_sdu_in_construction->data), (const char*)(rlc_pP->output_sdu_in_construction->data),
...@@ -177,7 +174,7 @@ rlc_am_send_sdu ( ...@@ -177,7 +174,7 @@ rlc_am_send_sdu (
PROTOCOL_RLC_AM_MSC_ARGS(ctxt_pP,rlc_pP), PROTOCOL_RLC_AM_MSC_ARGS(ctxt_pP,rlc_pP),
rlc_pP->output_sdu_size_to_write rlc_pP->output_sdu_size_to_write
); );
#endif
# if defined(ENABLE_ITTI) # if defined(ENABLE_ITTI)
msg_p = itti_alloc_new_message_sized (ctxt_pP->enb_flag > 0 ? TASK_RLC_ENB:TASK_RLC_UE , msg_p = itti_alloc_new_message_sized (ctxt_pP->enb_flag > 0 ? TASK_RLC_ENB:TASK_RLC_UE ,
RLC_AM_SDU_IND, RLC_AM_SDU_IND,
......
...@@ -43,9 +43,7 @@ ...@@ -43,9 +43,7 @@
#include "mac_primitives.h" #include "mac_primitives.h"
#include "LAYER2/MAC/extern.h" #include "LAYER2/MAC/extern.h"
#include "UTIL/LOG/log.h" #include "UTIL/LOG/log.h"
#ifdef MESSAGE_CHART_GENERATOR
#include "msc.h" #include "msc.h"
#endif
#include "rlc_um_very_simple_test.h" #include "rlc_um_very_simple_test.h"
...@@ -234,7 +232,7 @@ rlc_um_rx (const protocol_ctxt_t* const ctxt_pP, void *argP, struct mac_data_ind ...@@ -234,7 +232,7 @@ rlc_um_rx (const protocol_ctxt_t* const ctxt_pP, void *argP, struct mac_data_ind
} }
} }
msc_log_rx_discarded_message( MSC_LOG_RX_DISCARDED_MESSAGE(
(ctxt_pP->enb_flag == ENB_FLAG_YES) ? MSC_RLC_ENB:MSC_RLC_UE, (ctxt_pP->enb_flag == ENB_FLAG_YES) ? MSC_RLC_ENB:MSC_RLC_UE,
(ctxt_pP->enb_flag == ENB_FLAG_YES) ? MSC_RLC_UE:MSC_RLC_ENB, (ctxt_pP->enb_flag == ENB_FLAG_YES) ? MSC_RLC_UE:MSC_RLC_ENB,
(const char*)pdu_info.payload, (const char*)pdu_info.payload,
...@@ -302,7 +300,7 @@ rlc_um_rx (const protocol_ctxt_t* const ctxt_pP, void *argP, struct mac_data_ind ...@@ -302,7 +300,7 @@ rlc_um_rx (const protocol_ctxt_t* const ctxt_pP, void *argP, struct mac_data_ind
} }
} }
msc_log_rx_message( MSC_LOG_RX_MESSAGE(
(ctxt_pP->enb_flag == ENB_FLAG_YES) ? MSC_RLC_ENB:MSC_RLC_UE, (ctxt_pP->enb_flag == ENB_FLAG_YES) ? MSC_RLC_ENB:MSC_RLC_UE,
(ctxt_pP->enb_flag == ENB_FLAG_YES) ? MSC_RLC_UE:MSC_RLC_ENB,