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
lizhongxiao
OpenXG-RAN
Commits
d4b1e7b5
Commit
d4b1e7b5
authored
Feb 12, 2024
by
francescomani
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
improvements in handling measurememt identity addition, modification and removal
parent
eeca8f9f
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
82 additions
and
52 deletions
+82
-52
openair2/RRC/NR_UE/rrc_UE.c
openair2/RRC/NR_UE/rrc_UE.c
+81
-52
openair2/RRC/NR_UE/rrc_defs.h
openair2/RRC/NR_UE/rrc_defs.h
+1
-0
No files found.
openair2/RRC/NR_UE/rrc_UE.c
View file @
d4b1e7b5
...
...
@@ -152,7 +152,7 @@ static void nr_rrc_ue_process_masterCellGroup(NR_UE_RRC_INST_t *rrc,
OCTET_STRING_t
*
masterCellGroup
,
long
*
fullConfig
);
static
void
nr_rrc_ue_process_measConfig
(
rrcPerNB_t
*
rrc
,
NR_MeasConfig_t
*
const
measConfig
);
static
void
nr_rrc_ue_process_measConfig
(
rrcPerNB_t
*
rrc
,
NR_MeasConfig_t
*
const
measConfig
,
NR_UE_Timers_Constants_t
*
timers
);
static
void
nr_rrc_ue_process_rrcReconfiguration
(
NR_UE_RRC_INST_t
*
rrc
,
int
gNB_index
,
...
...
@@ -221,8 +221,7 @@ static void nr_rrc_ue_process_rrcReconfiguration(NR_UE_RRC_INST_t *rrc,
}
if
(
ie
->
measConfig
!=
NULL
)
{
LOG_I
(
NR_RRC
,
"Measurement Configuration is present
\n
"
);
// if some element need to be updated
nr_rrc_ue_process_measConfig
(
rrcNB
,
ie
->
measConfig
);
nr_rrc_ue_process_measConfig
(
rrcNB
,
ie
->
measConfig
,
&
rrc
->
timers_and_constants
);
}
if
(
ie
->
lateNonCriticalExtension
!=
NULL
)
{
// unuse now
...
...
@@ -1044,7 +1043,16 @@ static void nr_rrc_ue_process_securityModeCommand(NR_UE_RRC_INST_t *ue_rrc,
securityModeCommand
->
criticalExtensions
.
present
);
}
static
void
handle_measobj_remove
(
rrcPerNB_t
*
rrc
,
struct
NR_MeasObjectToRemoveList
*
remove_list
)
static
void
handle_meas_reporting_remove
(
rrcPerNB_t
*
rrc
,
int
id
,
NR_UE_Timers_Constants_t
*
timers
)
{
// remove the measurement reporting entry for this measId if included
asn1cFreeStruc
(
asn_DEF_NR_VarMeasReport
,
rrc
->
MeasReport
[
id
]);
// TODO stop the periodical reporting timer or timer T321, whichever is running,
// and reset the associated information (e.g. timeToTrigger) for this measId
nr_timer_stop
(
&
timers
->
T321
);
}
static
void
handle_measobj_remove
(
rrcPerNB_t
*
rrc
,
struct
NR_MeasObjectToRemoveList
*
remove_list
,
NR_UE_Timers_Constants_t
*
timers
)
{
// section 5.5.2.4 in 38.331
for
(
int
i
=
0
;
i
<
remove_list
->
list
.
count
;
i
++
)
{
...
...
@@ -1058,10 +1066,7 @@ static void handle_measobj_remove(rrcPerNB_t *rrc, struct NR_MeasObjectToRemoveL
for
(
int
j
=
0
;
j
<
MAX_MEAS_ID
;
j
++
)
{
if
(
rrc
->
MeasId
[
j
]
&&
rrc
->
MeasId
[
j
]
->
measObjectId
==
id
)
{
asn1cFreeStruc
(
asn_DEF_NR_MeasIdToAddMod
,
rrc
->
MeasId
[
j
]);
// remove the measurement reporting entry for this measId if included
asn1cFreeStruc
(
asn_DEF_NR_VarMeasReport
,
rrc
->
MeasReport
[
j
]);
// TODO stop the periodical reporting timer or timer T321, whichever is running,
// and reset the associated information (e.g. timeToTrigger) for this measId
handle_meas_reporting_remove
(
rrc
,
j
,
timers
);
}
}
}
...
...
@@ -1148,7 +1153,9 @@ static void handle_measobj_addmod(rrcPerNB_t *rrc, struct NR_MeasObjectToAddModL
}
}
static
void
handle_reportconfig_remove
(
rrcPerNB_t
*
rrc
,
struct
NR_ReportConfigToRemoveList
*
remove_list
)
static
void
handle_reportconfig_remove
(
rrcPerNB_t
*
rrc
,
struct
NR_ReportConfigToRemoveList
*
remove_list
,
NR_UE_Timers_Constants_t
*
timers
)
{
for
(
int
i
=
0
;
i
<
remove_list
->
list
.
count
;
i
++
)
{
NR_ReportConfigId_t
id
=
*
remove_list
->
list
.
array
[
i
];
...
...
@@ -1158,16 +1165,15 @@ static void handle_reportconfig_remove(rrcPerNB_t *rrc, struct NR_ReportConfigTo
if
(
rrc
->
MeasId
[
j
]
&&
rrc
->
MeasId
[
j
]
->
reportConfigId
==
id
)
{
// remove all measId associated with the reportConfigId from the measIdList
asn1cFreeStruc
(
asn_DEF_NR_MeasIdToAddMod
,
rrc
->
MeasId
[
j
]);
// remove the measurement reporting entry for this measId if included
asn1cFreeStruc
(
asn_DEF_NR_VarMeasReport
,
rrc
->
MeasReport
[
j
]);
// TODO stop the periodical reporting timer or timer T321, whichever one is running
// and reset the associated information (e.g. timeToTrigger) for this measId
handle_meas_reporting_remove
(
rrc
,
j
,
timers
);
}
}
}
}
static
void
handle_reportconfig_addmod
(
rrcPerNB_t
*
rrc
,
struct
NR_ReportConfigToAddModList
*
addmod_list
)
static
void
handle_reportconfig_addmod
(
rrcPerNB_t
*
rrc
,
struct
NR_ReportConfigToAddModList
*
addmod_list
,
NR_UE_Timers_Constants_t
*
timers
)
{
for
(
int
i
=
0
;
i
<
addmod_list
->
list
.
count
;
i
++
)
{
NR_ReportConfigToAddMod_t
*
rep
=
addmod_list
->
list
.
array
[
i
];
...
...
@@ -1179,19 +1185,15 @@ static void handle_reportconfig_addmod(rrcPerNB_t *rrc, struct NR_ReportConfigTo
if
(
rrc
->
ReportConfig
[
id
])
{
for
(
int
j
=
0
;
j
<
MAX_MEAS_ID
;
j
++
)
{
// for each measId associated with this reportConfigId included in the measIdList
if
(
rrc
->
MeasId
[
j
]
&&
rrc
->
MeasId
[
j
]
->
reportConfigId
==
id
)
{
// remove the measurement reporting entry for this measId if included
asn1cFreeStruc
(
asn_DEF_NR_VarMeasReport
,
rrc
->
MeasReport
[
j
]);
// TODO stop the periodical reporting timer or timer T321, whichever one is running
// and reset the associated information (e.g. timeToTrigger) for this measId
}
if
(
rrc
->
MeasId
[
j
]
&&
rrc
->
MeasId
[
j
]
->
reportConfigId
==
id
)
handle_meas_reporting_remove
(
rrc
,
j
,
timers
);
}
}
UPDATE_IE
(
rrc
->
ReportConfig
[
id
],
addmod_list
->
list
.
array
[
i
],
NR_ReportConfigToAddMod_t
);
}
}
static
void
handle_quantityconfig
(
rrcPerNB_t
*
rrc
,
NR_QuantityConfig_t
*
quantityConfig
)
static
void
handle_quantityconfig
(
rrcPerNB_t
*
rrc
,
NR_QuantityConfig_t
*
quantityConfig
,
NR_UE_Timers_Constants_t
*
timers
)
{
if
(
quantityConfig
->
quantityConfigNR_List
)
{
for
(
int
i
=
0
;
i
<
quantityConfig
->
quantityConfigNR_List
->
list
.
count
;
i
++
)
{
...
...
@@ -1205,55 +1207,82 @@ static void handle_quantityconfig(rrcPerNB_t *rrc, NR_QuantityConfig_t *quantity
}
for
(
int
j
=
0
;
j
<
MAX_MEAS_ID
;
j
++
)
{
// for each measId included in the measIdList
if
(
rrc
->
MeasId
[
j
])
{
// remove the measurement reporting entry for this measId if included
asn1cFreeStruc
(
asn_DEF_NR_VarMeasReport
,
rrc
->
MeasReport
[
j
]);
// TODO stop the periodical reporting timer or timer T321, whichever one is running
// and reset the associated information (e.g. timeToTrigger) for this measId
if
(
rrc
->
MeasId
[
j
])
handle_meas_reporting_remove
(
rrc
,
j
,
timers
);
}
}
static
void
handle_measid_remove
(
rrcPerNB_t
*
rrc
,
struct
NR_MeasIdToRemoveList
*
remove_list
,
NR_UE_Timers_Constants_t
*
timers
)
{
for
(
int
i
=
0
;
i
<
remove_list
->
list
.
count
;
i
++
)
{
NR_MeasId_t
id
=
*
remove_list
->
list
.
array
[
i
];
if
(
rrc
->
MeasId
[
id
])
{
asn1cFreeStruc
(
asn_DEF_NR_MeasIdToAddMod
,
rrc
->
MeasId
[
id
]);
handle_meas_reporting_remove
(
rrc
,
id
,
timers
);
}
}
}
static
void
nr_rrc_ue_process_measConfig
(
rrcPerNB_t
*
rrc
,
NR_MeasConfig_t
*
const
measConfig
)
static
void
handle_measid_addmod
(
rrcPerNB_t
*
rrc
,
struct
NR_MeasIdToAddModList
*
addmod_list
,
NR_UE_Timers_Constants_t
*
timers
)
{
int
i
;
long
ind
;
for
(
int
i
=
0
;
i
<
addmod_list
->
list
.
count
;
i
++
)
{
NR_MeasId_t
id
=
addmod_list
->
list
.
array
[
i
]
->
measId
;
NR_ReportConfigId_t
reportId
=
addmod_list
->
list
.
array
[
i
]
->
reportConfigId
;
NR_MeasObjectId_t
measObjectId
=
addmod_list
->
list
.
array
[
i
]
->
measObjectId
;
UPDATE_IE
(
rrc
->
MeasId
[
id
],
addmod_list
->
list
.
array
[
i
],
NR_MeasIdToAddMod_t
);
handle_meas_reporting_remove
(
rrc
,
id
,
timers
);
if
(
rrc
->
ReportConfig
[
reportId
])
{
NR_ReportConfigToAddMod_t
*
report
=
rrc
->
ReportConfig
[
reportId
];
AssertFatal
(
report
->
reportConfig
.
present
==
NR_ReportConfigToAddMod__reportConfig_PR_reportConfigNR
,
"Only NR config report is supported
\n
"
);
NR_ReportConfigNR_t
*
reportNR
=
report
->
reportConfig
.
choice
.
reportConfigNR
;
// if the reportType is set to reportCGI in the reportConfig associated with this measId
if
(
reportNR
->
reportType
.
present
==
NR_ReportConfigNR__reportType_PR_reportCGI
)
{
if
(
rrc
->
MeasObj
[
measObjectId
])
{
if
(
rrc
->
MeasObj
[
measObjectId
]
->
measObject
.
present
==
NR_MeasObjectToAddMod__measObject_PR_measObjectNR
)
{
NR_MeasObjectNR_t
*
obj_nr
=
rrc
->
MeasObj
[
measObjectId
]
->
measObject
.
choice
.
measObjectNR
;
NR_ARFCN_ValueNR_t
freq
=
0
;
if
(
obj_nr
->
ssbFrequency
)
freq
=
*
obj_nr
->
ssbFrequency
;
else
if
(
obj_nr
->
refFreqCSI_RS
)
freq
=
*
obj_nr
->
refFreqCSI_RS
;
AssertFatal
(
freq
>
0
,
"Invalid ARFCN frequency for this measurement object
\n
"
);
if
(
freq
>
2016666
)
nr_timer_setup
(
&
timers
->
T321
,
16000
,
10
);
// 16 seconds for FR2
else
nr_timer_setup
(
&
timers
->
T321
,
2000
,
10
);
// 2 seconds for FR1
}
else
// EUTRA
nr_timer_setup
(
&
timers
->
T321
,
1000
,
10
);
// 1 second for EUTRA
nr_timer_start
(
&
timers
->
T321
);
}
}
}
}
}
static
void
nr_rrc_ue_process_measConfig
(
rrcPerNB_t
*
rrc
,
NR_MeasConfig_t
*
const
measConfig
,
NR_UE_Timers_Constants_t
*
timers
)
{
if
(
measConfig
->
measObjectToRemoveList
)
handle_measobj_remove
(
rrc
,
measConfig
->
measObjectToRemoveList
);
handle_measobj_remove
(
rrc
,
measConfig
->
measObjectToRemoveList
,
timers
);
if
(
measConfig
->
measObjectToAddModList
)
handle_measobj_addmod
(
rrc
,
measConfig
->
measObjectToAddModList
);
if
(
measConfig
->
reportConfigToRemoveList
)
handle_reportconfig_remove
(
rrc
,
measConfig
->
reportConfigToRemoveList
);
handle_reportconfig_remove
(
rrc
,
measConfig
->
reportConfigToRemoveList
,
timers
);
if
(
measConfig
->
reportConfigToAddModList
)
handle_reportconfig_addmod
(
rrc
,
measConfig
->
reportConfigToAddModList
);
handle_reportconfig_addmod
(
rrc
,
measConfig
->
reportConfigToAddModList
,
timers
);
if
(
measConfig
->
quantityConfig
)
handle_quantityconfig
(
rrc
,
measConfig
->
quantityConfig
);
if
(
measConfig
->
measIdToRemoveList
!=
NULL
)
{
for
(
i
=
0
;
i
<
measConfig
->
measIdToRemoveList
->
list
.
count
;
i
++
)
{
ind
=
*
measConfig
->
measIdToRemoveList
->
list
.
array
[
i
];
free
(
rrc
->
MeasId
[
ind
-
1
]);
}
}
handle_quantityconfig
(
rrc
,
measConfig
->
quantityConfig
,
timers
);
if
(
measConfig
->
measIdToAddModList
!=
NULL
)
{
for
(
i
=
0
;
i
<
measConfig
->
measIdToAddModList
->
list
.
count
;
i
++
)
{
ind
=
measConfig
->
measIdToAddModList
->
list
.
array
[
i
]
->
measId
;
if
(
measConfig
->
measIdToRemoveList
)
handle_measid_remove
(
rrc
,
measConfig
->
measIdToRemoveList
,
timers
);
if
(
rrc
->
MeasId
[
ind
-
1
])
{
LOG_D
(
NR_RRC
,
"Modifying Measurement ID %ld
\n
"
,
ind
-
1
);
memcpy
(
rrc
->
MeasId
[
ind
-
1
],
(
char
*
)
measConfig
->
measIdToAddModList
->
list
.
array
[
i
],
sizeof
(
NR_MeasIdToAddMod_t
));
}
else
{
LOG_D
(
NR_RRC
,
"Adding Measurement ID %ld %p
\n
"
,
ind
-
1
,
measConfig
->
measIdToAddModList
->
list
.
array
[
i
]);
rrc
->
MeasId
[
ind
-
1
]
=
measConfig
->
measIdToAddModList
->
list
.
array
[
i
];
}
}
}
if
(
measConfig
->
measIdToAddModList
)
handle_measid_addmod
(
rrc
,
measConfig
->
measIdToAddModList
,
timers
);
if
(
measConfig
->
measGapConfig
!=
NULL
)
{
if
(
rrc
->
measGapConfig
)
{
...
...
openair2/RRC/NR_UE/rrc_defs.h
View file @
d4b1e7b5
...
...
@@ -158,6 +158,7 @@ typedef struct NR_UE_Timers_Constants_s {
NR_timer_t
T311
;
NR_timer_t
T319
;
NR_timer_t
T320
;
NR_timer_t
T321
;
NR_timer_t
T325
;
NR_timer_t
T390
;
// counters
...
...
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