Starting to add array of erab_info messages.

This commit is contained in:
Pedro Alvarez 2020-04-09 17:21:24 +01:00 committed by Andre Puschmann
parent f872e6ec39
commit cc2b474754
2 changed files with 11 additions and 11 deletions

View File

@ -323,8 +323,8 @@ private:
uint32_t sr_I = 0;
bool cqi_allocated = false;
std::array<bool, 16> nas_pending = {};
srslte::byte_buffer_t erab_info;
std::array<bool, 16> nas_pending = {};
std::array<srslte::unique_byte_buffer_t, 16> erab_info;
const static uint32_t UE_PCELL_CC_IDX = 0;

View File

@ -1445,9 +1445,9 @@ void rrc::ue::setup_erab(uint8_t id,
if (nas_pdu != nullptr) {
nas_pending[id] = true;
memcpy(erab_info.msg, nas_pdu->data(), nas_pdu->size());
erab_info.N_bytes = nas_pdu->size();
parent->rrc_log->info_hex(erab_info.msg, erab_info.N_bytes, "setup_erab nas_pdu -> erab_info rnti 0x%x", rnti);
memcpy(erab_info[id]->msg, nas_pdu->data(), nas_pdu->size());
erab_info[id]->N_bytes = nas_pdu->size();
parent->rrc_log->info_hex(erab_info[id]->msg, erab_info[id]->N_bytes, "setup_erab nas_pdu -> erab_info rnti 0x%x", rnti);
} else {
nas_pending[id] = false;
}
@ -1889,11 +1889,11 @@ void rrc::ue::send_connection_reconf(srslte::unique_byte_buffer_t pdu)
// Add E-RAB info message for E-RAB 5 (DRB1)
if (nas_pending[5]) {
parent->rrc_log->info_hex(
erab_info.msg, erab_info.N_bytes, "connection_reconf erab_info -> nas_info rnti 0x%x\n", rnti);
erab_info[5]->msg, erab_info[5]->N_bytes, "connection_reconf erab_info -> nas_info rnti 0x%x\n", rnti);
conn_reconf->ded_info_nas_list_present = true;
conn_reconf->ded_info_nas_list.resize(1);
conn_reconf->ded_info_nas_list[0].resize(erab_info.N_bytes);
memcpy(conn_reconf->ded_info_nas_list[0].data(), erab_info.msg, erab_info.N_bytes);
conn_reconf->ded_info_nas_list[0].resize(erab_info[5]->N_bytes);
memcpy(conn_reconf->ded_info_nas_list[0].data(), erab_info[5]->msg, erab_info[5]->N_bytes);
} else {
parent->rrc_log->debug("Not adding NAS message to connection reconfiguration\n");
conn_reconf->ded_info_nas_list.resize(0);
@ -2097,9 +2097,9 @@ void rrc::ue::send_connection_reconf_new_bearer(const asn1::s1ap::erab_to_be_set
// Add NAS message
if (nas_pending[id]) {
parent->rrc_log->info_hex(
erab_info.msg, erab_info.N_bytes, "reconf_new_bearer erab_info -> nas_info rnti 0x%x\n", rnti);
asn1::dyn_octstring octstr(erab_info.N_bytes);
memcpy(octstr.data(), erab_info.msg, erab_info.N_bytes);
erab_info[id]->msg, erab_info[id]->N_bytes, "reconf_new_bearer erab_info -> nas_info rnti 0x%x\n", rnti);
asn1::dyn_octstring octstr(erab_info[id]->N_bytes);
memcpy(octstr.data(), erab_info[id]->msg, erab_info[id]->N_bytes);
conn_reconf->ded_info_nas_list.push_back(octstr);
conn_reconf->ded_info_nas_list_present = true;
}