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
zzha zzha
OpenXG-RAN
Commits
b14a2212
Commit
b14a2212
authored
Jan 05, 2016
by
gauthier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Correct timming issues
parent
ea7c5d5e
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
57 additions
and
57 deletions
+57
-57
openair3/TEST/EPC_TEST/play_scenario.c
openair3/TEST/EPC_TEST/play_scenario.c
+46
-48
openair3/TEST/EPC_TEST/play_scenario_fsm.c
openair3/TEST/EPC_TEST/play_scenario_fsm.c
+1
-1
openair3/TEST/EPC_TEST/play_scenario_s1ap_compare_ie.c
openair3/TEST/EPC_TEST/play_scenario_s1ap_compare_ie.c
+10
-8
No files found.
openair3/TEST/EPC_TEST/play_scenario.c
View file @
b14a2212
...
...
@@ -921,58 +921,56 @@ int et_play_scenario(et_scenario_t* const scenario, const struct shift_packet_s
shift
=
shift
->
next
;
}
// now recompute time_relative_to_last_received_packet, time_relative_to_last_sent_packet
if
(
shifts
)
{
packet
=
scenario
->
list_packet
;
while
(
packet
)
{
if
(
first_packet
>
0
)
{
initial_time
=
packet
->
time_relative_to_first_packet
;
packet
->
time_relative_to_first_packet
.
tv_sec
=
0
;
packet
->
time_relative_to_first_packet
.
tv_usec
=
0
;
first_packet
=
0
;
packet
=
scenario
->
list_packet
;
while
(
packet
)
{
if
(
first_packet
>
0
)
{
initial_time
=
packet
->
time_relative_to_first_packet
;
packet
->
time_relative_to_first_packet
.
tv_sec
=
0
;
packet
->
time_relative_to_first_packet
.
tv_usec
=
0
;
first_packet
=
0
;
}
else
{
timersub
(
&
packet
->
time_relative_to_first_packet
,
&
initial_time
,
&
packet
->
time_relative_to_first_packet
);
}
if
(
packet
->
action
==
ET_PACKET_ACTION_S1C_SEND
)
{
if
(
first_sent_packet
>
0
)
{
relative_last_sent_packet
=
packet
->
time_relative_to_first_packet
;
packet
->
time_relative_to_last_sent_packet
.
tv_sec
=
0
;
packet
->
time_relative_to_last_sent_packet
.
tv_usec
=
0
;
first_sent_packet
=
0
;
}
else
{
timersub
(
&
packet
->
time_relative_to_first_packet
,
&
initial_time
,
&
packet
->
time_relative_to_first_packet
);
timersub
(
&
packet
->
time_relative_to_first_packet
,
&
relative_last_sent_packet
,
&
packet
->
time_relative_to_last_sent_packet
);
relative_last_sent_packet
=
packet
->
time_relative_to_first_packet
;
}
if
(
packet
->
action
==
ET_PACKET_ACTION_S1C_SEND
)
{
if
(
first_sent_packet
>
0
)
{
relative_last_sent_packet
=
packet
->
time_relative_to_first_packet
;
packet
->
time_relative_to_last_sent_packet
.
tv_sec
=
0
;
packet
->
time_relative_to_last_sent_packet
.
tv_usec
=
0
;
first_sent_packet
=
0
;
}
else
{
timersub
(
&
packet
->
time_relative_to_first_packet
,
&
relative_last_sent_packet
,
&
packet
->
time_relative_to_last_sent_packet
);
relative_last_sent_packet
=
packet
->
time_relative_to_first_packet
;
}
if
(
first_received_packet
>
0
)
{
packet
->
time_relative_to_last_received_packet
.
tv_sec
=
0
;
packet
->
time_relative_to_last_received_packet
.
tv_usec
=
0
;
}
else
{
timersub
(
&
packet
->
time_relative_to_first_packet
,
&
relative_last_received_packet
,
&
packet
->
time_relative_to_last_received_packet
);
}
}
else
if
(
packet
->
action
==
ET_PACKET_ACTION_S1C_RECEIVE
)
{
if
(
first_received_packet
>
0
)
{
relative_last_received_packet
.
tv_sec
=
packet
->
time_relative_to_first_packet
.
tv_sec
;
relative_last_received_packet
.
tv_usec
=
packet
->
time_relative_to_first_packet
.
tv_usec
;
packet
->
time_relative_to_last_received_packet
.
tv_sec
=
0
;
packet
->
time_relative_to_last_received_packet
.
tv_usec
=
0
;
first_received_packet
=
0
;
}
else
{
timersub
(
&
packet
->
time_relative_to_first_packet
,
&
relative_last_received_packet
,
&
packet
->
time_relative_to_last_received_packet
);
relative_last_received_packet
=
packet
->
time_relative_to_first_packet
;
}
if
(
first_sent_packet
>
0
)
{
packet
->
time_relative_to_last_sent_packet
.
tv_sec
=
0
;
packet
->
time_relative_to_last_sent_packet
.
tv_usec
=
0
;
}
else
{
timersub
(
&
packet
->
time_relative_to_first_packet
,
&
relative_last_sent_packet
,
&
packet
->
time_relative_to_last_sent_packet
);
}
if
(
first_received_packet
>
0
)
{
packet
->
time_relative_to_last_received_packet
.
tv_sec
=
0
;
packet
->
time_relative_to_last_received_packet
.
tv_usec
=
0
;
}
else
{
timersub
(
&
packet
->
time_relative_to_first_packet
,
&
relative_last_received_packet
,
&
packet
->
time_relative_to_last_received_packet
);
}
}
else
if
(
packet
->
action
==
ET_PACKET_ACTION_S1C_RECEIVE
)
{
if
(
first_received_packet
>
0
)
{
relative_last_received_packet
.
tv_sec
=
packet
->
time_relative_to_first_packet
.
tv_sec
;
relative_last_received_packet
.
tv_usec
=
packet
->
time_relative_to_first_packet
.
tv_usec
;
packet
->
time_relative_to_last_received_packet
.
tv_sec
=
0
;
packet
->
time_relative_to_last_received_packet
.
tv_usec
=
0
;
first_received_packet
=
0
;
}
else
{
timersub
(
&
packet
->
time_relative_to_first_packet
,
&
relative_last_received_packet
,
&
packet
->
time_relative_to_last_received_packet
);
relative_last_received_packet
=
packet
->
time_relative_to_first_packet
;
}
if
(
first_sent_packet
>
0
)
{
packet
->
time_relative_to_last_sent_packet
.
tv_sec
=
0
;
packet
->
time_relative_to_last_sent_packet
.
tv_usec
=
0
;
}
else
{
timersub
(
&
packet
->
time_relative_to_first_packet
,
&
relative_last_sent_packet
,
&
packet
->
time_relative_to_last_sent_packet
);
}
packet
=
packet
->
next
;
}
packet
=
packet
->
next
;
}
et_display_scenario
(
scenario
);
...
...
openair3/TEST/EPC_TEST/play_scenario_fsm.c
View file @
b14a2212
...
...
@@ -135,7 +135,7 @@ void et_scenario_schedule_tx_packet(et_packet_t * packet)
}
else
{
LOG_D
(
ENB_APP
,
"last_packet_was_tx
\n
"
);
we_are_too_late
=
timeval_subtract
(
&
offset
,
&
offset_last_tx_packet
,
&
packet
->
time_relative_to_last_sent_packet
);
LOG_D
(
ENB_APP
,
"we_are_too_
early
=%d, offset=%ld.%06d
\n
"
,
we_are_too_late
,
offset
.
tv_sec
,
offset
.
tv_usec
);
LOG_D
(
ENB_APP
,
"we_are_too_
late
=%d, offset=%ld.%06d
\n
"
,
we_are_too_late
,
offset
.
tv_sec
,
offset
.
tv_usec
);
}
if
((
0
==
we_are_too_late
)
&&
(
0
==
g_max_speed
)){
// set timer
...
...
openair3/TEST/EPC_TEST/play_scenario_s1ap_compare_ie.c
View file @
b14a2212
...
...
@@ -494,10 +494,11 @@ void update_xpath_node_mme_ue_s1ap_id(et_s1ap_t * const s1ap, xmlNode *node, con
const
xmlChar
value_d
[
32
];
const
xmlChar
value_h
[
20
];
const
xmlChar
showname
[
64
];
int
ret
=
0
;
int
pos2
=
0
;
char
val
=
NULL
;
char
hex
[
3
]
=
{
0
,
0
,
0
};;
int
ret
=
0
;
int
pos2
=
0
;
unsigned
long
int
uli
=
0
;
char
hex
[
3
]
=
{
0
,
0
,
0
};
char
*
end_ptr
=
NULL
;
size
=
strtoul
((
const
char
*
)
xml_char
,
NULL
,
0
);
xmlFree
(
xml_char
);
...
...
@@ -518,10 +519,11 @@ void update_xpath_node_mme_ue_s1ap_id(et_s1ap_t * const s1ap, xmlNode *node, con
do
{
hex
[
0
]
=
value_h
[
pos2
++
];
hex
[
1
]
=
value_h
[
pos2
++
];
hex
[
2
]
=
0
;
val
=
(
unsigned
char
)
strtoul
(
hex
,
NULL
,
16
);
AssertFatal
(
errno
!=
0
,
"Conversion of hexstring %s failed"
,
hex
);
s1ap
->
binary_stream
[
pos
++
]
=
val
;
hex
[
2
]
=
'\0'
;
end_ptr
=
hex
;
uli
=
strtoul
(
hex
,
&
end_ptr
,
16
);
AssertFatal
((
uli
!=
ULONG_MAX
)
&&
(
end_ptr
!=
NULL
)
&&
(
*
end_ptr
==
'\0'
),
"Conversion of hexstring %s failed returned %ld errno %d"
,
hex
,
uli
,
errno
);
s1ap
->
binary_stream
[
pos
++
]
=
(
unsigned
char
)
uli
;
}
while
(
pos2
<
(
2
*
5
));
// update ASN1
et_decode_s1ap
(
s1ap
);
...
...
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