|
PROFINET IO Controller Stack 1.0.0
Modern C++ implementation of a PROFINET IO Controller stack
|
#include <protocol.h>
Collaboration diagram for profinet::PNBlockHeader:Public Member Functions | |
| Bytes | ToBytes () const |
| Serialize this header back to raw bytes. | |
Static Public Member Functions | |
| static PNBlockHeader | Parse (const Bytes &data) |
| Parse a block header from raw bytes. | |
Public Attributes | |
| BlockType | blockType = BlockType::Unknown |
| Block type identifier. | |
| std::uint16_t | blockLength = 0 |
| Length in bytes of the block body (excludes Type/Length fields). | |
| std::uint8_t | blockVersionHigh = 1 |
| Block format major version. | |
| std::uint8_t | blockVersionLow = 0 |
| Block format minor version. | |
Static Public Attributes | |
| static constexpr BlockType | IODReadRequestHeader = BlockType::IoDataReadRequest |
| Generic 6-byte PROFINET block header (Type + Length + Version). | |
| static constexpr std::uint16_t | IODReadResponseHeader = 0x8009 |
| Block type: IODReadResponseHeader. | |
| static constexpr std::uint16_t | InM0 = 0x0020 |
| Block type: I&M0. | |
| static constexpr std::uint16_t | InM0FilterDataSubModul = 0x0030 |
| Block type: I&M0 filter data (submodule level). | |
| static constexpr std::uint16_t | InM0FilterDataModul = 0x0031 |
| Block type: I&M0 filter data (module level). | |
| static constexpr std::uint16_t | InM0FilterDataDevice = 0x0032 |
| Block type: I&M0 filter data (device level). | |
| static constexpr std::uint16_t | DEFAULT_BLOCK_LENGTH = 60 |
| Default block length. | |
| static constexpr std::size_t | kSize = 6 |
| Size in bytes of this header. | |
Definition at line 845 of file protocol.h.
|
inlinestatic |
Parse a block header from raw bytes.
| data | Bytes starting at the BlockType field. |
Definition at line 889 of file protocol.h.
References blockLength, blockType, blockVersionHigh, blockVersionLow, kSize, profinet::wire::Reader::U16(), and profinet::wire::Reader::U8().
Referenced by profinet::ParseAlarmNotification().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inline |
Serialize this header back to raw bytes.
Definition at line 906 of file protocol.h.
References blockLength, blockType, blockVersionHigh, blockVersionLow, profinet::wire::PutU16(), and profinet::wire::PutU8().
Referenced by profinet::rpc::RPCCon::ApplicationReady(), profinet::rpc::RPCCon::BuildAlarmCrBlock(), profinet::rpc::RPCCon::BuildIocrBlock(), profinet::rpc::RPCCon::Connect(), profinet::rpc::RPCCon::Disconnect(), profinet::rpc::RPCCon::Read(), profinet::rpc::RPCCon::ReadImplicit(), profinet::AlarmListener::SendAck(), profinet::rpc::RPCCon::SendControl(), 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::uint16_t profinet::PNBlockHeader::blockLength = 0 |
Length in bytes of the block body (excludes Type/Length fields).
Definition at line 875 of file protocol.h.
Referenced by profinet::rpc::RPCCon::ApplicationReady(), profinet::rpc::RPCCon::BuildAlarmCrBlock(), profinet::rpc::RPCCon::BuildIocrBlock(), profinet::rpc::RPCCon::Connect(), profinet::rpc::RPCCon::Disconnect(), Parse(), profinet::ParseAlarmNotification(), profinet::rpc::RPCCon::Read(), profinet::rpc::RPCCon::ReadImplicit(), profinet::AlarmListener::SendAck(), profinet::rpc::RPCCon::SendControl(), ToBytes(), profinet::rpc::RPCCon::Write(), and profinet::rpc::RPCCon::WriteMultiple().
| BlockType profinet::PNBlockHeader::blockType = BlockType::Unknown |
Block type identifier.
Definition at line 872 of file protocol.h.
Referenced by profinet::rpc::RPCCon::ApplicationReady(), profinet::rpc::RPCCon::BuildAlarmCrBlock(), profinet::rpc::RPCCon::BuildIocrBlock(), profinet::rpc::RPCCon::Connect(), profinet::rpc::RPCCon::Disconnect(), Parse(), profinet::ParseAlarmNotification(), profinet::rpc::RPCCon::Read(), profinet::rpc::RPCCon::ReadImplicit(), profinet::AlarmListener::SendAck(), profinet::rpc::RPCCon::SendControl(), ToBytes(), profinet::rpc::RPCCon::Write(), and profinet::rpc::RPCCon::WriteMultiple().
| std::uint8_t profinet::PNBlockHeader::blockVersionHigh = 1 |
Block format major version.
Definition at line 878 of file protocol.h.
Referenced by profinet::rpc::RPCCon::ApplicationReady(), profinet::rpc::RPCCon::BuildAlarmCrBlock(), profinet::rpc::RPCCon::BuildIocrBlock(), profinet::rpc::RPCCon::Connect(), profinet::rpc::RPCCon::Disconnect(), Parse(), profinet::ParseAlarmNotification(), profinet::rpc::RPCCon::Read(), profinet::rpc::RPCCon::ReadImplicit(), profinet::AlarmListener::SendAck(), profinet::rpc::RPCCon::SendControl(), ToBytes(), profinet::rpc::RPCCon::Write(), and profinet::rpc::RPCCon::WriteMultiple().
| std::uint8_t profinet::PNBlockHeader::blockVersionLow = 0 |
Block format minor version.
Definition at line 881 of file protocol.h.
Referenced by profinet::rpc::RPCCon::ApplicationReady(), profinet::rpc::RPCCon::BuildAlarmCrBlock(), profinet::rpc::RPCCon::BuildIocrBlock(), profinet::rpc::RPCCon::Connect(), profinet::rpc::RPCCon::Disconnect(), Parse(), profinet::ParseAlarmNotification(), profinet::rpc::RPCCon::Read(), profinet::rpc::RPCCon::ReadImplicit(), profinet::AlarmListener::SendAck(), profinet::rpc::RPCCon::SendControl(), ToBytes(), profinet::rpc::RPCCon::Write(), and profinet::rpc::RPCCon::WriteMultiple().
|
staticconstexpr |
Default block length.
Definition at line 868 of file protocol.h.
Referenced by profinet::rpc::RPCCon::Read().
|
staticconstexpr |
Block type: I&M0.
Definition at line 856 of file protocol.h.
|
staticconstexpr |
Block type: I&M0 filter data (device level).
Definition at line 865 of file protocol.h.
|
staticconstexpr |
Block type: I&M0 filter data (module level).
Definition at line 862 of file protocol.h.
|
staticconstexpr |
Block type: I&M0 filter data (submodule level).
Definition at line 859 of file protocol.h.
|
staticconstexpr |
Generic 6-byte PROFINET block header (Type + Length + Version).
Block type: IODReadRequestHeader.
Definition at line 850 of file protocol.h.
Referenced by profinet::rpc::RPCCon::Read(), and profinet::rpc::RPCCon::ReadImplicit().
|
staticconstexpr |
Block type: IODReadResponseHeader.
Definition at line 853 of file protocol.h.
|
staticconstexpr |