Commit fe60ed8f authored by gauthier's avatar gauthier

git-svn-id: http://svn.eurecom.fr/openair4G/trunk@5677 818b1a75-f10b-46b9-bf7c-635c3b92a50f

parent 1a1504bc
......@@ -896,7 +896,7 @@ rlc_am_mac_data_indication (void *rlc_pP, frame_t frameP, eNB_flag_t eNB_flagP,
# if defined(ENABLE_ITTI)
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], "PDU size : %u\n", tb_size_in_bytes);
message_string_size += sprintf(&message_string[message_string_size], "PDU size : %u\n", ((struct mac_tb_ind *) (tb_p->data))->size);
message_string_size += sprintf(&message_string[message_string_size], "PDU type : RLC AM DATA IND: STATUS PDU\n\n");
message_string_size += sprintf(&message_string[message_string_size], "Header :\n");
message_string_size += sprintf(&message_string[message_string_size], " D/C : %u\n", g_rlc_am_control_pdu_info.d_c);
......@@ -982,7 +982,7 @@ rlc_am_data_req (void *rlc_pP, frame_t frameP, mem_block_t * sdu_pP)
/*
* Print every single octet in hexadecimal form
*/
message_string_size += sprintf(&message_string[message_string_size], " %02x", (uint8_t*)(&sdu_pP->data[data_offset])[octet_index]);
message_string_size += sprintf(&message_string[message_string_size], " %02x", ((uint8_t*)(&sdu_pP->data[data_offset]))[octet_index]);
/*
* Align newline and pipes according to the octets in groups of 2
*/
......
......@@ -33,6 +33,9 @@
//-----------------------------------------------------------------------------
#include "platform_types.h"
//-----------------------------------------------------------------------------
#if defined(ENABLE_ITTI)
# include "intertask_interface.h"
#endif
#include "assertions.h"
#include "list.h"
#include "rlc_am.h"
......@@ -41,6 +44,48 @@
#define TRACE_STATUS_CREATION
rlc_am_control_pdu_info_t g_rlc_am_control_pdu_info;
# if defined(ENABLE_ITTI)
//-----------------------------------------------------------------------------
void rlc_am_itti_display_status_ind_infos(const rlc_am_entity_t const * rlc_pP, const rlc_am_control_pdu_info_t const * pdu_info_pP)
//-----------------------------------------------------------------------------
{
char message_string[1000];
size_t message_string_size = 0;
MessageDef *msg_p;
int num_nack;
if (!pdu_info_pP->d_c) {
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], "CONTROL PDU ACK SN %04d", pdu_info_pP->ack_sn);
for (num_nack = 0; num_nack < pdu_info_pP->num_nack; num_nack++) {
if (pdu_info_pP->nack_list[num_nack].e2) {
message_string_size += sprintf(&message_string[message_string_size], "\n\tNACK SN %04d SO START %05d SO END %05d", pdu_info_pP->nack_list[num_nack].nack_sn,
pdu_info_pP->nack_list[num_nack].so_start,
pdu_info_pP->nack_list[num_nack].so_end);
} else {
message_string_size += sprintf(&message_string[message_string_size], "\n\tNACK SN %04d", pdu_info_pP->nack_list[num_nack].nack_sn);
}
}
message_string_size += sprintf(&message_string[message_string_size], "\n");
msg_p = itti_alloc_new_message_sized (rlc_pP->is_enb > 0 ? TASK_RLC_ENB:TASK_RLC_UE , RLC_AM_STATUS_PDU_IND, message_string_size + sizeof (IttiMsgText));
msg_p->ittiMsg.rlc_am_status_pdu_ind.size = message_string_size;
memcpy(&msg_p->ittiMsg.rlc_am_status_pdu_ind.text, message_string, message_string_size);
if (rlc_pP->is_enb) {
itti_send_msg_to_task(TASK_UNKNOWN, rlc_pP->enb_module_id, msg_p);
} else {
itti_send_msg_to_task(TASK_UNKNOWN, rlc_pP->ue_module_id + NB_eNB_INST, msg_p);
}
}
}
# endif
//-----------------------------------------------------------------------------
uint16_t rlc_am_read_bit_field(uint8_t** data_ppP, unsigned int* bit_pos_pP, signed int bits_to_readP) {
//-----------------------------------------------------------------------------
......
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