RateDrop

For conceptual usage, see:

Python binding

This C++ class is also exported into Python as rogue.interfaces.stream.RateDrop.

Python API page: - RateDrop

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

typedef std::shared_ptr<rogue::interfaces::stream::RateDrop> rogue::interfaces::stream::RateDropPtr
[header]

Shared pointer alias for RateDrop.

The class description is shown below:

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

Stream frame-rate dropper.

Drops frames at a configured rate, either by frame count or by time period. In period mode, value is interpreted as seconds between kept frames. Otherwise, value is interpreted as number of dropped frames between kept frames.

Public Functions

RateDrop(bool period, double value)
[header] [impl]

Constructs a rate-drop filter.

Creator with version constant.

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

Parameters:
  • period – Set to true for period mode; false for drop-count mode.

  • value – Period seconds or drop-count setting.

~RateDrop()
[header] [impl]

Destroys the rate-drop filter.

Deconstructor.

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

Receives a frame and drops/forwards according to configured rate policy.

Accept a frame from master.

Parameters:

frame – Incoming frame.

Public Static Functions

static std::shared_ptr<rogue::interfaces::stream::RateDrop> create(bool period, double value)
[header] [impl]

Creates a rate-drop filter.

Class creation.

Parameter semantics are identical to the constructor; see RateDrop() for mode and value behavior details. 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 : Drops frames at a specified rate.

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:
  • period – Set to true for period mode; false for drop-count mode.

  • value – Period seconds or drop-count setting.

Returns:

Shared pointer to the created rate-drop filter.

static void setup_python()
[header] [impl]

Registers this type with Python bindings.

Setup class in python.