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

Wiselib Radio implementation that supports communication with sunspot devices. More...

#include <sunspot_radio.h>

Inherits wiselib::RadioBase< OsModel_P, Radio_P::node_id_t, Radio_P::size_t, Radio_P::block_data_t >.

List of all members.

Public Types

enum  Restrictions { HEADER_LENGHT = 3, MAX_MESSAGE_LENGTH = Radio::MAX_MESSAGE_LENGTH-HEADER_LENGHT }
typedef OsModel_P OsModel
typedef Radio_P Radio
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 Timer_P Timer
typedef Debug_P Debug
typedef SunSpotRadio
< OsModel_P, Radio_P, Timer_P,
Debug_P > 
self_t
enum  ReturnValues
typedef delegate3< void,
node_id_t, size_t,
block_data_t * > 
radio_delegate_t
typedef vector_static< OsModel,
radio_delegate_t,
RADIO_BASE_MAX_RECEIVERS > 
CallbackVector
typedef CallbackVector::iterator CallbackVectorIterator

Public Member Functions

void init (Radio &radio, Timer &timer, Debug &debug)
 SunSpotRadio ()
 ~SunSpotRadio ()
void enable_radio (void)
void set_port (uint8_t port)
node_id_t get_port (void)
void send (node_id_t id, size_t len, block_data_t *data)
void receive (node_id_t source, size_t len, block_data_t *data)
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)

Detailed Description

template<typename OsModel_P, typename Radio_P, typename Timer_P, typename Debug_P>
class wiselib::SunSpotRadio< OsModel_P, Radio_P, Timer_P, Debug_P >

Wiselib Radio implementation that supports communication with sunspot devices.


Member Typedef Documentation

template<typename OsModel_P , typename Radio_P , typename Timer_P , typename Debug_P >
typedef Radio::block_data_t wiselib::SunSpotRadio< OsModel_P, Radio_P, Timer_P, Debug_P >::block_data_t
typedef vector_static<OsModel, radio_delegate_t, RADIO_BASE_MAX_RECEIVERS > wiselib::RadioBase< OsModel_P, Radio_P::node_id_t , Radio_P::size_t , Radio_P::block_data_t , RADIO_BASE_MAX_RECEIVERS >::CallbackVector [inherited]
template<typename OsModel_P , typename Radio_P , typename Timer_P , typename Debug_P >
typedef Debug_P wiselib::SunSpotRadio< OsModel_P, Radio_P, Timer_P, Debug_P >::Debug
template<typename OsModel_P , typename Radio_P , typename Timer_P , typename Debug_P >
typedef Radio::message_id_t wiselib::SunSpotRadio< OsModel_P, Radio_P, Timer_P, Debug_P >::message_id_t
template<typename OsModel_P , typename Radio_P , typename Timer_P , typename Debug_P >
typedef Radio::node_id_t wiselib::SunSpotRadio< OsModel_P, Radio_P, Timer_P, Debug_P >::node_id_t
template<typename OsModel_P , typename Radio_P , typename Timer_P , typename Debug_P >
typedef OsModel_P wiselib::SunSpotRadio< OsModel_P, Radio_P, Timer_P, Debug_P >::OsModel
template<typename OsModel_P , typename Radio_P , typename Timer_P , typename Debug_P >
typedef Radio_P wiselib::SunSpotRadio< OsModel_P, Radio_P, Timer_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 , RADIO_BASE_MAX_RECEIVERS >::radio_delegate_t [inherited]
template<typename OsModel_P , typename Radio_P , typename Timer_P , typename Debug_P >
typedef SunSpotRadio<OsModel_P, Radio_P, Timer_P, Debug_P> wiselib::SunSpotRadio< OsModel_P, Radio_P, Timer_P, Debug_P >::self_t
template<typename OsModel_P , typename Radio_P , typename Timer_P , typename Debug_P >
typedef Radio::size_t wiselib::SunSpotRadio< OsModel_P, Radio_P, Timer_P, Debug_P >::size_t
template<typename OsModel_P , typename Radio_P , typename Timer_P , typename Debug_P >
typedef Timer_P wiselib::SunSpotRadio< OsModel_P, Radio_P, Timer_P, Debug_P >::Timer

Member Enumeration Documentation

template<typename OsModel_P , typename Radio_P , typename Timer_P , typename Debug_P >
enum wiselib::SunSpotRadio::Restrictions
Enumerator:
HEADER_LENGHT 
MAX_MESSAGE_LENGTH 

Maximal number of bytes in payload.


Constructor & Destructor Documentation

template<typename OsModel_P , typename Radio_P , typename Timer_P , typename Debug_P >
wiselib::SunSpotRadio< OsModel_P, Radio_P, Timer_P, Debug_P >::SunSpotRadio ( ) [inline]
template<typename OsModel_P , typename Radio_P , typename Timer_P , typename Debug_P >
wiselib::SunSpotRadio< OsModel_P, Radio_P, Timer_P, Debug_P >::~SunSpotRadio ( ) [inline]

Member Function Documentation

template<typename OsModel_P , typename Radio_P , typename Timer_P , typename Debug_P >
void wiselib::SunSpotRadio< OsModel_P, Radio_P, Timer_P, Debug_P >::enable_radio ( void  ) [inline]
template<typename OsModel_P , typename Radio_P , typename Timer_P , typename Debug_P >
node_id_t wiselib::SunSpotRadio< OsModel_P, Radio_P, Timer_P, Debug_P >::get_port ( void  ) [inline]
template<typename OsModel_P , typename Radio_P , typename Timer_P , typename Debug_P >
void wiselib::SunSpotRadio< OsModel_P, Radio_P, Timer_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 , RADIO_BASE_MAX_RECEIVERS >::notify_receivers ( node_id_t  from,
size_t  len,
block_data_t data 
) [inline, inherited]
template<typename OsModel_P , typename Radio_P , typename Timer_P , typename Debug_P >
void wiselib::SunSpotRadio< OsModel_P, Radio_P, Timer_P, Debug_P >::receive ( node_id_t  source,
size_t  len,
block_data_t data 
) [inline]
int wiselib::RadioBase< OsModel_P, Radio_P::node_id_t , Radio_P::size_t , Radio_P::block_data_t , RADIO_BASE_MAX_RECEIVERS >::reg_recv_callback ( T *  obj_pnt) [inline, inherited]
template<typename OsModel_P , typename Radio_P , typename Timer_P , typename Debug_P >
void wiselib::SunSpotRadio< OsModel_P, Radio_P, Timer_P, Debug_P >::send ( node_id_t  id,
size_t  len,
block_data_t data 
) [inline]
template<typename OsModel_P , typename Radio_P , typename Timer_P , typename Debug_P >
void wiselib::SunSpotRadio< OsModel_P, Radio_P, Timer_P, Debug_P >::set_port ( uint8_t  port) [inline]
int wiselib::RadioBase< OsModel_P, Radio_P::node_id_t , Radio_P::size_t , Radio_P::block_data_t , RADIO_BASE_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