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
zzha zzha
OpenXG-RAN
Commits
8d36213f
Commit
8d36213f
authored
Aug 23, 2016
by
Frédéric Leroy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
refactor(conf2uedata): add make_plmn_from_conf()
parent
459a6ec3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
10 deletions
+23
-10
openair3/NAS/TOOLS/conf2uedata.c
openair3/NAS/TOOLS/conf2uedata.c
+23
-10
No files found.
openair3/NAS/TOOLS/conf2uedata.c
View file @
8d36213f
...
...
@@ -300,27 +300,40 @@ int get_plmn_index(const char * mccmnc) {
return
-
1
;
}
plmn_t
make_plmn_from_conf
(
const
plmn_conf_param_t
*
plmn_conf
)
{
plmn_t
plmn
;
char
num
[
6
];
memset
(
&
plmn
,
0xff
,
sizeof
(
plmn
));
snprintf
(
num
,
6
,
"%s%s"
,
plmn_conf
->
mcc
,
plmn_conf
->
mnc
);
plmn
.
MCCdigit2
=
plmn_conf
->
mcc
[
1
];
plmn
.
MCCdigit1
=
plmn_conf
->
mcc
[
0
];
plmn
.
MCCdigit3
=
plmn_conf
->
mcc
[
2
];
plmn
.
MNCdigit2
=
plmn_conf
->
mnc
[
1
];
plmn
.
MNCdigit1
=
plmn_conf
->
mnc
[
0
];
if
(
strlen
(
plmn_conf
->
mnc
)
>
2
)
{
plmn
.
MNCdigit3
=
plmn_conf
->
mnc
[
2
];
}
return
plmn
;
}
void
fill_network_record_list
()
{
for
(
int
i
=
0
;
i
<
plmn_nb
;
i
++
)
{
strcpy
(
user_network_record_list
[
i
].
fullname
,
user_plmn_list
[
i
].
fullname
);
strcpy
(
user_network_record_list
[
i
].
shortname
,
user_plmn_list
[
i
].
shortname
);
char
num
[
6
];
sprintf
(
num
,
"%s%s"
,
user_plmn_list
[
i
].
mcc
,
user_plmn_list
[
i
].
mnc
);
user_network_record_list
[
i
].
num
=
atoi
(
num
);
user_network_record_list
[
i
].
plmn
.
MCCdigit2
=
user_plmn_list
[
i
].
mcc
[
1
];
user_network_record_list
[
i
].
plmn
.
MCCdigit1
=
user_plmn_list
[
i
].
mcc
[
0
];
user_network_record_list
[
i
].
plmn
.
MCCdigit3
=
user_plmn_list
[
i
].
mcc
[
2
];
user_network_record_list
[
i
].
plmn
.
MNCdigit2
=
user_plmn_list
[
i
].
mnc
[
1
];
user_network_record_list
[
i
].
plmn
.
MNCdigit1
=
user_plmn_list
[
i
].
mnc
[
0
];
user_network_record_list
[
i
].
plmn
=
make_plmn_from_conf
(
&
user_plmn_list
[
i
]);
user_network_record_list
[
i
].
tac_end
=
0xfffd
;
user_network_record_list
[
i
].
tac_start
=
0x0001
;
if
(
strlen
(
user_plmn_list
[
i
].
mnc
)
>
2
)
{
user_network_record_list
[
i
].
plmn
.
MNCdigit3
=
user_plmn_list
[
i
].
mnc
[
2
];
}
}
}
...
...
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