ZeroSDN Controller  1.0
A modular distributed Software-Defined Network Controller
 All Classes Files Functions Variables Enumerations Enumerator Friends Macros
StatisticsModule Class Reference

A Module that gathers informations of all Switches. More...

#include <StatisticsModule.hpp>

Inheritance diagram for StatisticsModule:

Public Member Functions

 StatisticsModule (uint64_t instanceId)
 
 ~StatisticsModule ()
 
virtual void handleModuleStateChange (std::shared_ptr< zmf::data::ModuleHandle > changedModule, zmf::data::ModuleState newState, zmf::data::ModuleState lastState) override
 

Protected Member Functions

virtual bool enable ()
 
virtual void disable ()
 

Detailed Description

A Module that gathers informations of all Switches.

The StatisticsModule sends out pulling requests every few seconds. On Response, it extracts important statistics and publishes them to everyone that is intressted in them

Author
Tobias Korb
Date
28.06.2015

Constructor & Destructor Documentation

StatisticsModule::StatisticsModule ( uint64_t  instanceId)

Constructs (but does not start) A StatisticsModule.

Parameters
instanceIdthe switchId of the switch represented by this StatisticsModule.
StatisticsModule::~StatisticsModule ( )

Destructor in case the Module isnt disabled correctly

Member Function Documentation

void StatisticsModule::disable ( )
protectedvirtual

CALLED, BY CORE, DONT CALL IT FROM MODULE. USE getZmf()->requestDisable Called when the module should disable itself. Must stop the module (threads etc.).

bool StatisticsModule::enable ( )
protectedvirtual

CALLED, BY CORE, DONT CALL IT FROM MODULE. MODULE CAN NOT INFLUENCE ENABLING Called when the module should enable itself. Must initialize and start the module.

Returns
True if enable successful, False if enable failed or rejected
void StatisticsModule::handleModuleStateChange ( std::shared_ptr< zmf::data::ModuleHandle >  changedModule,
zmf::data::ModuleState  newState,
zmf::data::ModuleState  lastState 
)
overridevirtual

Optional: Handle state changes of other modules


The documentation for this class was generated from the following files: