CombinerV2

CombinerV2 combines individual Rogue stream frames into a Batcher v2 super-frame. It is the software inverse of SplitterV2. For conceptual guidance, see Batcher Protocol Combiner.

Protocol reference: https://confluence.slac.stanford.edu/x/L2VlK

Python binding

This C++ class is also exported into Python as rogue.protocols.batcher.CombinerV2.

Python API page: - CombinerV2

CombinerV2 objects in C++ are referenced by the following shared pointer typedef:

typedef std::shared_ptr<rogue::protocols::batcher::CombinerV2> rogue::protocols::batcher::CombinerV2Ptr
[header]

The class description is shown below:

class CombinerV2 : public rogue::interfaces::stream::Master, public rogue::interfaces::stream::Slave
[header]

Combines individual frames into a batcher v2 super-frame.

Protocol reference: https://confluence.slac.stanford.edu/x/L2VlK

CombinerV2 is the software inverse of SplitterV2. It collects individual Rogue stream frames and packs them into a single batcher v2 super-frame with a 2-byte super-header and 7-byte per-record tails.

Threading model:

Public Functions

CombinerV2()
[header] [impl]

Constructs a CombinerV2 instance.

Creator.

~CombinerV2()
[header] [impl]

Destroys the combiner.

Deconstructor.

virtual void acceptFrame(std::shared_ptr<rogue::interfaces::stream::Frame> frame)
[header] [impl]

Accepts a frame and immediately queues it for batching.

Accept a frame from master.

Parameters:

frame – Input frame to be included in the next batch.

void sendBatch()
[header] [impl]

Builds and sends a batcher v2 super-frame from all queued frames.

Build and send the batched super-frame.

If no frames are queued, this is a no-op. After sending, the queue is cleared and the sequence counter is incremented.

uint32_t getCount()
[header] [impl]

Returns the number of frames currently queued.

Return queue count.

Returns:

Queue depth.

Public Static Functions

static void setup_python()
[header] [impl]

Registers Python bindings for this class.

Setup class in python.

static std::shared_ptr<rogue::protocols::batcher::CombinerV2> create()
[header] [impl]

Creates a CombinerV2 instance.

Class creation.

Company : SLAC National Accelerator Laboratory

Description : AXI Batcher V2 Combiner (SW Batcher) (https://confluence.slac.stanford.edu/x/L2VlK)

Builds a batcher v2 super-frame from individual frames. This is the software inverse of the SplitterV2 unbatcher.

Super-frame layout (same as FW batcher):

[Super Header (2 bytes)][Record0 Data][Record0 Tail (7 bytes)]…

Super Header: 2 bytes Byte 0: Bits 3:0 = Version = 2 Bits 7:4 = Reserved Byte 1: Bits 15:8 = Sequence # for debug

Frame Tail: 7 bytes Word 0: 4 bytes bits 31:0 = size (payload bytes) Word 1: 3 bytes bits 7:0 = Destination bits 15:8 = First user bits 23:16 = Last user

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.

Returns:

Shared pointer to the created combiner.