Greedy routing algorithm.
More...
#include <greedy.h>
Inherits wiselib::RoutingBase< OsModel_P, Radio_P >.
List of all members.
Public Types |
enum | SpecialNodeIds { BROADCAST_ADDRESS = Radio_P::BROADCAST_ADDRESS,
NULL_NODE_ID = Radio_P::NULL_NODE_ID
} |
enum | Restrictions { MAX_MESSAGE_LENGTH = Radio_P::MAX_MESSAGE_LENGTH - Message::PAYLOAD_POS
} |
typedef OsModel_P | OsModel |
typedef Radio_P | Radio |
typedef Debug_P | Debug |
typedef Node_P | Node |
typedef NodeList_P | NodeList |
typedef Node::NodePosition::Float | Float |
typedef Timer_P | Timer |
typedef Greedy< OsModel, Node,
NodeList, Timer, 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 Radio::message_id_t | message_id_t |
typedef NodeList::iterator | NodeList_Iterator |
typedef Node::NodePosition | Position |
typedef Greedy_Message
< OsModel, Node, Radio > | Message |
enum | ReturnValues |
typedef delegate3< void,
node_id_t, size_t,
block_data_t * > | radio_delegate_t |
typedef vector_static< OsModel,
radio_delegate_t,
MAX_RECEIVERS > | CallbackVector |
typedef CallbackVector::iterator | CallbackVectorIterator |
Public Member Functions |
| Greedy (node_id_t sid) |
| ~Greedy () |
void | enable_radio (void) |
void | disable_radio (void) |
void | send (node_id_t receiver, size_t len, block_data_t *data, message_id_t msg_id, Node n) |
void | receive (node_id_t from, size_t len, block_data_t *data) |
void | send_neighbor_discovery (void *userdata) |
void | send_greedily (void *userdata) |
node_id_t | greedy_recipient () |
void | print_neighbors (void *userdata) |
void | init (Radio &radio, Timer &timer, Debug &debug) |
void | destruct () |
Radio::node_id_t | id () |
int | reg_recv_callback (T *obj_pnt) |
int | unreg_recv_callback (int idx) |
void | notify_receivers (node_id_t from, size_t len, block_data_t *data) |
Public Attributes |
NodeList | neighbors |
Node | self |
node_id_t | sender_id |
Position | destination |
Detailed Description
template<typename OsModel_P, typename Node_P, typename NodeList_P, typename Timer_P = typename OsModel_P::Timer, typename Radio_P = typename OsModel_P::Radio, typename Debug_P = typename OsModel_P::Debug>
class wiselib::Greedy< OsModel_P, Node_P, NodeList_P, Timer_P, Radio_P, Debug_P >
Greedy routing algorithm.
Greedy routing algorithm
Member Typedef Documentation
template<typename OsModel_P , typename Node_P , typename NodeList_P , typename Timer_P = typename OsModel_P::Timer, typename Radio_P = typename OsModel_P::Radio, typename Debug_P = typename OsModel_P::Debug>
template<typename OsModel_P , typename Node_P , typename NodeList_P , typename Timer_P = typename OsModel_P::Timer, typename Radio_P = typename OsModel_P::Radio, typename Debug_P = typename OsModel_P::Debug>
template<typename OsModel_P , typename Node_P , typename NodeList_P , typename Timer_P = typename OsModel_P::Timer, typename Radio_P = typename OsModel_P::Radio, typename Debug_P = typename OsModel_P::Debug>
typedef Node::NodePosition::Float wiselib::Greedy< OsModel_P, Node_P, NodeList_P, Timer_P, Radio_P, Debug_P >::Float |
template<typename OsModel_P , typename Node_P , typename NodeList_P , typename Timer_P = typename OsModel_P::Timer, typename Radio_P = typename OsModel_P::Radio, typename Debug_P = typename OsModel_P::Debug>
template<typename OsModel_P , typename Node_P , typename NodeList_P , typename Timer_P = typename OsModel_P::Timer, typename Radio_P = typename OsModel_P::Radio, typename Debug_P = typename OsModel_P::Debug>
template<typename OsModel_P , typename Node_P , typename NodeList_P , typename Timer_P = typename OsModel_P::Timer, typename Radio_P = typename OsModel_P::Radio, typename Debug_P = typename OsModel_P::Debug>
typedef Node_P wiselib::Greedy< OsModel_P, Node_P, NodeList_P, Timer_P, Radio_P, Debug_P >::Node |
template<typename OsModel_P , typename Node_P , typename NodeList_P , typename Timer_P = typename OsModel_P::Timer, typename Radio_P = typename OsModel_P::Radio, typename Debug_P = typename OsModel_P::Debug>
template<typename OsModel_P , typename Node_P , typename NodeList_P , typename Timer_P = typename OsModel_P::Timer, typename Radio_P = typename OsModel_P::Radio, typename Debug_P = typename OsModel_P::Debug>
template<typename OsModel_P , typename Node_P , typename NodeList_P , typename Timer_P = typename OsModel_P::Timer, typename Radio_P = typename OsModel_P::Radio, typename Debug_P = typename OsModel_P::Debug>
template<typename OsModel_P , typename Node_P , typename NodeList_P , typename Timer_P = typename OsModel_P::Timer, typename Radio_P = typename OsModel_P::Radio, typename Debug_P = typename OsModel_P::Debug>
template<typename OsModel_P , typename Node_P , typename NodeList_P , typename Timer_P = typename OsModel_P::Timer, typename Radio_P = typename OsModel_P::Radio, typename Debug_P = typename OsModel_P::Debug>
template<typename OsModel_P , typename Node_P , typename NodeList_P , typename Timer_P = typename OsModel_P::Timer, typename Radio_P = typename OsModel_P::Radio, typename Debug_P = typename OsModel_P::Debug>
template<typename OsModel_P , typename Node_P , typename NodeList_P , typename Timer_P = typename OsModel_P::Timer, typename Radio_P = typename OsModel_P::Radio, typename Debug_P = typename OsModel_P::Debug>
typedef Greedy<OsModel, Node, NodeList, Timer, Radio, Debug> wiselib::Greedy< OsModel_P, Node_P, NodeList_P, Timer_P, Radio_P, Debug_P >::self_type |
template<typename OsModel_P , typename Node_P , typename NodeList_P , typename Timer_P = typename OsModel_P::Timer, typename Radio_P = typename OsModel_P::Radio, typename Debug_P = typename OsModel_P::Debug>
template<typename OsModel_P , typename Node_P , typename NodeList_P , typename Timer_P = typename OsModel_P::Timer, typename Radio_P = typename OsModel_P::Radio, typename Debug_P = typename OsModel_P::Debug>
Member Enumeration Documentation
template<typename OsModel_P , typename Node_P , typename NodeList_P , typename Timer_P = typename OsModel_P::Timer, typename Radio_P = typename OsModel_P::Radio, typename Debug_P = typename OsModel_P::Debug>
- Enumerator:
MAX_MESSAGE_LENGTH |
Maximal number of bytes in payload.
|
template<typename OsModel_P , typename Node_P , typename NodeList_P , typename Timer_P = typename OsModel_P::Timer, typename Radio_P = typename OsModel_P::Radio, typename Debug_P = typename OsModel_P::Debug>
- Enumerator:
BROADCAST_ADDRESS |
All nodes in communication range.
|
NULL_NODE_ID |
Unknown/No node id.
|
Constructor & Destructor Documentation
template<typename OsModel_P , typename Node_P , typename NodeList_P , typename Timer_P , typename Radio_P , typename Debug_P >
template<typename OsModel_P , typename Node_P , typename NodeList_P , typename Timer_P , typename Radio_P , typename Debug_P >
Member Function Documentation
template<typename OsModel_P , typename Node_P , typename NodeList_P , typename Timer_P = typename OsModel_P::Timer, typename Radio_P = typename OsModel_P::Radio, typename Debug_P = typename OsModel_P::Debug>
void wiselib::Greedy< OsModel_P, Node_P, NodeList_P, Timer_P, Radio_P, Debug_P >::destruct |
( |
void |
| ) |
[inline] |
template<typename OsModel_P , typename Node_P , typename NodeList_P , typename Timer_P , typename Radio_P , typename Debug_P >
void wiselib::Greedy< OsModel_P, Node_P, NodeList_P, Timer_P, Radio_P, Debug_P >::disable_radio |
( |
void |
| ) |
|
template<typename OsModel_P , typename Node_P , typename NodeList_P , typename Timer_P , typename Radio_P , typename Debug_P >
void wiselib::Greedy< OsModel_P, Node_P, NodeList_P, Timer_P, Radio_P, Debug_P >::enable_radio |
( |
void |
| ) |
|
template<typename OsModel_P , typename Node_P , typename NodeList_P , typename Timer_P = typename OsModel_P::Timer, typename Radio_P = typename OsModel_P::Radio, typename Debug_P = typename OsModel_P::Debug>
template<typename OsModel_P , typename Node_P , typename NodeList_P , typename Timer_P = typename OsModel_P::Timer, typename Radio_P = typename OsModel_P::Radio, typename Debug_P = typename OsModel_P::Debug>
template<typename OsModel_P , typename Node_P , typename NodeList_P , typename Timer_P = typename OsModel_P::Timer, typename Radio_P = typename OsModel_P::Radio, typename Debug_P = typename OsModel_P::Debug>
template<typename OsModel_P , typename Node_P , typename NodeList_P , typename Timer_P , typename Radio_P , typename Debug_P >
void wiselib::Greedy< OsModel_P, Node_P, NodeList_P, Timer_P, Radio_P, Debug_P >::print_neighbors |
( |
void * |
userdata | ) |
|
template<typename OsModel_P , typename Node_P , typename NodeList_P , typename Timer_P , typename Radio_P , typename Debug_P >
template<typename OsModel_P , typename Node_P , typename NodeList_P , typename Timer_P , typename Radio_P , typename Debug_P >
template<typename OsModel_P , typename Node_P , typename NodeList_P , typename Timer_P , typename Radio_P , typename Debug_P >
void wiselib::Greedy< OsModel_P, Node_P, NodeList_P, Timer_P, Radio_P, Debug_P >::send_greedily |
( |
void * |
userdata | ) |
|
template<typename OsModel_P , typename Node_P , typename NodeList_P , typename Timer_P , typename Radio_P , typename Debug_P >
void wiselib::Greedy< OsModel_P, Node_P, NodeList_P, Timer_P, Radio_P, Debug_P >::send_neighbor_discovery |
( |
void * |
userdata | ) |
|
Member Data Documentation
template<typename OsModel_P , typename Node_P , typename NodeList_P , typename Timer_P = typename OsModel_P::Timer, typename Radio_P = typename OsModel_P::Radio, typename Debug_P = typename OsModel_P::Debug>
template<typename OsModel_P , typename Node_P , typename NodeList_P , typename Timer_P = typename OsModel_P::Timer, typename Radio_P = typename OsModel_P::Radio, typename Debug_P = typename OsModel_P::Debug>
template<typename OsModel_P , typename Node_P , typename NodeList_P , typename Timer_P = typename OsModel_P::Timer, typename Radio_P = typename OsModel_P::Radio, typename Debug_P = typename OsModel_P::Debug>
template<typename OsModel_P , typename Node_P , typename NodeList_P , typename Timer_P = typename OsModel_P::Timer, typename Radio_P = typename OsModel_P::Radio, typename Debug_P = typename OsModel_P::Debug>
The documentation for this class was generated from the following file:
- wiselib.testing/algorithms/routing/greedy/greedy.h