NVIDIA Holoscan SDK v3.8.0

Template Class TestHarnessSourceOp

Base Type

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

Test data source operator providing predetermined test data.

This operator emits a sequence of values from a provided vector. It is used to test operators that consume data from a source. For operators with N input ports, the test application should create N source operators.

Template Parameters

T – The type of the data to emit

Public Functions

HOLOSCAN_OPERATOR_FORWARD_ARGS (TestHarnessSourceOp) TestHarnessSourceOp()=default
inline virtual void setup(OperatorSpec &spec) override

Define the operator specification.

Parameters

spec – The reference to the operator specification.

inline virtual void compute(InputContext&, OutputContext &op_output, 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_test_data(const std::vector<T> &data)

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