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.

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

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

typedef std::shared_ptr<rogue::protocols::batcher::InverterV2> rogue::protocols::batcher::InverterV2Ptr

The class description is shown below:

class InverterV2 : public rogue::interfaces::stream::Master, public rogue::interfaces::stream::Slave

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()

Constructs an InverterV2 instance.

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

~InverterV2()

Destroys the inverter.

virtual void acceptFrame(std::shared_ptr<rogue::interfaces::stream::Frame> frame)

Accepts, transforms, and forwards one batcher v2 frame.

Parameters:

frame – Input frame to transform.

Public Static Functions

static std::shared_ptr<rogue::protocols::batcher::InverterV2> create()

Creates an InverterV2 instance.

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.

Returns:

Shared pointer to the created inverter.

static void setup_python()

Registers Python bindings for this class.