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
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
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
OpenXG
OpenXG-RAN
Commits
52f96fd9
Commit
52f96fd9
authored
Oct 11, 2024
by
Guido Casati
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Complete adoption of Equality Check macros in f1ap_lib_common.c
parent
2c07f008
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
34 deletions
+17
-34
openair2/F1AP/lib/f1ap_interface_management.c
openair2/F1AP/lib/f1ap_interface_management.c
+1
-2
openair2/F1AP/lib/f1ap_lib_common.c
openair2/F1AP/lib/f1ap_lib_common.c
+16
-32
No files found.
openair2/F1AP/lib/f1ap_interface_management.c
View file @
52f96fd9
...
@@ -955,8 +955,7 @@ bool decode_f1ap_setup_failure(const F1AP_F1AP_PDU_t *pdu, f1ap_setup_failure_t
...
@@ -955,8 +955,7 @@ bool decode_f1ap_setup_failure(const F1AP_F1AP_PDU_t *pdu, f1ap_setup_failure_t
*/
*/
bool
eq_f1ap_setup_failure
(
const
f1ap_setup_failure_t
*
a
,
const
f1ap_setup_failure_t
*
b
)
bool
eq_f1ap_setup_failure
(
const
f1ap_setup_failure_t
*
a
,
const
f1ap_setup_failure_t
*
b
)
{
{
if
(
a
->
transaction_id
!=
b
->
transaction_id
)
_F1_EQ_CHECK_INT
(
a
->
transaction_id
,
b
->
transaction_id
);
return
false
;
return
true
;
return
true
;
}
}
...
...
openair2/F1AP/lib/f1ap_lib_common.c
View file @
52f96fd9
...
@@ -37,32 +37,24 @@ bool eq_f1ap_plmn(const f1ap_plmn_t *a, const f1ap_plmn_t *b)
...
@@ -37,32 +37,24 @@ bool eq_f1ap_plmn(const f1ap_plmn_t *a, const f1ap_plmn_t *b)
bool
eq_f1ap_freq_info
(
const
f1ap_nr_frequency_info_t
*
a
,
const
f1ap_nr_frequency_info_t
*
b
)
bool
eq_f1ap_freq_info
(
const
f1ap_nr_frequency_info_t
*
a
,
const
f1ap_nr_frequency_info_t
*
b
)
{
{
if
(
a
->
arfcn
!=
b
->
arfcn
)
_F1_EQ_CHECK_INT
(
a
->
arfcn
,
b
->
arfcn
);
return
false
;
_F1_EQ_CHECK_INT
(
a
->
band
,
b
->
band
);
if
(
a
->
band
!=
b
->
band
)
return
false
;
return
true
;
return
true
;
}
}
bool
eq_f1ap_tx_bandwidth
(
const
f1ap_transmission_bandwidth_t
*
a
,
const
f1ap_transmission_bandwidth_t
*
b
)
bool
eq_f1ap_tx_bandwidth
(
const
f1ap_transmission_bandwidth_t
*
a
,
const
f1ap_transmission_bandwidth_t
*
b
)
{
{
if
(
a
->
nrb
!=
b
->
nrb
)
_F1_EQ_CHECK_INT
(
a
->
nrb
,
b
->
nrb
);
return
false
;
_F1_EQ_CHECK_INT
(
a
->
scs
,
b
->
scs
);
if
(
a
->
scs
!=
b
->
scs
)
return
false
;
return
true
;
return
true
;
}
}
bool
eq_f1ap_cell_info
(
const
f1ap_served_cell_info_t
*
a
,
const
f1ap_served_cell_info_t
*
b
)
bool
eq_f1ap_cell_info
(
const
f1ap_served_cell_info_t
*
a
,
const
f1ap_served_cell_info_t
*
b
)
{
{
if
(
a
->
nr_cellid
!=
b
->
nr_cellid
)
_F1_EQ_CHECK_LONG
(
a
->
nr_cellid
,
b
->
nr_cellid
);
return
false
;
_F1_EQ_CHECK_INT
(
a
->
nr_pci
,
b
->
nr_pci
);
if
(
a
->
nr_pci
!=
b
->
nr_pci
)
_F1_EQ_CHECK_INT
(
*
a
->
tac
,
*
b
->
tac
);
return
false
;
_F1_EQ_CHECK_INT
(
a
->
mode
,
b
->
mode
);
if
(
*
a
->
tac
!=
*
b
->
tac
)
return
false
;
if
(
a
->
mode
!=
b
->
mode
)
return
false
;
if
(
a
->
mode
==
F1AP_MODE_TDD
)
{
if
(
a
->
mode
==
F1AP_MODE_TDD
)
{
/* TDD */
/* TDD */
if
(
!
eq_f1ap_tx_bandwidth
(
&
a
->
tdd
.
tbw
,
&
b
->
tdd
.
tbw
))
if
(
!
eq_f1ap_tx_bandwidth
(
&
a
->
tdd
.
tbw
,
&
b
->
tdd
.
tbw
))
...
@@ -80,10 +72,8 @@ bool eq_f1ap_cell_info(const f1ap_served_cell_info_t *a, const f1ap_served_cell_
...
@@ -80,10 +72,8 @@ bool eq_f1ap_cell_info(const f1ap_served_cell_info_t *a, const f1ap_served_cell_
if
(
!
eq_f1ap_freq_info
(
&
a
->
fdd
.
ul_freqinfo
,
&
b
->
fdd
.
ul_freqinfo
))
if
(
!
eq_f1ap_freq_info
(
&
a
->
fdd
.
ul_freqinfo
,
&
b
->
fdd
.
ul_freqinfo
))
return
false
;
return
false
;
}
}
if
(
a
->
measurement_timing_config_len
!=
b
->
measurement_timing_config_len
)
_F1_EQ_CHECK_INT
(
a
->
measurement_timing_config_len
,
b
->
measurement_timing_config_len
);
return
false
;
_F1_EQ_CHECK_INT
(
*
a
->
measurement_timing_config
,
*
b
->
measurement_timing_config
);
if
(
*
a
->
measurement_timing_config
!=
*
b
->
measurement_timing_config
)
return
false
;
if
(
!
eq_f1ap_plmn
(
&
a
->
plmn
,
&
b
->
plmn
))
if
(
!
eq_f1ap_plmn
(
&
a
->
plmn
,
&
b
->
plmn
))
return
false
;
return
false
;
return
true
;
return
true
;
...
@@ -92,19 +82,13 @@ bool eq_f1ap_cell_info(const f1ap_served_cell_info_t *a, const f1ap_served_cell_
...
@@ -92,19 +82,13 @@ bool eq_f1ap_cell_info(const f1ap_served_cell_info_t *a, const f1ap_served_cell_
bool
eq_f1ap_sys_info
(
const
f1ap_gnb_du_system_info_t
*
a
,
const
f1ap_gnb_du_system_info_t
*
b
)
bool
eq_f1ap_sys_info
(
const
f1ap_gnb_du_system_info_t
*
a
,
const
f1ap_gnb_du_system_info_t
*
b
)
{
{
/* MIB */
/* MIB */
if
(
a
->
mib_length
!=
b
->
mib_length
)
_F1_EQ_CHECK_INT
(
a
->
mib_length
,
b
->
mib_length
);
return
false
;
for
(
int
i
=
0
;
i
<
a
->
mib_length
;
i
++
)
for
(
int
i
=
0
;
i
<
a
->
mib_length
;
i
++
)
{
_F1_EQ_CHECK_INT
(
a
->
mib
[
i
],
b
->
mib
[
i
]);
if
(
a
->
mib
[
i
]
!=
b
->
mib
[
i
])
return
false
;
}
/* SIB1 */
/* SIB1 */
if
(
a
->
sib1_length
!=
b
->
sib1_length
)
_F1_EQ_CHECK_INT
(
a
->
sib1_length
,
b
->
sib1_length
);
return
false
;
for
(
int
i
=
0
;
i
<
a
->
sib1_length
;
i
++
)
for
(
int
i
=
0
;
i
<
a
->
sib1_length
;
i
++
)
{
_F1_EQ_CHECK_INT
(
a
->
sib1
[
i
],
b
->
sib1
[
i
]);
if
(
a
->
sib1
[
i
]
!=
b
->
sib1
[
i
])
return
false
;
}
return
true
;
return
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