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

Namespaces

namespace  raw
 

Classes

struct  AllIM
 All I&M records a device supports, read in one call. More...
 
struct  ApplicationRelations
 
struct  BlockHeaderView
 Generic block header (type + length) used to scan response blocks. More...
 
struct  ConnectResult
 Result of a successful RPCCon::Connect() that also established cyclic IO. More...
 
struct  EPMEndpoint
 One RPC endpoint advertised by a device's Endpoint Mapper. More...
 
struct  IndexProbeResult
 Result of probing one index in EnumerateIndices(). More...
 
struct  IOCRSetup
 Configuration for establishing cyclic IO alongside an AR. More...
 
struct  IOSlot
 One slot/subslot's expected module configuration and IO data sizes. More...
 
class  IRPCCon
 Abstract interface for a PROFINET RPC connection. More...
 
class  IRpcTransport
 
class  MockRPCCon
 Google Mock implementation of the IRPCCon RPC connection interface. More...
 
class  RPCCon
 Connection to a PROFINET IO-Device: establishes an AR (Application Relationship) and performs acyclic read/write and CONTROL operations. More...
 
struct  RPCConOptions
 Configuration options for an RPC connection. More...
 
class  RpcTests
 
class  RpcTransport
 Synchronous UDP transport used by PROFINET DCE/RPC. More...
 
struct  WriteItem
 A single write operation for WriteMultiple(). More...
 

Enumerations

enum class  StartupMode : std::uint16_t { Legacy , Advanced }
 

Functions

BlockHeaderView PeekBlockHeader (const Bytes &data, std::size_t offset)
 
std::array< std::uint8_t, uuidLenght > BuildObjectUuid (std::uint8_t b10, std::uint8_t b11, std::uint8_t b12, std::uint8_t b13, std::uint8_t b14, std::uint8_t b15)
 Builds a PROFINET object UUID.
 
std::string UuidBytesToString (const std::array< std::uint8_t, uuidLenght > &data)
 Format a 16-byte DCE/RPC UUID as a canonical string.
 
std::array< std::uint8_t, uuidLenght > StringToUuidBytes (const std::string &uuidStr)
 Parse a canonical UUID string into 16 raw DCE/RPC UUID bytes.
 
std::optional< EPMEndpoint > ParseEpmTower (const Bytes &towerData)
 Parses a DCE/RPC EPM tower into a PROFINET endpoint.
 
dcp::DCPDeviceDescription GetStationInfo (IRawEthernetSocket &sock, const MacAddress &src, const std::string &name, double timeoutSec=DEFAULT_TIMEOUT *2)
 Resolve a device by PROFINET station name via DCP.
 
 TEST_F (RpcTests, UuidBytesToStringStringToUuidBytesRoundtrip)
 
 TEST_F (RpcTests, StringToUuidBytesRejectsMalformedInput)
 
 TEST_F (RpcTests, EPMEndpointResolvesWellKnownProfinetInterfaceNames)
 
 TEST_F (RpcTests, EPMEndpointUnknownUuidIncludesUuid)
 
 TEST_F (RpcTests, EPMEndpointInterfaceNameIsCaseInsensitive)
 
 TEST_F (RpcTests, IOCRSetupCycleTimeCalculation)
 
 TEST_F (RpcTests, IOCRSetupValidateFlagsEmptySlotsAndLowWatchdog)
 
 TEST_F (RpcTests, IOCRSetupValidateEmptySlots)
 
 TEST_F (RpcTests, IOCRSetupValidateLowWatchdog)
 
 TEST_F (RpcTests, IOCRSetupValidateNormalConfiguration)
 
 TEST_F (RpcTests, CreateRpcBuildsExpectedHeader)
 
 TEST_F (RpcTests, PNRPCHeaderInterfaceUuidBytes)
 
 TEST_F (RpcTests, BuildIocrBlockUsesConfiguredSlots)
 
 TEST_F (RpcTests, GenerateNonZeroArUuid)
 
 TEST_F (RpcTests, GenerateDifferentArUuids)
 
 TEST_F (RpcTests, GenerateIndependentArAndActivityUuids)
 
 TEST_F (RpcTests, GenerateNonZeroSessionKey)
 
 TEST_F (RpcTests, GeneratedSessionKeysAreAlwaysNonZero)
 
 TEST_F (RpcTests, BuildsExpectedRemoteObjectUuid)
 
 TEST_F (RpcTests, BuildObjectUuidPreservesDeviceAndVendorBytes)
 
 TEST_F (RpcTests, BuildObjectUuidUsesFixedProfinetPrefixAndSuffix)
 
 TEST_F (RpcTests, RemoteObjectUuidHasExpectedLength)
 
 TEST_F (RpcTests, EPMEndpointInterfaceNamePnioDevice)
 
 TEST_F (RpcTests, EPMEndpointInterfaceNamePnioController)
 
 TEST_F (RpcTests, EPMEndpointInterfaceNamePnioSupervisor)
 
 TEST_F (RpcTests, EPMEndpointInterfaceNamePnioParameterServer)
 
 TEST_F (RpcTests, EPMEndpointInterfaceNameEpm)
 
 TEST_F (RpcTests, EPMEndpointInterfaceNameUnknown)
 
 TEST_F (RpcTests, EPMEndpointInterfaceNameIsCaseInsensitiveForAllKnownInterfaces)
 
 TEST_F (RpcTests, ParseEpmTowerRejectsTooShortTower)
 
 TEST_F (RpcTests, ParseEpmTowerStopsOnTruncatedFloorHeader)
 
 TEST_F (RpcTests, ParseEpmTowerStopsOnTruncatedLhs)
 
 TEST_F (RpcTests, ParseEpmTowerStopsOnTruncatedRhsLength)
 
 TEST_F (RpcTests, ParseEpmTowerStopsOnTruncatedRhs)
 
 TEST_F (RpcTests, ParseEpmTowerSkipsEmptyLhs)
 
 TEST_F (RpcTests, MakeInterfaceTowerLhsCreatesValidInterfaceBlock)
 
 TEST_F (RpcTests, ParseEpmTowerParsesInterfaceFloor)
 
 TEST_F (RpcTests, ParseEpmTowerSkipsEmptyFloor)
 
 TEST_F (RpcTests, MakeEpmTowerEncodesEmptyThenInterfaceFloor)
 
 TEST_F (RpcTests, ParseEpmTowerParsesInterfaceUuidAndVersions)
 
 TEST_F (RpcTests, ParseEpmTowerInterfaceFloorWithoutMinorVersion)
 
 TEST_F (RpcTests, ParseEpmTowerRejectsShortInterfaceFloor)
 
 TEST_F (RpcTests, ParseEpmTowerParsesUdpProtocol)
 
 TEST_F (RpcTests, ParseEpmTowerParsesBigEndianPort)
 
 TEST_F (RpcTests, ParseEpmTowerIgnoresShortPortRhs)
 
 TEST_F (RpcTests, ParseEpmTowerParsesIpv4Address)
 
 TEST_F (RpcTests, ParseEpmTowerIgnoresShortIpRhs)
 
 TEST_F (RpcTests, ParseEpmTowerParsesCompleteEndpoint)
 
 TEST_F (RpcTests, ParseEpmTowerOnlyUsesFirstInterfaceFloorForInterfaceData)
 
 TEST_F (RpcTests, ParseEpmTowerIgnoresInterfaceDataFromLaterFloor)
 
 TEST_F (RpcTests, ParseEpmTowerIgnoresUnknownProtocol)
 
 TEST_F (RpcTests, ParseEpmTowerContinuesAcrossAllFloors)
 Verifies that protocol, port and IP floors are parsed after the interface floor.
 
 TEST_F (RpcTests, EpmLookupReturnsParsedEndpoint)
 
 TEST_F (RpcTests, EpmLookupBuildsInterfaceFilteredRequest)
 
 TEST_F (RpcTests, EpmLookupReturnsEmptyForShortResponse)
 
 TEST_F (RpcTests, EpmLookupReturnsEmptyForFaultResponse)
 
 TEST_F (RpcTests, EpmLookupReturnsEmptyForUnexpectedResponseType)
 
 TEST_F (RpcTests, EpmLookupReturnsEmptyForShortBody)
 
 TEST_F (RpcTests, EpmLookupClampsBodyLengthToReceivedData)
 
 TEST_F (RpcTests, EpmLookupStopsOnTruncatedEntryUuid)
 
 TEST_F (RpcTests, EpmLookupStopsOnTruncatedTowerPointer)
 
 TEST_F (RpcTests, EpmLookupStopsOnTruncatedAnnotationLength)
 
 TEST_F (RpcTests, EpmLookupHandlesZeroLengthAnnotation)
 
 TEST_F (RpcTests, EpmLookupTrimsTrailingAnnotationZeros)
 
 TEST_F (RpcTests, EpmLookupIgnoresEntryWithInvalidTower)
 
 TEST_F (RpcTests, GetStationInfoReturnsFirstDirectResponse)
 
 TEST_F (RpcTests, GetStationInfoSendsStationNameRequest)
 
 TEST_F (RpcTests, GetStationInfoFallsBackToDiscovery)
 
 TEST_F (RpcTests, GetStationInfoDiscoveryMatchesStationNameCaseInsensitive)
 
 TEST_F (RpcTests, GetStationInfoDiscoverySkipsNonMatchingDevice)
 
 TEST_F (RpcTests, GetStationInfoThrowsWhenDiscoveryFindsNoMatchingDevice)
 
 TEST_F (RpcTests, GetStationInfoNotFoundExceptionContainsStationName)
 
 TEST_F (RpcTests, GetStationInfoThrowsWhenDiscoveryReturnsNoResponses)
 
 TEST_F (RpcTests, GetStationInfoDoesNotFilterNonEmptyDirectResponse)
 
 TEST_F (RpcTests, CreateNrdBuildsExpectedWrapper)
 
 TEST_F (RpcTests, CreateNrdHandlesEmptyPayload)
 
 TEST_F (RpcTests, CreateNrdRoundTripsThroughSerialization)
 
 TEST_F (RpcTests, BuildAlarmCrBlockUsesProfinetEtherTypeForTransportZero)
 
 TEST_F (RpcTests, BuildAlarmCrBlockUsesIpEtherTypeForNonZeroTransport)
 
 TEST_F (RpcTests, BuildAlarmCrBlockEncodesPriority)
 
 TEST_F (RpcTests, BuildAlarmCrBlockCombinesTransportAndPriority)
 
 TEST_F (RpcTests, BuildAlarmCrBlockCreatesExpectedBlockHeader)
 
 TEST_F (RpcTests, ParseAlarmCrResponseReturnsMinusOneForEmptyData)
 
 TEST_F (RpcTests, ParseAlarmCrResponseReturnsMinusOneForShortData)
 
 TEST_F (RpcTests, ParseAlarmCrResponseIgnoresUnrelatedBlock)
 
 TEST_F (RpcTests, ParseAlarmCrResponseReturnsLocalAlarmReference)
 
 TEST_F (RpcTests, ParseAlarmCrResponseContinuesAfterUnrelatedBlock)
 
 TEST_F (RpcTests, ParseAlarmCrResponseContinuesAfterMalformedAlarmBlock)
 
 TEST_F (RpcTests, ParseAlarmCrResponseIgnoresTruncatedAlarmBlock)
 
 TEST_F (RpcTests, ParseAlarmCrResponseContinuesAfterMalformedBlock)
 
 TEST_F (RpcTests, ParseAlarmCrResponseReturnsMinusOneAfterUnrelatedBlocks)
 
 TEST_F (RpcTests, IsConnectedReturnsFalseInitially)
 
 TEST_F (RpcTests, InfoReturnsDeviceDescription)
 
 TEST_F (RpcTests, ArUuidReturnsConnectionArUuid)
 
 TEST_F (RpcTests, SessionKeyReturnsInitialValue)
 
 TEST_F (RpcTests, LocalAlarmRefReturnsConfiguredValue)
 
 TEST_F (RpcTests, DeviceAlarmRefReturnsZeroInitially)
 
 TEST_F (RpcTests, HasAlarmCrReturnsFalseInitially)
 
 TEST_F (RpcTests, ParseIocrResponseReturnsZeroForEmptyData)
 
 TEST_F (RpcTests, ParseIocrResponseReturnsZeroForShortData)
 
 TEST_F (RpcTests, ParseIocrResponseIgnoresUnrelatedBlock)
 
 TEST_F (RpcTests, ParseIocrResponseIgnoresDifferentIocrType)
 
 TEST_F (RpcTests, ParseIocrResponseReturnsMatchingFrameId)
 
 TEST_F (RpcTests, ParseIocrResponseIgnoresMalformedIocrBlock)
 
 TEST_F (RpcTests, ParseIocrResponseFindsMatchingBlockAfterUnrelatedBlock)
 
 TEST_F (RpcTests, SendReceiveReturnsResponseAndMarksConnectionLive)
 
 TEST_F (RpcTests, SendReceiveRetriesAfterRequestPacket)
 
 TEST_F (RpcTests, SendReceiveThrowsForShortResponse)
 
 TEST_F (RpcTests, SendReceiveThrowsRpcFaultError)
 
 TEST_F (RpcTests, SendReceiveThrowsForRejectedResponse)
 
 TEST_F (RpcTests, SendReceiveThrowsForUnexpectedPacketType)
 
 TEST_F (RpcTests, CheckTimeoutDoesNothingWhenNotConnected)
 
 TEST_F (RpcTests, CheckTimeoutDoesNotReconnectBeforeTimeout)
 
 TEST_F (RpcTests, CheckTimeoutReconnectsAfterTimeout)
 
 TEST_F (RpcTests, ConnectRequiresSourceMacForInitialConnection)
 
 TEST_F (RpcTests, ConnectEstablishesBasicApplicationRelation)
 
 TEST_F (RpcTests, ConnectRequestsAlarmCr)
 
 TEST_F (RpcTests, ConnectLeavesAlarmCrDisabledWhenResponseHasNoAlarmCr)
 
 TEST_F (RpcTests, ConnectConvertsDevicePnioError)
 
 TEST_F (RpcTests, ConnectConvertsRpcError)
 
 TEST_F (RpcTests, ConnectReusesSourceMacDuringReconnect)
 
 TEST_F (RpcTests, ConnectReplacesSourceMacDuringReconnect)
 
 TEST_F (RpcTests, ConnectRejectsMissingSourceMacDuringReconnect)
 
 TEST_F (RpcTests, ConnectReturnsConnectResultForIocrSetup)
 
 TEST_F (RpcTests, ReadReturnsParsedIodResponse)
 
 TEST_F (RpcTests, ReadThrowsPnioErrorForDeviceError)
 
 TEST_F (RpcTests, ReadImplicitReturnsParsedIodResponse)
 
 TEST_F (RpcTests, ReadImplicitThrowsPnioErrorForDeviceError)
 
 TEST_F (RpcTests, WriteCompletesSuccessfully)
 
 TEST_F (RpcTests, WriteThrowsPnioErrorForDeviceError)
 
 TEST_F (RpcTests, ReadRawReturnsPayload)
 
 TEST_F (RpcTests, ReadImWrappersReadAllIndividualIndices)
 
 TEST_F (RpcTests, ReadAllImReturnsAllSuccessfulRecords)
 
 TEST_F (RpcTests, ReadAllImIgnoresRpcErrorForOptionalRecord)
 
 TEST_F (RpcTests, ReadAllImIgnoresStandardExceptionForOptionalRecord)
 
 TEST_F (RpcTests, ReadAllImPropagatesIm0Failure)
 
 TEST_F (RpcTests, WriteMultipleReturnsEmptyForNoWrites)
 
 TEST_F (RpcTests, WriteMultipleSendsMultipleWrites)
 
 TEST_F (RpcTests, WriteMultipleThrowsPnioErrorForDeviceError)
 
 TEST_F (RpcTests, ReadModuleDiffReturnsParsedModuleDifference)
 
 TEST_F (RpcTests, ReadDiagnosisUsesFullDiagnosisParser)
 
 TEST_F (RpcTests, ReadDiagnosisFallsBackToSimpleParser)
 
 TEST_F (RpcTests, ReadDiagnosisReturnsEmptyForShortDiagnosisPayload)
 
 TEST_F (RpcTests, ReadDiagnosisReturnsEmptyForRpcError)
 
 TEST_F (RpcTests, ReadAllDiagnosisReturnsNonEmptyDiagnosisResults)
 
 TEST_F (RpcTests, ReadAllDiagnosisContinuesAfterRpcError)
 
 TEST_F (RpcTests, ReadPdRealDataReturnsParsedData)
 
 TEST_F (RpcTests, ReadRealIdentificationDataReturnsParsedData)
 
 TEST_F (RpcTests, DiscoverSlotsReturnsRealIdentificationSlots)
 
 TEST_F (RpcTests, DiscoverTopologyReturnsBothTopologyRecords)
 
 TEST_F (RpcTests, EnumerateIndicesReportsAllProbeOutcomes)
 
 TEST_F (RpcTests, SendControlRejectsDisconnectedConnection)
 
 TEST_F (RpcTests, SendControlSendsWithoutWaiting)
 
 TEST_F (RpcTests, SendControlReturnsResponsePayload)
 
 TEST_F (RpcTests, SendControlThrowsPnioErrorForDeviceError)
 
 TEST_F (RpcTests, PrmBeginSendsExpectedControlCommand)
 
 TEST_F (RpcTests, PrmEndSendsExpectedControlCommand)
 
 TEST_F (RpcTests, ReadyForRtClass3SendsExpectedControlCommand)
 
 TEST_F (RpcTests, ParseRawRpcHeaderRejectsShortData)
 
 TEST_F (RpcTests, ParseRawRpcHeaderParsesBigEndian)
 
 TEST_F (RpcTests, ParseRawRpcHeaderParsesLittleEndian)
 
 TEST_F (RpcTests, ParseRawRpcHeaderPreservesSerialHigh)
 
 TEST_F (RpcTests, ParseRawRpcHeaderExtractsPayloadAfterFixedHeader)
 
 TEST_F (RpcTests, ApplicationReadyThrowsWhenNotConnected)
 
 TEST_F (RpcTests, ApplicationReadySkipsInvalidRawRpcPacket)
 
 TEST_F (RpcTests, ApplicationReadySkipsNonRequestPacket)
 
 TEST_F (RpcTests, ApplicationReadySkipsNonControlOperation)
 
 TEST_F (RpcTests, ApplicationReadySkipsShortNrdPayload)
 
 TEST_F (RpcTests, ApplicationReadySkipsShortNrdBody)
 
 TEST_F (RpcTests, ApplicationReadySkipsWrongControlBlockType)
 
 TEST_F (RpcTests, ApplicationReadyProcessesBigEndianRequest)
 
 TEST_F (RpcTests, ApplicationReadyProcessesLittleEndianRequest)
 
 TEST_F (RpcTests, ApplicationReadyAcceptsUnexpectedControlCommand)
 
 TEST_F (RpcTests, ApplicationReadyPropagatesReceiveException)
 
 TEST_F (RpcTests, DisconnectSendsReleaseRequestAndClearsLive)
 
 TEST_F (RpcTests, DisconnectBuildsCorrectReleaseBlock)
 
 TEST_F (RpcTests, DisconnectDoesNothingWhenNotLive)
 
 TEST_F (RpcTests, DisconnectSwallowsSendExceptionAndClearsLive)
 
 TEST_F (RpcTests, DisconnectAlwaysClearsLive)
 
 TEST_F (RpcTests, CloseDisconnectsAndClosesBothTransports)
 
 TEST_F (RpcTests, CloseClosesBothTransportsWhenNotLive)
 

Variables

constexpr std::uint8_t VERSION_HIGH = 0x01
 Version high.
 
constexpr std::uint8_t VERSION_LOW = 0x00
 Version low.
 
constexpr std::uint16_t RPC_PORT = 0x8894
 PROFINET IO RPC port (34964).
 
constexpr std::uint16_t RPC_BIND_PORT = 0x8895
 PROFINET IO RPC bind port (34965).
 
const std::string UUID_NULL = "00000000-0000-0000-0000-000000000000"
 Null (all-zero) DCE/RPC UUID string.
 
const std::string UUID_EPM_V4 = "e1af8308-5d1f-11c9-91a4-08002b14a0fa"
 Endpoint Mapper interface UUID.
 
const std::string UUID_PNIO_DEVICE = "dea00001-6c97-11d1-8271-00a02442df7d"
 PROFINET IO-Device interface UUID.
 
const std::string UUID_PNIO_CONTROLLER = "dea00002-6c97-11d1-8271-00a02442df7d"
 PROFINET IO-Controller interface UUID.
 
const std::string UUID_PNIO_SUPERVISOR = "dea00003-6c97-11d1-8271-00a02442df7d"
 PROFINET IO-Supervisor interface UUID.
 
const std::string UUID_PNIO_PARAMETER_SERVER = "dea00004-6c97-11d1-8271-00a02442df7d"
 PROFINET IO-ParameterServer interface UUID.
 
constexpr std::uint32_t PNIO_DEVICE_INTERFACE_VERSION = 1
 Interface version used for the PNIO device interface.
 
constexpr std::uint32_t EPM_LOOKUP = 0x02
 EPM operation: Lookup.
 
constexpr std::uint32_t EPM_INQUIRY_ALL = 0x00
 EPM inquiry type: all interfaces.
 
constexpr std::uint32_t EPM_INQUIRY_INTERFACE = 0x01
 EPM inquiry type: specific interface.
 
constexpr double DEFAULT_TIMEOUT = 5.0
 Default RPC response timeout in seconds.
 
constexpr double CONNECTION_TIMEOUT = 10.0
 Maximum idle time in seconds before an AR is considered to need re-connection.
 
constexpr std::uint16_t BLOCK_IOD_CONTROL_PRM_END_REQ = 0x0110
 Block type: IODControlReqPrmEnd.
 
constexpr std::uint16_t BLOCK_IOD_CONTROL_APP_READY_REQ = 0x0112
 Block type: IODControlReqAppReady.
 
constexpr std::uint16_t BLOCK_IOD_CONTROL_APP_READY_RES = 0x8112
 Block type: IODControlResAppReady.
 
constexpr std::uint16_t BLOCK_IOD_CONTROL_RT_CLASS_3_REQ = 0x0117
 Block type: IODControlReqRTClass3.
 
constexpr std::uint16_t BLOCK_PRM_BEGIN_REQ = 0x0118
 Block type: PrmBeginReq.
 
constexpr std::uint16_t BLOCK_RELEASE_REQ = 0x0114
 Block type: IODReleaseReq.
 
constexpr std::uint16_t CONTROL_CMD_PRM_END = 0x0001
 Control command bit: PrmEnd.
 
constexpr std::uint16_t CONTROL_CMD_APP_READY = 0x0002
 Control command bit: ApplicationReady.
 
constexpr std::uint16_t CONTROL_CMD_RELEASE = 0x0004
 Control command bit: Release.
 
constexpr std::uint16_t CONTROL_CMD_DONE = 0x0008
 Control command bit: Done.
 
constexpr std::uint16_t CONTROL_CMD_READY_FOR_COMPANION = 0x0010
 Control command bit: ReadyForCompanion.
 
constexpr std::uint16_t CONTROL_CMD_READY_FOR_RT_CLASS_3 = 0x0020
 Control command bit: ReadyForRTClass3.
 
constexpr std::uint16_t CONTROL_CMD_PRM_BEGIN = 0x0040
 Control command bit: PrmBegin.
 

Enumeration Type Documentation

◆ StartupMode

enum class profinet::rpc::StartupMode : std::uint16_t
strong
Enumerator
Legacy 
Advanced 

Definition at line 123 of file rpcTypes.h.

Function Documentation

◆ BuildObjectUuid()

std::array< std::uint8_t, uuidLenght > profinet::rpc::BuildObjectUuid ( std::uint8_t  b10,
std::uint8_t  b11,
std::uint8_t  b12,
std::uint8_t  b13,
std::uint8_t  b14,
std::uint8_t  b15 
)

Builds a PROFINET object UUID.

Constructs the 16-byte PROFINET object UUID using the fixed PROFINET UUID prefix and the shared PROFINET UUID suffix. The six supplied bytes are placed in the UUID node field and therefore provide the unique device-specific portion of the UUID.

The resulting UUID has the following layout:

DE A0 00 00 6C 97 11 D1 82 71 b10 b11 b12 b13 b14 b15
Parameters
b10First byte of the UUID node field.
b11Second byte of the UUID node field.
b12Third byte of the UUID node field (deviceHigh).
b13Fourth byte of the UUID node field (deviceLow).
b14Fifth byte of the UUID node field (vendorHigh).
b15Sixth byte of the UUID node field (vendorLow).
Returns
The constructed 16-byte PROFINET object UUID.

Definition at line 56 of file rpc.cpp.

References profinet::kPnUuidSuffix.

Referenced by profinet::rpc::RPCCon::RPCCon(), and profinet::rpc::RpcTests::InvokeSetRPCConInfo().

+ Here is the caller graph for this function:

◆ GetStationInfo()

dcp::DCPDeviceDescription profinet::rpc::GetStationInfo ( IRawEthernetSocket &  sock,
const MacAddress &  src,
const std::string &  name,
double  timeoutSec = DEFAULT_TIMEOUT * 2 
)

Resolve a device by PROFINET station name via DCP.

Parameters
sockBound Ethernet socket to send/receive on.
srcSource MAC address to send from.
nameStation name to resolve.
timeoutSecHow long to wait for each discovery attempt.
Returns
The resolved device's DCP description.

Falls back from a filtered Identify request to a broadcast discover + name filter. Throws DCPDeviceNotFoundError if no matching device responds.

Definition at line 509 of file rpc.cpp.

References profinet::Mac, profinet::dcp::MakeBlockKey(), profinet::dcp::DCPDeviceDescription::name, profinet::PNDCPBlock::NAME_OF_STATION, profinet::dcp::ReadResponse(), profinet::dcp::SendDiscover(), and profinet::dcp::SendRequest().

Referenced by profinet::device::ProfinetDevice::Discover(), 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:

◆ ParseEpmTower()

std::optional< EPMEndpoint > profinet::rpc::ParseEpmTower ( const Bytes &  towerData)

Parses a DCE/RPC EPM tower into a PROFINET endpoint.

Parameters
towerDataRaw EPM tower bytes.
Returns
Parsed endpoint when a valid interface UUID is present; otherwise std::nullopt.

Definition at line 239 of file rpc.cpp.

References profinet::wire::Reader::Fixed(), profinet::rpc::EPMEndpoint::interfaceUuid, profinet::rpc::EPMEndpoint::interfaceVersionMajor, profinet::rpc::EPMEndpoint::interfaceVersionMinor, profinet::rpc::EPMEndpoint::ipAddress, profinet::rpc::EPMEndpoint::port, profinet::rpc::EPMEndpoint::protocol, profinet::wire::Reader::ReadBytes(), profinet::wire::Reader::Remaining(), profinet::wire::Reader::SkipTo(), profinet::wire::Reader::U16(), profinet::wire::Reader::U16LittleEndian(), UuidBytesToString(), and profinet::uuidLenght.

Referenced by profinet::rpc::RPCCon::EpmLookup(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), 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:

◆ PeekBlockHeader()

BlockHeaderView profinet::rpc::PeekBlockHeader ( const Bytes &  data,
std::size_t  offset 
)
inline

Definition at line 54 of file rpc.h.

References profinet::wire::Reader::SkipTo(), and profinet::wire::Reader::U16().

Referenced by profinet::sim::VirtualProfinetRpcDevice::ContainsBlock(), FindBlocks(), profinet::sim::VirtualProfinetRpcDevice::HandleConnect(), TestRpcDevice::HandleConnect(), profinet::rpc::RPCCon::ParseAlarmCrResponse(), profinet::rpc::RPCCon::ParseIocrResponse(), profinet::CyclicCaptureTests::TEST(), profinet::TEST(), and profinet::sim::VirtualProfinetRpcDevice::ValidateConnect().

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

◆ StringToUuidBytes()

std::array< std::uint8_t, uuidLenght > profinet::rpc::StringToUuidBytes ( const std::string &  uuidStr)

Parse a canonical UUID string into 16 raw DCE/RPC UUID bytes.

Parameters
uuidStrString in "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" form.
Returns
The 16 raw UUID bytes (mixed-endian DCE/RPC format).

Throws std::invalid_argument on malformed input.

Definition at line 126 of file rpc.cpp.

References length, profinet::wire::PutBigEndian(), profinet::wire::PutLittleEndian(), and profinet::uuidLenght.

Referenced by profinet::rpc::RPCCon::EpmLookup(), profinet::rpc::RpcTests::MakeInterfaceTowerLhs(), 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:

◆ TEST_F() [1/181]

profinet::rpc::TEST_F ( RpcTests  ,
ApplicationReadyAcceptsUnexpectedControlCommand   
)
Test:
Accepts an Application Ready block even when its control command differs.

Definition at line 4610 of file test_rpc.cpp.

References BLOCK_IOD_CONTROL_APP_READY_REQ, profinet::rpc::RpcTests::TestRpcTransport::QueueIncomingDatagram(), profinet::ReadyForRtClass3, profinet::rpc::RpcTests::TestRpcTransport::receiveCount, and profinet::rpc::RpcTests::TestRpcTransport::sentRequests.

+ Here is the call graph for this function:

◆ TEST_F() [2/181]

◆ TEST_F() [3/181]

◆ TEST_F() [4/181]

profinet::rpc::TEST_F ( RpcTests  ,
ApplicationReadyPropagatesReceiveException   
)
Test:
Propagates an exception thrown while receiving an Application Ready request.

Definition at line 4629 of file test_rpc.cpp.

References profinet::rpc::RpcTests::TestRpcTransport::receiveCount, profinet::rpc::RpcTests::TestRpcTransport::receiveException, and profinet::rpc::RpcTests::TestRpcTransport::sentRequests.

◆ TEST_F() [5/181]

profinet::rpc::TEST_F ( RpcTests  ,
ApplicationReadySkipsInvalidRawRpcPacket   
)
Test:
Skips an invalid raw RPC packet and processes the next request.

Definition at line 4384 of file test_rpc.cpp.

References profinet::PNRPCHeader::kFixedSize, profinet::rpc::RpcTests::TestRpcTransport::QueueIncomingDatagram(), profinet::rpc::RpcTests::TestRpcTransport::receiveCount, and profinet::rpc::RpcTests::TestRpcTransport::sentRequests.

+ Here is the call graph for this function:

◆ TEST_F() [6/181]

profinet::rpc::TEST_F ( RpcTests  ,
ApplicationReadySkipsNonControlOperation   
)
Test:
Skips an RPC request whose operation is not CONTROL.

Definition at line 4424 of file test_rpc.cpp.

References profinet::rpc::RpcTests::TestRpcTransport::QueueIncomingDatagram(), profinet::PNRPCHeader::READ, profinet::rpc::RpcTests::TestRpcTransport::receiveCount, profinet::PNRPCHeader::REQUEST, and profinet::rpc::RpcTests::TestRpcTransport::sentRequests.

+ Here is the call graph for this function:

◆ TEST_F() [7/181]

profinet::rpc::TEST_F ( RpcTests  ,
ApplicationReadySkipsNonRequestPacket   
)
Test:
Skips a non-request RPC packet and processes the next request.

Definition at line 4400 of file test_rpc.cpp.

References profinet::PNRPCHeader::CONTROL, profinet::rpc::RpcTests::TestRpcTransport::QueueIncomingDatagram(), profinet::rpc::RpcTests::TestRpcTransport::receiveCount, profinet::PNRPCHeader::RESPONSE, and profinet::rpc::RpcTests::TestRpcTransport::sentRequests.

+ Here is the call graph for this function:

◆ TEST_F() [8/181]

profinet::rpc::TEST_F ( RpcTests  ,
ApplicationReadySkipsShortNrdBody   
)
Test:
Skips a CONTROL request whose NRD body is shorter than an IOD control block.

Definition at line 4474 of file test_rpc.cpp.

References profinet::PNRPCHeader::CONTROL, profinet::rpc::RpcTests::TestRpcTransport::QueueIncomingDatagram(), profinet::rpc::RpcTests::TestRpcTransport::receiveCount, profinet::PNRPCHeader::REQUEST, and profinet::rpc::RpcTests::TestRpcTransport::sentRequests.

+ Here is the call graph for this function:

◆ TEST_F() [9/181]

profinet::rpc::TEST_F ( RpcTests  ,
ApplicationReadySkipsShortNrdPayload   
)
Test:
Skips a CONTROL request whose NRD payload is shorter than its fixed header.

Definition at line 4450 of file test_rpc.cpp.

References profinet::PNRPCHeader::CONTROL, profinet::rpc::RpcTests::TestRpcTransport::QueueIncomingDatagram(), profinet::rpc::RpcTests::TestRpcTransport::receiveCount, profinet::PNRPCHeader::REQUEST, and profinet::rpc::RpcTests::TestRpcTransport::sentRequests.

+ Here is the call graph for this function:

◆ TEST_F() [10/181]

profinet::rpc::TEST_F ( RpcTests  ,
ApplicationReadySkipsWrongControlBlockType   
)
Test:
Skips a CONTROL request containing a non-Application-Ready block.

Definition at line 4499 of file test_rpc.cpp.

References profinet::rpc::RpcTests::TestRpcTransport::QueueIncomingDatagram(), profinet::rpc::RpcTests::TestRpcTransport::receiveCount, and profinet::rpc::RpcTests::TestRpcTransport::sentRequests.

+ Here is the call graph for this function:

◆ TEST_F() [11/181]

profinet::rpc::TEST_F ( RpcTests  ,
ApplicationReadyThrowsWhenNotConnected   
)
Test:
Rejects ApplicationReady when the RPC connection is not live.

Definition at line 4374 of file test_rpc.cpp.

References profinet::rpc::RpcTests::TestRpcTransport::receiveCount.

◆ TEST_F() [12/181]

profinet::rpc::TEST_F ( RpcTests  ,
ArUuidReturnsConnectionArUuid   
)
Test:
Returns the AR UUID assigned to the RPC connection.

Definition at line 2980 of file test_rpc.cpp.

References profinet::uuidLenght.

◆ TEST_F() [13/181]

profinet::rpc::TEST_F ( RpcTests  ,
BuildAlarmCrBlockCombinesTransportAndPriority   
)
Test:
Encodes both transport and priority into AlarmCR properties.

Definition at line 2821 of file test_rpc.cpp.

References profinet::PNAlarmCRBlockReq::alarmCrProperties, profinet::PNAlarmCRBlockReq::etherTypeLT, profinet::IP_ETHERTYPE, and profinet::PNAlarmCRBlockReq::Parse().

+ Here is the call graph for this function:

◆ TEST_F() [14/181]

profinet::rpc::TEST_F ( RpcTests  ,
BuildAlarmCrBlockCreatesExpectedBlockHeader   
)
Test:
Verifies the AlarmCR request block header fields generated by BuildAlarmCrBlock.

Definition at line 2832 of file test_rpc.cpp.

References profinet::PNAlarmCRBlockReq::BLOCK_TYPE, profinet::PNBlockHeader::blockLength, profinet::PNBlockHeader::blockType, profinet::PNBlockHeader::blockVersionHigh, profinet::PNBlockHeader::blockVersionLow, profinet::PNAlarmCRBlockReq::kSize, and profinet::PNBlockHeader::Parse().

+ Here is the call graph for this function:

◆ TEST_F() [15/181]

profinet::rpc::TEST_F ( RpcTests  ,
BuildAlarmCrBlockEncodesPriority   
)
Test:
Encodes the requested alarm priority into AlarmCR properties.

Definition at line 2810 of file test_rpc.cpp.

References profinet::PNAlarmCRBlockReq::alarmCrProperties, profinet::PNAlarmCRBlockReq::etherTypeLT, profinet::PNAlarmCRBlockReq::Parse(), and profinet::PROFINET_ETHERTYPE.

+ Here is the call graph for this function:

◆ TEST_F() [16/181]

profinet::rpc::TEST_F ( RpcTests  ,
BuildAlarmCrBlockUsesIpEtherTypeForNonZeroTransport   
)
Test:
Builds an AlarmCR block using IP transport when the transport value is non-zero.

Definition at line 2799 of file test_rpc.cpp.

References profinet::PNAlarmCRBlockReq::alarmCrProperties, profinet::PNAlarmCRBlockReq::etherTypeLT, profinet::IP_ETHERTYPE, and profinet::PNAlarmCRBlockReq::Parse().

+ Here is the call graph for this function:

◆ TEST_F() [17/181]

◆ TEST_F() [18/181]

profinet::rpc::TEST_F ( RpcTests  ,
BuildIocrBlockUsesConfiguredSlots   
)
Test:
Builds an output IOCR block from the configured I/O slots with the expected IOCR type, data length, and API object count.

Definition at line 1300 of file test_rpc.cpp.

References profinet::Input, profinet::Output, profinet::PNIOCRBlockReqHeader::Parse(), and profinet::rpc::IOCRSetup::slots.

+ Here is the call graph for this function:

◆ TEST_F() [19/181]

profinet::rpc::TEST_F ( RpcTests  ,
BuildObjectUuidPreservesDeviceAndVendorBytes   
)
Test:
Verifies that BuildObjectUuid preserves every supplied node byte in the remote object UUID.

Definition at line 1475 of file test_rpc.cpp.

References profinet::ToHex().

+ Here is the call graph for this function:

◆ TEST_F() [20/181]

profinet::rpc::TEST_F ( RpcTests  ,
BuildObjectUuidUsesFixedProfinetPrefixAndSuffix   
)
Test:
Verifies that the fixed portion of BuildObjectUuid is identical for different device and vendor identifiers.

Definition at line 1486 of file test_rpc.cpp.

References profinet::ToHex().

+ Here is the call graph for this function:

◆ TEST_F() [21/181]

profinet::rpc::TEST_F ( RpcTests  ,
BuildsExpectedRemoteObjectUuid   
)
Test:
Verifies that BuildObjectUuid creates the PROFINET fixed prefix,/// shared UUID suffix, and supplied six-byte node identifier.

Definition at line 1466 of file test_rpc.cpp.

References profinet::ToHex().

+ Here is the call graph for this function:

◆ TEST_F() [22/181]

profinet::rpc::TEST_F ( RpcTests  ,
CheckTimeoutDoesNothingWhenNotConnected   
)
Test:
Does nothing when the AR is not currently live.

Definition at line 3175 of file test_rpc.cpp.

◆ TEST_F() [23/181]

profinet::rpc::TEST_F ( RpcTests  ,
CheckTimeoutDoesNotReconnectBeforeTimeout   
)
Test:
Does not reconnect while the live connection is still within its timeout.

Definition at line 3183 of file test_rpc.cpp.

References profinet::rpc::RpcTests::TestRpcTransport::receivedRequests.

◆ TEST_F() [24/181]

profinet::rpc::TEST_F ( RpcTests  ,
CheckTimeoutReconnectsAfterTimeout   
)
Test:
Reconnects when the connection has exceeded the connection timeout.

Definition at line 3195 of file test_rpc.cpp.

References profinet::PNRPCHeader::CONNECT, CONNECTION_TIMEOUT, profinet::rpc::RpcTests::TestRpcTransport::receivedRequests, and profinet::rpc::RpcTests::TestRpcTransport::responses.

◆ TEST_F() [25/181]

profinet::rpc::TEST_F ( RpcTests  ,
CloseClosesBothTransportsWhenNotLive   
)
Test:
Closes both RPC transports without sending RELEASE when already disconnected.

Definition at line 4766 of file test_rpc.cpp.

References profinet::rpc::RpcTests::TestRpcTransport::closeCount, and profinet::rpc::RpcTests::TestRpcTransport::sentRequests.

◆ TEST_F() [26/181]

profinet::rpc::TEST_F ( RpcTests  ,
CloseDisconnectsAndClosesBothTransports   
)
Test:
Disconnects the active connection and closes both RPC transports.

Definition at line 4751 of file test_rpc.cpp.

References profinet::rpc::RpcTests::TestRpcTransport::closeCount, and profinet::rpc::RpcTests::TestRpcTransport::sentRequests.

◆ TEST_F() [27/181]

profinet::rpc::TEST_F ( RpcTests  ,
ConnectConvertsDevicePnioError   
)
Test:
Converts a device-reported CONNECT error into RPCConnectionError.

Definition at line 3280 of file test_rpc.cpp.

References profinet::PNRPCHeader::CONNECT, profinet::PNRPCHeader::RESPONSE, and profinet::String2Mac().

+ Here is the call graph for this function:

◆ TEST_F() [28/181]

profinet::rpc::TEST_F ( RpcTests  ,
ConnectConvertsRpcError   
)
Test:
Converts an RPC error during CONNECT into RPCConnectionError.

Definition at line 3292 of file test_rpc.cpp.

References profinet::String2Mac().

+ Here is the call graph for this function:

◆ TEST_F() [29/181]

profinet::rpc::TEST_F ( RpcTests  ,
ConnectEstablishesBasicApplicationRelation   
)
Test:
Establishes a basic AR without cyclic IO or AlarmCR.

Definition at line 3223 of file test_rpc.cpp.

References profinet::PNRPCHeader::CONNECT, profinet::rpc::RpcTests::TestRpcTransport::receivedRequests, profinet::rpc::RpcTests::TestRpcTransport::responses, and profinet::String2Mac().

+ Here is the call graph for this function:

◆ TEST_F() [30/181]

profinet::rpc::TEST_F ( RpcTests  ,
ConnectLeavesAlarmCrDisabledWhenResponseHasNoAlarmCr   
)
Test:
Leaves AlarmCR disabled when the response contains no AlarmCR block.

Definition at line 3265 of file test_rpc.cpp.

References profinet::PNRPCHeader::CONNECT, and profinet::String2Mac().

+ Here is the call graph for this function:

◆ TEST_F() [31/181]

profinet::rpc::TEST_F ( RpcTests  ,
ConnectRejectsMissingSourceMacDuringReconnect   
)
Test:
Throws when a live connection has no source MAC available.

Definition at line 3349 of file test_rpc.cpp.

◆ TEST_F() [32/181]

profinet::rpc::TEST_F ( RpcTests  ,
ConnectReplacesSourceMacDuringReconnect   
)
Test:
Uses the replacement source MAC when reconnecting with a new MAC.

Definition at line 3325 of file test_rpc.cpp.

References profinet::PNRPCHeader::CONNECT, and profinet::String2Mac().

+ Here is the call graph for this function:

◆ TEST_F() [33/181]

profinet::rpc::TEST_F ( RpcTests  ,
ConnectRequestsAlarmCr   
)
Test:
Requests an AlarmCR when withAlarmCr is enabled.

Definition at line 3244 of file test_rpc.cpp.

References profinet::PNRPCHeader::CONNECT, and profinet::String2Mac().

+ Here is the call graph for this function:

◆ TEST_F() [34/181]

profinet::rpc::TEST_F ( RpcTests  ,
ConnectRequiresSourceMacForInitialConnection   
)
Test:
Requires a source MAC when establishing the first connection.

Definition at line 3217 of file test_rpc.cpp.

◆ TEST_F() [35/181]

profinet::rpc::TEST_F ( RpcTests  ,
ConnectReturnsConnectResultForIocrSetup   
)
Test:
Establishes cyclic IO when an IOCR setup is supplied.

Definition at line 3359 of file test_rpc.cpp.

References profinet::PNRPCHeader::CONNECT, profinet::rpc::IOCRSetup::slots, and profinet::String2Mac().

+ Here is the call graph for this function:

◆ TEST_F() [36/181]

profinet::rpc::TEST_F ( RpcTests  ,
ConnectReusesSourceMacDuringReconnect   
)
Test:
Reuses the existing source MAC when reconnecting without a new MAC.

Definition at line 3307 of file test_rpc.cpp.

References profinet::PNRPCHeader::CONNECT, and profinet::String2Mac().

+ Here is the call graph for this function:

◆ TEST_F() [37/181]

profinet::rpc::TEST_F ( RpcTests  ,
CreateNrdBuildsExpectedWrapper   
)
Test:
Creates an NRD wrapper containing the supplied payload and expected status, length, count and offset fields.

Definition at line 2722 of file test_rpc.cpp.

References profinet::PNNRDData::actualCount, profinet::PNNRDData::argsLength, profinet::PNNRDData::argsMaximumStatus, profinet::PNNRDData::maximumCount, profinet::PNNRDData::offset, profinet::PNNRDData::payload, and payload.

◆ TEST_F() [38/181]

profinet::rpc::TEST_F ( RpcTests  ,
CreateNrdHandlesEmptyPayload   
)

◆ TEST_F() [39/181]

profinet::rpc::TEST_F ( RpcTests  ,
CreateNrdRoundTripsThroughSerialization   
)
Test:
Verifies that an NRD wrapper can be serialized and parsed without changing its contents.

Definition at line 2756 of file test_rpc.cpp.

References profinet::PNNRDData::actualCount, profinet::PNNRDData::argsLength, profinet::PNNRDData::argsMaximumStatus, profinet::PNNRDData::maximumCount, profinet::PNNRDData::offset, profinet::PNNRDData::Parse(), profinet::PNNRDData::payload, payload, and profinet::PNNRDData::ToBytes().

+ Here is the call graph for this function:

◆ TEST_F() [40/181]

profinet::rpc::TEST_F ( RpcTests  ,
CreateRpcBuildsExpectedHeader   
)
Test:
Creates an RPC connection object with the expected initial DCE/RPC header fields.

Definition at line 1268 of file test_rpc.cpp.

References profinet::PNRPCHeader::CONNECT, payload, and profinet::PNRPCHeader::REQUEST.

◆ TEST_F() [41/181]

profinet::rpc::TEST_F ( RpcTests  ,
DeviceAlarmRefReturnsZeroInitially   
)
Test:
Returns the device alarm reference before an AlarmCR is established.

Definition at line 3000 of file test_rpc.cpp.

◆ TEST_F() [42/181]

profinet::rpc::TEST_F ( RpcTests  ,
DisconnectAlwaysClearsLive   
)
Test:
Always clears the live state after disconnect processing.

Definition at line 4740 of file test_rpc.cpp.

References profinet::rpc::RpcTests::TestRpcTransport::sendException.

◆ TEST_F() [43/181]

◆ TEST_F() [44/181]

profinet::rpc::TEST_F ( RpcTests  ,
DisconnectDoesNothingWhenNotLive   
)
Test:
Does nothing when the connection is already disconnected.

Definition at line 4718 of file test_rpc.cpp.

References profinet::rpc::RpcTests::TestRpcTransport::sentRequests.

◆ TEST_F() [45/181]

◆ TEST_F() [46/181]

profinet::rpc::TEST_F ( RpcTests  ,
DisconnectSwallowsSendExceptionAndClearsLive   
)
Test:
Swallows a RELEASE transmission failure and still clears the connection state.

Definition at line 4728 of file test_rpc.cpp.

References profinet::rpc::RpcTests::TestRpcTransport::sendException, and profinet::rpc::RpcTests::TestRpcTransport::sentRequests.

◆ TEST_F() [47/181]

profinet::rpc::TEST_F ( RpcTests  ,
DiscoverSlotsReturnsRealIdentificationSlots   
)
Test:
Returns the slots obtained from RealIdentificationData.

Definition at line 4005 of file test_rpc.cpp.

References profinet::PNRPCHeader::READ, and profinet::REAL_ID_API.

◆ TEST_F() [48/181]

profinet::rpc::TEST_F ( RpcTests  ,
DiscoverTopologyReturnsBothTopologyRecords   
)
Test:
Reads both PDRealData and RealIdentificationData.

Definition at line 4025 of file test_rpc.cpp.

References profinet::PD_REAL_DATA, profinet::PNRPCHeader::READ, and profinet::REAL_ID_API.

◆ TEST_F() [49/181]

profinet::rpc::TEST_F ( RpcTests  ,
EnumerateIndicesReportsAllProbeOutcomes   
)
Test:
Enumerates custom indices and reports readable, empty, PNIO-error. RPC-error and duplicate entries correctly.

Definition at line 4052 of file test_rpc.cpp.

References profinet::PNIODHeader::index, profinet::PNRPCHeader::operationNumber, profinet::PNRPCHeader::Parse(), profinet::PNNRDData::Parse(), profinet::PNIODHeader::Parse(), profinet::PNRPCHeader::payload, profinet::PNNRDData::payload, and profinet::PNRPCHeader::RESPONSE.

+ Here is the call graph for this function:

◆ TEST_F() [50/181]

profinet::rpc::TEST_F ( RpcTests  ,
EPMEndpointInterfaceNameEpm   
)
Test:
Resolves the EPM v4 interface UUID.

Definition at line 1543 of file test_rpc.cpp.

References profinet::rpc::EPMEndpoint::InterfaceName(), profinet::rpc::EPMEndpoint::interfaceUuid, and UUID_EPM_V4.

+ Here is the call graph for this function:

◆ TEST_F() [51/181]

profinet::rpc::TEST_F ( RpcTests  ,
EPMEndpointInterfaceNameIsCaseInsensitive   
)
Test:
Matches EPM interface UUIDs case-insensitively when resolving their well-known interface names.

Definition at line 1192 of file test_rpc.cpp.

References profinet::rpc::EPMEndpoint::InterfaceName(), and profinet::rpc::EPMEndpoint::interfaceUuid.

+ Here is the call graph for this function:

◆ TEST_F() [52/181]

profinet::rpc::TEST_F ( RpcTests  ,
EPMEndpointInterfaceNameIsCaseInsensitiveForAllKnownInterfaces   
)
Test:
Performs case-insensitive matching of well-known interface UUIDs.

Definition at line 1561 of file test_rpc.cpp.

References profinet::rpc::EPMEndpoint::InterfaceName(), profinet::rpc::EPMEndpoint::interfaceUuid, UUID_EPM_V4, UUID_PNIO_CONTROLLER, UUID_PNIO_DEVICE, UUID_PNIO_PARAMETER_SERVER, and UUID_PNIO_SUPERVISOR.

+ Here is the call graph for this function:

◆ TEST_F() [53/181]

profinet::rpc::TEST_F ( RpcTests  ,
EPMEndpointInterfaceNamePnioController   
)
Test:
Resolves the PNIO controller interface UUID.

Definition at line 1516 of file test_rpc.cpp.

References profinet::rpc::EPMEndpoint::InterfaceName(), profinet::rpc::EPMEndpoint::interfaceUuid, and UUID_PNIO_CONTROLLER.

+ Here is the call graph for this function:

◆ TEST_F() [54/181]

profinet::rpc::TEST_F ( RpcTests  ,
EPMEndpointInterfaceNamePnioDevice   
)
Test:
Resolves the PNIO device interface UUID.

Definition at line 1507 of file test_rpc.cpp.

References profinet::rpc::EPMEndpoint::InterfaceName(), profinet::rpc::EPMEndpoint::interfaceUuid, and UUID_PNIO_DEVICE.

+ Here is the call graph for this function:

◆ TEST_F() [55/181]

profinet::rpc::TEST_F ( RpcTests  ,
EPMEndpointInterfaceNamePnioParameterServer   
)
Test:
Resolves the PNIO parameter-server interface UUID.

Definition at line 1534 of file test_rpc.cpp.

References profinet::rpc::EPMEndpoint::InterfaceName(), and profinet::rpc::EPMEndpoint::interfaceUuid.

+ Here is the call graph for this function:

◆ TEST_F() [56/181]

profinet::rpc::TEST_F ( RpcTests  ,
EPMEndpointInterfaceNamePnioSupervisor   
)
Test:
Resolves the PNIO supervisor interface UUID.

Definition at line 1525 of file test_rpc.cpp.

References profinet::rpc::EPMEndpoint::InterfaceName(), and profinet::rpc::EPMEndpoint::interfaceUuid.

+ Here is the call graph for this function:

◆ TEST_F() [57/181]

profinet::rpc::TEST_F ( RpcTests  ,
EPMEndpointInterfaceNameUnknown   
)
Test:
Returns an Unknown interface name for an unrecognized UUID.

Definition at line 1552 of file test_rpc.cpp.

References profinet::rpc::EPMEndpoint::InterfaceName(), and profinet::rpc::EPMEndpoint::interfaceUuid.

+ Here is the call graph for this function:

◆ TEST_F() [58/181]

profinet::rpc::TEST_F ( RpcTests  ,
EPMEndpointResolvesWellKnownProfinetInterfaceNames   
)
Test:
Returns the expected names for the well-known PROFINET EPM interface UUIDs.

Definition at line 1164 of file test_rpc.cpp.

References profinet::rpc::EPMEndpoint::InterfaceName(), profinet::rpc::EPMEndpoint::interfaceUuid, UUID_PNIO_CONTROLLER, and UUID_PNIO_DEVICE.

+ Here is the call graph for this function:

◆ TEST_F() [59/181]

profinet::rpc::TEST_F ( RpcTests  ,
EPMEndpointUnknownUuidIncludesUuid   
)
Test:
Formats an unknown EPM interface UUID as an unknown interface name containing its UUID value.

Definition at line 1181 of file test_rpc.cpp.

References profinet::rpc::EPMEndpoint::InterfaceName(), and profinet::rpc::EPMEndpoint::interfaceUuid.

+ Here is the call graph for this function:

◆ TEST_F() [60/181]

profinet::rpc::TEST_F ( RpcTests  ,
EpmLookupBuildsInterfaceFilteredRequest   
)
Test:
Builds an interface-filtered EPM lookup request and verifies that the requested interface UUID is encoded into the request body.

Definition at line 1989 of file test_rpc.cpp.

References EPM_INQUIRY_INTERFACE, profinet::PNRPCHeader::kFixedSize, profinet::wire::Reader::SkipTo(), StringToUuidBytes(), profinet::wire::Reader::U16LittleEndian(), profinet::wire::Reader::U32LittleEndian(), and UUID_PNIO_DEVICE.

+ Here is the call graph for this function:

◆ TEST_F() [61/181]

profinet::rpc::TEST_F ( RpcTests  ,
EpmLookupClampsBodyLengthToReceivedData   
)
Test:
Clamps an advertised response body length when fewer bytes were actually received.

Definition at line 2136 of file test_rpc.cpp.

References profinet::PNRPCHeader::kFixedSize.

◆ TEST_F() [62/181]

profinet::rpc::TEST_F ( RpcTests  ,
EpmLookupHandlesZeroLengthAnnotation   
)
Test:
Skips annotation parsing when the annotation has zero length and continues with the tower.

Definition at line 2270 of file test_rpc.cpp.

References StringToUuidBytes(), and UUID_PNIO_DEVICE.

+ Here is the call graph for this function:

◆ TEST_F() [63/181]

profinet::rpc::TEST_F ( RpcTests  ,
EpmLookupIgnoresEntryWithInvalidTower   
)
Test:
Does not add an EPM result when the tower contains no interface UUID.

Definition at line 2378 of file test_rpc.cpp.

References StringToUuidBytes().

+ Here is the call graph for this function:

◆ TEST_F() [64/181]

profinet::rpc::TEST_F ( RpcTests  ,
EpmLookupReturnsEmptyForFaultResponse   
)
Test:
Returns no endpoints for an RPC FAULT response.

Definition at line 2064 of file test_rpc.cpp.

References profinet::PNRPCHeader::kFixedSize.

◆ TEST_F() [65/181]

profinet::rpc::TEST_F ( RpcTests  ,
EpmLookupReturnsEmptyForShortBody   
)
Test:
Returns no endpoints when the response body contains fewer than twelve bytes of EPM lookup metadata.

Definition at line 2113 of file test_rpc.cpp.

◆ TEST_F() [66/181]

profinet::rpc::TEST_F ( RpcTests  ,
EpmLookupReturnsEmptyForShortResponse   
)
Test:
Returns no endpoints when the RPC response is shorter than the fixed DCE/RPC header.

Definition at line 2042 of file test_rpc.cpp.

◆ TEST_F() [67/181]

profinet::rpc::TEST_F ( RpcTests  ,
EpmLookupReturnsEmptyForUnexpectedResponseType   
)
Test:
Returns no endpoints when the RPC response packet type is neither RESPONSE nor FAULT.

Definition at line 2089 of file test_rpc.cpp.

References profinet::PNRPCHeader::kFixedSize.

◆ TEST_F() [68/181]

profinet::rpc::TEST_F ( RpcTests  ,
EpmLookupReturnsParsedEndpoint   
)
Test:
Performs a complete EPM lookup and verifies endpoint fields, annotation, object UUID and request construction.

Definition at line 1912 of file test_rpc.cpp.

References EPM_LOOKUP, profinet::PNRPCHeader::kFixedSize, profinet::PNRPCHeader::REQUEST, profinet::wire::Reader::SkipTo(), StringToUuidBytes(), profinet::wire::Reader::U16LittleEndian(), profinet::wire::Reader::U32LittleEndian(), and UUID_PNIO_DEVICE.

+ Here is the call graph for this function:

◆ TEST_F() [69/181]

profinet::rpc::TEST_F ( RpcTests  ,
EpmLookupStopsOnTruncatedAnnotationLength   
)
Test:
Stops safely when the annotation length field is truncated.

Definition at line 2238 of file test_rpc.cpp.

References profinet::uuidLenght.

◆ TEST_F() [70/181]

profinet::rpc::TEST_F ( RpcTests  ,
EpmLookupStopsOnTruncatedEntryUuid   
)
Test:
Stops safely when an EPM entry does not contain its complete object UUID.

Definition at line 2179 of file test_rpc.cpp.

◆ TEST_F() [71/181]

profinet::rpc::TEST_F ( RpcTests  ,
EpmLookupStopsOnTruncatedTowerPointer   
)
Test:
Stops safely when an EPM entry contains no complete tower pointer.

Definition at line 2208 of file test_rpc.cpp.

References profinet::uuidLenght.

◆ TEST_F() [72/181]

profinet::rpc::TEST_F ( RpcTests  ,
EpmLookupTrimsTrailingAnnotationZeros   
)
Test:
Removes trailing zero bytes from an EPM annotation.

Definition at line 2321 of file test_rpc.cpp.

References StringToUuidBytes(), and UUID_PNIO_DEVICE.

+ Here is the call graph for this function:

◆ TEST_F() [73/181]

profinet::rpc::TEST_F ( RpcTests  ,
GenerateDifferentArUuids   
)
Test:
Exercises RandomUuidBytes multiple times through separate RPCCon instances and verifies that independent UUIDs are generated.

Definition at line 1413 of file test_rpc.cpp.

References profinet::rpc::RPCCon::ArUuid().

+ Here is the call graph for this function:

◆ TEST_F() [74/181]

profinet::rpc::TEST_F ( RpcTests  ,
GeneratedSessionKeysAreAlwaysNonZero   
)
Test:
Exercises RandomNonzeroU16 repeatedly and verifies that every generated session key satisfies the non-zero invariant.

Definition at line 1451 of file test_rpc.cpp.

References profinet::rpc::RPCCon::SessionKey().

+ Here is the call graph for this function:

◆ TEST_F() [75/181]

profinet::rpc::TEST_F ( RpcTests  ,
GenerateIndependentArAndActivityUuids   
)
Test:
Exercises RandomUuidBytes for both AR and activity UUID generation and verifies that both generated UUIDs are populated.

Definition at line 1429 of file test_rpc.cpp.

◆ TEST_F() [76/181]

profinet::rpc::TEST_F ( RpcTests  ,
GenerateNonZeroArUuid   
)
Test:
Exercises RandomUuidBytes through RPCCon construction and verifies that a valid 16-byte non-zero UUID is generated.

Definition at line 1399 of file test_rpc.cpp.

References profinet::rpc::RPCCon::ArUuid(), and profinet::uuidLenght.

+ Here is the call graph for this function:

◆ TEST_F() [77/181]

profinet::rpc::TEST_F ( RpcTests  ,
GenerateNonZeroSessionKey   
)
Test:
Exercises RandomNonzeroU16 through RPCCon construction and verifies that the generated session key is never zero.

Definition at line 1440 of file test_rpc.cpp.

References profinet::rpc::RPCCon::SessionKey().

+ Here is the call graph for this function:

◆ TEST_F() [78/181]

profinet::rpc::TEST_F ( RpcTests  ,
GetStationInfoDiscoveryMatchesStationNameCaseInsensitive   
)
Test:
Matches a discovered station name case-insensitively.

Definition at line 2531 of file test_rpc.cpp.

References GetStationInfo(), and profinet::String2Mac().

+ Here is the call graph for this function:

◆ TEST_F() [79/181]

profinet::rpc::TEST_F ( RpcTests  ,
GetStationInfoDiscoverySkipsNonMatchingDevice   
)
Test:
Skips a discovered device with a different station name and returns a later matching device.

Definition at line 2564 of file test_rpc.cpp.

References GetStationInfo(), and profinet::String2Mac().

+ Here is the call graph for this function:

◆ TEST_F() [80/181]

profinet::rpc::TEST_F ( RpcTests  ,
GetStationInfoDoesNotFilterNonEmptyDirectResponse   
)
Test:
Verifies that a non-empty direct response is returned without applying a station-name comparison.

Definition at line 2686 of file test_rpc.cpp.

References GetStationInfo(), and profinet::String2Mac().

+ Here is the call graph for this function:

◆ TEST_F() [81/181]

profinet::rpc::TEST_F ( RpcTests  ,
GetStationInfoFallsBackToDiscovery   
)
Test:
Falls back to DCP discovery when the initial station-name request produces no response.

Definition at line 2497 of file test_rpc.cpp.

References GetStationInfo(), and profinet::String2Mac().

+ Here is the call graph for this function:

◆ TEST_F() [82/181]

profinet::rpc::TEST_F ( RpcTests  ,
GetStationInfoNotFoundExceptionContainsStationName   
)
Test:
Verifies the diagnostic text of DCPDeviceNotFoundError when the requested station name cannot be discovered.

Definition at line 2631 of file test_rpc.cpp.

References GetStationInfo(), and profinet::String2Mac().

+ Here is the call graph for this function:

◆ TEST_F() [83/181]

profinet::rpc::TEST_F ( RpcTests  ,
GetStationInfoReturnsFirstDirectResponse   
)
Test:
Returns the first device immediately when the initial station-name request produces a DCP response.

Definition at line 2408 of file test_rpc.cpp.

References GetStationInfo(), and profinet::String2Mac().

+ Here is the call graph for this function:

◆ TEST_F() [84/181]

profinet::rpc::TEST_F ( RpcTests  ,
GetStationInfoSendsStationNameRequest   
)
Test:
Verifies that GetStationInfo sends a DCP station-name request using the requested station name.

Definition at line 2446 of file test_rpc.cpp.

References profinet::dcp::DCP_MULTICAST_MAC, profinet::EthernetHeader::dst, frame, GetStationInfo(), profinet::Identify, profinet::EthernetHeader::Parse(), profinet::PNDCPHeader::Parse(), profinet::EthernetHeader::payload, profinet::PROFINET_ETHERTYPE, profinet::PNDCPHeader::serviceId, profinet::EthernetHeader::src, profinet::String2Mac(), and profinet::EthernetHeader::type.

+ Here is the call graph for this function:

◆ TEST_F() [85/181]

profinet::rpc::TEST_F ( RpcTests  ,
GetStationInfoThrowsWhenDiscoveryFindsNoMatchingDevice   
)
Test:
Throws DCPDeviceNotFoundError when discovery produces responses but none has the requested station name.

Definition at line 2601 of file test_rpc.cpp.

References GetStationInfo(), and profinet::String2Mac().

+ Here is the call graph for this function:

◆ TEST_F() [86/181]

profinet::rpc::TEST_F ( RpcTests  ,
GetStationInfoThrowsWhenDiscoveryReturnsNoResponses   
)
Test:
Throws DCPDeviceNotFoundError when both the direct request and the subsequent discovery produce no devices.

Definition at line 2660 of file test_rpc.cpp.

References GetStationInfo(), and profinet::String2Mac().

+ Here is the call graph for this function:

◆ TEST_F() [87/181]

profinet::rpc::TEST_F ( RpcTests  ,
HasAlarmCrReturnsFalseInitially   
)
Test:
Reports that no AlarmCR is enabled initially.

Definition at line 3006 of file test_rpc.cpp.

◆ TEST_F() [88/181]

profinet::rpc::TEST_F ( RpcTests  ,
InfoReturnsDeviceDescription   
)
Test:
Returns the DCP device information supplied to the RPC connection.

Definition at line 2972 of file test_rpc.cpp.

◆ TEST_F() [89/181]

profinet::rpc::TEST_F ( RpcTests  ,
IOCRSetupCycleTimeCalculation   
)
Test:
IOCRSetup cycle time calculation matches PROFINET timing formula

Definition at line 1202 of file test_rpc.cpp.

References profinet::rpc::IOCRSetup::CycleTimeMs(), profinet::rpc::IOCRSetup::CycleTimeUs(), profinet::rpc::IOCRSetup::reductionRatio, and profinet::rpc::IOCRSetup::sendClockFactor.

+ Here is the call graph for this function:

◆ TEST_F() [90/181]

profinet::rpc::TEST_F ( RpcTests  ,
IOCRSetupValidateEmptySlots   
)
Test:
IOCRSetup::Validate reports an error for an empty slot configuration.

Definition at line 1228 of file test_rpc.cpp.

References profinet::rpc::IOCRSetup::Validate(), and profinet::rpc::IOCRSetup::watchdogFactor.

+ Here is the call graph for this function:

◆ TEST_F() [91/181]

profinet::rpc::TEST_F ( RpcTests  ,
IOCRSetupValidateFlagsEmptySlotsAndLowWatchdog   
)
Test:
IOCRSetup::validate flags empty slots and low watchdog

Definition at line 1217 of file test_rpc.cpp.

References profinet::rpc::IOCRSetup::Validate(), and profinet::rpc::IOCRSetup::watchdogFactor.

+ Here is the call graph for this function:

◆ TEST_F() [92/181]

profinet::rpc::TEST_F ( RpcTests  ,
IOCRSetupValidateLowWatchdog   
)
Test:
IOCRSetup::Validate reports a warning for a low watchdog factor.

Definition at line 1240 of file test_rpc.cpp.

References profinet::rpc::IOCRSetup::Validate(), and profinet::rpc::IOCRSetup::watchdogFactor.

+ Here is the call graph for this function:

◆ TEST_F() [93/181]

profinet::rpc::TEST_F ( RpcTests  ,
IOCRSetupValidateNormalConfiguration   
)
Test:
IOCRSetup::Validate accepts a normal IOCR configuration.

Definition at line 1252 of file test_rpc.cpp.

References profinet::rpc::IOCRSetup::reductionRatio, profinet::rpc::IOCRSetup::sendClockFactor, profinet::rpc::IOCRSetup::slots, profinet::rpc::IOCRSetup::Validate(), and profinet::rpc::IOCRSetup::watchdogFactor.

+ Here is the call graph for this function:

◆ TEST_F() [94/181]

profinet::rpc::TEST_F ( RpcTests  ,
IsConnectedReturnsFalseInitially   
)
Test:
Reports that a newly created RPC connection is not connected.

Definition at line 2966 of file test_rpc.cpp.

◆ TEST_F() [95/181]

profinet::rpc::TEST_F ( RpcTests  ,
LocalAlarmRefReturnsConfiguredValue   
)
Test:
Returns the controller's local alarm reference.

Definition at line 2994 of file test_rpc.cpp.

◆ TEST_F() [96/181]

profinet::rpc::TEST_F ( RpcTests  ,
MakeEpmTowerEncodesEmptyThenInterfaceFloor   
)
Test:
Verifies the serialized representation of an empty floor followed by an interface floor.

Definition at line 1686 of file test_rpc.cpp.

References UUID_PNIO_DEVICE.

◆ TEST_F() [97/181]

profinet::rpc::TEST_F ( RpcTests  ,
MakeInterfaceTowerLhsCreatesValidInterfaceBlock   
)
Test:
Verifies that the interface tower helper creates the exact 19-byte LHS structure expected by ParseEpmTower.

Definition at line 1638 of file test_rpc.cpp.

References StringToUuidBytes(), and UUID_PNIO_DEVICE.

+ Here is the call graph for this function:

◆ TEST_F() [98/181]

profinet::rpc::TEST_F ( RpcTests  ,
ParseAlarmCrResponseContinuesAfterMalformedAlarmBlock   
)
Test:
Continues scanning when an AlarmCR response block fails to parse.

Definition at line 2893 of file test_rpc.cpp.

References profinet::blockHeaderLength.

◆ TEST_F() [99/181]

profinet::rpc::TEST_F ( RpcTests  ,
ParseAlarmCrResponseContinuesAfterMalformedBlock   
)
Test:
Continues scanning after a malformed AlarmCR block and successfully parses a later valid AlarmCR response.

Definition at line 2918 of file test_rpc.cpp.

References profinet::AlarmCrResponse, profinet::blockHeaderLength, profinet::PNBlockHeader::blockLength, profinet::PNBlockHeader::blockType, profinet::PNBlockHeader::blockVersionHigh, profinet::PNBlockHeader::blockVersionLow, and profinet::PNBlockHeader::ToBytes().

+ Here is the call graph for this function:

◆ TEST_F() [100/181]

profinet::rpc::TEST_F ( RpcTests  ,
ParseAlarmCrResponseContinuesAfterUnrelatedBlock   
)
Test:
Skips an unrelated block and parses a valid AlarmCR response appearing later in the response data.

Definition at line 2880 of file test_rpc.cpp.

◆ TEST_F() [101/181]

profinet::rpc::TEST_F ( RpcTests  ,
ParseAlarmCrResponseIgnoresTruncatedAlarmBlock   
)
Test:
Ignores an AlarmCR block whose declared body is larger than the available response data.

Definition at line 2907 of file test_rpc.cpp.

◆ TEST_F() [102/181]

profinet::rpc::TEST_F ( RpcTests  ,
ParseAlarmCrResponseIgnoresUnrelatedBlock   
)
Test:
Skips an unrelated block and returns -1 when no AlarmCR response block follows.

Definition at line 2862 of file test_rpc.cpp.

◆ TEST_F() [103/181]

profinet::rpc::TEST_F ( RpcTests  ,
ParseAlarmCrResponseReturnsLocalAlarmReference   
)
Test:
Parses a valid AlarmCR response and returns its local alarm reference.

Definition at line 2870 of file test_rpc.cpp.

◆ TEST_F() [104/181]

profinet::rpc::TEST_F ( RpcTests  ,
ParseAlarmCrResponseReturnsMinusOneAfterUnrelatedBlocks   
)
Test:
Scans across multiple unrelated blocks before returning -1 when no AlarmCR response exists.

Definition at line 2950 of file test_rpc.cpp.

◆ TEST_F() [105/181]

profinet::rpc::TEST_F ( RpcTests  ,
ParseAlarmCrResponseReturnsMinusOneForEmptyData   
)
Test:
Returns -1 when no AlarmCR response data is supplied.

Definition at line 2844 of file test_rpc.cpp.

◆ TEST_F() [106/181]

profinet::rpc::TEST_F ( RpcTests  ,
ParseAlarmCrResponseReturnsMinusOneForShortData   
)
Test:
Returns -1 when response data is shorter than an AlarmCR block header.

Definition at line 2850 of file test_rpc.cpp.

◆ TEST_F() [107/181]

profinet::rpc::TEST_F ( RpcTests  ,
ParseEpmTowerContinuesAcrossAllFloors   
)

Verifies that protocol, port and IP floors are parsed after the interface floor.

Definition at line 1893 of file test_rpc.cpp.

References ParseEpmTower(), and UUID_PNIO_DEVICE.

+ Here is the call graph for this function:

◆ TEST_F() [108/181]

profinet::rpc::TEST_F ( RpcTests  ,
ParseEpmTowerIgnoresInterfaceDataFromLaterFloor   
)
Test:
Ignores a valid interface floor when it occurs after the first floor.

Definition at line 1862 of file test_rpc.cpp.

References ParseEpmTower(), and UUID_PNIO_DEVICE.

+ Here is the call graph for this function:

◆ TEST_F() [109/181]

profinet::rpc::TEST_F ( RpcTests  ,
ParseEpmTowerIgnoresShortIpRhs   
)
Test:
Ignores an EPM IP floor with fewer than four RHS bytes.

Definition at line 1813 of file test_rpc.cpp.

References ParseEpmTower(), and UUID_PNIO_DEVICE.

+ Here is the call graph for this function:

◆ TEST_F() [110/181]

profinet::rpc::TEST_F ( RpcTests  ,
ParseEpmTowerIgnoresShortPortRhs   
)
Test:
Ignores an EPM port floor with an insufficient RHS.

Definition at line 1783 of file test_rpc.cpp.

References ParseEpmTower(), and UUID_PNIO_DEVICE.

+ Here is the call graph for this function:

◆ TEST_F() [111/181]

profinet::rpc::TEST_F ( RpcTests  ,
ParseEpmTowerIgnoresUnknownProtocol   
)
Test:
Ignores an unknown EPM tower protocol while preserving a parsed interface UUID.

Definition at line 1875 of file test_rpc.cpp.

References ParseEpmTower(), and UUID_PNIO_DEVICE.

+ Here is the call graph for this function:

◆ TEST_F() [112/181]

profinet::rpc::TEST_F ( RpcTests  ,
ParseEpmTowerInterfaceFloorWithoutMinorVersion   
)
Test:
Parses an interface floor when its RHS contains fewer than two bytes and therefore leaves the minor version unchanged.

Definition at line 1727 of file test_rpc.cpp.

References ParseEpmTower(), and UUID_PNIO_DEVICE.

+ Here is the call graph for this function:

◆ TEST_F() [113/181]

profinet::rpc::TEST_F ( RpcTests  ,
ParseEpmTowerOnlyUsesFirstInterfaceFloorForInterfaceData   
)
Test:
Processes later floors without replacing the interface UUID parsed from the first floor.

Definition at line 1845 of file test_rpc.cpp.

References ParseEpmTower(), UUID_PNIO_CONTROLLER, and UUID_PNIO_DEVICE.

+ Here is the call graph for this function:

◆ TEST_F() [114/181]

profinet::rpc::TEST_F ( RpcTests  ,
ParseEpmTowerParsesBigEndianPort   
)
Test:
Parses a big-endian EPM UDP port.

Definition at line 1768 of file test_rpc.cpp.

References ParseEpmTower(), and UUID_PNIO_DEVICE.

+ Here is the call graph for this function:

◆ TEST_F() [115/181]

profinet::rpc::TEST_F ( RpcTests  ,
ParseEpmTowerParsesCompleteEndpoint   
)
Test:
Parses interface, UDP, port and IP floors together.

Definition at line 1828 of file test_rpc.cpp.

References ParseEpmTower(), and UUID_PNIO_CONTROLLER.

+ Here is the call graph for this function:

◆ TEST_F() [116/181]

profinet::rpc::TEST_F ( RpcTests  ,
ParseEpmTowerParsesInterfaceFloor   
)
Test:
Verifies that a valid interface floor is parsed independently of preceding floors.

Definition at line 1656 of file test_rpc.cpp.

References ParseEpmTower(), and UUID_PNIO_DEVICE.

+ Here is the call graph for this function:

◆ TEST_F() [117/181]

profinet::rpc::TEST_F ( RpcTests  ,
ParseEpmTowerParsesInterfaceUuidAndVersions   
)
Test:
Parses a PNIO interface floor with a minor version present.

Definition at line 1711 of file test_rpc.cpp.

References ParseEpmTower(), and UUID_PNIO_DEVICE.

+ Here is the call graph for this function:

◆ TEST_F() [118/181]

profinet::rpc::TEST_F ( RpcTests  ,
ParseEpmTowerParsesIpv4Address   
)
Test:
Parses an IPv4 address from the EPM IP floor.

Definition at line 1798 of file test_rpc.cpp.

References ParseEpmTower(), and UUID_PNIO_DEVICE.

+ Here is the call graph for this function:

◆ TEST_F() [119/181]

profinet::rpc::TEST_F ( RpcTests  ,
ParseEpmTowerParsesUdpProtocol   
)
Test:
Parses the UDP protocol identifier.

Definition at line 1753 of file test_rpc.cpp.

References ParseEpmTower(), and UUID_PNIO_DEVICE.

+ Here is the call graph for this function:

◆ TEST_F() [120/181]

profinet::rpc::TEST_F ( RpcTests  ,
ParseEpmTowerRejectsShortInterfaceFloor   
)
Test:
Ignores an interface protocol floor shorter than the required UUID and version payload.

Definition at line 1743 of file test_rpc.cpp.

References ParseEpmTower().

+ Here is the call graph for this function:

◆ TEST_F() [121/181]

profinet::rpc::TEST_F ( RpcTests  ,
ParseEpmTowerRejectsTooShortTower   
)
Test:
Rejects an EPM tower shorter than the minimum floor-count/header size.

Definition at line 1575 of file test_rpc.cpp.

References ParseEpmTower().

+ Here is the call graph for this function:

◆ TEST_F() [122/181]

profinet::rpc::TEST_F ( RpcTests  ,
ParseEpmTowerSkipsEmptyFloor   
)
Test:
Verifies that an empty EPM floor is skipped without preventing subsequent parsing.

Definition at line 1677 of file test_rpc.cpp.

◆ TEST_F() [123/181]

profinet::rpc::TEST_F ( RpcTests  ,
ParseEpmTowerSkipsEmptyLhs   
)
Test:
Skips a zero-length LHS on a subsequent floor while preserving the endpoint parsed from the first floor.

Definition at line 1614 of file test_rpc.cpp.

References ParseEpmTower(), and UUID_PNIO_DEVICE.

+ Here is the call graph for this function:

◆ TEST_F() [124/181]

profinet::rpc::TEST_F ( RpcTests  ,
ParseEpmTowerStopsOnTruncatedFloorHeader   
)
Test:
Stops parsing when a floor header is truncated.

Definition at line 1582 of file test_rpc.cpp.

References ParseEpmTower().

+ Here is the call graph for this function:

◆ TEST_F() [125/181]

profinet::rpc::TEST_F ( RpcTests  ,
ParseEpmTowerStopsOnTruncatedLhs   
)
Test:
Stops parsing when the LHS length exceeds the remaining tower data.

Definition at line 1590 of file test_rpc.cpp.

References ParseEpmTower().

+ Here is the call graph for this function:

◆ TEST_F() [126/181]

profinet::rpc::TEST_F ( RpcTests  ,
ParseEpmTowerStopsOnTruncatedRhs   
)
Test:
Stops parsing when the RHS data is shorter than its declared length.

Definition at line 1606 of file test_rpc.cpp.

References ParseEpmTower().

+ Here is the call graph for this function:

◆ TEST_F() [127/181]

profinet::rpc::TEST_F ( RpcTests  ,
ParseEpmTowerStopsOnTruncatedRhsLength   
)
Test:
Stops parsing when the RHS length field is truncated.

Definition at line 1598 of file test_rpc.cpp.

References ParseEpmTower().

+ Here is the call graph for this function:

◆ TEST_F() [128/181]

profinet::rpc::TEST_F ( RpcTests  ,
ParseIocrResponseFindsMatchingBlockAfterUnrelatedBlock   
)
Test:
Finds a matching IOCR after an unrelated block.

Definition at line 3060 of file test_rpc.cpp.

◆ TEST_F() [129/181]

profinet::rpc::TEST_F ( RpcTests  ,
ParseIocrResponseIgnoresDifferentIocrType   
)
Test:
Ignores an IOCR response with a different IOCR type.

Definition at line 3034 of file test_rpc.cpp.

◆ TEST_F() [130/181]

profinet::rpc::TEST_F ( RpcTests  ,
ParseIocrResponseIgnoresMalformedIocrBlock   
)
Test:
Continues after a malformed IOCR block whose parser throws.

Definition at line 3050 of file test_rpc.cpp.

References profinet::PNIOCRBlockRes::BLOCK_TYPE, profinet::blockHeaderLength, and profinet::PNIOCRBlockRes::kSize.

◆ TEST_F() [131/181]

profinet::rpc::TEST_F ( RpcTests  ,
ParseIocrResponseIgnoresUnrelatedBlock   
)
Test:
Ignores unrelated blocks while scanning the response.

Definition at line 3026 of file test_rpc.cpp.

◆ TEST_F() [132/181]

profinet::rpc::TEST_F ( RpcTests  ,
ParseIocrResponseReturnsMatchingFrameId   
)
Test:
Returns the frame ID for a matching IOCR response.

Definition at line 3042 of file test_rpc.cpp.

◆ TEST_F() [133/181]

profinet::rpc::TEST_F ( RpcTests  ,
ParseIocrResponseReturnsZeroForEmptyData   
)
Test:
Returns zero for empty IOCR response data.

Definition at line 3012 of file test_rpc.cpp.

◆ TEST_F() [134/181]

profinet::rpc::TEST_F ( RpcTests  ,
ParseIocrResponseReturnsZeroForShortData   
)
Test:
Returns zero when the IOCR response contains fewer than one block header.

Definition at line 3018 of file test_rpc.cpp.

◆ TEST_F() [135/181]

profinet::rpc::TEST_F ( RpcTests  ,
ParseRawRpcHeaderExtractsPayloadAfterFixedHeader   
)
Test:
Extracts payload starting immediately after the fixed RPC header.

Definition at line 4353 of file test_rpc.cpp.

References profinet::PNRPCHeader::kFixedSize, profinet::rpc::raw::ParseRawRpcHeader(), payload, and profinet::PNRPCHeader::REQUEST.

+ Here is the call graph for this function:

◆ TEST_F() [136/181]

profinet::rpc::TEST_F ( RpcTests  ,
ParseRawRpcHeaderParsesBigEndian   
)
Test:
Parses a big-endian raw RPC header and preserves its payload.

Definition at line 4265 of file test_rpc.cpp.

References profinet::rpc::raw::ParseRawRpcHeader(), payload, profinet::PNRPCHeader::REQUEST, and profinet::uuidLenght.

+ Here is the call graph for this function:

◆ TEST_F() [137/181]

profinet::rpc::TEST_F ( RpcTests  ,
ParseRawRpcHeaderParsesLittleEndian   
)
Test:
Parses a little-endian raw RPC header using the DREP byte order.

Definition at line 4309 of file test_rpc.cpp.

References profinet::rpc::raw::ParseRawRpcHeader(), payload, and profinet::PNRPCHeader::RESPONSE.

+ Here is the call graph for this function:

◆ TEST_F() [138/181]

profinet::rpc::TEST_F ( RpcTests  ,
ParseRawRpcHeaderPreservesSerialHigh   
)
Test:
Preserves the high byte of the RPC serial number.

Definition at line 4335 of file test_rpc.cpp.

References profinet::rpc::raw::ParseRawRpcHeader(), and profinet::PNRPCHeader::REQUEST.

+ Here is the call graph for this function:

◆ TEST_F() [139/181]

profinet::rpc::TEST_F ( RpcTests  ,
ParseRawRpcHeaderRejectsShortData   
)
Test:
Rejects raw RPC data shorter than the fixed RPC header.

Definition at line 4255 of file test_rpc.cpp.

References profinet::PNRPCHeader::kFixedSize, and profinet::rpc::raw::ParseRawRpcHeader().

+ Here is the call graph for this function:

◆ TEST_F() [140/181]

profinet::rpc::TEST_F ( RpcTests  ,
PNRPCHeaderInterfaceUuidBytes   
)
Test:
PNRPCHeader interface UUID bytes match the literal PROFINET-assigned UUID

Definition at line 1289 of file test_rpc.cpp.

References profinet::PNRPCHeader::IfaceUuidDevice(), and profinet::ToHex().

+ Here is the call graph for this function:

◆ TEST_F() [141/181]

profinet::rpc::TEST_F ( RpcTests  ,
PrmBeginSendsExpectedControlCommand   
)
Test:
PrmBegin sends the PrmBegin control command.

Definition at line 4180 of file test_rpc.cpp.

References profinet::PNRPCHeader::CONTROL, CONTROL_CMD_PRM_BEGIN, profinet::PNIODReleaseBlock::controlCommand, profinet::PNRPCHeader::Parse(), profinet::PNNRDData::Parse(), profinet::PNIODReleaseBlock::Parse(), profinet::PNRPCHeader::payload, profinet::PNNRDData::payload, profinet::rpc::RpcTests::TestRpcTransport::receivedRequests, and profinet::rpc::RpcTests::TestRpcTransport::responses.

+ Here is the call graph for this function:

◆ TEST_F() [142/181]

profinet::rpc::TEST_F ( RpcTests  ,
PrmEndSendsExpectedControlCommand   
)

◆ TEST_F() [143/181]

profinet::rpc::TEST_F ( RpcTests  ,
ReadAllDiagnosisContinuesAfterRpcError   
)
Test:
Continues diagnosis probing when one probe produces an RPC error.

Definition at line 3936 of file test_rpc.cpp.

References profinet::PNIODHeader::index, profinet::PNRPCHeader::operationNumber, profinet::PNRPCHeader::Parse(), profinet::PNNRDData::Parse(), profinet::PNIODHeader::Parse(), profinet::PNRPCHeader::payload, and profinet::PNNRDData::payload.

+ Here is the call graph for this function:

◆ TEST_F() [144/181]

profinet::rpc::TEST_F ( RpcTests  ,
ReadAllDiagnosisReturnsNonEmptyDiagnosisResults   
)
Test:
Probes all standard diagnosis indices and returns only successful entries.

Definition at line 3900 of file test_rpc.cpp.

References profinet::PNIODHeader::index, profinet::PNRPCHeader::operationNumber, profinet::PNRPCHeader::Parse(), profinet::PNNRDData::Parse(), profinet::PNIODHeader::Parse(), profinet::PNRPCHeader::payload, and profinet::PNNRDData::payload.

+ Here is the call graph for this function:

◆ TEST_F() [145/181]

profinet::rpc::TEST_F ( RpcTests  ,
ReadAllImIgnoresRpcErrorForOptionalRecord   
)
Test:
Ignores RPC errors for optional I&M records.

Definition at line 3608 of file test_rpc.cpp.

References profinet::PNInM2::IDX, profinet::rpc::AllIM::im0, profinet::rpc::AllIM::im1, profinet::rpc::AllIM::im2, profinet::rpc::AllIM::im3, profinet::PNIODHeader::index, profinet::PNRPCHeader::operationNumber, profinet::PNRPCHeader::Parse(), profinet::PNNRDData::Parse(), profinet::PNIODHeader::Parse(), profinet::PNRPCHeader::payload, and profinet::PNNRDData::payload.

+ Here is the call graph for this function:

◆ TEST_F() [146/181]

profinet::rpc::TEST_F ( RpcTests  ,
ReadAllImIgnoresStandardExceptionForOptionalRecord   
)
Test:
Ignores non-RPC exceptions for optional I&M records.

Definition at line 3645 of file test_rpc.cpp.

References profinet::PNInM3::IDX, profinet::rpc::AllIM::im0, profinet::rpc::AllIM::im1, profinet::rpc::AllIM::im3, profinet::rpc::AllIM::im4, profinet::PNIODHeader::index, profinet::PNRPCHeader::operationNumber, profinet::PNRPCHeader::Parse(), profinet::PNNRDData::Parse(), profinet::PNIODHeader::Parse(), profinet::PNRPCHeader::payload, and profinet::PNNRDData::payload.

+ Here is the call graph for this function:

◆ TEST_F() [147/181]

profinet::rpc::TEST_F ( RpcTests  ,
ReadAllImPropagatesIm0Failure   
)
Test:
Propagates failure when mandatory I&M0 cannot be read.

Definition at line 3682 of file test_rpc.cpp.

◆ TEST_F() [148/181]

◆ TEST_F() [149/181]

profinet::rpc::TEST_F ( RpcTests  ,
ReadDiagnosisFallsBackToSimpleParser   
)
Test:
Falls back to the simple diagnosis parser when the full parser is empty.

Definition at line 3813 of file test_rpc.cpp.

References profinet::wire::PutU16(), profinet::wire::PutU8(), and profinet::PNRPCHeader::READ.

+ Here is the call graph for this function:

◆ TEST_F() [150/181]

profinet::rpc::TEST_F ( RpcTests  ,
ReadDiagnosisReturnsEmptyForRpcError   
)
Test:
Converts an RPC read failure into empty diagnosis data.

Definition at line 3878 of file test_rpc.cpp.

◆ TEST_F() [151/181]

profinet::rpc::TEST_F ( RpcTests  ,
ReadDiagnosisReturnsEmptyForShortDiagnosisPayload   
)
Test:
Returns empty diagnosis data for payloads six bytes or shorter.

Definition at line 3854 of file test_rpc.cpp.

References profinet::PNRPCHeader::READ.

◆ TEST_F() [152/181]

profinet::rpc::TEST_F ( RpcTests  ,
ReadDiagnosisUsesFullDiagnosisParser   
)
Test:
Returns parsed diagnosis data when the full diagnosis parser finds entries.

Definition at line 3791 of file test_rpc.cpp.

References profinet::PNRPCHeader::READ.

◆ TEST_F() [153/181]

profinet::rpc::TEST_F ( RpcTests  ,
ReadImplicitReturnsParsedIodResponse   
)

◆ TEST_F() [154/181]

profinet::rpc::TEST_F ( RpcTests  ,
ReadImplicitThrowsPnioErrorForDeviceError   
)
Test:
Throws PNIOError when the device rejects an implicit read.

Definition at line 3461 of file test_rpc.cpp.

References profinet::PNRPCHeader::IMPLICIT_READ, and profinet::PNRPCHeader::RESPONSE.

◆ TEST_F() [155/181]

profinet::rpc::TEST_F ( RpcTests  ,
ReadImWrappersReadAllIndividualIndices   
)
Test:
Reads every I&M wrapper and verifies that each uses its own index.

Definition at line 3523 of file test_rpc.cpp.

References profinet::PNIODHeader::index, profinet::PNRPCHeader::operationNumber, profinet::PNRPCHeader::Parse(), profinet::PNNRDData::Parse(), profinet::PNIODHeader::Parse(), profinet::PNRPCHeader::payload, and profinet::PNNRDData::payload.

+ Here is the call graph for this function:

◆ TEST_F() [156/181]

profinet::rpc::TEST_F ( RpcTests  ,
ReadModuleDiffReturnsParsedModuleDifference   
)
Test:
Reads and parses the ModuleDiffBlock.

Definition at line 3772 of file test_rpc.cpp.

References profinet::MODULE_DIFF_BLOCK, and profinet::PNRPCHeader::READ.

◆ TEST_F() [157/181]

profinet::rpc::TEST_F ( RpcTests  ,
ReadPdRealDataReturnsParsedData   
)
Test:
Reads and parses PDRealData successfully.

Definition at line 3967 of file test_rpc.cpp.

References profinet::PD_REAL_DATA, and profinet::PNRPCHeader::READ.

◆ TEST_F() [158/181]

profinet::rpc::TEST_F ( RpcTests  ,
ReadRawReturnsPayload   
)
Test:
Returns only the record payload through the ReadRaw() convenience wrapper.

Definition at line 3504 of file test_rpc.cpp.

References payload, and profinet::PNRPCHeader::READ.

◆ TEST_F() [159/181]

profinet::rpc::TEST_F ( RpcTests  ,
ReadRealIdentificationDataReturnsParsedData   
)
Test:
Reads and parses RealIdentificationData successfully.

Definition at line 3984 of file test_rpc.cpp.

References profinet::PNRPCHeader::READ, and profinet::REAL_ID_API.

◆ TEST_F() [160/181]

◆ TEST_F() [161/181]

profinet::rpc::TEST_F ( RpcTests  ,
ReadThrowsPnioErrorForDeviceError   
)
Test:
Throws PNIOError when the device reports an error during Read().

Definition at line 3425 of file test_rpc.cpp.

References profinet::PNRPCHeader::READ, and profinet::PNRPCHeader::RESPONSE.

◆ TEST_F() [162/181]

profinet::rpc::TEST_F ( RpcTests  ,
ReadyForRtClass3SendsExpectedControlCommand   
)
Test:
ReadyForRtClass3 sends the RT Class 3 readiness command.

Definition at line 4231 of file test_rpc.cpp.

References profinet::PNRPCHeader::CONTROL, CONTROL_CMD_READY_FOR_RT_CLASS_3, profinet::PNIODReleaseBlock::controlCommand, profinet::PNRPCHeader::Parse(), profinet::PNNRDData::Parse(), profinet::PNIODReleaseBlock::Parse(), profinet::PNRPCHeader::payload, profinet::PNNRDData::payload, profinet::rpc::RpcTests::TestRpcTransport::receivedRequests, and profinet::rpc::RpcTests::TestRpcTransport::responses.

+ Here is the call graph for this function:

◆ TEST_F() [163/181]

profinet::rpc::TEST_F ( RpcTests  ,
RemoteObjectUuidHasExpectedLength   
)
Test:
Verifies that constructing RPCCon also executes the complete BuildObjectUuid path used for the remote object UUID.

Definition at line 1499 of file test_rpc.cpp.

References profinet::uuidLenght.

◆ TEST_F() [164/181]

profinet::rpc::TEST_F ( RpcTests  ,
SendControlRejectsDisconnectedConnection   
)
Test:
Rejects CONTROL operations when the AR is not connected.

Definition at line 4111 of file test_rpc.cpp.

References profinet::PrmBegin.

◆ TEST_F() [165/181]

profinet::rpc::TEST_F ( RpcTests  ,
SendControlReturnsResponsePayload   
)
Test:
Waits for and returns the NRD payload of a CONTROL response.

Definition at line 4147 of file test_rpc.cpp.

References BLOCK_PRM_BEGIN_REQ, profinet::PNRPCHeader::CONTROL, and profinet::PrmBegin.

◆ TEST_F() [166/181]

profinet::rpc::TEST_F ( RpcTests  ,
SendControlSendsWithoutWaiting   
)
Test:
Sends a CONTROL request without waiting for a response.

Definition at line 4119 of file test_rpc.cpp.

References BLOCK_PRM_BEGIN_REQ, profinet::PNRPCHeader::CONTROL, profinet::PNRPCHeader::operationNumber, profinet::PNRPCHeader::packetType, profinet::PNRPCHeader::Parse(), profinet::PNNRDData::Parse(), profinet::PNRPCHeader::payload, profinet::PNNRDData::payload, profinet::PrmBegin, profinet::PNRPCHeader::REQUEST, and profinet::rpc::RpcTests::TestRpcTransport::sentRequests.

+ Here is the call graph for this function:

◆ TEST_F() [167/181]

profinet::rpc::TEST_F ( RpcTests  ,
SendControlThrowsPnioErrorForDeviceError   
)
Test:
Throws PNIOError when a CONTROL response reports a device error.

Definition at line 4166 of file test_rpc.cpp.

References BLOCK_PRM_BEGIN_REQ, profinet::PNRPCHeader::CONTROL, profinet::PrmBegin, and profinet::PNRPCHeader::RESPONSE.

◆ TEST_F() [168/181]

profinet::rpc::TEST_F ( RpcTests  ,
SendReceiveRetriesAfterRequestPacket   
)

◆ TEST_F() [169/181]

◆ TEST_F() [170/181]

profinet::rpc::TEST_F ( RpcTests  ,
SendReceiveThrowsForRejectedResponse   
)
Test:
Converts an RPC REJECT response into RPCError.

Definition at line 3142 of file test_rpc.cpp.

References profinet::PNRPCHeader::READ, and profinet::PNRPCHeader::REJECT.

◆ TEST_F() [171/181]

profinet::rpc::TEST_F ( RpcTests  ,
SendReceiveThrowsForShortResponse   
)
Test:
Throws RPCError when the transport returns too little data.

Definition at line 3115 of file test_rpc.cpp.

◆ TEST_F() [172/181]

profinet::rpc::TEST_F ( RpcTests  ,
SendReceiveThrowsForUnexpectedPacketType   
)
Test:
Rejects any unsupported RPC packet type.

Definition at line 3155 of file test_rpc.cpp.

References profinet::PNRPCHeader::READ.

◆ TEST_F() [173/181]

profinet::rpc::TEST_F ( RpcTests  ,
SendReceiveThrowsRpcFaultError   
)
Test:
Converts an RPC FAULT response into RPCFaultError.

Definition at line 3128 of file test_rpc.cpp.

References profinet::PNRPCHeader::FAULT, profinet::PNRPCHeader::operationNumber, and profinet::PNRPCHeader::READ.

◆ TEST_F() [174/181]

profinet::rpc::TEST_F ( RpcTests  ,
SessionKeyReturnsInitialValue   
)
Test:
Returns the current session key of the RPC connection.

Definition at line 2988 of file test_rpc.cpp.

◆ TEST_F() [175/181]

profinet::rpc::TEST_F ( RpcTests  ,
StringToUuidBytesRejectsMalformedInput   
)
Test:
Rejects malformed UUID strings that do not contain a valid UUID representation.

Definition at line 1155 of file test_rpc.cpp.

References StringToUuidBytes().

+ Here is the call graph for this function:

◆ TEST_F() [176/181]

profinet::rpc::TEST_F ( RpcTests  ,
UuidBytesToStringStringToUuidBytesRoundtrip   
)
Test:
Converts UUID bytes to a canonical UUID string and back without changing the underlying byte representation.

Definition at line 1144 of file test_rpc.cpp.

References StringToUuidBytes(), and UuidBytesToString().

+ Here is the call graph for this function:

◆ TEST_F() [177/181]

profinet::rpc::TEST_F ( RpcTests  ,
WriteCompletesSuccessfully   
)

◆ TEST_F() [178/181]

profinet::rpc::TEST_F ( RpcTests  ,
WriteMultipleReturnsEmptyForNoWrites   
)
Test:
Returns immediately without sending anything for an empty write list.

Definition at line 3699 of file test_rpc.cpp.

References profinet::rpc::RpcTests::TestRpcTransport::receivedRequests.

◆ TEST_F() [179/181]

profinet::rpc::TEST_F ( RpcTests  ,
WriteMultipleSendsMultipleWrites   
)
Test:
Builds and sends a multiple-write request successfully.

Definition at line 3716 of file test_rpc.cpp.

References profinet::rpc::RpcTests::TestRpcTransport::receivedRequests, profinet::rpc::RpcTests::TestRpcTransport::responses, and profinet::PNRPCHeader::WRITE.

◆ TEST_F() [180/181]

profinet::rpc::TEST_F ( RpcTests  ,
WriteMultipleThrowsPnioErrorForDeviceError   
)
Test:
Throws PNIOError when the overall multiple-write operation fails.

Definition at line 3750 of file test_rpc.cpp.

References profinet::PNRPCHeader::RESPONSE, and profinet::PNRPCHeader::WRITE.

◆ TEST_F() [181/181]

profinet::rpc::TEST_F ( RpcTests  ,
WriteThrowsPnioErrorForDeviceError   
)
Test:
Throws PNIOError when the device rejects a write.

Definition at line 3490 of file test_rpc.cpp.

References profinet::PNRPCHeader::RESPONSE, and profinet::PNRPCHeader::WRITE.

◆ UuidBytesToString()

std::string profinet::rpc::UuidBytesToString ( const std::array< std::uint8_t, uuidLenght > &  data)

Format a 16-byte DCE/RPC UUID as a canonical string.

Parameters
dataThe 16 raw UUID bytes (mixed-endian DCE/RPC format).
Returns
String in "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" form.

Definition at line 106 of file rpc.cpp.

References profinet::wire::Reader::Fixed(), profinet::ToHex(), profinet::wire::Reader::U16(), profinet::wire::Reader::U16LittleEndian(), and profinet::wire::Reader::U32LittleEndian().

Referenced by profinet::rpc::RPCCon::EpmLookup(), ParseEpmTower(), and TEST_F().

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

Variable Documentation

◆ BLOCK_IOD_CONTROL_APP_READY_REQ

constexpr std::uint16_t profinet::rpc::BLOCK_IOD_CONTROL_APP_READY_REQ = 0x0112
inlineconstexpr

◆ BLOCK_IOD_CONTROL_APP_READY_RES

constexpr std::uint16_t profinet::rpc::BLOCK_IOD_CONTROL_APP_READY_RES = 0x8112
inlineconstexpr

Block type: IODControlResAppReady.

Definition at line 67 of file rpcTypes.h.

Referenced by TestRpcDevice::ParseControlResponse(), TEST_F(), TEST_F(), TEST_F(), and TEST_F().

◆ BLOCK_IOD_CONTROL_PRM_END_REQ

constexpr std::uint16_t profinet::rpc::BLOCK_IOD_CONTROL_PRM_END_REQ = 0x0110
inlineconstexpr

Block type: IODControlReqPrmEnd.

Definition at line 63 of file rpcTypes.h.

Referenced by TEST_F().

◆ BLOCK_IOD_CONTROL_RT_CLASS_3_REQ

constexpr std::uint16_t profinet::rpc::BLOCK_IOD_CONTROL_RT_CLASS_3_REQ = 0x0117
inlineconstexpr

Block type: IODControlReqRTClass3.

Definition at line 69 of file rpcTypes.h.

◆ BLOCK_PRM_BEGIN_REQ

constexpr std::uint16_t profinet::rpc::BLOCK_PRM_BEGIN_REQ = 0x0118
inlineconstexpr

Block type: PrmBeginReq.

Definition at line 71 of file rpcTypes.h.

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

◆ BLOCK_RELEASE_REQ

constexpr std::uint16_t profinet::rpc::BLOCK_RELEASE_REQ = 0x0114
inlineconstexpr

Block type: IODReleaseReq.

Definition at line 73 of file rpcTypes.h.

◆ CONNECTION_TIMEOUT

constexpr double profinet::rpc::CONNECTION_TIMEOUT = 10.0
inlineconstexpr

Maximum idle time in seconds before an AR is considered to need re-connection.

Definition at line 58 of file rpcTypes.h.

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

◆ CONTROL_CMD_APP_READY

constexpr std::uint16_t profinet::rpc::CONTROL_CMD_APP_READY = 0x0002
inlineconstexpr

Control command bit: ApplicationReady.

Definition at line 78 of file rpcTypes.h.

Referenced by TestRpcDevice::BuildApplicationReadyRequestPayload(), TestRpcDevice::SendApplicationReadyRequest(), and TEST_F().

◆ CONTROL_CMD_DONE

constexpr std::uint16_t profinet::rpc::CONTROL_CMD_DONE = 0x0008
inlineconstexpr

Control command bit: Done.

Definition at line 82 of file rpcTypes.h.

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

◆ CONTROL_CMD_PRM_BEGIN

constexpr std::uint16_t profinet::rpc::CONTROL_CMD_PRM_BEGIN = 0x0040
inlineconstexpr

Control command bit: PrmBegin.

Definition at line 88 of file rpcTypes.h.

Referenced by profinet::sim::VirtualProfinetRpcDevice::HandleControl(), and TEST_F().

◆ CONTROL_CMD_PRM_END

constexpr std::uint16_t profinet::rpc::CONTROL_CMD_PRM_END = 0x0001
inlineconstexpr

Control command bit: PrmEnd.

Definition at line 76 of file rpcTypes.h.

Referenced by profinet::sim::VirtualProfinetRpcDevice::HandleControl(), TEST_F(), and TEST_F().

◆ CONTROL_CMD_READY_FOR_COMPANION

constexpr std::uint16_t profinet::rpc::CONTROL_CMD_READY_FOR_COMPANION = 0x0010
inlineconstexpr

Control command bit: ReadyForCompanion.

Definition at line 84 of file rpcTypes.h.

◆ CONTROL_CMD_READY_FOR_RT_CLASS_3

constexpr std::uint16_t profinet::rpc::CONTROL_CMD_READY_FOR_RT_CLASS_3 = 0x0020
inlineconstexpr

Control command bit: ReadyForRTClass3.

Definition at line 86 of file rpcTypes.h.

Referenced by TEST_F().

◆ CONTROL_CMD_RELEASE

constexpr std::uint16_t profinet::rpc::CONTROL_CMD_RELEASE = 0x0004
inlineconstexpr

Control command bit: Release.

Definition at line 80 of file rpcTypes.h.

◆ DEFAULT_TIMEOUT

constexpr double profinet::rpc::DEFAULT_TIMEOUT = 5.0
inlineconstexpr

Default RPC response timeout in seconds.

Definition at line 56 of file rpcTypes.h.

◆ EPM_INQUIRY_ALL

constexpr std::uint32_t profinet::rpc::EPM_INQUIRY_ALL = 0x00
inlineconstexpr

EPM inquiry type: all interfaces.

Definition at line 51 of file rpcTypes.h.

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

◆ EPM_INQUIRY_INTERFACE

constexpr std::uint32_t profinet::rpc::EPM_INQUIRY_INTERFACE = 0x01
inlineconstexpr

EPM inquiry type: specific interface.

Definition at line 53 of file rpcTypes.h.

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

◆ EPM_LOOKUP

constexpr std::uint32_t profinet::rpc::EPM_LOOKUP = 0x02
inlineconstexpr

EPM operation: Lookup.

Definition at line 49 of file rpcTypes.h.

Referenced by profinet::rpc::RPCCon::EpmLookup(), profinet::rpc::RpcTests::MakeEpmResponse(), and TEST_F().

◆ PNIO_DEVICE_INTERFACE_VERSION

constexpr std::uint32_t profinet::rpc::PNIO_DEVICE_INTERFACE_VERSION = 1
inlineconstexpr

Interface version used for the PNIO device interface.

Definition at line 46 of file rpcTypes.h.

◆ RPC_BIND_PORT

constexpr std::uint16_t profinet::rpc::RPC_BIND_PORT = 0x8895
inlineconstexpr

PROFINET IO RPC bind port (34965).

Definition at line 30 of file rpcTypes.h.

◆ RPC_PORT

constexpr std::uint16_t profinet::rpc::RPC_PORT = 0x8894
inlineconstexpr

PROFINET IO RPC port (34964).

Definition at line 28 of file rpcTypes.h.

Referenced by profinet::rpc::RPCCon::RPCCon(), and TestRpcDevice::ControllerCControlEndpoint().

◆ UUID_EPM_V4

const std::string profinet::rpc::UUID_EPM_V4 = "e1af8308-5d1f-11c9-91a4-08002b14a0fa"
inline

Endpoint Mapper interface UUID.

Definition at line 35 of file rpcTypes.h.

Referenced by profinet::rpc::RPCCon::EpmLookup(), profinet::rpc::EPMEndpoint::InterfaceName(), TEST_F(), and TEST_F().

◆ UUID_NULL

const std::string profinet::rpc::UUID_NULL = "00000000-0000-0000-0000-000000000000"
inline

Null (all-zero) DCE/RPC UUID string.

Definition at line 33 of file rpcTypes.h.

◆ UUID_PNIO_CONTROLLER

const std::string profinet::rpc::UUID_PNIO_CONTROLLER = "dea00002-6c97-11d1-8271-00a02442df7d"
inline

PROFINET IO-Controller interface UUID.

Definition at line 39 of file rpcTypes.h.

Referenced by profinet::rpc::EPMEndpoint::InterfaceName(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), and TEST_F().

◆ UUID_PNIO_DEVICE

const std::string profinet::rpc::UUID_PNIO_DEVICE = "dea00001-6c97-11d1-8271-00a02442df7d"
inline

◆ UUID_PNIO_PARAMETER_SERVER

const std::string profinet::rpc::UUID_PNIO_PARAMETER_SERVER = "dea00004-6c97-11d1-8271-00a02442df7d"
inline

PROFINET IO-ParameterServer interface UUID.

Definition at line 43 of file rpcTypes.h.

Referenced by profinet::rpc::EPMEndpoint::InterfaceName(), and TEST_F().

◆ UUID_PNIO_SUPERVISOR

const std::string profinet::rpc::UUID_PNIO_SUPERVISOR = "dea00003-6c97-11d1-8271-00a02442df7d"
inline

PROFINET IO-Supervisor interface UUID.

Definition at line 41 of file rpcTypes.h.

Referenced by profinet::rpc::EPMEndpoint::InterfaceName(), and TEST_F().

◆ VERSION_HIGH

◆ VERSION_LOW