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
a60627dc
Commit
a60627dc
authored
Apr 04, 2021
by
aligungr
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
UE SRA dev.
parent
e9ec142c
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
18 additions
and
15 deletions
+18
-15
src/gnb/sra/handler.cpp
src/gnb/sra/handler.cpp
+1
-1
src/gnb/sra/task.cpp
src/gnb/sra/task.cpp
+2
-1
src/gnb/sra/task.hpp
src/gnb/sra/task.hpp
+2
-0
src/ue/sra/measurement.cpp
src/ue/sra/measurement.cpp
+1
-1
src/ue/sra/transport.cpp
src/ue/sra/transport.cpp
+1
-2
src/urs/sra_pdu.cpp
src/urs/sra_pdu.cpp
+6
-5
src/urs/sra_pdu.hpp
src/urs/sra_pdu.hpp
+5
-5
No files found.
src/gnb/sra/handler.cpp
View file @
a60627dc
...
...
@@ -35,7 +35,7 @@ void GnbSraTask::handleCellInfoRequest(const InetAddress &addr, const sra::SraCe
return
;
}
sra
::
SraCellInfoResponse
resp
{};
sra
::
SraCellInfoResponse
resp
{
m_sti
};
resp
.
cellId
.
nci
=
m_base
->
config
->
nci
;
resp
.
cellId
.
plmn
=
m_base
->
config
->
plmn
;
resp
.
tac
=
m_base
->
config
->
tac
;
...
...
src/gnb/sra/task.cpp
View file @
a60627dc
...
...
@@ -10,6 +10,7 @@
#include <gnb/gtp/task.hpp>
#include <gnb/nts.hpp>
#include <gnb/rrc/task.hpp>
#include <utils/common.hpp>
#include <utils/constants.hpp>
#include <utils/libc_error.hpp>
...
...
@@ -19,6 +20,7 @@ namespace nr::gnb
GnbSraTask
::
GnbSraTask
(
TaskBase
*
base
)
:
m_base
{
base
},
m_udpTask
{}
{
m_logger
=
m_base
->
logBase
->
makeUniqueLogger
(
"sra"
);
m_sti
=
utils
::
Random64
();
}
void
GnbSraTask
::
onStart
()
...
...
@@ -70,5 +72,4 @@ void GnbSraTask::onQuit()
delete
m_udpTask
;
}
}
// namespace nr::gnb
src/gnb/sra/task.hpp
View file @
a60627dc
...
...
@@ -30,6 +30,8 @@ class GnbSraTask : public NtsTask
std
::
unique_ptr
<
Logger
>
m_logger
;
udp
::
UdpServerTask
*
m_udpTask
;
uint64_t
m_sti
;
friend
class
GnbCmdHandler
;
public:
...
...
src/ue/sra/measurement.cpp
View file @
a60627dc
...
...
@@ -41,7 +41,7 @@ void UeSraTask::onMeasurement()
// Issue another cell info request for each address in the search space
for
(
auto
&
ip
:
m_cellSearchSpace
)
{
sra
::
SraCellInfoRequest
req
{};
sra
::
SraCellInfoRequest
req
{
m_sti
};
sendSraMessage
(
ip
,
req
);
}
}
...
...
src/ue/sra/transport.cpp
View file @
a60627dc
...
...
@@ -41,8 +41,7 @@ void UeSraTask::deliverUplinkPdu(sra::EPduType pduType, OctetString &&pdu, Octet
return
;
}
sra
::
SraPduDelivery
msg
{};
msg
.
sti
=
m_sti
;
sra
::
SraPduDelivery
msg
{
m_sti
};
msg
.
pduType
=
pduType
;
msg
.
pdu
=
std
::
move
(
pdu
);
msg
.
payload
=
std
::
move
(
payload
);
...
...
src/urs/sra_pdu.cpp
View file @
a60627dc
...
...
@@ -50,6 +50,7 @@ void EncodeSraMessage(const SraMessage &msg, OctetString &stream)
stream
.
appendOctet
(
cons
::
Minor
);
stream
.
appendOctet
(
cons
::
Patch
);
stream
.
appendOctet
(
static_cast
<
uint8_t
>
(
msg
.
msgType
));
stream
.
appendOctet8
(
msg
.
sti
);
if
(
msg
.
msgType
==
EMessageType
::
CELL_INFO_REQUEST
)
{
auto
&
m
=
(
const
SraCellInfoRequest
&
)
msg
;
...
...
@@ -71,7 +72,6 @@ void EncodeSraMessage(const SraMessage &msg, OctetString &stream)
else
if
(
msg
.
msgType
==
EMessageType
::
PDU_DELIVERY
)
{
auto
&
m
=
(
const
SraPduDelivery
&
)
msg
;
stream
.
appendOctet8
(
m
.
sti
);
stream
.
appendOctet
(
static_cast
<
uint8_t
>
(
m
.
pduType
));
stream
.
appendOctet4
(
m
.
pdu
.
length
());
stream
.
append
(
m
.
pdu
);
...
...
@@ -94,9 +94,11 @@ std::unique_ptr<SraMessage> DecodeSraMessage(const OctetView &stream)
return
nullptr
;
auto
msgType
=
static_cast
<
EMessageType
>
(
stream
.
readI
());
uint64_t
sti
=
stream
.
read8UL
();
if
(
msgType
==
EMessageType
::
CELL_INFO_REQUEST
)
{
auto
res
=
std
::
make_unique
<
SraCellInfoRequest
>
();
auto
res
=
std
::
make_unique
<
SraCellInfoRequest
>
(
sti
);
res
->
simPos
.
x
=
stream
.
read4I
();
res
->
simPos
.
y
=
stream
.
read4I
();
res
->
simPos
.
z
=
stream
.
read4I
();
...
...
@@ -104,7 +106,7 @@ std::unique_ptr<SraMessage> DecodeSraMessage(const OctetView &stream)
}
else
if
(
msgType
==
EMessageType
::
CELL_INFO_RESPONSE
)
{
auto
res
=
std
::
make_unique
<
SraCellInfoResponse
>
();
auto
res
=
std
::
make_unique
<
SraCellInfoResponse
>
(
sti
);
res
->
cellId
=
DecodeGlobalNci
(
stream
);
res
->
tac
=
stream
.
read4I
();
res
->
dbm
=
stream
.
read4I
();
...
...
@@ -114,8 +116,7 @@ std::unique_ptr<SraMessage> DecodeSraMessage(const OctetView &stream)
}
else
if
(
msgType
==
EMessageType
::
PDU_DELIVERY
)
{
auto
res
=
std
::
make_unique
<
SraPduDelivery
>
();
res
->
sti
=
stream
.
read8UL
();
auto
res
=
std
::
make_unique
<
SraPduDelivery
>
(
sti
);
res
->
pduType
=
static_cast
<
EPduType
>
(
stream
.
readI
());
res
->
pdu
=
stream
.
readOctetString
(
stream
.
read4I
());
res
->
payload
=
stream
.
readOctetString
(
stream
.
read4I
());
...
...
src/urs/sra_pdu.hpp
View file @
a60627dc
...
...
@@ -34,8 +34,9 @@ enum class EPduType : uint8_t
struct
SraMessage
{
const
EMessageType
msgType
;
const
uint64_t
sti
{};
explicit
SraMessage
(
EMessageType
msgType
)
:
msgType
(
msgType
)
explicit
SraMessage
(
EMessageType
msgType
,
uint64_t
sti
)
:
msgType
(
msgType
),
sti
(
sti
)
{
}
};
...
...
@@ -44,7 +45,7 @@ struct SraCellInfoRequest : SraMessage
{
Vector3
simPos
{};
SraCellInfoRequest
()
:
SraMessage
(
EMessageType
::
CELL_INFO_REQUEST
)
explicit
SraCellInfoRequest
(
uint64_t
sti
)
:
SraMessage
(
EMessageType
::
CELL_INFO_REQUEST
,
sti
)
{
}
};
...
...
@@ -57,19 +58,18 @@ struct SraCellInfoResponse : SraMessage
std
::
string
gnbName
{};
std
::
string
linkIp
{};
SraCellInfoResponse
()
:
SraMessage
(
EMessageType
::
CELL_INFO_RESPONSE
)
explicit
SraCellInfoResponse
(
uint64_t
sti
)
:
SraMessage
(
EMessageType
::
CELL_INFO_RESPONSE
,
sti
)
{
}
};
struct
SraPduDelivery
:
SraMessage
{
uint64_t
sti
{};
EPduType
pduType
{};
OctetString
pdu
{};
OctetString
payload
{};
SraPduDelivery
()
:
SraMessage
(
EMessageType
::
PDU_DELIVERY
)
explicit
SraPduDelivery
(
uint64_t
sti
)
:
SraMessage
(
EMessageType
::
PDU_DELIVERY
,
sti
)
{
}
};
...
...
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