Wiselib
|
Random Coloring Algorithm. More...
#include <rand_coloring.h>
Public Types | |
typedef OsModel_P | OsModel |
typedef Radio_P | Radio |
typedef Debug_P | Debug |
typedef OsModel_P::Timer | Timer |
typedef RandColoring< OsModel, Radio, Debug > | self_type |
typedef wiselib::StaticArrayRoutingTable < OsModel, Radio, 8, wiselib::ToraRoutingTableValue < OsModel, Radio > > | ToraRoutingTable |
typedef ToraRouting< OsModel, ToraRoutingTable, Radio, Debug > | tora_routing_t |
typedef ToraRoutingMessage < OsModel_P, Radio > | tora_message |
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 StlMapColorTable < OsModel, Radio, node_id_t > | ColorTable |
typedef StlMapColorTable < OsModel, Radio, node_id_t > | ForbiddenTable |
typedef ColorsTable< OsModel, Radio > | ColorsSorted |
Public Member Functions | |
void | send_special_message (uint8_t *payload, uint source, uint8_t msg_id, uint destination, uint8_t routing_type, uint hops, uint16_t msg_id_num) |
int | fm (int arr[], int b, int n) |
void | isort (int arr[], int n) |
int | get_alg_messages () |
int | get_color () |
void | set_color (int color_) |
int | get_network_size () |
void | set_network_size (int net_size_) |
uint16_t | active_colors_size () |
uint16_t | add_neighboor (uint neighboor_id, uint color_num) |
bool | is_in_messages (uint node_id, uint payload) |
void | print_metrics () |
uint16_t | add_node_color (uint node_id, uint color_num) |
uint16_t | add_forbidden_color (int color, int neigh) |
void | change_node_color (uint node_id, uint color_num) |
void | set_tora_routing (tora_routing_t *tora) |
void | set_diameter (int diam) |
void | do_links () |
int | compare (const void *a, const void *b) |
void | init (Radio &radio, Timer &timer, Debug &debug) |
void | destruct () |
Construction / Destruction | |
RandColoring () | |
~RandColoring () | |
Routing Control | |
void | enable (void) |
void | disable (void) |
Methods called by Timer | |
void | timer_elapsed (void *userdata) |
void | resend_requests (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 | |
int | satisfied (int i) |
Method that makes a greed move | |
void | greed_move (int i) |
void | try_change () |
Method that tries a greed move | |
void | try_greed () |
Method that tries a fb move | |
void | try_fb () |
void | bootstrap_message () |
and send bootstraping message to the network | |
void | send_color_requests () |
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 |
Random Coloring Algorithm.
A random coloring algorithm.
typedef Radio::block_data_t wiselib::RandColoring< OsModel_P, Radio_P, Debug_P >::block_data_t |
typedef TwoHopsMessage<OsModel, Radio> wiselib::RandColoring< OsModel_P, Radio_P, Debug_P >::coloring_message |
typedef ColorsTable<OsModel, Radio> wiselib::RandColoring< OsModel_P, Radio_P, Debug_P >::ColorsSorted |
typedef StlMapColorTable<OsModel, Radio, node_id_t> wiselib::RandColoring< OsModel_P, Radio_P, Debug_P >::ColorTable |
typedef Debug_P wiselib::RandColoring< OsModel_P, Radio_P, Debug_P >::Debug |
typedef StlMapColorTable<OsModel, Radio, node_id_t> wiselib::RandColoring< OsModel_P, Radio_P, Debug_P >::ForbiddenTable |
typedef Timer::millis_t wiselib::RandColoring< OsModel_P, Radio_P, Debug_P >::millis_t |
typedef Radio::node_id_t wiselib::RandColoring< OsModel_P, Radio_P, Debug_P >::node_id_t |
typedef OsModel_P wiselib::RandColoring< OsModel_P, Radio_P, Debug_P >::OsModel |
typedef Radio_P wiselib::RandColoring< OsModel_P, Radio_P, Debug_P >::Radio |
typedef RandColoring<OsModel, Radio, Debug> wiselib::RandColoring< OsModel_P, Radio_P, Debug_P >::self_type |
typedef Radio::size_t wiselib::RandColoring< OsModel_P, Radio_P, Debug_P >::size_t |
typedef OsModel_P::Timer wiselib::RandColoring< OsModel_P, Radio_P, Debug_P >::Timer |
typedef ToraRoutingMessage<OsModel_P, Radio> wiselib::RandColoring< OsModel_P, Radio_P, Debug_P >::tora_message |
typedef ToraRouting<OsModel, ToraRoutingTable, Radio, Debug> wiselib::RandColoring< OsModel_P, Radio_P, Debug_P >::tora_routing_t |
typedef wiselib::StaticArrayRoutingTable<OsModel, Radio, 8, wiselib::ToraRoutingTableValue<OsModel, Radio> > wiselib::RandColoring< OsModel_P, Radio_P, Debug_P >::ToraRoutingTable |
wiselib::RandColoring< OsModel_P, Radio_P, Debug_P >::RandColoring | ( | ) |
wiselib::RandColoring< OsModel_P, Radio_P, Debug_P >::~RandColoring | ( | ) |
uint16_t wiselib::RandColoring< OsModel_P, Radio_P, Debug_P >::active_colors_size | ( | ) | [inline] |
uint16_t wiselib::RandColoring< OsModel_P, Radio_P, Debug_P >::add_forbidden_color | ( | int | color, |
int | neigh | ||
) | [inline] |
uint16_t wiselib::RandColoring< OsModel_P, Radio_P, Debug_P >::add_neighboor | ( | uint | neighboor_id, |
uint | color_num | ||
) | [inline] |
uint16_t wiselib::RandColoring< OsModel_P, Radio_P, Debug_P >::add_node_color | ( | uint | node_id, |
uint | color_num | ||
) | [inline] |
void wiselib::RandColoring< OsModel_P, Radio_P, Debug_P >::bootstrap_message | ( | ) |
and send bootstraping message to the network
void wiselib::RandColoring< OsModel_P, Radio_P, Debug_P >::change_node_color | ( | uint | node_id, |
uint | color_num | ||
) | [inline] |
int wiselib::RandColoring< OsModel_P, Radio_P, Debug_P >::compare | ( | const void * | a, |
const void * | b | ||
) | [inline] |
void wiselib::RandColoring< OsModel_P, Radio_P, Debug_P >::destruct | ( | void | ) | [inline] |
void wiselib::RandColoring< OsModel_P, Radio_P, Debug_P >::disable | ( | void | ) |
void wiselib::RandColoring< OsModel_P, Radio_P, Debug_P >::do_links | ( | ) | [inline] |
void wiselib::RandColoring< OsModel_P, Radio_P, Debug_P >::enable | ( | void | ) |
int wiselib::RandColoring< OsModel_P, Radio_P, Debug_P >::fm | ( | int | arr[], |
int | b, | ||
int | n | ||
) | [inline] |
int wiselib::RandColoring< OsModel_P, Radio_P, Debug_P >::get_alg_messages | ( | ) | [inline] |
int wiselib::RandColoring< OsModel_P, Radio_P, Debug_P >::get_color | ( | ) | [inline] |
uint16_t wiselib::RandColoring< OsModel_P, Radio_P, Debug_P >::get_color_nodes | ( | ) |
the number of neighboors and who are they if debug
uint16_t wiselib::RandColoring< OsModel_P, Radio_P, Debug_P >::get_neighboors | ( | ) |
the number of neighboors and who are they if debug
int wiselib::RandColoring< OsModel_P, Radio_P, Debug_P >::get_network_size | ( | ) | [inline] |
void wiselib::RandColoring< OsModel_P, Radio_P, Debug_P >::greed_move | ( | int | i | ) |
void wiselib::RandColoring< OsModel_P, Radio_P, Debug_P >::init | ( | Radio & | radio, |
Timer & | timer, | ||
Debug & | debug | ||
) | [inline] |
bool wiselib::RandColoring< OsModel_P, Radio_P, Debug_P >::is_in_messages | ( | uint | node_id, |
uint | payload | ||
) | [inline] |
void wiselib::RandColoring< OsModel_P, Radio_P, Debug_P >::isort | ( | int | arr[], |
int | n | ||
) | [inline] |
void wiselib::RandColoring< OsModel_P, Radio_P, Debug_P >::print_metrics | ( | ) | [inline] |
void wiselib::RandColoring< OsModel_P, Radio_P, Debug_P >::receive | ( | node_id_t | from, |
size_t | len, | ||
block_data_t * | data | ||
) |
void wiselib::RandColoring< OsModel_P, Radio_P, Debug_P >::resend_requests | ( | void * | userdata | ) |
int wiselib::RandColoring< OsModel_P, Radio_P, Debug_P >::satisfied | ( | int | i | ) |
void wiselib::RandColoring< OsModel_P, Radio_P, Debug_P >::send_color_requests | ( | ) |
and send bootstraping message to the network
void wiselib::RandColoring< OsModel_P, Radio_P, Debug_P >::send_special_message | ( | uint8_t * | payload, |
uint | source, | ||
uint8_t | msg_id, | ||
uint | destination, | ||
uint8_t | routing_type, | ||
uint | hops, | ||
uint16_t | msg_id_num | ||
) |
void wiselib::RandColoring< OsModel_P, Radio_P, Debug_P >::set_color | ( | int | color_ | ) | [inline] |
void wiselib::RandColoring< OsModel_P, Radio_P, Debug_P >::set_diameter | ( | int | diam | ) | [inline] |
void wiselib::RandColoring< OsModel_P, Radio_P, Debug_P >::set_network_size | ( | int | net_size_ | ) | [inline] |
void wiselib::RandColoring< OsModel_P, Radio_P, Debug_P >::set_tora_routing | ( | tora_routing_t * | tora | ) | [inline] |
void wiselib::RandColoring< OsModel_P, Radio_P, Debug_P >::timer_elapsed | ( | void * | userdata | ) |
void wiselib::RandColoring< OsModel_P, Radio_P, Debug_P >::try_change | ( | ) |
void wiselib::RandColoring< OsModel_P, Radio_P, Debug_P >::try_fb | ( | ) |
void wiselib::RandColoring< OsModel_P, Radio_P, Debug_P >::try_greed | ( | ) |