nr,gnb,pdcp: extend the use of local rb_name member to pdcp nr
This commit is contained in:
parent
c64be663d2
commit
dfc2ea0a3e
|
@ -165,6 +165,8 @@ public:
|
||||||
status_report_required == other.status_report_required;
|
status_report_required == other.status_report_required;
|
||||||
}
|
}
|
||||||
bool operator!=(const pdcp_config_t& other) const { return not(*this == other); }
|
bool operator!=(const pdcp_config_t& other) const { return not(*this == other); }
|
||||||
|
|
||||||
|
std::string get_rb_name() const { return (rb_type == PDCP_RB_IS_DRB ? "DRB" : "SRB") + std::to_string(bearer_id); }
|
||||||
};
|
};
|
||||||
|
|
||||||
// Specifies in which direction security (integrity and ciphering) are enabled for PDCP
|
// Specifies in which direction security (integrity and ciphering) are enabled for PDCP
|
||||||
|
|
|
@ -61,8 +61,7 @@ bool pdcp_entity_lte::configure(const pdcp_config_t& cnfg_)
|
||||||
}
|
}
|
||||||
|
|
||||||
cfg = cnfg_;
|
cfg = cnfg_;
|
||||||
rb_name = cfg.rb_type == PDCP_RB_IS_DRB ? "DRB" : "SRB";
|
rb_name = cfg.get_rb_name();
|
||||||
rb_name += std::to_string(cfg.bearer_id);
|
|
||||||
|
|
||||||
maximum_pdcp_sn = (1u << cfg.sn_len) - 1u;
|
maximum_pdcp_sn = (1u << cfg.sn_len) - 1u;
|
||||||
st.last_submitted_pdcp_rx_sn = maximum_pdcp_sn;
|
st.last_submitted_pdcp_rx_sn = maximum_pdcp_sn;
|
||||||
|
|
|
@ -37,7 +37,7 @@ pdcp_entity_nr::~pdcp_entity_nr() {}
|
||||||
// Reestablishment procedure: 38.323 5.2
|
// Reestablishment procedure: 38.323 5.2
|
||||||
void pdcp_entity_nr::reestablish()
|
void pdcp_entity_nr::reestablish()
|
||||||
{
|
{
|
||||||
logger.info("Re-establish %s with bearer ID: %d", rrc->get_rb_name(lcid), cfg.bearer_id);
|
logger.info("Re-establish %s with bearer ID: %d", rb_name.c_str(), cfg.bearer_id);
|
||||||
// TODO
|
// TODO
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -46,13 +46,14 @@ bool pdcp_entity_nr::configure(const pdcp_config_t& cnfg_)
|
||||||
if (active) {
|
if (active) {
|
||||||
// Already configured
|
// Already configured
|
||||||
if (cnfg_ != cfg) {
|
if (cnfg_ != cfg) {
|
||||||
logger.error("Bearer reconfiguration not supported. LCID=%s.", rrc->get_rb_name(lcid));
|
logger.error("Bearer reconfiguration not supported. LCID=%s.", rb_name.c_str());
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
cfg = cnfg_;
|
cfg = cnfg_;
|
||||||
|
rb_name = cfg.get_rb_name();
|
||||||
window_size = 1 << (cfg.sn_len - 1);
|
window_size = 1 << (cfg.sn_len - 1);
|
||||||
|
|
||||||
// Timers
|
// Timers
|
||||||
|
@ -70,7 +71,7 @@ bool pdcp_entity_nr::configure(const pdcp_config_t& cnfg_)
|
||||||
void pdcp_entity_nr::reset()
|
void pdcp_entity_nr::reset()
|
||||||
{
|
{
|
||||||
active = false;
|
active = false;
|
||||||
logger.debug("Reset %s", rrc->get_rb_name(lcid));
|
logger.debug("Reset %s", rb_name.c_str());
|
||||||
}
|
}
|
||||||
|
|
||||||
// SDAP/RRC interface
|
// SDAP/RRC interface
|
||||||
|
@ -80,7 +81,7 @@ void pdcp_entity_nr::write_sdu(unique_byte_buffer_t sdu, int sn)
|
||||||
logger.info(sdu->msg,
|
logger.info(sdu->msg,
|
||||||
sdu->N_bytes,
|
sdu->N_bytes,
|
||||||
"TX %s SDU, integrity=%s, encryption=%s",
|
"TX %s SDU, integrity=%s, encryption=%s",
|
||||||
rrc->get_rb_name(lcid),
|
rb_name.c_str(),
|
||||||
srsran_direction_text[integrity_direction],
|
srsran_direction_text[integrity_direction],
|
||||||
srsran_direction_text[encryption_direction]);
|
srsran_direction_text[encryption_direction]);
|
||||||
|
|
||||||
|
@ -136,7 +137,7 @@ void pdcp_entity_nr::write_pdu(unique_byte_buffer_t pdu)
|
||||||
logger.info(pdu->msg,
|
logger.info(pdu->msg,
|
||||||
pdu->N_bytes,
|
pdu->N_bytes,
|
||||||
"RX %s PDU (%d B), integrity=%s, encryption=%s",
|
"RX %s PDU (%d B), integrity=%s, encryption=%s",
|
||||||
rrc->get_rb_name(lcid),
|
rb_name.c_str(),
|
||||||
pdu->N_bytes,
|
pdu->N_bytes,
|
||||||
srsran_direction_text[integrity_direction],
|
srsran_direction_text[integrity_direction],
|
||||||
srsran_direction_text[encryption_direction]);
|
srsran_direction_text[encryption_direction]);
|
||||||
|
|
Loading…
Reference in New Issue