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
d9a3de94
Commit
d9a3de94
authored
3 years ago
by
Brutzman, Don
Browse files
Options
Downloads
Patches
Plain Diff
logging, self test refinements
parent
4b503ca9
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/edu/nps/moves/dis7/utilities/stream/PduRecorder.java
+13
-12
13 additions, 12 deletions
src/edu/nps/moves/dis7/utilities/stream/PduRecorder.java
src/edu/nps/moves/dis7/utilities/stream/PduRecorderSelfTestLog.txt
+0
-0
0 additions, 0 deletions
...ps/moves/dis7/utilities/stream/PduRecorderSelfTestLog.txt
with
13 additions
and
12 deletions
src/edu/nps/moves/dis7/utilities/stream/PduRecorder.java
+
13
−
12
View file @
d9a3de94
...
...
@@ -107,12 +107,12 @@ public class PduRecorder // implements PduReceiver
private
DisThreadedNetworkInterface
disThreadedNetworkInterface
;
private
DisThreadedNetworkInterface
.
RawPduListener
disRawPduListener
;
private
Long
startNanoTime
=
null
;
private
final
StringBuilder
sb
=
new
StringBuilder
();
private
final
Base64
.
Encoder
base64Encoder
=
Base64
.
getEncoder
();
private
f
in
al
int
pduCount
=
0
;
// debug
private
boolean
headerWritten
=
false
;
private
boolean
running
=
true
;
// starts recording by default
private
Long
startNanoTime
=
null
;
private
StringBuilder
sb
=
new
StringBuilder
();
private
Base64
.
Encoder
base64Encoder
=
Base64
.
getEncoder
();
private
in
t
pduCount
=
0
;
// debug
private
boolean
headerWritten
=
false
;
private
boolean
running
=
true
;
// starts recording by default
private
void
initialize
()
{
...
...
@@ -170,9 +170,9 @@ public class PduRecorder // implements PduReceiver
{
initialize
();
outputDirectoryPath
=
new
File
(
initialOutputDirectory
).
toPath
();
setD
escriptor
(
"PduRecorder"
)
;
// default
set
Address
(
initialAddress
)
;
set
Port
(
initialPort
)
;
d
escriptor
=
"PduRecorder"
;
// default
dis
Address
=
initialAddress
;
dis
Port
=
initialPort
;
}
/**
...
...
@@ -292,7 +292,7 @@ public class PduRecorder // implements PduReceiver
logFileWriter
.
close
();
// a flush occurs first during a close
}
catch
(
IOException
ex
)
{
Logger
.
getLogger
(
PduRecorder
.
class
.
getName
()).
log
(
Level
.
SEVERE
,
null
,
ex
);
Logger
.
getLogger
(
PduRecorder
.
class
.
get
Simple
Name
()).
log
(
Level
.
SEVERE
,
null
,
ex
);
}
System
.
err
.
flush
();
// ensure all output sent
System
.
out
.
flush
();
// ensure all output sent
...
...
@@ -399,8 +399,9 @@ public class PduRecorder // implements PduReceiver
ex
.
printStackTrace
();
throw
new
RuntimeException
(
"Fatal exception writing DIS log file in PduRecorder thread, encodingPduLog="
+
encodingPduLog
+
": "
+
ex
);
}
if
(
false
)
// debug
System
.
out
.
println
(
"PduRecorder: pduCount="
+
pduCount
);
pduCount
=
pduCount
+
1
;
// if (false) // debug
// System.out.println("PduRecorder: pduCount="+ pduCount);
sb
.
setLength
(
0
);
}
...
...
This diff is collapsed.
Click to expand it.
src/edu/nps/moves/dis7/utilities/stream/PduRecorderSelfTestLog.txt
+
0
−
0
View file @
d9a3de94
No preview for this file type
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