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

AlarmCRBlockReq: requests establishment of the alarm connection (part of the CONNECT request). More...

#include <protocol.h>

+ Collaboration diagram for profinet::PNAlarmCRBlockReq:

Public Member Functions

Bytes ToBytes () const
 Serialize this block back to raw bytes.
 

Public Attributes

std::array< std::uint8_t, blockHeaderLenghtblockHeader {}
 Nested 6-byte block header.
 
std::uint16_t alarmCrType = 1
 Alarm CR type (always 1: Alarm).
 
std::uint16_t etherTypeLT = 0x8892
 EtherType used for alarm frames (0x8892).
 
std::uint32_t alarmCrProperties = 0
 Alarm CR property flags (transport, priority).
 
std::uint16_t rtaTimeoutFactor = DEFAULT_RTA_TIMEOUT_FACTOR
 RTA (real-time acyclic) retransmission timeout factor.
 
std::uint16_t rtaRetries = DEFAULT_RTA_RETRIES
 Number of RTA retransmission attempts.
 
std::uint16_t localAlarmReference = 0
 Local alarm reference chosen by the controller.
 
std::uint16_t maxAlarmDataLength = DEFAULT_MAX_ALARM_DATA_LENGTH
 Maximum alarm data length in bytes.
 
std::uint16_t alarmCrTagHeaderHigh = DEFAULT_TAG_HEADER_HIGH
 High word of the alarm VLAN tag header.
 
std::uint16_t alarmCrTagHeaderLow = DEFAULT_TAG_HEADER_LOW
 Low word of the alarm VLAN tag header.
 

Static Public Attributes

static constexpr BlockType BLOCK_TYPE = BlockType::AlarmCrRequest
 Block type identifier for AlarmCRBlockReq.
 
static constexpr std::uint16_t DEFAULT_RTA_TIMEOUT_FACTOR = 1
 Default RTA timeout factor.
 
static constexpr std::uint16_t DEFAULT_RTA_RETRIES = 3
 Default number of RTA retries.
 
static constexpr std::uint16_t DEFAULT_MAX_ALARM_DATA_LENGTH = 200
 Default maximum alarm data length in bytes.
 
static constexpr std::uint16_t DEFAULT_TAG_HEADER_HIGH = 0xC000
 Default high word of the alarm VLAN tag header.
 
static constexpr std::uint16_t DEFAULT_TAG_HEADER_LOW = 0xA000
 Default low word of the alarm VLAN tag header.
 
static constexpr std::size_t kSize = 26
 Size in bytes of this block.
 

Detailed Description

AlarmCRBlockReq: requests establishment of the alarm connection (part of the CONNECT request).

Definition at line 1668 of file protocol.h.

Member Function Documentation

◆ ToBytes()

Bytes profinet::PNAlarmCRBlockReq::ToBytes ( ) const
inline

Serialize this block back to raw bytes.

Returns
The encoded bytes.

Definition at line 1725 of file protocol.h.

References alarmCrProperties, alarmCrTagHeaderHigh, alarmCrTagHeaderLow, alarmCrType, blockHeader, etherTypeLT, localAlarmReference, maxAlarmDataLength, profinet::wire::PutFixed(), profinet::wire::PutU16(), profinet::wire::PutU32(), rtaRetries, and rtaTimeoutFactor.

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

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

Member Data Documentation

◆ alarmCrProperties

std::uint32_t profinet::PNAlarmCRBlockReq::alarmCrProperties = 0

Alarm CR property flags (transport, priority).

Definition at line 1700 of file protocol.h.

Referenced by profinet::rpc::RPCCon::BuildAlarmCrBlock(), and ToBytes().

◆ alarmCrTagHeaderHigh

std::uint16_t profinet::PNAlarmCRBlockReq::alarmCrTagHeaderHigh = DEFAULT_TAG_HEADER_HIGH

High word of the alarm VLAN tag header.

Definition at line 1715 of file protocol.h.

Referenced by profinet::rpc::RPCCon::BuildAlarmCrBlock(), and ToBytes().

◆ alarmCrTagHeaderLow

std::uint16_t profinet::PNAlarmCRBlockReq::alarmCrTagHeaderLow = DEFAULT_TAG_HEADER_LOW

Low word of the alarm VLAN tag header.

Definition at line 1718 of file protocol.h.

Referenced by profinet::rpc::RPCCon::BuildAlarmCrBlock(), and ToBytes().

◆ alarmCrType

std::uint16_t profinet::PNAlarmCRBlockReq::alarmCrType = 1

Alarm CR type (always 1: Alarm).

Definition at line 1694 of file protocol.h.

Referenced by profinet::rpc::RPCCon::BuildAlarmCrBlock(), and ToBytes().

◆ BLOCK_TYPE

constexpr BlockType profinet::PNAlarmCRBlockReq::BLOCK_TYPE = BlockType::AlarmCrRequest
staticconstexpr

Block type identifier for AlarmCRBlockReq.

Definition at line 1672 of file protocol.h.

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

◆ blockHeader

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

Nested 6-byte block header.

Definition at line 1691 of file protocol.h.

Referenced by profinet::rpc::RPCCon::BuildAlarmCrBlock(), and ToBytes().

◆ DEFAULT_MAX_ALARM_DATA_LENGTH

constexpr std::uint16_t profinet::PNAlarmCRBlockReq::DEFAULT_MAX_ALARM_DATA_LENGTH = 200
staticconstexpr

Default maximum alarm data length in bytes.

Definition at line 1681 of file protocol.h.

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

◆ DEFAULT_RTA_RETRIES

constexpr std::uint16_t profinet::PNAlarmCRBlockReq::DEFAULT_RTA_RETRIES = 3
staticconstexpr

Default number of RTA retries.

Definition at line 1678 of file protocol.h.

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

◆ DEFAULT_RTA_TIMEOUT_FACTOR

constexpr std::uint16_t profinet::PNAlarmCRBlockReq::DEFAULT_RTA_TIMEOUT_FACTOR = 1
staticconstexpr

Default RTA timeout factor.

Definition at line 1675 of file protocol.h.

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

◆ DEFAULT_TAG_HEADER_HIGH

constexpr std::uint16_t profinet::PNAlarmCRBlockReq::DEFAULT_TAG_HEADER_HIGH = 0xC000
staticconstexpr

Default high word of the alarm VLAN tag header.

Definition at line 1684 of file protocol.h.

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

◆ DEFAULT_TAG_HEADER_LOW

constexpr std::uint16_t profinet::PNAlarmCRBlockReq::DEFAULT_TAG_HEADER_LOW = 0xA000
staticconstexpr

Default low word of the alarm VLAN tag header.

Definition at line 1687 of file protocol.h.

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

◆ etherTypeLT

std::uint16_t profinet::PNAlarmCRBlockReq::etherTypeLT = 0x8892

EtherType used for alarm frames (0x8892).

Definition at line 1697 of file protocol.h.

Referenced by profinet::rpc::RPCCon::BuildAlarmCrBlock(), and ToBytes().

◆ kSize

constexpr std::size_t profinet::PNAlarmCRBlockReq::kSize = 26
staticconstexpr

Size in bytes of this block.

Definition at line 1721 of file protocol.h.

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

◆ localAlarmReference

std::uint16_t profinet::PNAlarmCRBlockReq::localAlarmReference = 0

Local alarm reference chosen by the controller.

Definition at line 1709 of file protocol.h.

Referenced by profinet::rpc::RPCCon::BuildAlarmCrBlock(), and ToBytes().

◆ maxAlarmDataLength

std::uint16_t profinet::PNAlarmCRBlockReq::maxAlarmDataLength = DEFAULT_MAX_ALARM_DATA_LENGTH

Maximum alarm data length in bytes.

Definition at line 1712 of file protocol.h.

Referenced by profinet::rpc::RPCCon::BuildAlarmCrBlock(), and ToBytes().

◆ rtaRetries

std::uint16_t profinet::PNAlarmCRBlockReq::rtaRetries = DEFAULT_RTA_RETRIES

Number of RTA retransmission attempts.

Definition at line 1706 of file protocol.h.

Referenced by profinet::rpc::RPCCon::BuildAlarmCrBlock(), and ToBytes().

◆ rtaTimeoutFactor

std::uint16_t profinet::PNAlarmCRBlockReq::rtaTimeoutFactor = DEFAULT_RTA_TIMEOUT_FACTOR

RTA (real-time acyclic) retransmission timeout factor.

Definition at line 1703 of file protocol.h.

Referenced by profinet::rpc::RPCCon::BuildAlarmCrBlock(), and ToBytes().


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