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

Complete device information summary. More...

#include <device.h>

+ Collaboration diagram for profinet::device::DeviceInfo:

Public Member Functions

std::string SerialNumber () const
 Serial number from I&M0, trimmed.
 
std::string OrderId () const
 Order ID from I&M0, trimmed.
 
std::uint16_t HardwareRevision () const
 Hardware revision from I&M0.
 
std::string SoftwareRevision () const
 Software revision string from I&M0.
 

Public Attributes

std::string name
 Station name (from DCP).
 
std::string ip
 IPv4 address (from DCP).
 
std::string mac
 MAC address, formatted as a string (from DCP).
 
std::uint16_t vendorId = 0
 PROFINET vendor ID (from DCP).
 
std::uint16_t deviceId = 0
 PROFINET device ID (from DCP).
 
std::string deviceType
 Device type string (from DCP).
 
std::string netmask
 IPv4 subnet mask (from DCP).
 
std::string gateway
 IPv4 default gateway (from DCP).
 
std::vector< std::string > deviceRoles
 Decoded device role names (from DCP).
 
std::string vendorName
 Human-readable vendor name (from DCP).
 
std::optional< PNInM0im0
 I&M0 identification data, if it was read successfully.
 
std::optional< blocks::PDRealDatatopology
 Physical topology, if it was read successfully.
 
std::string annotation
 Device model, if the EPM endpoint advertised one.
 

Detailed Description

Complete device information summary.

Combines DCP discovery info with optional I&M0 identification data, optional topology, and an optional EPM annotation.

Definition at line 95 of file device.h.

Member Function Documentation

◆ HardwareRevision()

std::uint16_t profinet::device::DeviceInfo::HardwareRevision ( ) const

Hardware revision from I&M0.

Returns
The hardware revision, or 0 if I&M0 is unavailable.

Definition at line 190 of file device.cpp.

References im0.

◆ OrderId()

std::string profinet::device::DeviceInfo::OrderId ( ) const

Order ID from I&M0, trimmed.

Returns
The order ID, or an empty string if I&M0 is unavailable.

Definition at line 186 of file device.cpp.

References im0.

◆ SerialNumber()

std::string profinet::device::DeviceInfo::SerialNumber ( ) const

Serial number from I&M0, trimmed.

Returns
The serial number, or an empty string if I&M0 is unavailable.

Definition at line 182 of file device.cpp.

References im0.

◆ SoftwareRevision()

std::string profinet::device::DeviceInfo::SoftwareRevision ( ) const

Software revision string from I&M0.

Returns
A string like "V1.2.3", or an empty string if I&M0 is unavailable.

Definition at line 195 of file device.cpp.

References im0.

Member Data Documentation

◆ annotation

std::string profinet::device::DeviceInfo::annotation

Device model, if the EPM endpoint advertised one.

Definition at line 134 of file device.h.

Referenced by profinet::device::ProfinetDevice::GetInfo().

◆ deviceId

std::uint16_t profinet::device::DeviceInfo::deviceId = 0

PROFINET device ID (from DCP).

Definition at line 110 of file device.h.

Referenced by profinet::device::ProfinetDevice::GetInfo().

◆ deviceRoles

std::vector<std::string> profinet::device::DeviceInfo::deviceRoles

Decoded device role names (from DCP).

Definition at line 122 of file device.h.

Referenced by profinet::device::ProfinetDevice::GetInfo().

◆ deviceType

std::string profinet::device::DeviceInfo::deviceType

Device type string (from DCP).

Definition at line 113 of file device.h.

Referenced by profinet::device::ProfinetDevice::GetInfo().

◆ gateway

std::string profinet::device::DeviceInfo::gateway

IPv4 default gateway (from DCP).

Definition at line 119 of file device.h.

Referenced by profinet::device::ProfinetDevice::GetInfo().

◆ im0

std::optional<PNInM0> profinet::device::DeviceInfo::im0

I&M0 identification data, if it was read successfully.

Definition at line 128 of file device.h.

Referenced by profinet::device::ProfinetDevice::GetInfo(), HardwareRevision(), OrderId(), SerialNumber(), and SoftwareRevision().

◆ ip

std::string profinet::device::DeviceInfo::ip

IPv4 address (from DCP).

Definition at line 101 of file device.h.

Referenced by profinet::device::ProfinetDevice::GetInfo(), and profinet::device::ScanDict().

◆ mac

std::string profinet::device::DeviceInfo::mac

MAC address, formatted as a string (from DCP).

Definition at line 104 of file device.h.

Referenced by profinet::device::ProfinetDevice::GetInfo(), and profinet::device::ScanDict().

◆ name

std::string profinet::device::DeviceInfo::name

Station name (from DCP).

Definition at line 98 of file device.h.

Referenced by profinet::device::ProfinetDevice::GetInfo(), and profinet::device::ScanDict().

◆ netmask

std::string profinet::device::DeviceInfo::netmask

IPv4 subnet mask (from DCP).

Definition at line 116 of file device.h.

Referenced by profinet::device::ProfinetDevice::GetInfo().

◆ topology

std::optional<blocks::PDRealData> profinet::device::DeviceInfo::topology

Physical topology, if it was read successfully.

Definition at line 131 of file device.h.

Referenced by profinet::device::ProfinetDevice::GetInfo().

◆ vendorId

std::uint16_t profinet::device::DeviceInfo::vendorId = 0

PROFINET vendor ID (from DCP).

Definition at line 107 of file device.h.

Referenced by profinet::device::ProfinetDevice::GetInfo().

◆ vendorName

std::string profinet::device::DeviceInfo::vendorName

Human-readable vendor name (from DCP).

Definition at line 125 of file device.h.

Referenced by profinet::device::ProfinetDevice::GetInfo().


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