Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
openairinterface5G
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Worker.N
openairinterface5G
Commits
eacd1cfb
Commit
eacd1cfb
authored
6 years ago
by
Robert Schmidt
Browse files
Options
Downloads
Patches
Plain Diff
PROTO_AGENT test program changes
parent
b564b116
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
openair2/LAYER2/PROTO_AGENT/cu_test.c
+11
-3
11 additions, 3 deletions
openair2/LAYER2/PROTO_AGENT/cu_test.c
openair2/LAYER2/PROTO_AGENT/du_test.c
+10
-3
10 additions, 3 deletions
openair2/LAYER2/PROTO_AGENT/du_test.c
with
21 additions
and
6 deletions
openair2/LAYER2/PROTO_AGENT/cu_test.c
+
11
−
3
View file @
eacd1cfb
...
@@ -35,12 +35,19 @@ pdcp_data_ind(
...
@@ -35,12 +35,19 @@ pdcp_data_ind(
)
)
{
{
fwrite
(
sdu_buffer_pP
->
data
,
sdu_buffer_sizeP
,
1
,
stdout
);
fwrite
(
sdu_buffer_pP
->
data
,
sdu_buffer_sizeP
,
1
,
stdout
);
free_mem_block
(
sdu_buffer_pP
,
__func__
);
fflush
(
stdout
);
fflush
(
stdout
);
free_mem_block
(
sdu_buffer_pP
,
__func__
);
/* cannot free because of const */
free
(
ctxt_pP
);
recv_client
=
1
;
recv_client
=
1
;
return
0
;
return
0
;
}
}
void
close_proto_agent
(
void
)
{
proto_agent_stop
(
0
);
}
int
main
(
int
argc
,
char
*
argv
[])
int
main
(
int
argc
,
char
*
argv
[])
{
{
const
cudu_params_t
params
=
{
const
cudu_params_t
params
=
{
...
@@ -79,6 +86,7 @@ int main(int argc, char *argv[])
...
@@ -79,6 +86,7 @@ int main(int argc, char *argv[])
fprintf
(
stderr
,
"error on proto_agent_start()
\n
"
);
fprintf
(
stderr
,
"error on proto_agent_start()
\n
"
);
return
3
;
return
3
;
}
}
atexit
(
close_proto_agent
);
/* wait for first packet of client */
/* wait for first packet of client */
while
(
!
recv_client
)
sleep
(
1
);
while
(
!
recv_client
)
sleep
(
1
);
...
@@ -87,7 +95,7 @@ int main(int argc, char *argv[])
...
@@ -87,7 +95,7 @@ int main(int argc, char *argv[])
/* now send back at the same time */
/* now send back at the same time */
gettimeofday
(
&
t_start
,
NULL
);
gettimeofday
(
&
t_start
,
NULL
);
while
((
size
=
fread
(
s
,
1
,
BUF_MAX
,
f
))
>
0
)
{
while
((
size
=
fread
(
s
,
1
,
BUF_MAX
,
f
))
>
0
)
{
usleep
(
10
0
);
usleep
(
10
);
totsize
+=
size
;
totsize
+=
size
;
mem
.
data
=
&
s
[
0
];
mem
.
data
=
&
s
[
0
];
proto_agent_send_rlc_data_req
(
&
p
,
0
,
0
,
0
,
0
,
0
,
size
,
&
mem
);
proto_agent_send_rlc_data_req
(
&
p
,
0
,
0
,
0
,
0
,
0
,
size
,
&
mem
);
...
@@ -101,7 +109,7 @@ int main(int argc, char *argv[])
...
@@ -101,7 +109,7 @@ int main(int argc, char *argv[])
fprintf
(
stderr
,
"check files using 'diff afile bfile'
\n
"
);
fprintf
(
stderr
,
"check files using 'diff afile bfile'
\n
"
);
/* give some time in case the other direction is slower */
/* give some time in case the other direction is slower */
sleep
(
60
);
sleep
(
5
);
return
0
;
return
0
;
}
}
...
...
This diff is collapsed.
Click to expand it.
openair2/LAYER2/PROTO_AGENT/du_test.c
+
10
−
3
View file @
eacd1cfb
...
@@ -38,11 +38,17 @@ rlc_op_status_t rlc_data_req (const protocol_ctxt_t* const ctxt_pP,
...
@@ -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
);
fwrite
(
sdu_pP
->
data
,
sdu_sizeP
,
1
,
stdout
);
free_mem_block
(
sdu_pP
,
__func__
);
fflush
(
stdout
);
fflush
(
stdout
);
free_mem_block
(
sdu_pP
,
__func__
);
free
(
ctxt_pP
);
return
0
;
return
0
;
}
}
void
close_proto_agent
(
void
)
{
proto_agent_stop
(
0
);
}
int
main
(
int
argc
,
char
*
argv
[])
int
main
(
int
argc
,
char
*
argv
[])
{
{
const
cudu_params_t
params
=
{
const
cudu_params_t
params
=
{
...
@@ -81,10 +87,11 @@ int main(int argc, char *argv[])
...
@@ -81,10 +87,11 @@ int main(int argc, char *argv[])
fprintf
(
stderr
,
"error on proto_agent_start()
\n
"
);
fprintf
(
stderr
,
"error on proto_agent_start()
\n
"
);
return
3
;
return
3
;
}
}
atexit
(
close_proto_agent
);
gettimeofday
(
&
t_start
,
NULL
);
gettimeofday
(
&
t_start
,
NULL
);
while
((
size
=
fread
(
s
,
1
,
BUF_MAX
,
f
))
>
0
)
{
while
((
size
=
fread
(
s
,
1
,
BUF_MAX
,
f
))
>
0
)
{
usleep
(
10
0
);
usleep
(
10
);
totsize
+=
size
;
totsize
+=
size
;
mem
.
data
=
&
s
[
0
];
mem
.
data
=
&
s
[
0
];
proto_agent_send_pdcp_data_ind
(
&
p
,
0
,
0
,
0
,
size
,
&
mem
);
proto_agent_send_pdcp_data_ind
(
&
p
,
0
,
0
,
0
,
size
,
&
mem
);
...
@@ -98,7 +105,7 @@ int main(int argc, char *argv[])
...
@@ -98,7 +105,7 @@ int main(int argc, char *argv[])
fprintf
(
stderr
,
"check files using 'diff afile bfile'
\n
"
);
fprintf
(
stderr
,
"check files using 'diff afile bfile'
\n
"
);
/* wait, we are possibly receiving data */
/* wait, we are possibly receiving data */
sleep
(
60
);
sleep
(
5
);
return
0
;
return
0
;
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment