|
Wiselib
|
Two Hops Coloring Algorithm. More...
#include <two_hops_coloring.h>
Public Types | |
| typedef OsModel_P | OsModel |
| typedef Radio_P | Radio |
| typedef Debug_P | Debug |
| typedef OsModel_P::Timer | Timer |
| typedef TwoHopsColoring < OsModel, Radio, Debug > | self_type |
| typedef Radio::node_id_t | node_id_t |
| typedef Radio::size_t | size_t |
| typedef Radio::block_data_t | block_data_t |
| typedef Timer::millis_t | millis_t |
| typedef TwoHopsMessage < OsModel, Radio > | coloring_message |
| typedef MapStaticVector < OsModel, uint32_t, uint32_t, 50 > | ColorTable |
| typedef MapStaticVector < OsModel, uint32_t, uint32_t, 100 > | ForbiddenTable |
| typedef ColorsTable< OsModel, Radio > | ColorsSorted |
| typedef wiselib::pair < uint32_t, uint32_t > | pair_t |
| typedef wiselib::MapStaticVector < OsModel, uint32_t, uint32_t, 50 > ::iterator | ColorTable_iterator |
| typedef wiselib::MapStaticVector < OsModel, uint32_t, uint32_t, 100 > ::iterator | ForbiddenTable_iterator |
Public Member Functions | |
| void | send_special_message (uint8_t *payload, node_id_t source, uint8_t msg_id, node_id_t destination, uint8_t routing_type, uint hops, uint16_t msg_id_num) |
| uint32_t | fm (uint32_t arr[], uint32_t b, uint32_t n) |
| void | isort (uint32_t arr[], uint32_t n) |
| uint32_t | get_alg_messages () |
| uint32_t | get_color () |
| void | set_color (uint32_t color_) |
| uint16_t | active_colors_size () |
| void | add_neighboor (uint neighboor_id, uint color_num) |
| bool | is_in_messages (uint node_id, uint payload) |
| void | print_metrics () |
| void | get_metrics (uint8_t *buf, uint8_t pos) |
| void | add_node_color (uint node_id, uint color_num) |
| uint16_t | add_forbidden_color (uint32_t color) |
| void | change_node_color (uint node_id, uint color_num) |
| void | set_diameter (uint32_t diam) |
| uint32_t | compare (const void *a, const void *b) |
| void | init (Radio &radio, Timer &timer, Debug &debug) |
| void | destruct () |
Construction / Destruction | |
| TwoHopsColoring () | |
| ~TwoHopsColoring () | |
Routing Control | |
| void | enable (void) |
| void | disable (void) |
Methods called by Timer | |
| void | timer_elapsed (void *userdata) |
Methods called by RadioModel | |
| void | receive (node_id_t from, size_t len, block_data_t *data) |
Method that checks satisfaction with color | |
| uint32_t | satisfied (uint32_t i) |
Method that makes a greed move | |
| void | greed_move (uint32_t i) |
| void | try_greed () |
| void | try_change () |
| void | bootstrap_message () |
| and send bootstraping message to the network | |
| uint16_t | get_neighboors () |
| the number of neighboors and who are they if debug | |
| uint16_t | get_color_nodes () |
| the number of neighboors and who are they if debug | |
Two Hops Coloring Algorithm.
A two hops coloring algorithm.
| typedef Radio::block_data_t wiselib::TwoHopsColoring< OsModel_P, Radio_P, Debug_P >::block_data_t |
| typedef TwoHopsMessage<OsModel, Radio> wiselib::TwoHopsColoring< OsModel_P, Radio_P, Debug_P >::coloring_message |
| typedef ColorsTable<OsModel, Radio> wiselib::TwoHopsColoring< OsModel_P, Radio_P, Debug_P >::ColorsSorted |
| typedef MapStaticVector<OsModel , uint32_t, uint32_t, 50> wiselib::TwoHopsColoring< OsModel_P, Radio_P, Debug_P >::ColorTable |
| typedef wiselib::MapStaticVector<OsModel , uint32_t, uint32_t, 50>::iterator wiselib::TwoHopsColoring< OsModel_P, Radio_P, Debug_P >::ColorTable_iterator |
| typedef Debug_P wiselib::TwoHopsColoring< OsModel_P, Radio_P, Debug_P >::Debug |
| typedef MapStaticVector<OsModel , uint32_t, uint32_t, 100> wiselib::TwoHopsColoring< OsModel_P, Radio_P, Debug_P >::ForbiddenTable |
| typedef wiselib::MapStaticVector<OsModel , uint32_t, uint32_t, 100>::iterator wiselib::TwoHopsColoring< OsModel_P, Radio_P, Debug_P >::ForbiddenTable_iterator |
| typedef Timer::millis_t wiselib::TwoHopsColoring< OsModel_P, Radio_P, Debug_P >::millis_t |
| typedef Radio::node_id_t wiselib::TwoHopsColoring< OsModel_P, Radio_P, Debug_P >::node_id_t |
| typedef OsModel_P wiselib::TwoHopsColoring< OsModel_P, Radio_P, Debug_P >::OsModel |
| typedef wiselib::pair<uint32_t, uint32_t> wiselib::TwoHopsColoring< OsModel_P, Radio_P, Debug_P >::pair_t |
| typedef Radio_P wiselib::TwoHopsColoring< OsModel_P, Radio_P, Debug_P >::Radio |
| typedef TwoHopsColoring<OsModel, Radio, Debug> wiselib::TwoHopsColoring< OsModel_P, Radio_P, Debug_P >::self_type |
| typedef Radio::size_t wiselib::TwoHopsColoring< OsModel_P, Radio_P, Debug_P >::size_t |
| typedef OsModel_P::Timer wiselib::TwoHopsColoring< OsModel_P, Radio_P, Debug_P >::Timer |
| wiselib::TwoHopsColoring< OsModel_P, Radio_P, Debug_P >::TwoHopsColoring | ( | ) |
| wiselib::TwoHopsColoring< OsModel_P, Radio_P, Debug_P >::~TwoHopsColoring | ( | ) |
| uint16_t wiselib::TwoHopsColoring< OsModel_P, Radio_P, Debug_P >::active_colors_size | ( | ) | [inline] |
| uint16_t wiselib::TwoHopsColoring< OsModel_P, Radio_P, Debug_P >::add_forbidden_color | ( | uint32_t | color | ) | [inline] |
| void wiselib::TwoHopsColoring< OsModel_P, Radio_P, Debug_P >::add_neighboor | ( | uint | neighboor_id, |
| uint | color_num | ||
| ) | [inline] |
| void wiselib::TwoHopsColoring< OsModel_P, Radio_P, Debug_P >::add_node_color | ( | uint | node_id, |
| uint | color_num | ||
| ) | [inline] |
| void wiselib::TwoHopsColoring< OsModel_P, Radio_P, Debug_P >::bootstrap_message | ( | ) |
and send bootstraping message to the network
| void wiselib::TwoHopsColoring< OsModel_P, Radio_P, Debug_P >::change_node_color | ( | uint | node_id, |
| uint | color_num | ||
| ) | [inline] |
| uint32_t wiselib::TwoHopsColoring< OsModel_P, Radio_P, Debug_P >::compare | ( | const void * | a, |
| const void * | b | ||
| ) | [inline] |
| void wiselib::TwoHopsColoring< OsModel_P, Radio_P, Debug_P >::destruct | ( | void | ) | [inline] |
| void wiselib::TwoHopsColoring< OsModel_P, Radio_P, Debug_P >::disable | ( | void | ) |
| void wiselib::TwoHopsColoring< OsModel_P, Radio_P, Debug_P >::enable | ( | void | ) |
| uint32_t wiselib::TwoHopsColoring< OsModel_P, Radio_P, Debug_P >::fm | ( | uint32_t | arr[], |
| uint32_t | b, | ||
| uint32_t | n | ||
| ) | [inline] |
| uint32_t wiselib::TwoHopsColoring< OsModel_P, Radio_P, Debug_P >::get_alg_messages | ( | ) | [inline] |
| uint32_t wiselib::TwoHopsColoring< OsModel_P, Radio_P, Debug_P >::get_color | ( | ) | [inline] |
| uint16_t wiselib::TwoHopsColoring< OsModel_P, Radio_P, Debug_P >::get_color_nodes | ( | ) |
the number of neighboors and who are they if debug
| void wiselib::TwoHopsColoring< OsModel_P, Radio_P, Debug_P >::get_metrics | ( | uint8_t * | buf, |
| uint8_t | pos | ||
| ) | [inline] |
| uint16_t wiselib::TwoHopsColoring< OsModel_P, Radio_P, Debug_P >::get_neighboors | ( | ) |
the number of neighboors and who are they if debug
| void wiselib::TwoHopsColoring< OsModel_P, Radio_P, Debug_P >::greed_move | ( | uint32_t | i | ) |
| void wiselib::TwoHopsColoring< OsModel_P, Radio_P, Debug_P >::init | ( | Radio & | radio, |
| Timer & | timer, | ||
| Debug & | debug | ||
| ) | [inline] |
| bool wiselib::TwoHopsColoring< OsModel_P, Radio_P, Debug_P >::is_in_messages | ( | uint | node_id, |
| uint | payload | ||
| ) | [inline] |
| void wiselib::TwoHopsColoring< OsModel_P, Radio_P, Debug_P >::isort | ( | uint32_t | arr[], |
| uint32_t | n | ||
| ) | [inline] |
| void wiselib::TwoHopsColoring< OsModel_P, Radio_P, Debug_P >::print_metrics | ( | ) | [inline] |
| void wiselib::TwoHopsColoring< OsModel_P, Radio_P, Debug_P >::receive | ( | node_id_t | from, |
| size_t | len, | ||
| block_data_t * | data | ||
| ) |
| uint32_t wiselib::TwoHopsColoring< OsModel_P, Radio_P, Debug_P >::satisfied | ( | uint32_t | i | ) |
| void wiselib::TwoHopsColoring< OsModel_P, Radio_P, Debug_P >::send_special_message | ( | uint8_t * | payload, |
| node_id_t | source, | ||
| uint8_t | msg_id, | ||
| node_id_t | destination, | ||
| uint8_t | routing_type, | ||
| uint | hops, | ||
| uint16_t | msg_id_num | ||
| ) |
| void wiselib::TwoHopsColoring< OsModel_P, Radio_P, Debug_P >::set_color | ( | uint32_t | color_ | ) | [inline] |
| void wiselib::TwoHopsColoring< OsModel_P, Radio_P, Debug_P >::set_diameter | ( | uint32_t | diam | ) | [inline] |
| void wiselib::TwoHopsColoring< OsModel_P, Radio_P, Debug_P >::timer_elapsed | ( | void * | userdata | ) |
| void wiselib::TwoHopsColoring< OsModel_P, Radio_P, Debug_P >::try_change | ( | ) |
| void wiselib::TwoHopsColoring< OsModel_P, Radio_P, Debug_P >::try_greed | ( | ) |
1.7.4