-
Notifications
You must be signed in to change notification settings - Fork 3k
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
[feature-wisun] Added Wi-SUN interface and Border Router API. #13084
Conversation
@debdeep-arm, thank you for your changes. |
return MESH_ERROR_PARAM; | ||
} | ||
|
||
int status = rpl_read_dodag_info(&dodag_ptr, current_instance_id); |
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.
You need to read the instance id using RPL functions as it might change
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.
Should I read instance ID like this ?
mbed-os/features/nanostack/sal-stack-nanostack/source/6LoWPAN/Bootstraps/Generic/protocol_6lowpan.c
Lines 696 to 725 in 72fa02d
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; | |
} |
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.
@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?
features/nanostack/mbed-mesh-api/mbed-mesh-api/WisunInterface.h
Outdated
Show resolved
Hide resolved
features/nanostack/mbed-mesh-api/mbed-mesh-api/WisunBorderRouter.h
Outdated
Show resolved
Hide resolved
features/nanostack/mbed-mesh-api/mbed-mesh-api/WisunBorderRouter.h
Outdated
Show resolved
Hide resolved
-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.
f2e9985
to
4c6dd93
Compare
Notifying @jk-arm |
Rebased with ARMmbed feature-wisun branch.
@debdeep-arm please fill in the PR header correctly as per the guidelines. You have not specified the PR type of the testing required. |
Test run: SUCCESSSummary: 11 of 11 test jobs passed |
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
Test results
Reviewers