Wiselib
Public Types | Public Member Functions | Protected Member Functions
wiselib::LcaCore< OsModel_P, Radio_P, HeadDecision_P, JoinDecision_P, Iterator_P > Class Template Reference

LCA clustering core component. More...

#include <lca.h>

Inherits wiselib::ClusteringBase< OsModel_P >.

List of all members.

Public Types

typedef OsModel_P OsModel
typedef Radio_P Radio
typedef OsModel::Timer Timer
typedef OsModel::Debug Debug
typedef OsModel::Rand Rand
typedef HeadDecision_P HeadDecision_t
typedef JoinDecision_P JoinDecision_t
typedef Iterator_P Iterator_t
typedef LcaCore< OsModel_P,
Radio_P, HeadDecision_P,
JoinDecision_P, Iterator_P > 
self_type
typedef wiselib::Echo< OsModel,
Radio, Timer, Debug
nb_t
typedef int cluster_level_t
typedef Radio::node_id_t node_id_t
typedef Radio::size_t size_t
typedef Radio::block_data_t block_data_t
typedef node_id_t cluster_id_t
enum  ReturnValues
typedef delegate1< void, int > cluster_delegate_t
typedef vector_static< OsModel,
cluster_delegate_t, 5 > 
CallbackVector
typedef CallbackVector::iterator CallbackVectorIterator

Public Member Functions

 LcaCore ()
 ~LcaCore ()
void init (Radio &radio, Timer &timer, Debug &debug, Rand &rand, nb_t &neighbor_discovery)
void set_iterator (Iterator_t &it)
void set_join_decision (JoinDecision_t &jd)
void set_cluster_head_decision (HeadDecision_t &chd)
void set_probability (int prob)
void set_maxhops (int maxhops)
node_id_t parent ()
cluster_id_t cluster_id ()
int node_type ()
int hops ()
uint8_t status ()
bool is_cluster_head ()
void present_neighbors (void)
void enable ()
void disable ()
void reform_cluster (void *parameter)
void form_cluster (void *parameter)
void find_head (void *)
void wait_for_joins (void *data)
void timer_expired (void *timer_value)
int reg_state_changed_callback (T *obj_pnt)
int unreg_state_changed_callback (int idx)
void state_changed (int event)

Protected Member Functions

void neighbor_discovery_callback (uint8_t event, node_id_t from, uint8_t len, uint8_t *data)
size_t beacon_size ()
void receive_beacon (node_id_t node_from, size_t len, uint8_t *data)
void get_beacon (uint8_t *mess)
void receive (node_id_t from, size_t len, block_data_t *data)
void node_lost (node_id_t node)

Detailed Description

template<typename OsModel_P, typename Radio_P, typename HeadDecision_P, typename JoinDecision_P, typename Iterator_P>
class wiselib::LcaCore< OsModel_P, Radio_P, HeadDecision_P, JoinDecision_P, Iterator_P >

LCA clustering core component.


Member Typedef Documentation

template<typename OsModel_P , typename Radio_P , typename HeadDecision_P , typename JoinDecision_P , typename Iterator_P >
typedef Radio::block_data_t wiselib::LcaCore< OsModel_P, Radio_P, HeadDecision_P, JoinDecision_P, Iterator_P >::block_data_t
typedef delegate1<void, int> wiselib::ClusteringBase< OsModel_P, 5 >::cluster_delegate_t [inherited]
template<typename OsModel_P , typename Radio_P , typename HeadDecision_P , typename JoinDecision_P , typename Iterator_P >
typedef node_id_t wiselib::LcaCore< OsModel_P, Radio_P, HeadDecision_P, JoinDecision_P, Iterator_P >::cluster_id_t
template<typename OsModel_P , typename Radio_P , typename HeadDecision_P , typename JoinDecision_P , typename Iterator_P >
typedef int wiselib::LcaCore< OsModel_P, Radio_P, HeadDecision_P, JoinDecision_P, Iterator_P >::cluster_level_t
template<typename OsModel_P , typename Radio_P , typename HeadDecision_P , typename JoinDecision_P , typename Iterator_P >
typedef OsModel::Debug wiselib::LcaCore< OsModel_P, Radio_P, HeadDecision_P, JoinDecision_P, Iterator_P >::Debug
template<typename OsModel_P , typename Radio_P , typename HeadDecision_P , typename JoinDecision_P , typename Iterator_P >
typedef HeadDecision_P wiselib::LcaCore< OsModel_P, Radio_P, HeadDecision_P, JoinDecision_P, Iterator_P >::HeadDecision_t
template<typename OsModel_P , typename Radio_P , typename HeadDecision_P , typename JoinDecision_P , typename Iterator_P >
typedef Iterator_P wiselib::LcaCore< OsModel_P, Radio_P, HeadDecision_P, JoinDecision_P, Iterator_P >::Iterator_t
template<typename OsModel_P , typename Radio_P , typename HeadDecision_P , typename JoinDecision_P , typename Iterator_P >
typedef JoinDecision_P wiselib::LcaCore< OsModel_P, Radio_P, HeadDecision_P, JoinDecision_P, Iterator_P >::JoinDecision_t
template<typename OsModel_P , typename Radio_P , typename HeadDecision_P , typename JoinDecision_P , typename Iterator_P >
typedef wiselib::Echo<OsModel, Radio, Timer, Debug> wiselib::LcaCore< OsModel_P, Radio_P, HeadDecision_P, JoinDecision_P, Iterator_P >::nb_t
template<typename OsModel_P , typename Radio_P , typename HeadDecision_P , typename JoinDecision_P , typename Iterator_P >
typedef Radio::node_id_t wiselib::LcaCore< OsModel_P, Radio_P, HeadDecision_P, JoinDecision_P, Iterator_P >::node_id_t
template<typename OsModel_P , typename Radio_P , typename HeadDecision_P , typename JoinDecision_P , typename Iterator_P >
typedef OsModel_P wiselib::LcaCore< OsModel_P, Radio_P, HeadDecision_P, JoinDecision_P, Iterator_P >::OsModel
template<typename OsModel_P , typename Radio_P , typename HeadDecision_P , typename JoinDecision_P , typename Iterator_P >
typedef Radio_P wiselib::LcaCore< OsModel_P, Radio_P, HeadDecision_P, JoinDecision_P, Iterator_P >::Radio
template<typename OsModel_P , typename Radio_P , typename HeadDecision_P , typename JoinDecision_P , typename Iterator_P >
typedef OsModel::Rand wiselib::LcaCore< OsModel_P, Radio_P, HeadDecision_P, JoinDecision_P, Iterator_P >::Rand
template<typename OsModel_P , typename Radio_P , typename HeadDecision_P , typename JoinDecision_P , typename Iterator_P >
typedef LcaCore<OsModel_P, Radio_P, HeadDecision_P, JoinDecision_P, Iterator_P> wiselib::LcaCore< OsModel_P, Radio_P, HeadDecision_P, JoinDecision_P, Iterator_P >::self_type
template<typename OsModel_P , typename Radio_P , typename HeadDecision_P , typename JoinDecision_P , typename Iterator_P >
typedef Radio::size_t wiselib::LcaCore< OsModel_P, Radio_P, HeadDecision_P, JoinDecision_P, Iterator_P >::size_t
template<typename OsModel_P , typename Radio_P , typename HeadDecision_P , typename JoinDecision_P , typename Iterator_P >
typedef OsModel::Timer wiselib::LcaCore< OsModel_P, Radio_P, HeadDecision_P, JoinDecision_P, Iterator_P >::Timer

Member Enumeration Documentation


Constructor & Destructor Documentation

template<typename OsModel_P , typename Radio_P , typename HeadDecision_P , typename JoinDecision_P , typename Iterator_P >
wiselib::LcaCore< OsModel_P, Radio_P, HeadDecision_P, JoinDecision_P, Iterator_P >::LcaCore ( ) [inline]
template<typename OsModel_P , typename Radio_P , typename HeadDecision_P , typename JoinDecision_P , typename Iterator_P >
wiselib::LcaCore< OsModel_P, Radio_P, HeadDecision_P, JoinDecision_P, Iterator_P >::~LcaCore ( ) [inline]

Member Function Documentation

template<typename OsModel_P , typename Radio_P , typename HeadDecision_P , typename JoinDecision_P , typename Iterator_P >
size_t wiselib::LcaCore< OsModel_P, Radio_P, HeadDecision_P, JoinDecision_P, Iterator_P >::beacon_size ( ) [inline, protected]
template<typename OsModel_P , typename Radio_P , typename HeadDecision_P , typename JoinDecision_P , typename Iterator_P >
cluster_id_t wiselib::LcaCore< OsModel_P, Radio_P, HeadDecision_P, JoinDecision_P, Iterator_P >::cluster_id ( void  ) [inline]
template<typename OsModel_P , typename Radio_P , typename HeadDecision_P , typename JoinDecision_P , typename Iterator_P >
void wiselib::LcaCore< OsModel_P, Radio_P, HeadDecision_P, JoinDecision_P, Iterator_P >::disable ( void  ) [inline]
template<typename OsModel_P , typename Radio_P , typename HeadDecision_P , typename JoinDecision_P , typename Iterator_P >
void wiselib::LcaCore< OsModel_P, Radio_P, HeadDecision_P, JoinDecision_P, Iterator_P >::enable ( void  ) [inline]
template<typename OsModel_P , typename Radio_P , typename HeadDecision_P , typename JoinDecision_P , typename Iterator_P >
void wiselib::LcaCore< OsModel_P, Radio_P, HeadDecision_P, JoinDecision_P, Iterator_P >::find_head ( void *  ) [inline]
template<typename OsModel_P , typename Radio_P , typename HeadDecision_P , typename JoinDecision_P , typename Iterator_P >
void wiselib::LcaCore< OsModel_P, Radio_P, HeadDecision_P, JoinDecision_P, Iterator_P >::form_cluster ( void *  parameter) [inline]
template<typename OsModel_P , typename Radio_P , typename HeadDecision_P , typename JoinDecision_P , typename Iterator_P >
void wiselib::LcaCore< OsModel_P, Radio_P, HeadDecision_P, JoinDecision_P, Iterator_P >::get_beacon ( uint8_t mess) [inline, protected]
template<typename OsModel_P , typename Radio_P , typename HeadDecision_P , typename JoinDecision_P , typename Iterator_P >
int wiselib::LcaCore< OsModel_P, Radio_P, HeadDecision_P, JoinDecision_P, Iterator_P >::hops ( void  ) [inline]
template<typename OsModel_P , typename Radio_P , typename HeadDecision_P , typename JoinDecision_P , typename Iterator_P >
void wiselib::LcaCore< OsModel_P, Radio_P, HeadDecision_P, JoinDecision_P, Iterator_P >::init ( Radio radio,
Timer timer,
Debug debug,
Rand rand,
nb_t neighbor_discovery 
) [inline]
template<typename OsModel_P , typename Radio_P , typename HeadDecision_P , typename JoinDecision_P , typename Iterator_P >
bool wiselib::LcaCore< OsModel_P, Radio_P, HeadDecision_P, JoinDecision_P, Iterator_P >::is_cluster_head ( ) [inline]
template<typename OsModel_P , typename Radio_P , typename HeadDecision_P , typename JoinDecision_P , typename Iterator_P >
void wiselib::LcaCore< OsModel_P, Radio_P, HeadDecision_P, JoinDecision_P, Iterator_P >::neighbor_discovery_callback ( uint8_t  event,
node_id_t  from,
uint8_t  len,
uint8_t data 
) [inline, protected]
template<typename OsModel_P , typename Radio_P , typename HeadDecision_P , typename JoinDecision_P , typename Iterator_P >
void wiselib::LcaCore< OsModel_P, Radio_P, HeadDecision_P, JoinDecision_P, Iterator_P >::node_lost ( node_id_t  node) [inline, protected]
template<typename OsModel_P , typename Radio_P , typename HeadDecision_P , typename JoinDecision_P , typename Iterator_P >
int wiselib::LcaCore< OsModel_P, Radio_P, HeadDecision_P, JoinDecision_P, Iterator_P >::node_type ( void  ) [inline]
template<typename OsModel_P , typename Radio_P , typename HeadDecision_P , typename JoinDecision_P , typename Iterator_P >
node_id_t wiselib::LcaCore< OsModel_P, Radio_P, HeadDecision_P, JoinDecision_P, Iterator_P >::parent ( void  ) [inline]
template<typename OsModel_P , typename Radio_P , typename HeadDecision_P , typename JoinDecision_P , typename Iterator_P >
void wiselib::LcaCore< OsModel_P, Radio_P, HeadDecision_P, JoinDecision_P, Iterator_P >::present_neighbors ( void  ) [inline]
template<typename OsModel_P , typename Radio_P , typename HeadDecision_P , typename JoinDecision_P , typename Iterator_P >
void wiselib::LcaCore< OsModel_P, Radio_P, HeadDecision_P, JoinDecision_P, Iterator_P >::receive ( node_id_t  from,
size_t  len,
block_data_t data 
) [inline, protected]
template<typename OsModel_P , typename Radio_P , typename HeadDecision_P , typename JoinDecision_P , typename Iterator_P >
void wiselib::LcaCore< OsModel_P, Radio_P, HeadDecision_P, JoinDecision_P, Iterator_P >::receive_beacon ( node_id_t  node_from,
size_t  len,
uint8_t data 
) [inline, protected]
template<typename OsModel_P , typename Radio_P , typename HeadDecision_P , typename JoinDecision_P , typename Iterator_P >
void wiselib::LcaCore< OsModel_P, Radio_P, HeadDecision_P, JoinDecision_P, Iterator_P >::reform_cluster ( void *  parameter) [inline]
int wiselib::ClusteringBase< OsModel_P, 5 >::reg_state_changed_callback ( T *  obj_pnt) [inline, inherited]
template<typename OsModel_P , typename Radio_P , typename HeadDecision_P , typename JoinDecision_P , typename Iterator_P >
void wiselib::LcaCore< OsModel_P, Radio_P, HeadDecision_P, JoinDecision_P, Iterator_P >::set_cluster_head_decision ( HeadDecision_t chd) [inline]
template<typename OsModel_P , typename Radio_P , typename HeadDecision_P , typename JoinDecision_P , typename Iterator_P >
void wiselib::LcaCore< OsModel_P, Radio_P, HeadDecision_P, JoinDecision_P, Iterator_P >::set_iterator ( Iterator_t it) [inline]
template<typename OsModel_P , typename Radio_P , typename HeadDecision_P , typename JoinDecision_P , typename Iterator_P >
void wiselib::LcaCore< OsModel_P, Radio_P, HeadDecision_P, JoinDecision_P, Iterator_P >::set_join_decision ( JoinDecision_t jd) [inline]
template<typename OsModel_P , typename Radio_P , typename HeadDecision_P , typename JoinDecision_P , typename Iterator_P >
void wiselib::LcaCore< OsModel_P, Radio_P, HeadDecision_P, JoinDecision_P, Iterator_P >::set_maxhops ( int  maxhops) [inline]
template<typename OsModel_P , typename Radio_P , typename HeadDecision_P , typename JoinDecision_P , typename Iterator_P >
void wiselib::LcaCore< OsModel_P, Radio_P, HeadDecision_P, JoinDecision_P, Iterator_P >::set_probability ( int  prob) [inline]
void wiselib::ClusteringBase< OsModel_P, 5 >::state_changed ( int  event) [inline, inherited]
template<typename OsModel_P , typename Radio_P , typename HeadDecision_P , typename JoinDecision_P , typename Iterator_P >
uint8_t wiselib::LcaCore< OsModel_P, Radio_P, HeadDecision_P, JoinDecision_P, Iterator_P >::status ( ) [inline]
template<typename OsModel_P , typename Radio_P , typename HeadDecision_P , typename JoinDecision_P , typename Iterator_P >
void wiselib::LcaCore< OsModel_P, Radio_P, HeadDecision_P, JoinDecision_P, Iterator_P >::timer_expired ( void *  timer_value) [inline]
int wiselib::ClusteringBase< OsModel_P, 5 >::unreg_state_changed_callback ( int  idx) [inline, inherited]
template<typename OsModel_P , typename Radio_P , typename HeadDecision_P , typename JoinDecision_P , typename Iterator_P >
void wiselib::LcaCore< OsModel_P, Radio_P, HeadDecision_P, JoinDecision_P, Iterator_P >::wait_for_joins ( void *  data) [inline]

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