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
278bcd9e
Commit
278bcd9e
authored
4 years ago
by
brutzman
Browse files
Options
Downloads
Patches
Plain Diff
replace hardwired value with defined constant
parent
bd8ee028
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/UdpMulticastExamples/UdpSender.java
+2
-2
2 additions, 2 deletions
examples/src/UdpMulticastExamples/UdpSender.java
with
2 additions
and
2 deletions
examples/src/UdpMulticastExamples/UdpSender.java
+
2
−
2
View file @
278bcd9e
...
@@ -68,8 +68,8 @@ public class UdpSender
...
@@ -68,8 +68,8 @@ public class UdpSender
for
(
int
index
=
1
;
index
<=
TOTAL_PACKETS_TO_SEND
;
index
++)
// avoid infinite send loops in code, they can be hard to kill!
for
(
int
index
=
1
;
index
<=
TOTAL_PACKETS_TO_SEND
;
index
++)
// avoid infinite send loops in code, they can be hard to kill!
{
{
packetID
++;
// increment counter, prefer using explicit value to index
packetID
++;
// increment counter, prefer using explicit value to index
value
=
100
-
packetID
;
// countdown
value
=
TOTAL_PACKETS_TO_SEND
-
packetID
;
// countdown
boolean
isPacketIdEvenParity
=
((
packetID
%
2
)
==
0
);
// % is modulo operator; result 0 is even parity, 1 is odd parity
boolean
isPacketIdEvenParity
=
((
packetID
%
2
)
==
0
);
// % is modulo operator; result 0 is even parity, 1 is odd parity
// values of interest follow. order and types of what was sent must match what you are reading!
// values of interest follow. order and types of what was sent must match what you are reading!
...
...
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