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

PROFINET block header (6 bytes). More...

#include <blocks.h>

+ Collaboration diagram for profinet::blocks::BlockHeader:

Public Member Functions

std::uint16_t BodyLength () const
 Length of the block body, excluding the version bytes.
 
std::string TypeName () const
 Human-readable name for BlockType.
 

Public Attributes

BlockType blockType = BlockType::Unknown
 Block type identifier.
 
std::uint16_t blockLength = 0
 Length in bytes of the block body, including the 2 version bytes.
 
std::uint8_t versionHigh = 0
 Block format major version.
 
std::uint8_t versionLow = 0
 Block format minor version.
 

Detailed Description

PROFINET block header (6 bytes).

Definition at line 32 of file blocks.h.

Member Function Documentation

◆ BodyLength()

std::uint16_t profinet::blocks::BlockHeader::BodyLength ( ) const
inline

Length of the block body, excluding the version bytes.

Returns
BlockLength - 2, or 0 if BlockLength < 2.

Definition at line 48 of file blocks.h.

References blockLength.

Referenced by profinet::blocks::ParsePdRealData().

+ Here is the caller graph for this function:

◆ TypeName()

std::string profinet::blocks::BlockHeader::TypeName ( ) const

Human-readable name for BlockType.

Returns
The block type name (see GetBlockTypeName()).

Definition at line 71 of file blocks.cpp.

References blockType, and profinet::GetBlockTypeName().

Referenced by profinet::blocks::ParsePdRealData().

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

Member Data Documentation

◆ blockLength

std::uint16_t profinet::blocks::BlockHeader::blockLength = 0

Length in bytes of the block body, including the 2 version bytes.

Definition at line 38 of file blocks.h.

Referenced by BodyLength(), and profinet::blocks::ParseBlockHeader().

◆ blockType

BlockType profinet::blocks::BlockHeader::blockType = BlockType::Unknown

◆ versionHigh

std::uint8_t profinet::blocks::BlockHeader::versionHigh = 0

Block format major version.

Definition at line 41 of file blocks.h.

Referenced by profinet::blocks::ParseBlockHeader(), and profinet::blocks::ParseRealIdentificationData().

◆ versionLow

std::uint8_t profinet::blocks::BlockHeader::versionLow = 0

Block format minor version.

Definition at line 44 of file blocks.h.

Referenced by profinet::blocks::ParseBlockHeader(), and profinet::blocks::ParseRealIdentificationData().


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