|
PROFINET IO Controller Stack 1.0.0
Modern C++ implementation of a PROFINET IO Controller stack
|
#include <cyclic_raw_ethernet_socket_stub.h>
Inheritance diagram for profinet::cyclic::test::LifetimeTrackingRawEthernetSocket:
Collaboration diagram for profinet::cyclic::test::LifetimeTrackingRawEthernetSocket:Public Member Functions | |
| LifetimeTrackingRawEthernetSocket (std::shared_ptr< LifetimeTrackingSocketState > state) | |
| ~LifetimeTrackingRawEthernetSocket () override | |
| void | Send (const Bytes &) override |
| Send one complete raw Ethernet frame. | |
| Bytes | Recv () override |
| Receive one raw Ethernet frame. | |
| void | SetTimeout (std::chrono::milliseconds) override |
| Set the receive timeout. | |
| void | WaitUntilReceiveEntered () |
| void | WaitUntilReceiveExited () |
| void | ReleaseReceive () |
Public Member Functions inherited from profinet::IRawEthernetSocket | |
| virtual | ~IRawEthernetSocket ()=default |
| Virtual destructor for polymorphic use. | |
Private Attributes | |
| std::shared_ptr< LifetimeTrackingSocketState > | state |
Definition at line 263 of file cyclic_raw_ethernet_socket_stub.h.
|
inlineexplicit |
Definition at line 266 of file cyclic_raw_ethernet_socket_stub.h.
|
inlineoverride |
Definition at line 272 of file cyclic_raw_ethernet_socket_stub.h.
References state.
|
inlineoverridevirtual |
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. |
Implements profinet::IRawEthernetSocket.
Definition at line 287 of file cyclic_raw_ethernet_socket_stub.h.
References state.
|
inline |
Definition at line 342 of file cyclic_raw_ethernet_socket_stub.h.
References state.
|
inlineoverridevirtual |
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. |
Implements profinet::IRawEthernetSocket.
Definition at line 283 of file cyclic_raw_ethernet_socket_stub.h.
|
inlineoverridevirtual |
Set the receive timeout.
| timeout | Maximum time that Recv() waits for a matching frame. Zero means wait indefinitely. |
The timeout is an abstraction-level receive timeout. The concrete transport is responsible for implementing the timeout using its underlying packet-access mechanism.
Implements profinet::IRawEthernetSocket.
Definition at line 318 of file cyclic_raw_ethernet_socket_stub.h.
|
inline |
Definition at line 322 of file cyclic_raw_ethernet_socket_stub.h.
References state.
|
inline |
Definition at line 332 of file cyclic_raw_ethernet_socket_stub.h.
References state.
|
private |
Definition at line 353 of file cyclic_raw_ethernet_socket_stub.h.
Referenced by ~LifetimeTrackingRawEthernetSocket(), Recv(), ReleaseReceive(), WaitUntilReceiveEntered(), and WaitUntilReceiveExited().