InverterV2

InverterV2 rewrites Batcher v2 framing in place and forwards one transformed output frame per input frame. It is not a batching or unbatching stage. For conceptual guidance, see Batcher Protocol Inverter.

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

Python binding

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

Python API page: - InverterV2

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

typedef std::shared_ptr<rogue::protocols::batcher::InverterV2> rogue::protocols::batcher::InverterV2Ptr
[header]

The class description is shown below:

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

In-place inverter for SLAC AXI Batcher v2 framing.

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

InverterV2 uses CoreV2 metadata to reinterpret/shift record tail data inside the original frame payload. This produces a transformed frame layout expected by downstream consumers without allocating one frame per record. It is not a batching or unbatching stage: one input frame yields one output frame after in-place reformatting.

InverterV2 transforms a batcher v2 frame by copying per-record tail fields into the header/tail positions expected by downstream consumers and trimming the final tail from payload. The transformed frame is then forwarded. Use SplitterV2 when true unbatching (one output frame per record) is desired.

Threading model:

  • No internal worker thread is created.

  • Processing executes synchronously in the caller thread of acceptFrame().

Public Functions

InverterV2()
[header] [impl]

Constructs an InverterV2 instance.

Creator.

This constructor is a low-level C++ allocation path. Prefer create() when shared ownership or Python exposure is required.

~InverterV2()
[header] [impl]

Destroys the inverter.

Deconstructor.

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

Accepts, transforms, and forwards one batcher v2 frame.

Accept a frame from master.

Parameters:

frame – Input frame to transform.

Public Static Functions

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

Creates an InverterV2 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.

Company : SLAC National Accelerator Laboratory

Description: SLAC Inverter 2

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 inverter.

static void setup_python()
[header] [impl]

Registers Python bindings for this class.

Setup class in python.