PROFINET IO Controller Stack 1.0.0
Modern C++ implementation of a PROFINET IO Controller stack
Loading...
Searching...
No Matches
profinet Namespace Reference

Namespaces

namespace  blocks
 
namespace  cyclic
 
namespace  dcp
 
namespace  detail
 
namespace  device
 
namespace  diagnosis
 
namespace  gsdml
 
namespace  rpc
 
namespace  rt
 
namespace  wire
 

Classes

struct  AlarmEndpoint
 Alarm endpoint configuration. More...
 
struct  AlarmItem
 Generic/unknown alarm item. More...
 
class  AlarmListener
 Background listener for PROFINET alarm notifications. More...
 
struct  AlarmNotification
 Complete parsed AlarmNotification PDU: header fields + parsed items. More...
 
class  DCPDeviceNotFoundError
 Device not found via DCP. More...
 
class  DCPError
 DCP protocol errors. More...
 
class  DCPTimeoutError
 DCP operation timed out. More...
 
struct  DiagnosisItem
 Diagnosis alarm item. More...
 
struct  EthernetHeader
 Plain (untagged) Ethernet II frame header. More...
 
class  EthernetSocket
 A minimal RAII wrapper around a Linux AF_PACKET raw socket bound to an interface. More...
 
struct  EthernetVLANHeader
 802.1Q VLAN-tagged Ethernet II frame header. More...
 
class  IAlarmListener
 Abstract interface for receiving PROFINET alarm notifications. More...
 
class  InvalidIPError
 Invalid IP address format. More...
 
class  InvalidMACError
 Invalid MAC address format. More...
 
struct  IOCRAPIObject
 One slot/subslot's placement within an IOCR's cyclic data frame. More...
 
struct  IParameterItem
 iParameter alarm item (USI 0x8201). More...
 
struct  IPConfiguration
 Decoded IPv4 address/netmask/gateway triple. More...
 
class  IRawEthernetSocket
 Abstract interface for raw Ethernet frame transport. More...
 
struct  MaintenanceItem
 Maintenance alarm item (USI 0x8100). More...
 
class  MaxTimeout
 Time-limited-operation helper, mirroring util.py's MaxTimeout context manager. More...
 
struct  PEAlarmItem
 PROFIenergy alarm item (USI 0x8310). More...
 
class  PermissionDeniedError
 Insufficient permissions for raw socket. More...
 
struct  PNAlarmAckPDU
 AlarmAck-PDU: acknowledges receipt of an AlarmNotification-PDU. More...
 
struct  PNAlarmCRBlockReq
 AlarmCRBlockReq: requests establishment of the alarm connection (part of the CONNECT request). More...
 
struct  PNAlarmCRBlockRes
 AlarmCRBlockRes: device's response confirming the alarm connection (part of the CONNECT response). More...
 
struct  PNAlarmNotificationPDU
 AlarmNotification-PDU: carries a diagnosis/process/pull/plug/... alarm event. More...
 
struct  PNARBlockRequest
 ARBlockReq: establishes an Application Relationship (sent in the CONNECT request). More...
 
struct  PNBlockHeader
 
struct  PNDCPBlock
 DCP response block: Option(1) + SubOption(1) + Length(2) + Status(2) + payload. More...
 
struct  PNDCPBlockRequest
 DCP request block: Option(1) + SubOption(1) + Length(2) + payload(Length). More...
 
struct  PNDCPHeader
 DCP (Discovery and Configuration Protocol) frame header. More...
 
struct  PNExpectedSubmoduleDataDescription
 Describes one direction (input or output) of a submodule's cyclic data. More...
 
struct  PNInM0
 I&M0: mandatory identification data (vendor, order ID, serial number, revisions). More...
 
struct  PNInM1
 I&M1: user-assigned tag function and location strings. More...
 
struct  PNInM2
 I&M2: installation date. More...
 
struct  PNInM3
 I&M3: free-text descriptor. More...
 
struct  PNInM4
 I&M4: PROFIsafe signature (binary, not text). More...
 
struct  PNInM5
 I&M5: free-text annotation. More...
 
struct  PNInMReserved
 I&M6-I&M15: reserved for future use per IEC 61158-6-10. More...
 
struct  PNIOCRBlockReqHeader
 IOCRBlockReq header: requests establishment of one IOCR (part of the CONNECT request). More...
 
struct  PNIOCRBlockRes
 IOCRBlockRes: device's response confirming an IOCR (part of the CONNECT response). More...
 
struct  PNIODHeader
 IOD read/write request/response header (RPC body for READ/WRITE/IMPLICIT_READ). More...
 
struct  PNIODReleaseBlock
 Control block used for Release/PrmBegin/PrmEnd/ApplicationReady/RTClass3 requests. More...
 
struct  PNIODWriteReq
 IODWriteReqHeader: request header for writing a data record. More...
 
struct  PNIODWriteRes
 IODWriteResHeader: response header confirming (or rejecting) a data record write. More...
 
class  PNIOError
 PNIO application error with error codes. More...
 
struct  PNNRDData
 NRD (Network Representation Data) wrapper carrying the actual IOD payload. More...
 
struct  PNRPCHeader
 DCE/RPC PDU header used to carry PROFINET connect/read/write/control requests. More...
 
struct  PNRTAHeader
 RTA-PDU Header - Real-Time Acyclic PDU for Layer 2 alarm transport. More...
 
struct  PRALAlarmItem
 Pull Request Alarm item (USI 0x8320). More...
 
class  ProfinetError
 Base exception for all PROFINET errors. More...
 
class  RPCConnectionError
 Failed to establish RPC connection. More...
 
class  RPCError
 DCE/RPC protocol errors. More...
 
class  RPCFaultError
 RPC returned a fault response. More...
 
class  RPCTimeoutError
 RPC operation timed out. More...
 
struct  RSAlarmItem
 Reporting System alarm item (USI 0x8300-0x8302). More...
 
class  SocketError
 Socket operation error. More...
 
class  UdpSocket
 A connected UDP socket with a timeout. More...
 
struct  UploadRetrievalItem
 Upload/Retrieval alarm item (USI 0x8200, 0x8201). More...
 
class  ValidationError
 Input validation error. More...
 

Typedefs

using AlarmItemVariant = std::variant< AlarmItem, DiagnosisItem, MaintenanceItem, UploadRetrievalItem, PEAlarmItem, RSAlarmItem, PRALAlarmItem >
 A parsed alarm payload item; the held alternative is selected by USI.
 
using IndexNamePairs = std::vector< std::pair< std::uint16_t, std::string > >
 (index, name) pairs, e.g. for building a "try each of these" scan.
 
using Bytes = std::vector< std::uint8_t >
 Generic byte buffer alias used throughout the library for raw wire data.
 
using PNInM6 = PNInMReserved< 0xAFF6 >
 I&M6 record type (reserved).
 
using PNInM7 = PNInMReserved< 0xAFF7 >
 I&M7 record type (reserved).
 
using PNInM8 = PNInMReserved< 0xAFF8 >
 I&M8 record type (reserved).
 
using PNInM9 = PNInMReserved< 0xAFF9 >
 I&M9 record type (reserved).
 
using PNInM10 = PNInMReserved< 0xAFFA >
 I&M10 record type (reserved).
 
using PNInM11 = PNInMReserved< 0xAFFB >
 I&M11 record type (reserved).
 
using PNInM12 = PNInMReserved< 0xAFFC >
 I&M12 record type (reserved).
 
using PNInM13 = PNInMReserved< 0xAFFD >
 I&M13 record type (reserved).
 
using PNInM14 = PNInMReserved< 0xAFFE >
 I&M14 record type (reserved).
 
using PNInM15 = PNInMReserved< 0xAFFF >
 I&M15 record type (reserved).
 
using MacAddress = std::array< std::uint8_t, macAddressLength >
 A 6-byte Ethernet MAC address.
 

Enumerations

enum class  ErrorDecode : std::uint8_t { PnioCm = 0x40 , PnioRw = 0x80 , Pnio = 0x81 }
 PROFINET error decode values. More...
 
enum class  PnioRwErrorCode1 : std::uint8_t {
  InvalidIndex = 0xB0 , WriteLength = 0xB1 , Resource = 0xB2 , Access = 0xB3 ,
  Application = 0xB4
}
 PNIO read/write ErrorCode1 values. More...
 
enum class  PnioCmErrorCode1 : std::uint8_t {
  Ar = 0x01 , Iocr = 0x02 , AlarmCr = 0x03 , ExpectedSubmodule = 0x04 ,
  ModuleDiff = 0x05 , ArRpc = 0x06 , IrInfo = 0x07 , SrInfo = 0x08 ,
  ArFsu = 0x09 , IodControlRequest = 0x10 , IodControlResponse = 0x11 , ArResponse = 0x81 ,
  IocrResponse = 0x82 , AlarmCrResponse = 0x83 , ModuleDiffResponse = 0x84 , ArServerResponse = 0x85 ,
  PrmServer = 0x3D , CmCtl = 0x3E , CmDev = 0x3F , CmRpc = 0x40 ,
  FaultyRecord = 0xFD , FaultyAr = 0xFE , FaultyBlock = 0xFF
}
 PNIO-CM ErrorCode1 values. More...
 
enum class  PnioRwInvalidIndexErrorCode2 : std::uint8_t { IndexNotSupported = 0x00 , IndexNotWritten = 0x05 }
 PNIORW InvalidIndex ErrorCode2 values. More...
 
enum class  PnioRwWriteLengthErrorCode2 : std::uint8_t { WriteLengthError = 0x00 , DataTooShort = 0x01 , DataTooLong = 0x02 , WriteProtected = 0x03 }
 PNIORW WriteLength ErrorCode2 values. More...
 
enum class  PnioRwResourceErrorCode2 : std::uint8_t { ResourceNotAvailable = 0x00 , InvalidSlot = 0x07 , InvalidSubslot = 0x08 , ModuleHasNoData = 0x09 }
 PNIORW Resource ErrorCode2 values. More...
 
enum class  PnioRwAccessErrorCode2 : std::uint8_t {
  InvalidArea = 0x00 , AccessDenied = 0x03 , InvalidRange = 0x04 , InvalidState = 0x05 ,
  LocalControl = 0x06
}
 PNIORW Access ErrorCode2 values. More...
 
enum class  PnioRwApplicationErrorCode2 : std::uint8_t {
  ReadError = 0x00 , WriteError = 0x01 , ModuleFailure = 0x02 , ResourceBusy = 0x04 ,
  VersionConflict = 0x05 , InvalidApi = 0x06 , BackupNotAllowed = 0x07 , AlarmPending = 0x08
}
 PNIORW Application ErrorCode2 values. More...
 
enum class  PnioCmArErrorCode2 : std::uint8_t {
  InvalidArType = 0x00 , ArAlreadyActive = 0x01 , NoArResources = 0x02 , NoProviderResources = 0x03 ,
  NoConsumerResources = 0x04 , NoAlarmResources = 0x05 , NoMemory = 0x06 , InvalidSessionKey = 0x07 ,
  ArUuidConflict = 0x08
}
 PNIO-CM AR ErrorCode2 values. More...
 
enum class  PnioCmIocrErrorCode2 : std::uint8_t {
  InvalidIocrType = 0x00 , NoIocrResources = 0x01 , InvalidFrameId = 0x02 , InvalidRtClass = 0x03 ,
  InvalidIoDataLength = 0x04 , CycleTimeConflict = 0x05 , WatchdogConfigurationError = 0x06
}
 PNIO-CM IOCR ErrorCode2 values. More...
 
enum class  PnioCmAlarmCrErrorCode2 : std::uint8_t { InvalidAlarmCrType = 0x00 , NoAlarmCrResources = 0x01 }
 PNIO-CM Alarm CR ErrorCode2 values. More...
 
enum class  PnioCmExpectedSubmoduleErrorCode2 : std::uint8_t {
  InvalidSlot = 0x00 , InvalidSubslot = 0x01 , WrongModuleIdentNumber = 0x02 , WrongSubmoduleIdentNumber = 0x03 ,
  IoDataLengthMismatch = 0x04
}
 PNIO-CM Expected Submodule ErrorCode2 values. More...
 
enum class  PnioCmDeviceErrorCode2 : std::uint8_t { DeviceStateConflict = 0x00 , ConnectionResourceUnavailable = 0x01 , AlreadyOwned = 0x02 , ArSetAborted = 0x03 }
 PNIO-CM Device ErrorCode2 values. More...
 
enum class  PnioCmFaultyBlockErrorCode2 : std::uint8_t { FaultyBlockStructure = 0x00 }
 PNIO-CM Faulty Block ErrorCode2 values. More...
 
enum class  PnioErrorCode1 : std::uint8_t { Rmpm = 0x40 , PrmServer = 0x3D }
 PNIO ErrorCode1 values. More...
 
enum class  PnioRmpmErrorCode2 : std::uint8_t {
  InvalidArgumentsLength = 0x00 , UnknownBlocksInRequest = 0x01 , RequiredIocrBlockMissing = 0x02 , WrongAlarmCrBlockCount = 0x03 ,
  OutOfArResources = 0x04
}
 PNIO RMPM ErrorCode2 values. More...
 
enum class  PnioPrmServerErrorCode2 : std::uint8_t { StateConflict = 0x00 }
 PNIO Parameter Server ErrorCode2 values. More...
 
enum class  ControlCommand : std::uint16_t {
  Unknown = 0 , PrmEnd = 0x0001 , ApplicationReady = 0x0002 , Release = 0x0004 ,
  Done = 0x0008 , ReadyForCompanion = 0x0010 , ReadyForRtClass3 = 0x0020 , PrmBegin = 0x0040
}
 PROFINET IOD control command values. More...
 
enum class  BlockType : std::uint16_t {
  Unknown = 0 , DiagnosisData = 0x0010 , ExpectedIdentificationData = 0x0012 , RealIdentificationData = 0x0013 ,
  IdentificationMaintenance0 = 0x0020 , IdentificationMaintenance1 = 0x0021 , IdentificationMaintenance2 = 0x0022 , IdentificationMaintenance3 = 0x0023 ,
  IdentificationMaintenance4 = 0x0024 , IdentificationMaintenance5 = 0x0025 , IdentificationMaintenance6 = 0x0026 , IdentificationMaintenance7 = 0x0027 ,
  IdentificationMaintenance8 = 0x0028 , IdentificationMaintenance9 = 0x0029 , IdentificationMaintenance10 = 0x002A , IdentificationMaintenance11 = 0x002B ,
  IdentificationMaintenance12 = 0x002C , IdentificationMaintenance13 = 0x002D , IdentificationMaintenance14 = 0x002E , IdentificationMaintenance15 = 0x002F ,
  AlarmNotificationHigh = 0x0001 , AlarmAcknowledgementHigh = 0x8001 , AlarmNotificationLow = 0x0002 , AlarmAcknowledgementLow = 0x8002 ,
  IoDataWriteRequest = 0x0008 , IoDataWriteResponse = 0x8008 , IoDataReadRequest = 0x0009 , IoDataReadResponse = 0x8009 ,
  ApplicationRelationData = 0x0018 , LogData = 0x0019 , ApiData = 0x001A , SrlData = 0x001B ,
  ApplicationRelationRequest = 0x0101 , ApplicationRelationResponse = 0x8101 , IoCrRequest = 0x0102 , IoCrResponse = 0x8102 ,
  AlarmCrRequest = 0x0103 , AlarmCrResponse = 0x8103 , ExpectedSubmoduleRequest = 0x0104 , ModuleDifference = 0x8104 ,
  ControlPrmEndRequest = 0x0110 , ControlPrmEndResponse = 0x8110 , ControlApplicationReadyRequest = 0x0112 , ControlApplicationReadyResponse = 0x8112 ,
  ReleaseRequest = 0x0114 , ReleaseResponse = 0x8114 , ControlRtClass3Request = 0x0117 , ControlRtClass3Response = 0x8117 ,
  ParameterizationBeginRequest = 0x0118 , ParameterizationBeginResponse = 0x8118 , SubmoduleList = 0x0119 , PortDataCheck = 0x0200 ,
  PortDataAdjust = 0x0202 , PortDataReal = 0x020F , InterfaceMrpDataAdjust = 0x0211 , InterfaceMrpDataReal = 0x0212 ,
  PortMrpDataReal = 0x0215 , MrpRingStateData = 0x0219 , PortFoDataReal = 0x0220 , PortFoDataCheck = 0x0221 ,
  PortFoDataAdjust = 0x0222 , PortDataRealExtended = 0x022C , PortDataInterfaceDataReal = 0x0240 , PortStatistics = 0x0251 ,
  MultipleHeader = 0x0400 , ContainerContent = 0x0401 , ApplicationRelationServer = 0xF820 , RealProcessData = 0xF841 ,
  ExpectedProcessData = 0xF842 , RealIdentificationDataApi = 0xF000
}
 PROFINET block types. More...
 
enum class  AlarmType : std::uint16_t {
  Unknown = 0x000 , Diagnosis = 0x0001 , Process = 0x0002 , Pull = 0x0003 ,
  Plug = 0x0004 , Status = 0x0005 , Update = 0x0006 , Redundancy = 0x0007 ,
  ControlledBySupervisor = 0x0008 , Released = 0x0009 , PlugWrongSubmodule = 0x000A , ReturnOfSubmodule = 0x000B ,
  DiagnosisDisappears = 0x000C , MulticastMismatch = 0x000D , PortDataChange = 0x000E , SyncDataChanged = 0x000F ,
  IsochronousModeProblem = 0x0010 , NetworkComponentProblem = 0x0011 , TimeDataChanged = 0x0012 , DfpProblem = 0x0013 ,
  UploadRetrieval = 0x001E , PullModule = 0x001F
}
 PROFINET Alarm Types used in AlarmNotification blocks. More...
 
enum class  IocrType : std::uint16_t { Input = 0x0001 , Output = 0x0002 , MulticastProvider = 0x0003 , MulticastConsumer = 0x0004 }
 PROFINET IOCR types. More...
 
enum class  IocrRtClass : std::uint8_t { Udp = 0x04 }
 PROFINET IOCR real-time classes. More...
 
enum class  Usi : std::uint16_t {
  Unknown = 0 , ChannelDiagnosis = 0x8000 , MultipleDiagnosis = 0x8001 , ExtendedChannelDiagnosis = 0x8002 ,
  QualifiedChannelDiagnosis = 0x8003 , Maintenance = 0x8100 , Upload = 0x8200 , IParameter = 0x8201 ,
  RsAlarmLow = 0x8300 , RsAlarmHigh = 0x8301 , RsAlarmSubmodule = 0x8302 , PeAlarm = 0x8310 ,
  PralAlarm = 0x8320 , Bit0till14OfChannelNumber = 0x7FFF , Bit15OfChannelNumber = 0x8000 , Bit15AndExternalChannelDiagnosisOfChannelNumber = 0x8002 ,
  Bit15AndQualifiedChannelDiagnosisOfChannelNumber = 0x8003 , Low11BitsOfRsAlarmInfo = 0x7FFF
}
 PROFINET User Structure Identifiers (USI). More...
 

Functions

Usi UsiOf (const AlarmItemVariant &item)
 Get the USI shared by every AlarmItemVariant alternative.
 
std::string UsiNameOf (const AlarmItemVariant &item)
 Get the human-readable USI name for any AlarmItemVariant alternative.
 
std::pair< AlarmItemVariant, std::size_t > ParseAlarmItem (const Bytes &data, std::size_t offset=0)
 Parse a single alarm item starting at an offset.
 
AlarmNotification ParseAlarmNotification (const Bytes &data)
 Parse a complete AlarmNotification PDU (BlockHeader + body + items).
 
std::string GetErrorDecodeName (ErrorDecode errorDecodeName)
 Get the human-readable name for an ErrorDecode value.
 
std::string GetPnioRwErrorCode1Name (PnioRwErrorCode1 errorCodeRw1)
 Get the human-readable name for a PNIORW ErrorCode1.
 
std::string GetPnioCmErrorCode1Name (PnioCmErrorCode1 errorCodeCm1)
 Get the human-readable name for a PNIO-CM ErrorCode1.
 
std::string GetPnioRwErrorMessage (PnioRwInvalidIndexErrorCode2 errorCode2)
 Get the human-readable message for an InvalidIndex error.
 
std::string GetPnioRwErrorMessage (PnioRwWriteLengthErrorCode2 errorCode2)
 Get the human-readable message for a WriteLength error.
 
std::string GetPnioRwErrorMessage (PnioRwResourceErrorCode2 errorCode2)
 Get the human-readable message for a Resource error.
 
std::string GetPnioRwErrorMessage (PnioRwAccessErrorCode2 errorCode2)
 Get the human-readable message for an Access error.
 
std::string GetPnioRwErrorMessage (PnioRwApplicationErrorCode2 errorCode2)
 Get the human-readable message for an Application error.
 
std::string GetPnioCmErrorMessage (PnioCmArErrorCode2 errorCode2)
 Get the human-readable message for a PNIO-CM AR error.
 
std::string GetPnioCmErrorMessage (PnioCmIocrErrorCode2 errorCode2)
 Get the human-readable message for a PNIO-CM IOCR error.
 
std::string GetPnioCmErrorMessage (PnioCmAlarmCrErrorCode2 errorCode2)
 Get the human-readable message for a PNIO-CM Alarm CR error.
 
std::string GetPnioCmErrorMessage (PnioCmExpectedSubmoduleErrorCode2 errorCode2)
 Get the human-readable message for a PNIO-CM Expected Submodule error.
 
std::string GetPnioCmErrorMessage (PnioCmDeviceErrorCode2 errorCode2)
 Get the human-readable message for a PNIO-CM Device error.
 
std::string GetPnioCmErrorMessage (PnioCmFaultyBlockErrorCode2 errorCode2)
 Get the human-readable message for a PNIO-CM Faulty Block error.
 
std::string GetPnioErrorCode1Name (PnioErrorCode1 errorCode1)
 Get the human-readable name of a PNIO ErrorCode1.
 
std::string GetPnioErrorMessage (PnioRmpmErrorCode2 errorCode2)
 Get the human-readable message for an RMPM ErrorCode2.
 
std::string GetPnioErrorMessage (PnioPrmServerErrorCode2 errorCode2)
 Get the human-readable message for a Parameter Server ErrorCode2.
 
std::string GetPnioRwErrorMessage (PnioRwErrorCode1 errorCode1, std::uint8_t errorCode2)
 Decode a PNIO read/write error.
 
std::string GetBlockTypeName (BlockType blockType)
 Get the human-readable name for a block type.
 
std::string GetAlarmTypeName (AlarmType alarmType)
 Get the human-readable name for an alarm type.
 
std::string GetIocrTypeName (IocrType iocrType)
 Get the human-readable name for an IOCR type.
 
std::string GetIocrRtClassName (IocrRtClass rtClass)
 Get the human-readable name for an IOCR real-time class.
 
std::string GetUsiName (Usi usi)
 Get the human-readable name for a User Structure Identifier.
 
std::string GetModuleStateName (std::uint16_t state)
 Get the human-readable name for a module state.
 
std::string GetSubmoduleStateName (std::uint16_t state)
 Get the human-readable name for a submodule state.
 
std::string GetPeModeName (std::uint8_t mode)
 Get the human-readable name for a PROFIenergy operational mode.
 
const IndexNamePairsCriticalIndices ()
 Critical indices that should always be tested.
 
const IndexNamePairsImIndices ()
 I&M0-I&M15 indices.
 
const IndexNamePairsDiagnosisIndices (const std::string &scope)
 Diagnosis indices for a given addressing scope.
 
const IndexNamePairsPortIndices ()
 Port-level indices.
 
const IndexNamePairsInterfaceIndices ()
 Interface-level indices.
 
const IndexNamePairsDeviceIndices ()
 Device-level indices.
 
const IndexNamePairsAllStandardIndices ()
 Union of every standard index category.
 
std::string GetIndexName (std::uint16_t index)
 Get the human-readable name for a record data index.
 
std::string GetScope (std::uint16_t index)
 Get the addressing scope for an index.
 
std::string Hex4 (std::uint16_t value)
 Format a 16-bit unsigned integer as a 4-digit hexadecimal string.
 
std::string Hex2 (std::uint8_t value)
 Format an 8-bit unsigned integer as a 2-digit hexadecimal string.
 
std::vector< std::uint8_t > ToVec (const std::string &input)
 Convert a string into a vector of raw bytes.
 
std::string HexFallback (const char *widthPrefix, std::uint32_t value, int digitWidth)
 Format a hexadecimal string with a custom prefix and dynamic width.
 
std::size_t SkipVlanTags (std::span< const std::uint8_t > frame) noexcept
 Return the byte offset of the real EtherType in a raw Ethernet frame.
 
std::string ToHex (const std::uint8_t *data, std::size_t len)
 Hex-encode a byte buffer.
 
std::string ToHex (const std::vector< std::uint8_t > &data)
 Hex-encode a byte buffer.
 
MacAddress String2Mac (const std::string &macStr)
 Parse a colon-separated MAC address string.
 
std::string Mac2String (const MacAddress &mac)
 Format a MAC address as a colon-separated string.
 
std::string Mac2String (const std::uint8_t *macBytes, std::size_t len)
 Format a MAC address as a colon-separated string.
 
std::string String2Ip (std::span< const std::uint8_t > ipBytes)
 Format raw IPv4 address bytes as a dotted string.
 
std::string String2Ip (const std::uint8_t *ipBytes, std::size_t len)
 Format raw IPv4 address bytes as a dotted string.
 
std::array< std::uint8_t, 4 > Ip2String (const std::string &ipStr)
 Parse a dotted-decimal IPv4 address string.
 
std::string DecodeBytes (const std::uint8_t *data, std::size_t len)
 Decode bytes to a UTF-8 string, stripping trailing NUL bytes.
 
std::string DecodeBytes (const std::vector< std::uint8_t > &data)
 Decode bytes to a UTF-8 string, stripping trailing NUL bytes.
 
MacAddress GetMac (const std::string &ifname)
 Get the MAC address of a network interface.
 
std::filesystem::path GetExecutableDirectory ()
 Retrieves the absolute directory path of the currently running executable.
 
std::string GetVendorName (std::uint16_t vendorId)
 Get the vendor name for a 16-bit PROFINET vendor ID.
 
std::optional< std::string > LookupVendor (std::uint16_t vendorId)
 Look up a vendor name without a fallback string.
 
std::string DecodePnioCmError (const std::uint8_t &errorCode1, const std::uint8_t &errorCode2)
 
std::string DecodePnioError (const std::uint8_t &errorCode1, const std::uint8_t &errorCode2)
 
std::string DecodePnioRWError (const std::uint8_t &errorCode1, const std::uint8_t &errorCode2)
 

Variables

constexpr std::uint16_t FRAME_ID_ALARM_HIGH = 0xFC01
 Frame ID used for high-priority alarms.
 
constexpr std::uint16_t FRAME_ID_ALARM_LOW = 0xFE01
 Frame ID used for low-priority alarms.
 
constexpr std::uint16_t ETHERTYPE_PROFINET = 0x8892
 EtherType used by PROFINET RTA frames (0x8892).
 
constexpr std::uint16_t ALARM_UDP_PORT = 34964
 UDP port used for alarm transport when Transport == 1.
 
constexpr std::uint8_t ALARM_TRANSPORT_RTA_CLASS_UDP = 0x01
 ALARM Cr Type ALARM.
 
constexpr std::uint16_t AR_TYPE_IOCAR_SINGLE = 0x0001
 AR Type Iocar Single.
 
constexpr std::uint16_t AR_TYPE_IOSAR = 0x0006
 AR Type Iosar.
 
constexpr std::uint16_t AR_TYPE_IOCARSR = 0x0020
 AR Type Iocarsr.
 
constexpr std::uint16_t MODULE_STATE_NO_MODULE = 0x0000
 Module State No Module.
 
constexpr std::uint16_t MODULE_STATE_WRONG_MODULE = 0x0001
 Module State Wrong Module.
 
constexpr std::uint16_t MODULE_STATE_PROPER_MODULE = 0x0002
 Module State Proper Module.
 
constexpr std::uint16_t MODULE_STATE_SUBSTITUTE_MODULE = 0x0003
 Module State Substitute Module.
 
constexpr std::uint16_t SUBMODULE_STATE_NO_SUBMODULE = 0x0000
 Submodule State No Submodule.
 
constexpr std::uint16_t SUBMODULE_STATE_WRONG_SUBMODULE = 0x0001
 Submodule State Wrong Submodule.
 
constexpr std::uint16_t SUBMODULE_STATE_LOCKED_BY_SUPERVISOR = 0x0002
 Submodule State Locked By Supervisor.
 
constexpr std::uint16_t SUBMODULE_STATE_APPLICATION_READY_PENDING = 0x0004
 Submodule State Application Ready Pending.
 
constexpr std::uint16_t SUBMODULE_STATE_OK = 0x0007
 Submodule State Ok.
 
constexpr std::uint8_t PE_MODE_POWER_OFF = 0x00
 PE Mode Power Off.
 
constexpr std::uint8_t PE_MODE_ENERGY_SAVING_MIN = 0x01
 PE Mode Energy Saving Min.
 
constexpr std::uint8_t PE_MODE_ENERGY_SAVING_MAX = 0x1F
 PE Mode Energy Saving Max.
 
constexpr std::uint8_t PE_MODE_OPERATE = 0xF0
 PE Mode Operate.
 
constexpr std::uint8_t PE_MODE_SLEEP_MODE_WOL = 0xFE
 PE Mode Sleep Mode WOL.
 
constexpr std::uint8_t PE_MODE_READY_TO_OPERATE = 0xFF
 PE Mode Ready To Operate.
 
constexpr std::uint16_t IM0 = 0xAFF0
 I&M0.
 
constexpr std::uint16_t IM1 = 0xAFF1
 I&M1.
 
constexpr std::uint16_t IM2 = 0xAFF2
 I&M2.
 
constexpr std::uint16_t IM3 = 0xAFF3
 I&M3.
 
constexpr std::uint16_t IM4 = 0xAFF4
 I&M4.
 
constexpr std::uint16_t IM5 = 0xAFF5
 I&M5.
 
constexpr std::uint16_t IM6 = 0xAFF6
 I&M6.
 
constexpr std::uint16_t IM7 = 0xAFF7
 I&M7.
 
constexpr std::uint16_t IM8 = 0xAFF8
 I&M8.
 
constexpr std::uint16_t IM9 = 0xAFF9
 I&M9.
 
constexpr std::uint16_t IM10 = 0xAFFA
 I&M10.
 
constexpr std::uint16_t IM11 = 0xAFFB
 I&M11.
 
constexpr std::uint16_t IM12 = 0xAFFC
 I&M12.
 
constexpr std::uint16_t IM13 = 0xAFFD
 I&M13.
 
constexpr std::uint16_t IM14 = 0xAFFE
 I&M14.
 
constexpr std::uint16_t IM15 = 0xAFFF
 I&M15.
 
constexpr std::uint16_t IM0_FILTER_DATA = 0xF840
 I&M0 Filter Data.
 
constexpr std::uint16_t DIAG_CHANNEL_SUBSLOT = 0x800A
 DIAG Channel Subslot.
 
constexpr std::uint16_t DIAG_ALL_SUBSLOT = 0x800B
 DIAG All Subslot.
 
constexpr std::uint16_t DIAG_MAINTENANCE_SUBSLOT = 0x800C
 DIAG Maintenance Subslot.
 
constexpr std::uint16_t DIAG_CHANNEL_SLOT = 0xC00A
 DIAG Channel Slot.
 
constexpr std::uint16_t DIAG_ALL_SLOT = 0xC00B
 DIAG All Slot.
 
constexpr std::uint16_t DIAG_MAINTENANCE_SLOT = 0xC00C
 DIAG Maintenance Slot.
 
constexpr std::uint16_t DIAG_CHANNEL_AR = 0xE00A
 DIAG Channel AR.
 
constexpr std::uint16_t DIAG_ALL_AR = 0xE00B
 DIAG All AR.
 
constexpr std::uint16_t DIAG_MAINTENANCE_AR = 0xE00C
 DIAG Maintenance AR.
 
constexpr std::uint16_t DIAG_CHANNEL_API = 0xF00A
 DIAG Channel API.
 
constexpr std::uint16_t DIAG_ALL_API = 0xF00B
 DIAG All API.
 
constexpr std::uint16_t DIAG_MAINTENANCE_API = 0xF00C
 DIAG Maintenance API.
 
constexpr std::uint16_t DIAG_DEVICE = 0xF80C
 DIAG Device.
 
constexpr std::uint16_t MAINT_REQUIRED_CHANNEL_SUBSLOT = 0x8010
 MAINT Required Channel Subslot.
 
constexpr std::uint16_t MAINT_DEMANDED_CHANNEL_SUBSLOT = 0x8011
 MAINT Demanded Channel Subslot.
 
constexpr std::uint16_t MAINT_REQUIRED_ALL_SUBSLOT = 0x8012
 MAINT Required All Subslot.
 
constexpr std::uint16_t MAINT_DEMANDED_ALL_SUBSLOT = 0x8013
 MAINT Demanded All Subslot.
 
constexpr std::uint16_t EXPECTED_ID_SUBSLOT = 0x8000
 Expected ID Subslot.
 
constexpr std::uint16_t REAL_ID_SUBSLOT = 0x8001
 Real ID Subslot.
 
constexpr std::uint16_t EXPECTED_ID_AR = 0xE000
 Expected ID AR.
 
constexpr std::uint16_t REAL_ID_AR = 0xE001
 Real ID AR.
 
constexpr std::uint16_t MODULE_DIFF_BLOCK = 0xE002
 Module Diff Block.
 
constexpr std::uint16_t REAL_ID_API = 0xF000
 Real ID API.
 
constexpr std::uint16_t AR_DATA = 0xF820
 AR Data.
 
constexpr std::uint16_t API_DATA = 0xF821
 API Data.
 
constexpr std::uint16_t PDEV_DATA = 0xF831
 Pdev Data.
 
constexpr std::uint16_t PD_REAL_DATA = 0xF841
 PD Real Data.
 
constexpr std::uint16_t PD_EXPECTED_DATA = 0xF842
 PD Expected Data.
 
constexpr std::uint16_t AUTO_CONFIG = 0xF850
 Auto Config.
 
constexpr std::uint16_t LOG_DATA = 0xF830
 Log Data.
 
constexpr std::uint16_t PD_PORT_DATA_REAL = 0x802A
 PD Port Data Real.
 
constexpr std::uint16_t PD_PORT_DATA_CHECK = 0x802B
 PD Port Data Check.
 
constexpr std::uint16_t PD_IR_DATA = 0x802C
 PD IR Data.
 
constexpr std::uint16_t PD_SYNC_DATA = 0x802D
 PD Sync Data.
 
constexpr std::uint16_t PD_PORT_DATA_ADJUST = 0x802F
 PD Port Data Adjust.
 
constexpr std::uint16_t PD_PORT_STATISTIC = 0x8072
 PD Port Statistic.
 
constexpr std::uint16_t PD_NC_DATA_CHECK = 0x8070
 PD NC Data Check.
 
constexpr std::uint16_t PD_INTERFACE_ADJUST = 0x8071
 PD Interface Adjust.
 
constexpr std::uint16_t PD_INTERFACE_DATA_REAL = 0x8080
 PD Interface Data Real.
 
constexpr std::uint16_t PD_INTERFACE_FSU_ADJUST = 0x8090
 PD Interface FSU Adjust.
 
constexpr std::uint16_t PD_PORT_FO_DATA_REAL = 0x8060
 PD Port FO Data Real.
 
constexpr std::uint16_t PD_PORT_FO_DATA_CHECK = 0x8061
 PD Port FO Data Check.
 
constexpr std::uint16_t PD_PORT_FO_DATA_ADJUST = 0x8062
 PD Port FO Data Adjust.
 
constexpr std::uint16_t PD_PORT_SFP_DATA_CHECK = 0x8063
 PD Port SFP Data Check.
 
constexpr std::uint16_t PD_INTERFACE_MRP_DATA_REAL = 0x8050
 PD Interface MRP Data Real.
 
constexpr std::uint16_t PD_INTERFACE_MRP_DATA_CHECK = 0x8051
 PD Interface MRP Data Check.
 
constexpr std::uint16_t PD_INTERFACE_MRP_DATA_ADJUST = 0x8052
 PD Interface MRP Data Adjust.
 
constexpr std::uint16_t PD_PORT_MRP_DATA_ADJUST = 0x8053
 PD Port MRP Data Adjust.
 
constexpr std::uint16_t PD_PORT_MRP_DATA_REAL = 0x8054
 PD Port MRP Data Real.
 
constexpr std::uint16_t PD_PORT_MRP_IC_DATA_ADJUST = 0x8055
 PD Port MRP IC Data Adjust.
 
constexpr std::uint16_t PD_PORT_MRP_IC_DATA_CHECK = 0x8056
 PD Port MRP IC Data Check.
 
constexpr std::uint16_t PD_PORT_MRP_IC_DATA_REAL = 0x8057
 PD Port MRP IC Data Real.
 
constexpr std::uint16_t PD_IR_SUBFRAME_DATA = 0x8020
 PD IR Subframe Data.
 
constexpr std::uint16_t ISOCHRONOUS_MODE_DATA = 0x8030
 Isochronous Mode Data.
 
constexpr std::uint16_t PD_TIME_DATA = 0x8031
 PD Time Data.
 
constexpr std::uint16_t SUBSTITUTE_VALUES = 0x801E
 Substitute Values.
 
constexpr std::uint16_t RECORD_INPUT_DATA = 0x8028
 Record Input Data.
 
constexpr std::uint16_t RECORD_OUTPUT_DATA = 0x8029
 Record Output Data.
 
constexpr std::uint16_t AM_DEVICE_ID = 0xF8E0
 AM Device ID.
 
constexpr std::uint16_t AM_FULL_INFO = 0xF8E1
 AM Full Info.
 
constexpr std::uint16_t AM_HW_ONLY = 0xF8E2
 AM HW Only.
 
constexpr std::uint16_t AM_FW_ONLY = 0xF8E3
 AM FW Only.
 
constexpr std::uint16_t AM_LOCATION_SLOT = 0xFBE0
 AM Location Slot.
 
constexpr std::uint16_t AM_LOCATION_TREE = 0xFBE1
 AM Location Tree.
 
constexpr std::uint16_t AM_DATA = 0xFBF0
 AM Data.
 
constexpr std::uint16_t F_PARAMETER_BLOCK = 0x0100
 F Parameter Block.
 
constexpr std::uint16_t F_PRM_FLAG1 = 0x0101
 F Prm Flag1.
 
constexpr std::uint16_t F_PRM_FLAG2 = 0x0102
 F Prm Flag2.
 
constexpr std::uint16_t F_PARAMETER_WRITE = 0xE000
 F Parameter Write.
 
constexpr std::uint16_t F_PARAMETER_READ = 0xE001
 F Parameter Read.
 
constexpr std::uint16_t PROFIENERGY = 0x80A0
 Profienergy.
 
constexpr std::uint16_t WRITE_MULTIPLE = 0xE040
 Write Multiple.
 
constexpr std::uint16_t AR_FSU_DATA_ADJUST = 0xE050
 AR FSU Data Adjust.
 
constexpr std::uint16_t SUBSLOT_DAP = 0x0001
 Subslot DAP.
 
constexpr std::uint16_t SUBSLOT_INTERFACE = 0x8000
 Subslot Interface.
 
constexpr std::uint16_t SUBSLOT_PORT1 = 0x8001
 Subslot Port1.
 
constexpr std::uint16_t SUBSLOT_PORT2 = 0x8002
 Subslot Port2.
 
constexpr int blockHeaderLenght = 6
 Constant lenght of a blockHeader.
 
constexpr std::array< std::uint8_t, 12 > kPnUuidSuffix
 PROFINET UUID suffix, shared by all interface/object UUIDs.
 
constexpr std::size_t MAX_ETHERNET_FRAME = 1522
 Maximum PROFINET Ethernet frame size in bytes (including VLAN tag headroom).
 
constexpr std::uint16_t PROFINET_ETHERTYPE = 0x8892
 EtherType value identifying PROFINET frames (0x8892).
 
constexpr std::uint16_t IP_ETHERTYPE = 0x8000
 EtherType value identifying IP frames (0x8000).
 
constexpr std::uint16_t VLAN_ETHERTYPE = 0x8100
 EtherType value identifying an 802.1Q VLAN tag (0x8100).
 
constexpr int ETH_P_ALL = 0x0003
 Linux AF_PACKET protocol value matching every EtherType.
 
constexpr int macAddressLength = 6
 Constant lenght of a mac address.
 
constexpr int uuidLenght = 16
 Constant lenght of a UUID.
 
static constexpr int BitsPerOctet = 8
 
static constexpr int OneOctetShift = BitsPerOctet
 The bit-shift distance required to move data across a single octet.
 
static constexpr int TwoOctetsShift = BitsPerOctet * 2
 The bit-shift distance required to move data across two octets.
 
static constexpr int ThreeOctetsShift = BitsPerOctet * 3
 The bit-shift distance required to move data across three octets.
 
static constexpr std::uint8_t LowByteMask = 0xFF
 Bitmask used to isolate the lowest significant byte (8 bits) of a larger integer.
 
constexpr std::size_t RECEIVE_BUFFER_LENGTH = 4096
 Receive buffer length.
 

Detailed Description

Defines the structures and parsing functions used to decode AlarmNotification payloads according to their User Structure Identifier (USI). Provides alarm item types and parsing functions for AlarmNotification PDUs (USI-dispatched: Diagnosis, Maintenance, Upload/Retrieval, PE, RS, PRAL). Per IEC 61158-6-10.

Defines protocol, transport, timeout, and PNIO error representations used to report failures across DCP, RPC, cyclic IO, and related services.

Typedef Documentation

◆ AlarmItemVariant

A parsed alarm payload item; the held alternative is selected by USI.

Use std::visit or std::get_if to access the concrete type, or call UsiOf()/UsiNameOf() (both work regardless of the held alternative).

Definition at line 335 of file alarms.h.

◆ Bytes

using profinet::Bytes = typedef std::vector<std::uint8_t>

Generic byte buffer alias used throughout the library for raw wire data.

Definition at line 52 of file protocol.h.

◆ IndexNamePairs

using profinet::IndexNamePairs = typedef std::vector<std::pair<std::uint16_t, std::string> >

(index, name) pairs, e.g. for building a "try each of these" scan.

Definition at line 924 of file indices.h.

◆ MacAddress

using profinet::MacAddress = typedef std::array<std::uint8_t, macAddressLength>

A 6-byte Ethernet MAC address.

Definition at line 67 of file util.h.

◆ PNInM10

using profinet::PNInM10 = typedef PNInMReserved<0xAFFA>

I&M10 record type (reserved).

Definition at line 1432 of file protocol.h.

◆ PNInM11

using profinet::PNInM11 = typedef PNInMReserved<0xAFFB>

I&M11 record type (reserved).

Definition at line 1434 of file protocol.h.

◆ PNInM12

using profinet::PNInM12 = typedef PNInMReserved<0xAFFC>

I&M12 record type (reserved).

Definition at line 1436 of file protocol.h.

◆ PNInM13

using profinet::PNInM13 = typedef PNInMReserved<0xAFFD>

I&M13 record type (reserved).

Definition at line 1438 of file protocol.h.

◆ PNInM14

using profinet::PNInM14 = typedef PNInMReserved<0xAFFE>

I&M14 record type (reserved).

Definition at line 1440 of file protocol.h.

◆ PNInM15

using profinet::PNInM15 = typedef PNInMReserved<0xAFFF>

I&M15 record type (reserved).

Definition at line 1442 of file protocol.h.

◆ PNInM6

using profinet::PNInM6 = typedef PNInMReserved<0xAFF6>

I&M6 record type (reserved).

Definition at line 1424 of file protocol.h.

◆ PNInM7

using profinet::PNInM7 = typedef PNInMReserved<0xAFF7>

I&M7 record type (reserved).

Definition at line 1426 of file protocol.h.

◆ PNInM8

using profinet::PNInM8 = typedef PNInMReserved<0xAFF8>

I&M8 record type (reserved).

Definition at line 1428 of file protocol.h.

◆ PNInM9

using profinet::PNInM9 = typedef PNInMReserved<0xAFF9>

I&M9 record type (reserved).

Definition at line 1430 of file protocol.h.

Enumeration Type Documentation

◆ AlarmType

enum class profinet::AlarmType : std::uint16_t
strong

PROFINET Alarm Types used in AlarmNotification blocks.

The underlying values correspond to the Alarm Type field defined by PROFINET IO.

Enumerator
Unknown 

Unkown alarm.

Diagnosis 

Diagnosis alarm.

Process 

Process alarm.

Pull 

Pull alarm.

Plug 

Plug alarm.

Status 

Status alarm.

Update 

Update alarm.

Redundancy 

Redundancy alarm.

ControlledBySupervisor 

Controlled by supervisor alarm.

Released 

Released alarm.

PlugWrongSubmodule 

Plug wrong submodule alarm.

ReturnOfSubmodule 

Return of submodule alarm.

DiagnosisDisappears 

Diagnosis disappears alarm.

MulticastMismatch 

Multicast mismatch alarm.

PortDataChange 

Port data change alarm.

SyncDataChanged 

Sync data changed alarm.

IsochronousModeProblem 

Isochronous mode problem alarm.

NetworkComponentProblem 

Network component problem alarm.

TimeDataChanged 

Time data changed alarm.

DfpProblem 

DFP problem alarm.

UploadRetrieval 

Upload retrieval alarm.

PullModule 

Pull module alarm.

Definition at line 343 of file indices.h.

◆ BlockType

enum class profinet::BlockType : std::uint16_t
strong

PROFINET block types.

The underlying values correspond to the BlockType field defined by PROFINET IO.

Enumerator
Unknown 

Unknown / Initialize value.

DiagnosisData 

Diagnosis data block.

ExpectedIdentificationData 

Expected identification data block.

RealIdentificationData 

Real identification data block.

IdentificationMaintenance0 

I&M0 block.

IdentificationMaintenance1 

I&M1 block.

IdentificationMaintenance2 

I&M2 block.

IdentificationMaintenance3 

I&M3 block.

IdentificationMaintenance4 

I&M4 block.

IdentificationMaintenance5 

I&M5 block.

IdentificationMaintenance6 

I&M6 block.

IdentificationMaintenance7 

I&M7 block.

IdentificationMaintenance8 

I&M8 block.

IdentificationMaintenance9 

I&M9 block.

IdentificationMaintenance10 

I&M10 block.

IdentificationMaintenance11 

I&M11 block.

IdentificationMaintenance12 

I&M12 block.

IdentificationMaintenance13 

I&M13 block.

IdentificationMaintenance14 

I&M14 block.

IdentificationMaintenance15 

I&M15 block.

AlarmNotificationHigh 

Alarm notification high block.

AlarmAcknowledgementHigh 

Alarm acknowledgement high block.

AlarmNotificationLow 

Alarm notification low block.

AlarmAcknowledgementLow 

Alarm acknowledgement low block.

IoDataWriteRequest 

IOD write request block.

IoDataWriteResponse 

IOD write response block.

IoDataReadRequest 

IOD read request block.

IoDataReadResponse 

IOD read response block.

ApplicationRelationData 

ARData block.

LogData 

LogData block.

ApiData 

API data block.

SrlData 

SRL data block.

ApplicationRelationRequest 

AR block request.

ApplicationRelationResponse 

AR block response.

IoCrRequest 

IOCR block request.

IoCrResponse 

IOCR block response.

AlarmCrRequest 

AlarmCR block request.

AlarmCrResponse 

AlarmCR block response.

ExpectedSubmoduleRequest 

Expected submodule block request.

ModuleDifference 

Module difference block.

ControlPrmEndRequest 

IOD Control Prm End request.

ControlPrmEndResponse 

IOD Control Prm End response.

ControlApplicationReadyRequest 

IOD Control Application Ready request.

ControlApplicationReadyResponse 

IOD Control Application Ready response.

ReleaseRequest 

IOD Release request.

ReleaseResponse 

IOD Release response.

ControlRtClass3Request 

IOD Control RT Class 3 request.

ControlRtClass3Response 

IOD Control RT Class 3 response.

ParameterizationBeginRequest 

Parameterization Begin request.

ParameterizationBeginResponse 

Parameterization Begin response.

SubmoduleList 

Submodule list block.

Appended to the Application Ready block.

PortDataCheck 

PD Port Data Check block.

PortDataAdjust 

PD Port Data Adjust block.

PortDataReal 

PD Port Data Real block.

InterfaceMrpDataAdjust 

PD Interface MRP Data Adjust block.

InterfaceMrpDataReal 

PD Interface MRP Data Real block.

PortMrpDataReal 

PD Port MRP Data Real block.

MrpRingStateData 

MRP Ring State Data block.

PortFoDataReal 

PD Port FO Data Real block.

PortFoDataCheck 

PD Port FO Data Check block.

PortFoDataAdjust 

PD Port FO Data Adjust block.

PortDataRealExtended 

PD Port Data Real Extended block.

PortDataInterfaceDataReal 

PD Interface Data Real block.

PortStatistics 

PD Port Statistic block.

MultipleHeader 

Multiple Header block.

ContainerContent 

CO Container Content block.

ApplicationRelationServer 

AR Server Block.

RealProcessData 

PD Real Data block.

ExpectedProcessData 

PD Expected Data block.

RealIdentificationDataApi 

Real Identification Data API block.

Definition at line 90 of file indices.h.

◆ ControlCommand

enum class profinet::ControlCommand : std::uint16_t
strong

PROFINET IOD control command values.

These values are bit fields as defined by IEC 61158-6-10.

Enumerator
Unknown 

Unknown / Initialize value.

PrmEnd 

Prm End command.

ApplicationReady 

Application Ready command.

Release 

Release command.

Done 

Done command.

ReadyForCompanion 

Ready for Companion command.

ReadyForRtClass3 

Ready for RT Class 3 command.

PrmBegin 

Prm Begin command.

Definition at line 59 of file indices.h.

◆ ErrorDecode

enum class profinet::ErrorDecode : std::uint8_t
strong

PROFINET error decode values.

The ErrorDecode field identifies the error family and determines how ErrorCode1 and subsequent error information are interpreted.

Enumerator
PnioCm 

PNIO connection management error.

PnioRw 

PNIO read/write error.

Pnio 

General PNIO error.

Definition at line 21 of file exceptions.h.

◆ IocrRtClass

enum class profinet::IocrRtClass : std::uint8_t
strong

PROFINET IOCR real-time classes.

The underlying values correspond to the Real-Time Class field used by an IOCR.

Enumerator
Udp 

UDP real-time class.

Definition at line 454 of file indices.h.

◆ IocrType

enum class profinet::IocrType : std::uint16_t
strong

PROFINET IOCR types.

The underlying values correspond to the IOCR Type field defined by PROFINET IO.

Enumerator
Input 

Input IOCR.

Output 

Output IOCR.

MulticastProvider 

Multicast provider IOCR.

MulticastConsumer 

Multicast consumer IOCR.

Definition at line 427 of file indices.h.

◆ PnioCmAlarmCrErrorCode2

enum class profinet::PnioCmAlarmCrErrorCode2 : std::uint8_t
strong

PNIO-CM Alarm CR ErrorCode2 values.

Enumerator
InvalidAlarmCrType 

Invalid Alarm CR type.

NoAlarmCrResources 

No Alarm CR resources are available.

Definition at line 352 of file exceptions.h.

◆ PnioCmArErrorCode2

enum class profinet::PnioCmArErrorCode2 : std::uint8_t
strong

PNIO-CM AR ErrorCode2 values.

Enumerator
InvalidArType 

Invalid AR type.

ArAlreadyActive 

AR is already active.

NoArResources 

No AR resources are available.

NoProviderResources 

No provider resources are available.

NoConsumerResources 

No consumer resources are available.

NoAlarmResources 

No alarm resources are available.

NoMemory 

No memory is available.

InvalidSessionKey 

The session key is invalid.

ArUuidConflict 

The AR UUID conflicts with an existing AR.

Definition at line 280 of file exceptions.h.

◆ PnioCmDeviceErrorCode2

enum class profinet::PnioCmDeviceErrorCode2 : std::uint8_t
strong

PNIO-CM Device ErrorCode2 values.

ErrorCode2 values for errors reported by the connection management device (CMDEV).

Enumerator
DeviceStateConflict 

Device state conflict.

ConnectionResourceUnavailable 

No connection management resources are available.

AlreadyOwned 

The device is already owned.

ArSetAborted 

The application relation set was aborted.

Definition at line 403 of file exceptions.h.

◆ PnioCmErrorCode1

enum class profinet::PnioCmErrorCode1 : std::uint8_t
strong

PNIO-CM ErrorCode1 values.

These values are interpreted when ErrorDecode is ErrorDecode::PnioCm.

Enumerator
Ar 

ARBlock request.

Iocr 

IOCRBlock request.

AlarmCr 

AlarmCRBlock request.

ExpectedSubmodule 

ExpectedSubmoduleBlock request.

ModuleDiff 

ModuleDiffBlock.

ArRpc 

ARRPCBlock.

IrInfo 

IRInfoBlock.

SrInfo 

SRInfoBlock.

ArFsu 

ARFSUBlock.

IodControlRequest 

IODControl request.

IodControlResponse 

IODControl response.

ArResponse 

ARBlock response.

IocrResponse 

IOCRBlock response.

AlarmCrResponse 

AlarmCRBlock response.

ModuleDiffResponse 

ModuleDiffBlock response.

ArServerResponse 

ARServerBlock response.

PrmServer 

Parameter server.

CmCtl 

Connection management control.

CmDev 

Connection management device.

CmRpc 

Connection management RPC.

FaultyRecord 

Faulty record data.

FaultyAr 

Faulty application relation.

FaultyBlock 

Faulty block structure.

Definition at line 75 of file exceptions.h.

◆ PnioCmExpectedSubmoduleErrorCode2

enum class profinet::PnioCmExpectedSubmoduleErrorCode2 : std::uint8_t
strong

PNIO-CM Expected Submodule ErrorCode2 values.

ErrorCode2 values for errors associated with the ExpectedSubmoduleBlockReq.

Enumerator
InvalidSlot 

Invalid slot number.

InvalidSubslot 

Invalid subslot number.

WrongModuleIdentNumber 

Module identification number does not match.

WrongSubmoduleIdentNumber 

Submodule identification number does not match.

IoDataLengthMismatch 

IO data length does not match the expected length.

Definition at line 373 of file exceptions.h.

◆ PnioCmFaultyBlockErrorCode2

enum class profinet::PnioCmFaultyBlockErrorCode2 : std::uint8_t
strong

PNIO-CM Faulty Block ErrorCode2 values.

ErrorCode2 values for errors indicating a faulty PNIO-CM block.

Enumerator
FaultyBlockStructure 

Faulty block structure.

Definition at line 429 of file exceptions.h.

◆ PnioCmIocrErrorCode2

enum class profinet::PnioCmIocrErrorCode2 : std::uint8_t
strong

PNIO-CM IOCR ErrorCode2 values.

Enumerator
InvalidIocrType 

Invalid IOCR type.

NoIocrResources 

No IOCR resources are available.

InvalidFrameId 

The frame ID is invalid.

InvalidRtClass 

The RT class is invalid.

InvalidIoDataLength 

The IO data length is invalid.

CycleTimeConflict 

A cycle time conflict occurred.

WatchdogConfigurationError 

The watchdog configuration is invalid.

Definition at line 319 of file exceptions.h.

◆ PnioErrorCode1

enum class profinet::PnioErrorCode1 : std::uint8_t
strong

PNIO ErrorCode1 values.

ErrorCode1 identifies the specific PNIO error category. The meaning of ErrorCode2 depends on the selected ErrorCode1 value.

Enumerator
Rmpm 

Runtime parameter and module management (RMPM) error.

PrmServer 

Parameter server error.

Definition at line 447 of file exceptions.h.

◆ PnioPrmServerErrorCode2

enum class profinet::PnioPrmServerErrorCode2 : std::uint8_t
strong

PNIO Parameter Server ErrorCode2 values.

These values are valid when ErrorCode1 is PnioErrorCode1::PrmServer.

Enumerator
StateConflict 

The parameter server is in an invalid state for the requested operation.

Definition at line 498 of file exceptions.h.

◆ PnioRmpmErrorCode2

enum class profinet::PnioRmpmErrorCode2 : std::uint8_t
strong

PNIO RMPM ErrorCode2 values.

These values are valid when ErrorCode1 is PnioErrorCode1::Rmpm.

Enumerator
InvalidArgumentsLength 

Invalid arguments length.

UnknownBlocksInRequest 

Unknown blocks were found in the request.

RequiredIocrBlockMissing 

A required IOCR block is missing.

WrongAlarmCrBlockCount 

The number of AlarmCR blocks is incorrect.

OutOfArResources 

No application relation resources are available.

Definition at line 468 of file exceptions.h.

◆ PnioRwAccessErrorCode2

enum class profinet::PnioRwAccessErrorCode2 : std::uint8_t
strong

PNIORW Access ErrorCode2 values.

Enumerator
InvalidArea 

Access denied because the area is invalid.

AccessDenied 

Access denied.

InvalidRange 

Access denied because the range is invalid.

InvalidState 

Access denied because the device is in an invalid state.

LocalControl 

Access denied because of local control.

Definition at line 219 of file exceptions.h.

◆ PnioRwApplicationErrorCode2

enum class profinet::PnioRwApplicationErrorCode2 : std::uint8_t
strong

PNIORW Application ErrorCode2 values.

Enumerator
ReadError 

Read error.

WriteError 

Write error.

ModuleFailure 

Module failure.

ResourceBusy 

Resource is busy.

VersionConflict 

Version conflict.

InvalidApi 

API number is invalid.

BackupNotAllowed 

Backup is not allowed.

AlarmPending 

An alarm is pending.

Definition at line 245 of file exceptions.h.

◆ PnioRwErrorCode1

enum class profinet::PnioRwErrorCode1 : std::uint8_t
strong

PNIO read/write ErrorCode1 values.

These values are interpreted when ErrorDecode is ErrorDecode::PnioRw.

Enumerator
InvalidIndex 

Invalid or unsupported index.

WriteLength 

Write length error.

Resource 

Resource error.

Access 

Access error.

Application 

Application error.

Definition at line 45 of file exceptions.h.

◆ PnioRwInvalidIndexErrorCode2

enum class profinet::PnioRwInvalidIndexErrorCode2 : std::uint8_t
strong

PNIORW InvalidIndex ErrorCode2 values.

Enumerator
IndexNotSupported 

Index is not supported.

IndexNotWritten 

Index exists but has not been written.

Definition at line 156 of file exceptions.h.

◆ PnioRwResourceErrorCode2

enum class profinet::PnioRwResourceErrorCode2 : std::uint8_t
strong

PNIORW Resource ErrorCode2 values.

Enumerator
ResourceNotAvailable 

Resource is not available.

InvalidSlot 

Slot number is invalid.

InvalidSubslot 

Subslot number is invalid.

ModuleHasNoData 

Module has no data.

Definition at line 196 of file exceptions.h.

◆ PnioRwWriteLengthErrorCode2

enum class profinet::PnioRwWriteLengthErrorCode2 : std::uint8_t
strong

PNIORW WriteLength ErrorCode2 values.

Enumerator
WriteLengthError 

General write length error.

DataTooShort 

Write data is too short.

DataTooLong 

Write data is too long.

WriteProtected 

Write access is denied because the data is write protected.

Definition at line 173 of file exceptions.h.

◆ Usi

enum class profinet::Usi : std::uint16_t
strong

PROFINET User Structure Identifiers (USI).

The underlying values correspond to the User Structure Identifier field used in PROFINET diagnosis and alarm data.

Enumerator
Unknown 

Initializer.

ChannelDiagnosis 

Channel diagnosis.

MultipleDiagnosis 

Multiple diagnosis.

ExtendedChannelDiagnosis 

Extended channel diagnosis.

QualifiedChannelDiagnosis 

Qualified channel diagnosis.

Maintenance 

Maintenance item.

Upload 

Upload record.

IParameter 

iParameter item.

RsAlarmLow 

RS alarm item for low alarm.

RsAlarmHigh 

RS alarm item for high alarm.

RsAlarmSubmodule 

RS alarm item for submodule.

PeAlarm 

PE alarm item.

PralAlarm 

PRAL alarm item.

Bit0till14OfChannelNumber 

The channel number (bits 0-14).

Bit15OfChannelNumber 

Check diagnosis is accumulative (bit 15 of ChannelNumber).

Bit15AndExternalChannelDiagnosisOfChannelNumber 

Check diagnosis is in external channel diagnosis (bit 15 of ChannelNumber + 0x02).

Bit15AndQualifiedChannelDiagnosisOfChannelNumber 

Check diagnosis is in qualified channel diagnosis (bit 15 of ChannelNumber + 0x03).

Low11BitsOfRsAlarmInfo 

The low 11 bits of RsAlarmInfo, so the RS specifier can be extracted from RsAlarmInfo.

Definition at line 490 of file indices.h.

Function Documentation

◆ AllStandardIndices()

const IndexNamePairs & profinet::AllStandardIndices ( )

Union of every standard index category.

Returns
Reference to the static table.

Combines ImIndices() + DiagnosisIndices("subslot") + DiagnosisIndices("device") + PortIndices() + InterfaceIndices() + DeviceIndices() + a handful of extras (ExpectedIdentificationData, RealIdentificationData, ModuleDiffBlock, SubstituteValues, RecordInputData, RecordOutputData) – matches alarms.py's ALL_STANDARD_INDICES concatenation order.

Definition at line 618 of file indices.cpp.

References DeviceIndices(), DiagnosisIndices(), EXPECTED_ID_SUBSLOT, ImIndices(), InterfaceIndices(), MODULE_DIFF_BLOCK, PortIndices(), REAL_ID_SUBSLOT, RECORD_INPUT_DATA, RECORD_OUTPUT_DATA, and SUBSTITUTE_VALUES.

Referenced by GetIndexName().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ CriticalIndices()

const IndexNamePairs & profinet::CriticalIndices ( )

Critical indices that should always be tested.

Returns
Reference to the static table.

Definition at line 495 of file indices.cpp.

References AR_DATA, DIAG_DEVICE, IM0, IM0_FILTER_DATA, LOG_DATA, MODULE_DIFF_BLOCK, and PD_REAL_DATA.

◆ DecodeBytes() [1/2]

std::string profinet::DecodeBytes ( const std::uint8_t *  data,
std::size_t  len 
)

Decode bytes to a UTF-8 string, stripping trailing NUL bytes.

Parameters
dataPointer to the first byte to decode.
lenNumber of bytes to decode.
Returns
The decoded string with trailing NUL bytes removed.

Definition at line 247 of file util.cpp.

Referenced by profinet::dcp::DCPDeviceDescription::DCPDeviceDescription(), DecodeBytes(), profinet::PNInM0::Parse(), profinet::PNInM1::Parse(), profinet::PNInM2::Parse(), profinet::PNInM3::Parse(), profinet::PNInM5::Parse(), and profinet::dcp::DCPDHCPBlock::Parse().

+ Here is the caller graph for this function:

◆ DecodeBytes() [2/2]

std::string profinet::DecodeBytes ( const std::vector< std::uint8_t > &  data)

Decode bytes to a UTF-8 string, stripping trailing NUL bytes.

Parameters
dataBytes to decode.
Returns
The decoded string with trailing NUL bytes removed.

Definition at line 258 of file util.cpp.

References DecodeBytes().

+ Here is the call graph for this function:

◆ DecodePnioCmError()

std::string profinet::DecodePnioCmError ( const std::uint8_t &  errorCode1,
const std::uint8_t &  errorCode2 
)

Definition at line 538 of file exceptions.cpp.

References AlarmCr, AlarmCrResponse, Ar, ArResponse, CmDev, ExpectedSubmodule, FaultyBlock, GetPnioCmErrorCode1Name(), GetPnioCmErrorMessage(), Iocr, and IocrResponse.

Referenced by profinet::PNIOError::CreateFromCodes().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ DecodePnioError()

std::string profinet::DecodePnioError ( const std::uint8_t &  errorCode1,
const std::uint8_t &  errorCode2 
)

Definition at line 575 of file exceptions.cpp.

References GetPnioErrorMessage(), PrmServer, and Rmpm.

Referenced by profinet::PNIOError::CreateFromCodes().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ DecodePnioRWError()

std::string profinet::DecodePnioRWError ( const std::uint8_t &  errorCode1,
const std::uint8_t &  errorCode2 
)

Definition at line 591 of file exceptions.cpp.

References Access, Application, GetPnioRwErrorMessage(), InvalidIndex, Resource, and WriteLength.

Referenced by profinet::PNIOError::CreateFromCodes().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ DeviceIndices()

const IndexNamePairs & profinet::DeviceIndices ( )

Device-level indices.

Returns
Reference to the static table.

Definition at line 604 of file indices.cpp.

References API_DATA, AR_DATA, AUTO_CONFIG, LOG_DATA, PD_EXPECTED_DATA, PD_REAL_DATA, and PDEV_DATA.

Referenced by AllStandardIndices(), and profinet::rpc::RPCCon::EnumerateIndices().

+ Here is the caller graph for this function:

◆ DiagnosisIndices()

const IndexNamePairs & profinet::DiagnosisIndices ( const std::string &  scope)

Diagnosis indices for a given addressing scope.

Parameters
scopeOne of "subslot", "slot", "ar", "api", "device".
Returns
Reference to the static table, or an empty table for an unrecognized scope.

Definition at line 532 of file indices.cpp.

References DIAG_ALL_API, DIAG_ALL_AR, DIAG_ALL_SLOT, DIAG_ALL_SUBSLOT, DIAG_CHANNEL_API, DIAG_CHANNEL_AR, DIAG_CHANNEL_SLOT, DIAG_CHANNEL_SUBSLOT, DIAG_DEVICE, DIAG_MAINTENANCE_API, DIAG_MAINTENANCE_AR, DIAG_MAINTENANCE_SLOT, and DIAG_MAINTENANCE_SUBSLOT.

Referenced by AllStandardIndices(), and profinet::rpc::RPCCon::EnumerateIndices().

+ Here is the caller graph for this function:

◆ GetAlarmTypeName()

std::string profinet::GetAlarmTypeName ( AlarmType  alarmType)

Get the human-readable name for an alarm type.

Parameters
alarmTypeAlarm type.
Returns
The alarm type name, e.g. "Diagnosis" or "Unknown" if the value is not defined.

Definition at line 278 of file indices.cpp.

References ControlledBySupervisor, DfpProblem, Diagnosis, DiagnosisDisappears, IsochronousModeProblem, MulticastMismatch, NetworkComponentProblem, Plug, PlugWrongSubmodule, PortDataChange, Process, Pull, PullModule, Redundancy, Released, ReturnOfSubmodule, Status, SyncDataChanged, TimeDataChanged, Update, and UploadRetrieval.

Referenced by profinet::AlarmNotification::AlarmTypeName().

+ Here is the caller graph for this function:

◆ GetBlockTypeName()

std::string profinet::GetBlockTypeName ( BlockType  blockType)

Get the human-readable name for a block type.

Parameters
blockTypeBlock type.
Returns
The block type name, or "Unknown(0xXXXX)" for an unrecognized block type.

Definition at line 38 of file indices.cpp.

References AlarmAcknowledgementHigh, AlarmAcknowledgementLow, AlarmCrRequest, AlarmCrResponse, AlarmNotificationHigh, AlarmNotificationLow, ApiData, ApplicationRelationData, ApplicationRelationRequest, ApplicationRelationResponse, ApplicationRelationServer, ContainerContent, ControlApplicationReadyRequest, ControlApplicationReadyResponse, ControlPrmEndRequest, ControlPrmEndResponse, ControlRtClass3Request, ControlRtClass3Response, DiagnosisData, ExpectedIdentificationData, ExpectedProcessData, ExpectedSubmoduleRequest, Hex4(), IdentificationMaintenance0, IdentificationMaintenance1, IdentificationMaintenance10, IdentificationMaintenance11, IdentificationMaintenance12, IdentificationMaintenance13, IdentificationMaintenance14, IdentificationMaintenance15, IdentificationMaintenance2, IdentificationMaintenance3, IdentificationMaintenance4, IdentificationMaintenance5, IdentificationMaintenance6, IdentificationMaintenance7, IdentificationMaintenance8, IdentificationMaintenance9, InterfaceMrpDataAdjust, InterfaceMrpDataReal, IoCrRequest, IoCrResponse, IoDataReadRequest, IoDataReadResponse, IoDataWriteRequest, IoDataWriteResponse, LogData, ModuleDifference, MrpRingStateData, MultipleHeader, ParameterizationBeginRequest, ParameterizationBeginResponse, PortDataAdjust, PortDataCheck, PortDataInterfaceDataReal, PortDataReal, PortDataRealExtended, PortFoDataAdjust, PortFoDataCheck, PortFoDataReal, PortMrpDataReal, PortStatistics, RealIdentificationData, RealIdentificationDataApi, RealProcessData, ReleaseRequest, ReleaseResponse, SrlData, and SubmoduleList.

Referenced by profinet::blocks::ParseModuleDiffBlock(), and profinet::blocks::BlockHeader::TypeName().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetErrorDecodeName()

std::string profinet::GetErrorDecodeName ( ErrorDecode  errorDecodeName)

Get the human-readable name for an ErrorDecode value.

Parameters
errorDecodeNameError decode value.
Returns
The error family name, or a hexadecimal representation for an unknown value.

Definition at line 15 of file exceptions.cpp.

References Hex2(), Pnio, PnioCm, and PnioRw.

+ Here is the call graph for this function:

◆ GetExecutableDirectory()

std::filesystem::path profinet::GetExecutableDirectory ( )

Retrieves the absolute directory path of the currently running executable.

This function reads the /proc/self/exe symbolic link maintained by the Linux kernel and extracts its parent directory using modern C++20 filesystem utilities.

It safely wraps any system exceptions inside a try-catch block and guarantees no manual buffer management or C-style array pitfalls.

Returns
fs::path The absolute path to the executable's directory. Returns an empty path if an error occurs.
Note
This implementation is exclusive to Linux operating systems.

Definition at line 494 of file util.cpp.

◆ GetIndexName()

std::string profinet::GetIndexName ( std::uint16_t  index)

Get the human-readable name for a record data index.

Parameters
indexRecord data index.
Returns
The index's name if it's in AllStandardIndices(), else a range-based category label ("Subslot data (0x8072)", "I&M6", etc.).

Definition at line 642 of file indices.cpp.

References AllStandardIndices(), and Hex4().

Referenced by profinet::rpc::RPCCon::EnumerateIndices().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetIocrRtClassName()

std::string profinet::GetIocrRtClassName ( IocrRtClass  rtClass)

Get the human-readable name for an IOCR real-time class.

Parameters
rtClassIOCR real-time class.
Returns
The real-time class name, or a hexadecimal representation for an unknown value.

Definition at line 373 of file indices.cpp.

References Hex2(), and Udp.

+ Here is the call graph for this function:

◆ GetIocrTypeName()

std::string profinet::GetIocrTypeName ( IocrType  iocrType)

Get the human-readable name for an IOCR type.

Parameters
iocrTypeIOCR type.
Returns
The IOCR type name, or a hexadecimal representation for an unknown value.

Definition at line 350 of file indices.cpp.

References Hex4(), Input, MulticastConsumer, MulticastProvider, and Output.

+ Here is the call graph for this function:

◆ GetMac()

MacAddress profinet::GetMac ( const std::string &  ifname)

Get the MAC address of a network interface.

Parameters
ifnameInterface name, e.g. "eth0".
Returns
The interface's 6-byte MAC address.

Uses SIOCGIFHWADDR (Linux only). Throws SocketError on failure.

Definition at line 267 of file util.cpp.

Referenced by profinet::device::ProfinetDevice::Discover(), profinet::device::ProfinetDevice::FromDcpInfo(), profinet::device::ProfinetDevice::FromIp(), and profinet::device::Scan().

+ Here is the caller graph for this function:

◆ GetModuleStateName()

std::string profinet::GetModuleStateName ( std::uint16_t  state)

Get the human-readable name for a module state.

Parameters
stateRaw module state value.
Returns
The module state name, e.g. "ProperModule".

Definition at line 445 of file indices.cpp.

References Hex4(), MODULE_STATE_NO_MODULE, MODULE_STATE_PROPER_MODULE, MODULE_STATE_SUBSTITUTE_MODULE, and MODULE_STATE_WRONG_MODULE.

Referenced by profinet::blocks::ModuleDiffModule::StateName().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetPeModeName()

std::string profinet::GetPeModeName ( std::uint8_t  mode)

Get the human-readable name for a PROFIenergy operational mode.

Parameters
modeRaw PROFIenergy mode value.
Returns
The mode name, e.g. "PE_Operate".

Definition at line 470 of file indices.cpp.

References Hex2(), PE_MODE_ENERGY_SAVING_MAX, PE_MODE_ENERGY_SAVING_MIN, PE_MODE_OPERATE, PE_MODE_POWER_OFF, PE_MODE_READY_TO_OPERATE, and PE_MODE_SLEEP_MODE_WOL.

Referenced by profinet::PEAlarmItem::ModeName().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetPnioCmErrorCode1Name()

std::string profinet::GetPnioCmErrorCode1Name ( PnioCmErrorCode1  errorCodeCm1)

Get the human-readable name for a PNIO-CM ErrorCode1.

Parameters
errorCodeCm1ErrorCode1 value.
Returns
The block or error category name, or a hexadecimal representation for an unknown value.

Definition at line 61 of file exceptions.cpp.

References AlarmCr, AlarmCrResponse, Ar, ArFsu, ArResponse, ArRpc, ArServerResponse, CmCtl, CmDev, CmRpc, ExpectedSubmodule, FaultyAr, FaultyBlock, FaultyRecord, Hex2(), Iocr, IocrResponse, IodControlRequest, IodControlResponse, IrInfo, ModuleDiff, ModuleDiffResponse, PrmServer, and SrInfo.

Referenced by profinet::PNIOError::BlockName(), and DecodePnioCmError().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetPnioCmErrorMessage() [1/6]

std::string profinet::GetPnioCmErrorMessage ( PnioCmAlarmCrErrorCode2  errorCode2)

Get the human-readable message for a PNIO-CM Alarm CR error.

Parameters
errorCode2PNIO-CM Alarm CR ErrorCode2 value.
Returns
Human-readable error message, or a hexadecimal representation when the ErrorCode2 value is unknown.

Definition at line 426 of file exceptions.cpp.

References Hex2(), InvalidAlarmCrType, and NoAlarmCrResources.

+ Here is the call graph for this function:

◆ GetPnioCmErrorMessage() [2/6]

std::string profinet::GetPnioCmErrorMessage ( PnioCmArErrorCode2  errorCode2)

Get the human-readable message for a PNIO-CM AR error.

Parameters
errorCode2PNIO-CM AR ErrorCode2 value.
Returns
Human-readable error message, or a hexadecimal representation when the ErrorCode2 value is unknown.

Definition at line 356 of file exceptions.cpp.

References ArAlreadyActive, ArUuidConflict, Hex2(), InvalidArType, InvalidSessionKey, NoAlarmResources, NoArResources, NoConsumerResources, NoMemory, and NoProviderResources.

Referenced by DecodePnioCmError().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetPnioCmErrorMessage() [3/6]

std::string profinet::GetPnioCmErrorMessage ( PnioCmDeviceErrorCode2  errorCode2)

Get the human-readable message for a PNIO-CM Device error.

Parameters
errorCode2PNIO-CM Device ErrorCode2 value.
Returns
Human-readable error message, or a hexadecimal representation when the ErrorCode2 value is unknown.

Definition at line 469 of file exceptions.cpp.

References AlreadyOwned, ArSetAborted, ConnectionResourceUnavailable, DeviceStateConflict, and Hex2().

+ Here is the call graph for this function:

◆ GetPnioCmErrorMessage() [4/6]

std::string profinet::GetPnioCmErrorMessage ( PnioCmExpectedSubmoduleErrorCode2  errorCode2)

Get the human-readable message for a PNIO-CM Expected Submodule error.

Parameters
errorCode2PNIO-CM Expected Submodule ErrorCode2 value.
Returns
Human-readable error message, or a hexadecimal representation when the ErrorCode2 value is unknown.

Definition at line 443 of file exceptions.cpp.

References Hex2(), InvalidSlot, InvalidSubslot, IoDataLengthMismatch, WrongModuleIdentNumber, and WrongSubmoduleIdentNumber.

+ Here is the call graph for this function:

◆ GetPnioCmErrorMessage() [5/6]

std::string profinet::GetPnioCmErrorMessage ( PnioCmFaultyBlockErrorCode2  errorCode2)

Get the human-readable message for a PNIO-CM Faulty Block error.

Parameters
errorCode2PNIO-CM Faulty Block ErrorCode2 value.
Returns
Human-readable error message, or a hexadecimal representation when the ErrorCode2 value is unknown.

Definition at line 492 of file exceptions.cpp.

References FaultyBlockStructure, and Hex2().

+ Here is the call graph for this function:

◆ GetPnioCmErrorMessage() [6/6]

std::string profinet::GetPnioCmErrorMessage ( PnioCmIocrErrorCode2  errorCode2)

Get the human-readable message for a PNIO-CM IOCR error.

Parameters
errorCode2PNIO-CM IOCR ErrorCode2 value.
Returns
Human-readable error message, or a hexadecimal representation when the ErrorCode2 value is unknown.

Definition at line 394 of file exceptions.cpp.

References CycleTimeConflict, Hex2(), InvalidFrameId, InvalidIocrType, InvalidIoDataLength, InvalidRtClass, NoIocrResources, and WatchdogConfigurationError.

+ Here is the call graph for this function:

◆ GetPnioErrorCode1Name()

std::string profinet::GetPnioErrorCode1Name ( PnioErrorCode1  errorCode1)

Get the human-readable name of a PNIO ErrorCode1.

Parameters
errorCode1PNIO ErrorCode1 value.
Returns
The corresponding error category name, or the hexadecimal ErrorCode1 value when the value is unknown.

Definition at line 265 of file exceptions.cpp.

References Hex2(), PrmServer, and Rmpm.

+ Here is the call graph for this function:

◆ GetPnioErrorMessage() [1/2]

std::string profinet::GetPnioErrorMessage ( PnioPrmServerErrorCode2  errorCode2)

Get the human-readable message for a Parameter Server ErrorCode2.

Parameters
errorCode2Parameter Server ErrorCode2 value.
Returns
Human-readable error message, or a hexadecimal representation for an unknown value.

Definition at line 308 of file exceptions.cpp.

References Hex2(), and StateConflict.

+ Here is the call graph for this function:

◆ GetPnioErrorMessage() [2/2]

std::string profinet::GetPnioErrorMessage ( PnioRmpmErrorCode2  errorCode2)

Get the human-readable message for an RMPM ErrorCode2.

Parameters
errorCode2RMPM ErrorCode2 value.
Returns
Human-readable error message, or a hexadecimal representation for an unknown value.

Definition at line 282 of file exceptions.cpp.

References Hex2(), InvalidArgumentsLength, OutOfArResources, RequiredIocrBlockMissing, UnknownBlocksInRequest, and WrongAlarmCrBlockCount.

Referenced by DecodePnioError().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetPnioRwErrorCode1Name()

std::string profinet::GetPnioRwErrorCode1Name ( PnioRwErrorCode1  errorCodeRw1)

Get the human-readable name for a PNIORW ErrorCode1.

Parameters
errorCodeRw1ErrorCode1 value.
Returns
The error category name, or a hexadecimal representation for an unknown value.

Definition at line 35 of file exceptions.cpp.

References Access, Application, Hex2(), InvalidIndex, Resource, and WriteLength.

+ Here is the call graph for this function:

◆ GetPnioRwErrorMessage() [1/6]

std::string profinet::GetPnioRwErrorMessage ( PnioRwAccessErrorCode2  errorCode2)

Get the human-readable message for an Access error.

Parameters
errorCode2PNIO Read/Write Access ErrorCode2.
Returns
Human-readable error message.

Definition at line 204 of file exceptions.cpp.

References AccessDenied, Hex2(), InvalidArea, InvalidRange, InvalidState, and LocalControl.

+ Here is the call graph for this function:

◆ GetPnioRwErrorMessage() [2/6]

std::string profinet::GetPnioRwErrorMessage ( PnioRwApplicationErrorCode2  errorCode2)

Get the human-readable message for an Application error.

Parameters
errorCode2PNIO Read/Write Application ErrorCode2.
Returns
Human-readable error message.

Definition at line 230 of file exceptions.cpp.

References AlarmPending, BackupNotAllowed, Hex2(), InvalidApi, ModuleFailure, ReadError, ResourceBusy, VersionConflict, and WriteError.

+ Here is the call graph for this function:

◆ GetPnioRwErrorMessage() [3/6]

std::string profinet::GetPnioRwErrorMessage ( PnioRwErrorCode1  errorCode1,
std::uint8_t  errorCode2 
)

Decode a PNIO read/write error.

Parameters
errorCode1PNIO read/write ErrorCode1 value.
errorCode2Raw PNIO read/write ErrorCode2 value.
Returns
Human-readable error message.

ErrorCode2 is interpreted according to the ErrorCode1 category. Unknown ErrorCode2 values are returned as a hexadecimal value.

Definition at line 322 of file exceptions.cpp.

References Access, Application, GetPnioRwErrorMessage(), Hex2(), InvalidIndex, Resource, and WriteLength.

+ Here is the call graph for this function:

◆ GetPnioRwErrorMessage() [4/6]

std::string profinet::GetPnioRwErrorMessage ( PnioRwInvalidIndexErrorCode2  errorCode2)

Get the human-readable message for an InvalidIndex error.

Parameters
errorCode2PNIO Read/Write InvalidIndex ErrorCode2.
Returns
Human-readable error message.

Definition at line 141 of file exceptions.cpp.

References Hex2(), IndexNotSupported, and IndexNotWritten.

Referenced by DecodePnioRWError(), and GetPnioRwErrorMessage().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetPnioRwErrorMessage() [5/6]

std::string profinet::GetPnioRwErrorMessage ( PnioRwResourceErrorCode2  errorCode2)

Get the human-readable message for a Resource error.

Parameters
errorCode2PNIO Read/Write Resource ErrorCode2.
Returns
Human-readable error message.

Definition at line 181 of file exceptions.cpp.

References Hex2(), InvalidSlot, InvalidSubslot, ModuleHasNoData, and ResourceNotAvailable.

+ Here is the call graph for this function:

◆ GetPnioRwErrorMessage() [6/6]

std::string profinet::GetPnioRwErrorMessage ( PnioRwWriteLengthErrorCode2  errorCode2)

Get the human-readable message for a WriteLength error.

Parameters
errorCode2PNIO Read/Write WriteLength ErrorCode2.
Returns
Human-readable error message.

Definition at line 158 of file exceptions.cpp.

References DataTooLong, DataTooShort, Hex2(), WriteLengthError, and WriteProtected.

+ Here is the call graph for this function:

◆ GetScope()

std::string profinet::GetScope ( std::uint16_t  index)

Get the addressing scope for an index.

Parameters
indexRecord data index.
Returns
One of "user", "subslot", "slot", "ar", "api", "device", or "unknown".

Definition at line 683 of file indices.cpp.

◆ GetSubmoduleStateName()

std::string profinet::GetSubmoduleStateName ( std::uint16_t  state)

Get the human-readable name for a submodule state.

Parameters
stateRaw submodule state value.
Returns
The submodule state name, e.g. "OK".

Definition at line 457 of file indices.cpp.

References Hex4(), SUBMODULE_STATE_APPLICATION_READY_PENDING, SUBMODULE_STATE_LOCKED_BY_SUPERVISOR, SUBMODULE_STATE_NO_SUBMODULE, SUBMODULE_STATE_OK, and SUBMODULE_STATE_WRONG_SUBMODULE.

Referenced by profinet::blocks::ModuleDiffSubmodule::StateName().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetUsiName()

std::string profinet::GetUsiName ( Usi  usi)

Get the human-readable name for a User Structure Identifier.

Parameters
usiUser Structure Identifier.
Returns
The USI name, or a description indicating whether the value is manufacturer-specific, profile-specific, or reserved.

Definition at line 386 of file indices.cpp.

References ChannelDiagnosis, ExtendedChannelDiagnosis, Hex4(), IParameter, Maintenance, MultipleDiagnosis, PeAlarm, PralAlarm, QualifiedChannelDiagnosis, RsAlarmHigh, RsAlarmLow, RsAlarmSubmodule, and Upload.

Referenced by profinet::AlarmItem::UsiName(), profinet::DiagnosisItem::UsiName(), profinet::MaintenanceItem::UsiName(), profinet::UploadRetrievalItem::UsiName(), profinet::IParameterItem::UsiName(), profinet::PEAlarmItem::UsiName(), profinet::RSAlarmItem::UsiName(), and profinet::PRALAlarmItem::UsiName().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetVendorName()

std::string profinet::GetVendorName ( std::uint16_t  vendorId)

Get the vendor name for a 16-bit PROFINET vendor ID.

Parameters
vendorId16-bit PROFINET vendor ID.
Returns
The vendor name, or "Unknown (0xXXXX)" if not found (matching vendors.py's GetVendorName()).

Definition at line 29 of file vendors.cpp.

References LookupVendor().

Referenced by profinet::dcp::DCPDeviceDescription::VendorName().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ Hex2()

std::string profinet::Hex2 ( std::uint8_t  value)

◆ Hex4()

std::string profinet::Hex4 ( std::uint16_t  value)

Format a 16-bit unsigned integer as a 4-digit hexadecimal string.

Parameters
valueThe 16-bit numeric value to format.
Returns
A string in "0xXXXX" format (e.g., "0x00FF").

Definition at line 63 of file util.cpp.

Referenced by profinet::diagnosis::DecodeChannelErrorType(), profinet::diagnosis::DecodeExtChannelErrorType(), GetBlockTypeName(), GetIndexName(), GetIocrTypeName(), GetModuleStateName(), profinet::dcp::IPBlockInfo::GetName(), profinet::dcp::BlockQualifier::GetName(), profinet::dcp::ResetQualifier::GetName(), profinet::dcp::DeviceInitiative::GetName(), GetSubmoduleStateName(), GetUsiName(), profinet::dcp::ParseSetResponse(), and profinet::dcp::DCPDeviceDescription::ToString().

+ Here is the caller graph for this function:

◆ HexFallback()

std::string profinet::HexFallback ( const char *  widthPrefix,
std::uint32_t  value,
int  digitWidth 
)

Format a hexadecimal string with a custom prefix and dynamic width.

Parameters
widthPrefixThe text prefix to prepend before the opening parenthesis.
valueThe 32-bit numeric value to format as hexadecimal.
digitWidthThe minimum number of digits for the hexadecimal part, zero-padded.
Returns
A string in "prefix(0xXXXX)" format based on the given width.

Definition at line 78 of file util.cpp.

◆ ImIndices()

const IndexNamePairs & profinet::ImIndices ( )

I&M0-I&M15 indices.

Returns
Reference to the static table.

Definition at line 509 of file indices.cpp.

References IM0, IM1, IM10, IM11, IM12, IM13, IM14, IM15, IM2, IM3, IM4, IM5, IM6, IM7, IM8, and IM9.

Referenced by AllStandardIndices(), and profinet::rpc::RPCCon::EnumerateIndices().

+ Here is the caller graph for this function:

◆ InterfaceIndices()

const IndexNamePairs & profinet::InterfaceIndices ( )

Interface-level indices.

Returns
Reference to the static table.

Definition at line 594 of file indices.cpp.

References PD_INTERFACE_DATA_REAL, PD_INTERFACE_MRP_DATA_REAL, and PD_NC_DATA_CHECK.

Referenced by AllStandardIndices(), and profinet::rpc::RPCCon::EnumerateIndices().

+ Here is the caller graph for this function:

◆ Ip2String()

std::array< std::uint8_t, 4 > profinet::Ip2String ( const std::string &  ipStr)

Parse a dotted-decimal IPv4 address string.

Parameters
ipStrIPv4 address in "a.b.c.d" form.
Returns
The 4 raw address bytes.

Throws InvalidIPError on malformed input.

Definition at line 230 of file util.cpp.

Referenced by profinet::dcp::SendHello(), and profinet::dcp::SetIp().

+ Here is the caller graph for this function:

◆ LookupVendor()

std::optional< std::string > profinet::LookupVendor ( std::uint16_t  vendorId)

Look up a vendor name without a fallback string.

Parameters
vendorId16-bit PROFINET vendor ID.
Returns
The vendor name, or std::nullopt if not found (mirrors vendors.py's LookupVendor()).

Definition at line 15 of file vendors.cpp.

References profinet::detail::kVendorTable, and profinet::detail::kVendorTableSize.

Referenced by GetVendorName().

+ Here is the caller graph for this function:

◆ Mac2String() [1/2]

std::string profinet::Mac2String ( const MacAddress mac)

Format a MAC address as a colon-separated string.

Parameters
macMAC address to format.
Returns
String in "aa:bb:cc:dd:ee:ff" form.

Definition at line 196 of file util.cpp.

References Mac2String().

Referenced by profinet::dcp::DCPDeviceDescription::DCPDeviceDescription(), Mac2String(), profinet::blocks::PeerInfo::MacStr(), and profinet::blocks::InterfaceInfo::MacStr().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ Mac2String() [2/2]

std::string profinet::Mac2String ( const std::uint8_t *  macBytes,
std::size_t  len 
)

Format a MAC address as a colon-separated string.

Parameters
macBytesPointer to exactly 6 bytes.
lenNumber of bytes available at mac_bytes (must be 6).
Returns
String in "aa:bb:cc:dd:ee:ff" form.

Definition at line 201 of file util.cpp.

◆ ParseAlarmItem()

std::pair< AlarmItemVariant, std::size_t > profinet::ParseAlarmItem ( const Bytes data,
std::size_t  offset = 0 
)

Parse a single alarm item starting at an offset.

Parameters
dataBuffer containing the alarm item.
offsetByte offset within Data to start parsing at.
Returns
The parsed item and the offset immediately after it.

Throws std::invalid_argument (mirrors alarms.py's ValueError) if data is truncated for the dispatched item type.

Definition at line 234 of file alarms.cpp.

References ChannelDiagnosis, ExtendedChannelDiagnosis, IParameter, Maintenance, OneOctetShift, PeAlarm, PralAlarm, QualifiedChannelDiagnosis, RsAlarmHigh, RsAlarmLow, RsAlarmSubmodule, Upload, and profinet::AlarmItem::userStructureId.

Referenced by ParseAlarmNotification().

+ Here is the caller graph for this function:

◆ ParseAlarmNotification()

AlarmNotification profinet::ParseAlarmNotification ( const Bytes data)

Parse a complete AlarmNotification PDU (BlockHeader + body + items).

Parameters
dataBuffer containing the complete PDU, including its block header.
Returns
The parsed notification.

Throws std::invalid_argument if data is too short (< 26 bytes: the structurally correct BlockHeader(6)+Body(20) minimum – see the .cpp for a note on an off-by-2 bug in upstream alarms.py this deliberately does NOT replicate, since it would misalign every item after the first). Item parsing errors past that point are swallowed and stop item parsing early (matching alarms.py's try/except ValueError: break), so a truncated trailing item doesn't lose the items parsed so far.

Definition at line 286 of file alarms.cpp.

References profinet::AlarmNotification::alarmSequenceNumber, profinet::AlarmNotification::alarmType, profinet::AlarmNotification::api, profinet::AlarmNotification::arDiagnosisState, profinet::PNBlockHeader::blockLength, profinet::AlarmNotification::blockType, profinet::PNBlockHeader::blockType, profinet::AlarmNotification::blockVersion, profinet::PNBlockHeader::blockVersionHigh, profinet::PNBlockHeader::blockVersionLow, profinet::AlarmNotification::channelDiagnosis, profinet::AlarmNotification::items, profinet::AlarmNotification::manufacturerSpecific, profinet::AlarmNotification::moduleIdentNumber, profinet::PNBlockHeader::Parse(), ParseAlarmItem(), payload, profinet::AlarmNotification::rawPayload, profinet::AlarmNotification::slotNumber, profinet::AlarmNotification::submoduleDiagnosisState, profinet::AlarmNotification::submoduleIdentNumber, profinet::AlarmNotification::subslotNumber, profinet::wire::Reader::U16(), and profinet::wire::Reader::U32().

Referenced by profinet::AlarmListener::ProcessAlarm(), and profinet::device::ProfinetDevice::ReadAlarm().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ PortIndices()

const IndexNamePairs & profinet::PortIndices ( )

Port-level indices.

Returns
Reference to the static table.

Definition at line 582 of file indices.cpp.

References PD_PORT_DATA_ADJUST, PD_PORT_DATA_CHECK, PD_PORT_DATA_REAL, PD_PORT_MRP_DATA_REAL, and PD_PORT_STATISTIC.

Referenced by AllStandardIndices(), and profinet::rpc::RPCCon::EnumerateIndices().

+ Here is the caller graph for this function:

◆ SkipVlanTags()

std::size_t profinet::SkipVlanTags ( std::span< const std::uint8_t >  frame)
noexcept

Return the byte offset of the real EtherType in a raw Ethernet frame.

PROFINET devices commonly send RT and alarm frames 802.1Q priority-tagged (TPID 0x8100, VID 0). Depending on NIC/driver VLAN offload, the tag may or may not be stripped before reaching a raw socket, so receivers must skip any number of VLAN tags. Recognized TPIDs include 802.1Q (0x8100), 802.1ad (0x88A8), and legacy double-tagging (0x9100).

Parameters
frameA view over the raw Ethernet frame bytes, starting at the destination MAC address.
Returns
Byte offset of the real EtherType (12 for untagged frames, +4 for each present VLAN tag).

Definition at line 89 of file util.cpp.

Referenced by profinet::AlarmListener::HandleLayer2Frame(), and profinet::cyclic::CyclicController::ProcessInputFrame().

+ Here is the caller graph for this function:

◆ String2Ip() [1/2]

std::string profinet::String2Ip ( const std::uint8_t *  ipBytes,
std::size_t  len 
)

Format raw IPv4 address bytes as a dotted string.

Parameters
ipBytesPointer to at least 4 bytes.
lenNumber of bytes available at ip_bytes.
Returns
String in "a.b.c.d" form.

Throws InvalidIPError if fewer than 4 bytes are given.

Definition at line 225 of file util.cpp.

References String2Ip().

+ Here is the call graph for this function:

◆ String2Ip() [2/2]

std::string profinet::String2Ip ( std::span< const std::uint8_t >  ipBytes)

Format raw IPv4 address bytes as a dotted string.

Parameters
ipBytesView over a contiguous sequence of at least 4 bytes.
Returns
String in "a.b.c.d" form.

Throws InvalidIPError if fewer than 4 bytes are given.

Definition at line 214 of file util.cpp.

Referenced by profinet::dcp::DCPDeviceDescription::DCPDeviceDescription(), profinet::blocks::InterfaceInfo::GatewayStr(), profinet::blocks::InterfaceInfo::IpStr(), profinet::PNDCPBlockRequest::ParseIp(), profinet::PNDCPBlock::ParseIp(), String2Ip(), and profinet::blocks::InterfaceInfo::SubnetStr().

+ Here is the caller graph for this function:

◆ String2Mac()

MacAddress profinet::String2Mac ( const std::string &  macStr)

Parse a colon-separated MAC address string.

Parameters
macStrMAC address in "aa:bb:cc:dd:ee:ff" form.
Returns
The parsed 6-byte MAC address.

Throws InvalidMACError on malformed input.

Definition at line 130 of file util.cpp.

References macAddressLength.

Referenced by profinet::dcp::GetParam(), profinet::dcp::ResetToFactory(), profinet::dcp::SendDiscover(), profinet::dcp::SendHello(), profinet::dcp::SendRequest(), profinet::dcp::SetIp(), profinet::dcp::SetParam(), profinet::dcp::SignalDevice(), profinet::device::ProfinetDevice::StartAlarmListener(), and profinet::device::ProfinetDevice::StartCyclic().

+ Here is the caller graph for this function:

◆ ToHex() [1/2]

std::string profinet::ToHex ( const std::uint8_t *  data,
std::size_t  len 
)

Hex-encode a byte buffer.

Parameters
dataPointer to the first byte to encode.
lenNumber of bytes to encode.
Returns
Lowercase hex string, e.g. {0xDE, 0xAD} -> "dead".

Definition at line 112 of file util.cpp.

Referenced by profinet::dcp::DCPDHCPBlock::Parse(), ToHex(), profinet::dcp::DCPDeviceDescription::ToString(), and profinet::rpc::UuidBytesToString().

+ Here is the caller graph for this function:

◆ ToHex() [2/2]

std::string profinet::ToHex ( const std::vector< std::uint8_t > &  data)

Hex-encode a byte buffer.

Parameters
dataBytes to encode.
Returns
Lowercase hex string, e.g. {0xDE, 0xAD} -> "dead".

Definition at line 125 of file util.cpp.

References ToHex().

+ Here is the call graph for this function:

◆ ToVec()

std::vector< std::uint8_t > profinet::ToVec ( const std::string &  input)

Convert a string into a vector of raw bytes.

Parameters
inputThe input string containing the data to convert.
Returns
A std::vector containing the underlying bytes of the string.

Definition at line 73 of file util.cpp.

Referenced by profinet::dcp::BuildSetParamRequest(), and profinet::dcp::SendHello().

+ Here is the caller graph for this function:

◆ UsiNameOf()

std::string profinet::UsiNameOf ( const AlarmItemVariant item)

Get the human-readable USI name for any AlarmItemVariant alternative.

Parameters
itemThe alarm item to inspect.
Returns
The USI name (see GetUsiName()).

Definition at line 73 of file alarms.cpp.

◆ UsiOf()

Usi profinet::UsiOf ( const AlarmItemVariant item)

Get the USI shared by every AlarmItemVariant alternative.

Parameters
itemThe alarm item to inspect.
Returns
The item's User Structure Identifier.

Definition at line 67 of file alarms.cpp.

Variable Documentation

◆ ALARM_TRANSPORT_RTA_CLASS_UDP

constexpr std::uint8_t profinet::ALARM_TRANSPORT_RTA_CLASS_UDP = 0x01
inlineconstexpr

ALARM Cr Type ALARM.

ALARM Transport Rta Class UDP.

Definition at line 473 of file indices.h.

◆ ALARM_UDP_PORT

constexpr std::uint16_t profinet::ALARM_UDP_PORT = 34964
inlineconstexpr

UDP port used for alarm transport when Transport == 1.

Definition at line 44 of file alarmListener.h.

Referenced by profinet::AlarmListener::Start().

◆ AM_DATA

constexpr std::uint16_t profinet::AM_DATA = 0xFBF0
inlineconstexpr

AM Data.

Definition at line 864 of file indices.h.

◆ AM_DEVICE_ID

constexpr std::uint16_t profinet::AM_DEVICE_ID = 0xF8E0
inlineconstexpr

AM Device ID.

Definition at line 852 of file indices.h.

◆ AM_FULL_INFO

constexpr std::uint16_t profinet::AM_FULL_INFO = 0xF8E1
inlineconstexpr

AM Full Info.

Definition at line 854 of file indices.h.

◆ AM_FW_ONLY

constexpr std::uint16_t profinet::AM_FW_ONLY = 0xF8E3
inlineconstexpr

AM FW Only.

Definition at line 858 of file indices.h.

◆ AM_HW_ONLY

constexpr std::uint16_t profinet::AM_HW_ONLY = 0xF8E2
inlineconstexpr

AM HW Only.

Definition at line 856 of file indices.h.

◆ AM_LOCATION_SLOT

constexpr std::uint16_t profinet::AM_LOCATION_SLOT = 0xFBE0
inlineconstexpr

AM Location Slot.

Definition at line 860 of file indices.h.

◆ AM_LOCATION_TREE

constexpr std::uint16_t profinet::AM_LOCATION_TREE = 0xFBE1
inlineconstexpr

AM Location Tree.

Definition at line 862 of file indices.h.

◆ API_DATA

constexpr std::uint16_t profinet::API_DATA = 0xF821
inlineconstexpr

API Data.

Definition at line 734 of file indices.h.

Referenced by DeviceIndices().

◆ AR_DATA

constexpr std::uint16_t profinet::AR_DATA = 0xF820
inlineconstexpr

AR Data.

Definition at line 732 of file indices.h.

Referenced by CriticalIndices(), and DeviceIndices().

◆ AR_FSU_DATA_ADJUST

constexpr std::uint16_t profinet::AR_FSU_DATA_ADJUST = 0xE050
inlineconstexpr

AR FSU Data Adjust.

Definition at line 901 of file indices.h.

◆ AR_TYPE_IOCAR_SINGLE

constexpr std::uint16_t profinet::AR_TYPE_IOCAR_SINGLE = 0x0001
inlineconstexpr

AR Type Iocar Single.

Definition at line 476 of file indices.h.

◆ AR_TYPE_IOCARSR

constexpr std::uint16_t profinet::AR_TYPE_IOCARSR = 0x0020
inlineconstexpr

AR Type Iocarsr.

Definition at line 480 of file indices.h.

◆ AR_TYPE_IOSAR

constexpr std::uint16_t profinet::AR_TYPE_IOSAR = 0x0006
inlineconstexpr

AR Type Iosar.

Definition at line 478 of file indices.h.

◆ AUTO_CONFIG

constexpr std::uint16_t profinet::AUTO_CONFIG = 0xF850
inlineconstexpr

Auto Config.

Definition at line 742 of file indices.h.

Referenced by DeviceIndices().

◆ BitsPerOctet

constexpr int profinet::BitsPerOctet = 8
staticconstexpr

Definition at line 47 of file util.h.

◆ blockHeaderLenght

◆ DIAG_ALL_API

constexpr std::uint16_t profinet::DIAG_ALL_API = 0xF00B
inlineconstexpr

DIAG All API.

Definition at line 688 of file indices.h.

Referenced by DiagnosisIndices().

◆ DIAG_ALL_AR

constexpr std::uint16_t profinet::DIAG_ALL_AR = 0xE00B
inlineconstexpr

DIAG All AR.

Definition at line 681 of file indices.h.

Referenced by DiagnosisIndices().

◆ DIAG_ALL_SLOT

constexpr std::uint16_t profinet::DIAG_ALL_SLOT = 0xC00B
inlineconstexpr

DIAG All Slot.

Definition at line 674 of file indices.h.

Referenced by DiagnosisIndices().

◆ DIAG_ALL_SUBSLOT

constexpr std::uint16_t profinet::DIAG_ALL_SUBSLOT = 0x800B
inlineconstexpr

DIAG All Subslot.

Definition at line 667 of file indices.h.

Referenced by DiagnosisIndices().

◆ DIAG_CHANNEL_API

constexpr std::uint16_t profinet::DIAG_CHANNEL_API = 0xF00A
inlineconstexpr

DIAG Channel API.

Definition at line 686 of file indices.h.

Referenced by DiagnosisIndices().

◆ DIAG_CHANNEL_AR

constexpr std::uint16_t profinet::DIAG_CHANNEL_AR = 0xE00A
inlineconstexpr

DIAG Channel AR.

Definition at line 679 of file indices.h.

Referenced by DiagnosisIndices().

◆ DIAG_CHANNEL_SLOT

constexpr std::uint16_t profinet::DIAG_CHANNEL_SLOT = 0xC00A
inlineconstexpr

DIAG Channel Slot.

Definition at line 672 of file indices.h.

Referenced by DiagnosisIndices().

◆ DIAG_CHANNEL_SUBSLOT

constexpr std::uint16_t profinet::DIAG_CHANNEL_SUBSLOT = 0x800A
inlineconstexpr

DIAG Channel Subslot.

Definition at line 665 of file indices.h.

Referenced by DiagnosisIndices().

◆ DIAG_DEVICE

constexpr std::uint16_t profinet::DIAG_DEVICE = 0xF80C
inlineconstexpr

DIAG Device.

Definition at line 693 of file indices.h.

Referenced by CriticalIndices(), and DiagnosisIndices().

◆ DIAG_MAINTENANCE_API

constexpr std::uint16_t profinet::DIAG_MAINTENANCE_API = 0xF00C
inlineconstexpr

DIAG Maintenance API.

Definition at line 690 of file indices.h.

Referenced by DiagnosisIndices().

◆ DIAG_MAINTENANCE_AR

constexpr std::uint16_t profinet::DIAG_MAINTENANCE_AR = 0xE00C
inlineconstexpr

DIAG Maintenance AR.

Definition at line 683 of file indices.h.

Referenced by DiagnosisIndices().

◆ DIAG_MAINTENANCE_SLOT

constexpr std::uint16_t profinet::DIAG_MAINTENANCE_SLOT = 0xC00C
inlineconstexpr

DIAG Maintenance Slot.

Definition at line 676 of file indices.h.

Referenced by DiagnosisIndices().

◆ DIAG_MAINTENANCE_SUBSLOT

constexpr std::uint16_t profinet::DIAG_MAINTENANCE_SUBSLOT = 0x800C
inlineconstexpr

DIAG Maintenance Subslot.

Definition at line 669 of file indices.h.

Referenced by DiagnosisIndices().

◆ ETH_P_ALL

constexpr int profinet::ETH_P_ALL = 0x0003
inlineconstexpr

Linux AF_PACKET protocol value matching every EtherType.

Definition at line 38 of file util.h.

Referenced by profinet::EthernetSocket::EthernetSocket().

◆ ETHERTYPE_PROFINET

constexpr std::uint16_t profinet::ETHERTYPE_PROFINET = 0x8892
inlineconstexpr

EtherType used by PROFINET RTA frames (0x8892).

Definition at line 42 of file alarmListener.h.

Referenced by profinet::AlarmListener::HandleLayer2Frame(), profinet::AlarmListener::SendLayer2Ack(), and profinet::AlarmListener::Start().

◆ EXPECTED_ID_AR

constexpr std::uint16_t profinet::EXPECTED_ID_AR = 0xE000
inlineconstexpr

Expected ID AR.

Definition at line 722 of file indices.h.

◆ EXPECTED_ID_SUBSLOT

constexpr std::uint16_t profinet::EXPECTED_ID_SUBSLOT = 0x8000
inlineconstexpr

Expected ID Subslot.

Definition at line 717 of file indices.h.

Referenced by AllStandardIndices(), and profinet::rpc::RPCCon::EnumerateIndices().

◆ F_PARAMETER_BLOCK

constexpr std::uint16_t profinet::F_PARAMETER_BLOCK = 0x0100
inlineconstexpr

F Parameter Block.

Definition at line 873 of file indices.h.

◆ F_PARAMETER_READ

constexpr std::uint16_t profinet::F_PARAMETER_READ = 0xE001
inlineconstexpr

F Parameter Read.

Definition at line 881 of file indices.h.

◆ F_PARAMETER_WRITE

constexpr std::uint16_t profinet::F_PARAMETER_WRITE = 0xE000
inlineconstexpr

F Parameter Write.

Definition at line 879 of file indices.h.

◆ F_PRM_FLAG1

constexpr std::uint16_t profinet::F_PRM_FLAG1 = 0x0101
inlineconstexpr

F Prm Flag1.

Definition at line 875 of file indices.h.

◆ F_PRM_FLAG2

constexpr std::uint16_t profinet::F_PRM_FLAG2 = 0x0102
inlineconstexpr

F Prm Flag2.

Definition at line 877 of file indices.h.

◆ FRAME_ID_ALARM_HIGH

constexpr std::uint16_t profinet::FRAME_ID_ALARM_HIGH = 0xFC01
inlineconstexpr

Frame ID used for high-priority alarms.

Definition at line 38 of file alarmListener.h.

Referenced by profinet::AlarmListener::HandleLayer2Frame(), and profinet::AlarmListener::SendLayer2Ack().

◆ FRAME_ID_ALARM_LOW

constexpr std::uint16_t profinet::FRAME_ID_ALARM_LOW = 0xFE01
inlineconstexpr

Frame ID used for low-priority alarms.

Definition at line 40 of file alarmListener.h.

Referenced by profinet::AlarmListener::HandleLayer2Frame(), and profinet::AlarmListener::SendLayer2Ack().

◆ IM0

constexpr std::uint16_t profinet::IM0 = 0xAFF0
inlineconstexpr

I&M0.

Definition at line 624 of file indices.h.

Referenced by CriticalIndices(), and ImIndices().

◆ IM0_FILTER_DATA

constexpr std::uint16_t profinet::IM0_FILTER_DATA = 0xF840
inlineconstexpr

I&M0 Filter Data.

Definition at line 656 of file indices.h.

Referenced by CriticalIndices().

◆ IM1

constexpr std::uint16_t profinet::IM1 = 0xAFF1
inlineconstexpr

I&M1.

Definition at line 626 of file indices.h.

Referenced by ImIndices(), and profinet::device::ProfinetDevice::WriteIm1().

◆ IM10

constexpr std::uint16_t profinet::IM10 = 0xAFFA
inlineconstexpr

I&M10.

Definition at line 644 of file indices.h.

Referenced by ImIndices().

◆ IM11

constexpr std::uint16_t profinet::IM11 = 0xAFFB
inlineconstexpr

I&M11.

Definition at line 646 of file indices.h.

Referenced by ImIndices().

◆ IM12

constexpr std::uint16_t profinet::IM12 = 0xAFFC
inlineconstexpr

I&M12.

Definition at line 648 of file indices.h.

Referenced by ImIndices().

◆ IM13

constexpr std::uint16_t profinet::IM13 = 0xAFFD
inlineconstexpr

I&M13.

Definition at line 650 of file indices.h.

Referenced by ImIndices().

◆ IM14

constexpr std::uint16_t profinet::IM14 = 0xAFFE
inlineconstexpr

I&M14.

Definition at line 652 of file indices.h.

Referenced by ImIndices().

◆ IM15

constexpr std::uint16_t profinet::IM15 = 0xAFFF
inlineconstexpr

I&M15.

Definition at line 654 of file indices.h.

Referenced by ImIndices().

◆ IM2

constexpr std::uint16_t profinet::IM2 = 0xAFF2
inlineconstexpr

I&M2.

Definition at line 628 of file indices.h.

Referenced by ImIndices(), and profinet::device::ProfinetDevice::WriteIm2().

◆ IM3

constexpr std::uint16_t profinet::IM3 = 0xAFF3
inlineconstexpr

I&M3.

Definition at line 630 of file indices.h.

Referenced by ImIndices(), and profinet::device::ProfinetDevice::WriteIm3().

◆ IM4

constexpr std::uint16_t profinet::IM4 = 0xAFF4
inlineconstexpr

I&M4.

Definition at line 632 of file indices.h.

Referenced by ImIndices().

◆ IM5

constexpr std::uint16_t profinet::IM5 = 0xAFF5
inlineconstexpr

I&M5.

Definition at line 634 of file indices.h.

Referenced by ImIndices().

◆ IM6

constexpr std::uint16_t profinet::IM6 = 0xAFF6
inlineconstexpr

I&M6.

Definition at line 636 of file indices.h.

Referenced by ImIndices().

◆ IM7

constexpr std::uint16_t profinet::IM7 = 0xAFF7
inlineconstexpr

I&M7.

Definition at line 638 of file indices.h.

Referenced by ImIndices().

◆ IM8

constexpr std::uint16_t profinet::IM8 = 0xAFF8
inlineconstexpr

I&M8.

Definition at line 640 of file indices.h.

Referenced by ImIndices().

◆ IM9

constexpr std::uint16_t profinet::IM9 = 0xAFF9
inlineconstexpr

I&M9.

Definition at line 642 of file indices.h.

Referenced by ImIndices().

◆ IP_ETHERTYPE

constexpr std::uint16_t profinet::IP_ETHERTYPE = 0x8000
inlineconstexpr

EtherType value identifying IP frames (0x8000).

Definition at line 34 of file util.h.

Referenced by profinet::rpc::RPCCon::BuildAlarmCrBlock().

◆ ISOCHRONOUS_MODE_DATA

constexpr std::uint16_t profinet::ISOCHRONOUS_MODE_DATA = 0x8030
inlineconstexpr

Isochronous Mode Data.

Definition at line 828 of file indices.h.

◆ kPnUuidSuffix

constexpr std::array<std::uint8_t, 12> profinet::kPnUuidSuffix
inlineconstexpr
Initial value:
= {
0x6C, 0x97, 0x11, 0xD1, 0x82, 0x71, 0x00, 0xA0, 0x24, 0x42, 0xDF, 0x7D}

PROFINET UUID suffix, shared by all interface/object UUIDs.

Definition at line 460 of file protocol.h.

Referenced by profinet::PNRPCHeader::PrefixedUuid().

◆ LOG_DATA

constexpr std::uint16_t profinet::LOG_DATA = 0xF830
inlineconstexpr

Log Data.

Definition at line 744 of file indices.h.

Referenced by CriticalIndices(), and DeviceIndices().

◆ LowByteMask

constexpr std::uint8_t profinet::LowByteMask = 0xFF
staticconstexpr

◆ macAddressLength

constexpr int profinet::macAddressLength = 6
inlineconstexpr

◆ MAINT_DEMANDED_ALL_SUBSLOT

constexpr std::uint16_t profinet::MAINT_DEMANDED_ALL_SUBSLOT = 0x8013
inlineconstexpr

MAINT Demanded All Subslot.

Definition at line 708 of file indices.h.

◆ MAINT_DEMANDED_CHANNEL_SUBSLOT

constexpr std::uint16_t profinet::MAINT_DEMANDED_CHANNEL_SUBSLOT = 0x8011
inlineconstexpr

MAINT Demanded Channel Subslot.

Definition at line 704 of file indices.h.

◆ MAINT_REQUIRED_ALL_SUBSLOT

constexpr std::uint16_t profinet::MAINT_REQUIRED_ALL_SUBSLOT = 0x8012
inlineconstexpr

MAINT Required All Subslot.

Definition at line 706 of file indices.h.

◆ MAINT_REQUIRED_CHANNEL_SUBSLOT

constexpr std::uint16_t profinet::MAINT_REQUIRED_CHANNEL_SUBSLOT = 0x8010
inlineconstexpr

MAINT Required Channel Subslot.

Definition at line 702 of file indices.h.

◆ MAX_ETHERNET_FRAME

constexpr std::size_t profinet::MAX_ETHERNET_FRAME = 1522
inlineconstexpr

Maximum PROFINET Ethernet frame size in bytes (including VLAN tag headroom).

Definition at line 30 of file util.h.

Referenced by profinet::EthernetSocket::Recv().

◆ MODULE_DIFF_BLOCK

constexpr std::uint16_t profinet::MODULE_DIFF_BLOCK = 0xE002
inlineconstexpr

◆ MODULE_STATE_NO_MODULE

constexpr std::uint16_t profinet::MODULE_STATE_NO_MODULE = 0x0000
inlineconstexpr

Module State No Module.

Definition at line 564 of file indices.h.

Referenced by GetModuleStateName().

◆ MODULE_STATE_PROPER_MODULE

constexpr std::uint16_t profinet::MODULE_STATE_PROPER_MODULE = 0x0002
inlineconstexpr

Module State Proper Module.

Definition at line 568 of file indices.h.

Referenced by GetModuleStateName(), and profinet::blocks::ModuleDiffModule::IsProper().

◆ MODULE_STATE_SUBSTITUTE_MODULE

constexpr std::uint16_t profinet::MODULE_STATE_SUBSTITUTE_MODULE = 0x0003
inlineconstexpr

Module State Substitute Module.

Definition at line 570 of file indices.h.

Referenced by GetModuleStateName().

◆ MODULE_STATE_WRONG_MODULE

constexpr std::uint16_t profinet::MODULE_STATE_WRONG_MODULE = 0x0001
inlineconstexpr

Module State Wrong Module.

Definition at line 566 of file indices.h.

Referenced by GetModuleStateName().

◆ OneOctetShift

◆ PD_EXPECTED_DATA

constexpr std::uint16_t profinet::PD_EXPECTED_DATA = 0xF842
inlineconstexpr

PD Expected Data.

Definition at line 740 of file indices.h.

Referenced by DeviceIndices().

◆ PD_INTERFACE_ADJUST

constexpr std::uint16_t profinet::PD_INTERFACE_ADJUST = 0x8071
inlineconstexpr

PD Interface Adjust.

Definition at line 774 of file indices.h.

◆ PD_INTERFACE_DATA_REAL

constexpr std::uint16_t profinet::PD_INTERFACE_DATA_REAL = 0x8080
inlineconstexpr

PD Interface Data Real.

Definition at line 776 of file indices.h.

Referenced by InterfaceIndices().

◆ PD_INTERFACE_FSU_ADJUST

constexpr std::uint16_t profinet::PD_INTERFACE_FSU_ADJUST = 0x8090
inlineconstexpr

PD Interface FSU Adjust.

Definition at line 778 of file indices.h.

◆ PD_INTERFACE_MRP_DATA_ADJUST

constexpr std::uint16_t profinet::PD_INTERFACE_MRP_DATA_ADJUST = 0x8052
inlineconstexpr

PD Interface MRP Data Adjust.

Definition at line 806 of file indices.h.

◆ PD_INTERFACE_MRP_DATA_CHECK

constexpr std::uint16_t profinet::PD_INTERFACE_MRP_DATA_CHECK = 0x8051
inlineconstexpr

PD Interface MRP Data Check.

Definition at line 804 of file indices.h.

◆ PD_INTERFACE_MRP_DATA_REAL

constexpr std::uint16_t profinet::PD_INTERFACE_MRP_DATA_REAL = 0x8050
inlineconstexpr

PD Interface MRP Data Real.

Definition at line 802 of file indices.h.

Referenced by InterfaceIndices().

◆ PD_IR_DATA

constexpr std::uint16_t profinet::PD_IR_DATA = 0x802C
inlineconstexpr

PD IR Data.

Definition at line 757 of file indices.h.

◆ PD_IR_SUBFRAME_DATA

constexpr std::uint16_t profinet::PD_IR_SUBFRAME_DATA = 0x8020
inlineconstexpr

PD IR Subframe Data.

Definition at line 826 of file indices.h.

◆ PD_NC_DATA_CHECK

constexpr std::uint16_t profinet::PD_NC_DATA_CHECK = 0x8070
inlineconstexpr

PD NC Data Check.

Definition at line 772 of file indices.h.

Referenced by InterfaceIndices().

◆ PD_PORT_DATA_ADJUST

constexpr std::uint16_t profinet::PD_PORT_DATA_ADJUST = 0x802F
inlineconstexpr

PD Port Data Adjust.

Definition at line 761 of file indices.h.

Referenced by PortIndices().

◆ PD_PORT_DATA_CHECK

constexpr std::uint16_t profinet::PD_PORT_DATA_CHECK = 0x802B
inlineconstexpr

PD Port Data Check.

Definition at line 755 of file indices.h.

Referenced by PortIndices().

◆ PD_PORT_DATA_REAL

constexpr std::uint16_t profinet::PD_PORT_DATA_REAL = 0x802A
inlineconstexpr

PD Port Data Real.

Definition at line 753 of file indices.h.

Referenced by PortIndices().

◆ PD_PORT_FO_DATA_ADJUST

constexpr std::uint16_t profinet::PD_PORT_FO_DATA_ADJUST = 0x8062
inlineconstexpr

PD Port FO Data Adjust.

Definition at line 791 of file indices.h.

◆ PD_PORT_FO_DATA_CHECK

constexpr std::uint16_t profinet::PD_PORT_FO_DATA_CHECK = 0x8061
inlineconstexpr

PD Port FO Data Check.

Definition at line 789 of file indices.h.

◆ PD_PORT_FO_DATA_REAL

constexpr std::uint16_t profinet::PD_PORT_FO_DATA_REAL = 0x8060
inlineconstexpr

PD Port FO Data Real.

Definition at line 787 of file indices.h.

◆ PD_PORT_MRP_DATA_ADJUST

constexpr std::uint16_t profinet::PD_PORT_MRP_DATA_ADJUST = 0x8053
inlineconstexpr

PD Port MRP Data Adjust.

Definition at line 809 of file indices.h.

◆ PD_PORT_MRP_DATA_REAL

constexpr std::uint16_t profinet::PD_PORT_MRP_DATA_REAL = 0x8054
inlineconstexpr

PD Port MRP Data Real.

Definition at line 811 of file indices.h.

Referenced by PortIndices().

◆ PD_PORT_MRP_IC_DATA_ADJUST

constexpr std::uint16_t profinet::PD_PORT_MRP_IC_DATA_ADJUST = 0x8055
inlineconstexpr

PD Port MRP IC Data Adjust.

Definition at line 813 of file indices.h.

◆ PD_PORT_MRP_IC_DATA_CHECK

constexpr std::uint16_t profinet::PD_PORT_MRP_IC_DATA_CHECK = 0x8056
inlineconstexpr

PD Port MRP IC Data Check.

Definition at line 815 of file indices.h.

◆ PD_PORT_MRP_IC_DATA_REAL

constexpr std::uint16_t profinet::PD_PORT_MRP_IC_DATA_REAL = 0x8057
inlineconstexpr

PD Port MRP IC Data Real.

Definition at line 817 of file indices.h.

◆ PD_PORT_SFP_DATA_CHECK

constexpr std::uint16_t profinet::PD_PORT_SFP_DATA_CHECK = 0x8063
inlineconstexpr

PD Port SFP Data Check.

Definition at line 793 of file indices.h.

◆ PD_PORT_STATISTIC

constexpr std::uint16_t profinet::PD_PORT_STATISTIC = 0x8072
inlineconstexpr

PD Port Statistic.

Definition at line 763 of file indices.h.

Referenced by PortIndices().

◆ PD_REAL_DATA

constexpr std::uint16_t profinet::PD_REAL_DATA = 0xF841
inlineconstexpr

PD Real Data.

Definition at line 738 of file indices.h.

Referenced by CriticalIndices(), DeviceIndices(), and profinet::rpc::RPCCon::ReadPdRealData().

◆ PD_SYNC_DATA

constexpr std::uint16_t profinet::PD_SYNC_DATA = 0x802D
inlineconstexpr

PD Sync Data.

Definition at line 759 of file indices.h.

◆ PD_TIME_DATA

constexpr std::uint16_t profinet::PD_TIME_DATA = 0x8031
inlineconstexpr

PD Time Data.

Definition at line 830 of file indices.h.

◆ PDEV_DATA

constexpr std::uint16_t profinet::PDEV_DATA = 0xF831
inlineconstexpr

Pdev Data.

Definition at line 736 of file indices.h.

Referenced by DeviceIndices().

◆ PE_MODE_ENERGY_SAVING_MAX

constexpr std::uint8_t profinet::PE_MODE_ENERGY_SAVING_MAX = 0x1F
inlineconstexpr

PE Mode Energy Saving Max.

Definition at line 604 of file indices.h.

Referenced by GetPeModeName().

◆ PE_MODE_ENERGY_SAVING_MIN

constexpr std::uint8_t profinet::PE_MODE_ENERGY_SAVING_MIN = 0x01
inlineconstexpr

PE Mode Energy Saving Min.

Definition at line 602 of file indices.h.

Referenced by GetPeModeName().

◆ PE_MODE_OPERATE

constexpr std::uint8_t profinet::PE_MODE_OPERATE = 0xF0
inlineconstexpr

PE Mode Operate.

Definition at line 606 of file indices.h.

Referenced by GetPeModeName().

◆ PE_MODE_POWER_OFF

constexpr std::uint8_t profinet::PE_MODE_POWER_OFF = 0x00
inlineconstexpr

PE Mode Power Off.

Definition at line 600 of file indices.h.

Referenced by GetPeModeName().

◆ PE_MODE_READY_TO_OPERATE

constexpr std::uint8_t profinet::PE_MODE_READY_TO_OPERATE = 0xFF
inlineconstexpr

PE Mode Ready To Operate.

Definition at line 610 of file indices.h.

Referenced by GetPeModeName().

◆ PE_MODE_SLEEP_MODE_WOL

constexpr std::uint8_t profinet::PE_MODE_SLEEP_MODE_WOL = 0xFE
inlineconstexpr

PE Mode Sleep Mode WOL.

Definition at line 608 of file indices.h.

Referenced by GetPeModeName().

◆ PROFIENERGY

constexpr std::uint16_t profinet::PROFIENERGY = 0x80A0
inlineconstexpr

Profienergy.

Definition at line 890 of file indices.h.

◆ PROFINET_ETHERTYPE

constexpr std::uint16_t profinet::PROFINET_ETHERTYPE = 0x8892
inlineconstexpr

◆ REAL_ID_API

constexpr std::uint16_t profinet::REAL_ID_API = 0xF000
inlineconstexpr

Real ID API.

Definition at line 729 of file indices.h.

Referenced by profinet::rpc::RPCCon::ReadRealIdentificationData().

◆ REAL_ID_AR

constexpr std::uint16_t profinet::REAL_ID_AR = 0xE001
inlineconstexpr

Real ID AR.

Definition at line 724 of file indices.h.

◆ REAL_ID_SUBSLOT

constexpr std::uint16_t profinet::REAL_ID_SUBSLOT = 0x8001
inlineconstexpr

Real ID Subslot.

Definition at line 719 of file indices.h.

Referenced by AllStandardIndices(), and profinet::rpc::RPCCon::EnumerateIndices().

◆ RECEIVE_BUFFER_LENGTH

constexpr std::size_t profinet::RECEIVE_BUFFER_LENGTH = 4096
inlineconstexpr

◆ RECORD_INPUT_DATA

constexpr std::uint16_t profinet::RECORD_INPUT_DATA = 0x8028
inlineconstexpr

Record Input Data.

Definition at line 841 of file indices.h.

Referenced by AllStandardIndices(), and profinet::rpc::RPCCon::EnumerateIndices().

◆ RECORD_OUTPUT_DATA

constexpr std::uint16_t profinet::RECORD_OUTPUT_DATA = 0x8029
inlineconstexpr

Record Output Data.

Definition at line 843 of file indices.h.

Referenced by AllStandardIndices(), and profinet::rpc::RPCCon::EnumerateIndices().

◆ SUBMODULE_STATE_APPLICATION_READY_PENDING

constexpr std::uint16_t profinet::SUBMODULE_STATE_APPLICATION_READY_PENDING = 0x0004
inlineconstexpr

Submodule State Application Ready Pending.

Definition at line 579 of file indices.h.

Referenced by GetSubmoduleStateName().

◆ SUBMODULE_STATE_LOCKED_BY_SUPERVISOR

constexpr std::uint16_t profinet::SUBMODULE_STATE_LOCKED_BY_SUPERVISOR = 0x0002
inlineconstexpr

Submodule State Locked By Supervisor.

Definition at line 577 of file indices.h.

Referenced by GetSubmoduleStateName().

◆ SUBMODULE_STATE_NO_SUBMODULE

constexpr std::uint16_t profinet::SUBMODULE_STATE_NO_SUBMODULE = 0x0000
inlineconstexpr

Submodule State No Submodule.

Definition at line 573 of file indices.h.

Referenced by GetSubmoduleStateName().

◆ SUBMODULE_STATE_OK

constexpr std::uint16_t profinet::SUBMODULE_STATE_OK = 0x0007
inlineconstexpr

Submodule State Ok.

Definition at line 581 of file indices.h.

Referenced by GetSubmoduleStateName(), and profinet::blocks::ModuleDiffSubmodule::IsOk().

◆ SUBMODULE_STATE_WRONG_SUBMODULE

constexpr std::uint16_t profinet::SUBMODULE_STATE_WRONG_SUBMODULE = 0x0001
inlineconstexpr

Submodule State Wrong Submodule.

Definition at line 575 of file indices.h.

Referenced by GetSubmoduleStateName().

◆ SUBSLOT_DAP

constexpr std::uint16_t profinet::SUBSLOT_DAP = 0x0001
inlineconstexpr

Subslot DAP.

Definition at line 910 of file indices.h.

◆ SUBSLOT_INTERFACE

constexpr std::uint16_t profinet::SUBSLOT_INTERFACE = 0x8000
inlineconstexpr

Subslot Interface.

Definition at line 912 of file indices.h.

◆ SUBSLOT_PORT1

constexpr std::uint16_t profinet::SUBSLOT_PORT1 = 0x8001
inlineconstexpr

Subslot Port1.

Definition at line 914 of file indices.h.

◆ SUBSLOT_PORT2

constexpr std::uint16_t profinet::SUBSLOT_PORT2 = 0x8002
inlineconstexpr

Subslot Port2.

Definition at line 916 of file indices.h.

◆ SUBSTITUTE_VALUES

constexpr std::uint16_t profinet::SUBSTITUTE_VALUES = 0x801E
inlineconstexpr

Substitute Values.

Definition at line 839 of file indices.h.

Referenced by AllStandardIndices().

◆ ThreeOctetsShift

◆ TwoOctetsShift

◆ uuidLenght

◆ VLAN_ETHERTYPE

constexpr std::uint16_t profinet::VLAN_ETHERTYPE = 0x8100
inlineconstexpr

EtherType value identifying an 802.1Q VLAN tag (0x8100).

Definition at line 36 of file util.h.

Referenced by profinet::dcp::ParseSetResponse(), profinet::dcp::ReadResponse(), profinet::dcp::ReceiveHello(), and profinet::dcp::RecvSetResponse().

◆ WRITE_MULTIPLE

constexpr std::uint16_t profinet::WRITE_MULTIPLE = 0xE040
inlineconstexpr

Write Multiple.

Definition at line 899 of file indices.h.