Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
P
PPSi
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
47
Issues
47
List
Board
Labels
Milestones
Merge Requests
1
Merge Requests
1
Wiki
Wiki
image/svg+xml
Discourse
Discourse
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Projects
PPSi
Commits
c72c5679
Commit
c72c5679
authored
Mar 04, 2014
by
Pietro Fezzardi
Committed by
Alessandro Rubini
Mar 21, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
sim: last_outgoing_jit_ns moved to pp_sim_net_delay
parent
77db1c77
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
ppsi-sim.h
arch-sim/ppsi-sim.h
+1
-1
sim-socket.c
time-sim/sim-socket.c
+2
-2
No files found.
arch-sim/ppsi-sim.h
View file @
c72c5679
...
...
@@ -28,6 +28,7 @@ struct pp_sim_time_instance {
struct
pp_sim_net_delay
{
unsigned
int
t_prop_ns
;
// propagation delay on outgoing link
uint64_t
jit_ns
;
// jitter in nsec on outgoing link
uint64_t
last_outgoing_jit_ns
;
};
/*
...
...
@@ -81,7 +82,6 @@ static inline struct sim_ppg_arch_data *SIM_PPG_ARCH(struct pp_globals *ppg)
struct
sim_ppi_arch_data
{
struct
pp_sim_time_instance
time
;
struct
pp_sim_net_delay
n_delay
;
uint64_t
last_outgoing_jit_ns
;
/* servo */
struct
pp_servo
*
servo
;
/* Runtime options */
...
...
time-sim/sim-socket.c
View file @
c72c5679
...
...
@@ -200,11 +200,11 @@ static int sim_net_send(struct pp_instance *ppi, void *pkt, int len,
* cause the FollowUp to be discarded by the slave state machine when it
* comes earlier then the Sync */
if
(((
*
(
Enumeration4
*
)
(
pkt
+
0
))
&
0x0F
)
==
PPM_FOLLOW_UP
)
{
jit_ns
+=
data
->
last_outgoing_jit_ns
;
jit_ns
+=
data
->
n_delay
.
last_outgoing_jit_ns
;
}
jit_ns
+=
(
rand
()
*
data
->
n_delay
.
jit_ns
)
/
RAND_MAX
;
/* store the jitter, used from the next send if it is a FollowUp */
data
->
last_outgoing_jit_ns
=
jit_ns
;
data
->
n_delay
.
last_outgoing_jit_ns
=
jit_ns
;
pending
.
delay_ns
=
data
->
n_delay
.
t_prop_ns
+
jit_ns
;
insert_pending
(
SIM_PPG_ARCH
(
ppi
->
glbs
),
&
pending
);
...
...
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