Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
OpenXG-RAN
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
Michael Black
OpenXG-RAN
Commits
e3878906
Commit
e3878906
authored
Dec 31, 2022
by
General ABS
Committed by
rmagueta
Jun 06, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Implementation of L3 measurement filtering
parent
6050c55a
Changes
5
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
279 additions
and
69 deletions
+279
-69
openair2/LAYER2/NR_MAC_UE/config_ue.c
openair2/LAYER2/NR_MAC_UE/config_ue.c
+7
-0
openair2/LAYER2/NR_MAC_UE/mac_proto.h
openair2/LAYER2/NR_MAC_UE/mac_proto.h
+2
-0
openair2/RRC/NR/MESSAGES/asn1_msg.c
openair2/RRC/NR/MESSAGES/asn1_msg.c
+47
-29
openair2/RRC/NR_UE/rrc_UE.c
openair2/RRC/NR_UE/rrc_UE.c
+203
-40
openair2/RRC/NR_UE/rrc_defs.h
openair2/RRC/NR_UE/rrc_defs.h
+20
-0
No files found.
openair2/LAYER2/NR_MAC_UE/config_ue.c
View file @
e3878906
...
...
@@ -848,3 +848,10 @@ void nr_rrc_mac_config_req_scg(module_id_t module_id,
// Setup the SSB to Rach Occasions mapping according to the config
build_ssb_to_ro_map
(
mac
);
}
void
nr_rrc_mac_config_req_meas
(
module_id_t
module_id
,
const
NR_MeasConfig_t
*
measConfig
)
{
NR_UE_MAC_INST_t
*
mac
=
get_mac_inst
(
module_id
);
config_measConfig
(
mac
,
measConfig
);
mac
->
if_module
->
phy_config_request
(
&
mac
->
phy_config
);
}
\ No newline at end of file
openair2/LAYER2/NR_MAC_UE/mac_proto.h
View file @
e3878906
...
...
@@ -112,6 +112,8 @@ void nr_rrc_mac_config_req_sib1(module_id_t module_id,
int
cc_idP
,
NR_ServingCellConfigCommonSIB_t
*
scc
);
void
nr_rrc_mac_config_req_meas
(
module_id_t
module_id
,
const
NR_MeasConfig_t
*
measConfig
);
/**\brief initialization NR UE MAC instance(s), total number of MAC instance based on NB_NR_UE_MAC_INST*/
NR_UE_MAC_INST_t
*
nr_l2_init_ue
(
NR_UE_RRC_INST_t
*
rrc_inst
);
...
...
openair2/RRC/NR/MESSAGES/asn1_msg.c
View file @
e3878906
...
...
@@ -1001,52 +1001,70 @@ uint8_t do_RRCSetupComplete(uint8_t Mod_id, uint8_t *buffer, size_t buffer_size,
return
((
enc_rval
.
encoded
+
7
)
/
8
);
}
// TODO:
Improve this function that is all hardcoded
uint16_t
do_nrMeasurementReport_SA
(
NR_MeasurementReport_t
*
measurementReport
,
uint8_t
*
buffer
,
size_t
buffer_size
,
uint8_t
rsrp_s
)
{
// TODO:
This function is only implemented for event A3
uint16_t
do_nrMeasurementReport_SA
(
NR_MeasurementReport_t
*
measurementReport
,
l3_measurements_t
*
l3_measurements
,
uint8_t
*
buffer
,
size_t
buffer_size
)
{
asn_enc_rval_t
enc_rval
;
NR_UL_DCCH_Message_t
ul_dcch_msg
;
memset
((
void
*
)
&
ul_dcch_msg
,
0
,
sizeof
(
NR_UL_DCCH_Message_t
));
NR_UL_DCCH_Message_t
ul_dcch_msg
;
memset
((
void
*
)
&
ul_dcch_msg
,
0
,
sizeof
(
NR_UL_DCCH_Message_t
));
ul_dcch_msg
.
message
.
present
=
NR_UL_DCCH_MessageType_PR_c1
;
ul_dcch_msg
.
message
.
choice
.
c1
=
CALLOC
(
1
,
sizeof
(
struct
NR_UL_DCCH_MessageType__c1
));
ul_dcch_msg
.
message
.
choice
.
c1
=
CALLOC
(
1
,
sizeof
(
struct
NR_UL_DCCH_MessageType__c1
));
ul_dcch_msg
.
message
.
choice
.
c1
->
present
=
NR_UL_DCCH_MessageType__c1_PR_measurementReport
;
memset
(
measurementReport
,
0
,
sizeof
(
struct
NR_MeasurementReport
));
ul_dcch_msg
.
message
.
choice
.
c1
->
choice
.
measurementReport
=
measurementReport
;
measurementReport
->
criticalExtensions
.
present
=
NR_MeasurementReport__criticalExtensions_PR_measurementReport
;
NR_MeasurementReport_IEs_t
*
measurementReport_ie
=
CALLOC
(
1
,
sizeof
(
struct
NR_MeasurementReport_IEs
));
NR_MeasurementReport_IEs_t
*
measurementReport_ie
=
CALLOC
(
1
,
sizeof
(
struct
NR_MeasurementReport_IEs
));
measurementReport
->
criticalExtensions
.
choice
.
measurementReport
=
measurementReport_ie
;
measurementReport_ie
->
measResults
.
measId
=
3
;
NR_MeasResultServMO_t
*
measResultServMo
=
CALLOC
(
1
,
sizeof
(
struct
NR_MeasResultServMO
));
measResultServMo
->
measResultServingCell
.
physCellId
=
CALLOC
(
1
,
sizeof
(
NR_PhysCellId_t
));
*
measResultServMo
->
measResultServingCell
.
physCellId
=
0
;
measResultServMo
->
measResultServingCell
.
measResult
.
cellResults
.
resultsCSI_RS_Cell
=
CALLOC
(
1
,
sizeof
(
struct
NR_MeasQuantityResults
));
measResultServMo
->
measResultServingCell
.
measResult
.
cellResults
.
resultsCSI_RS_Cell
->
rsrp
=
CALLOC
(
1
,
sizeof
(
NR_RSRP_Range_t
));
*
measResultServMo
->
measResultServingCell
.
measResult
.
cellResults
.
resultsCSI_RS_Cell
->
rsrp
=
rsrp_s
-
10
;
// FIXME: This -10 is just to trigger the HO
measResultServMo
->
measResultBestNeighCell
=
CALLOC
(
1
,
sizeof
(
struct
NR_MeasResultNR
));
measResultServMo
->
measResultBestNeighCell
->
measResult
.
cellResults
.
resultsCSI_RS_Cell
=
CALLOC
(
1
,
sizeof
(
struct
NR_MeasQuantityResults
));
measResultServMo
->
measResultBestNeighCell
->
measResult
.
cellResults
.
resultsCSI_RS_Cell
->
rsrp
=
CALLOC
(
1
,
sizeof
(
NR_RSRP_Range_t
));
*
measResultServMo
->
measResultBestNeighCell
->
measResult
.
cellResults
.
resultsCSI_RS_Cell
->
rsrp
=
rsrp_s
;
// FIXME
measurementReport_ie
->
measResults
.
measId
=
l3_measurements
->
trigger_to_measid
;
NR_MeasResultServMO_t
*
measResultServMo
=
CALLOC
(
1
,
sizeof
(
struct
NR_MeasResultServMO
));
meas_t
*
active_cell
=
&
l3_measurements
->
active_cell
;
NR_MeasResultNR_t
*
measResultServingCell
=
&
measResultServMo
->
measResultServingCell
;
measResultServingCell
->
physCellId
=
CALLOC
(
1
,
sizeof
(
NR_PhysCellId_t
));
*
measResultServingCell
->
physCellId
=
active_cell
->
Nid_cell
;
meas_t
*
neighboring_cell
=
&
l3_measurements
->
neighboring_cell
[
0
];
struct
NR_MeasResultNR
*
measResultBestNeighCell
=
CALLOC
(
1
,
sizeof
(
struct
NR_MeasResultNR
));
measResultServMo
->
measResultBestNeighCell
=
measResultBestNeighCell
;
measResultBestNeighCell
->
physCellId
=
CALLOC
(
1
,
sizeof
(
NR_PhysCellId_t
));
*
measResultBestNeighCell
->
physCellId
=
neighboring_cell
->
Nid_cell
;
struct
NR_MeasQuantityResults
*
active_mq_res
=
CALLOC
(
1
,
sizeof
(
struct
NR_MeasQuantityResults
));
struct
NR_MeasQuantityResults
*
neighboring_mq_res
=
CALLOC
(
1
,
sizeof
(
struct
NR_MeasQuantityResults
));
if
(
l3_measurements
->
trigger_quantity
==
NR_MeasTriggerQuantityOffset_PR_rsrp
)
{
active_mq_res
->
rsrp
=
CALLOC
(
1
,
sizeof
(
NR_RSRP_Range_t
));
neighboring_mq_res
->
rsrp
=
CALLOC
(
1
,
sizeof
(
NR_RSRP_Range_t
));
if
(
l3_measurements
->
rs_type
==
NR_NR_RS_Type_ssb
)
{
*
active_mq_res
->
rsrp
=
active_cell
->
ss_rsrp_dBm
+
157
;
measResultServingCell
->
measResult
.
cellResults
.
resultsSSB_Cell
=
active_mq_res
;
*
neighboring_mq_res
->
rsrp
=
neighboring_cell
->
ss_rsrp_dBm
+
157
;
measResultServMo
->
measResultBestNeighCell
->
measResult
.
cellResults
.
resultsSSB_Cell
=
neighboring_mq_res
;
}
else
{
*
active_mq_res
->
rsrp
=
active_cell
->
csi_rsrp_dBm
+
157
;
measResultServingCell
->
measResult
.
cellResults
.
resultsCSI_RS_Cell
=
active_mq_res
;
*
neighboring_mq_res
->
rsrp
=
neighboring_cell
->
csi_rsrp_dBm
+
157
;
measResultServMo
->
measResultBestNeighCell
->
measResult
.
cellResults
.
resultsCSI_RS_Cell
=
neighboring_mq_res
;
}
}
ASN_SEQUENCE_ADD
(
&
measurementReport_ie
->
measResults
.
measResultServingMOList
.
list
,
measResultServMo
);
xer_fprint
(
stdout
,
&
asn_DEF_NR_UL_DCCH_Message
,
(
void
*
)
&
ul_dcch_msg
);
enc_rval
=
uper_encode_to_buffer
(
&
asn_DEF_NR_UL_DCCH_Message
,
NULL
,
(
void
*
)
&
ul_dcch_msg
,
buffer
,
buffer_size
);
enc_rval
=
uper_encode_to_buffer
(
&
asn_DEF_NR_UL_DCCH_Message
,
NULL
,
(
void
*
)
&
ul_dcch_msg
,
buffer
,
buffer_size
);
AssertFatal
(
enc_rval
.
encoded
>
0
,
"ASN1 message encoding failed (%s, %lu)!
\n
"
,
enc_rval
.
failed_type
->
name
,
enc_rval
.
encoded
);
AssertFatal
(
enc_rval
.
encoded
>
0
,
"ASN1 message encoding failed (%s, %lu)!
\n
"
,
enc_rval
.
failed_type
->
name
,
enc_rval
.
encoded
);
LOG_I
(
NR_RRC
,
"MeasurementReport Encoded %zd bits (%zd bytes)
\n
"
,
enc_rval
.
encoded
,
(
enc_rval
.
encoded
+
7
)
/
8
);
LOG_I
(
NR_RRC
,
"MeasurementReport Encoded %zd bits (%zd bytes)
\n
"
,
enc_rval
.
encoded
,
(
enc_rval
.
encoded
+
7
)
/
8
);
return
((
enc_rval
.
encoded
+
7
)
/
8
);
return
((
enc_rval
.
encoded
+
7
)
/
8
);
}
//------------------------------------------------------------------------------
...
...
openair2/RRC/NR_UE/rrc_UE.c
View file @
e3878906
This diff is collapsed.
Click to expand it.
openair2/RRC/NR_UE/rrc_defs.h
View file @
e3878906
...
...
@@ -172,6 +172,8 @@ typedef struct NR_UE_Timers_Constants_s {
// counters
uint32_t
N310_cnt
;
uint32_t
N311_cnt
;
uint32_t
slots_to_trigger_active
;
uint32_t
slots_to_trigger_cnt
;
// constants (limits configured by the network)
uint32_t
N310_k
;
uint32_t
N311_k
;
...
...
@@ -183,6 +185,23 @@ typedef struct NR_UE_Timers_Constants_s {
uint32_t
T319_k
;
}
NR_UE_Timers_Constants_t
;
typedef
struct
meas_s
{
uint16_t
Nid_cell
;
int
ss_rsrp_dBm
;
bool
ss_rsrp_dBm_initialized
;
int
csi_rsrp_dBm
;
bool
csi_rsrp_dBm_initialized
;
}
meas_t
;
typedef
struct
l3_measurements_s
{
double
filter_coeff_rsrp
;
meas_t
active_cell
;
meas_t
neighboring_cell
[
1
];
long
trigger_to_measid
;
long
trigger_quantity
;
long
rs_type
;
}
l3_measurements_t
;
typedef
struct
NR_UE_RRC_INST_s
{
NR_MeasConfig_t
*
meas_config
;
...
...
@@ -191,6 +210,7 @@ typedef struct NR_UE_RRC_INST_s {
NR_CellGroupConfig_t
*
scell_group_config
;
NR_RadioBearerConfig_t
*
radio_bearer_config
;
NR_MeasurementReport_t
*
measurementReport
;
l3_measurements_t
l3_measurements
;
NR_MeasObjectToAddMod_t
*
MeasObj
[
NB_CNX_UE
][
MAX_MEAS_OBJ
];
NR_ReportConfigToAddMod_t
*
ReportConfig
[
NB_CNX_UE
][
MAX_MEAS_CONFIG
];
...
...
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