|
PROFINET IO Controller Stack 1.0.0
Modern C++ implementation of a PROFINET IO Controller stack
|
Live Ethernet integration tests for DCP using AsioEthernetSocket. More...
#include <gtest/gtest.h>#include <array>#include <asio.hpp>#include <cstdint>#include <exception>#include <string>#include <thread>#include <vector>#include "profinet/AsioIoContextRunner.h"#include "profinet/asioEthernetSocket.h"#include "profinet/dcp.h"#include "profinet/exceptions.h"#include "profinet/protocol.h"
Include dependency graph for test_dcp_asioIntegration.cpp:Go to the source code of this file.
Macros | |
| #define | PROFINET_TEST_INTERFACE "" |
Functions | |
| TEST_F (DcpAsioIntegrationTests, SendDiscoverTransmitsIdentifyRequest) | |
| TEST_F (DcpAsioIntegrationTests, ReadResponseParsesAsioEthernetFrame) | |
| TEST_F (DcpAsioIntegrationTests, ReadResponseParsesVlanTaggedAsioEthernetFrame) | |
| TEST_F (DcpAsioIntegrationTests, GetParamPerformsAsioRoundTrip) | |
Live Ethernet integration tests for DCP using AsioEthernetSocket.
Exercises the DCP protocol implementation together with the real Ethernet packet transport. The transport is intentionally independent of the operating-system packet API.
Set PROFINET_TEST_INTERFACE to select the Ethernet interface used by these tests.
Definition in file test_dcp_asioIntegration.cpp.
| #define PROFINET_TEST_INTERFACE "" |
Definition at line 32 of file test_dcp_asioIntegration.cpp.
| TEST_F | ( | DcpAsioIntegrationTests | , |
| GetParamPerformsAsioRoundTrip | |||
| ) |
DCP::GetParam() -> request transmitted -> peer receives request -> peer sends response -> controller receives matching response -> parameter returned More valueable then only AsioEthernetSocket::Send()
Definition at line 322 of file test_dcp_asioIntegration.cpp.
References profinet::PNDCPHeader::frameId, profinet::dcp::GetParam(), profinet::PNDCPHeader::length, profinet::Mac2String(), profinet::EthernetHeader::Parse(), profinet::PNDCPHeader::Parse(), profinet::PNDCPHeader::payload, profinet::PROFINET_ETHERTYPE, profinet::PNDCPHeader::serviceId, profinet::PNDCPHeader::serviceType, and profinet::PNDCPHeader::xId.
Here is the call graph for this function:| TEST_F | ( | DcpAsioIntegrationTests | , |
| ReadResponseParsesAsioEthernetFrame | |||
| ) |
Definition at line 261 of file test_dcp_asioIntegration.cpp.
References profinet::dcp::MakeBlockKey(), and profinet::dcp::ReadResponse().
Here is the call graph for this function:| TEST_F | ( | DcpAsioIntegrationTests | , |
| ReadResponseParsesVlanTaggedAsioEthernetFrame | |||
| ) |
Definition at line 288 of file test_dcp_asioIntegration.cpp.
References profinet::dcp::MakeBlockKey(), and profinet::dcp::ReadResponse().
Here is the call graph for this function:| TEST_F | ( | DcpAsioIntegrationTests | , |
| SendDiscoverTransmitsIdentifyRequest | |||
| ) |
Definition at line 195 of file test_dcp_asioIntegration.cpp.
References profinet::dcp::DEFAULT_RESPONSE_DELAY_FACTOR, frame, profinet::PNDCPHeader::Parse(), profinet::PROFINET_ETHERTYPE, and profinet::dcp::SendDiscover().
Here is the call graph for this function: