Wiselib
Classes | Public Types | Public Member Functions | Public Attributes
wiselib::Aggregation< OsModel_P, Radio_P, Debug_P, Cluster_P, Aggregate_P, Routing_P > Class Template Reference

#include <aggregation.h>

List of all members.

Classes

struct  messages_statistics

Public Types

enum  status_codes { RUNNING = 0, WAITING = 1, RECEIVING_VALUES = 2 }
enum  node_roles { LEAF_NODE = 0, NORMAL_NODE = 1, INTERMEDIATE_NODE = 2, SINK = 3 }
typedef OsModel_P OsModel
typedef Radio_P Radio
typedef Debug_P Debug
typedef Cluster_P Cluster
typedef OsModel_P::Clock Clock
typedef OsModel_P::Timer Timer
typedef Aggregate_P Aggregate_t
typedef Aggregate_t::value_t Aggregate_value_t
typedef Routing_P tree_routing_t
typedef AggregateMsg< OsModel,
Radio
msg_t
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 Clock::time_t time_t
typedef Radio::ExtendedData ExData
typedef Radio::TxPower TxPower
typedef Aggregation< OsModel_P,
Radio_P, Debug_P, Cluster_P,
Aggregate_P, Routing_P > 
self_t
typedef wiselib::vector_static
< OsModel, Aggregate_t, 10 > 
aggregates_vector_t
typedef
aggregates_vector_t::iterator 
iterator_t
typedef delegate4< void,
uint8_t, node_id_t, uint8_t,
uint8_t * > 
event_notifier_delegate_t

Public Member Functions

 Aggregation ()
 Constructor.
 ~Aggregation ()
void init (Radio &radio, Timer &timer, Clock &clock, Debug &debug, Cluster &cluster, tree_routing_t &tree)
 Initialize the module.
void enable ()
void disable ()
void init_aggregation ()
 Initializes the aggregation algorithm.
Aggregate_t combine_aggregates (Aggregate_t agg1, Aggregate_t agg2)
 Combines two aggregate value.
Aggregate_t combine_all_aggregates ()
void extract_aggregates ()
 Extracts the aggregate(s) value(s), used at the gateway (final destination node).
uint16_t msgs_count ()
uint32_t msgs_size ()
void send (Aggregate_t aggregate)
void wait_for_chlds (void *data)
void set_role (uint8_t role)
 Sets the role of the module.

Public Attributes

TxPower power
aggregates_vector_t aggregates_vector
 Vector containing the aggregates that the node is going to combine.

template<typename OsModel_P, typename Radio_P, typename Debug_P, typename Cluster_P, typename Aggregate_P, typename Routing_P>
class wiselib::Aggregation< OsModel_P, Radio_P, Debug_P, Cluster_P, Aggregate_P, Routing_P >


Member Typedef Documentation

template<typename OsModel_P , typename Radio_P , typename Debug_P , typename Cluster_P , typename Aggregate_P , typename Routing_P >
typedef Aggregate_P wiselib::Aggregation< OsModel_P, Radio_P, Debug_P, Cluster_P, Aggregate_P, Routing_P >::Aggregate_t
template<typename OsModel_P , typename Radio_P , typename Debug_P , typename Cluster_P , typename Aggregate_P , typename Routing_P >
typedef Aggregate_t::value_t wiselib::Aggregation< OsModel_P, Radio_P, Debug_P, Cluster_P, Aggregate_P, Routing_P >::Aggregate_value_t
template<typename OsModel_P , typename Radio_P , typename Debug_P , typename Cluster_P , typename Aggregate_P , typename Routing_P >
typedef wiselib::vector_static<OsModel, Aggregate_t, 10> wiselib::Aggregation< OsModel_P, Radio_P, Debug_P, Cluster_P, Aggregate_P, Routing_P >::aggregates_vector_t
template<typename OsModel_P , typename Radio_P , typename Debug_P , typename Cluster_P , typename Aggregate_P , typename Routing_P >
typedef Radio::block_data_t wiselib::Aggregation< OsModel_P, Radio_P, Debug_P, Cluster_P, Aggregate_P, Routing_P >::block_data_t
template<typename OsModel_P , typename Radio_P , typename Debug_P , typename Cluster_P , typename Aggregate_P , typename Routing_P >
typedef OsModel_P::Clock wiselib::Aggregation< OsModel_P, Radio_P, Debug_P, Cluster_P, Aggregate_P, Routing_P >::Clock
template<typename OsModel_P , typename Radio_P , typename Debug_P , typename Cluster_P , typename Aggregate_P , typename Routing_P >
typedef Cluster_P wiselib::Aggregation< OsModel_P, Radio_P, Debug_P, Cluster_P, Aggregate_P, Routing_P >::Cluster
template<typename OsModel_P , typename Radio_P , typename Debug_P , typename Cluster_P , typename Aggregate_P , typename Routing_P >
typedef Debug_P wiselib::Aggregation< OsModel_P, Radio_P, Debug_P, Cluster_P, Aggregate_P, Routing_P >::Debug
template<typename OsModel_P , typename Radio_P , typename Debug_P , typename Cluster_P , typename Aggregate_P , typename Routing_P >
typedef delegate4<void, uint8_t, node_id_t, uint8_t, uint8_t*> wiselib::Aggregation< OsModel_P, Radio_P, Debug_P, Cluster_P, Aggregate_P, Routing_P >::event_notifier_delegate_t
template<typename OsModel_P , typename Radio_P , typename Debug_P , typename Cluster_P , typename Aggregate_P , typename Routing_P >
typedef Radio::ExtendedData wiselib::Aggregation< OsModel_P, Radio_P, Debug_P, Cluster_P, Aggregate_P, Routing_P >::ExData
template<typename OsModel_P , typename Radio_P , typename Debug_P , typename Cluster_P , typename Aggregate_P , typename Routing_P >
typedef aggregates_vector_t::iterator wiselib::Aggregation< OsModel_P, Radio_P, Debug_P, Cluster_P, Aggregate_P, Routing_P >::iterator_t
template<typename OsModel_P , typename Radio_P , typename Debug_P , typename Cluster_P , typename Aggregate_P , typename Routing_P >
typedef Radio::message_id_t wiselib::Aggregation< OsModel_P, Radio_P, Debug_P, Cluster_P, Aggregate_P, Routing_P >::message_id_t
template<typename OsModel_P , typename Radio_P , typename Debug_P , typename Cluster_P , typename Aggregate_P , typename Routing_P >
typedef AggregateMsg<OsModel,Radio> wiselib::Aggregation< OsModel_P, Radio_P, Debug_P, Cluster_P, Aggregate_P, Routing_P >::msg_t
template<typename OsModel_P , typename Radio_P , typename Debug_P , typename Cluster_P , typename Aggregate_P , typename Routing_P >
typedef Radio::node_id_t wiselib::Aggregation< OsModel_P, Radio_P, Debug_P, Cluster_P, Aggregate_P, Routing_P >::node_id_t
template<typename OsModel_P , typename Radio_P , typename Debug_P , typename Cluster_P , typename Aggregate_P , typename Routing_P >
typedef OsModel_P wiselib::Aggregation< OsModel_P, Radio_P, Debug_P, Cluster_P, Aggregate_P, Routing_P >::OsModel
template<typename OsModel_P , typename Radio_P , typename Debug_P , typename Cluster_P , typename Aggregate_P , typename Routing_P >
typedef Radio_P wiselib::Aggregation< OsModel_P, Radio_P, Debug_P, Cluster_P, Aggregate_P, Routing_P >::Radio
template<typename OsModel_P , typename Radio_P , typename Debug_P , typename Cluster_P , typename Aggregate_P , typename Routing_P >
typedef Aggregation<OsModel_P, Radio_P, Debug_P, Cluster_P, Aggregate_P, Routing_P> wiselib::Aggregation< OsModel_P, Radio_P, Debug_P, Cluster_P, Aggregate_P, Routing_P >::self_t
template<typename OsModel_P , typename Radio_P , typename Debug_P , typename Cluster_P , typename Aggregate_P , typename Routing_P >
typedef Radio::size_t wiselib::Aggregation< OsModel_P, Radio_P, Debug_P, Cluster_P, Aggregate_P, Routing_P >::size_t
template<typename OsModel_P , typename Radio_P , typename Debug_P , typename Cluster_P , typename Aggregate_P , typename Routing_P >
typedef Clock::time_t wiselib::Aggregation< OsModel_P, Radio_P, Debug_P, Cluster_P, Aggregate_P, Routing_P >::time_t
template<typename OsModel_P , typename Radio_P , typename Debug_P , typename Cluster_P , typename Aggregate_P , typename Routing_P >
typedef OsModel_P::Timer wiselib::Aggregation< OsModel_P, Radio_P, Debug_P, Cluster_P, Aggregate_P, Routing_P >::Timer
template<typename OsModel_P , typename Radio_P , typename Debug_P , typename Cluster_P , typename Aggregate_P , typename Routing_P >
typedef Routing_P wiselib::Aggregation< OsModel_P, Radio_P, Debug_P, Cluster_P, Aggregate_P, Routing_P >::tree_routing_t
template<typename OsModel_P , typename Radio_P , typename Debug_P , typename Cluster_P , typename Aggregate_P , typename Routing_P >
typedef Radio::TxPower wiselib::Aggregation< OsModel_P, Radio_P, Debug_P, Cluster_P, Aggregate_P, Routing_P >::TxPower

Member Enumeration Documentation

template<typename OsModel_P , typename Radio_P , typename Debug_P , typename Cluster_P , typename Aggregate_P , typename Routing_P >
enum wiselib::Aggregation::node_roles
Enumerator:
LEAF_NODE 

the node is a leaf at the cluster

NORMAL_NODE 

normal node that just send and combines aggregates

INTERMEDIATE_NODE 

node that is responsible for collenting the aggregates at a local level

SINK 

The final destination that the intermediate nodes will send the aggregate vallues.

template<typename OsModel_P , typename Radio_P , typename Debug_P , typename Cluster_P , typename Aggregate_P , typename Routing_P >
enum wiselib::Aggregation::status_codes
Enumerator:
RUNNING 
WAITING 
RECEIVING_VALUES 

Constructor & Destructor Documentation

template<typename OsModel_P , typename Radio_P , typename Debug_P , typename Cluster_P , typename Aggregate_P , typename Routing_P >
wiselib::Aggregation< OsModel_P, Radio_P, Debug_P, Cluster_P, Aggregate_P, Routing_P >::Aggregation ( ) [inline]

Constructor.

template<typename OsModel_P , typename Radio_P , typename Debug_P , typename Cluster_P , typename Aggregate_P , typename Routing_P >
wiselib::Aggregation< OsModel_P, Radio_P, Debug_P, Cluster_P, Aggregate_P, Routing_P >::~Aggregation ( ) [inline]

Member Function Documentation

template<typename OsModel_P , typename Radio_P , typename Debug_P , typename Cluster_P , typename Aggregate_P , typename Routing_P >
Aggregate_t wiselib::Aggregation< OsModel_P, Radio_P, Debug_P, Cluster_P, Aggregate_P, Routing_P >::combine_aggregates ( Aggregate_t  agg1,
Aggregate_t  agg2 
) [inline]

Combines two aggregate value.

The specific function is implemented in the aggregation_base since the rest of the algorithm is independent.

template<typename OsModel_P , typename Radio_P , typename Debug_P , typename Cluster_P , typename Aggregate_P , typename Routing_P >
Aggregate_t wiselib::Aggregation< OsModel_P, Radio_P, Debug_P, Cluster_P, Aggregate_P, Routing_P >::combine_all_aggregates ( ) [inline]
template<typename OsModel_P , typename Radio_P , typename Debug_P , typename Cluster_P , typename Aggregate_P , typename Routing_P >
void wiselib::Aggregation< OsModel_P, Radio_P, Debug_P, Cluster_P, Aggregate_P, Routing_P >::disable ( ) [inline]
template<typename OsModel_P , typename Radio_P , typename Debug_P , typename Cluster_P , typename Aggregate_P , typename Routing_P >
void wiselib::Aggregation< OsModel_P, Radio_P, Debug_P, Cluster_P, Aggregate_P, Routing_P >::enable ( ) [inline]
template<typename OsModel_P , typename Radio_P , typename Debug_P , typename Cluster_P , typename Aggregate_P , typename Routing_P >
void wiselib::Aggregation< OsModel_P, Radio_P, Debug_P, Cluster_P, Aggregate_P, Routing_P >::extract_aggregates ( ) [inline]

Extracts the aggregate(s) value(s), used at the gateway (final destination node).

template<typename OsModel_P , typename Radio_P , typename Debug_P , typename Cluster_P , typename Aggregate_P , typename Routing_P >
void wiselib::Aggregation< OsModel_P, Radio_P, Debug_P, Cluster_P, Aggregate_P, Routing_P >::init ( Radio radio,
Timer timer,
Clock clock,
Debug debug,
Cluster cluster,
tree_routing_t tree 
) [inline]

Initialize the module.

template<typename OsModel_P , typename Radio_P , typename Debug_P , typename Cluster_P , typename Aggregate_P , typename Routing_P >
void wiselib::Aggregation< OsModel_P, Radio_P, Debug_P, Cluster_P, Aggregate_P, Routing_P >::init_aggregation ( ) [inline]

Initializes the aggregation algorithm.

template<typename OsModel_P , typename Radio_P , typename Debug_P , typename Cluster_P , typename Aggregate_P , typename Routing_P >
uint16_t wiselib::Aggregation< OsModel_P, Radio_P, Debug_P, Cluster_P, Aggregate_P, Routing_P >::msgs_count ( ) [inline]
template<typename OsModel_P , typename Radio_P , typename Debug_P , typename Cluster_P , typename Aggregate_P , typename Routing_P >
uint32_t wiselib::Aggregation< OsModel_P, Radio_P, Debug_P, Cluster_P, Aggregate_P, Routing_P >::msgs_size ( ) [inline]
template<typename OsModel_P , typename Radio_P , typename Debug_P , typename Cluster_P , typename Aggregate_P , typename Routing_P >
void wiselib::Aggregation< OsModel_P, Radio_P, Debug_P, Cluster_P, Aggregate_P, Routing_P >::send ( Aggregate_t  aggregate) [inline]
template<typename OsModel_P , typename Radio_P , typename Debug_P , typename Cluster_P , typename Aggregate_P , typename Routing_P >
void wiselib::Aggregation< OsModel_P, Radio_P, Debug_P, Cluster_P, Aggregate_P, Routing_P >::set_role ( uint8_t  role) [inline]

Sets the role of the module.

template<typename OsModel_P , typename Radio_P , typename Debug_P , typename Cluster_P , typename Aggregate_P , typename Routing_P >
void wiselib::Aggregation< OsModel_P, Radio_P, Debug_P, Cluster_P, Aggregate_P, Routing_P >::wait_for_chlds ( void *  data) [inline]

Member Data Documentation

template<typename OsModel_P , typename Radio_P , typename Debug_P , typename Cluster_P , typename Aggregate_P , typename Routing_P >
aggregates_vector_t wiselib::Aggregation< OsModel_P, Radio_P, Debug_P, Cluster_P, Aggregate_P, Routing_P >::aggregates_vector

Vector containing the aggregates that the node is going to combine.

template<typename OsModel_P , typename Radio_P , typename Debug_P , typename Cluster_P , typename Aggregate_P , typename Routing_P >
TxPower wiselib::Aggregation< OsModel_P, Radio_P, Debug_P, Cluster_P, Aggregate_P, Routing_P >::power

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