gnrc_rpl_of_t Struct Reference

Objective function representation. More...

Detailed Description

Objective function representation.

Definition at line 260 of file structs.h.

#include <structs.h>

Data Fields

uint16_t ocp
 objective code point
 
uint16_t(* calc_rank )(gnrc_rpl_dodag_t *dodag, uint16_t base_rank)
 Calculate the rank of this node. More...
 
int(* parent_cmp )(gnrc_rpl_parent_t *parent1, gnrc_rpl_parent_t *parent2)
 Compare two gnrc_rpl_parent_t. More...
 
gnrc_rpl_dodag_t *(* which_dodag )(gnrc_rpl_dodag_t *, gnrc_rpl_dodag_t *)
 compare for dodags
 
void(* reset )(gnrc_rpl_dodag_t *dodag)
 Reset the state of the objective function. More...
 
void(* parent_state_callback )(gnrc_rpl_parent_t *, int, int)
 retrieves the state of a parent
 
void(* init )(gnrc_rpl_dodag_t *dodag)
 Initialize the objective function. More...
 
void(* process_dio )(void)
 DIO processing callback (acc. More...
 

Field Documentation

◆ calc_rank

uint16_t(* gnrc_rpl_of_t::calc_rank) (gnrc_rpl_dodag_t *dodag, uint16_t base_rank)

Calculate the rank of this node.

Parameters
[in]dodagRPL DODAG to calculate rank from.
[in]base_rankBASE_RANK parameter as in rfc6550
Returns
RPL Rank of this node.
GNRC_RPL_INFINITE_RANK, if no rank calculation is possible.

Definition at line 272 of file structs.h.

◆ init

void(* gnrc_rpl_of_t::init) (gnrc_rpl_dodag_t *dodag)

Initialize the objective function.

Parameters
[in]dodagRPL dodag object.

Definition at line 305 of file structs.h.

◆ parent_cmp

int(* gnrc_rpl_of_t::parent_cmp) (gnrc_rpl_parent_t *parent1, gnrc_rpl_parent_t *parent2)

Compare two gnrc_rpl_parent_t.

Compares two parents based on the rank calculated by the objective function. This function is used to determine the parent list order. The parents are ordered from the preferred parent to the least preferred parent.

Parameters
[in]parent1First parent to compare.
[in]parent2Second parent to compare.
Returns
Zero if the parents are of equal preference.
Positive, if the second parent is preferred.
Negative, if the first parent is preferred.

Definition at line 289 of file structs.h.

◆ process_dio

void(* gnrc_rpl_of_t::process_dio) (void)

DIO processing callback (acc.

to OF0 spec, chpt 5)

Definition at line 306 of file structs.h.

◆ reset

void(* gnrc_rpl_of_t::reset) (gnrc_rpl_dodag_t *dodag)

Reset the state of the objective function.

Parameters
[in]dodagRPL dodag object.

Definition at line 297 of file structs.h.


The documentation for this struct was generated from the following file: