Wiselib
Public Types | Public Member Functions | Public Attributes
concepts::ModularClustering_concept Class Reference

Basic Concept for Modular Clustering Algorithms. More...

Inherits concepts::BasicAlgorithm_concept.

List of all members.

Public Types

enum  NodeTypes { UNCLUSTERED, SIMPLE, HEAD, GATEWAY }
enum  ClusterIds { UNKNOWN_CLUSTER_HEAD }
enum  AlgorithmStatus { FORMED, FORMING, DISABLED }
enum  CallbackEvents { CLUSTER_HEAD_CHANGED, NODE_JOINED, NODE_LEFT, CLUSTER_FORMED }

Public Member Functions

int init ()
 Reset algorithm.
int destruct ()
 Turn off algorithm - and thus all Os facets where possible.

Public Attributes

typedef cluster_id_t
 Defines the type of the cluster id (defined by node_id_t).

Detailed Description

Basic Concept for Modular Clustering Algorithms.

The modular clustering algorithm concept basically implements the basic algorithm concept (and thus provides an init() and destruct() method).

There are several kinds of clustering algorithms available. Clustering algorithms consist of 3 different sections that can easily be distinguished. The Cluster Head Decision (CHD) , the Join Decision (JD) and the Iterator (IT). All 3 sections of a clustering algorithm are implemented separately and are coordinated by a 4th module the Core Component (CC). The CHD uses some logic to decide which nodes will serve as cluster heads inside the network. The JD is responsible for deciding whether a node will join a nearby cluster or not. The IT keeps track of the cluster's status and it's neighbors. The CC is responsible for coordinating and initializing all other modules, registering the required callbacks and communicating with any other algorithms running simultaneously with the clustering algorithm.

The modular clustering algorithm concept is therefore as abstract as possible, to cover all kinds of possible algorithms. Thus, a clustering algorithm is supposed to provide some basic methods for interaction with other algorithms. Enable/disable are for starting/initializing/stopping an algorithm. It must also be possible to (un)register a callback method for event notifications.


Member Enumeration Documentation

Enumerator:
FORMED 

the cluster is formed and stable

FORMING 

the cluster is now beeing formed

DISABLED 

the clustering algorithm is disabled

Enumerator:
CLUSTER_HEAD_CHANGED 

A new cluster head was elected.

NODE_JOINED 

A cluster head received a new node in cluster.

NODE_LEFT 

A cluster head lost a node from cluster.

CLUSTER_FORMED 

A node in the outer edge of a cluster found no new nodes.

Enumerator:
UNKNOWN_CLUSTER_HEAD 

The cluster id of a node that has not joined any cluster.

Enumerator:
UNCLUSTERED 

A node that has not yet formed a cluster.

SIMPLE 

A node that joined a cluster.

HEAD 

A node that is an elected Cluster Head.

GATEWAY 

A node that is located between 2 clusters.


Member Function Documentation

int concepts::BasicAlgorithm_concept::destruct ( ) [inherited]

Turn off algorithm - and thus all Os facets where possible.

Do not use any Os facet functionality until init() is called.

Reimplemented in concepts::NodeDistanceEstimation_concept, concepts::Position_concept, and concepts::Routing_concept.

int concepts::BasicAlgorithm_concept::init ( ) [inherited]

Reset algorithm.

Re-init all states, turn on Os facets (if used and enable function is existent).

Reimplemented in concepts::NodeDistanceEstimation_concept, concepts::Position_concept, and concepts::Routing_concept.


Member Data Documentation

Defines the type of the cluster id (defined by node_id_t).


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