-
Notifications
You must be signed in to change notification settings - Fork 36
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
Refactor Application class #154
Conversation
scheduleAt(simTime() + exponential(0.00001 * myAddress), pk); | ||
break; | ||
} | ||
return; |
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.
we know that no more to do something in this method, so I wrote this to return.
we should keep the scope small to make it more readable.
if (traffic_pattern == 2) { | ||
int endnode_dest_addr = getOneRandomEndNodeAddress(); | ||
EV_INFO << "My connection setup request will be sent from " << my_address << " to " << endnode_dest_addr << "\n"; | ||
ConnectionSetupRequest *pk = createConnectionSetupRequest(endnode_dest_addr, number_of_resources); |
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 don't want to think about the detail of the packet creation.
so I move this into createConnectionSetupRequest
method
…tion::handleMessage the router sends the packet to ConnectionManager, not to Application. this part never works, so I removed it.
9038538
to
b873509
Compare
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.
Are we satisfied with the address issue?
Oh, and ultimately this is related to what the API for applications ought to be; what's the quantum equivalent of a BSD socket? That's an actual research issue that has been on the list for several years, and no one has really pursued it in depth yet. Wojtek's observation that "time is part of the service" is definitely relevant here -- the API should include high-precision timestamps, probably below the nanosecond level for some purposes. |
I refactored
Application
class