|
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::BlockingRawEthernetSocket:
Collaboration diagram for profinet::cyclic::test::BlockingRawEthernetSocket:Public Member Functions | |
| void | Send (const Bytes &frame) override |
| Send one complete raw Ethernet frame. | |
| Bytes | Recv () override |
| Receive one raw Ethernet frame. | |
| void | SetTimeout (std::chrono::milliseconds timeout) override |
| Set the receive timeout. | |
| void | BlockReceive () |
| void | ReleaseReceive () |
| void | WaitUntilReceiveEntered () |
Public Member Functions inherited from profinet::IRawEthernetSocket | |
| virtual | ~IRawEthernetSocket ()=default |
| Virtual destructor for polymorphic use. | |
Private Attributes | |
| std::mutex | mutex |
| std::condition_variable | receiveCv |
| std::condition_variable | receiveEnteredCv |
| bool | receiveEntered {false} |
| bool | receiveReleased {false} |
Definition at line 184 of file cyclic_raw_ethernet_socket_stub.h.
|
inline |
Definition at line 202 of file cyclic_raw_ethernet_socket_stub.h.
References mutex, receiveCv, receiveEntered, receiveEnteredCv, and receiveReleased.
Referenced by Recv().
Here is the caller graph for this function:
|
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 191 of file cyclic_raw_ethernet_socket_stub.h.
References BlockReceive().
Here is the call graph for this function:
|
inline |
Definition at line 214 of file cyclic_raw_ethernet_socket_stub.h.
References mutex, receiveCv, and receiveReleased.
|
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 187 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 198 of file cyclic_raw_ethernet_socket_stub.h.
|
inline |
Definition at line 224 of file cyclic_raw_ethernet_socket_stub.h.
References mutex, receiveEntered, and receiveEnteredCv.
|
private |
Definition at line 239 of file cyclic_raw_ethernet_socket_stub.h.
Referenced by BlockReceive(), ReleaseReceive(), and WaitUntilReceiveEntered().
|
private |
Definition at line 240 of file cyclic_raw_ethernet_socket_stub.h.
Referenced by BlockReceive(), and ReleaseReceive().
|
private |
Definition at line 243 of file cyclic_raw_ethernet_socket_stub.h.
Referenced by BlockReceive(), and WaitUntilReceiveEntered().
|
private |
Definition at line 241 of file cyclic_raw_ethernet_socket_stub.h.
Referenced by BlockReceive(), and WaitUntilReceiveEntered().
|
private |
Definition at line 244 of file cyclic_raw_ethernet_socket_stub.h.
Referenced by BlockReceive(), and ReleaseReceive().