Wiselib
Public Member Functions
concepts::BasicAlgorithm_concept Class Reference

Each algorithm must have one init() and one destruct() method. More...

Inherited by concepts::Cryptographic_concept, concepts::ModularClustering_concept, concepts::NodeDistanceEstimation_concept, concepts::Position_concept, and concepts::Routing_concept.

List of all members.

Public Member Functions

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

Detailed Description

Each algorithm must have one init() and one destruct() method.

Calling init(), the complete state of the algorithm is reset - as if it was newly started (e.g., turning on the radio, deleting previous states, ...). Calling destruct, it should turn off all used components (e.g., turn off radio) and is not allowed to use any Os facet functionality (e.g., no timer registration). In addition, it may have an init() method that expects parameters - where references to Os facet instances can be passed. If so, this method is expected to be called only once during program run-time.


Member Function Documentation

int concepts::BasicAlgorithm_concept::destruct ( )

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 ( )

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.


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