Skip to content
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

Contact-Based Routing (CBR) #45

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Conversation

SujataPal
Copy link

Hi,
I would like to contribute the code for CBR.

@julianofischer
Copy link
Contributor

Very nice, congratulations!
ASAP I will read this code.
I think @akeranen and @tk721 will consider adding it to the code after a review.

@SujataPal
Copy link
Author

SujataPal commented Mar 12, 2017 via email

Copy link
Owner

@akeranen akeranen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some style issues, but otherwise OK

@Override
public void update() {
super.update();
//if(SimClock.getIntTime() == 43200)
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good to clean up the code before merging. And there's actually the core.Debug.p method for debug prints.

public void update() {
super.update();
//if(SimClock.getIntTime() == 43200)
//System.out.println("[" + this.getHost() + "] list: " + this.nodesInf + "\n");
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here

ArrayList<Integer> items = otherRouter.nodesInf.get(msgDst.getAddress());

int encounter = items.get(0);
if (encounter > maxEnc)
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Style issue: opening curly brackets on the same line in ifs
(also below)

@julianofischer
Copy link
Contributor

Hi @SujataPal, maybe you would like to comment your source code. Would be nice!

@julianofischer
Copy link
Contributor

I think renaming CBR.java to CBRRouter.java is a good idea since all routing classes are named following this rule.

@SujataPal
Copy link
Author

Hi Ari/Juliano,

I have changed the code according to your suggestion and renamed CBR.java to CBRRouter.java as per Juliano.

Thank you,
Sujata

@SujataPal SujataPal changed the title Add code for Contact-Based Routing (CBR) Contact-Based Routing (CBR) Jun 7, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants