|
PROFINET IO Controller Stack 1.0.0
Modern C++ implementation of a PROFINET IO Controller stack
|
Test fixture for AlarmListener callback behavior. More...
Inheritance diagram for profinet::AlarmListenerCallbackTest:
Collaboration diagram for profinet::AlarmListenerCallbackTest:Protected Member Functions | |
| void | SetUp () override |
| Construct the listener with a mocked Layer 2 transport. | |
| void | Feed (Bytes frame) |
| Inject one Ethernet frame into the listener. | |
Protected Attributes | |
| std::unique_ptr< testing::StrictMock< MockRawEthernetSocket > > | socket |
| Mock Ethernet transport pointer owned by the listener. | |
| StrictMock< MockRawEthernetSocket > * | mockSocket = nullptr |
| Mock Ethernet transport owned by the listener. | |
| std::unique_ptr< AlarmListener > | listener |
| Listener under test. | |
| std::unique_ptr< asio::io_context > | ioContext |
| Shared ASIO context. | |
Test fixture for AlarmListener callback behavior.
Verifies registration, dispatch and callback exception isolation.
Definition at line 372 of file test_alarmListenerRta.cpp.
|
inlineprotected |
Inject one Ethernet frame into the listener.
| frame | Complete Ethernet frame. |
Definition at line 395 of file test_alarmListenerRta.cpp.
References frame, profinet::AlarmListenerTestAccess::HandleLayer2Frame(), listener, and mockSocket.
Here is the call graph for this function:
|
inlineoverrideprotected |
Construct the listener with a mocked Layer 2 transport.
Definition at line 376 of file test_alarmListenerRta.cpp.
References profinet::AlarmEndpoint::controllerRef, profinet::AlarmEndpoint::deviceMac, profinet::AlarmEndpoint::deviceRef, profinet::AlarmEndpoint::interface, ioContext, listener, mockSocket, profinet::AlarmListenerTestAccess::SetSock(), socket, and profinet::AlarmEndpoint::transport.
Here is the call graph for this function:
|
protected |
Shared ASIO context.
Definition at line 411 of file test_alarmListenerRta.cpp.
Referenced by SetUp().
|
protected |
Listener under test.
Definition at line 408 of file test_alarmListenerRta.cpp.
|
protected |
Mock Ethernet transport owned by the listener.
Definition at line 405 of file test_alarmListenerRta.cpp.
|
protected |
Mock Ethernet transport pointer owned by the listener.
Definition at line 402 of file test_alarmListenerRta.cpp.
Referenced by SetUp().