-
Notifications
You must be signed in to change notification settings - Fork 37
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enable setting target nodes to traffic generator #460
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 3 of 5 files at r1, all commit messages.
Reviewable status: 3 of 5 files reviewed, 1 unresolved discussion (waiting on @Naphann)
quisp/modules/Application/Application.cc
line 125 at r1 (raw file):
// set self weight to 0; so we don't create self traffic temp_end_node_weight_map[my_address] = 0; end_node_weight_map = std::ref(temp_end_node_weight_map);
Why do we need this std::ref
?
The instance is a local variable, and the end_node_weight_map
is a member,
so if we access end_node_weight_map
in other methods, is that safe?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 2 of 5 files at r1.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @Naphann)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: 4 of 5 files reviewed, 1 unresolved discussion (waiting on @zigen)
quisp/modules/Application/Application.cc
line 125 at r1 (raw file):
Previously, zigen (Kentaro "zigen" Teramoto) wrote…
Why do we need this
std::ref
?
The instance is a local variable, and theend_node_weight_map
is a member,
so if we accessend_node_weight_map
in other methods, is that safe?
I think I misunderstood what std::ref
does. I was meaning to make a swap instead of copying the map.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I confirmed it works with this configuration
**.app.has_specific_recipients = true
**.app.possible_recipients = [1]
**.EndNode2[0].is_initiator = true
Reviewed 1 of 1 files at r2, all commit messages.
Reviewable status:complete! all files reviewed, all discussions resolved (waiting on @Naphann)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the testing!
Reviewed 4 of 5 files at r1, 1 of 1 files at r2, all commit messages.
Reviewable status:complete! all files reviewed, all discussions resolved (waiting on @Naphann)
Add functionality to set target nodes to application for traffic generator.
Example usecase
In
.ini
files, one can addIf
app.has_specific_recipients
is set tofalse
. The behaviour of traffic generator will revert back to selecting a random node in the network as receiver.This change is