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

NRD (Network Representation Data) wrapper carrying the actual IOD payload. More...

#include <protocol.h>

+ Collaboration diagram for profinet::PNNRDData:

Public Member Functions

Bytes ToBytes () const
 Serialize this wrapper and payload back to raw bytes.
 

Static Public Member Functions

static PNNRDData Parse (const Bytes &data)
 Parse an NRD wrapper and payload from raw bytes.
 

Public Attributes

std::uint32_t argsMaximumStatus = 0
 Maximum status/argument buffer size accepted by the caller.
 
std::uint32_t argsLength = 0
 Length in bytes of the arguments (usually equals ActualCount).
 
std::uint32_t maximumCount = 0
 Maximum number of bytes the caller can accept.
 
std::uint32_t offset = 0
 Byte offset into the logical result (0 unless fragmented).
 
std::uint32_t actualCount = 0
 Actual length in bytes of Payload.
 
Bytes payload
 The wrapped IOD data.
 

Static Public Attributes

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

Detailed Description

NRD (Network Representation Data) wrapper carrying the actual IOD payload.

On the wire, Payload follows the 20-byte fixed header directly; ActualCount records its length

Definition at line 1127 of file protocol.h.

Member Function Documentation

◆ Parse()

static PNNRDData profinet::PNNRDData::Parse ( const Bytes &  data)
inlinestatic

Parse an NRD wrapper and payload from raw bytes.

Parameters
dataBytes starting at the ArgsMaximumStatus field.
Returns
The parsed wrapper.

Definition at line 1153 of file protocol.h.

References actualCount, argsLength, argsMaximumStatus, kFixedSize, maximumCount, offset, payload, profinet::wire::Reader::ReadBytes(), profinet::wire::Reader::Remaining(), and profinet::wire::Reader::U32().

Referenced by profinet::rpc::RPCCon::Connect(), ExtractNrdPayload(), profinet::sim::VirtualProfinetRpcDevice::HandleConnect(), profinet::sim::VirtualProfinetRpcDevice::HandleControl(), TestRpcDevice::LastApplicationReadyResponseNrd(), TestRpcDevice::ParseControlRequest(), TestRpcDevice::ParseControlResponse(), profinet::rpc::RPCCon::Read(), profinet::rpc::RPCCon::ReadImplicit(), profinet::rpc::RPCCon::SendControl(), profinet::CyclicCaptureTests::TEST(), profinet::CyclicCaptureTests::TEST(), profinet::CyclicCaptureTests::TEST(), profinet::TEST(), profinet::rpc::TEST_F(), profinet::rpc::TEST_F(), profinet::rpc::TEST_F(), profinet::rpc::TEST_F(), profinet::rpc::TEST_F(), profinet::rpc::TEST_F(), profinet::rpc::TEST_F(), profinet::rpc::TEST_F(), profinet::rpc::TEST_F(), profinet::rpc::TEST_F(), profinet::rpc::TEST_F(), profinet::rpc::TEST_F(), profinet::rpc::TEST_F(), profinet::rpc::TEST_F(), profinet::rpc::RPCCon::Write(), and profinet::rpc::RPCCon::WriteMultiple().

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

◆ ToBytes()

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

Serialize this wrapper and payload back to raw bytes.

Returns
The encoded bytes.

Definition at line 1175 of file protocol.h.

References actualCount, argsLength, argsMaximumStatus, maximumCount, offset, payload, and profinet::wire::PutU32().

Referenced by profinet::rpc::RPCCon::Connect(), profinet::rpc::RPCCon::Disconnect(), profinet::sim::VirtualProfinetRpcDevice::MakeNrd(), MakeNrdResponse(), profinet::rpc::RPCCon::Read(), profinet::rpc::RPCCon::ReadImplicit(), profinet::rpc::RPCCon::SendControl(), profinet::StubRpcTransport::SendReceive(), profinet::rpc::TEST_F(), profinet::rpc::RPCCon::Write(), and profinet::rpc::RPCCon::WriteMultiple().

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

Member Data Documentation

◆ actualCount

◆ argsLength

std::uint32_t profinet::PNNRDData::argsLength = 0

◆ argsMaximumStatus

◆ kFixedSize

constexpr std::size_t profinet::PNNRDData::kFixedSize = 20
staticconstexpr

Size in bytes of the fixed portion of this wrapper.

Definition at line 1148 of file protocol.h.

Referenced by Parse(), and TEST_F().

◆ maximumCount

std::uint32_t profinet::PNNRDData::maximumCount = 0

◆ offset

std::uint32_t profinet::PNNRDData::offset = 0

◆ payload


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