Wiselib
Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes
wiselib::VirtualRadioModel< OsModel_P, Radio_P > Class Template Reference

iSense Implementation of Radio ConceptiSense implementation of the Radio concept ... More...

#include <onehop_virtual_radio.h>

List of all members.

Public Types

enum  ControlMessageTypes {
  SET_GW = 100, SET_VLINK = 101, USET_VLINK = 102, SET_DLINK = 103,
  USET_DLINK = 104
}
enum  SpecialNodeIds { BROADCAST_ADDRESS = Radio::BROADCAST_ADDRESS, NULL_NODE_ID = Radio::NULL_NODE_ID, BROADCAST_ADDRESS = Radio::BROADCAST_ADDRESS, NULL_NODE_ID = Radio::NULL_NODE_ID }
enum  Restrictions { MAX_MESSAGE_LENGTH = 115, MAX_MESSAGE_LENGTH = 115 }
enum  SpecialNodeIds { BROADCAST_ADDRESS = Radio::BROADCAST_ADDRESS, NULL_NODE_ID = Radio::NULL_NODE_ID, BROADCAST_ADDRESS = Radio::BROADCAST_ADDRESS, NULL_NODE_ID = Radio::NULL_NODE_ID }
enum  Restrictions { MAX_MESSAGE_LENGTH = 115, MAX_MESSAGE_LENGTH = 115 }
typedef OsModel_P OsModel
typedef OsModel::Os Os
typedef Radio_P Radio
typedef VirtualRadioModel
< OsModel, Radio
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_delegate_t vradio_delegate_t
typedef vector_static< OsModel,
vradio_delegate_t, 10 > 
receivers_t
typedef receivers_t::iterator rcv_iterator
typedef vector_static< OsModel,
node_id_t, 10 > 
virtual_links
typedef virtual_links::iterator iterator
typedef vector_static< OsModel,
node_id_t, 10 > 
deactivated_links
typedef deactivated_links::iterator dl_iterator
typedef OsModel_P OsModel
typedef OsModel::Os Os
typedef Radio_P Radio
typedef Uart_P Uart
typedef Debug_P Debug
typedef VirtualRadioModel
< 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 vector_static< OsModel,
radio_delegate_t, 10 > 
Receivers
typedef Receivers::iterator 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

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 id, size_t len, block_data_t *buf)
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 ()
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)
void unreg_recv_callback (int idx)

Static Public Member Functions

static uint16_t getGW (void)
static char * dumpStats (void)
static int findvneighbor (uint16_t addr)
static void addvneighbor (uint16_t addr)
static void removevneighbor (uint16_t addr)
static void send (Os *os, node_id_t id, size_t len, block_data_t *data)
static void sendToGw (Os *os, uint8_t vlink_msg_type, node_id_t id, size_t len, block_data_t *data)
static void enable (Os *os)
static void vlink_rcv (node_id_t id, size_t len, block_data_t *data)
static void disable (Os *os)
static node_id_t id (Os *os)
template<class T , void(T::*)(node_id_t, size_t, block_data_t *) TMethod>
static int reg_recv_callback (Os *os, T *obj_pnt)
static void unreg_recv_callback (Os *os, int idx)

Public Attributes

Receivers receivers_
DestinationVector destinations_
DeadLinksVector deadlinks_
bool nodeactive_
node_id_t virtual_node_id_

Static Public Attributes

static virtual_links vlinks
static deactivated_links dlinks
static receivers_t receivers

Detailed Description

template<typename OsModel_P, typename Radio_P = typename OsModel_P::Radio>
class wiselib::VirtualRadioModel< OsModel_P, Radio_P >

iSense Implementation of Radio Concept

iSense implementation of the Radio concept ...

Virtual Radio Implementation of Radio Concept

Virtual Radio implementation of the Radio concept ...


Member Typedef Documentation

template<typename OsModel_P , typename Radio_P = typename OsModel_P::Radio>
typedef Radio::block_data_t wiselib::VirtualRadioModel< OsModel_P, Radio_P >::block_data_t
template<typename OsModel_P , typename Radio_P = typename OsModel_P::Radio>
typedef Radio::block_data_t wiselib::VirtualRadioModel< OsModel_P, Radio_P >::block_data_t
template<typename OsModel_P , typename Radio_P = typename OsModel_P::Radio>
typedef vector_static<OsModel, node_id_t, 10> wiselib::VirtualRadioModel< OsModel_P, Radio_P >::deactivated_links
template<typename OsModel_P , typename Radio_P = typename OsModel_P::Radio>
typedef vector_static<OsModel, node_id_t, 10> wiselib::VirtualRadioModel< OsModel_P, Radio_P >::DeadLinksVector
template<typename OsModel_P , typename Radio_P = typename OsModel_P::Radio>
typedef DeadLinksVector::iterator wiselib::VirtualRadioModel< OsModel_P, Radio_P >::DeadLinksVectorIterator
template<typename OsModel_P , typename Radio_P = typename OsModel_P::Radio>
typedef Debug_P wiselib::VirtualRadioModel< OsModel_P, Radio_P >::Debug
template<typename OsModel_P , typename Radio_P = typename OsModel_P::Radio>
typedef vector_static<OsModel, node_id_t, 10> wiselib::VirtualRadioModel< OsModel_P, Radio_P >::DestinationVector
template<typename OsModel_P , typename Radio_P = typename OsModel_P::Radio>
typedef DestinationVector::iterator wiselib::VirtualRadioModel< OsModel_P, Radio_P >::DestinationVectorIterator
template<typename OsModel_P , typename Radio_P = typename OsModel_P::Radio>
typedef deactivated_links::iterator wiselib::VirtualRadioModel< OsModel_P, Radio_P >::dl_iterator
template<typename OsModel_P , typename Radio_P = typename OsModel_P::Radio>
typedef VirtualLinkInMessage<OsModel, Radio> wiselib::VirtualRadioModel< OsModel_P, Radio_P >::InMessage
template<typename OsModel_P , typename Radio_P = typename OsModel_P::Radio>
typedef virtual_links::iterator wiselib::VirtualRadioModel< OsModel_P, Radio_P >::iterator
template<typename OsModel_P , typename Radio_P = typename OsModel_P::Radio>
typedef Radio::message_id_t wiselib::VirtualRadioModel< OsModel_P, Radio_P >::message_id_t
template<typename OsModel_P , typename Radio_P = typename OsModel_P::Radio>
typedef Radio::node_id_t wiselib::VirtualRadioModel< OsModel_P, Radio_P >::node_id_t
template<typename OsModel_P , typename Radio_P = typename OsModel_P::Radio>
typedef Radio::node_id_t wiselib::VirtualRadioModel< OsModel_P, Radio_P >::node_id_t
template<typename OsModel_P , typename Radio_P = typename OsModel_P::Radio>
typedef OsModel::Os wiselib::VirtualRadioModel< OsModel_P, Radio_P >::Os
template<typename OsModel_P , typename Radio_P = typename OsModel_P::Radio>
typedef OsModel::Os wiselib::VirtualRadioModel< OsModel_P, Radio_P >::Os
template<typename OsModel_P , typename Radio_P = typename OsModel_P::Radio>
typedef OsModel_P wiselib::VirtualRadioModel< OsModel_P, Radio_P >::OsModel
template<typename OsModel_P , typename Radio_P = typename OsModel_P::Radio>
typedef OsModel_P wiselib::VirtualRadioModel< OsModel_P, Radio_P >::OsModel
template<typename OsModel_P , typename Radio_P = typename OsModel_P::Radio>
typedef VirtualLinkOutMessage<OsModel, Radio> wiselib::VirtualRadioModel< OsModel_P, Radio_P >::OutMessage
template<typename OsModel_P , typename Radio_P = typename OsModel_P::Radio>
typedef Radio_P wiselib::VirtualRadioModel< OsModel_P, Radio_P >::Radio
template<typename OsModel_P , typename Radio_P = typename OsModel_P::Radio>
typedef Radio_P wiselib::VirtualRadioModel< OsModel_P, Radio_P >::Radio
template<typename OsModel_P , typename Radio_P = typename OsModel_P::Radio>
typedef Radio::radio_delegate_t wiselib::VirtualRadioModel< OsModel_P, Radio_P >::radio_delegate_t
template<typename OsModel_P , typename Radio_P = typename OsModel_P::Radio>
typedef receivers_t::iterator wiselib::VirtualRadioModel< OsModel_P, Radio_P >::rcv_iterator
template<typename OsModel_P , typename Radio_P = typename OsModel_P::Radio>
typedef vector_static<OsModel, radio_delegate_t, 10> wiselib::VirtualRadioModel< OsModel_P, Radio_P >::Receivers
template<typename OsModel_P , typename Radio_P = typename OsModel_P::Radio>
typedef vector_static<OsModel, vradio_delegate_t, 10> wiselib::VirtualRadioModel< OsModel_P, Radio_P >::receivers_t
template<typename OsModel_P , typename Radio_P = typename OsModel_P::Radio>
typedef Receivers::iterator wiselib::VirtualRadioModel< OsModel_P, Radio_P >::ReceiversIterator
template<typename OsModel_P , typename Radio_P = typename OsModel_P::Radio>
typedef self_type* wiselib::VirtualRadioModel< OsModel_P, Radio_P >::self_pointer_t
template<typename OsModel_P , typename Radio_P = typename OsModel_P::Radio>
typedef VirtualRadioModel<OsModel, Radio, Uart, Debug, MAX_VIRTUAL_LINKS> wiselib::VirtualRadioModel< OsModel_P, Radio_P >::self_type
template<typename OsModel_P , typename Radio_P = typename OsModel_P::Radio>
typedef VirtualRadioModel<OsModel, Radio> wiselib::VirtualRadioModel< OsModel_P, Radio_P >::self_type
template<typename OsModel_P , typename Radio_P = typename OsModel_P::Radio>
typedef Radio::size_t wiselib::VirtualRadioModel< OsModel_P, Radio_P >::size_t
template<typename OsModel_P , typename Radio_P = typename OsModel_P::Radio>
typedef Radio::size_t wiselib::VirtualRadioModel< OsModel_P, Radio_P >::size_t
template<typename OsModel_P , typename Radio_P = typename OsModel_P::Radio>
typedef Uart_P wiselib::VirtualRadioModel< OsModel_P, Radio_P >::Uart
template<typename OsModel_P , typename Radio_P = typename OsModel_P::Radio>
typedef vector_static<OsModel, node_id_t, 10> wiselib::VirtualRadioModel< OsModel_P, Radio_P >::virtual_links
template<typename OsModel_P , typename Radio_P = typename OsModel_P::Radio>
typedef radio_delegate_t wiselib::VirtualRadioModel< OsModel_P, Radio_P >::vradio_delegate_t

Member Enumeration Documentation

template<typename OsModel_P , typename Radio_P = typename OsModel_P::Radio>
enum wiselib::VirtualRadioModel::ControlMessageTypes
Enumerator:
SET_GW 
SET_VLINK 
USET_VLINK 
SET_DLINK 
USET_DLINK 
template<typename OsModel_P , typename Radio_P = typename OsModel_P::Radio>
enum wiselib::VirtualRadioModel::Restrictions
Enumerator:
MAX_MESSAGE_LENGTH 

Maximal number of bytes in payload.

MAX_MESSAGE_LENGTH 

Maximal number of bytes in payload.

template<typename OsModel_P , typename Radio_P = typename OsModel_P::Radio>
enum wiselib::VirtualRadioModel::Restrictions
Enumerator:
MAX_MESSAGE_LENGTH 

Maximal number of bytes in payload.

MAX_MESSAGE_LENGTH 

Maximal number of bytes in payload.

template<typename OsModel_P , typename Radio_P = typename OsModel_P::Radio>
enum wiselib::VirtualRadioModel::SpecialNodeIds
Enumerator:
BROADCAST_ADDRESS 

All nodes in communication range.

NULL_NODE_ID 

Unknown/No node id.

BROADCAST_ADDRESS 

All nodes in communication range.

NULL_NODE_ID 

Unknown/No node id.

template<typename OsModel_P , typename Radio_P = typename OsModel_P::Radio>
enum wiselib::VirtualRadioModel::SpecialNodeIds
Enumerator:
BROADCAST_ADDRESS 

All nodes in communication range.

NULL_NODE_ID 

Unknown/No node id.

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 OsModel_P::Radio>
static void wiselib::VirtualRadioModel< OsModel_P, Radio_P >::addvneighbor ( uint16_t  addr) [inline, static]
template<typename OsModel_P , typename Radio_P = typename OsModel_P::Radio>
void wiselib::VirtualRadioModel< OsModel_P, Radio_P >::destroy_virtual_link ( block_data_t data) [inline]
template<typename OsModel_P , typename Radio_P = typename OsModel_P::Radio>
void wiselib::VirtualRadioModel< OsModel_P, Radio_P >::destruct ( void  ) [inline]
template<typename OsModel_P , typename Radio_P = typename OsModel_P::Radio>
static void wiselib::VirtualRadioModel< OsModel_P, Radio_P >::disable ( Os os) [inline, static]
template<typename OsModel_P , typename Radio_P = typename OsModel_P::Radio>
void wiselib::VirtualRadioModel< OsModel_P, Radio_P >::disable_node ( block_data_t data) [inline]
template<typename OsModel_P , typename Radio_P = typename OsModel_P::Radio>
void wiselib::VirtualRadioModel< OsModel_P, Radio_P >::disable_physical_link ( block_data_t data) [inline]
template<typename OsModel_P , typename Radio_P = typename OsModel_P::Radio>
void wiselib::VirtualRadioModel< OsModel_P, Radio_P >::disable_radio ( void  ) [inline]
template<typename OsModel_P , typename Radio_P = typename OsModel_P::Radio>
static char* wiselib::VirtualRadioModel< OsModel_P, Radio_P >::dumpStats ( void  ) [inline, static]
template<typename OsModel_P , typename Radio_P = typename OsModel_P::Radio>
static void wiselib::VirtualRadioModel< OsModel_P, Radio_P >::enable ( Os os) [inline, static]

Unkown until the right msh is received

Unkown until the right msh is received

Unkown until the right msh is received

Unkown until the right msh is received

template<typename OsModel_P , typename Radio_P = typename OsModel_P::Radio>
void wiselib::VirtualRadioModel< OsModel_P, Radio_P >::enable_node ( block_data_t data) [inline]
template<typename OsModel_P , typename Radio_P = typename OsModel_P::Radio>
void wiselib::VirtualRadioModel< OsModel_P, Radio_P >::enable_physical_link ( block_data_t data) [inline]
template<typename OsModel_P , typename Radio_P = typename OsModel_P::Radio>
void wiselib::VirtualRadioModel< OsModel_P, Radio_P >::enable_radio ( void  ) [inline]
template<typename OsModel_P , typename Radio_P = typename OsModel_P::Radio>
static int wiselib::VirtualRadioModel< OsModel_P, Radio_P >::findvneighbor ( uint16_t  addr) [inline, static]
template<typename OsModel_P , typename Radio_P = typename OsModel_P::Radio>
static uint16_t wiselib::VirtualRadioModel< OsModel_P, Radio_P >::getGW ( void  ) [inline, static]
template<typename OsModel_P , typename Radio_P = typename OsModel_P::Radio>
node_id_t wiselib::VirtualRadioModel< OsModel_P, Radio_P >::id ( void  ) [inline]
template<typename OsModel_P , typename Radio_P = typename OsModel_P::Radio>
static node_id_t wiselib::VirtualRadioModel< OsModel_P, Radio_P >::id ( Os os) [inline, static]
template<typename OsModel_P , typename Radio_P = typename OsModel_P::Radio>
void wiselib::VirtualRadioModel< OsModel_P, Radio_P >::init ( Radio radio,
Uart uart,
Debug debug 
) [inline]
template<typename OsModel_P , typename Radio_P = typename OsModel_P::Radio>
bool wiselib::VirtualRadioModel< OsModel_P, Radio_P >::node_in_deadlink_vector ( node_id_t  dest) [inline]
template<typename OsModel_P , typename Radio_P = typename OsModel_P::Radio>
void wiselib::VirtualRadioModel< OsModel_P, Radio_P >::rcv_uart_packet ( size_t  len,
block_data_t data 
) [inline]
template<typename OsModel_P , typename Radio_P = typename OsModel_P::Radio>
void wiselib::VirtualRadioModel< OsModel_P, Radio_P >::receive_message ( node_id_t  id,
size_t  len,
block_data_t buf 
) [inline]
template<typename OsModel_P , typename Radio_P = typename OsModel_P::Radio>
template<class T , void(T::*)(node_id_t, size_t, block_data_t *) TMethod>
static int wiselib::VirtualRadioModel< OsModel_P, Radio_P >::reg_recv_callback ( Os os,
T *  obj_pnt 
) [inline, static]
template<typename OsModel_P , typename Radio_P = typename OsModel_P::Radio>
template<class T , void(T::*)(node_id_t, size_t, block_data_t *) TMethod>
int wiselib::VirtualRadioModel< OsModel_P, Radio_P >::reg_recv_callback ( T *  obj_pnt) [inline]
template<typename OsModel_P , typename Radio_P = typename OsModel_P::Radio>
static void wiselib::VirtualRadioModel< OsModel_P, Radio_P >::removevneighbor ( uint16_t  addr) [inline, static]
template<typename OsModel_P , typename Radio_P = typename OsModel_P::Radio>
void wiselib::VirtualRadioModel< OsModel_P, Radio_P >::send ( node_id_t  to,
size_t  len,
block_data_t buf 
) [inline]
template<typename OsModel_P , typename Radio_P = typename OsModel_P::Radio>
static void wiselib::VirtualRadioModel< OsModel_P, Radio_P >::send ( Os os,
node_id_t  id,
size_t  len,
block_data_t data 
) [inline, static]
template<typename OsModel_P , typename Radio_P = typename OsModel_P::Radio>
void wiselib::VirtualRadioModel< OsModel_P, Radio_P >::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 OsModel_P::Radio>
static void wiselib::VirtualRadioModel< OsModel_P, Radio_P >::sendToGw ( Os os,
uint8_t  vlink_msg_type,
node_id_t  id,
size_t  len,
block_data_t data 
) [inline, static]
template<typename OsModel_P , typename Radio_P = typename OsModel_P::Radio>
void wiselib::VirtualRadioModel< OsModel_P, Radio_P >::set_virtual_link ( block_data_t data) [inline]
template<typename OsModel_P , typename Radio_P = typename OsModel_P::Radio>
void wiselib::VirtualRadioModel< OsModel_P, Radio_P >::unreg_recv_callback ( int  idx) [inline]
template<typename OsModel_P , typename Radio_P = typename OsModel_P::Radio>
static void wiselib::VirtualRadioModel< OsModel_P, Radio_P >::unreg_recv_callback ( Os os,
int  idx 
) [inline, static]
template<typename OsModel_P , typename Radio_P = typename OsModel_P::Radio>
static void wiselib::VirtualRadioModel< OsModel_P, Radio_P >::vlink_rcv ( node_id_t  id,
size_t  len,
block_data_t data 
) [inline, static]

Member Data Documentation

template<typename OsModel_P , typename Radio_P = typename OsModel_P::Radio>
DeadLinksVector wiselib::VirtualRadioModel< OsModel_P, Radio_P >::deadlinks_
template<typename OsModel_P , typename Radio_P = typename OsModel_P::Radio>
DestinationVector wiselib::VirtualRadioModel< OsModel_P, Radio_P >::destinations_
template<typename OsModel_P , typename Radio_P = typename OsModel_P::Radio>
deactivated_links wiselib::VirtualRadioModel< OsModel_P, Radio_P >::dlinks [static]
template<typename OsModel_P , typename Radio_P = typename OsModel_P::Radio>
bool wiselib::VirtualRadioModel< OsModel_P, Radio_P >::nodeactive_
template<typename OsModel_P , typename Radio_P = typename OsModel_P::Radio>
receivers_t wiselib::VirtualRadioModel< OsModel_P, Radio_P >::receivers [static]
template<typename OsModel_P , typename Radio_P = typename OsModel_P::Radio>
Receivers wiselib::VirtualRadioModel< OsModel_P, Radio_P >::receivers_
template<typename OsModel_P , typename Radio_P = typename OsModel_P::Radio>
node_id_t wiselib::VirtualRadioModel< OsModel_P, Radio_P >::virtual_node_id_
template<typename OsModel_P , typename Radio_P = typename OsModel_P::Radio>
virtual_links wiselib::VirtualRadioModel< OsModel_P, Radio_P >::vlinks [static]

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