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.
 

Static Public Member Functions

static PNAlarmCRBlockReq Parse (const Bytes &data)
 Parse an AlarmCRBlockReq from raw bytes.
 

Public Attributes

std::array< std::uint8_t, blockHeaderLength > blockHeader {}
 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 2114 of file protocol.h.

Member Function Documentation

◆ Parse()

static PNAlarmCRBlockReq profinet::PNAlarmCRBlockReq::Parse ( const Bytes &  data)
inlinestatic

Parse an AlarmCRBlockReq from raw bytes.

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

Definition at line 2172 of file protocol.h.

References alarmCrProperties, alarmCrTagHeaderHigh, alarmCrTagHeaderLow, alarmCrType, blockHeader, profinet::blockHeaderLength, etherTypeLT, profinet::wire::Reader::Fixed(), kSize, localAlarmReference, maxAlarmDataLength, rtaRetries, rtaTimeoutFactor, profinet::wire::Reader::U16(), and profinet::wire::Reader::U32().

Referenced by profinet::rpc::TEST_F(), profinet::rpc::TEST_F(), profinet::rpc::TEST_F(), and profinet::rpc::TEST_F().

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

◆ ToBytes()

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

Serialize this block back to raw bytes.

Returns
The encoded bytes.

Definition at line 2197 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(), and TEST_F().

+ 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 2146 of file protocol.h.

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

◆ alarmCrTagHeaderHigh

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

High word of the alarm VLAN tag header.

Definition at line 2161 of file protocol.h.

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

◆ alarmCrTagHeaderLow

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

Low word of the alarm VLAN tag header.

Definition at line 2164 of file protocol.h.

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

◆ alarmCrType

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

Alarm CR type (always 1: Alarm).

Definition at line 2140 of file protocol.h.

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

◆ BLOCK_TYPE

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

Block type identifier for AlarmCRBlockReq.

Definition at line 2118 of file protocol.h.

Referenced by profinet::rpc::RPCCon::BuildAlarmCrBlock(), profinet::rpc::TEST_F(), and profinet::sim::VirtualProfinetRpcDevice::ValidateConnect().

◆ blockHeader

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

Nested 6-byte block header.

Definition at line 2137 of file protocol.h.

Referenced by profinet::rpc::RPCCon::BuildAlarmCrBlock(), Parse(), 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 2127 of file protocol.h.

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

◆ DEFAULT_RTA_RETRIES

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

Default number of RTA retries.

Definition at line 2124 of file protocol.h.

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

◆ DEFAULT_RTA_TIMEOUT_FACTOR

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

Default RTA timeout factor.

Definition at line 2121 of file protocol.h.

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

◆ 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 2130 of file protocol.h.

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

◆ 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 2133 of file protocol.h.

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

◆ etherTypeLT

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

◆ kSize

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

Size in bytes of this block.

Definition at line 2167 of file protocol.h.

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

◆ localAlarmReference

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

Local alarm reference chosen by the controller.

Definition at line 2155 of file protocol.h.

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

◆ maxAlarmDataLength

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

Maximum alarm data length in bytes.

Definition at line 2158 of file protocol.h.

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

◆ rtaRetries

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

Number of RTA retransmission attempts.

Definition at line 2152 of file protocol.h.

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

◆ rtaTimeoutFactor

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

RTA (real-time acyclic) retransmission timeout factor.

Definition at line 2149 of file protocol.h.

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


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