|
PROFINET IO Controller Stack 1.0.0
Modern C++ implementation of a PROFINET IO Controller stack
|
IOD read/write request/response header (RPC body for READ/WRITE/IMPLICIT_READ). More...
#include <protocol.h>
Collaboration diagram for profinet::PNIODHeader:Public Member Functions | |
| Bytes | ToBytes () const |
| Serialize this header and payload back to raw bytes. | |
Static Public Member Functions | |
| static PNIODHeader | Parse (const Bytes &data) |
| Parse an IOD header and payload from raw bytes. | |
Public Attributes | |
| std::array< std::uint8_t, blockHeaderLenght > | blockHeader {} |
| Nested 6-byte block header (type + length + version). | |
| std::uint16_t | sequenceNumber = 0 |
| Sequence number for tracking retries. | |
| std::array< std::uint8_t, uuidLenght > | arUuid {} |
| AR (Application Relationship) 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 | padding1 = 0 |
| Reserved/padding. | |
| std::uint16_t | index = 0 |
| Record data index being read or written. | |
| std::uint32_t | length = 0 |
| Length in bytes of Payload. | |
| std::array< std::uint8_t, uuidLenght > | targetArUuid {} |
| Target AR UUID for AR handover scenarios (usually zero). | |
| std::array< std::uint8_t, 8 > | padding2 {} |
| Reserved/padding. | |
| Bytes | payload |
| Record data payload. | |
Static Public Attributes | |
| static constexpr std::size_t | kFixedSize = 64 |
| Size in bytes of the fixed portion of this header. | |
IOD read/write request/response header (RPC body for READ/WRITE/IMPLICIT_READ).
Definition at line 757 of file protocol.h.
|
inlinestatic |
Parse an IOD header and payload from raw bytes.
| data | Bytes starting at the BlockHeader field. |
Definition at line 801 of file protocol.h.
References api, arUuid, blockHeader, profinet::blockHeaderLenght, profinet::wire::Reader::Fixed(), index, kFixedSize, length, padding1, padding2, payload, profinet::wire::Reader::ReadBytes(), profinet::wire::Reader::Remaining(), sequenceNumber, slot, subslot, targetArUuid, profinet::wire::Reader::U16(), profinet::wire::Reader::U32(), and profinet::uuidLenght.
Referenced by profinet::rpc::RPCCon::Read(), and profinet::rpc::RPCCon::ReadImplicit().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inline |
Serialize this header and payload back to raw bytes.
Definition at line 826 of file protocol.h.
References api, arUuid, blockHeader, index, length, padding1, padding2, payload, profinet::wire::PutFixed(), profinet::wire::PutU16(), profinet::wire::PutU32(), sequenceNumber, slot, subslot, and targetArUuid.
Referenced by profinet::rpc::RPCCon::Read(), profinet::rpc::RPCCon::ReadImplicit(), 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:| std::uint32_t profinet::PNIODHeader::api = 0 |
API number.
Definition at line 769 of file protocol.h.
Referenced by Parse(), profinet::rpc::RPCCon::Read(), profinet::rpc::RPCCon::ReadImplicit(), ToBytes(), profinet::rpc::RPCCon::Write(), and profinet::rpc::RPCCon::WriteMultiple().
| std::array<std::uint8_t, uuidLenght> profinet::PNIODHeader::arUuid {} |
AR (Application Relationship) UUID this record belongs to.
Definition at line 766 of file protocol.h.
Referenced by Parse(), profinet::rpc::RPCCon::Read(), profinet::rpc::RPCCon::ReadImplicit(), ToBytes(), profinet::rpc::RPCCon::Write(), and profinet::rpc::RPCCon::WriteMultiple().
| std::array<std::uint8_t, blockHeaderLenght> profinet::PNIODHeader::blockHeader {} |
Nested 6-byte block header (type + length + version).
Definition at line 760 of file protocol.h.
Referenced by Parse(), profinet::rpc::RPCCon::Read(), profinet::rpc::RPCCon::ReadImplicit(), ToBytes(), profinet::rpc::RPCCon::Write(), and profinet::rpc::RPCCon::WriteMultiple().
| std::uint16_t profinet::PNIODHeader::index = 0 |
Record data index being read or written.
Definition at line 781 of file protocol.h.
Referenced by Parse(), profinet::rpc::RPCCon::Read(), profinet::rpc::RPCCon::ReadImplicit(), ToBytes(), profinet::rpc::RPCCon::Write(), and profinet::rpc::RPCCon::WriteMultiple().
|
staticconstexpr |
Size in bytes of the fixed portion of this header.
Definition at line 796 of file protocol.h.
Referenced by Parse().
| std::uint32_t profinet::PNIODHeader::length = 0 |
Length in bytes of Payload.
Definition at line 784 of file protocol.h.
Referenced by Parse(), profinet::rpc::RPCCon::Read(), profinet::rpc::RPCCon::ReadImplicit(), ToBytes(), profinet::rpc::RPCCon::Write(), and profinet::rpc::RPCCon::WriteMultiple().
| std::uint16_t profinet::PNIODHeader::padding1 = 0 |
Reserved/padding.
Definition at line 778 of file protocol.h.
Referenced by Parse(), profinet::rpc::RPCCon::Read(), profinet::rpc::RPCCon::ReadImplicit(), ToBytes(), profinet::rpc::RPCCon::Write(), and profinet::rpc::RPCCon::WriteMultiple().
| std::array<std::uint8_t, 8> profinet::PNIODHeader::padding2 {} |
Reserved/padding.
Definition at line 790 of file protocol.h.
Referenced by Parse(), profinet::rpc::RPCCon::Read(), profinet::rpc::RPCCon::ReadImplicit(), ToBytes(), profinet::rpc::RPCCon::Write(), and profinet::rpc::RPCCon::WriteMultiple().
| Bytes profinet::PNIODHeader::payload |
Record data payload.
Definition at line 793 of file protocol.h.
Referenced by profinet::rpc::RPCCon::EnumerateIndices(), Parse(), profinet::rpc::RPCCon::ReadDiagnosis(), profinet::device::ProfinetDevice::ReadImplicit(), profinet::rpc::RPCCon::ReadModuleDiff(), profinet::rpc::RPCCon::ReadPdRealData(), profinet::rpc::RPCCon::ReadRaw(), profinet::rpc::RPCCon::ReadRealIdentificationData(), ToBytes(), profinet::rpc::RPCCon::Write(), and profinet::rpc::RPCCon::WriteMultiple().
| std::uint16_t profinet::PNIODHeader::sequenceNumber = 0 |
Sequence number for tracking retries.
Definition at line 763 of file protocol.h.
Referenced by Parse(), profinet::rpc::RPCCon::Read(), profinet::rpc::RPCCon::ReadImplicit(), ToBytes(), profinet::rpc::RPCCon::Write(), and profinet::rpc::RPCCon::WriteMultiple().
| std::uint16_t profinet::PNIODHeader::slot = 0 |
Slot number.
Definition at line 772 of file protocol.h.
Referenced by Parse(), profinet::rpc::RPCCon::Read(), profinet::rpc::RPCCon::ReadImplicit(), ToBytes(), profinet::rpc::RPCCon::Write(), and profinet::rpc::RPCCon::WriteMultiple().
| std::uint16_t profinet::PNIODHeader::subslot = 0 |
Subslot number.
Definition at line 775 of file protocol.h.
Referenced by Parse(), profinet::rpc::RPCCon::Read(), profinet::rpc::RPCCon::ReadImplicit(), ToBytes(), profinet::rpc::RPCCon::Write(), and profinet::rpc::RPCCon::WriteMultiple().
| std::array<std::uint8_t, uuidLenght> profinet::PNIODHeader::targetArUuid {} |
Target AR UUID for AR handover scenarios (usually zero).
Definition at line 787 of file protocol.h.
Referenced by Parse(), profinet::rpc::RPCCon::Read(), profinet::rpc::RPCCon::ReadImplicit(), ToBytes(), profinet::rpc::RPCCon::Write(), and profinet::rpc::RPCCon::WriteMultiple().