What can I help you with?
NVIDIA Holoscan SDK v3.2.0

Class DoubleBufferReceiver

Base Type

class DoubleBufferReceiver : public holoscan::Receiver

Double buffer receiver class.

The DoubleBufferReceiver class is used to receive messages from another operator within a fragment. This class uses a double buffer queue where messages first arrive in a “front stage”. When an operator is selected for execution, any front stage messages are moved to the main stage just before the compute method of the operator is called. During compute, the front stage is now available to receive messages again (and these would then be processed during the next compute call).

Application authors are not expected to use this class directly. It will be automatically configured for input ports specified via Operator::setup.

==Parameters==

  • capacity (uint64_t, optional): The capacity of the double-buffer queue used by the receiver. Defaults to 1.

  • policy (uint64_t, optional): The policy to use when a message arrives, but there is no space in the receiver. The possible values are 0: pop, 1: reject, 2: fault (Default: 2).

Public Functions

template<typename ArgT, typename ...ArgsT, typename = std::enable_if_t<!std::is_base_of_v<::holoscan::Resource, std::decay_t<ArgT>> && (std::is_same_v<::holoscan::Arg, std::decay_t<ArgT>> || std::is_same_v<::holoscan::ArgList, std::decay_t<ArgT>>)>>
inline explicit DoubleBufferReceiver(ArgT &&arg, ArgsT&&... args)
DoubleBufferReceiver() = default
DoubleBufferReceiver(const std::string &name, nvidia::gxf::DoubleBufferReceiver *component)
DoubleBufferReceiver(const std::string &name, AnnotatedDoubleBufferReceiver *component)
virtual const char *gxf_typename() const override
virtual void setup(ComponentSpec &spec) override

Define the resource specification.

Parameters

spec – The reference to the component specification.

void track()

Track the data flow of the receiver and use holoscan::AnnotatedDoubleBufferReceiver as the GXF Component.

nvidia::gxf::DoubleBufferReceiver *get() const

Public Members

Parameter<uint64_t> capacity_
Parameter<uint64_t> policy_

Previous Class DLManagedMemoryBufferVersioned
Next Class DoubleBufferTransmitter
© Copyright 2022-2025, NVIDIA. Last updated on May 29, 2025.