|
PROFINET IO Controller Stack 1.0.0
Modern C++ implementation of a PROFINET IO Controller stack
|
Golden cyclic-I/O regression tests backed by Wireshark PCAPNG captures. More...
#include <gtest/gtest.h>#include <algorithm>#include <array>#include <condition_variable>#include <cstdint>#include <filesystem>#include <fstream>#include <functional>#include <iterator>#include <memory>#include <mutex>#include <numeric>#include <optional>#include <stdexcept>#include <string>#include <tuple>#include <utility>#include <vector>#include "mocks/mockRawEthernetSocket.h"#include "profinet/cyclic.h"#include "profinet/gsdml.h"#include "profinet/protocol.h"#include "profinet/rpc.h"#include "profinet/rt.h"#include "profinet/util.h"#include "stubs/stubRpcTransport.h"
Include dependency graph for test_cyclicCapture.cpp:Go to the source code of this file.
Namespaces | |
| namespace | profinet |
| namespace | profinet::CyclicCaptureTests |
Functions | |
| profinet::CyclicCaptureTests::TEST (CyclicCaptureTests, PhoenixToAumaCaptureHasExpectedCyclicContract) | |
| profinet::CyclicCaptureTests::TEST (CyclicCaptureTests, SetValveOpenContainsOneSecondOpenCommand) | |
| profinet::CyclicCaptureTests::TEST (CyclicCaptureTests, SetValveCloseContainsOneSecondCloseCommand) | |
| profinet::CyclicCaptureTests::TEST (CyclicCaptureTests, CapturesUseExpectedPhoenixAndAumaMacAddresses) | |
| profinet::CyclicCaptureTests::TEST (CyclicCaptureTests, EveryCapturedCyclicRtFrameRoundTrips) | |
| profinet::CyclicCaptureTests::TEST (CyclicCaptureTests, AumaGsdmlMatchesCapturedProcessData) | |
| profinet::CyclicCaptureTests::TEST (CyclicCaptureTests, PhoenixGsdmlMatchesCapturedControllerIdentity) | |
| profinet::CyclicCaptureTests::TEST (CyclicCaptureTests, CommandByteIsAtEthernetByteTwentyFive) | |
| profinet::CyclicCaptureTests::TEST (CyclicCaptureTests, AumaGsdmlResolvesCompletePhoenixAumaSlotSet) | |
| profinet::CyclicCaptureTests::TEST (CyclicCaptureTests, DISABLED_BuildIocrConfigsMatchesPhoenixAumaWireLayout) | |
| profinet::CyclicCaptureTests::TEST (CyclicCaptureTests, DISABLED_WIPRtBuildIocrConfigsMatchesPhoenixAumaWireLayout) | |
| profinet::CyclicCaptureTests::TEST (CyclicCaptureTests, CyclicControllerTransmitsCapturedCloseCommand) | |
| profinet::CyclicCaptureTests::TEST (CyclicCaptureTests, CyclicControllerReceivesCapturedAumaPosition) | |
| profinet::CyclicCaptureTests::TEST (CyclicCaptureTests, DISABLED_BuildInputIocrBlockMatchesPhoenixAumaCapture) | |
| profinet::CyclicCaptureTests::TEST (CyclicCaptureTests, DISABLED_BuildOutputIocrBlockMatchesPhoenixAumaCapture) | |
| profinet::CyclicCaptureTests::TEST (CyclicCaptureTests, BuildExpectedSubmoduleBlocksMatchPhoenixAumaCapture) | |
Golden cyclic-I/O regression tests backed by Wireshark PCAPNG captures.
These tests use the real Layer-2 captures produced while a Phoenix AXC F 1252 and an AUMA SGx exchanged PROFINET RT cyclic data.
The captures are intentionally treated as the wire-level golden reference:
Definition in file test_cyclicCapture.cpp.
| std::vector<CapturedPacket> aumaToPhoenix |
Definition at line 91 of file test_cyclicCapture.cpp.
|
private |
Definition at line 769 of file test_cyclicCapture.cpp.
|
private |
Definition at line 760 of file test_cyclicCapture.cpp.
Referenced by profinet::cyclic::CyclicControllerTestAccess::FirstOutputByte(), profinet::cyclic::CyclicControllerTestAccess::FirstOutputIocs(), profinet::cyclic::CyclicControllerTestAccess::HandleWatchdogTimeout(), profinet::cyclic::CyclicControllerTestAccess::InputObject(), profinet::cyclic::CyclicControllerTestAccess::IocsGood(), profinet::cyclic::CyclicControllerTestAccess::ProcessInputFrame(), profinet::cyclic::CyclicControllerTestAccess::ResetRxSocket(), profinet::cyclic::CyclicControllerTestAccess::ResetTxSocket(), profinet::cyclic::CyclicControllerTestAccess::RxLoop(), profinet::sim::VirtualProfinetRpcDevice::SendApplicationReady(), profinet::cyclic::CyclicControllerTestAccess::SendOutputFrame(), profinet::cyclic::CyclicControllerTestAccess::SendStopFrames(), profinet::cyclic::CyclicControllerTestAccess::SetAllOutputIocs(), profinet::cyclic::CyclicControllerTestAccess::SetIocsGood(), profinet::cyclic::CyclicControllerTestAccess::SetMaxConsecutiveTimeouts(), profinet::cyclic::CyclicControllerTestAccess::SetRunning(), profinet::cyclic::CyclicControllerTestAccess::SetRxCounterStep(), profinet::cyclic::CyclicControllerTestAccess::SetRxSock(), profinet::cyclic::CyclicControllerTestAccess::SetState(), profinet::cyclic::CyclicControllerTestAccess::SetTxSock(), profinet::device::ProfinetDevice::StartCyclic(), profinet::cyclic::CyclicControllerTestAccess::Stats(), profinet::cyclic::CyclicControllerTestAccess::SwapOutputBuilder(), profinet::CyclicCaptureTests::TEST(), TEST(), TEST(), TEST(), TEST(), TEST_F(), profinet::cyclic::TEST_F(), profinet::cyclic::TEST_F(), profinet::cyclic::TEST_F(), profinet::cyclic::TEST_F(), profinet::cyclic::TEST_F(), profinet::cyclic::TEST_F(), profinet::cyclic::TEST_F(), profinet::cyclic::TEST_F(), profinet::cyclic::TEST_F(), profinet::cyclic::TEST_F(), profinet::cyclic::TEST_F(), profinet::cyclic::TEST_F(), profinet::cyclic::TEST_F(), profinet::cyclic::TEST_F(), profinet::cyclic::TEST_F(), profinet::cyclic::TEST_F(), profinet::cyclic::TEST_F(), profinet::cyclic::TEST_F(), profinet::cyclic::TEST_F(), profinet::cyclic::TEST_F(), profinet::cyclic::TEST_F(), profinet::cyclic::TEST_F(), profinet::cyclic::TEST_F(), profinet::cyclic::TEST_F(), profinet::cyclic::TEST_F(), profinet::cyclic::TEST_F(), profinet::cyclic::TEST_F(), profinet::cyclic::TEST_F(), profinet::cyclic::TEST_F(), profinet::cyclic::TEST_F(), profinet::cyclic::TEST_F(), profinet::cyclic::TEST_F(), profinet::cyclic::TEST_F(), profinet::cyclic::TEST_F(), profinet::cyclic::TEST_F(), profinet::cyclic::TEST_F(), profinet::cyclic::TEST_F(), profinet::cyclic::TEST_F(), profinet::cyclic::TEST_F(), profinet::cyclic::TEST_F(), profinet::cyclic::TEST_F(), profinet::cyclic::TEST_F(), profinet::cyclic::TEST_F(), profinet::cyclic::TEST_F(), profinet::cyclic::TEST_F(), profinet::cyclic::TEST_F(), profinet::cyclic::TEST_F(), profinet::cyclic::TEST_F(), profinet::cyclic::TEST_F(), profinet::cyclic::TEST_F(), profinet::cyclic::TEST_F(), profinet::cyclic::TEST_F(), profinet::cyclic::TEST_F(), profinet::cyclic::TEST_F(), profinet::cyclic::TEST_F(), profinet::cyclic::TEST_F(), profinet::cyclic::TEST_F(), profinet::cyclic::TEST_F(), profinet::cyclic::TEST_F(), profinet::cyclic::TEST_F(), profinet::cyclic::TEST_F(), profinet::cyclic::TEST_F(), profinet::cyclic::TEST_F(), profinet::cyclic::TEST_F(), profinet::cyclic::TEST_F(), profinet::cyclic::TEST_F(), profinet::cyclic::TEST_F(), profinet::cyclic::TEST_F(), profinet::cyclic::TEST_F(), profinet::cyclic::TEST_F(), profinet::cyclic::TEST_F(), profinet::cyclic::TEST_F(), profinet::cyclic::TEST_F(), profinet::cyclic::TEST_F(), profinet::cyclic::TEST_F(), profinet::cyclic::TEST_F(), profinet::cyclic::TEST_F(), profinet::cyclic::TEST_F(), profinet::cyclic::TEST_F(), profinet::cyclic::TEST_F(), profinet::cyclic::TEST_F(), profinet::cyclic::TEST_F(), profinet::cyclic::TEST_F(), profinet::device::TEST_F(), profinet::cyclic::CyclicControllerTestAccess::TrackCycleCounter(), profinet::cyclic::CyclicControllerTestAccess::Transition(), profinet::cyclic::CyclicControllerTestAccess::TxCycle(), and profinet::cyclic::CyclicControllerTestAccess::TxLoop().
| Bytes frame |
Definition at line 85 of file test_cyclicCapture.cpp.
Referenced by profinet::cyclic::ReceivedIopsTest::BuildInputFrame(), profinet::AsioEthernetSocket::EthernetPacketBackend::CaptureNextFrame(), profinet::AsioEthernetSocket::EthernetPacketBackend::CompleteHandler(), profinet::sim::InMemoryEthernetSocket::Enqueue(), profinet::AlarmListenerRtaTest::Feed(), profinet::AlarmListenerRtaIntegrationTest::Feed(), profinet::AlarmListenerCallbackTest::Feed(), profinet::cyclic::CyclicControllerTestAccess::FirstOutputIocs(), profinet::AsioEthernetSocket::EthernetPacketBackend::HandlePacketReady(), profinet::rt::RtFrameTest::MakeFrame(), profinet::EthernetPacketBackendTestFixture::MatchesEtherType(), profinet::AsioEthernetSocket::EthernetPacketBackend::MatchesEtherType(), profinet::sim::VirtualAumaValve::NotifyFrame(), profinet::AlarmListenerRtaTest::ParseSentFrame(), profinet::cyclic::CyclicController::ProcessInputFrame(), profinet::sim::VirtualAumaValve::ProcessOutputFrame(), profinet::sim::InMemoryEthernetSocket::Recv(), profinet::sim::VirtualAumaValve::Run(), profinet::AsioEthernetSocket::EthernetPacketBackend::Send(), profinet::AsioEthernetSocket::Send(), profinet::sim::InMemoryEthernetSocket::Send(), profinet::sim::VirtualAumaValve::SendInputFrame(), profinet::cyclic::CyclicController::SendOutputFrame(), profinet::AlarmListener::SendRtaFrame(), profinet::dcp::SetParam(), profinet::dcp::SignalDevice(), profinet::SkipVlanTags(), profinet::CyclicCaptureTests::TEST(), profinet::CyclicCaptureTests::TEST(), profinet::CyclicCaptureTests::TEST(), profinet::dcp::TEST(), profinet::dcp::TEST(), profinet::dcp::TEST(), profinet::dcp::TEST(), profinet::dcp::TEST(), profinet::dcp::TEST(), profinet::dcp::TEST(), profinet::dcp::TEST(), profinet::dcp::TEST(), profinet::dcp::TEST(), profinet::dcp::TEST(), profinet::dcp::TEST(), profinet::dcp::TEST(), profinet::dcp::TEST(), profinet::dcp::TEST(), profinet::dcp::TEST(), profinet::dcp::TEST(), profinet::dcp::TEST(), profinet::dcp::TEST(), profinet::dcp::TEST(), profinet::dcp::TEST(), profinet::dcp::TEST(), profinet::dcp::TEST(), profinet::dcp::TEST(), profinet::dcp::TEST(), profinet::dcp::TEST(), profinet::dcp::TEST(), profinet::sim::TEST(), profinet::sim::TEST(), profinet::sim::TEST(), profinet::sim::TEST(), profinet::TEST(), profinet::sim::TEST(), profinet::sim::TEST(), profinet::sim::TEST(), profinet::sim::TEST(), profinet::sim::TEST(), profinet::sim::TEST(), profinet::sim::TEST(), profinet::sim::TEST(), profinet::TEST_F(), profinet::TEST_F(), profinet::TEST_F(), profinet::TEST_F(), profinet::TEST_F(), profinet::TEST_F(), profinet::TEST_F(), profinet::TEST_F(), profinet::TEST_F(), profinet::TEST_F(), profinet::TEST_F(), profinet::TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), profinet::cyclic::TEST_F(), profinet::cyclic::TEST_F(), profinet::cyclic::TEST_F(), TEST_F(), profinet::dcp::TEST_F(), profinet::dcp::TEST_F(), profinet::dcp::TEST_F(), profinet::dcp::TEST_F(), profinet::dcp::TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), profinet::rpc::TEST_F(), profinet::rt::TEST_F(), profinet::rt::TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), profinet::TEST_F(), profinet::TEST_F(), profinet::TEST_F(), profinet::TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), and profinet::sim::InMemoryEthernetBus::Transmit().
|
private |
Shared ASIO context.
Definition at line 774 of file test_cyclicCapture.cpp.
Referenced by profinet::sim::VirtualProfinetLab::Connect(), profinet::sim::VirtualPhoenixPlc::Connect(), profinet::cyclic::CyclicTest::MakeController(), profinet::cyclic::CyclicControllerConformanceTest::MakeController(), profinet::cyclic::CyclicStateTests::MakeController(), profinet::cyclic::CyclicStatsTests::MakeController(), profinet::cyclic::ReceivedIopsTest::MakeController(), profinet::UdpSocket::operator=(), profinet::device::DcpScanner::Scan(), profinet::cyclic::CyclicTest::StartControllerWithBlockedReceive(), profinet::sim::TEST(), profinet::sim::TEST(), profinet::sim::TEST(), profinet::sim::TEST(), profinet::sim::TEST(), profinet::sim::TEST(), profinet::sim::TEST(), profinet::sim::TEST(), profinet::sim::TEST(), profinet::TEST_F(), profinet::TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), profinet::cyclic::TEST_F(), profinet::cyclic::TEST_F(), profinet::cyclic::TEST_F(), profinet::cyclic::TEST_F(), profinet::cyclic::TEST_F(), profinet::cyclic::TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), and TEST_F().
|
mutableprivate |
Definition at line 768 of file test_cyclicCapture.cpp.
Referenced by profinet::sim::TEST().
| std::vector<CapturedPacket> phoenixToAuma |
Definition at line 90 of file test_cyclicCapture.cpp.
|
private |
Definition at line 763 of file test_cyclicCapture.cpp.
Referenced by profinet::cyclic::CyclicController::Start(), profinet::sim::TEST(), TEST(), TEST(), TEST(), profinet::cyclic::TEST_F(), profinet::cyclic::TEST_F(), profinet::cyclic::TEST_F(), profinet::cyclic::TEST_F(), and profinet::cyclic::TEST_F().
|
private |
Definition at line 770 of file test_cyclicCapture.cpp.
|
private |
Definition at line 766 of file test_cyclicCapture.cpp.
Referenced by profinet::sim::VirtualPhoenixPlc::Connect(), profinet::cyclic::CyclicTest::StartControllerWithBlockedReceive(), and profinet::cyclic::TEST_F().
|
private |
Definition at line 771 of file test_cyclicCapture.cpp.
| std::uint64_t timestampNs = 0U |
Definition at line 84 of file test_cyclicCapture.cpp.
|
private |
Definition at line 762 of file test_cyclicCapture.cpp.
Referenced by profinet::cyclic::CyclicController::Start(), profinet::sim::TEST(), TEST(), TEST(), TEST(), profinet::cyclic::TEST_F(), profinet::cyclic::TEST_F(), profinet::cyclic::TEST_F(), profinet::cyclic::TEST_F(), profinet::cyclic::TEST_F(), profinet::cyclic::TEST_F(), profinet::cyclic::TEST_F(), and profinet::cyclic::TEST_F().
|
private |
Definition at line 765 of file test_cyclicCapture.cpp.
Referenced by profinet::sim::VirtualPhoenixPlc::Connect(), profinet::cyclic::TEST_F(), profinet::cyclic::TEST_F(), and profinet::cyclic::TEST_F().