Commit 2bf7f754 authored by aligungr's avatar aligungr

gNB CLI improvements

parent f7279026
......@@ -10,6 +10,7 @@
#include "rls.hpp"
#include <gnb/nts.hpp>
#include <gnb/types.hpp>
#include <memory>
#include <thread>
#include <udp/server_task.hpp>
......
......@@ -10,7 +10,10 @@
#include <iomanip>
#include <sstream>
std::string nr::gnb::GnbStatusInfo::toString() const
namespace nr::gnb
{
std::string GnbStatusInfo::toString() const
{
std::stringstream ss{};
ss << "is-NGAP-up: ";
......@@ -18,7 +21,7 @@ std::string nr::gnb::GnbStatusInfo::toString() const
return ss.str();
}
std::string nr::gnb::GnbConfig::toString() const
std::string GnbConfig::toString() const
{
std::stringstream ss{};
ss << "nci: " << this->nci << "\n";
......@@ -30,3 +33,20 @@ std::string nr::gnb::GnbConfig::toString() const
ss << "name: " << this->name;
return ss.str();
}
const char *EnumToString(EAmfState v)
{
switch (v)
{
case EAmfState::NOT_CONNECTED:
return "NOT_CONNECTED";
case EAmfState::WAITING_NG_SETUP:
return "WAITING_NG_SETUP";
case EAmfState::CONNECTED:
return "CONNECTED";
default:
return "<?>";
}
}
} // namespace nr::gnb
......@@ -302,4 +302,6 @@ struct MrUeContext
std::string name;
};
const char *EnumToString(EAmfState v);
} // namespace nr::gnb
\ No newline at end of file
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