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

#include <Device.h>

Classes

struct  AttachmentPoint
 The AttachmentPoint of this Device. More...
 

Public Member Functions

 Device (uint64_t mac_address, std::vector< uint32_t > ipv4_addresses, std::vector< std::array< uint8_t, 16 >> ipv6_addresses, uint64_t switch_dpid, uint32_t switch_port)
 
 Device (common::topology::Device protoDevice)
 
void SetTimestampToNow ()
 
long GetMillisSinceLastSeen ()
 

Static Public Member Functions

static common::topology::Device * convertToProtoDevice (const Device &device)
 

Public Attributes

uint64_t macAddress_
 The MAC-Address of this Device. More...
 
std::vector< uint32_t > ipv4Addresses_
 The vector of IPv4-Addresses of this Device. More...
 
std::vector< std::array
< uint8_t, 16 > > 
ipv6Addresses_
 The vector of IPv6-Addresses of this Device. More...
 
struct Device::AttachmentPoint attachmentPoint_
 

Detailed Description

This class represents a Device that is connected to the SDN network. A Device is an entity with a MAC-Address that is not a Switch.

Author
Tobias Freundorfer

Constructor & Destructor Documentation

Device::Device ( uint64_t  mac_address,
std::vector< uint32_t >  ipv4_addresses,
std::vector< std::array< uint8_t, 16 >>  ipv6_addresses,
uint64_t  switch_dpid,
uint32_t  switch_port 
)

Constructor for a new Device.

Parameters
mac_addressThe MAC-Address of this Device.
ipv4_addressThe vector of IPv4-Addresses of this Device.
ipv6_addressThe array of IPv6-Addresses of this Device.
switch_dpidThe id of the switch which represents the attachment point.
switch_portThe port of the switch which represents the attachment point.
Device::Device ( common::topology::Device  protoDevice)

Constructor for a new Device.

Parameters
protoDeviceThe Protobuffer-Device that this Device should be built of.

Member Function Documentation

common::topology::Device * Device::convertToProtoDevice ( const Device device)
static

Convert the given Device to a ProtoDevice.

Parameters
deviceThe Device that should be converted.
Returns
The converted ProtoDevice.
long Device::GetMillisSinceLastSeen ( )

Returns the milli-seconds since the last time the Device was seen.

void Device::SetTimestampToNow ( )

Sets the Timestamp of this Device to the current time.

Member Data Documentation

struct Device::AttachmentPoint Device::attachmentPoint_
std::vector<uint32_t> Device::ipv4Addresses_

The vector of IPv4-Addresses of this Device.

std::vector<std::array<uint8_t, 16> > Device::ipv6Addresses_

The vector of IPv6-Addresses of this Device.

uint64_t Device::macAddress_

The MAC-Address of this Device.


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