Applicable VersionsNetSimStandard
NetSim Pro



Applicable Releasesv11
v12
v13

The objective function in NetSim RPL seeks to find the route with the best link quality. The objective function 

static UINT16 compute_candidate_rank(NETSIM_ID d, PRPL_NEIGHBOR neighbor) can be found in Neighbor.c under the RPL project.


Link quality calculations, available in Zigbee Project 802.15.4 c file with function get_link_quality( ):


Lq = (1 - p / rs) where p = received power (dBm) and rs = Receiver sensitivity (dBm)


And Final Link Quality = (Sending Link Quality + Receiving link quality) / 2   


The rank calculations are done in Neighbour.c in RPL project and are


Rank = (Max_increment - Min_Increment) * (1 - Lq) ^ 2 + Min_Increment


The link quality, in this case, is based on received power and can be modified by the user to factor in distance, delay, etc


Link quality is calculated by making calls to the functions in the following order:


1. compute_candidate_rank() - RPL\Neighbor.c

2. fn_NetSim_stack_get_link_quality() - NetSim network stack which in turn calls

3. zigbee_get_link_quality() - ZigBee\802_15_4.c


The function fn_NetSim_stack_get_link_quality() is part of NetSim's network stack which is closed to user. However the function zigbee_get_link_quality() is open to the users and can be modified if required.


Related Articles:

how-does-the-wireless-link-quality-impact-rpl-rank-calculations-in-iot-

how-to-implement-objective-function-zero-for-rpl-protocol-in-netsim-iot-

how-to-implement-objective-function-one-mrhof-for-rpl-protocol-in-netsim-iot-