|
PROFINET IO Controller Stack 1.0.0
Modern C++ implementation of a PROFINET IO Controller stack
|
DCP request block: Option(1) + SubOption(1) + Length(2) + payload(Length). More...
#include <protocol.h>
Collaboration diagram for profinet::PNDCPBlockRequest:Public Member Functions | |
| Bytes | ToBytes () const |
| Serialize this block back to raw bytes. | |
| IPConfiguration | ParseIp () const |
| Interpret this block's payload as an IP configuration triple. | |
Static Public Member Functions | |
| static PNDCPBlockRequest | Parse (const Bytes &data) |
| Parse a DCP request block from raw bytes. | |
Public Attributes | |
| std::uint8_t | option = 0 |
| DCP option code. | |
| std::uint8_t | suboption = 0 |
| DCP suboption code. | |
| std::uint16_t | length = 0 |
| Length in bytes of Payload. | |
| Bytes | payload |
| Block payload. | |
Static Public Attributes | |
| static constexpr std::size_t | kFixedSize = 4 |
| Size in bytes of the fixed portion of this block. | |
DCP request block: Option(1) + SubOption(1) + Length(2) + payload(Length).
Definition at line 270 of file protocol.h.
|
inlinestatic |
Parse a DCP request block from raw bytes.
| data | Bytes starting at the Option field. |
Definition at line 290 of file protocol.h.
References kFixedSize, length, option, payload, profinet::wire::Reader::ReadBytes(), profinet::wire::Reader::Remaining(), suboption, profinet::wire::Reader::U16(), and profinet::wire::Reader::U8().
Here is the call graph for this function:
|
inline |
Interpret this block's payload as an IP configuration triple.
Throws std::runtime_error if the payload is shorter than 12 bytes.
Definition at line 321 of file protocol.h.
References payload, and profinet::String2Ip().
Here is the call graph for this function:
|
inline |
Serialize this block back to raw bytes.
Definition at line 308 of file protocol.h.
References length, option, payload, profinet::wire::PutU16(), profinet::wire::PutU8(), and suboption.
Referenced by profinet::dcp::BuildDcpSignalRequest(), profinet::dcp::BuildSetParamRequest(), profinet::dcp::GetParam(), profinet::dcp::ResetToFactory(), profinet::dcp::SendDiscover(), profinet::dcp::SendHello(), profinet::dcp::SendRequest(), and profinet::dcp::SetIp().
Here is the call graph for this function:
Here is the caller graph for this function:
|
staticconstexpr |
Size in bytes of the fixed portion of this block.
Definition at line 285 of file protocol.h.
Referenced by Parse().
| std::uint16_t profinet::PNDCPBlockRequest::length = 0 |
Length in bytes of Payload.
Definition at line 279 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().
| std::uint8_t profinet::PNDCPBlockRequest::option = 0 |
DCP option code.
Definition at line 273 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().
| Bytes profinet::PNDCPBlockRequest::payload |
Block payload.
Definition at line 282 of file protocol.h.
Referenced by profinet::dcp::BuildDcpSignalRequest(), profinet::dcp::BuildSetParamRequest(), Parse(), ParseIp(), profinet::dcp::ResetToFactory(), profinet::dcp::SendHello(), profinet::dcp::SendRequest(), profinet::dcp::SetIp(), and ToBytes().
| std::uint8_t profinet::PNDCPBlockRequest::suboption = 0 |
DCP suboption code.
Definition at line 276 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().