Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
NetworkedGraphicsMV3500
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container Registry
Model registry
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Savage
NetworkedGraphicsMV3500
Commits
559752dc
Commit
559752dc
authored
4 years ago
by
brutzman
Browse files
Options
Downloads
Patches
Plain Diff
improved timing diagnostic messages
parent
7b585ddc
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
examples/src/OpenDis7Examples/AllPduSender.java
+15
-3
15 additions, 3 deletions
examples/src/OpenDis7Examples/AllPduSender.java
with
15 additions
and
3 deletions
examples/src/OpenDis7Examples/AllPduSender.java
+
15
−
3
View file @
559752dc
...
@@ -24,10 +24,10 @@ public class AllPduSender
...
@@ -24,10 +24,10 @@ public class AllPduSender
public
static
final
int
DEFAULT_MULTICAST_PORT
=
3000
;
public
static
final
int
DEFAULT_MULTICAST_PORT
=
3000
;
/** Duration in milliseconds, set to 0 to avoid pausing between PDU sends */
/** Duration in milliseconds, set to 0 to avoid pausing between PDU sends */
private
long
THREAD_SLEEP_INTERVAL
=
0
;
private
long
THREAD_SLEEP_INTERVAL
=
200
0
;
/** Number of complete loops to perform */
/** Number of complete loops to perform */
private
int
SEND_LOOPS_TO_PERFORM
=
1
;
private
int
SEND_LOOPS_TO_PERFORM
=
1
0
;
private
int
port
;
private
int
port
;
private
InetAddress
multicastAddress
;
private
InetAddress
multicastAddress
;
...
@@ -48,11 +48,23 @@ public class AllPduSender
...
@@ -48,11 +48,23 @@ public class AllPduSender
}
}
}
}
@SuppressWarnings
(
"SleepWhileInLoop"
)
public
int
run
()
public
int
run
()
{
{
System
.
out
.
println
(
"OpenDis7Examples.AllPduSender started..."
);
System
.
out
.
println
(
"OpenDis7Examples.AllPduSender started..."
);
if
(
SEND_LOOPS_TO_PERFORM
!=
1
)
if
(
SEND_LOOPS_TO_PERFORM
!=
1
)
System
.
out
.
println
(
"... running for "
+
SEND_LOOPS_TO_PERFORM
+
" loops"
);
{
float
waitIntervalSeconds
=
((
float
)
THREAD_SLEEP_INTERVAL
/
1000
);
float
loopIntervalSeconds
=
((
float
)
THREAD_SLEEP_INTERVAL
/
1000
)
*
72
;
// 72 PDUs
float
totalDurationSeconds
=
loopIntervalSeconds
*
SEND_LOOPS_TO_PERFORM
;
System
.
out
.
println
(
"... THREAD_SLEEP_INTERVAL = "
+
THREAD_SLEEP_INTERVAL
+
" milliseconds = "
+
waitIntervalSeconds
+
" seconds"
);
System
.
out
.
print
(
"... running for "
);
if
(
SEND_LOOPS_TO_PERFORM
>
1
)
System
.
out
.
print
(
SEND_LOOPS_TO_PERFORM
+
" loops, "
);
if
(
THREAD_SLEEP_INTERVAL
>
0
)
System
.
out
.
println
(
"expected loop interval = "
+
loopIntervalSeconds
+
" seconds, total duration = "
+
totalDurationSeconds
+
" seconds = "
+
(
totalDurationSeconds
/
60.0
)
+
" minutes"
);
}
System
.
out
.
println
(
"Generate list of all PDU types and note issues, if any..."
);
System
.
out
.
println
(
"Generate list of all PDU types and note issues, if any..."
);
List
<
Pdu
>
generatedPdusList
=
new
ArrayList
<>();
List
<
Pdu
>
generatedPdusList
=
new
ArrayList
<>();
...
...
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