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

AlarmNotification-PDU: carries a diagnosis/process/pull/plug/... alarm event. More...

#include <protocol.h>

+ Collaboration diagram for profinet::PNAlarmNotificationPDU:

Static Public Member Functions

static PNAlarmNotificationPDU Parse (const Bytes &data)
 Parse an AlarmNotification-PDU from raw bytes.
 

Public Attributes

std::array< std::uint8_t, blockHeaderLenghtblockHeader {}
 Nested 6-byte block header.
 
std::uint16_t alarmType = 0
 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 alarmSpecifier = 0
 Alarm specifier flags (sequence number, channel diagnosis presence, etc.).
 
Bytes payload
 Alarm item data (USI-dispatched; see alarms.h).
 

Static Public Attributes

static constexpr std::uint16_t BLOCK_ALARM_HIGH = 0x0001
 Block type: high-priority alarm notification.
 
static constexpr std::uint16_t BLOCK_ALARM_LOW = 0x0002
 Block type: low-priority alarm notification.
 
static constexpr std::uint16_t BLOCK_ALARM_ACK_HIGH = 0x8001
 Block type: high-priority alarm acknowledgement.
 
static constexpr std::uint16_t BLOCK_ALARM_ACK_LOW = 0x8002
 Block type: low-priority alarm acknowledgement.
 
static constexpr std::size_t kFixedSize = 26
 Size in bytes of the fixed portion of this PDU.
 

Detailed Description

AlarmNotification-PDU: carries a diagnosis/process/pull/plug/... alarm event.

Definition at line 1789 of file protocol.h.

Member Function Documentation

◆ Parse()

static PNAlarmNotificationPDU profinet::PNAlarmNotificationPDU::Parse ( const Bytes data)
inlinestatic

Parse an AlarmNotification-PDU from raw bytes.

Parameters
dataBytes starting at the BlockHeader field.
Returns
The parsed PDU.

Definition at line 1838 of file protocol.h.

References alarmSpecifier, alarmType, api, blockHeader, profinet::blockHeaderLenght, profinet::wire::Reader::Fixed(), kFixedSize, moduleIdentNumber, payload, profinet::wire::Reader::ReadBytes(), profinet::wire::Reader::Remaining(), slotNumber, submoduleIdentNumber, subslotNumber, profinet::wire::Reader::U16(), and profinet::wire::Reader::U32().

+ Here is the call graph for this function:

Member Data Documentation

◆ alarmSpecifier

std::uint16_t profinet::PNAlarmNotificationPDU::alarmSpecifier = 0

Alarm specifier flags (sequence number, channel diagnosis presence, etc.).

Definition at line 1827 of file protocol.h.

Referenced by Parse().

◆ alarmType

std::uint16_t profinet::PNAlarmNotificationPDU::alarmType = 0

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

Definition at line 1809 of file protocol.h.

Referenced by Parse().

◆ api

std::uint32_t profinet::PNAlarmNotificationPDU::api = 0

API number.

Definition at line 1812 of file protocol.h.

Referenced by Parse().

◆ BLOCK_ALARM_ACK_HIGH

constexpr std::uint16_t profinet::PNAlarmNotificationPDU::BLOCK_ALARM_ACK_HIGH = 0x8001
staticconstexpr

Block type: high-priority alarm acknowledgement.

Definition at line 1799 of file protocol.h.

◆ BLOCK_ALARM_ACK_LOW

constexpr std::uint16_t profinet::PNAlarmNotificationPDU::BLOCK_ALARM_ACK_LOW = 0x8002
staticconstexpr

Block type: low-priority alarm acknowledgement.

Definition at line 1802 of file protocol.h.

◆ BLOCK_ALARM_HIGH

constexpr std::uint16_t profinet::PNAlarmNotificationPDU::BLOCK_ALARM_HIGH = 0x0001
staticconstexpr

Block type: high-priority alarm notification.

Definition at line 1793 of file protocol.h.

◆ BLOCK_ALARM_LOW

constexpr std::uint16_t profinet::PNAlarmNotificationPDU::BLOCK_ALARM_LOW = 0x0002
staticconstexpr

Block type: low-priority alarm notification.

Definition at line 1796 of file protocol.h.

◆ blockHeader

std::array<std::uint8_t, blockHeaderLenght> profinet::PNAlarmNotificationPDU::blockHeader {}

Nested 6-byte block header.

Definition at line 1806 of file protocol.h.

Referenced by Parse().

◆ kFixedSize

constexpr std::size_t profinet::PNAlarmNotificationPDU::kFixedSize = 26
staticconstexpr

Size in bytes of the fixed portion of this PDU.

Definition at line 1833 of file protocol.h.

Referenced by Parse().

◆ moduleIdentNumber

std::uint32_t profinet::PNAlarmNotificationPDU::moduleIdentNumber = 0

Module ident number of the affected module.

Definition at line 1821 of file protocol.h.

Referenced by Parse().

◆ payload

Bytes profinet::PNAlarmNotificationPDU::payload

Alarm item data (USI-dispatched; see alarms.h).

Definition at line 1830 of file protocol.h.

Referenced by Parse().

◆ slotNumber

std::uint16_t profinet::PNAlarmNotificationPDU::slotNumber = 0

Slot number where the alarm originated.

Definition at line 1815 of file protocol.h.

Referenced by Parse().

◆ submoduleIdentNumber

std::uint32_t profinet::PNAlarmNotificationPDU::submoduleIdentNumber = 0

Submodule ident number of the affected submodule.

Definition at line 1824 of file protocol.h.

Referenced by Parse().

◆ subslotNumber

std::uint16_t profinet::PNAlarmNotificationPDU::subslotNumber = 0

Subslot number where the alarm originated.

Definition at line 1818 of file protocol.h.

Referenced by Parse().


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