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
92388f04
Commit
92388f04
authored
9 months ago
by
Terry D. Norbraten
Browse files
Options
Downloads
Patches
Plain Diff
[Terry N.] cascade constructors
parent
e6d3f160
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/SimkitOpenDis7Examples/ArrivalProcessOpenDis7.java
+15
-13
15 additions, 13 deletions
...es/src/SimkitOpenDis7Examples/ArrivalProcessOpenDis7.java
with
15 additions
and
13 deletions
examples/src/SimkitOpenDis7Examples/ArrivalProcessOpenDis7.java
+
15
−
13
View file @
92388f04
...
...
@@ -20,7 +20,8 @@ import simkit.random.RandomVariate;
*/
public
class
ArrivalProcessOpenDis7
extends
SimEntityBase
{
private
final
DisChannel
disChannel
=
new
DisChannel
();
/** Not a sim parameter */
private
final
DisChannel
disChannel
;
/**
* Generates interarrival times
...
...
@@ -31,16 +32,6 @@ public class ArrivalProcessOpenDis7 extends SimEntityBase {
* State variable that counts the number of Arrival events
*/
protected
int
numberArrivals
;
/** Initialize channel setup for OpenDis7 and report a test PDU */
private
void
initializeDisChannel
()
{
disChannel
.
setUpNetworkInterface
();
disChannel
.
printlnTRACE
(
"disChannel.getNetworkAddress()="
+
disChannel
.
getNetworkAddress
()
+
", getNetworkPort()="
+
disChannel
.
getNetworkPort
());
disChannel
.
sendCommentPdu
(
VariableRecordType
.
OTHER
,
"ArrivalProcessOpenDis7 initialized"
);
}
/**
* Instantiate an ArrivalProcess with the given interarrivalTimeGenerator
...
...
@@ -49,8 +40,8 @@ public class ArrivalProcessOpenDis7 extends SimEntityBase {
* times
*/
public
ArrivalProcessOpenDis7
(
RandomVariate
interarrivalTimeGenerator
)
{
this
();
this
.
interarrivalTimeGenerator
=
interarrivalTimeGenerator
;
initializeDisChannel
();
}
/**
...
...
@@ -59,7 +50,7 @@ public class ArrivalProcessOpenDis7 extends SimEntityBase {
* explicit call to its setter method.
*/
public
ArrivalProcessOpenDis7
()
{
initialize
DisChannel
();
disChannel
=
new
DisChannel
();
}
/**
...
...
@@ -69,6 +60,7 @@ public class ArrivalProcessOpenDis7 extends SimEntityBase {
public
void
reset
()
{
super
.
reset
();
numberArrivals
=
0
;
initializeDisChannel
();
}
/**
...
...
@@ -129,4 +121,14 @@ public class ArrivalProcessOpenDis7 extends SimEntityBase {
public
DisChannel
getDisChannel
()
{
return
disChannel
;
}
/** Initialize channel setup for OpenDis7 and report a test PDU */
private
void
initializeDisChannel
()
{
disChannel
.
setUpNetworkInterface
();
disChannel
.
printlnTRACE
(
"disChannel.getNetworkAddress()="
+
disChannel
.
getNetworkAddress
()
+
", getNetworkPort()="
+
disChannel
.
getNetworkPort
());
disChannel
.
sendCommentPdu
(
VariableRecordType
.
OTHER
,
getClass
().
getName
()
+
" initialized"
);
}
}
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