|
PROFINET IO Controller Stack 1.0.0
Modern C++ implementation of a PROFINET IO Controller stack
|
GoogleMock implementation of IUdpSocket. More...
#include <mockUdpSocket.h>
Inheritance diagram for MockUdpSocket:
Collaboration diagram for MockUdpSocket:Public Member Functions | |
| MOCK_METHOD (profinet::UdpDatagram, RecvFrom,(std::size_t maxLen),(override)) | |
| Mock UDP datagram reception. | |
| 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. | |
Public Member Functions inherited from profinet::IUdpSocket | |
| virtual | ~IUdpSocket ()=default |
| Virtual destructor for polymorphic use. | |
| virtual UdpDatagram | RecvFrom (std::size_t maxLen)=0 |
| Receive one UDP datagram and its source endpoint. | |
| virtual void | SendTo (const std::vector< std::uint8_t > &data, const UdpEndpoint &destination)=0 |
| Send a UDP datagram to a specific IPv4 endpoint. | |
| virtual void | SetTimeout (std::chrono::milliseconds timeout)=0 |
| Set the UDP receive timeout. | |
GoogleMock implementation of IUdpSocket.
Used by unit tests in place of the production UDP socket. No UDP port needs to be available and no network communication takes place.
Definition at line 46 of file mockUdpSocket.h.
| MockUdpSocket::MOCK_METHOD | ( | profinet::UdpDatagram | , |
| RecvFrom | , | ||
| (std::size_t maxLen) | , | ||
| (override) | |||
| ) |
Mock UDP datagram reception.
| MockUdpSocket::MOCK_METHOD | ( | void | , |
| SendTo | , | ||
| (const std::vector< std::uint8_t > &data, const profinet::UdpEndpoint &destination) | , | ||
| (override) | |||
| ) |
Mock UDP datagram transmission.
| MockUdpSocket::MOCK_METHOD | ( | void | , |
| SetTimeout | , | ||
| (std::chrono::milliseconds timeout) | , | ||
| (override) | |||
| ) |
Mock UDP receive-timeout configuration.