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 )
set ( LOWLATENCY False )
set ( MAC_CONTEXT 1 )
set ( MAX_NUM_CCs 1 )
set ( MESSAGE_CHART_GENERATOR True)
set ( MIH_C_MEDIEVAL_EXTENSIONS False )
set ( MSG_PRINT False )
set ( MU_RECEIVER False )
......
......@@ -72,7 +72,7 @@ typedef enum {
#define MSC_AS_TIME_ARGS(CTXT_Pp) \
(CTXT_Pp)->frame, \
(CTXT_Pp)->subframe
#if defined(MESSAGE_CHART_GENERATOR)
int msc_init(msc_env_t envP);
void msc_end(void);
void msc_log_declare_proto(const msc_proto_t protoP);
......@@ -95,5 +95,18 @@ void msc_log_tx_message(
const char* bytesP,
const unsigned int num_bytes,
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
......@@ -48,9 +48,7 @@
#include "s1ap_eNB_nas_procedures.h"
#include "s1ap_eNB_management_procedures.h"
#include "s1ap_eNB_context_management_procedures.h"
#ifdef MESSAGE_CHART_GENERATOR
#include "msc.h"
#endif
int s1ap_ue_context_release_complete(instance_t instance,
......@@ -101,8 +99,7 @@ int s1ap_ue_context_release_complete(instance_t instance,
return -1;
}
#ifdef MESSAGE_CHART_GENERATOR
msc_log_tx_message(
MSC_LOG_TX_MESSAGE(
MSC_S1AP_ENB,
MSC_S1AP_MME,
buffer,
......@@ -111,7 +108,6 @@ int s1ap_ue_context_release_complete(instance_t instance,
0,0, //MSC_AS_TIME_ARGS(ctxt_pP),
ue_ctxt_release_complete_ies_p->eNB_UE_S1AP_ID,
ue_ctxt_release_complete_ies_p->mme_ue_s1ap_id);
#endif
/* UE associated signalling -> use the allocated stream */
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,
return -1;
}
#ifdef MESSAGE_CHART_GENERATOR
msc_log_tx_message(
MSC_LOG_TX_MESSAGE(
MSC_S1AP_ENB,
MSC_S1AP_MME,
buffer,
......@@ -225,7 +220,6 @@ int s1ap_ue_context_release_req(instance_t instance,
0,0,//MSC_AS_TIME_ARGS(ctxt_pP),
ue_ctxt_release_request_ies_p->eNB_UE_S1AP_ID,
ue_ctxt_release_request_ies_p->mme_ue_s1ap_id);
#endif
/* UE associated signalling -> use the allocated stream */
s1ap_eNB_itti_send_sctp_data_req(s1ap_eNB_instance_p->instance,
......
......@@ -47,9 +47,7 @@
#include "s1ap_eNB_ue_context.h"
#include "s1ap_eNB_nas_procedures.h"
#include "s1ap_eNB_management_procedures.h"
#ifdef MESSAGE_CHART_GENERATOR
#include "msc.h"
#endif
//------------------------------------------------------------------------------
int s1ap_eNB_handle_nas_first_req(
......@@ -231,8 +229,7 @@ int s1ap_eNB_handle_nas_first_req(
#endif
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_MME,
(const char *)NULL,
......@@ -240,7 +237,7 @@ int s1ap_eNB_handle_nas_first_req(
MSC_AS_TIME_FMT" initialUEMessage initiatingMessage eNB_ue_s1ap_id %u",
0,0,//MSC_AS_TIME_ARGS(ctxt_pP),
initial_ue_message_p->eNB_UE_S1AP_ID);
#endif
/* Send encoded message over sctp */
s1ap_eNB_itti_send_sctp_data_req(instance_p->instance, mme_desc_p->assoc_id,
buffer, length, ue_desc_p->stream);
......@@ -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,
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_MME,
(const char *)downlink_NAS_transport_p,
......@@ -292,7 +288,6 @@ int s1ap_eNB_handle_nas_downlink(const uint32_t assoc_id,
0,0,//MSC_AS_TIME_ARGS(ctxt_pP),
downlink_NAS_transport_p->eNB_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",
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_MME,
(const char *)downlink_NAS_transport_p,
......@@ -327,7 +321,6 @@ int s1ap_eNB_handle_nas_downlink(const uint32_t assoc_id,
0,0,//MSC_AS_TIME_ARGS(ctxt_pP),
downlink_NAS_transport_p->eNB_UE_S1AP_ID,
downlink_NAS_transport_p->mme_ue_s1ap_id);
#endif
/* Forward the NAS PDU to RRC */
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_
return -1;
}
#ifdef MESSAGE_CHART_GENERATOR
msc_log_tx_message(
MSC_LOG_TX_MESSAGE(
MSC_S1AP_ENB,
MSC_S1AP_MME,
(const char *)NULL,
......@@ -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),
uplink_NAS_transport_p->eNB_UE_S1AP_ID,
uplink_NAS_transport_p->mme_ue_s1ap_id);
#endif
/* UE associated signalling -> use the allocated stream */
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,
/* Send a dummy cause */
nas_non_delivery_p->cause.present = S1ap_Cause_PR_radioNetwork;
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_MME,
(const char *)s1ap_nas_non_delivery_ind,
......@@ -498,7 +490,7 @@ void s1ap_eNB_nas_non_delivery_ind(instance_t instance,
0,0,//MSC_AS_TIME_ARGS(ctxt_pP),
nas_non_delivery_p->eNB_UE_S1AP_ID,
nas_non_delivery_p->mme_ue_s1ap_id);
#endif
/* UE associated signalling -> use the allocated stream */
s1ap_eNB_itti_send_sctp_data_req(s1ap_eNB_instance_p->instance,
......@@ -580,8 +572,7 @@ int s1ap_eNB_initial_ctxt_resp(
return -1;
}
#ifdef MESSAGE_CHART_GENERATOR
msc_log_tx_message(
MSC_LOG_TX_MESSAGE(
MSC_S1AP_ENB,
MSC_S1AP_MME,
(const char *)buffer,
......@@ -590,7 +581,6 @@ int s1ap_eNB_initial_ctxt_resp(
0,0,//MSC_AS_TIME_ARGS(ctxt_pP),
initial_ies_p->eNB_UE_S1AP_ID,
initial_ies_p->mme_ue_s1ap_id);
#endif
/* UE associated signalling -> use the allocated stream */
s1ap_eNB_itti_send_sctp_data_req(s1ap_eNB_instance_p->instance,
......@@ -661,8 +651,7 @@ int s1ap_eNB_ue_capabilities(instance_t instance,
return -1;
}
#ifdef MESSAGE_CHART_GENERATOR
msc_log_tx_message(
MSC_LOG_TX_MESSAGE(
MSC_S1AP_ENB,
MSC_S1AP_MME,
(const char *)buffer,
......@@ -671,7 +660,6 @@ int s1ap_eNB_ue_capabilities(instance_t instance,
0,0,//MSC_AS_TIME_ARGS(ctxt_pP),
ue_cap_info_ind_ies_p->eNB_UE_S1AP_ID,
ue_cap_info_ind_ies_p->mme_ue_s1ap_id);
#endif
/* UE associated signalling -> use the allocated stream */
s1ap_eNB_itti_send_sctp_data_req(s1ap_eNB_instance_p->instance,
......
......@@ -47,9 +47,7 @@
#include "UTIL/LOG/log.h"
#include "UL-AM-RLC.h"
#include "DL-AM-RLC.h"
#ifdef MESSAGE_CHART_GENERATOR
#include "msc.h"
#endif
//#define TRACE_RLC_AM_DATA_REQUEST
//#define TRACE_RLC_AM_TX_STATUS
//#define TRACE_RLC_AM_TX
......@@ -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_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_RRC_ENB:MSC_RRC_UE,
NULL,
......@@ -210,7 +207,7 @@ void config_req_rlc_am_asn1 (
PollRetransmit_tab[config_am_pP->ul_AM_RLC.t_PollRetransmit],
am_t_Reordering_tab[config_am_pP->dl_AM_RLC.t_Reordering],
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",
PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,l_rlc_p),
maxRetxThreshold_tab[config_am_pP->ul_AM_RLC.maxRetxThreshold],
......@@ -230,8 +227,7 @@ void config_req_rlc_am_asn1 (
am_t_Reordering_tab[config_am_pP->dl_AM_RLC.t_Reordering],
t_StatusProhibit_tab[config_am_pP->dl_AM_RLC.t_StatusProhibit]);
} 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_RRC_ENB:MSC_RRC_UE,
NULL,
......@@ -239,7 +235,7 @@ void config_req_rlc_am_asn1 (
MSC_AS_TIME_FMT" "PROTOCOL_RLC_AM_MSC_FMT" CONFIG-REQ",
MSC_AS_TIME_ARGS(ctxt_pP),
PROTOCOL_RLC_AM_MSC_ARGS(ctxt_pP, l_rlc_p));
#endif
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_ARGS(ctxt_pP,l_rlc_p),
......@@ -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_UE:MSC_RLC_ENB,
(char*)rlc_am_pdu_sn_10_p,
......@@ -803,11 +799,9 @@ rlc_am_mac_data_request (
#ifdef MESSAGE_CHART_GENERATOR
message_string_size = 0;
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),
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);
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 (
}
}
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_UE:MSC_RLC_ENB,
(char*)rlc_am_pdu_sn_10_p,
......@@ -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_UE:MSC_RLC_ENB,
(char*)rlc_am_pdu_sn_10_p,
......@@ -1024,11 +1018,9 @@ rlc_am_mac_data_indication (
#ifdef MESSAGE_CHART_GENERATOR
message_string_size = 0;
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),
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);
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 (
}
}
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_UE:MSC_RLC_ENB,
(char*)rlc_am_pdu_sn_10_p,
......@@ -1129,8 +1121,8 @@ rlc_am_data_req (
data_offset = ((struct rlc_am_data_req *) (sdu_pP->data))->data_offset;
data_size = ((struct rlc_am_data_req *) (sdu_pP->data))->data_size;
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_PDCP_ENB:MSC_PDCP_UE,
(const char*)(&sdu_pP->data[data_offset]),
......@@ -1140,7 +1132,7 @@ rlc_am_data_req (
PROTOCOL_RLC_AM_MSC_ARGS(ctxt_pP, l_rlc_p),
data_size,
mui);
#endif
#if defined(TRACE_RLC_AM_PDU)
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 (
mui = ((struct rlc_am_data_req*) (sdu_pP->data))->mui;
data_offset = ((struct rlc_am_data_req*) (sdu_pP->data))->data_offset;
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_PDCP_ENB:MSC_PDCP_UE,
(const char*)(&sdu_pP->data[data_offset]),
......
......@@ -39,9 +39,7 @@
#include "list.h"
#include "LAYER2/MAC/extern.h"
#include "UTIL/LOG/log.h"
#ifdef MESSAGE_CHART_GENERATOR
#include "msc.h"
#endif
//#define TRACE_RLC_AM_RX_DECODE
//-----------------------------------------------------------------------------
......@@ -166,8 +164,7 @@ rlc_am_send_sdu (
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_PDCP_ENB:MSC_PDCP_UE,
(const char*)(rlc_pP->output_sdu_in_construction->data),
......@@ -177,7 +174,7 @@ rlc_am_send_sdu (
PROTOCOL_RLC_AM_MSC_ARGS(ctxt_pP,rlc_pP),
rlc_pP->output_sdu_size_to_write
);
#endif
# if defined(ENABLE_ITTI)
msg_p = itti_alloc_new_message_sized (ctxt_pP->enb_flag > 0 ? TASK_RLC_ENB:TASK_RLC_UE ,
RLC_AM_SDU_IND,
......
......@@ -43,9 +43,7 @@
#include "mac_primitives.h"
#include "LAYER2/MAC/extern.h"
#include "UTIL/LOG/log.h"
#ifdef MESSAGE_CHART_GENERATOR
#include "msc.h"
#endif
#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
}
}
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_UE:MSC_RLC_ENB,
(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
}
}
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_UE:MSC_RLC_ENB,
(char*)pdu_info.payload,
......@@ -587,7 +585,7 @@ rlc_um_mac_data_request (const protocol_ctxt_t* const ctxt_pP, void *rlc_pP)
}
}
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_UE:MSC_RLC_ENB,
(const char*)pdu_info.payload,
......@@ -720,8 +718,8 @@ rlc_um_data_req (const protocol_ctxt_t* const ctxt_pP, void *rlc_pP, mem_block_t
rlc_p->stat_tx_pdcp_sdu += 1;
rlc_p->stat_tx_pdcp_bytes += ((struct rlc_um_tx_sdu_management *) (sdu_pP->data))->sdu_size;
#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_PDCP_ENB:MSC_PDCP_UE,
(const char *)((struct rlc_um_tx_sdu_management*) (sdu_pP->data))->first_byte,
......@@ -730,7 +728,8 @@ rlc_um_data_req (const protocol_ctxt_t* const ctxt_pP, void *rlc_pP, mem_block_t
MSC_AS_TIME_ARGS(ctxt_pP),
PROTOCOL_RLC_UM_MSC_ARGS(ctxt_pP, rlc_p),
((struct rlc_um_tx_sdu_management*) (sdu_pP->data))->sdu_size);
#endif
# if defined(TRACE_RLC_UM_PDU)
data_offset = sizeof (struct rlc_um_data_req_alloc);
data_size = ((struct rlc_um_tx_sdu_management *)(sdu_pP->data))->sdu_size;
......
......@@ -43,9 +43,7 @@
#include "list.h"
#include "LAYER2/MAC/extern.h"
#include "UTIL/LOG/log.h"
#ifdef MESSAGE_CHART_GENERATOR
#include "msc.h"
#endif
//#define TRACE_RLC_UM_DISPLAY_ASCII_DATA 1
......@@ -132,8 +130,8 @@ rlc_um_send_sdu (const protocol_ctxt_t* const ctxt_pP, rlc_um_entity_t *rlc_pP)
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 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_PDCP_ENB:MSC_PDCP_UE,
(const char*)(rlc_pP->output_sdu_in_construction->data),
......@@ -143,7 +141,7 @@ rlc_um_send_sdu (const protocol_ctxt_t* const ctxt_pP, rlc_um_entity_t *rlc_pP)
PROTOCOL_RLC_UM_CTXT_ARGS(ctxt_pP,rlc_pP),
rlc_pP->output_sdu_size_to_write
);
#endif
#ifdef TEST_RLC_UM
#ifdef TRACE_RLC_UM_DISPLAY_ASCII_DATA
rlc_pP->output_sdu_in_construction->data[rlc_pP->output_sdu_size_to_write] = 0;
......
......@@ -47,9 +47,7 @@
#include "UTIL/LOG/log.h"
#include "rrc_eNB_UE_context.h"
#include "pdcp.h"
#ifdef MESSAGE_CHART_GENERATOR
#include "msc.h"
#endif
#ifdef PHY_EMUL
#include "SIMULATION/simulation_defs.h"
......@@ -505,8 +503,7 @@ rrc_lite_data_req(
)
//------------------------------------------------------------------------------
{
#ifdef MESSAGE_CHART_GENERATOR
msc_log_tx_message(
MSC_LOG_TX_MESSAGE(
ctxt_pP->enb_flag ? MSC_RRC_ENB : MSC_RRC_UE,
ctxt_pP->enb_flag ? MSC_PDCP_ENB : MSC_PDCP_UE,
buffer_pP,
......@@ -516,7 +513,7 @@ rrc_lite_data_req(
ctxt_pP->rnti,
muiP,
sdu_sizeP);
#endif
#if defined(ENABLE_ITTI)
{
MessageDef *message_p;
......
......@@ -61,9 +61,7 @@
#include "SIMULATION/ETH_TRANSPORT/extern.h"
#include "rrc_eNB_UE_context.h"
#include "platform_types.h"
#ifdef MESSAGE_CHART_GENERATOR
#include "msc.h"
#endif
//#ifdef Rel10
#include "MeasResults.h"
......@@ -856,8 +854,8 @@ rrc_eNB_generate_SecurityModeCommand(
size,
rrc_eNB_mui,
DCCH);
#ifdef MESSAGE_CHART_GENERATOR
msc_log_tx_message(
MSC_LOG_TX_MESSAGE(
MSC_RRC_ENB,
MSC_RRC_UE,
buffer,
......@@ -867,7 +865,7 @@ rrc_eNB_generate_SecurityModeCommand(
ue_context_pP->ue_context.rnti,
rrc_eNB_mui,
size);
#endif
pdcp_rrc_data_req(
ctxt_pP,
DCCH,
......@@ -907,8 +905,8 @@ rrc_eNB_generate_UECapabilityEnquiry(
size,
rrc_eNB_mui,
DCCH);
#ifdef MESSAGE_CHART_GENERATOR
msc_log_tx_message(
MSC_LOG_TX_MESSAGE(
MSC_RRC_ENB,
MSC_RRC_UE,
buffer,
......@@ -918,7 +916,7 @@ rrc_eNB_generate_UECapabilityEnquiry(
ue_context_pP->ue_context.rnti,
rrc_eNB_mui,
size);
#endif
pdcp_rrc_data_req(
ctxt_pP,
DCCH,
......@@ -957,8 +955,8 @@ rrc_eNB_generate_RRCConnectionRelease(
size,
rrc_eNB_mui,
DCCH);
#ifdef MESSAGE_CHART_GENERATOR
msc_log_tx_message(
MSC_LOG_TX_MESSAGE(
MSC_RRC_ENB,
MSC_RRC_UE,
buffer,
......@@ -968,7 +966,7 @@ rrc_eNB_generate_RRCConnectionRelease(
ue_context_pP->ue_context.rnti,
rrc_eNB_mui,
size);
#endif
pdcp_rrc_data_req(
ctxt_pP,
DCCH,
......@@ -1577,8 +1575,8 @@ rrc_eNB_generate_defaultRRCConnectionReconfiguration(
LOG_D(RRC,
"[FRAME %05d][RRC_eNB][MOD %u][][--- PDCP_DATA_REQ/%d Bytes (rrcConnectionReconfiguration to UE %x MUI %d) --->][PDCP][MOD %u][RB %u]\n",
ctxt_pP->frame, ctxt_pP->module_id, size, ue_context_pP->ue_context.rnti, rrc_eNB_mui, ctxt_pP->module_id, DCCH);
#ifdef MESSAGE_CHART_GENERATOR
msc_log_tx_message(
MSC_LOG_TX_MESSAGE(
MSC_RRC_ENB,
MSC_RRC_UE,
buffer,
......@@ -1588,7 +1586,7 @@ rrc_eNB_generate_defaultRRCConnectionReconfiguration(
ue_context_pP->ue_context.rnti,
rrc_eNB_mui,
size);
#endif
pdcp_rrc_data_req(
ctxt_pP,
DCCH,
......@@ -1655,8 +1653,7 @@ rrc_eNB_generate_RRCConnectionReconfiguration_SCell(
LOG_I(RRC,"[eNB %d] Frame %d, Logical Channel DL-DCCH, Generate RRCConnectionReconfiguration (bytes %d, UE id %x)\n",
ctxt_pP->module_id,ctxt_pP->frame, size, ue_context_pP->ue_context.rnti);
#ifdef MESSAGE_CHART_GENERATOR
msc_log_tx_message(
MSC_LOG_TX_MESSAGE(
MSC_RRC_ENB,
MSC_RRC_UE,
buffer,
......@@ -1666,7 +1663,6 @@ rrc_eNB_generate_RRCConnectionReconfiguration_SCell(
ue_context_pP->ue_context.rnti,
rrc_eNB_mui,
size);
#endif
pdcp_rrc_data_req(
ctxt_pP,
......@@ -3194,8 +3190,8 @@ rrc_eNB_generate_RRCConnectionSetup(
}
}
}
#ifdef MESSAGE_CHART_GENERATOR
msc_log_tx_message(
MSC_LOG_TX_MESSAGE(
MSC_RRC_ENB,
MSC_RRC_UE,
eNB_rrc_inst[ctxt_pP->module_id].Srb0.Tx_buffer.Header, // LG WARNING
......@@ -3204,7 +3200,7 @@ rrc_eNB_generate_RRCConnectionSetup(
MSC_AS_TIME_ARGS(ctxt_pP),
ue_context_pP->ue_context.rnti,
eNB_rrc_inst[ctxt_pP->module_id].Srb0.Tx_buffer.payload_size);
#endif
LOG_I(RRC,
PROTOCOL_RRC_CTXT_UE_FMT" [RAPROC] Logical Channel DL-CCCH, Generating RRCConnectionSetup (bytes %d)\n",
......@@ -3497,8 +3493,8 @@ rrc_eNB_decode_ccch(
if (ue_context_p != NULL) {
// erase content
rrc_eNB_free_mem_UE_context(ctxt_pP, ue_context_p);
#ifdef MESSAGE_CHART_GENERATOR
msc_log_rx_discarded_message(
MSC_LOG_RX_DISCARDED_MESSAGE(
MSC_RRC_ENB,
MSC_RRC_UE,
Srb_info->Rx_buffer.Payload,
......@@ -3507,16 +3503,14 @@ rrc_eNB_decode_ccch(
MSC_AS_TIME_ARGS(ctxt_pP),
ue_context_p->ue_context.rnti,
dec_rval.consumed);
#endif
} else {
rrcConnectionRequest = &ul_ccch_msg->message.choice.c1.choice.rrcConnectionRequest.criticalExtensions.choice.rrcConnectionRequest_r8;
{
rrcConnectionRequest = &ul_ccch_msg->message.choice.c1.choice.rrcConnectionRequest.criticalExtensions.choice.rrcConnectionRequest_r8;
{
memcpy(((uint8_t*) & random_value) + 3,
rrcConnectionRequest->ue_Identity.choice.randomValue.buf,
rrcConnectionRequest->ue_Identity.choice.randomValue.size);
ue_context_p = rrc_eNB_get_next_free_ue_context(ctxt_pP, random_value);
}
}
LOG_D(RRC,
PROTOCOL_RRC_CTXT_UE_FMT" UE context: %X\n",
PROTOCOL_RRC_CTXT_UE_ARGS(ctxt_pP),
......@@ -3538,8 +3532,8 @@ rrc_eNB_decode_ccch(
BIT_STRING_to_uint8(&s_TMSI.mmec);
ue_context_p->ue_context.Initialue_identity_s_TMSI.m_tmsi =
BIT_STRING_to_uint32(&s_TMSI.m_TMSI);
#ifdef MESSAGE_CHART_GENERATOR
msc_log_rx_discarded_message(
MSC_LOG_RX_DISCARDED_MESSAGE(
MSC_RRC_ENB,
MSC_RRC_UE,
Srb_info->Rx_buffer.Payload,
......@@ -3551,10 +3545,9 @@ rrc_eNB_decode_ccch(
s_TMSI.mmec,
s_TMSI.m_TMSI,
ue_context_p->ue_context.random_ue_identity);
#endif
} else {
#ifdef MESSAGE_CHART_GENERATOR
msc_log_rx_discarded_message(
MSC_LOG_RX_DISCARDED_MESSAGE(
MSC_RRC_ENB,
MSC_RRC_UE,
Srb_info->Rx_buffer.Payload,
......@@ -3564,7 +3557,6 @@ rrc_eNB_decode_ccch(
ue_context_p->ue_context.rnti,
dec_rval.consumed,
ue_context_p->ue_context.random_ue_identity);
#endif
}
ue_context_p->ue_context.establishment_cause =
......@@ -3780,8 +3772,7 @@ rrc_eNB_decode_dcch(
LOG_F(RRC,"\n");
#endif
#ifdef MESSAGE_CHART_GENERATOR
msc_log_rx_message(
MSC_LOG_RX_MESSAGE(
MSC_RRC_ENB,
MSC_RRC_UE,
Rx_sdu,
......@@ -3790,7 +3781,7 @@ rrc_eNB_decode_dcch(
MSC_AS_TIME_ARGS(ctxt_pP),
ue_context_p->ue_context.rnti,
sdu_sizeP);
#endif
LOG_D(RRC,
PROTOCOL_RRC_CTXT_UE_FMT" RLC RB %02d --- RLC_DATA_IND %d bytes "
"(RRCConnectionReconfigurationComplete) ---> RRC_eNB]\n",
......@@ -3837,8 +3828,8 @@ rrc_eNB_decode_dcch(
LOG_F(RRC,"\n");
#endif
#ifdef MESSAGE_CHART_GENERATOR
msc_log_rx_message(
MSC_LOG_RX_MESSAGE(
MSC_RRC_ENB,
MSC_RRC_UE,
Rx_sdu,
......@@ -3847,7 +3838,7 @@ rrc_eNB_decode_dcch(
MSC_AS_TIME_ARGS(ctxt_pP),
ue_context_p->ue_context.rnti,
sdu_sizeP);
#endif
LOG_I(RRC,
PROTOCOL_RRC_CTXT_UE_FMT" RLC RB %02d --- RLC_DATA_IND %d bytes "
"(rrcConnectionReestablishmentComplete) ---> RRC_eNB\n",
......@@ -3866,8 +3857,8 @@ rrc_eNB_decode_dcch(
LOG_F(RRC,"\n");
#endif
#ifdef MESSAGE_CHART_GENERATOR
msc_log_rx_message(
MSC_LOG_RX_MESSAGE(
MSC_RRC_ENB,
MSC_RRC_UE,
Rx_sdu,
......@@ -3876,7 +3867,7 @@ rrc_eNB_decode_dcch(
MSC_AS_TIME_ARGS(ctxt_pP),
ue_context_p->ue_context.rnti,
sdu_sizeP);
#endif
LOG_D(RRC,
PROTOCOL_RRC_CTXT_UE_FMT" RLC RB %02d --- RLC_DATA_IND %d bytes "
"(RRCConnectionSetupComplete) ---> RRC_eNB\n",
......@@ -3911,8 +3902,8 @@ rrc_eNB_decode_dcch(
LOG_F(RRC,"\n");
#endif
#ifdef MESSAGE_CHART_GENERATOR
msc_log_rx_message(
MSC_LOG_RX_MESSAGE(
MSC_RRC_ENB,
MSC_RRC_UE,
Rx_sdu,
......@@ -3921,7 +3912,7 @@ rrc_eNB_decode_dcch(
MSC_AS_TIME_ARGS(ctxt_pP),
ue_context_p->ue_context.rnti,
sdu_sizeP);
#endif
LOG_I(RRC,
PROTOCOL_RRC_CTXT_UE_FMT" received securityModeComplete on UL-DCCH %d from UE\n",
PROTOCOL_RRC_CTXT_UE_ARGS(ctxt_pP),
......@@ -3953,8 +3944,8 @@ rrc_eNB_decode_dcch(
LOG_F(RRC,"\n");