|
PROFINET IO Controller Stack 1.0.0
Modern C++ implementation of a PROFINET IO Controller stack
|
DCP (Discovery and Configuration Protocol) frame header. More...
#include <protocol.h>
Collaboration diagram for profinet::PNDCPHeader:Public Member Functions | |
| Bytes | ToBytes () const |
| Serialize this header and its block-list payload back to raw bytes. | |
Static Public Member Functions | |
| static PNDCPHeader | Parse (const Bytes &data) |
| Parse a DCP header and block-list payload from raw bytes. | |
Public Attributes | |
| DcpFrameId | frameId = DcpFrameId::Unknown |
| DCP frame ID identifying the service/multicast group. | |
| DcpServiceId | serviceId = DcpServiceId::Unknown |
| DCP service ID (GET/SET/IDENTIFY/HELLO). | |
| DcpServiceType | serviceType = DcpServiceType::Request |
| DCP service type (REQUEST/RESPONSE/...). | |
| std::uint32_t | xId = 0 |
| Transaction ID correlating requests and responses. | |
| std::uint16_t | respDelay = 0 |
| Response delay factor (requests) or reserved (responses). | |
| std::uint16_t | length = 0 |
| Length in bytes of the block list that follows. | |
| Bytes | payload |
| DCP block list payload. | |
Static Public Attributes | |
| static constexpr std::uint16_t | ETHER_TYPE = 0x8892 |
| EtherType used by DCP frames. | |
| static constexpr std::size_t | kFixedSize = 12 |
| Size in bytes of the fixed portion of this header. | |
DCP (Discovery and Configuration Protocol) frame header.
Definition at line 583 of file protocol.h.
|
inlinestatic |
Parse a DCP header and block-list payload from raw bytes.
| data | Bytes starting at the DCP frame ID field. |
Definition at line 617 of file protocol.h.
References frameId, kFixedSize, length, payload, profinet::wire::Reader::ReadBytes(), profinet::wire::Reader::Remaining(), respDelay, serviceId, serviceType, profinet::wire::Reader::U16(), profinet::wire::Reader::U32(), profinet::wire::Reader::U8(), and xId.
Referenced by profinet::dcp::ParseSetResponse(), profinet::dcp::TEST(), profinet::dcp::TEST(), profinet::dcp::TEST(), profinet::dcp::TEST(), profinet::dcp::TEST(), profinet::dcp::TEST(), profinet::dcp::TEST(), profinet::dcp::TEST(), profinet::dcp::TEST(), profinet::dcp::TEST(), profinet::dcp::TEST(), profinet::dcp::TEST(), profinet::dcp::TEST(), profinet::dcp::TEST(), profinet::dcp::TEST(), profinet::dcp::TEST(), profinet::dcp::TEST(), TEST_F(), TEST_F(), TEST_F(), and profinet::rpc::TEST_F().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inline |
Serialize this header and its block-list payload back to raw bytes.
Definition at line 637 of file protocol.h.
References frameId, length, payload, profinet::wire::PutU16(), profinet::wire::PutU32(), profinet::wire::PutU8(), respDelay, serviceId, serviceType, and xId.
Referenced by profinet::rpc::RpcTests::MakeDcpResponseFrame(), and TEST_F().
Here is the call graph for this function:
Here is the caller graph for this function:
|
staticconstexpr |
EtherType used by DCP frames.
Definition at line 587 of file protocol.h.
| DcpFrameId profinet::PNDCPHeader::frameId = DcpFrameId::Unknown |
DCP frame ID identifying the service/multicast group.
Definition at line 591 of file protocol.h.
Referenced by profinet::dcp::BuildDcpSignalRequest(), profinet::dcp::BuildSetParamRequest(), profinet::dcp::GetParam(), profinet::rpc::RpcTests::MakeDcpResponseFrame(), Parse(), profinet::dcp::ResetToFactory(), profinet::dcp::SendDiscover(), profinet::dcp::SendHello(), profinet::dcp::SendRequest(), profinet::dcp::SetIp(), profinet::dcp::TEST(), profinet::dcp::TEST(), profinet::dcp::TEST(), profinet::dcp::TEST(), profinet::dcp::TEST(), profinet::dcp::TEST(), profinet::dcp::TEST(), TEST_F(), TEST_F(), and ToBytes().
|
staticconstexpr |
Size in bytes of the fixed portion of this header.
Definition at line 612 of file protocol.h.
| std::uint16_t profinet::PNDCPHeader::length = 0 |
Length in bytes of the block list that follows.
Definition at line 606 of file protocol.h.
Referenced by profinet::dcp::BuildDcpSignalRequest(), profinet::dcp::BuildSetParamRequest(), profinet::dcp::GetParam(), profinet::rpc::RpcTests::MakeDcpResponseFrame(), Parse(), profinet::dcp::ReadResponse(), profinet::dcp::ResetToFactory(), profinet::dcp::SendDiscover(), profinet::dcp::SendHello(), profinet::dcp::SendRequest(), profinet::dcp::SetIp(), profinet::dcp::TEST(), profinet::dcp::TEST(), TEST_F(), TEST_F(), and ToBytes().
| Bytes profinet::PNDCPHeader::payload |
DCP block list payload.
Definition at line 609 of file protocol.h.
Referenced by profinet::dcp::BuildDcpSignalRequest(), profinet::dcp::BuildSetParamRequest(), profinet::dcp::GetParam(), profinet::rpc::RpcTests::MakeDcpResponseFrame(), Parse(), profinet::dcp::ParseSetResponse(), profinet::dcp::ReadResponse(), profinet::dcp::ReceiveHello(), profinet::dcp::ResetToFactory(), profinet::dcp::SendDiscover(), profinet::dcp::SendHello(), profinet::dcp::SendRequest(), profinet::dcp::SetIp(), profinet::dcp::TEST(), profinet::dcp::TEST(), profinet::dcp::TEST(), profinet::dcp::TEST(), profinet::dcp::TEST(), profinet::dcp::TEST(), profinet::dcp::TEST(), profinet::dcp::TEST(), profinet::dcp::TEST(), profinet::dcp::TEST(), profinet::dcp::TEST(), TEST_F(), TEST_F(), and ToBytes().
| std::uint16_t profinet::PNDCPHeader::respDelay = 0 |
Response delay factor (requests) or reserved (responses).
Definition at line 603 of file protocol.h.
Referenced by profinet::dcp::BuildDcpSignalRequest(), profinet::dcp::BuildSetParamRequest(), profinet::dcp::GetParam(), profinet::rpc::RpcTests::MakeDcpResponseFrame(), Parse(), profinet::dcp::ResetToFactory(), profinet::dcp::SendDiscover(), profinet::dcp::SendHello(), profinet::dcp::SendRequest(), profinet::dcp::SetIp(), profinet::dcp::TEST(), profinet::dcp::TEST(), profinet::dcp::TEST(), TEST_F(), and ToBytes().
| DcpServiceId profinet::PNDCPHeader::serviceId = DcpServiceId::Unknown |
DCP service ID (GET/SET/IDENTIFY/HELLO).
Definition at line 594 of file protocol.h.
Referenced by profinet::dcp::BuildDcpSignalRequest(), profinet::dcp::BuildSetParamRequest(), profinet::dcp::GetParam(), profinet::rpc::RpcTests::MakeDcpResponseFrame(), Parse(), profinet::dcp::ReceiveHello(), profinet::dcp::ResetToFactory(), profinet::dcp::SendDiscover(), profinet::dcp::SendHello(), profinet::dcp::SendRequest(), profinet::dcp::SetIp(), profinet::dcp::TEST(), profinet::dcp::TEST(), profinet::dcp::TEST(), profinet::dcp::TEST(), profinet::dcp::TEST(), profinet::dcp::TEST(), profinet::dcp::TEST(), TEST_F(), TEST_F(), profinet::rpc::TEST_F(), and ToBytes().
| DcpServiceType profinet::PNDCPHeader::serviceType = DcpServiceType::Request |
DCP service type (REQUEST/RESPONSE/...).
Definition at line 597 of file protocol.h.
Referenced by profinet::dcp::BuildDcpSignalRequest(), profinet::dcp::BuildSetParamRequest(), profinet::dcp::GetParam(), profinet::rpc::RpcTests::MakeDcpResponseFrame(), Parse(), profinet::dcp::ParseSetResponse(), profinet::dcp::ReadResponse(), profinet::dcp::ReceiveHello(), profinet::dcp::ResetToFactory(), profinet::dcp::SendDiscover(), profinet::dcp::SendHello(), profinet::dcp::SendRequest(), profinet::dcp::SetIp(), profinet::dcp::TEST(), profinet::dcp::TEST(), profinet::dcp::TEST(), profinet::dcp::TEST(), profinet::dcp::TEST(), profinet::dcp::TEST(), profinet::dcp::TEST(), TEST_F(), TEST_F(), and ToBytes().
| std::uint32_t profinet::PNDCPHeader::xId = 0 |
Transaction ID correlating requests and responses.
Definition at line 600 of file protocol.h.
Referenced by profinet::dcp::BuildDcpSignalRequest(), profinet::dcp::BuildSetParamRequest(), profinet::dcp::GetParam(), profinet::rpc::RpcTests::MakeDcpResponseFrame(), Parse(), profinet::dcp::ReadResponse(), profinet::dcp::ResetToFactory(), profinet::dcp::SendDiscover(), profinet::dcp::SendHello(), profinet::dcp::SendRequest(), profinet::dcp::SetIp(), profinet::dcp::TEST(), profinet::dcp::TEST(), profinet::dcp::TEST(), TEST_F(), TEST_F(), and ToBytes().