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
alex037yang
OpenXG-RAN
Commits
eacd1cfb
Commit
eacd1cfb
authored
Sep 20, 2018
by
Robert Schmidt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
PROTO_AGENT test program changes
parent
b564b116
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
6 deletions
+21
-6
openair2/LAYER2/PROTO_AGENT/cu_test.c
openair2/LAYER2/PROTO_AGENT/cu_test.c
+11
-3
openair2/LAYER2/PROTO_AGENT/du_test.c
openair2/LAYER2/PROTO_AGENT/du_test.c
+10
-3
No files found.
openair2/LAYER2/PROTO_AGENT/cu_test.c
View file @
eacd1cfb
...
...
@@ -35,12 +35,19 @@ pdcp_data_ind(
)
{
fwrite
(
sdu_buffer_pP
->
data
,
sdu_buffer_sizeP
,
1
,
stdout
);
free_mem_block
(
sdu_buffer_pP
,
__func__
);
fflush
(
stdout
);
free_mem_block
(
sdu_buffer_pP
,
__func__
);
/* cannot free because of const */
free
(
ctxt_pP
);
recv_client
=
1
;
return
0
;
}
void
close_proto_agent
(
void
)
{
proto_agent_stop
(
0
);
}
int
main
(
int
argc
,
char
*
argv
[])
{
const
cudu_params_t
params
=
{
...
...
@@ -79,6 +86,7 @@ int main(int argc, char *argv[])
fprintf
(
stderr
,
"error on proto_agent_start()
\n
"
);
return
3
;
}
atexit
(
close_proto_agent
);
/* wait for first packet of client */
while
(
!
recv_client
)
sleep
(
1
);
...
...
@@ -87,7 +95,7 @@ int main(int argc, char *argv[])
/* now send back at the same time */
gettimeofday
(
&
t_start
,
NULL
);
while
((
size
=
fread
(
s
,
1
,
BUF_MAX
,
f
))
>
0
)
{
usleep
(
10
0
);
usleep
(
10
);
totsize
+=
size
;
mem
.
data
=
&
s
[
0
];
proto_agent_send_rlc_data_req
(
&
p
,
0
,
0
,
0
,
0
,
0
,
size
,
&
mem
);
...
...
@@ -101,7 +109,7 @@ int main(int argc, char *argv[])
fprintf
(
stderr
,
"check files using 'diff afile bfile'
\n
"
);
/* give some time in case the other direction is slower */
sleep
(
60
);
sleep
(
5
);
return
0
;
}
...
...
openair2/LAYER2/PROTO_AGENT/du_test.c
View file @
eacd1cfb
...
...
@@ -38,11 +38,17 @@ rlc_op_status_t rlc_data_req (const protocol_ctxt_t* const ctxt_pP,
)
{
fwrite
(
sdu_pP
->
data
,
sdu_sizeP
,
1
,
stdout
);
free_mem_block
(
sdu_pP
,
__func__
);
fflush
(
stdout
);
free_mem_block
(
sdu_pP
,
__func__
);
free
(
ctxt_pP
);
return
0
;
}
void
close_proto_agent
(
void
)
{
proto_agent_stop
(
0
);
}
int
main
(
int
argc
,
char
*
argv
[])
{
const
cudu_params_t
params
=
{
...
...
@@ -81,10 +87,11 @@ int main(int argc, char *argv[])
fprintf
(
stderr
,
"error on proto_agent_start()
\n
"
);
return
3
;
}
atexit
(
close_proto_agent
);
gettimeofday
(
&
t_start
,
NULL
);
while
((
size
=
fread
(
s
,
1
,
BUF_MAX
,
f
))
>
0
)
{
usleep
(
10
0
);
usleep
(
10
);
totsize
+=
size
;
mem
.
data
=
&
s
[
0
];
proto_agent_send_pdcp_data_ind
(
&
p
,
0
,
0
,
0
,
size
,
&
mem
);
...
...
@@ -98,7 +105,7 @@ int main(int argc, char *argv[])
fprintf
(
stderr
,
"check files using 'diff afile bfile'
\n
"
);
/* wait, we are possibly receiving data */
sleep
(
60
);
sleep
(
5
);
return
0
;
}
...
...
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