|
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 |
| Block type identifier. | |
| std::uint16_t | blockLength = 0 |
| Length in bytes of the block body (excludes Type/Length fields). | |
| std::uint16_t | blockVersion = 0x0100 |
| Block format version. | |
| 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 = sizeof(std::uint16_t) + sizeof(std::uint16_t) + (2 * sizeof(std::uint8_t)) |
| Size in bytes of this header. | |
Definition at line 1281 of file protocol.h.
|
inlinestatic |
Parse a block header from raw bytes.
| data | Bytes starting at the BlockType field. |
Definition at line 1328 of file protocol.h.
References blockLength, blockType, blockVersion, blockVersionHigh, blockVersionLow, kSize, profinet::wire::Reader::SkipTo(), profinet::wire::Reader::U16(), and profinet::wire::Reader::U8().
Referenced by profinet::ParseAlarmNotification(), profinet::rpc::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 back to raw bytes.
Definition at line 1347 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(), TestRpcDevice::BuildApplicationReadyRequestPayload(), TestRpcDevice::BuildControlRequestPayload(), profinet::rpc::RPCCon::BuildIocrBlock(), profinet::rpc::RPCCon::Connect(), profinet::rpc::RPCCon::Disconnect(), profinet::sim::VirtualProfinetRpcDevice::MakeAlarmCrResponse(), profinet::rpc::RpcTests::MakeAlarmCrResponseBlock(), profinet::rpc::RpcTests::MakeApplicationReadyControlBlock(), profinet::rpc::RpcTests::MakeBlockHeader(), profinet::rpc::RpcTests::MakeIodResponsePayload(), profinet::rpc::RPCCon::Read(), profinet::rpc::RPCCon::ReadImplicit(), profinet::AlarmListener::SendAck(), profinet::sim::VirtualProfinetRpcDevice::SendApplicationReady(), profinet::rpc::RPCCon::SendControl(), profinet::rpc::TEST_F(), 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 1311 of file protocol.h.
Referenced by profinet::rpc::RPCCon::ApplicationReady(), profinet::rpc::RPCCon::BuildAlarmCrBlock(), TestRpcDevice::BuildApplicationReadyRequestPayload(), TestRpcDevice::BuildControlRequestPayload(), profinet::rpc::RPCCon::BuildIocrBlock(), profinet::rpc::RPCCon::Connect(), profinet::rpc::RPCCon::Disconnect(), profinet::sim::VirtualProfinetRpcDevice::MakeAlarmCrResponse(), profinet::rpc::RpcTests::MakeAlarmCrResponseBlock(), profinet::rpc::RpcTests::MakeApplicationReadyControlBlock(), profinet::rpc::RpcTests::MakeBlockHeader(), profinet::rpc::RpcTests::MakeIodResponsePayload(), Parse(), profinet::ParseAlarmNotification(), profinet::rpc::RPCCon::Read(), profinet::rpc::RPCCon::ReadImplicit(), profinet::AlarmListener::SendAck(), profinet::sim::VirtualProfinetRpcDevice::SendApplicationReady(), profinet::rpc::RPCCon::SendControl(), profinet::rpc::TEST_F(), profinet::rpc::TEST_F(), profinet::rpc::TEST_F(), ToBytes(), profinet::rpc::RPCCon::Write(), and profinet::rpc::RPCCon::WriteMultiple().
| BlockType profinet::PNBlockHeader::blockType |
Block type identifier.
Definition at line 1308 of file protocol.h.
Referenced by profinet::rpc::RPCCon::ApplicationReady(), profinet::rpc::RPCCon::BuildAlarmCrBlock(), TestRpcDevice::BuildApplicationReadyRequestPayload(), TestRpcDevice::BuildControlRequestPayload(), profinet::rpc::RPCCon::BuildIocrBlock(), profinet::rpc::RPCCon::Connect(), profinet::rpc::RPCCon::Disconnect(), profinet::sim::VirtualProfinetRpcDevice::MakeAlarmCrResponse(), profinet::rpc::RpcTests::MakeAlarmCrResponseBlock(), profinet::rpc::RpcTests::MakeApplicationReadyControlBlock(), profinet::rpc::RpcTests::MakeBlockHeader(), profinet::rpc::RpcTests::MakeIodResponsePayload(), Parse(), profinet::ParseAlarmNotification(), profinet::rpc::RPCCon::Read(), profinet::rpc::RPCCon::ReadImplicit(), profinet::AlarmListener::SendAck(), profinet::sim::VirtualProfinetRpcDevice::SendApplicationReady(), profinet::rpc::RPCCon::SendControl(), profinet::rpc::TEST_F(), profinet::rpc::TEST_F(), profinet::rpc::TEST_F(), ToBytes(), profinet::rpc::RPCCon::Write(), and profinet::rpc::RPCCon::WriteMultiple().
| std::uint16_t profinet::PNBlockHeader::blockVersion = 0x0100 |
| std::uint8_t profinet::PNBlockHeader::blockVersionHigh = 1 |
Block format major version.
Definition at line 1317 of file protocol.h.
Referenced by profinet::rpc::RPCCon::ApplicationReady(), profinet::rpc::RPCCon::BuildAlarmCrBlock(), TestRpcDevice::BuildApplicationReadyRequestPayload(), TestRpcDevice::BuildControlRequestPayload(), profinet::rpc::RPCCon::BuildIocrBlock(), profinet::rpc::RPCCon::Connect(), profinet::rpc::RPCCon::Disconnect(), profinet::sim::VirtualProfinetRpcDevice::MakeAlarmCrResponse(), profinet::rpc::RpcTests::MakeAlarmCrResponseBlock(), profinet::rpc::RpcTests::MakeApplicationReadyControlBlock(), profinet::rpc::RpcTests::MakeBlockHeader(), profinet::rpc::RpcTests::MakeIodResponsePayload(), Parse(), profinet::ParseAlarmNotification(), profinet::rpc::RPCCon::Read(), profinet::rpc::RPCCon::ReadImplicit(), profinet::AlarmListener::SendAck(), profinet::sim::VirtualProfinetRpcDevice::SendApplicationReady(), profinet::rpc::RPCCon::SendControl(), profinet::rpc::TEST_F(), profinet::rpc::TEST_F(), profinet::rpc::TEST_F(), ToBytes(), profinet::rpc::RPCCon::Write(), and profinet::rpc::RPCCon::WriteMultiple().
| std::uint8_t profinet::PNBlockHeader::blockVersionLow = 0 |
Block format minor version.
Definition at line 1320 of file protocol.h.
Referenced by profinet::rpc::RPCCon::ApplicationReady(), profinet::rpc::RPCCon::BuildAlarmCrBlock(), TestRpcDevice::BuildApplicationReadyRequestPayload(), TestRpcDevice::BuildControlRequestPayload(), profinet::rpc::RPCCon::BuildIocrBlock(), profinet::rpc::RPCCon::Connect(), profinet::rpc::RPCCon::Disconnect(), profinet::sim::VirtualProfinetRpcDevice::MakeAlarmCrResponse(), profinet::rpc::RpcTests::MakeAlarmCrResponseBlock(), profinet::rpc::RpcTests::MakeApplicationReadyControlBlock(), profinet::rpc::RpcTests::MakeBlockHeader(), profinet::rpc::RpcTests::MakeIodResponsePayload(), Parse(), profinet::ParseAlarmNotification(), profinet::rpc::RPCCon::Read(), profinet::rpc::RPCCon::ReadImplicit(), profinet::AlarmListener::SendAck(), profinet::sim::VirtualProfinetRpcDevice::SendApplicationReady(), profinet::rpc::RPCCon::SendControl(), profinet::rpc::TEST_F(), profinet::rpc::TEST_F(), profinet::rpc::TEST_F(), ToBytes(), profinet::rpc::RPCCon::Write(), and profinet::rpc::RPCCon::WriteMultiple().
|
staticconstexpr |
Default block length.
Definition at line 1304 of file protocol.h.
Referenced by profinet::rpc::RPCCon::Read().
|
staticconstexpr |
Block type: I&M0.
Definition at line 1292 of file protocol.h.
|
staticconstexpr |
Block type: I&M0 filter data (device level).
Definition at line 1301 of file protocol.h.
|
staticconstexpr |
Block type: I&M0 filter data (module level).
Definition at line 1298 of file protocol.h.
|
staticconstexpr |
Block type: I&M0 filter data (submodule level).
Definition at line 1295 of file protocol.h.
|
staticconstexpr |
Generic 6-byte PROFINET block header (Type + Length + Version).
Block type: IODReadRequestHeader.
Definition at line 1286 of file protocol.h.
Referenced by profinet::rpc::RPCCon::Read(), and profinet::rpc::RPCCon::ReadImplicit().
|
staticconstexpr |
Block type: IODReadResponseHeader.
Definition at line 1289 of file protocol.h.
Referenced by profinet::rpc::RpcTests::MakeIodResponsePayload().
|
staticconstexpr |
Size in bytes of this header.
Definition at line 1323 of file protocol.h.