PROFINET IO Controller Stack 1.0.0
Modern C++ implementation of a PROFINET IO Controller stack
Loading...
Searching...
No Matches
profinet::AlarmListenerUdpTest Class Reference

Test fixture for UDP AlarmListener behavior. More...

+ Inheritance diagram for profinet::AlarmListenerUdpTest:
+ Collaboration diagram for profinet::AlarmListenerUdpTest:

Protected Member Functions

void SetUp () override
 Construct an AlarmListener configured for UDP transport.
 
UdpEndpoint SourceAddress () const
 Build the source endpoint used for the injected UDP datagram.
 

Protected Attributes

std::unique_ptr< asio::io_context > ioContext
 
AlarmEndpoint endpoint
 
std::unique_ptr< AlarmListener > listener
 

Detailed Description

Test fixture for UDP AlarmListener behavior.

Injects IUdpSocket through AlarmListener::Start() and synchronizes with the listener callback so tests do not depend on arbitrary sleep durations.

Definition at line 106 of file test_alarmListenerUdp.cpp.

Member Function Documentation

◆ SetUp()

void profinet::AlarmListenerUdpTest::SetUp ( )
inlineoverrideprotected

◆ SourceAddress()

UdpEndpoint profinet::AlarmListenerUdpTest::SourceAddress ( ) const
inlineprotected

Build the source endpoint used for the injected UDP datagram.

Returns
Test UDP source endpoint.

Definition at line 123 of file test_alarmListenerUdp.cpp.

Member Data Documentation

◆ endpoint

AlarmEndpoint profinet::AlarmListenerUdpTest::endpoint
protected

Definition at line 129 of file test_alarmListenerUdp.cpp.

Referenced by SetUp().

◆ ioContext

std::unique_ptr<asio::io_context> profinet::AlarmListenerUdpTest::ioContext
protected

Definition at line 127 of file test_alarmListenerUdp.cpp.

Referenced by SetUp().

◆ listener

std::unique_ptr<AlarmListener> profinet::AlarmListenerUdpTest::listener
protected

Definition at line 130 of file test_alarmListenerUdp.cpp.

Referenced by SetUp().


The documentation for this class was generated from the following file: