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

Diagnosis alarm item. More...

#include <alarms.h>

+ Collaboration diagram for profinet::DiagnosisItem:

Public Member Functions

std::string UsiName () const
 Human-readable name for this item's USI.
 
std::uint16_t ChannelNumberValue () const
 Channel number with the accumulative bit masked off.
 
bool IsAccumulative () const
 Whether this diagnosis is accumulative (bit 15 of ChannelNumber).
 
std::uint8_t ChannelTypeValue () const
 Channel type extracted from ChannelProperties.
 
bool IsExtended () const
 Whether this is the Ext or Qualified variant.
 
bool IsQualified () const
 Whether this is the Qualified variant.
 

Public Attributes

Usi userStructureId = Usi::Unknown
 User Structure Identifier for this item.
 
std::uint16_t channelNumber = 0
 Channel number, with the accumulative bit packed into bit 15.
 
std::uint16_t channelProperties = 0
 Channel properties bitfield (type, direction, specifier, maintenance flags).
 
std::uint16_t channelErrorType = 0
 Channel error type code.
 
std::uint16_t extChannelErrorType = 0
 Extended channel error type code (Ext/Qualified variants only).
 
std::uint32_t extChannelAddValue = 0
 Extended channel additional value (Ext/Qualified variants only).
 
std::uint32_t qualifiedChannelQualifier = 0
 Qualifier bitmask (Qualified variant only).
 

Detailed Description

Diagnosis alarm item.

Covers USI 0x8000 ChannelDiagnosis, 0x8002 ExtChannelDiagnosis, and 0x8003 QualifiedChannelDiagnosis.

Definition at line 48 of file alarms.h.

Member Function Documentation

◆ ChannelNumberValue()

std::uint16_t profinet::DiagnosisItem::ChannelNumberValue ( ) const
inline

Channel number with the accumulative bit masked off.

Returns
The channel number (bits 0-14).

Definition at line 80 of file alarms.h.

References profinet::Bit0till14OfChannelNumber, and channelNumber.

◆ ChannelTypeValue()

std::uint8_t profinet::DiagnosisItem::ChannelTypeValue ( ) const
inline

Channel type extracted from ChannelProperties.

Returns
The low byte of ChannelProperties.

Definition at line 94 of file alarms.h.

References channelProperties, and profinet::LowByteMask.

◆ IsAccumulative()

bool profinet::DiagnosisItem::IsAccumulative ( ) const
inline

Whether this diagnosis is accumulative (bit 15 of ChannelNumber).

Returns
True if the accumulative bit is set.

Definition at line 87 of file alarms.h.

References profinet::Bit15OfChannelNumber, and channelNumber.

◆ IsExtended()

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

Whether this is the Ext or Qualified variant.

Returns
True if UserStructureId is USI_EXT_CHANNEL_DIAGNOSIS or USI_QUALIFIED_CHANNEL_DIAGNOSIS.

Definition at line 101 of file alarms.h.

References profinet::ExtendedChannelDiagnosis, profinet::QualifiedChannelDiagnosis, and userStructureId.

◆ IsQualified()

bool profinet::DiagnosisItem::IsQualified ( ) const
inline

Whether this is the Qualified variant.

Returns
True if UserStructureId is USI_QUALIFIED_CHANNEL_DIAGNOSIS.

Definition at line 108 of file alarms.h.

References profinet::QualifiedChannelDiagnosis, and userStructureId.

◆ UsiName()

std::string profinet::DiagnosisItem::UsiName ( ) const
inline

Human-readable name for this item's USI.

Returns
The USI name (see GetUsiName()).

Definition at line 73 of file alarms.h.

References profinet::GetUsiName(), and userStructureId.

+ Here is the call graph for this function:

Member Data Documentation

◆ channelErrorType

std::uint16_t profinet::DiagnosisItem::channelErrorType = 0

Channel error type code.

Definition at line 60 of file alarms.h.

◆ channelNumber

std::uint16_t profinet::DiagnosisItem::channelNumber = 0

Channel number, with the accumulative bit packed into bit 15.

Definition at line 54 of file alarms.h.

Referenced by ChannelNumberValue(), and IsAccumulative().

◆ channelProperties

std::uint16_t profinet::DiagnosisItem::channelProperties = 0

Channel properties bitfield (type, direction, specifier, maintenance flags).

Definition at line 57 of file alarms.h.

Referenced by ChannelTypeValue().

◆ extChannelAddValue

std::uint32_t profinet::DiagnosisItem::extChannelAddValue = 0

Extended channel additional value (Ext/Qualified variants only).

Definition at line 66 of file alarms.h.

◆ extChannelErrorType

std::uint16_t profinet::DiagnosisItem::extChannelErrorType = 0

Extended channel error type code (Ext/Qualified variants only).

Definition at line 63 of file alarms.h.

◆ qualifiedChannelQualifier

std::uint32_t profinet::DiagnosisItem::qualifiedChannelQualifier = 0

Qualifier bitmask (Qualified variant only).

Definition at line 69 of file alarms.h.

◆ userStructureId

Usi profinet::DiagnosisItem::userStructureId = Usi::Unknown

User Structure Identifier for this item.

Definition at line 51 of file alarms.h.

Referenced by IsExtended(), IsQualified(), and UsiName().


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