PROFINET IO Controller Stack 1.0.0
Modern C++ implementation of a PROFINET IO Controller stack
Loading...
Searching...
No Matches
mockUdpSocket.h
Go to the documentation of this file.
1
33#pragma once
34
35#include <gmock/gmock.h>
36
37#include "profinet/IUdpSocket.h"
38
47{
48 public:
50 MOCK_METHOD(profinet::UdpDatagram, RecvFrom, (std::size_t maxLen), (override));
51
53 MOCK_METHOD(void, SendTo, (const std::vector<std::uint8_t>& data, const profinet::UdpEndpoint& destination), (override));
54
56 MOCK_METHOD(void, SetTimeout, (std::chrono::milliseconds timeout), (override));
57};
Abstraction for IPv4 UDP datagram transport.
GoogleMock implementation of IUdpSocket.
MOCK_METHOD(void, SendTo,(const std::vector< std::uint8_t > &data, const profinet::UdpEndpoint &destination),(override))
Mock UDP datagram transmission.
MOCK_METHOD(void, SetTimeout,(std::chrono::milliseconds timeout),(override))
Mock UDP receive-timeout configuration.
MOCK_METHOD(profinet::UdpDatagram, RecvFrom,(std::size_t maxLen),(override))
Mock UDP datagram reception.
Abstract interface for IPv4 UDP datagram transport.
Definition IUdpSocket.h:99
virtual void SetTimeout(std::chrono::milliseconds timeout)=0
Set the UDP receive timeout.
virtual void SendTo(const std::vector< std::uint8_t > &data, const UdpEndpoint &destination)=0
Send a UDP datagram to a specific IPv4 endpoint.
virtual UdpDatagram RecvFrom(std::size_t maxLen)=0
Receive one UDP datagram and its source endpoint.
A UDP datagram together with the IPv4 address of its sender.
Definition IUdpSocket.h:65
Portable IPv4 UDP endpoint.
Definition IUdpSocket.h:42