#include <DeviceModule.hpp>
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
| DeviceModule::DeviceModule |
( |
uint64_t |
instanceId | ) |
|
| DeviceModule::~DeviceModule |
( |
| ) |
|
| 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
-
| message | The Zmf message. |
| sender | The 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: