StreamWriterChannel
The StreamWriterChannel class is the interface between the StreamWriter class and the incoming data streams.
For conceptual utility usage, see:
StreamWriterChannel objects in C++ are referenced by the following shared pointer typedef:
-
typedef std::shared_ptr<rogue::utilities::fileio::StreamWriterChannel> rogue::utilities::fileio::StreamWriterChannelPtr
[header]
The class description is shown below:
-
class StreamWriterChannel : public rogue::interfaces::stream::Slave
[header] Stream sink that writes incoming frames into a tagged writer channel.
StreamWriterChannelis astream::Slavefront end forStreamWriter. Each instance is bound to a channel/tag value used in the output file bank header. If constructed withchannel == 0, the channel is taken from each incoming frame (frame->getChannel()); otherwise the configured channel is forced for all writes.The class also tracks how many frames have been accepted so callers can synchronize on data capture progress with
waitFrameCount().Public Functions
Constructs a stream writer channel.
Creator.
This constructor is a low-level C++ allocation path. Prefer
create()when shared ownership or Python exposure is required.- Parameters:
writer – Destination writer used to serialize frames.
channel – Output channel/tag. Use
0to forward per-frame channel.
Accepts and writes one incoming frame.
Accept a frame from master.
The method writes the frame through
StreamWriter, increments the local accepted-frame counter, and wakes waiters inwaitFrameCount().- Parameters:
frame – Input frame to write.
-
uint32_t getFrameCount()
[header] [impl] Returns the number of accepted frames.
- Returns:
Accepted frame count.
Public Static Functions
Creates a stream writer channel instance.
Class creation.
Parameter semantics are identical to the constructor; see
StreamWriterChannel()for output-channel behavior details. This static factory is the preferred construction path when the object is shared across Rogue graph connections or exposed to Python. It returnsstd::shared_ptrownership compatible with Rogue pointer typedefs.Company : SLAC National Accelerator Laboratory
Description : Class to act as a slave interface to the StreamWriterChannel. Each slave is associated with a tag. The tag is included in the bank header of each write.
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.
- Parameters:
writer – Destination writer used to serialize frames.
channel – Output channel/tag. Use
0to forward per-frame channel.
- Returns:
Shared pointer to the created channel.