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
promise
OpenXG-RAN
Commits
161aeeba
Commit
161aeeba
authored
Jan 16, 2019
by
frtabu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
attempt to fix TDD basic_simulator failure
parent
718f754c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
0 deletions
+22
-0
targets/ARCH/tcp_bridge/tcp_bridge_oai.c
targets/ARCH/tcp_bridge/tcp_bridge_oai.c
+22
-0
No files found.
targets/ARCH/tcp_bridge/tcp_bridge_oai.c
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
;
}
}
...
...
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