|
PROFINET IO Controller Stack 1.0.0
Modern C++ implementation of a PROFINET IO Controller stack
|
GoogleMock implementation of IRawEthernetSocket. More...
#include <mockRawEthernetSocket.h>
Inheritance diagram for MockRawEthernetSocket:
Collaboration diagram for MockRawEthernetSocket:Public Member Functions | |
| MOCK_METHOD (void, Send,(const std::vector< std::uint8_t > &frame),(override)) | |
| Mocked raw Ethernet frame transmission operation. | |
| MOCK_METHOD (std::vector< std::uint8_t >, Recv,(),(override)) | |
| Mock raw Ethernet frame reception. | |
| MOCK_METHOD (void, SetTimeout,(std::chrono::milliseconds timeout),(override)) | |
| Mock receive-timeout configuration. | |
Public Member Functions inherited from profinet::IRawEthernetSocket | |
| virtual | ~IRawEthernetSocket ()=default |
| Virtual destructor for polymorphic use. | |
| virtual void | Send (const std::vector< std::uint8_t > &frame)=0 |
| Send one complete raw Ethernet frame. | |
| virtual std::vector< std::uint8_t > | Recv ()=0 |
| Receive one raw Ethernet frame. | |
| virtual void | SetTimeout (std::chrono::milliseconds timeout)=0 |
| Set the receive timeout. | |
GoogleMock implementation of IRawEthernetSocket.
Used by unit tests in place of the production raw Ethernet socket. No network interface or elevated socket privileges are required.
Example:
Definition at line 40 of file mockRawEthernetSocket.h.
| MockRawEthernetSocket::MOCK_METHOD | ( | std::vector< std::uint8_t > | , |
| Recv | , | ||
| () | , | ||
| (override) | |||
| ) |
Mock raw Ethernet frame reception.
| MockRawEthernetSocket::MOCK_METHOD | ( | void | , |
| Send | , | ||
| (const std::vector< std::uint8_t > &frame) | , | ||
| (override) | |||
| ) |
Mocked raw Ethernet frame transmission operation.
| MockRawEthernetSocket::MOCK_METHOD | ( | void | , |
| SetTimeout | , | ||
| (std::chrono::milliseconds timeout) | , | ||
| (override) | |||
| ) |
Mock receive-timeout configuration.