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
161aeeba
Commit
161aeeba
authored
6 years ago
by
frtabu
Browse files
Options
Downloads
Patches
Plain Diff
attempt to fix TDD basic_simulator failure
parent
718f754c
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
targets/ARCH/tcp_bridge/tcp_bridge_oai.c
+22
-0
22 additions, 0 deletions
targets/ARCH/tcp_bridge/tcp_bridge_oai.c
with
22 additions
and
0 deletions
targets/ARCH/tcp_bridge/tcp_bridge_oai.c
+
22
−
0
View file @
161aeeba
...
@@ -58,6 +58,7 @@ typedef struct {
...
@@ -58,6 +58,7 @@ typedef struct {
int
sock
;
int
sock
;
int
samples_per_subframe
;
int
samples_per_subframe
;
uint64_t
timestamp
;
uint64_t
timestamp
;
uint64_t
next_tx_timestamp
;
int
is_enb
;
int
is_enb
;
char
*
ip
;
char
*
ip
;
}
tcp_bridge_state_t
;
}
tcp_bridge_state_t
;
...
@@ -192,6 +193,26 @@ int tcp_bridge_write(openair0_device *device, openair0_timestamp timestamp, void
...
@@ -192,6 +193,26 @@ int tcp_bridge_write(openair0_device *device, openair0_timestamp timestamp, void
}
}
tcp_bridge_state_t
*
t
=
device
->
priv
;
tcp_bridge_state_t
*
t
=
device
->
priv
;
/* deal with discontinuities in output (think: eNB in TDD mode) */
if
(
t
->
next_tx_timestamp
&&
timestamp
!=
t
->
next_tx_timestamp
)
{
uint32_t
b
[
4096
];
uint64_t
to_send
=
timestamp
-
t
->
next_tx_timestamp
;
memset
(
b
,
0
,
4096
*
sizeof
(
uint32_t
));
while
(
to_send
)
{
int
len
=
to_send
>
4096
?
4096
:
to_send
;
int
n
=
fullwrite
(
t
->
sock
,
b
,
len
*
4
);
if
(
n
!=
len
*
4
)
{
printf
(
"tcp_bridge: write error ret %d error %s
\n
"
,
n
,
strerror
(
errno
));
abort
();
}
to_send
-=
len
;
}
}
int
n
=
fullwrite
(
t
->
sock
,
buff
[
0
],
nsamps
*
4
);
int
n
=
fullwrite
(
t
->
sock
,
buff
[
0
],
nsamps
*
4
);
if
(
n
!=
nsamps
*
4
)
{
if
(
n
!=
nsamps
*
4
)
{
...
@@ -199,6 +220,7 @@ int tcp_bridge_write(openair0_device *device, openair0_timestamp timestamp, void
...
@@ -199,6 +220,7 @@ int tcp_bridge_write(openair0_device *device, openair0_timestamp timestamp, void
abort
();
abort
();
}
}
t
->
next_tx_timestamp
=
timestamp
+
nsamps
;
return
nsamps
;
return
nsamps
;
}
}
...
...
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