Commit 98b30ebb authored by aligungr's avatar aligungr

SRA dev.

parent d8e46c67
......@@ -29,6 +29,7 @@ class UeAppTask : public NtsTask
std::array<std::optional<UePduSessionInfo>, 16> m_pduSessions{};
std::array<TunTask *, 16> m_tunTasks{};
ECmState m_cmState{};
friend class UeCmdHandler;
......@@ -44,6 +45,7 @@ class UeAppTask : public NtsTask
private:
void receiveStatusUpdate(NwUeStatusUpdate &msg);
void setupTunInterface(const PduSession *pduSession);
void handleUplinkDataRequest(int psi, OctetString &&data);
};
} // namespace nr::ue
......@@ -154,6 +154,10 @@ void NasMm::switchCmState(ECmState state)
onSwitchCmState(oldState, m_cmState);
auto *statusUpdate = new NwUeStatusUpdate(NwUeStatusUpdate::CM_STATE);
statusUpdate->cmState = m_cmState;
m_base->appTask->push(statusUpdate);
if (m_base->nodeListener)
{
m_base->nodeListener->onSwitch(app::NodeType::UE, m_base->config->getNodeName(), app::StateType::CM,
......
......@@ -186,10 +186,27 @@ struct NwUeNasToApp : NtsMessage
}
};
struct NwUeAppToSra : NtsMessage
{
enum PR
{
DATA_PDU_DELIVERY
} present;
// DATA_PDU_DELIVERY
int psi{};
OctetString pdu{};
explicit NwUeAppToSra(PR present) : NtsMessage(NtsMessageType::UE_APP_TO_SRA), present(present)
{
}
};
struct NwUeStatusUpdate : NtsMessage
{
static constexpr const int SESSION_ESTABLISHMENT = 1;
static constexpr const int SESSION_RELEASE = 2;
static constexpr const int CM_STATE = 3;
const int what{};
......@@ -199,6 +216,9 @@ struct NwUeStatusUpdate : NtsMessage
// SESSION_RELEASE
int psi{};
// CM_STATE
ECmState cmState{};
explicit NwUeStatusUpdate(const int what) : NtsMessage(NtsMessageType::UE_STATUS_UPDATE), what(what)
{
}
......
......@@ -28,7 +28,8 @@ enum class EMessageType : uint8_t
enum class EPduType : uint8_t
{
RESERVED = 0,
RRC
RRC,
DATA
};
struct SraMessage
......
......@@ -40,10 +40,9 @@ enum class NtsMessageType
GNB_NGAP_TO_RRC,
GNB_RRC_TO_NGAP,
GNB_NGAP_TO_GTP,
GNB_GTP_TO_MR,
GNB_SCTP,
UE_APP_TO_MR,
UE_APP_TO_SRA,
UE_APP_TO_TUN,
UE_TUN_TO_APP,
UE_RRC_TO_NAS,
......
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