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
a55f8822
Commit
a55f8822
authored
4 years ago
by
brutzman
Browse files
Options
Downloads
Patches
Plain Diff
improved diagnostic, TODO fix PDU type problem
parent
f68d6fcf
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/AllPduReceiver.java
+2
-2
2 additions, 2 deletions
examples/src/OpenDis7Examples/AllPduReceiver.java
with
2 additions
and
2 deletions
examples/src/OpenDis7Examples/AllPduReceiver.java
+
2
−
2
View file @
a55f8822
...
...
@@ -45,7 +45,7 @@ public class AllPduReceiver
socket
.
receive
(
packet
);
Pdu
pdu
=
factory
.
createPdu
(
packet
.
getData
());
Pdu
pdu
=
factory
.
createPdu
(
packet
.
getData
());
// packet.getData() returns byte[] array data buffer
if
(
pdu
!=
null
)
{
DISPDUType
currentPduType
=
pdu
.
getPduType
();
//short currentPduType = pdu.getPduType();
...
...
@@ -58,7 +58,7 @@ public class AllPduReceiver
if
(
currentPduType
.
getValue
()
<
10
)
message
.
append
(
" "
);
// column spacing
message
.
append
(
currentPduType
.
getValue
());
String
currentPduTypePadded
=
String
.
format
(
"%-34s"
,
currentPduType
);
// - indicates right padding of whitespace
String
currentPduTypePadded
=
String
.
format
(
"%-34s"
,
currentPduType
);
// - indicates right padding of whitespace
message
.
append
(
" "
).
append
(
currentPduTypePadded
);
String
currentPduTypeNamePadded
=
String
.
format
(
"%-49s"
,
currentPduTypeName
);
// - indicates right padding of whitespace
message
.
append
(
" of type "
).
append
(
currentPduTypeNamePadded
);
// package.class name
...
...
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