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
8d802761
Commit
8d802761
authored
Dec 27, 2023
by
liuyu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
for quick
parent
3430b93d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
12 deletions
+3
-12
src/ngap/ngap_app/ngap_app.cpp
src/ngap/ngap_app/ngap_app.cpp
+3
-12
No files found.
src/ngap/ngap_app/ngap_app.cpp
View file @
8d802761
...
...
@@ -81,15 +81,15 @@ void UdpSend_uplink(uint8_t buffer[],int n,string ip,int port){
cAddr
.
sin_addr
.
s_addr
=
inet_addr
(
ipAddr
);
//将字符串转整数
cAddr
.
sin_port
=
htons
(
port
);
//整数转整数 小端转大端
//3.通信
char
temp
[
256
];
//
char temp[256];
int
r
;
int
len
=
sizeof
cAddr
;
int
sendNum
;
sendNum
=
sendto
(
clientSocket
,
buffer
,
n
,
0
,
(
struct
sockaddr
*
)
&
cAddr
,
len
);
close
(
clientSocket
);
gettimeofday
(
&
time
,
NULL
);
Logger
::
ngap
().
info
(
"udpsend complete, ms: %ld
\n
"
,
(
time
.
tv_sec
*
1000
+
time
.
tv_usec
/
1000
));
//
gettimeofday(&time, NULL);
//
Logger::ngap().info("udpsend complete, ms: %ld\n", (time.tv_sec*1000 + time.tv_usec/1000));
}
void
UdpSend_downlink
(
nlohmann
::
json
aggregation
,
string
ip
,
int
port
){
...
...
@@ -154,15 +154,6 @@ void ngap_app::handle_receive(
{
Logger
::
ngap
().
info
(
"starting udp send"
);
Logger
::
ngap
().
debug
(
"assoc_id = %d"
,
assoc_id
);
// for(int i = 0; i < n; i++)
// {
// std::stringstream data;
// data << std::hex << (int)buffer[i];
// std::cout << data.str();
// }
// std::cout<<std::endl;
buffer
[
n
]
=
sendindex
;
buffer
[
n
+
1
]
=
stream
;
buffer
[
n
+
2
+
0
]
=
(
assoc_id
>>
24
)
&
0xFF
;
// 最高位字节
...
...
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