|
PROFINET IO Controller Stack 1.0.0
Modern C++ implementation of a PROFINET IO Controller stack
|
Additional unit tests for PROFINET RT_CLASS_1 helpers. More...
#include <gtest/gtest.h>#include <array>#include <cstdint>#include <string>#include <vector>#include "profinet/rpc.h"#include "profinet/rt.h"#include "profinet/util.h"
Include dependency graph for test_rtMore.cpp:Go to the source code of this file.
Functions | |
| TEST_F (RtMoreTests, RTFrameStatusAccessorsCoverAllBits) | |
| TEST_F (RtMoreTests, RTFrameSerializationPreservesAllFields) | |
| TEST_F (RtMoreTests, RTFrameFromBytesRejectsShortBuffers) | |
| TEST_F (RtMoreTests, RTFrameToStringIsNonEmpty) | |
| TEST_F (RtMoreTests, ParseEthernetFrameRejectsShortFrames) | |
| TEST_F (RtMoreTests, ParseEthernetFrameAcceptsPriorityVlan) | |
| TEST_F (RtMoreTests, ParseEthernetFrameRejectsVlanNonProfinet) | |
| TEST_F (RtMoreTests, CyclicDataBuilderSetIopsUpdatesDataObject) | |
| TEST_F (RtMoreTests, CyclicDataBuilderSetIocsUpdatesIocsOnlyObject) | |
| TEST_F (RtMoreTests, CyclicDataBuilderSetIopsIgnoresIocsOnlyObject) | |
| TEST_F (RtMoreTests, CyclicDataBuilderSetIocsUpdatesDataObject) | |
| TEST_F (RtMoreTests, CyclicDataBuilderSetAllIopsUpdatesAllDataObjects) | |
| TEST_F (RtMoreTests, CyclicDataBuilderSetAllIocsUpdatesAllIocs) | |
| TEST_F (RtMoreTests, CyclicDataBuilderClearResetsBuffers) | |
| TEST_F (RtMoreTests, CyclicDataBuilderLoadCopiesAndClearsRemainder) | |
| TEST_F (RtMoreTests, CyclicDataBuilderLoadTruncatesLongPayload) | |
| TEST_F (RtMoreTests, CyclicDataBuilderGetDataRejectsUnknownSlotSubslot) | |
| TEST_F (RtMoreTests, CyclicDataBuilderSetDataTruncatesOversizedData) | |
| TEST_F (RtMoreTests, CyclicDataBuilderSwapWithoutChangesPreservesData) | |
| TEST_F (RtMoreTests, IOCRTimingHelpersCalculateCycleAndWatchdog) | |
| TEST_F (RtMoreTests, IOCRTypePredicatesCoverBothDirections) | |
| TEST_F (RtMoreTests, BuildIocrConfigsHandlesEmptySlotList) | |
| TEST_F (RtMoreTests, BuildIocrConfigsCoversInputAndOutputBranches) | |
| TEST_F (RtMoreTests, BuildIocrConfigsUsesMinimumCSduLength) | |
| TEST_F (RtMoreTests, BuildIocrConfigsUsesCalculatedSizeWhenLarger) | |
| TEST_F (RtMoreTests, CyclicDataBuilderSetDataRejectsUnknownSlotSubslot) | |
| TEST_F (RtMoreTests, CyclicDataBuilderSwapPromotesDirtyBuffer) | |
| TEST_F (RtMoreTests, CyclicDataBuilderConfigReturnsConfiguration) | |
Additional unit tests for PROFINET RT_CLASS_1 helpers.
Extends coverage for RT frame status flags, malformed Ethernet input,/// VLAN handling, cyclic-buffer state transitions, IOPS/IOCS updates,/// clearing/loading, and IOCR configuration helper behavior.
Definition in file test_rtMore.cpp.
| TEST_F | ( | RtMoreTests | , |
| BuildIocrConfigsCoversInputAndOutputBranches | |||
| ) |
Definition at line 477 of file test_rtMore.cpp.
References profinet::rt::BuildIocrConfigs(), profinet::rt::IOCR_TYPE_INPUT, and profinet::rt::IOCR_TYPE_OUTPUT.
Here is the call graph for this function:| TEST_F | ( | RtMoreTests | , |
| BuildIocrConfigsHandlesEmptySlotList | |||
| ) |
Definition at line 463 of file test_rtMore.cpp.
References profinet::rt::BuildIocrConfigs().
Here is the call graph for this function:| TEST_F | ( | RtMoreTests | , |
| BuildIocrConfigsUsesCalculatedSizeWhenLarger | |||
| ) |
Definition at line 637 of file test_rtMore.cpp.
References profinet::rt::BuildIocrConfigs().
Here is the call graph for this function:| TEST_F | ( | RtMoreTests | , |
| BuildIocrConfigsUsesMinimumCSduLength | |||
| ) |
Definition at line 624 of file test_rtMore.cpp.
References profinet::rt::BuildIocrConfigs().
Here is the call graph for this function:| TEST_F | ( | RtMoreTests | , |
| CyclicDataBuilderClearResetsBuffers | |||
| ) |
Definition at line 319 of file test_rtMore.cpp.
References profinet::rt::CyclicDataBuilder::Build(), profinet::rt::CyclicDataBuilder::Clear(), profinet::rt::IOCRConfig::dataLength, profinet::rt::CyclicDataBuilder::GetData(), profinet::rt::IOCRConfig::objects, profinet::rt::CyclicDataBuilder::SetData(), profinet::rt::CyclicDataBuilder::SetIocs(), profinet::rt::IODataObject::slot, and profinet::rt::CyclicDataBuilder::Swap().
Here is the call graph for this function:| TEST_F | ( | RtMoreTests | , |
| CyclicDataBuilderConfigReturnsConfiguration | |||
| ) |
Definition at line 677 of file test_rtMore.cpp.
References profinet::rt::CyclicDataBuilder::Config(), profinet::rt::IOCRConfig::dataLength, and profinet::rt::IOCRConfig::objects.
Here is the call graph for this function:| TEST_F | ( | RtMoreTests | , |
| CyclicDataBuilderGetDataRejectsUnknownSlotSubslot | |||
| ) |
Definition at line 387 of file test_rtMore.cpp.
References profinet::rt::CyclicDataBuilder::GetData().
Here is the call graph for this function:| TEST_F | ( | RtMoreTests | , |
| CyclicDataBuilderLoadCopiesAndClearsRemainder | |||
| ) |
Definition at line 355 of file test_rtMore.cpp.
References profinet::rt::CyclicDataBuilder::Build(), profinet::rt::CyclicDataBuilder::Load(), and profinet::rt::CyclicDataBuilder::Swap().
Here is the call graph for this function:| TEST_F | ( | RtMoreTests | , |
| CyclicDataBuilderLoadTruncatesLongPayload | |||
| ) |
Definition at line 372 of file test_rtMore.cpp.
References profinet::rt::CyclicDataBuilder::Build(), profinet::rt::CyclicDataBuilder::Load(), and profinet::rt::CyclicDataBuilder::Swap().
Here is the call graph for this function:| TEST_F | ( | RtMoreTests | , |
| CyclicDataBuilderSetAllIocsUpdatesAllIocs | |||
| ) |
Definition at line 278 of file test_rtMore.cpp.
References profinet::rt::CyclicDataBuilder::Build(), profinet::rt::IOCRConfig::dataLength, profinet::rt::IOCRConfig::objects, profinet::rt::CyclicDataBuilder::SetAllIocs(), profinet::rt::IODataObject::slot, and profinet::rt::CyclicDataBuilder::Swap().
Here is the call graph for this function:| TEST_F | ( | RtMoreTests | , |
| CyclicDataBuilderSetAllIopsUpdatesAllDataObjects | |||
| ) |
Definition at line 263 of file test_rtMore.cpp.
References profinet::rt::CyclicDataBuilder::Build(), profinet::rt::CyclicDataBuilder::SetAllIops(), and profinet::rt::CyclicDataBuilder::Swap().
Here is the call graph for this function:| TEST_F | ( | RtMoreTests | , |
| CyclicDataBuilderSetDataRejectsUnknownSlotSubslot | |||
| ) |
Definition at line 652 of file test_rtMore.cpp.
References profinet::rt::CyclicDataBuilder::SetData().
Here is the call graph for this function:| TEST_F | ( | RtMoreTests | , |
| CyclicDataBuilderSetDataTruncatesOversizedData | |||
| ) |
Definition at line 395 of file test_rtMore.cpp.
References profinet::rt::IOCRConfig::dataLength, profinet::rt::CyclicDataBuilder::GetData(), profinet::rt::IOCRConfig::objects, profinet::rt::CyclicDataBuilder::SetData(), and profinet::rt::IODataObject::slot.
Here is the call graph for this function:| TEST_F | ( | RtMoreTests | , |
| CyclicDataBuilderSetIocsUpdatesDataObject | |||
| ) |
Definition at line 252 of file test_rtMore.cpp.
References profinet::rt::CyclicDataBuilder::Build(), profinet::rt::CyclicDataBuilder::SetIocs(), and profinet::rt::CyclicDataBuilder::Swap().
Here is the call graph for this function:| TEST_F | ( | RtMoreTests | , |
| CyclicDataBuilderSetIocsUpdatesIocsOnlyObject | |||
| ) |
Definition at line 228 of file test_rtMore.cpp.
References profinet::rt::CyclicDataBuilder::Build(), profinet::rt::CyclicDataBuilder::SetIocs(), and profinet::rt::CyclicDataBuilder::Swap().
Here is the call graph for this function:| TEST_F | ( | RtMoreTests | , |
| CyclicDataBuilderSetIopsIgnoresIocsOnlyObject | |||
| ) |
Definition at line 241 of file test_rtMore.cpp.
References profinet::rt::CyclicDataBuilder::Build(), profinet::rt::CyclicDataBuilder::SetIops(), and profinet::rt::CyclicDataBuilder::Swap().
Here is the call graph for this function:| TEST_F | ( | RtMoreTests | , |
| CyclicDataBuilderSetIopsUpdatesDataObject | |||
| ) |
Definition at line 215 of file test_rtMore.cpp.
References profinet::rt::CyclicDataBuilder::Build(), profinet::rt::CyclicDataBuilder::SetIops(), and profinet::rt::CyclicDataBuilder::Swap().
Here is the call graph for this function:| TEST_F | ( | RtMoreTests | , |
| CyclicDataBuilderSwapPromotesDirtyBuffer | |||
| ) |
Definition at line 660 of file test_rtMore.cpp.
References profinet::rt::CyclicDataBuilder::Build(), profinet::rt::CyclicDataBuilder::SetData(), and profinet::rt::CyclicDataBuilder::Swap().
Here is the call graph for this function:| TEST_F | ( | RtMoreTests | , |
| CyclicDataBuilderSwapWithoutChangesPreservesData | |||
| ) |
Definition at line 417 of file test_rtMore.cpp.
References profinet::rt::CyclicDataBuilder::Build(), profinet::rt::CyclicDataBuilder::SetData(), and profinet::rt::CyclicDataBuilder::Swap().
Here is the call graph for this function:| TEST_F | ( | RtMoreTests | , |
| IOCRTimingHelpersCalculateCycleAndWatchdog | |||
| ) |
Definition at line 432 of file test_rtMore.cpp.
References profinet::rt::IOCRConfig::CycleTimeMs(), profinet::rt::IOCRConfig::CycleTimeUs(), profinet::rt::IOCRConfig::reductionRatio, profinet::rt::IOCRConfig::sendClockFactor, profinet::rt::IOCRConfig::watchdogFactor, and profinet::rt::IOCRConfig::WatchdogTimeUs().
Here is the call graph for this function:| TEST_F | ( | RtMoreTests | , |
| IOCRTypePredicatesCoverBothDirections | |||
| ) |
Definition at line 445 of file test_rtMore.cpp.
References profinet::rt::IOCR_TYPE_INPUT, profinet::rt::IOCR_TYPE_OUTPUT, profinet::rt::IOCRConfig::IsInput(), profinet::rt::IOCRConfig::IsOutput(), and profinet::rt::IOCRConfig::typeIOCR.
Here is the call graph for this function:| TEST_F | ( | RtMoreTests | , |
| ParseEthernetFrameAcceptsPriorityVlan | |||
| ) |
Definition at line 180 of file test_rtMore.cpp.
References frame, and profinet::rt::ParseEthernetFrame().
Here is the call graph for this function:| TEST_F | ( | RtMoreTests | , |
| ParseEthernetFrameRejectsShortFrames | |||
| ) |
Definition at line 171 of file test_rtMore.cpp.
References length, and profinet::rt::ParseEthernetFrame().
Here is the call graph for this function:| TEST_F | ( | RtMoreTests | , |
| ParseEthernetFrameRejectsVlanNonProfinet | |||
| ) |
Definition at line 203 of file test_rtMore.cpp.
References profinet::rt::ParseEthernetFrame().
Here is the call graph for this function:| TEST_F | ( | RtMoreTests | , |
| RTFrameFromBytesRejectsShortBuffers | |||
| ) |
Definition at line 151 of file test_rtMore.cpp.
References profinet::rt::RTFrame::FromBytes(), and length.
Here is the call graph for this function:| TEST_F | ( | RtMoreTests | , |
| RTFrameSerializationPreservesAllFields | |||
| ) |
Definition at line 136 of file test_rtMore.cpp.
References frame, and profinet::rt::RTFrame::FromBytes().
Here is the call graph for this function:| TEST_F | ( | RtMoreTests | , |
| RTFrameStatusAccessorsCoverAllBits | |||
| ) |
Definition at line 108 of file test_rtMore.cpp.
References profinet::rt::DATA_STATUS_PROVIDER_RUN, profinet::rt::DATA_STATUS_STATE, profinet::rt::DATA_STATUS_STATION_OK, profinet::rt::DATA_STATUS_VALID, and frame.
| TEST_F | ( | RtMoreTests | , |
| RTFrameToStringIsNonEmpty | |||
| ) |
Definition at line 163 of file test_rtMore.cpp.