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

[feature-wisun] Added Wi-SUN interface and Border Router API. #13084

Merged
merged 5 commits into from
Jun 11, 2020

Conversation

debdeep-arm
Copy link
Contributor

@debdeep-arm debdeep-arm commented Jun 8, 2020

Summary of changes

-Taken modification for adding IID in BR info structure.
-Added API to get RPL info for Wi-SUN router and BR.
-Added API to get routing table info from BR.

Impact of changes

Migration actions required

Documentation


Pull request type

[] Patch update (Bug fix / Target update / Docs update / Test update / Refactor)
[X] Feature update (New feature / Functionality change / New API)
[] Major update (Breaking change E.g. Return code change / API behaviour change)

Test results

[] No Tests required for this change (E.g docs only update)
[x] Covered by existing mbed-os tests (Greentea or Unittest)
[] Tests / results supplied as part of this PR

Reviewers


@ciarmcom ciarmcom requested a review from a team June 8, 2020 15:00
@ciarmcom
Copy link
Member

ciarmcom commented Jun 8, 2020

@debdeep-arm, thank you for your changes.
@ARMmbed/mbed-os-maintainers please review.

return MESH_ERROR_PARAM;
}

int status = rpl_read_dodag_info(&dodag_ptr, current_instance_id);
Copy link

Choose a reason for hiding this comment

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

You need to read the instance id using RPL functions as it might change

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Should I read instance ID like this ?

uint8_t instance_id_list[10];
uint8_t rpl_instance_count;
uint8_t instance_id = RPL_INSTANCE_LOCAL;
uint8_t instance_id_new;
uint8_t instance_index;
rpl_instance_count = rpl_instance_list_read(&instance_id_list[0], sizeof(instance_id_list));
/* Find lowest global instance ID (assumption: RPL instance with lowest instance ID has
most generic routing rule and its rank should be indicated in beacon) */
for (instance_index = 0; instance_index < rpl_instance_count; instance_index++) {
instance_id_new = instance_id_list[instance_index];
if ((instance_id_new & RPL_INSTANCE_LOCAL) == RPL_INSTANCE_LOCAL) {
break;
} else {
if (instance_id_new < instance_id) {
instance_id = instance_id_new;
}
}
}
// Get DAG rank
if (instance_id == RPL_INSTANCE_LOCAL) {
return 255;
}
rpl_dodag_info_t rpl_dodag_info;
if (!rpl_read_dodag_info(&rpl_dodag_info, instance_id)) {
return 255;
}

Copy link

Choose a reason for hiding this comment

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

@kjbracey-arm Could you help us a bit what is the rule for selecting the instance id is this the correct way or is there something simpler?

@artokin artokin changed the title Added Wi-SUN interface and Border Router API. [feature-wisun] Added Wi-SUN interface and Border Router API. Jun 9, 2020
@artokin artokin requested a review from a team June 9, 2020 07:53
-Taken modification for adding IID in BR info structure.
-Added API to get RPL info for Wi-SUN router and BR.
-Added API to get routing table info from BR.
@mergify mergify bot dismissed artokin’s stale review June 9, 2020 13:44

Pull request has been modified.

@debdeep-arm
Copy link
Contributor Author

Notifying @jk-arm

Rebased with ARMmbed feature-wisun branch.
@mergify mergify bot added needs: CI and removed needs: work labels Jun 11, 2020
@artokin
Copy link
Contributor

artokin commented Jun 11, 2020

@0xc0170 , @adbridge , would you please start CI run for this PR?

@adbridge
Copy link
Contributor

@debdeep-arm please fill in the PR header correctly as per the guidelines. You have not specified the PR type of the testing required.

@mbed-ci
Copy link

mbed-ci commented Jun 11, 2020

Test run: SUCCESS

Summary: 11 of 11 test jobs passed
Build number : 1
Build artifacts

@adbridge adbridge merged commit cc8bb45 into ARMmbed:feature-wisun Jun 11, 2020
@debdeep-arm debdeep-arm deleted the wisun-interface-api-add branch June 16, 2020 10:48
@debdeep-arm debdeep-arm restored the wisun-interface-api-add branch June 18, 2020 07:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants