Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
slapos
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
104
Merge Requests
104
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Jobs
Commits
Open sidebar
nexedi
slapos
Commits
fd55d9cf
Commit
fd55d9cf
authored
Jan 03, 2024
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
aa8759f1
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
32 deletions
+25
-32
software/ors-amarisoft/test/test.py
software/ors-amarisoft/test/test.py
+25
-32
No files found.
software/ors-amarisoft/test/test.py
View file @
fd55d9cf
...
@@ -42,13 +42,18 @@ def yload(path):
...
@@ -42,13 +42,18 @@ def yload(path):
return
yaml
.
load
(
data_
,
Loader
=
yaml
.
Loader
)
return
yaml
.
load
(
data_
,
Loader
=
yaml
.
Loader
)
# ---- building blocks to construct a cell ----
# ---- building blocks to construct cells + peers ----
#
# - TDD/FDD are basic parameters to indicate TDD/FDD mode.
# - LTE/NR return basic parameters for an LTE/NR cell with given downlink frequency.
# - BW returns basic parameters to indicate specified bandwidth.
# - CENB returns basic parameters to indicate a ENB-kind cell.
# - CUE indicates an UE-kind cell.
# - LTE_PEER/NR_PEER indicate an LTE/NR ENB-PEER-kind cell.
# TDD/FDD are basic parameters to indicate TDD/FDD mode.
TDD
=
{
'rf_mode'
:
'tdd'
}
TDD
=
{
'rf_mode'
:
'tdd'
}
FDD
=
{
'rf_mode'
:
'fdd'
}
FDD
=
{
'rf_mode'
:
'fdd'
}
# LTE/NR return basic parameters for an LTE/NR cell with given downlink frequency.
def
LTE
(
dl_earfcn
):
def
LTE
(
dl_earfcn
):
return
{
return
{
'cell_type'
:
'lte'
,
'cell_type'
:
'lte'
,
...
@@ -61,13 +66,11 @@ def NR(dl_nr_arfcn, nr_band):
...
@@ -61,13 +66,11 @@ def NR(dl_nr_arfcn, nr_band):
'nr_band'
:
nr_band
,
'nr_band'
:
nr_band
,
}
}
# BW returns basic parameters to indicate specified bandwidth.
def
BW
(
bandwidth
):
def
BW
(
bandwidth
):
return
{
return
{
'bandwidth'
:
bandwidth
,
'bandwidth'
:
bandwidth
,
}
}
# CENB returns basic parameters to indicate a ENB-kind cell.
def
CENB
(
cell_id
,
pci
,
tac
):
def
CENB
(
cell_id
,
pci
,
tac
):
return
{
return
{
'cell_kind'
:
'enb'
,
'cell_kind'
:
'enb'
,
...
@@ -76,7 +79,8 @@ def CENB(cell_id, pci, tac):
...
@@ -76,7 +79,8 @@ def CENB(cell_id, pci, tac):
'tac'
:
'0x%x'
%
tac
,
'tac'
:
'0x%x'
%
tac
,
}
}
# LTE_PEER/NR_PEER indicate an LTE/NR ENB-PEER-kind cell.
CUE
=
{
'cell_kind'
:
'ue'
}
def
LTE_PEER
(
e_cell_id
,
pci
,
tac
):
def
LTE_PEER
(
e_cell_id
,
pci
,
tac
):
return
{
return
{
'cell_kind'
:
'enb_peer'
,
'cell_kind'
:
'enb_peer'
,
...
@@ -93,36 +97,25 @@ def NR_PEER(nr_cell_id, gnb_id_bits, pci, tac):
...
@@ -93,36 +97,25 @@ def NR_PEER(nr_cell_id, gnb_id_bits, pci, tac):
'tac'
:
321
,
'tac'
:
321
,
}
}
# CUE indicates a UE-kind cell.
CUE
=
{
'cell_kind'
:
'ue'
}
# ----
def
X2_PEER
(
x2_addr
):
return
{
'peer_type'
:
'lte'
,
'x2_addr'
:
x2_addr
,
}
def
Xn_PEER
(
xn_addr
):
return
{
'peer_type'
:
'nr'
,
'xn_addr'
:
xn_addr
,
}
PEER4
=
{
# ----
'peer_type'
:
'lte'
,
'x2_addr'
:
'44.1.1.1'
,
}
PEER4
=
{
'peer_type'
:
'nr'
,
'xn_addr'
:
'55.1.1.1'
,
}
PEERCELL4
=
LTE
(
700
)
|
LTE_PEER
(
0x12345
,
35
,
0x123
)
PEERCELL4
=
LTE
(
700
)
|
LTE_PEER
(
0x12345
,
35
,
0x123
)
PEERCELL5
=
NR
(
520000
,
38
)
|
NR_PEER
(
0x77712
,
28
,
75
,
0x321
)
PEERCELL5
=
NR
(
520000
,
38
)
|
NR_PEER
(
0x77712
,
22
,
75
,
0x321
)
PEERCELL5
=
{
'cell_type'
:
'nr'
,
'cell_kind'
:
'enb_peer'
,
'nr_cell_id'
:
'0x77712'
,
'gnb_id_bits'
:
22
,
'dl_nr_arfcn'
:
520000
,
'nr_band'
:
38
,
'pci'
:
75
,
'tac'
:
321
,
}
# XXX dl_earfcn -> ul_earfcn
# XXX dl_earfcn -> ul_earfcn
# XXX dl_nr_arfcn -> ul_nr_arfcn + ssb_nr_arfcn
# XXX dl_nr_arfcn -> ul_nr_arfcn + ssb_nr_arfcn
...
@@ -169,8 +162,8 @@ class ENBTestCase(AmariTestCase):
...
@@ -169,8 +162,8 @@ class ENBTestCase(AmariTestCase):
def
requestAllShared
(
cls
,
imain
):
def
requestAllShared
(
cls
,
imain
):
def
_
(
subref
,
ctx
):
def
_
(
subref
,
ctx
):
return
cls
.
requestShared
(
imain
,
subref
,
ctx
)
return
cls
.
requestShared
(
imain
,
subref
,
ctx
)
_
(
'PEER4'
,
PEER4
)
_
(
'PEER4'
,
X2_PEER
(
'44.1.1.1'
)
)
_
(
'PEER5'
,
PEER4
)
_
(
'PEER5'
,
Xn_PEER
(
'55.1.1.1'
)
)
_
(
'PEERCELL4'
,
PEERCELL4
)
_
(
'PEERCELL4'
,
PEERCELL4
)
_
(
'PEERCELL5'
,
PEERCELL5
)
_
(
'PEERCELL5'
,
PEERCELL5
)
...
...
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