Thanks to visit codestin.com
Credit goes to github.com

Skip to content

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.

3 participants