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

Control block used for Release/PrmBegin/PrmEnd/ApplicationReady/RTClass3 requests. More...

#include <protocol.h>

+ Collaboration diagram for profinet::PNIODReleaseBlock:

Public Member Functions

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

Static Public Member Functions

static PNIODReleaseBlock Parse (const Bytes &data)
 Parse a control block from raw bytes.
 

Public Attributes

std::array< std::uint8_t, blockHeaderLenghtblockHeader {}
 Nested 6-byte block header.
 
std::uint16_t padding1 = 0
 Reserved/padding.
 
std::array< std::uint8_t, uuidLenghtarUuid {}
 AR UUID this control operation applies to.
 
std::uint16_t sessionKey = 0
 Session key matching the AR.
 
std::uint16_t padding2 = 0
 Reserved/padding.
 
ControlCommand controlCommand = ControlCommand::Unknown
 Control command bitmask (PrmEnd/AppReady/Release/Done/...).
 
std::uint16_t controlBlockProperties = 0
 Control block property flags.
 

Static Public Attributes

static constexpr std::size_t kSize = 32
 Size in bytes of this block.
 

Detailed Description

Control block used for Release/PrmBegin/PrmEnd/ApplicationReady/RTClass3 requests.

Definition at line 1007 of file protocol.h.

Member Function Documentation

◆ Parse()

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

Parse a control block from raw bytes.

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

Definition at line 1036 of file protocol.h.

References arUuid, blockHeader, profinet::blockHeaderLenght, controlBlockProperties, controlCommand, profinet::wire::Reader::Fixed(), kSize, padding1, padding2, sessionKey, profinet::wire::Reader::U16(), and profinet::uuidLenght.

+ Here is the call graph for this function:

◆ ToBytes()

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

Serialize this block back to raw bytes.

Returns
The encoded bytes.

Definition at line 1056 of file protocol.h.

References arUuid, blockHeader, controlBlockProperties, controlCommand, padding1, padding2, profinet::wire::PutFixed(), profinet::wire::PutU16(), and sessionKey.

Referenced by profinet::rpc::RPCCon::ApplicationReady(), profinet::rpc::RPCCon::Disconnect(), and profinet::rpc::RPCCon::SendControl().

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

Member Data Documentation

◆ arUuid

std::array<std::uint8_t, uuidLenght> profinet::PNIODReleaseBlock::arUuid {}

AR UUID this control operation applies to.

Definition at line 1016 of file protocol.h.

Referenced by profinet::rpc::RPCCon::ApplicationReady(), profinet::rpc::RPCCon::Disconnect(), Parse(), profinet::rpc::RPCCon::SendControl(), and ToBytes().

◆ blockHeader

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

◆ controlBlockProperties

std::uint16_t profinet::PNIODReleaseBlock::controlBlockProperties = 0

◆ controlCommand

ControlCommand profinet::PNIODReleaseBlock::controlCommand = ControlCommand::Unknown

Control command bitmask (PrmEnd/AppReady/Release/Done/...).

Definition at line 1025 of file protocol.h.

Referenced by profinet::rpc::RPCCon::ApplicationReady(), profinet::rpc::RPCCon::Disconnect(), Parse(), profinet::rpc::RPCCon::SendControl(), and ToBytes().

◆ kSize

constexpr std::size_t profinet::PNIODReleaseBlock::kSize = 32
staticconstexpr

Size in bytes of this block.

Definition at line 1031 of file protocol.h.

Referenced by Parse().

◆ padding1

std::uint16_t profinet::PNIODReleaseBlock::padding1 = 0

◆ padding2

std::uint16_t profinet::PNIODReleaseBlock::padding2 = 0

◆ sessionKey

std::uint16_t profinet::PNIODReleaseBlock::sessionKey = 0

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