|
PROFINET IO Controller Stack 1.0.0
Modern C++ implementation of a PROFINET IO Controller stack
|
Unit tests for PROFINET RT_CLASS_1 cyclic frame handling and IO data layout. More...
Include dependency graph for test_rt.cpp:Go to the source code of this file.
Classes | |
| class | RTTest |
Functions | |
| TEST_F (RTTest, RTFrameRoundTrips) | |
| TEST_F (RTTest, RTFrameRejectsTooShortData) | |
| TEST_F (RTTest, BuildAndParseEthernetFrameRoundTrips) | |
| TEST_F (RTTest, ParseEthernetFrameRejectsNonProfinetEthertype) | |
| TEST_F (RTTest, CyclicDataBuilderSetGetDataRoundTripsThroughSwap) | |
| TEST_F (RTTest, CyclicDataBuilderRejectsUnknownSlotSubslot) | |
| TEST_F (RTTest, BuildReturnsStablePublishedSnapshot) | |
| TEST_F (RTTest, ConcurrentSetDataAndBuildIsRaceFree) | |
| TEST_F (RTTest, DISABLED_BuildIocrConfigsComputesExpectedFrameOffsets) | |
Unit tests for PROFINET RT_CLASS_1 cyclic frame handling and IO data layout.
Verifies RT frame serialization and parsing, Ethernet frame handling, and cyclic process-data buffer management provided by rt.h.
The tests cover:
Definition in file test_rt.cpp.
| TEST_F | ( | RTTest | , |
| BuildAndParseEthernetFrameRoundTrips | |||
| ) |
Definition at line 64 of file test_rt.cpp.
References profinet::rt::BuildEthernetFrame(), profinet::rt::DATA_STATUS_VALID, frame, profinet::rt::RTFrame::frameId, profinet::rt::ParseEthernetFrame(), and profinet::String2Mac().
Here is the call graph for this function:| TEST_F | ( | RTTest | , |
| BuildReturnsStablePublishedSnapshot | |||
| ) |
Definition at line 141 of file test_rt.cpp.
References profinet::rt::CyclicDataBuilder::Build(), profinet::rt::IOCRConfig::dataLength, profinet::rt::IOCRConfig::objects, profinet::rt::CyclicDataBuilder::SetData(), and profinet::rt::CyclicDataBuilder::Swap().
Here is the call graph for this function:| TEST_F | ( | RTTest | , |
| ConcurrentSetDataAndBuildIsRaceFree | |||
| ) |
Definition at line 158 of file test_rt.cpp.
References profinet::rt::IOCRConfig::dataLength, profinet::rt::IOCRConfig::objects, and profinet::rt::CyclicDataBuilder::Swap().
Here is the call graph for this function:| TEST_F | ( | RTTest | , |
| CyclicDataBuilderRejectsUnknownSlotSubslot | |||
| ) |
Definition at line 131 of file test_rt.cpp.
References profinet::rt::IOCRConfig::dataLength, and profinet::rt::CyclicDataBuilder::SetData().
Here is the call graph for this function:| TEST_F | ( | RTTest | , |
| CyclicDataBuilderSetGetDataRoundTripsThroughSwap | |||
| ) |
Definition at line 101 of file test_rt.cpp.
References profinet::rt::CyclicDataBuilder::Build(), profinet::rt::IOCRConfig::dataLength, profinet::rt::CyclicDataBuilder::GetData(), profinet::rt::IOXS_GOOD, profinet::rt::IOCRConfig::objects, profinet::rt::CyclicDataBuilder::SetData(), profinet::rt::CyclicDataBuilder::SetIops(), and profinet::rt::CyclicDataBuilder::Swap().
Here is the call graph for this function:| TEST_F | ( | RTTest | , |
| DISABLED_BuildIocrConfigsComputesExpectedFrameOffsets | |||
| ) |
Definition at line 184 of file test_rt.cpp.
References profinet::rt::BuildIocrConfigs().
Here is the call graph for this function:| TEST_F | ( | RTTest | , |
| ParseEthernetFrameRejectsNonProfinetEthertype | |||
| ) |
Definition at line 88 of file test_rt.cpp.
References profinet::rt::ParseEthernetFrame().
Here is the call graph for this function:| TEST_F | ( | RTTest | , |
| RTFrameRejectsTooShortData | |||
| ) |
Definition at line 58 of file test_rt.cpp.
References profinet::rt::RTFrame::FromBytes().
Here is the call graph for this function:| TEST_F | ( | RTTest | , |
| RTFrameRoundTrips | |||
| ) |
Definition at line 31 of file test_rt.cpp.
References profinet::rt::RTFrame::cycleCounter, profinet::rt::DATA_STATUS_PROVIDER_RUN, profinet::rt::DATA_STATUS_VALID, profinet::rt::RTFrame::dataStatus, frame, profinet::rt::RTFrame::frameId, profinet::rt::RTFrame::FromBytes(), profinet::rt::RTFrame::IsOk(), profinet::rt::RTFrame::IsRunning(), profinet::rt::RTFrame::IsValid(), and profinet::rt::RTFrame::payload.
Here is the call graph for this function: