Wiselib
Public Types | Public Member Functions | Public Attributes
wiselib::VirtualExtendedTxRadioModel< OsModel_P, Radio_P, Uart_P, Debug_P, MAX_VIRTUAL_LINKS > Class Template Reference

Virtual Radio Implementation of Radio ConceptVirtual Radio implementation of the Radio concept ... More...

#include <virtual_extended_txradio.h>

List of all members.

Public Types

enum  SpecialNodeIds { BROADCAST_ADDRESS = Radio::BROADCAST_ADDRESS, NULL_NODE_ID = Radio::NULL_NODE_ID }
enum  Restrictions { MAX_MESSAGE_LENGTH = Radio::MAX_MESSAGE_LENGTH }
typedef OsModel_P OsModel
typedef OsModel::Os Os
typedef Radio_P Radio
typedef Uart_P Uart
typedef Debug_P Debug
typedef
VirtualExtendedTxRadioModel
< OsModel, Radio, Uart, Debug,
MAX_VIRTUAL_LINKS > 
self_type
typedef self_typeself_pointer_t
typedef VirtualLinkInMessage
< OsModel, Radio
InMessage
typedef VirtualLinkOutMessage
< OsModel, Radio
OutMessage
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 Radio::radio_delegate_t radio_delegate_t
typedef
Radio::extended_radio_delegate_t 
extended_radio_delegate_iss_t
typedef vector_static< OsModel,
radio_delegate_t, 10 > 
Receivers
typedef Receivers::iterator ReceiversIterator
typedef vector_static< OsModel,
extended_radio_delegate_iss_t, 10 > 
Extended_Receivers
typedef
Extended_Receivers::iterator 
Extended_ReceiversIterator
typedef vector_static< OsModel,
node_id_t, 10 > 
DestinationVector
typedef DestinationVector::iterator DestinationVectorIterator
typedef vector_static< OsModel,
node_id_t, 10 > 
DeadLinksVector
typedef DeadLinksVector::iterator DeadLinksVectorIterator
typedef Radio::ExtendedData ExtendedData
typedef Radio::TxPower TxPower

Public Member Functions

void init (Radio &radio, Uart &uart, Debug &debug)
void destruct ()
void send (node_id_t to, size_t len, block_data_t *buf)
void receive_message (node_id_t from, size_t len, block_data_t *msg, ExtendedData const &ex)
void set_virtual_link (block_data_t *data)
void destroy_virtual_link (block_data_t *data)
void enable_physical_link (block_data_t *data)
void disable_physical_link (block_data_t *data)
bool node_in_deadlink_vector (node_id_t dest)
void enable_node (block_data_t *data)
void disable_node (block_data_t *data)
void rcv_uart_packet (size_t len, block_data_t *data)
void send_response_message (uint8_t command_type, uint8_t request_id, uint8_t result, uint8_t len, block_data_t *payload)
void enable_radio ()
int set_channel (int channel)
void disable_radio ()
node_id_t id ()
template<class T , void(T::*)(node_id_t, size_t, block_data_t *) TMethod>
int reg_recv_callback (T *obj_pnt)
template<class T , void(T::*)(node_id_t, size_t, block_data_t *, ExtendedData const &) TMethod>
int reg_recv_callback (T *obj_pnt)
void unreg_recv_callback (int idx)

Public Attributes

Receivers receivers_
Extended_Receivers extended_receivers_
DestinationVector destinations_
DeadLinksVector deadlinks_
bool nodeactive_
node_id_t virtual_node_id_

Detailed Description

template<typename OsModel_P, typename Radio_P, typename Uart_P, typename Debug_P = typename OsModel_P::Debug, int MAX_VIRTUAL_LINKS = 10>
class wiselib::VirtualExtendedTxRadioModel< OsModel_P, Radio_P, Uart_P, Debug_P, MAX_VIRTUAL_LINKS >

Virtual Radio Implementation of Radio Concept

Virtual Radio implementation of the Radio concept ...


Member Typedef Documentation

template<typename OsModel_P , typename Radio_P , typename Uart_P , typename Debug_P = typename OsModel_P::Debug, int MAX_VIRTUAL_LINKS = 10>
typedef Radio::block_data_t wiselib::VirtualExtendedTxRadioModel< OsModel_P, Radio_P, Uart_P, Debug_P, MAX_VIRTUAL_LINKS >::block_data_t
template<typename OsModel_P , typename Radio_P , typename Uart_P , typename Debug_P = typename OsModel_P::Debug, int MAX_VIRTUAL_LINKS = 10>
typedef vector_static<OsModel, node_id_t, 10 > wiselib::VirtualExtendedTxRadioModel< OsModel_P, Radio_P, Uart_P, Debug_P, MAX_VIRTUAL_LINKS >::DeadLinksVector
template<typename OsModel_P , typename Radio_P , typename Uart_P , typename Debug_P = typename OsModel_P::Debug, int MAX_VIRTUAL_LINKS = 10>
typedef DeadLinksVector::iterator wiselib::VirtualExtendedTxRadioModel< OsModel_P, Radio_P, Uart_P, Debug_P, MAX_VIRTUAL_LINKS >::DeadLinksVectorIterator
template<typename OsModel_P , typename Radio_P , typename Uart_P , typename Debug_P = typename OsModel_P::Debug, int MAX_VIRTUAL_LINKS = 10>
typedef Debug_P wiselib::VirtualExtendedTxRadioModel< OsModel_P, Radio_P, Uart_P, Debug_P, MAX_VIRTUAL_LINKS >::Debug
template<typename OsModel_P , typename Radio_P , typename Uart_P , typename Debug_P = typename OsModel_P::Debug, int MAX_VIRTUAL_LINKS = 10>
typedef vector_static<OsModel, node_id_t, 10 > wiselib::VirtualExtendedTxRadioModel< OsModel_P, Radio_P, Uart_P, Debug_P, MAX_VIRTUAL_LINKS >::DestinationVector
template<typename OsModel_P , typename Radio_P , typename Uart_P , typename Debug_P = typename OsModel_P::Debug, int MAX_VIRTUAL_LINKS = 10>
typedef DestinationVector::iterator wiselib::VirtualExtendedTxRadioModel< OsModel_P, Radio_P, Uart_P, Debug_P, MAX_VIRTUAL_LINKS >::DestinationVectorIterator
template<typename OsModel_P , typename Radio_P , typename Uart_P , typename Debug_P = typename OsModel_P::Debug, int MAX_VIRTUAL_LINKS = 10>
typedef Radio::extended_radio_delegate_t wiselib::VirtualExtendedTxRadioModel< OsModel_P, Radio_P, Uart_P, Debug_P, MAX_VIRTUAL_LINKS >::extended_radio_delegate_iss_t
template<typename OsModel_P , typename Radio_P , typename Uart_P , typename Debug_P = typename OsModel_P::Debug, int MAX_VIRTUAL_LINKS = 10>
typedef vector_static<OsModel, extended_radio_delegate_iss_t, 10 > wiselib::VirtualExtendedTxRadioModel< OsModel_P, Radio_P, Uart_P, Debug_P, MAX_VIRTUAL_LINKS >::Extended_Receivers
template<typename OsModel_P , typename Radio_P , typename Uart_P , typename Debug_P = typename OsModel_P::Debug, int MAX_VIRTUAL_LINKS = 10>
typedef Extended_Receivers::iterator wiselib::VirtualExtendedTxRadioModel< OsModel_P, Radio_P, Uart_P, Debug_P, MAX_VIRTUAL_LINKS >::Extended_ReceiversIterator
template<typename OsModel_P , typename Radio_P , typename Uart_P , typename Debug_P = typename OsModel_P::Debug, int MAX_VIRTUAL_LINKS = 10>
typedef Radio::ExtendedData wiselib::VirtualExtendedTxRadioModel< OsModel_P, Radio_P, Uart_P, Debug_P, MAX_VIRTUAL_LINKS >::ExtendedData
template<typename OsModel_P , typename Radio_P , typename Uart_P , typename Debug_P = typename OsModel_P::Debug, int MAX_VIRTUAL_LINKS = 10>
typedef VirtualLinkInMessage<OsModel, Radio> wiselib::VirtualExtendedTxRadioModel< OsModel_P, Radio_P, Uart_P, Debug_P, MAX_VIRTUAL_LINKS >::InMessage
template<typename OsModel_P , typename Radio_P , typename Uart_P , typename Debug_P = typename OsModel_P::Debug, int MAX_VIRTUAL_LINKS = 10>
typedef Radio::message_id_t wiselib::VirtualExtendedTxRadioModel< OsModel_P, Radio_P, Uart_P, Debug_P, MAX_VIRTUAL_LINKS >::message_id_t
template<typename OsModel_P , typename Radio_P , typename Uart_P , typename Debug_P = typename OsModel_P::Debug, int MAX_VIRTUAL_LINKS = 10>
typedef Radio::node_id_t wiselib::VirtualExtendedTxRadioModel< OsModel_P, Radio_P, Uart_P, Debug_P, MAX_VIRTUAL_LINKS >::node_id_t
template<typename OsModel_P , typename Radio_P , typename Uart_P , typename Debug_P = typename OsModel_P::Debug, int MAX_VIRTUAL_LINKS = 10>
typedef OsModel::Os wiselib::VirtualExtendedTxRadioModel< OsModel_P, Radio_P, Uart_P, Debug_P, MAX_VIRTUAL_LINKS >::Os
template<typename OsModel_P , typename Radio_P , typename Uart_P , typename Debug_P = typename OsModel_P::Debug, int MAX_VIRTUAL_LINKS = 10>
typedef OsModel_P wiselib::VirtualExtendedTxRadioModel< OsModel_P, Radio_P, Uart_P, Debug_P, MAX_VIRTUAL_LINKS >::OsModel
template<typename OsModel_P , typename Radio_P , typename Uart_P , typename Debug_P = typename OsModel_P::Debug, int MAX_VIRTUAL_LINKS = 10>
typedef VirtualLinkOutMessage<OsModel, Radio> wiselib::VirtualExtendedTxRadioModel< OsModel_P, Radio_P, Uart_P, Debug_P, MAX_VIRTUAL_LINKS >::OutMessage
template<typename OsModel_P , typename Radio_P , typename Uart_P , typename Debug_P = typename OsModel_P::Debug, int MAX_VIRTUAL_LINKS = 10>
typedef Radio_P wiselib::VirtualExtendedTxRadioModel< OsModel_P, Radio_P, Uart_P, Debug_P, MAX_VIRTUAL_LINKS >::Radio
template<typename OsModel_P , typename Radio_P , typename Uart_P , typename Debug_P = typename OsModel_P::Debug, int MAX_VIRTUAL_LINKS = 10>
typedef Radio::radio_delegate_t wiselib::VirtualExtendedTxRadioModel< OsModel_P, Radio_P, Uart_P, Debug_P, MAX_VIRTUAL_LINKS >::radio_delegate_t
template<typename OsModel_P , typename Radio_P , typename Uart_P , typename Debug_P = typename OsModel_P::Debug, int MAX_VIRTUAL_LINKS = 10>
typedef vector_static<OsModel, radio_delegate_t, 10 > wiselib::VirtualExtendedTxRadioModel< OsModel_P, Radio_P, Uart_P, Debug_P, MAX_VIRTUAL_LINKS >::Receivers
template<typename OsModel_P , typename Radio_P , typename Uart_P , typename Debug_P = typename OsModel_P::Debug, int MAX_VIRTUAL_LINKS = 10>
typedef Receivers::iterator wiselib::VirtualExtendedTxRadioModel< OsModel_P, Radio_P, Uart_P, Debug_P, MAX_VIRTUAL_LINKS >::ReceiversIterator
template<typename OsModel_P , typename Radio_P , typename Uart_P , typename Debug_P = typename OsModel_P::Debug, int MAX_VIRTUAL_LINKS = 10>
typedef self_type* wiselib::VirtualExtendedTxRadioModel< OsModel_P, Radio_P, Uart_P, Debug_P, MAX_VIRTUAL_LINKS >::self_pointer_t
template<typename OsModel_P , typename Radio_P , typename Uart_P , typename Debug_P = typename OsModel_P::Debug, int MAX_VIRTUAL_LINKS = 10>
typedef VirtualExtendedTxRadioModel<OsModel, Radio, Uart, Debug, MAX_VIRTUAL_LINKS> wiselib::VirtualExtendedTxRadioModel< OsModel_P, Radio_P, Uart_P, Debug_P, MAX_VIRTUAL_LINKS >::self_type
template<typename OsModel_P , typename Radio_P , typename Uart_P , typename Debug_P = typename OsModel_P::Debug, int MAX_VIRTUAL_LINKS = 10>
typedef Radio::size_t wiselib::VirtualExtendedTxRadioModel< OsModel_P, Radio_P, Uart_P, Debug_P, MAX_VIRTUAL_LINKS >::size_t
template<typename OsModel_P , typename Radio_P , typename Uart_P , typename Debug_P = typename OsModel_P::Debug, int MAX_VIRTUAL_LINKS = 10>
typedef Radio::TxPower wiselib::VirtualExtendedTxRadioModel< OsModel_P, Radio_P, Uart_P, Debug_P, MAX_VIRTUAL_LINKS >::TxPower
template<typename OsModel_P , typename Radio_P , typename Uart_P , typename Debug_P = typename OsModel_P::Debug, int MAX_VIRTUAL_LINKS = 10>
typedef Uart_P wiselib::VirtualExtendedTxRadioModel< OsModel_P, Radio_P, Uart_P, Debug_P, MAX_VIRTUAL_LINKS >::Uart

Member Enumeration Documentation

template<typename OsModel_P , typename Radio_P , typename Uart_P , typename Debug_P = typename OsModel_P::Debug, int MAX_VIRTUAL_LINKS = 10>
enum wiselib::VirtualExtendedTxRadioModel::Restrictions
Enumerator:
MAX_MESSAGE_LENGTH 

Maximal number of bytes in payload.

template<typename OsModel_P , typename Radio_P , typename Uart_P , typename Debug_P = typename OsModel_P::Debug, int MAX_VIRTUAL_LINKS = 10>
enum wiselib::VirtualExtendedTxRadioModel::SpecialNodeIds
Enumerator:
BROADCAST_ADDRESS 

All nodes in communication range.

NULL_NODE_ID 

Unknown/No node id.


Member Function Documentation

template<typename OsModel_P , typename Radio_P , typename Uart_P , typename Debug_P = typename OsModel_P::Debug, int MAX_VIRTUAL_LINKS = 10>
void wiselib::VirtualExtendedTxRadioModel< OsModel_P, Radio_P, Uart_P, Debug_P, MAX_VIRTUAL_LINKS >::destroy_virtual_link ( block_data_t data) [inline]
template<typename OsModel_P , typename Radio_P , typename Uart_P , typename Debug_P = typename OsModel_P::Debug, int MAX_VIRTUAL_LINKS = 10>
void wiselib::VirtualExtendedTxRadioModel< OsModel_P, Radio_P, Uart_P, Debug_P, MAX_VIRTUAL_LINKS >::destruct ( void  ) [inline]
template<typename OsModel_P , typename Radio_P , typename Uart_P , typename Debug_P = typename OsModel_P::Debug, int MAX_VIRTUAL_LINKS = 10>
void wiselib::VirtualExtendedTxRadioModel< OsModel_P, Radio_P, Uart_P, Debug_P, MAX_VIRTUAL_LINKS >::disable_node ( block_data_t data) [inline]
template<typename OsModel_P , typename Radio_P , typename Uart_P , typename Debug_P = typename OsModel_P::Debug, int MAX_VIRTUAL_LINKS = 10>
void wiselib::VirtualExtendedTxRadioModel< OsModel_P, Radio_P, Uart_P, Debug_P, MAX_VIRTUAL_LINKS >::disable_physical_link ( block_data_t data) [inline]
template<typename OsModel_P , typename Radio_P , typename Uart_P , typename Debug_P = typename OsModel_P::Debug, int MAX_VIRTUAL_LINKS = 10>
void wiselib::VirtualExtendedTxRadioModel< OsModel_P, Radio_P, Uart_P, Debug_P, MAX_VIRTUAL_LINKS >::disable_radio ( void  ) [inline]
template<typename OsModel_P , typename Radio_P , typename Uart_P , typename Debug_P = typename OsModel_P::Debug, int MAX_VIRTUAL_LINKS = 10>
void wiselib::VirtualExtendedTxRadioModel< OsModel_P, Radio_P, Uart_P, Debug_P, MAX_VIRTUAL_LINKS >::enable_node ( block_data_t data) [inline]
template<typename OsModel_P , typename Radio_P , typename Uart_P , typename Debug_P = typename OsModel_P::Debug, int MAX_VIRTUAL_LINKS = 10>
void wiselib::VirtualExtendedTxRadioModel< OsModel_P, Radio_P, Uart_P, Debug_P, MAX_VIRTUAL_LINKS >::enable_physical_link ( block_data_t data) [inline]
template<typename OsModel_P , typename Radio_P , typename Uart_P , typename Debug_P = typename OsModel_P::Debug, int MAX_VIRTUAL_LINKS = 10>
void wiselib::VirtualExtendedTxRadioModel< OsModel_P, Radio_P, Uart_P, Debug_P, MAX_VIRTUAL_LINKS >::enable_radio ( void  ) [inline]
template<typename OsModel_P , typename Radio_P , typename Uart_P , typename Debug_P = typename OsModel_P::Debug, int MAX_VIRTUAL_LINKS = 10>
node_id_t wiselib::VirtualExtendedTxRadioModel< OsModel_P, Radio_P, Uart_P, Debug_P, MAX_VIRTUAL_LINKS >::id ( void  ) [inline]
template<typename OsModel_P , typename Radio_P , typename Uart_P , typename Debug_P = typename OsModel_P::Debug, int MAX_VIRTUAL_LINKS = 10>
void wiselib::VirtualExtendedTxRadioModel< OsModel_P, Radio_P, Uart_P, Debug_P, MAX_VIRTUAL_LINKS >::init ( Radio radio,
Uart uart,
Debug debug 
) [inline]
template<typename OsModel_P , typename Radio_P , typename Uart_P , typename Debug_P = typename OsModel_P::Debug, int MAX_VIRTUAL_LINKS = 10>
bool wiselib::VirtualExtendedTxRadioModel< OsModel_P, Radio_P, Uart_P, Debug_P, MAX_VIRTUAL_LINKS >::node_in_deadlink_vector ( node_id_t  dest) [inline]
template<typename OsModel_P , typename Radio_P , typename Uart_P , typename Debug_P = typename OsModel_P::Debug, int MAX_VIRTUAL_LINKS = 10>
void wiselib::VirtualExtendedTxRadioModel< OsModel_P, Radio_P, Uart_P, Debug_P, MAX_VIRTUAL_LINKS >::rcv_uart_packet ( size_t  len,
block_data_t data 
) [inline]
template<typename OsModel_P , typename Radio_P , typename Uart_P , typename Debug_P = typename OsModel_P::Debug, int MAX_VIRTUAL_LINKS = 10>
void wiselib::VirtualExtendedTxRadioModel< OsModel_P, Radio_P, Uart_P, Debug_P, MAX_VIRTUAL_LINKS >::receive_message ( node_id_t  from,
size_t  len,
block_data_t msg,
ExtendedData const &  ex 
) [inline]
template<typename OsModel_P , typename Radio_P , typename Uart_P , typename Debug_P = typename OsModel_P::Debug, int MAX_VIRTUAL_LINKS = 10>
template<class T , void(T::*)(node_id_t, size_t, block_data_t *, ExtendedData const &) TMethod>
int wiselib::VirtualExtendedTxRadioModel< OsModel_P, Radio_P, Uart_P, Debug_P, MAX_VIRTUAL_LINKS >::reg_recv_callback ( T *  obj_pnt) [inline]
template<typename OsModel_P , typename Radio_P , typename Uart_P , typename Debug_P = typename OsModel_P::Debug, int MAX_VIRTUAL_LINKS = 10>
template<class T , void(T::*)(node_id_t, size_t, block_data_t *) TMethod>
int wiselib::VirtualExtendedTxRadioModel< OsModel_P, Radio_P, Uart_P, Debug_P, MAX_VIRTUAL_LINKS >::reg_recv_callback ( T *  obj_pnt) [inline]
template<typename OsModel_P , typename Radio_P , typename Uart_P , typename Debug_P = typename OsModel_P::Debug, int MAX_VIRTUAL_LINKS = 10>
void wiselib::VirtualExtendedTxRadioModel< OsModel_P, Radio_P, Uart_P, Debug_P, MAX_VIRTUAL_LINKS >::send ( node_id_t  to,
size_t  len,
block_data_t buf 
) [inline]
template<typename OsModel_P , typename Radio_P , typename Uart_P , typename Debug_P = typename OsModel_P::Debug, int MAX_VIRTUAL_LINKS = 10>
void wiselib::VirtualExtendedTxRadioModel< OsModel_P, Radio_P, Uart_P, Debug_P, MAX_VIRTUAL_LINKS >::send_response_message ( uint8_t  command_type,
uint8_t  request_id,
uint8_t  result,
uint8_t  len,
block_data_t payload 
) [inline]
template<typename OsModel_P , typename Radio_P , typename Uart_P , typename Debug_P = typename OsModel_P::Debug, int MAX_VIRTUAL_LINKS = 10>
int wiselib::VirtualExtendedTxRadioModel< OsModel_P, Radio_P, Uart_P, Debug_P, MAX_VIRTUAL_LINKS >::set_channel ( int  channel) [inline]
template<typename OsModel_P , typename Radio_P , typename Uart_P , typename Debug_P = typename OsModel_P::Debug, int MAX_VIRTUAL_LINKS = 10>
void wiselib::VirtualExtendedTxRadioModel< OsModel_P, Radio_P, Uart_P, Debug_P, MAX_VIRTUAL_LINKS >::set_virtual_link ( block_data_t data) [inline]
template<typename OsModel_P , typename Radio_P , typename Uart_P , typename Debug_P = typename OsModel_P::Debug, int MAX_VIRTUAL_LINKS = 10>
void wiselib::VirtualExtendedTxRadioModel< OsModel_P, Radio_P, Uart_P, Debug_P, MAX_VIRTUAL_LINKS >::unreg_recv_callback ( int  idx) [inline]

Member Data Documentation

template<typename OsModel_P , typename Radio_P , typename Uart_P , typename Debug_P = typename OsModel_P::Debug, int MAX_VIRTUAL_LINKS = 10>
DeadLinksVector wiselib::VirtualExtendedTxRadioModel< OsModel_P, Radio_P, Uart_P, Debug_P, MAX_VIRTUAL_LINKS >::deadlinks_
template<typename OsModel_P , typename Radio_P , typename Uart_P , typename Debug_P = typename OsModel_P::Debug, int MAX_VIRTUAL_LINKS = 10>
DestinationVector wiselib::VirtualExtendedTxRadioModel< OsModel_P, Radio_P, Uart_P, Debug_P, MAX_VIRTUAL_LINKS >::destinations_
template<typename OsModel_P , typename Radio_P , typename Uart_P , typename Debug_P = typename OsModel_P::Debug, int MAX_VIRTUAL_LINKS = 10>
Extended_Receivers wiselib::VirtualExtendedTxRadioModel< OsModel_P, Radio_P, Uart_P, Debug_P, MAX_VIRTUAL_LINKS >::extended_receivers_
template<typename OsModel_P , typename Radio_P , typename Uart_P , typename Debug_P = typename OsModel_P::Debug, int MAX_VIRTUAL_LINKS = 10>
bool wiselib::VirtualExtendedTxRadioModel< OsModel_P, Radio_P, Uart_P, Debug_P, MAX_VIRTUAL_LINKS >::nodeactive_
template<typename OsModel_P , typename Radio_P , typename Uart_P , typename Debug_P = typename OsModel_P::Debug, int MAX_VIRTUAL_LINKS = 10>
Receivers wiselib::VirtualExtendedTxRadioModel< OsModel_P, Radio_P, Uart_P, Debug_P, MAX_VIRTUAL_LINKS >::receivers_
template<typename OsModel_P , typename Radio_P , typename Uart_P , typename Debug_P = typename OsModel_P::Debug, int MAX_VIRTUAL_LINKS = 10>
node_id_t wiselib::VirtualExtendedTxRadioModel< OsModel_P, Radio_P, Uart_P, Debug_P, MAX_VIRTUAL_LINKS >::virtual_node_id_

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