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

IODWriteReqHeader: request header for writing a data record. More...

#include <protocol.h>

+ Collaboration diagram for profinet::PNIODWriteReq:

Public Member Functions

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

Public Attributes

std::array< std::uint8_t, blockHeaderLenghtblockHeader {}
 Nested 6-byte block header.
 
std::uint16_t seqNum = 0
 Sequence number for tracking retries.
 
std::array< std::uint8_t, uuidLenghtarUuid {}
 AR UUID this record belongs to.
 
std::uint32_t api = 0
 API number.
 
std::uint16_t slot = 0
 Slot number.
 
std::uint16_t subslot = 0
 Subslot number.
 
std::uint16_t padding = 0
 Reserved/padding.
 
std::uint16_t index = 0
 Record data index being written.
 
std::uint32_t recordDataLength = 0
 Length in bytes of Payload.
 
std::array< std::uint8_t, 24 > rwPadding {}
 Reserved/padding.
 
Bytes payload
 Record data to write.
 

Static Public Attributes

static constexpr std::uint16_t BLOCK_TYPE = 0x0008
 Block type identifier for IODWriteReqHeader.
 
static constexpr std::size_t kFixedSize = 64
 Size in bytes of the fixed portion of this block.
 

Detailed Description

IODWriteReqHeader: request header for writing a data record.

Definition at line 2038 of file protocol.h.

Member Function Documentation

◆ ToBytes()

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

Serialize this block back to raw bytes.

Returns
The encoded bytes.

Definition at line 2083 of file protocol.h.

References api, arUuid, blockHeader, index, padding, payload, profinet::wire::PutFixed(), profinet::wire::PutU16(), profinet::wire::PutU32(), recordDataLength, rwPadding, seqNum, slot, and subslot.

+ Here is the call graph for this function:

Member Data Documentation

◆ api

std::uint32_t profinet::PNIODWriteReq::api = 0

API number.

Definition at line 2055 of file protocol.h.

Referenced by ToBytes().

◆ arUuid

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

AR UUID this record belongs to.

Definition at line 2052 of file protocol.h.

Referenced by ToBytes().

◆ BLOCK_TYPE

constexpr std::uint16_t profinet::PNIODWriteReq::BLOCK_TYPE = 0x0008
staticconstexpr

Block type identifier for IODWriteReqHeader.

Definition at line 2042 of file protocol.h.

◆ blockHeader

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

Nested 6-byte block header.

Definition at line 2046 of file protocol.h.

Referenced by ToBytes().

◆ index

std::uint16_t profinet::PNIODWriteReq::index = 0

Record data index being written.

Definition at line 2067 of file protocol.h.

Referenced by ToBytes().

◆ kFixedSize

constexpr std::size_t profinet::PNIODWriteReq::kFixedSize = 64
staticconstexpr

Size in bytes of the fixed portion of this block.

Definition at line 2079 of file protocol.h.

◆ padding

std::uint16_t profinet::PNIODWriteReq::padding = 0

Reserved/padding.

Definition at line 2064 of file protocol.h.

Referenced by ToBytes().

◆ payload

Bytes profinet::PNIODWriteReq::payload

Record data to write.

Definition at line 2076 of file protocol.h.

Referenced by ToBytes().

◆ recordDataLength

std::uint32_t profinet::PNIODWriteReq::recordDataLength = 0

Length in bytes of Payload.

Definition at line 2070 of file protocol.h.

Referenced by ToBytes().

◆ rwPadding

std::array<std::uint8_t, 24> profinet::PNIODWriteReq::rwPadding {}

Reserved/padding.

Definition at line 2073 of file protocol.h.

Referenced by ToBytes().

◆ seqNum

std::uint16_t profinet::PNIODWriteReq::seqNum = 0

Sequence number for tracking retries.

Definition at line 2049 of file protocol.h.

Referenced by ToBytes().

◆ slot

std::uint16_t profinet::PNIODWriteReq::slot = 0

Slot number.

Definition at line 2058 of file protocol.h.

Referenced by ToBytes().

◆ subslot

std::uint16_t profinet::PNIODWriteReq::subslot = 0

Subslot number.

Definition at line 2061 of file protocol.h.

Referenced by ToBytes().


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