PROFINET IO Controller Stack 1.0.0
Modern C++ implementation of a PROFINET IO Controller stack
Loading...
Searching...
No Matches
test_alarmListenerUdp.cpp File Reference

UDP transport tests for the PROFINET AlarmListener. More...

#include <gmock/gmock.h>
#include <gtest/gtest.h>
#include <atomic>
#include <chrono>
#include <condition_variable>
#include <cstdint>
#include <memory>
#include <mutex>
#include <vector>
#include "mocks/mockUdpSocket.h"
#include "profinet/alarmListener.h"
#include "profinet/protocol.h"
#include "profinet/wire.h"
+ Include dependency graph for test_alarmListenerUdp.cpp:

Go to the source code of this file.

Classes

class  profinet::AlarmListenerUdpTest
 Test fixture for UDP AlarmListener behavior. More...
 

Namespaces

namespace  profinet
 

Functions

 profinet::TEST_F (AlarmListenerUdpTest, ReceivesAlarmAndSendsAckToSource)
 
 profinet::TEST_F (AlarmListenerUdpTest, IgnoresTooShortUdpPayload)
 
 profinet::TEST_F (AlarmListenerUdpTest, StartWhileRunningDoesNothing)
 
 profinet::TEST_F (AlarmListenerUdpTest, StopBeforeStartIsSafe)
 

Detailed Description

UDP transport tests for the PROFINET AlarmListener.

Verifies UDP alarm reception, source endpoint propagation, AlarmAck transmission, lifecycle handling, and rejection of invalid UDP payloads.

The tests use MockUdpSocket so that AlarmListener itself never needs to create an operating-system UDP socket.

Definition in file test_alarmListenerUdp.cpp.