Template Class TestHarnessSourceOp
Defined in File test_harness.hpp
Base Type
public holoscan::Operator(Class Operator)
-
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)