Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
OpenXG-AMF
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
1
Issues
1
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
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-AMF
Commits
6fd4a8a4
Commit
6fd4a8a4
authored
Jun 29, 2021
by
liuyu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
solve ue_context_tai_from_json
parent
af0865a5
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
7 deletions
+15
-7
.vscode/settings.json
.vscode/settings.json
+2
-1
src/amf-app/amf_n1.cpp
src/amf-app/amf_n1.cpp
+5
-5
src/contexts/ue_context.cpp
src/contexts/ue_context.cpp
+8
-1
No files found.
.vscode/settings.json
View file @
6fd4a8a4
...
...
@@ -68,6 +68,7 @@
"cinttypes"
:
"cpp"
,
"typeindex"
:
"cpp"
,
"typeinfo"
:
"cpp"
,
"valarray"
:
"cpp"
"valarray"
:
"cpp"
,
"*.h++"
:
"cpp"
}
}
\ No newline at end of file
src/amf-app/amf_n1.cpp
View file @
6fd4a8a4
...
...
@@ -1392,7 +1392,7 @@ void amf_n1::registration_request_handle(bool isNasSig,
ran_ue_ngap_id_json
[
"content"
]
=
to_string
(
nc
.
get
()
->
ran_ue_ngap_id
);
udsf_nas_context
[
"blocks"
].
push_back
(
ran_ue_ngap_id_json
);
serving_network
[
"Content-ID"
]
=
"
v
"
;
serving_network
[
"Content-ID"
]
=
"
serving_network
"
;
serving_network
[
"Content-Type"
]
=
"varchar(32)"
;
serving_network
[
"content"
]
=
(
nc
.
get
()
->
serving_network
);
udsf_nas_context
[
"blocks"
].
push_back
(
serving_network
);
...
...
@@ -1472,7 +1472,7 @@ void amf_n1::registration_request_handle(bool isNasSig,
ueSecurityCapEnc
[
"Content-ID"
]
=
"ueSecurityCapEnc"
;
ueSecurityCapEnc
[
"Content-Type"
]
=
"varchar(32)"
;
ueSecurityCapEnc
[
"content"
]
=
to_string
(
nc
.
get
()
->
ueSecurityCapEnc
);
udsf_nas_context
[
"blocks"
].
push_back
(
ngKsi
);
udsf_nas_context
[
"blocks"
].
push_back
(
ueSecurityCapEnc
);
ueSecurityCapInt
[
"Content-ID"
]
=
"ueSecurityCapInt"
;
ueSecurityCapInt
[
"Content-Type"
]
=
"varchar(32)"
;
...
...
@@ -1498,7 +1498,7 @@ void amf_n1::registration_request_handle(bool isNasSig,
nc
.
get
()
->
requestedNssai
=
requestedNssai
;
nc
.
get
()
->
ctx_avaliability_ind
=
true
;
requestedNssai_json
[
"Content-ID"
]
=
"requestedNssai"
;
requestedNssai_json
[
"Content-Type"
]
=
"
varchar(32)
"
;
requestedNssai_json
[
"Content-Type"
]
=
"
JSON
"
;
requestedNssai_json
[
"content"
]
=
{};
nlohmann
::
json
requestedNssai_m
=
{};
for
(
int
i
=
0
;
i
<
nc
->
requestedNssai
.
size
();
i
++
)
...
...
@@ -1527,7 +1527,7 @@ void amf_n1::registration_request_handle(bool isNasSig,
// Run different registration procedure
/**********************hsx add***********************/
std
::
string
udsf_url
=
"http://10.
28.234.76
:7123/nudsf-dr/v1/amfdata/"
+
std
::
string
(
"nas_context/records/"
)
+
to_string
(
nc
.
get
()
->
amf_ue_ngap_id
)
;
std
::
string
udsf_url
=
"http://10.
112.202.24
:7123/nudsf-dr/v1/amfdata/"
+
std
::
string
(
"nas_context/records/"
)
+
to_string
(
nc
.
get
()
->
amf_ue_ngap_id
)
;
nlohmann
::
json
udsf_response
;
udsf_nas_context
[
"meta"
]
[
"tags"
]
=
{
...
...
@@ -1549,7 +1549,7 @@ void amf_n1::registration_request_handle(bool isNasSig,
// {{"Content-ID", "serving_network"},{"Content-Type", "varchar(32)"},{"content", nc->serving_network}}
// });
printf
(
"----------------udsf_nas_context %s---------
\n
"
,
udsf_nas_context
.
dump
().
c_str
());
amf_n2_inst
->
curl_http_client_udsf
(
udsf_url
,
udsf_nas_context
.
dump
(),
"PUT"
,
udsf_response
);
// udsf_url = "http://10.112.202.24:7123/nudsf-dr/v1/amfdata/" + std::string("nas_context/records/") + std::to_string(nc.get()->amf_ue_ngap_id) ;
...
...
src/contexts/ue_context.cpp
View file @
6fd4a8a4
...
...
@@ -65,7 +65,14 @@ void ue_context::ue_context_tai_from_json(nlohmann::json j,Tai_t &tai_json)
{
nlohmann
::
json
s
;
string
j
;
j
=
it_block
->
at
(
"content"
);
s
=
it_block
->
at
(
"content"
);
tai_json
.
mcc
=
s
.
at
(
"mcc"
);
tai_json
.
mnc
=
s
.
at
(
"mnc"
)
;
j
=
s
.
at
(
"tac"
);
tai_json
.
tac
=
atoi
(
j
.
c_str
());
//printf("ue_context_tai_from_json %s---mcc %s---mnc %s--\n",s.dump().c_str(),tai_json.mcc,tai_json.mnc);
return
;
// s = nlohmann::json::parse(j);
// s.at("mnc").get_to(tai_json.mnc);
// s.at("mcc").get_to(tai_json.mcc);
...
...
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