PROFINET IO Controller Stack 1.0.0
Modern C++ implementation of a PROFINET IO Controller stack
Loading...
Searching...
No Matches
mockRawEthernetSocket.h
Go to the documentation of this file.
1
16
17#pragma once
18
19#include <gmock/gmock.h>
20
21#include <cstdint>
22#include <span>
23
25
41{
42 public:
44 MOCK_METHOD(void, Send, (const std::vector<std::uint8_t>& frame), (override));
45
47 MOCK_METHOD(std::vector<std::uint8_t>, Recv, (), (override));
48
50 MOCK_METHOD(void, SetTimeout, (std::chrono::milliseconds timeout), (override));
51};
Abstraction for sending and receiving raw Ethernet frames.
GoogleMock implementation of IRawEthernetSocket.
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.
MOCK_METHOD(void, Send,(const std::vector< std::uint8_t > &frame),(override))
Mocked raw Ethernet frame transmission operation.
Abstract interface for raw Ethernet frame transport.
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.
Bytes frame