|
PROFINET IO Controller Stack 1.0.0
Modern C++ implementation of a PROFINET IO Controller stack
|
Tests for the Asio-backed Linux raw Ethernet socket. More...
#include <gtest/gtest.h>#include <asio.hpp>#include <chrono>#include <cstdint>#include <cstdlib>#include <memory>#include <optional>#include <thread>#include <vector>#include "profinet/asioEthernetSocket.h"#include "profinet/exceptions.h"#include "profinet/protocol.h"#include "profinet/util.h"
Include dependency graph for test_asioEthernetSocket.cpp:Go to the source code of this file.
Functions | |
| TEST_F (AsioEthernetSocketTests, ConstructorRejectsUnknownInterface) | |
| TEST_F (AsioEthernetSocketTests, ConstructorAcceptsEthernetInterface) | |
| TEST_F (AsioEthernetSocketTests, ConstructorAcceptsSpecificEtherType) | |
| TEST_F (AsioEthernetSocketTests, SetTimeoutAcceptsFiniteDuration) | |
| TEST_F (AsioEthernetSocketTests, RecvReturnsEmptyFrameOnTimeout) | |
| TEST_F (AsioEthernetSocketTests, RecvUsesExternallyDrivenIoContext) | |
| TEST_F (AsioEthernetSocketTests, InjectedEthernetFrameCanBeCapturedByPeer) | |
| TEST_F (AsioEthernetSocketTests, EtherTypeFilterAcceptsVlanTaggedFrame) | |
| TEST_F (AsioEthernetSocketTests, UnicastFrameCanBeReceivedByPeer) | |
| TEST_F (AsioEthernetSocketTests, ConcurrentUnicastFrameCanBeReceivedByPeer) | |
| TEST_F (AsioEthernetSocketTests, PeerCanReceiveAndRespondToController) | |
Tests for the Asio-backed Linux raw Ethernet socket.
These tests exercise socket creation, interface validation, timeout handling, and asynchronous send operations. The tests use the Linux loopback interface so they do not depend on a physical PROFINET device.
Creating an AF_PACKET socket requires CAP_NET_RAW.
Definition in file test_asioEthernetSocket.cpp.
| TEST_F | ( | AsioEthernetSocketTests | , |
| ConcurrentUnicastFrameCanBeReceivedByPeer | |||
| ) |
Definition at line 315 of file test_asioEthernetSocket.cpp.
References frame, ioContext, profinet::AsioEthernetSocket::Recv(), profinet::AsioEthernetSocket::Send(), and profinet::AsioEthernetSocket::SetTimeout().
Here is the call graph for this function:| TEST_F | ( | AsioEthernetSocketTests | , |
| ConstructorAcceptsEthernetInterface | |||
| ) |
Definition at line 131 of file test_asioEthernetSocket.cpp.
References ioContext.
| TEST_F | ( | AsioEthernetSocketTests | , |
| ConstructorAcceptsSpecificEtherType | |||
| ) |
Definition at line 144 of file test_asioEthernetSocket.cpp.
References ioContext, and profinet::PROFINET_ETHERTYPE.
| TEST_F | ( | AsioEthernetSocketTests | , |
| ConstructorRejectsUnknownInterface | |||
| ) |
Definition at line 125 of file test_asioEthernetSocket.cpp.
References ioContext.
| TEST_F | ( | AsioEthernetSocketTests | , |
| EtherTypeFilterAcceptsVlanTaggedFrame | |||
| ) |
Definition at line 245 of file test_asioEthernetSocket.cpp.
References frame, ioContext, profinet::PROFINET_ETHERTYPE, profinet::AsioEthernetSocket::Recv(), profinet::AsioEthernetSocket::Send(), and profinet::AsioEthernetSocket::SetTimeout().
Here is the call graph for this function:| TEST_F | ( | AsioEthernetSocketTests | , |
| InjectedEthernetFrameCanBeCapturedByPeer | |||
| ) |
Definition at line 216 of file test_asioEthernetSocket.cpp.
References frame, ioContext, profinet::AsioEthernetSocket::Recv(), profinet::AsioEthernetSocket::Send(), and profinet::AsioEthernetSocket::SetTimeout().
Here is the call graph for this function:| TEST_F | ( | AsioEthernetSocketTests | , |
| PeerCanReceiveAndRespondToController | |||
| ) |
Definition at line 350 of file test_asioEthernetSocket.cpp.
References controller, ioContext, profinet::AsioEthernetSocket::Recv(), profinet::AsioEthernetSocket::Send(), and profinet::AsioEthernetSocket::SetTimeout().
Here is the call graph for this function:| TEST_F | ( | AsioEthernetSocketTests | , |
| RecvReturnsEmptyFrameOnTimeout | |||
| ) |
Definition at line 174 of file test_asioEthernetSocket.cpp.
References ioContext, profinet::AsioEthernetSocket::Recv(), and profinet::AsioEthernetSocket::SetTimeout().
Here is the call graph for this function:| TEST_F | ( | AsioEthernetSocketTests | , |
| RecvUsesExternallyDrivenIoContext | |||
| ) |
Definition at line 194 of file test_asioEthernetSocket.cpp.
References ioContext, profinet::AsioEthernetSocket::Recv(), and profinet::AsioEthernetSocket::SetTimeout().
Here is the call graph for this function:| TEST_F | ( | AsioEthernetSocketTests | , |
| SetTimeoutAcceptsFiniteDuration | |||
| ) |
Definition at line 158 of file test_asioEthernetSocket.cpp.
References ioContext, and profinet::AsioEthernetSocket::SetTimeout().
Here is the call graph for this function:| TEST_F | ( | AsioEthernetSocketTests | , |
| UnicastFrameCanBeReceivedByPeer | |||
| ) |
Definition at line 285 of file test_asioEthernetSocket.cpp.
References frame, ioContext, profinet::AsioEthernetSocket::Recv(), profinet::AsioEthernetSocket::Send(), and profinet::AsioEthernetSocket::SetTimeout().
Here is the call graph for this function: