Commit 8d446ede authored by winckel's avatar winckel

Modified message of some "macphy_exit()" calls.

Added SIB logging for ITTI when creating SIB2/3.

git-svn-id: http://svn.eurecom.fr/openair4G/trunk@4735 818b1a75-f10b-46b9-bf7c-635c3b92a50f
parent aa554b6f
...@@ -682,9 +682,29 @@ uint8_t do_SIB2_AT4(uint8_t Mod_id, ...@@ -682,9 +682,29 @@ uint8_t do_SIB2_AT4(uint8_t Mod_id,
xer_fprint(stdout, &asn_DEF_BCCH_DL_SCH_Message, (void*)bcch_message); xer_fprint(stdout, &asn_DEF_BCCH_DL_SCH_Message, (void*)bcch_message);
#endif #endif
enc_rval = uper_encode_to_buffer(&asn_DEF_BCCH_DL_SCH_Message, enc_rval = uper_encode_to_buffer(&asn_DEF_BCCH_DL_SCH_Message,
(void*)bcch_message, (void*)bcch_message,
buffer, buffer,
100); 100);
#if defined(ENABLE_ITTI)
# if !defined(DISABLE_XER_SPRINT)
{
char message_string[10000];
size_t message_string_size;
if ((message_string_size = xer_sprint(message_string, sizeof(message_string), &asn_DEF_BCCH_DL_SCH_Message, (void *)bcch_message)) > 0)
{
MessageDef *message_p;
message_p = itti_alloc_new_message_sized (TASK_RRC_UE, GENERIC_LOG, message_string_size);
memcpy(&message_p->ittiMsg.generic_log, message_string, message_string_size);
itti_send_msg_to_task(TASK_UNKNOWN, INSTANCE_DEFAULT, message_p);
}
}
# endif
#endif
#ifdef USER_MODE #ifdef USER_MODE
LOG_D(RRC,"[eNB] SystemInformation Encoded %d bits (%d bytes)\n",enc_rval.encoded,(enc_rval.encoded+7)/8); LOG_D(RRC,"[eNB] SystemInformation Encoded %d bits (%d bytes)\n",enc_rval.encoded,(enc_rval.encoded+7)/8);
#endif #endif
...@@ -1035,9 +1055,9 @@ uint8_t do_SIB23(uint8_t Mod_id, ...@@ -1035,9 +1055,9 @@ uint8_t do_SIB23(uint8_t Mod_id,
// asn_set_empty(&systemInformation->criticalExtensions.choice.systemInformation_r8.sib_TypeAndInfo.list);//.size=0; // asn_set_empty(&systemInformation->criticalExtensions.choice.systemInformation_r8.sib_TypeAndInfo.list);//.size=0;
// systemInformation->criticalExtensions.choice.systemInformation_r8.sib_TypeAndInfo.list.count=0; // systemInformation->criticalExtensions.choice.systemInformation_r8.sib_TypeAndInfo.list.count=0;
ASN_SEQUENCE_ADD(&bcch_message->message.choice.c1.choice.systemInformation.criticalExtensions.choice.systemInformation_r8.sib_TypeAndInfo.list, ASN_SEQUENCE_ADD(&bcch_message->message.choice.c1.choice.systemInformation.criticalExtensions.choice.systemInformation_r8.sib_TypeAndInfo.list,
sib2_part); sib2_part);
ASN_SEQUENCE_ADD(&bcch_message->message.choice.c1.choice.systemInformation.criticalExtensions.choice.systemInformation_r8.sib_TypeAndInfo.list, ASN_SEQUENCE_ADD(&bcch_message->message.choice.c1.choice.systemInformation.criticalExtensions.choice.systemInformation_r8.sib_TypeAndInfo.list,
sib3_part); sib3_part);
#ifdef Rel10 #ifdef Rel10
if (MBMS_flag > 0) { if (MBMS_flag > 0) {
ASN_SEQUENCE_ADD(&bcch_message->message.choice.c1.choice.systemInformation.criticalExtensions.choice.systemInformation_r8.sib_TypeAndInfo.list,sib13_part); ASN_SEQUENCE_ADD(&bcch_message->message.choice.c1.choice.systemInformation.criticalExtensions.choice.systemInformation_r8.sib_TypeAndInfo.list,sib13_part);
...@@ -1049,9 +1069,29 @@ uint8_t do_SIB23(uint8_t Mod_id, ...@@ -1049,9 +1069,29 @@ uint8_t do_SIB23(uint8_t Mod_id,
xer_fprint(stdout, &asn_DEF_BCCH_DL_SCH_Message, (void*)bcch_message); xer_fprint(stdout, &asn_DEF_BCCH_DL_SCH_Message, (void*)bcch_message);
#endif #endif
enc_rval = uper_encode_to_buffer(&asn_DEF_BCCH_DL_SCH_Message, enc_rval = uper_encode_to_buffer(&asn_DEF_BCCH_DL_SCH_Message,
(void*)bcch_message, (void*)bcch_message,
buffer, buffer,
900); 900);
#if defined(ENABLE_ITTI)
# if !defined(DISABLE_XER_SPRINT)
{
char message_string[10000];
size_t message_string_size;
if ((message_string_size = xer_sprint(message_string, sizeof(message_string), &asn_DEF_BCCH_DL_SCH_Message, (void *)bcch_message)) > 0)
{
MessageDef *message_p;
message_p = itti_alloc_new_message_sized (TASK_RRC_UE, GENERIC_LOG, message_string_size);
memcpy(&message_p->ittiMsg.generic_log, message_string, message_string_size);
itti_send_msg_to_task(TASK_UNKNOWN, INSTANCE_DEFAULT, message_p);
}
}
# endif
#endif
#ifdef USER_MODE #ifdef USER_MODE
LOG_D(RRC,"[eNB] SystemInformation Encoded %d bits (%d bytes)\n",enc_rval.encoded,(enc_rval.encoded+7)/8); LOG_D(RRC,"[eNB] SystemInformation Encoded %d bits (%d bytes)\n",enc_rval.encoded,(enc_rval.encoded+7)/8);
#endif #endif
......
...@@ -187,7 +187,7 @@ static void init_SI (u8 Mod_id ...@@ -187,7 +187,7 @@ static void init_SI (u8 Mod_id
else else
{ {
LOG_E (RRC, "[eNB %d] init_SI: FATAL, no memory for SIB1 allocated\n", Mod_id); LOG_E (RRC, "[eNB %d] init_SI: FATAL, no memory for SIB1 allocated\n", Mod_id);
mac_xface->macphy_exit (""); mac_xface->macphy_exit ("[RRC][init_SI] FATAL, no memory for SIB1 allocated");
} }
/* /*
printf ("after SIB1 init : Nid_cell %d\n", mac_xface->lte_frame_parms->Nid_cell); printf ("after SIB1 init : Nid_cell %d\n", mac_xface->lte_frame_parms->Nid_cell);
...@@ -196,7 +196,7 @@ static void init_SI (u8 Mod_id ...@@ -196,7 +196,7 @@ static void init_SI (u8 Mod_id
mac_xface->lte_frame_parms->tdd_config); mac_xface->lte_frame_parms->tdd_config);
*/ */
if (eNB_rrc_inst[Mod_id].sizeof_SIB1 == 255) if (eNB_rrc_inst[Mod_id].sizeof_SIB1 == 255)
mac_xface->macphy_exit (""); mac_xface->macphy_exit ("[RRC][init_SI] FATAL, eNB_rrc_inst[Mod_id].sizeof_SIB1 == 255");
eNB_rrc_inst[Mod_id].SIB23 = (u8 *) malloc16 (64); eNB_rrc_inst[Mod_id].SIB23 = (u8 *) malloc16 (64);
if (eNB_rrc_inst[Mod_id].SIB23) { if (eNB_rrc_inst[Mod_id].SIB23) {
...@@ -220,7 +220,7 @@ static void init_SI (u8 Mod_id ...@@ -220,7 +220,7 @@ static void init_SI (u8 Mod_id
&eNB_rrc_inst[Mod_id].sib2); &eNB_rrc_inst[Mod_id].sib2);
*/ */
if (eNB_rrc_inst[Mod_id].sizeof_SIB23 == 255) if (eNB_rrc_inst[Mod_id].sizeof_SIB23 == 255)
mac_xface->macphy_exit ("eNB_rrc_inst[Mod_id].sizeof_SIB23 == 255"); mac_xface->macphy_exit ("[RRC][init_SI] FATAL, eNB_rrc_inst[Mod_id].sizeof_SIB23 == 255");
LOG_T (RRC, "[eNB %d] SIB2/3 Contents (partial)\n", Mod_id); LOG_T (RRC, "[eNB %d] SIB2/3 Contents (partial)\n", Mod_id);
LOG_T (RRC, "[eNB %d] pusch_config_common.n_SB = %ld\n", Mod_id, LOG_T (RRC, "[eNB %d] pusch_config_common.n_SB = %ld\n", Mod_id,
...@@ -324,7 +324,7 @@ static void init_SI (u8 Mod_id ...@@ -324,7 +324,7 @@ static void init_SI (u8 Mod_id
else else
{ {
LOG_E (RRC, "[eNB] init_SI: FATAL, no memory for SIB2/3 allocated\n"); LOG_E (RRC, "[eNB] init_SI: FATAL, no memory for SIB2/3 allocated\n");
mac_xface->macphy_exit (""); mac_xface->macphy_exit ("[RRC][init_SI] FATAL, no memory for SIB2/3 allocated");
} }
} }
...@@ -367,9 +367,9 @@ static void init_MCCH (u8 Mod_id) { ...@@ -367,9 +367,9 @@ static void init_MCCH (u8 Mod_id) {
if (eNB_rrc_inst[Mod_id].sizeof_MCCH_MESSAGE[sync_area] == 255) if (eNB_rrc_inst[Mod_id].sizeof_MCCH_MESSAGE[sync_area] == 255)
mac_xface->macphy_exit (""); mac_xface->macphy_exit ("[RRC][init_MCCH] eNB_rrc_inst[Mod_id].sizeof_MCCH_MESSAGE[sync_area] == 255");
else else
eNB_rrc_inst[Mod_id].MCCH_MESS[sync_area].Active = 1; eNB_rrc_inst[Mod_id].MCCH_MESS[sync_area].Active = 1;
} }
} }
//Set the eNB_rrc_inst[Mod_id].MCCH_MESS.Active to 1 (allow to transfer MCCH message RRC->MAC in function mac_rrc_data_req) //Set the eNB_rrc_inst[Mod_id].MCCH_MESS.Active to 1 (allow to transfer MCCH message RRC->MAC in function mac_rrc_data_req)
...@@ -2584,7 +2584,7 @@ for (i = 0; i < 8; i++) ...@@ -2584,7 +2584,7 @@ for (i = 0; i < 8; i++)
if (dec_rval.consumed == 0) if (dec_rval.consumed == 0)
{ {
LOG_E (RRC, "[eNB %d] FATAL Error in receiving CCCH\n", Mod_id); LOG_E (RRC, "[eNB %d] FATAL Error in receiving CCCH\n", Mod_id);
return -1; //mac_xface->macphy_exit(""); //exit(-1); return -1;
} }
if (ul_ccch_msg->message.present == UL_CCCH_MessageType_PR_c1) if (ul_ccch_msg->message.present == UL_CCCH_MessageType_PR_c1)
{ {
...@@ -2593,23 +2593,19 @@ for (i = 0; i < 8; i++) ...@@ -2593,23 +2593,19 @@ for (i = 0; i < 8; i++)
{ {
case UL_CCCH_MessageType__c1_PR_NOTHING: case UL_CCCH_MessageType__c1_PR_NOTHING:
LOG_I (RRC, LOG_I (RRC, "[eNB %d] Frame %d : Received PR_NOTHING on UL-CCCH-Message\n",
"[eNB %d] Frame %d : Received PR_NOTHING on UL-CCCH-Message\n",
Mod_id, frame); Mod_id, frame);
break; break;
case UL_CCCH_MessageType__c1_PR_rrcConnectionReestablishmentRequest: case UL_CCCH_MessageType__c1_PR_rrcConnectionReestablishmentRequest:
LOG_D (RRC, LOG_D (RRC, "[MSC_MSG][FRAME %05d][MAC_eNB][MOD %02d][][--- MAC_DATA_IND (rrcConnectionReestablishmentRequest on SRB0) -->][RRC_eNB][MOD %02d][]\n",
"[MSC_MSG][FRAME %05d][MAC_eNB][MOD %02d][][--- MAC_DATA_IND (rrcConnectionReestablishmentRequest on SRB0) -->][RRC_eNB][MOD %02d][]\n",
frame, Mod_id, Mod_id); frame, Mod_id, Mod_id);
LOG_I (RRC, LOG_I (RRC, "[eNB %d] Frame %d : RRCConnectionReestablishmentRequest not supported yet\n",
"[eNB %d] Frame %d : RRCConnectionReestablishmentRequest not supported yet\n",
Mod_id, frame); Mod_id, frame);
break; break;
case UL_CCCH_MessageType__c1_PR_rrcConnectionRequest: case UL_CCCH_MessageType__c1_PR_rrcConnectionRequest:
LOG_D (RRC, LOG_D (RRC, "[MSC_MSG][FRAME %05d][MAC_eNB][MOD %02d][][--- MAC_DATA_IND (rrcConnectionRequest on SRB0) -->][RRC_eNB][MOD %02d][]\n",
"[MSC_MSG][FRAME %05d][MAC_eNB][MOD %02d][][--- MAC_DATA_IND (rrcConnectionRequest on SRB0) -->][RRC_eNB][MOD %02d][]\n",
frame, Mod_id, Mod_id); frame, Mod_id, Mod_id);
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;
......
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