Commit 3c59c697 authored by Tien-Thinh Nguyen's avatar Tien-Thinh Nguyen

Update statistic display

parent 7807ba9a
......@@ -692,7 +692,9 @@ void amf_n1::service_request_handle(
} else {
// TODO: Contact SMF to activate UP for these sessions
// DO for 1st PDU session ID for now
// TODO: modify itti_initial_context_setup_request for supporting multiple
// PDU sessions
std::shared_ptr<pdu_session_context> psc = {};
serApt->setPDU_session_status(serReq->getPduSessionStatus());
......@@ -725,14 +727,14 @@ void amf_n1::service_request_handle(
itti_msg->nas = protectedNas;
itti_msg->kgnb = kgnb_bs;
itti_msg->is_sr = true; // service request indicator
itti_msg->pdu_session_id = 1; // PSI 1, should be updated
itti_msg->pdu_session_id = pdu_session_id;
itti_msg->is_pdu_exist = true;
if (psc.get()->isn2sm_avaliable) {
itti_msg->n2sm = psc.get()->n2sm;
itti_msg->isn2sm_avaliable = true;
} else {
itti_msg->isn2sm_avaliable = false;
Logger::amf_n1().error("Cannot get pdu session information");
Logger::amf_n1().error("Cannot get PDU session information");
}
std::shared_ptr<itti_initial_context_setup_request> i =
std::shared_ptr<itti_initial_context_setup_request>(itti_msg);
......
......@@ -56,8 +56,9 @@ void statistics::display() {
" | %s, %s | ",
i, gnb.second.gnb_id, gnb.second.gnb_name.c_str(),
gnb.second.mcc.c_str(), gnb.second.mnc.c_str());
Logger::amf_app().info(
"| Supported TA list %s|", gnb.second.plmn_to_string().c_str());
// Comment out to show the supported TA list
// Logger::amf_app().info(
// "| Supported TA list: %s|", gnb.second.plmn_to_string().c_str());
i++;
}
......
......@@ -46,19 +46,17 @@ typedef struct {
// long nrCellId;
std::string plmn_to_string() const {
std::string s = {};
// s.append("PLMN List: ");
for (auto supported_item : plmn_list) {
s.append("TAC " + std::to_string(supported_item.tac));
s.append(", PLMN ");
for (auto plmn_slice : supported_item.b_plmn_list) {
s.append("(MCC " + plmn_slice.mcc);
s.append("( MCC " + plmn_slice.mcc);
s.append(", MNC " + plmn_slice.mnc);
for (auto slice : plmn_slice.slice_list) {
s.append(" (SST " + slice.sst + ", SD " + slice.sd + "), ");
s.append("(SST " + slice.sst + ", SD " + slice.sd + "),");
}
s.append("),");
s.append(")");
}
s.append("), ");
s.append("),");
}
return s;
}
......
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