NVIDIA Holoscan SDK v3.8.0

Template Class TestHarnessSinkOp

Base Type

template<typename T>
class TestHarnessSinkOp : public holoscan::Operator

Simple validation sink operator.

This operator receives data from the test operator and validates it against a set of provided validation functions. It is used to test operators that produce data to be consumed by another operator. For operators with N output ports, the test application should create N sink operators.

Template Parameters

T – The type of the data to receive

Public Functions

HOLOSCAN_OPERATOR_FORWARD_ARGS (TestHarnessSinkOp) TestHarnessSinkOp()=default
inline virtual void setup(holoscan::OperatorSpec &spec) override

Define the operator specification.

Parameters

spec – The reference to the operator specification.

inline virtual void compute(holoscan::InputContext &op_input, holoscan::OutputContext&, holoscan::ExecutionContext&) override

Implement the compute method.

This method is called by the runtime multiple times. The runtime calls this method until the operator is stopped.

Parameters
  • op_input – The input context of the operator.

  • op_output – The output context of the operator.

  • context – The execution context of the operator.

inline void set_validator(std::function<void(const T&)> validator)
inline void set_validators(const std::vector<std::function<void(const T&)>> &validators)
inline size_t get_received_count() const

Previous Template Class OperatorTestHarness
Next Template Class TestHarnessSourceOp
© Copyright 2022-2025, NVIDIA. Last updated on Nov 6, 2025