|
| | TcpCore (const std::string &addr, uint16_t port, bool server) |
| | Constructs a TCP stream bridge core.
|
| |
| | ~TcpCore () |
| | Destroys the bridge core and releases resources.
|
| |
| void | close () |
| | Closes active bridge connections.
|
| |
| void | stop () |
| | Stops the interface and worker thread.
|
| |
| void | acceptFrame (std::shared_ptr< rogue::interfaces::stream::Frame > frame) |
| | Receives a frame from upstream and forwards over the TCP bridge.
|
| |
| | Master () |
| | Constructs a stream master.
|
| |
| virtual | ~Master () |
| | Destroys the stream master.
|
| |
| uint32_t | slaveCount () |
| | Returns the number of attached slaves.
|
| |
| void | addSlave (std::shared_ptr< rogue::interfaces::stream::Slave > slave) |
| | Attaches a downstream slave.
|
| |
| std::shared_ptr< rogue::interfaces::stream::Frame > | reqFrame (uint32_t size, bool zeroCopyEn) |
| | Requests allocation of a new frame from the primary slave.
|
| |
| void | sendFrame (std::shared_ptr< rogue::interfaces::stream::Frame > frame) |
| | Sends a frame to all attached slaves.
|
| |
| bool | ensureSingleBuffer (std::shared_ptr< rogue::interfaces::stream::Frame > &frame, bool reqEn) |
| | Ensures a frame is represented by a single buffer.
|
| |
| void | equalsPy (boost::python::object p) |
| | Supports == operator usage from Python.
|
| |
| boost::python::object | rshiftPy (boost::python::object p) |
| | Supports >> operator usage from Python.
|
| |
| void | operator== (std::shared_ptr< rogue::interfaces::stream::Slave > &other) |
| | Supports == operator usage in C++.
|
| |
| std::shared_ptr< rogue::interfaces::stream::Slave > & | operator>> (std::shared_ptr< rogue::interfaces::stream::Slave > &other) |
| | Connects this master to a slave via stream chaining operator.
|
| |
| std::shared_ptr< rogue::interfaces::stream::Master > | shared_from_this () |
| | Returns a shared_ptr<T> for this instance.
|
| |
| virtual | ~EnableSharedFromThisBase () |
| | Virtual destructor for polymorphic base usage.
|
| |
| | Slave () |
| | Constructs a stream slave.
|
| |
| virtual | ~Slave () |
| | Destroys the stream slave.
|
| |
| void | setDebug (uint32_t debug, std::string name) |
| | Sets debug message verbosity and logger name.
|
| |
| uint64_t | getFrameCount () |
| | Returns frame counter.
|
| |
| uint64_t | getByteCount () |
| | Returns byte counter.
|
| |
| bool | ensureSingleBuffer (std::shared_ptr< rogue::interfaces::stream::Frame > &frame, bool reqEn) |
| | Ensures frame is backed by a single buffer.
|
| |
| std::shared_ptr< rogue::interfaces::stream::Frame > | reqLocalFrame (uint32_t size, bool zeroCopyEn) |
| | Services a local frame allocation request through this object's pool interface.
|
| |
| boost::python::object | lshiftPy (boost::python::object p) |
| | Supports << operator usage from Python.
|
| |
| std::shared_ptr< rogue::interfaces::stream::Master > & | operator<< (std::shared_ptr< rogue::interfaces::stream::Master > &other) |
| | Connects this slave to a master via stream chaining operator.
|
| |
| | Pool () |
| | Constructs a pool with default allocation behavior enabled.
|
| |
| virtual | ~Pool () |
| | Destroys the pool and releases any cached buffer storage.
|
| |
| uint32_t | getAllocBytes () |
| | Returns total currently allocated bytes.
|
| |
| uint32_t | getAllocCount () |
| | Returns total currently allocated buffer count.
|
| |
| virtual std::shared_ptr< rogue::interfaces::stream::Frame > | acceptReq (uint32_t size, bool zeroCopyEn) |
| | Services a frame allocation request from a master.
|
| |
| virtual void | retBuffer (uint8_t *data, uint32_t meta, uint32_t size) |
| | Returns buffer data to the allocator.
|
| |
| void | setFixedSize (uint32_t size) |
| | Sets fixed-size mode.
|
| |
| uint32_t | getFixedSize () |
| | Returns fixed-size allocation setting.
|
| |
| void | setPoolSize (uint32_t size) |
| | Sets buffer pool size.
|
| |
| uint32_t | getPoolSize () |
| | Returns configured maximum number of cached pool entries.
|
| |
| std::shared_ptr< rogue::interfaces::stream::Pool > | shared_from_this () |
| | Returns a shared_ptr<T> for this instance.
|
| |
| std::shared_ptr< rogue::interfaces::stream::Slave > | shared_from_this () |
| | Returns a shared_ptr<T> for this instance.
|
| |
Stream TCP bridge core implementation.
This class implements the core functionality of the TcpClient and TcpServer classes which implement a Rogue stream bridge over a TCP network. This core can operate in either client or server mode. The TcpClient and TcpServer classes are thin wrappers that define which mode flag to pass to this base class.
The TcpServer and TcpClient interfaces are blocking and will stall frame transmissions when the remote side is either not present or is back-pressuring. When the remote server is not present a local buffer is not utilized, where it is utilized when a connection has been established.
Definition at line 51 of file TcpCore.h.
| rogue::interfaces::stream::TcpCore::TcpCore |
( |
const std::string & |
addr, |
|
|
uint16_t |
port, |
|
|
bool |
server |
|
) |
| |
Constructs a TCP stream bridge core.
Creator.
This constructor is a low-level C++ allocation path. Prefer create() when shared ownership or Python exposure is required.
The constructor takes an address, port, and server mode flag. The address can be an IP address or hostname. In server mode, the address selects the local interface to bind. A value of "*" binds all local interfaces.
The stream bridge uses two consecutive TCP ports; port is the base. For example, port=8000 uses ports 8000 and 8001.
- Parameters
-
| addr | Interface address for server, remote server address for client. |
| port | Base TCP port number. |
| server | Set to true to run in server mode. |
Definition at line 50 of file TcpCore.cpp.
Creates a TCP stream bridge core instance and returns it as TcpCorePtr.
Class creation.
Parameter semantics are identical to the constructor; see TcpCore() for address and port behavior details. This static factory is the preferred construction path when the object is shared across Rogue graph connections or exposed to Python. It returns std::shared_ptr ownership compatible with Rogue pointer typedefs. Not exposed to Python.
- Parameters
-
| addr | Interface address for server, remote server address for client. |
| port | Base TCP port number. |
| server | Set to true to run in server mode. |
- Returns
- Shared pointer to the created bridge core.
Company : SLAC National Accelerator Laboratory
Description:
Stream Network Core
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
contained in the LICENSE.txt file.
Definition at line 44 of file TcpCore.cpp.