Wiselib
Public Types | Public Member Functions
wiselib::ToraRouting< OsModel_P, RoutingTable_P, Radio_P, Debug_P > Class Template Reference

Tora routing algorithm. More...

#include <tora_routing.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 - RoutingMessage::PAYLOAD_POS }
typedef OsModel_P OsModel
typedef Radio_P Radio
typedef Debug_P Debug
typedef RoutingTable_P RoutingTable
typedef RoutingTable::iterator RoutingTableIterator
typedef RoutingTable::value_type RoutingTableValue
typedef RoutingTable::mapped_type RoutingTableEntry
typedef ToraRouting< OsModel,
RoutingTable, Radio, Debug
self_type
typedef OsModel_P::Timer Timer
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 ToraRoutingMessage
< OsModel, Radio
RoutingMessage
typedef ToraBroadcastMessage
< OsModel, Radio,
RoutingTableValue, 8 > 
BroadcastMessage
typedef map< int,
RoutingMessage * > 
pend_msg_t
typedef map< int, heightNeighborsHeight
typedef std::map< int, bool > route_required_flag
typedef std::map< int, int > link_state
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

void recvBDC (node_id_t)
void recvQRY (node_id_t, int)
void recvUPD (node_id_t, RoutingMessage *)
void recvCLR (node_id_t, RoutingMessage *)
void recvDATA (node_id_t, RoutingMessage *)
void clearDest ()
void printNeighbors ()
 Debug functions.
void printHeight (int)
void init (Radio &radio, Timer &timer, Debug &debug)
void destruct ()
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)
Construction / Destruction
 ToraRouting ()
 ~ToraRouting ()
Routing Control
void enable_radio (void)
void disable_radio (void)
Radio Concept
void send (node_id_t receiver, size_t len, block_data_t *data)
void receive (node_id_t from, size_t len, block_data_t *data)
Radio::node_id_t id ()
Methods called by Timer
void timer_elapsed (void *userdata)

Detailed Description

template<typename OsModel_P, typename RoutingTable_P, typename Radio_P = typename OsModel_P::Radio, typename Debug_P = typename OsModel_P::Debug>
class wiselib::ToraRouting< OsModel_P, RoutingTable_P, Radio_P, Debug_P >

Tora routing algorithm.


Member Typedef Documentation

template<typename OsModel_P , typename RoutingTable_P , typename Radio_P = typename OsModel_P::Radio, typename Debug_P = typename OsModel_P::Debug>
typedef Radio::block_data_t wiselib::ToraRouting< OsModel_P, RoutingTable_P, Radio_P, Debug_P >::block_data_t
template<typename OsModel_P , typename RoutingTable_P , typename Radio_P = typename OsModel_P::Radio, typename Debug_P = typename OsModel_P::Debug>
typedef ToraBroadcastMessage<OsModel, Radio, RoutingTableValue, 8 > wiselib::ToraRouting< OsModel_P, RoutingTable_P, Radio_P, Debug_P >::BroadcastMessage
template<typename OsModel_P , typename RoutingTable_P , typename Radio_P = typename OsModel_P::Radio, typename Debug_P = typename OsModel_P::Debug>
typedef Debug_P wiselib::ToraRouting< OsModel_P, RoutingTable_P, Radio_P, Debug_P >::Debug
template<typename OsModel_P , typename RoutingTable_P , typename Radio_P = typename OsModel_P::Radio, typename Debug_P = typename OsModel_P::Debug>
typedef std::map<int, int> wiselib::ToraRouting< OsModel_P, RoutingTable_P, Radio_P, Debug_P >::link_state
template<typename OsModel_P , typename RoutingTable_P , typename Radio_P = typename OsModel_P::Radio, typename Debug_P = typename OsModel_P::Debug>
typedef Timer::millis_t wiselib::ToraRouting< OsModel_P, RoutingTable_P, Radio_P, Debug_P >::millis_t
template<typename OsModel_P , typename RoutingTable_P , typename Radio_P = typename OsModel_P::Radio, typename Debug_P = typename OsModel_P::Debug>
typedef map<int, height> wiselib::ToraRouting< OsModel_P, RoutingTable_P, Radio_P, Debug_P >::NeighborsHeight
template<typename OsModel_P , typename RoutingTable_P , typename Radio_P = typename OsModel_P::Radio, typename Debug_P = typename OsModel_P::Debug>
typedef Radio::node_id_t wiselib::ToraRouting< OsModel_P, RoutingTable_P, Radio_P, Debug_P >::node_id_t
template<typename OsModel_P , typename RoutingTable_P , typename Radio_P = typename OsModel_P::Radio, typename Debug_P = typename OsModel_P::Debug>
typedef OsModel_P wiselib::ToraRouting< OsModel_P, RoutingTable_P, Radio_P, Debug_P >::OsModel
template<typename OsModel_P , typename RoutingTable_P , typename Radio_P = typename OsModel_P::Radio, typename Debug_P = typename OsModel_P::Debug>
typedef map<int, RoutingMessage*> wiselib::ToraRouting< OsModel_P, RoutingTable_P, Radio_P, Debug_P >::pend_msg_t
template<typename OsModel_P , typename RoutingTable_P , typename Radio_P = typename OsModel_P::Radio, typename Debug_P = typename OsModel_P::Debug>
typedef Radio_P wiselib::ToraRouting< OsModel_P, RoutingTable_P, Radio_P, Debug_P >::Radio
typedef delegate3<void, node_id_t, size_t, block_data_t*> wiselib::RadioBase< OsModel_P, Radio_P::node_id_t , Radio_P::size_t , Radio_P::block_data_t , MAX_RECEIVERS >::radio_delegate_t [inherited]
template<typename OsModel_P , typename RoutingTable_P , typename Radio_P = typename OsModel_P::Radio, typename Debug_P = typename OsModel_P::Debug>
typedef std::map<int, bool> wiselib::ToraRouting< OsModel_P, RoutingTable_P, Radio_P, Debug_P >::route_required_flag
template<typename OsModel_P , typename RoutingTable_P , typename Radio_P = typename OsModel_P::Radio, typename Debug_P = typename OsModel_P::Debug>
typedef ToraRoutingMessage<OsModel, Radio> wiselib::ToraRouting< OsModel_P, RoutingTable_P, Radio_P, Debug_P >::RoutingMessage
template<typename OsModel_P , typename RoutingTable_P , typename Radio_P = typename OsModel_P::Radio, typename Debug_P = typename OsModel_P::Debug>
typedef RoutingTable_P wiselib::ToraRouting< OsModel_P, RoutingTable_P, Radio_P, Debug_P >::RoutingTable
template<typename OsModel_P , typename RoutingTable_P , typename Radio_P = typename OsModel_P::Radio, typename Debug_P = typename OsModel_P::Debug>
typedef RoutingTable::mapped_type wiselib::ToraRouting< OsModel_P, RoutingTable_P, Radio_P, Debug_P >::RoutingTableEntry
template<typename OsModel_P , typename RoutingTable_P , typename Radio_P = typename OsModel_P::Radio, typename Debug_P = typename OsModel_P::Debug>
typedef RoutingTable::iterator wiselib::ToraRouting< OsModel_P, RoutingTable_P, Radio_P, Debug_P >::RoutingTableIterator
template<typename OsModel_P , typename RoutingTable_P , typename Radio_P = typename OsModel_P::Radio, typename Debug_P = typename OsModel_P::Debug>
typedef RoutingTable::value_type wiselib::ToraRouting< OsModel_P, RoutingTable_P, Radio_P, Debug_P >::RoutingTableValue
template<typename OsModel_P , typename RoutingTable_P , typename Radio_P = typename OsModel_P::Radio, typename Debug_P = typename OsModel_P::Debug>
typedef ToraRouting<OsModel, RoutingTable, Radio, Debug> wiselib::ToraRouting< OsModel_P, RoutingTable_P, Radio_P, Debug_P >::self_type
template<typename OsModel_P , typename RoutingTable_P , typename Radio_P = typename OsModel_P::Radio, typename Debug_P = typename OsModel_P::Debug>
typedef Radio::size_t wiselib::ToraRouting< OsModel_P, RoutingTable_P, Radio_P, Debug_P >::size_t
template<typename OsModel_P , typename RoutingTable_P , typename Radio_P = typename OsModel_P::Radio, typename Debug_P = typename OsModel_P::Debug>
typedef OsModel_P::Timer wiselib::ToraRouting< OsModel_P, RoutingTable_P, Radio_P, Debug_P >::Timer

Member Enumeration Documentation

template<typename OsModel_P , typename RoutingTable_P , typename Radio_P = typename OsModel_P::Radio, typename Debug_P = typename OsModel_P::Debug>
enum wiselib::ToraRouting::Restrictions
Enumerator:
MAX_MESSAGE_LENGTH 

Maximal number of bytes in payload.

template<typename OsModel_P , typename RoutingTable_P , typename Radio_P = typename OsModel_P::Radio, typename Debug_P = typename OsModel_P::Debug>
enum wiselib::ToraRouting::SpecialNodeIds
Enumerator:
BROADCAST_ADDRESS 

All nodes in communication range.

NULL_NODE_ID 

Unknown/No node id.


Constructor & Destructor Documentation

template<typename OsModel_P , typename RoutingTable_P , typename Radio_P , typename Debug_P >
wiselib::ToraRouting< OsModel_P, RoutingTable_P, Radio_P, Debug_P >::ToraRouting ( )
template<typename OsModel_P , typename RoutingTable_P , typename Radio_P , typename Debug_P >
wiselib::ToraRouting< OsModel_P, RoutingTable_P, Radio_P, Debug_P >::~ToraRouting ( )

Member Function Documentation

template<typename OsModel_P , typename RoutingTable_P , typename Radio_P , typename Debug_P >
void wiselib::ToraRouting< OsModel_P, RoutingTable_P, Radio_P, Debug_P >::clearDest ( )
template<typename OsModel_P , typename RoutingTable_P , typename Radio_P = typename OsModel_P::Radio, typename Debug_P = typename OsModel_P::Debug>
void wiselib::ToraRouting< OsModel_P, RoutingTable_P, Radio_P, Debug_P >::destruct ( void  ) [inline]
template<typename OsModel_P , typename RoutingTable_P , typename Radio_P , typename Debug_P >
void wiselib::ToraRouting< OsModel_P, RoutingTable_P, Radio_P, Debug_P >::disable_radio ( void  )
template<typename OsModel_P , typename RoutingTable_P , typename Radio_P , typename Debug_P >
void wiselib::ToraRouting< OsModel_P, RoutingTable_P, Radio_P, Debug_P >::enable_radio ( void  )
template<typename OsModel_P , typename RoutingTable_P , typename Radio_P = typename OsModel_P::Radio, typename Debug_P = typename OsModel_P::Debug>
Radio::node_id_t wiselib::ToraRouting< OsModel_P, RoutingTable_P, Radio_P, Debug_P >::id ( void  ) [inline]
template<typename OsModel_P , typename RoutingTable_P , typename Radio_P = typename OsModel_P::Radio, typename Debug_P = typename OsModel_P::Debug>
void wiselib::ToraRouting< OsModel_P, RoutingTable_P, Radio_P, Debug_P >::init ( Radio radio,
Timer timer,
Debug debug 
) [inline]
void wiselib::RadioBase< OsModel_P, Radio_P::node_id_t , Radio_P::size_t , Radio_P::block_data_t , MAX_RECEIVERS >::notify_receivers ( node_id_t  from,
size_t  len,
block_data_t data 
) [inline, inherited]
template<typename OsModel_P , typename RoutingTable_P , typename Radio_P , typename Debug_P >
void wiselib::ToraRouting< OsModel_P, RoutingTable_P, Radio_P, Debug_P >::printHeight ( int  dest) [inline]
template<typename OsModel_P , typename RoutingTable_P , typename Radio_P , typename Debug_P >
void wiselib::ToraRouting< OsModel_P, RoutingTable_P, Radio_P, Debug_P >::printNeighbors ( ) [inline]

Debug functions.

template<typename OsModel_P , typename RoutingTable_P , typename Radio_P , typename Debug_P >
void wiselib::ToraRouting< OsModel_P, RoutingTable_P, Radio_P, Debug_P >::receive ( node_id_t  from,
size_t  len,
block_data_t data 
)
template<typename OsModel_P , typename RoutingTable_P , typename Radio_P , typename Debug_P >
void wiselib::ToraRouting< OsModel_P, RoutingTable_P, Radio_P, Debug_P >::recvBDC ( node_id_t  from)
template<typename OsModel_P , typename RoutingTable_P , typename Radio_P , typename Debug_P >
void wiselib::ToraRouting< OsModel_P, RoutingTable_P, Radio_P, Debug_P >::recvCLR ( node_id_t  from,
RoutingMessage hmsg 
)
template<typename OsModel_P , typename RoutingTable_P , typename Radio_P , typename Debug_P >
void wiselib::ToraRouting< OsModel_P, RoutingTable_P, Radio_P, Debug_P >::recvDATA ( node_id_t  from,
RoutingMessage hmsg 
)
template<typename OsModel_P , typename RoutingTable_P , typename Radio_P , typename Debug_P >
void wiselib::ToraRouting< OsModel_P, RoutingTable_P, Radio_P, Debug_P >::recvQRY ( node_id_t  from,
int  destination 
)
template<typename OsModel_P , typename RoutingTable_P , typename Radio_P , typename Debug_P >
void wiselib::ToraRouting< OsModel_P, RoutingTable_P, Radio_P, Debug_P >::recvUPD ( node_id_t  from,
RoutingMessage hmsg 
)
int wiselib::RadioBase< OsModel_P, Radio_P::node_id_t , Radio_P::size_t , Radio_P::block_data_t , MAX_RECEIVERS >::reg_recv_callback ( T *  obj_pnt) [inline, inherited]
template<typename OsModel_P , typename RoutingTable_P , typename Radio_P , typename Debug_P >
void wiselib::ToraRouting< OsModel_P, RoutingTable_P, Radio_P, Debug_P >::send ( node_id_t  receiver,
size_t  len,
block_data_t data 
)
template<typename OsModel_P , typename RoutingTable_P , typename Radio_P , typename Debug_P >
void wiselib::ToraRouting< OsModel_P, RoutingTable_P, Radio_P, Debug_P >::timer_elapsed ( void *  userdata)
int wiselib::RadioBase< OsModel_P, Radio_P::node_id_t , Radio_P::size_t , Radio_P::block_data_t , MAX_RECEIVERS >::unreg_recv_callback ( int  idx) [inline, inherited]

The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines