|
PROFINET IO Controller Stack 1.0.0
Modern C++ implementation of a PROFINET IO Controller stack
|
Abstract interface for raw Ethernet frame transport. More...
#include <IRawEthernetSocket.h>
Inheritance diagram for profinet::IRawEthernetSocket:
Collaboration diagram for profinet::IRawEthernetSocket:Public Member Functions | |
| virtual | ~IRawEthernetSocket ()=default |
| Virtual destructor for polymorphic use. | |
| virtual void | Send (const std::vector< std::uint8_t > &frame) const =0 |
| Send one complete raw Ethernet frame. | |
| virtual std::vector< std::uint8_t > | Recv () const =0 |
| Receive one raw Ethernet frame. | |
| virtual void | SetTimeout (std::chrono::milliseconds timeout) const =0 |
| Set the receive timeout. | |
Abstract interface for raw Ethernet frame transport.
Provides the minimal transport functionality required by the PROFINET protocol layers.
Implementations are responsible for transmitting and receiving complete Ethernet frames. The protocol layer does not need to know whether the implementation uses Linux AF_PACKET, another operating-system mechanism, or an in-memory test implementation.
The interface operates on byte spans to avoid imposing ownership or allocation requirements on the transport layer.
Definition at line 42 of file IRawEthernetSocket.h.
|
virtualdefault |
Virtual destructor for polymorphic use.
|
pure virtual |
Receive one raw Ethernet frame.
Waits for and returns a complete Ethernet frame received from the underlying raw socket.
The returned frame starts at the first byte of the Ethernet header. VLAN tags, when present, remain part of the returned frame and are therefore available to the PROFINET parser.
| std::system_error | When the underlying socket reports a receive error. |
Implemented in profinet::EthernetSocket.
Referenced by profinet::dcp::RecvSetResponse().
Here is the caller graph for this function:
|
pure virtual |
Send one complete raw Ethernet frame.
Transmits the complete Ethernet frame supplied by the caller. The frame includes all Ethernet-level headers and protocol payload.
Depending on the caller, this may include:
| frame | Complete Ethernet frame to transmit. |
| std::system_error | When the underlying socket reports a transmission error, if the concrete implementation uses exception-based error reporting. |
Implemented in profinet::EthernetSocket.
|
pure virtual |
Set the receive timeout.
| timeout | Timeout duration; a zero duration blocks forever. |
Sets SO_RCVTIMEO. Marked const: this only changes a kernel-side socket option, not the object's own identity, which lets read-only call sites keep a const&.
Implemented in profinet::EthernetSocket.
Referenced by profinet::dcp::RecvSetResponse().
Here is the caller graph for this function: