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

Decoded PROFINET RTA ERR-PDU. More...

#include <protocol.h>

+ Collaboration diagram for profinet::RtaError:

Public Member Functions

RtaErrorClass ErrorClass () const
 Classify the ErrorCode2 reason.
 
bool IsRtaProtocolError () const
 Whether the status belongs to the RTA protocol-error class.
 
bool IsSequenceNumberError () const
 Whether this is RTA sequence-number coordination failure.
 
bool IsAbort () const
 Whether this reason is an RTA abort reason.
 
bool IsExtended () const
 Whether the reason is one of the later extended RTA reasons.
 
bool IsObsoleted () const
 Whether this reason code is obsolete.
 
bool IsUserAbort () const
 Whether this is the user-specific RTA abort.
 
std::string ReasonName () const
 Return the decoded RTA reason name.
 

Static Public Member Functions

static RtaErrorReason ClassifyRtaErrorReason (std::uint8_t errorCode2)
 Return the decoded RTA reason.
 
static RtaErrorClass ClassifyRtaError (std::uint8_t errorCode2)
 Return the decoded RTA reason.
 
static RtaErrorClass ClassifyRtaError (RtaErrorReason reason)
 Return the decoded RTA reason.
 

Public Attributes

PNRTAHeader header
 Complete RTA header associated with this error.
 
std::uint32_t statusPnio = 0
 Raw four-byte PNIO status value.
 
std::uint8_t errorCode = 0
 PNIO ErrorCode byte.
 
std::uint8_t errorDecode = 0
 PNIO ErrorDecode byte.
 
std::uint8_t errorCode1 = 0
 PNIO ErrorCode1 byte.
 
std::uint8_t errorCode2 = 0
 PNIO ErrorCode2 byte.
 
RtaErrorReason reason = RtaErrorReason::Reserved
 Decoded RTA reason.
 
RtaErrorClass kind = RtaErrorClass::UserSpecific
 Decoded RTA class.
 

Detailed Description

Decoded PROFINET RTA ERR-PDU.

An ERR-RTA PDU has RTA PDU type 0x04 and carries a four-byte PNIO status value in its variable part. The PNIO status bytes are: ErrorCode, ErrorDecode, ErrorCode1, ErrorCode2.

For example: CF 81 FD 0F

means an RTA protocol error with ErrorCode2 0x0F.

Definition at line 2570 of file protocol.h.

Member Function Documentation

◆ ClassifyRtaError() [1/2]

static RtaErrorClass profinet::RtaError::ClassifyRtaError ( RtaErrorReason  reason)
static

Return the decoded RTA reason.

Parameters
reasonRTA ErrorCode2 value.
Returns
RtaErrorClass to generate the human-readable string.

◆ ClassifyRtaError() [2/2]

RtaErrorClass profinet::RtaError::ClassifyRtaError ( std::uint8_t  errorCode2)
static

Return the decoded RTA reason.

Parameters
errorCode2RTA ErrorCode2 value.
Returns
RtaErrorClass to generate the human-readable string.

Definition at line 496 of file alarms.cpp.

References profinet::Abort, errorCode2, profinet::Extended, profinet::Obsoleted, profinet::Reserved, and profinet::SequenceNumber.

Referenced by profinet::ParseRtaError(), and profinet::TEST().

+ Here is the caller graph for this function:

◆ ClassifyRtaErrorReason()

RtaErrorReason profinet::RtaError::ClassifyRtaErrorReason ( std::uint8_t  errorCode2)
static

Return the decoded RTA reason.

Parameters
errorCode2RTA ErrorCode2 value.
Returns
RtaErrorReason to generate the human-readable string.

Definition at line 347 of file alarms.cpp.

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

Referenced by profinet::ParseRtaError(), and profinet::TEST().

+ Here is the caller graph for this function:

◆ ErrorClass()

RtaErrorClass profinet::RtaError::ErrorClass ( ) const
inline

Classify the ErrorCode2 reason.

Returns
Semantic RTA error class.

Definition at line 2598 of file protocol.h.

References kind.

◆ IsAbort()

bool profinet::RtaError::IsAbort ( ) const
inline

Whether this reason is an RTA abort reason.

Returns
True for ErrorCode2 0x02 through 0x25.

Definition at line 2622 of file protocol.h.

References errorCode2, and IsRtaProtocolError().

+ Here is the call graph for this function:

◆ IsExtended()

bool profinet::RtaError::IsExtended ( ) const
inline

Whether the reason is one of the later extended RTA reasons.

Returns
True for ErrorCode2 0x26 through 0x2C.

Definition at line 2631 of file protocol.h.

References errorCode2, and IsRtaProtocolError().

+ Here is the call graph for this function:

◆ IsObsoleted()

bool profinet::RtaError::IsObsoleted ( ) const
inline

Whether this reason code is obsolete.

Returns
True for ErrorCode2 0x2D.

Definition at line 2640 of file protocol.h.

References errorCode2, and IsRtaProtocolError().

+ Here is the call graph for this function:

◆ IsRtaProtocolError()

bool profinet::RtaError::IsRtaProtocolError ( ) const
inline

Whether the status belongs to the RTA protocol-error class.

Returns
True for CF 81 FD xx.

Definition at line 2605 of file protocol.h.

References errorCode, errorCode1, and errorDecode.

Referenced by IsAbort(), IsExtended(), IsObsoleted(), IsSequenceNumberError(), and IsUserAbort().

+ Here is the caller graph for this function:

◆ IsSequenceNumberError()

bool profinet::RtaError::IsSequenceNumberError ( ) const
inline

Whether this is RTA sequence-number coordination failure.

Returns
True for ErrorCode2 0x01.

Definition at line 2614 of file protocol.h.

References errorCode2, and IsRtaProtocolError().

+ Here is the call graph for this function:

◆ IsUserAbort()

bool profinet::RtaError::IsUserAbort ( ) const
inline

Whether this is the user-specific RTA abort.

Returns
True for ErrorCode2 0xFF.

Definition at line 2648 of file protocol.h.

References errorCode2, and IsRtaProtocolError().

+ Here is the call graph for this function:

◆ ReasonName()

std::string profinet::RtaError::ReasonName ( ) const

Return the decoded RTA reason name.

Returns
Human-readable reason name.

Definition at line 563 of file alarms.cpp.

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

Member Data Documentation

◆ errorCode

std::uint8_t profinet::RtaError::errorCode = 0

PNIO ErrorCode byte.

Definition at line 2579 of file protocol.h.

Referenced by IsRtaProtocolError(), and profinet::ParseRtaError().

◆ errorCode1

std::uint8_t profinet::RtaError::errorCode1 = 0

PNIO ErrorCode1 byte.

Definition at line 2585 of file protocol.h.

Referenced by IsRtaProtocolError(), and profinet::ParseRtaError().

◆ errorCode2

std::uint8_t profinet::RtaError::errorCode2 = 0

◆ errorDecode

std::uint8_t profinet::RtaError::errorDecode = 0

PNIO ErrorDecode byte.

Definition at line 2582 of file protocol.h.

Referenced by IsRtaProtocolError(), and profinet::ParseRtaError().

◆ header

PNRTAHeader profinet::RtaError::header

Complete RTA header associated with this error.

Definition at line 2573 of file protocol.h.

Referenced by profinet::ParseRtaError().

◆ kind

RtaErrorClass profinet::RtaError::kind = RtaErrorClass::UserSpecific

Decoded RTA class.

Definition at line 2594 of file protocol.h.

Referenced by ErrorClass(), and profinet::ParseRtaError().

◆ reason

RtaErrorReason profinet::RtaError::reason = RtaErrorReason::Reserved

Decoded RTA reason.

Definition at line 2591 of file protocol.h.

Referenced by profinet::ParseRtaError(), and ReasonName().

◆ statusPnio

std::uint32_t profinet::RtaError::statusPnio = 0

Raw four-byte PNIO status value.

Definition at line 2576 of file protocol.h.

Referenced by profinet::ParseRtaError().


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