NVIDIA Holoscan SDK v2.4.0
Holoscan v2.4.0

Class VirtualOperator

Base Type

Derived Types

class VirtualOperator : public holoscan::Operator

Virtual operator.

This class is used when connecting fragments with transmitters and receivers (such as UcxTransmitter and UcxReceiver) that communicate with other fragments.

The input/output port of an operator in the fragment can be connected to this virtual operator so that the internal graph initialization mechanism (such as implicit broadcasting or multi-receivers) can be applied to the port of the operator connected to this operator in the same fragment.

Subclassed by holoscan::ops::VirtualReceiverOp, holoscan::ops::VirtualTransmitterOp

Public Functions

template<typename StringT, typename = std::enable_if_t<std::is_constructible_v<std::string, StringT>>>
inline VirtualOperator(StringT port_name, IOSpec::ConnectorType connector_type, ArgList arg_list)
inline VirtualOperator()
virtual void initialize() override

Initialize the Virtual operator.

This function does not call the Operator::initialize() method that is called when the fragment is initialized by Executor::initialize_fragment().

Instead, it just sets the operator type to <a class="reference internal" href="classholoscan_1_1Operator.html#classholoscan_1_1Operator_1a1a719d0fcfdeea37b9ba6f0f053b4dd9af2dc25c8e1ec3e89e6861e816a1e5bda" target="_self">holoscan::Operator::OperatorType::kVirtual</a>.

inline const std::string &port_name() const

Get the name of the port of the operator connected to this operator in the same fragment.

Returns

The name of the port of the operator connected to this operator in the same fragment.

inline void port_name(const std::string &port_name)

Set the name of the port of the operator connected to this operator in the same fragment.

Parameters

port_name – The name of the port of the operator connected to this operator in the same fragment.

inline IOSpec::ConnectorType connector_type() const

Get the connector type of this operator.

Returns

The connector type of this operator.

inline const ArgList &arg_list() const

Get the argument list of this operator.

Returns

The argument list of this operator.

IOSpec *input_spec()

Get the input specification for this operator.

Returns

The pointer to the input specification for this operator.

IOSpec *output_spec()

Get the output specification for this operator.

Returns

The pointer to the output specification for this operator.

inline IOSpec::IOType io_type() const

Get the IO type of this operator.

Returns

The IO type of this operator.

Protected Attributes

std::string port_name_

The name of the port of the operator connected to this operator in the same fragment.

IOSpec::ConnectorType connector_type_

The connector type of this operator.

ArgList arg_list_

The argument list of this operator.

IOSpec *input_spec_ = nullptr

The pointer to the input specification for this operator.

IOSpec *output_spec_ = nullptr

The pointer to the output specification for this operator.

IOSpec::IOType io_type_ = IOSpec::IOType::kInput

Previous Class VideoStreamReplayerOp
Next Class VirtualReceiverOp
© Copyright 2022-2024, NVIDIA. Last updated on Oct 1, 2024.