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

AlarmCRBlockRes: device's response confirming the alarm connection (part of the CONNECT response). More...

#include <protocol.h>

+ Collaboration diagram for profinet::PNAlarmCRBlockRes:

Public Member Functions

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

Static Public Member Functions

static PNAlarmCRBlockRes Parse (const Bytes &data)
 Parse an AlarmCRBlockRes from raw bytes.
 

Public Attributes

std::array< std::uint8_t, blockHeaderLength > blockHeader {}
 Nested 6-byte block header.
 
std::uint16_t alarmCrType = 0
 Alarm CR type (always 1: Alarm).
 
std::uint16_t localAlarmReference = 0
 Local alarm reference assigned by the device.
 
std::uint16_t maxAlarmDataLength = 0
 Maximum alarm data length in bytes accepted by the device.
 

Static Public Attributes

static constexpr std::uint16_t BLOCK_TYPE = 0x8103
 Block type identifier for AlarmCRBlockRes.
 
static constexpr std::size_t kSize = 12
 Size in bytes of this block.
 

Detailed Description

AlarmCRBlockRes: device's response confirming the alarm connection (part of the CONNECT response).

Definition at line 2215 of file protocol.h.

Member Function Documentation

◆ Parse()

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

Parse an AlarmCRBlockRes from raw bytes.

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

Definition at line 2240 of file protocol.h.

References alarmCrType, blockHeader, profinet::blockHeaderLength, profinet::wire::Reader::Fixed(), kSize, localAlarmReference, maxAlarmDataLength, and profinet::wire::Reader::U16().

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

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

◆ ToBytes()

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

Serialize this block back to raw bytes.

Returns
The encoded bytes.

Definition at line 2257 of file protocol.h.

References alarmCrType, blockHeader, localAlarmReference, maxAlarmDataLength, profinet::wire::PutFixed(), and profinet::wire::PutU16().

Referenced by profinet::sim::VirtualProfinetRpcDevice::MakeAlarmCrResponse(), and profinet::rpc::RpcTests::MakeAlarmCrResponseBlock().

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

Member Data Documentation

◆ alarmCrType

std::uint16_t profinet::PNAlarmCRBlockRes::alarmCrType = 0

Alarm CR type (always 1: Alarm).

Definition at line 2226 of file protocol.h.

Referenced by Parse(), and ToBytes().

◆ BLOCK_TYPE

constexpr std::uint16_t profinet::PNAlarmCRBlockRes::BLOCK_TYPE = 0x8103
staticconstexpr

Block type identifier for AlarmCRBlockRes.

Definition at line 2219 of file protocol.h.

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

◆ blockHeader

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

◆ kSize

constexpr std::size_t profinet::PNAlarmCRBlockRes::kSize = 12
staticconstexpr

◆ localAlarmReference

std::uint16_t profinet::PNAlarmCRBlockRes::localAlarmReference = 0

Local alarm reference assigned by the device.

Definition at line 2229 of file protocol.h.

Referenced by profinet::sim::VirtualProfinetRpcDevice::MakeAlarmCrResponse(), profinet::rpc::RpcTests::MakeAlarmCrResponseBlock(), Parse(), and ToBytes().

◆ maxAlarmDataLength

std::uint16_t profinet::PNAlarmCRBlockRes::maxAlarmDataLength = 0

Maximum alarm data length in bytes accepted by the device.

Definition at line 2232 of file protocol.h.

Referenced by Parse(), and ToBytes().


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