|
rogue
|
Shared UDP transport base for stream client/server endpoints. More...
#include <Core.h>
Public Member Functions | |
| Core (bool jumbo) | |
| Constructs shared UDP core state. | |
| ~Core () | |
| Destroys the UDP core instance. | |
| void | stop () |
| Stops the UDP interface. | |
| uint32_t | maxPayload () |
| Returns maximum UDP payload size in bytes. | |
| bool | setRxBufferCount (uint32_t count) |
| Requests kernel UDP receive-buffer sizing by packet count. | |
| void | setTimeout (uint32_t timeout) |
| Sets outbound transmit wait timeout. | |
Static Public Member Functions | |
| static void | setup_python () |
| Registers Python bindings for this class. | |
Protected Attributes | |
| std::shared_ptr< rogue::Logging > | udpLog_ |
| bool | jumbo_ |
| int32_t | fd_ |
| struct sockaddr_in | remAddr_ |
| struct timeval | timeout_ |
| std::thread * | thread_ |
| bool | threadEn_ |
| std::mutex | udpMtx_ |
Shared UDP transport base for stream client/server endpoints.
Core contains common socket and transport configuration used by UDP stream endpoints. It centralizes payload sizing (jumbo vs standard MTU), socket timeout configuration for transmit operations, receive-buffer sizing, and shared synchronization primitives used by derived classes.
Concrete data-path behavior (background receive thread, stream callbacks, and socket lifecycle) is implemented by udp::Client and udp::Server.
|
explicit |
Constructs shared UDP core state.
Creator.
| jumbo | true to use jumbo-payload sizing; false for standard MTU. |
Description:
This file is part of the rogue software platform. It is subject to the license terms in the LICENSE.txt file found in the top-level directory of this distribution and at: https://confluence.slac.stanford.edu/display/ppareg/LICENSE.html. No part of the rogue software platform, including this file, may be copied, modified, propagated, or distributed except according to the terms
| rogue::protocols::udp::Core::~Core | ( | ) |
| uint32_t rogue::protocols::udp::Core::maxPayload | ( | ) |
| bool rogue::protocols::udp::Core::setRxBufferCount | ( | uint32_t | count | ) |
Requests kernel UDP receive-buffer sizing by packet count.
Set UDP RX Size.
Computes count * mtu bytes and programs SO_RCVBUF. Returns false if the kernel effective receive buffer is smaller than requested.
| count | Number of packets worth of RX buffering to request. |
true if effective buffer size meets/exceeds request. | void rogue::protocols::udp::Core::setTimeout | ( | uint32_t | timeout | ) |
|
static |
| void rogue::protocols::udp::Core::stop | ( | ) |
Stops the UDP interface.
Derived classes provide socket/thread shutdown behavior.
|
protected |
|
protected |
|
protected |