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