Fixes to SI message struct item in CU messages
* num_SI is the size of the list of gNB-CU System Information messages * the new struct member is an array, sized after the maximum nb of SIB types, which contains the SI container, the container length and the SIB type
This commit is contained in:
@@ -322,14 +322,22 @@ int CU_send_F1_SETUP_RESPONSE(sctp_assoc_t assoc_id, f1ap_setup_resp_t *f1ap_set
|
||||
|
||||
// for (int sIBtype=2;sIBtype<33;sIBtype++) { //21 ? 33 ?
|
||||
for (int sIBtype=2; sIBtype<21; sIBtype++) {
|
||||
if (f1ap_setup_resp->cells_to_activate[i].SI_container[sIBtype]!=NULL) {
|
||||
AssertFatal(sIBtype < 6 || sIBtype == 9, "Illegal SI type %d\n",sIBtype);
|
||||
asn1cSequenceAdd(gNB_CUSystemInformation->sibtypetobeupdatedlist.list, F1AP_SibtypetobeupdatedListItem_t, sib_item);
|
||||
sib_item->sIBtype = sIBtype;
|
||||
OCTET_STRING_fromBuf(&sib_item->sIBmessage,
|
||||
(const char *)f1ap_setup_resp->cells_to_activate[i].SI_container[sIBtype],
|
||||
f1ap_setup_resp->cells_to_activate[i].SI_container_length[sIBtype]);
|
||||
LOG_D(F1AP, "f1ap_setup_resp->SI_container_length[%d][%d] = %d \n", i,sIBtype,f1ap_setup_resp->cells_to_activate[i].SI_container_length[sIBtype]);
|
||||
for (int n = 0; n < f1ap_setup_resp->cells_to_activate[i].num_SI; n++) {
|
||||
if (f1ap_setup_resp->cells_to_activate[i].SI_msg[n].SI_container != NULL) {
|
||||
if (f1ap_setup_resp->cells_to_activate[i].SI_msg[n].SI_type > 6
|
||||
&& f1ap_setup_resp->cells_to_activate[i].SI_msg[n].SI_type != 9) {
|
||||
asn1cSequenceAdd(gNB_CUSystemInformation->sibtypetobeupdatedlist.list, F1AP_SibtypetobeupdatedListItem_t, sib_item);
|
||||
sib_item->sIBtype = f1ap_setup_resp->cells_to_activate[i].SI_msg[n].SI_type;
|
||||
OCTET_STRING_fromBuf(&sib_item->sIBmessage,
|
||||
(const char *)f1ap_setup_resp->cells_to_activate[i].SI_msg[n].SI_container,
|
||||
f1ap_setup_resp->cells_to_activate[i].SI_msg[n].SI_container_length);
|
||||
LOG_D(F1AP,
|
||||
"f1ap_setup_resp->cells_to_activate[%d].SI_msg[%d].SI_container_length = %d \n",
|
||||
i,
|
||||
n,
|
||||
f1ap_setup_resp->cells_to_activate[i].SI_msg[n].SI_container_length);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -875,16 +883,18 @@ int CU_send_gNB_CU_CONFIGURATION_UPDATE(sctp_assoc_t assoc_id, f1ap_gnb_cu_confi
|
||||
//printf("\n");
|
||||
|
||||
// for (int sIBtype=2;sIBtype<33;sIBtype++) { //21 ? 33 ?
|
||||
for (int sIBtype=2; sIBtype<21; sIBtype++) {
|
||||
if (f1ap_gnb_cu_configuration_update->cells_to_activate[i].SI_container[sIBtype]!=NULL) {
|
||||
AssertFatal(sIBtype < 6 || sIBtype == 9, "Illegal SI type %d\n",sIBtype);
|
||||
for (int j = 0; j < sizeofArray(f1ap_gnb_cu_configuration_update->cells_to_activate[i].SI_msg); j++) {
|
||||
f1ap_sib_msg_t *SI_msg = &f1ap_gnb_cu_configuration_update->cells_to_activate[i].SI_msg[j];
|
||||
if (SI_msg->SI_container != NULL) {
|
||||
asn1cSequenceAdd(gNB_CUSystemInformation->sibtypetobeupdatedlist.list, F1AP_SibtypetobeupdatedListItem_t, sib_item);
|
||||
sib_item->sIBtype = sIBtype;
|
||||
OCTET_STRING_fromBuf(&sib_item->sIBmessage,
|
||||
(const char *)f1ap_gnb_cu_configuration_update->cells_to_activate[i].SI_container[sIBtype],
|
||||
f1ap_gnb_cu_configuration_update->cells_to_activate[i].SI_container_length[sIBtype]);
|
||||
LOG_D(F1AP, "f1ap_setup_resp->SI_container_length[%d][%d] = %d \n", i,sIBtype,
|
||||
f1ap_gnb_cu_configuration_update->cells_to_activate[i].SI_container_length[sIBtype]);
|
||||
sib_item->sIBtype = SI_msg->SI_type;
|
||||
AssertFatal(sib_item->sIBtype < 6 || sib_item->sIBtype == 9, "Illegal SI type %ld\n", sib_item->sIBtype);
|
||||
OCTET_STRING_fromBuf(&sib_item->sIBmessage, (const char *)SI_msg->SI_container, SI_msg->SI_container_length);
|
||||
LOG_D(F1AP,
|
||||
"f1ap_gnb_cu_configuration_update->SI_container_length[%d][sIBtype %ld] = %d \n",
|
||||
i,
|
||||
sib_item->sIBtype,
|
||||
SI_msg->SI_container_length);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user