PROFINET IO Controller Stack 1.0.0
Modern C++ implementation of a PROFINET IO Controller stack
Loading...
Searching...
No Matches
blocks.cpp File Reference

Implements PROFINET block parsing, serialization, and decoding helpers. More...

#include "profinet/blocks.h"
#include <algorithm>
#include <cstring>
#include <map>
#include <ranges>
#include <stdexcept>
#include "profinet/indices.h"
#include "profinet/wire.h"
+ Include dependency graph for blocks.cpp:

Go to the source code of this file.

Namespaces

namespace  profinet
 
namespace  profinet::blocks
 

Functions

std::pair< BlockHeader, std::size_t > profinet::blocks::ParseBlockHeader (const Bytes &data, std::size_t offset=0)
 Parse a 6-byte PROFINET block header at an offset.
 
std::tuple< std::uint32_t, std::uint16_t, std::uint16_t, std::size_t > profinet::blocks::ParseMultipleBlockHeader (const Bytes &data, std::size_t offset=0)
 Parse a MultipleBlockHeader (0x0400) body.
 
InterfaceInfo profinet::blocks::ParsePdInterfaceDataReal (const Bytes &data, std::size_t offset=0, std::size_t blockHeaderSize=blockHeaderLenght)
 Parse a PDInterfaceDataReal (0x0240) block body.
 
PortInfo profinet::blocks::ParsePdPortDataReal (const Bytes &data, std::size_t offset=0, std::uint16_t slot=0, std::uint16_t subslot=0)
 Parse a PDPortDataReal (0x020F) block body.
 
PDRealData profinet::blocks::ParsePdRealData (const Bytes &data)
 Parse a complete PDRealData (0xF841) response.
 
RealIdentificationData profinet::blocks::ParseRealIdentificationData (const Bytes &data)
 Parse a RealIdentificationData (0xF000 or 0x0013) response.
 
std::optional< PortStatisticsprofinet::blocks::ParsePortStatistics (const Bytes &data, std::size_t offset=0)
 Parse a PDPortStatistic (0x0251) block body.
 
ModuleDiffBlock profinet::blocks::ParseModuleDiffBlock (const Bytes &data)
 Parse a ModuleDiffBlock (0x8104) from raw bytes.
 
std::vector< WriteMultipleResultprofinet::blocks::ParseWriteMultipleResponse (const Bytes &data)
 Parse an IODWriteMultipleRes into individual per-write results.
 

Detailed Description

Implements PROFINET block parsing, serialization, and decoding helpers.

Implements parsing and construction of PROFINET block data, including identification, topology, module-difference, port statistics, and multiple-record write blocks.

Definition in file blocks.cpp.