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  CyclicCaptureTests
 
namespace  dcp
 
namespace  detail
 
namespace  device
 
namespace  diagnosis
 
namespace  gsdml
 
namespace  io
 
namespace  rpc
 
namespace  rt
 
namespace  sim
 
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...
 
class  AlarmListenerCallbackTest
 Test fixture for AlarmListener callback behavior. More...
 
class  AlarmListenerRtaIntegrationTest
 Test fixture for multi-frame RTA alarm exchanges. More...
 
class  AlarmListenerRtaTest
 Test fixture for Layer 2 RTA alarm handling. More...
 
class  AlarmListenerTestAccess
 Narrow private-access adapter used only by AlarmListener tests. More...
 
class  AlarmListenerTests
 
class  AlarmListenerUdpTest
 Test fixture for UDP AlarmListener behavior. More...
 
struct  AlarmNotification
 Complete parsed AlarmNotification PDU: header fields + parsed items. More...
 
class  AsioEthernetSocket
 Platform-independent raw Ethernet transport using Asio. More...
 
class  AsioIoContextRunner
 Keeps an Asio I/O context running on a dedicated worker thread. More...
 
struct  DcpBlockKey
 Identifies a PROFINET DCP block by option and suboption. 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  EthernetPacketBackendTestFixture
 Shared fixture for EthernetPacketBackend tests. More...
 
struct  EthernetVLANHeader
 802.1Q VLAN-tagged Ethernet II frame header. More...
 
class  IAlarmListener
 Abstract interface for receiving PROFINET alarm notifications. More...
 
class  IAsioIoContextRunner
 Abstract interface for keeping an Asio I/O context running. More...
 
class  IMacAddressProvider
 Provides the MAC address of a network interface. More...
 
class  IndicesTest
 
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...
 
class  IUdpSocket
 Abstract interface for IPv4 UDP datagram transport. More...
 
class  MacAddressProvider
 Production implementation of IMacAddressProvider. More...
 
struct  MaintenanceItem
 Maintenance alarm item (USI 0x8100). More...
 
class  MaxTimeout
 Time-limited-operation helper. More...
 
class  MockAlarmListener
 Google Mock implementation of IAlarmListener. 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...
 
class  PNIOErrorDirectTests
 
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...
 
struct  RtaError
 Decoded PROFINET RTA ERR-PDU. More...
 
struct  RtaErrorReasonTestCase
 One complete RTA ErrorCode2 test case. More...
 
class  RtaErrorsTests
 
class  RtaErrorTests
 Tests for PROFINET RTA ERR-PDU decoding. More...
 
class  SocketError
 Socket operation error. More...
 
class  StubRpcTransport
 
struct  UdpDatagram
 A UDP datagram together with the IPv4 address of its sender. More...
 
struct  UdpEndpoint
 Portable IPv4 UDP endpoint. More...
 
class  UdpSocket
 RAII wrapper around a portable IPv4 UDP socket. 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  AlarmNotificationBitmask : std::uint16_t {
  None = 0x0000 , AlarmSequenceNumber = 0x07FF , ManufacturerSpecific = 0x1000 , SubmoduleDiagnosisState = 0x2000 ,
  ArDiagnosisState = 0x4000 , ChannelDiagnosis = 0x0800
}
 Represents bitwise flags and bitmasks for alarm notification headers. More...
 
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 {
  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 {
  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 {
  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 {
  NoIdentifier = 0x0000 , 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...
 
enum class  DcpFrameId : std::uint16_t {
  Unknown = 0x0000 , IdentifyRequest = 0xFEFE , IdentifyResponse = 0xFEFF , GetSet = 0xFEFD ,
  Hello = 0xFEFC
}
 PROFINET DCP frame identifiers. More...
 
enum class  DcpServiceId : std::uint8_t {
  Unknown = 0x00 , Get = 0x03 , Set = 0x04 , Identify = 0x05 ,
  Hello = 0x06
}
 DCP service identifiers. More...
 
enum class  DcpServiceType : std::uint8_t { Request = 0x00 , ResponseSuccess = 0x01 , ResponseUnsupported = 0x05 }
 DCP service types. More...
 
enum class  DcpOption : std::uint8_t {
  Unknown = 0x00 , Ip = 0x01 , Device = 0x02 , Dhcp = 0x03 ,
  Reserved = 0x04 , Control = 0x05 , DeviceInitiative = 0x06 , Nme = 0x07 ,
  All = 0xFF
}
 DCP options. More...
 
enum class  DcpIpSuboption : std::uint8_t { Unknown = 0x00 , Mac = 0x01 , IpParameter = 0x02 , FullIpSuite = 0x03 }
 DCP IP suboptions. More...
 
enum class  DcpDeviceSuboption : std::uint8_t {
  Unknown = 0x00 , Type = 0x01 , Name = 0x02 , DeviceId = 0x03 ,
  Role = 0x04 , Options = 0x05 , Alias = 0x06 , Instance = 0x07 ,
  OemId = 0x08 , Rsi = 0x0A
}
 DCP Device suboptions. More...
 
enum class  DcpControlSuboption : std::uint8_t {
  Unknown = 0x00 , Start = 0x01 , Stop = 0x02 , Signal = 0x03 ,
  Response = 0x04 , FactoryReset = 0x05 , ResetToFactory = 0x06
}
 DCP Control suboptions. More...
 
enum class  DcpDhcpSuboption : std::uint8_t {
  Unknown = 0x00 , Hostname = 0x0C , VendorSpec = 0x2B , ServerId = 0x36 ,
  ParamReq = 0x37 , ClassId = 0x3C , ClientId = 0x3D , Fqdn = 0x51 ,
  Uuid = 0x61 , Control = 0xFF
}
 DCP DHCP suboptions. More...
 
enum class  DcpDeviceInitiativeSuboption : std::uint8_t { Initiative = 0x01 }
 DCP DeviceInitiative suboptions. More...
 
enum class  DcpDeviceRole : std::uint8_t { IoDevice = 0x01 , IoController = 0x02 , IoMultidevice = 0x04 , PnSupervisor = 0x08 }
 Device role bitmask. More...
 
enum class  DcpResetMode : std::uint16_t {
  Communication = 0x0002 , Application = 0x0004 , Engineering = 0x0008 , AllData = 0x0010 ,
  Device = 0x0020 , Factory = 0x0040
}
 Reset mode bitmask. More...
 
enum class  DcpDeviceInitiative : std::uint16_t { NoHello = 0x0000 , IssueHello = 0x0001 }
 DCP device-initiative values. More...
 
enum class  DcpBlockError : std::uint8_t {
  Ok = 0x00 , OptionUnsupported = 0x01 , SuboptionUnsupported = 0x02 , SuboptionNotSet = 0x03 ,
  Resource = 0x04 , SetNotPossible = 0x05 , InOperation = 0x06
}
 DCP block-level SET response errors. More...
 
enum class  DcpResponseCode : std::uint8_t {
  NoError = 0x00 , OptionNotSupported = 0x01 , SuboptionNotSupported = 0x02 , SuboptionNotSet = 0x03 ,
  ResourceError = 0x04 , SetNotPossible = 0x05 , InOperationSetNotPossible = 0x06
}
 DCP GET/SET response codes. More...
 
enum class  DcpResetQualifier : std::uint16_t {
  Unknown = 0x0000 , ApplicationData = 0x0002 , ApplicationDataAlternate = 0x0003 , CommunicationParameter = 0x0004 ,
  CommunicationParameterAlternate = 0x0005 , EngineeringParameter = 0x0006 , EngineeringParameterAlternate = 0x0007 , AllStoredData = 0x0008 ,
  AllStoredDataAlternate = 0x0009 , EngineeringParameterExtended = 0x000A , EngineeringParameterExtendedAlternate = 0x000B , ToFactory = 0x0010 ,
  ToFactoryAlternate = 0x0011 , Restore = 0x0012 , RestoreAlternate = 0x0013
}
 Reset qualifier values for ResetToFactory(). More...
 
enum class  DcpBlockQualifier : std::uint16_t { Temporary = 0x0000 , Permanent = 0x0001 }
 DCP block qualifier values. More...
 
enum class  DcpIpBlockInfo : std::uint16_t {
  NotSet = 0x0000 , Set = 0x0001 , SetByDhcp = 0x0002 , NotSetConflict = 0x0080 ,
  SetConflict = 0x0081 , SetByDhcpConflict = 0x0082
}
 PROFINET DCP IP block status values. IP block status flags (IEC 61158-6-10 IPBlockInfo). More...
 
enum class  RtaErrorClass : std::uint8_t {
  Reserved = 0x00 , SequenceNumber = 0x01 , Abort = 0x02 , Extended = 0x03 ,
  Obsoleted = 0x04 , UserSpecific = 0x05
}
 Classification of an RTA protocol error reason. More...
 
enum class  RtaErrorReason : std::uint8_t {
  Reserved = 0x00 , SequenceNumber = 0x01 , InstanceClosed = 0x02 , ArOutOfMemory = 0x03 ,
  ArAddProviderConsumerFailed = 0x04 , ArConsumerDhtWdtExpired = 0x05 , ArCmiTimeout = 0x06 , ArAlarmOpenFailed = 0x07 ,
  ArAlarmSendConfirmationNegative = 0x08 , ArAlarmAckSendConfirmationNegative = 0x09 , ArAlarmDataTooLong = 0x0A , ArAlarmIndError = 0x0B ,
  ArRpcClientCallConfirmationNegative = 0x0C , ArAbortRequest = 0x0D , ArRerunAbortsExisting = 0x0E , ArReleaseIndReceived = 0x0F ,
  ArDeviceDeactivated = 0x10 , ArRemoved = 0x11 , ArProtocolViolation = 0x12 , ArNameResolutionError = 0x13 ,
  ArRpcBindError = 0x14 , ArRpcConnectError = 0x15 , ArRpcReadError = 0x16 , ArRpcWriteError = 0x17 ,
  ArRpcControlError = 0x18 , ArForbiddenPullPlug = 0x19 , ArApRemoved = 0x1A , ArLinkDown = 0x1B ,
  ArMulticastMacRegistrationFailed = 0x1C , NotSynchronized = 0x1D , WrongTopology = 0x1E , DcpStationNameChanged = 0x1F ,
  DcpResetToFactorySettings = 0x20 , CompanionAr8ippSubmodule = 0x21 , NoIrdataRecordYet = 0x22 , Pdev = 0x23 ,
  PdevNoRequiredSpeedDuplexity = 0x24 , IpSuiteChanged = 0x25 , IocarSrRdhtExpired = 0x26 , IocarSrPdevParameterizationImpossible = 0x27 ,
  RemoteApplicationReadyTimeout = 0x28 , IocarSrRedundantInterfaceLost = 0x29 , IocarSrMtotExpired = 0x2A , IocarSrArProtocolViolation = 0x2B ,
  PdevPlugPortWithoutCombinedObjectContainer = 0x2C , ObsoletedNmeNoConfiguration = 0x2D , UserAbort = 0xFF
}
 Exact current PROFINET RTA ErrorCode2 values. 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).
 
constexpr AlarmNotificationBitmask operator| (AlarmNotificationBitmask lhs, AlarmNotificationBitmask rhs) noexcept
 Bitwise OR operator for combining two AlarmNotificationBitmask values.
 
constexpr AlarmNotificationBitmask operator& (AlarmNotificationBitmask lhs, AlarmNotificationBitmask rhs) noexcept
 Bitwise AND operator for intersecting two AlarmNotificationBitmask values.
 
constexpr std::uint16_t operator& (std::uint16_t lhs, AlarmNotificationBitmask rhs) noexcept
 Bitwise AND between a raw integer and an AlarmNotificationBitmask value.
 
constexpr std::uint16_t operator& (AlarmNotificationBitmask lhs, std::uint16_t rhs) noexcept
 Bitwise AND between an AlarmNotificationBitmask value and a raw integer.
 
constexpr std::uint16_t operator| (std::uint16_t lhs, AlarmNotificationBitmask rhs) noexcept
 Bitwise OR between a raw integer and an AlarmNotificationBitmask value.
 
constexpr std::uint16_t operator| (AlarmNotificationBitmask lhs, std::uint16_t rhs) noexcept
 Bitwise OR between an AlarmNotificationBitmask value and a raw integer.
 
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.
 
constexpr bool operator== (BlockType lhs, std::uint16_t rhs) noexcept
 Checks equality between a BlockType enum and a raw uint16_t value.
 
constexpr bool operator== (std::uint16_t lhs, BlockType rhs) noexcept
 Checks equality between a raw uint16_t value and a BlockType enum.
 
constexpr bool operator!= (BlockType lhs, std::uint16_t rhs) noexcept
 Checks inequality between a BlockType enum and a raw uint16_t value.
 
constexpr bool operator!= (std::uint16_t lhs, BlockType rhs) noexcept
 Checks inequality between a raw uint16_t value and a BlockType enum.
 
std::ostream & operator<< (std::ostream &os, BlockType type)
 Enables clean printing of BlockType.
 
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.
 
constexpr bool operator== (Usi lhs, std::uint16_t rhs) noexcept
 Checks equality between a Usi enum and a raw uint16_t value.
 
constexpr bool operator== (std::uint16_t lhs, Usi rhs) noexcept
 Checks equality between a raw uint16_t value and a Usi enum.
 
constexpr bool operator!= (Usi lhs, std::uint16_t rhs) noexcept
 Checks inequality between a Usi enum and a raw uint16_t value.
 
constexpr bool operator!= (std::uint16_t lhs, Usi rhs) noexcept
 Checks inequality between a raw uint16_t value and a Usi enum.
 
std::ostream & operator<< (std::ostream &os, Usi value)
 Print operator for std::ostream and GoogleTest output formatting.
 
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 IndexNamePairs & CriticalIndices ()
 Critical indices that should always be tested.
 
const IndexNamePairs & ImIndices ()
 I&M0-I&M15 indices.
 
const IndexNamePairs & DiagnosisIndices (const std::string &scope)
 Diagnosis indices for a given addressing scope.
 
const IndexNamePairs & PortIndices ()
 Port-level indices.
 
const IndexNamePairs & InterfaceIndices ()
 Interface-level indices.
 
const IndexNamePairs & DeviceIndices ()
 Device-level indices.
 
const IndexNamePairs & AllStandardIndices ()
 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.
 
constexpr DcpDeviceRole operator| (DcpDeviceRole lhs, DcpDeviceRole rhs)
 
constexpr DcpDeviceRole operator& (DcpDeviceRole lhs, DcpDeviceRole rhs)
 
constexpr DcpResetMode operator| (DcpResetMode lhs, DcpResetMode rhs)
 
constexpr DcpResetMode operator& (DcpResetMode lhs, DcpResetMode rhs)
 
RtaError ParseRtaError (const PNRTAHeader &header)
 Parse an RTA ERR-PDU from an already parsed RTA header.
 
RtaError ParseRtaError (const Bytes &data)
 Parse an RTA ERR-PDU from raw RTA PDU bytes.
 
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 GetInterfaceMac (const std::string &interface)
 Get the MAC address assigned to a network interface.
 
std::filesystem::path GetExecutableDirectory ()
 Retrieves the absolute directory path of the currently running executable.
 
template<typename T >
constexpr T ByteSwap (T value)
 
template<typename T >
constexpr std::uint8_t ByteAt (T value, std::size_t index)
 Return one byte from an integral value.
 
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.
 
RtaErrorClass ClassifyRtaError (RtaErrorReason reason)
 
 TEST (AlarmEndpointTests, DefaultTransportIsLayer2)
 
 TEST (AlarmEndpointTests, AllFieldsCanBeConfigured)
 
 TEST_F (AlarmListenerTests, InitializesWithEndpoint)
 
 TEST_F (AlarmListenerTests, InitializesWithoutCallbacks)
 
 TEST_F (AlarmListenerTests, AddLambaCallbackRegistersCallback)
 
 TEST_F (AlarmListenerTests, AddCallbackRegistersCallback)
 
 TEST_F (AlarmListenerTests, AddEmptyCallbackDoesNothing)
 
 TEST_F (AlarmListenerTests, RemoveCallback)
 
 TEST_F (AlarmListenerTests, RemoveNonexistentCallbackDoesNotThrow)
 
 TEST_F (AlarmListenerTests, RemoveEmptyCallbackDoesNothing)
 
 TEST_F (AlarmListenerTests, IsRunningInitiallyFalse)
 
 TEST_F (AlarmListenerTests, IsRunningReflectsState)
 
 TEST_F (AlarmListenerTests, ControllerMacDefaultsToZero)
 
 TEST_F (AlarmListenerTests, AcceptsCustomControllerMac)
 
 TEST (AlarmFrameIdTests, HighPriorityAlarmFrameId)
 
 TEST (AlarmFrameIdTests, LowPriorityAlarmFrameId)
 
 TEST_F (AlarmListenerTests, FailedStartLeavesListenerStopped)
 
 TEST_F (AlarmListenerTests, StartAfterFailedStartSucceeds)
 
 TEST_F (AlarmListenerTests, StopIsIdempotent)
 
 TEST_F (AlarmListenerRtaTest, UntaggedAlarmFrameIsProcessed)
 
 TEST_F (AlarmListenerRtaTest, VlanTaggedAlarmFrameIsProcessed)
 
 TEST_F (AlarmListenerRtaTest, HighPriorityAlarmUsesHighFrameId)
 
 TEST_F (AlarmListenerRtaTest, NonProfinetEtherTypeIsIgnored)
 
 TEST_F (AlarmListenerRtaTest, WrongSourceMacIsIgnored)
 
 TEST_F (AlarmListenerRtaTest, WrongDestinationReferenceIsIgnored)
 
 TEST_F (AlarmListenerRtaTest, ShortEthernetFrameIsIgnored)
 
 TEST_F (AlarmListenerRtaTest, AlarmAckIsPriorityVlanTagged)
 
 TEST_F (AlarmListenerRtaTest, AlarmAckUsesDataPdu)
 
 TEST_F (AlarmListenerRtaTest, AlarmAckUsesDeviceEndpointAsDestination)
 
 TEST_F (AlarmListenerRtaTest, AlarmAckEchoesReceivedSequenceNumber)
 
 TEST_F (AlarmListenerCallbackTest, ReceivedAlarmInvokesCallback)
 
 TEST_F (AlarmListenerCallbackTest, MultipleCallbacksAreInvoked)
 
 TEST_F (AlarmListenerCallbackTest, EmptyCallbackIsIgnored)
 
 TEST_F (AlarmListenerCallbackTest, CallbackExceptionDoesNotPreventOtherCallbacks)
 
 TEST_F (AlarmListenerRtaIntegrationTest, TwoAlarmNotificationsAreDispatched)
 
 TEST_F (AlarmListenerRtaTest, InvalidAlarmPayloadIsNotAcknowledged)
 
 TEST_F (AlarmListenerRtaTest, WrongRtaVersionIsIgnored)
 
 TEST_F (AlarmListenerRtaTest, DataWithoutTackIsIgnored)
 
 TEST_F (AlarmListenerRtaIntegrationTest, DISABLED_DuplicateNotificationIsNotDispatchedTwice)
 
 TEST_F (AlarmListenerRtaTest, DISABLED_OutOfSequenceNotificationIsRejected)
 
 TEST_F (AlarmListenerRtaTest, FirstAlarmAckUsesInitialSequenceNumber)
 
 TEST_F (RtaErrorTests, ParsesAumaReleaseIndReceivedError)
 
 TEST_F (RtaErrorTests, IgnoresEthernetPaddingAfterStatus)
 
 TEST_F (RtaErrorTests, RejectsNonErrRtaPdu)
 
 TEST_F (RtaErrorTests, RejectsWrongVariablePartLength)
 
 TEST_F (RtaErrorTests, RejectsTruncatedStatus)
 
 TEST_F (RtaErrorTests, SequenceErrorIsNotAbort)
 
 TEST_F (RtaErrorTests, NonRtaStatusIsNotProtocolError)
 
 TEST_P (RtaErrorsTests, EveryDefinedReasonIsDecoded)
 
 INSTANTIATE_TEST_SUITE_P (AllDefinedReasons, RtaErrorsTests, ::testing::Values(RtaErrorReasonTestCase{0x00, RtaErrorReason::Reserved, RtaErrorClass::Reserved}, RtaErrorReasonTestCase{0x01, RtaErrorReason::SequenceNumber, RtaErrorClass::SequenceNumber}, RtaErrorReasonTestCase{0x02, RtaErrorReason::InstanceClosed, RtaErrorClass::Abort}, RtaErrorReasonTestCase{0x03, RtaErrorReason::ArOutOfMemory, RtaErrorClass::Abort}, RtaErrorReasonTestCase{0x04, RtaErrorReason::ArAddProviderConsumerFailed, RtaErrorClass::Abort}, RtaErrorReasonTestCase{0x05, RtaErrorReason::ArConsumerDhtWdtExpired, RtaErrorClass::Abort}, RtaErrorReasonTestCase{0x06, RtaErrorReason::ArCmiTimeout, RtaErrorClass::Abort}, RtaErrorReasonTestCase{0x07, RtaErrorReason::ArAlarmOpenFailed, RtaErrorClass::Abort}, RtaErrorReasonTestCase{0x08, RtaErrorReason::ArAlarmSendConfirmationNegative, RtaErrorClass::Abort}, RtaErrorReasonTestCase{0x09, RtaErrorReason::ArAlarmAckSendConfirmationNegative, RtaErrorClass::Abort}, RtaErrorReasonTestCase{0x0A, RtaErrorReason::ArAlarmDataTooLong, RtaErrorClass::Abort}, RtaErrorReasonTestCase{0x0B, RtaErrorReason::ArAlarmIndError, RtaErrorClass::Abort}, RtaErrorReasonTestCase{0x0C, RtaErrorReason::ArRpcClientCallConfirmationNegative, RtaErrorClass::Abort}, RtaErrorReasonTestCase{0x0D, RtaErrorReason::ArAbortRequest, RtaErrorClass::Abort}, RtaErrorReasonTestCase{0x0E, RtaErrorReason::ArRerunAbortsExisting, RtaErrorClass::Abort}, RtaErrorReasonTestCase{0x0F, RtaErrorReason::ArReleaseIndReceived, RtaErrorClass::Abort}, RtaErrorReasonTestCase{0x10, RtaErrorReason::ArDeviceDeactivated, RtaErrorClass::Abort}, RtaErrorReasonTestCase{0x11, RtaErrorReason::ArRemoved, RtaErrorClass::Abort}, RtaErrorReasonTestCase{0x12, RtaErrorReason::ArProtocolViolation, RtaErrorClass::Abort}, RtaErrorReasonTestCase{0x13, RtaErrorReason::ArNameResolutionError, RtaErrorClass::Abort}, RtaErrorReasonTestCase{0x14, RtaErrorReason::ArRpcBindError, RtaErrorClass::Abort}, RtaErrorReasonTestCase{0x15, RtaErrorReason::ArRpcConnectError, RtaErrorClass::Abort}, RtaErrorReasonTestCase{0x16, RtaErrorReason::ArRpcReadError, RtaErrorClass::Abort}, RtaErrorReasonTestCase{0x17, RtaErrorReason::ArRpcWriteError, RtaErrorClass::Abort}, RtaErrorReasonTestCase{0x18, RtaErrorReason::ArRpcControlError, RtaErrorClass::Abort}, RtaErrorReasonTestCase{0x19, RtaErrorReason::ArForbiddenPullPlug, RtaErrorClass::Abort}, RtaErrorReasonTestCase{0x1A, RtaErrorReason::ArApRemoved, RtaErrorClass::Abort}, RtaErrorReasonTestCase{0x1B, RtaErrorReason::ArLinkDown, RtaErrorClass::Abort}, RtaErrorReasonTestCase{0x1C, RtaErrorReason::ArMulticastMacRegistrationFailed, RtaErrorClass::Abort}, RtaErrorReasonTestCase{0x1D, RtaErrorReason::NotSynchronized, RtaErrorClass::Abort}, RtaErrorReasonTestCase{0x1E, RtaErrorReason::WrongTopology, RtaErrorClass::Abort}, RtaErrorReasonTestCase{0x1F, RtaErrorReason::DcpStationNameChanged, RtaErrorClass::Abort}, RtaErrorReasonTestCase{0x20, RtaErrorReason::DcpResetToFactorySettings, RtaErrorClass::Abort}, RtaErrorReasonTestCase{0x21, RtaErrorReason::CompanionAr8ippSubmodule, RtaErrorClass::Abort}, RtaErrorReasonTestCase{0x22, RtaErrorReason::NoIrdataRecordYet, RtaErrorClass::Abort}, RtaErrorReasonTestCase{0x23, RtaErrorReason::Pdev, RtaErrorClass::Abort}, RtaErrorReasonTestCase{0x24, RtaErrorReason::PdevNoRequiredSpeedDuplexity, RtaErrorClass::Abort}, RtaErrorReasonTestCase{0x25, RtaErrorReason::IpSuiteChanged, RtaErrorClass::Abort}, RtaErrorReasonTestCase{0x26, RtaErrorReason::IocarSrRdhtExpired, RtaErrorClass::Extended}, RtaErrorReasonTestCase{0x27, RtaErrorReason::IocarSrPdevParameterizationImpossible, RtaErrorClass::Extended}, RtaErrorReasonTestCase{0x28, RtaErrorReason::RemoteApplicationReadyTimeout, RtaErrorClass::Extended}, RtaErrorReasonTestCase{0x29, RtaErrorReason::IocarSrRedundantInterfaceLost, RtaErrorClass::Extended}, RtaErrorReasonTestCase{0x2A, RtaErrorReason::IocarSrMtotExpired, RtaErrorClass::Extended}, RtaErrorReasonTestCase{0x2B, RtaErrorReason::IocarSrArProtocolViolation, RtaErrorClass::Extended}, RtaErrorReasonTestCase{0x2C, RtaErrorReason::PdevPlugPortWithoutCombinedObjectContainer, RtaErrorClass::Extended}, RtaErrorReasonTestCase{0x2D, RtaErrorReason::ObsoletedNmeNoConfiguration, RtaErrorClass::Obsoleted}, RtaErrorReasonTestCase{0xFF, RtaErrorReason::UserAbort, RtaErrorClass::Abort}), [](const ::testing::TestParamInfo< RtaErrorReasonTestCase > &info) { return std::format("{:#04x}", info.param.code);})
 
 TEST (RtaErrorsTests, UndefinedReasonIsUnknown)
 
 TEST_F (AlarmListenerUdpTest, ReceivesAlarmAndSendsAckToSource)
 
 TEST_F (AlarmListenerUdpTest, IgnoresTooShortUdpPayload)
 
 TEST_F (AlarmListenerUdpTest, StartWhileRunningDoesNothing)
 
 TEST_F (AlarmListenerUdpTest, StopBeforeStartIsSafe)
 
 TEST_F (AlarmNotificationTest, ItemLessAlarmIsAccepted)
 
 TEST_F (AlarmNotificationTest, ChannelDiagnosisItemIsDecoded)
 
 TEST_F (AlarmNotificationTest, EthernetPaddingIsNotParsedAsItems)
 
 TEST_F (AlarmNotificationTest, ArDiagnosisIsBit14)
 
 TEST_F (AlarmNotificationTest, ReservedBit15IsNotArDiagnosis)
 
 TEST (ExceptionHierarchyTests, DcpErrorInheritsProfinetError)
 
 TEST (ExceptionHierarchyTests, DcpTimeoutInheritsDcpError)
 
 TEST (ExceptionHierarchyTests, DcpDeviceNotFoundInheritsDcpError)
 
 TEST (ExceptionHierarchyTests, RpcErrorInheritsProfinetError)
 
 TEST (ExceptionHierarchyTests, RpcTimeoutInheritsRpcError)
 
 TEST (ExceptionHierarchyTests, RpcFaultInheritsRpcError)
 
 TEST (ExceptionHierarchyTests, RpcConnectionInheritsRpcError)
 
 TEST (ExceptionHierarchyTests, ValidationErrorInheritsProfinetError)
 
 TEST (ExceptionHierarchyTests, InvalidMacInheritsValidationError)
 
 TEST (ExceptionHierarchyTests, InvalidIpInheritsValidationError)
 
 TEST (ExceptionHierarchyTests, SocketErrorInheritsProfinetError)
 
 TEST (ExceptionHierarchyTests, PermissionDeniedInheritsSocketError)
 
 TEST (RPCFaultErrorTests, FaultCodeDefault)
 
 TEST (RPCFaultErrorTests, FaultCodeCustom)
 
 TEST (RPCFaultErrorTests, Message)
 
 TEST (ExceptionCatchingTests, CatchAllProfinetErrors)
 
 TEST (ExceptionCatchingTests, CatchDcpVariants)
 
 TEST (ExceptionCatchingTests, CatchRpcVariants)
 
 TEST (PNIOErrorTests, PnioErrorInheritsRpcError)
 
 TEST (PNIOErrorTests, DefaultValues)
 
 TEST (PNIOErrorTests, CustomValues)
 
 TEST (PNIOErrorTests, FromArgsStatusInvalidSlot)
 
 TEST (PNIOErrorTests, FromArgsStatusInvalidSubslot)
 
 TEST (PNIOErrorTests, FromArgsStatusInvalidIndex)
 
 TEST (PNIOErrorTests, FromArgsStatusInvalidApi)
 
 TEST (PNIOErrorTests, FromArgsStatusRmpmError)
 
 TEST (PNIOErrorTests, FromArgsStatusUnknownError)
 
 TEST (PNIOErrorTests, StrFormat)
 
 TEST (PNIOErrorTests, ErrorConstants)
 
 TEST (PNIOErrorTests, CreateFromCodesPnioCmAr)
 
 TEST (PNIOErrorTests, CreateFromCodesPnioCmArResponse)
 
 TEST (PNIOErrorTests, CreateFromCodesPnioCmIocr)
 
 TEST (PNIOErrorTests, CreateFromCodesPnioCmIocrResponse)
 
 TEST (PNIOErrorTests, CreateFromCodesPnioCmAlarmCr)
 
 TEST (PNIOErrorTests, CreateFromCodesPnioCmAlarmCrResponse)
 
 TEST (PNIOErrorTests, CreateFromCodesPnioCmExpectedSubmodule)
 
 TEST (PNIOErrorTests, CreateFromCodesPnioCmDevice)
 
 TEST (PNIOErrorTests, CreateFromCodesPnioCmFaultyBlock)
 
 TEST (PNIOErrorTests, CreateFromCodesPnioCmUnknownErrorCode1)
 
 TEST (PNIOErrorTests, CreateFromCodesPnioRmpm)
 
 TEST (PNIOErrorTests, CreateFromCodesPnioPrmServer)
 
 TEST (PNIOErrorTests, CreateFromCodesPnioUnknownErrorCode1)
 
 TEST (PNIOErrorTests, CreateFromCodesPnioRwInvalidIndex)
 
 TEST (PNIOErrorTests, CreateFromCodesPnioRwWriteLength)
 
 TEST (PNIOErrorTests, CreateFromCodesPnioRwResource)
 
 TEST (PNIOErrorTests, CreateFromCodesPnioRwAccess)
 
 TEST (PNIOErrorTests, CreateFromCodesPnioRwApplication)
 
 TEST (PNIOErrorTests, CreateFromCodesPnioRwUnknownErrorCode1)
 
 TEST (PNIOErrorTests, CreateFromCodesUnknownErrorDecode)
 
 TEST (PNIOErrorTests, FromBytesPreservesAllRawErrorBytes)
 
 TEST (PNIOErrorTests, FromBytesUsesExpectedByteOrder)
 
 TEST (PNIOErrorTests, FromArgsStatusReversesByteOrder)
 
 TEST (PNIOErrorTests, FromArgsStatusDecodesPnioCmError)
 
 TEST (PNIOErrorTests, IsCmErrorReturnsTrueForPnioCm)
 
 TEST (PNIOErrorTests, IsCmErrorReturnsFalseForPnioRw)
 
 TEST (PNIOErrorTests, IsCmErrorReturnsFalseForPnio)
 
 TEST (PNIOErrorTests, IsCmErrorReturnsFalseForUnknownDecode)
 
 TEST (PNIOErrorTests, BlockNameReturnsArBlock)
 
 TEST (PNIOErrorTests, BlockNameReturnsIocrBlock)
 
 TEST (PNIOErrorTests, BlockNameReturnsArResponseBlock)
 
 TEST (PNIOErrorTests, BlockNameReturnsUnknownForUnknownCmErrorCode1)
 
 TEST (PNIOErrorTests, BlockNameReturnsEmptyForPnioRwError)
 
 TEST (PNIOErrorTests, BlockNameReturnsEmptyForPnioError)
 
 TEST (PNIOErrorTests, BlockNameReturnsEmptyForUnknownDecode)
 
 TEST (PNIOErrorTests, DirectConstructionPreservesMessageAndCodes)
 
 TEST (PNIOErrorTests, DirectConstructionIsCmError)
 
 TEST (PNIOErrorTests, DirectConstructionIsNotCmError)
 
 TEST_F (PNIOErrorDirectTests, DirectCreateFromCodesPnioCmAr)
 
 TEST_F (PNIOErrorDirectTests, DirectCreateFromCodesPnioCmArResponse)
 
 TEST_F (PNIOErrorDirectTests, DirectCreateFromCodesPnioCmIocr)
 
 TEST_F (PNIOErrorDirectTests, DirectCreateFromCodesPnioCmIocrResponse)
 
 TEST_F (PNIOErrorDirectTests, DirectCreateFromCodesPnioCmAlarmCr)
 
 TEST_F (PNIOErrorDirectTests, DirectCreateFromCodesPnioCmAlarmCrResponse)
 
 TEST_F (PNIOErrorDirectTests, DirectCreateFromCodesPnioCmExpectedSubmodule)
 
 TEST_F (PNIOErrorDirectTests, DirectCreateFromCodesPnioCmDevice)
 
 TEST_F (PNIOErrorDirectTests, DirectCreateFromCodesPnioCmFaultyBlock)
 
 TEST_F (PNIOErrorDirectTests, DirectCreateFromCodesPnioCmUnknownErrorCode1)
 
 TEST_F (PNIOErrorDirectTests, DirectCreateFromCodesPnioRmpm)
 
 TEST_F (PNIOErrorDirectTests, DirectCreateFromCodesPnioPrmServer)
 
 TEST_F (PNIOErrorDirectTests, DirectCreateFromCodesPnioUnknownErrorCode1)
 
 TEST_F (PNIOErrorDirectTests, DirectCreateFromCodesPnioRwInvalidIndex)
 
 TEST_F (PNIOErrorDirectTests, DirectCreateFromCodesPnioRwWriteLength)
 
 TEST_F (PNIOErrorDirectTests, DirectCreateFromCodesPnioRwResource)
 
 TEST_F (PNIOErrorDirectTests, DirectCreateFromCodesPnioRwAccess)
 
 TEST_F (PNIOErrorDirectTests, DirectCreateFromCodesPnioRwApplication)
 
 TEST_F (PNIOErrorDirectTests, DirectCreateFromCodesPnioRwUnknownErrorCode1)
 
 TEST_F (PNIOErrorDirectTests, DirectCreateFromCodesPnioCmPreservesRawCodes)
 
 TEST_F (PNIOErrorDirectTests, DirectCreateFromCodesPnioRwPreservesRawCodes)
 
 TEST_F (PNIOErrorDirectTests, DirectCreateFromCodesPnioPreservesRawCodes)
 
 TEST_F (PNIOErrorDirectTests, DecodePnioCmErrorAr)
 
 TEST_F (PNIOErrorDirectTests, DecodePnioCmErrorArResponse)
 
 TEST_F (PNIOErrorDirectTests, DecodePnioCmErrorArActive)
 
 TEST_F (PNIOErrorDirectTests, DecodePnioCmErrorArActiveResponse)
 
 TEST_F (PNIOErrorDirectTests, DecodePnioCmArErrorNoArResources)
 
 TEST_F (PNIOErrorDirectTests, DecodePnioCmArErrorNoProviderResources)
 
 TEST_F (PNIOErrorDirectTests, DecodePnioCmArErrorNoConsumerResources)
 
 TEST_F (PNIOErrorDirectTests, DecodePnioCmArErrorNoAlarmResources)
 
 TEST_F (PNIOErrorDirectTests, DecodePnioCmArErrorNoMemory)
 
 TEST_F (PNIOErrorDirectTests, DecodePnioCmArErrorInvalidSessionKey)
 
 TEST_F (PNIOErrorDirectTests, DecodePnioCmArErrorArUuidConflict)
 
 TEST_F (PNIOErrorDirectTests, DecodePnioCmArErrorUnknownCode2)
 
 TEST_F (PNIOErrorDirectTests, DecodePnioCmErrorIocr)
 
 TEST_F (PNIOErrorDirectTests, DecodePnioCmErrorIocrResponse)
 
 TEST_F (PNIOErrorDirectTests, DecodePnioCmErrorAlarmCr)
 
 TEST_F (PNIOErrorDirectTests, DecodePnioCmErrorAlarmCrResponse)
 
 TEST_F (PNIOErrorDirectTests, DecodePnioCmErrorExpectedSubmodule)
 
 TEST_F (PNIOErrorDirectTests, DecodePnioCmErrorDevice)
 
 TEST_F (PNIOErrorDirectTests, DecodePnioCmErrorFaultyBlock)
 
 TEST_F (PNIOErrorDirectTests, DecodePnioCmErrorUnknownCode1)
 
 TEST_F (PNIOErrorDirectTests, DecodePnioErrorRmpm)
 
 TEST_F (PNIOErrorDirectTests, DecodePnioErrorPrmServer)
 
 TEST_F (PNIOErrorDirectTests, DecodePnioErrorUnknownCode1)
 
 TEST_F (PNIOErrorDirectTests, DecodePnioRwErrorInvalidIndex)
 
 TEST_F (PNIOErrorDirectTests, DecodePnioRwErrorWriteLength)
 
 TEST_F (PNIOErrorDirectTests, DecodePnioRwErrorResource)
 
 TEST_F (PNIOErrorDirectTests, DecodePnioRwErrorAccess)
 
 TEST_F (PNIOErrorDirectTests, DecodePnioRwErrorApplication)
 
 TEST_F (PNIOErrorDirectTests, DecodePnioRwErrorUnknownCode1)
 
 TEST_F (IndicesTest, GetBlockTypeNameResolvesEveryKnownBlockType)
 
 TEST_F (IndicesTest, GetBlockTypeNameFallsBackForUnknownTypes)
 
 TEST_F (IndicesTest, GetAlarmTypeNameResolvesEveryKnownAlarmType)
 
 TEST_F (IndicesTest, GetAlarmTypeNameFallsBackForUnknownType)
 
 TEST_F (IndicesTest, GetIocrTypeNameResolvesEveryKnownType)
 
 TEST_F (IndicesTest, GetIocrTypeNameFallsBackForUnknownType)
 
 TEST_F (IndicesTest, GetIocrRtClassNameResolvesUdp)
 
 TEST_F (IndicesTest, GetIocrRtClassNameFallsBackForUnknownType)
 
 TEST_F (IndicesTest, GetUsiNameResolvesEveryKnownUsi)
 
 TEST_F (IndicesTest, GetUsiNameClassifiesManufacturerSpecificValues)
 
 TEST_F (IndicesTest, GetUsiNameClassifiesProfileSpecificValues)
 
 TEST_F (IndicesTest, GetUsiNameClassifiesReservedValues)
 
 TEST_F (IndicesTest, GetModuleStateNameResolvesEveryKnownState)
 
 TEST_F (IndicesTest, GetModuleStateNameFallsBackForUnknownState)
 
 TEST_F (IndicesTest, GetSubmoduleStateNameResolvesEveryKnownState)
 
 TEST_F (IndicesTest, GetSubmoduleStateNameFallsBackForUnknownState)
 
 TEST_F (IndicesTest, GetPeModeNameResolvesFixedModes)
 
 TEST_F (IndicesTest, GetPeModeNameResolvesEnergySavingRange)
 
 TEST_F (IndicesTest, GetPeModeNameReturnsReservedForValueBetweenEnergySavingAndOperate)
 
 TEST_F (IndicesTest, GetPeModeNameReturnsReservedForValueBetweenOperateAndSleepMode)
 
 TEST_F (IndicesTest, GetPeModeNameReturnsReservedForValueBetweenSleepModeAndReadyToOperate)
 
 TEST_F (IndicesTest, DiagnosisIndicesReturnsSubslotTable)
 
 TEST_F (IndicesTest, DiagnosisIndicesReturnsSlotTable)
 
 TEST_F (IndicesTest, DiagnosisIndicesReturnsArTable)
 
 TEST_F (IndicesTest, DiagnosisIndicesReturnsApiTable)
 
 TEST_F (IndicesTest, DiagnosisIndicesReturnsDeviceTable)
 
 TEST_F (IndicesTest, DiagnosisIndicesReturnsEmptyTableForUnknownScopes)
 
 TEST_F (IndicesTest, CriticalIndicesReturnsExpectedEntries)
 
 TEST_F (IndicesTest, ImIndicesReturnsAllImEntries)
 
 TEST_F (IndicesTest, PortIndicesReturnsExpectedEntries)
 
 TEST_F (IndicesTest, InterfaceIndicesReturnsExpectedEntries)
 
 TEST_F (IndicesTest, DeviceIndicesReturnsExpectedEntries)
 
 TEST_F (IndicesTest, AllStandardIndicesContainsAllStandardCategories)
 
 TEST_F (IndicesTest, GetIndexNameResolvesAllStandardCategories)
 
 TEST_F (IndicesTest, GetIndexNameClassifiesUserSpecificIndices)
 
 TEST_F (IndicesTest, GetIndexNameClassifiesUnregisteredImIndices)
 
 TEST_F (IndicesTest, GetIndexNameClassifiesUnregisteredSubslotIndices)
 
 TEST_F (IndicesTest, GetIndexNameClassifiesUnregisteredSlotIndices)
 
 TEST_F (IndicesTest, GetIndexNameClassifiesUnregisteredArIndices)
 
 TEST_F (IndicesTest, GetIndexNameClassifiesUnregisteredApiIndices)
 
 TEST_F (IndicesTest, GetIndexNameClassifiesUnregisteredDeviceIndices)
 
 TEST_F (IndicesTest, GetIndexNameReturnsUnknownForUnclassifiedIndices)
 
 TEST_F (IndicesTest, GetScopeClassifiesAllSupportedScopes)
 
 TEST_F (IndicesTest, GetScopeReturnsUnknownForUnclassifiedRanges)
 
 TEST (IoControllerAumaGsdml, AumaProfileMatchesCaptureDevice)
 
 TEST (IoControllerAumaGsdml, PhoenixProfileMatchesCaptureController)
 
 TEST (IoControllerAumaConnection, ConnectUsesCapturedNegotiatedFrameIdsAndTiming)
 
 TEST (IoControllerAumaCyclicIo, OutputOpenAndStopUseCapturedByte25)
 
 TEST (IoControllerAumaCyclicIo, InputPositionSamplesRemainBigEndianAtCapturedBytes20And21)
 
 TEST (IoControllerAumaCyclicIo, Layer2FramesMatchCaptureLengthsAndDirections)
 
 TEST (IoControllerAumaCyclicIo, CapturedOneSecondOpenSequenceUsesEightMillisecondCycle)
 
 TEST_F (SkipVlanTagsTest, UntaggedFrameReturnsOffset12)
 
 TEST_F (SkipVlanTagsTest, Single8021QTagReturnsOffset16)
 
 TEST_F (SkipVlanTagsTest, DoubleTaggedQinQFrameReturnsOffset20)
 
 TEST_F (SkipVlanTagsTest, ShortFrameReturnsEthernetHeaderLength)
 
 TEST (UdpSocketTests, RecvFromReturnsPayloadAndSourceEndpoint)
 
 TEST (UdpSocketTests, SendToSendsToSuppliedEndpoint)
 
 TEST (UdpSocketTests, RecvFromReturnsEmptyDatagramOnTimeout)
 
 TEST (UdpSocketTests, MoveConstructionTransfersSocketOwnership)
 
 TEST (UdpSocketTests, MoveAssignmentTransfersSocketOwnership)
 
 TEST (UtilTest, Mac2SS2MacRoundtrip)
 
 TEST (UtilTest, S2MacRejectsMalformedInput)
 
 TEST (UtilTest, Ip2SS2IpRoundtrip)
 
 TEST (UtilTest, Ip2SRejectsMalformedInput)
 
 TEST (UtilTest, ToHexEncodesBytes)
 
 TEST (UtilTest, DecodeBytesStripsTrailingNuls)
 
 TEST (UtilTest, MaxTimeoutReportsElapsed)
 
 TEST (UtilTest, ByteSwapU16)
 
 TEST (UtilTest, ByteSwapU32)
 
 TEST (UtilTest, ByteSwapU64)
 
 TEST (UtilTest, ByteSwapU8)
 
 TEST (UtilTest, ByteAtU8)
 
 TEST (UtilTest, ByteAtU16)
 
 TEST (UtilTest, ByteAtU32)
 
 TEST (UtilTest, ByteAtU64)
 

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 blockHeaderLength = 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 macAddressLength = 6
 Constant lenght of a mac address.
 
constexpr int uuidLenght = 16
 Constant lenght of a UUID.
 
constexpr std::size_t RECEIVE_BUFFER_LENGTH = 4096
 Receive buffer length.
 
constexpr std::uint16_t kInputFrameId = 0x9000
 
constexpr std::uint16_t kOutputFrameId = 0x8001
 

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 333 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 55 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 1001 of file indices.h.

◆ MacAddress

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

◆ PNInM10

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

I&M10 record type (reserved).

Definition at line 1878 of file protocol.h.

◆ PNInM11

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

I&M11 record type (reserved).

Definition at line 1880 of file protocol.h.

◆ PNInM12

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

I&M12 record type (reserved).

Definition at line 1882 of file protocol.h.

◆ PNInM13

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

I&M13 record type (reserved).

Definition at line 1884 of file protocol.h.

◆ PNInM14

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

I&M14 record type (reserved).

Definition at line 1886 of file protocol.h.

◆ PNInM15

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

I&M15 record type (reserved).

Definition at line 1888 of file protocol.h.

◆ PNInM6

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

I&M6 record type (reserved).

Definition at line 1870 of file protocol.h.

◆ PNInM7

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

I&M7 record type (reserved).

Definition at line 1872 of file protocol.h.

◆ PNInM8

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

I&M8 record type (reserved).

Definition at line 1874 of file protocol.h.

◆ PNInM9

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

I&M9 record type (reserved).

Definition at line 1876 of file protocol.h.

Enumeration Type Documentation

◆ AlarmNotificationBitmask

enum class profinet::AlarmNotificationBitmask : std::uint16_t
strong

Represents bitwise flags and bitmasks for alarm notification headers.

Provides named constants for single-bit diagnostic flags (bits 12–15) as well as multi-bit extraction masks (bits 0–10).

Enumerator
None 

No flags set.

AlarmSequenceNumber 

Bit mask extracting the alarm sequence number (bits 0–10, range 0–2047).

ManufacturerSpecific 

Bit 12: Indicates manufacturer-specific alarm details are present.

SubmoduleDiagnosisState 

Bit 13: Indicates submodule diagnosis state is present.

ArDiagnosisState 

Bit 14: Indicates Application Relation (AR) diagnosis state is present.

ChannelDiagnosis 

Bit 15: Indicates channel diagnosis details are present.

Definition at line 442 of file alarms.h.

◆ 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
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 381 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
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 88 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
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 60 of file indices.h.

◆ DcpBlockError

enum class profinet::DcpBlockError : std::uint8_t
strong

DCP block-level SET response errors.

Enumerator
Ok 

No error.

OptionUnsupported 

Option not supported.

SuboptionUnsupported 

Suboption not supported or no dataset available.

SuboptionNotSet 

Suboption not set.

Resource 

Resource error.

SetNotPossible 

SET not possible for local reasons.

InOperation 

SET not possible because the device is in operation.

Definition at line 330 of file protocol.h.

◆ DcpBlockQualifier

enum class profinet::DcpBlockQualifier : std::uint16_t
strong

DCP block qualifier values.

Enumerator
Temporary 

Change applies until the next power cycle only.

Permanent 

Change is persisted permanently.

Definition at line 429 of file protocol.h.

◆ DcpControlSuboption

enum class profinet::DcpControlSuboption : std::uint8_t
strong

DCP Control suboptions.

Enumerator
Unknown 

Not set / initialize value.

Start 

Start.

Stop 

Stop.

Signal 

Signal / flash LEDs.

Response 

Control response.

FactoryReset 

Factory reset.

ResetToFactory 

Reset to factory.

Definition at line 196 of file protocol.h.

◆ DcpDeviceInitiative

enum class profinet::DcpDeviceInitiative : std::uint16_t
strong

DCP device-initiative values.

Enumerator
NoHello 

Device does not issue DCP-Hello after power-on.

IssueHello 

Device issues DCP-Hello after power-on.

Definition at line 320 of file protocol.h.

◆ DcpDeviceInitiativeSuboption

enum class profinet::DcpDeviceInitiativeSuboption : std::uint8_t
strong

DCP DeviceInitiative suboptions.

Enumerator
Initiative 

Device-initiative setting.

Definition at line 255 of file protocol.h.

◆ DcpDeviceRole

enum class profinet::DcpDeviceRole : std::uint8_t
strong

Device role bitmask.

Enumerator
IoDevice 

IO-Device.

IoController 

IO-Controller.

IoMultidevice 

IO-Multidevice.

PnSupervisor 

PN-Supervisor.

Definition at line 262 of file protocol.h.

◆ DcpDeviceSuboption

enum class profinet::DcpDeviceSuboption : std::uint8_t
strong

DCP Device suboptions.

Enumerator
Unknown 

Not set / initialize value.

Type 

Device type.

Name 

Station name.

DeviceId 

Vendor and device ID.

Role 

Device role.

Options 

Supported options.

Alias 

Alias name.

Instance 

Device instance.

OemId 

OEM vendor/device ID.

Rsi 

Reverse Status Indication.

Definition at line 162 of file protocol.h.

◆ DcpDhcpSuboption

enum class profinet::DcpDhcpSuboption : std::uint8_t
strong

DCP DHCP suboptions.

Enumerator
Unknown 

Not set / initialize value.

Hostname 

Hostname.

VendorSpec 

Vendor-specific option.

ServerId 

Server identifier.

ParamReq 

Parameter request list.

ClassId 

Class identifier.

ClientId 

Client identifier.

Fqdn 

Fully qualified domain name.

Uuid 

Client UUID.

Control 

DHCP control.

Definition at line 221 of file protocol.h.

◆ DcpFrameId

enum class profinet::DcpFrameId : std::uint16_t
strong

PROFINET DCP frame identifiers.

Enumerator
Unknown 

Not set / initialize value.

IdentifyRequest 

DCP Identify request.

IdentifyResponse 

DCP Identify response.

GetSet 

DCP GET/SET request or response.

Hello 

DCP Hello announcement.

Definition at line 64 of file protocol.h.

◆ DcpIpBlockInfo

enum class profinet::DcpIpBlockInfo : std::uint16_t
strong

PROFINET DCP IP block status values. IP block status flags (IEC 61158-6-10 IPBlockInfo).

Enumerator
NotSet 

IP address not set.

Set 

IP address set statically.

SetByDhcp 

IP address set via DHCP.

NotSetConflict 

IP address not set; address conflict detected.

SetConflict 

IP address set statically; address conflict detected.

SetByDhcpConflict 

IP address set via DHCP; address conflict detected.

Definition at line 439 of file protocol.h.

◆ DcpIpSuboption

enum class profinet::DcpIpSuboption : std::uint8_t
strong

DCP IP suboptions.

Enumerator
Unknown 

Not set / initialize value.

Mac 

MAC address.

IpParameter 

IP address, subnet mask and gateway.

FullIpSuite 

Full IP suite.

Definition at line 146 of file protocol.h.

◆ DcpOption

enum class profinet::DcpOption : std::uint8_t
strong

DCP options.

Enumerator
Unknown 

Not set / initialize value.

Ip 

IP configuration.

Device 

Device identification.

Dhcp 

DHCP.

Reserved 

Reserved.

Control 

Control.

DeviceInitiative 

Device initiative.

Nme 

Network Management.

All 

Wildcard: all options.

Definition at line 115 of file protocol.h.

◆ DcpResetMode

enum class profinet::DcpResetMode : std::uint16_t
strong

Reset mode bitmask.

Enumerator
Communication 

Reset communication parameters.

Application 

Reset application data.

Engineering 

Reset engineering parameters.

AllData 

Reset all stored data.

Device 

Reset device.

Factory 

Reset to factory defaults.

Definition at line 288 of file protocol.h.

◆ DcpResetQualifier

enum class profinet::DcpResetQualifier : std::uint16_t
strong

Reset qualifier values for ResetToFactory().

Enumerator
Unknown 

Not set / initialize value.

ApplicationData 

Reset application data.

ApplicationDataAlternate 

Alternative application-data reset qualifier.

CommunicationParameter 

Reset communication parameters.

CommunicationParameterAlternate 

Alternative communication-parameter reset qualifier.

EngineeringParameter 

Reset engineering parameters.

EngineeringParameterAlternate 

Alternative engineering-parameter reset qualifier.

AllStoredData 

Reset all stored data.

AllStoredDataAlternate 

Alternative all-stored-data reset qualifier.

EngineeringParameterExtended 

Alternative reset qualifier associated with engineering parameters.

EngineeringParameterExtendedAlternate 

Alternative reset qualifier associated with engineering parameters.

ToFactory 

Reset to factory defaults.

ToFactoryAlternate 

Alternative reset-to-factory qualifier.

Restore 

Reset and restore from backup.

RestoreAlternate 

Alternative reset-and-restore qualifier.

Definition at line 380 of file protocol.h.

◆ DcpResponseCode

enum class profinet::DcpResponseCode : std::uint8_t
strong

DCP GET/SET response codes.

Enumerator
NoError 

No error.

OptionNotSupported 

Option not supported.

SuboptionNotSupported 

Suboption not supported or no dataset available.

SuboptionNotSet 

Suboption not set.

ResourceError 

Resource error.

SetNotPossible 

SET not possible.

InOperationSetNotPossible 

SET not possible while device is in operation.

Definition at line 355 of file protocol.h.

◆ DcpServiceId

enum class profinet::DcpServiceId : std::uint8_t
strong

DCP service identifiers.

Enumerator
Unknown 

Not set / initialize value.

Get 

GET service.

Set 

SET service.

Identify 

IDENTIFY service.

Hello 

HELLO service.

Definition at line 83 of file protocol.h.

◆ DcpServiceType

enum class profinet::DcpServiceType : std::uint8_t
strong

DCP service types.

Enumerator
Request 

Request.

ResponseSuccess 

Successful response.

ResponseUnsupported 

Service unsupported response.

Definition at line 102 of file protocol.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 489 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 462 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.

◆ RtaErrorClass

enum class profinet::RtaErrorClass : std::uint8_t
strong

Classification of an RTA protocol error reason.

Enumerator
Reserved 

No error / reserved reason.

SequenceNumber 

Error coordinating RTA sequence numbers.

Abort 

RTA error that aborts the application relation.

Extended 

Additional AR/IOCARSR/PDEV RTA reason defined by PROFINET.

Obsoleted 

Obsoleted reason code.

UserSpecific 

User-specific RTA abort.

Definition at line 2484 of file protocol.h.

◆ RtaErrorReason

enum class profinet::RtaErrorReason : std::uint8_t
strong

Exact current PROFINET RTA ErrorCode2 values.

Enumerator
Reserved 
SequenceNumber 
InstanceClosed 
ArOutOfMemory 
ArAddProviderConsumerFailed 
ArConsumerDhtWdtExpired 
ArCmiTimeout 
ArAlarmOpenFailed 
ArAlarmSendConfirmationNegative 
ArAlarmAckSendConfirmationNegative 
ArAlarmDataTooLong 
ArAlarmIndError 
ArRpcClientCallConfirmationNegative 
ArAbortRequest 
ArRerunAbortsExisting 
ArReleaseIndReceived 
ArDeviceDeactivated 
ArRemoved 
ArProtocolViolation 
ArNameResolutionError 
ArRpcBindError 
ArRpcConnectError 
ArRpcReadError 
ArRpcWriteError 
ArRpcControlError 
ArForbiddenPullPlug 
ArApRemoved 
ArLinkDown 
ArMulticastMacRegistrationFailed 
NotSynchronized 
WrongTopology 
DcpStationNameChanged 
DcpResetToFactorySettings 
CompanionAr8ippSubmodule 
NoIrdataRecordYet 
Pdev 
PdevNoRequiredSpeedDuplexity 
IpSuiteChanged 
IocarSrRdhtExpired 
IocarSrPdevParameterizationImpossible 
RemoteApplicationReadyTimeout 
IocarSrRedundantInterfaceLost 
IocarSrMtotExpired 
IocarSrArProtocolViolation 
PdevPlugPortWithoutCombinedObjectContainer 
ObsoletedNmeNoConfiguration 
UserAbort 

Definition at line 2506 of file protocol.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
NoIdentifier 

No identifier.

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 525 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) 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(), and TEST_F().

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

◆ ByteAt()

template<typename T >
constexpr std::uint8_t profinet::ByteAt ( T  value,
std::size_t  index 
)
constexpr

Return one byte from an integral value.

Template Parameters
TIntegral value type.
Parameters
valueValue containing the byte.
indexZero-based byte index, starting at the least-significant byte.
Returns
The selected byte.
Examples
/home/runner/work/rhmarine-oefenen/rhmarine-oefenen/profinet-io-controller-stack/include/profinet/util.h.

Definition at line 244 of file util.h.

Referenced by profinet::dcp::DCPDeviceDescription::DCPDeviceDescription(), profinet::PNIOError::FromArgsStatus(), profinet::diagnosis::ChannelProperties::FromUint16(), TEST(), TEST(), TEST(), and TEST().

+ Here is the caller graph for this function:

◆ ByteSwap()

template<typename T >
constexpr T profinet::ByteSwap ( T  value)
constexpr
Examples
/home/runner/work/rhmarine-oefenen/rhmarine-oefenen/profinet-io-controller-stack/include/profinet/util.h.

Definition at line 218 of file util.h.

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

+ Here is the caller graph for this function:

◆ ClassifyRtaError()

RtaErrorClass profinet::ClassifyRtaError ( RtaErrorReason  reason)

Definition at line 711 of file alarms.cpp.

References Abort, Extended, Obsoleted, Reserved, SequenceNumber, and UserSpecific.

◆ 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.

Referenced by TEST_F().

+ Here is the caller graph for this function:

◆ 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.
Examples
/home/runner/work/rhmarine-oefenen/rhmarine-oefenen/profinet-io-controller-stack/include/profinet/util.h.

Definition at line 246 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(), profinet::dcp::DCPDHCPBlock::Parse(), TEST(), TEST_F(), TEST_F(), and TEST_F().

+ 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 257 of file util.cpp.

References DecodeBytes().

+ Here is the call 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(), profinet::rpc::RPCCon::EnumerateIndices(), and TEST_F().

+ 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(), profinet::rpc::RPCCon::EnumerateIndices(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), and TEST_F().

+ 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(), profinet::IndicesTest::ExpectAlarmTypeNames(), and TEST_F().

+ 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::IndicesTest::ExpectBlockTypeNames(), profinet::blocks::ParseModuleDiffBlock(), TEST_F(), 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.

Uses the native executable-path API of the target operating system and returns the containing directory as a C++ filesystem path.

Returns
The absolute path to the executable's directory.
Exceptions
std::runtime_errorIf the executable path cannot be determined.
Examples
/home/runner/work/rhmarine-oefenen/rhmarine-oefenen/profinet-io-controller-stack/include/profinet/util.h.

Definition at line 79 of file platformLinux.cpp.

References error.

Referenced by TEST(), TEST(), and TEST_F().

+ Here is the caller graph for this function:

◆ 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(), Hex4(), and Name.

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

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

◆ GetInterfaceMac()

MacAddress profinet::GetInterfaceMac ( const std::string &  interface)

Get the MAC address assigned to a network interface.

Parameters
interfacePlatform-specific interface or adapter name.
Returns
The interface's 6-byte MAC address.
Exceptions
SocketErrorIf the interface cannot be found or its MAC address cannot be retrieved.

The implementation uses the native network-interface API of the target operating system. The public API deliberately does not expose an operating-system-specific address structure.

Examples
/home/runner/work/rhmarine-oefenen/rhmarine-oefenen/profinet-io-controller-stack/include/profinet/util.h.

Definition at line 74 of file platformLinux.cpp.

Referenced by profinet::device::ProfinetDevice::Discover(), profinet::device::ProfinetDevice::FromDcpInfo(), profinet::device::ProfinetDevice::FromIp(), profinet::MacAddressProvider::GetMac(), profinet::device::DcpScanner::Scan(), TEST(), TEST(), TEST(), TEST(), TEST_F(), and TEST_F().

+ 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.

Referenced by profinet::IndicesTest::ExpectIocrRtClassNames(), TEST_F(), and TEST_F().

+ Here is the call graph for this function:
+ Here is the caller 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.

Referenced by profinet::IndicesTest::ExpectIocrTypeNames(), and TEST_F().

+ Here is the call graph for this function:
+ 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::IndicesTest::ExpectModuleStates(), profinet::blocks::ModuleDiffModule::StateName(), and TEST_F().

+ 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::IndicesTest::ExpectPeModes(), profinet::PEAlarmItem::ModeName(), TEST_F(), TEST_F(), TEST_F(), and TEST_F().

+ 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 profinet::PNIOError::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 profinet::PNIOError::DecodePnioCmError(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), and TEST_F().

+ 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 profinet::PNIOError::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 profinet::PNIOError::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.

Referenced by profinet::IndicesTest::ExpectScopes().

+ Here is the caller graph for this function:

◆ 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::IndicesTest::ExpectSubmoduleStates(), profinet::blocks::ModuleDiffSubmodule::StateName(), and TEST_F().

+ 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::IndicesTest::ExpectUsiNames(), 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 TEST_F(), and profinet::dcp::DCPDeviceDescription::VendorName().

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

◆ Hex2()

◆ 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").
Examples
/home/runner/work/rhmarine-oefenen/rhmarine-oefenen/profinet-io-controller-stack/include/profinet/util.h.

Definition at line 44 of file util.cpp.

Referenced by profinet::diagnosis::DecodeChannelErrorType(), profinet::diagnosis::DecodeExtChannelErrorType(), GetBlockTypeName(), profinet::dcp::GetDcpBlockQualifierDescription(), profinet::dcp::GetDeviceInitiativeName(), GetIndexName(), GetIocrTypeName(), profinet::dcp::GetIPBlockInfoName(), GetModuleStateName(), profinet::dcp::GetResetQualifierName(), profinet::dcp::GetResetQualifierName(), GetSubmoduleStateName(), GetUsiName(), profinet::dcp::ParseSetResponse(), TEST_F(), 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.
Examples
/home/runner/work/rhmarine-oefenen/rhmarine-oefenen/profinet-io-controller-stack/include/profinet/util.h.

Definition at line 59 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(), profinet::rpc::RPCCon::EnumerateIndices(), and TEST_F().

+ Here is the caller graph for this function:

◆ INSTANTIATE_TEST_SUITE_P()

profinet::INSTANTIATE_TEST_SUITE_P ( AllDefinedReasons  ,
RtaErrorsTests  ,
::testing::Values(RtaErrorReasonTestCase{0x00, RtaErrorReason::Reserved, RtaErrorClass::Reserved}, RtaErrorReasonTestCase{0x01, RtaErrorReason::SequenceNumber, RtaErrorClass::SequenceNumber}, RtaErrorReasonTestCase{0x02, RtaErrorReason::InstanceClosed, RtaErrorClass::Abort}, RtaErrorReasonTestCase{0x03, RtaErrorReason::ArOutOfMemory, RtaErrorClass::Abort}, RtaErrorReasonTestCase{0x04, RtaErrorReason::ArAddProviderConsumerFailed, RtaErrorClass::Abort}, RtaErrorReasonTestCase{0x05, RtaErrorReason::ArConsumerDhtWdtExpired, RtaErrorClass::Abort}, RtaErrorReasonTestCase{0x06, RtaErrorReason::ArCmiTimeout, RtaErrorClass::Abort}, RtaErrorReasonTestCase{0x07, RtaErrorReason::ArAlarmOpenFailed, RtaErrorClass::Abort}, RtaErrorReasonTestCase{0x08, RtaErrorReason::ArAlarmSendConfirmationNegative, RtaErrorClass::Abort}, RtaErrorReasonTestCase{0x09, RtaErrorReason::ArAlarmAckSendConfirmationNegative, RtaErrorClass::Abort}, RtaErrorReasonTestCase{0x0A, RtaErrorReason::ArAlarmDataTooLong, RtaErrorClass::Abort}, RtaErrorReasonTestCase{0x0B, RtaErrorReason::ArAlarmIndError, RtaErrorClass::Abort}, RtaErrorReasonTestCase{0x0C, RtaErrorReason::ArRpcClientCallConfirmationNegative, RtaErrorClass::Abort}, RtaErrorReasonTestCase{0x0D, RtaErrorReason::ArAbortRequest, RtaErrorClass::Abort}, RtaErrorReasonTestCase{0x0E, RtaErrorReason::ArRerunAbortsExisting, RtaErrorClass::Abort}, RtaErrorReasonTestCase{0x0F, RtaErrorReason::ArReleaseIndReceived, RtaErrorClass::Abort}, RtaErrorReasonTestCase{0x10, RtaErrorReason::ArDeviceDeactivated, RtaErrorClass::Abort}, RtaErrorReasonTestCase{0x11, RtaErrorReason::ArRemoved, RtaErrorClass::Abort}, RtaErrorReasonTestCase{0x12, RtaErrorReason::ArProtocolViolation, RtaErrorClass::Abort}, RtaErrorReasonTestCase{0x13, RtaErrorReason::ArNameResolutionError, RtaErrorClass::Abort}, RtaErrorReasonTestCase{0x14, RtaErrorReason::ArRpcBindError, RtaErrorClass::Abort}, RtaErrorReasonTestCase{0x15, RtaErrorReason::ArRpcConnectError, RtaErrorClass::Abort}, RtaErrorReasonTestCase{0x16, RtaErrorReason::ArRpcReadError, RtaErrorClass::Abort}, RtaErrorReasonTestCase{0x17, RtaErrorReason::ArRpcWriteError, RtaErrorClass::Abort}, RtaErrorReasonTestCase{0x18, RtaErrorReason::ArRpcControlError, RtaErrorClass::Abort}, RtaErrorReasonTestCase{0x19, RtaErrorReason::ArForbiddenPullPlug, RtaErrorClass::Abort}, RtaErrorReasonTestCase{0x1A, RtaErrorReason::ArApRemoved, RtaErrorClass::Abort}, RtaErrorReasonTestCase{0x1B, RtaErrorReason::ArLinkDown, RtaErrorClass::Abort}, RtaErrorReasonTestCase{0x1C, RtaErrorReason::ArMulticastMacRegistrationFailed, RtaErrorClass::Abort}, RtaErrorReasonTestCase{0x1D, RtaErrorReason::NotSynchronized, RtaErrorClass::Abort}, RtaErrorReasonTestCase{0x1E, RtaErrorReason::WrongTopology, RtaErrorClass::Abort}, RtaErrorReasonTestCase{0x1F, RtaErrorReason::DcpStationNameChanged, RtaErrorClass::Abort}, RtaErrorReasonTestCase{0x20, RtaErrorReason::DcpResetToFactorySettings, RtaErrorClass::Abort}, RtaErrorReasonTestCase{0x21, RtaErrorReason::CompanionAr8ippSubmodule, RtaErrorClass::Abort}, RtaErrorReasonTestCase{0x22, RtaErrorReason::NoIrdataRecordYet, RtaErrorClass::Abort}, RtaErrorReasonTestCase{0x23, RtaErrorReason::Pdev, RtaErrorClass::Abort}, RtaErrorReasonTestCase{0x24, RtaErrorReason::PdevNoRequiredSpeedDuplexity, RtaErrorClass::Abort}, RtaErrorReasonTestCase{0x25, RtaErrorReason::IpSuiteChanged, RtaErrorClass::Abort}, RtaErrorReasonTestCase{0x26, RtaErrorReason::IocarSrRdhtExpired, RtaErrorClass::Extended}, RtaErrorReasonTestCase{0x27, RtaErrorReason::IocarSrPdevParameterizationImpossible, RtaErrorClass::Extended}, RtaErrorReasonTestCase{0x28, RtaErrorReason::RemoteApplicationReadyTimeout, RtaErrorClass::Extended}, RtaErrorReasonTestCase{0x29, RtaErrorReason::IocarSrRedundantInterfaceLost, RtaErrorClass::Extended}, RtaErrorReasonTestCase{0x2A, RtaErrorReason::IocarSrMtotExpired, RtaErrorClass::Extended}, RtaErrorReasonTestCase{0x2B, RtaErrorReason::IocarSrArProtocolViolation, RtaErrorClass::Extended}, RtaErrorReasonTestCase{0x2C, RtaErrorReason::PdevPlugPortWithoutCombinedObjectContainer, RtaErrorClass::Extended}, RtaErrorReasonTestCase{0x2D, RtaErrorReason::ObsoletedNmeNoConfiguration, RtaErrorClass::Obsoleted}, RtaErrorReasonTestCase{0xFF, RtaErrorReason::UserAbort, RtaErrorClass::Abort})  ,
[] (const ::testing::TestParamInfo< RtaErrorReasonTestCase > &info) { return std::format("{:#04x}", info.param.code);}   
)

References Reserved.

◆ 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(), profinet::rpc::RPCCon::EnumerateIndices(), and TEST_F().

+ 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.

Examples
/home/runner/work/rhmarine-oefenen/rhmarine-oefenen/profinet-io-controller-stack/include/profinet/util.h.

Definition at line 222 of file util.cpp.

Referenced by profinet::device::ProfinetScannerTest::CreateScanResponses(), profinet::dcp::SendHello(), profinet::dcp::SetIp(), TEST(), TEST(), TEST_F(), and TEST_F().

+ 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(), TEST_F(), and TEST_F().

+ 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.
Examples
/home/runner/work/rhmarine-oefenen/rhmarine-oefenen/profinet-io-controller-stack/include/profinet/util.h.

Definition at line 188 of file util.cpp.

References Mac2String().

Referenced by profinet::dcp::DCPDeviceDescription::DCPDeviceDescription(), profinet::sim::VirtualProfinetLab::AddAumaValve(), profinet::sim::VirtualProfinetLab::AddPhoenixPlc(), Mac2String(), profinet::blocks::PeerInfo::MacStr(), profinet::blocks::InterfaceInfo::MacStr(), profinet::sim::VirtualPhoenixPlc::StatusReport(), profinet::sim::VirtualProfinetLab::StatusReport(), profinet::dcp::TEST(), profinet::dcp::TEST(), profinet::dcp::TEST(), profinet::dcp::TEST(), profinet::dcp::TEST(), profinet::dcp::TEST(), profinet::dcp::TEST(), profinet::dcp::TEST(), profinet::dcp::TEST(), profinet::dcp::TEST(), profinet::dcp::TEST(), profinet::dcp::TEST(), profinet::dcp::TEST(), profinet::dcp::TEST(), profinet::dcp::TEST(), profinet::dcp::TEST(), profinet::dcp::TEST(), profinet::dcp::TEST(), profinet::dcp::TEST(), profinet::dcp::TEST(), profinet::dcp::TEST(), profinet::dcp::TEST(), profinet::dcp::TEST(), profinet::dcp::TEST(), profinet::dcp::TEST(), TEST(), TEST_F(), and TEST_F().

+ 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 193 of file util.cpp.

◆ operator!=() [1/4]

constexpr bool profinet::operator!= ( BlockType  lhs,
std::uint16_t  rhs 
)
constexprnoexcept

Checks inequality between a BlockType enum and a raw uint16_t value.

Parameters
lhsEnum value to compare.
rhsRaw uint16_t integer value.
Returns
True if the underlying enum value does not equal rhs, false otherwise.

Definition at line 344 of file indices.h.

◆ operator!=() [2/4]

constexpr bool profinet::operator!= ( std::uint16_t  lhs,
BlockType  rhs 
)
constexprnoexcept

Checks inequality between a raw uint16_t value and a BlockType enum.

Parameters
lhsRaw uint16_t integer value.
rhsEnum value to compare.
Returns
True if lhs does not equal the underlying enum value, false otherwise.

Definition at line 353 of file indices.h.

◆ operator!=() [3/4]

constexpr bool profinet::operator!= ( std::uint16_t  lhs,
Usi  rhs 
)
constexprnoexcept

Checks inequality between a raw uint16_t value and a Usi enum.

Parameters
lhsRaw uint16_t integer value.
rhsEnum value to compare.
Returns
True if lhs does not equal the underlying enum value, false otherwise.

Definition at line 613 of file indices.h.

◆ operator!=() [4/4]

constexpr bool profinet::operator!= ( Usi  lhs,
std::uint16_t  rhs 
)
constexprnoexcept

Checks inequality between a Usi enum and a raw uint16_t value.

Parameters
lhsEnum value to compare.
rhsRaw uint16_t integer value.
Returns
True if the underlying enum value does not equal rhs, false otherwise.

Definition at line 604 of file indices.h.

◆ operator&() [1/5]

constexpr AlarmNotificationBitmask profinet::operator& ( AlarmNotificationBitmask  lhs,
AlarmNotificationBitmask  rhs 
)
constexprnoexcept

Bitwise AND operator for intersecting two AlarmNotificationBitmask values.

Parameters
lhsLeft-hand operand.
rhsRight-hand operand.
Returns
Intersected AlarmNotificationBitmask flags.

Definition at line 480 of file alarms.h.

◆ operator&() [2/5]

constexpr std::uint16_t profinet::operator& ( AlarmNotificationBitmask  lhs,
std::uint16_t  rhs 
)
constexprnoexcept

Bitwise AND between an AlarmNotificationBitmask value and a raw integer.

Parameters
lhsEnum flag/mask to test or extract.
rhsRaw integer field.
Returns
Masked raw integer result.

Definition at line 498 of file alarms.h.

◆ operator&() [3/5]

constexpr DcpDeviceRole profinet::operator& ( DcpDeviceRole  lhs,
DcpDeviceRole  rhs 
)
constexpr

Definition at line 282 of file protocol.h.

◆ operator&() [4/5]

constexpr DcpResetMode profinet::operator& ( DcpResetMode  lhs,
DcpResetMode  rhs 
)
constexpr

Definition at line 314 of file protocol.h.

◆ operator&() [5/5]

constexpr std::uint16_t profinet::operator& ( std::uint16_t  lhs,
AlarmNotificationBitmask  rhs 
)
constexprnoexcept

Bitwise AND between a raw integer and an AlarmNotificationBitmask value.

Parameters
lhsRaw integer field.
rhsEnum flag/mask to test or extract.
Returns
Masked raw integer result.

Definition at line 489 of file alarms.h.

◆ operator<<() [1/2]

std::ostream & profinet::operator<< ( std::ostream &  os,
BlockType  type 
)
inline

Enables clean printing of BlockType.

Definition at line 359 of file indices.h.

◆ operator<<() [2/2]

std::ostream & profinet::operator<< ( std::ostream &  os,
Usi  value 
)
inline

Print operator for std::ostream and GoogleTest output formatting.

Parameters
osOutput stream.
valueUsi value to format.
Returns
Reference to the stream.

Definition at line 622 of file indices.h.

◆ operator==() [1/4]

constexpr bool profinet::operator== ( BlockType  lhs,
std::uint16_t  rhs 
)
constexprnoexcept

Checks equality between a BlockType enum and a raw uint16_t value.

Parameters
lhsEnum value to compare.
rhsRaw uint16_t integer value.
Returns
True if the underlying enum value equals rhs, false otherwise.

Definition at line 326 of file indices.h.

Referenced by profinet::cyclic::TEST_F().

+ Here is the caller graph for this function:

◆ operator==() [2/4]

constexpr bool profinet::operator== ( std::uint16_t  lhs,
BlockType  rhs 
)
constexprnoexcept

Checks equality between a raw uint16_t value and a BlockType enum.

Parameters
lhsRaw uint16_t integer value.
rhsEnum value to compare.
Returns
True if lhs equals the underlying enum value, false otherwise.

Definition at line 335 of file indices.h.

◆ operator==() [3/4]

constexpr bool profinet::operator== ( std::uint16_t  lhs,
Usi  rhs 
)
constexprnoexcept

Checks equality between a raw uint16_t value and a Usi enum.

Parameters
lhsRaw uint16_t integer value.
rhsEnum value to compare.
Returns
True if lhs equals the underlying enum value, false otherwise.

Definition at line 595 of file indices.h.

◆ operator==() [4/4]

constexpr bool profinet::operator== ( Usi  lhs,
std::uint16_t  rhs 
)
constexprnoexcept

Checks equality between a Usi enum and a raw uint16_t value.

Parameters
lhsEnum value to compare.
rhsRaw uint16_t integer value.
Returns
True if the underlying enum value equals rhs, false otherwise.

Definition at line 586 of file indices.h.

◆ operator|() [1/5]

constexpr AlarmNotificationBitmask profinet::operator| ( AlarmNotificationBitmask  lhs,
AlarmNotificationBitmask  rhs 
)
constexprnoexcept

Bitwise OR operator for combining two AlarmNotificationBitmask values.

Parameters
lhsLeft-hand operand.
rhsRight-hand operand.
Returns
Combined AlarmNotificationBitmask flags.

Definition at line 471 of file alarms.h.

◆ operator|() [2/5]

constexpr std::uint16_t profinet::operator| ( AlarmNotificationBitmask  lhs,
std::uint16_t  rhs 
)
constexprnoexcept

Bitwise OR between an AlarmNotificationBitmask value and a raw integer.

Parameters
lhsEnum flag to apply.
rhsRaw integer field.
Returns
Updated raw integer value with the bit set.

Definition at line 516 of file alarms.h.

◆ operator|() [3/5]

constexpr DcpDeviceRole profinet::operator| ( DcpDeviceRole  lhs,
DcpDeviceRole  rhs 
)
constexpr

Definition at line 277 of file protocol.h.

◆ operator|() [4/5]

constexpr DcpResetMode profinet::operator| ( DcpResetMode  lhs,
DcpResetMode  rhs 
)
constexpr

Definition at line 309 of file protocol.h.

◆ operator|() [5/5]

constexpr std::uint16_t profinet::operator| ( std::uint16_t  lhs,
AlarmNotificationBitmask  rhs 
)
constexprnoexcept

Bitwise OR between a raw integer and an AlarmNotificationBitmask value.

Parameters
lhsRaw integer field.
rhsEnum flag to apply.
Returns
Updated raw integer value with the bit set.

Definition at line 507 of file alarms.h.

◆ 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 if data is truncated for the dispatched item type.

Definition at line 191 of file alarms.cpp.

References ChannelDiagnosis, ExtendedChannelDiagnosis, IParameter, Maintenance, PeAlarm, PralAlarm, QualifiedChannelDiagnosis, RsAlarmHigh, RsAlarmLow, RsAlarmSubmodule, profinet::wire::Reader::SkipTo(), profinet::wire::Reader::U16(), Upload, and profinet::AlarmItem::userStructureId.

Referenced by ParseAlarmNotification(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), and TEST_F().

+ Here is the call graph for this function:
+ 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. Item parsing errors past that point are swallowed and stop item parsing early, so a truncated trailing item doesn't lose the items parsed so far.

Definition at line 245 of file alarms.cpp.

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

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

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

◆ ParseRtaError() [1/2]

RtaError profinet::ParseRtaError ( const Bytes &  data)
inline

Parse an RTA ERR-PDU from raw RTA PDU bytes.

Parameters
dataBytes starting at AlarmDstEndpoint.
Returns
Decoded RTA error.
Exceptions
std::invalid_argumentif the RTA PDU is invalid.

Definition at line 2722 of file protocol.h.

References profinet::PNRTAHeader::Parse(), and ParseRtaError().

+ Here is the call graph for this function:

◆ ParseRtaError() [2/2]

RtaError profinet::ParseRtaError ( const PNRTAHeader &  header)
inline

Parse an RTA ERR-PDU from an already parsed RTA header.

Parameters
headerParsed RTA header.
Returns
Decoded RTA error.
Exceptions
std::invalid_argumentif the PDU is not ERR-RTA or the variable part is not exactly a four-byte PNIO status.

Definition at line 2680 of file protocol.h.

References profinet::RtaError::ClassifyRtaError(), profinet::RtaError::ClassifyRtaErrorReason(), profinet::RtaError::errorCode, profinet::RtaError::errorCode1, profinet::RtaError::errorCode2, profinet::RtaError::errorDecode, profinet::RtaError::header, profinet::RtaError::kind, profinet::PNRTAHeader::payload, profinet::PNRTAHeader::pduType, profinet::RtaError::reason, profinet::PNRTAHeader::RTA_TYPE_ERR, profinet::RtaError::statusPnio, and profinet::PNRTAHeader::variablePartLenght.

Referenced by ParseRtaError(), profinet::AlarmListener::ProcessAlarm(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), and TEST_P().

+ 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(), profinet::rpc::RPCCon::EnumerateIndices(), and TEST_F().

+ 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).
Examples
/home/runner/work/rhmarine-oefenen/rhmarine-oefenen/profinet-io-controller-stack/include/profinet/util.h.

Definition at line 70 of file util.cpp.

References profinet::rt::ETHERTYPE_VLAN, profinet::rt::ETHERTYPE_VLAN_AD, profinet::rt::ETHERTYPE_VLAN_LEGACY, frame, macAddressLength, profinet::wire::Reader::Position(), profinet::wire::Reader::Remaining(), profinet::wire::Reader::Skip(), profinet::wire::Reader::SkipTo(), and profinet::wire::Reader::U16().

Referenced by profinet::AlarmListener::HandleLayer2Frame(), profinet::AsioEthernetSocket::EthernetPacketBackend::MatchesEtherType(), profinet::cyclic::CyclicController::ProcessInputFrame(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), and TEST_F().

+ Here is the call graph for this function:
+ 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 217 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.

Examples
/home/runner/work/rhmarine-oefenen/rhmarine-oefenen/profinet-io-controller-stack/include/profinet/util.h.

Definition at line 206 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(), profinet::blocks::InterfaceInfo::SubnetStr(), TEST(), TEST_F(), TEST_F(), and TEST_F().

+ 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.

Examples
/home/runner/work/rhmarine-oefenen/rhmarine-oefenen/profinet-io-controller-stack/include/profinet/util.h.

Definition at line 122 of file util.cpp.

References macAddressLength.

Referenced by profinet::device::ProfinetScannerTest::CreateScanResponses(), profinet::dcp::GetParam(), profinet::rpc::RpcTests::InvokeSetRPCConSrcMac(), profinet::cyclic::CyclicTest::MakeController(), profinet::rpc::RpcTests::MakeRpcTestDeviceInfo(), MakeTestDeviceDescription(), 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(), profinet::cyclic::CyclicTest::StartControllerWithBlockedReceive(), profinet::device::ProfinetDevice::StartCyclic(), profinet::dcp::TEST(), profinet::dcp::TEST(), profinet::dcp::TEST(), profinet::dcp::TEST(), profinet::dcp::TEST(), profinet::dcp::TEST(), profinet::dcp::TEST(), profinet::dcp::TEST(), profinet::dcp::TEST(), profinet::dcp::TEST(), profinet::dcp::TEST(), profinet::dcp::TEST(), profinet::dcp::TEST(), profinet::dcp::TEST(), profinet::dcp::TEST(), profinet::dcp::TEST(), profinet::dcp::TEST(), profinet::dcp::TEST(), profinet::dcp::TEST(), profinet::dcp::TEST(), profinet::dcp::TEST(), profinet::dcp::TEST(), profinet::dcp::TEST(), profinet::dcp::TEST(), profinet::dcp::TEST(), profinet::dcp::TEST(), profinet::dcp::TEST(), profinet::dcp::TEST(), profinet::dcp::TEST(), profinet::dcp::TEST(), profinet::dcp::TEST(), profinet::dcp::TEST(), profinet::dcp::TEST(), profinet::dcp::TEST(), profinet::dcp::TEST(), profinet::dcp::TEST(), profinet::dcp::TEST(), profinet::dcp::TEST(), profinet::dcp::TEST(), profinet::dcp::TEST(), profinet::dcp::TEST(), profinet::dcp::TEST(), profinet::dcp::TEST(), profinet::dcp::TEST(), profinet::dcp::TEST(), profinet::dcp::TEST(), profinet::dcp::TEST(), profinet::dcp::TEST(), profinet::dcp::TEST(), profinet::dcp::TEST(), profinet::dcp::TEST(), profinet::dcp::TEST(), profinet::dcp::TEST(), profinet::dcp::TEST(), profinet::dcp::TEST(), profinet::dcp::TEST(), profinet::dcp::TEST(), profinet::dcp::TEST(), profinet::dcp::TEST(), profinet::dcp::TEST(), profinet::dcp::TEST(), profinet::dcp::TEST(), profinet::dcp::TEST(), profinet::dcp::TEST(), profinet::dcp::TEST(), profinet::dcp::TEST(), profinet::dcp::TEST(), profinet::dcp::TEST(), profinet::dcp::TEST(), profinet::dcp::TEST(), profinet::dcp::TEST(), profinet::dcp::TEST(), profinet::dcp::TEST(), profinet::dcp::TEST(), profinet::dcp::TEST(), profinet::dcp::TEST(), profinet::dcp::TEST(), profinet::dcp::TEST(), profinet::dcp::TEST(), profinet::dcp::TEST(), profinet::dcp::TEST(), profinet::dcp::TEST(), profinet::device::TEST(), profinet::device::TEST(), profinet::device::TEST(), TEST(), TEST(), profinet::cyclic::TEST_F(), profinet::cyclic::TEST_F(), profinet::cyclic::TEST_F(), profinet::cyclic::TEST_F(), profinet::device::TEST_F(), TEST_F(), profinet::rpc::TEST_F(), profinet::rpc::TEST_F(), profinet::rpc::TEST_F(), profinet::rpc::TEST_F(), profinet::rpc::TEST_F(), profinet::rpc::TEST_F(), profinet::rpc::TEST_F(), profinet::rpc::TEST_F(), profinet::rpc::TEST_F(), profinet::rpc::TEST_F(), profinet::rpc::TEST_F(), profinet::rpc::TEST_F(), profinet::rpc::TEST_F(), profinet::rpc::TEST_F(), profinet::rpc::TEST_F(), profinet::rpc::TEST_F(), profinet::rpc::TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), and TEST_F().

◆ TEST() [1/99]

profinet::TEST ( AlarmEndpointTests  ,
AllFieldsCanBeConfigured   
)
Test:
Verifies that all AlarmEndpoint fields can be explicitly configured.

Definition at line 75 of file test_alarmListener.cpp.

References profinet::AlarmEndpoint::interface.

◆ TEST() [2/99]

profinet::TEST ( AlarmEndpointTests  ,
DefaultTransportIsLayer2   
)
Test:
Verifies that the default alarm transport is Layer 2.

Definition at line 58 of file test_alarmListener.cpp.

References profinet::AlarmEndpoint::interface.

◆ TEST() [3/99]

profinet::TEST ( AlarmFrameIdTests  ,
HighPriorityAlarmFrameId   
)
Test:
Verifies that the high-priority alarm frame ID is 0xFC01.

Definition at line 273 of file test_alarmListener.cpp.

References FRAME_ID_ALARM_HIGH.

◆ TEST() [4/99]

profinet::TEST ( AlarmFrameIdTests  ,
LowPriorityAlarmFrameId   
)
Test:
Verifies that the low-priority alarm frame ID is 0xFE01.

Definition at line 279 of file test_alarmListener.cpp.

References FRAME_ID_ALARM_LOW.

◆ TEST() [5/99]

profinet::TEST ( ExceptionCatchingTests  ,
CatchAllProfinetErrors   
)
Test:
Verify catching all PROFINET errors with base ProfinetError class.

Definition at line 120 of file test_exceptions.cpp.

◆ TEST() [6/99]

profinet::TEST ( ExceptionCatchingTests  ,
CatchDcpVariants   
)
Test:
Verify catching DCP error variants with base DCPError class.

Definition at line 129 of file test_exceptions.cpp.

◆ TEST() [7/99]

profinet::TEST ( ExceptionCatchingTests  ,
CatchRpcVariants   
)
Test:
Verify catching RPC error variants with base RPCError class.

Definition at line 136 of file test_exceptions.cpp.

◆ TEST() [8/99]

profinet::TEST ( ExceptionHierarchyTests  ,
DcpDeviceNotFoundInheritsDcpError   
)
Test:
Verify DCPDeviceNotFoundError inherits from DCPError.

Definition at line 31 of file test_exceptions.cpp.

◆ TEST() [9/99]

profinet::TEST ( ExceptionHierarchyTests  ,
DcpErrorInheritsProfinetError   
)
Test:
Verify DCPError inherits from ProfinetError.

Definition at line 19 of file test_exceptions.cpp.

◆ TEST() [10/99]

profinet::TEST ( ExceptionHierarchyTests  ,
DcpTimeoutInheritsDcpError   
)
Test:
Verify DCPTimeoutError inherits from DCPError.

Definition at line 25 of file test_exceptions.cpp.

◆ TEST() [11/99]

profinet::TEST ( ExceptionHierarchyTests  ,
InvalidIpInheritsValidationError   
)
Test:
Verify InvalidIPError inherits from ValidationError.

Definition at line 73 of file test_exceptions.cpp.

◆ TEST() [12/99]

profinet::TEST ( ExceptionHierarchyTests  ,
InvalidMacInheritsValidationError   
)
Test:
Verify InvalidMACError inherits from ValidationError.

Definition at line 67 of file test_exceptions.cpp.

◆ TEST() [13/99]

profinet::TEST ( ExceptionHierarchyTests  ,
PermissionDeniedInheritsSocketError   
)
Test:
Verify PermissionDeniedError inherits from SocketError.

Definition at line 85 of file test_exceptions.cpp.

◆ TEST() [14/99]

profinet::TEST ( ExceptionHierarchyTests  ,
RpcConnectionInheritsRpcError   
)
Test:
Verify RPCConnectionError inherits from RPCError.

Definition at line 55 of file test_exceptions.cpp.

◆ TEST() [15/99]

profinet::TEST ( ExceptionHierarchyTests  ,
RpcErrorInheritsProfinetError   
)
Test:
Verify RPCError inherits from ProfinetError.

Definition at line 37 of file test_exceptions.cpp.

◆ TEST() [16/99]

profinet::TEST ( ExceptionHierarchyTests  ,
RpcFaultInheritsRpcError   
)
Test:
Verify RPCFaultError inherits from RPCError.

Definition at line 49 of file test_exceptions.cpp.

◆ TEST() [17/99]

profinet::TEST ( ExceptionHierarchyTests  ,
RpcTimeoutInheritsRpcError   
)
Test:
Verify RPCTimeoutError inherits from RPCError.

Definition at line 43 of file test_exceptions.cpp.

◆ TEST() [18/99]

profinet::TEST ( ExceptionHierarchyTests  ,
SocketErrorInheritsProfinetError   
)
Test:
Verify SocketError inherits from ProfinetError.

Definition at line 79 of file test_exceptions.cpp.

◆ TEST() [19/99]

profinet::TEST ( ExceptionHierarchyTests  ,
ValidationErrorInheritsProfinetError   
)
Test:
Verify ValidationError inherits from ProfinetError.

Definition at line 61 of file test_exceptions.cpp.

◆ TEST() [20/99]

profinet::TEST ( IoControllerAumaConnection  ,
ConnectUsesCapturedNegotiatedFrameIdsAndTiming   
)

◆ TEST() [21/99]

profinet::TEST ( IoControllerAumaCyclicIo  ,
CapturedOneSecondOpenSequenceUsesEightMillisecondCycle   
)

Definition at line 562 of file test_regressionAuma.cpp.

◆ TEST() [22/99]

profinet::TEST ( IoControllerAumaCyclicIo  ,
InputPositionSamplesRemainBigEndianAtCapturedBytes20And21   
)

Definition at line 493 of file test_regressionAuma.cpp.

References profinet::rt::CyclicDataBuilder::Build(), profinet::rt::CyclicDataBuilder::Load(), payload, profinet::rt::CyclicDataBuilder::Swap(), profinet::wire::Reader::U16(), and profinet::wire::Reader::U8().

+ Here is the call graph for this function:

◆ TEST() [23/99]

profinet::TEST ( IoControllerAumaCyclicIo  ,
Layer2FramesMatchCaptureLengthsAndDirections   
)

◆ TEST() [24/99]

◆ TEST() [25/99]

profinet::TEST ( IoControllerAumaGsdml  ,
AumaProfileMatchesCaptureDevice   
)

Definition at line 262 of file test_regressionAuma.cpp.

◆ TEST() [26/99]

profinet::TEST ( IoControllerAumaGsdml  ,
PhoenixProfileMatchesCaptureController   
)

Definition at line 282 of file test_regressionAuma.cpp.

◆ TEST() [27/99]

profinet::TEST ( PNIOErrorTests  ,
BlockNameReturnsArBlock   
)
Test:
BlockName returns the PNIO-CM block name for an AR error.

Definition at line 660 of file test_exceptions.cpp.

References error, and profinet::PNIOError::FromBytes().

+ Here is the call graph for this function:

◆ TEST() [28/99]

profinet::TEST ( PNIOErrorTests  ,
BlockNameReturnsArResponseBlock   
)
Test:
BlockName returns the PNIO-CM response block name.

Definition at line 682 of file test_exceptions.cpp.

References error, and profinet::PNIOError::FromBytes().

+ Here is the call graph for this function:

◆ TEST() [29/99]

profinet::TEST ( PNIOErrorTests  ,
BlockNameReturnsEmptyForPnioError   
)
Test:
BlockName returns an empty string for a general PNIO error.

Definition at line 715 of file test_exceptions.cpp.

References error, and profinet::PNIOError::FromBytes().

+ Here is the call graph for this function:

◆ TEST() [30/99]

profinet::TEST ( PNIOErrorTests  ,
BlockNameReturnsEmptyForPnioRwError   
)
Test:
BlockName returns an empty string for a non-PNIO-CM error.

Definition at line 704 of file test_exceptions.cpp.

References error, and profinet::PNIOError::FromBytes().

+ Here is the call graph for this function:

◆ TEST() [31/99]

profinet::TEST ( PNIOErrorTests  ,
BlockNameReturnsEmptyForUnknownDecode   
)
Test:
BlockName returns an empty string for an unknown error decode.

Definition at line 726 of file test_exceptions.cpp.

References error, and profinet::PNIOError::FromBytes().

+ Here is the call graph for this function:

◆ TEST() [32/99]

profinet::TEST ( PNIOErrorTests  ,
BlockNameReturnsIocrBlock   
)
Test:
BlockName returns the PNIO-CM block name for an IOCR error.

Definition at line 671 of file test_exceptions.cpp.

References error, and profinet::PNIOError::FromBytes().

+ Here is the call graph for this function:

◆ TEST() [33/99]

profinet::TEST ( PNIOErrorTests  ,
BlockNameReturnsUnknownForUnknownCmErrorCode1   
)
Test:
BlockName returns an unknown name for an unsupported PNIO-CM ErrorCode1.

Definition at line 693 of file test_exceptions.cpp.

References error, and profinet::PNIOError::FromBytes().

+ Here is the call graph for this function:

◆ TEST() [34/99]

profinet::TEST ( PNIOErrorTests  ,
CreateFromCodesPnioCmAlarmCr   
)
Test:
CreateFromCodes decodes a PNIO-CM AlarmCR error.

Definition at line 333 of file test_exceptions.cpp.

References error, and profinet::PNIOError::FromBytes().

+ Here is the call graph for this function:

◆ TEST() [35/99]

profinet::TEST ( PNIOErrorTests  ,
CreateFromCodesPnioCmAlarmCrResponse   
)
Test:
CreateFromCodes decodes a PNIO-CM AlarmCR response error.

Definition at line 344 of file test_exceptions.cpp.

References error, and profinet::PNIOError::FromBytes().

+ Here is the call graph for this function:

◆ TEST() [36/99]

profinet::TEST ( PNIOErrorTests  ,
CreateFromCodesPnioCmAr   
)
Test:
CreateFromCodes decodes a PNIO-CM AR error.

Definition at line 281 of file test_exceptions.cpp.

References error, and profinet::PNIOError::FromBytes().

+ Here is the call graph for this function:

◆ TEST() [37/99]

profinet::TEST ( PNIOErrorTests  ,
CreateFromCodesPnioCmArResponse   
)
Test:
CreateFromCodes decodes a PNIO-CM AR response error.

Definition at line 296 of file test_exceptions.cpp.

References error, and profinet::PNIOError::FromBytes().

+ Here is the call graph for this function:

◆ TEST() [38/99]

profinet::TEST ( PNIOErrorTests  ,
CreateFromCodesPnioCmDevice   
)
Test:
CreateFromCodes decodes a PNIO-CM device error.

Definition at line 366 of file test_exceptions.cpp.

References error, and profinet::PNIOError::FromBytes().

+ Here is the call graph for this function:

◆ TEST() [39/99]

profinet::TEST ( PNIOErrorTests  ,
CreateFromCodesPnioCmExpectedSubmodule   
)
Test:
CreateFromCodes decodes a PNIO-CM ExpectedSubmodule error.

Definition at line 355 of file test_exceptions.cpp.

References error, and profinet::PNIOError::FromBytes().

+ Here is the call graph for this function:

◆ TEST() [40/99]

profinet::TEST ( PNIOErrorTests  ,
CreateFromCodesPnioCmFaultyBlock   
)
Test:
CreateFromCodes decodes a PNIO-CM faulty block error.

Definition at line 377 of file test_exceptions.cpp.

References error, and profinet::PNIOError::FromBytes().

+ Here is the call graph for this function:

◆ TEST() [41/99]

profinet::TEST ( PNIOErrorTests  ,
CreateFromCodesPnioCmIocr   
)
Test:
CreateFromCodes decodes a PNIO-CM IOCR error.

Definition at line 311 of file test_exceptions.cpp.

References error, and profinet::PNIOError::FromBytes().

+ Here is the call graph for this function:

◆ TEST() [42/99]

profinet::TEST ( PNIOErrorTests  ,
CreateFromCodesPnioCmIocrResponse   
)
Test:
CreateFromCodes decodes a PNIO-CM IOCR response error.

Definition at line 322 of file test_exceptions.cpp.

References error, and profinet::PNIOError::FromBytes().

+ Here is the call graph for this function:

◆ TEST() [43/99]

profinet::TEST ( PNIOErrorTests  ,
CreateFromCodesPnioCmUnknownErrorCode1   
)
Test:
CreateFromCodes uses the PNIO-CM default branch for an unsupported ErrorCode1.

Definition at line 388 of file test_exceptions.cpp.

References error, and profinet::PNIOError::FromBytes().

+ Here is the call graph for this function:

◆ TEST() [44/99]

profinet::TEST ( PNIOErrorTests  ,
CreateFromCodesPnioPrmServer   
)
Test:
CreateFromCodes decodes a PNIO Parameter Server error.

Definition at line 418 of file test_exceptions.cpp.

References error, and profinet::PNIOError::FromBytes().

+ Here is the call graph for this function:

◆ TEST() [45/99]

profinet::TEST ( PNIOErrorTests  ,
CreateFromCodesPnioRmpm   
)
Test:
CreateFromCodes decodes a PNIO RMPM error.

Definition at line 403 of file test_exceptions.cpp.

References error, and profinet::PNIOError::FromBytes().

+ Here is the call graph for this function:

◆ TEST() [46/99]

profinet::TEST ( PNIOErrorTests  ,
CreateFromCodesPnioRwAccess   
)
Test:
CreateFromCodes decodes a PNIORW Access error.

Definition at line 479 of file test_exceptions.cpp.

References error, and profinet::PNIOError::FromBytes().

+ Here is the call graph for this function:

◆ TEST() [47/99]

profinet::TEST ( PNIOErrorTests  ,
CreateFromCodesPnioRwApplication   
)
Test:
CreateFromCodes decodes a PNIORW Application error.

Definition at line 491 of file test_exceptions.cpp.

References error, and profinet::PNIOError::FromBytes().

+ Here is the call graph for this function:

◆ TEST() [48/99]

profinet::TEST ( PNIOErrorTests  ,
CreateFromCodesPnioRwInvalidIndex   
)
Test:
CreateFromCodes decodes a PNIORW InvalidIndex error.

Definition at line 444 of file test_exceptions.cpp.

References error, and profinet::PNIOError::FromBytes().

+ Here is the call graph for this function:

◆ TEST() [49/99]

profinet::TEST ( PNIOErrorTests  ,
CreateFromCodesPnioRwResource   
)
Test:
CreateFromCodes decodes a PNIORW Resource error.

Definition at line 468 of file test_exceptions.cpp.

References error, and profinet::PNIOError::FromBytes().

+ Here is the call graph for this function:

◆ TEST() [50/99]

profinet::TEST ( PNIOErrorTests  ,
CreateFromCodesPnioRwUnknownErrorCode1   
)
Test:
CreateFromCodes uses the PNIORW default branch for an unsupported ErrorCode1.

Definition at line 502 of file test_exceptions.cpp.

References error, and profinet::PNIOError::FromBytes().

+ Here is the call graph for this function:

◆ TEST() [51/99]

profinet::TEST ( PNIOErrorTests  ,
CreateFromCodesPnioRwWriteLength   
)
Test:
CreateFromCodes decodes a PNIORW WriteLength error.

Definition at line 456 of file test_exceptions.cpp.

References error, and profinet::PNIOError::FromBytes().

+ Here is the call graph for this function:

◆ TEST() [52/99]

profinet::TEST ( PNIOErrorTests  ,
CreateFromCodesPnioUnknownErrorCode1   
)
Test:
CreateFromCodes uses the PNIO default branch for an unsupported ErrorCode1.

Definition at line 429 of file test_exceptions.cpp.

References error, and profinet::PNIOError::FromBytes().

+ Here is the call graph for this function:

◆ TEST() [53/99]

profinet::TEST ( PNIOErrorTests  ,
CreateFromCodesUnknownErrorDecode   
)
Test:
CreateFromCodes uses the default branch for an unknown ErrorDecode.

Definition at line 517 of file test_exceptions.cpp.

References error, and profinet::PNIOError::FromBytes().

+ Here is the call graph for this function:

◆ TEST() [54/99]

profinet::TEST ( PNIOErrorTests  ,
CustomValues   
)
Test:
Verify custom error code values set upon construction.

Definition at line 165 of file test_exceptions.cpp.

References error.

◆ TEST() [55/99]

profinet::TEST ( PNIOErrorTests  ,
DefaultValues   
)
Test:
Verify default error code values when constructed directly.

Definition at line 155 of file test_exceptions.cpp.

References error.

◆ TEST() [56/99]

profinet::TEST ( PNIOErrorTests  ,
DirectConstructionIsCmError   
)
Test:
PNIOError direct construction reports PNIO-CM status through IsCmError.

Definition at line 758 of file test_exceptions.cpp.

References error.

◆ TEST() [57/99]

profinet::TEST ( PNIOErrorTests  ,
DirectConstructionIsNotCmError   
)
Test:
PNIOError direct construction reports a non-PNIO-CM status through IsCmError.

Definition at line 771 of file test_exceptions.cpp.

References error.

◆ TEST() [58/99]

profinet::TEST ( PNIOErrorTests  ,
DirectConstructionPreservesMessageAndCodes   
)
Test:
PNIOError direct construction preserves the supplied message and raw codes.

Definition at line 741 of file test_exceptions.cpp.

References error.

◆ TEST() [59/99]

profinet::TEST ( PNIOErrorTests  ,
ErrorConstants   
)
Test:
Verify error code constants are defined properly.

Definition at line 266 of file test_exceptions.cpp.

References Application, InvalidIndex, Pnio, PnioCm, PnioRw, and Resource.

◆ TEST() [60/99]

profinet::TEST ( PNIOErrorTests  ,
FromArgsStatusDecodesPnioCmError   
)
Test:
FromArgsStatus preserves a meaningful PNIO-CM error after byte swapping.

Definition at line 588 of file test_exceptions.cpp.

References error, and profinet::PNIOError::FromArgsStatus().

+ Here is the call graph for this function:

◆ TEST() [61/99]

profinet::TEST ( PNIOErrorTests  ,
FromArgsStatusInvalidApi   
)
Test:
Verify creating PNIOError from ArgsStatus for invalid API.

Definition at line 217 of file test_exceptions.cpp.

References error, and profinet::PNIOError::FromArgsStatus().

+ Here is the call graph for this function:

◆ TEST() [62/99]

profinet::TEST ( PNIOErrorTests  ,
FromArgsStatusInvalidIndex   
)
Test:
Verify creating PNIOError from ArgsStatus for invalid index.

Definition at line 203 of file test_exceptions.cpp.

References error, and profinet::PNIOError::FromArgsStatus().

+ Here is the call graph for this function:

◆ TEST() [63/99]

profinet::TEST ( PNIOErrorTests  ,
FromArgsStatusInvalidSlot   
)
Test:
Verify creating PNIOError from ArgsStatus for invalid slot.

Definition at line 175 of file test_exceptions.cpp.

References error, and profinet::PNIOError::FromArgsStatus().

+ Here is the call graph for this function:

◆ TEST() [64/99]

profinet::TEST ( PNIOErrorTests  ,
FromArgsStatusInvalidSubslot   
)
Test:
Verify creating PNIOError from ArgsStatus for invalid subslot.

Definition at line 189 of file test_exceptions.cpp.

References error, and profinet::PNIOError::FromArgsStatus().

+ Here is the call graph for this function:

◆ TEST() [65/99]

profinet::TEST ( PNIOErrorTests  ,
FromArgsStatusReversesByteOrder   
)
Test:
FromArgsStatus reverses the little-endian ArgsStatus representation into PNIO error bytes.

Definition at line 568 of file test_exceptions.cpp.

References error, and profinet::PNIOError::FromArgsStatus().

+ Here is the call graph for this function:

◆ TEST() [66/99]

profinet::TEST ( PNIOErrorTests  ,
FromArgsStatusRmpmError   
)
Test:
Verify creating PNIOError for RMPM connect error (unknown blocks).

Definition at line 231 of file test_exceptions.cpp.

References error, and profinet::PNIOError::FromArgsStatus().

+ Here is the call graph for this function:

◆ TEST() [67/99]

profinet::TEST ( PNIOErrorTests  ,
FromArgsStatusUnknownError   
)
Test:
Verify creating PNIOError from unknown ArgsStatus value.

Definition at line 246 of file test_exceptions.cpp.

References error, and profinet::PNIOError::FromArgsStatus().

+ Here is the call graph for this function:

◆ TEST() [68/99]

profinet::TEST ( PNIOErrorTests  ,
FromBytesPreservesAllRawErrorBytes   
)
Test:
FromBytes preserves all four raw PNIO error bytes.

Definition at line 536 of file test_exceptions.cpp.

References error, and profinet::PNIOError::FromBytes().

+ Here is the call graph for this function:

◆ TEST() [69/99]

profinet::TEST ( PNIOErrorTests  ,
FromBytesUsesExpectedByteOrder   
)
Test:
FromBytes interprets the four bytes in ErrorCode/ErrorDecode/ErrorCode1/ErrorCode2 order.

Definition at line 550 of file test_exceptions.cpp.

References error, and profinet::PNIOError::FromBytes().

+ Here is the call graph for this function:

◆ TEST() [70/99]

profinet::TEST ( PNIOErrorTests  ,
IsCmErrorReturnsFalseForPnio   
)
Test:
IsCmError returns false for a general PNIO error.

Definition at line 634 of file test_exceptions.cpp.

References error, and profinet::PNIOError::FromBytes().

+ Here is the call graph for this function:

◆ TEST() [71/99]

profinet::TEST ( PNIOErrorTests  ,
IsCmErrorReturnsFalseForPnioRw   
)
Test:
IsCmError returns false for a PNIORW error.

Definition at line 623 of file test_exceptions.cpp.

References error, and profinet::PNIOError::FromBytes().

+ Here is the call graph for this function:

◆ TEST() [72/99]

profinet::TEST ( PNIOErrorTests  ,
IsCmErrorReturnsFalseForUnknownDecode   
)
Test:
IsCmError returns false for an unknown ErrorDecode value.

Definition at line 645 of file test_exceptions.cpp.

References error, and profinet::PNIOError::FromBytes().

+ Here is the call graph for this function:

◆ TEST() [73/99]

profinet::TEST ( PNIOErrorTests  ,
IsCmErrorReturnsTrueForPnioCm   
)
Test:
IsCmError returns true for a PNIO-CM error.

Definition at line 612 of file test_exceptions.cpp.

References error, and profinet::PNIOError::FromBytes().

+ Here is the call graph for this function:

◆ TEST() [74/99]

profinet::TEST ( PNIOErrorTests  ,
PnioErrorInheritsRpcError   
)
Test:
Verify PNIOError inherits from RPCError.

Definition at line 149 of file test_exceptions.cpp.

◆ TEST() [75/99]

profinet::TEST ( PNIOErrorTests  ,
StrFormat   
)
Test:
Verify string representation contains the human-readable message.

Definition at line 258 of file test_exceptions.cpp.

References error.

◆ TEST() [76/99]

profinet::TEST ( RPCFaultErrorTests  ,
FaultCodeCustom   
)
Test:
Verify custom fault code initialization.

Definition at line 102 of file test_exceptions.cpp.

References error.

◆ TEST() [77/99]

profinet::TEST ( RPCFaultErrorTests  ,
FaultCodeDefault   
)
Test:
Verify default fault code is 0.

Definition at line 95 of file test_exceptions.cpp.

References error.

◆ TEST() [78/99]

profinet::TEST ( RPCFaultErrorTests  ,
Message   
)
Test:
Verify fault error message retrieved via what().

Definition at line 109 of file test_exceptions.cpp.

References error.

◆ TEST() [79/99]

profinet::TEST ( RtaErrorsTests  ,
UndefinedReasonIsUnknown   
)
Test:
An undefined RTA ErrorCode2 value is classified as unknown.

Definition at line 1114 of file test_alarmListenerRta.cpp.

References profinet::RtaError::ClassifyRtaError(), profinet::RtaError::ClassifyRtaErrorReason(), and Reserved.

+ Here is the call graph for this function:

◆ TEST() [80/99]

profinet::TEST ( UdpSocketTests  ,
MoveAssignmentTransfersSocketOwnership   
)
Test:
Verifies that UdpSocket move assignment transfers socket ownership.

Definition at line 124 of file test_udpSocket.cpp.

References profinet::UdpSocket::LocalEndpoint().

+ Here is the call graph for this function:

◆ TEST() [81/99]

profinet::TEST ( UdpSocketTests  ,
MoveConstructionTransfersSocketOwnership   
)
Test:
Verifies that UdpSocket move construction transfers socket ownership.

Definition at line 112 of file test_udpSocket.cpp.

References profinet::UdpSocket::LocalEndpoint().

+ Here is the call graph for this function:

◆ TEST() [82/99]

profinet::TEST ( UdpSocketTests  ,
RecvFromReturnsEmptyDatagramOnTimeout   
)
Test:
Verifies that a UDP receive timeout returns an empty datagram.

Definition at line 100 of file test_udpSocket.cpp.

References profinet::UdpEndpoint::address, profinet::UdpDatagram::data, profinet::UdpEndpoint::port, profinet::UdpSocket::RecvFrom(), and profinet::UdpDatagram::source.

+ Here is the call graph for this function:

◆ TEST() [83/99]

profinet::TEST ( UdpSocketTests  ,
RecvFromReturnsPayloadAndSourceEndpoint   
)
Test:
Verifies that a bound UdpSocket receives the sender endpoint together with the received payload.

Definition at line 51 of file test_udpSocket.cpp.

References profinet::UdpEndpoint::address, profinet::UdpDatagram::data, payload, profinet::UdpEndpoint::port, profinet::UdpSocket::RecvFrom(), profinet::UdpSocket::Send(), and profinet::UdpDatagram::source.

+ Here is the call graph for this function:

◆ TEST() [84/99]

profinet::TEST ( UdpSocketTests  ,
SendToSendsToSuppliedEndpoint   
)
Test:
Verifies that SendTo() sends a datagram to the supplied endpoint and that a connected UDP peer can receive it.

Definition at line 73 of file test_udpSocket.cpp.

References profinet::UdpDatagram::data, payload, profinet::UdpSocket::Recv(), profinet::UdpSocket::RecvFrom(), profinet::UdpSocket::Send(), profinet::UdpSocket::SendTo(), and profinet::UdpDatagram::source.

+ Here is the call graph for this function:

◆ TEST() [85/99]

profinet::TEST ( UtilTest  ,
ByteAtU16   
)
Test:
ByteAt extracts each byte of a 16-bit value, starting at the least significant byte.

Definition at line 108 of file test_util.cpp.

References ByteAt().

+ Here is the call graph for this function:

◆ TEST() [86/99]

profinet::TEST ( UtilTest  ,
ByteAtU32   
)
Test:
ByteAt extracts each byte of a 32-bit value, starting at the least significant byte.

Definition at line 118 of file test_util.cpp.

References ByteAt().

+ Here is the call graph for this function:

◆ TEST() [87/99]

profinet::TEST ( UtilTest  ,
ByteAtU64   
)
Test:
ByteAt extracts each byte of a 64-bit value, starting at the least significant byte.

Definition at line 130 of file test_util.cpp.

References ByteAt().

+ Here is the call graph for this function:

◆ TEST() [88/99]

profinet::TEST ( UtilTest  ,
ByteAtU8   
)
Test:
ByteAt returns the only byte of an 8-bit value.

Definition at line 99 of file test_util.cpp.

References ByteAt().

+ Here is the call graph for this function:

◆ TEST() [89/99]

profinet::TEST ( UtilTest  ,
ByteSwapU16   
)
Test:
ByteSwap reverses the byte order of a 16-bit value.

Definition at line 76 of file test_util.cpp.

◆ TEST() [90/99]

profinet::TEST ( UtilTest  ,
ByteSwapU32   
)
Test:
ByteSwap reverses the byte order of a 32-bit value.

Definition at line 82 of file test_util.cpp.

◆ TEST() [91/99]

profinet::TEST ( UtilTest  ,
ByteSwapU64   
)
Test:
ByteSwap reverses the byte order of a 64-bit value.

Definition at line 88 of file test_util.cpp.

◆ TEST() [92/99]

profinet::TEST ( UtilTest  ,
ByteSwapU8   
)
Test:
ByteSwap leaves an 8-bit value unchanged.

Definition at line 94 of file test_util.cpp.

◆ TEST() [93/99]

profinet::TEST ( UtilTest  ,
DecodeBytesStripsTrailingNuls   
)
Test:
decode_bytes strips trailing NULs

Definition at line 63 of file test_util.cpp.

References DecodeBytes().

+ Here is the call graph for this function:

◆ TEST() [94/99]

profinet::TEST ( UtilTest  ,
Ip2SRejectsMalformedInput   
)
Test:
ip2s rejects malformed input

Definition at line 48 of file test_util.cpp.

References Ip2String().

+ Here is the call graph for this function:

◆ TEST() [95/99]

profinet::TEST ( UtilTest  ,
Ip2SS2IpRoundtrip   
)
Test:
ip2s / s2ip roundtrip

Definition at line 41 of file test_util.cpp.

References Ip2String(), and String2Ip().

+ Here is the call graph for this function:

◆ TEST() [96/99]

profinet::TEST ( UtilTest  ,
Mac2SS2MacRoundtrip   
)
Test:
mac2s / s2mac roundtrip

Definition at line 25 of file test_util.cpp.

References Mac2String(), and String2Mac().

+ Here is the call graph for this function:

◆ TEST() [97/99]

profinet::TEST ( UtilTest  ,
MaxTimeoutReportsElapsed   
)
Test:
MaxTimeout reports elapsed correctly

Definition at line 70 of file test_util.cpp.

References profinet::MaxTimeout::TimedOut().

+ Here is the call graph for this function:

◆ TEST() [98/99]

profinet::TEST ( UtilTest  ,
S2MacRejectsMalformedInput   
)
Test:
s2mac rejects malformed input

Definition at line 33 of file test_util.cpp.

References String2Mac().

+ Here is the call graph for this function:

◆ TEST() [99/99]

profinet::TEST ( UtilTest  ,
ToHexEncodesBytes   
)
Test:
to_hex encodes bytes

Definition at line 56 of file test_util.cpp.

References ToHex().

+ Here is the call graph for this function:

◆ TEST_F() [1/152]

profinet::TEST_F ( AlarmListenerCallbackTest  ,
CallbackExceptionDoesNotPreventOtherCallbacks   
)
Test:
Verify that an exception in one callback does not prevent later callbacks.

Definition at line 702 of file test_alarmListenerRta.cpp.

◆ TEST_F() [2/152]

profinet::TEST_F ( AlarmListenerCallbackTest  ,
EmptyCallbackIsIgnored   
)
Test:
Verify that an empty callback is ignored safely.

Definition at line 688 of file test_alarmListenerRta.cpp.

◆ TEST_F() [3/152]

profinet::TEST_F ( AlarmListenerCallbackTest  ,
MultipleCallbacksAreInvoked   
)
Test:
Verify that multiple registered callbacks are all invoked.

Definition at line 665 of file test_alarmListenerRta.cpp.

◆ TEST_F() [4/152]

profinet::TEST_F ( AlarmListenerCallbackTest  ,
ReceivedAlarmInvokesCallback   
)
Test:
Verify that every received valid alarm is dispatched to callbacks.

Definition at line 643 of file test_alarmListenerRta.cpp.

◆ TEST_F() [5/152]

profinet::TEST_F ( AlarmListenerRtaIntegrationTest  ,
DISABLED_DuplicateNotificationIsNotDispatchedTwice   
)
Test:
Verify that a duplicate DATA notification is not delivered twice.

A retransmission of an already processed DATA PDU must be acknowledged again but must not result in a second application-level alarm callback.

This test currently exposes missing RTA duplicate/sequence handling in AlarmListener.

Definition at line 812 of file test_alarmListenerRta.cpp.

References frame.

◆ TEST_F() [6/152]

profinet::TEST_F ( AlarmListenerRtaIntegrationTest  ,
TwoAlarmNotificationsAreDispatched   
)
Test:
Verify that two independently received alarms are both dispatched.

Definition at line 726 of file test_alarmListenerRta.cpp.

◆ TEST_F() [7/152]

profinet::TEST_F ( AlarmListenerRtaTest  ,
AlarmAckEchoesReceivedSequenceNumber   
)
Test:
Verify that the AlarmAck echoes the received sequence number.

Definition at line 622 of file test_alarmListenerRta.cpp.

References frame.

◆ TEST_F() [8/152]

profinet::TEST_F ( AlarmListenerRtaTest  ,
AlarmAckIsPriorityVlanTagged   
)
Test:
Verify that the transmitted AlarmAck is priority VLAN tagged.

Definition at line 554 of file test_alarmListenerRta.cpp.

References profinet::wire::Reader::Fixed(), frame, macAddressLength, and profinet::wire::Reader::U16().

+ Here is the call graph for this function:

◆ TEST_F() [9/152]

profinet::TEST_F ( AlarmListenerRtaTest  ,
AlarmAckUsesDataPdu   
)
Test:
Verify that the transmitted AlarmAck contains a DATA PDU.

Definition at line 582 of file test_alarmListenerRta.cpp.

References frame.

◆ TEST_F() [10/152]

profinet::TEST_F ( AlarmListenerRtaTest  ,
AlarmAckUsesDeviceEndpointAsDestination   
)
Test:
Verify that the AlarmAck uses the device alarm endpoint as destination.

Definition at line 601 of file test_alarmListenerRta.cpp.

References frame.

◆ TEST_F() [11/152]

profinet::TEST_F ( AlarmListenerRtaTest  ,
DataWithoutTackIsIgnored   
)
Test:
Verify that DATA without TACK is not processed as a notification.

The intended RTA transport behavior requires the TACK request flag for a DATA notification exchange.

Definition at line 797 of file test_alarmListenerRta.cpp.

◆ TEST_F() [12/152]

profinet::TEST_F ( AlarmListenerRtaTest  ,
DISABLED_OutOfSequenceNotificationIsRejected   
)
Test:
Verify that an out-of-sequence DATA notification is not delivered.

The intended RTA transport behavior is to reject DATA whose SendSeqNum does not match the expected receive sequence and to send a NACK.

This currently exposes missing RTA sequence-state handling.

Definition at line 840 of file test_alarmListenerRta.cpp.

◆ TEST_F() [13/152]

profinet::TEST_F ( AlarmListenerRtaTest  ,
FirstAlarmAckUsesInitialSequenceNumber   
)
Test:
Verify that the first output sequence number starts at 0xFFFF.

The implementation starts the RTA DATA sequence counter at 0xFFFF and advances modulo 0x8000.

This test currently exposes the difference between the current implementation and the intended transport state machine.

Definition at line 866 of file test_alarmListenerRta.cpp.

References frame.

◆ TEST_F() [14/152]

profinet::TEST_F ( AlarmListenerRtaTest  ,
HighPriorityAlarmUsesHighFrameId   
)
Test:
Verify that high-priority alarms use FrameID 0xFC01.

Definition at line 465 of file test_alarmListenerRta.cpp.

References frame, and FRAME_ID_ALARM_HIGH.

◆ TEST_F() [15/152]

profinet::TEST_F ( AlarmListenerRtaTest  ,
InvalidAlarmPayloadIsNotAcknowledged   
)
Test:
Verify that an invalid AlarmNotification does not generate an acknowledgement.

Definition at line 751 of file test_alarmListenerRta.cpp.

◆ TEST_F() [16/152]

profinet::TEST_F ( AlarmListenerRtaTest  ,
NonProfinetEtherTypeIsIgnored   
)
Test:
Verify that a non-PROFINET EtherType is ignored.

Definition at line 490 of file test_alarmListenerRta.cpp.

References frame.

◆ TEST_F() [17/152]

profinet::TEST_F ( AlarmListenerRtaTest  ,
ShortEthernetFrameIsIgnored   
)
Test:
Verify that a short Ethernet frame is ignored.

Definition at line 546 of file test_alarmListenerRta.cpp.

◆ TEST_F() [18/152]

profinet::TEST_F ( AlarmListenerRtaTest  ,
UntaggedAlarmFrameIsProcessed   
)
Test:
Verify that an untagged alarm frame is parsed and acknowledged.

Definition at line 415 of file test_alarmListenerRta.cpp.

References frame, and FRAME_ID_ALARM_LOW.

◆ TEST_F() [19/152]

profinet::TEST_F ( AlarmListenerRtaTest  ,
VlanTaggedAlarmFrameIsProcessed   
)
Test:
Verify that a VLAN-tagged alarm frame is processed.

Definition at line 443 of file test_alarmListenerRta.cpp.

References frame, and FRAME_ID_ALARM_LOW.

◆ TEST_F() [20/152]

profinet::TEST_F ( AlarmListenerRtaTest  ,
WrongDestinationReferenceIsIgnored   
)
Test:
Verify that an alarm for another controller endpoint is ignored.

Definition at line 530 of file test_alarmListenerRta.cpp.

◆ TEST_F() [21/152]

profinet::TEST_F ( AlarmListenerRtaTest  ,
WrongRtaVersionIsIgnored   
)
Test:
Verify that an RTA frame with the wrong version is rejected.

The intended RTA behavior is to ignore PDUs whose high nibble does not contain protocol version 1.

Definition at line 769 of file test_alarmListenerRta.cpp.

References frame, and FRAME_ID_ALARM_LOW.

◆ TEST_F() [22/152]

profinet::TEST_F ( AlarmListenerRtaTest  ,
WrongSourceMacIsIgnored   
)
Test:
Verify that an alarm from an unexpected device is ignored.

Definition at line 508 of file test_alarmListenerRta.cpp.

References frame.

◆ TEST_F() [23/152]

profinet::TEST_F ( AlarmListenerTests  ,
AcceptsCustomControllerMac   
)
Test:
Verifies that a custom controller MAC address is accepted.

Definition at line 258 of file test_alarmListener.cpp.

References profinet::AlarmListenerTestAccess::ControllerMac(), and ioContext.

+ Here is the call graph for this function:

◆ TEST_F() [24/152]

profinet::TEST_F ( AlarmListenerTests  ,
AddCallbackRegistersCallback   
)
Test:
Verifies that a callback can be registered.

Definition at line 146 of file test_alarmListener.cpp.

References profinet::AlarmListenerTestAccess::CallbackCount().

+ Here is the call graph for this function:

◆ TEST_F() [25/152]

profinet::TEST_F ( AlarmListenerTests  ,
AddEmptyCallbackDoesNothing   
)
Test:
Tests that an empty callback is ignored by AddCallback.

Passing an empty std::function must not add an entry to the callback collection.

Definition at line 158 of file test_alarmListener.cpp.

References profinet::AlarmListenerTestAccess::CallbackCount().

+ Here is the call graph for this function:

◆ TEST_F() [26/152]

profinet::TEST_F ( AlarmListenerTests  ,
AddLambaCallbackRegistersCallback   
)
Test:
Verifies that a callback can be registered.

Definition at line 130 of file test_alarmListener.cpp.

References profinet::AlarmListenerTestAccess::CallbackCount().

+ Here is the call graph for this function:

◆ TEST_F() [27/152]

profinet::TEST_F ( AlarmListenerTests  ,
ControllerMacDefaultsToZero   
)
Test:
Verifies that the default controller MAC address consists of zeros.

Definition at line 250 of file test_alarmListener.cpp.

References profinet::AlarmListenerTestAccess::ControllerMac().

+ Here is the call graph for this function:

◆ TEST_F() [28/152]

profinet::TEST_F ( AlarmListenerTests  ,
FailedStartLeavesListenerStopped   
)

Definition at line 283 of file test_alarmListener.cpp.

◆ TEST_F() [29/152]

profinet::TEST_F ( AlarmListenerTests  ,
InitializesWithEndpoint   
)
Test:
Verifies that AlarmListener initializes with the supplied endpoint and is not running.

Definition at line 113 of file test_alarmListener.cpp.

◆ TEST_F() [30/152]

profinet::TEST_F ( AlarmListenerTests  ,
InitializesWithoutCallbacks   
)
Test:
Verifies that a newly constructed AlarmListener has no registered callbacks.

Definition at line 120 of file test_alarmListener.cpp.

References profinet::AlarmListenerTestAccess::CallbackCount().

+ Here is the call graph for this function:

◆ TEST_F() [31/152]

profinet::TEST_F ( AlarmListenerTests  ,
IsRunningInitiallyFalse   
)
Test:
Tests the initial running state of AlarmListener.

A newly constructed AlarmListener must report that it is not running.

Definition at line 213 of file test_alarmListener.cpp.

◆ TEST_F() [32/152]

profinet::TEST_F ( AlarmListenerTests  ,
IsRunningReflectsState   
)
Test:
Verifies that the listener reports a running state after Start().

A Layer 2 listener is started with an injected mock socket so that the test does not create a production raw Ethernet socket or require elevated privileges. The mock receive operation returns immediately, allowing the listener thread to be stopped deterministically.

Definition at line 226 of file test_alarmListener.cpp.

References ioContext.

◆ TEST_F() [33/152]

profinet::TEST_F ( AlarmListenerTests  ,
RemoveCallback   
)
Test:
Tests removal of a previously registered callback.

Registers a plain function pointer and verifies that RemoveCallback removes the matching callback from the listener.

Definition at line 168 of file test_alarmListener.cpp.

References profinet::AlarmListenerTestAccess::CallbackCount().

+ Here is the call graph for this function:

◆ TEST_F() [34/152]

profinet::TEST_F ( AlarmListenerTests  ,
RemoveEmptyCallbackDoesNothing   
)
Test:
Tests removal of an empty callback.

Passing an empty std::function to RemoveCallback must be ignored and must not modify the callback collection.

Definition at line 196 of file test_alarmListener.cpp.

References profinet::AlarmListenerTestAccess::CallbackCount().

+ Here is the call graph for this function:

◆ TEST_F() [35/152]

profinet::TEST_F ( AlarmListenerTests  ,
RemoveNonexistentCallbackDoesNotThrow   
)
Test:
Tests removal of a callback that was never registered.

RemoveCallback must be a no-op when the requested callback does not exist and must not throw an exception.

Definition at line 184 of file test_alarmListener.cpp.

References profinet::AlarmListenerTestAccess::CallbackCount().

+ Here is the call graph for this function:

◆ TEST_F() [36/152]

profinet::TEST_F ( AlarmListenerTests  ,
StartAfterFailedStartSucceeds   
)

Definition at line 295 of file test_alarmListener.cpp.

◆ TEST_F() [37/152]

profinet::TEST_F ( AlarmListenerTests  ,
StopIsIdempotent   
)

Definition at line 313 of file test_alarmListener.cpp.

◆ TEST_F() [38/152]

profinet::TEST_F ( AlarmListenerUdpTest  ,
IgnoresTooShortUdpPayload   
)
Test:
Verifies that a UDP packet shorter than the minimum AlarmNotification size is ignored.

Definition at line 210 of file test_alarmListenerUdp.cpp.

References profinet::UdpDatagram::data, RECEIVE_BUFFER_LENGTH, and profinet::UdpDatagram::source.

◆ TEST_F() [39/152]

profinet::TEST_F ( AlarmListenerUdpTest  ,
ReceivesAlarmAndSendsAckToSource   
)

◆ TEST_F() [40/152]

profinet::TEST_F ( AlarmListenerUdpTest  ,
StartWhileRunningDoesNothing   
)
Test:
Verifies that Start() is idempotent while the listener is already running.

Definition at line 260 of file test_alarmListenerUdp.cpp.

References RECEIVE_BUFFER_LENGTH.

◆ TEST_F() [41/152]

profinet::TEST_F ( AlarmListenerUdpTest  ,
StopBeforeStartIsSafe   
)
Test:
Verifies that Stop() can be called before Start().

Definition at line 283 of file test_alarmListenerUdp.cpp.

◆ TEST_F() [42/152]

profinet::TEST_F ( AlarmNotificationTest  ,
ArDiagnosisIsBit14   
)
Test:
Verify that AlarmSpecifier bit 14 represents AR diagnosis state.

Definition at line 142 of file test_alarmNotification.cpp.

References ParseAlarmNotification().

+ Here is the call graph for this function:

◆ TEST_F() [43/152]

profinet::TEST_F ( AlarmNotificationTest  ,
ChannelDiagnosisItemIsDecoded   
)
Test:
Verify that a channel diagnosis alarm item is decoded correctly.

Definition at line 109 of file test_alarmNotification.cpp.

References ParseAlarmNotification().

+ Here is the call graph for this function:

◆ TEST_F() [44/152]

profinet::TEST_F ( AlarmNotificationTest  ,
EthernetPaddingIsNotParsedAsItems   
)
Test:
Verify that Ethernet padding is not parsed as alarm items.

Ethernet transmitters pad short frames to the minimum frame size. Parsing must be bounded by the AlarmNotification BlockLength rather than by the total Ethernet frame size.

Definition at line 128 of file test_alarmNotification.cpp.

References ParseAlarmNotification().

+ Here is the call graph for this function:

◆ TEST_F() [45/152]

profinet::TEST_F ( AlarmNotificationTest  ,
ItemLessAlarmIsAccepted   
)
Test:
Verify that an item-less AlarmNotification has a 20-byte body.

Definition at line 95 of file test_alarmNotification.cpp.

References ParseAlarmNotification().

+ Here is the call graph for this function:

◆ TEST_F() [46/152]

profinet::TEST_F ( AlarmNotificationTest  ,
ReservedBit15IsNotArDiagnosis   
)
Test:
Verify that reserved bit 15 does not indicate AR diagnosis.

Definition at line 150 of file test_alarmNotification.cpp.

References ParseAlarmNotification().

+ Here is the call graph for this function:

◆ TEST_F() [47/152]

profinet::TEST_F ( IndicesTest  ,
AllStandardIndicesContainsAllStandardCategories   
)
Test:
AllStandardIndices contains entries from every standard index category.

Definition at line 545 of file test_indices.cpp.

References AllStandardIndices().

+ Here is the call graph for this function:

◆ TEST_F() [48/152]

profinet::TEST_F ( IndicesTest  ,
CriticalIndicesReturnsExpectedEntries   
)
Test:
CriticalIndices contains all critical indices in the expected order.

Definition at line 473 of file test_indices.cpp.

References AR_DATA, CriticalIndices(), DIAG_DEVICE, IM0, IM0_FILTER_DATA, LOG_DATA, MODULE_DIFF_BLOCK, and PD_REAL_DATA.

+ Here is the call graph for this function:

◆ TEST_F() [49/152]

profinet::TEST_F ( IndicesTest  ,
DeviceIndicesReturnsExpectedEntries   
)
Test:
DeviceIndices contains all currently defined device indices.

Definition at line 529 of file test_indices.cpp.

References API_DATA, AR_DATA, AUTO_CONFIG, DeviceIndices(), LOG_DATA, PD_EXPECTED_DATA, PD_REAL_DATA, and PDEV_DATA.

+ Here is the call graph for this function:

◆ TEST_F() [50/152]

profinet::TEST_F ( IndicesTest  ,
DiagnosisIndicesReturnsApiTable   
)
Test:
DiagnosisIndices returns the expected API diagnosis table.

Definition at line 443 of file test_indices.cpp.

References DIAG_ALL_API, DIAG_CHANNEL_API, DIAG_MAINTENANCE_API, and DiagnosisIndices().

+ Here is the call graph for this function:

◆ TEST_F() [51/152]

profinet::TEST_F ( IndicesTest  ,
DiagnosisIndicesReturnsArTable   
)
Test:
DiagnosisIndices returns the expected application-relation diagnosis table.

Definition at line 431 of file test_indices.cpp.

References DIAG_ALL_AR, DIAG_CHANNEL_AR, DIAG_MAINTENANCE_AR, and DiagnosisIndices().

+ Here is the call graph for this function:

◆ TEST_F() [52/152]

profinet::TEST_F ( IndicesTest  ,
DiagnosisIndicesReturnsDeviceTable   
)
Test:
DiagnosisIndices returns the expected device diagnosis table.

Definition at line 455 of file test_indices.cpp.

References DIAG_DEVICE, and DiagnosisIndices().

+ Here is the call graph for this function:

◆ TEST_F() [53/152]

profinet::TEST_F ( IndicesTest  ,
DiagnosisIndicesReturnsEmptyTableForUnknownScopes   
)
Test:
DiagnosisIndices returns an empty table for every unsupported scope.

Definition at line 465 of file test_indices.cpp.

References DiagnosisIndices().

+ Here is the call graph for this function:

◆ TEST_F() [54/152]

profinet::TEST_F ( IndicesTest  ,
DiagnosisIndicesReturnsSlotTable   
)
Test:
DiagnosisIndices returns the expected slot diagnosis table.

Definition at line 419 of file test_indices.cpp.

References DIAG_ALL_SLOT, DIAG_CHANNEL_SLOT, DIAG_MAINTENANCE_SLOT, and DiagnosisIndices().

+ Here is the call graph for this function:

◆ TEST_F() [55/152]

profinet::TEST_F ( IndicesTest  ,
DiagnosisIndicesReturnsSubslotTable   
)
Test:
DiagnosisIndices returns the expected subslot diagnosis table.

Definition at line 407 of file test_indices.cpp.

References DIAG_ALL_SUBSLOT, DIAG_CHANNEL_SUBSLOT, DIAG_MAINTENANCE_SUBSLOT, and DiagnosisIndices().

+ Here is the call graph for this function:

◆ TEST_F() [56/152]

profinet::TEST_F ( IndicesTest  ,
GetAlarmTypeNameFallsBackForUnknownType   
)
Test:
GetAlarmTypeName returns Unknown for an unsupported alarm type.

Definition at line 242 of file test_indices.cpp.

References GetAlarmTypeName().

+ Here is the call graph for this function:

◆ TEST_F() [57/152]

profinet::TEST_F ( IndicesTest  ,
GetAlarmTypeNameResolvesEveryKnownAlarmType   
)

◆ TEST_F() [58/152]

profinet::TEST_F ( IndicesTest  ,
GetBlockTypeNameFallsBackForUnknownTypes   
)
Test:
GetBlockTypeName returns the formatted fallback for an unknown block type.

Definition at line 208 of file test_indices.cpp.

References GetBlockTypeName().

+ Here is the call graph for this function:

◆ TEST_F() [59/152]

profinet::TEST_F ( IndicesTest  ,
GetBlockTypeNameResolvesEveryKnownBlockType   
)
Test:
GetBlockTypeName resolves every explicitly supported block type.

Definition at line 132 of file test_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, 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.

◆ TEST_F() [60/152]

profinet::TEST_F ( IndicesTest  ,
GetIndexNameClassifiesUnregisteredApiIndices   
)
Test:
GetIndexName classifies unregistered API indices.

Definition at line 672 of file test_indices.cpp.

◆ TEST_F() [61/152]

profinet::TEST_F ( IndicesTest  ,
GetIndexNameClassifiesUnregisteredArIndices   
)
Test:
GetIndexName classifies unregistered application-relation indices.

Definition at line 663 of file test_indices.cpp.

◆ TEST_F() [62/152]

profinet::TEST_F ( IndicesTest  ,
GetIndexNameClassifiesUnregisteredDeviceIndices   
)
Test:
GetIndexName classifies unregistered device indices.

Definition at line 681 of file test_indices.cpp.

◆ TEST_F() [63/152]

profinet::TEST_F ( IndicesTest  ,
GetIndexNameClassifiesUnregisteredImIndices   
)
Test:
GetIndexName classifies I&M indices that are not explicitly registered.

Definition at line 634 of file test_indices.cpp.

◆ TEST_F() [64/152]

profinet::TEST_F ( IndicesTest  ,
GetIndexNameClassifiesUnregisteredSlotIndices   
)
Test:
GetIndexName classifies unregistered slot indices.

Definition at line 654 of file test_indices.cpp.

◆ TEST_F() [65/152]

profinet::TEST_F ( IndicesTest  ,
GetIndexNameClassifiesUnregisteredSubslotIndices   
)
Test:
GetIndexName classifies unregistered subslot indices.

Definition at line 644 of file test_indices.cpp.

◆ TEST_F() [66/152]

profinet::TEST_F ( IndicesTest  ,
GetIndexNameClassifiesUserSpecificIndices   
)
Test:
GetIndexName classifies user-specific indices.

Definition at line 624 of file test_indices.cpp.

◆ TEST_F() [67/152]

◆ TEST_F() [68/152]

profinet::TEST_F ( IndicesTest  ,
GetIndexNameReturnsUnknownForUnclassifiedIndices   
)
Test:
GetIndexName returns the unknown fallback for indices outside all defined ranges.

Definition at line 690 of file test_indices.cpp.

◆ TEST_F() [69/152]

profinet::TEST_F ( IndicesTest  ,
GetIocrRtClassNameFallsBackForUnknownType   
)
Test:
GetIocrRtClassName returns a formatted fallback for an unsupported RT class.

Definition at line 271 of file test_indices.cpp.

References GetIocrRtClassName().

+ Here is the call graph for this function:

◆ TEST_F() [70/152]

profinet::TEST_F ( IndicesTest  ,
GetIocrRtClassNameResolvesUdp   
)
Test:
GetIocrRtClassName resolves the supported UDP RT class.

Definition at line 265 of file test_indices.cpp.

References GetIocrRtClassName(), and Udp.

+ Here is the call graph for this function:

◆ TEST_F() [71/152]

profinet::TEST_F ( IndicesTest  ,
GetIocrTypeNameFallsBackForUnknownType   
)
Test:
GetIocrTypeName returns a formatted fallback for an unsupported IOCR type.

Definition at line 259 of file test_indices.cpp.

References GetIocrTypeName().

+ Here is the call graph for this function:

◆ TEST_F() [72/152]

profinet::TEST_F ( IndicesTest  ,
GetIocrTypeNameResolvesEveryKnownType   
)
Test:
GetIocrTypeName resolves every explicitly supported IOCR type.

Definition at line 248 of file test_indices.cpp.

References Input, MulticastConsumer, MulticastProvider, and Output.

◆ TEST_F() [73/152]

profinet::TEST_F ( IndicesTest  ,
GetModuleStateNameFallsBackForUnknownState   
)
Test:
GetModuleStateName returns a formatted fallback for an unsupported state.

Definition at line 338 of file test_indices.cpp.

References GetModuleStateName().

+ Here is the call graph for this function:

◆ TEST_F() [74/152]

profinet::TEST_F ( IndicesTest  ,
GetModuleStateNameResolvesEveryKnownState   
)
Test:
GetModuleStateName resolves every supported module state.

Definition at line 327 of file test_indices.cpp.

References MODULE_STATE_NO_MODULE, MODULE_STATE_PROPER_MODULE, MODULE_STATE_SUBSTITUTE_MODULE, and MODULE_STATE_WRONG_MODULE.

◆ TEST_F() [75/152]

profinet::TEST_F ( IndicesTest  ,
GetPeModeNameResolvesEnergySavingRange   
)
Test:
GetPeModeName resolves the complete PROFIenergy energy-saving mode range.

Definition at line 373 of file test_indices.cpp.

References GetPeModeName(), Hex2(), PE_MODE_ENERGY_SAVING_MAX, and PE_MODE_ENERGY_SAVING_MIN.

+ Here is the call graph for this function:

◆ TEST_F() [76/152]

profinet::TEST_F ( IndicesTest  ,
GetPeModeNameResolvesFixedModes   
)
Test:
GetPeModeName resolves the fixed PROFIenergy modes.

Definition at line 362 of file test_indices.cpp.

References PE_MODE_OPERATE, PE_MODE_POWER_OFF, PE_MODE_READY_TO_OPERATE, and PE_MODE_SLEEP_MODE_WOL.

◆ TEST_F() [77/152]

profinet::TEST_F ( IndicesTest  ,
GetPeModeNameReturnsReservedForValueBetweenEnergySavingAndOperate   
)
Test:
GetPeModeName returns the reserved fallback for values between the energy-saving range and operate mode.

Definition at line 382 of file test_indices.cpp.

References GetPeModeName().

+ Here is the call graph for this function:

◆ TEST_F() [78/152]

profinet::TEST_F ( IndicesTest  ,
GetPeModeNameReturnsReservedForValueBetweenOperateAndSleepMode   
)
Test:
GetPeModeName returns the reserved fallback for values between operate and sleep mode.

Definition at line 388 of file test_indices.cpp.

References GetPeModeName().

+ Here is the call graph for this function:

◆ TEST_F() [79/152]

profinet::TEST_F ( IndicesTest  ,
GetPeModeNameReturnsReservedForValueBetweenSleepModeAndReadyToOperate   
)
Test:
GetPeModeName returns the reserved fallback for values between sleep mode and ready-to-operate.

Definition at line 394 of file test_indices.cpp.

References GetPeModeName(), Hex2(), and PE_MODE_ENERGY_SAVING_MAX.

+ Here is the call graph for this function:

◆ TEST_F() [80/152]

profinet::TEST_F ( IndicesTest  ,
GetScopeClassifiesAllSupportedScopes   
)
Test:
GetScope classifies every supported addressing scope.

Definition at line 701 of file test_indices.cpp.

◆ TEST_F() [81/152]

profinet::TEST_F ( IndicesTest  ,
GetScopeReturnsUnknownForUnclassifiedRanges   
)
Test:
GetScope returns unknown for ranges not assigned to a supported scope.

Definition at line 722 of file test_indices.cpp.

◆ TEST_F() [82/152]

profinet::TEST_F ( IndicesTest  ,
GetSubmoduleStateNameFallsBackForUnknownState   
)
Test:
GetSubmoduleStateName returns a formatted fallback for an unsupported state.

Definition at line 356 of file test_indices.cpp.

References GetSubmoduleStateName().

+ Here is the call graph for this function:

◆ TEST_F() [83/152]

profinet::TEST_F ( IndicesTest  ,
GetSubmoduleStateNameResolvesEveryKnownState   
)
Test:
GetSubmoduleStateName resolves every supported submodule state.

Definition at line 344 of file test_indices.cpp.

References SUBMODULE_STATE_APPLICATION_READY_PENDING, SUBMODULE_STATE_LOCKED_BY_SUPERVISOR, SUBMODULE_STATE_NO_SUBMODULE, SUBMODULE_STATE_OK, and SUBMODULE_STATE_WRONG_SUBMODULE.

◆ TEST_F() [84/152]

profinet::TEST_F ( IndicesTest  ,
GetUsiNameClassifiesManufacturerSpecificValues   
)
Test:
GetUsiName classifies manufacturer-specific values in the low range.

Definition at line 296 of file test_indices.cpp.

◆ TEST_F() [85/152]

profinet::TEST_F ( IndicesTest  ,
GetUsiNameClassifiesProfileSpecificValues   
)
Test:
GetUsiName classifies profile-specific values in the profile range.

Definition at line 306 of file test_indices.cpp.

◆ TEST_F() [86/152]

profinet::TEST_F ( IndicesTest  ,
GetUsiNameClassifiesReservedValues   
)
Test:
GetUsiName classifies values outside manufacturer and profile ranges as reserved.

Definition at line 316 of file test_indices.cpp.

◆ TEST_F() [87/152]

profinet::TEST_F ( IndicesTest  ,
GetUsiNameResolvesEveryKnownUsi   
)

◆ TEST_F() [88/152]

profinet::TEST_F ( IndicesTest  ,
ImIndicesReturnsAllImEntries   
)
Test:
ImIndices contains all I&M indices from I&M0 through I&M15.

Definition at line 489 of file test_indices.cpp.

References IM0, and ImIndices().

+ Here is the call graph for this function:

◆ TEST_F() [89/152]

profinet::TEST_F ( IndicesTest  ,
InterfaceIndicesReturnsExpectedEntries   
)
Test:
InterfaceIndices contains all currently defined interface indices.

Definition at line 517 of file test_indices.cpp.

References InterfaceIndices(), PD_INTERFACE_DATA_REAL, PD_INTERFACE_MRP_DATA_REAL, and PD_NC_DATA_CHECK.

+ Here is the call graph for this function:

◆ TEST_F() [90/152]

profinet::TEST_F ( IndicesTest  ,
PortIndicesReturnsExpectedEntries   
)
Test:
PortIndices contains all currently defined port indices.

Definition at line 503 of file test_indices.cpp.

References PD_PORT_DATA_ADJUST, PD_PORT_DATA_CHECK, PD_PORT_DATA_REAL, PD_PORT_MRP_DATA_REAL, PD_PORT_STATISTIC, and PortIndices().

+ Here is the call graph for this function:

◆ TEST_F() [91/152]

profinet::TEST_F ( PNIOErrorDirectTests  ,
DecodePnioCmArErrorArUuidConflict   
)
Test:
GetPnioCmErrorMessage decodes the AR-UUID-conflict error.

Definition at line 1158 of file test_exceptions.cpp.

References ArUuidConflict, and GetPnioCmErrorMessage().

+ Here is the call graph for this function:

◆ TEST_F() [92/152]

profinet::TEST_F ( PNIOErrorDirectTests  ,
DecodePnioCmArErrorInvalidSessionKey   
)
Test:
GetPnioCmErrorMessage decodes the invalid-session-key error.

Definition at line 1152 of file test_exceptions.cpp.

References GetPnioCmErrorMessage(), and InvalidSessionKey.

+ Here is the call graph for this function:

◆ TEST_F() [93/152]

profinet::TEST_F ( PNIOErrorDirectTests  ,
DecodePnioCmArErrorNoAlarmResources   
)
Test:
GetPnioCmErrorMessage decodes the no-alarm-resources error.

Definition at line 1140 of file test_exceptions.cpp.

References GetPnioCmErrorMessage(), and NoAlarmResources.

+ Here is the call graph for this function:

◆ TEST_F() [94/152]

profinet::TEST_F ( PNIOErrorDirectTests  ,
DecodePnioCmArErrorNoArResources   
)
Test:
GetPnioCmErrorMessage decodes the no-AR-resources error.

Definition at line 1122 of file test_exceptions.cpp.

References GetPnioCmErrorMessage(), and NoArResources.

+ Here is the call graph for this function:

◆ TEST_F() [95/152]

profinet::TEST_F ( PNIOErrorDirectTests  ,
DecodePnioCmArErrorNoConsumerResources   
)
Test:
GetPnioCmErrorMessage decodes the no-consumer-resources error.

Definition at line 1134 of file test_exceptions.cpp.

References GetPnioCmErrorMessage(), and NoConsumerResources.

+ Here is the call graph for this function:

◆ TEST_F() [96/152]

profinet::TEST_F ( PNIOErrorDirectTests  ,
DecodePnioCmArErrorNoMemory   
)
Test:
GetPnioCmErrorMessage decodes the no-memory error.

Definition at line 1146 of file test_exceptions.cpp.

References GetPnioCmErrorMessage(), and NoMemory.

+ Here is the call graph for this function:

◆ TEST_F() [97/152]

profinet::TEST_F ( PNIOErrorDirectTests  ,
DecodePnioCmArErrorNoProviderResources   
)
Test:
GetPnioCmErrorMessage decodes the no-provider-resources error.

Definition at line 1128 of file test_exceptions.cpp.

References GetPnioCmErrorMessage(), and NoProviderResources.

+ Here is the call graph for this function:

◆ TEST_F() [98/152]

profinet::TEST_F ( PNIOErrorDirectTests  ,
DecodePnioCmArErrorUnknownCode2   
)
Test:
GetPnioCmErrorMessage returns an unknown message for an unsupported AR error code.

Definition at line 1164 of file test_exceptions.cpp.

References GetPnioCmErrorMessage().

+ Here is the call graph for this function:

◆ TEST_F() [99/152]

profinet::TEST_F ( PNIOErrorDirectTests  ,
DecodePnioCmErrorAlarmCr   
)
Test:
DecodePnioCmError decodes an Alarm CR error.

Definition at line 1181 of file test_exceptions.cpp.

References AlarmCr.

◆ TEST_F() [100/152]

profinet::TEST_F ( PNIOErrorDirectTests  ,
DecodePnioCmErrorAlarmCrResponse   
)
Test:
DecodePnioCmError decodes an Alarm CR response error.

Definition at line 1187 of file test_exceptions.cpp.

References AlarmCrResponse.

◆ TEST_F() [101/152]

profinet::TEST_F ( PNIOErrorDirectTests  ,
DecodePnioCmErrorAr   
)
Test:
DecodePnioCmError decodes an AR error.

Definition at line 1098 of file test_exceptions.cpp.

References Ar.

◆ TEST_F() [102/152]

profinet::TEST_F ( PNIOErrorDirectTests  ,
DecodePnioCmErrorArActive   
)
Test:
DecodePnioCmError decodes an AR active error.

Definition at line 1110 of file test_exceptions.cpp.

References Ar.

◆ TEST_F() [103/152]

profinet::TEST_F ( PNIOErrorDirectTests  ,
DecodePnioCmErrorArActiveResponse   
)
Test:
DecodePnioCmError decodes an AR active response error.

Definition at line 1116 of file test_exceptions.cpp.

References ArResponse.

◆ TEST_F() [104/152]

profinet::TEST_F ( PNIOErrorDirectTests  ,
DecodePnioCmErrorArResponse   
)
Test:
DecodePnioCmError decodes an AR response error.

Definition at line 1104 of file test_exceptions.cpp.

References ArResponse.

◆ TEST_F() [105/152]

profinet::TEST_F ( PNIOErrorDirectTests  ,
DecodePnioCmErrorDevice   
)
Test:
DecodePnioCmError decodes a CM device error.

Definition at line 1199 of file test_exceptions.cpp.

References CmDev.

◆ TEST_F() [106/152]

profinet::TEST_F ( PNIOErrorDirectTests  ,
DecodePnioCmErrorExpectedSubmodule   
)
Test:
DecodePnioCmError decodes an Expected Submodule error.

Definition at line 1193 of file test_exceptions.cpp.

References ExpectedSubmodule.

◆ TEST_F() [107/152]

profinet::TEST_F ( PNIOErrorDirectTests  ,
DecodePnioCmErrorFaultyBlock   
)
Test:
DecodePnioCmError decodes a faulty block error.

Definition at line 1205 of file test_exceptions.cpp.

References FaultyBlock.

◆ TEST_F() [108/152]

profinet::TEST_F ( PNIOErrorDirectTests  ,
DecodePnioCmErrorIocr   
)
Test:
DecodePnioCmError decodes an IOCR error.

Definition at line 1169 of file test_exceptions.cpp.

References Iocr.

◆ TEST_F() [109/152]

profinet::TEST_F ( PNIOErrorDirectTests  ,
DecodePnioCmErrorIocrResponse   
)
Test:
DecodePnioCmError decodes an IOCR response error.

Definition at line 1175 of file test_exceptions.cpp.

References IocrResponse.

◆ TEST_F() [110/152]

profinet::TEST_F ( PNIOErrorDirectTests  ,
DecodePnioCmErrorUnknownCode1   
)
Test:
DecodePnioCmError returns an unknown message for an unsupported CM error code.

Definition at line 1211 of file test_exceptions.cpp.

◆ TEST_F() [111/152]

profinet::TEST_F ( PNIOErrorDirectTests  ,
DecodePnioErrorPrmServer   
)
Test:
DecodePnioError decodes a Parameter Server error.

Definition at line 1223 of file test_exceptions.cpp.

References PrmServer.

◆ TEST_F() [112/152]

profinet::TEST_F ( PNIOErrorDirectTests  ,
DecodePnioErrorRmpm   
)
Test:
DecodePnioError decodes an RMPM error.

Definition at line 1217 of file test_exceptions.cpp.

References Rmpm.

◆ TEST_F() [113/152]

profinet::TEST_F ( PNIOErrorDirectTests  ,
DecodePnioErrorUnknownCode1   
)
Test:
DecodePnioError returns an unknown message for an unsupported PNIO error code.

Definition at line 1229 of file test_exceptions.cpp.

◆ TEST_F() [114/152]

profinet::TEST_F ( PNIOErrorDirectTests  ,
DecodePnioRwErrorAccess   
)
Test:
DecodePnioRWError decodes an Access error.

Definition at line 1252 of file test_exceptions.cpp.

References Access.

◆ TEST_F() [115/152]

profinet::TEST_F ( PNIOErrorDirectTests  ,
DecodePnioRwErrorApplication   
)
Test:
DecodePnioRWError decodes an Application error.

Definition at line 1258 of file test_exceptions.cpp.

References Application.

◆ TEST_F() [116/152]

profinet::TEST_F ( PNIOErrorDirectTests  ,
DecodePnioRwErrorInvalidIndex   
)
Test:
DecodePnioRWError decodes an Invalid Index error.

Definition at line 1234 of file test_exceptions.cpp.

References InvalidIndex.

◆ TEST_F() [117/152]

profinet::TEST_F ( PNIOErrorDirectTests  ,
DecodePnioRwErrorResource   
)
Test:
DecodePnioRWError decodes a Resource error.

Definition at line 1246 of file test_exceptions.cpp.

References Resource.

◆ TEST_F() [118/152]

profinet::TEST_F ( PNIOErrorDirectTests  ,
DecodePnioRwErrorUnknownCode1   
)
Test:
DecodePnioRWError returns an unknown message for an unsupported PNIO RW error code.

Definition at line 1264 of file test_exceptions.cpp.

◆ TEST_F() [119/152]

profinet::TEST_F ( PNIOErrorDirectTests  ,
DecodePnioRwErrorWriteLength   
)
Test:
DecodePnioRWError decodes a Write Length error.

Definition at line 1240 of file test_exceptions.cpp.

References WriteLength.

◆ TEST_F() [120/152]

profinet::TEST_F ( PNIOErrorDirectTests  ,
DirectCreateFromCodesPnioCmAlarmCr   
)
Test:
Direct call to CreateFromCodes decodes a PNIO-CM AlarmCR error.

Definition at line 873 of file test_exceptions.cpp.

References error.

◆ TEST_F() [121/152]

profinet::TEST_F ( PNIOErrorDirectTests  ,
DirectCreateFromCodesPnioCmAlarmCrResponse   
)
Test:
Direct call to CreateFromCodes decodes a PNIO-CM AlarmCR response error.

Definition at line 885 of file test_exceptions.cpp.

References error.

◆ TEST_F() [122/152]

profinet::TEST_F ( PNIOErrorDirectTests  ,
DirectCreateFromCodesPnioCmAr   
)
Test:
Direct call to CreateFromCodes decodes a PNIO-CM AR error.

Definition at line 821 of file test_exceptions.cpp.

References error.

◆ TEST_F() [123/152]

profinet::TEST_F ( PNIOErrorDirectTests  ,
DirectCreateFromCodesPnioCmArResponse   
)
Test:
Direct call to CreateFromCodes decodes a PNIO-CM AR response error.

Definition at line 837 of file test_exceptions.cpp.

References error.

◆ TEST_F() [124/152]

profinet::TEST_F ( PNIOErrorDirectTests  ,
DirectCreateFromCodesPnioCmDevice   
)
Test:
Direct call to CreateFromCodes decodes a PNIO-CM device error.

Definition at line 909 of file test_exceptions.cpp.

References error.

◆ TEST_F() [125/152]

profinet::TEST_F ( PNIOErrorDirectTests  ,
DirectCreateFromCodesPnioCmExpectedSubmodule   
)
Test:
Direct call to CreateFromCodes decodes a PNIO-CM ExpectedSubmodule error.

Definition at line 897 of file test_exceptions.cpp.

References error.

◆ TEST_F() [126/152]

profinet::TEST_F ( PNIOErrorDirectTests  ,
DirectCreateFromCodesPnioCmFaultyBlock   
)
Test:
Direct call to CreateFromCodes decodes a PNIO-CM faulty block error.

Definition at line 921 of file test_exceptions.cpp.

References error.

◆ TEST_F() [127/152]

profinet::TEST_F ( PNIOErrorDirectTests  ,
DirectCreateFromCodesPnioCmIocr   
)
Test:
Direct call to CreateFromCodes decodes a PNIO-CM IOCR error.

Definition at line 849 of file test_exceptions.cpp.

References error.

◆ TEST_F() [128/152]

profinet::TEST_F ( PNIOErrorDirectTests  ,
DirectCreateFromCodesPnioCmIocrResponse   
)
Test:
Direct call to CreateFromCodes decodes a PNIO-CM IOCR response error.

Definition at line 861 of file test_exceptions.cpp.

References error.

◆ TEST_F() [129/152]

profinet::TEST_F ( PNIOErrorDirectTests  ,
DirectCreateFromCodesPnioCmPreservesRawCodes   
)
Test:
Direct call to CreateFromCodes preserves all raw error-code fields for PNIO-CM.

Definition at line 1053 of file test_exceptions.cpp.

References error.

◆ TEST_F() [130/152]

profinet::TEST_F ( PNIOErrorDirectTests  ,
DirectCreateFromCodesPnioCmUnknownErrorCode1   
)
Test:
Direct call to CreateFromCodes uses the PNIO-CM fallback for an unknown ErrorCode1.

Definition at line 933 of file test_exceptions.cpp.

References error.

◆ TEST_F() [131/152]

profinet::TEST_F ( PNIOErrorDirectTests  ,
DirectCreateFromCodesPnioPreservesRawCodes   
)
Test:
Direct call to CreateFromCodes preserves all raw error-code fields for PNIO.

Definition at line 1083 of file test_exceptions.cpp.

References error.

◆ TEST_F() [132/152]

profinet::TEST_F ( PNIOErrorDirectTests  ,
DirectCreateFromCodesPnioPrmServer   
)
Test:
Direct call to CreateFromCodes decodes a PNIO Parameter Server error.

Definition at line 957 of file test_exceptions.cpp.

References error.

◆ TEST_F() [133/152]

profinet::TEST_F ( PNIOErrorDirectTests  ,
DirectCreateFromCodesPnioRmpm   
)
Test:
Direct call to CreateFromCodes decodes a PNIO RMPM error.

Definition at line 945 of file test_exceptions.cpp.

References error.

◆ TEST_F() [134/152]

profinet::TEST_F ( PNIOErrorDirectTests  ,
DirectCreateFromCodesPnioRwAccess   
)
Test:
Direct call to CreateFromCodes decodes a PNIORW Access error.

Definition at line 1017 of file test_exceptions.cpp.

References error.

◆ TEST_F() [135/152]

profinet::TEST_F ( PNIOErrorDirectTests  ,
DirectCreateFromCodesPnioRwApplication   
)
Test:
Direct call to CreateFromCodes decodes a PNIORW Application error.

Definition at line 1029 of file test_exceptions.cpp.

References error.

◆ TEST_F() [136/152]

profinet::TEST_F ( PNIOErrorDirectTests  ,
DirectCreateFromCodesPnioRwInvalidIndex   
)
Test:
Direct call to CreateFromCodes decodes a PNIORW InvalidIndex error.

Definition at line 981 of file test_exceptions.cpp.

References error.

◆ TEST_F() [137/152]

profinet::TEST_F ( PNIOErrorDirectTests  ,
DirectCreateFromCodesPnioRwPreservesRawCodes   
)
Test:
Direct call to CreateFromCodes preserves all raw error-code fields for PNIORW.

Definition at line 1068 of file test_exceptions.cpp.

References error.

◆ TEST_F() [138/152]

profinet::TEST_F ( PNIOErrorDirectTests  ,
DirectCreateFromCodesPnioRwResource   
)
Test:
Direct call to CreateFromCodes decodes a PNIORW Resource error.

Definition at line 1005 of file test_exceptions.cpp.

References error.

◆ TEST_F() [139/152]

profinet::TEST_F ( PNIOErrorDirectTests  ,
DirectCreateFromCodesPnioRwUnknownErrorCode1   
)
Test:
Direct call to CreateFromCodes uses the PNIORW fallback for an unknown ErrorCode1.

Definition at line 1041 of file test_exceptions.cpp.

References error.

◆ TEST_F() [140/152]

profinet::TEST_F ( PNIOErrorDirectTests  ,
DirectCreateFromCodesPnioRwWriteLength   
)
Test:
Direct call to CreateFromCodes decodes a PNIORW WriteLength error.

Definition at line 993 of file test_exceptions.cpp.

References error.

◆ TEST_F() [141/152]

profinet::TEST_F ( PNIOErrorDirectTests  ,
DirectCreateFromCodesPnioUnknownErrorCode1   
)
Test:
Direct call to CreateFromCodes uses the PNIO fallback for an unknown ErrorCode1.

Definition at line 969 of file test_exceptions.cpp.

References error.

◆ TEST_F() [142/152]

profinet::TEST_F ( RtaErrorTests  ,
IgnoresEthernetPaddingAfterStatus   
)
Test:
Verify that Ethernet padding after the four-byte status is ignored.

Definition at line 942 of file test_alarmListenerRta.cpp.

References error, and ParseRtaError().

+ Here is the call graph for this function:

◆ TEST_F() [143/152]

profinet::TEST_F ( RtaErrorTests  ,
NonRtaStatusIsNotProtocolError   
)
Test:
Verify that a non-RTA PNIO status is not classified as an RTA protocol error.

Definition at line 1004 of file test_alarmListenerRta.cpp.

References error, and ParseRtaError().

+ Here is the call graph for this function:

◆ TEST_F() [144/152]

profinet::TEST_F ( RtaErrorTests  ,
ParsesAumaReleaseIndReceivedError   
)
Test:
Verify that the AUMA CF81FD0F RTA error is decoded correctly.

Definition at line 915 of file test_alarmListenerRta.cpp.

References error, and ParseRtaError().

+ Here is the call graph for this function:

◆ TEST_F() [145/152]

profinet::TEST_F ( RtaErrorTests  ,
RejectsNonErrRtaPdu   
)
Test:
Verify that a non-ERR RTA PDU is rejected.

Definition at line 955 of file test_alarmListenerRta.cpp.

References ParseRtaError(), profinet::PNRTAHeader::payload, profinet::PNRTAHeader::pduType, profinet::PNRTAHeader::RTA_TYPE_DATA, profinet::PNRTAHeader::variablePartLenght, and profinet::PNRTAHeader::VERSION_1.

+ Here is the call graph for this function:

◆ TEST_F() [146/152]

profinet::TEST_F ( RtaErrorTests  ,
RejectsTruncatedStatus   
)
Test:
Verify that a truncated four-byte PNIO status is rejected.

Definition at line 979 of file test_alarmListenerRta.cpp.

References ParseRtaError(), profinet::PNRTAHeader::payload, profinet::PNRTAHeader::pduType, profinet::PNRTAHeader::RTA_TYPE_ERR, profinet::PNRTAHeader::variablePartLenght, and profinet::PNRTAHeader::VERSION_1.

+ Here is the call graph for this function:

◆ TEST_F() [147/152]

profinet::TEST_F ( RtaErrorTests  ,
RejectsWrongVariablePartLength   
)
Test:
Verify that an RTA ERR-PDU with the wrong variable length is rejected.

Definition at line 967 of file test_alarmListenerRta.cpp.

References ParseRtaError(), profinet::PNRTAHeader::payload, profinet::PNRTAHeader::pduType, profinet::PNRTAHeader::RTA_TYPE_ERR, profinet::PNRTAHeader::variablePartLenght, and profinet::PNRTAHeader::VERSION_1.

+ Here is the call graph for this function:

◆ TEST_F() [148/152]

profinet::TEST_F ( RtaErrorTests  ,
SequenceErrorIsNotAbort   
)
Test:
Verify that a sequence-number RTA protocol error is not classified as an abort.

Definition at line 991 of file test_alarmListenerRta.cpp.

References error, and ParseRtaError().

+ Here is the call graph for this function:

◆ TEST_F() [149/152]

profinet::TEST_F ( SkipVlanTagsTest  ,
DoubleTaggedQinQFrameReturnsOffset20   
)
Test:
Verify that a QinQ frame with two VLAN tags returns offset 20.

Definition at line 78 of file test_skipVlanTags.cpp.

References frame, and SkipVlanTags().

+ Here is the call graph for this function:

◆ TEST_F() [150/152]

profinet::TEST_F ( SkipVlanTagsTest  ,
ShortFrameReturnsEthernetHeaderLength   
)
Test:
Verify that a truncated Ethernet frame returns the safe offset.

Definition at line 97 of file test_skipVlanTags.cpp.

References frame, and SkipVlanTags().

+ Here is the call graph for this function:

◆ TEST_F() [151/152]

profinet::TEST_F ( SkipVlanTagsTest  ,
Single8021QTagReturnsOffset16   
)
Test:
Verify that one 802.1Q VLAN tag increases the EtherType offset to 16.

Definition at line 68 of file test_skipVlanTags.cpp.

References frame, and SkipVlanTags().

+ Here is the call graph for this function:

◆ TEST_F() [152/152]

profinet::TEST_F ( SkipVlanTagsTest  ,
UntaggedFrameReturnsOffset12   
)
Test:
Verify that an untagged Ethernet frame has an EtherType offset of 12.

Definition at line 61 of file test_skipVlanTags.cpp.

References frame, and SkipVlanTags().

+ Here is the call graph for this function:

◆ TEST_P()

profinet::TEST_P ( RtaErrorsTests  ,
EveryDefinedReasonIsDecoded   
)
Test:
Verify that every defined RTA ErrorCode2 decodes correctly.

Definition at line 1035 of file test_alarmListenerRta.cpp.

References error, ParseRtaError(), profinet::PNRTAHeader::payload, profinet::PNRTAHeader::pduType, profinet::PNRTAHeader::RTA_TYPE_ERR, profinet::PNRTAHeader::variablePartLenght, and profinet::PNRTAHeader::VERSION_1.

+ Here is the call 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".
Examples
/home/runner/work/rhmarine-oefenen/rhmarine-oefenen/profinet-io-controller-stack/include/profinet/util.h.

Definition at line 104 of file util.cpp.

Referenced by profinet::dcp::DCPDHCPBlock::Parse(), TEST(), profinet::rpc::TEST_F(), profinet::rpc::TEST_F(), profinet::rpc::TEST_F(), profinet::rpc::TEST_F(), TEST_F(), 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 117 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.
Examples
/home/runner/work/rhmarine-oefenen/rhmarine-oefenen/profinet-io-controller-stack/include/profinet/util.h.

Definition at line 54 of file util.cpp.

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

+ 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 19 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 13 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 508 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 42 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 941 of file indices.h.

◆ AM_DEVICE_ID

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

AM Device ID.

Definition at line 929 of file indices.h.

◆ AM_FULL_INFO

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

AM Full Info.

Definition at line 931 of file indices.h.

◆ AM_FW_ONLY

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

AM FW Only.

Definition at line 935 of file indices.h.

◆ AM_HW_ONLY

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

AM HW Only.

Definition at line 933 of file indices.h.

◆ AM_LOCATION_SLOT

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

AM Location Slot.

Definition at line 937 of file indices.h.

◆ AM_LOCATION_TREE

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

AM Location Tree.

Definition at line 939 of file indices.h.

◆ API_DATA

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

API Data.

Definition at line 811 of file indices.h.

Referenced by DeviceIndices(), TEST_F(), and TEST_F().

◆ AR_DATA

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

AR Data.

Definition at line 809 of file indices.h.

Referenced by CriticalIndices(), DeviceIndices(), TEST_F(), TEST_F(), and TEST_F().

◆ AR_FSU_DATA_ADJUST

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

AR FSU Data Adjust.

Definition at line 978 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 511 of file indices.h.

◆ AR_TYPE_IOCARSR

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

AR Type Iocarsr.

Definition at line 515 of file indices.h.

◆ AR_TYPE_IOSAR

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

AR Type Iosar.

Definition at line 513 of file indices.h.

◆ AUTO_CONFIG

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

Auto Config.

Definition at line 819 of file indices.h.

Referenced by DeviceIndices(), TEST_F(), and TEST_F().

◆ blockHeaderLength

constexpr int profinet::blockHeaderLength = 6
inlineconstexpr

Constant lenght of a blockHeader.

Definition at line 58 of file protocol.h.

Referenced by profinet::rpc::RPCCon::ApplicationReady(), profinet::rpc::RPCCon::BuildAlarmCrBlock(), TestRpcDevice::BuildApplicationReadyRequestPayload(), TestRpcDevice::BuildControlRequestPayload(), profinet::rpc::RPCCon::Connect(), profinet::rpc::RPCCon::Disconnect(), TestRpcDevice::HandleConnect(), profinet::PNIODHeader::Parse(), profinet::PNARBlockRequest::Parse(), profinet::PNIODReleaseBlock::Parse(), profinet::PNInM0::Parse(), profinet::PNInM1::Parse(), profinet::PNInM2::Parse(), profinet::PNInM3::Parse(), profinet::PNInM4::Parse(), profinet::PNInM5::Parse(), profinet::PNInMReserved< Idx >::Parse(), profinet::PNIOCRBlockRes::Parse(), profinet::PNIOCRBlockReqHeader::Parse(), profinet::PNAlarmCRBlockReq::Parse(), profinet::PNAlarmCRBlockRes::Parse(), profinet::PNAlarmNotificationPDU::Parse(), profinet::PNIODWriteRes::Parse(), profinet::rpc::RPCCon::ParseAlarmCrResponse(), ParseAlarmNotification(), profinet::blocks::ParseBlockHeader(), profinet::diagnosis::ParseDiagnosisSimple(), profinet::rpc::RPCCon::ParseIocrResponse(), profinet::blocks::ParseModuleDiffBlock(), profinet::blocks::ParsePdRealData(), profinet::blocks::ParseRealIdentificationData(), profinet::rpc::RPCCon::Read(), profinet::rpc::RPCCon::ReadImplicit(), profinet::AlarmListener::SendAck(), profinet::rpc::RPCCon::SendControl(), profinet::rpc::TEST_F(), profinet::rpc::TEST_F(), profinet::rpc::TEST_F(), profinet::rpc::RPCCon::Write(), and profinet::rpc::RPCCon::WriteMultiple().

◆ DIAG_ALL_API

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

DIAG All API.

Definition at line 765 of file indices.h.

Referenced by DiagnosisIndices(), and TEST_F().

◆ DIAG_ALL_AR

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

DIAG All AR.

Definition at line 758 of file indices.h.

Referenced by DiagnosisIndices(), and TEST_F().

◆ DIAG_ALL_SLOT

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

DIAG All Slot.

Definition at line 751 of file indices.h.

Referenced by DiagnosisIndices(), and TEST_F().

◆ DIAG_ALL_SUBSLOT

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

DIAG All Subslot.

Definition at line 744 of file indices.h.

Referenced by DiagnosisIndices(), TEST_F(), and TEST_F().

◆ DIAG_CHANNEL_API

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

DIAG Channel API.

Definition at line 763 of file indices.h.

Referenced by DiagnosisIndices(), and TEST_F().

◆ DIAG_CHANNEL_AR

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

DIAG Channel AR.

Definition at line 756 of file indices.h.

Referenced by DiagnosisIndices(), and TEST_F().

◆ DIAG_CHANNEL_SLOT

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

DIAG Channel Slot.

Definition at line 749 of file indices.h.

Referenced by DiagnosisIndices(), and TEST_F().

◆ DIAG_CHANNEL_SUBSLOT

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

DIAG Channel Subslot.

Definition at line 742 of file indices.h.

Referenced by DiagnosisIndices(), TEST_F(), and TEST_F().

◆ DIAG_DEVICE

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

DIAG Device.

Definition at line 770 of file indices.h.

Referenced by CriticalIndices(), DiagnosisIndices(), TEST_F(), TEST_F(), and TEST_F().

◆ DIAG_MAINTENANCE_API

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

DIAG Maintenance API.

Definition at line 767 of file indices.h.

Referenced by DiagnosisIndices(), and TEST_F().

◆ DIAG_MAINTENANCE_AR

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

DIAG Maintenance AR.

Definition at line 760 of file indices.h.

Referenced by DiagnosisIndices(), and TEST_F().

◆ DIAG_MAINTENANCE_SLOT

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

DIAG Maintenance Slot.

Definition at line 753 of file indices.h.

Referenced by DiagnosisIndices(), and TEST_F().

◆ DIAG_MAINTENANCE_SUBSLOT

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

DIAG Maintenance Subslot.

Definition at line 746 of file indices.h.

Referenced by DiagnosisIndices(), TEST_F(), and TEST_F().

◆ ETHERTYPE_PROFINET

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

EtherType used by PROFINET RTA frames (0x8892).

Definition at line 40 of file alarmListener.h.

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

◆ EXPECTED_ID_AR

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

Expected ID AR.

Definition at line 799 of file indices.h.

◆ EXPECTED_ID_SUBSLOT

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

Expected ID Subslot.

Definition at line 794 of file indices.h.

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

◆ F_PARAMETER_BLOCK

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

F Parameter Block.

Definition at line 950 of file indices.h.

◆ F_PARAMETER_READ

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

F Parameter Read.

Definition at line 958 of file indices.h.

◆ F_PARAMETER_WRITE

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

F Parameter Write.

Definition at line 956 of file indices.h.

◆ F_PRM_FLAG1

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

F Prm Flag1.

Definition at line 952 of file indices.h.

◆ F_PRM_FLAG2

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

F Prm Flag2.

Definition at line 954 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 36 of file alarmListener.h.

Referenced by profinet::AlarmListener::HandleLayer2Frame(), profinet::AlarmListener::SendRtaFrame(), TEST(), and TEST_F().

◆ 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 38 of file alarmListener.h.

Referenced by profinet::AlarmListener::HandleLayer2Frame(), profinet::AlarmListener::SendRtaFrame(), TEST(), TEST_F(), TEST_F(), and TEST_F().

◆ IM0

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

I&M0.

Definition at line 701 of file indices.h.

Referenced by CriticalIndices(), ImIndices(), TEST_F(), TEST_F(), and TEST_F().

◆ IM0_FILTER_DATA

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

I&M0 Filter Data.

Definition at line 733 of file indices.h.

Referenced by CriticalIndices(), and TEST_F().

◆ IM1

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

◆ IM10

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

I&M10.

Definition at line 721 of file indices.h.

Referenced by ImIndices().

◆ IM11

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

I&M11.

Definition at line 723 of file indices.h.

Referenced by ImIndices().

◆ IM12

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

I&M12.

Definition at line 725 of file indices.h.

Referenced by ImIndices().

◆ IM13

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

I&M13.

Definition at line 727 of file indices.h.

Referenced by ImIndices().

◆ IM14

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

I&M14.

Definition at line 729 of file indices.h.

Referenced by ImIndices().

◆ IM15

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

I&M15.

Definition at line 731 of file indices.h.

Referenced by ImIndices(), and TEST_F().

◆ IM2

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

◆ IM3

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

◆ IM4

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

I&M4.

Definition at line 709 of file indices.h.

Referenced by ImIndices().

◆ IM5

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

I&M5.

Definition at line 711 of file indices.h.

Referenced by ImIndices().

◆ IM6

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

I&M6.

Definition at line 713 of file indices.h.

Referenced by ImIndices().

◆ IM7

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

I&M7.

Definition at line 715 of file indices.h.

Referenced by ImIndices().

◆ IM8

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

I&M8.

Definition at line 717 of file indices.h.

Referenced by ImIndices().

◆ IM9

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

I&M9.

Definition at line 719 of file indices.h.

Referenced by ImIndices().

◆ IP_ETHERTYPE

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

◆ ISOCHRONOUS_MODE_DATA

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

Isochronous Mode Data.

Definition at line 905 of file indices.h.

◆ kInputFrameId

◆ kOutputFrameId

◆ 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 855 of file protocol.h.

Referenced by profinet::rpc::BuildObjectUuid(), and profinet::PNRPCHeader::PrefixedUuid().

◆ LOG_DATA

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

Log Data.

Definition at line 821 of file indices.h.

Referenced by CriticalIndices(), DeviceIndices(), TEST_F(), TEST_F(), and TEST_F().

◆ macAddressLength

◆ MAINT_DEMANDED_ALL_SUBSLOT

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

MAINT Demanded All Subslot.

Definition at line 785 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 781 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 783 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 779 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).

Examples
/home/runner/work/rhmarine-oefenen/rhmarine-oefenen/profinet-io-controller-stack/include/profinet/util.h.

Definition at line 28 of file util.h.

Referenced by profinet::AsioEthernetSocket::EthernetPacketBackend::OpenCapture().

◆ 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 641 of file indices.h.

Referenced by GetModuleStateName(), and TEST_F().

◆ MODULE_STATE_PROPER_MODULE

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

◆ MODULE_STATE_SUBSTITUTE_MODULE

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

Module State Substitute Module.

Definition at line 647 of file indices.h.

Referenced by GetModuleStateName(), and TEST_F().

◆ MODULE_STATE_WRONG_MODULE

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

Module State Wrong Module.

Definition at line 643 of file indices.h.

Referenced by GetModuleStateName(), and TEST_F().

◆ PD_EXPECTED_DATA

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

PD Expected Data.

Definition at line 817 of file indices.h.

Referenced by DeviceIndices(), TEST_F(), and TEST_F().

◆ PD_INTERFACE_ADJUST

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

PD Interface Adjust.

Definition at line 851 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 853 of file indices.h.

Referenced by InterfaceIndices(), TEST_F(), and TEST_F().

◆ PD_INTERFACE_FSU_ADJUST

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

PD Interface FSU Adjust.

Definition at line 855 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 883 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 881 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 879 of file indices.h.

Referenced by InterfaceIndices(), TEST_F(), and TEST_F().

◆ PD_IR_DATA

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

PD IR Data.

Definition at line 834 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 903 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 849 of file indices.h.

Referenced by InterfaceIndices(), TEST_F(), and TEST_F().

◆ PD_PORT_DATA_ADJUST

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

PD Port Data Adjust.

Definition at line 838 of file indices.h.

Referenced by PortIndices(), TEST_F(), and TEST_F().

◆ PD_PORT_DATA_CHECK

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

PD Port Data Check.

Definition at line 832 of file indices.h.

Referenced by PortIndices(), TEST_F(), and TEST_F().

◆ PD_PORT_DATA_REAL

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

PD Port Data Real.

Definition at line 830 of file indices.h.

Referenced by PortIndices(), TEST_F(), and TEST_F().

◆ 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 868 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 866 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 864 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 886 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 888 of file indices.h.

Referenced by PortIndices(), TEST_F(), and TEST_F().

◆ 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 890 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 892 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 894 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 870 of file indices.h.

◆ PD_PORT_STATISTIC

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

PD Port Statistic.

Definition at line 840 of file indices.h.

Referenced by PortIndices(), TEST_F(), and TEST_F().

◆ PD_REAL_DATA

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

◆ PD_SYNC_DATA

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

PD Sync Data.

Definition at line 836 of file indices.h.

◆ PD_TIME_DATA

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

PD Time Data.

Definition at line 907 of file indices.h.

◆ PDEV_DATA

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

Pdev Data.

Definition at line 813 of file indices.h.

Referenced by DeviceIndices(), TEST_F(), and TEST_F().

◆ 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 681 of file indices.h.

Referenced by GetPeModeName(), TEST_F(), and TEST_F().

◆ 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 679 of file indices.h.

Referenced by GetPeModeName(), and TEST_F().

◆ PE_MODE_OPERATE

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

PE Mode Operate.

Definition at line 683 of file indices.h.

Referenced by GetPeModeName(), and TEST_F().

◆ PE_MODE_POWER_OFF

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

PE Mode Power Off.

Definition at line 677 of file indices.h.

Referenced by GetPeModeName(), and TEST_F().

◆ 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 687 of file indices.h.

Referenced by GetPeModeName(), and TEST_F().

◆ 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 685 of file indices.h.

Referenced by GetPeModeName(), and TEST_F().

◆ PROFIENERGY

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

Profienergy.

Definition at line 967 of file indices.h.

◆ PROFINET_ETHERTYPE

◆ REAL_ID_API

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

◆ REAL_ID_AR

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

Real ID AR.

Definition at line 801 of file indices.h.

◆ REAL_ID_SUBSLOT

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

Real ID Subslot.

Definition at line 796 of file indices.h.

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

◆ 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 918 of file indices.h.

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

◆ RECORD_OUTPUT_DATA

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

Record Output Data.

Definition at line 920 of file indices.h.

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

◆ 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 656 of file indices.h.

Referenced by GetSubmoduleStateName(), and TEST_F().

◆ 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 654 of file indices.h.

Referenced by GetSubmoduleStateName(), and TEST_F().

◆ SUBMODULE_STATE_NO_SUBMODULE

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

Submodule State No Submodule.

Definition at line 650 of file indices.h.

Referenced by GetSubmoduleStateName(), and TEST_F().

◆ SUBMODULE_STATE_OK

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

◆ SUBMODULE_STATE_WRONG_SUBMODULE

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

Submodule State Wrong Submodule.

Definition at line 652 of file indices.h.

Referenced by GetSubmoduleStateName(), TEST_F(), TEST_F(), TEST_F(), and TEST_F().

◆ SUBSLOT_DAP

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

Subslot DAP.

Definition at line 987 of file indices.h.

◆ SUBSLOT_INTERFACE

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

Subslot Interface.

Definition at line 989 of file indices.h.

◆ SUBSLOT_PORT1

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

Subslot Port1.

Definition at line 991 of file indices.h.

◆ SUBSLOT_PORT2

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

Subslot Port2.

Definition at line 993 of file indices.h.

◆ SUBSTITUTE_VALUES

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

Substitute Values.

Definition at line 916 of file indices.h.

Referenced by AllStandardIndices(), and TEST_F().

◆ uuidLenght

◆ VLAN_ETHERTYPE

◆ WRITE_MULTIPLE

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

Write Multiple.

Definition at line 976 of file indices.h.

Referenced by TEST_F(), and TEST_F().