|
rogue
|
Reads Rogue stream data files and emits frames on stream master interface. More...
#include <StreamReader.h>
Public Member Functions | |
| StreamReader () | |
| Constructs a stream reader instance. | |
| ~StreamReader () | |
| Destroys stream reader and closes active file/thread. | |
| void | open (std::string file) |
| Opens a file and starts background read processing. | |
| void | close () |
| Stops read thread and closes active file immediately. | |
| bool | isOpen () |
| Returns whether a file descriptor is currently open. | |
| void | closeWait () |
| Waits for read activity to complete, then closes file/thread. | |
| bool | isActive () |
| Returns read activity state. | |
Public Member Functions inherited from rogue::interfaces::stream::Master | |
| 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. | |
| virtual void | stop () |
| Stops frame generation and shuts down associated threads. | |
| 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. | |
Public Member Functions inherited from rogue::EnableSharedFromThis< rogue::interfaces::stream::Master > | |
| std::shared_ptr< rogue::interfaces::stream::Master > | shared_from_this () |
Returns a shared_ptr<T> for this instance. | |
Public Member Functions inherited from rogue::EnableSharedFromThisBase | |
| virtual | ~EnableSharedFromThisBase () |
| Virtual destructor for polymorphic base usage. | |
Static Public Member Functions | |
| static std::shared_ptr< rogue::utilities::fileio::StreamReader > | create () |
| Creates a stream reader instance. | |
| static void | setup_python () |
| Registers Python bindings for this class. | |
Static Public Member Functions inherited from rogue::interfaces::stream::Master | |
| static std::shared_ptr< rogue::interfaces::stream::Master > | create () |
| Creates a stream master. | |
| static void | setup_python () |
| Registers this type with Python bindings. | |
Reads Rogue stream data files and emits frames on stream master interface.
StreamReader opens a file (or indexed file sequence) created by Rogue file writer utilities, parses frame headers/metadata, reconstructs stream frames, and forwards them downstream via sendFrame().
File sequence behavior:
.1, the reader attempts .2, .3, ... automatically as each file completes.Read activity runs in a background thread while isActive() is true.
Definition at line 51 of file StreamReader.h.
| rogue::utilities::fileio::StreamReader::StreamReader | ( | ) |
Constructs a stream reader instance.
Creator.
This constructor is a low-level C++ allocation path. Prefer create() when shared ownership or Python exposure is required.
Definition at line 65 of file StreamReader.cpp.
| rogue::utilities::fileio::StreamReader::~StreamReader | ( | ) |
Destroys stream reader and closes active file/thread.
Deconstructor.
Definition at line 72 of file StreamReader.cpp.
| void rogue::utilities::fileio::StreamReader::close | ( | ) |
Stops read thread and closes active file immediately.
Close a data file.
Definition at line 125 of file StreamReader.cpp.
| void rogue::utilities::fileio::StreamReader::closeWait | ( | ) |
Waits for read activity to complete, then closes file/thread.
Close when done.
Definition at line 148 of file StreamReader.cpp.
|
static |
Creates a stream reader instance.
Class creation.
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.
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
Definition at line 46 of file StreamReader.cpp.
| bool rogue::utilities::fileio::StreamReader::isActive | ( | ) |
Returns read activity state.
Return true when done.
true while background reader is active. Definition at line 156 of file StreamReader.cpp.
| bool rogue::utilities::fileio::StreamReader::isOpen | ( | ) |
Returns whether a file descriptor is currently open.
Get open status.
true if file is open; otherwise false. Definition at line 132 of file StreamReader.cpp.
| void rogue::utilities::fileio::StreamReader::open | ( | std::string | file | ) |
Opens a file and starts background read processing.
Open a data file.
| file | Input data filename. |
Definition at line 77 of file StreamReader.cpp.
|
static |
Registers Python bindings for this class.
Setup class in python.
Definition at line 52 of file StreamReader.cpp.