Wiselib
Public Member Functions | Public Attributes
concepts::CoreComponent_concept Class Reference

Basic Concept for Core Components. More...

List of all members.

Public Member Functions

void init ()
 Initialize algorithm and pass pointers to the os modules and applications needed.
void set_cluster_head_decision (HeadDecision_t &chd)
 Sets the CHD Module.
void set_join_decision (JoinDecision_t &jd)
 Sets the JD Module.
void set_iterator (Iterator_t &it)
 Sets the Iterator Module.
void set_parameters (uint8_t *params)
 Pass any parameters needed by the algorithm.
node_id_t parent ()
 Returns the parent of the node inside the cluster.
cluster_id_t cluster_id ()
 Returns the cluster id of the node or UNKNOWN_CLUSTER_HEAD.
int hops ()
 Returns the distance of the node to its cluster head.
int node_type ()
 Returns the type of the node inside the cluster, one of UNCLUSTERED, SIMPLE, HEAD, GATEWAY.
int childs_count ()
void childs (node_id_t *list)
uint8_t status ()
 Returns the status of the cluster (stable or forming) FORMING, FORMED, DISABLED.
bool is_cluster_head ()
 Returns if the node is a cluster head or not.
void present_neighbors ()
void enable ()
void disable ()
void form_cluster (void *parameter)
void find_head (void *parameter)
void reform_cluster (void *parameter)
void wait_for_joins (void *parameter)
void receive (node_id_t from, size_t len, block_data_t *recvm)

Public Attributes

typedef OsModel
typedef Radio
typedef Timer
typedef Debug
typedef HeadDecision_t
 Cluster Head Decision type.
typedef JoinDecision_t
 Join Decision type.
typedef Iterator_t
 Iterator type
typedef self_type
typedef node_id_t
typedef size_t
typedef block_data_t
typedef cluster_id_t

Detailed Description

Basic Concept for Core Components.

This Module is used to connect and combine the other 3 modules in order to form a Clustering Algorithm. The Core Component has to be as abstract and simple as possible in order to provide the basic interface between the clustering algorithm and the other applications as Neighborhood Discovery.

At the moment each clustering algorithm implementation has its own Core Component implemented.


Member Function Documentation

void concepts::CoreComponent_concept::childs ( node_id_t list)
int concepts::CoreComponent_concept::childs_count ( )
cluster_id_t concepts::CoreComponent_concept::cluster_id ( )

Returns the cluster id of the node or UNKNOWN_CLUSTER_HEAD.

void concepts::CoreComponent_concept::disable ( )
void concepts::CoreComponent_concept::enable ( )
void concepts::CoreComponent_concept::find_head ( void *  parameter)
void concepts::CoreComponent_concept::form_cluster ( void *  parameter)
int concepts::CoreComponent_concept::hops ( )

Returns the distance of the node to its cluster head.

void concepts::CoreComponent_concept::init ( )

Initialize algorithm and pass pointers to the os modules and applications needed.

bool concepts::CoreComponent_concept::is_cluster_head ( )

Returns if the node is a cluster head or not.

int concepts::CoreComponent_concept::node_type ( )

Returns the type of the node inside the cluster, one of UNCLUSTERED, SIMPLE, HEAD, GATEWAY.

node_id_t concepts::CoreComponent_concept::parent ( )

Returns the parent of the node inside the cluster.

void concepts::CoreComponent_concept::present_neighbors ( )
void concepts::CoreComponent_concept::receive ( node_id_t  from,
size_t  len,
block_data_t recvm 
)
void concepts::CoreComponent_concept::reform_cluster ( void *  parameter)
void concepts::CoreComponent_concept::set_cluster_head_decision ( HeadDecision_t chd)

Sets the CHD Module.

void concepts::CoreComponent_concept::set_iterator ( Iterator_t it)

Sets the Iterator Module.

void concepts::CoreComponent_concept::set_join_decision ( JoinDecision_t jd)

Sets the JD Module.

void concepts::CoreComponent_concept::set_parameters ( uint8_t *  params)

Pass any parameters needed by the algorithm.

uint8_t concepts::CoreComponent_concept::status ( )

Returns the status of the cluster (stable or forming) FORMING, FORMED, DISABLED.

void concepts::CoreComponent_concept::wait_for_joins ( void *  parameter)

Member Data Documentation

Iterator type

Join Decision type.


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