Wiselib
Classes | Public Types | Public Member Functions | Protected Member Functions | Protected Attributes
RoombaMessageDelivery< OsModel_P, NeighborDiscovery_P, Roomba_P, Radio_P, Debug_P, Timer_P, Clock_P > Class Template Reference

#include <roomba_message_delivery.h>

List of all members.

Classes

struct  message_entry
struct  roomba_interchanged_msg_entry

Public Types

enum  { MAX_NUMBER_OF_STORED_MESSAGES = 255 }
enum  { MAX_NUMBER_OF_ROOMBAS = 10 }
typedef OsModel_P Os
typedef NeighborDiscovery_P NeighborDiscovery
typedef Roomba_P Roomba
typedef Radio_P Radio
typedef Debug_P Debug
typedef Timer_P Timer
typedef Clock_P Clock
typedef RoombaMessageDelivery
< Os, NeighborDiscovery,
Roomba, Radio, Debug, Timer
self_type
typedef self_typeself_pointer_t
typedef
wiselib::CommunicationMessage
< Os, Radio
msg_t
typedef Radio::block_data_t block_data_t
typedef Radio::size_t size_t
typedef Radio::node_id_t node_id_t
typedef Radio::message_id_t message_id_t

Public Member Functions

void init (NeighborDiscovery &neighbor_discovery, Roomba &roomba, Radio &radio, Debug &debug, Timer &timer, Clock &clock)
void init ()
int destruct ()
uint16_t number_of_stored_messages ()
 returns number of stored messages

Protected Member Functions

void on_new_neighbor (uint8_t event, node_id_t from, uint8_t len, uint8_t *data)
 callback for new neighbor
void on_new_payload (uint8_t event, node_id_t from, uint8_t len, uint8_t *data)
void on_time (void *userdata)
 Callback for time timer.
void on_receive (node_id_t id, size_t size, block_data_t *data)
 Callback for message receive.

Protected Attributes

Radioradio_
int starting_time_
Debug::self_pointer_t debug_
Timer::self_pointer_t timer_
Clock::self_pointer_t clock_
Roomba::self_pointer_t roomba_
NeighborDiscoveryneighbor_discovery_
RoombaStatisticsstatistics_
roomba_interchanged_msg_entry roomba_interchanged_msg_table_ [MAX_NUMBER_OF_ROOMBAS]
message_entry stored_messages_ [MAX_NUMBER_OF_STORED_MESSAGES]
uint16_t number_of_stored_messages_
int radio_recv_callback_id_
bool stopped_

template<typename OsModel_P, typename NeighborDiscovery_P, typename Roomba_P, typename Radio_P = typename OsModel_P::Radio, typename Debug_P = typename OsModel_P::Debug, typename Timer_P = typename OsModel_P::Timer, typename Clock_P = typename OsModel_P::Clock>
class RoombaMessageDelivery< OsModel_P, NeighborDiscovery_P, Roomba_P, Radio_P, Debug_P, Timer_P, Clock_P >


Member Typedef Documentation

template<typename OsModel_P , typename NeighborDiscovery_P , typename Roomba_P , typename Radio_P = typename OsModel_P::Radio, typename Debug_P = typename OsModel_P::Debug, typename Timer_P = typename OsModel_P::Timer, typename Clock_P = typename OsModel_P::Clock>
typedef Radio::block_data_t RoombaMessageDelivery< OsModel_P, NeighborDiscovery_P, Roomba_P, Radio_P, Debug_P, Timer_P, Clock_P >::block_data_t
template<typename OsModel_P , typename NeighborDiscovery_P , typename Roomba_P , typename Radio_P = typename OsModel_P::Radio, typename Debug_P = typename OsModel_P::Debug, typename Timer_P = typename OsModel_P::Timer, typename Clock_P = typename OsModel_P::Clock>
typedef Clock_P RoombaMessageDelivery< OsModel_P, NeighborDiscovery_P, Roomba_P, Radio_P, Debug_P, Timer_P, Clock_P >::Clock
template<typename OsModel_P , typename NeighborDiscovery_P , typename Roomba_P , typename Radio_P = typename OsModel_P::Radio, typename Debug_P = typename OsModel_P::Debug, typename Timer_P = typename OsModel_P::Timer, typename Clock_P = typename OsModel_P::Clock>
typedef Debug_P RoombaMessageDelivery< OsModel_P, NeighborDiscovery_P, Roomba_P, Radio_P, Debug_P, Timer_P, Clock_P >::Debug
template<typename OsModel_P , typename NeighborDiscovery_P , typename Roomba_P , typename Radio_P = typename OsModel_P::Radio, typename Debug_P = typename OsModel_P::Debug, typename Timer_P = typename OsModel_P::Timer, typename Clock_P = typename OsModel_P::Clock>
typedef Radio::message_id_t RoombaMessageDelivery< OsModel_P, NeighborDiscovery_P, Roomba_P, Radio_P, Debug_P, Timer_P, Clock_P >::message_id_t
template<typename OsModel_P , typename NeighborDiscovery_P , typename Roomba_P , typename Radio_P = typename OsModel_P::Radio, typename Debug_P = typename OsModel_P::Debug, typename Timer_P = typename OsModel_P::Timer, typename Clock_P = typename OsModel_P::Clock>
typedef wiselib::CommunicationMessage<Os, Radio> RoombaMessageDelivery< OsModel_P, NeighborDiscovery_P, Roomba_P, Radio_P, Debug_P, Timer_P, Clock_P >::msg_t
template<typename OsModel_P , typename NeighborDiscovery_P , typename Roomba_P , typename Radio_P = typename OsModel_P::Radio, typename Debug_P = typename OsModel_P::Debug, typename Timer_P = typename OsModel_P::Timer, typename Clock_P = typename OsModel_P::Clock>
typedef NeighborDiscovery_P RoombaMessageDelivery< OsModel_P, NeighborDiscovery_P, Roomba_P, Radio_P, Debug_P, Timer_P, Clock_P >::NeighborDiscovery
template<typename OsModel_P , typename NeighborDiscovery_P , typename Roomba_P , typename Radio_P = typename OsModel_P::Radio, typename Debug_P = typename OsModel_P::Debug, typename Timer_P = typename OsModel_P::Timer, typename Clock_P = typename OsModel_P::Clock>
typedef Radio::node_id_t RoombaMessageDelivery< OsModel_P, NeighborDiscovery_P, Roomba_P, Radio_P, Debug_P, Timer_P, Clock_P >::node_id_t
template<typename OsModel_P , typename NeighborDiscovery_P , typename Roomba_P , typename Radio_P = typename OsModel_P::Radio, typename Debug_P = typename OsModel_P::Debug, typename Timer_P = typename OsModel_P::Timer, typename Clock_P = typename OsModel_P::Clock>
typedef OsModel_P RoombaMessageDelivery< OsModel_P, NeighborDiscovery_P, Roomba_P, Radio_P, Debug_P, Timer_P, Clock_P >::Os
template<typename OsModel_P , typename NeighborDiscovery_P , typename Roomba_P , typename Radio_P = typename OsModel_P::Radio, typename Debug_P = typename OsModel_P::Debug, typename Timer_P = typename OsModel_P::Timer, typename Clock_P = typename OsModel_P::Clock>
typedef Radio_P RoombaMessageDelivery< OsModel_P, NeighborDiscovery_P, Roomba_P, Radio_P, Debug_P, Timer_P, Clock_P >::Radio
template<typename OsModel_P , typename NeighborDiscovery_P , typename Roomba_P , typename Radio_P = typename OsModel_P::Radio, typename Debug_P = typename OsModel_P::Debug, typename Timer_P = typename OsModel_P::Timer, typename Clock_P = typename OsModel_P::Clock>
typedef Roomba_P RoombaMessageDelivery< OsModel_P, NeighborDiscovery_P, Roomba_P, Radio_P, Debug_P, Timer_P, Clock_P >::Roomba
template<typename OsModel_P , typename NeighborDiscovery_P , typename Roomba_P , typename Radio_P = typename OsModel_P::Radio, typename Debug_P = typename OsModel_P::Debug, typename Timer_P = typename OsModel_P::Timer, typename Clock_P = typename OsModel_P::Clock>
typedef self_type* RoombaMessageDelivery< OsModel_P, NeighborDiscovery_P, Roomba_P, Radio_P, Debug_P, Timer_P, Clock_P >::self_pointer_t
template<typename OsModel_P , typename NeighborDiscovery_P , typename Roomba_P , typename Radio_P = typename OsModel_P::Radio, typename Debug_P = typename OsModel_P::Debug, typename Timer_P = typename OsModel_P::Timer, typename Clock_P = typename OsModel_P::Clock>
typedef RoombaMessageDelivery<Os,NeighborDiscovery, Roomba, Radio, Debug, Timer> RoombaMessageDelivery< OsModel_P, NeighborDiscovery_P, Roomba_P, Radio_P, Debug_P, Timer_P, Clock_P >::self_type
template<typename OsModel_P , typename NeighborDiscovery_P , typename Roomba_P , typename Radio_P = typename OsModel_P::Radio, typename Debug_P = typename OsModel_P::Debug, typename Timer_P = typename OsModel_P::Timer, typename Clock_P = typename OsModel_P::Clock>
typedef Radio::size_t RoombaMessageDelivery< OsModel_P, NeighborDiscovery_P, Roomba_P, Radio_P, Debug_P, Timer_P, Clock_P >::size_t
template<typename OsModel_P , typename NeighborDiscovery_P , typename Roomba_P , typename Radio_P = typename OsModel_P::Radio, typename Debug_P = typename OsModel_P::Debug, typename Timer_P = typename OsModel_P::Timer, typename Clock_P = typename OsModel_P::Clock>
typedef Timer_P RoombaMessageDelivery< OsModel_P, NeighborDiscovery_P, Roomba_P, Radio_P, Debug_P, Timer_P, Clock_P >::Timer

Member Enumeration Documentation

template<typename OsModel_P , typename NeighborDiscovery_P , typename Roomba_P , typename Radio_P = typename OsModel_P::Radio, typename Debug_P = typename OsModel_P::Debug, typename Timer_P = typename OsModel_P::Timer, typename Clock_P = typename OsModel_P::Clock>
anonymous enum
Enumerator:
MAX_NUMBER_OF_STORED_MESSAGES 
template<typename OsModel_P , typename NeighborDiscovery_P , typename Roomba_P , typename Radio_P = typename OsModel_P::Radio, typename Debug_P = typename OsModel_P::Debug, typename Timer_P = typename OsModel_P::Timer, typename Clock_P = typename OsModel_P::Clock>
anonymous enum
Enumerator:
MAX_NUMBER_OF_ROOMBAS 

Member Function Documentation

template<typename OsModel_P , typename NeighborDiscovery_P , typename Roomba_P , typename Radio_P = typename OsModel_P::Radio, typename Debug_P = typename OsModel_P::Debug, typename Timer_P = typename OsModel_P::Timer, typename Clock_P = typename OsModel_P::Clock>
int RoombaMessageDelivery< OsModel_P, NeighborDiscovery_P, Roomba_P, Radio_P, Debug_P, Timer_P, Clock_P >::destruct ( void  ) [inline]
template<typename OsModel_P , typename NeighborDiscovery_P , typename Roomba_P , typename Radio_P = typename OsModel_P::Radio, typename Debug_P = typename OsModel_P::Debug, typename Timer_P = typename OsModel_P::Timer, typename Clock_P = typename OsModel_P::Clock>
void RoombaMessageDelivery< OsModel_P, NeighborDiscovery_P, Roomba_P, Radio_P, Debug_P, Timer_P, Clock_P >::init ( void  ) [inline]
template<typename OsModel_P , typename NeighborDiscovery_P , typename Roomba_P , typename Radio_P = typename OsModel_P::Radio, typename Debug_P = typename OsModel_P::Debug, typename Timer_P = typename OsModel_P::Timer, typename Clock_P = typename OsModel_P::Clock>
void RoombaMessageDelivery< OsModel_P, NeighborDiscovery_P, Roomba_P, Radio_P, Debug_P, Timer_P, Clock_P >::init ( NeighborDiscovery neighbor_discovery,
Roomba roomba,
Radio radio,
Debug debug,
Timer timer,
Clock clock 
) [inline]
template<typename OsModel_P , typename NeighborDiscovery_P , typename Roomba_P , typename Radio_P = typename OsModel_P::Radio, typename Debug_P = typename OsModel_P::Debug, typename Timer_P = typename OsModel_P::Timer, typename Clock_P = typename OsModel_P::Clock>
uint16_t RoombaMessageDelivery< OsModel_P, NeighborDiscovery_P, Roomba_P, Radio_P, Debug_P, Timer_P, Clock_P >::number_of_stored_messages ( ) [inline]

returns number of stored messages

Returns:
number_of_stored_messages_
template<typename OsModel_P , typename NeighborDiscovery_P , typename Roomba_P , typename Radio_P = typename OsModel_P::Radio, typename Debug_P = typename OsModel_P::Debug, typename Timer_P = typename OsModel_P::Timer, typename Clock_P = typename OsModel_P::Clock>
void RoombaMessageDelivery< OsModel_P, NeighborDiscovery_P, Roomba_P, Radio_P, Debug_P, Timer_P, Clock_P >::on_new_neighbor ( uint8_t  event,
node_id_t  from,
uint8_t  len,
uint8_t *  data 
) [inline, protected]

callback for new neighbor

Delivers all the stored messages which have a destination within the current neighborhood.

Parameters:
event
from
len
data&
Returns:
void
template<typename OsModel_P , typename NeighborDiscovery_P , typename Roomba_P , typename Radio_P = typename OsModel_P::Radio, typename Debug_P = typename OsModel_P::Debug, typename Timer_P = typename OsModel_P::Timer, typename Clock_P = typename OsModel_P::Clock>
void RoombaMessageDelivery< OsModel_P, NeighborDiscovery_P, Roomba_P, Radio_P, Debug_P, Timer_P, Clock_P >::on_new_payload ( uint8_t  event,
node_id_t  from,
uint8_t  len,
uint8_t *  data 
) [inline, protected]
template<typename OsModel_P , typename NeighborDiscovery_P , typename Roomba_P , typename Radio_P = typename OsModel_P::Radio, typename Debug_P = typename OsModel_P::Debug, typename Timer_P = typename OsModel_P::Timer, typename Clock_P = typename OsModel_P::Clock>
void RoombaMessageDelivery< OsModel_P, NeighborDiscovery_P, Roomba_P, Radio_P, Debug_P, Timer_P, Clock_P >::on_receive ( node_id_t  id,
size_t  size,
block_data_t data 
) [inline, protected]

Callback for message receive.

Stores received CommunicationMessages for delivery into buffer.

Parameters:
idis node-id of message origin
sizeis size of message
&datais pointer to message-data
Returns:
void
template<typename OsModel_P , typename NeighborDiscovery_P , typename Roomba_P , typename Radio_P = typename OsModel_P::Radio, typename Debug_P = typename OsModel_P::Debug, typename Timer_P = typename OsModel_P::Timer, typename Clock_P = typename OsModel_P::Clock>
void RoombaMessageDelivery< OsModel_P, NeighborDiscovery_P, Roomba_P, Radio_P, Debug_P, Timer_P, Clock_P >::on_time ( void *  userdata) [inline, protected]

Callback for time timer.

Increases the store_duration of the stored messages.


Member Data Documentation

template<typename OsModel_P , typename NeighborDiscovery_P , typename Roomba_P , typename Radio_P = typename OsModel_P::Radio, typename Debug_P = typename OsModel_P::Debug, typename Timer_P = typename OsModel_P::Timer, typename Clock_P = typename OsModel_P::Clock>
Clock::self_pointer_t RoombaMessageDelivery< OsModel_P, NeighborDiscovery_P, Roomba_P, Radio_P, Debug_P, Timer_P, Clock_P >::clock_ [protected]
template<typename OsModel_P , typename NeighborDiscovery_P , typename Roomba_P , typename Radio_P = typename OsModel_P::Radio, typename Debug_P = typename OsModel_P::Debug, typename Timer_P = typename OsModel_P::Timer, typename Clock_P = typename OsModel_P::Clock>
Debug::self_pointer_t RoombaMessageDelivery< OsModel_P, NeighborDiscovery_P, Roomba_P, Radio_P, Debug_P, Timer_P, Clock_P >::debug_ [protected]
template<typename OsModel_P , typename NeighborDiscovery_P , typename Roomba_P , typename Radio_P = typename OsModel_P::Radio, typename Debug_P = typename OsModel_P::Debug, typename Timer_P = typename OsModel_P::Timer, typename Clock_P = typename OsModel_P::Clock>
NeighborDiscovery* RoombaMessageDelivery< OsModel_P, NeighborDiscovery_P, Roomba_P, Radio_P, Debug_P, Timer_P, Clock_P >::neighbor_discovery_ [protected]
template<typename OsModel_P , typename NeighborDiscovery_P , typename Roomba_P , typename Radio_P = typename OsModel_P::Radio, typename Debug_P = typename OsModel_P::Debug, typename Timer_P = typename OsModel_P::Timer, typename Clock_P = typename OsModel_P::Clock>
uint16_t RoombaMessageDelivery< OsModel_P, NeighborDiscovery_P, Roomba_P, Radio_P, Debug_P, Timer_P, Clock_P >::number_of_stored_messages_ [protected]
template<typename OsModel_P , typename NeighborDiscovery_P , typename Roomba_P , typename Radio_P = typename OsModel_P::Radio, typename Debug_P = typename OsModel_P::Debug, typename Timer_P = typename OsModel_P::Timer, typename Clock_P = typename OsModel_P::Clock>
Radio* RoombaMessageDelivery< OsModel_P, NeighborDiscovery_P, Roomba_P, Radio_P, Debug_P, Timer_P, Clock_P >::radio_ [protected]
template<typename OsModel_P , typename NeighborDiscovery_P , typename Roomba_P , typename Radio_P = typename OsModel_P::Radio, typename Debug_P = typename OsModel_P::Debug, typename Timer_P = typename OsModel_P::Timer, typename Clock_P = typename OsModel_P::Clock>
int RoombaMessageDelivery< OsModel_P, NeighborDiscovery_P, Roomba_P, Radio_P, Debug_P, Timer_P, Clock_P >::radio_recv_callback_id_ [protected]
template<typename OsModel_P , typename NeighborDiscovery_P , typename Roomba_P , typename Radio_P = typename OsModel_P::Radio, typename Debug_P = typename OsModel_P::Debug, typename Timer_P = typename OsModel_P::Timer, typename Clock_P = typename OsModel_P::Clock>
Roomba::self_pointer_t RoombaMessageDelivery< OsModel_P, NeighborDiscovery_P, Roomba_P, Radio_P, Debug_P, Timer_P, Clock_P >::roomba_ [protected]
template<typename OsModel_P , typename NeighborDiscovery_P , typename Roomba_P , typename Radio_P = typename OsModel_P::Radio, typename Debug_P = typename OsModel_P::Debug, typename Timer_P = typename OsModel_P::Timer, typename Clock_P = typename OsModel_P::Clock>
roomba_interchanged_msg_entry RoombaMessageDelivery< OsModel_P, NeighborDiscovery_P, Roomba_P, Radio_P, Debug_P, Timer_P, Clock_P >::roomba_interchanged_msg_table_[MAX_NUMBER_OF_ROOMBAS] [protected]
template<typename OsModel_P , typename NeighborDiscovery_P , typename Roomba_P , typename Radio_P = typename OsModel_P::Radio, typename Debug_P = typename OsModel_P::Debug, typename Timer_P = typename OsModel_P::Timer, typename Clock_P = typename OsModel_P::Clock>
int RoombaMessageDelivery< OsModel_P, NeighborDiscovery_P, Roomba_P, Radio_P, Debug_P, Timer_P, Clock_P >::starting_time_ [protected]
template<typename OsModel_P , typename NeighborDiscovery_P , typename Roomba_P , typename Radio_P = typename OsModel_P::Radio, typename Debug_P = typename OsModel_P::Debug, typename Timer_P = typename OsModel_P::Timer, typename Clock_P = typename OsModel_P::Clock>
RoombaStatistics* RoombaMessageDelivery< OsModel_P, NeighborDiscovery_P, Roomba_P, Radio_P, Debug_P, Timer_P, Clock_P >::statistics_ [protected]
template<typename OsModel_P , typename NeighborDiscovery_P , typename Roomba_P , typename Radio_P = typename OsModel_P::Radio, typename Debug_P = typename OsModel_P::Debug, typename Timer_P = typename OsModel_P::Timer, typename Clock_P = typename OsModel_P::Clock>
bool RoombaMessageDelivery< OsModel_P, NeighborDiscovery_P, Roomba_P, Radio_P, Debug_P, Timer_P, Clock_P >::stopped_ [protected]
template<typename OsModel_P , typename NeighborDiscovery_P , typename Roomba_P , typename Radio_P = typename OsModel_P::Radio, typename Debug_P = typename OsModel_P::Debug, typename Timer_P = typename OsModel_P::Timer, typename Clock_P = typename OsModel_P::Clock>
message_entry RoombaMessageDelivery< OsModel_P, NeighborDiscovery_P, Roomba_P, Radio_P, Debug_P, Timer_P, Clock_P >::stored_messages_[MAX_NUMBER_OF_STORED_MESSAGES] [protected]
template<typename OsModel_P , typename NeighborDiscovery_P , typename Roomba_P , typename Radio_P = typename OsModel_P::Radio, typename Debug_P = typename OsModel_P::Debug, typename Timer_P = typename OsModel_P::Timer, typename Clock_P = typename OsModel_P::Clock>
Timer::self_pointer_t RoombaMessageDelivery< OsModel_P, NeighborDiscovery_P, Roomba_P, Radio_P, Debug_P, Timer_P, Clock_P >::timer_ [protected]

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