|
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 | |
| std::uint16_t | frameId = 0 |
| DCP frame ID identifying the service/multicast group. | |
| std::uint8_t | serviceId = 0 |
| DCP service ID (GET/SET/IDENTIFY/HELLO). | |
| std::uint8_t | serviceType = 0 |
| 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::uint8_t | GET = 3 |
| Service ID: GET. | |
| static constexpr std::uint8_t | SET = 4 |
| Service ID: SET. | |
| static constexpr std::uint8_t | IDENTIFY = 5 |
| Service ID: IDENTIFY. | |
| static constexpr std::uint8_t | HELLO = 6 |
| Service ID: HELLO. | |
| static constexpr std::uint8_t | REQUEST = 0 |
| Service Type: REQUEST. | |
| static constexpr std::uint8_t | RESPONSE = 1 |
| Service Type: RESPONSE (success). | |
| static constexpr std::uint8_t | RESPONSE_UNSUPPORTED = 5 |
| Service Type: RESPONSE (unsupported service). | |
| 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 167 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 222 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().
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 242 of file protocol.h.
References frameId, length, payload, profinet::wire::PutU16(), profinet::wire::PutU32(), profinet::wire::PutU8(), respDelay, serviceId, serviceType, and xId.
Here is the call graph for this function:
|
staticconstexpr |
EtherType used by DCP frames.
Definition at line 171 of file protocol.h.
| std::uint16_t profinet::PNDCPHeader::frameId = 0 |
DCP frame ID identifying the service/multicast group.
Definition at line 196 of file protocol.h.
Referenced by profinet::dcp::BuildDcpSignalRequest(), profinet::dcp::BuildSetParamRequest(), profinet::dcp::GetParam(), Parse(), profinet::dcp::ResetToFactory(), profinet::dcp::SendDiscover(), profinet::dcp::SendHello(), profinet::dcp::SendRequest(), profinet::dcp::SetIp(), and ToBytes().
|
staticconstexpr |
Service ID: GET.
Definition at line 174 of file protocol.h.
|
staticconstexpr |
Service ID: HELLO.
Definition at line 183 of file protocol.h.
|
staticconstexpr |
Service ID: IDENTIFY.
Definition at line 180 of file protocol.h.
|
staticconstexpr |
Size in bytes of the fixed portion of this header.
Definition at line 217 of file protocol.h.
Referenced by Parse().
| std::uint16_t profinet::PNDCPHeader::length = 0 |
Length in bytes of the block list that follows.
Definition at line 211 of file protocol.h.
Referenced by profinet::dcp::BuildDcpSignalRequest(), profinet::dcp::BuildSetParamRequest(), profinet::dcp::GetParam(), Parse(), profinet::dcp::ReadResponse(), profinet::dcp::ResetToFactory(), profinet::dcp::SendDiscover(), profinet::dcp::SendHello(), profinet::dcp::SendRequest(), profinet::dcp::SetIp(), and ToBytes().
| Bytes profinet::PNDCPHeader::payload |
DCP block list payload.
Definition at line 214 of file protocol.h.
Referenced by profinet::dcp::BuildDcpSignalRequest(), profinet::dcp::BuildSetParamRequest(), profinet::dcp::GetParam(), 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(), and ToBytes().
|
staticconstexpr |
Service Type: REQUEST.
Definition at line 186 of file protocol.h.
| std::uint16_t profinet::PNDCPHeader::respDelay = 0 |
Response delay factor (requests) or reserved (responses).
Definition at line 208 of file protocol.h.
Referenced by profinet::dcp::BuildDcpSignalRequest(), profinet::dcp::BuildSetParamRequest(), profinet::dcp::GetParam(), Parse(), profinet::dcp::ResetToFactory(), profinet::dcp::SendDiscover(), profinet::dcp::SendHello(), profinet::dcp::SendRequest(), profinet::dcp::SetIp(), and ToBytes().
|
staticconstexpr |
Service Type: RESPONSE (success).
Definition at line 189 of file protocol.h.
|
staticconstexpr |
Service Type: RESPONSE (unsupported service).
Definition at line 192 of file protocol.h.
| std::uint8_t profinet::PNDCPHeader::serviceId = 0 |
DCP service ID (GET/SET/IDENTIFY/HELLO).
Definition at line 199 of file protocol.h.
Referenced by profinet::dcp::BuildDcpSignalRequest(), profinet::dcp::BuildSetParamRequest(), profinet::dcp::GetParam(), Parse(), profinet::dcp::ReceiveHello(), profinet::dcp::ResetToFactory(), profinet::dcp::SendDiscover(), profinet::dcp::SendHello(), profinet::dcp::SendRequest(), profinet::dcp::SetIp(), and ToBytes().
| std::uint8_t profinet::PNDCPHeader::serviceType = 0 |
DCP service type (REQUEST/RESPONSE/...).
Definition at line 202 of file protocol.h.
Referenced by profinet::dcp::BuildDcpSignalRequest(), profinet::dcp::BuildSetParamRequest(), profinet::dcp::GetParam(), 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(), and ToBytes().
|
staticconstexpr |
Service ID: SET.
Definition at line 177 of file protocol.h.
| std::uint32_t profinet::PNDCPHeader::xId = 0 |
Transaction ID correlating requests and responses.
Definition at line 205 of file protocol.h.
Referenced by profinet::dcp::BuildDcpSignalRequest(), profinet::dcp::BuildSetParamRequest(), profinet::dcp::GetParam(), Parse(), profinet::dcp::ReadResponse(), profinet::dcp::ResetToFactory(), profinet::dcp::SendDiscover(), profinet::dcp::SendHello(), profinet::dcp::SendRequest(), profinet::dcp::SetIp(), and ToBytes().