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
d3582ba5
Commit
d3582ba5
authored
1 year ago
by
Brutzman, Don
Browse files
Options
Downloads
Patches
Plain Diff
fix imports, comments
parent
d4657350
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/ExampleSimulationProgram.java
+5
-4
5 additions, 4 deletions
examples/src/OpenDis7Examples/ExampleSimulationProgram.java
with
5 additions
and
4 deletions
examples/src/OpenDis7Examples/ExampleSimulationProgram.java
+
5
−
4
View file @
d3582ba5
...
...
@@ -5,9 +5,8 @@
*/
package
OpenDis7Examples
;
//
import edu.nps.moves.dis7.entities.swe.platform.surface._001Poseidon;
import
edu.nps.moves.dis7.entities.swe.platform.surface._001Poseidon
;
import
edu.nps.moves.dis7.entities.swe.platform.surface._002Triton
;
import
edu.nps.moves.dis7.entities.usa.platform.air.CH53ESuperStallion
;
import
edu.nps.moves.dis7.enumerations.*
;
import
edu.nps.moves.dis7.pdus.*
;
import
edu.nps.moves.dis7.utilities.DisChannel
;
...
...
@@ -156,6 +155,7 @@ public class ExampleSimulationProgram
// Assuming you keep track of entity objects... here is some support for for Entity 1.
// PDU objects are already declared and instances created, so now set their values.
// who is who in our big zoo, sufficient for global participation if we need it
entityID_1
.
setSiteID
(
1
).
setApplicationID
(
2
).
setEntityID
(
3
);
// made-up example ID;
disChannel
.
addEntity
(
entityID_1
);
...
...
@@ -165,9 +165,9 @@ public class ExampleSimulationProgram
entityStatePdu_1
.
setEntityID
(
entityID_1
);
entityStatePdu_1
.
setForceId
(
ForceID
.
FRIENDLY
);
//
entityStatePdu_1.setEntityType(new _001Poseidon()); // note import statement above
entityStatePdu_1
.
setEntityType
(
new
_001Poseidon
());
// note import statement above
// entityStatePdu_1.setMarking("Entity #1");
entityStatePdu_1
.
setEntityType
(
new
CH53ESuperStallion
());
// note import statement at top
entityStatePdu_1
.
setEntityType
(
new
edu
.
nps
.
moves
.
dis7
.
entities
.
usa
.
platform
.
air
.
MV22B
());
// note import statement at top
entityStatePdu_1
.
setMarking
(
"Entity #53"
);
entityStatePdu_1
.
getMarkingString
();
// use Netbeans Debug breakpoint here to check left justified...
...
...
@@ -291,6 +291,7 @@ public class ExampleSimulationProgram
disChannel
.
sendCommentPdu
(
DisChannel
.
COMMENTPDU_NARRATIVE
,
narrativeMessage1
,
narrativeMessage2
,
narrativeMessage3
);
System
.
out
.
println
(
"... [final=completion CommentPdu successfully sent for simulation]"
);
// disChannel.getPduRecorder(). TODO record XML as well
disChannel
.
leave
();
// embedded SimulationManager is expected to send appropriate PDUs for entity, application shutdown
}
catch
(
InterruptedException
iex
)
// handle any exception that your code might choose to provoke!
...
...
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