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
00833481
Commit
00833481
authored
3 years ago
by
Brutzman, Don
Browse files
Options
Downloads
Patches
Plain Diff
initializeSimulationEntities(), SimulationManager addition
parent
d77816c2
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/ExampleTrackInterpolation.java
+8
-6
8 additions, 6 deletions
examples/src/OpenDis7Examples/ExampleTrackInterpolation.java
with
8 additions
and
6 deletions
examples/src/OpenDis7Examples/ExampleTrackInterpolation.java
+
8
−
6
View file @
00833481
...
...
@@ -51,23 +51,25 @@ public class ExampleTrackInterpolation extends ExampleSimulationProgram
*/
@SuppressWarnings
(
"SleepWhileInLoop"
)
// yes we do that
@Override
// indicates that this method supercedes corresponding superclass method
public
void
runSimulationLoops
()
{
try
{
public
void
runSimulationLoops
()
{
try
{
final
int
SIMULATION_MAX_LOOP_COUNT
=
50
;
// be deliberate out there! also avoid infinite loops.
int
simulationLoopCount
=
0
;
// variable, initialized at 0
boolean
simulationComplete
=
false
;
// sentinel variable as termination condition, are we done yet?
// TODO reset Clock Time to today's date and timestamp to zero, providing consistent outputs for each simulation run
simulationTime
=
initialTime
-
currentTimeStep
;
// pre-initialization for first loop
initializeSimulationEntities
();
// create PDU objects and set their values.
EntityID
entityID_1
=
new
EntityID
();
// use declared PDU objects and set their values.
entityID_1
.
setSiteID
(
1
).
setApplicationID
(
2
).
setEntityID
(
3
);
// made-up example ID;
// TODO someday, use enumerations; is there a unique site triplet for MOVES Institute?
pduRecorder
.
setVerbose
(
false
);
pduRecorder
.
hasVerboseOutput
();
pduRecorder
.
hasVerboseOutput
();
// debug check
EntityStatePdu
espdu_1
=
pduFactory
.
makeEntityStatePdu
();
espdu_1
.
setEntityID
(
entityID_1
);
...
...
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