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

#include <DeviceModule.hpp>

Inheritance diagram for DeviceModule:

Public Member Functions

 DeviceModule (uint64_t instanceId)
 
 ~DeviceModule ()
 
virtual zmf::data::ZmfOutReply handleRequest (const zmf::data::ZmfMessage &message, const zmf::data::ModuleUniqueId &sender) override
 
virtual void disable ()
 
const std::map< uint64_t,
Device > & 
UTAccessor_getAllDevicesMap ()
 
void UTAccessor_addDevice (const Device &device)
 
void UTAccessor_handlePacketIn (const zmf::data::ZmfMessage &message, const zmf::data::ModuleUniqueId &id)
 
zmf::data::ZmfOutReply UTAccessor_handleRequest (const zmf::data::ZmfMessage &message, const zmf::data::ModuleUniqueId &sender)
 
DeviceUTAccessor_getDeviceByMACAddress (uint64_t macAddress)
 
bool UTAccessor_isDevicePassingFurtherFilters (const DeviceModule_Proto::Request_GetDevicesByFilterRequest &filterRequest, Device &device)
 
void UTAccessor_handleSwitchLinkEvent (const ZmfMessage &message, const ModuleUniqueId &id)
 
std::vector
< common::topology::SwitchToSwitchLink > 
UTAccessor_SwitchToSwitchLinkCache ()
 
void UTAccessor_RequestAllSwitchToSwitchLinksFromLinkDiscoveryModule ()
 
void UTAccessor_validateDevices ()
 

Protected Member Functions

virtual bool enable ()
 

Detailed Description

The DeviceModule collects information about the Devices connected to the SDN network. A Device in this context is an entity with a MAC-Address. Switches are not clarified as Devices. Therefore the DeviceModule uses information about the Links between switches to determine whether a Device is a Switch or not.

Author
Tobias Freundorfer

Constructor & Destructor Documentation

DeviceModule::DeviceModule ( uint64_t  instanceId)
DeviceModule::~DeviceModule ( )

Member Function Documentation

void DeviceModule::disable ( )
virtual

Called when the module should disable itself. Must stop the module and clear all caches.

bool DeviceModule::enable ( )
protectedvirtual

Enables this DeviceModule and subscribes itself to the specific topics.

Returns
True if enable successful, False if enable failed or rejected

Topic for IPv4 packet_in's Topic for IPv6 packet_in's

zmf::data::ZmfOutReply DeviceModule::handleRequest ( const zmf::data::ZmfMessage &  message,
const zmf::data::ModuleUniqueId &  sender 
)
overridevirtual

Will handle requests of types...: 1.) REQUEST.DEVICE_MODULE.GET_ALL_DEVICES: Query all Devices known to the DeviceModule. 2.) REQUEST.DEVICE_MODULE.GET_DEVICE_BY_MAC_ADDRESS: Query for a single device. Request must contain MAC address of target device. 3.) REQUEST.DEVICE_MODULE.GET_DEVICES_BY_FILTER: Queries all devices matching the filters provided in the request. A device has to satisfy all provided filters in order to be present in the reply.

...and answers according to the request type replies of type: 1.) REPLY.DEVICE_MODULE.GET_ALL_DEVICES: Reply can contain 0 or more devices. 2.) REPLY.DEVICE_MODULE.GET_DEVICE_BY_MAC_ADDRESS: Reply contains the device with that MAC address, or nothing, if the DeviceModule does not know any device with that MAC address. 3.) REPLY.DEVICE_MODULE.GET_DEVICES_BY_FILTER: The reply may contain 0 or more devices.

Parameters
messageThe Zmf message.
senderThe sender of the according Zmf message.
void DeviceModule::UTAccessor_addDevice ( const Device device)
inline
const std::map<uint64_t, Device>& DeviceModule::UTAccessor_getAllDevicesMap ( )
inline
Device* DeviceModule::UTAccessor_getDeviceByMACAddress ( uint64_t  macAddress)
inline
void DeviceModule::UTAccessor_handlePacketIn ( const zmf::data::ZmfMessage &  message,
const zmf::data::ModuleUniqueId &  id 
)
inline
zmf::data::ZmfOutReply DeviceModule::UTAccessor_handleRequest ( const zmf::data::ZmfMessage &  message,
const zmf::data::ModuleUniqueId &  sender 
)
inline
void DeviceModule::UTAccessor_handleSwitchLinkEvent ( const ZmfMessage &  message,
const ModuleUniqueId &  id 
)
inline
bool DeviceModule::UTAccessor_isDevicePassingFurtherFilters ( const DeviceModule_Proto::Request_GetDevicesByFilterRequest &  filterRequest,
Device device 
)
inline
void DeviceModule::UTAccessor_RequestAllSwitchToSwitchLinksFromLinkDiscoveryModule ( )
inline
std::vector<common::topology::SwitchToSwitchLink> DeviceModule::UTAccessor_SwitchToSwitchLinkCache ( )
inline
void DeviceModule::UTAccessor_validateDevices ( )
inline

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