PROFINET IO Controller Stack 1.0.0
Modern C++ implementation of a PROFINET IO Controller stack
Loading...
Searching...
No Matches
profinet::blocks::InterfaceInfo Struct Reference

Interface information from PDInterfaceDataReal (0x0240). More...

#include <blocks.h>

+ Collaboration diagram for profinet::blocks::InterfaceInfo:

Public Member Functions

std::string MacStr () const
 Format MacAddress as a colon-separated string.
 
std::string IpStr () const
 Format IpAddress as a dotted string.
 
std::string SubnetStr () const
 Format SubnetMask as a dotted string.
 
std::string GatewayStr () const
 Format Gateway as a dotted string.
 
bool operator== (const InterfaceInfo &) const =default
 Compares two InterfaceInfo for equality.
 

Public Attributes

std::string chassisId
 LLDP chassis ID.
 
std::array< std::uint8_t, macAddressLengthmacAddress {}
 Interface MAC address.
 
std::array< std::uint8_t, 4 > ipAddress {}
 Interface IPv4 address.
 
std::array< std::uint8_t, 4 > subnetMask {}
 Interface IPv4 subnet mask.
 
std::array< std::uint8_t, 4 > gateway {}
 Interface IPv4 default gateway.
 

Detailed Description

Interface information from PDInterfaceDataReal (0x0240).

Definition at line 167 of file blocks.h.

Member Function Documentation

◆ GatewayStr()

std::string profinet::blocks::InterfaceInfo::GatewayStr ( ) const
inline

Format Gateway as a dotted string.

Returns
The interface's default gateway as a string.

Definition at line 207 of file blocks.h.

References gateway, and profinet::String2Ip().

+ Here is the call graph for this function:

◆ IpStr()

std::string profinet::blocks::InterfaceInfo::IpStr ( ) const
inline

Format IpAddress as a dotted string.

Returns
The interface's IPv4 address as a string.

Definition at line 193 of file blocks.h.

References ipAddress, and profinet::String2Ip().

+ Here is the call graph for this function:

◆ MacStr()

std::string profinet::blocks::InterfaceInfo::MacStr ( ) const
inline

Format MacAddress as a colon-separated string.

Returns
The interface's MAC address as a string.

Definition at line 186 of file blocks.h.

References profinet::Mac2String(), and macAddress.

+ Here is the call graph for this function:

◆ operator==()

bool profinet::blocks::InterfaceInfo::operator== ( const InterfaceInfo ) const
default

Compares two InterfaceInfo for equality.

Two InterfaceInfo are equal when all scalar configuration fields are equal.

◆ SubnetStr()

std::string profinet::blocks::InterfaceInfo::SubnetStr ( ) const
inline

Format SubnetMask as a dotted string.

Returns
The interface's subnet mask as a string.

Definition at line 200 of file blocks.h.

References profinet::String2Ip(), and subnetMask.

+ Here is the call graph for this function:

Member Data Documentation

◆ chassisId

std::string profinet::blocks::InterfaceInfo::chassisId

LLDP chassis ID.

Definition at line 170 of file blocks.h.

Referenced by profinet::blocks::ParsePdInterfaceDataReal().

◆ gateway

std::array<std::uint8_t, 4> profinet::blocks::InterfaceInfo::gateway {}

Interface IPv4 default gateway.

Definition at line 182 of file blocks.h.

Referenced by GatewayStr(), and profinet::blocks::ParsePdInterfaceDataReal().

◆ ipAddress

std::array<std::uint8_t, 4> profinet::blocks::InterfaceInfo::ipAddress {}

Interface IPv4 address.

Definition at line 176 of file blocks.h.

Referenced by IpStr(), and profinet::blocks::ParsePdInterfaceDataReal().

◆ macAddress

std::array<std::uint8_t, macAddressLength> profinet::blocks::InterfaceInfo::macAddress {}

Interface MAC address.

Definition at line 173 of file blocks.h.

Referenced by MacStr(), and profinet::blocks::ParsePdInterfaceDataReal().

◆ subnetMask

std::array<std::uint8_t, 4> profinet::blocks::InterfaceInfo::subnetMask {}

Interface IPv4 subnet mask.

Definition at line 179 of file blocks.h.

Referenced by profinet::blocks::ParsePdInterfaceDataReal(), and SubnetStr().


The documentation for this struct was generated from the following file: