Wiselib
Public Types | Public Member Functions
wiselib::RemoteUartModel< OsModel_P, Radio_P, Flooding_Radio_P, Uart_P, Debug_P, Timer_P, Rand_P, Clock_P > Class Template Reference

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

#include <remote_uart.h>

Inherits wiselib::UartBase< OsModel_P, Uart_P::size_t, Uart_P::block_data_t >.

List of all members.

Public Types

enum  ErrorCodes { SUCCESS = OsModel::SUCCESS, ERR_UNSPEC = OsModel::ERR_UNSPEC, ERR_NETDOWN = OsModel::ERR_NETDOWN, ERR_HOSTUNREACH = OsModel::ERR_HOSTUNREACH }
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, FLUSH_TIMEOUT_MS = 5, KEEP_ALIVE_TIMEOUT = 60000 }
enum  ConnectionState { CONNECTED, PENDING, DISCONNECTED }
typedef OsModel_P OsModel
typedef Radio_P Radio
typedef Flooding_Radio_P Flooding
typedef Uart_P Uart
typedef Timer_P Timer
typedef Debug_P Debug
typedef Rand_P Rand
typedef Clock_P Clock
typedef RemoteUartModel
< OsModel, Radio, Flooding,
Uart, Debug, Timer, Rand,
Clock
self_type
typedef Radio::node_id_t node_id_t
typedef Uart::size_t size_t
typedef Uart::block_data_t block_data_t
typedef Radio::size_t radio_size_t
typedef Radio::block_data_t radio_block_data_t
typedef RemoteUartInMessage
< OsModel, Radio
Message
enum  ReturnValues
typedef delegate2< void,
size_t, block_data_t * > 
uart_delegate_t
typedef vector_static< OsModel,
uart_delegate_t,
UART_BASE_MAX_RECEIVERS > 
CallbackVector
typedef CallbackVector::iterator CallbackVectorIterator

Public Member Functions

 RemoteUartModel ()
void init (Radio &radio, Flooding &flooding_radio, Uart &uart, Debug &debug, Timer &timer, Rand &random, Clock &clock)
void timer_elapsed (void *)
void set_sink (void)
void request_sink ()
void destruct ()
int write (size_t len, block_data_t *buf)
void new_packet ()
void end_packet ()
void rcv_uart_packet (size_t len, block_data_t *data)
void receive_radio_message (typename Radio::node_id_t source, typename Radio::size_t length, typename Radio::block_data_t *buf)
void enable_serial_comm ()
void disable_serial_comm ()
void debug (const char *msg,...)
int flush ()
int reg_read_callback (T *obj_pnt)
int unreg_read_callback (int idx)
void notify_receivers (size_t len, block_data_t *data)

Detailed Description

template<typename OsModel_P, typename Radio_P, typename Flooding_Radio_P, typename Uart_P, typename Debug_P = typename OsModel_P::Debug, typename Timer_P = typename OsModel_P::Timer, typename Rand_P = typename OsModel_P::Rand, typename Clock_P = typename OsModel_P::Clock>
class wiselib::RemoteUartModel< OsModel_P, Radio_P, Flooding_Radio_P, Uart_P, Debug_P, Timer_P, Rand_P, Clock_P >

Virtual Radio Implementation of Radio Concept

Virtual Radio implementation of the Radio concept ...


Member Typedef Documentation

template<typename OsModel_P , typename Radio_P , typename Flooding_Radio_P , typename Uart_P , typename Debug_P = typename OsModel_P::Debug, typename Timer_P = typename OsModel_P::Timer, typename Rand_P = typename OsModel_P::Rand, typename Clock_P = typename OsModel_P::Clock>
typedef Uart::block_data_t wiselib::RemoteUartModel< OsModel_P, Radio_P, Flooding_Radio_P, Uart_P, Debug_P, Timer_P, Rand_P, Clock_P >::block_data_t
typedef vector_static<OsModel, uart_delegate_t, UART_BASE_MAX_RECEIVERS > wiselib::UartBase< OsModel_P, Uart_P::size_t , Uart_P::block_data_t , UART_BASE_MAX_RECEIVERS >::CallbackVector [inherited]
typedef CallbackVector::iterator wiselib::UartBase< OsModel_P, Uart_P::size_t , Uart_P::block_data_t , UART_BASE_MAX_RECEIVERS >::CallbackVectorIterator [inherited]
template<typename OsModel_P , typename Radio_P , typename Flooding_Radio_P , typename Uart_P , typename Debug_P = typename OsModel_P::Debug, typename Timer_P = typename OsModel_P::Timer, typename Rand_P = typename OsModel_P::Rand, typename Clock_P = typename OsModel_P::Clock>
typedef Clock_P wiselib::RemoteUartModel< OsModel_P, Radio_P, Flooding_Radio_P, Uart_P, Debug_P, Timer_P, Rand_P, Clock_P >::Clock
template<typename OsModel_P , typename Radio_P , typename Flooding_Radio_P , typename Uart_P , typename Debug_P = typename OsModel_P::Debug, typename Timer_P = typename OsModel_P::Timer, typename Rand_P = typename OsModel_P::Rand, typename Clock_P = typename OsModel_P::Clock>
typedef Debug_P wiselib::RemoteUartModel< OsModel_P, Radio_P, Flooding_Radio_P, Uart_P, Debug_P, Timer_P, Rand_P, Clock_P >::Debug
template<typename OsModel_P , typename Radio_P , typename Flooding_Radio_P , typename Uart_P , typename Debug_P = typename OsModel_P::Debug, typename Timer_P = typename OsModel_P::Timer, typename Rand_P = typename OsModel_P::Rand, typename Clock_P = typename OsModel_P::Clock>
typedef Flooding_Radio_P wiselib::RemoteUartModel< OsModel_P, Radio_P, Flooding_Radio_P, Uart_P, Debug_P, Timer_P, Rand_P, Clock_P >::Flooding
template<typename OsModel_P , typename Radio_P , typename Flooding_Radio_P , typename Uart_P , typename Debug_P = typename OsModel_P::Debug, typename Timer_P = typename OsModel_P::Timer, typename Rand_P = typename OsModel_P::Rand, typename Clock_P = typename OsModel_P::Clock>
typedef RemoteUartInMessage<OsModel, Radio> wiselib::RemoteUartModel< OsModel_P, Radio_P, Flooding_Radio_P, Uart_P, Debug_P, Timer_P, Rand_P, Clock_P >::Message
template<typename OsModel_P , typename Radio_P , typename Flooding_Radio_P , typename Uart_P , typename Debug_P = typename OsModel_P::Debug, typename Timer_P = typename OsModel_P::Timer, typename Rand_P = typename OsModel_P::Rand, typename Clock_P = typename OsModel_P::Clock>
typedef Radio::node_id_t wiselib::RemoteUartModel< OsModel_P, Radio_P, Flooding_Radio_P, Uart_P, Debug_P, Timer_P, Rand_P, Clock_P >::node_id_t
template<typename OsModel_P , typename Radio_P , typename Flooding_Radio_P , typename Uart_P , typename Debug_P = typename OsModel_P::Debug, typename Timer_P = typename OsModel_P::Timer, typename Rand_P = typename OsModel_P::Rand, typename Clock_P = typename OsModel_P::Clock>
typedef OsModel_P wiselib::RemoteUartModel< OsModel_P, Radio_P, Flooding_Radio_P, Uart_P, Debug_P, Timer_P, Rand_P, Clock_P >::OsModel
template<typename OsModel_P , typename Radio_P , typename Flooding_Radio_P , typename Uart_P , typename Debug_P = typename OsModel_P::Debug, typename Timer_P = typename OsModel_P::Timer, typename Rand_P = typename OsModel_P::Rand, typename Clock_P = typename OsModel_P::Clock>
typedef Radio_P wiselib::RemoteUartModel< OsModel_P, Radio_P, Flooding_Radio_P, Uart_P, Debug_P, Timer_P, Rand_P, Clock_P >::Radio
template<typename OsModel_P , typename Radio_P , typename Flooding_Radio_P , typename Uart_P , typename Debug_P = typename OsModel_P::Debug, typename Timer_P = typename OsModel_P::Timer, typename Rand_P = typename OsModel_P::Rand, typename Clock_P = typename OsModel_P::Clock>
typedef Radio::block_data_t wiselib::RemoteUartModel< OsModel_P, Radio_P, Flooding_Radio_P, Uart_P, Debug_P, Timer_P, Rand_P, Clock_P >::radio_block_data_t
template<typename OsModel_P , typename Radio_P , typename Flooding_Radio_P , typename Uart_P , typename Debug_P = typename OsModel_P::Debug, typename Timer_P = typename OsModel_P::Timer, typename Rand_P = typename OsModel_P::Rand, typename Clock_P = typename OsModel_P::Clock>
typedef Radio::size_t wiselib::RemoteUartModel< OsModel_P, Radio_P, Flooding_Radio_P, Uart_P, Debug_P, Timer_P, Rand_P, Clock_P >::radio_size_t
template<typename OsModel_P , typename Radio_P , typename Flooding_Radio_P , typename Uart_P , typename Debug_P = typename OsModel_P::Debug, typename Timer_P = typename OsModel_P::Timer, typename Rand_P = typename OsModel_P::Rand, typename Clock_P = typename OsModel_P::Clock>
typedef Rand_P wiselib::RemoteUartModel< OsModel_P, Radio_P, Flooding_Radio_P, Uart_P, Debug_P, Timer_P, Rand_P, Clock_P >::Rand
template<typename OsModel_P , typename Radio_P , typename Flooding_Radio_P , typename Uart_P , typename Debug_P = typename OsModel_P::Debug, typename Timer_P = typename OsModel_P::Timer, typename Rand_P = typename OsModel_P::Rand, typename Clock_P = typename OsModel_P::Clock>
typedef RemoteUartModel<OsModel,Radio,Flooding,Uart,Debug,Timer,Rand,Clock> wiselib::RemoteUartModel< OsModel_P, Radio_P, Flooding_Radio_P, Uart_P, Debug_P, Timer_P, Rand_P, Clock_P >::self_type
template<typename OsModel_P , typename Radio_P , typename Flooding_Radio_P , typename Uart_P , typename Debug_P = typename OsModel_P::Debug, typename Timer_P = typename OsModel_P::Timer, typename Rand_P = typename OsModel_P::Rand, typename Clock_P = typename OsModel_P::Clock>
typedef Uart::size_t wiselib::RemoteUartModel< OsModel_P, Radio_P, Flooding_Radio_P, Uart_P, Debug_P, Timer_P, Rand_P, Clock_P >::size_t
template<typename OsModel_P , typename Radio_P , typename Flooding_Radio_P , typename Uart_P , typename Debug_P = typename OsModel_P::Debug, typename Timer_P = typename OsModel_P::Timer, typename Rand_P = typename OsModel_P::Rand, typename Clock_P = typename OsModel_P::Clock>
typedef Timer_P wiselib::RemoteUartModel< OsModel_P, Radio_P, Flooding_Radio_P, Uart_P, Debug_P, Timer_P, Rand_P, Clock_P >::Timer
template<typename OsModel_P , typename Radio_P , typename Flooding_Radio_P , typename Uart_P , typename Debug_P = typename OsModel_P::Debug, typename Timer_P = typename OsModel_P::Timer, typename Rand_P = typename OsModel_P::Rand, typename Clock_P = typename OsModel_P::Clock>
typedef Uart_P wiselib::RemoteUartModel< OsModel_P, Radio_P, Flooding_Radio_P, Uart_P, Debug_P, Timer_P, Rand_P, Clock_P >::Uart
typedef delegate2<void, size_t, block_data_t*> wiselib::UartBase< OsModel_P, Uart_P::size_t , Uart_P::block_data_t , UART_BASE_MAX_RECEIVERS >::uart_delegate_t [inherited]

Member Enumeration Documentation

template<typename OsModel_P , typename Radio_P , typename Flooding_Radio_P , typename Uart_P , typename Debug_P = typename OsModel_P::Debug, typename Timer_P = typename OsModel_P::Timer, typename Rand_P = typename OsModel_P::Rand, typename Clock_P = typename OsModel_P::Clock>
enum wiselib::RemoteUartModel::ConnectionState
Enumerator:
CONNECTED 
PENDING 
DISCONNECTED 
template<typename OsModel_P , typename Radio_P , typename Flooding_Radio_P , typename Uart_P , typename Debug_P = typename OsModel_P::Debug, typename Timer_P = typename OsModel_P::Timer, typename Rand_P = typename OsModel_P::Rand, typename Clock_P = typename OsModel_P::Clock>
enum wiselib::RemoteUartModel::ErrorCodes
Enumerator:
SUCCESS 
ERR_UNSPEC 
ERR_NETDOWN 
ERR_HOSTUNREACH 
template<typename OsModel_P , typename Radio_P , typename Flooding_Radio_P , typename Uart_P , typename Debug_P = typename OsModel_P::Debug, typename Timer_P = typename OsModel_P::Timer, typename Rand_P = typename OsModel_P::Rand, typename Clock_P = typename OsModel_P::Clock>
enum wiselib::RemoteUartModel::Restrictions
Enumerator:
MAX_MESSAGE_LENGTH 

Maximal number of bytes in payload.

FLUSH_TIMEOUT_MS 
KEEP_ALIVE_TIMEOUT 
template<typename OsModel_P , typename Radio_P , typename Flooding_Radio_P , typename Uart_P , typename Debug_P = typename OsModel_P::Debug, typename Timer_P = typename OsModel_P::Timer, typename Rand_P = typename OsModel_P::Rand, typename Clock_P = typename OsModel_P::Clock>
enum wiselib::RemoteUartModel::SpecialNodeIds
Enumerator:
BROADCAST_ADDRESS 

All nodes in communication range.

NULL_NODE_ID 

Unknown/No node id.


Constructor & Destructor Documentation

template<typename OsModel_P , typename Radio_P , typename Flooding_Radio_P , typename Uart_P , typename Debug_P = typename OsModel_P::Debug, typename Timer_P = typename OsModel_P::Timer, typename Rand_P = typename OsModel_P::Rand, typename Clock_P = typename OsModel_P::Clock>
wiselib::RemoteUartModel< OsModel_P, Radio_P, Flooding_Radio_P, Uart_P, Debug_P, Timer_P, Rand_P, Clock_P >::RemoteUartModel ( ) [inline]

Member Function Documentation

template<typename OsModel_P , typename Radio_P , typename Flooding_Radio_P , typename Uart_P , typename Debug_P = typename OsModel_P::Debug, typename Timer_P = typename OsModel_P::Timer, typename Rand_P = typename OsModel_P::Rand, typename Clock_P = typename OsModel_P::Clock>
void wiselib::RemoteUartModel< OsModel_P, Radio_P, Flooding_Radio_P, Uart_P, Debug_P, Timer_P, Rand_P, Clock_P >::debug ( const char *  msg,
  ... 
) [inline]
template<typename OsModel_P , typename Radio_P , typename Flooding_Radio_P , typename Uart_P , typename Debug_P = typename OsModel_P::Debug, typename Timer_P = typename OsModel_P::Timer, typename Rand_P = typename OsModel_P::Rand, typename Clock_P = typename OsModel_P::Clock>
void wiselib::RemoteUartModel< OsModel_P, Radio_P, Flooding_Radio_P, Uart_P, Debug_P, Timer_P, Rand_P, Clock_P >::destruct ( void  ) [inline]
template<typename OsModel_P , typename Radio_P , typename Flooding_Radio_P , typename Uart_P , typename Debug_P = typename OsModel_P::Debug, typename Timer_P = typename OsModel_P::Timer, typename Rand_P = typename OsModel_P::Rand, typename Clock_P = typename OsModel_P::Clock>
void wiselib::RemoteUartModel< OsModel_P, Radio_P, Flooding_Radio_P, Uart_P, Debug_P, Timer_P, Rand_P, Clock_P >::disable_serial_comm ( ) [inline]
template<typename OsModel_P , typename Radio_P , typename Flooding_Radio_P , typename Uart_P , typename Debug_P = typename OsModel_P::Debug, typename Timer_P = typename OsModel_P::Timer, typename Rand_P = typename OsModel_P::Rand, typename Clock_P = typename OsModel_P::Clock>
void wiselib::RemoteUartModel< OsModel_P, Radio_P, Flooding_Radio_P, Uart_P, Debug_P, Timer_P, Rand_P, Clock_P >::enable_serial_comm ( ) [inline]
template<typename OsModel_P , typename Radio_P , typename Flooding_Radio_P , typename Uart_P , typename Debug_P = typename OsModel_P::Debug, typename Timer_P = typename OsModel_P::Timer, typename Rand_P = typename OsModel_P::Rand, typename Clock_P = typename OsModel_P::Clock>
void wiselib::RemoteUartModel< OsModel_P, Radio_P, Flooding_Radio_P, Uart_P, Debug_P, Timer_P, Rand_P, Clock_P >::end_packet ( ) [inline]
template<typename OsModel_P , typename Radio_P , typename Flooding_Radio_P , typename Uart_P , typename Debug_P = typename OsModel_P::Debug, typename Timer_P = typename OsModel_P::Timer, typename Rand_P = typename OsModel_P::Rand, typename Clock_P = typename OsModel_P::Clock>
int wiselib::RemoteUartModel< OsModel_P, Radio_P, Flooding_Radio_P, Uart_P, Debug_P, Timer_P, Rand_P, Clock_P >::flush ( ) [inline]
template<typename OsModel_P , typename Radio_P , typename Flooding_Radio_P , typename Uart_P , typename Debug_P = typename OsModel_P::Debug, typename Timer_P = typename OsModel_P::Timer, typename Rand_P = typename OsModel_P::Rand, typename Clock_P = typename OsModel_P::Clock>
void wiselib::RemoteUartModel< OsModel_P, Radio_P, Flooding_Radio_P, Uart_P, Debug_P, Timer_P, Rand_P, Clock_P >::init ( Radio radio,
Flooding flooding_radio,
Uart uart,
Debug debug,
Timer timer,
Rand random,
Clock clock 
) [inline]
template<typename OsModel_P , typename Radio_P , typename Flooding_Radio_P , typename Uart_P , typename Debug_P = typename OsModel_P::Debug, typename Timer_P = typename OsModel_P::Timer, typename Rand_P = typename OsModel_P::Rand, typename Clock_P = typename OsModel_P::Clock>
void wiselib::RemoteUartModel< OsModel_P, Radio_P, Flooding_Radio_P, Uart_P, Debug_P, Timer_P, Rand_P, Clock_P >::new_packet ( ) [inline]
void wiselib::UartBase< OsModel_P, Uart_P::size_t , Uart_P::block_data_t , UART_BASE_MAX_RECEIVERS >::notify_receivers ( size_t  len,
block_data_t data 
) [inline, inherited]
template<typename OsModel_P , typename Radio_P , typename Flooding_Radio_P , typename Uart_P , typename Debug_P = typename OsModel_P::Debug, typename Timer_P = typename OsModel_P::Timer, typename Rand_P = typename OsModel_P::Rand, typename Clock_P = typename OsModel_P::Clock>
void wiselib::RemoteUartModel< OsModel_P, Radio_P, Flooding_Radio_P, Uart_P, Debug_P, Timer_P, Rand_P, Clock_P >::rcv_uart_packet ( size_t  len,
block_data_t data 
) [inline]
template<typename OsModel_P , typename Radio_P , typename Flooding_Radio_P , typename Uart_P , typename Debug_P = typename OsModel_P::Debug, typename Timer_P = typename OsModel_P::Timer, typename Rand_P = typename OsModel_P::Rand, typename Clock_P = typename OsModel_P::Clock>
void wiselib::RemoteUartModel< OsModel_P, Radio_P, Flooding_Radio_P, Uart_P, Debug_P, Timer_P, Rand_P, Clock_P >::receive_radio_message ( typename Radio::node_id_t  source,
typename Radio::size_t  length,
typename Radio::block_data_t buf 
) [inline]
int wiselib::UartBase< OsModel_P, Uart_P::size_t , Uart_P::block_data_t , UART_BASE_MAX_RECEIVERS >::reg_read_callback ( T *  obj_pnt) [inline, inherited]
template<typename OsModel_P , typename Radio_P , typename Flooding_Radio_P , typename Uart_P , typename Debug_P = typename OsModel_P::Debug, typename Timer_P = typename OsModel_P::Timer, typename Rand_P = typename OsModel_P::Rand, typename Clock_P = typename OsModel_P::Clock>
void wiselib::RemoteUartModel< OsModel_P, Radio_P, Flooding_Radio_P, Uart_P, Debug_P, Timer_P, Rand_P, Clock_P >::request_sink ( ) [inline]
template<typename OsModel_P , typename Radio_P , typename Flooding_Radio_P , typename Uart_P , typename Debug_P = typename OsModel_P::Debug, typename Timer_P = typename OsModel_P::Timer, typename Rand_P = typename OsModel_P::Rand, typename Clock_P = typename OsModel_P::Clock>
void wiselib::RemoteUartModel< OsModel_P, Radio_P, Flooding_Radio_P, Uart_P, Debug_P, Timer_P, Rand_P, Clock_P >::set_sink ( void  ) [inline]
template<typename OsModel_P , typename Radio_P , typename Flooding_Radio_P , typename Uart_P , typename Debug_P = typename OsModel_P::Debug, typename Timer_P = typename OsModel_P::Timer, typename Rand_P = typename OsModel_P::Rand, typename Clock_P = typename OsModel_P::Clock>
void wiselib::RemoteUartModel< OsModel_P, Radio_P, Flooding_Radio_P, Uart_P, Debug_P, Timer_P, Rand_P, Clock_P >::timer_elapsed ( void *  ) [inline]
int wiselib::UartBase< OsModel_P, Uart_P::size_t , Uart_P::block_data_t , UART_BASE_MAX_RECEIVERS >::unreg_read_callback ( int  idx) [inline, inherited]
template<typename OsModel_P , typename Radio_P , typename Flooding_Radio_P , typename Uart_P , typename Debug_P = typename OsModel_P::Debug, typename Timer_P = typename OsModel_P::Timer, typename Rand_P = typename OsModel_P::Rand, typename Clock_P = typename OsModel_P::Clock>
int wiselib::RemoteUartModel< OsModel_P, Radio_P, Flooding_Radio_P, Uart_P, Debug_P, Timer_P, Rand_P, Clock_P >::write ( size_t  len,
block_data_t buf 
) [inline]

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