|
PROFINET IO Controller Stack 1.0.0
Modern C++ implementation of a PROFINET IO Controller stack
|
Unit tests for PROFINET protocol wire-format structures. More...
Include dependency graph for test_protocol.cpp:Go to the source code of this file.
Classes | |
| class | ProtocolTest |
Functions | |
| TEST_F (ProtocolTest, PNDCPHeaderRoundTrips) | |
| TEST_F (ProtocolTest, PNDCPBlockParsesStatusAndPayload) | |
| TEST_F (ProtocolTest, EthernetHeaderRoundTrips) | |
| TEST_F (ProtocolTest, PacketStructFixedSizesMatchExpectedSizes) | |
| TEST_F (ProtocolTest, PNRPCHeaderInterfaceUUIDMatchesExpectedPrefix) | |
| TEST (EthernetVLANHeaderTests, RejectsTruncatedHeader) | |
| TEST (EthernetVLANHeaderTests, AcceptsCompleteHeader) | |
Unit tests for PROFINET protocol wire-format structures.
Verifies serialization, parsing, fixed-size definitions, and selected protocol constants for the structures declared in protocol.h.
The tests cover:
Fixed-size checks are compared against the expected wire-format sizes established to help preserve binary compatibility with PROFINET devices.
Definition in file test_protocol.cpp.
| TEST | ( | EthernetVLANHeaderTests | , |
| AcceptsCompleteHeader | |||
| ) |
Definition at line 292 of file test_protocol.cpp.
References profinet::EthernetVLANHeader::Parse().
Here is the call graph for this function:| TEST | ( | EthernetVLANHeaderTests | , |
| RejectsTruncatedHeader | |||
| ) |
Definition at line 280 of file test_protocol.cpp.
References profinet::EthernetVLANHeader::Parse().
Here is the call graph for this function:| TEST_F | ( | ProtocolTest | , |
| EthernetHeaderRoundTrips | |||
| ) |
Definition at line 99 of file test_protocol.cpp.
References profinet::EthernetHeader::dst, profinet::EthernetHeader::Parse(), profinet::EthernetHeader::payload, profinet::PROFINET_ETHERTYPE, profinet::EthernetHeader::src, profinet::String2Mac(), profinet::EthernetHeader::ToBytes(), and profinet::EthernetHeader::type.
Here is the call graph for this function:| TEST_F | ( | ProtocolTest | , |
| PacketStructFixedSizesMatchExpectedSizes | |||
| ) |
Definition at line 126 of file test_protocol.cpp.
References profinet::PNDCPHeader::kFixedSize, profinet::PNDCPBlockRequest::kFixedSize, profinet::PNDCPBlock::kFixedSize, profinet::PNRPCHeader::kFixedSize, profinet::PNNRDData::kFixedSize, profinet::PNIODHeader::kFixedSize, profinet::PNARBlockRequest::kFixedSize, profinet::PNAlarmNotificationPDU::kFixedSize, profinet::PNRTAHeader::kFixedSize, profinet::PNIODWriteReq::kFixedSize, profinet::PNBlockHeader::kSize, profinet::PNIODReleaseBlock::kSize, profinet::PNInM0::kSize, profinet::PNInM1::kSize, profinet::PNInM2::kSize, profinet::PNInM3::kSize, profinet::PNInM4::kSize, profinet::PNInM5::kSize, profinet::IOCRAPIObject::kSize, profinet::PNIOCRBlockRes::kSize, profinet::PNIOCRBlockReqHeader::kSize, profinet::PNAlarmCRBlockReq::kSize, profinet::PNAlarmCRBlockRes::kSize, profinet::PNAlarmAckPDU::kSize, profinet::PNExpectedSubmoduleDataDescription::kSize, profinet::PNIODWriteRes::kSize, profinet::PNARBlockRequest::ToBytes(), profinet::PNIOCRBlockReqHeader::ToBytes(), profinet::PNAlarmCRBlockReq::ToBytes(), profinet::PNAlarmAckPDU::ToBytes(), profinet::PNRTAHeader::ToBytes(), and profinet::PNIODWriteReq::ToBytes().
Here is the call graph for this function:| TEST_F | ( | ProtocolTest | , |
| PNDCPBlockParsesStatusAndPayload | |||
| ) |
Definition at line 55 of file test_protocol.cpp.
References profinet::IPConfiguration::address, profinet::IPConfiguration::gateway, profinet::IPConfiguration::netmask, profinet::PNDCPBlock::option, profinet::PNDCPBlock::Parse(), profinet::PNDCPBlock::ParseIp(), profinet::PNDCPBlock::payload, and profinet::PNDCPBlock::suboption.
Here is the call graph for this function:| TEST_F | ( | ProtocolTest | , |
| PNDCPHeaderRoundTrips | |||
| ) |
Definition at line 29 of file test_protocol.cpp.
References profinet::PNDCPHeader::frameId, profinet::PNDCPHeader::kFixedSize, profinet::PNDCPHeader::length, profinet::PNDCPHeader::Parse(), profinet::PNDCPHeader::payload, profinet::PNDCPHeader::respDelay, profinet::PNDCPHeader::serviceId, profinet::PNDCPHeader::serviceType, profinet::PNDCPHeader::ToBytes(), and profinet::PNDCPHeader::xId.
Here is the call graph for this function:| TEST_F | ( | ProtocolTest | , |
| PNRPCHeaderInterfaceUUIDMatchesExpectedPrefix | |||
| ) |
Definition at line 259 of file test_protocol.cpp.
References profinet::PNRPCHeader::IfaceUuidDevice().
Here is the call graph for this function: