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

ARBlockReq: establishes an Application Relationship (sent in the CONNECT request). More...

#include <protocol.h>

+ Collaboration diagram for profinet::PNARBlockRequest:

Public Member Functions

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

Static Public Member Functions

static PNARBlockRequest Parse (const Bytes &data)
 Parse an ARBlockReq from raw bytes.
 

Public Attributes

std::array< std::uint8_t, blockHeaderLenghtblockHeader {}
 Nested 6-byte block header.
 
std::uint16_t arType = 0
 AR type (e.g. IOCARSingle, IOSAR).
 
std::array< std::uint8_t, uuidLenghtarUuid {}
 Unique AR UUID chosen by the initiator (controller).
 
std::uint16_t sessionKey = 0
 Session key chosen by the initiator.
 
MacAddress cmInitiatorMacAddress {}
 MAC address of the initiating controller.
 
std::array< std::uint8_t, uuidLenghtcmInitiatorObjectUuid {}
 Object UUID of the initiating controller.
 
std::uint32_t arProperties = 0
 AR property flags (supervisor takeover, device access, etc.).
 
std::uint16_t cmInitiatorActivityTimeoutFactor = 0
 Activity timeout factor for the initiator.
 
std::uint16_t initiatorUdpRtport = 0
 UDP port the initiator uses for real-time data.
 
std::uint16_t stationNameLength = 0
 Length in bytes of CmInitiatorStationName.
 
Bytes cmInitiatorStationName
 Station name of the initiating controller (variable length).
 
Bytes payload
 Additional blocks following this one (IOCR/AlarmCR/ExpectedSubmodule).
 

Static Public Attributes

static constexpr std::size_t kFixedSize = 58
 Size in bytes of the fixed portion of this block.
 

Detailed Description

ARBlockReq: establishes an Application Relationship (sent in the CONNECT request).

Definition at line 918 of file protocol.h.

Member Function Documentation

◆ Parse()

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

Parse an ARBlockReq from raw bytes.

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

Definition at line 962 of file protocol.h.

References arProperties, arType, arUuid, blockHeader, profinet::blockHeaderLenght, cmInitiatorActivityTimeoutFactor, cmInitiatorMacAddress, cmInitiatorObjectUuid, cmInitiatorStationName, profinet::wire::Reader::Fixed(), initiatorUdpRtport, kFixedSize, profinet::macAddressLength, payload, profinet::wire::Reader::ReadBytes(), profinet::wire::Reader::Remaining(), sessionKey, stationNameLength, profinet::wire::Reader::U16(), profinet::wire::Reader::U32(), and profinet::uuidLenght.

+ Here is the call graph for this function:

◆ ToBytes()

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

Serialize this block back to raw bytes.

Returns
The encoded bytes.

Definition at line 987 of file protocol.h.

References arProperties, arType, arUuid, blockHeader, cmInitiatorActivityTimeoutFactor, cmInitiatorMacAddress, cmInitiatorObjectUuid, cmInitiatorStationName, initiatorUdpRtport, payload, profinet::wire::PutFixed(), profinet::wire::PutU16(), profinet::wire::PutU32(), sessionKey, and stationNameLength.

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

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

Member Data Documentation

◆ arProperties

std::uint32_t profinet::PNARBlockRequest::arProperties = 0

AR property flags (supervisor takeover, device access, etc.).

Definition at line 939 of file protocol.h.

Referenced by profinet::rpc::RPCCon::Connect(), Parse(), and ToBytes().

◆ arType

std::uint16_t profinet::PNARBlockRequest::arType = 0

AR type (e.g. IOCARSingle, IOSAR).

Definition at line 924 of file protocol.h.

Referenced by profinet::rpc::RPCCon::Connect(), Parse(), and ToBytes().

◆ arUuid

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

Unique AR UUID chosen by the initiator (controller).

Definition at line 927 of file protocol.h.

Referenced by profinet::rpc::RPCCon::Connect(), Parse(), and ToBytes().

◆ blockHeader

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

Nested 6-byte block header.

Definition at line 921 of file protocol.h.

Referenced by profinet::rpc::RPCCon::Connect(), Parse(), and ToBytes().

◆ cmInitiatorActivityTimeoutFactor

std::uint16_t profinet::PNARBlockRequest::cmInitiatorActivityTimeoutFactor = 0

Activity timeout factor for the initiator.

Definition at line 942 of file protocol.h.

Referenced by profinet::rpc::RPCCon::Connect(), Parse(), and ToBytes().

◆ cmInitiatorMacAddress

MacAddress profinet::PNARBlockRequest::cmInitiatorMacAddress {}

MAC address of the initiating controller.

Definition at line 933 of file protocol.h.

Referenced by profinet::rpc::RPCCon::Connect(), Parse(), and ToBytes().

◆ cmInitiatorObjectUuid

std::array<std::uint8_t, uuidLenght> profinet::PNARBlockRequest::cmInitiatorObjectUuid {}

Object UUID of the initiating controller.

Definition at line 936 of file protocol.h.

Referenced by profinet::rpc::RPCCon::Connect(), Parse(), and ToBytes().

◆ cmInitiatorStationName

Bytes profinet::PNARBlockRequest::cmInitiatorStationName

Station name of the initiating controller (variable length).

Definition at line 951 of file protocol.h.

Referenced by profinet::rpc::RPCCon::Connect(), Parse(), and ToBytes().

◆ initiatorUdpRtport

std::uint16_t profinet::PNARBlockRequest::initiatorUdpRtport = 0

UDP port the initiator uses for real-time data.

Definition at line 945 of file protocol.h.

Referenced by profinet::rpc::RPCCon::Connect(), Parse(), and ToBytes().

◆ kFixedSize

constexpr std::size_t profinet::PNARBlockRequest::kFixedSize = 58
staticconstexpr

Size in bytes of the fixed portion of this block.

Definition at line 957 of file protocol.h.

Referenced by profinet::rpc::RPCCon::Connect(), and Parse().

◆ payload

Bytes profinet::PNARBlockRequest::payload

Additional blocks following this one (IOCR/AlarmCR/ExpectedSubmodule).

Definition at line 954 of file protocol.h.

Referenced by Parse(), and ToBytes().

◆ sessionKey

std::uint16_t profinet::PNARBlockRequest::sessionKey = 0

Session key chosen by the initiator.

Definition at line 930 of file protocol.h.

Referenced by profinet::rpc::RPCCon::Connect(), Parse(), and ToBytes().

◆ stationNameLength

std::uint16_t profinet::PNARBlockRequest::stationNameLength = 0

Length in bytes of CmInitiatorStationName.

Definition at line 948 of file protocol.h.

Referenced by profinet::rpc::RPCCon::Connect(), Parse(), and ToBytes().


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