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

Complete parsed AlarmNotification PDU: header fields + parsed items. More...

#include <alarms.h>

+ Collaboration diagram for profinet::AlarmNotification:

Public Member Functions

bool IsHighPriority () const
 Whether this is a high-priority notification.
 
bool IsLowPriority () const
 Whether this is a low-priority notification.
 
std::string AlarmTypeName () const
 Human-readable name for AlarmType.
 
std::string Location () const
 Location string identifying where the alarm originated.
 

Public Attributes

BlockType blockType = BlockType::Unknown
 Block type (high or low priority notification).
 
std::pair< std::uint8_t, std::uint8_t > blockVersion {1, 0}
 Block format version.
 
AlarmType alarmType = AlarmType::Unknown
 Alarm type (Diagnosis/Process/Pull/Plug/...).
 
std::uint32_t api = 0
 API number.
 
std::uint16_t slotNumber = 0
 Slot number where the alarm originated.
 
std::uint16_t subslotNumber = 0
 Subslot number where the alarm originated.
 
std::uint32_t moduleIdentNumber = 0
 Module ident number of the affected module.
 
std::uint32_t submoduleIdentNumber = 0
 Submodule ident number of the affected submodule.
 
std::uint16_t alarmSequenceNumber = 0
 Sequence number extracted from the alarm specifier.
 
bool channelDiagnosis = false
 Whether the alarm specifier indicates channel diagnosis is present.
 
bool manufacturerSpecific = false
 Whether the alarm specifier indicates a manufacturer-specific diagnosis.
 
bool submoduleDiagnosisState = false
 Whether the alarm specifier indicates submodule diagnosis state.
 
bool arDiagnosisState = false
 Whether the alarm specifier indicates AR diagnosis state.
 
std::vector< AlarmItemVariantitems
 Parsed alarm items carried by this notification.
 
Bytes rawPayload
 Raw, undecoded payload the items were parsed from.
 

Detailed Description

Complete parsed AlarmNotification PDU: header fields + parsed items.

Definition at line 357 of file alarms.h.

Member Function Documentation

◆ AlarmTypeName()

std::string profinet::AlarmNotification::AlarmTypeName ( ) const
inline

Human-readable name for AlarmType.

Returns
The alarm type name (see GetAlarmTypeName()).

Definition at line 420 of file alarms.h.

References alarmType, and profinet::GetAlarmTypeName().

+ Here is the call graph for this function:

◆ IsHighPriority()

bool profinet::AlarmNotification::IsHighPriority ( ) const
inline

Whether this is a high-priority notification.

Returns
True if BlockType == BLOCK_ALARM_NOTIFICATION_HIGH.

Definition at line 406 of file alarms.h.

References profinet::AlarmNotificationHigh, and blockType.

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

+ Here is the caller graph for this function:

◆ IsLowPriority()

bool profinet::AlarmNotification::IsLowPriority ( ) const
inline

Whether this is a low-priority notification.

Returns
True if BlockType == BLOCK_ALARM_NOTIFICATION_LOW.

Definition at line 413 of file alarms.h.

References profinet::AlarmNotificationLow, and blockType.

◆ Location()

std::string profinet::AlarmNotification::Location ( ) const

Location string identifying where the alarm originated.

Returns
A string in "API:Slot:0xSubslot" form.

Definition at line 281 of file alarms.cpp.

References api, slotNumber, and subslotNumber.

Member Data Documentation

◆ alarmSequenceNumber

std::uint16_t profinet::AlarmNotification::alarmSequenceNumber = 0

Sequence number extracted from the alarm specifier.

Definition at line 384 of file alarms.h.

Referenced by profinet::ParseAlarmNotification(), and profinet::AlarmListener::SendAck().

◆ alarmType

AlarmType profinet::AlarmNotification::alarmType = AlarmType::Unknown

Alarm type (Diagnosis/Process/Pull/Plug/...).

Definition at line 366 of file alarms.h.

Referenced by AlarmTypeName(), profinet::ParseAlarmNotification(), and profinet::AlarmListener::SendAck().

◆ api

std::uint32_t profinet::AlarmNotification::api = 0

API number.

Definition at line 369 of file alarms.h.

Referenced by Location(), profinet::ParseAlarmNotification(), and profinet::AlarmListener::SendAck().

◆ arDiagnosisState

bool profinet::AlarmNotification::arDiagnosisState = false

Whether the alarm specifier indicates AR diagnosis state.

Definition at line 396 of file alarms.h.

Referenced by profinet::ParseAlarmNotification(), and profinet::AlarmListener::SendAck().

◆ blockType

BlockType profinet::AlarmNotification::blockType = BlockType::Unknown

Block type (high or low priority notification).

Definition at line 360 of file alarms.h.

Referenced by IsHighPriority(), IsLowPriority(), and profinet::ParseAlarmNotification().

◆ blockVersion

std::pair<std::uint8_t, std::uint8_t> profinet::AlarmNotification::blockVersion {1, 0}

Block format version.

Definition at line 363 of file alarms.h.

Referenced by profinet::ParseAlarmNotification().

◆ channelDiagnosis

bool profinet::AlarmNotification::channelDiagnosis = false

Whether the alarm specifier indicates channel diagnosis is present.

Definition at line 387 of file alarms.h.

Referenced by profinet::ParseAlarmNotification(), and profinet::AlarmListener::SendAck().

◆ items

std::vector<AlarmItemVariant> profinet::AlarmNotification::items

Parsed alarm items carried by this notification.

Definition at line 399 of file alarms.h.

Referenced by profinet::ParseAlarmNotification().

◆ manufacturerSpecific

bool profinet::AlarmNotification::manufacturerSpecific = false

Whether the alarm specifier indicates a manufacturer-specific diagnosis.

Definition at line 390 of file alarms.h.

Referenced by profinet::ParseAlarmNotification(), and profinet::AlarmListener::SendAck().

◆ moduleIdentNumber

std::uint32_t profinet::AlarmNotification::moduleIdentNumber = 0

Module ident number of the affected module.

Definition at line 378 of file alarms.h.

Referenced by profinet::ParseAlarmNotification().

◆ rawPayload

Bytes profinet::AlarmNotification::rawPayload

Raw, undecoded payload the items were parsed from.

Definition at line 402 of file alarms.h.

Referenced by profinet::ParseAlarmNotification().

◆ slotNumber

std::uint16_t profinet::AlarmNotification::slotNumber = 0

Slot number where the alarm originated.

Definition at line 372 of file alarms.h.

Referenced by Location(), profinet::ParseAlarmNotification(), and profinet::AlarmListener::SendAck().

◆ submoduleDiagnosisState

bool profinet::AlarmNotification::submoduleDiagnosisState = false

Whether the alarm specifier indicates submodule diagnosis state.

Definition at line 393 of file alarms.h.

Referenced by profinet::ParseAlarmNotification(), and profinet::AlarmListener::SendAck().

◆ submoduleIdentNumber

std::uint32_t profinet::AlarmNotification::submoduleIdentNumber = 0

Submodule ident number of the affected submodule.

Definition at line 381 of file alarms.h.

Referenced by profinet::ParseAlarmNotification().

◆ subslotNumber

std::uint16_t profinet::AlarmNotification::subslotNumber = 0

Subslot number where the alarm originated.

Definition at line 375 of file alarms.h.

Referenced by Location(), profinet::ParseAlarmNotification(), and profinet::AlarmListener::SendAck().


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