PROFINET IO Controller Stack 1.0.0
Modern C++ implementation of a PROFINET IO Controller stack
Loading...
Searching...
No Matches
IRawEthernetSocket.h
Go to the documentation of this file.
1
16
17#pragma once
18
19#include <chrono>
20#include <cstdint>
21#include <vector>
22
23namespace profinet
24{
43{
44 public:
46 virtual ~IRawEthernetSocket() = default;
47
66 virtual void Send(const std::vector<std::uint8_t>& frame) const = 0;
67
85 [[nodiscard]] virtual std::vector<std::uint8_t> Recv() const = 0;
86
92 virtual void SetTimeout(std::chrono::milliseconds timeout) const = 0;
93};
94} // namespace profinet
Abstract interface for raw Ethernet frame transport.
virtual void SetTimeout(std::chrono::milliseconds timeout) const =0
Set the receive timeout.
virtual std::vector< std::uint8_t > Recv() const =0
Receive one raw Ethernet frame.
virtual void Send(const std::vector< std::uint8_t > &frame) const =0
Send one complete raw Ethernet frame.
virtual ~IRawEthernetSocket()=default
Virtual destructor for polymorphic use.