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
5aa22b86
Commit
5aa22b86
authored
3 years ago
by
Brutzman, Don
Browse files
Options
Downloads
Patches
Plain Diff
comments
parent
30d9c459
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
examples/src/OpenDis7Examples/ExampleSimulationProgram.java
+4
-2
4 additions, 2 deletions
examples/src/OpenDis7Examples/ExampleSimulationProgram.java
with
4 additions
and
2 deletions
examples/src/OpenDis7Examples/ExampleSimulationProgram.java
+
4
−
2
View file @
5aa22b86
...
...
@@ -99,6 +99,7 @@ public class ExampleSimulationProgram
// TODO simulation management PDUs for startup, planning to design special class support
// ===================================================================================================
// loop the simulation while allowed, programmer can set additional conditions to break out and finish
while
(
simulationLoopCount
<
SIMULATION_MAX_LOOP_COUNT
)
// are we done yet?
{
...
...
@@ -149,14 +150,15 @@ public class ExampleSimulationProgram
System
.
out
.
println
(
"... [PDUs successfully sent for this loop]"
);
// ===============================
// loop now finished, check whether to terminate if simulation complete, otherwise continue
//
current
loop now finished, check whether to terminate if simulation complete, otherwise continue
if
(
simulationComplete
||
(
simulationLoopCount
>
10000
))
// for example; including fail-safe condition is good
{
System
.
out
.
println
(
"... [loop termination condition met, simulationComplete="
+
simulationComplete
+
"]"
);
// ", final loopCount=" + loopCount +
break
;
}
}
// end of simulation loop
// ===================================================================================================
narrativeMessage2
=
"runSimulation() completed successfully"
;
// all done
sendCommentPdu
(
narrativeComment
,
narrativeMessage1
,
narrativeMessage2
,
narrativeMessage3
);
System
.
out
.
println
(
"... [final CommentPdu successfully sent for simulation]"
);
...
...
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