Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
U
UERANSIM
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Libraries
UERANSIM
Commits
525599a4
Commit
525599a4
authored
May 15, 2021
by
aligungr
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
RRC developments
parent
c2cfdfe0
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
59 additions
and
6 deletions
+59
-6
src/ue/rrc/cells.cpp
src/ue/rrc/cells.cpp
+41
-2
src/ue/rrc/channel.cpp
src/ue/rrc/channel.cpp
+3
-0
src/ue/rrc/rls_sap.cpp
src/ue/rrc/rls_sap.cpp
+0
-1
src/ue/rrc/task.hpp
src/ue/rrc/task.hpp
+10
-3
src/ue/types.hpp
src/ue/types.hpp
+5
-0
No files found.
src/ue/rrc/cells.cpp
View file @
525599a4
...
@@ -9,14 +9,53 @@
...
@@ -9,14 +9,53 @@
#include "task.hpp"
#include "task.hpp"
#include <lib/rrc/encode.hpp>
#include <lib/rrc/encode.hpp>
#include <ue/nas/task.hpp>
#include <ue/nas/task.hpp>
#include <ue/nts.hpp>
namespace
nr
::
ue
namespace
nr
::
ue
{
{
void
UeRrcTask
::
handleCellSignalChange
(
int
cellId
,
int
dbm
)
void
UeRrcTask
::
handleCellSignalChange
(
int
cellId
,
int
dbm
)
{
{
// TODO
bool
considerLost
=
dbm
<
-
120
;
if
(
!
m_cellDesc
.
count
(
cellId
))
{
if
(
!
considerLost
)
notifyCellDetected
(
cellId
,
dbm
);
}
else
{
if
(
considerLost
)
notifyCellLost
(
cellId
);
else
m_cellDesc
[
cellId
].
dbm
=
dbm
;
}
}
void
UeRrcTask
::
notifyCellDetected
(
int
cellId
,
int
dbm
)
{
m_cellDesc
[
cellId
]
=
{};
m_cellDesc
[
cellId
].
dbm
=
dbm
;
m_logger
->
debug
(
"New signal detected for cell[%d], total [%d] cells in coverage"
,
cellId
,
static_cast
<
int
>
(
m_cellDesc
.
size
()));
}
void
UeRrcTask
::
notifyCellLost
(
int
cellId
)
{
if
(
!
m_cellDesc
.
count
(
cellId
))
return
;
m_cellDesc
.
erase
(
cellId
);
m_logger
->
debug
(
"Signal lost for cell[%d], total [%d] cells in coverage"
,
cellId
,
static_cast
<
int
>
(
m_cellDesc
.
size
()));
// TODO: handle other operations
}
bool
UeRrcTask
::
hasSignalToCell
(
int
cellId
)
{
return
m_cellDesc
.
count
(
cellId
);
}
}
}
// namespace nr::ue
}
// namespace nr::ue
src/ue/rrc/channel.cpp
View file @
525599a4
...
@@ -21,6 +21,9 @@ namespace nr::ue
...
@@ -21,6 +21,9 @@ namespace nr::ue
void
UeRrcTask
::
handleDownlinkRrc
(
int
cellId
,
rrc
::
RrcChannel
channel
,
const
OctetString
&
rrcPdu
)
void
UeRrcTask
::
handleDownlinkRrc
(
int
cellId
,
rrc
::
RrcChannel
channel
,
const
OctetString
&
rrcPdu
)
{
{
if
(
!
hasSignalToCell
(
cellId
))
return
;
switch
(
channel
)
switch
(
channel
)
{
{
case
rrc
:
:
RrcChannel
::
BCCH_BCH
:
{
case
rrc
:
:
RrcChannel
::
BCCH_BCH
:
{
...
...
src/ue/rrc/rls_sap.cpp
View file @
525599a4
...
@@ -10,7 +10,6 @@
...
@@ -10,7 +10,6 @@
#include <lib/rrc/encode.hpp>
#include <lib/rrc/encode.hpp>
#include <ue/nas/task.hpp>
#include <ue/nas/task.hpp>
#include <ue/nts.hpp>
#include <ue/nts.hpp>
#include <utils/common.hpp>
namespace
nr
::
ue
namespace
nr
::
ue
{
{
...
...
src/ue/rrc/task.hpp
View file @
525599a4
...
@@ -8,15 +8,17 @@
...
@@ -8,15 +8,17 @@
#pragma once
#pragma once
#include <asn/rrc/ASN_RRC_InitialUE-Identity.h>
#include <memory>
#include <memory>
#include <thread>
#include <thread>
#include <unordered_map>
#include <vector>
#include <ue/nts.hpp>
#include <ue/nts.hpp>
#include <ue/types.hpp>
#include <ue/types.hpp>
#include <unordered_map>
#include <utils/logger.hpp>
#include <utils/logger.hpp>
#include <utils/nts.hpp>
#include <utils/nts.hpp>
#include <vector>
#include <asn/rrc/ASN_RRC_InitialUE-Identity.h>
extern
"C"
extern
"C"
{
{
...
@@ -53,6 +55,8 @@ class UeRrcTask : public NtsTask
...
@@ -53,6 +55,8 @@ class UeRrcTask : public NtsTask
ASN_RRC_InitialUE_Identity_t
m_initialId
{};
ASN_RRC_InitialUE_Identity_t
m_initialId
{};
OctetString
m_initialNasPdu
{};
OctetString
m_initialNasPdu
{};
std
::
unordered_map
<
int
,
UeCellDesc
>
m_cellDesc
{};
friend
class
UeCmdHandler
;
friend
class
UeCmdHandler
;
public:
public:
...
@@ -94,6 +98,9 @@ class UeRrcTask : public NtsTask
...
@@ -94,6 +98,9 @@ class UeRrcTask : public NtsTask
/* Cell Management */
/* Cell Management */
void
handleCellSignalChange
(
int
cellId
,
int
dbm
);
void
handleCellSignalChange
(
int
cellId
,
int
dbm
);
void
notifyCellDetected
(
int
cellId
,
int
dbm
);
void
notifyCellLost
(
int
cellId
);
bool
hasSignalToCell
(
int
cellId
);
};
};
}
// namespace nr::ue
}
// namespace nr::ue
src/ue/types.hpp
View file @
525599a4
...
@@ -29,6 +29,11 @@ class UeRrcTask;
...
@@ -29,6 +29,11 @@ class UeRrcTask;
class
UeRlsTask
;
class
UeRlsTask
;
class
UserEquipment
;
class
UserEquipment
;
struct
UeCellDesc
{
int
dbm
{};
};
struct
SupportedAlgs
struct
SupportedAlgs
{
{
bool
nia1
=
true
;
bool
nia1
=
true
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment